#🪅-progaming

1 messages · Page 126 of 1

crude star
#

-w -fpermissive

winged mantle
#

huh, I didn't know any languages supported this

#

I mean, what even if the usecase

nimble bone
#

Satan.

winged mantle
#

/run

/* 1 /* 2 /* 3 */ 2 */ 1 */
fn main() {
    println!("Hello world");
}
rugged berryBOT
#

Here is your rs(1.68.2) output @winged mantle

Hello world
winged mantle
#

horror

tired vigil
winged mantle
#

just add // to every line

tired vigil
#

What if you're editing your code on a phone in apple notes and you don't have access to multiline editing or ctrl-/

winged mantle
#

true

#

it would be slow

solid gazelle
#

err then don't do it

hoary sluice
#

/run

/* suck /* my */ balls */
fun main() = println("hello world")
rugged berryBOT
#

Here is your kt(1.8.20) output @hoary sluice

hello world
solid gazelle
#

never rly had an issue with js multiline comments

hoary sluice
#

@zooter

#

WHERES ZOOT

solid gazelle
#

dead

#

eagelyyyy @hoary sluice

#

ru an eagle

winged mantle
#

usually i use single-line comments

#

multi-line comments are for documentation

crude star
hoary sluice
solid gazelle
hoary sluice
valid jetty
solemn ravine
#

WHO MADE THIS

valid jetty
#

@lucid trail ill make the pr

lucid trail
hoary sluice
#

the ai lever is a lot closer to 46 degrees

valid jetty
#

it's not a lever it's like that thing you use to raise cars

#

spinny

hoary sluice
#

@valid jetty

#

@valid jetty

#
proc main { println "Hello world"; }
``` returns this
#

but if you do

proc main {
  println "Hello world";
}
``` itll fail at the newline cause its a significant token ![husk](https://cdn.discordapp.com/emojis/1026532993923293184.webp?size=128 "husk")
valid jetty
#

what why 😭

#

newline shouldnt be part of your lexer

#

or well it should be but it should be skipped

hoary sluice
#

now i can do readln

#

well

#

get to implementing readln

valid jetty
#

?? why are newlines tokens

hoary sluice
#

cause i dont want to force semicolons

#

rn newline == semicolon, i will improve it later

valid jetty
#

you dont need newlines to be tokens to have optional semicolons

hoary sluice
#

i think lua handles it well

valid jetty
#

oh horror

hoary sluice
valid jetty
hoary sluice
#
foo 1 2
bar 2 1
#

parse this

#

without significant newline

valid jetty
#

guh

hoary sluice
#

(you cant)

lucid trail
hoary sluice
#

you could make the parser aware of the amount of args a function has but this is still a problem

foo int int int int int
foo 1
bar 1 2
``` is foo partially applied with `1` or is it fully applied with `1 bar 1 2`
#

@valid jetty

hoary sluice
#

nvm it doesnt

crude star
#

/run ```lua
print("hi") print("this is valid code") newlines = "arent real"

rugged berryBOT
#

Here is your lua(5.4.4) output @crude star

hi
this is valid code
crude star
#

its really dumb

hoary sluice
#

the parser can clearly tell where statements start and end here

#

because of )

crude star
#

and thats why a bunch of expresions cant be statements

#

/run ```lua
this_is_an_error
print()

rugged berryBOT
#

@crude star I only received lua(5.4.4) error output

lua: file0.code:2: syntax error near 'print'
crude star
#

its really unintuitive

hoary sluice
#

@valid jetty newline handling is horror

hoary sluice
#

i understand that requiring semicolons is the better approach usually

#

but it isnt for me

crude star
#

no im just saying lua isnt a good example at all

hoary sluice
#

i mentioned lua because i know it has newlines as separators that isnt just s/\n/;

#

i dont use lua outside of nvim config

#

so maybe it is bad

#

but i havent noticed any issues

crude star
#

nah it just treats newlines as spaces

hoary sluice
#

oh what

#

alr

#

basically i cant allow multiple newlines or multiple semicolons rn

#

or i would have to add skip newlines into every step in every statement parser

crude star
#

it doesnt matter that something is a function

crude star
#

i see

hoary sluice
#

this was in context of not lexing newlines but still not forcing semicolons

crude star
#

have you considered using indentation level

hoary sluice
#

🤮

#

maybe ill force semicolons

#

i have to allow some way of making multiline function chains anyways

#

ill think abt it

crude star
#

/run ```haskell
main :: IO ()
main = do
foo
bar
baz

foo = print
bar = "hi"
baz = print "hello"

rugged berryBOT
#

Here is your haskell(9.0.1) output @crude star

"hi"
"hello"
crude star
hoary sluice
#

/run ```haskell
main :: IO ()
main = do
foo
bar
baz

foo = print
bar = "hi"
baz = print "hello"

rugged berryBOT
#

@hoary sluice I received haskell(9.0.1) compile errors


file0.code.hs:3:3: error:
    * Couldn't match expected type: IO a0
                  with actual type: a1 -> IO ()
    * Probable cause: `​foo' is applied to too few arguments
      In a stmt of a 'do' block: foo
      In the expression:
        do foo
           bar
           baz
      In an equation for `​main':
          main
            = do foo
                 bar
                 baz
  |
3 |   foo
  |   ^^^

file0.code.hs:4:3: error:
    * Couldn't match type `​[]' with `​IO'
      Expected: IO Char
        Actual: String
    * In a stmt of a 'do' block: bar
      In the expression:
        do foo
           bar
           baz
      In an equation for `​main':
          main```
hoary sluice
#

wtf thats disgusting

crude star
#

it makes sense

hoary sluice
#

it does but i dont wann do that

#

/run ```haskell
main :: IO ()
main = do
foo bar
baz

foo = print
bar = "hi"
baz = print "hello"

rugged berryBOT
#

Here is your haskell(9.0.1) output @hoary sluice

"hi"
"hello"
hoary sluice
#

wait how does it do this

crude star
#

/run ```haskell
main :: IO ()
main = do
{ foo
bar
; baz
}

foo = print
bar = "hi"
baz = print "hello"

rugged berryBOT
#

Here is your haskell(9.0.1) output @crude star

"hi"
"hello"
hoary sluice
#

is this with type checking

crude star
#

uh

#

no

#

its just print "hi"

#

and ```
print
"hi"

hoary sluice
#

/run ```haskell
foo :: Int -> Int -> Int
foo a b = a + b
main :: IO ()
main = do
foo 1 2

rugged berryBOT
#

@hoary sluice I received haskell(9.0.1) compile errors


file0.code.hs:5:3: error:
    * Couldn't match expected type `​IO ()' with actual type `​Int'
    * In a stmt of a 'do' block: foo 1 2
      In the expression: do foo 1 2
      In an equation for `​main': main = do foo 1 2
  |
5 |   foo 1 2
  |   ^^^^^^^
chmod: cannot access 'out': No such file or directory

file0.code.hs:5:3: error:
    * Couldn't match expected type `​IO ()' with actual type `​Int'
    * In a stmt of a 'do' block: foo 1 2
      In the expression: do foo 1 2
      In an equation for `​main': main = do foo 1 2
  |
5 |   foo 1 2
  |   ^^^^^^^
chmod: cannot access 'out': No such file or directory
hoary sluice
#

/run ```hs
foo a b = print (a + b)
main :: IO ()
main = do
foo 1 2

rugged berryBOT
#

Here is your hs(9.0.1) output @hoary sluice

3
hoary sluice
#

/run ```hs
foo a b = print (a + b)
main :: IO ()
main = do
foo 1
2

rugged berryBOT
#

@hoary sluice I received hs(9.0.1) compile errors


file0.code.hs:5:1: error:
    Parse error: module header, import declaration
    or top-level declaration expected.
  |
5 | 2
  | ^
chmod: cannot access 'out': No such file or directory

file0.code.hs:5:1: error:
    Parse error: module header, import declaration
    or top-level declaration expected.
  |
5 | 2
  | ^
chmod: cannot access 'out': No such file or directory
hoary sluice
#

/run ```hs
foo a b = print (a + b)
main :: IO ()
main = do
foo 1
2

rugged berryBOT
#

@hoary sluice I received hs(9.0.1) compile errors


file0.code.hs:4:3: error:
    * Couldn't match expected type: IO a0
                  with actual type: a1 -> IO ()
    * Probable cause: `​foo' is applied to too few arguments
      In a stmt of a 'do' block: foo 1
      In the expression:
        do foo 1
           2
      In an equation for `​main':
          main
            = do foo 1
                 2
  |
4 |   foo 1
  |   ^^^^^
chmod: cannot access 'out': No such file or directory

file0.code.hs:4:3: error:
    * Couldn't match expected type: IO a0
                  with actual type: a1 -> IO ()
    * Probable cause: `​foo' is applied to too few arguments
      In a stmt of a 'do' block: foo 1
      In the expression:
        do foo 1
           2
      In an equation for `​main':
          main
            = do foo 1
                 2```
hoary sluice
#

/run ```hs
foo a b = print (a + b)
main :: IO ()
main = do
foo 1
2

rugged berryBOT
#

Here is your hs(9.0.1) output @hoary sluice

3
hoary sluice
#

oh this is evil

lofty iris
#

does anyone here know vulkan

#

🫠

fleet cedar
#

Eagle discovering significant whitespace for the first time?

autumn sedge
#

@royal nymph how should one go about making prs with tweaks to different parts of vencord? eg; themes menu, plugin settings (and others that come to mind)
i was thinking of having just one big pr, but thought it wouldn't be nice if some changes are good to add while others aren't, so will a bunch of small prs be good?
and separate question, i recall seeing a gh comment by you/another maintainer (which i just can't find venniesad) that submitting requests into branches that aren't main would be easier for everyone, can you explain that/link the comment if you remember where it was?

#

-# i hope this is coherent wireless

royal nymph
#

unless your changes belong together

#

and branch doesnt matter

autumn sedge
#

thank you

hoary sluice
#

well i didnt have significant indentation, only newlines, but that still counts, right?

jade stone
#

Significant whitespace is so stupid
I hate ASI in JavaScript

crude star
#
return
  sadan;
jade stone
#
a = 1
[1, 2, 3].map(console.log)
fleet cedar
#

It's just that js's sucks

jade stone
#

Nope

#

I like my semicolons and braces

jade stone
fleet cedar
#

Less visual noise, mainly

jade stone
#

I wouldn't call it visual noise myself

I really like being able to easily select the test within a block and jump to the matching brace. I also just like semicolons, idk.

fleet cedar
#

Yeah, jumping to end of block is often missing in whitespace languages, that's true

solid gazelle
#

-# user error

nimble bone
#

vai tldr

elder yarrowBOT
pseudo sierra
#

there's a new one

dawn ledge
fleet cedar
#

Does your editor support that?

dawn ledge
#

i dont use ws significant languages

#

and i dont use jump features at all

hoary sluice
#

@valid jetty imma remove newlines as tokens and force semicolons

#

and remove multiline comments

valid jetty
hoary sluice
#

the outage was because of a verizon client in pennsylvania redirecting traffic to their servers

#

@valid jetty now you have to put ; at the end of a procedure because I cba to keep improving semicolon stuff

proc main {
    println "Hello World";
};
winged mantle
#

I tried to make my code Good

#

motivation killer

#

just write bad code

#

it's much more fun

#

I've tried and tried and tried but fixing my global variable mess is lobotomy

#

tbf making the discord client and database object non global was fine (I just pass it down through a context)

#

but trying to make plugin state non global complicates the plugin architecture

winged mantle
#

I'm memoising the instance function but it feels dumb when there'll only ever be one context 😭

#

this is beautiful

hoary sluice
#

@valid jetty object Object icy edition

valid jetty
#

please BuiltinEffect("readln") instead

hoary sluice
#

oh shit it works

hoary sluice
#

@valid jetty @valid jetty @valid jetty CALCULOTR

#

multiplication works too

#
proc main {
    println "lhs:";
    lhs = readln;
    println "rhs:";
    rhs = readln;
    
    println "operator:";
    operator = readln;

    if operator == "+" then
        println (lhs + rhs)
    elif operator == "*" then
        println (lhs * rhs)
    else
        println "ohter";

};
#

readln is now like a global variable whose value is the user input

#

oh also theres nothing forcing you to use procedures so you can just remove the procedure and write everything at the top level

#

and procedures dont have their own environments so a procedure is literally just cosmetic rn

valid jetty
valid jetty
hoary sluice
#

its literally just this ```rs
format!("{:?} and {:?} have invalid types for {:?}", left, right, op),

hoary sluice
#

and op is a token

valid jetty
#

well it looks like a procedural lang without parens

hoary sluice
#

well yea youre looking at a procedure block

valid jetty
#

ok true good point

hoary sluice
#

it has all the functional stuff

#

lazy eval, partial application all work

#

next time im making procedures do something and writing tree sitter colors

#

im calling it this

lucid trail
hoary sluice
#

its not an actual calculator its a string concatenator

valid jetty
hoary sluice
winged mantle
#

😭😭 what did i do

#

obama

hearty lintel
lucid trail
hoary sluice
winged mantle
#

orm hater to kysely user pipeline

hoary sluice
#

@valid jetty ```rs
pub fn get(&self, key: &str) -> Option<Value> {
let value = if let Some(v) = self.identifiers.get(key).cloned() {
v
} else {
self.parent.as_ref().and_then(|p| p.borrow().get(key))?
};

    match self.environment_type {
        EnvironmentType::Impure => Some(value),
        EnvironmentType::Pure => {
            match value {
                Value::BuiltinEffect { .. } => None,
                _ => Some(value),
            }
        }
    }
}
#

println is a pure function

#

right?

#

its just the identity function that also prints to io

crude star
#

.. no

hoary sluice
#

surely output isnt something i should be worried about

crude star
#

because it cant be reordered

hoary sluice
#

i mean i know its not pure in like fp theory

#

but in practice whats the difference

crude star
hoary sluice
#

what does that mean

crude star
#

a lot of optimizations done to pure code change the order of operations
which cant happen here

#

you dont want print "a"; print "b" to go b then a or run a twice

hoary sluice
#

ig yea

#

is reordering useful anywhere outside of multithreading

#

like

crude star
#

yes

hoary sluice
#

is being able to reorder necessary outside of multithreading

winged mantle
#

why is all of tsgo in internal package

#

how are we gonna use the compiler api

#

😦

hoary sluice
#
    pub fn get(&self, key: &str) -> Option<Value> {
        let value = if let Some(v) = self.identifiers.get(key).cloned() {
            v
        } else {
            self.parent.as_ref().and_then(|p| p.borrow().get(key))?
        };

        match self.environment_type {
            EnvironmentType::Impure => Some(value),
            EnvironmentType::Pure => match value {
                Value::BuiltinEffect { .. } | Value::BuiltinFunction { .. } => None,
                _ => Some(value),
            },
        }
    }
crude star
#

ghc probably has a lot of other insane things

#

like in compiled code, if you have x = f(); { ... }; g(x) and the code between them doesn't use x, you could optimise it to only call f at that point if it is pure (and save up a register)

hoary sluice
#

oh yea true

#

probably wont do this for the next year but better keep the api clean

valid jetty
#

roie

hoary sluice
#

ro ie

winged mantle
#

what's happening

#

I think I'm turning into theo

#

using vertical tabs and eating granola bars

hoary sluice
#

woo @valid jetty

#

wait its failing even inside proc

#

shit

#

whatever thats a problem for tomorrows me

lucid trail
#

this is only kind of cursed right

#

right associative

crude star
#

/run ```rb
a = 1
b = 2
puts a + b += 1

rugged berryBOT
#

Here is your rb(3.0.1) output @crude star

4
crude star
#

love?

winged mantle
#

TIL this typescript code breaks in environment where Object.prototype is frozen
such as tauri or the typescript playground

namespace foo {
    type Person = { name: string, age: number };
    export const toString = (person: Person) => person.name + ", aged " + person.age;
}
#

outside of strict mode it will silently cause the toString declaration to just have no effect

#

the thing is, if Object.prototype is not frozen, this code works how you'd expect. it doesn't affect toString for all objects

#

anyway, import zod v3 after freezing the object prototype and you'll have a confusing error

#

since they were doing this

jade stone
jade stone
#

oh wait

#

im stupid

lucid trail
jade stone
#

yeah it's cursed but makes sense

lucid trail
#

wow can't believe i get variable shadowing for free just because i dont have any checks for it

#

nice

lucid trail
#

@valid jetty can you break from any standalone block in elle

#

i think i want to do it without labels but if i do so it'll be quite tricky to manage with blocks inside loops

hoary sluice
#

@valid jetty @crude star

#
proc main {
    println "Hello World";
};
println "impure environment";
#

my environment stuff is really poorly handled, rn each function gets its own environment and looks up through all its parents if it cant find an identifier and the builtins are at the root environment

#

so if you nest like 10 times itll prob be super slow

#

@valid jetty i need to make a compiler in january

valid jetty
granite frost
marble thicket
#

i aint using the sob emoji now

granite frost
#

ok lets get back on topic!

marble thicket
#

oke

valid jetty
#

a little late

#

i posted that yesterday

solid gazelle
#

@valid jetty @valid jetty

runic sundial
#

I need to make the Ven programming language

#

I'm taking suggestions on deranged syntax

#

The only two compilation targets will be the Z80 and SPIR-V

#

What is the best way to declare a variable

lucid trail
#

these error messages are nice

lucid trail
runic sundial
#

SSA out of the box

#

And if you want to make it mutable you can declare it as ??x

lucid trail
#

exactly

runic sundial
#

Type is determined by first assignment

#

Loops must be definite and will always be unrolled

#

And recursion will be impossible

#

I've already fixed so much about modern programming

#

Also return values are weird

#

Why do we have the return keyword again?

#

You will always have a single return at the very end of any function

#

And to set the return value

#

Instead you will do

#

= a

#

The compiler will assume that you meant to return that

#

So you can easily assign a default return value at the top of the function

jade stone
runic sundial
#

Now as for memory management

#

I think the C model makes the most sense, but without any global memory

#

This will make it easier to write concurrent code

#

Malloc will only work with even numbers unfortunately

#

Pointers within the language will be 128bit values always and forever in case we want to support CHERI

dense sand
#

I like C/asm because i get free 8kib on stack(by default) i can basically use however i want, without needing to free

hoary sluice
#

@valid jetty where do i find a list of what keywords tree sitter uses in highlights.scm

#

or like nvim catppuccin specifically

valid jetty
#

idk

stark edge
hoary sluice
#

i alr found it but ty

tired vigil
hoary sluice
#

@valid jetty !!!!!!!

#

havent implemented all rules yet

shrewd canopy
hoary sluice
#

proc foo {} is a statement

#

all statements require ; at the end

#

fixing that is not my priority rn

hoary sluice
#

@valid jetty HELP

#

wtf???

#

why is module path unrecognized

lucid trail
#

language features or jvm? or both?

#

oh i didnt know that

#

that’s pretty cool

valid jetty
#

does it have a gc runtime

#

then it's no better than go for performance i guess

winged mantle
#

make kotlin but with manual memory management

valid jetty
#

i wouldnt say manual

#

just give the dev a pleasant arena allocator api and they'll figure it out

winged mantle
#

zig

hoary sluice
#

help me

#

please

#

ok it randomly fixed itself

winged mantle
#

i like how biome makes my codebase go from 8k lines to 10k

#

inefficient!!

supple whale
winged mantle
#

what exactly wasn't working bfeore

supple whale
#

yeah it doesnt

#

sucks

supple whale
#

like "dont do this with these types" or "this value is nullable" or "dont use nullshit, this isnt nullable" etc etc

#

i saw oxlint will get support for that soon

#

which is gonna be peak

#

cuz it alr has high ts support, but its not 1:1 the same as eslint

winged mantle
#

I think biome will be good enough for me

#

eslint was soo slow and randomly broke on me (possibly my fault but idk what i did)

supple whale
#

im way too used to my turbo strict eslint ts setup

#

i effectively write TS as if it was a static language

winged mantle
#

just write c++ or rust or something trollmas

supple whale
#

no because it sucks ass to use

#

i like js

#

both for DX and syntax

#

and features

winged mantle
#

eslint randomly stopped allowing floating promises for node:test

#

I added an exception to the rule...

supple whale
#

yeah because it breaks tests

winged mantle
#

wait i might have imported from test a few times

#

by mistake

#

maybe that's what broke the pipelines

supple whale
#

my eslint doesnt break tbf

#

its not the fastest tho

#

it takes like 15s for first load

#

after that its mostly fine

#

i do however run tests for my eslint config to make sure updates dont break anything

winged mantle
#

i never bothered to set up eslint wioth neovim so i was running the command which was painful shiddohwell

supple whale
#

took a day of work

winged mantle
#

my neovim setup will probably be forever work in progress

supple whale
#

but its the best fucking thing ever

#

i do not regret it at all

winged mantle
#

not because i'm constantly improving it

#

but because it will always be missing important things

supple whale
#

i love this shit because i can now simply do:

// eslint.config.js
import config from 'eslint-config-standard-universal'
import globals from 'globals'
import tseslint from 'typescript-eslint'

export default tseslint.config(
  ...config(globals.node),
  {
    languageOptions: {
      parserOptions: {
        tsconfigRootDir: import.meta.dirname
      }
    }
  }
)

and

// tsconfig.json
{
  "extends": "eslint-config-standard-universal/tsconfig.json"
}

and my project is set up

#

and 0 work required

#

but that eslint config is a bit uhh.... yeah....

winged mantle
# supple whale both for DX and syntax

just how i am the sort of person to use apple devices without syncing, i am the sort of person to write a full stack application without vite or any full-stack framework or anything
maybe the dx is better if you fully embrace the bloated ecosystem? blobcatcozy
I mean my experience hasn't been that bad but it has felt a bit... DIY

supple whale
#

idk my shit isnt bloated tbf

#

its as minimal as it gets

#

i also dislike a zillion developer tools

#

i keep it minimal

#

but still powerful

#

i still like having TS types for my gql queries

winged mantle
#

with stuff like eslint i kind of internally scream with the number of deps its pulling in

supple whale
#

i still like my linter yelling at me that something will erorr b4 i run it

#

doesnt matter, its not in the end product

#

pnpm dedupes it

#

and it runs fast enough

winged mantle
#

bloooat

supple whale
#

that saves u days of time

winged mantle
#

next time I see something depend on chalk I will literally eat chalk

supple whale
#

but sir

#

chalk has 0 dependencies

#

and is quite small

winged mantle
#

I don't care

#

I am going to eat chalk

#

it tastes nice

#

chalk actually does have a pretty nice api

#

biome is so politically correct

#

var, const enum, explicit any, and non null assertion are banned by default

winged mantle
#

ah, and it also isn't aware of ["prop"] bypassing typescript private evne though i think it has some type support?

#

it suggests using literal key instead

lucid trail
#

i’m getting tsoding videos in my recommended and they’re actually good

jade stone
#

reimplementing the type checker would be insane

#

and calling back to js would defeat the whole point of going to native tooling for linting

jade stone
#

i need to move my eslint config in to some npm package

#

i just copy it from repo to repo rn 😭

#

and setting up typescript-eslint rules is still on my todo list

winged mantle
#

after making a tiny change, horror

#

looks like they have half a million lines of code

#

neat

#

(I was just adding a print statement)

nimble bone
#

@jade stone satan

winged mantle
#

useExplicitType is not really useable rn (I wanted it only for return types)

#

🙄

#

I wish I could just run the typescript formatter used in vscode from the cli

#

and in github actions

winged mantle
#

I tried updating eslint and now even more stuff is broken blobcatcozy

solid gazelle
#

useKode

jade stone
#

Just add the rule definitions to a npm package and export

ornate quiver
#

never gets old

dense sand
#

mango db

ornate quiver
#

mango db

fleet cedar
#

I get a feeling that someone might get banned soon

little bluff
#

is there a plugin which automatically mutes channel with a specific name? like a plugin which can automatically mute all channels with name "welcome"? can be userplugin.

fleet cedar
#

Do you really join new guilds so often you can't spend two seconds on that

little bluff
#

same can be said for "newguildsettings"

winged mantle
#

damn prettier is shockingly slow

#

maybe i could use biome just for formatting... i am just surprised that a formatter can be this slow somehow lol

placid cape
#

aoc soon 🔥

ionic lake
winged mantle
#

ye i saw that it had tsgo as a submodule 😭

#

I noticed tsgo only had internal api so far

#

I'm not sure it's a great idea to use it

#

it seems the plans for api are ipc based but they might have some public go api

hoary sluice
#

and im too lazy to finish it

hoary sluice
placid cape
#

I don't have time for it since i also have a job (as a programmer which is amazing) and school

winged mantle
hoary sluice
#

@valid jetty im getting ts in reels now

valid jetty
#

thabkfully i wouldnt get that because im not single

#

❤️

#

i also.. dont have instagram but thats besides the point

placid cape
fallen nebula
hoary sluice
#

i thought you were aroace what happened

winged mantle
#

i was asexual until i found you moment

hoary sluice
#

lol

royal nymph
tender ibex
tender ibex
crude star
autumn sedge
#

whar

vagrant crescent
#

Think that message implies he is the significant other

autumn sedge
#

brah

vagrant crescent
#

Funny

jade stone
#

i love javascript

#
export function getPropertyDescriptor(obj: object, prop: PropertyKey): PropertyDescriptor | undefined {
    let cur: any = obj;
    let res: PropertyDescriptor | undefined;

    do {
        res = Object.getOwnPropertyDescriptor(cur, prop);
    } while (!res && (cur = Object.getPrototypeOf(cur)));

    return res;
}
jade stone
supple whale
#

no but

#

like whats the use case for it

#

what woulkd u ever use this in?

jade stone
#

is a (maybe inherited) prop a getter

supple whale
#

but why?

#

like genuinly curious what u use/need this for

jade stone
#

need to make a viewer for objects

#

don't want to compute getters until the user clicks

jade stone
#

going insane for 20 minutes before finding this insane bug with the react compiler

#

1.0 my ass

#

this should still be in beta

elder yarrowBOT
worldly sigil
#

React Project (2025) \© Vercel Inc.

nimble bone
#

what was that again

jade stone
ionic lake
#

"use vencord";

fallen nebula
#

Cloudflare's fail has led to the creation of many rust memes and i like it

pseudo ingot
pseudo ingot
royal nymph
dense sand
#

any tips on how better should i reorganize this?

royal nymph
#

but depending on what utils contains it might be better to split it into multiple files in a new folder called utils

#

I'm not a fan of dozens of utils crammed into one file

dense sand
#

its just premade by shadcn and contains single cn function

#

might move it to something like css-utils

supple whale
#

i just wing it XD

dense sand
#

maybe its just my brain thinking its bad to have more than 3 files in one directory instead of nesting it more

supple whale
#

yeah once u reach critical mass its GG

#

if you're project is too complex you cant do much except for onion layering and isolating modules into standalone packages

#

i do that a lot here too, otherwise this would be GG

magic ice
lucid trail
#

can't believe "use asm" was a real thing

supple whale
lucid trail
tired vigil
#

nextjs if it was based

winged mantle
#

nothing is as vim like as vim

paper scroll
#

do you think vee will ever add analitics for plugins

#

i believe i've seen them talking about it before

shrewd canopy
fallen nebula
ornate quiver
#

finally I understand one of his videos

#

@valid jetty watch

supple whale
#

with deband:

#

without

tired vigil
fleet cedar
night sphinx
#

less white lines ig

leaden crater
fleet cedar
#

Okay they're not completely identical

#

If I subtract them and bring the levels menu to max I get

supple whale
fleet cedar
#

Without the levels it's pitch black

supple whale
#

it greatly reduced banding

#

you just need a display good enough to see it

crude star
#

I had to zoom in to see it but your debanded version still has banding

winged mantle
#

for some reason i watched this whole video it's 2 hours i'm not getting back

#

it has a lot of ai images...

#

it's basically just a rant with ai images

supple whale
#

but it has less

#

too much debanding nukes other detail

#

this is meant to be non-destructive

shrewd canopy
winged mantle
#

I don't think C++ is that bad...

#

the main issue is you need to use a small subset if oyu want it to be manageable

#

this subset changes between projects, you'll probably change your mind about which features to use, and sometimes there are loads of people working on a project who haven't really agreed on which features to use

fleet cedar
#

The problem is that there is no tooling for these sub-languages

#

The tooling that does exist has to support all the features, which means it cannot support anything at all well

winged mantle
#

would you rather write c++ or have both arms amputated? checkmate, doesn't seem like such a bad experience now

solemn ravine
jade stone
#

I feel like a fair amount of it is just things inherited from c

frosty obsidian
#

worked on setting up my aoc solver today

#

using kotlin native this year so im missing the java stdlib

fleet cedar
#

Kotlin native is such a weird concept

#

The whole purpose of kotlin is not having to write java when jvm'ing

winged mantle
#

why does this person look like jacob sorber and matt pocock combined

paper scroll
#

is the badge api open source?

fleet cedar
#

Stick to using a waifu like the rest of us

shrewd canopy
#

I think I am sticking to sane Minecraft wallpaper

fallen nebula
#

OK but it come with a free pair of socks

solid gazelle
winged mantle
#

what the hell is this formatting

#

what kind of formatter does this

#

oh it's defaulting to clang-format for ts

gilded surge
#

what the fuck is up with rust types istg like wth is Map<FlatMap<Map<Filter<core::slice::Iter<'_, MemoryRegion>, {closure@src/memory.rs:67:21: 67:24}>, {closure@src/memory.rs:69:18: 69:21}>, StepBy<core::ops::Range<u64>>, {closure@src/memory.rs:70:52: 70:55}>, {closure@src/memory.rs:71:49: 71:55}> i just want an iterator stop giving me some crazy ts

#

how does filtering and mapping an iterator not produce an iterator

fleet cedar
#

That is an iterator though?

gilded surge
#

according to rust no it's not

fleet cedar
#

Sure is

#

It is a type that impls Iterator

#

It is not a type named Iterator, because why would it?

gilded surge
#

so it should match impl Iterator, correct?

fleet cedar
#

Yes

gilded surge
#

unfortunately, it doesn't because existential types hate me

fleet cedar
#

Cool

gilded surge
#

i <3 opaque types

ornate quiver
#

L

jade stone
#

Terrible site, so slow

frosty obsidian
#

migrating from shit to ass

pseudo sierra
#

codeburger

frosty obsidian
#

should have hopped on or self hosted gitlab

pseudo sierra
#

true

#

gitlab new ui so fire

pseudo sierra
#

codeburger exploded

#

is this related to zig at all? maybe idek we'll know tomorrow (maybe)

jade stone
#

Reason 8583 not to use codeburger

pseudo sierra
#

wing was right yet again

#

common wing w

runic sundial
crude star
#

90% uptime!

pseudo sierra
#

even my own gitlab has higher uptime

royal nymph
#

even ninagit probably has better uptime 😭

ornate quiver
#

vfjd

#

guh?

nimble bone
#

putting on vps made it so great

spark tiger
#

why is css there 😭😭😭

nimble bone
#

shitcode

#

@spark tiger did you ever see the syntax highlighting on my site

nimble bone
#

take a look

#

final result

spark tiger
nimble bone
#

ficcaling my faint

spark tiger
#

YOU JOINED GITHUB LAST WEEK LIKBRO

jade stone
#

hop on

nimble bone
#

i will never hop on

jade stone
#

insane

fallen nebula
autumn sedge
#

wow

ornate quiver
#

lmaoooo?

ornate quiver
fallen nebula
royal nymph
dense sand
#

Has anyone here worked with next-safe-action 🙏

crude star
#

now git thinks the file is still there

nimble bone
#

Mac

pulsar crest
clear thunder
fierce pendant
fierce pendant
#

actually planning to learn rust i will use this

#

but

#

i think i should just get my girlfriend instead

spark tiger
#

aoc is tomorrow

ornate quiver
#

oh yeah it is

#

forgot about aoc

spark tiger
#

i didn’t notice how it’s already nearly december

placid cape
#

real

lucid trail
#
Struct{name:"x",fields:[Field{name:"f",type:Primitive{type:"I32"}},Field{name:"point",type:Struct{fields:[Field{name:"x",type:Primitive{type:"F32"}},Field{name:"y",type:Primitive{type:"F32"}}]}}]}

Struct parsing! with anonymous structs as valid types

winged mantle
#

idk how but my workflow seems to have reached peak editor hopping

#

with me switching between vscode, zed and neovim

#

zed feels like it has better vim emulation than any vscode plugin

#

other than that i don't think there's much reason to use it unless vscode is too heavy

#

neovim works the closest to vim because it's literally based on vim

#

you need to do a lot of research to add in all the features you need though

#

feels a bit hardcore for me

#

well, a feature i did need is the ability to rename a file and automatically have imports updated

#

but then again this feature is completely broken for me in zed and vscode (with typescript)

#

I think it doesn't like the absolute imports

#

i guess it was pretty dumb for me to go back to zed and vscode for some refactoring, i don't think i realised it was completely broken blobcatcozy

#

imagine paying for webstorm

#

oh looks like it's free now

#

time to add another editor to my workflow

#

pretty sure the free for non commercial use is a recent thing jetbrains started doing

#

well there was also the open source thingy

#

I got access to intellij ultimate and clion through that

jade stone
#

Vscode-neovim uses a headless neovim instance

winged mantle
#

well i don't want a frankenstein like that

jade stone
#

All my plugins work with no issues

winged mantle
#

idk it behaved weirdly for me

jade stone
winged mantle
#

both the neovim and vscode colour scheme had an effect on syntax highlighting that's kind of strange to me

jade stone
#

But also I don't set a color scheme for vscode neovim

pearl stagBOT
hoary sluice
#

advent of code

royal nymph
#

oh my god aoc moment

nimble bone
#

Watch out for the mod Bilboofan

#

@royal nymph do manually or something

#

no code allowed

royal nymph
#

I can bring leader board back but it's kinda pointless ngl

#

it's not a real leaderboard it's more of a lives in the right timezone and does the puzzle immediately board

nimble bone
#

but true tbh you know you know

#

they added public view links anyway @royal nymph you can send link

fallen nebula
#

i swear i know how to code guys, trust me

winged mantle
#

if you look at code with 8-width tabs it becomes much more obvious how bad it is i swear

fallen nebula
spark tiger
ornate quiver
#

typing the data does not validate the data

#

zod does the validation and typing without extra boilerplate

jade stone
#

Types are compile time only

spark tiger
#

oh

woven mesa
#

gm

little bluff
stark timber
#

bro I just wasted like an hr tryna figure out how to separate import groups with biome

#

apparently there's a :BLANK_LINE: group that u can put

#

and it's not on the website

#

oh it is

#

I'm just blind

#

😭

#

it's not in the schema tho

#

so annoying

#

u made me switch

#

I always meant to

#

and you're the cool guy

#

oh it doesn't work :(

#

gosh why don't they just like

#

get the aliases from the tsconfig

#

instead of having some hardcoded list

#

oh it did work

#

I jjust didn't need the type: false

#

it thought highlight.js was a file

#

I think

spark tiger
#

@solemn ravine heyy do you know how i can force .app's icons rather than the binary's? i've set icons for my app and they show up in finder but for some reason whenever i open the app, in dock it shows the default egui icon

#

oh wait maybe egui does it dynamically?

#

macho executable files cant have icons or can they

#

guh

#

omg it works

solemn ravine
#

but you shouldn’t be doing that

#

since it isn’t ideal

spark tiger
#

ended up with this info.plist

solemn ravine
#

that works yea

spark tiger
#

thanks

solemn ravine
#

it’s still able to set a custom icon though

winged mantle
#

I figured out how to get file renaming to work properly in vscode

#

before it would always require updating imports manually

#

turns out you need to put "paths" in the tsconfig

#

imports in package.json is enough for the code to run and have no errors in vscode

#

but needs to be in tsconfig for vscode to be able to actually update imports using mappings

#

oh nvm it's still super buggy&inconsistent

fallen nebula
#

lmao

winged mantle
#

vscode jank moment "0 results in 1 file"

spark tiger
#

i just noticed that my app doesnt unload the images after they were previewed fr

spark tiger
#

i lterally forget the images

royal nymph
#

copilot so funny

ornate quiver
#

rip bun

spark tiger
#

??? no coding for today i guess

royal nymph
spark tiger
#

Stop insulting me, please! 🙏 🛑 ✋

winged mantle
#

i've fallen in love with ts namespaces

spark tiger
#

how is it fucking one gigabyte

stark timber
#

bibabyte

spark tiger
#

dude @tsoding is so crazy like how tf do u live in russia and dont have a vpn enabled all the time???

jade stone
winged mantle
#

😭

jade stone
solemn ravine
ivory heath
#

This is some of the most cursed GO! ive ever written but it works and is safe

stark timber
#

and now rewrite in zig

jade stone
#

It confuses me

alpine marten
#

Winter

spark tiger
#

cant decide whether to force dark mode or leave it os-based. need #opinions

frosty obsidian
#

default to system theme

spark tiger
#

thanks

tall kayak
dense sand
#

oh wow someone already mentioned

#

wow im late sobvelasmutny

stark timber
#

are u an ai guy

magic ice
#

not a symbiotic relationship

fierce pendant
fleet cedar
#

Fun fact:

#

/run ```java
System.out.println((int)'\u005C\u006e\u0027);

rugged berryBOT
#

Here is your java(15.0.2) output @fleet cedar

10
winged mantle
#

love

#

wait wtf no ending quote

#

how does java implement lexing character literal...

fleet cedar
#

||\u escapes happen before lexing||

winged mantle
#

lol

#

big brain

#

this reminds me of trigraphs in C

fleet cedar
#

Yep, same idea

#

/run ```java
// \u000A System.out.println("This code is commented out!");

rugged berryBOT
#

Here is your java(15.0.2) output @fleet cedar

This code is commented out!
winged mantle
#

you probably could use this to hide malicious code because people probably wouldn't give comments much scrutiny

#

😭

fleet cedar
#

You can do similar fun tricks in c:

bool validate() {
  // check if it's valid \
  if (whatever)
    return true;
  return false;
}
#

Huh, looks like hljs understands that one though

winged mantle
#

at least in c it's an intentional and well known feature

#

that i think was removed recently?

fleet cedar
#

Python also has \ for line continuation, but not inside comments

#

Fun

royal nymph
#

supporting it inside comments is insane

winged mantle
#

folding lines on backslash is the second stage of preprocessing after replacing trigraphs

#

happens before tokenisation

dense sand
fierce pendant
blazing quartz
#

i blame vercel

dense sand
worldly sigil
#

"on the third day of christmas, vercel gave to me: a react cve"

winged mantle
#

is it weird that i keep having moments where i feel like I want to use setPrototypeOf

#

spreading doesn't keep getters...

royal nymph
#

if plain object it does keep getters

winged mantle
#

oh does it?

#

I swear the value stopped being dynamically calculated

royal nymph
#

well yeah lol

#

it copies the value

#

intended

#

it can't really safely copy getters

#

spreads aren't meant for that anyway

winged mantle
#

well that's why I keep wanting to use setPrototypeOf 😭

#

maybe I should use less getters...

royal nymph
#

ngl you're doing something wrong if you need to copy getters

winged mantle
#

I was wanting to do this sort of thing

function makeBaseView(base) {
    return {
        get id() {
            return base.id
        },
        get createdAt() {
            return makeDurationView(base.createdAt);
        },
        get age() {
            return makeDurationView(Date.now() - base.createdAt);
        },
    };
}

function makeUserView(user) {
    return {
        ...makeBaseView(user),
        get tag() {
            return user.tag;
        },
        get avatar() {
            return user.avatarURL();
        }
    };
}

I have a templating system where you pass a view to render and the template can access its fields
this will break the whole lazy computing though ig that isn't necessary in the first place (and might cause more problems than it solves in terms of perf)

winged mantle
#

ew...

#

i generally do feel like this in cases where i could totally just use classes though yeah

royal nymph
#
class BaseView {
    get id() {}
}

class UserView extends BaseView {
    get tag() {}
}
#

I don't like classes much but you're just doing shittier classes here

#

classes are good for this use case

winged mantle
#

one thing is that UserView is actually already a runtime object

#

my current less cute code looks like this :p

#

UserView is actually an object that declares the schema

#

i sort of made my own zod like thing

royal nymph
#

i feel like validating smth like this is pointless

winged mantle
#

it does codegen and it made it easier

royal nymph
#

seems like this is for discord and discord wouldn't send you invalid data

winged mantle
#

(because it knows the structure better)

#

it's hard to explain

#

tldr it means at compile time the template can be validated (e.g. if i wrote peeple instead of people) and generate optimised code, it's not validating data coming from discord

#

cursed idea i had that became reality

ornate quiver
#

I wonder what next year's Christmas will bring

jade stone
fallen nebula
#

the plural of index is indices
the plural of vertex is vertices
the plural of mutex is deadlocks

jade stone
#

thanks c++

jade stone
#

@nimble bone rate my c++

namespace aoc::util::iter {
    namespace detail {
        class SumImpl {
            template<std::ranges::range R,
                     typename ValueType = std::ranges::range_value_t<R>>
            [[nodiscard]] static constexpr ValueType impl(R&& range) {
                static_assert(std::is_default_constructible_v<ValueType>,
                              "Type must be default constructible");
                static_assert(
                    requires(ValueType a, ValueType& b) { a += b; },
                    "Type must support += operator");

                ValueType sum {};

                for (const ValueType& val : range) {
                    sum += val;
                }

                return sum;
            }

          public:
            template<std::ranges::range R,
                     typename ValueType = std::ranges::range_value_t<R>>
            [[nodiscard]] constexpr ValueType operator()(R&& range) const {
                return impl(std::forward<R>(range));
            }

            template<std::ranges::range R>
            [[nodiscard]] constexpr friend auto operator|(R&& range,
                                                          const SumImpl&) {
                return impl(std::forward<R>(range));
            }
        };
    } // namespace detail

    inline constexpr detail::SumImpl sum;
} // namespace aoc::util::iter
jade stone
pseudo sierra
#

more scuffed than cursed

#

just out of curiosity what c++ version are you using?

pseudo sierra
#

oki good

jade stone
#

There is no accumulate range adapter in the standard

#

Just an algorithm

#

And you can't pipe that

winged mantle
#

idk at the end of the day i feel like this sort of thing ends up with more code for little benefit

magic ice
rugged berryBOT
#

@magic ice I received c(10.2.0) compile errors

file0.code.c: In function 'MiniSleep':
file0.code.c:984:2: warning: implicit declaration of function 'usleep'; did you mean 'sleep'? [-Wimplicit-function-declaration]
  984 |  usleep(500);
      |  ^~~~~~
      |  sleep
file0.code.c: In function 'ReadKBByte':
file0.code.c:1000:19: warning: implicit declaration of function 'fileno' [-Wimplicit-function-declaration]
 1000 |  int rread = read(fileno(stdin), (char*)&rxchar, 1);
      |                   ^~~~~~
./mini-rv32imaf [parameters]
	-m [ram amount]
	-f [running image]
	-k [kernel command line]
	-b [dtb file, or 'disable']
	-c instruction count
	-s single step with full processor state
	-t time divion base
	-l lock time base to instruction count
	-p disable sleep when wfi
	-d fail out immediately on all faults
magic ice
#

I think if I could compress a buildroot kernel with xz or something and put it as a byte array into the file I could run linux on the bot

odd locust
#

./run

print("goodbye world")
rugged berryBOT
#

Here is your python(3.10.0) output @odd locust

goodbye world
odd locust
fierce pendant
#

./run

class Main {
    static public function main():Void {
        trace("Hello World");
    }
}```
rugged berryBOT
fierce pendant
#

./run

class Main {
    static public function main():Void {
        trace("Hello World");
    }
}```
rugged berryBOT
fierce pendant
#

no haxe?

winged mantle
#

static public is cursed

fierce pendant
winged mantle
#

people usually do public static in java and C#

fierce pendant
#

lmao

#

haxe is inspired by ecmascript 😭

winged mantle
#

ecmascript doesn't have public

fierce pendant
#

./run

import haxe.Http;

class Main {
       static public function main():Void {
            getJoke(function(joke:String):Void {
                Console.log("<#FFCCFF>" + joke + "</>");
            });
       }
       static function getJoke(callback:String->Void):Void {
           var url = 'https://v2.jokeapi.dev/joke/Programming?format=txt';
           var http = new Http(url);
           http.onData = function(data:String) {
               callback(data);
           }
           http.onError = function(error:String) {
               trace('Error: ' + error);
           }
           http.request();
       }
}

rugged berryBOT
fierce pendant
#

stoopid

#

i like this language because i can compile it to every other language

winged mantle
#

I didn't think of doing aoc in haxe

#

I have heard of it but never used it

#

and i can't remember what i saw using it

fierce pendant
#

what is an aoc

deep mulch
#

advent of cod

jade stone
#

evil

#

thanks gdb

stark timber
deep mulch
#

@jade stone salad

median root
#

Yo why can't we allocate a section of memory for pointers to other memory so that we can expand storage space of a partition without having to shuffle stuff around?

#

Moving partitions with sfdisk sucks

covert oasis
#

we got a suggestions channel?

#

cant find it so ill type it here

#

yk how u can play yt and tiktoks INSIDE discord?

#

we need a plugin like tht but for instagram

nimble bone
#

and wrong channel

covert oasis
#

aw

#

welp new suggestion!

#

a suggestion channel

nimble bone
#

also no

#

and go to off topic

jade stone
#

guhhh why does ninja have to be sooo bad

#

and why is it the default over make

#

insane

jade stone
#

ninja is faster than make

#

but lacks 100000 qol features

#

ninja has lovely features such as

  • no color in output
#
  • strips links from warnings
#

Did you know? gcc embeds links into warnings that take you to the docs

deep mulch
#

lovee

tidal vigil
#

not exactly programming ig but meh oh well. i present: my connection to Nin0's instance of some git program

#

it took closer to a minute and a half to load i think i wasnt counting

#

explains why the script i made to easily check for updates on all my userplugins and vencord itself took over 3 minutes today

nimble bone
#

(gitlab)

tidal vigil
nimble bone
#

but be careful with RAM usage

pseudo sierra
nimble bone
#

i just needed my Vps to run

jagged spade
pseudo sierra
jagged spade
#

yeah i should probably stay away from this channel

jade stone
#

comic shanns mono

winged mantle
#

java in neovim doesn't seem that painful?

jade stone
#

The config for it was hell tho

#

(please send your working config)

winged mantle
#

literally just this

#

and it worked

jade stone
#

Insane

#

I always had issues for some reason. Maybe I'll try it again soon

winged mantle
#

tbf i'm just doing a maven project with no deps

jade stone
#

I try my best to stay as far away from Maven as possible (XML)

winged mantle
#

I use maven for simple things because gradle seems like more trouble than it's worth

jade stone
#

Xml is never worth your time

#

Can you tell I hate XML

winged mantle
#

i think gradle has better build times and syntax

#

I just remember I had some kind of command to kill gradle daemons

jade stone
#

Does Maven have the same issue as Gradle where it takes up like 5 GB of cache for each project?

winged mantle
#

and they were the bane of my existence

jade stone
winged mantle
#

yeah, you can

#

somehow i still got frustrated by it blobcatcozy

#

idk i'm not much of a java dev any more

jade stone
#

Anytime I use languages other than JavaScript, I realize how good the tooling for JavaScript and typescript is

winged mantle
#

imagine if intellij had a language serv er

#

I'm fine with jdt though (actually have used eclipse for java developers over intellij many times)

#

using it in vscode or nvim is like eclipse for java developers without the jank

#

but it's not really on the same level as jetbrains' static anaylsis

spark tiger
winged mantle
#

if you use z.infer doesn't the type look pretty clean anyway?

jade stone
winged mantle
#

they should do it with java

jade stone
#

I mean, obviously they can't get everything they want because the LSP doesn't support everything they do

#

But as far as I know, they're trying to get most of the functionality from the IDE

winged mantle
#

hmm

deep mulch
winged mantle
#

why can't java just have a stupidly simple build system like cargo or go.mod