#đȘ -progaming
1 messages · Page 45 of 1
Roie Codes
ya
its the default allocator
however if you compile with --nogc it uses
https://github.com/acquitelol/elle/blob/rewrite/std/runtime/allocators/arena.le instead (header)
wait elle has headers?
nooo
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
o
it acts like a header but it's just a normal elle file
I was wondering what strategy could i use for my jvm runtime
For heap allocation
And gc
You're implementing your own jvm?
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
Is this the mark sweep thing ive read about
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
https://github.com/acquitelol/elle/blob/rewrite/std/runtime/allocators/gc.le#L140-L212 this is the only important part
i don't do the optimization thing i just unmark everything before scanning again
which is slow but whatever
For the allocation itself, freelist is a good goto for heap?
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
Nice thanks
Well i want to practice my C skills, so i decided id give it a go - my initial idea was to make it small enough to be able to run it on avr
But im not sure if im fitting that
i don't think making a jvm to practice your c skills is a good idea lol
Just a minimal example obv, nothing serious
Sounds like a cool project imo, as long as you don't expect to make anything competitive
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
Problem with c is that c sucks
true
Mm not really, i honestly really like it
Pretty comfortable with it
The worst thing about it tbh the toolchaining
Cant there be something inbetween makefiles and cmake
the worst thing about c is the verbosity imo
Headers
yes but the fact that needs to exist at all is annoying
I guess i just like verbose languages
me too but sometimes it's a little much
I hate verbose languages
I want to write the important parts, the unimportant parts should be handled automatically
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
I love realloc
true
Make it use void* so its more universal
Or like this int n[] = {1, 2}
that's not dynamic
the one in elle can be pushed and popped from
I'd expect [] to be static honestly
dynamic should be explicit
Dynamic by default is fine in languages like python
But seems fishy in compiled languages
idk elle is more high level now even though it's compiled
u should prob make this like vec![] in rust
I would also be assuming [...] is static array
the vec! part: just to make programmers feel clever because they need to type more
@valid jetty Elle JVM
@valid jetty make Elle compile down to js
no, we need lua or python bytecode
i could compile to wasm
Why link to a twitter image of the thread instead of the thread itself
- iâm lazy
- to show the explanation comment in embed without having to open the link
1
damn
i need to check all my neovim plugins
thats not a good thing
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
yeah that's what i was thinking
one for declarations and one for definitions
this feels.... wrong
toolchain 'nightly-x86_64-pc-windows-msvc' does not support target 'wasm64-unknown-unknown';
pain
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

has anyone ever compiled C libraries via Rust?
considering it because of how simple rust/cargo is in comparison to anything C related
does rustc also compile C???
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
you can link with 3rd party dependencies via rust???
rustc does not compile C code if thats what youre asking
https://crates.io/crates/cc if you want your crate to automatically build and link against a c library
But no, the step of actually compiling the c is, naturally, done by a c compiler
yeah that probs wont help me much, unforunate
If you mean "the c tooling sucks, let's use the rust tooling for c instead", miracles aren't real
unfortunately lol
do you remember that i sent you a compiler that had wasm?
yea it is
yes but i would rather do it from scratch like i have done so far
yeah yeah but it's just a great resource
you should focus on enums
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
common zig w
c++ compiler 
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:
it's good when you have dependencies on c/c++ stuff
and you can build them through build.zig along with all your other files
also you can convert c code directly to zig too
could some1 that actually speaks rust help explain me this?: https://github.com/rustwasm/wasm-bindgen/blob/main/crates/cli-support/src/js/mod.rs#L816
this shit never is included
idk why
yeah but the fact that the zig team need to maintain a whole c++ abi compliant compilerâŠâŠ
omg Result<T, Box<dyn Error>> so good
true
true
i mean they do have the funds i guess
dynamic is only fine by default if the language is dynamic by default
I didnt say they are useless
I said
yea but idk
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
itâs not really abstract itâs just a static array that is reallocated
realloc only works on heap allocated memory
yes but the buffer you get is still static
Aka dynamic allocated, not stackalloc
unless you resize it
yeah that's why i'm adding it as a type into the syntax
The array itself is not static though
a = [] calls malloc
i know what you mean but in that case we shouldnât make stack allocated count as static we should only count memory in the static data section of the assembly
oh fuck i forgot to add a raw pointer
What i mean is that a = [] calling malloc is unexpected at first
From a DX perspective
considering how high level elle is i would expect it
Kotlin solved this extremely elegantly
listOf()
mutableListOf()
sure i guess
Functions are first class
why would you ever make an empty listOf() xd
listOf by default, static
mutableListOf explicit, dynamic
listOf calls emptyList() which references a static empty list object if no params are passed
However listOf(1) allocates a new object
yeah but if listOf is immutable why would you ever make an empty one
what use does it have
If you wanna be expressive you can also use emptyList() instead of listOf()
Well plenty usecases
what would you even allocate with 0 length tho
For example if you wanna filter for homeless people
LMAO
like only the length itself?
say you allocate a new human
And define how many homes it has
so u use emptyList()
husk
Or listOf()
i guess so
Uses zero heap because it references a static empty list
it kinda depends on where you're talking about
Im just giving an example
if it's LA or SF then 0 allocs are a waste
Kotlin DX is insane if you take close looks at the language desifn
Its 99% perfect
Or lets stay realistic, 98%
but in most places most ppl have 1 home, so 1 init makes more sense
homelessGuy()
Allocates human(homes = emptyList())
idk, not everything should be a callback
Its not a callback
Its just a functikn
Which is extremely useful as seen in DSL
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
Not sure wym
sorry i use function and callback interchangeably
idk @keen spoke would you expect a language as high level as this to stack alloc arrays https://github.com/acquitelol/elle/blob/rewrite/examples/graphics/pong.le
Uhh sec
I always expect to be able to create a
- static list
- mutable list
Mutability should not be default unless your language treats mutability as first class
for example instead of assert cond ır assert(cond) you have std.debug.assert(cond)
Mutability is more abstract than static
yes everything is mutable
a lot of things are pointlessly verbose
simpler for compilation
Thats dangerous
oh well
C# has worsen in language design due to backwards compatibility requirements however its extremly versatile and gives you atomic control over memory
Its managed and unmanaged and has every nieche features around memory you can imagine
Yop
It was good until like c# 8
Then it got weird
Legacy syntax as well imo, like java
java still doesnât have a shorthand to write to stdout
just create your own method
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
idk adding like 10 more tokens and parsing them as unary ops isn't that difficult
#[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?
https://doc.rust-lang.org/reference/attributes/codegen.html#r-attributes.codegen.target_feature.wasm says in wasm, it'll fail at load time of unsupported
so its safe to assume that the fact that it loads and executes shit correctly, data isnt mangled etc that it is using SIMD?
great
That's what it says, I don't know the details
fuck man, how is wasm developing so slowly
Whats the best way to manage dependencies for my c project
git modules from my experience
Cause like my project depends on a C library, should i just make it a git submodule
its insane cancer
Okay
yeah, thats usually the expected flow
i dont get it, "enable-threads" is a valid aregument too, but it doesnt show up ANYWHERE in the rust documentation
@supple whale should i be putting my header files into include/ instead of src/
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
lmao
i usually just run bear -- make which makes compile_commands.json file for my clangd lsp
and that works
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
i see
well this is a structure i use this structuring: https://github.com/KoblizekXD/classparse but tbh i dont find much appealing to get extra directory just for a single classparse.h header
why not just /usr/include?
because /usr/include is used for headers of system packages as far as iâm aware
plenty of things in there for me like node iirc
/usr/ is for things managed by package manager, while /usr/local/ is for things installed manually
ah ok then that should be fine probably
elle installs there through the makefile, so âmanuallyâ
https://github.com/acquitelol/elle/blob/rewrite/Makefile#L25-L33 for the runtime literally just disable everything lol
wow the bot doesnât wanna do the thing
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
there we go
dandelion
average c developer experience
Unfortunately there's println()
void main() { println("a") }
I don't know what language that is but it ain't java
I do love js's print function though
yeah yeah just saying that enums are useful lang feature :)
CLion
Or VisualStudio/Code
good joke!
What are you using then?
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
The thing I said should work on any platform
Literally the most scuffed approach that's worked for me in the past
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.
You just need the compile_commands.json
And for the headers to be visible to clangd
Should be enough
You can't pay me enough to get out of bed
yes!!!!!!!!!
That's a touch deranged but now I understand
Is there a reason your cpp project uses make over cmake?
- why windows đ
Prolly used to it
zed >>
If you're used to getting work done on Windows, switching is a miserable process the first time
downstream dependencies have issues with cmake
because regaredless of what casual players tell you, actual gaming on linux doesnt exist
its not even that, i know linux quite a bit, but linux just doesnt work, on windows you want something working, you install it, use it, uninstall it
the same process on linux has a 60% chance of bricking ur install
On NixOS I don't even need to install stuff
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
I can just create a shell with a particular program or hell even compile time library present
The what

the default flags for files directories etc
so creating any directory and file will set its perms to 777 by default
What the fuck
and flat out fixes 99% of issues created during installation of anything
Just stay on Windows
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
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
yes, but its rare, it will be a problem 1 in 10000, where as masks fix the other 99999 issues
When I close the shell, program gone
Still cached, but I can run a GC to clear the cache
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/????
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
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
well yeah because kernel anticheats (malware)
call it whatever you want, but I'm still going to play the game, kernel level anti cheats aren't even that worry some, a normal anti cheat can inflict the same amt of harm as a kernel lvl ac
case in point: eac being illegally used to access people's PCs
giga known in playrusts scene, noone cares

im liking solidjs + tailwind quite a lot tbh
it's like react but not react
@deep mulch hop off compose web use solidjs
too lazy to
I love paying for foss!
I don't understand. I just started learning Rust but the required supplies is this?? What does it have to do with programming?
lmao
https://x.com/AwestruckVox/status/1894812633209151833?t=7Ib6x7TthifnfD-zMy54jg&s=19 I love paying for citizenship
đ
That's hardly fair, I had to pay a hefty sum to cancel my membership
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
bad latex alternative
from dms/friends/online/server lists
hide from chat already exist
@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
i know lol that was satire
do you know if nvim has syntax highlighting for it
found one
so good
is there a latex to typst compiler
idk
oh okay sorry đ
you can do anything in typst
I haven't versioned my configuration under nixvim yet, but you should check it kut
I use nix.d and its olay
How are you doing it currently then
My dotfiles are open source on my github, find nvim.nix and dotfiles/nvim subdir
Okay, thanks
@atomic brook i realized my dotfiles are horror so i wrote a readme.md
https://github.com/sadan4/dotfiles#my-dotfiles
You can do everything in PowerPoint as well, both are turing complete
tom wildenhain reference!??!
@jade stone i'm begging you please read https://lazy.folke.io/usage/structuring
espesially this line
No
I'm going to move away from lazy soon
I'm planning to go to Nixvim
are you trying to install nixos somewhere
what is that UI for downloading
why not just use a browser
it will take an eternity to download
?
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
because my connection is so perfect that the browser will throw an error in a minute
and delete everything it has downloaded
using aria i can at least continue where i was left
you don't understand
it can't
I was waiting 10 minutes to download 60mb
and my connection droped a few times

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))
I still need something to download this
if my connection drops everything i've downloaded thus far will get deleted
so i don't use browser for downloads
accurate
For this i should download qbittorrent first

also i use aria not just for iso
but for everything i need
that will be less than an iso 
it's an iso + qbittorrent
i feel like a torrent would be more reliable in case your connection drops
well
aria has no problem with it
hence most of the websites supports it
i've forgot which header is that
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range
This one i think
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...
Powerpoint is not good for papers
its turing complete buddy
this single header is the backbone of the entire internet btw
Can someone explain how tf when my internet dies I also can't connect to my local network at all
yeah but like
my router is kinda alive?
only internet connection is awful
so idk
my internet dies whenever i open a game. idfk why or how but this happens. if i try to ping the gateway, it has extremely big ping
sounds like ya'll have dogass routers
it impacts my mental health
i mean everything works fine on my phone
so i donât think itâs routerâs issue
@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
i figured out the problems with my flexbox layout in my sleep last night
/srs
dw, i do that too
taking showers and taking shits also works great for figuring out problems
i have days where i shower 3 times a day
honestly, i'd need to get chrome debug tools to find the problem, i cba actually using my brain to find the problem
"click and find issue" is easier
if u use vscode yeet me a share instance
idk tbf
i dont have the brain capacity to spare rn sorry
i need to focus heavily on my shit rn
okie
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
try isOpen && "!translate-x-[0%]"
poor single threaded WASM
utterly useless
@deep mulch look
im thinking of maybe switching over to webgl
reimplementing this as a shader would be way faster i think
soon
look up vanta
sounds like what u need
oh huh
it is a heavy js lib tho
if some1 wants a space heater for the night: https://thaunknown.github.io/wasm-bench/
dont blame me for whatever happens when you open that
did you know you can create an instance of an interface using pure java?
imagine the meta programming potential
a super factory builder
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
able to b done.. not able to b done??
minio
looks nice
you can do that using Proxy, can't you?
Yees
What's minio do tho?
What's the difference between regular bucket and s3?
One is excellent for holding things like fluids and debris
My data is 70 gib tho
Nintendo switch captures take up a lot of data
You can fit many micro sd cards in a bucket
?
đȘŁ
in case we have some autists that enjoy data here
thats should greatly satisfy them
JS vs WASM vs WebCrypto for SHA256 for 8B to 10 MiB
to get a general idea of just how bad wasm is
i program in bed
my bed currently has a pink blahaj, blue blahaj, and hatsune miku plush
i talk to them
i forgot youre next level degen
:DDD
what about a picture? :d
wait theres different colored blahaj???
yea this one is pink though
i got it for christmas from a friend
Rosahaj
:3
@placid cape i successfully got an elle raylib example running on windows xd
esp with the new keyboard it might be comfy now
@valid jetty is ur laptop full of hair and dust
I should finally finish the parser rewrite but rn I'm in Austria
where
bimblows
I somehow read this as something about rgb blahaj
tauplitz
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
skiing?
I don't know how any of those words lined up, but now I want one
ellep when? Elle package manager
yea
oh its hallstatt
hair sometimes but the macbook keyboard gets dirty so fucking quickly
ive been there
maybe i just use it a lot
idk if ive been skiing in hallstatt tho
but like i clean it and within a day its already so dirty
I hope it'll be good
maybe cause its on ur lap
why would it being on my lap have anything to do with the keyboard
or on a bedsheet
We wanted to go to flachau but idk why my parents chose this instead
its not like putting the macbook on my desk will magically make my hands emit less oil and make the keyboard cleaner
they usually get really dusty on bedsheets
i didn't read the keyboard part
why not zell am see or saalbach hinterglemb where everyone goes
wdym
are arm cpus that op
yes..?
i hope you always fry something after programming
if it gets too hot it throttles
Maybe next time
heat is emitted passively through vents between the display and keyboard
mine operates at 92°C with fans at full throttle
i usually use it on low power mode tho because the battery lasts forever
92°C???
Isn't that a lot?
yes lol
probably
then again intel cpus could fry an egg
its been running on exactly 92 for over 2 years now
the gpu died
it runs super slow now
arm ones are definitely better in that regard otherwise microsoft wouldnt be trying to push arm chips into their laptops so much lmao
wait 92°C while you're just programming in zed for example?
yes
husk

mine sits at like, <30*C
30 times integration constant
this one has an i5 1240p and a 2050 and i paid 1200⏠for it with legit windows
lol
always buy notebook with amd cpu, not intell
void linux meh
amd cpus are just better
i was 15 and didn't know anything abt computers
arch is NOT for casual use
yes it is
apt nightmare đ
no arch isnt even hard to use or anything its just good
I can't imagine using debian as daily drive distro
i broke my installation within 2 hours
and their wiki is amazing
void is arguably harder to use
that too
?? void is just like debian but more modern
void is amazing
i deleted my windows by accident when first installing it
lolol
install gentoo and waste your time by compiling everything 
i said arguably to remove any potential blame cause i only used it for 2 weeks and missed the aur but like theres nothing inherently harder about arch than void or fedora
the boot times are amazing
from clicking the power button to display manager opening is less than 2 seconds
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
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
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
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
omg i had same issue
????? its literally just a flag you enable in settings
what are u talking about
my arch broke 3 times installing mysql
the bunch of hoops in question:
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
brew is basically the macos package manager
they fixed it
its not preinstalled and i was not able to install it on his mac
idr why
husk
at least its unix
yeah
yea still better than windows
me when curl is an alias to the powershell networking thingy
đ đ
gn
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
thats what this is https://github.com/acquitelol/mizu5
i need a snapdragon laptop with a high end amd gpu without a built in keyboard
sounds expensive
without a built in keyboard
??? what laptop has no builtin keyboard
me when i get bored during the math exam and watch anime on my calculator:
this is not anime
u can use spacers in framework i think
wait i wanna show you something
loveeeeeeeeeee
search for a github repo straight from the new tab search bar
:3
is that inside ur browser or is it rofi
whats rofi
search bar
uhh thats the arc search bar but i have this as my search engine https://unduck.link/
A better default search engine (with bangs!)
sobbing rn
i fucking lowe powertoys
the fact that microsoft made it
and the start menu ISNT this
it needs to not drop below like 75k or i get margin called
is laughable
ew windows
powertoys rocks
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
install disable gatekeeper mobileconfig

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)
@ornate quiver should I make this work for latest android https://github.com/BlueCat300/XposedAppSettings
and make it modern ui
guh??/
Nothing
LMAOO
wait im so confused đ
its the same thing on my make
why is it all clang
@frosty obsidian can you think of better name for my compose color picker library than compose-color
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
flow launcher better
windows version coming soonâąïž
open source s3
i love how i was taking a nap and i misclicked the android reply suggestions suggest
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
@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)
Lmao
t3 fan
Should I use kotlin multiplatform for mobile app?
sure but its still somewhat new so there's that
@deep mulch
idk if id call it new
are you gonna target ios and android
or desktop
mainly android and ios
id say so
wait
so qbe has hoisting hmm
tho i still should probably internally hoist functions/structs too for error checking
much better
okay thanks
Does kmp support mui
nononononono
use rust
đ„°
Any framework?
yes it does but not for types that reference other types
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
bruuuuuh
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
i'll probably do the same in the codegen
put types first, then globals, then functions
you can look at like, a bigger sort of project if you like
to see what a qbe file like that holds
this project is a lexer made in elle https://github.com/acquitelol/ichigo
hang on lemme compile this into ir
rs file
look inside
not rust
husk
@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
Suplex communication
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
You're talking about voice assistant right?
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
rosie you are a professional software architect
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.
i need ur help
hm
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
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
i accidently implemented a linked list instead of freelist for my heap allocator
damn
so im assuming when you start, data is constantly being sent
in which case a websocket is better i think
??? arent those completely different things
or like unrelated
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
the backend does the audio recording which is sync and you have to start and stop it
its being sent when i stop
do you send over individual bytes or the whole thing at once
individual bytes
wha
i also need to be able to cancel the transmission
but then what do you mean by sent when you stop
i record on the backend and then send the voice assistant output as individual bytes if the user selected text output
thats not what i mean
are you sending bytes one by one as theyre being processed or the whole output at the end
start: start recording, send back ack
stop: stop recording, start processing the recorded audio, send back the response word by word if its from an llm
words one by one if its through llm, otherwise the whole output as one "word"
i see
do i make a 2nd ws for config
cause if you wait for local deepseek to finish itll be the next week
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
4 bytes is u32
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
but text audio is from server and config is from client, i feel like client should just have 1 transmission type which is a command
oh
i also need to be able to cancel the transmission
either you have a single ws connection with different data transfer types or you have a ws dedicated to sending data and a seperate tcp connection for smaller requests that dont happen as often
if the client sends cancel
the client only has 1 type
oh
oh i think i see
client sends config, server sends audio/text
everything is async besides the local recorder, im planning to make a non local recorder for eg having multiple microcontrollers act as microphones
client sends config and start/stop/cancel
but yes
so then isnt that 2 types
config is just Config(key, value)
well i can just parse it out
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
youd write the raw command if its start/stop/cancel and "CONFIG(whatever)" if its a config
surely thats unnecessary encoding
you can just use a single number to represent that its a config then enc
ok 1 sec
isnt the tcp connection just overhead then cause ws can handle duplex
sure i can do "C key,value" thats just semantics
u8 / data type
u32 / key length
u8[key length] / string of key in bytes
u32 / value length
u8[value length] / value of key in bytes
sure but i would do it like that because its simpler and the code would be more concise
putting in the length is unneccessary, i dont need that kind of optimization
parsing takes about a second and transcribing takes 2s
rn its newlines
ah
cause i just do writeln!
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)
i have it with tcp rn u mean i should send the data via ws?
i would send the data via ws but less frequent things like config via tcp because its just simpler
its fully local so idc what the user does, the real user clicks radio buttons, if someone wants to hack their own machine so be it
lmao ok i guess thats fine then
so client writes to tcp and server writes to ws basically
yeah
can you have duplex on 1 tcp conn
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
i was thinking abt using protobuf
does it have good rust bindings
but i just wanna get a decent communication going, rn its just parsing strings from tcp
think so
fair enough lol
its prob better to have 1 socket for both read and write
anyone got a plugin I could test on
@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
lmao
Absolutely
i think im getting the hang of this typst thing
@hoary sluice hop off latex
get on typst
after this is done ill try it https://github.com/eagely/voice-docs
it's way faster and provides better dx
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
Chatgpt
??? 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
yea
Works fine for me, consider the garbage in garbage out principle
yeah but typst is new
there isnt a lot of training data
Typst exists well over two years now
still new compared to latex lol
Enough for what ive asked it
relative, but not absolute
it literally spits out incorrect syntax wdym
What is the correct answer

