#🪅-progaming

1 messages · Page 23 of 1

dense sand
#

im not sure how to construct the ast

valid jetty
#

i learnt through trial and error lmao

dense sand
#

one time i wrote parser and it was regex based haha

valid jetty
#

,,,,never

#

the biggest piece of this parser is like 2400 lines lol

dense sand
#

wow wtf

#

i mean its not that much in the end

valid jetty
#

the whole parser is somewhere in the 3500 range i think

dense sand
#

thats cool

#

i once wanted to implement inline xml into java(like jsx) xD, would prolly need a parser for that too

valid jetty
#

that actually sounds kinda fun

dense sand
#

the only problem with that is you need to actually determine where the xml is located

#

interrupting the build process and modifying the input files is no problem with gradle plugins

valid jetty
#

because you can have xml anywhere

#

as an expression

fleet cedar
#

Jsx doesn't edit the input files to substitute with non-jsx, it edits the parser to support jsx

#

Just add another form to the expr parser and you're all set

valid jetty
#

wait but i thought rollup edits the input files into React.createElement

fleet cedar
#

No, React.createElement goes in the output files

dense sand
#

couldve edited the antl4 parser rules to support it, but ive got no idea how to do so, and editing the compiler itself is too much work

fleet cedar
#

Yes, to support new syntactic forms you add them to the grammar

#

I thought that was kinda obvious

dense sand
#

it is, but as i said, im too lazy to understand how antl4 works

fleet cedar
#

Me too, never liked parser generators

#

Handwritten is best

dense sand
#

well maybe sometime in future when im not too lazy

#

imagine having a frontend java framework

#

i mean jsp

#

or vaadin

valid jetty
#

handwritten is definitely best

#

(it's not)

dawn ledge
valid jetty
#

not squished actually

#

it's just in the movie ratio thing

#

for cinemas

dawn ledge
#

oh so the child is just weirdly shaped

#

it looked squished to me

dusty moth
dawn ledge
#

correction

#

treesitter grammar is written in js

#

treesitter itself is c

dense sand
#

the ohfuck_expr

dawn ledge
#

lol

#

ohfuck_expr: $ => prec("throw", seq("ohfuck", field("message", $.string))), peak code

dusty moth
#

someone asked for more serious panics

#

there's three severities:

  • error is like bail!()
  • panic is like panic!()
  • ohfuck is eprintln!() (with a stack) then abort()
#

also any syntax errors are considered comments

valid jetty
#

ohfuck should be worse than panic

valid jetty
#

HOLY SHIT

frosty obsidian
#

rust

dawn ledge
#

what bro

#

not its not

#

its c

#

the core is c

#

idk if they've completely moved to rust

frosty obsidian
#

github says the repo is majority rust

#

there is still some c

dawn ledge
frosty obsidian
dawn ledge
#

the rust code is bindings

#

B I N D I N G S

#

rust so bloated the bindings are bigger than the c project

frosty obsidian
#

guh

#

insane

dawn ledge
#

and the cli too

#

not like anyone uses the cli

dense sand
#

insane indeed

crimson sparrow
deep mulch
#

@crimson sparrow hiii

#

@frosty obsidian can I be gloom contributor

frosty obsidian
#

you can be whatever you want

deep mulch
frosty obsidian
#

no

fleet cedar
nimble bone
dusty moth
#

the program immediately exits

#

panics are catchable

thorny prism
#

arc is so bad on windows 😭

strong smelt
#

Anyone know how to fix the role duper in third party, it’s giving me a few errors after running pnpm build

autumn sigil
#

i dont remember if i posted before but i saw inlay hint "either type" and got confused

valid jetty
#

what the heck is this language

#

looks like someone ate rust cereal and go milk and puked it all out

#

oh wait

#

its gotta be zig

#

people always talk about how cursed the syntax is

dawn ledge
#

yes it is zig

#

zig syntax is... weird

#

cool lang nonetheless

torn seal
#

i like the syntax

still jolt
#

why use anything other than javascript

fleet cedar
#

Why use anything

still jolt
#

why even exist

ionic lake
#

good question, sometimes I go on an existential crisis but then remember, life is all about bloons td 6

valid jetty
fleet cedar
still jolt
#

blobcatcozy ​​​​​​​​​​​​​​​​​​​​​

autumn sigil
#

nothing unexpected

dusty moth
#

you will never complain about other languages' syntax ever again

deep mulch
#

id use zig over rust

dense sand
#

C?

dawn ledge
#

never touching c

#

or c++ for that matter

#

those are horrid codebases

#

but ngl all the cool arcane software ive seen is in c(++)

deep mulch
#

C is nice

dawn ledge
#

like mkbold & mkitalic

#

for bdf fonts

deep mulch
#

I like C for it's simplicity

dawn ledge
dense sand
#

(it applies to everyone)

dawn ledge
#

c is simple to the point that its too simple

#

boilerplate

dense sand
#

just dont use heap allocation and youre good to go /s

dusty moth
dense sand
#

C++ is very questionable language

dusty moth
dusty moth
#

is there a more aesthetically-pleasing way to write this?

dawn ledge
#

yeah

#

whatever type err is
you impl Error from Type
and then use try operator

valid jetty
#

let try printer = printer;

dusty moth
valid jetty
#

no what

#

i thought you were dreaming up your own syntax

dusty moth
fleet cedar
#

Optionally with .map_err() inbetween

dusty moth
#

that's nice to know

fleet cedar
#

let printer = printer.map_err(Error::NoReadline)?;

valid jetty
fleet cedar
#

Probably anyhow's

dusty moth
valid jetty
#

ok but what does it do

#

is it like an equivalent to a deferred return in C

dusty moth
valid jetty
dusty moth
#

essentially throw

valid jetty
#

yeah but why

dusty moth
fleet cedar
#

The correct implementation is Err::<!, _>(e)?

valid jetty
#

horror

fleet cedar
#

Which works correctly with (nightly) try blocks

#

But due to using !, requires nightly itself

dusty moth
#

my rust flake uses nightly by default, conveniently

#

actually not just by default I haven't implemented changing the toolchain at all

valid jetty
#

does rust have contracts

fleet cedar
#

I main nightly too

#

As in arbitrary boolean expressions validated at compile time?

valid jetty
dusty moth
#

on parameters of all calls? not to my knowledge

fleet cedar
#

It does not allow type checking beyond what the type system allows, no

dusty moth
#

can't outtypecheck the typechecker

valid jetty
#

some syntax ive been dreaming up is like
fn foo(a: 3000 > i32, b: string.starts_with(“awa”), c: -1 < f32 <= 1) for contracts

#

that would be soooo cool

dusty moth
#

language I'm working on lets you have if types, but currently only the parser supports them

valid jetty
#

like

dusty moth
#

(e.g. int if self > 2)

valid jetty
#

oh

#

WAIT holy shit

#

imagine

dusty moth
#

the check will be done at runtime as of now

valid jetty
#

fn foo(a: if _ < 1 { i32 } else { f32 })

dusty moth
fleet cedar
#

I'd prefer ```rs
fn foo(a: i32, b: &str, c: f32)
assert
3000 > a,
b.starts_with("awa"),
-1 < c,
c <= 1

valid jetty
dusty moth
#

types are values, but a type cant refer to what it will eventually be

dusty moth
fleet cedar
#

Dependent types is a thing

dusty moth
#

oh those

fleet cedar
#

A very complicated thing that's never made it out of academia

valid jetty
valid jetty
dusty moth
fleet cedar
#

No, I don't think a type can depend on its own value

#

I hope it can't

dusty moth
#

you make me want to add this as a cursed feature to my language

valid jetty
#

i need to study type theory

valid jetty
valid jetty
#

oh

dusty moth
#

∀(a :: b) -> dependently qualifies a as a b

valid jetty
#

recursive dependent types

dusty moth
valid jetty
#

fibonacci sequence at the type level

dusty moth
valid jetty
#

actually

#

that’s fucking possible in typescript

dusty moth
#

and peano numbers

valid jetty
#

i’ve done it before

dusty moth
deep mulch
#

having to use jquery in my web dev class @royal nymph you love

dusty moth
#

typescript has dependent types

valid jetty
dusty moth
#

type-level typescript compiler when

deep mulch
#

@valid jetty hii

dusty moth
#

now if we could only splice them in somehow

#

\(\(…)) is cursed syntax (from my language)

valid jetty
valid jetty
dusty moth
valid jetty
#

oh ok

#

do you love my inline IR syntax

deep mulch
dusty moth
valid jetty
#

it puts that text without any transformations directly into the IR file

dusty moth
#

i kinda have that

valid jetty
#

__MANUAL_RETURN__ tells the compiler not to include an automatic return at the end

dusty moth
#

\() splices strings into strings, and other types of things into program source

#

no real IR yet

valid jetty
#

interesting

#

are you planning to use llvm

dusty moth
#

mainly lua

#

but llvm for testing scripts and standalone use

valid jetty
#

maybe consider wasm too

dusty moth
#

doesn't llvm do wasm?

valid jetty
#

oh actually i’m not sure

#

i doubt it

dusty moth
#

i can make wasm a target ig

#

hmm what if I make targets user-defined

fleet cedar
#

Did I mention that the code I'm currently working on has 85 levels of indentation at one point?

valid jetty
#

the maximum for me has gotta be 4

#

but i do have a 3000 line function

dusty moth
#

i've hit 12

#

but how the fuck do you hit 85

fleet cedar
#

I'm writing a decompiler, and it currently doesn't properly unnest elseifs

dusty moth
valid jetty
fleet cedar
#

I didn't write this shit y'know

valid jetty
valid jetty
#

ok can y’all help me clear up something

#

structs are contiguous memory right

#

so

#

a struct with 4 chars

dusty moth
valid jetty
#

is 32 bits

dusty moth
fleet cedar
#

If char is 8 bits, yes

valid jetty
dusty moth
#

rust chars are u32

dusty moth
valid jetty
#

nono C chars

dusty moth
#

c doesn't align chars right?

fleet cedar
#

What is there to align

#

They're single bytes

valid jetty
#

raylib allows you to directly pass a 32 bit integer to a function instead of a struct worth of 32 bits

#

how does that work

#

a struct is a pointer to the start of the memory

#

an integer is just an integer

fleet cedar
#

A struct is just the memory

dusty moth
#

structs usually are the data itself

valid jetty
#

but i meant

#

when working with the IR

fleet cedar
#

Unless your language boxes it behind the scenes

valid jetty
#

you can’t store a struct by value

fleet cedar
#

Why not

valid jetty
#

because you’re not allowed to i guess idk lol

dusty moth
#

ik in C it's common to stuff 32 bytes of state into int parameters

valid jetty
#

in llvm you allocate memory and put things at the offset you need

#

that’s still a pointer tho

#

raylib however allows you to pass both a Color struct and an integer into the ClearBackground function

dusty moth
#

probably just overlapping representations

fleet cedar
#

A {u8, u8, u8, u8} and a u32 have the same memory representation

valid jetty
#

in elle a struct is a pointer, and the function still works fine for both a Color struct (pointer to the start of that stack memory) and directly an integer

clever lily
#

Is this left like this when making a plugin?

valid jetty
#

to make the same behavior

#

but i’m just passing an integer directly and it works

fleet cedar
#

Why would you pass a pointer to a 4-byte struct

valid jetty
#

no it’s kinda hard to explain what i mean

dusty moth
#

is it like a &mut?

#

hmm

#

maybe it's an optimization somewhere?

valid jetty
#

when any struct is created it’s usually just syntactic sugar

struct Foo { u8, u8, u8, u8 }
Foo { 255, 0, 0, 255 }

would do

%Foo = alloca 4 # in bytes
store 255 %Foo
store 0 %Foo + 1
store 0 %Foo + 2
store 255 %Foo + 3

you don’t really have a struct by value you have a reference to the start of that stack allocated memory

so how in the heck, when passing an integer directly into the ClearBackground struct, does it recognize it as the whole struct, it makes no sense to me

to access any fields it needs to calculate an offset, but an offset to what it was given just a number

how do you load 0xFF0000FF + 1 and get 0 (ideally it would be load %Foo + 1)

i believe that when optimizing C it does get turned into an integer directly instead of making the struct but my question is how structs by value then work

#

i hope that makes sense

#

this has always been a big cloud to me

dusty moth
#

what do the calls look like in ir?

valid jetty
#

it generates this

target triple = "arm64-apple-macosx13.0.0"

%struct.Color = type { i8, i8, i8, i8 }
@__const.main.color = private unnamed_addr constant %struct.Color { i8 -1, i8 0, i8 0, i8 -1 }, align 1

; Function Attrs: noinline nounwind optnone ssp uwtable
define i32 @main() #0 {
  %1 = alloca %struct.Color, align 1
  %2 = bitcast %struct.Color* %1 to i8*
  call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds (%struct.Color, %struct.Color* @__const.main.color, i32 0, i32 0), i64 4, i1 false)
  ret i32 0
}

; Function Attrs: argmemonly nofree nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
#

doing ```c
#include <stdio.h>
#include <raylib.h>

int main() {
Color color = { 255, 0, 0, 255 };
}

#

it actually makes it static memory but wait

#

if you make the struct big enough it no longer creates it like that

target triple = "arm64-apple-macosx13.0.0"

%struct.Foo = type { i32, i8, i64, %struct.Bar, %struct.Bar* }
%struct.Bar = type { i32, i64 }

; Function Attrs: noinline nounwind optnone ssp uwtable
define i32 @main() #0 {
  %1 = alloca %struct.Foo, align 8
  %2 = bitcast %struct.Foo* %1 to i8*
  call void @llvm.memset.p0i8.i64(i8* align 8 %2, i8 0, i64 40, i1 false)
  %3 = bitcast i8* %2 to %struct.Foo*
  %4 = getelementptr inbounds %struct.Foo, %struct.Foo* %3, i32 0, i32 0
  store i32 100, i32* %4, align 8
  %5 = getelementptr inbounds %struct.Foo, %struct.Foo* %3, i32 0, i32 1
  store i8 12, i8* %5, align 4
  %6 = getelementptr inbounds %struct.Foo, %struct.Foo* %3, i32 0, i32 2
  store i64 10000, i64* %6, align 8
  ret i32 0
}

; Function Attrs: argmemonly nofree nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
``` it creates it how i was saying
#

with this

typedef struct {
    int awa;
    unsigned long long bwa;
} Bar;

typedef struct {
    int a;
    char b;
    long long c;
    Bar bar;
    Bar *pBar;
} Foo;

int main() {
    Foo a = { 100, 12, 10000 };
}
#

ive literally written structs in my language that follow the C abi and theyre still a big black box to me

#

and every time i ask about it i get nowhere

#

and ai has not been any help it has absolutely no idea

#

and ive asked at school but my teachers dont know enough about compilers to understand what im doing

#

its so frustrating

autumn sigil
#

so how in the heck, when passing an integer directly into the ClearBackground struct, does it recognize it as the whole struct, it makes no sense to me
dont you know based on size whether its passed in register or stack?

valid jetty
#

i know that but how does the C function know

autumn sigil
#

well the function does too xd

#

c calling convention

#

or am i missing something?

#

if you both know the arguments, and you both target the same calling convention you both know when to pass arguments in what way

valid jetty
#

wait i think looking at the implementation might help maybe

#

its passed through a register right but the function is still calculating an offset into that struct which in this case it shouldnt be able to do because it has an integer directly through a register

#

unless in this case color.b !== *(color + 2) and instead color.b === (color >> 8) & 0xFF in which case how is that dictinction made

autumn sigil
#

in which case how is that dictinction made
depends on your abi :p

autumn sigil
autumn sigil
#

theres also the 5k pages i386 intel manual, maybe youll find something useful in there, i couldnt

ornate quiver
autumn sigil
#

dude what the fuck did i just overhear from the cpp talk im listening to

#

its like background noise and hes like "they have ways of grooming the state of your program" 😭

autumn sigil
dense sand
#

Any goog C hashtag developers here, maybe could someone give me some hints on how to make my code quality improve a bit? (please dont suggest to change language)

ornate quiver
#

repo link

valid jetty
#

when its passed through the register you still .r .g .b .a on the struct just fine

#

thats what im confused about

#

thats what ill read about later i guess

valid jetty
dawn ledge
#

@autumn sigil i am using zig

#

i like it

autumn sigil
dawn ledge
#

im gonna laugh

#

in a good way

#

nvm its C#

dusty moth
#

new color scheme just dropped

royal nymph
#

you should avoid that

#

restructure your code to have less of that

dense sand
#

great, yeah thats also one thing i kinda thought would be eye-striking

royal nymph
#

bad:

foreach (...) {
    if (foo) {
        //....
   } else {
        if (bar)....
   }
}

better:

foreach (...) {
    if (foo) {
       // ....
       continue;
   }

    if (bar)...
fleet cedar
#

Nothing wrong with elseifs, just format them as such

#

Though continue is also nice, shows that there's nothing hiding below the last else

royal nymph
#

no because in the else block there's more if else

royal nymph
fleet cedar
#

If its ```cs
foreach (...) {
if (foo) {
//....
} else {
if (bar)....
if (baz)....
}
}

royal nymph
#

it's cleaner if code is flatter cause it's easier to follow the train

pearl stagBOT
# royal nymph https://github.com/KoblizekXD/NetRemapper/blob/master/NetRemapper-API/MappingsRe...

MappingsReader.cs: Lines 35-78

for (int i = 0; i < lines.Length; i++)
{
    string line = lines[i];

    if (i == 0)
    {
        string[] splitted = line.Split("\t", StringSplitOptions.RemoveEmptyEntries);
        if (splitted[0] == "netmap")
        {
            mappings = new(Enum.Parse<MappingsFormat>(splitted[1]));
        }
        else
        {
            throw new IOException("Invalid mappings file format.");
        }
    } else if (i == 1)
    {
        if (mappings == null) throw new Exception("Invalid mappings file format(header not initialized).");
        mappings.Namespaces = [.. line.Split("\t", StringSplitOptions.RemoveEmptyEntries)];
    } else
    {
        if (mappings == null) throw new Exception("Invalid mappings file format(header not initialized).");

        string[] splitted = line.Split("\t", StringSplitOptions.RemoveEmptyEntries);
        if (splitted.Length == 0) continue;

        if (splitted[0] == "c")
        {
            if (currentTypeDefinition != null)
            {
                mappings.TypeDefinitions.Add(currentTypeDefinition);
            }
            currentTypeDefinition = new([.. mappings.Namespaces], splitted.Skip(1).ToArray());
        } else if (splitted[0] == "f")
        {
            currentTypeDefinition?.FieldDefinitions.Add(new([.. mappings.Namespaces], splitted.Skip(1).ToArray()));
        } else if (splitted[0] == "m")
        {
            currentTypeDefinition?.MethodDefinitions.Add(new([.. mappings.Namespaces], splitted.Skip(1).ToArray()));
        }
        else continue;
    }
    
}
royal nymph
#

this is what I was talking about

dawn ledge
#

if-ception

dense sand
#

lmao

#

but i mean youre right

royal nymph
#

let me turn on my pc and show how I would do it

dense sand
#

okay

#

any time im parsing anything it becomes such a big mess

royal nymph
#

bad

string[] splitted = line.Split("\t", StringSplitOptions.RemoveEmptyEntries);
if (splitted[0] == "netmap")
{
    mappings = new(Enum.Parse<MappingsFormat>(splitted[1]));
}
else
{
    throw new IOException("Invalid mappings file format.");
}

good

string[] splitted = line.Split("\t", StringSplitOptions.RemoveEmptyEntries);
if (splitted[0] != "netmap") throw new IOException("Invalid mappings file format.");

mappings = new(Enum.Parse<MappingsFormat>(splitted[1]));
#

this should just be a switch

dense sand
#

maybe should've setupped sonarqube in my ci >:(

#

imma fix those once im on windows, im on linux rn

dawn ledge
#

do it on linux smh

dense sand
#

i dont have any c# tools installed here

#

c# is windows

#

well not really

royal nymph
#

install rider

dense sand
#

i used c# primarily for windows only dev

royal nymph
#

you should use switch more imo

pearl stagBOT
# royal nymph https://github.com/KoblizekXD/NetRemapper/blob/master/NetRemapper-API/NetRemappe...

NetRemapper.cs: Lines 117-143

if (instruction.Operand is MemberReference member)
{
    if (Mappings.GetType(member.DeclaringType.Name, DefaultNamespace) is TypeDefinitionEntry typeDefinition)
    {
        WriteIfVerbose($"Remapping reference to {member.Name}'s type {member.DeclaringType.Name} -> {typeDefinition[TargetNamespace]}");
        member.DeclaringType = new(member.DeclaringType.Namespace, typeDefinition.Names[TargetNamespace], member.DeclaringType.Module, member.DeclaringType.Scope);
        // member.DeclaringType.Name = typeDefinition.Names[TargetNamespace];
    }
}

if (instruction.Operand is MethodReference mRef)
{
    if (Mappings.GetMethod(mRef.Name, DefaultNamespace, mRef.Name, TargetNamespace) is MethodDefinitionEntry e)
    {
        WriteIfVerbose($"Remapping method reference {mRef.Name} -> {e[TargetNamespace]}");
        mRef.Name = e.Names[TargetNamespace];
        processor.Replace(instruction, processor.Create(instruction.OpCode, mRef));
    }
} else if (instruction.Operand is FieldReference fRef)
{
    if (Mappings.GetField(fRef.Name, DefaultNamespace, fRef.Name, TargetNamespace) is FieldDefinitionEntry e)
    {
        WriteIfVerbose($"Remapping field reference {fRef.Name} -> {e[TargetNamespace]}");
        fRef.Name = e.Names[TargetNamespace];
        processor.Replace(instruction, processor.Create(instruction.OpCode, fRef));
    }
}
royal nymph
#

you can use a witch for this

fleet cedar
#

Witches are very good at csharp, what with those cauldrons and brooms of theirs

royal nymph
#
switch (instruction.Operand)
{
  case MemberReference member:
  case MethodReference method:
  case FieldReference field:
}
dense sand
#

is this another thing that java doesnt have yet 😭

#

or did they release it in 23?

royal nymph
#

java doesnt have this at all i think

#

c# has it since C# 7

#

thanks to pattern matching

fleet cedar
#

I think java has if(x instanceof MethodReference member)

#

No idea about switches

royal nymph
#

lol

dense sand
#

it's in jdk 17 too

#

which means its been out for long time

royal nymph
#
if (x instanceof MethodReference) {
  ((MethodReference) x).doStuff();
}
royal nymph
fleet cedar
royal nymph
#

i only did android dev where we use ancient java

spring pilot
fleet cedar
#
// As of Java 21
static String formatterPatternSwitch(Object obj) {
    return switch (obj) {
        case Integer i -> String.format("int %d", i);
        case Long l    -> String.format("long %d", l);
        case Double d  -> String.format("double %f", d);
        case String s  -> String.format("String %s", s);
        default        -> obj.toString();
    };
}
royal nymph
#

we don't get the luxury of new java cutesillytime

royal nymph
#

new java lowkey good

#

gonna hop on

dense sand
#

yea

fleet cedar
#

Nah, just slightly less bad

#

Use kotlin

dense sand
#

i mean i always look at how they implemented string interpolation and then removed it 2 versions later and laugh

royal nymph
#

yeah most of my knowledge is based on java 11

#

cause android

dense sand
fleet cedar
#

I never really did much beyond java 8

pearl stagBOT
royal nymph
#

it doesn't even automatically infer the type

#

u gotta manually cast

dense sand
#

oh wow 😭

dense sand
#

i remember writing java 8 when i was writing minecraft clients when i was on elementary school

#

horrible way to learn coding btw

#

dont do that

fleet cedar
#

Most of my java 8 was also minecraft shit, until I switched to kotlin

dense sand
#

"how to decompile minecraft with mcp"

#

dont use mcp please

cerulean plover
cerulean plover
dense sand
#

you can literally do it with FG and have it completely with gradle

cerulean plover
#

idk if I ever properly decompiled with mcp back in the day

dense sand
#

not even mentioning it was meant for eclipse

cerulean plover
#

nowadays you are expected to maintain mods for 2 modloaders on every version released in the past 2 years

dense sand
#

so setupping the idea workspace was such a pain

royal nymph
#

Aliucord and Vencord

fleet cedar
#

In my later era of mc modding I just homebrewed my whole own tech stack

royal nymph
#

with Aliucord i learnt Java, Kotlin and a bit of C++

dense sand
royal nymph
#

with Vencord i properly learnt ts, react, electron

dense sand
#

nowadays hopping languages is pretty easy

cerulean plover
royal nymph
#

I can pick up most new languages decently well within a few days, just need to look up a bunch of stuff

dense sand
#

i wonder what i was smoking here

royal nymph
#

java streams 😭

dense sand
royal nymph
#

java designers be like "how can i make this feature be as awful as possible"

dense sand
cerulean plover
royal nymph
#

C# Linq is cool asf

#

tbf isn't linq discouraged

fleet cedar
royal nymph
#
var scoreQuery = scores.Where(score => score > 80);
dense sand
#

it was such a fun ngl

#

but then realized we didnt have working reobfuscation + diffing

#

so we dropped the project

cerulean plover
dense sand
#

couldve just used FG

cerulean plover
#

so cursed

fleet cedar
#

I made a custom format for bytecode patches

#

mc/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk$RebuildTask.doTask(Lmc/client/renderer/ChunkBufferBuilderPack;)Ljava/util/concurrent/CompletableFuture;
    +ALOAD 0
    +GETFIELD mc/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk$RebuildTask.region : Lmc/client/renderer/chunk/RenderChunkRegion;
    +IFNULL @L0
    +  GETSTATIC kawaru/zu/Minimap.INSTANCE : Lkawaru/zu/Minimap;
    +  ALOAD 0
    +  GETFIELD mc/client/renderer/chunk/ChunkRenderDispatcher$RenderChunk$RebuildTask.region : Lmc/client/renderer/chunk/RenderChunkRegion;
    +  GETFIELD mc/client/renderer/chunk/RenderChunkRegion.chunks : [[Lmc/world/level/chunk/LevelChunk;
    +  INVOKEVIRTUAL kawaru/zu/Minimap.invalidate([[Lmc/world/level/chunk/LevelChunk;)V
    +@L0
    NEW mc/client/renderer/chunk/ChunkRenderDispatcher$CompiledChunk
fleet cedar
dense sand
#

damn im kinda missing this

#

but the mappings for 1.8.9 are shit

dense sand
#

or wait

#

bsdiff

#

it was i think

#

now i need to write stupid nextjs undeployable applications because greedy corporate wants my money

dense sand
#

has anyone here ever worked with supabase? i want to implement auth & some simple tables in my database, and looking for new stuff to try out

fallen nebula
fallen nebula
#

like fr streams are amazing
https://onlinegdb.com/1FyBWLo0I
the perf is not perfect, but it's fine

dense sand
#

yeah i think its implemented well

#

i like streams

#

im not sure how java would've iimplemented it differently

fallen nebula
#

they also make parallelism quite easy if your thing is built with it in mind

dense sand
#

you mean executors?

#

or parallelism as in streams?

fallen nebula
#

as in stream parallelism

dense sand
#

i see

#

i honestly never used parallel streams

#

cant tell

fallen nebula
#

welp you can see an example in the thing i shared
i should probably add smth to time the code
but you can set smth like 0 1000000 as launch args and see how it perform

#

printing to console is slower than processing everything even if you add other rules than fizz and buzz

thorny prism
#

do u guys think asp.net core with blazor is good to make pages?

#

(already kinda experienced in c#)

ornate quiver
#

Id split up some of those long functions as well

valid jetty
#

do it like rust where its max 79 characters horizontally before it splits it onto multiple lines

dense sand
#

okay

fleet cedar
#

Rust defaults to 100 though

valid jetty
#

i swear i read somewhere that rustfmt is 79 characters wide

#

i remember it because i was like "why not 80"

fleet cedar
valid jetty
#

hm i see

autumn sigil
#

avg systems programmer with monitor that can only display 80 characters wide

fleet cedar
#

I think most programming happens on non-toy hardware

ornate quiver
#

i do like either 100 or 120 chars sometimes
sometimes splitting lines makes it less readable

royal nymph
ornate quiver
#

LMAOOO

#

rusk

dense sand
#

Raskell

spring pilot
#

Ruskell

winged mantle
#

try (ZipFile zip = new ZipFile(modFile)) {
}

winged mantle
dense sand
winged mantle
#

do you never continue a project you abandoned for 2 years

dense sand
#

No wtf

dense sand
#

Also i think i closed the zip file inside the Utils.findin method

winged mantle
winged mantle
dense sand
#

Thats true

#

Lol

#

But i think that my java code quality got better

dawn ledge
#

@calm ruin you

calm ruin
dense sand
#

Suppose i would like to revisit making my mod loader again, which stuff should i choose? I should probably go with fabric(and mixins approach instead of decompiling), but which version?

#

Im not sure if its worth trying to do something like this on new version as they are pretty maintened

past ice
#

sorry if this question doesnt belong here (or if its too generic) but generally speaking how does vencord work? how does it hook into discord's components and stuff? im trying to write something similar for another react app, which also uses webpack so i assume it'd be similar

fleet cedar
#

It uses some dark magic to hook into the webpack internals - I think Nucky is the expert at that part - and then regex replaces modules when loading them

past ice
#

that's insane and i'd love to learn more somehow

#

looking at the official vencord repo i can't realllyyyy find what's actually doing the dark magic lol

#

it might also be worth noting i have full source maps for this react app if it helps at all

deep mulch
#

has anyone here used emscripten

royal nymph
#

first you need to understand that the webpack runtime is just a replica of node.js' common js module system

deep mulch
#

@royal nymph hi

royal nymph
#

every source file gets its own ID (essentially filename), say 123456

then it transpiles something like

import { doThing } from "./somewhere";

export function stuff() {
  doThing(42);
}

to

123456: function (module, exports, require) {
  "use strict";
  require.defineExports(exports, {
    stuff: function() {
      return stuff;
    }
  })
  var somewhere = require(98765);

  function stuff() {
    (0, somewhere.doThing)(42);
  }
}
#

then when the code gets minified, it looks something like this

#

where e, t, n are module, exports, require, n.d is require.defineExports (it uses functions which get turned into getters so that if the variable changes, the export also updates)

and n(12345) means require(12345)

dusty moth
#

and store constants constant

#

actually hmm can you reassign exported functions

serene elk
#

get stuff turns into the same as object.defineProperty(a, "b", {
get() {}
})

#

which is what webpack does

royal nymph
# royal nymph then when the code gets minified, it looks something like this

now this is the module definition

you can access the module definition via webpackRequire.m[12345]. and you can require it via webpackRequire(12345)

upon calling webpackRequire, webpack looks up the module definition and initialises the module for you and retrieves the exports

then the exports get cached in webpackRequire.c[12345] and reused the next time you import the module, so it is only loaded once

royal nymph
#

what vencord does in essence is monkeypatch webpackRequire.m

#

every time a new module definition gets added, we patch that

serene elk
dusty moth
deep mulch
#

guh how does this even choose gcc

royal nymph
#

yes

deep mulch
#

i cant find any references to gcc exectuable

royal nymph
#

webpack organises modules into chunks. a chunk is one javascript file that contains 1 or more modules that register themselves with webpack when the file is executed

a chunk looks like something this:

(this.webpackChunkdiscord_app = this.webpackChunkdiscord_app || []).push([["26182"], {
  12345: function(module, exports, require) {
  },
  98765: function(module, exports, require) {
  }
}]);

this chunk contains modules 12345 and 98765 and pushes them to webpackChunkdiscord_app

this webpackChunkdiscord_app is a global array with a custom webpack push function which adds the modules and stuff

#

the way vencord works is that we monkey patch webpackChunkdiscord_app.push with our own function

extremely dumbed down, this patch looks something like this:

const originalPush = webpackChunkdiscord_app.push;

webpackChunkdiscord_app.push = function (unused, chunks, alsoUnused) {
  for (const moduleId in chunks) {
    const original = chunks[moduleId];

    let source = original.toString();
    patches.forEach(p => source = source.replace(p.match, p.replace));

    chunks[moduleId] = eval(source);
  }

  return originalPush.call(unused, chunks, alsoUnused);
}
past ice
#

but then how do you know what chunk does what?

royal nymph
#

how do you mean that exactly?

dusty moth
past ice
#

not the ones in the vencord object themselves, but looking at all of the webpack chunks, how do you know what to patch?

royal nymph
#

by reverse engineering

past ice
#

oh wait i remembered i have a full source map of this site

fleet cedar
#

It finds whichever module contains some specific substrings

royal nymph
dawn ledge
#

you summoned nuckys

#

the webpack obsessed user

royal nymph
#

that used to be me but nuckyz stole my job

fleet cedar
#

Your job is closing prs

ionic lake
deep mulch
past ice
# royal nymph then when the code gets minified, it looks something like this

okok so i did my due dilligence, looked into how webpack works and got it all working and hooking into the app!! however, i've gotten to a point where i want to show a toast using their components. using the source map i've determined they do it like this:

import { ToastType } from "../consts";
import { showToast } from "../toast";
import ToastLayout from "../ToastLayout";

function SpeechRecognitionNotSupportedToast() {
  return (
    <ToastLayout type={ToastType.warning}>
      {{
        title: "Sorry!",
        description: "This feature is not supported on your device."
      }}
    </ToastLayout>
  );
}

export const showSpeechRecognitionNotSupportedToast = () =>
  showToast(SpeechRecognitionNotSupportedToast, {
    toastId: "speechRecognitionNotSupportedToast"
  });```

i already have jsx bundling and react working properly in my userscript. my question is - how can i import that ToastType and showToast from my code? i can determine where they live in the webpack chunks but that's about it - i have no clue how to use them
fleet cedar
#

If the module is known (and known to be sufficiently stable), just wreq() it

#

If it's not, vencord has a bunch of tricks for finding modules by searching their text

past ice
#

oh nono this isn't a vencord plugin

#

this is a seperate site which happens to use webpack which im trying to mess with, which is why im asking here

#

oh right i misread

fleet cedar
#

Did you know you can copypaste code from open source projects

past ice
#

yeah my bad 😭

fleet cedar
#

(Assuming a permissive license)

past ice
#

earlier, a webpack require function was mentioned - is this something i need to write myself?

fleet cedar
#

It's kinda the function the whole webpack system is built around

past ice
#

i mean i know modules take a require function, but i mean do i need to write the method which "imports" the modules from the webpack chunk array

#

like uhh hold on

#

i know that n.d defines exports, but i dont know how to access those. i need d, exported as C (which is the component)

fleet cedar
#

d is available as require(783415).C, if you can get your hands on require

past ice
#

but then how do i get require? do i just need to intercept any push and then make that function globally available

#

or is there some more elegant way

fleet cedar
#

I'm not 100% sure what is the modern solution to that

#

But in ages past, it was common to push a fake module designated as an init, meaning it's loaded right away, and then you store the passed require function somewhere accessible

past ice
#

oh i think i know how to do that? hold on

#
        window.webpackChunks.push([
            [""],
            {},
            (require) => {
                // ...make require available globally
            },
        ]);```
fleet cedar
#

I don't remember the exact details, but if that works, it works

past ice
#

i used that earlier (i think?) and i ran into an issue i cant remember so bear with me for a sec

#

oh nvm it does work now

#

actually i do have one more question

#

@fleet cedar is there a reliable way to wait for all webpack modules to load?

#

or are they loaded on the fly

fleet cedar
#

Depends on the webpack setup

#

The easiest way is to monkeypatch some suitable module so that it calls into your code when run

#

Requires finding such a suitable module in the first place, though

spark tiger
#

rust enjoyers, what are some good rust crates for creating a parser for a propitiatory binary file format?

  • can’t use bitter because the file has both little- and big-endian values
  • nom seems too complicated
  • others are uhhhh
#

or should i just go make all that binary reading stuff by myself

#

rather than using a lib

fleet cedar
#

Do you need bit-level stuff or only byte-level?

spark tiger
ornate quiver
#

i know somoene who wrote an arsc/axml parser+writer with scroll

#

seems pretty good

fleet cedar
#

I find that gospel suits all my needs, but that's because I made it

spark tiger
#

tho tbh it seems like it’d be easier to just create the helper methods by myself lol

#

let’s just hope the performance won’t suck ass

#

also I wish it was possible to do stuff like that in rust:

// pseudocode
struct File {
    name_len: i32,
    name: String[name_len],
}

struct Folder{
    name_len: i32,
    name: String[name_len],
    files_count: i32,
    files: [File, files_count],
    subfolders_count: i32,
    subfolders: [Folder, subfolders_count]
}```
#

cuz ts would make parsing much easier

#

but I get that’s not how structs work

#

tho maybe i can do something like that via rust macros

#

i heard u can do some cool shit with them

fleet cedar
#

That wouldn't make sense in reality though, what if you change name_len

#

But yeah it would be totally possible to make some parsing library that does something like ```rs
struct File {
#[blah(len = .read_i32())]
name: String
}

spark tiger
fleet cedar
#

Rust does not have a concept of immutable structs

#

Something like this neither can nor should be part of the type system

#

But it would be totally legit to have it as part of a macro

#

Something like rs #[binstruct] struct Folder{ #[binstruct(meta)] name_len: i32, #[binstruct(len = name_len)] name: String, #[binstruct(meta)] files_count: i32, #[binstruct(len = files_count)] files: Vec<File>, #[binstruct(meta)] subfolders_count: i32, #[binstruct(len = subfolders_count)] subfolders: Vec<Folder> } which would produce something like ```rs
struct Folder {
name: String,
files: Vec<File>,
subfolders: Vec<Folder>
}
impl Folder {
fn read(...) -> Result<Folder> { ... }
fn write(&self, ...) -> Result<()> { ... }

#

Though imo it's faster and more flexible to just write the read and write functions directly, rather than messing around with extra abstractions

spark tiger
#

hm what if the macro returned a struct with pointers to the needed values of different types

fleet cedar
#

What do you mean

spark tiger
spark tiger
fleet cedar
#

If the file data is a plain sequence of values, writing it as a struct with fancy macros might be nice

#

In my experience, that's an uncommon enough occurrence that it's not worth optimizing for

spark tiger
# fleet cedar What do you mean

nvm after thinking about it more than one minute I realized it doesn’t make sense

  • the pointer should point to the actual data meaning I’d have to keep in memory the whole file + extra 8 bytes (if my understanding of pointer64 meaning it consists of 8 bytes) for each uhh field
fleet cedar
#

Oh, you mean pointers for each u8? Yeah don't do that

spark tiger
#

okay no that won’t work either ig as i’ll have to access these fields somehow but i can’t create a struct like that in rust

#

guhhhh

dawn ledge
#

nom is great

#

i've used it before

#

you can do byte level, it has good helpers too

spark tiger
#

also I’m not sure which of those I need to use to get the bytes: BufReader or Cursor or File or something else

dawn ledge
#

its really simple
you have a function with takes some input -> you call some nom helper, it you give you a result of the parsed data and the remaining input -> you modify the parsed data as you like, you return the remainiing input and your data

#

you can use either of those 3

#

they all implement io::Read

#

if you want peak performance you can look at how dbs handle files, they do insane optimization for speed and how files are actually read

spark tiger
#

mistake it was so easy in python unpack("<h", file.read(4))

dawn ledge
#

you can do that in rust too
with out any dependencies

#

and fairly easily

spark tiger
spark tiger
dawn ledge
#

apparently h in unpack is a short, does python discard the extra bytes

fleet cedar
#

The buffer’s size in bytes must match the size required by the format, as reflected by calcsize().

#

struct.unpack gives error if size mismatch

dawn ledge
dawn ledge
# spark tiger you mean db readers made in rust?

like how dbs handle files in general, you can apply the same concepts in rust; but then again, thats only if you're really really concerned about perf, most of the time you can get away with normal file reads

spark tiger
fleet cedar
#

I prefer reading the whole thing into a Vec<u8> first, or sometimes mmapping it

#

Interleaving parsing and io is not my cup of tea

spark tiger
spark tiger
dawn ledge
#

what kind of format are you parsing

fleet cedar
#

With Vec<u8> yes

#

With mmap, no

dawn ledge
#

mmaps let you buffer

#

or is chunking the right wordd

#

i never got past reading the docs of mmaps and then i gave up cause pointers were involved superyes

spark tiger
fleet cedar
#

Mmap tells the os to make a file available as if it was ram

spark tiger
dawn ledge
#

i'd recommend nom tbh
it has a ton of helpers and needs little getting used to

#
fn from_hex(input: &str) -> Result<u8, std::num::ParseIntError> {
  u8::from_str_radix(input, 16)
}

fn is_hex_digit(c: char) -> bool {
  c.is_digit(16)
}

fn hex_primary(input: &str) -> IResult<&str, u8> {
  map_res(take_while_m_n(2, 2, is_hex_digit), from_hex)(input)
}

fn hex_color(input: &str) -> IResult<&str, Color> {
  let (input, _) = tag("#")(input)?;
  let (input, (red, green, blue)) = tuple((hex_primary, hex_primary, hex_primary))(input)?;

  Ok((input, Color { red, green, blue }))
}

the example in the readme shows pretty much all you need

spark tiger
dawn ledge
#

no clue

#

i do like the idea of rolling out your own parsing helpers but i wouldnt recommend it to a beginner (rust can be horrid)

spark tiger
#

rust is so hard compared to what I’ve used so far (c#, py) slugpensive

fleet cedar
#

I just handroll stuff with ```rs
let foo = f.u32()?;
let bar = f.slice(foo as usize)?;

dawn ledge
#

wires

#

what kinda traits are you using

#

where do in get funny slice method

fleet cedar
#

Declared on the Reader object

#

The only traits involved are a pair of extension traits that add u32 as an alias for u32_le or for u32_be, for the common case that a file is primarily a single endianness

dawn ledge
#

i recently saw a crate that used a dsl or i think yaml to descriibe formats ande generate parsers for it

#

well not recently

#

been a year

fleet cedar
#

There's kaitai-struct for that

#

But it kinda sucks

dawn ledge
#

idk if it got better

dawn ledge
#
def pixel = {
    red <- u8,
    green <- u8,
    blue <- u8,
};

def main = {
    width <- u16le,
    height <- u16le,
    pixels <- repeat_len16 (width * height) pixel,
};

i like their dsl tho

#

can someoen make treesitter but for binary formats

spark tiger
dawn ledge
#

depends on the data you're parsing

spark tiger
#

say, I need a func to get an LE u32

dawn ledge
#

take 4 bytes and u32::from_le_bytes

fleet cedar
#

Everything I've seen about nom seems terrible, it seems extremely unfocused

#

Like, what's even its audience?

#

The streaming stuff seems like it's for parsing network protocols

#

But then why are combinators for stripping whitespace

spark tiger
fleet cedar
#

How do I read a u32 and then parse data at that position?

#

That is an extremely common operation in binary file formats, but rare in streaming formats

dawn ledge
#

map(take(4), |s: &[u8]| u32:from_le_bytes(s.try_into().unwrap()))

fleet cedar
#

And seriously, let (input, _) = tag("#")(input)?;? That's the best you can do?

#

input.check(b"#")?, bruh

#

input.u32_le()?

dawn ledge
#

its horrible but it does the job

#

its like kitchensink of parsing

dawn ledge
#

jeez im slowly loosing my ability to type english

spark tiger
# dawn ledge or this

from their examples it doesn’t really seem like i can do something like that there

struct File {
    name_len: i32,
    name: String[name_len],
}

struct Folder{
    name_len: i32,
    name: String[name_len],
    files_count: i32,
    files: [File, files_count],
    subfolders_count: i32,
    subfolders: [Folder, subfolders_count]
}```
#

does it even support arrays

fleet cedar
#

If your format contains pointers, I would unironically recommend my gospel

#

Looking at them again, the docs are a bit cringe in places, though

fleet cedar
#

Yeah, that's one of the cringe parts

dawn ledge
#

okay nvm fathom does not come as a library

dawn ledge
fleet cedar
#

It felt very clever when I wrote it, but in retrospect it doesn't exactly aid discoverability

dawn ledge
#

Result<()>

fleet cedar
#

Result<()> my beloved

#

Though on the other hand, without that trick there'd be {u,i}{8,16,32,64,128}_{le,be}, plus f{32,64}_{le,be} = 24 functions for primitives, and another 10 for ptr32_le and that'd clutter the docs quite a bit

spark tiger
dawn ledge
#

yeah

#

society if discord let me forward messages

spark tiger
# dawn ledge

tbh his message doesn’t
make his decision any clear lol

#

I mean I get they don’t have any choice but to follow these regulations but

#

but removing people from contributors?

royal nymph
valid jetty
#

i am a binary format

fleet cedar
#

Something something nonbinary

grim flare
#

i am water bottle dispenser

fleet cedar
#

Are you enjoying being a water bottle dispenser

deep mulch
#

you are a tomato

fleet cedar
#

le gasp

#

Plot twist!

wicked stump
pearl stagBOT
# wicked stump This adds more context which i think is useful https://social.kernel.org/objects...

@tusooa@kazv.moe Heh, you're trying to convince a "Russian identified person" in one of the senior positions in the Linux Foundation that the Linux Foundation is being unfair towards "Russian identified people." It's pretty hilarious.

I'm not a lawyer and I don't speak for the LF, so I won't give you any kind of "official comment." But here's my view of it.

The people removed from maintainer positions were identified as employed by companies on the US and EU sanctions list. These companies are directly involved in the Russian military complex and therefore are directly complicit in war crimes being committed daily in Ukraine. If these maintainers want to think that they are "just techies helping improve the Linux kernel," or that "they are outside of politics," then they are fucking wrong. If they work for companies that develop weaponry or logistics used by the Russian military, they are complicit in Russia's war crimes, and I hold them responsible at a very personal level -- and that's my official comment on the situation.

wicked stump
#

(i didn't watch the video so i don't know what it might talk about, but i know about the situation in general)

left blaze
dawn ledge
#

society if people stopped going to wars

#

jsut eep all day

nimble bone
dawn ledge
#

:(

royal nymph
dawn ledge
#

are u okay bro?

spark tiger
nimble bone
#

if you’re using a non-commercial license, you cannot opt out of the collection of anonymous usage statistics.
husk

frosty obsidian
#

if its free, you're the product

spark tiger
valid jetty
#

IDEs are overrated and i will die on that hill

frosty obsidian
#

only a couple languages actually really need one

#

webstorm useless

spark tiger
frosty obsidian
#

use vscode

pseudo sierra
dawn ledge
#

i shall interject for a moment; nvim

fleet cedar
#

Nvim

pseudo sierra
#

nvim my beloved

spark tiger
nimble bone
spark tiger
#

zed looks neat

pseudo sierra
#

I will never go back to an ide after nvim

nimble bone
#

vscode just works

frosty obsidian
#

you need an ide for jvm stuff too

dawn ledge
#

do you reaaaaallllllly neeed an ide

pseudo sierra
#

need? no. really fucking useful? yop

frosty obsidian
dawn ledge
#

its useful sure but why would i spend 2 minutes opening an ide when i could spend 2 hours configuring nvim to give me peak experience :^)

pseudo sierra
#

try kotlin on nvim and you realize really fast why ppl use jetbrains for that

spark tiger
frosty obsidian
#

for other languages vscode/(n)vim/nano etc works fine

dawn ledge
#

see the solution is to not do kotlin
i tried doing cadence on whatever shitbrain's thing was for kotlin (it refused to work)

pseudo sierra
#

nano nop

frosty obsidian
dawn ledge
frosty obsidian
#

ides are beefy

dawn ledge
#

this is why i dont like ides, i dont use most of their tools anyways

spark tiger
frosty obsidian
#

they all use intellij as a base

dawn ledge
#

i could probably make nvim handle kotlin/java in a sane way but thats only if i ever touch j*va

frosty obsidian
#

good luck

#

kotlin doesn't have a first party lsp

fleet cedar
#

Makes sense since the first party has their own line of ides

dawn ledge
#

yeah well i am not gonna be doing kotlin and or java in the foreseeable future

spark tiger
frosty obsidian
#

gradle is a jvm thing

#

intellij just syncs gradle on launch

#

gradle being slow isn't something jetbrains can do anything about

royal nymph
#

i mean i have a jb license so not a big deal

#

but still

frosty obsidian
#

is go support not great in vscode

royal nymph
#

goland is nicer

dawn ledge
#

but i'll take anything that runs

frosty obsidian
#

they are not good

royal nymph
#

goland jumpscare

dawn ledge
#

as opposed to the one time i opened jetbrains apps

frosty obsidian
#

EW DEFAULT THEME

nimble bone
#

vee will use catppuccin

pseudo sierra
#

wait vee have you themed anything on your system

dawn ledge
#

noooo vee is a gnome user

frosty obsidian
#

vee likes gruvbox

royal nymph
#

vscode, terminal

nimble bone
#

gnome so good

frosty obsidian
#

iirc

royal nymph
#

vscode

spark tiger
#

btw @dawn ledge what's so bad about zed
this looks like a nice FOSS project that is both fast and p simple

royal nymph
#

well

dawn ledge
#

(i tried pre official binary launch so take my opinion as outdated) but its veryy buggy and sucks

royal nymph
#

thats more like it

dawn ledge
#

linux atleast

royal nymph
valid jetty
nimble bone
#

Elle lsp

valid jetty
#

it worked fine

dawn ledge
calm ruin
frosty obsidian
#

programmers can't do their job without anime girl in the corner

valid jetty
fleet cedar
#

I have my anime girl centered

royal nymph
#

not a typo

spark tiger
#

my only issue with zed on windows was some LSPs not working but I'm not sure if it's Zed's issue rather than Treesitter (afaik that's what it uses for like LSPs, linters and all that stuff) as I've had some issues with them not working in nvim either huntershruggy

nimble bone
#

my current theme (i am very indecisive)

frosty obsidian
calm ruin
dawn ledge
frosty obsidian
#

yes

royal nymph
frosty obsidian
#

that is why they did that

pseudo sierra
royal nymph
#

Fprintln

#

fprintln

nimble bone
calm ruin
#

DELETE

dawn ledge
royal nymph
#

NVM WHY NIX

calm ruin
#

why does red theme even exist in default vscode themes

valid jetty
royal nymph
#

REMOVE THE NIX STUFF

pseudo sierra
#

LMAO

valid jetty
#

i hate pascal case so much

royal nymph
#

send wallpaper (WITHOUT THE NIX STZUFF)))

frosty obsidian
valid jetty
#

snake case > camel case > kebab case >>>>>> pascal case

pseudo sierra
royal nymph
#

u guys almost made me forget what i wanted to do

frosty obsidian
#

pascal snake case

spark tiger
royal nymph
#

i will add Country to this

pseudo sierra
valid jetty
pseudo sierra
#

replace it with ferora logo or smth

calm ruin
royal nymph
frosty obsidian
#

if i have to write a plugin for my ide to work then its a bad ide

calm ruin
royal nymph
dawn ledge
#

peak theme

#

man i need to hop off nvchad

spark tiger
pseudo sierra
#

flashbang

frosty obsidian
#

its a good text editor though

calm ruin
frosty obsidian
#

i can't use light themes bc it fucks with my astigmatism

spark tiger
valid jetty
#

i tried to get that on zed but i couldn’t figure it out

spark tiger
#

rustcsharp-analyzer widegladeline1widegladeline2widegladeline3

dawn ledge
#

ghostty has panes and tabs inbuilt but i still use tmux cause ghostty uses gtk (gtks sucks ass)

pseudo sierra
#

wezterm vennielove

valid jetty
#

im not so sure that’s right

spark tiger
#

why are all the terminal emulators not available on windows slugpensive

#

why is nothing available on windows

nimble bone
frosty obsidian
#

has the zed team put any focus into actually releasing on windows or are they still obsessed with ai

calm ruin
spark tiger
calm ruin
#

it doesnt need need stuff like terminal emulators

valid jetty
spark tiger
#

at least that's what their site says

nimble bone
#

windows terminal so good

frosty obsidian
#

2 months

valid jetty
#

everyonnehates windows if you want windows stuff use wsl

dawn ledge
#

i've tried all sorts of editors sublime, atom, vscode, zed, admittedly even shitjetbrains but nvim is just great
i love being able to customize everything with (bad) lua

dawn ledge
#

zed devs are ai shills

#

this is why i dont like zed

#

i dont fucking need ai

#

i hate ai

frosty obsidian
#

i just want zed to run on my computer

valid jetty
frosty obsidian
#

the thing a program is supposed to do

dawn ledge
nimble bone
#

why is ai soooo bad

#

it can be good

frosty obsidian
#

they managed to write a 2d ui framework that just doesn't work sometimes

dawn ledge
#

i have been programming without ai since forever and even when i was in the copilot test group it didnt do much (well it was a preview release) but still ai doesnt really contribute much to me in general and i really hate ai cause everyone around me are fucking idiots and think ai tools are like some omnipotent things

spark tiger
dawn ledge
#

js framework memes but rust gui crates

frosty obsidian
#

zed just dislikes my gpu

dawn ledge
#

i am guilty of being a part

frosty obsidian
#

my gpu meets the posted requirements but just doesn't work

pseudo sierra
#

do yall think windows would suck less ass if it was unix like

dawn ledge
#

no

#

it would suck less if they replaced the kernel with the linux kernel

fleet cedar
frosty obsidian
#

i know it can run it just doesn't

spark tiger
frosty obsidian
#

i did

spark tiger
#

ah

frosty obsidian
#

thats how i know it doesn't work

#

i used a community build and built it myself and neither worked

dawn ledge
#

whenever i see some nice gui app its either macos only or windows only and i as a linux user am left out

frosty obsidian
#

surely that won't take long

dawn ledge
#

every year they go "this is the year of the linux desktop! i swear!" and the cycle continues

frosty obsidian
dawn ledge
#

ikr

#

they gotta be able to pay for the overpriced dev license

frosty obsidian
#

apple is definitely the platform to use if you hate having money lying around

pseudo sierra
frosty obsidian
dawn ledge
#

most apple users earn enough to buy the newest iphone every year

spark tiger
#

automod hates me

frosty obsidian
#

tessie not sniping you

#

weird

#

i think its the $50 that got you

pseudo sierra
#

yop

dawn ledge
#

i have seen 2 types of apple users

  1. they have too much money and are obsessed with their walled garden
  2. have no clue what ios is and have an iphone just to show off
frosty obsidian
#

bc spammers always promise $50 steam gift cards

spark tiger
#

lol

#

just compiled zed and why is it 500kb max file size for lua thonk

dawn ledge
#

seems like a lua ls issue rather than zed

frosty obsidian
#

the wording implies you can increase that limit

spark tiger
spark tiger
#

also niko reference

dawn ledge
#

oneshot here i think refers to channels

spark tiger
#

idk why it fails to use rust-analyzer even tho it works well in nvim

dawn ledge
#

well

#

as you can see

#

the rust_analyer binary

spark tiger
#

it even tries to access the rust-analyzer from nvim's mason packages (the one that alr works in nvim)
[2024-10-24T21:10:39+03:00 ERROR fs.rs] Error { code: -3, klass: 2, message: "failed to resolve path 'C:/Users/faint/AppData/Local/nvim-data/mason/packages/lua-language-server/meta/3rd/busted/../../../.git/modules/meta/3rd/busted': The system cannot find the path specified.\r\n" }

dawn ledge
#

windows issues

spark tiger
autumn sigil
#

i like my supermaven autocomplete but i hate all other usage of it

spark tiger
#

tho I'm not sure the error highlighting is supposed to look like uh that

#

like the "waves" look too uh big

ornate quiver
#

spooktober

deep mulch
#

scary

ornate quiver
valid jetty
#

already seen like 6 times lol

#

but i did watch it again

ornate quiver
#

oh lmao

autumn sigil
#

what xd

ornate quiver
#

bad panic handler

fleet cedar
#

Probably something that panicked on drop

#

Also, mood

dusty moth
timber root
#

fellow vencorians, im programming newbie and trying to make table of elems with numerated ids for later use in my js, but all of them lack numbers in their ids, why could this happen?
code:

let tableRowsPattern = `
    <ul class="mTRow" id="mTR{{i}}">
        
    </ul>
`
let rowTemp = Handlebars.compile(tableRowsPattern)
for (let i = 0; i < 16; i++) {
    mainGrid.innerHTML += rowTemp(i)
}
dusty moth
#

never used handlebars but i bet that, since it templates variables by name, you're supposed to pass an object