#đŸȘ…-progaming

1 messages · Page 45 of 1

dense sand
#

@valid jetty do you have gc implemented

formal belfry
#

Roie Codes

austere anchor
#

nooo

valid jetty
#

not really

#

just external functions so you can link with libraries

#

but that lets me put stuff in a runtime and not include the body of every stdlib function in every compilation which is really slow

austere anchor
#

o

valid jetty
#

it acts like a header but it's just a normal elle file

dense sand
#

For heap allocation

#

And gc

fleet cedar
#

You're implementing your own jvm?

valid jetty
#

gc is quite simple if you know where the top and bottom of your stack is so you can scan roots

#

the basic premise is you just scan the stack for allocated pointers, then use those pointers to scan their whole region recursively until you find no more pointers

#

whatever you find stays

#

whatever you don't find goes

#

i must've explained this so many times by now xd but yea

dense sand
#

Is this the mark sweep thing ive read about

valid jetty
#

yes

#

you need to scan the "roots" aka where the start of the recursive chain is, where you find the first pointers into the heap

#

depending on your runtime that may be the stack, static memory, etc

#

if you wanna optimize it you can also remember what you last used as the "marked" variable (whether you use true or false) so that you can make things that were marked before stay marked to make it faster because you knows if a pointer is still in scope then all of its pointers that you can find from it will also stay in scope

#

but that's probably out of scope of what you wanna do

#

you can read my gc is quite simple

#

i don't do the optimization thing i just unmark everything before scanning again

#

which is slow but whatever

dense sand
#

For the allocation itself, freelist is a good goto for heap?

valid jetty
#

yes definitely

#

i do just a naive tracking allocator with a linked list bucket hashmap to keep track of every allocation's pointer

#

it would be way better to have a freelist and reuse memory instead of freeing it because allocation and deallocation is slow

dense sand
#

Nice thanks

dense sand
#

But im not sure if im fitting that

valid jetty
#

i don't think making a jvm to practice your c skills is a good idea lol

dense sand
#

Just a minimal example obv, nothing serious

fleet cedar
#

Sounds like a cool project imo, as long as you don't expect to make anything competitive

dense sand
#

Obviously not

#

Just an mwp

valid jetty
#

for me i think writing something like a language that uses c semantics is better because you can compare what you're writing to c itself and to be able to do that you have to know c

#

i now know c fluently and i haven't written a single line of c code directly lol

#

but i may be biased

fleet cedar
#

Problem with c is that c sucks

valid jetty
#

true

dense sand
#

Pretty comfortable with it

#

The worst thing about it tbh the toolchaining

#

Cant there be something inbetween makefiles and cmake

valid jetty
#

the worst thing about c is the verbosity imo

fleet cedar
#

Headers

valid jetty
#

typedef struct {} Foo;

#

oh and headers yes

dense sand
#

I dont mind headers

#

I have 1 header

valid jetty
#

and like, duplicate symbols

#

lol

dense sand
#

Or wdym

valid jetty
#

yes but the fact that needs to exist at all is annoying

dense sand
#

I guess i just like verbose languages

valid jetty
#

me too but sometimes it's a little much

fleet cedar
#

I hate verbose languages

#

I want to write the important parts, the unimportant parts should be handled automatically

valid jetty
#

if you had to know how many abstractions are going on to make this simple code work

use std/prelude;

fn main() {
    x := [1, 2, 3];
}
``` C could NEVER
#

equivalent code in C probably

#define DYNARR_IMPLEMENTATION
#include "dynarr.h"

DEFINE_ARRAY_T(int);

int main() {
    Array_int x;
    Array_int_push(x, 1);
    Array_int_push(x, 2);
    Array_int_push(x, 3);
    return 0;
}
#

i could write an api for it like this with macros

dense sand
#

I love realloc

valid jetty
#

true

dense sand
valid jetty
#

the one in elle can be pushed and popped from

keen spoke
#

dynamic should be explicit

fleet cedar
#

Dynamic by default is fine in languages like python

#

But seems fishy in compiled languages

valid jetty
#

idk elle is more high level now even though it's compiled

austere anchor
#

I would also be assuming [...] is static array

winged mantle
#

the vec! part: just to make programmers feel clever because they need to type more

austere anchor
#

i mean normal [] in rust is static

#

so

valid jetty
#

elle has #[] for static

#

i will eventually add attributes or whatever to them

deep mulch
#

@valid jetty Elle JVM

jade stone
#

@valid jetty make Elle compile down to js

austere idol
valid jetty
spark tiger
fleet cedar
#

Why link to a twitter image of the thread instead of the thread itself

spark tiger
icy needle
#

@valid jetty how many passes do you do for codegen?

#

i think i'll wanna do 2

valid jetty
#

1

icy needle
#

damn

austere idol
valid jetty
#

it breaks stuff like self recursive functions

#

because their declaration isnt defined

#

so i need to declare its header while compiling the body and remove it after the body compilation is done but before adding the declaring the real function with its body

#

along with a bunch of other hacks to keep it single pass

icy needle
#

one for declarations and one for definitions

supple whale
#

this feels.... wrong

valid jetty
supple whale
#

toolchain 'nightly-x86_64-pc-windows-msvc' does not support target 'wasm64-unknown-unknown';
pain

valid jetty
#

you cant really recurse yourself in a lambda so i exclude them from this thing

#

thats pretty crazy

#

6060 lines of elle code

#

the rest is rust

#

and i actually have a lot more in other repos too hm

#

2018 lines of elle code in aoc solutions

supple whale
#

has anyone ever compiled C libraries via Rust?

#

considering it because of how simple rust/cargo is in comparison to anything C related

valid jetty
#

does rustc also compile C???

supple whale
#

idk

#

im very much a rust/native noobie

#

all examples i look at are "hey lets do it with our own self-made hello world"

#

meanwhile i want to compile gigabytes of ready, 3rd party dependencies

#

and cant find any1 doing that

valid jetty
#

you can link with 3rd party dependencies via rust???

#

rustc does not compile C code if thats what youre asking

supple whale
#

ah, so i'd still be doing linking via gcc

#

poo

fleet cedar
#

But no, the step of actually compiling the c is, naturally, done by a c compiler

supple whale
#

yeah that probs wont help me much, unforunate

fleet cedar
#

If you mean "the c tooling sucks, let's use the rust tooling for c instead", miracles aren't real

supple whale
#

unfortunately lol

placid cape
placid cape
valid jetty
placid cape
#

yeah yeah but it's just a great resource

valid jetty
#

i guess so

#

wasm isnt really in my plans atm because it will take so long

placid cape
#

you should focus on enums

valid jetty
#

im just focusing on whatever i feel doing / something that pops up in my head lol

#

the set_allocator thing was completely sporradic i did it in one evening because it just popped into my head that i can do it like that

valid jetty
#

c++ compiler husk

supple whale
#

how does wasm-bindgen have 0 documentation around memory init

#

how the fuck do i init memory or specifify its size and max size

#

like why do you have this, and why cant i do anything to change whats in it

#

D:

icy needle
#

and you can build them through build.zig along with all your other files

#

also you can convert c code directly to zig too

supple whale
#

this shit never is included

#

idk why

valid jetty
austere anchor
#

omg Result<T, Box<dyn Error>> so good

valid jetty
#

true

icy needle
#

i mean they do have the funds i guess

keen spoke
valid jetty
#

i disagree

#

dynamic arrays are really fucking useful in statically typed languages

keen spoke
#

I didnt say they are useless

valid jetty
#

yea but idk

keen spoke
#

Dynamic is a more abstract concept than static, so it should be second class not first

#

If your language isn't treating dynamic as first class

valid jetty
keen spoke
#

realloc only works on heap allocated memory

valid jetty
#

yes but the buffer you get is still static

keen spoke
#

Aka dynamic allocated, not stackalloc

valid jetty
#

unless you resize it

icy needle
keen spoke
#

a = [] calls malloc

valid jetty
icy needle
#

oh fuck i forgot to add a raw pointer

keen spoke
#

From a DX perspective

valid jetty
#

considering how high level elle is i would expect it

keen spoke
#

Kotlin solved this extremely elegantly

listOf()
mutableListOf()

valid jetty
#

sure i guess

keen spoke
#

Functions are first class

valid jetty
#

why would you ever make an empty listOf() xd

keen spoke
#

listOf by default, static
mutableListOf explicit, dynamic

keen spoke
#

However listOf(1) allocates a new object

valid jetty
#

yeah but if listOf is immutable why would you ever make an empty one

#

what use does it have

keen spoke
#

If you wanna be expressive you can also use emptyList() instead of listOf()

keen spoke
icy needle
#

what would you even allocate with 0 length tho

keen spoke
#

For example if you wanna filter for homeless people

valid jetty
#

LMAO

icy needle
#

like only the length itself?

keen spoke
#

And define how many homes it has

#

so u use emptyList()

valid jetty
#

husk

keen spoke
#

Or listOf()

valid jetty
#

i guess so

keen spoke
#

Uses zero heap because it references a static empty list

icy needle
keen spoke
icy needle
#

if it's LA or SF then 0 allocs are a waste

keen spoke
#

Kotlin DX is insane if you take close looks at the language desifn

#

Its 99% perfect

#

Or lets stay realistic, 98%

icy needle
#

but in most places most ppl have 1 home, so 1 init makes more sense

keen spoke
#

Allocates human(homes = emptyList())

icy needle
keen spoke
#

Its just a functikn

#

Which is extremely useful as seen in DSL

icy needle
#

that's one of my annoyances with zig for example, you have a lot of stuff that could be a part of syntax but is just some std method

keen spoke
#

Not sure wym

icy needle
valid jetty
keen spoke
icy needle
keen spoke
#

Mutability is more abstract than static

icy needle
#

a lot of things are pointlessly verbose

valid jetty
#

simpler for compilation

keen spoke
valid jetty
#

oh well

keen spoke
#

C# has worsen in language design due to backwards compatibility requirements however its extremly versatile and gives you atomic control over memory

valid jetty
#

c# is also microsoftware

#

and you can tell

keen spoke
#

Its managed and unmanaged and has every nieche features around memory you can imagine

keen spoke
#

It was good until like c# 8

#

Then it got weird

#

Legacy syntax as well imo, like java

valid jetty
#

java still doesn’t have a shorthand to write to stdout

keen spoke
#

Java is pretty much metbods, classes and fields and a little sugar for statement body

#

It's vanilla the same way c is

#

However abstract languages are suitable for abstract purposes which makes kotlin extremely suitable for pretty much everything real world

icy needle
supple whale
#
#[wasm_bindgen]
#[target_feature(enable = "simd128")]
pub fn hash_sha256(data: &[u8]) -> Vec<u8> {
    blake3::hash(data).as_bytes().to_vec()
}

are those valid macros? shit compiles, but am i correct in assuming that if there's no SIMD128 then this function will just error or do nothing?

supple whale
#

great

fleet cedar
#

That's what it says, I don't know the details

supple whale
#

fuck man, how is wasm developing so slowly

dense sand
#

Whats the best way to manage dependencies for my c project

supple whale
dense sand
#

Cause like my project depends on a C library, should i just make it a git submodule

supple whale
#

its insane cancer

dense sand
#

Okay

supple whale
#

yeah, thats usually the expected flow

supple whale
dense sand
#

@supple whale should i be putting my header files into include/ instead of src/

supple whale
#

honestly

#

i dont know

#

i've been doing C for 2 years, and i still have not managed to get a working header files setup that has intellisense

dense sand
#

lmao

#

i usually just run bear -- make which makes compile_commands.json file for my clangd lsp

#

and that works

fleet cedar
#

Imo include/ is for consumers, i.e. the public interface

#

If you're making a program rather than a library, there's no benefit in separating them

dense sand
#

i see

valid jetty
#

i wonder

#

i put the elle stdlib in /usr/local/include/elle is that a good idea

dense sand
#

why not just /usr/include?

valid jetty
#

because /usr/include is used for headers of system packages as far as i’m aware

dense sand
#

theres stuff for things like qt here

#

i mean, usr/local/include is empty for me

valid jetty
#

plenty of things in there for me like node iirc

fleet cedar
#

/usr/ is for things managed by package manager, while /usr/local/ is for things installed manually

dense sand
#

oh i ssee

#

i should install differnetly then xd

valid jetty
#

elle installs there through the makefile, so “manually”

#

wow the bot doesn’t wanna do the thing

pearl stagBOT
# valid jetty <https://github.com/acquitelol/elle/blob/rewrite/Makefile#L25-L33>

Makefile: Lines 25-33

install-runtime:
    @rm -f $(RUNTIME_PATH)/libelle.o
    @rm -f $(RUNTIME_PATH)/libelle.a
    # must be compiled without anything because this is the module creating it
    # its fine because those modules are actually just headers anyway
    # this is just so the headers dont overwrite the implementation in the stdlib
    ellec $(STD_PATH)/runtime/index.le -o libelle.o -c --noalloc --nogc --nosm --nofmt --nostd
    @ar -rcs $(RUNTIME_PATH)/libelle.a libelle.o
    @rm -f libelle.o
valid jetty
#

there we go

dense sand
#

can someone give me any names for my jvm runtime

#

gipity gives bad

valid jetty
#

jim

#

anyway if it were me i would call it a flower so don’t ask me

dense sand
#

dandelion

placid cape
placid cape
#

void main() { println("a") }

fleet cedar
#

I don't know what language that is but it ain't java

#

I do love js's print function though

placid cape
placid cape
supple whale
#

good joke!

runic sundial
#

What are you using then?

supple whale
#

"vscode"

#

but not really

runic sundial
#

I mean in the most esoteric case

#

make can be used to trigger cmake to generate a compile_commands.json

#

And then any LSP backend that supports clangd

supple whale
#

idk, the shit im working with cant even be compiled on windows

#

its utter cancer

runic sundial
#

The thing I said should work on any platform

#

Literally the most scuffed approach that's worked for me in the past

supple whale
#

so i gotta open it on windows, mount wsl, and compile it that way

#

if it calls cmake on windows it already wont work

#

the absolute state of wasm.

runic sundial
#

You just need the compile_commands.json

#

And for the headers to be visible to clangd

#

Should be enough

supple whale
#

here

#

i'll pay you to prove me wrong

runic sundial
#

You can't pay me enough to get out of bed

supple whale
#

then do it tmrw

#

i dont rly care

runic sundial
#

Wait so you're developing this from Windows

#

But it only compiles on Linux?

supple whale
#

yes!!!!!!!!!

runic sundial
#

That's a touch deranged but now I understand

#

Is there a reason your cpp project uses make over cmake?

placid cape
#
  • why windows 😭
runic sundial
#

Prolly used to it

valid jetty
#

zed >>

runic sundial
#

If you're used to getting work done on Windows, switching is a miserable process the first time

supple whale
supple whale
supple whale
#

the same process on linux has a 60% chance of bricking ur install

runic sundial
#

On NixOS I don't even need to install stuff

supple whale
#

and the sheer amt of perm issues that doing anything causes is insane

#

the first thing i do on every linux distro i install, is set fmask and dmask to 777

runic sundial
#

I can just create a shell with a particular program or hell even compile time library present

supple whale
#

the default flags for files directories etc

#

so creating any directory and file will set its perms to 777 by default

runic sundial
#

What the fuck

supple whale
#

and flat out fixes 99% of issues created during installation of anything

runic sundial
#

Just stay on Windows

supple whale
#

yeah i know its a bad idea for security

#

but i'm not daily driving linux, i'll spin up a vm for 15 minutes to get smth done quickly

#

then nuke it

runic sundial
#

No, it's also that certain programs expect certain permissions

#

I really haven't had permission issues when installing stuff

#

But again, on Nix if I want to run an application that I don't have it's just one command

supple whale
#

yes, but its rare, it will be a problem 1 in 10000, where as masks fix the other 99999 issues

runic sundial
#

When I close the shell, program gone

#

Still cached, but I can run a GC to clear the cache

supple whale
#

yeah

#

you see

#

i like pressing a button and hainvg things just work

#

and not needing to spend 30 mins to get it to work

#

which is why i fucking hate compiling C programs

#

its hell

#

how the fuck can a build script not work out of the box

#

what the fuck do you mean i need to fix your build script

#

what/????

runic sundial
#

I like being able to pull in a particular version of make or ninja or gcc or llvm to compile a neiche program

#

I can just throw a direnv file and a nix flake into a directory

#

And it will setup everything if I cd into that directory

#

And commands just run

#

Gaming tho? I agree

#

Sometimes it works, but the moment it does not I ain't fixing it

#

I'm rebooting into Windows and enjoying my video game

supple whale
#

none of the games i play work on linux

#

simple reason

#

anti-cheat

#

anywas

#

@runic sundial if ya can fix that build, i'll actually pay you

#

if you get pthreads working i'll double it

#

cuz i've gotten to the point of "fuck this" where i'd rather just throw money at the problem

placid cape
supple whale
#

case in point: eac being illegally used to access people's PCs

#

giga known in playrusts scene, noone cares

ornate quiver
ornate quiver
#

im liking solidjs + tailwind quite a lot tbh

#

it's like react but not react

#

@deep mulch hop off compose web use solidjs

deep mulch
#

too lazy to

dense sand
#

I love paying for foss!

hard tapir
#

I don't understand. I just started learning Rust but the required supplies is this?? What does it have to do with programming?

placid cape
fleet cedar
civic oar
#

would it be possible to make something to hide people you block or ignore entirely other than the already existing blocked/ignored list in settings

placid cape
#

hide where?

#

like in chat?

valid jetty
#

bad latex alternative

civic oar
#

hide from chat already exist

atomic brook
#

@jade stone If I'm not wrong you're on nix

How tf do you setup vim with proper lsp there if mason can't do shit

#

I'm thinking about trying nix again

#

And I don't wanna feel that pain with vim again

placid cape
#

Typst is amazing

#

I love it

valid jetty
#

i know lol that was satire

#

do you know if nvim has syntax highlighting for it

#

found one

#

so good

hoary sluice
#

is there a latex to typst compiler

valid jetty
#

idk

hoary sluice
#

omg there is

placid cape
valid jetty
#

lmao yea i saw that

#

insane

placid cape
#

you can do anything in typst

jade stone
#

I use nix.d and its olay

atomic brook
jade stone
jade stone
keen spoke
viscid grove
#

tom wildenhain reference!??!

atomic brook
#

espesially this line

jade stone
#

I'm going to move away from lazy soon

#

I'm planning to go to Nixvim

atomic brook
#

anyway, i have a really nice time rn

#

oh it's up

jade stone
atomic brook
#

I'm downloading a fucking iso

#

while my internet sends a message in a 10 seconds

jade stone
#

why not just use a browser

atomic brook
#

it will take an eternity to download

jade stone
#

?

atomic brook
# jade stone what is that UI for downloading
services:
  ariang:
    image: hurlenko/aria2-ariang
    ports:
      - 3030:8080
    volumes:
      - ./Downloads:/aria2/data
      - ./config:/aria2/conf
    environment:
      - PUID=1000
      - PGID=1000
      - EMBED_RPC_SECRET=true
      - RPC_SECRET=nop
      - ARIA2RPCPORT=443
    restart: unless-stopped
atomic brook
#

and delete everything it has downloaded

#

using aria i can at least continue where i was left

jade stone
#

if your connection is that bad, why not just use the CLI installer

#

its 1/2 the size

atomic brook
#

you don't understand

#

it can't

#

I was waiting 10 minutes to download 60mb

#

and my connection droped a few times

jade stone
#

at that point, just download a lightweight iso

#

and then install nix on it from there

#

(nix is easy to install from any ISO (or so ive heard))

atomic brook
#

if my connection drops everything i've downloaded thus far will get deleted

#

so i don't use browser for downloads

#

accurate

jade stone
#

@atomic brook torrent an arch ISO

#

arch provides official torrents

atomic brook
#

For this i should download qbittorrent first

#

also i use aria not just for iso

#

but for everything i need

jade stone
atomic brook
#

it's an iso + qbittorrent

jade stone
#

i feel like a torrent would be more reliable in case your connection drops

atomic brook
#

well

#

aria has no problem with it

#

hence most of the websites supports it

#

i've forgot which header is that

#
MDN Web Docs

The HTTP Range request header indicates the part of a resource that the server should return.
Several parts can be requested at the same time in one Range header, and the server may send back these ranges in a multipart document.
If the server sends back ranges, it uses the 206 Partial Content status code for the response.
If the ranges are inva...

placid cape
keen spoke
supple whale
atomic brook
#

Can someone explain how tf when my internet dies I also can't connect to my local network at all

fleet cedar
#

That ip is assigned by your router

#

If your router is dead, it won't listen

atomic brook
#

yeah but like

#

my router is kinda alive?

#

only internet connection is awful

#

so idk

spark tiger
supple whale
#

sounds like ya'll have dogass routers

atomic brook
#

dogass isp as well

#

but yeah, my router is horrible

supple whale
#

isp doesnt impact ur default gateway

#

:^)

atomic brook
spark tiger
#

so i don’t think it’s router’s issue

dense sand
#

@supple whale still hjaving the problems with the sidebar:

className={`fixed left-0 w-64 -translate-x-[100%] overflow-hidden overflow-x-hidden top-0 h-screen bg-[#151520] shadow-lg border-r-2 border-[#18181B] transition-transform duration-700 z-50 ${
            isOpen && "translate-x-[0%]"
          }`}

this still doesnt work...

#

its basically what you told me to do lol

ornate quiver
#

i figured out the problems with my flexbox layout in my sleep last night
/srs

supple whale
#

taking showers and taking shits also works great for figuring out problems

#

i have days where i shower 3 times a day

supple whale
#

"click and find issue" is easier

#

if u use vscode yeet me a share instance

dense sand
#

okay

#

its just that if im not making any other arbitrary mistake

supple whale
#

idk tbf

#

i dont have the brain capacity to spare rn sorry

#

i need to focus heavily on my shit rn

dense sand
#

okie

supple whale
#

if u have a live share session, send me a link

#

and ill take a look

#

i currently need 18 gazzilion data points, and i'm trying to figure out how the fuck to plot them

supple whale
#

poor single threaded WASM

#

utterly useless

ornate quiver
#

@deep mulch look

#

im thinking of maybe switching over to webgl
reimplementing this as a shader would be way faster i think

deep mulch
#

soon

supple whale
#

sounds like what u need

ornate quiver
#

oh huh
it is a heavy js lib tho

supple whale
#

well yeah

#

what you're trying to do is heavy

ornate quiver
#

hm actually kinda not

#

my badge is bigger than this

supple whale
#

dont blame me for whatever happens when you open that

runic sundial
#

did you know you can create an instance of an interface using pure java?
imagine the meta programming potential
a super factory builder

frosty obsidian
#

yeah

#

pretty sure thats how retrofit works

wraith rose
#

I want to code a file server and I need somewhere to host the files what open source s3 bucket can I use?

#

S3 is the holding thing and ui is seperate

#

I don't know how I would make the rest but compression and whatnot would likely help

civic oar
fleet cedar
#

Just throw it in a regular bucket

#

No need for fancy s3s

placid cape
runic sundial
#

Yees

placid cape
#

i learnt that today

#

while trying to compile things using graalvm native image

wraith rose
wraith rose
fleet cedar
#

One is excellent for holding things like fluids and debris

wraith rose
#

Nintendo switch captures take up a lot of data

fleet cedar
#

You can fit many micro sd cards in a bucket

wraith rose
#

?

fleet cedar
#

đŸȘŁ

hoary sluice
#

@valid jetty do you have a rubber duckie on your desk

#

@deep mulch @placid cape wbu

placid cape
#

i don't

#

I have avocado

hoary sluice
#

is it molded

#

molding

#

idk the word

placid cape
#

and these

hoary sluice
#

are they from ikea

#

why is ur entire room green

supple whale
#

thats should greatly satisfy them

#

JS vs WASM vs WebCrypto for SHA256 for 8B to 10 MiB

placid cape
#

I won them

supple whale
#

to get a general idea of just how bad wasm is

placid cape
#

@hoary sluice

valid jetty
#

my bed currently has a pink blahaj, blue blahaj, and hatsune miku plush

#

i talk to them

hoary sluice
hoary sluice
#

i think im gonna use my car

placid cape
#

:DDD

placid cape
valid jetty
hoary sluice
fleet cedar
#

I thought blahaj was by definition blÄ

#

This is an amazing discovery

valid jetty
#

yea this one is pink though

hoary sluice
#

you are the definition of uhm actually

#

pinkhaj

valid jetty
#

i got it for christmas from a friend

fleet cedar
#

Rosahaj

valid jetty
#

:3

hoary sluice
#

lyserĂžd haj

#

i might go back to bed progaming

valid jetty
#

@placid cape i successfully got an elle raylib example running on windows xd

hoary sluice
#

esp with the new keyboard it might be comfy now

placid cape
#

who cares about windows xd

#

but nice job

hoary sluice
#

@valid jetty is ur laptop full of hair and dust

placid cape
#

I should finally finish the parser rewrite but rn I'm in Austria

hoary sluice
#

where

hoary sluice
fleet cedar
placid cape
valid jetty
#

the command, after spending an hour installing elle, qbe rust and whatever other building deps i needed from wsl

$ ellec examples/graphics/mandelbrot.le --asm && cc -o mandelbrot mandelbrot.s -lelle -l:libraylib.a -I../raylib/include -L/usr/local/lib -lm && ./mandelbrot
hoary sluice
fleet cedar
#

I don't know how any of those words lined up, but now I want one

placid cape
#

ellep when? Elle package manager

placid cape
hoary sluice
#

oh its hallstatt

valid jetty
hoary sluice
#

ive been there

valid jetty
#

maybe i just use it a lot

hoary sluice
#

idk if ive been skiing in hallstatt tho

valid jetty
#

but like i clean it and within a day its already so dirty

placid cape
#

I hope it'll be good

hoary sluice
#

maybe cause its on ur lap

valid jetty
#

why would it being on my lap have anything to do with the keyboard

hoary sluice
#

or on a bedsheet

placid cape
#

We wanted to go to flachau but idk why my parents chose this instead

valid jetty
#

its not like putting the macbook on my desk will magically make my hands emit less oil and make the keyboard cleaner

hoary sluice
#

they usually get really dusty on bedsheets

valid jetty
#

no its not dust

#

its like

#

idk

hoary sluice
valid jetty
#

lmao

#

my macbook has no fans

#

so it inherently doesnt get very dusty

hoary sluice
hoary sluice
#

how

valid jetty
#

wdym

hoary sluice
#

are arm cpus that op

valid jetty
#

yes..?

placid cape
valid jetty
#

if it gets too hot it throttles

placid cape
#

Maybe next time

valid jetty
#

heat is emitted passively through vents between the display and keyboard

hoary sluice
#

mine operates at 92°C with fans at full throttle

valid jetty
#

i usually use it on low power mode tho because the battery lasts forever

placid cape
#

Isn't that a lot?

valid jetty
#

yes lol

hoary sluice
#

probably

valid jetty
#

then again intel cpus could fry an egg

hoary sluice
#

its been running on exactly 92 for over 2 years now

#

the gpu died

#

it runs super slow now

valid jetty
#

arm ones are definitely better in that regard otherwise microsoft wouldnt be trying to push arm chips into their laptops so much lmao

placid cape
#

wait 92°C while you're just programming in zed for example?

hoary sluice
#

yes

valid jetty
#

husk

placid cape
valid jetty
#

mine sits at like, <30*C

hoary sluice
#

im prob gonna get an arm cpu next

#

i need a laptop for uni thats not garbage

austere anchor
valid jetty
#

true

#

i really want a thinkpad with void linux on it

hoary sluice
#

this one has an i5 1240p and a 2050 and i paid 1200€ for it with legit windows

valid jetty
#

lol

placid cape
#

always buy notebook with amd cpu, not intell

hoary sluice
#

void linux meh

placid cape
#

amd cpus are just better

valid jetty
#

what other options are there for casual use?

#

fedora maybe

#

ubuntu ew

hoary sluice
valid jetty
#

debian slow

#

so also ew

hoary sluice
#

aur đŸ„°

valid jetty
#

arch is NOT for casual use

hoary sluice
#

yes it is

placid cape
valid jetty
#

its up there with gentoo

#

lmao

hoary sluice
#

no arch isnt even hard to use or anything its just good

placid cape
#

I can't imagine using debian as daily drive distro

valid jetty
#

i broke my installation within 2 hours

placid cape
hoary sluice
#

void is arguably harder to use

hoary sluice
placid cape
#

it's easy

valid jetty
#

?? void is just like debian but more modern

placid cape
#

void is amazing

hoary sluice
valid jetty
#

lolol

placid cape
#

install gentoo and waste your time by compiling everything blobcatcozy

hoary sluice
hoary sluice
#

from clicking the power button to display manager opening is less than 2 seconds

valid jetty
#

the power of macos is that i basically never use linux ever unless its for a dedicated usecase (i dont daily drive it) and today i used an apt-based wsl system and still very easily and comfortably navigated my way around and manipulated files because the command apis are basically the same as on my macbook

AND macos looks nice out of the box

#

im taking macos to my grave

hoary sluice
#

macos is too apple for me

placid cape
#

I started using void after I had broken repositories in artix and I had to uninstall some pkgs before doing system upgrade

#

And before artix I used arch which I broke when I tried to install mysql client from official repos

valid jetty
#

i wonder how hellish nix would become if i got a clean thinkpad and made sure to keep my nix configs as clean as possible

hoary sluice
#

there is a preinstalled app for everything and u have to jump a bunch of hoops to set up a system where u can run downloaded apps

valid jetty
#

what are u talking about

hoary sluice
#

my arch broke 3 times installing mysql

placid cape
#

average arch experience

#

never install mysql as system pkg

valid jetty
#

the bunch of hoops in question:

hoary sluice
# valid jetty ????? its literally just a flag you enable in settings

yes and when i was trying to install ffmpeg on a friends mac it took me half an hour because of all the protection and there not being a preinstalled package manager; you can rice any system to work fine but id prefer to build up from a minimal system than to debloat a bloated system

valid jetty
#

brew is basically the macos package manager

hoary sluice
#

its not preinstalled and i was not able to install it on his mac

#

idr why

valid jetty
#

husk

hoary sluice
#

at least its unix

valid jetty
#

yeah

placid cape
#

yea still better than windows

valid jetty
#

me when i ls -la into /usr/bin and cc and gcc are aliases to clang

#

💔

hoary sluice
#

me when curl is an alias to the powershell networking thingy

valid jetty
#

💔 💔

placid cape
#

f

#

gn guys gonna sleep

hoary sluice
#

gn

valid jetty
#

gn

#

my macbook still is very good for cross compilation at least compared to windows

#

i got a C environment working to develop extensions for my graphing calculator

hoary sluice
#

i need a snapdragon laptop with a high end amd gpu without a built in keyboard

valid jetty
#

sounds expensive

#

without a built in keyboard
??? what laptop has no builtin keyboard

hoary sluice
valid jetty
#

this is not anime

hoary sluice
hoary sluice
#

gn

valid jetty
#

wait i wanna show you something

#

search for a github repo straight from the new tab search bar

#

:3

hoary sluice
#

is that inside ur browser or is it rofi

valid jetty
#

whats rofi

hoary sluice
#

search bar

supple whale
valid jetty
#

uhh thats the arc search bar but i have this as my search engine https://unduck.link/

supple whale
hoary sluice
supple whale
#

i fucking lowe powertoys

#

the fact that microsoft made it

#

and the start menu ISNT this

hoary sluice
# supple whale

it needs to not drop below like 75k or i get margin called

supple whale
#

is laughable

hoary sluice
supple whale
#

powertoys rocks

valid jetty
#

probably made by the devs who want to actually improve the user experience while the start menu is made by devs who are praying for a promotion and want to give microsoft more money

austere anchor
valid jetty
#

it hasn’t ever really gotten in my way so i didn’t bother to

#

(yes this is a reference to nvram boot-args amfi_get_out_of_my_way=0x1)

deep mulch
#

and make it modern ui

ornate quiver
#

guh??/

ionic lake
#

Nothing

granite geyser
#

its the same thing on my make

#

why is it all clang

deep mulch
#

@frosty obsidian can you think of better name for my compose color picker library than compose-color

frosty obsidian
#

i don't think the name is that important

#

if you don't want something plain you can just use some random word related to color or light

jade stone
spark tiger
#

windows version coming soonâ„ąïž

serene elk
#

their website is something

#

just casually using 100% of my CPU

ionic lake
ionic lake
# ionic lake Nothing

i love how i was taking a nap and i misclicked the android reply suggestions suggest

jade stone
#

Guhhhh I think I'm going insane

Chrome DevTools uses the type Acorn.ESTree.Node, but I can't find that type anywhere

#

TBH I should just give up on type checking and just assume the code is good

deep mulch
#

@ornate quiver this is weird
if i change the saturation slider then change the hue with the color ring it resets the saturation

#

i feel like this is some state thing im doing wrong

#

oh ok i fixed by ```

val color by rememberUpdatedState(color)

placid cape
placid cape
#

Should I use kotlin multiplatform for mobile app?

ionic lake
#

sure but its still somewhat new so there's that

jade stone
deep mulch
deep mulch
#

or desktop

placid cape
deep mulch
#

id say so

placid cape
#

okay

#

bcs from what I heard it it's better than flutter

icy needle
#

so qbe has hoisting hmm

#

tho i still should probably internally hoist functions/structs too for error checking

deep mulch
placid cape
#

okay thanks

dense sand
#

Does kmp support mui

hoary sluice
#

use rust

#

đŸ„°

placid cape
#

Any framework?

valid jetty
#

although those aren’t global symbols but whatever

#

you can’t have a ```
type :Bar = { :Foo }
type :Foo = { w, w, w }

#

but for symbols and functions it really doesn’t matter yeah

#

i don’t hoist functions in elle, it only goes as far as hoisting the currently compiling function so you can recurse

#

hoisting everything before compiling their bodies is something i did want to do but didn’t get to

valid jetty
#

oh no dont worry types themselves are hoisted in functions

#

you just dont have hoisted types between types

#

i just put all my types at the top as a result

icy needle
#

i'll probably do the same in the codegen

#

put types first, then globals, then functions

valid jetty
#

you can look at like, a bigger sort of project if you like

#

to see what a qbe file like that holds

#

hang on lemme compile this into ir

hoary sluice
#

rs file
look inside
not rust

valid jetty
#

just so discord shows preview

#

lol

valid jetty
hoary sluice
#

finally

#

fixed point decimals

hoary sluice
#

@placid cape how do you communicate with your frontend

#

idk if should switch to http

#

or ws

#

or stay on tcp

#

idk whats best

#

i need full duplex communication

fleet cedar
#

Suplex communication

hoary sluice
#

rn its just strings send over tcp that are interpreted into commands and then the response is written directly to the client

#

i should probably get some kind of control and data separation

placid cape
#

You're talking about voice assistant right?

placid cape
#

ws is just tcp lol

valid jetty
#

i love the ws spec its so interesting

#

you have a tcp connection to begin with and you send an upgrade connection request through tcp to change protocols

#

and iirc that request is also a handshake and acts as a validation to the client that the server understands what you want to do

#

like you send Upgrade: WebSocket and the server must reply with the same thing

#

if it does then you know its a valid connection and you can start sending data

#

yeah i was right

hoary sluice
valid jetty
#

Use with WebSocket

WebSocket also uses this mechanism to set up a connection with a HTTP server in a compatible way.[2] The WebSocket Protocol has two parts: a handshake to establish the upgraded connection, then the actual data transfer. First, a client requests a WebSocket connection by using the Upgrade: WebSocket and Connection: Upgrade headers, along with a few protocol-specific headers to establish the version being used and set up a handshake. The server, if it supports the protocol, replies with the same Upgrade: WebSocket and Connection: Upgrade headers and completes the handshake.[3] Once the handshake is completed successfully, data transfer begins.

hoary sluice
#

i need ur help

valid jetty
#

hm

hoary sluice
#

i need to send start, stop and cancel commands from client to server, send a response back from server containing either an ack or the voice assistant response and i need the client to be able to dynamically configure the backend by sending config commands, needs to be full duplex idk if tcp is the best for this

valid jetty
#

tcp should be fine

#

actually

#

if its an ongoing stream back and forth from the server then a websocket is probably better

#

because you say start and stop

dense sand
#

i accidently implemented a linked list instead of freelist for my heap allocator

#

damn

valid jetty
#

so im assuming when you start, data is constantly being sent

#

in which case a websocket is better i think

valid jetty
#

or like unrelated

dense sand
#

YES

#

i have no idea how i did that

#

lmao

valid jetty
#

a freelist can even be a linked list so idk what youre talking about xd

#

a freelist is just a links of chunks that you deem "free" and can reuse instead of allocating new memory

#

it can be whatever data structure you like, including a linked list or array

hoary sluice
hoary sluice
valid jetty
hoary sluice
#

individual bytes

valid jetty
#

wha

hoary sluice
#

i also need to be able to cancel the transmission

valid jetty
#

but then what do you mean by sent when you stop

hoary sluice
#

i record on the backend and then send the voice assistant output as individual bytes if the user selected text output

valid jetty
#

thats not what i mean

#

are you sending bytes one by one as theyre being processed or the whole output at the end

hoary sluice
valid jetty
#

ah

#

hmmm i think then you would use a websocket

hoary sluice
valid jetty
#

i see

hoary sluice
#

do i make a 2nd ws for config

#

cause if you wait for local deepseek to finish itll be the next week

valid jetty
#

you should just have a binary protocol to detect what kind of information is being sent so no not really

#

just make the first 4 bytes be the "type" and have an enum on both client and server

#

or not even 4 bytes it can even be 1 byte

#

i doubt youre gonna have more than 255 data transmission types

hoary sluice
#

i have 2

#

text and audio

valid jetty
#

you have 3

#

text audio and config

hoary sluice
#

4 bytes is u32

valid jetty
#

i know

#

im saying a single byte

#

you wont need more than 255 types

#

but yeah i think thats better than having 2 ws connections

hoary sluice
hoary sluice
#

i also need to be able to cancel the transmission

valid jetty
hoary sluice
#

if the client sends cancel

valid jetty
#

if its sync how are you planning to do that

#

coroutines?

valid jetty
#

oh i think i see

#

client sends config, server sends audio/text

hoary sluice
#

everything is async besides the local recorder, im planning to make a non local recorder for eg having multiple microcontrollers act as microphones

hoary sluice
#

but yes

valid jetty
#

so then isnt that 2 types

hoary sluice
#

config is just Config(key, value)

hoary sluice
valid jetty
#

lol okay either way if it were me i would have a tcp connection open to send over things like config and signals then a ws to send over and receive individual bytes

hoary sluice
#

youd write the raw command if its start/stop/cancel and "CONFIG(whatever)" if its a config

valid jetty
#

surely thats unnecessary encoding

#

you can just use a single number to represent that its a config then enc

#

ok 1 sec

hoary sluice
hoary sluice
valid jetty
valid jetty
hoary sluice
valid jetty
#

so then how are you gonna determine when a string ends

#

null terminator?

hoary sluice
#

parsing takes about a second and transcribing takes 2s

hoary sluice
valid jetty
#

ah

hoary sluice
#

cause i just do writeln!

valid jetty
#

i see

#

do you have validation that the user cant send over custom config to your api and include their own newline to end the key early

#

(on the server)

hoary sluice
valid jetty
#

i would send the data via ws but less frequent things like config via tcp because its just simpler

hoary sluice
valid jetty
#

lmao ok i guess thats fine then

hoary sluice
valid jetty
#

yeah

hoary sluice
#

can you have duplex on 1 tcp conn

valid jetty
#

if you wanna go for ultra optimized you would send both via ws but at that point you might aswell just use protobuf or something because youll have to implement your own binary protocol for sending packets

hoary sluice
#

i was thinking abt using protobuf

valid jetty
#

does it have good rust bindings

hoary sluice
#

but i just wanna get a decent communication going, rn its just parsing strings from tcp

hoary sluice
hoary sluice
#

what are the advantages of a ws anyways

#

i think im gonna make it use only ws

valid jetty
hoary sluice
#

its prob better to have 1 socket for both read and write

frail matrix
#

anyone got a plugin I could test on

hoary sluice
#

@valid jetty i started rewriting it to ws and realized that it would probably be correct to use futures instead of tokio stream and now everything is much cleaner cause i can use a BoxStream instead of a Pin<Box<Future<>>>

#

obviously i couldve made a typealias but it being integrated is much nicer

valid jetty
#

lmao

valid jetty
#

@hoary sluice hop off latex

#

get on typst

hoary sluice
placid cape
#

it's way faster and provides better dx

valid jetty
#

the function stuff is actually so powerful

#

but i hate that i spent like 30 mins trying to figure out how to embed variables in code blocks with backticks to find out you can’t and you have to use raw() i had no internet for a little bit so i couldn’t google it

#

was so annoying

valid jetty
#

??? not only does chatgpt suck at typst because its new but i had no internet lol

#

i do now at least

#

@placid cape do you know how to do a fallback file in the yaml function

#

like i wanna have a yaml("name.yaml") ?? yaml("name.public.yaml") so i can push the source code to github and not dox myself

placid cape
#

what

#

oh like in typst?

#

idk

valid jetty
#

yea

keen spoke
valid jetty
#

there isnt a lot of training data

keen spoke
valid jetty
#

still new compared to latex lol

keen spoke
keen spoke
valid jetty
#

it literally spits out incorrect syntax wdym

keen spoke
#

To chat

valid jetty
#

all of that is wrong

#

if let doesnt exist

#

file doesnt exist

keen spoke
supple whale
#

do any linux users know anything about the status of vulkan on chromium? is it abandoned? im struggling to run chromium via vulkan

#

there is chrome://flags/#enable-vulkan