#🪅-progaming

1 messages · Page 87 of 1

deep mulch
#

TEnded so ulgy

valid jetty
valid jetty
deep mulch
#

rosie will choose better naming

valid jetty
#

WHY DO YOU HUSK EVERYTHING

valid jetty
deep mulch
#

it is so husk worthy

#

UEnv Tended

valid jetty
#

what else was there

#

oh yeah flatten

#

i think thats the last one

#

ok it think flatten will take a while

#

ill do it tomorrow

#

ok this is what i have now

#

i moved peekable to adapters

#

i think thats a nice collection

#

might add max min find any all position sum product???

#

but these consume the iterator so theyre not adapters

#

now i wanna quickly make x..y call Iterator::range

#

alright that was pretty easy

#

?remind 12h foreach should turn the iterable expr into an iterator first

delicate groveBOT
#

Alright @valid jetty, in 12 hours: foreach should turn the iterable expr into an iterator first

valid jetty
#

good night im exhausted

deep mulch
#

rosie sleeping at a semi decent time? impossible

#

@valid jetty nini

valid jetty
#

i dont sleep for 2 hours every night

deep mulch
#

and 4 hours might as well be 3

#

rosinga

#

oh rosie my rosie

royal nymph
#

Josh would be a better name

solemn ravine
#

annoyin

#

swift unable to type check

#

sometimes I need to test my changes then I get hit with something unknown

#

how yummy

native spruce
#

@formal belfry it’s so fire

formal belfry
#

Protokorn

native spruce
#

korn

hoary sluice
hoary sluice
deep mulch
#

bogos binted

deep mulch
winged mantle
valid jetty
fleet cedar
#

Much better

spark tiger
#

ngl i wanna pr something like that so badly

spark tiger
#

yes lmao 😭

#
struct Config {
    retries: u8,
    username: String,
    silent_mode: bool,
    timeout_secs: u64,

    ssl_enabled: bool,
    update_interval: u32,
    cache_path: String,
    kill_switch: bool,
    startup_script: Option<String>,
}```
valid jetty
#
struct Config<'a> {
    clock: u64,

    pid_state: u8,
    list_path: &'a str,
    unlocked: bool,
    stream: &'a [&'a str],
    
    pull_state: u8,
    literal_secs: u64,
    user_path: &'a str,
    synced: bool,

    sys_path: &'a str,
    unlatched: bool,
    con_async: bool,
    key: &'a str,
    single_stream: bool   
}
formal belfry
#

mods are asleep quick post structs

nimble bone
#

death to rust

#

long live memory unsafe programming languages such as C

spark tiger
#

indeed

ionic lake
#

hes just a crab what did he do to yall 😭

valid jetty
#

wtf thats cool

#

WHATT THIS IS SO COOL

delicate groveBOT
#

@valid jetty, <t:1747960748:R>: foreach should turn the iterable expr into an iterator first

valid jetty
#

yeah

formal belfry
valid jetty
#

im on ventura

#

the spotlight search is so unreliable

#

i wanted to try something else

#

and raycast also gives you clipboard history

valid jetty
#

slay??

#

and if you make it match it works

winged mantle
#

why in typescript can you assign number to {} and {} to object, but not number to object
this has an odd effect

    const a: {} = 5;
    const b: object = a;
    if (typeof b === "number") {
        // b is narrowed to never
    }
valid jetty
winged mantle
formal belfry
#

the world if typescript had decent optional chaining

winged mantle
#

Allowing {} to be used as object is an intentional compatibility hole since object didn't always exist, so people used {} as the next-best thing.

#

why no option

formal belfry
#

the world if typescript wasn’t just missing a shitton of things in general

#

I used swift and realized how terrible ts can be sometimes

winged mantle
#

not really though

#

it's more like unknown

#

it doesn't assume properties exist like any

valid jetty
#

true

winged mantle
#

and you also can't assign it to whatever type you want

#

it just has a loophole for object

formal belfry
#

I’ll make my own typescript

#

call it @solid gazelle Script

winged mantle
#

horror

#

makes sense

formal belfry
#

fres as! Freslet

winged mantle
#

the object type is just evil

formal belfry
#

boolean Boolean string String

winged mantle
#

i like t he way unknown and {} | undefined | null are distinct

#

i realised typescript is not the ultimate language for type safety anyway but maybe i should try using go for things i abuse typescript for instead sometimes blobcatcozy

valid jetty
#

@formal belfry implement this when

jade stone
#

wires
where is __func__

winged mantle
valid jetty
#

maybe in the _wassert?

winged mantle
#

this doesn't work with unknown

jade stone
valid jetty
# winged mantle
export function isEmpty<T extends {}>(obj: T) {
    for (const key in obj) return false;
    return true;
}
``` surely
winged mantle
#

oh wait

#

got it back to front

#

but Object.hasOwn is still necessary

jade stone
winged mantle
#

at least... i would find it weird for it to behave differently from Object.keys(...).length

winged mantle
#

also it has a compile error with unknown but not with {} | undefined | null

formal belfry
#

@valid jetty how do i make a programming language and a transpiler for that language

#

it will be called Languagemasu

#

transpiles to javascript

valid jetty
#

dream up syntax and then go from there

formal belfry
#

written in blazingly fast Python

winged mantle
valid jetty
#

wait

#

NO DONT MIX THEM

formal belfry
winged mantle
#

nop

valid jetty
#

omg no thats so cursed

winged mantle
#

how is that cursed

valid jetty
#
if (x) {} else y
``` NO
winged mantle
#

so good

valid jetty
#

it has to be if (x) y else z

#

or if (x) {} else {}

winged mantle
#

i use brace when multiple lines

#

though ig that is weird because the else also has multiple lines

valid jetty
#

that foreach is multiple lines

jade stone
winged mantle
#

if (typeof obj === "object")
for (const key in obj)
if (Object.hasOwn(obj, key))
return false;
else
for (const _ in obj)
return false;

#

i find this confusing to look at

winged mantle
#

the lore behind me not using braces is i was working on a codebase which didn't use them

#

and at the time i wanted to use a better code style for my own projects

#

so i adopted something more convensional

#

and also stopped doing braces when unneccessary

valid jetty
fleet cedar
winged mantle
#

ohh

#

yeah

#

that's the issue

#

that'll be why i instinctively do it

#

i have been doing brace warcrimes for a few years

valid jetty
#

no braces also just straight up can be confusing

#
if (x)
    do_thing_a();
    do_thing_b();
``` b will run unconditionally
winged mantle
#

i only use when they're not confusing

valid jetty
#

its just kinda really confusing

winged mantle
valid jetty
#

logic errors like that shouldnt be left up to tooling lol

winged mantle
#

i mean you are always gonna run your code through tooling or it's not gonna be very useful

#

you're gonna have to type check your typescript if you actually want to take advantage of the language and you should probably also run eslint whenever you do that

#

there's probably an eslint rule ffor this

#

also if you're doing single line it's kinda ugly to do

if (thing) { return true; }

valid jetty
#

lazy iterators in foreach !!!

hoary sluice
#

or i am stupid

#

but where do i see theyre lazy

#

also arent all iterators lazy

#

or is ur point that iterators work at all not that theyre lazy

valid jetty
#

no they are lazy

valid jetty
#

beforehand, foreach loops literally created indexed for loops internally

#

this can yield unindexable things

valid jetty
#

before, foreach loops used to be

for x in y {
    $dbg(x);
}

// desugars to:
{
    __idx_x := 0;
    __iter_x := y;
    for ; __idx_x < __iter_x.__len__(); __idx_x += 1 {
        x := __iter_x[__idx_x];
        $dbg(x);
    }
}
``` now they are
```rs
for x in y {
    $dbg(x);
}

// desugars to:
{
    __iter_x := y.__iter__();
    while _, __value_x := __iter_x.next() {
        x := __value_x;
        $dbg(x);
    }
}
deep mulch
#

insane

valid jetty
#

ok cool it works with iterators now

hoary sluice
#

@valid jetty they made claude 4

#

now you can vibe code elle even better

valid jetty
deep mulch
#

@valid jetty bestie

valid jetty
#

hii

deep mulch
#

hii

#

@valid jetty you love Android runtime

#

ART

valid jetty
#

@hoary sluice THIS MAKES SEMANTIC SENSE NOW

lexer := Lexer::new(args[0]);
tokens := [Token;];

for token in lexer {
    tokens.push(token);
}
#

for token in lexer

#

or heck even this

#

this is beautiful

deep mulch
#

what's collect do

valid jetty
#

look at this iter method

fn Lexer::__iter__(Lexer self) -> Iterator<Token, Lexer, SingleEnded> {
    return Iterator {
        env = Box::new(self),
        next = Lexer::next_token,
        next_back = nil
    };
}
deep mulch
#

to list?

valid jetty
#

yea

deep mulch
#

@valid jetty does Elle have immutable arrays

valid jetty
#

no

#

everything is mutable

#

mut is a reserved keyword but not used for anything yet

deep mulch
#

also add visibility keywords whenn

valid jetty
#

after i rewrite modules

deep mulch
#

@valid jetty make Elle gitbook wiki

valid jetty
#

you have a md document

#

look its pretty short

deep mulch
#

Rosie insane

frosty obsidian
#

starlight docs for elle soon

deep mulch
#

@frosty obsidian teach me all of astro instantly

frosty obsidian
#

its not hard man

deep mulch
#

I don't like html or css

frosty obsidian
#

well unfortunately thats what websites are

deep mulch
#

wing memorized every single css rule

valid jetty
#

zoot

#

minklang

deep mulch
#

@valid jetty how

valid jetty
#

fuck around and find out

deep mulch
#

accidentally unplugged os drive while PC was running

#

oop

#

oh the fans are getting extremely loud

valid jetty
#

lmfao

deep mulch
#

help now it won't boot

#

i can't ssh

valid jetty
deep mulch
#

hiii @valid jetty

valid jetty
#

for each token in the lexer, do this

#

this is such an unnecessarily complex function signature

#

maybe i named these wrong

#

instead of into_iter and iter like rust, i will name them iter and iter_ref

#

because i dont put as much of an emphasis on borrowing

#

idk thats probably a neater signature

#

slightly

#

i just realized all of this is gonna take like 12 years to write tests for

#

at least i have next week off school 😭

deep mulch
#

i think i accidentally corrupted the drive @valid jetty

#

fsck from util-linux 2.41
e2fsck 1.47.2 (1-Jan-2025)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>

/dev/sdb contains `DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,2), end-CHS (0x3ff,255,63), startsector 1, 1953525167 sectors, extended partition table (last)' data

#

thats probably not good

winged mantle
#

type safety

#

it's so you can do export default defineProvider and get a clear error if you pass the wrong type

hoary sluice
winged mantle
#

made better

deep mulch
#

Debian devs so smart

#

the live boot USB doesn't even have the boot repair pre installed

#

it requires internet access to add the repos and stuff

winged mantle
#

wdym the image contains many packages which you can install without internet

#

at least if you use DVD iso

blazing haven
severe python
valid jetty
severe python
jade stone
#

google, i dont think these are bitwise operations

deep mulch
#

@valid jetty hikii

fleet cedar
hoary sluice
#

@valid jetty @valid jetty

winged mantle
#

this article is going to work you...

hoary sluice
#

@valid jetty how am i supposed to learn a language when bala means child and baka means frog

#

😭 😭

#

this is so unfair you get this

#

and i get this

south moon
#

@native spruce how can i make a systemImage next to a text

native spruce
#

context?

formal belfry
#

do you mean label

#

Label("ball", systemImage: "water")

native spruce
#

yeah that's usually what I do if I want an image

south moon
#

i'll try

formal belfry
#

how did i even learn swiftui

native spruce
#

I learned it by trial and error and constantly starring at it

deep mulch
#

@formal belfry explain

hoary sluice
#

@valid jetty find whats wrong

deep mulch
#

what is my big ball

native spruce
hoary sluice
#

singular

native spruce
#

also what font is that

hoary sluice
#

im gonna gatekeep it until you accept rust as objectively the only programming language

#

(its maple mono)

formal belfry
#

maybe i did the same

#

i know i struggled a bunch

#

u can tell by my first apps having titan sized contentview

formal belfry
#

tiramistheme

#

i should make a colour palette like catppuccin

south moon
#

@formal belfry are you darwin

formal belfry
#

idk

south moon
#

oh yes

formal belfry
#

not in my connections or anything

deep mulch
#

@venbot

south moon
#

@native spruce how the fuck do i do it

native spruce
#

?

south moon
#

the thing with the icon

native spruce
#

do what

south moon
#

with a Text

native spruce
#

Please explain

south moon
#

i want to make like

#

Start organizing your files by pressing (systemImage next to it)

formal belfry
#

like an inline button?

#

or

south moon
#

nono

formal belfry
#

a button with a label inside

south moon
#

the plus above is the button

#

wait actually

#

you gave me an idea

#

a button with a label would be nice honestly

native spruce
#

it gets super complicated

south moon
#

yeah

south moon
formal belfry
#

u should experiment maybe lol

#

you put an image in a button, so

#

therefore a label can also go in there

#

so Button {

} label: {
Label("ball", systemImage: "water")
}

south moon
#

oh dang it works

#

anyways

#

how can i fill in this empty

#

what should i add

#

i'm making an app where you have everything organized

#

to organize your files in an efficient way

native spruce
#

brainstorm it

south moon
#

explain

native spruce
#

get an idea on what you want it to look like

south moon
#

i want it to look cool

#

and comfortable

native spruce
#

for example I made a console app recently, and i wanted to show a list of logs

south moon
#

i want my app to have folders, which you can customize the icon and do what you want with them and also a folder created in your mac called "Syne" where you have all your folders in finder

#

someone suggested me to do this

#

@real badger

native spruce
#

Maybe you should try to implement that functionality first before diving into the ui

south moon
#

that's what i thought about

#

what do you recommend to learn

native spruce
#

because the ui will take up most your time

south moon
#

true

valid jetty
native spruce
south moon
valid jetty
south moon
native spruce
south moon
#

hmm

#

true

valid jetty
#

there are tools to automatically hover over a word in japanese and insert it into an anki set with the sentence and website it came from aswell as audio and a dictionary definitions

#

100% efficiency jp learning is insane

#

sentence mining is insane

#

AJATT is insane

hoary sluice
#

whats wrong with that

#

i want next(2) sometimes

valid jetty
#

i don’t get it

hoary sluice
#

look at the return type

valid jetty
#

again what’s wrong with the return type, doesn’t that just hold the Ok type?

hoary sluice
south moon
#

the "how you want them" was funny @native spruce

hoary sluice
valid jetty
hoary sluice
#

yes

valid jetty
#

i literally do that for mine and then construct a token later with location

#

insane

hoary sluice
#

probably because i copied it from you

valid jetty
#

lmao

hoary sluice
#

but doesnt ur token have location in the struct

valid jetty
#

yes

native spruce
south moon
#

cool

#

if you want can you help me sometime

#

like tomorrow

valid jetty
#

consume functions just return kind val and then that’s used along with location to construct the final token

hoary sluice
#

it used to make sense when i wanted tokenkind and value without location, but now Token doesnt have location and i use Located<Token> for it

#

so Token is equivalent to the tuple

valid jetty
#

jaw DROPPED

hoary sluice
#

@valid jetty how to make use statements not execute everything thats in the other file

#

probably cant right

#

just gotta not have global expressions

valid jetty
south moon
fleet cedar
#

All that's in the other file is declarations anyway

#

There's nothing to execute

native spruce
south moon
#

alright

valid jetty
#

well i mean depending on how eagely set it up there are things to execute

hoary sluice
#

HELS ALGELS

#

LMAO

valid jetty
#

what 😭

hoary sluice
#

anyway this works now

valid jetty
#

set the current dir to the parent dir of the file being imported

#

and then set it back after

#

that way when you import tests.foo.functions, it will see ./ as tests.foo and not the original main file

hoary sluice
#

isnt that gonna throw an error

valid jetty
#

why would it throw an error

hoary sluice
#

cause it couldnt find the original file

valid jetty
#

hm?

#

no i meant, when you know the path and have the file

native spruce
#

@valid jetty hows elle

valid jetty
#

make that file import things relative to it

hoary sluice
#

when tests.foo imports tests.bar ./ will be tests and not tests/..

#

or what

valid jetty
native spruce
#

woew

hoary sluice
#

are you calling them lazy iterators cause i asked if iterators can be non lazy

#

or because there are non lazy iterators

valid jetty
#

there are non lazy iterators i guess

valid jetty
#

i just realized youre in tests/use.icy

hoary sluice
#

imports are relative to Cargo.toml

valid jetty
#

is that because the import is relative to where you invoke the interpreter from

hoary sluice
#

i think

#

lol

valid jetty
#

it should be relative to the parent dir of the file being imported/ran

hoary sluice
#

yea ik

valid jetty
#

i remember getting so confused over this lol

#

not the concept itself

#

but the implementation

#

i do this before "importing"

hoary sluice
#

im gonna vibe code this

valid jetty
#

then fixup

valid jetty
hoary sluice
#

because

#

its just refusing to do it

#

ok

valid jetty
#

oh great

#

ok i figured out why/fixed it

hoary sluice
#

ok i vibe coded it

#

it works

valid jetty
#

this is actually a really bad problem because you need this to work sometimes but not other times

#
$assert(~a == ~65535, "~a should equal ~65535 but it is {}".format(~a));
hoary sluice
#

im guessing everything is gonna implode in 2 weeks

valid jetty
#

lmao

hoary sluice
valid jetty
#

assert takes a bool as its 0th arg, which means the expr passed to assert has bool as its param that literals should be interpreted as

#

that cascades down the ast to the 65535

#

and makes it believe it should be a bool literal

#

sometimes you want this behavior though

#

so what i did i guess, is just, compile lhs with the ty from the funcall, then compile the rhs with the lhs type

#

which means it still breaks if i do ~65535 == ~a 😭

#

but idk how to account for this because there are times when you want the cascading behavior of the type, and others when you dont

#

maybe i just ignore bool as a possible type for the literal if its not 0 or 1

valid jetty
#

(bools are encoded with numbers)

hoary sluice
#

why

#

or like why is bool 65535

valid jetty
#

bool is not

#

0 is false, anything that isnt 0 is true

hoary sluice
#

if you do foo(true) will it say 255

valid jetty
#

no it will say 1

hoary sluice
#

then how do you get 65535

valid jetty
#

because this is the test

let a = 0xffff;

$assert(~a == a ^ -1, "~a should equal xor a, -1 but it is {}".format(~a));
$assert(~a == -a - 1, "~a should equal -a - 1 but it is {}".format(~a));
$assert(~a == ~65535, "~a should equal ~65535 but it is {}".format(~a));
$assert(~a == ~0xffff, "~a should equal ~0xffff but it is {}".format(~a));
$assert(~a == -65536, "~a should equal -65536 but it is {}".format(~a));

$println("All `bitwise not` tests have passed!".color("green").reset());
#

the compiler is not supposed to think its a bool

#

but it does because the type from the assert's 0th arg cascades down

#

to the literal

#

this only happens for literals

hoary sluice
#

what is a 0th arg

valid jetty
#

because they inherit their types from the parent type

valid jetty
# hoary sluice what is a 0th arg
fn io::assert(ElleMeta meta, bool condition, string message) {
    if !condition {
        let parsed = message ?: "No additional information was specified.";

        io::eprintln(
            meta.caller, ": Assertion '", meta.exprs[0], "' failed.\n",
            parsed.color("italic").reset()
        );

        libc::abort();
    }
}
#

to the caller, the bool condition is the 0th arg

#

so any literals passed to that parameter at the call-site will be interpreted as a bool if none of the ast nodes broke the ties with the arg

hoary sluice
#

are you 0 indexing args

valid jetty
#

and as binary ops preserve the parent type to the inner type, the bool carries all the way down

valid jetty
hoary sluice
#

its a lot less confusing to say first arg

valid jetty
#

oh

#

well then yeah first arg

hoary sluice
#

assert takes a bool as its first arg, which means the ?????????????????????????????????

valid jetty
#

essentially, at the call site

fn foo(u8 x) {}

fn main() {
    foo(34);
}
``` the compiler sees 34, and its normal instinct is to think "oh, an i32 literal" but because its smart enough to see that its being passed to an argument of type u8, it thinks "oh, this is actually a u8 literal instead" and doesnt do any conversions, just interprets 34 as a u8
#

similarly, assert takes a bool, which is considered a numeric type

hoary sluice
#

yes ok

#

and whats the problem

hoary sluice
valid jetty
#

essentially

#

when compiling the binary operation

#

you can have a "known type"

#

or a type that the expression should turn out to be

#

that is passed down recursively through any binary operations that occur

#

so, as the "known type" is bool,

#

when compiling the right hand side, ~65535, it passes the bool down further

#

and the bitwise not does the same

#

so it ends up seeing "65535, the known type is a bool, ok so this is a bool literal"

hoary sluice
#

oh

#

so it thinks its ~a as bool == ~65535 as bool?

valid jetty
#

yeah basically, but this only applies to literals

#

to literal numbers to be specific

hoary sluice
#

and whats the problem

#

like ok 42 == 37

#

but ~a and ~65535 should be equal either way

#

no?

valid jetty
#

no because ~a is interpreted as i32 as thats the type of a

#

because a isnt a literal

#

its a variable

#

the final equality becomes a bool

hoary sluice
#

ur checking 0xffff == true?

valid jetty
#

im checking 0xffff == ~true

hoary sluice
#

oh

valid jetty
#

it will not

hoary sluice
#

why does type inference precede over unary ops

valid jetty
#

it doesnt, it only does for literals lol

valid jetty
# hoary sluice that will cause so many issues

it will just ignore bool as a possibility for what type the literal should be interpreted as, and probably end up interpreting it as i32 which then can be casted up or down to the correct type

#

simply

#

it does all kinds of other inferences for literals

#

like for example if a function returns u64 and you do return 39; it will interpret 39 as a u64

valid jetty
#

cool

valid jetty
hoary sluice
#

why is use like the biggest commit i did in months

valid jetty
#

bool is not a 1 bit type its 1 byte type

#

so its more like doing 0xffff == ~(0xffff & 255)

valid jetty
#

io soon™️

hoary sluice
#

if i execute smth in the repl it should take the working dir as the reference dir right

hoary sluice
#

well not now

#

on monday

valid jetty
#

why monday

hoary sluice
#

maybe sunday

#

i have to get my diploma thesis running

#

before monday

#

(it works (not on nixos tho) but it needs to run on a raspi)

valid jetty
#

what is wrong with macos

#

why does it start my recording 4 seconds late

hoary sluice
#

rosie when she finds out she can send a screenshot instead of a 1 second video

#

smh

#

oh

valid jetty
#

it still started late

#

whatever

#

stupid macos

hoary sluice
#

why did it put a use statement inside a function

#

thats so cursed

#

never vibe coding again

valid jetty
#

LMAO

#

whats the point of vibe coding anyway

#

like yeah you save time but you lose the satisfaction

hoary sluice
hoary sluice
valid jetty
#

i will lol

#

i do that all the time

#

i manually verify each hunk

hoary sluice
#

thats cursed

valid jetty
#

nop

#

i have caught bugs and things i forgot to do doing this

hoary sluice
#

i need to fix my error messages soon

#

i have . sometimes and no . sometimes

valid jetty
#

oh husk

#

i do that

hoary sluice
#

and first letter uppercase which is 💀

#

i dont have a way of differentiating parser errors and interpreter errors other than interpreter doesnt put . at the end of the error lol

valid jetty
#

i added this error recently

#

(it used to be a todo!())

#

this one also used to be a todo

valid jetty
#

at the bottom of the error

#

or something

hoary sluice
#

probably

valid jetty
#

what is claude 4 about

fleet cedar
#

4% less compile errors when vibe coding probably

#

(Runtime errors are unaffected)

valid jetty
#

lmaoo

hoary sluice
#

and i dont think a lot of vibe coding is done outside of javascript

fleet cedar
rugged berryBOT
#

@fleet cedar I only received js(18.15.0) error output

/piston/jobs/43c43bb0-2d71-483c-9dde-28b5dfbce7c9/file0.code:2



SyntaxError: Unexpected end of input
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1176:20)
    at Module._compile (node:internal/modules/cjs/loader:1218:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.15.0
hoary sluice
#

realistically there will be very few syntax errors in js when using claude

#

itll hallucinate a lot but javascript allows a lot

#

@valid jetty life lesson never do anything just because its better for your grades than the thing u want to do

#

i made a voice assistant which i hated every minute of making just so i wouldnt get a guaranteed B cause you get teamwork F if you do it alone

valid jetty
hoary sluice
#

i verified and corrected every line that it wrote

hoary sluice
#

ok my voice assistant is like 20% non verified (other than testing it) vibe coded

#

and the frontend like 90%

valid jetty
hoary sluice
#

(got an A on the frontend he didnt even look at the code other than the snippets i put in the paper

valid jetty
#

you say this every video dude

hoary sluice
#

i literally just yapped about it for an hour and he didnt look at the project

hoary sluice
#

it was kinda sad

valid jetty
#

this is why you dont vibe code it you just dont do it at all

hoary sluice
valid jetty
#

is 4o good or

#

who is that one made by

hoary sluice
#

no lol

#

chatgpt

#

its gpt 4 but faster i thikn

#

smth like that

valid jetty
#

oh

hoary sluice
#

no reasoning

valid jetty
#

i sure hope the ai overlords take us humans as pets soon

#

cats live a great life, rent-free with free food and sleeping all day

hoary sluice
#

added lines 😲 🤯

valid jetty
#

i want that

valid jetty
#

THAT WAS YOUR USE COMMIT???

hoary sluice
#

yea what about it

valid jetty
#

what the fuck 😭

#

youre gonna be done with icypeas within 4kloc at this rate

valid jetty
#

not if you have an stdlib

#

i guess you can attribute the interpreter for making it so much less code?

#

like im here and about to write 1k lines of tests

valid jetty
hoary sluice
#

i just lex use as an ident (1 line), anything after it as identifier { "." identifier } (0 loc) (the lexer needed 1 loc of change other than an unrelated error msg), parse it (just make sure its actually ident . ident . ident (41 loc) and the actual logic is read the file and lex parse and interpret it in place (60 loc)

valid jetty
#

nvm an svg is 500 loc

#

😭

hoary sluice
#

its not counting icy

#

idk why

valid jetty
hoary sluice
#

how to make it count icy

valid jetty
hoary sluice
valid jetty
#

what about nested imports

#

oh wait do you read imports from the right place or

#

is it still the working dir of the interpreter

hoary sluice
#

dir of the file

valid jetty
#

good

hoary sluice
hoary sluice
valid jetty
#

oh yeah

#

lol

#

did you confirm if it does actually import nested things tho

hoary sluice
#

so relatable

hoary sluice
#

lol

#

yes i did

#

i had tests.prelude originally

#

back when it was using shell wd

valid jetty
#

i meant this

// ./foo/a.icy
use bar.b
// ./foo/bar/b.icy
add x y = x + y
// ./test.icy
use foo.a
valid jetty
visual shellBOT
# valid jetty lc.ocrtr

-# <:i:1363558878872080414> ​ 🇷🇺  Russian   ​ ​ ​​<:i:1363556471303831552> ​ ​ ​ ​🇺🇸  English  

Life of Vasya Pechkin
Telegram life of Vasya Pechkin
Today I learned a funny fact:
Tatarstan lives on Moscow time, and neighboring Bashkortostan
with a 2-hour shift. And the men
in the border village on the Bashkir side, if they run out of booze after 22:00,
they send a messenger on a bicycle to the Tatar village, which is 3 km away, and
replenish their supplies, because
it's still 20:00 there. And Tatar
drunkards have a hangover in the morning,
if their own is closed, then from the
Bashkir store, it opens two
hours earlier
Travel
In time, they
are real```
valid jetty
#

what 😭

#

that doesnt help in any way

hoary sluice
valid jetty
#

thats what i said and then it broke

hoary sluice
#

ik path resolving works and it just lexes, parses and interprets in place

#

so its the same as pasting the file in there

#

ok ill test it

hoary sluice
valid jetty
#

good

deep mulch
#

icee peass

hoary sluice
deep mulch
hoary sluice
# valid jetty lc.ocrtr

tatarstan is using moscow time (utc+3) and bashkortostan (on the border of tatarstan) has utc+5 so when bashkirs run out of alcohol at 22:00 they cycle to tatarstan where its 20:00 and buy more; tatars with a hangover in the morning go to bashkortostan because shops open 2h earlier there

#

russia seems to mostly skip even numbered time zones for some reason

deep mulch
#

so many zones

south moon
#

i don't know swift so now how do i put the action

#

@native spruce

native spruce
south moon
#

okk

native spruce
#

for example:

#
Button {
  print("help me")
} label: {
  Text("le button")
}
south moon
#

can't i just put add

native spruce
#

theres multple ways of making a button

south moon
#

i will try this

native spruce
#

yes that works since its a function

#

the button accepts any escaping action

south moon
#

@native spruce i should start coding functions

#

fuck

#

@native spruce what should i do now

#

aaaaa

native spruce
#

not my decision

south moon
#

no i mean

#

what should i code

#

what do you recommend to code now

native spruce
#

you wanted an icon changer, why not do that..?

south moon
#

i first need to make a page where it lists all the folders

#

but idk how to make seperate pages

native spruce
#

use google

south moon
#

@native spruce if i use tabview, can i also make like buttons that redirect to that tab and if i have that button i make the tab normal switcher invisible?

native spruce
#

why invisible

south moon
#

wait

#

can i customize the position of them

nimble bone
#

just Grok it ✨

#

(don't)

valid jetty
#

anime girl in the thumbnail

#

instant watch

shrewd canopy
#

Is there swiftui for windows yet or nah

native spruce
#

@woven mesa 2 more things until protokolle release

#

gonna obfuscate these

#

I love obfuscation

deep mulch
#

I suppose I will try to ask probably won't get a reply

deep mulch
solemn ravine
#

making exportable structs is surprisingly easy

formal belfry
spark tiger
formal belfry
#

who said korn

pseudo sierra
deep mulch
#

@formal belfry hii

dense sand
south moon
#

@native spruce how can i embed a gif image in swift

ionic lake
#

grok how can i embed a gif image in swift

south moon
#

why did it automod my message

signal oakBOT
south moon
#

i did

spark tiger
#

tf did i do to trigger automod 😭

#

was it grok

native spruce
#

yes

spark tiger
#

insane

signal oakBOT
spark tiger
#

open in notes my beloved

spark tiger
#

#warning is kinda cool

#

like that you can that easily mark stuff

#

and it will show as if it was a regular language error or whatever

native spruce
native spruce
spark tiger
#

so like just panic!()?

native spruce
#

yeah

spark tiger
#

oh ic

#

swift seems like a very neat language

#

like a very straightforward one but at the same time powerful

runic sundial
#

Personally don't care for the "security" but I am curious if it's faster than stbi at decoding 8k pngs

#

My friend Raven semi-recenly got her PR merged with SDL3 bindings

#

Hoping to ditch GLFW for that eventually

winged mantle
dense sand
woven mesa
#

hi oomfies

native spruce
#

hello llsc

hoary sluice
valid jetty
#

omg i forgot about this test

hoary sluice
#

lmaooo

#

rosie what were ur wordle words today

valid jetty
weak roostBOT
valid jetty
#

does that asterisk mean its in hard mode

hoary sluice
#

yes

#

going ||seeds|| is crazy

spark ridge
#

its time to update windows 10 to 11
id like to move to ubuntu, but i cant because i use unity

dense sand
#

any dart/flutter users here?

dense sand
#

would you eat biscord as a cake 😭

median root
dense sand
#

And it even builds fine on my friends machine

median root
median root
#

There's also always good old "flutter upgrade"

#

Making sure u got the right branch

ionic lake
#

yeah this is why i hated flutter

median root
#

I've only ever used it for Linux desktop apps

ionic lake
#

just deps that suddenly become incompatible from one version update

median root
#

I've always found gradle and flutter mobile to be a huge headache

hoary sluice
#

@valid jetty japanese is the easiest language to learn behind english

#

difficulty of languages depends on the amount of material not difficulty of language

median root
#

I swear difficulty of language comes from what languages you know before?

valid jetty
supple whale
#

what do i do here guys

#

some guy came complaining that my app doesnt work for him

shrewd canopy
spark ridge
valid jetty
#

that too yeah

#

i forget the reading of words all the time

hoary sluice
hoary sluice
#

the difference is you can learn those words in japanese

#

have fun learning kazakh vocab without living there

hoary sluice
#

I know the grammatical order of like 10 languages

#

like 50 if you count all turkic languages

valid jetty
hoary sluice
#

with japanese if you want to learn grammar you can:

  1. use duolingo
  2. take an in person course
  3. take an online course (eg youtube)
  4. read a book
  5. use any of the thousands of language learning apps that offer japanese
  6. move to japan

with kazakh if you want to learn grammar you can:

  1. learn russian first, then move to kazakhstan and take an in person course
#

same goes for vocab

#

you can use an anki deck for kazakh which has just the word and the translation with no explanation and no audio (!!)

hoary sluice
#

not for tenses

fleet cedar
#

Duolingo is great for preset sentences

hoary sluice
#

but for constructing sentences correctly if you know the vocab

cinder egret
#

it is up there as one of the most desired to learn languages i would say

#

or the people who watch the million japan food channels on youtube and all of a sudden wanna move there because they think it's perfect

hoary sluice
#

if you have the exact same learning material for japanese and for some random language that 20000 people speak then maybe japanese is harder but in reality you never have close to enough material to learn the rare language

cinder egret
#

there is so much learning material for japanese yeah

cinder egret
winged mantle
#

i meanan other rosie

hoary sluice
#

even something like romanian is so much easier to learn than kazakh

winged mantle
#

wants to move to japan because of japan food channels

#

I should learn japanese to play games which only released for famicom

hoary sluice
#

both have a lot of extremely stupid rules

cinder egret
#

japanese just has such a large presence online that it is almost impossible to not at one point stumble upon the language in one way or another

deep mulch
hoary sluice
south moon
valid jetty
hoary sluice
#

only duckduckgo

valid jetty
#

nor do i watch anime

south moon
#

startpage is great

hoary sluice
valid jetty
hoary sluice
#

i can name literally none

valid jetty
#

idk why you guys have this concept that i wanna go there because its some magical place, its just like anywhere else but safer, physically

deep mulch
#

nop

#

normal people dont switch every system and app language to yappanese

hoary sluice
#

safety cant be your only reason cause japan isnt the safest place

valid jetty
deep mulch
#

everything ive seen theyre hostile to foreigners

valid jetty
hoary sluice
valid jetty
hoary sluice
#

besides maybe johannesburg

#

or something

deep mulch
#

Japan is overrated anyways

valid jetty
#

unless youre like, an idiot who blasts music on the train

deep mulch
#

@valid jetty go somewhere cool like Australia

valid jetty
#

bugs

deep mulch
#

eat

valid jetty
#

i dont wanna go to france because its france

hoary sluice
valid jetty
#

idk about all slavic countries but at least in romania a lot of the people are orthodox christians so i assume its a similar thing in other countries

hoary sluice
#

so what

deep mulch
#

rosie thinks youll get shot anywhere in america

valid jetty
#

uhhhhhh

#

no

hoary sluice
valid jetty
#

let me live with my decision

hoary sluice
#

whats the embed twitter

valid jetty
#

fxtwitter

deep mulch
#

twitter so bad

hoary sluice
#

theyre not gonna kill you because youre not christian

valid jetty
#

they wont like my.. kind

spark ridge
valid jetty
#

i have my motives

hoary sluice
deep mulch
#

I wanna move to Greenland, Scandaniva, Canada, Northeast/Northwest US when I can

hoary sluice
deep mulch
#

@valid jetty GUHHH just go live in india or something

hoary sluice
#

india is arguably worse than uk

deep mulch
#

it would be funny

hoary sluice
#

is suicide an option

deep mulch
#

yes

valid jetty
#

both are asian countries and ive already been studying japanese for over a year

deep mulch
hoary sluice
valid jetty
#

i could tell after 😭

deep mulch
#

if i were to ever get serious about another language id learn spanish

#

way more useful

#

especially in the US

valid jetty
#

all you need to know is that im not a weeb or whatever lol

#

i am perfectly aware japan is a country just like any other

deep mulch
#

id learn Spanish, French or German

valid jetty
#

when somebody asks you where you live

deep mulch
#

@valid jetty you

valid jetty
#

do you really wanna say "yes i live in fr*nce"

hoary sluice
#

nop

deep mulch
#

yop

hoary sluice
#

but i wouldn't mind saying "yes i live in poland"

valid jetty
#

which side

hoary sluice
#

or "yes i live in montenegro"

valid jetty
#

the femboy side or the chad alpha male side

hoary sluice
valid jetty
#

you know

#

the usual

hoary sluice
#

no i dont

deep mulch
#

@valid jetty@valid jetty@valid jetty

hoary sluice
#

been to poland many times never seen a femboy

valid jetty
hoary sluice
# valid jetty

never been to lublin, dont remember seeing femboys in wroclaw

#

theres nothing u can be except american for which poles will laugh at u

valid jetty
#

or french

deep mulch
#

@valid jetty hii

hoary sluice
valid jetty
#

im rewatching reacher

#

season 3 came out in february and i didnt even realize

deep mulch
#

@valid jetty hii

winged mantle
valid jetty
#

the things js devs need to mimic a fraction of get_or_insert_with

winged mantle
#

i have so many utils that i've basically reimeplmented lodash

royal nymph
formal belfry
#

vee

#

unblock me

#

please

winged mantle
#

i am doing it in quite a few places

#

main purpose is this

royal nymph
#

also you will hop on

class JavaMap<K, V> extends Map<K, V> {
    computeIfAbsent(key: K, factory: (key: K) => V) {
    }
}
winged mantle
#

awful

#

wait

#

i swear i once made something like that

royal nymph
royal nymph
#

in js you don't have that problem

winged mantle
#

yeah but do you wanna write this boilerplate everywhere

royal nymph
#

imo not a use case that comes up often

winged mantle
#

i already have it in three places

royal nymph
#

also ummm your implementation is wrong

winged mantle
formal belfry
#

vee

#

what theme are u using

royal nymph
#
const map = new Map();
map.set("balls", undefined);

computeIfAbsent(map, "balls", () => "FAAAAAAKE");
console.log(map.get("balls")); // FAAAAAAKE
#

🥶

winged mantle
#

eh

royal nymph
#

you should use map.has

winged mantle
#

who cares

formal belfry
#

vee prosze odblokuj mnie chce tylko wiedzieć jaki motyw discord posiadasz

royal nymph
#
function computeIfAbsent() {
    if (!map.has(key)) {
        map.set(key, factory(key));
    }
    return map.get(key);
}
visual shellBOT
# formal belfry lc.translate

-# <:i:1323844562875187291> Translated from 🇵🇱 Polish to 🇺🇸 English • Google Translate
vee please unblock me i just want to know what discord theme you have

royal nymph
#

you love

winged mantle
#

deja vu...

royal nymph
#

well the type would reflect that

#

vban @formal belfry annoying

elder yarrowBOT
frosty obsidian
#

vban @royal nymph annoying

elder yarrowBOT
frosty obsidian
#

why

winged mantle
royal nymph
#

yop true

frosty obsidian
#

i think venbot is broken

winged mantle
#

as TValue

royal nymph
#

imagine if ts added contracts

valid jetty
#

dont call it TValue for fucks sake

#

just call it Value

winged mantle
#

what is that

valid jetty
#

generics dont need to start with T

royal nymph
#

microsoft recommends that

winged mantle
royal nymph
#

you wouldn't break microsoft style guide

valid jetty
#

like a contract that specifies the foo function's n parameter must not be null

#

or whatever

winged mantle
#

type static_assert<V extends true> = never;

valid jetty
#

that can only form very basic contracts

winged mantle
#

do it c++ style

valid jetty
#

languages like c3 can have much more complex ones

royal nymph
winged mantle
#

ohh like

royal nymph
#

like a basic contract would be

map.get(key) != undefined => map.has(key) == true
valid jetty
winged mantle
#

ohh

#

ohhhhhhh

royal nymph
#

or ```
!map.has(key) -> map.get(key) == undefined

#

that's contracts

winged mantle
#

get<Key>(key: Key): this is Map & { get(k: Key): V }

royal nymph
#

it's called contract because it's essentially a "promise" you make

valid jetty
#

what

royal nymph
valid jetty
#

oh i see

winged mantle
royal nymph
#
isSomeSpecificSubtype(): this is Subtype {
    return someCondition;
}
#

here the contract is someCondition -> this is Subtype

#

yop

royal nymph
winged mantle
#

i wanted to have a contract which was "if this returns false, the passed value is definitely not null"

#

but if it's true the type should stay the same

#

i don't think that's possible

#

if i do : this is null that's incorrect - it's correct that if it returns false it's not null, but if it returns true it could be null or not null

#

(the function was isEmpty)

#

(I think it's the same as lodash's lol)

#

(it just checks if something has any keys - an object with values, a non-empty string and a non-empty array all have them)

#

i distinctly remember you suggesting i use === undefined instead of has

#

i will just do this not to need cast

#

so if it's undefined it's deffo not present

deep mulch
#

@winged mantle