#🪅-progaming

1 messages · Page 63 of 1

lavish frigate
#

it looks like they tried to format that code into a square

#

what is this

#

who puts line breaks after decimal point

dawn ledge
#

its word wrapping

#

i assume

lavish frigate
#

i hope it is 😭

leaden crater
#

this is how the output looks like

dawn ledge
#

typst variables exist

#

i would love to see you write this in latex and compare the both

dense sand
#

typst seems so cool

dawn ledge
visual shellBOT
# dawn ledge lc.ocr
H_"BS" (z) = ((alpha (1
-
z^(-1))/(1 + z^(-1)))^2 + (0.
3249 alpha)^2) / ((alpha (1 - z^(-1))/(1 + z^(-1)))^2 +
(0.3512 alpha) (alpha (1 - z^(-1))/(1 + z^(-1))) + (0.
3249 alpha)^2)```
dawn ledge
#

you are just using it wrong

#

is this unreadable?

leaden crater
#

no, but what if you have to use a bunch of variables

dawn ledge
#

you dont

dense sand
#

@valid jetty when will elle compile to typst

valid jetty
lavish frigate
#

the most readable code ive ever seen is

#

you instantly know exactly what it does

leaden crater
#
\text{Degerler yerlestirilir} \\
H_{BS}(s) = \frac{s^2 + \Omega_p^2}{s^2 + \frac{\Omega_p}{Q}s + \Omega_p^2} \\
          = \frac{s^2 + (0.3249\alpha^2)}{s^2 + (0.3512\alpha)s + (0.3249\alpha)^2} \\

\text{Bilineer donusum uygulanir} \quad
(s = \alpha \frac{1 - z^{-1}}{1 + z^{-1}}) \\
H_{BS}(s) = \frac{\left(\alpha \frac{1 - z^{-1}}{1 + z^{-1}}\right)^2 + (0.3249\alpha)^2}
                 {\left(\alpha \frac{1 - z^{-1}}{1 + z^{-1}}\right)^2 + (0.3512\alpha) \left(\alpha \frac{1 - z^{-1}}{1 + z^{-1}}\right) + (0.3249\alpha)^2}
valid jetty
#

again, the issue is just code formatting

leaden crater
#

maybe

valid jetty
#

typst can look good if you format it properly

#

just like latex can look horrible if you dont format it properly

leaden crater
#

1 line latex

#

actually let me make it a 1 liner

hoary sluice
#

meanwhile the latex equivalent:

\begin{align*}
H_{\text{BS}}(s) &= \frac{s^2 + \Omega_p^2}{s^2 + \frac{\Omega_p}{Q}s + \Omega_p^2} \\
                 &= \frac{s^2 + (0.3249 \alpha)^2}{s^2 + (0.3512 \alpha)s + (0.3249 \alpha)^2}
\end{align*}

Bilineer dönüşüm uygulanır \quad $\left(s = \alpha \frac{1 - z^{-1}}{1 + z^{-1}}\right)$

\begin{align*}
H_{\text{BS}}(z) = \frac{(\alpha \frac{1 - z^{-1}}{1 + z^{-1}})^2 + (0.3249 \alpha)^2}
{(\alpha \frac{1 - z^{-1}}{1 + z^{-1}})^2 + (0.3512 \alpha)(\alpha \frac{1 - z^{-1}}{1 + z^{-1}}) + (0.3249 \alpha)^2}
\end{align*}
#

(not more readable) (harder to write)

leaden crater
#

how did you make it have colors

hoary sluice
leaden crater
#

doesnt work

hoary sluice
#

oh you posted it already

valid jetty
#

its colored for me

hoary sluice
leaden crater
valid jetty
#

shikicodeblocks <3<3<3<3

hoary sluice
# leaden crater

i could maybe get behind how the code for this is more readable but its easier to write this in typst than in latex and theyre both very hard to read (you would just read the output not the code tho)

leaden crater
hoary sluice
valid jetty
#

shikicodeblocks

leaden crater
#

oh

#

i forgot i have it (idk what it does)

valid jetty
#

vplug shikicodeblocks

#

vp shiki

elder yarrowBOT
hoary sluice
#

z^-1 sounds very digital filter to me

valid jetty
#

is z^-1 the complex conjugate of z

hoary sluice
#

z^-1 is a 1 unit delay

valid jetty
#

hm

hoary sluice
leaden crater
#
\text{Degerler yerlestirilir}\\H_{BS}(s)=\frac{s^2+\Omega_p^2}{s^2+\frac{\Omega_p}{Q}s+\Omega_p^2}\\=\frac{s^2+(0.3249\alpha^2)}{s^2+(0.3512\alpha)s+(0.3249\alpha)^2}\\\text{Bilineer donusum uygulanir}\quad(s=\alpha\frac{1-z^{-1}}{1+z^{-1}})\\H_{BS}(s)=\frac{\left(\alpha\frac{1-z^{-1}}{1+z^{-1}}\right)^2+(0.3249\alpha)^2}{\left(\alpha\frac{1-z^{-1}}{1+z^{-1}}\right)^2+(0.3512\alpha)\left(\alpha\frac{1-z^{-1}}{1+z^{-1}}\right)+(0.3249\alpha)^2}

1 line version @valid jetty

dawn ledge
deep mulch
#

@valid jetty youre so smart

hoary sluice
leaden crater
deep mulch
valid jetty
#

syntax highlightig with custom themes

#

more languages supported

#

etc

valid jetty
deep mulch
#

@valid jetty will use english only

hoary sluice
dawn ledge
#

not having i18n is bad if youre working on docs that many people are gonna read

leaden crater
valid jetty
#

idk check logs

#

i didnt make the plugin lol

dawn ledge
hoary sluice
leaden crater
#

it highlights in msg but not after send

hoary sluice
#

stylus style doesnt load

valid jetty
#

its documented tho @hoary sluice

leaden crater
valid jetty
#

violentmonkey? surely

hoary sluice
#

yes

#

tampermonkey

leaden crater
#

you could turn \infty lines of latex into 1

valid jetty
#

surely there is a catpuccin for vencord on the official org

hoary sluice
#

theres only betterdiscord which doesnt work cause of some cors synonym thing and the stylus one doesnt load for me

valid jetty
#

oh yeah youre right hm

#

thats weird

hoary sluice
#

arent you using catppuccin

valid jetty
#

no im using stock with visual refresh and darker theme

#

like the stock darker theme

hoary sluice
#

giant skull emoji

valid jetty
#

slightly smaller but still giant skull emoji

#

@hoary sluice you can now defer entire blocks (this isnt a feature this is a parsing bug)

hoary sluice
#

ok now my vencord web just doesnt work at all

valid jetty
#

runs the code specified whenever the current scope will exit

#

sort of like a destructor

hoary sluice
#

scope destructors exist??

#

thats so cool

valid jetty
#
fn main() {
    #set_allocator(HeapAllocator::new());

    foo := #alloc(foo);
    defer foo.free();

    if bar.baz == 39 {
        return foo[39]; // will call .free() here
    } else if bar.bal == 42 {
        return foo[1337]; // will call .free() here
    }
  
    return nil; // will call .free() here
}
``` the compiler will call `foo.free()` at every return stmt
deep mulch
#

@valid jetty can you do if statements as an expression

#

like let guh = if bar.baz == 39 { 3 } else { 5 }

valid jetty
#

or alternatively

fn main() {
    while true {
        bar := make_bar();
        defer bar.free();

        if bar.x == 3 {
            break; // will call .free() here
        }

        // will call .free() here
    }
}
valid jetty
#

just standard ternaries

deep mulch
#

yes but longer if statements

#

if statement with multiple lines

valid jetty
#

yeah not a thing atm

deep mulch
#

do

#

same for when statement

valid jetty
#

when statement is so cursed

deep mulch
#

how

valid jetty
#

like its just compiler mandated signals

valid jetty
#

but before parsing stuff that had semicolons inside was kinda broken :3

#

because i did an oopsie in the parser (as per usual)

#

so you couldnt do defer $print([i32;]); or defer { $println("hi"); }; because it didnt take into account nesting of the bracket tokens lol

#

anyway now you can group together defers

#
fn main() {
    foo := make_foo();
    defer {
        foo.bar();
        foo.baz();
        // ... can run arbitrary code here its just a standalone block (which means technically you can put more defers in this which is funny :3)
    };

    if bar.baz == 39 {
        return foo[39]; // will call defer here
    } else if bar.bal == 42 {
        return foo[1337]; // will call defer here
    }
  
    return nil; // will call defer here
}
#

yeah it works 😭

#

oh

#

would help if i ran it

dawn ledge
#

defer in defer is cursed

valid jetty
#

it absolutely is very cursd but the compiler just allows it because of how defers in non-top level contexts behave

#

this actually is a regression

#

one of these will print hi the other wont

#

but who is writing code like this

dawn ledge
#

the second one wont

#

i love onion layering

valid jetty
#

the second one actually does

dawn ledge
#

do you not defer in reverse????

valid jetty
#

nop :3

dawn ledge
#

thats bad

valid jetty
#

probably a good idea to

#

yeah

valid jetty
# valid jetty

to fix it i have to basically recursively apply the defers until no extra things are added anywhere, shouldnt be that bad to fix this

#

but i probably wont do it today because defer code is so.....]

dawn ledge
#
let foo = alloc_something();
defer foo.free();

let resource = create_resource();
defer resource.free_for(foo);

this would UB if defer is not in reverse

valid jetty
#

good point

#

yeah

#

actually its 10pm

#

i might aswell do it

#

i have at least 6 hours left of the day realistically

dawn ledge
valid jetty
#

ok interesting go defer only allows expressions, not statements

dawn ledge
#

why are statements not included in expr

valid jetty
#

isnt it usually the other way around

#

exprs are subsets of stmts

#

every expression is a statement but not every statement is an expression

#

this is valid code in elle

#

(for some reason)

dawn ledge
#

ive seen
Expr -> StatementExpression
Stmt -> ExpressionStatement

cyclic

fleet cedar
#

Expression-oriented syntaxes are so based

dawn ledge
#

i like them

valid jetty
#

why is this so funny to me

royal nymph
#

because if you need complex stuff you can just use a function

valid jetty
#

this is the return cutoff saving my ass

#

all instructions after a return are cut off because the IR doesnt like it

#

and its fine because they shouldnt really be there anyway

royal nymph
#

I think the biggest annoyance of go defer is that error handling sucks with them

#

if u wanna handle error of some expression you defer, you always need an anonymous function

dawn ledge
#

zig defer!

valid jetty
#

solution: never defer

#

go back to C

valid jetty
dawn ledge
#

defer macros in c:

valid jetty
#

true

royal nymph
#

but can definitely be abused lmao

deep mulch
#
defer alloc_something();

blobcatcozy

#
while true {
  defer alloc_something();
}
valid jetty
#

@dawn ledge i think i solved the problem

#

make it a feature ™️

dawn ledge
#

wires

valid jetty
#

tbh the problem is kinda annoying to solve

#

its not as easy as i first imagined

#

i do this to ensure any level of nesting will still insert the right defer statements

#

i need to check if one of the elements in deferred is a returning-like statement, which means its either directly a return statement or its a block which has a return statement inside it

#

then i need to place all other deferred statements except that one above it

#

or alternatively i could just add deferred statements and rerun from the top until no statements are added, but that means i have to tag the return statements with whether they have already had deferred elements applied to them or not

#

and even then defer which returns inside of defer will cause an issue because the return statement is already tagged but there is another which hasnt been discovered yet until now

#

its a mess and i dont really wanna deal with it

#

either of those approaches will cause issues when there is a case like

fn main() {
    defer {
        defer return 1;
    }
}
#

so i think i wont go into that rabbit hole today

valid jetty
#

it willl run at the end of every iteration of the loop

#

and will also run before any break

deep mulch
#

insane

valid jetty
#

you dont need defer to make a program that just allocates infinitely

deep mulch
#

i know

#

i just dont really see defer as being very useful

valid jetty
# deep mulch i just dont really see defer as being very useful
fn main() {
    rl::init_window(SCREEN_WIDTH, SCREEN_HEIGHT, "Mandelbrot Set");
    defer rl::close_window();

    target := rl::load_render_texture(textureWidth, textureHeight);
    defer rl::unload_render_texture(target);

    rl::set_texture_filter(target.texture, TEXTURE_FILTER_BILINEAR);
    rl::set_target_fps(60);

    while !rl::window_should_close() {
        ...

        {
            rl::begin_texture_mode(target);
            defer rl::end_texture_mode();

            rl::clear_background(BLACK);

            ...
        }

        {
            rl::begin_drawing();
            defer rl::end_drawing();

            rl::clear_background(BLACK);

            ...
        }
    }
}
#

automatically will call unload_render_texture and close_window when the main function exits

#

automaticall will call end_texture_mode and end_drawing when the blocks go out of scope

#

its useful

#

it doesnt look useful for tiny examples like this but for big code its very helpful to be able to group together load and unload

deep mulch
#

guh?

#

i prefer just

let guh = allocSomething()
guh.doSomething()
guh.close()
#

or a guh.use {
doSomething()
}

valid jetty
valid jetty
deep mulch
#

youre gonna explode

valid jetty
#

theres a reason that go and zig have defer i guess

deep mulch
#

@valid jetty defer explosion

winged mantle
#

is camelcase cursed for toml

#

idk whether i should rename the toml schemas too

dawn ledge
#

toml conventionally has snake case

valid jetty
#

"rendering a triangle in vulkan is hard enough that i may not have enough content for only 1 stream, but maybe 2" - tsoding 2021

ornate quiver
#

does defer work even with goto

#

idk how that's supposed to work

valid jetty
#

which lang are you referring to

#

zig?

dawn ledge
#

zig has goto?

valid jetty
#

idk it seems the most likely to have it out of elle, zig, go

ornate quiver
dawn ledge
#

yeah no

valid jetty
#

@dawn ledge TIL go's defer is actually ultra cursed

dawn ledge
#

this is why i dont use go

valid jetty
#

the defer isnt block scoped like you would expect

dawn ledge
#

utlra trash tier

#

its like js of systems programming

valid jetty
#

if you do this

func work(wg *sync.WaitGroup, m *sync.Mutex) {
    defer wg.Done()    
    for i := 0; i < 42; i++ {
        m.Lock()
        defer m.Unlock()
        x = x + 1
    }
}
``` the m.Unlock() is actually bound to the exiting of `work` not the exiting of the `for` loop
#

😭

#

you have to do this to get the behavior you expect

func work(wg *sync.WaitGroup, m *sync.Mutex) {
    defer wg.Done()    
    for i := 0; i < 42; i++ {
        func() {
            m.Lock()
            defer m.Unlock()
            x = x + 1
        }()
    }
}
dawn ledge
#

ew

deep mulch
#

that's so bad

#

hate

valid jetty
#

ok yeah this is a thing i need to fix in elle

#

i remember this issue from a whileeeee back

dawn ledge
#

using phrases like "bro definitely cooked. peak." and "what was bro cooking??" in the context of a technical specification is insane

#

aside from that how does this work in cases where

if cond {
  return;
}

let foo = alloc(...);
defer dealloc(foo);

...

return;
#

i dont really like the idea of a defer i wrote later lexically be executed in contexts before it

valid jetty
#

that is another thing i have to fix, and im pretty sure this TS addresses that

#

the "2 times" they say are NOT the error and the alloc theyre before the alloc and after the alloc

jade stone
#

what does it retunrt

valid jetty
#

there is an implication that the defer does not run on the err return

valid jetty
#

honestly i was kinda surprised this compiles

jade stone
#

shouldnt it be a compile time error then

valid jetty
#

yeah probably

#

i think i might know why it compiles

dawn ledge
#

should have cropped it better !

#

;-;

valid jetty
#
use crate::{
    compiler::{
        compiler::{Codegen, CodegenContext, Compiler},
        qbe::{instruction::Instruction, r#type::Type, value::Value},
    },
    parser::enums::Return,
};

impl Codegen<'_> for Return {
    fn compile(self, gen: &mut Compiler, ctx: &CodegenContext<'_>) -> Option<(Type, Value)> {
        let res = self.value.compile(
            gen,
            &CodegenContext {
                is_return: true,
                ..ctx.clone()
            },
        );

        ctx.func.borrow_mut().add_instruction(Instruction::Return(
            res.map(|(ty, val)| (ty, val, self.location)),
        ));

        None
    }
}
``` the return stmt codegen returns None (it would return Some(ty, val) if it were an expr)
dawn ledge
valid jetty
#

and i think variable declaration counts None as "undeclared variable"

deep mulch
#

@valid jetty hii

valid jetty
#

not im not entirely sure how the compiler determines a type for the variable because i didnt explicitly state it (i used :=)

#

OH i see

#

declare.rs does this

if let Some((ret_ty, value)) = parsed {
    
    ...
    return Some((final_ty, final_val));
}

None
deep mulch
#

scary

valid jetty
#

because the return stmt returns None the declare stmt will just not gen anything and also return None

#

lmfao

#

thats not good let me fix that

dawn ledge
#

how does defer look in asm
i was imagining something like

some_func:
  ; ... do stuff
  call .defer_some_func_2_or_some_naming
  call .defer_some_func_1_or_some_naming
  ret ; every ret statement or block end preceeded with call to func that contains instructions for the defer defined


defer_some_func_1_or_some_naming:
  ; defer instructions
  ret

defer_some_func_2_or_some_naming:
  ; defer instructions
  ret
#

hmmm im stuck between interface or trait

valid jetty
dawn ledge
#

interface feels too long
but trait at the same time feels like a balant rust ripoff (almost as if the rest of the grammar isnt)

deep mulch
#

interface

spark tiger
#

man im just tryna build a cpp app why do i need to fucking create an account

formal belfry
#

lmao

#

windows moment

#

man that is truly a disgusting website

#

like why am i stuck here for a solid 3 seconds going from 1-3

jade sandal
lucid trail
#

top 2 most annoying things in writing the grammar was generics with < and * with pointers and binary expression

lucid trail
#

btw your compiler hangs with fn main() with no body or any other function without a body

dense sand
#

my godness typst is godlike thing

winged mantle
shrewd canopy
formal belfry
#

yes

hoary sluice
#

you literally just install qt creator

#

and run it

valid jetty
valid jetty
nimble bone
valid jetty
#

HELP

dawn ledge
#

elle early adopters

hoary sluice
nimble bone
#

hop on OpenSuse Tumbleweed

hoary sluice
#

do that

nimble bone
#

including fathub

hoary sluice
#

what does jn mean

dense sand
#

is there any way to actually make this open the fix? or atleast disable the fucking warnign

#

in neovim

dawn ledge
#

there is

#

hold up

dense sand
#

like i use errno, but it for some reason says i dont use it

nimble bone
#

im stupid

dawn ledge
#

vim.lsp.buf.code_action()

hoary sluice
#

using it?

formal belfry
#

fix available

dense sand
hoary sluice
#

oh

dense sand
#

but i use the errno in the file

#

which is weird

#

atleast somehow suppress the warning

hoary sluice
dawn ledge
hoary sluice
dense sand
#

@hoary sluice would it be possible to bind double shift press to something? i searched for this for a long time but people said its not possible

formal belfry
#

ligature

hoary sluice
#

idk

dense sand
formal belfry
#

me when iosevka

dawn ledge
#

you cannot map modifiers alone

hoary sluice
dawn ledge
#

thats the entire point of a modifier

dense sand
#

i just wanted intellij like binds :(

hoary sluice
#

you can bind double shift to some random key like F13 on your os and then bind it in nvim

dawn ledge
#

or just use <leader>SomeRandomKey

hoary sluice
#

yea shift is meh

valid jetty
dawn ledge
#

lol

#

i've seen a few nim users

valid jetty
hoary sluice
#

also so i can steal it

#

and make elle.nvim

lucid trail
#

but go ahead

hoary sluice
#

ah ok

lucid trail
dense sand
#

i fucked up with cli parser for so long i bet theres like 100 bugs in this but its done 😭

hoary sluice
dense sand
hoary sluice
#

like 400kB i think

dense sand
#

If i make good enough gc it could do some light java

valid jetty
dense sand
#

Obviously no jdk

hoary sluice
#

520kB builtin you can extend up to 8MB

dense sand
#

What os does esp run

#

Is it like some very lw linux

valid jetty
hoary sluice
fleet cedar
#

What does can't be used when declaring variables mean

valid jetty
#

foo <op>= bar

hoary sluice
valid jetty
#

you can do foo &= bar but not foo ..= bar for example (that’s actually gonna create a range instead of declare a variable)

hoary sluice
#

it also runs micropython

valid jetty
hoary sluice
#

you can probably get java to work on it but its gonna be a lot of effort

fleet cedar
#

Not a declaration though

valid jetty
#

when “assigning” to variables

#

english is definitely a language

fleet cedar
#

They're usually called compound assignments I think?

valid jetty
#

oh there’s a term for it???

#

ok great i’ll use that

lucid trail
#

including %= in highlights.scm breaks it for some reason

#

got no idea why

valid jetty
#

lmfao

lucid trail
#

might be the grammar actually

#

oh i see

valid jetty
#

lmao

lucid trail
#

ok actually done

#

you should ban lowercase structs btw

valid jetty
#

idk if it’s a good idea but maybe it would be better to move the grammar to the elle repo itself??? i make changes quite often and i don’t wanna bother you with pr spam lol, the license allows for it but i wanna get your explicit permission too because you wrote it

valid jetty
#

with a struct

lucid trail
#

oh that makes sense

lucid trail
valid jetty
#

would’ve been better if there was an elle org

#

yeah exactly

#

ok tyy

#

i’ll consider an org soon probably because the things like the repl, codegen proc macro, stdlib etc should probably be in seperate repos anyway

lucid trail
#

yeah

#

tests are probably good but I've just been running tree-sitter generate && tree-sitter parse ~/.local/include/elle/**.le | grep ERROR

dawn ledge
lucid trail
#

i agree with that, to be clear

valid jetty
#

doesn’t rust throw a warning when you don’t do snake case

fleet cedar
#

Works well in haskell

#

But can't deny that it's stupid

fleet cedar
dawn ledge
#

its not a ban

#

just a lint

fleet cedar
#

/run ```rs
struct foo_bar {}

rugged berryBOT
#

@fleet cedar I received rs(1.68.2) compile errors

warning: type `​foo_bar`​ should have an upper camel case name
 --> file0.code:2:8
  |
2 | struct foo_bar {}
  |        ^^^^^^^ help: convert the identifier to upper camel case: `​FooBar`​
  |
  = note: `​#[warn(non_camel_case_types)]`​ on by default

warning: struct `​foo_bar`​ is never constructed
 --> file0.code:2:8
  |
2 | struct foo_bar {}
  |        ^^^^^^^
  |
  = note: `​#[warn(dead_code)]`​ on by default

warning: 2 warnings emitted

dawn ledge
#

yeah it compiles

valid jetty
#

ya i’ll run some tests on it probably

#

there’s a few special cases i wanna test with attributes

lucid trail
#

I don't remember why is put dollar signs here

valid jetty
#

hm?

fleet cedar
#

Linux is free

valid jetty
spark tiger
valid jetty
#

i didn’t wanna add (x, y) as syntax in the parser when i first wrote tuples because it interferes with casting syntax which also uses (T, U) to represent a tuple’s type

#

so $ is actually just a function

#

when you do $(x, y) you’re calling the $ function which calls the Tuple::new function internally

#
fn Tuple::new<T, U>(T x, U y) {
    let tuple = #alloc(Tuple<T, U>);

    tuple.x = x;
    tuple.y = y;

    return tuple;
}

external fn Tuple::new<T, U>(T x, U y) @alias($) -> (T, U);
lucid trail
#

oh i put it there because it's a valid arg for alias

valid jetty
#

ah

#

OH i see what you meant

#

uhh i wouldn’t exactly write it like that

#

$ is an allowed character in identifiers

#

you can have a function called $foo

lucid trail
#

oh that's news to me

valid jetty
#

most of the stdlib is aliased under $ to prevent namespacing bloat

#

i define the same function twice because the first time it’s defined as it’s original name, the second time it’s defined under its aliased name

valid jetty
#

i got to use one of those for work experience once and i got to take it home so now i just have an esp32

#

i wrote that project before knowing what a .env file is apparently lmao

#

loveeee

supple whale
#

"how point perfect do you want ur svg?" yes.

valid jetty
#

@hoary sluice what bindings of tree sitter do you need for nvim

lucid trail
#

i removed tuples, triples, and sigils as specific nodes

#

just highlighting identifiers based on regex now

#

they are all call_expressions

valid jetty
#

theres this in the docs but i dont think its comprehensive enough

#

$x, while is considered a sigil semantically, is just a $ in the identifier

lucid trail
#

ah that makes sense

#

I still have #something as special tokens

valid jetty
#

yeah thats fine

#

i might try to rewrite this grammar quickly to make sure it covers all cases that are in the parser because at a glance its missing a few things that i probably wasnt entirely clear on lol

lucid trail
valid jetty
#

well not rewrite

#

but lol

blazing haven
#

xd

dense sand
#

can anyone tell me what ansi color is this? i need this for a sequence

supple whale
#

rate my dogass logo

#

like go in hard

#

american roast style

hoary sluice
#

im using nvim-lspconfig

#

which i think everyone else also uses

valid jetty
#

nvm

valid jetty
hoary sluice
#

@valid jetty use kvantum they said

#

easy qt theme configuration they said

supple whale
#

XD

spark tiger
hoary sluice
spark tiger
hazy pine
#

as a linux user, linux lowk sucks

formal belfry
#

biggest skill issue

hoary sluice
hoary sluice
spark tiger
hoary sluice
leaden crater
dawn ledge
shrewd canopy
#

I tried yesterday fedora again, i rate it as 0/10

hoary sluice
#

its good even if you play games

#

games work perfectly fine

formal belfry
#

fax

spark tiger
hoary sluice
hazy pine
dawn ledge
spark tiger
#

also recently i booted into an ubuntu usb and my wifi just didn’t work for whatever reason

hoary sluice
hoary sluice
dawn ledge
#

you almost always end up with library missmatch errors on arch
canonical event

formal belfry
#

ur first mistake was using ubuntu

fleet cedar
hoary sluice
#

it happens and you can easily fix it

#

gets mundane tho

dawn ledge
hoary sluice
#

nixos better

dawn ledge
hazy pine
#

its happened like 3 times ever for me

hoary sluice
#

if you Syyu and dont cut power ur fine

spark tiger
dawn ledge
#

and yeah nixos solves a lot of versioning issues (while introducing other issues)

dawn ledge
hazy pine
hoary sluice
formal belfry
#

then y are you complaining about it

hoary sluice
fleet cedar
#

Yeah nix's versioning is superb, problem is everything else

formal belfry
#

you are expected to fix ur system if u break it

hazy pine
hoary sluice
spark tiger
hoary sluice
#

Syy updates mirrors Syu updates system

hoary sluice
leaden crater
spark tiger
formal belfry
spark tiger
#

i tried billion solutions

#

none worked

#

so i just gave up

dawn ledge
#

nix is by no means barebonesa
its byfas the most bloated one i've used (still gonna use it)

hoary sluice
#

idk ive never heard anyone have issues with pipewire on mint

dawn ledge
#

duh

lavish frigate
#

i fixed my switch today, got into hekate, looked through the settings and what i saw made me sick to my stomache... i found "nyx", i instantly filled with rage, how can this be? nixos on MY nintendo system=??? i filled with rage. the only way to prevent the spread of nix was to destroy my very nintendo device. I grabbed it and threw it out of the window.

dawn ledge
#

are you just arguing for the sake of it

formal belfry
hoary sluice
#

just because it doesnt delete old system versions doesnt mean its bloated

dawn ledge
#

fuck off

formal belfry
#
  • it rarely happens unless ur a nub
hoary sluice
fleet cedar
#

Nix is the only distro I know with a gc

dawn ledge
hoary sluice
hoary sluice
dawn ledge
dawn ledge
hoary sluice
#

how is nix bloated

#

its more bloated than lfs (oh no)

dawn ledge
#

not the nixos claim

hoary sluice
#

ok i still want an explanation

#

how is nixos bloated

#

is it just because it doesnt delete old versions

dawn ledge
#

no

hoary sluice
#

then why

dawn ledge
#

its because there's a ton of duplication in the store (even after cleanup)

hoary sluice
#

yea it sandboxes programs

#

thats not bloat

#

thats the whole point of the distro

#

bloat means stuff that comes preinstalled that you dont need

formal belfry
fleet cedar
#

One small issue I have with nix is that you can't replace libraries without recompiling everything from scratch

#

Things like gtk patches

hoary sluice
#

but so does rust and i still use and love both

dawn ledge
#

for some reason nixos makes me recompile hyprland portal every rebuild

#

and grub

fleet cedar
#

If you overlay gtk it'll compile firefox from source

dawn ledge
#

😭

#

its got its fine share of issues

hoary sluice
hoary sluice
#

there is no better operating system

dawn ledge
#

some would disagreee

hoary sluice
#

name one

dawn ledge
#

nina

hoary sluice
#

what

fleet cedar
#

"It's perfect" and "there's no better" are two very different claims

dawn ledge
lavish frigate
#

I asked my friend (nixos user) to help me test out a vencord plugin and they replied back saying they can’t so

shrewd canopy
dawn ledge
#

vencord on nixpkgs is hollow

#

although you cant really do any better for an immutable fs

#

unless you move discord itself out of the store

#

impure nix packages when

#

hmmm

#

nevermind its possible to load vencord from somewhere like ~/local while also keeping discord in the store

hoary sluice
lavish frigate
#

good

hoary sluice
dawn ledge
#

i never said it doesnt

#

its just frozen

nimble bone
#

you should use the vesktop flatpak on NixOs

dawn ledge
#

abolish flatpaks

#

i dont want sandboxing

nimble bone
#

nop

#

flstpaks so good

#

i can run random apps without trusting them

#

i should write an anti nix license

lavish frigate
#

nixos + flatpak double sandboxing

#

sandbox my sandbox

hoary sluice
#

wdym

nimble bone
#

NixOs doesn't sandbox

hoary sluice
#

i just installed a plugin and it works perfectly fine

lavish frigate
#

ill add sandboxing to nixos

nimble bone
hoary sluice
meager turret
#

i dont think thats the case, at least not on vesktop

nimble bone
hoary sluice
#

i have 0 issues with vesktop

pearl stagBOT
nimble bone
#

i thought you used the vencord overlay or whayever they call it

hoary sluice
#

why would i

hoary sluice
dawn ledge
#

the versions are managed by whoever manages the nixpkg

hoary sluice
dawn ledge
#

no

#

that would have issues with content hash

hoary sluice
dawn ledge
#

regular vencord installer can autoupdate

#

you cant with this

hoary sluice
nimble bone
#

eh vesktop updates once a decade so using nix for vesktop is okay

hoary sluice
#

these are non issues

meager turret
dawn ledge
#

i linked vencord nina

#

ong i fucking hate this server

nimble bone
#

yeah ik

hoary sluice
#

based

dawn ledge
#

newsflash nian that what nixos users love to do

hoary sluice
#

might use

dawn ledge
#

this is the part i dislike about nix

meager turret
nimble bone
#

I started this project after having to reinstall my NixOS system several times, resulting in manually enabling and configuring the ~100 Vencord plugins more than 4 times. With Nixcord you can configure once and save it to a git repo.

has never heard of vencloud

dense sand
#

finally got to the part where i implement the interpreter blobcatcozy

hoary sluice
nimble bone
# lavish frigate illness

we should ask elon to ship nixos users to some planet so they stop polluting our lives (except for eageler)

lavish frigate
#

(including @meager turret)

dawn ledge
#

hopping off of nixos

meager turret
#

discord users when confrontend with people of differing opinions on the internet

nimble bone
#

NixOs concept is nice just poorly executed

hoary sluice
#

if elon endorses nixos i will switch to gentoo

nimble bone
#

also useless on servers since docker compose exists

dawn ledge
#

ninachat concept is bad and poorly executed

#

||/j||

nimble bone
hoary sluice
hoary sluice
dawn ledge
nimble bone
#

using NixOs is committing to the declarative lifestyle but also to a life full of suffering while diagnosing issues caused by that lifestyle

meager turret
nimble bone
#

wait did someone make declarative docker containers

hoary sluice
hoary sluice
dawn ledge
hoary sluice
nimble bone
#

NixOs is perfect if you unironically use bare metal services

nimble bone
winged mantle
#

nin0 shilling nix

#

i thought the day would never come

dawn ledge
#

time to make my own distro
LFS TIMEEEEEEE

nimble bone
dawn ledge
#

nina endorses k8s

winged mantle
#

my server config
literally just debian with a systemd service which seems to keep randomly crashing

hoary sluice
#

me when i write one configuration file and deploy it on all my servers and it works (too complicated,) (effort) (shouldve used docker, kubernetes, proxmox, aws, ansible, and openshift)

winged mantle
lavish frigate
#

they are trying to poison you

nimble bone
lavish frigate
#

dont listen to them...

hoary sluice
#

chloe is paid by the debian organization

winged mantle
#

vwhybanne 402104961812660226

elder yarrowBOT
lavish frigate
dawn ledge
#

the more i use webstorm the more i feel like my jetbrains hate is warranted

lavish frigate
#

im paid by microsoft

nimble bone
hoary sluice
dawn ledge
#

@dusty moth

lavish frigate
#

@dusty moth

nimble bone
dawn ledge
#

lol

dawn ledge
nimble bone
#

Name two contradicting things:

  • NixOs
  • no issues
blazing haven
#

i remember nathan

#

he was perma yapping abt nix xd

nimble bone
# lavish frigate

vesktop needs a license Anti Nix and something to disable itself on NixOs

hoary sluice
nimble bone
#

how

dawn ledge
hoary sluice
#

i will just ignore the license

nimble bone
hoary sluice
#

you wont know im using vencord

dawn ledge
#

all licenses are worthless when you dont speak of them

hoary sluice
#

when the cops come i will delete it

#

when the cops come i will install windows 7 and say whats vencord

dawn ledge
#

you cant tell if someone is pirating until they admit to it or you physically witness it
until then said person is not guilty

fleet cedar
#

If a cop is asking if you saw someone pirating, then no you didn't

lavish frigate
#

if a cop is asking you anything shut the fuck up

#

no exceptions

#

life advice from me

hoary sluice
dawn ledge
lavish frigate
hoary sluice
#

@valid jetty what font do i use on my system for not code

blazing haven
#

what abt ur vencord family

hoary sluice
#

maple mono everywhere looks old

hoary sluice
#

meh

rare pendant
#

Has anyone tried to make a plugin that enhances forum channels in any way?

lavish frigate
#

"enhances"? in what way

lucid trail
rare pendant
lavish frigate
hoary sluice
#

where do i install san francisco font on nixos

lavish frigate
#

same with your other idea

#

search goes through discord api

#

if the discord api doesnt have that option youd have to make your own search algo

#

having to make your own can very much count as api abuse

lucid trail
rare pendant
#

Perhaps I or someone would have to contact discord to add such possibilities or API calls to their existing API. Thank you for your respose!

lucid trail
hoary sluice
#

oh yea inter exists

dawn ledge
hoary sluice
#

im using inter

valid jetty
#

i never thought to use sf on my linux machine i should do that

#

sf pro looks so good

spark tiger
spark tiger
#

i wanted to install sf mono or whatever it’s called but got faced with a dmg file and thought oh okay nevermind

valid jetty
#

half of apple’s formats are renamed zips

spark tiger
#

okay but wtf do i do with this

#

like this aint no ttf or something

valid jetty
#

.pkg i believe is also a zip

#

lol

spark tiger
#

yeah but no font file there either

valid jetty
#

what’s in it

spark tiger
mossy ether
#

payload is also a zip I believe

dawn ledge
#

there are definitely otfs in there

mossy ether
#

yep it is

dawn ledge
spark tiger
# mossy ether yep it is

oh. i tried double clicking it inside 7zip to open as an archive but it didn’t work so assumed it’s not

dawn ledge
#

i like this font

#

if not for the license i would use it

spark tiger
#

do they even care

dawn ledge
#

they dont but i generally dislike doing that

#

i would pirate stuff and all but i dont like using it outside of my local setup
i.e on my website or something

spark tiger
#

oh i thought by "use it" you meant using it for like a code editor or something

#

i cant imagine paying that fucking much for a FONT

dawn ledge
#

departure mono on top!

#

but yeah fonts are hella overpriced

spark tiger
hoary sluice
dawn ledge
#

a) not the entire font, b) image -> portracer -> vector -> font will be crappy

spark tiger
#

gaming

dawn ledge
#

nvm their stupid ass gave a pdf

dawn ledge
spark tiger
#

i need some good font

mossy ether
#

i will shill monaspace

hoary sluice
dawn ledge
#

i really love these unicode box drawing tuis but for the life of me i cant make one look pretty myself

spark tiger
#

ok i guess i better not show the name of the group or whatever it is

hoary sluice
#

finance in a tui blobcatcozy

spark tiger
valid jetty
#

I WANNA LEARN THIS IS SO COOL

dawn ledge
#

not trying to demean their beatboxing skills

#

but there is definitely processing involved

pulsar elk
#

but i simply cant

dawn ledge
#

🤝

pulsar elk
#

i need someone to teach me to make those kinds of tuis

dawn ledge
#

TRUE

pulsar elk
#

best i can do is this, and this is an eyesore

dawn ledge
#

figma for tuis

fleet cedar
#

The H being italic but not the rest looks weird

pulsar elk
valid jetty
#

@lucid trail i co authored you i hope thats ok

dawn ledge
#

all llvm based languages are basically DSLs for llvm IR

#

my world view has been shattered

valid jetty
#

i made an alternate tree-sitter and fixed:

  • the variadic keyword was missing (and its statement)
  • the precedence for binops was a little different to the precedence in the parser itself
  • ranges are literally just binops in the parser so i made them be binops here too :3
  • got rid of the targets that arent node and rust because youre only really gonna need this for zed and vsc
  • got rid of tuple and triple literals because theyre just functions (you probably already did that but i didnt have the updated parser)
  • things like ElleMeta and FILE are structs and should simply be handled as such
  • parsing directives was slightly wrong; in the parser there are directives that can take in types or exprs and it doesnt matter which but it can be any
  • parsing generics was slightly wrong; when parsing a generic instance's type, you just allowed identifiers as if it was a generic definition but it allows for any type in there so i made a seperate one that expects $.type instead of $.identifier
spark tiger
#

BRO WHY IS i-c-l word banned here

#

anyways uh

#

what i was gonna say is that no font is worth $75 regardless

lucid trail
#

The precs for the rules are kinda questionable in the first place

valid jetty
#

yeah true

#

im really struggling in getting it to differentiate expressions and types in directives when the type is a generic struct where the generic types are all identifiers

hoary sluice
valid jetty
#

ie ```rs
#alloc(Foo<void *>);

```rs
#alloc(Foo<Bar>);
``` does not
#

i just do this idk if theres a way to get it to recognize it as a type correctly than just to raise the precedence of type for this context

lucid trail
hoary sluice
#

who are all thee people starring elle

#

where are they finding it

lucid trail
valid jetty
#

probably people who follow tnixc

#

yeah

hoary sluice
#

are you like famous or something

lucid trail
#

is 67 followers a lot on github

valid jetty
#

uhh a little

lucid trail
#

well half are bots

hoary sluice
#

rosie has triple

valid jetty
#

but i think its more word of mouth (or followers)

#

like

#

you star it

#

some of your followers star it

#

their followers star it

#

etc

lucid trail
#

it shows up in the explorer tab

valid jetty
#

yeah

hoary sluice
#

rosie since when are you using task: summary commits

lucid trail
#

i don’t need a feed in my github tbh

#

it’s useful sometimes but got some noise too

valid jetty
#

since uhhhh

#

since that random commit on feb 26th

dawn ledge
valid jetty
#

whatever

#

$ is stdlib aliases

dawn ledge
#

interesting

spark tiger
#

like -#

valid jetty
#

you can

#

-# a
look

dawn ledge
spark tiger
lucid trail
#

default branch “mistress” is crazy @valid jetty

valid jetty
#

LMAO

#

i set that up in my git config a whileeee ago

#

ok im a little confused

#
directive_expression: ($) =>
  prec.left(
    13,
    seq(
      "#",
      choice(
        seq(field("name", $.valid_directives)),
        seq(field("name", $.valid_directives), "(", ")"),
        seq(
          field("name", $.valid_directives),
          "(",
          commaSep(choice(prec(2, $.type), prec(1, $.expression))),
          ")",
        ),
      ),
    ),
  ),

with this

fn foo() {
    #alloc(Foo<T>);
}

incorrectly interpreted as

(directive_expression [1, 4] - [1, 18]
  name: (valid_directives [1, 5] - [1, 10])
  (expression [1, 11] - [1, 14]
    (identifier [1, 11] - [1, 14]))
  (ERROR [1, 14] - [1, 17]
    (generic_parameters [1, 14] - [1, 17]
      (identifier [1, 15] - [1, 16]))))))))))
``` but this
```rs
fn foo() {
    #alloc(Foo<T *>);
}

correctly treated as

(directive_expression [1, 4] - [1, 20]
  name: (valid_directives [1, 5] - [1, 10])
  (type [1, 11] - [1, 19]
    (generic_type [1, 11] - [1, 19]
      (identifier [1, 11] - [1, 14])
      (generic_instance_parameters [1, 14] - [1, 19]
        (type [1, 15] - [1, 18]
          (pointer_type [1, 15] - [1, 18]
            (type [1, 15] - [1, 16]
              (identifier [1, 15] - [1, 16]))))))))))))))
``` even though type has priority the parser is still going the expr path
hoary sluice
#

making icps treesitter is gonna be painful

#

imma get functions to work properly today

valid jetty
#

just copy a minimal one like gleam and work with that

lucid trail
#

i had a lot of issues with that

hoary sluice
valid jetty
#

actually hang on why am i even parsing empty parens lol

#

commaSep is already optional

hoary sluice
#

cause icps is currently sugary haskell

valid jetty
#

i mean that doesnt fix but yea

valid jetty
hoary sluice
#

i should prolly find a better name

#

or call it icypeas

valid jetty
#

icypeas

hoary sluice
#

icypeas is an awesome name cause its silly and theres almost nothing already called icypeas besides some lead finding website

valid jetty
#

yeah and you can make the logo blue balls

hoary sluice
#

😭

#

peas are not blue

#

@valid jetty what is that commit naming scheme called

#

conventional commits

#

is renaming the project "chore"

valid jetty
valid jetty
#

its not a fix because youre not fixing anything

#

its not a new feature

#

probably a chore

hoary sluice
#

ok

lucid trail
hoary sluice
#

this battery indicator is way too silly

valid jetty
#

@lucid trail i think

#

im just gonna hardcode the structure for directives

valid jetty
#

IDEALLY i would just have # <ident> <(?> [ <prefer(ty) | expr>? ] <)?

lucid trail
valid jetty
#

like

#

#alloc is #alloc(ty, count_expr?) so i will just assert that the 0th thing is a ty if the ident is alloc

#

and repeat that for the other directives that take types

lucid trail
#

makes sense, I’m pretty sure i had a version of this

valid jetty
#

good thing i specified the interface for the directives :)

hoary sluice
#

if you google elle theres a big fashion magazine and a whole bunch of other stuff

#

our schools moodle-ish website is called elle

#

why is it so good

lucid trail
lucid trail
hoary sluice
#

the free one

pearl stagBOT
hoary sluice
#

i think they made some kind of new diffusion based dalle

lucid trail
#

i really don’t think it’s diffusion, i have no evidence for this belief tho

valid jetty
# lucid trail https://github.com/Tnixc/tree-sitter-elle/blob/670676ede315e85f60777ca7212234d8e...

oh lol too late i already wrote it

const DIRECTIVES = {
  len: ($) => ["(", $.expression, ")"],
  size: ($) => ["(", $.type, ")"],
  i: ($) => ["(", $.identifier, ")"],
  env: ($) => [],
  alloc: ($) => ["(", $.type, optional($.expression), ")"],
  realloc: ($) => ["(", $.expression, $.type, optional($.expression), ")"],
  free: ($) => ["(", $.expression, ")"],
  set_allocator: ($) => ["(", ")"],
  reset_allocator: ($) => []
};
#

thank you anyway tho

hoary sluice
lucid trail
valid jetty
#

thats pretty clean i think

directive_expression: ($) =>
  choice(
    ...Object.entries(DIRECTIVES).map(([k, v]) => seq("#", k, ...v($))),
    seq("#", $.identifier),
    seq(
      "#",
      $.identifier,
      "(",
      commaSep(choice($.type, $.expression)),
      ")",
    ),
  ),
#

ok to simplify cast_expression and prevent ambiguity

#

im gonna turn casting into a directive

#

instead of (T)x its gonna be #cast(x, T)

dawn ledge
#

return to the time when nvidia's gan was the only cool image gen tool

fleet cedar
#

Make casts <type>(value) instead of (type)(value)

valid jetty
#

i think #cast is a better idea

#

doesnt interfere with any other syntax while <T>(x) does

hoary sluice
#

i think at some point too much # will become meh

#

@valid jetty i think imma rewrite functions to only have 1 argument, get that to work and then make multiple arguments sugar over multiple functions or something like that

valid jetty
#

@hoary sluice #cast(T, x) or #cast(x, T)

jade stone
hoary sluice
#

@valid jetty i will write my stdlib in elle

#

(no i wont)

#

but that would be really funny

dawn ledge
#

raaaaaaaah

hoary sluice
dawn ledge
hoary sluice
#

@valid jetty will teach me qbe

dawn ledge
#

its actually really simple

#

its like writing a normal systems programming language except its closer to asm

#

very intuitive

lucid trail
dawn ledge
#

atleast bother to add a background-color to body even if black 😭

supple whale
#
chrome --enable-features=WebContentsForceDark:inversion_method/cielab_based/image_behavior/none/foreground_lightness_threshold/150/background_lightness_threshold/205 --flag-switches-end```
 goes hard
hoary sluice
dawn ledge
#

now is the point

hoary sluice
#

nah

#

i got a lot of more important stuff to do

supple whale
hoary sluice
#

like finals project

supple whale
#

i made this like 3 years ago i think

#

its AWFUL

#

it was like my first svelte project ever

#

or was this 4 years ago at this point

#

Aug 2022

hoary sluice
#

why no domain

supple whale
hoary sluice
#

it costs 10$ a year

supple whale
#

if only

hoary sluice
#

wdym

#

cas.dev costs 649$ a year but thats understandable

valid jetty
#

sometimes it doesnt even report the right line it just reports the end of the function

#

and the errors are really cryptic

valid jetty
supple whale
#

i wish porkbun showed me how much i'm paying yearly for these domains

hoary sluice
valid jetty
hoary sluice
#

how

#

expr "as" type

supple whale
valid jetty
#

i dont have a parse_expr in the current parser, i would have to yield tokens until the as keyword and parse those

hoary sluice
#

porkbun was probably cheaper for the first year and more expensive afterwards

supple whale
#

yeah, cf will be cheaper after 8 years or so

#

than porkbun

#

so

#

¯_(ツ)_/¯

hoary sluice
#

how do u parse everything else

valid jetty
#

carefully

hoary sluice
#

lol

dawn ledge
supple whale
#

try navigating

#

XD

valid jetty
#

for things that can preceed an expr i do this

#

but this is really more of a hack and i dont like it

hoary sluice
#

other than being extremely slow and flashbanging you at the start it looks fine

dawn ledge
#

its called FOUC not flashbang

#

😭

supple whale
#

i just use gh as my portfolio tbf

#

rather than a website

valid jetty
supple whale
#

lazy XD

dawn ledge