#đŸȘ…-progaming

1 messages · Page 103 of 1

valid jetty
#

nopeee i think that would get you approx 1-2 marks out of 4

#

not my working but this is how you’re supposed to do it

hoary sluice
#

hold on i dont think you can drop it yea

#

only opposites

#

the thing is you can check if its right if you have enough tim

valid jetty
#

they’re also in different “and” clauses

#

there’s also stuff like de morgan’s laws as part of these questions

#

point is you can see it’s a pretty hard question lol

hoary sluice
#

ok i wrote down a truth table for it

#

gonna solve it now

#

you can drop the not w and x and y

valid jetty
#

okk

hoary sluice
#

completely

#

because its fully encompassed in the others

#

the not w at the start can be ommited

#

if W is 1 then Q is 1, if W is 0 then Q is X

#

can drop the not Z at the end because anything the not Z blocks is already 1 anyways

#

@valid jetty my answuer is X * Z + W * Z + X * Y

#

where did you get X * W from

#

@valid jetty your answer is wrong

#

i think

#

x * w cant be true

#

look at the last one

#

its not 1 for the original expression

#

but it is 1 for you

valid jetty
#

i have no idea what they did but it got all marks

lucid trail
#

edinburgh was the only one that rejected me 😭

#

also isnt 10k per year a normal price for UK, non scotland students

valid jetty
#

yeah

#

my other options are durham, birmingham, maybe liverpool or manchester

lucid trail
#

you like big cities?

hoary sluice
#

my options are rapid wien or real madrid

spark tiger
#

guh what do i even choose

lavish frigate
#

personally never tried actix

#

have experience with axum through dioxus fullstack

spark tiger
#

guess ill just go with axum thankku

lavish frigate
#

ive always been told axum was more widely used, might be that actix is just easier to use and so more love

spark tiger
#

i just need a simple webserver that would return a json on a specific endpoint

#

initially wanted to go with python but decided i might try rust since well i'd like to get better at it

lavish frigate
#

if its small and simple i think axum would be a better choice

spark tiger
lavish frigate
#

actix is also async

spark tiger
#

oh right im dum

shrewd canopy
#

I use Rocket though

lavish frigate
#

it just makes more sense having a webserver be async not only for scalability but also because most webservers do stuff like database requests, etc. where async is nice to have

#

if you arent the one handling async yourself its also just as easy as doing .await and async fn :^)

dense sand
#

Nextjs

spark tiger
#

argh why does github api not have a simple way to check if a user is a contributor for a specific repo

#

that’s so frustrating

spark tiger
#

so like imagine if the repo is really big

#

with lots of contributors

#

without authorization you can only send like 60 requests per hour per ip

#

i wanna do it with an oauth

lavish frigate
#

? !

#

authorized requests do not use the ip

spark tiger
#

i just wish there was a simple endpoint like /owner/repo/is-contributor

lavish frigate
#

only annonymous requests do

#

with authorized reqeusts you have 5k requests per hour

#

i think thats enough for u

spark tiger
#

argh okay but it still sounds kinda dumb to iterate thru the whole list. even tho the github web can already show if a specific user is a contributor

#

i just don’t get it why there is no simpler way

lavish frigate
#

it is not that difficult to implement pagination you couldve done it in the time you spent here talking about it

#

😭

ionic lake
#

everyone's on axum these days and also use tokio anyway so it fits into their stack

torn thunder
#

Nope

#

not that bad if you don't care abt aesthetics

jade stone
#

Check that code

spark tiger
#

yeah how did i forget that lol

jade stone
spark tiger
#

thankk

#

codeburger 😭

jade stone
pearl stagBOT
spark tiger
#

why does this server not use linked roles though

jade stone
spark tiger
royal nymph
spark tiger
#

i couldn’t find where exactly it’s used cuz it’s PITA to do it on mobile

spark tiger
royal nymph
#

?

jade stone
spark tiger
royal nymph
#

because that sucks

#

you cannot manually assign them

spark tiger
#

OH

#

i get it now

#

that's dumb

#

i was going to try to make one for our server cuz ppl would keep asking someone to give them the contrib role

mild yoke
spark tiger
#

i guess it also means we'd have to make a new role for that rather than using the old one?

royal nymph
#

yes

spark tiger
#

bruh

royal nymph
#

actually no

#

but i think it will remove it from everyone

#

cause they dont fulfil the link requirement

spark tiger
#

argh

#

i guess we just keep doing it manually with a command

#

!contrib 481532274211422209

mild yoke
#

particularly for mobile

lavish frigate
#

Its literally just react but rust xd

mild yoke
#

right but they're advertising as a mobile framework

#

the technology is super cool though

lavish frigate
#

„Templating system“ it’s a stateful frontend framework xd

mild yoke
#

no like the RSX part

#

Flutter is a good case study because it shows how much work goes into less so the framework and more so components

lavish frigate
mild yoke
#

It just sounds like a nightmare in terms of support

lavish frigate
#

People have a already been doing this with react native but react native fucking sucks from a performance standpoint

mild yoke
#

No they haven't

lavish frigate
#

Yes, react native tries to do exactly this too

mild yoke
#

React Native still calls native components

#

the work is solved for them

#

I dislike react native but the advantage they have is exactly the opposite of the position that dioxus is putting themselves in- they have to make the native components

#

Flutter had that problem as well but they had a massive team to do it

#

And even then it's far from perfect

#

Just seems very disingenuous to call it a mobile framework, and intentionally wrapping over web with nonconventional just so we can have more rust in our UI code sounds like disaster.

lavish frigate
#

You are missing that it’s not trying to be just a mobile framework, it’s whole point is that one have one codebase for everything, if you use native components you have to bend and break them into looking exactly the same on all platforms it’s using its own renderer on platforms to ensure that everything works and looks the same everywhere

#

You are too focused on specifically the mobile part

mild yoke
valid jetty
#

LMAO

lavish frigate
valid jetty
#

hiii

lavish frigate
#

Its like saying „react native sucks because its just about them trying to do everything in js“

valid jetty
lavish frigate
lavish frigate
valid jetty
#

i hate rust because it encourages 5 billion method chains

#

its still a great language

#

but yeah

shrewd canopy
lavish frigate
lavish frigate
frosty obsidian
lavish frigate
frosty obsidian
#

react native is worse because you still have to write platform specific code for some things and its really annoying

#

i spent forever trying to get bottom sheet behavior working right and it just never did

solemn ravine
#

was too difficult to find a decent way to display blogs

#

finally managed to make something look good

dawn ledge
#

ui crates are an entire different can of worms

#

its hard to incorporate the fluid idea of UI in a rigid language like rust

frosty obsidian
dawn ledge
dawn ledge
frosty obsidian
#

I've read the other two

solemn ravine
mild yoke
lavish frigate
#

like

mild yoke
#

That's all RSX is

lavish frigate
#

the desktop renderer is specifically custom made to be more performant cutting out js

#

you are telling me this like react native, flutter dont compile down to html and css, like what the hell did they do new?
even if, its still in a package and i already gave you the reasons why it was made

dawn ledge
#

nonconventional just so we can have more rust in our UI code sounds like disaster.

they just don't have to in the name of making it all rust.

sounds like a you issue

#

no one iis shoving dioxus down your throat

#

you are no better than the average rust junkie who goes to great lengths to defend their language
except youre defending flutter

#

when no one called out flutter

dawn ledge
lavish frigate
#

crazy

dawn ledge
#

they use jsx as a layer to call into native components

lavish frigate
#

then how the fuck is it still so ass

dawn ledge
#

because js? lol

#

i would like to say, dont use discord as a reference for rn apps
discord is just incompetent

#

rn isnt all that slow

valid jetty
#

^^^

mild yoke
#

RN on web is html but that's it

#

What you're talking about is literally a webview

lavish frigate
#

lol

#

lmao

mild yoke
mild yoke
dawn ledge
#

^

dawn ledge
mild yoke
#

Lol no one is at fault it's just my take

lavish frigate
#

fault 😭

#

i just dont see the reason for the hate

#

this is like this but RUST so i dont like it

mild yoke
#

I think it's very cool, just a nightmare to develop with when you actually start building

#

I like rust

lavish frigate
#

is flutter fullstack

mild yoke
#

No

lavish frigate
#

dioxus takes the one codebase thing to the extreme, as in it also provides easy server side functions

mild yoke
#

Right I know how that can be useful but for local app development it's just a lot of extra steps on top of what will eventually be html/css

#

Where I work it really isn't that much extra work having the backend / frontend in different languages

#

People making all-platform apps via web isn't a new thing but it's also never worked to the extent it has to for mobile

paper scroll
#

i love rust mmmmmm rust

frosty obsidian
#

some people just don't want to learn new languages

#

so they force what they know into paradigms they weren't meant for

solemn ravine
#

now I need to do something here that shows something meaningful instead of text on buttons

frosty obsidian
#

I'd probably use icons for socials

#

and put them at the top

#

they're the most important thing people look for when visiting a personal site

#

the rest could maybe be styled using the respective brand color(s)?

#

idk

torn thunder
#

so kewl

solemn ravine
#

pai nt

crude star
#

I thought I knew all C99 features but this is new to me ```c
static struct {
unsigned bytes : 1, words : 1, dwords : 1, qwords : 1;
} options;

lavish frigate
#

i think

#

rust lib devs need the builderbuilder pattern

#

so like

solemn ravine
#

make RustUI @young flicker

lavish frigate
# lavish frigate rust lib devs need the builderbuilder pattern
let builder = HouseBuilderBuilder::new().with_colors(true).with_furniture(true).build();
let house = builder.with_foundation().color(Colors::GRAY).with_walls().with_roof().add_furniture([Furniture::Couch, Furniture::Shelf]).build();

do you see the vision

lavish frigate
solemn ravine
#

this looks dumb we need wxrustui

nimble bone
#

nop i hate

#

Swift saner

#

oh is this web

#

sooooo insane

#

THE WEB WAS MADE FOR HTML

#

NOT RUST

ionic lake
#

I can agree

#

webgpu support is still ass.

crude star
#

yes with 1-bit fields

jade stone
#

oh

#

neat

jade stone
#

rate horrorcode

private fun generateQuadrants(size: Coord): List<List<Coord>> {
    val xMiddle = size.x / 2
    val yMiddle = size.y / 2
    val nw = mutableListOf<Coord>()
    val ne = mutableListOf<Coord>()
    val sw = mutableListOf<Coord>()
    val se = mutableListOf<Coord>()
    List(size.x) { x ->
        List(size.y) { y ->
            Coord(x, y)
        }
    }
        .flatten()
        .forEach {
            if (it.x == xMiddle || it.y == yMiddle) {
                return@forEach
            }
            if (it.x > xMiddle && it.y > yMiddle) {
                se.add(it)
            } else if (it.x > xMiddle) {
                ne.add(it)
            } else if (it.y > yMiddle) {
                sw.add(it)
            } else {
                nw.add(it)
            }
        }

    return listOf(nw, ne, sw, se)
}
solemn ravine
valid jetty
solemn ravine
# valid jetty

One of my family members insist on telling me that AI is going to take coding jobs and imply I should go a different route because of that

#

One of the main points I tried to make is “did you make anything? or do you maintain a large project” then I got a “I don’t care” response lol

#

It’s all fear mongering (I told them that) but they still insist

#

It’s always the non-programmers saying that sort of junk, just becomes a bit annoying when you always hear it

woven mesa
#

so good

woven mesa
solemn ravine
#

Sadly in my situation it’s someone who doesn’t like to be wrong or be someone who is the one informed about something they don’t know about

#

My dad is more understanding though he actually programs like I do

woven mesa
#

scary

solemn ravine
#

Not a worry to me though, I shall stay strong and do what I do

solemn ravine
woven mesa
#

i wanna make blog posts tooo đŸ„ș

solemn ravine
#

then make

#

Im gonna write many

woven mesa
#

i should redo my website at some point

solemn ravine
#

Because I know too much random stuff

#

I spent like the last 4 days rewriting my site and making it work with cloudflare

#

it’s all done now

shrewd canopy
solemn ravine
#

a website using cpp is astonishing atp just use a website template and modify a few things

valid jetty
#

@hoary sluice when i rewrote the generics system in elle i accidentally made cases like this (and more complex ones) work

#

where the generic type is part of a bigger generic type

#

T must be monomorphized as part of Tuple<T, U> where U = T, then Tuple<T, U> must be monomorphized as part of Array<T>, where T = Tuple<T, U>

#

you can give them variables

#

you have a root Array<T2>, whereT2 = Tuple<T, U>, where T = i32 and U = T, then T is monomorphized seperately as part of the function call monomorphization

austere idol
shrewd canopy
#

Qt can be used in browser with wasm

fleet cedar
#

I love c

#

/run ```c
main;

rugged berryBOT
#

@fleet cedar I received c(10.2.0) compile errors

file0.code.c:1:1: warning: data definition has no type or storage class
    1 | main;
      | ^~~~
file0.code.c:1:1: warning: type defaults to 'int' in declaration of 'main' [-Wimplicit-int]
/piston/packages/gcc/10.2.0/run: line 6: 3588685 Segmentation fault      (core dumped) ./a.out "$@"
valid jetty
#

omg it’s not even a video

#

stupid automod filter

#

.

woven mesa
#

u can do tbis with iphones with 3d touch too

hoary sluice
#

@valid jetty do you primarily want a rust job

#

youre taking a gap year right?

#

im not a recruiting agent just curious if youd want to work with one of those blockchainification of services companies that use rust cause i think solana uses rust so thats where all the rust jobs are

deep mulch
valid jetty
hoary sluice
hoary sluice
valid jetty
#

i know C so i would rather get a C job than rust

hoary sluice
valid jetty
#

i have elle

#

i had to write a lot of C to understand how IR works

hoary sluice
#

@spark tiger can u read this

supple whale
#

russian?

hoary sluice
#

how so fast

spark tiger
#

idk

supple whale
#

damn

#

i can barely recognise the language

#

man knows what it says

hoary sluice
spark tiger
#

i have nfi what it says this doesnt make any sense to me isob

supple whale
#

XDDD

hoary sluice
#

fuck

spark tiger
hoary sluice
spark tiger
supple whale
#

audible for me

hoary sluice
hoary sluice
#

idk whats wrong

spark tiger
hoary sluice
#

theyre fine in whatsapp and tg

#

fuck

spark tiger
#

silly

hoary sluice
hoary sluice
#

not even a single word

#

i never learned russian handwriting

spark tiger
#

its ez

hoary sluice
spark tiger
#

you just gotta feel it

solemn ravine
#

lc.i russian doctor handwriting

visual shellBOT
hoary sluice
#

thats normal

solemn ravine
#

looks insane sorry

hoary sluice
#

just a specific sentence thats hard to read

solemn ravine
#

how do you even differentiate the letters

hoary sluice
hoary sluice
#

they have minor differences

#

i couldnt decipher a single word tho

solemn ravine
hoary sluice
#

now that i know what it says i can read it just fine

spark tiger
solemn ravine
#

whats this

hoary sluice
solemn ravine
#

ur other example looks the same 💔

spark tiger
#

its shrimple fr (fixed)

solemn ravine
#

idk about that

hoary sluice
#

ignore the black background

hoary sluice
#

in different tenses

solemn ravine
#

css is githubs passion

lavish cloud
#

Learning how to do symbolic computation

deep mulch
#

@frosty obsidian evil kotlin

lavish cloud
#

wdym it works perfectly fine

deep mulch
#

evil

lavish cloud
#

I wonder what the worst antiderivative is

frosty obsidian
#

zeet when people learn programming languages to make something other than apps

lavish cloud
#

for now I'm thinking either division or powers

deep mulch
#

noppp math like this is too cursed

lavish cloud
deep mulch
#

im used to seeing this in haskell

frosty obsidian
#

complex math on the jvm isn't a good idea usually

#

but im assuming this is just being done to learn

lavish cloud
#

symbolic computation isn't a good idea ever tbh

deep mulch
#

mart has evil plans

lavish cloud
#

I always do

#

like my BigNum implementation that can store up to roughly 10{1000}10

frosty obsidian
#

i usually see math stuff done in c or cpp using jni

lavish cloud
#

you essentially build an expression tree and optimize it or do partial evaluations as you go

#

and because you have it as expression tree, you can do things like take derivatives

deep mulch
lavish cloud
#

horror

deep mulch
#

i couldnt get it to zoom as mcuh as i wanted

lavish cloud
#

shaders are evil

frosty obsidian
#

zeet just telling people to do what he already did

deep mulch
#

yop

#

i couldnt figure out how to make it stop getting pixelated

lavish cloud
#

oh in that case

#

zeet you should make a custom compose lib

deep mulch
#

what will it do

frosty obsidian
#

infinitely zoomable fractals

lavish cloud
#

compose for javafxℱ

frosty obsidian
lavish cloud
#

I did compose for Minecraft already, JavaFX should be much easier by comparison

deep mulch
#

ive never used javafx

frosty obsidian
#

well compose desktop is built on top of it anyways

#

iirc

deep mulch
#

compose dedsktop is on top of swing

lavish cloud
lavish cloud
frosty obsidian
#

oh i thought those were just different names for the same thing

deep mulch
#

nop

frosty obsidian
#

compose runtime becoming the new doom

deep mulch
#

@frosty obsidian

lavish cloud
frosty obsidian
#

actually why not have compose but for doom maps

frosty obsidian
#

reminds me of jake whartons compose tui thing

lavish cloud
#

I used that as very loose reference actually

#

but implementing things like animation or modifiers is horror

deep mulch
#

@lavish cloud figure out how to get a framebuffer instance

#

in compose

lavish cloud
#

wdym

frosty obsidian
#

@deep mulch try to use the balatro background shader in compose

deep mulch
#

get a framebuffer instance for mpv to render to

frosty obsidian
#

you can get it from the game files

lavish cloud
#

compose supports using skija backends and you can make an opengl backend

deep mulch
#

it uses opengl

#

if available

frosty obsidian
#

balatro being made with lua just means that the direct source code is whats distributed

deep mulch
#

@frosty obsidian

frosty obsidian
#

its not even minified

lavish cloud
deep mulch
#

the shader would have to be converted

#

sksl is slightly different

#

@frosty obsidian im so wingy aha

frosty obsidian
lavish cloud
#

Pokemon PLA and SV use lua as well

#

but they luac'd it

#

so it's all binary and we have to manually decomp

deep mulch
#

scary

lavish cloud
deep mulch
#

@frosty obsidian when will gloom use root to install itself a hidden binary thats impossible to remove

frosty obsidian
#

wdym when

#

its always done that

deep mulch
#

swizzle is a funny word

frosty obsidian
#

i have zero familiarity with shaders

deep mulch
#

me neither i just found something online and made it work

#

@frosty obsidian real name Edwardo

lavish cloud
#

I think at that point it might just be float precision detail limits you're running into no?

deep mulch
#

it could be but idk how to get a double working properly in the shader

lavish cloud
#

so uh

#

you technically cant

#

but

#

you can write the math yourself to use two floats instead

#

then just pack those in a vec2

deep mulch
#

perhaps

spark tiger
#

how does nix know what these options are supposed to do? like where is it declared

#

i tried to find alacritty in nixos/nixpkgs and see if there’s anything there but i didn’t find anything related to settings/config

pseudo sierra
#

that's from home manager

#

it's pretty much just a toToml generator

spark tiger
#

ohh i see thank you

#

that’s v interesting

pearl stagBOT
jade stone
#

Nixd is either great or useless

deep mulch
#

@young flicker

jade stone
#

Vencord: v1.12.7 ‱ 03fe7d1 (Vesktop v1.5.7) - 22 Jul 2025
Client: canary ~ Vesktop v1.5.7
Platform: Linux x86_64

royal nymph
#

aaaa

#

why did discord make quotes look so bad

#

muted

deep mulch
#

aaaa

jade stone
jade stone
#

So nice when debugging

supple whale
#

you want verbose? do adb shell setprop persist.log.tag V

#

that will fill up your 100MB cache within <0.1s

#

XD

jade stone
supple whale
#

yeah

#

i legit cannto profile my app on android

#

because the profiler lasts 50ms before the buffer is filled

#

sorry

#

15ms

jade stone
supple whale
#

150MB

#

didnt find a way to increase it

#

XD

jade stone
# supple whale 150MB

Are you sure there really isn't a way to increase it? I feel like that's something that just should exist.

supple whale
#

might be

supple whale
#

it would be <6s of profiling

#

XD

spark tiger
#

too lazy to review fr

placid cape
#

xddd

#

I'm doing same thing

austere idol
#
exec="$(grep '^Exec=' < "$HOME/.config/autostart/$file" | sed 's/Exec=//')"
file_nodesktop="$(echo $file | sed 's/\.desktop$//g')"
mkdir -p "$HOME/.var/autostart/$file_nodesktop"
printf "#!/bin/sh\nexec %s" "$exec" > "$HOME/.var/autostart/$file_nodesktop/run"
chmod +x "$HOME/.var/autostart/$file_nodesktop/run"
spark tiger
#

8 husks holy fucking shit

hoary sluice
supple whale
#

11

#

that said, I got Claude agent mode to set up git LFS for me, and it did it all full auto without issues

#

that was peak.

#

all the way from start to committing the files

deep mulch
spark tiger
valid jetty
#

i’ll bring in my alt soon to react

#

@spark tiger you got husked by just about every single active programmer in this channel how do you feel

spark tiger
#

the betrayal broken_love

valid jetty
spark tiger
#

hey don't snitch ye

royal nymph
winged mantle
#

TIL how utf-8 works finally (I never found a good resource)
at least... i think this is correct

size_t count_utf8_codepoints(const char *str) {
    size_t result = 0;

    while (*++str != '\0')
        if ((*str >> 7) == 0 || (*str >> 6) == 0b11)
            ++result;

    return result;
}
valid jetty
# winged mantle TIL how utf-8 works finally (I never found a good resource) at least... i think ...

basically

fn char::utf8_len(char self) {
    if (self & 0b10000000) == 0 {
        return 1;
    } else if (self & 0b11100000) == 0b11000000 {
        return 2;
    } else if (self & 0b11110000) == 0b11100000 {
        return 3;
    } else if (self & 0b11111000) == 0b11110000 {
        return 4;
    }
}

fn string::utf8_decode(string self) -> rune {
    length := self[0].utf8_len();

    if length == 1 {
        return #cast(rune, self[0] & 0b01111111);
    } else if length == 2 {
        return #cast(rune, ((self[0] & 0b00011111) << 6) |
                            (self[1] & 0b00111111));
    } else if length == 3 {
        return #cast(rune, ((self[0] & 0b00001111) << 12) |
                            ((self[1] & 0b00111111) << 6) |
                            (self[2] & 0b00111111);
    } else if length == 4 {
        return #cast(rune, ((self[0] & 0b00000111) << 18) |
                            ((self[1] & 0b00111111) << 12) |
                            ((self[2] & 0b00111111) << 6) |
                            (self[3] & 0b00111111);
    }
}

fn rune::encode(rune self) -> string {
    res := "";

    if self <= 0x7F {
        res.push(#cast(char, self));
    } else if self <= 0x7FF {
        res.push(0xC0 | (self >> 6) & 0x1F);
        res.push(0x80 | (self & 0x3F));
    } else if self <= 0xFFFF {
        res.push(0xE0 | (self >> 12) & 0x0F);
        res.push(0x80 | (self >> 6) & 0x3F);
        res.push(0x80 | (self & 0x3F));
    } else if self <= 0x10FFFF {
        res.push(0xF0 | ((self >> 18) & 0x07));
        res.push(0x80 | ((self >> 12) & 0x3F));
        res.push(0x80 | ((self >> 6) & 0x3F));
        res.push(0x80 | (self & 0x3F));
    }

    return res;
}
valid jetty
#

it’s a variable amount of bytes

#

the first byte tells you the amount of bytes

winged mantle
#

i just said i learnt how it works.. blobcatcozy

valid jetty
#

and the first byte can also be valid ascii in which case the length is 1

winged mantle
#

that's what i just learnt...

valid jetty
#

oh lol

winged mantle
#

😭

valid jetty
#

wait until you hear about utf16

winged mantle
#

i just wanted confirmation that i was doing it right

valid jetty
#

i can’t reason about your source code but it’s probably right

winged mantle
#

wdym...

#

i haven't put this in a codebase it's might as well be pseudocode as i haven't even tested it but i was wondering if i had the right idea

valid jetty
#

i’m on mobile and i can’t really analyze your code without being able to run it, but if you took it following some information source then it’s probably right

#

yeah i think that is right

winged mantle
#

isn't utf-16 kinda annoying

valid jetty
#

utf16 is just 2-4 bytes instead of 1-4

spark tiger
deep mulch
#

rosi e insane

#

rosieeeeee 😭

valid jetty
#

@winged mantle you might like to read this

winged mantle
#

i think i will just implement utf-8 for now

#

windows is insane

valid jetty
#

that’s a sane idea

#

i just wanted to explain that unicode in itself is just abstract numbers to represent each grapheme cluster and then stuff like utf8 is an encoding form so you can actually encode text using those abstract code points

#

i’m assuming this is what you learnt but might aswell reinforce

#

omg you should look at GB18030 it’s pretty silly

winged mantle
#

wait i'm dumb

shrewd canopy
winged mantle
#

i was researching utf-8 to work out whether i needed to implement it

#

and the answer was no

valid jetty
#

lmao

winged mantle
#

the clever thing is if you're searching for an ascii char you don't need to be aware of unicode at all

valid jetty
#

yes that’s kinda the point of utf8

#

if the character is ascii the code point length is 1 and the value is just straight up the single byte

winged mantle
#

yeah i did work this out and then remember that but for some reason i thought i still might need to decode stuff

valid jetty
winged mantle
#

but it's just a json parser... i basically just need to copy the string apart from some escape sequences which are ascii anyway

valid jetty
#

i’m pretty sure json keys can be any utf8 can’t they?

#

because js strings can be any utf8

winged mantle
#

js strings are utf-16

#

but ofc that can store the same characters

deep mulch
#

one of you is going to betray me

valid jetty
#

“going to”

deep mulch
#

yes

winged mantle
#

but i can just give the string straight to the consumer of the api lol

valid jetty
#

why are you speaking in the future tense if it already happened

deep mulch
#

utf128

valid jetty
deep mulch
#

utf256

#

add comments in English

winged mantle
#

super mario 256

pseudo sierra
deep mulch
#

you

valid jetty
#

it’s quite literally

  1. bit masking to get the length of the utf8 char
  2. packing multiple bytes into a single 32 bit int
  3. unpacking the int into multiple chars which become a string
#

if you try to actually read it it is so stupidly simple

deep mulch
#

nop

winged mantle
#

i find it hard to understand things in youtube videos with people talking quickly

#

i finally found a good article

valid jetty
winged mantle
#

insane...

valid jetty
#

sometimes 1.75x

spark tiger
winged mantle
#

i always watch videos at 1x

spark tiger
#

niri looks interesting though

valid jetty
#

the only exceptions are movies and emotional videos

#

those i will watch at 1x because that’s how they’re intended

#

but technical videos are sooooo slow

#

like pls speak faster

#

omg

crude star
#

do you take adderall

winged mantle
#

how do you keep up with things

valid jetty
deep mulch
#

Rosie memorizes for centuries

valid jetty
#

typically when i watch a technical video i already understand some of it

#

so it’s not learning from square one but reinforcing what i already know with more info

#

which makes it not hard to keep up

#

i know some people who watch at 2x and those people are ACTUALLY deranged

#

like at 2x words are quite literally slurred for me

#

idk how they do that but they exist

winged mantle
#

i imagine you as a really fast talker

valid jetty
#

i have to purposefully slow down

pseudo sierra
#

I already talk at 2x speed irl so I can understand it pretty well sillycat

winged mantle
#

i swear english has a slower average talking rate than other languages

pseudo sierra
#

yop

spark tiger
#

i cant understand a single word in songs i listen to

winged mantle
#

i remember trying to understand base64

deep mulch
# valid jetty typically when i watch a technical video i already understand some of it

In this video I discuss and make a small quantity of the notorious compound TNT or trinitrotoluene.

PLEASE READ: I do not recommend anyone but trained professionals attempt this process due to several significant hazards associated with the synthesis of this chemical.
I intentionally made a very small amount, but with compounds that can potenti...

▶ Play video
winged mantle
#

still don't understand it

#

people were explaining it at tiktok speed

#

how do people typically deal with utf-16 in c

#

isn't it annoying

#

but on windows isn't it basically the default encoding

deep mulch
#

I thought utf8 was

winged mantle
#

i usually just save everything in utf-8 when i'm developing an applicastion that stores its own files but when it comes to arbritary user files i guess you potentially have to try and guess encoding and/or let the user select it

#

if you're developing a text editor you'll probably consider the fact that not everything is necessarily utf-8 but i can imagine making wrong assumptions with an import feature for some sort of app

deep mulch
#

@winged mantle are you koding

#

@valid jetty I added hardware accel and optimized byte transfer in my ffmpegkt library for like 8x+ performance

valid jetty
deep mulch
#

I can't read elle

valid jetty
#

elle is literally so readable

#

there’s nothing cursed about it anymore

deep mulch
#

nop

#

no explicit return types

valid jetty
#

why is that the reason you can’t read it lmao

crude star
#

elle is as readable as rust

winged mantle
#

just add comments

deep mulch
#

Elle is rust

#

no husk

valid jetty
#

elle is rust except you don’t lose your sanity because it has a gc (before you lose your shit, the allocator is hot swappable!! you could turn it into arenas or normal heap allocation or whatever you like..)

deep mulch
#

elle is just rust without the fancy compiler

#

@rosie.pie

#

profiling is fun

valid jetty
#

@zoot

deep mulch
#

I found my width function was taking like half a second of processing cause it would constantly make a native call

#

rosinga

crude star
#

much simpler

valid jetty
#

that utf8 thing isn’t designed to be used my a normal developer, it’s part of ichigo’s internal libs

#

because it assumes the whole string is a single rune, rather than many

#

and that’s fine for my usecase because the lexer only cares about a single character at a time

#

you can however encode multiple runes into a single string because stuff like identifiers might need that (you accumulate runes and then collect them all into a string)

winged mantle
#

stop calling it a lexer

#

start calling it a grokker

deep mulch
#

fix

valid jetty
deep mulch
#

me

pseudo sierra
#

rosie will make elle stdlib the biggest stdlib for any language

valid jetty
#
x := “minkÿ”;
encoded := Array::from_string(x).to_repr<u8>();
valid jetty
#

it’ll just have the bytes verbatim

crude star
#

because it can use other encodings?

valid jetty
#

but even in other encodings isn’t this just giving you the bytes???

crude star
#

yeah and they're gonna be different

valid jetty
#

i don’t get it why would they be different

#

every encoding is still made up of an internal array of bytes

crude star
#

???

valid jetty
#

you’re just getting that array of bytes

deep mulch
#

???

crude star
#

all encodings are the same thing

#

are you dumb

valid jetty
#

oh you mean that

#

well i think the linker encodes string literals as utf8 sooo

#

elle string literals are passed to the IR verbatim which passes it to assembly verbatim which interprets it as utf8

winged mantle
#

taking an elle

ionic lake
#

elle looks good, just needs a discord bot library to be called a language /j

crude star
#

true

valid jetty
#

there’s lazy iterators and tcp server/clients what more do you need /s

winged mantle
#

is there a discor bot library for objekctive c

crude star
shrewd canopy
crude star
#

u need a million compiler extensions to use it

deep mulch
#

make elle UI framework that's not raylib@valid jetty @valid jetty

winged mantle
#

i wish you could do switch (true) in c

winged mantle
deep mulch
winged mantle
#

i love switch true after programming go

crude star
#
switch (true) {
case false: volatile asm ("hlt");
case true: return true;
}
spark tiger
#

wtf is volatile

ionic lake
#

she is just volatile 💔

winged mantle
#
switch (true) {
case c == 'a':
    // thing a
    break;
case c == 'b':
    // thing b
    break;
default:
    // thing c
    break;
}
#

like an if else but cooler

#

in go it's the behaviour if you do switch without true

crude star
ionic lake
#

bro mine

crude star
#

/run ```java
volatile int foo = 1;

ionic lake
#

craft

rugged berryBOT
#

@crude star I only received java(15.0.2) error output

file0.code.java:2: error: illegal start of expression
volatile int foo = 1;
^
file0.code.java:4: error: class, interface, or enum expected
}}
 ^
2 errors
error: compilation failed
crude star
#

husk

ionic lake
#

now this is real documentation

deep mulch
#

@ionic lake taskieeeee

#

hii

ionic lake
#

hii

#

ok elle discord api lib

#

maybe today

lavish cloud
valid jetty
#

there is like no networking support, you’ll have to use C networking functions

#

there is tcp server and client but that’s about it

ionic lake
#

I love me a challenge

#

its a kink

valid jetty
#

s11n = serialization

crude star
#

we dont need more numeronyms

valid jetty
#

i0 l2e n8s s0o m2h :03

crude star
#
Uncyclopedia

“If y1u a1e t1e f3t p4n w1o c1n g3s t2s e4e m5e c7y, a1d p2t t1e a4r as a c5t in my b2g, I w2l s2d y1u a g3s b2t f2m t1e S4t.”

“It's l2e a g3n-up v5n of l2t-s3k”

In c7g, I18n a1d l10n a1e m3s of a6g c6r s6e f1r n1n-n4e e10s, e8y o3r n5s a1d c6s. I18n is t1e p5s of e6g t2t an a9n is c5e of a6g to l3l r10s, f1r i6e e6g t2t t1e l3l w5g s4...

deep mulch
#

???????

#

@crude star @valid jetty you're crazy

crude star
#

what did i do

deep mulch
#

rinid

#

rinied

valid jetty
deep mulch
#

A FRESLET

crude star
#

this is exactly the same as rust

deep mulch
valid jetty
valid jetty
#

i really really like rust’s tcp socket apis

winged mantle
#

why use ::

#

why not use :

deep mulch
winged mantle
#

why do languages use ::

valid jetty
#

i don’t want my code to look like lua

#

single : looks weird

winged mantle
#

love

deep mulch
#

it has to look like rust

crude star
#

:: so ugly

deep mulch
#

@valid jetty

crude star
#

erlang uses :

#

for modules

valid jetty
#

response

deep mulch
#

remove semicolons when @valid jetty

valid jetty
#

i do wanna rewrite the parser in the distant future

deep mulch
#

rewrite in F#

#

or Perl

crude star
#

io:format

winged mantle
#

sloplang

valid jetty
#

erlang has very esoteric syntax though

crude star
ionic lake
#

shouldve used |

deep mulch
#

Rosie will add vars in strings

#

"${mink}"

crude star
#

elle already has

valid jetty
ionic lake
#

Array|bytes(1024)

crude star
#

oh

valid jetty
#

i have to generate partial strings and interpolate them in the parser

deep mulch
#

o

crude star
#

fn `minkĂż`()

valid jetty
#

you can do that without the backticks

winged mantle
#

add string interpolation

lerp("hello world", "good riddance", 0.5)
valid jetty
#

recent feature

ionic lake
#

add ai to ele

deep mulch
#

can you use emojis in names @valid jetty

#

elle mcp server

valid jetty
winged mantle
#
hallucinate!("hello world")
deep mulch
#

add coroutines to elle

winged mantle
#

wasn't there a rust thing to hallucinate code

#

or was it just pythopn

ionic lake
#

just:

count := ai_function("counter")
count += 1

valid jetty
#

omg i can’t fucking send the tes

#

t

ionic lake
#

yes there is

crude star
#

but can you

winged mantle
valid jetty
#

oh wait

deep mulch
valid jetty
#

vencord bans cyrillic

#

right

winged mantle
#

what if you made a compiled language which resembles javascript as close as possible

ionic lake
#

assemblyscript

winged mantle
#

but introduces more low level features

valid jetty
#

assemblyscript

crude star
#

assemblyscript is that actually

deep mulch
#

or course it's yappanese

#

@valid jetty @valid jetty

winged mantle
#

not l;ike poffor that's no fun

#

with malloc and stuff

valid jetty
winged mantle
#

js with manual memory management

deep mulch
#

@valid jetty but can it do moon runes

valid jetty
#

the comments say “English” “Japanese” “Russian” “Australian” “Emoji”

winged mantle
#

why do no languages have google translate built into the standard library

deep mulch
#

Australian language

valid jetty
#

these comments

winged mantle
#

that would be kind of useful

valid jetty
deep mulch
#

allow me to recite moon runes
ესენი მთვარის რუნებია

valid jetty
#

if that’s considered an alphabetic character by the unicode standard elle will be able to have functions and variables defined using it

deep mulch
#

can you use zero width space @valid jetty

valid jetty
#

probably not unless you wrap it with backticks

#

i don’t think that’s an alphabetic character

#

btw the backticks are ignored in the parser

#

so the symbol in the executable would still be the zero width space

spark tiger
ionic lake
#

does elle have macros

valid jetty
#

no but you have generics for functions and structs

winged mantle
#

C++ to C is as Java is to JavaScript

valid jetty
#

and you have conditional compilation through directives

spark tiger
#

how does .t elle work

#

how are tags so powerful

#

.t view elle

lapis nacelleBOT
#

Please enter a Last.fm username or mention someone to compare yourself to.
Examples:

  • .taste fm-bot
  • .taste @.fmbot
    Please note that the other user must also have an .fmbot account.
valid jetty
#

freslet set a tag called elle which clones elle and builds everything then runs the code you specify

spark tiger
#

icic

deep mulch
#

FRESLET

spark tiger
valid jetty
# valid jetty and you have conditional compilation through directives

this is what i mean btw

!pub fn __internal_get_errno() @cfg(target = "macos") {
    return __error();
}

!pub fn __internal_get_errno() @cfg(target = "linux") {
    return __errno_location();
}

const errno = *__internal_get_errno();
fn os_get_last_error() -> string {
    return strerror(errno);
}
spark tiger
#

.wt

lapis nacelleBOT
#

1.  ⁩jole⁩ - 90 plays
2.  ⁩Adriansandwich⁩ - 87 plays
3.  ⁩z⁩ - 68 plays
4.  ⁩BHSS03NOVAGOONNMNS⁩ - 58 plays
5.  ⁩b6⁩ - 54 plays
6.  ⁩faint⁩ - 48 plays
7.  ⁩nariko⁩ - 47 plays
8.  ⁩bladebladebladee⁩ - 43 plays
9.  ⁩kawairazorblades⁩ - 27 plays
10. ⁩wump600⁩ - 26 plays
11.  ⁩💙1dlings0mewheređŸ’›â© - 26 plays
12.  ⁩Punchhy⁩ - 25 plays
13.  ⁩outer⁩ - 25 plays
14.â€„â€…âŠđŸŸâ© - 25 plays

valid jetty
#

you can conditionally compile every top level construct

crude star
#

tf is !pub

valid jetty
deep mulch
#

first 2 don't have explicit return but last one does

crude star
#

horror

spark tiger
crude star
#

if only there was an antonym for "public"

ionic lake
#

no hitting the pub

spark tiger
#

prv

winged mantle
#

@valid jetty add io::stdout << "hello world";

spark tiger
#

wait why do u even need !pub if u can just not specify it

valid jetty
spark tiger
#

like are they private by default

crude star
valid jetty
spark tiger
#

yeah i sent it before i saw them

valid jetty
#

i made it just ! so you don’t need a seperate antonym keyword for every single modifier you apply

winged mantle
deep mulch
#

private better

crude star
deep mulch
#

@valid jetty make is_even stdlib

valid jetty
crude star
#

no operator overloading is necessary

deep mulch
#

add is_even and is_odd @valid jetty

crude star
#

write assembly-like instructions

valid jetty
#

that being,

Can overload x[y], &x[y], x[y] = z, x == y, *x = y, aswell as hash, tuple, triple, & iter.

probably a few more that i forgot about

deep mulch
#

I wanna call mov like a regular function @valid jetty

#

let me access registers without inline assembly

valid jetty
#

nop

deep mulch
#

so evil

valid jetty
#

i don’t plan to do it either, at least for now

crude star
#

custom operators when

valid jetty
#

the only one i’m considering is cmp which would cover > and <

#

== already also covers != implicitly

valid jetty
#

at some point i might allow infix functions if the parser becomes powerful enough for it

#

right now it’s just not

crude star
#

haskell so good

valid jetty
#

lmao

alpine pecan
#

witch

deep mulch
#

witch

valid jetty
#

the last one is intended to be used by the developer, the first 2 arent

deep mulch
#

shouldn't be allowed

#

fixxx

valid jetty
#

zoot hates fun

#

how’s minklang going

deep mulch
#

I haven't worked on it in months

#

love?

valid jetty
#

hate

deep mulch
#

@valid jetty

valid jetty
# deep mulch <@581573474296791211>
use std/prelude;

struct Square { i32 length }
const Square::draw = fn(Square *self) (0..self.length).for_each_with(fn(_, self) $println("*".repeat(self.length)), self);

struct Triangle { i32 length }
const Triangle::draw = fn(Triangle *self) (1..=self.length).for_each(fn(i) $println("*".repeat(i)));

struct Shape @nofmt {
    void *base,
    fn(void *) draw
}

fn Shape::from<T>(T *shape) {
    return Shape {
        base = shape,
        draw = T::draw
    };
}

fn Shape::draw(Shape self) {
    cb := self.draw;
    cb(self.base);
}

fn main() {
    square := Square { length = 5 };
    triangle := Triangle { length = 4 };
    shapes := [Shape::from(&square), Shape::from(&triangle)];

    for shape in shapes {
        shape.draw();
        $println();
    }
}
crude star
deep mulch
crude star
#

when are they making a language that supports this

valid jetty
#

@deep mulch @deep mulch i wrote a shunting yard for ichigo

fn Parser::parse_expr(Parser *self) {
    res := [Result<AstNode, Token>;]; // using Result as a Sum type
    ops := [Token;];

    for ;; {
        token := self.current_token();

        if token.kind == TokenKind::Operator {
            if ops.is_empty() || ops[0].precedence() < token.precedence() {
                ops.insert(0, token);
            } else {
                while !ops.is_empty()
                    && ops[0].precedence() >= token.precedence() {
                    res.push(Err<AstNode>(ops.remove(0).unwrap()));
                }

                ops.insert(0, token);
            }
        } else {
            res.push(Ok<AstNode, Token>(self.parse_primary()));
        }

        if self.is_eof() || self.next_token().is_some_and(
            fn(x) x.value == TokenValue::String("。")
        ) {
            break;
        }

        self.advance();
    }

    while !ops.is_empty() {
        res.push(Err<AstNode>(ops.remove(0).unwrap()));
    }

    out := [AstNode;];

    while !res.is_empty() {
        val := res.remove(0).unwrap();

        if val.is_ok() {
            out.push(val.unwrap());
        } else {
            rhs := out.pop().expect("é–“é•ăŁăŸćŸŒçœźèš˜æł•");
            lhs := out.pop().expect("é–“é•ăŁăŸćŸŒçœźèš˜æł•");
            op := val.unwrap_err();
            out.push(AstNode::BinOp(lhs, rhs, op));
        }
    }

    return out[0];
}
#

it can parse math now

é–ąæ•°ă€€ăƒ—ăƒȘăƒłăƒˆæ•Žæ•°ïŒˆæ•Žæ•°ă€€xïŒ‰ă€Ž
    プăƒȘăƒłăƒˆïŒˆă€Œ%d\n」、xïŒ‰ă€‚
』

é–ąæ•°ă€€ăƒĄă‚€ăƒłïŒˆïŒ‰ă€Ž
    æ•Žæ•°ă€€x ïŒă€€123ăƒŒ4。
    プăƒȘăƒłăƒˆæ•Žæ•°ïŒˆx3ăƒŒ4・37ïŒ‰ă€‚
』
valid jetty
# deep mulch what does that mean

turn 1 + 2 into 1 2 + and then evaluate it as reverse polish notation to have arithmetic expressions parsed correctly with operator precedence

#

surely you learnt this in your years at uni

deep mulch
#

lol no

#

@valid jetty

valid jetty
#

you won’t find me

deep mulch
deep mulch
valid jetty
#

wrong

valid jetty
deep mulch
deep mulch
#

fn a() {
return b();
}

fn b() {
return c();
}

fn c() {
return d();
}
you have no idea what it returns without looking at the implementation of d

crude star
#

in ocaml you can overload let

deep mulch
#

this is an anti practice I think? idk if that's the right word

crude star
deep mulch
#

@valid jetty

valid jetty
#

this is one of the reasons why i DONT wanna add explicit returns

#

antipattern

#

yes

deep mulch
#

no

royal nymph
valid jetty
#

no

deep mulch
#

im saying allowing implicit returns is bad

#

@valid jetty

valid jetty
#

zoot wants me to add explicit return type annotations to every function even if it can be inferred

#

if you have a bunch of functions that call eachother or are very simple then you end up repeating yourself pointlessly

deep mulch
#

that nest deeper into other functions

spark tiger
#

can you do something like that in rust -> _ though

crude star
#

no

spark tiger
valid jetty
valid jetty
crude star
#

horror

#

haskell and ocaml can infer that

deep mulch
#

Rosie insane

valid jetty
#

well technically i can infer it too

#

i just need to look at all return paths, and find the first one which does not end up calling the current function's name

deep mulch
#

infer that, but make returns explicit

valid jetty
#

i just need to actually implement it

valid jetty
#

its not that simple of a problem because you have to like.. compile the astnode and then check recursively

crude star
#

if u do that mutually recursive functions will explode your type inference

valid jetty
#

but its definitely doable

deep mulch
#

Rosie hates readability

valid jetty
#

this is a funny bug

crude star
#

ocaml can infer mutually recursive functions just fine tho

#

A Hindley–Milner (HM) type system is a classical type system for the lambda calculus with parametric polymorphism. It is also known as Damas–Milner or Damas–Hindley–Milner. It was first described by J. Roger Hindley and later rediscovered by Robin Milner. Luis Damas contributed a close formal analysis and proof of the method in his PhD t...

valid jetty
#

those are also functional languages

#

yeah elle's type system is based on hopes and dreams

#

i didnt apply any type theory

#

the generics system is made from trial and error

crude star
#

boring

#

hindley-milner inference is really simple

#

the problem is functional programmers are worse than mathematicians and write like this

deep mulch
#

scary

valid jetty
#

there are 6 numbers in that entire screenshot

alpine pecan
#

programmers went too far when they started writing enchantment books

crude star
#

what if instead of that curvy x mathematicians wrote đ•©

#

𝕏

deep mulch
#

x11

crude star
valid jetty
#

𝓍

winged mantle
#

𝕏.com

#

it's what's happening

winged mantle
#

idea

#

transpile c to scratch

#

imagine implementing malloc

deep mulch
#

tode insane

winged mantle
#

i really wanna do this now...

#

but i have so many crazy ideas

#

that would unironically be the coolest thing ever though

#

i love doing dumb things with scratch

shrewd canopy
#

I want to make scratch transpiler to c++ now

jade stone
#

How do you represent a pointer

#

Eg: void***

crude star
#

big list is memory

#

pointer is index

deep mulch
#

@crude star

winged mantle
deep mulch
#

transpile scratch to c

winged mantle
#

how can anything be impossible in a turing complete language

deep mulch
#

everything is impossible

#

it's all lies

winged mantle
#

sure it would be hard as hell

#

maybe it wouldn't take that long to make some basic stuff work though?

#

especially considering there are existing libraries to parse c

#

@jade stone I'll tell you how you have pointers though

#

have a big list which is the RAM

#

and the pointer is the index

deep mulch
#

transpile x86_64 assembly to scratch

winged mantle
#

i mean just write an emulator for x86_64 assembly in scratch

#

didn't somebody use a similar approach to get linux working in scratch

jade stone
winged mantle
#

that would be insane

#

emulate a RISC cpu like somebody did

valid jetty
#

you guys know scratch has library bindings right

#

like you can programmically create scratch modules

winged mantle
#

kinda boring

#

much more fun to:

  • transpile something to scratch blocks with the core modules
  • modify the scratch 1.4 smalltalk source code
#

after procrastinating for a billion years

#

pretty cool huh

winged mantle
#

i just realised the fundemental problem of transpiling c

#

well... it would just be super hard to implement linking in a c -> scratch transpiler 😭

crude star
#

just dont

winged mantle
#

how many c implementations exist without linking

crude star
#

linking isnt real

#

just combine everything into one file

#

and call it static linking

winged mantle
#

i guess technically you need linking for anything to work

#

you could just do something like that and call it linking trolley