#πͺ -progaming
1 messages Β· Page 123 of 1
zeet doesn't realize the world runs on frogs
wing you would love this graphics programming server im in
they're kinda obsessed with frogs
@valid jetty https://tetris.wiki/Super_Rotation_System i need to implement this
The Super Rotation System, or SRS is the current Tetris Guideline standard for how tetrominoes rotate and what wall kicks they may perform. SRS traces its roots back to 1991 when BPS introduced third and fourth rotation states for the S, Z, and I tetrominoes in the game Tetris 2 + Bombliss. Two years later, in the game Tetris Battle Gaiden, BPS ...
you might like
im not actually that into frogs, my pfp just stuck
wing has a framed portrait of his pfp on the wall
@frosty obsidian you wear a shirt with your pfp on it
i know what this is one of my friends made tetris for a school project
the same project that im making a compiler for a japanese language for lol
zeet loves that tetris is very strictly standardized
yop
you have so much work to do if you want compliance
you will do
nop
you will be play tester
haven't played tetris in forever
you have played minecraft too much
@frosty obsidian plays minecraft and doomscrolls twitter
@lucid trail did you figure out if it works with a lower triangle count?
the dragons lower in triangle count as you go down the order
because i started with dragon.obj and then kept adding more triangles once i saw "oh, it's working with this many just fine.. can it handle more??"
until i got to the full dragon at dragon4
iirc dragon 1 is 0.005, dragon 2 is 0.05, dragon 3 is 0.1, dragon 4 is 1
in terms of decimated scaling
yeah it does
ok cool
yeah that's expected those have like barely any triangles
finally
how much fps
like 0.4
@valid jetty make it realtime when
spooky
what was the issue?
soon
Is there a CSS snippet to remove custom status of users from the server list if so what is it called? (Sorry if it's the wrong channel, I have no idea where to ask)
@valid jetty rewrite Elle in typescript type system
i donβt actually really know
Never mind, I figured it out 
@valid jetty https://youtu.be/0X4TVwS60Qg?si=AB6ACjH9bAatwtNv
So excited to be back to content creation!
Code: https://github.com/syphlux/robot-arm-catching-ball
π΄ Learn graph theory algorithms: https://inscod.com/graphalgo
β Learn dynamic programming: https://inscod.com/dp_course
π‘ Learn to solve popular coding interview problems: https://inscod.com/50problems_course
β Learn time and space comp...
yop
Is this x86?
Yes
yes
Osdev so cool
I have a bit yes but tessie is literally named after tesseract so ask lewi
I think
I really hope I'm not misremembering that cuz that'd be awkward
@pseudo sierra bwa
@deep mulch bwa
FINALLY π
i think i have the same issue on linux so any tips would be helpful :3
i rebuilt raylib from head
Train your ai 
how is it None if i literally ensure before that there are five args
let mut args = env::args();
what is the type of args? is it an iter?
itβs Args from std::something
^
oh that might explain why the compiler wanted args to be mutable i guess?
yay! here it is
args is an iterator not an array, you are trying to index an iterator
Which is pretty dumb ngl, because args() always creates a Vec<String> up front and then wraps a vec::IntoIter
To avoid issues if something changes argv while iterating
damn they really do that
@lucid trail can you pull and try to build this scene to see if it works
you may need to lower the resolution from src/lib/enums.le, its rendering at 4k rn
but i just wanna see if the 4.4m triangle scene works for you
@valid jetty hiii
hiii
it works
yay
@woven mesa how likely is it someone would register 1000 app ids
I mean ngl my current account has a few
unlikely
@woven mesa I dont understand this api it gives me like a trillion lines of json data
youtube is worse
cant be as bad as this
this api is gross why is there so much junk I dont need
why are these prepended with its id
put all of ur json in a file and check its filesize
@woven mesa I figured out the endpoint for changing capabilites
heres what I would need to send
I would need to send like the entire thing
baller
I really hope that the capabilities array is like simple and not overly complicated
true
insane
88 now
okay it seems like only these are different from the other ones
its the ones with more than one singular option
which is fine but I'm not entirely sure how I would know when to give these
I might just ignore these
@woven mesa bro
why do people do this
horror
horror
AppIDViewModel.swift: Line 57
request.httpBody = "{\"data\":{\"relationships\":{\"bundleIdCapabilities\":{\"data\":[{\"relationships\":{\"capability\":{\"data\":{\"id\":\"INCREASED_MEMORY_LIMIT\",\"type\":\"capabilities\"}}},\"type\":\"bundleIdCapabilities\",\"attributes\":{\"settings\":[],\"enabled\":true}}]}},\"id\":\"\(appID.identifier)\",\"attributes\":{\"hasExclusiveManagedCapabilities\":false,\"teamId\":\"\(team.identifier)\",\"bundleType\":\"bundle\",\"identifier\":\"\(appID.bundleIdentifier)\",\"seedId\":\"\(team.identifier)\",\"name\":\"\(appID.name)\"},\"type\":\"bundleIds\"}}".data(using: .utf8)
boooo
{
"data": {
"relationships": {
"bundleIdCapabilities": {
"data": [
{
"relationships": {
"capability": {
"data": {
"id": "INCREASED_MEMORY_LIMIT",
"type": "capabilities"
}
}
},
"type": "bundleIdCapabilities",
"attributes": {
"settings": [],
"enabled": true
}
}
]
}
},
"id": "\(appID.identifier)",
"attributes": {
"hasExclusiveManagedCapabilities": false,
"teamId": "\(team.identifier)",
"bundleType": "bundle",
"identifier": "\(appID.bundleIdentifier)",
"seedId": "\(team.identifier)",
"name": "\(appID.name)"
},
"type": "bundleIds"
}
}
make this json readable
free junk data to flood your types
this might be goated
is it just a skill issue or do circular module dependencies often make things cleaner
go packages are a one sided relationship
go packages are parasocial
Circular module dependencies usually imply they shouldn't be different modules
I made a small java agent crate for rust
#[java_agent_onload]
fn onload(args: SafeAgentArgs) -> AgentStatus {
println!("hi agent world!");
AgentStatus::Success
}
I'm testing out if it's possible to write a modloader in rust
which it should be with jvmti
idk maybe i9t's not necessary
but i'm too emotionally attached to my current typescript codebase to rewrite it in go

wait how does that work
githubβcrates-ioβdocs-rs
ooo wait
that could be super useful for crates which does unsafe stuff under the hood while still allowing access to fields
idk i'm gonna go back to writing C like god indended for now
c is the perfect recreational programming language, it makes things hard in a fun way
A language without generics isn't worth using tbh
c just makes generics more fun
Assembly doesn't have generics
Doesn't mean it shouldn't be used :)
You should most certainly not write programs in asm what are you talking about
i mean most of the time you don't need to use it directly
Individual functions, sometimes if thr situation calls for it
What if my program is for creating virtual machines
well that makes more sense
for bare metal or extreme performance requirements (small parts) asm can make sense
for example ffmpeg
uses assembly for media encoding/decoding in hot paths
Then some small, delineated parts may need asm
While the majority can be written in a higher level language
@woven mesa all capabilities available on free accounts
WHAT
wdym what
Isn't that the colorful sugar paste you have on cakes and stuff
"Capability to migrate apps to macOS platform"
yeah lets give it a name of a food
ill need to start work on developing the submitting csr part
then I can get to fun stuff
luckily someone has already made code for it
I'm crying how can you be this retarded
I would get if you accidentally open an issue cause you don't know better
but then he was told to disclose it privately and his issue got deleted yet he doubles down on making an issue π
Someone hasn't heard of responsible disclosure
the kind of person to not ask why there are fences in a barn and just breaks in
Also triples down by immediately publishing an exploit poc while the issue has only been fixed for 2 days

(I also read his poc and it's so cringy lmao)
it exists for a reason yes
if you 100% know that optional value will never be null then use it
Never. .expect() is fine sometimes, though
Try camino crate if you don't want to bother with non-utf8 (aka invalid) file paths
I do understand that the stdlib doesn't want to impose restrictions on what systems it supports (such as using utf8), but in this instance I kinda wish it did
this video is a fun take on interpreted vs compiled language
follow form more programming content specially in javascript , python , c++ , java and become skillful coder and developer
Don't forget to LIKE, COMMENT, and SUBSCRIBE for more tech comedy and insightful developer content!
#programming #coding #DeveloperLife#WebDevelopment #UIUXDesig...
@fleet cedar what type to use for a file received from web frontend
u8 slice?
i dont need content type
Depends on size, streaming, and whether your web framework has anything for it (it probably does)
@hoary sluice i added spreading
its not like js spreading, its position in the struct init is irrelevant
it sets default values for the struct rather than override values
it was kinda easy
i use axum multipart for file uploads to the api but the thing that needs the file data is unrelated to the api and i want it to be independent
it only needs the file content
awesome
@valid jetty elle -> (patched) raylib -> MGL -> metal
can i use a string if the file can be ascii, ansel or utf8?
whaaaaa thats awesome
how does it work
ok ansel is too niche
i modify raylib to use glsl 430 with location specifiers for the SPIRV compliation, then build raylib without glfw, link it against libmgl and libglflw when compiling the elle
i dont have to modify elle's raylib at all, but it's still very broken
i spent several days on this
lol
drawing any text breaks everything, also absolutely horrible experience overall
@valid jetty should i write a gedcom parser in elle
are there any projects using elle in prod
can elle interop with rust
only via c ffi right
i made like 3 relatively big projects
but none of these are prod
well yeah but its not a prod language
im nowhere near 1.0
backwards incompatible changes happen almost every commit
i can fix compiler version
if i were to write the parser in elle i would just connect them with a rest api right
theres no rest fetching yet in the stdlib lol
just tcp sockets which you can use for http
altho a gedcom parser crate would probably be more useful
theres 3 rn, one of them defines the datastructures for gedcom x which is different, one only supports the 1996 version and one is a fork of the old parser that has a "goal" to parse gedcom 7.0 but doesnt yet
why do you need a gedcom parser anyway
im making a family tree viewer
there are no good ones out there
theres like 50 options and all of them are garbage
or bloated
Will yours be not garbage?
yes
its not that hard
its like an aoc day 24 basically
the tree part
all the versions ive seen are either
- extremely bloated, require signup, 50$ a month, very laggy (ancestry and myheritage)
- simple gedcom to png converters
- have 1980 ui
- are (sometimes paid) windows apps
4 usually includes 3
eagely
in my raytracer for traversing my bounding volume hierarchy i had to use a dfs
first time in like 4 months that i used a traversal algorithm that isnt for aoc or school
reference!!
me too
in the tree viewer
i had to do a bfs
to determine the generation
of a person
you did bfs in school??
we were tought all abstract data structures too
like stacks, queues, hashmaps, etc
but those are easy to use anyway
each of these had 1 powerpoint slide and 5 seconds dedicated to them
we were tought ""trees"" but they didnt really go that in depth
like they didnt mention red black trees or avl trees
or really anything more advanced than base level knowledge
i might just make my own format instead
and use the gedcom 5.5.1 parser from cargo
to convert
djistraka @valid jetty
i'm curious, since i don't have xcode i can't build opengl newer than 4.1
could you try, with raylib and opengl 4.3, to change the code in the raytracer to use an ssbo instead of a texture buffer and record the performance improvement
you seem to understand the codebase so i think you'd know how to do it
if possible, split the triangles and bvh into 2 separate ssbos
that would also make the full 7.2m triangle viable to render since you don't need to push the triangles and bvh into the same buffer
that's such an insane limitation
just saying, xcode just comes with a bunch of tools used for development, is it necessary to install? no. is it convenient? yes.
but also opengl on mac is crazy
i would, theres much to fix with mgl/raylib first tho
also zed now has a settings menu!
yeah if i'm trying to find an option though
am i doing something wrong building MGL?
theres no BUILD.md so i dont know how im supposed to build it
are you looking at my repo?
i did
sh ./clone_external_sources
sh ./build_external_sources
then i commented out the =NULL from the thing MGL added and built everything
but i cant get the main MGL to build, various things are missing and i dont know why
like the python script
lmao the models are making it take so long to clone
i also have raylib in there
husk
i think the build for raylib is messed up rn
collect my paiges
paige so sane
ok what am i missing
i cloned with --recursive but the spirv stuff isnt here
blehhhh
blehhhhhhh
love
nop
esbuild is sooo good
i dont have SPIRV-Cross here, idk how this is even actually building

thought this was a typo
Findglefjksjgkejf
i had spriv-cross at some point and then removed it
well its weird because its in .gitmodules
subprojects is in gitignore
oh i know why
in the original it would've been something the get_external got
fixed, pushed
i wonder how cmake never cared that spirv was not actually checked out
ok well that somewhat worked but i still get this
uhh try brew install glslang
at one point i should like do this
wdym by 4.6
opengl 4.6
what has opengl to do with it
i mean the raylib text drawing is not working but that's because of some issue in MGL
i think
i meant does 4.6 work correctly with text in raylib
ah
uhbbb ```sh
rlgl.h:887:14: fatal error: 'GL/glcorearb.h' file not found
#include <GL/glcorearb.h>
^~~~~~~~~~~~~~~~
i'm also running into this
i'm trying to find a commit where this worked
it really makes no sense to me
why the hell is trying to build the examples if i'm in /src
wow running make changes the makefile
this is actually cursed
@valid jetty i got it
just go into raylib and run cmake --build build, should work
i went through a bigger thing than that
pull, i fixed this by making raylib build without glfw
i downloaded rlcorearb.h locally and moved some includes around and it worked
oh ok
yeah i also moved raylib into examples
lmao
i see what i did
ok wow
ok sure just revert that
really, i should just remove build from gitignore
@valid jetty does this work
cmake -B build -S . -DUSE_EXTERNAL_GLFW=ON -DBUILD_SHARED_LIBS=OFFcmake --build build --target raylib
is this the correct result
ok cool
i dont quite understand why drawing text is cooking it, since all its doing should be DrawTexturePro, but we are already doing that
i want a plugin which appends text at the end of messages but i know its probably not made, but i need a starting point since im a absoulute noob, is there a plugin which modifies the sent text after SENT but before its sent to the servers? that way i can just modify it
vp textreplace
thank you, goat
absolutely not
i downgraded to sequoia
new metal sucks ass
you can't even have 10 apps open with it
thanks to this goated plugin, i can now be takopi-pi.
Just keep in mind that homestuck typing quirks are mega cringe
are you really takopi if you can't say pi after every sentence yourself
takopi doesn't say himself either-pi, its just his habit-pi
-pi:P
π
you have psychosis
has anyone made a typing quirk plugin
testing a plugin I made where it makes the avatars and server icons square, because I like it looking like that.
can't you justu se css
out = out.replaceAll(/\`.(.+?)`/g,"$1").split("\n").flatMap((entry) => entry.split(" | ")).filter((entry) => ["rv","wv","wl","st"].some((register) => entry.includes(register))).filter((entry) => !entry.includes("β½")).map((entry) => entry.replaceAll(" ","")).map((entry) => entry.split("ββ").map((instr) => instr.replaceAll("β","")));
const chunk = (array, chunk_size) => Array(Math.ceil(array.length / chunk_size)).fill().map((_, index) => index * chunk_size).map(begin => array.slice(begin, begin + chunk_size));
let left = [];
let right = [];
out.forEach((pair) => { left.push(pair[0]); right.push(pair[1]); })
let leftChunks = chunk(left, 4)
let rightChunks = chunk(right, 4)
let instructions = (leftChunks.length >= rightChunks.length ? leftChunks : rightChunks).flatMap((_,i) => [leftChunks[i],rightChunks[i]]).flatMap(_ => _).filter((entry) => entry != null).map((entry) => entry.split(",")).map((entry) => [[entry[0].slice(0,3),entry[0].slice(3)],entry[1]]).map((entry) => entry.filter((instr) => instr != null)).map((entry) => typeof entry[1] !== "string" ? entry[0] : entry[0].concat(entry[1]))
javascript, truly the most beautiful language
you know it's working when you have more code than empty space
wtf is this
is this some pseudo asm
drop
you would have to buy a game
why
cause the puzzle is in the game
you would also be forced to use javascript all of the time
is the game about reverse engineering basically?
nah
this is just a huge ass puzzle somebody dropped
actually yeah the game is kinda about reverse engineering
the games tagline is literally "before you is a system about which you know nothing"
interesting
it's a MUD, if you've ever heard of those
@solid gazelle using elle as a scripting language
#!/usr/bin/env -S ellec --silent --run
use std/prelude;
namespace DIR;
enum DirentType @repr(u8) {
Dir = 0b00000100,
Reg = 0b00001000,
}
struct Dirent {
u64 ino,
u64 seekoff,
u16 reclen,
u16 namlen,
DirentType type,
char name // static array if you take the addr at this field :)
}
external fn opendir(string path) @alias(DIR::open) -> DIR *;
external fn readdir(DIR *dir) @alias(DIR::read) -> Dirent *;
external fn closedir(DIR *dir) @alias(DIR::close);
fn collect_files(string path, string[] out) {
dir := DIR::open(path) ?: $die();
defer dir.close();
while dirent := dir.read() {
if [".", ".."].contains(&dirent.name) { continue; }
out_path := "{}/{}".format(path, &dirent.name);
if dirent.type == DirentType::Dir {
collect_files(out_path, out);
} else if dirent.type == DirentType::Reg {
out.push(out_path);
}
}
}
fn generate_sources() {
path := "src";
$printf("Generating files at {}...", path.color("green").reset());
collect_files(path, files := []string);
io::write_to_file("docs/srcs.txt", files.join("\n"));
$printf(
"Generated {} files at {}!",
"{}".format(files.len()).color("green").reset(),
path.color("green").reset()
);
}
fn compile_docs() {
path := "docs/main.typ";
$printf("Compiling typst at {}...", path.color("green").reset());
libc::system("typst c {} --root ..".format(path));
$printf("Compiled {}!", path.color("green").reset());
}
fn main() {
generate_sources();
compile_docs();
}
@valid jetty Elle package manager
Who is she?
what's her pronouns
a butterfly named after one of my friends
1 eye
@valid jetty what if i use ai to make it hd
ITS SIMPLE BY DESIGN
What of I use ai to make you hd
What of I use ai to make you hd
I only posted that once
OOP when
never
inheritance is horrible, polymorphism already exists in some form, encapsulation treats the developer like a baby (i dont trust that you can use my AdderFactorySolutionProviderFactoryStrategy correctly so im gonna spoonfeed you)
the polymorphism
zoot master rage baiter
zoot im not mad just dissapointed
rosie so mad
this is so cute
i need to make rosie rage
i feed minky butterflies @valid jetty
so mean
wing moment
uhh pretend thats a java spring reference
rosie is stalking wing
β€οΈ 1
actually i got the image before that was tweeted
it can basically be functional if i implement closures
make elle both functional and object oriented
@lyric latch love?
do
Constructors only, no classes
make ellescript
rewrite elle in C
Rewrite c in elle
@valid jetty rewrite elle in icypeas
see now that is a great idea
@valid jetty make elle 2
Have you done Bad Apple in elle yet
no lol
can't be that hard can it
get an mp4 of bad apple in 960x540, ffmpeg it to a bin, read it in elle, display a raylib window and swap to a new frame in the bin every frame
then get a bad apple audio and make it also play in sync with the bin data
you can just read it in chunks of 960*540*#size(i32) and directly set that as the color array in the image to display via raylib
recreate the actual original stage
how is rosie so smart
i was basically right
ELLE JVM
I removed something from a file and github copilot suggests the commit message as adding the thing 
Raw rgb my beloved

Could actually do gray for bad apple
yep i did
oh wrong reply
yep i did
surprisingly simple
this is with full resolution
it still runs at 30fps (the framerate of bad apple) but i made it 10% res in the code afterwards just so the bin isnt so big when i commit
even with 10% the bin is 42mb
i may just gitignore the bin and mp3 since the video produces those when you run the program
rosie the worlds smartest person
this is like not that complicated
wrong
the only downside of this approach is that there is a 1gb temp file during playback
optimize how
thats just how much raw data there is in 200 seconds of footage at 480x360 at 30fps at 1 byte per color
optimize
shrimply don't use raw data
raylib cant really load anything other than raw data it can but videos arent comprised of images per se
its not like i can output a bunch of pngs and render them in sequence
like i could do that but it wouldnt work very well
rosie has never heard of frames
if anything i would just use libavcodec and at that point i just have a shitter mpv
@valid jetty
no-pi, she's just my cutie-pi :)
my text appender is appending after emojis π₯ back to coding-pi.-pi.-pi.-pi.
hooorayy-pi!!!! it works now-piβ
I hope you know this is cringe af
@deep mulch Rate the setup
thanks i hate it
insanity
so cute-pi
@valid jetty explain what impedenance is
?????
I think zoot might just be stupid
rosie doesnt know
i am the smart one
@valid jetty explain reactance
explain how to read a smith chart
explain SWR
im not doing anything to do with electricity
explain dbm vs dbfs
@valid jetty explain how a yagi uda antenna works
explain how a dipole works
explain how an endfed halfwave works
explain everything NOW
two equal but opposite electric charges are spaced apart
in an electric field the positive side feels like an attractive force while the negative side feels like a repelling force
idk
@deep mulch explain how to talk to a woman
different reference points to measure signal levels
idk
hello there gorgeous, how are you today @royal nymph
zoot you forget im doing computer science not electronics
why the heck would i know any of this
cause youre a genius
its equivalent to asking a marine biologist on historical events from the 1200s
zootie a bit tupid but that's okay we love him anyway
@valid jetty calculate the wire length needed for a resonant 40m antenna
display: none;
display: zoot;
bwa
you ask in a discord server
/run
#include <stdio.h>
#include <stdarg.h>
void putchars(int ch, ...) {
va_list list;
va_start(list, ch);
if (ch == '\0')
return;
putchar(ch);
for (;;) {
ch = va_arg(list, int);
if (ch == '\0')
break;
putchar(ch);
}
va_end(list);
}
int main() {
putchars('H', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', '\n', '\0');
}
Here is your c(10.2.0) output @winged mantle
Hello world
for some reason i wrote this instead of the normal hello world to test build setup
the only good way to develop a website: backend in C with mongoose and sqlite
wasm based frontend using sdl with clay
..why
good
what if c compilers supported
#pragma using prefix_
and that removed the prefix on all symbols

rehusked
cringe is fun-pi
really-pi? its my favorite one (took alot of time-pi)
this man knows-pi!!οΈβ€οΈ
@valid jetty
i don't think you can fix the reddit mascot being so ugly
it looks like a cute mascot to me-pi
true
anyone here familiar with bun workspaces? no matter what i try i get this
hmm weird
still happening, the current setup is like this:
- Root(dependencies: @repo/portalbush)
- @repo/portalbush
- @repo/portalfish (dependencies: @repo/portalbush)
i want portalfish to depend on portalbush
should be working right?
smh bun is not bunning
Something something just use pnpm
Bun stopped working so im rewriting the entire project
@jade stone
I have somewhat mixed feelings on pnpm, but they're overall positive
stinky sadan
(plus at least you can just edit and debug the code if something doesn't work)
Bun will have first party grok integration
ai in stdlib
what do i make
- never (!) type in the type system
- static arrays in the type system
- elle intrinsics to #env like PLATFORM, VERSION, TARGET, ARCH, accessible at runtime, optionally disableable at compile-time (
--nointrinsics)
these are the features that would be most interesting to make i think
all three
well yeah but which one do i make right now
all three
i feel like never type would be quite easy to make maybe
never type > static arrays > the other option imo
are there tuples of any length rn
nop
never type should be easy and is very useful
yeah but so are static arrays in the type system
useful for any real work with C libraries
i dont wanna make this rn because it sounds like a lot of work
@royal nymph
jvm support
my vote is for static arrays
inheritance
elle build script
Makefile
no semicolons
look
eh
you can make to build or make run to also run
and it comes built in with incremental building and stuff (well i guess if you make the raytracer recipe depend on all source files)
id only use make for like C and C++
its great
does Elle have external dependencies yet
nop
dependencies would be a dedicated build system task
only if it's enforced that a never return type actually never returns
and even then idk
see how typescript handles this and replicate
typescript never is pretty sane
is that like C++ noreturn
well i want to use the never type to run defers
like i want to call all deferrers before calling a function that returns never
add attributes to Elle @valid jetty
so yes, it has to be enforced that the never type actually means "this never returns"
zoot is just spewing words
does qbe allow that
time for 50000 refactors
it was a feature that got removed
@valid jetty make compiler auto unbox
what was a feature, inline assembly?
oh that was IR
just extern C for inline asm
elle will soon be ported to java
or.. not
feat: get rid of rosie
add vectorization
add avx512
https://github.com/st-tech/ppf-contact-solver @valid jetty
sooo cool
i saw this in a 2 minute papers video
good
me too
roie probably jotts down notes watching technical videos
@valid jetty you write like 5 pages of notes
Jotting this down
@lucid trail should i allow contravariance for static array types?
what is contravariance
as in, should i32[41] count as a subtype of i32[40]
that's weird I think
or should the sizes need to match exactly for it to work
by subtype you mean it can be "promoted" to i32[40]?
yes
i feel like that could cause unintuitive behavior
fn foo(fn(i32[4]) cb) {
cb(#[1, 2, 3, 4, 5]);
}
does Elle promote integer types @valid jetty
ok so just when theyre exactly equal, got it
yes
what is xs here
also, should pointers be equal to static arrays as long as they have the same underlying type
a function which acccepts a static array of 4 i32s
oh wait
ignore that lol
uhh
explain
a static array is just a pointer internally
if i have an i32* and i pass it where a i32[4] is expected should type checking pass
where is the length held though
its not
it's gone yeah
youre just giving responsibility to the developer that their buffer at that pointer is big enough
maybe i'm thinking too much about safety
probably should require explicitly casting
i can do that
Old CPU support dropped
Elle doesn't support x86_64 so wouldn't lose much
right
@valid jetty
I can't remember
my mind is frayed
this is so cursed
??? yes it does
I thought it didnt
x86_64 is 64 bit
I know that
x86_64 should be default
??? no its not just set to macos and aarch64
nvm the host architecture should be default
"Defaults to host architecture" would be a better message
maybe it was windows support I was thinking of
True
thats just a macro body
@valid jetty @valid jetty
Nah thats husk
hush
I thought it didnt
hush now rooe
rooe
@valid jetty Elle needs reflection
make Elle faster
hmm well
@lucid trail this is an interesting predicament
the size of a buffer may be a runtime value
okay
so therefore the ergonomics of this kind of code arent nice
fn foo(i32[4] xs) {
...
}
fn main() {
i32 xs[4]; // you cant type this as a static array because the size is a runtime value, so it must be a pointer
foo(xs); // either you implicitly cast the pointer to the static array type, giving the bounds access responsiblity to the developer
foo(#cast(i32[4], xs)); // or you have to cast, which is kinda not ergonomic to use and annoying
}
i dont really see the issue here
which one is better
why is the size a runtime value? like the 4 will be unknown at compile time?
foo(xs);
you can put any value there
use std/rand;
fn main() {
i32 xs[rand::random(0, 100)];
}
thats why it cant be typed as a static array
oh, i was under the impression you couldnt do that like in C
yeah that's pretty bad actually
NOOO
NOT THAT SYNTAX
elle has fallen
?
array size with the name
that syntax has literally existed for over a year
should be with the type
well i guess you can also do that now
but for that case the size must be an integer literal
hm
im adding static arrays to the type system
which means this code will be valid
fn main() {
i32[40] xs;
}
but the 40 cannot be a runtime value anymore
i guess i can remove the buffer syntax then? but its useful in some cases
if i remove that syntax then the only way to allocate a runtime-value-based static buffer is to allocate it on the heap and i would rather not lock the developer to do that if i can help it
should you not err on passing an array of unknown size to a function that requires a specific size
add .into() already
surely you can implicitly convert char[2] to string
well
well how is this any different from allowing converting any static array type to any pointer of the same type
string is just a unique char* type
can you not do this
its just converting the other way is unsafe
?? is this for casting
it's actually logical
it just doesn't scale very well when you have an array of function pointers
the declaration reflects the usage
int ints[5];
int i = ints[0];
So you say, but yet ints[5] is ub
yes
π
the behavior of #cast is just a big long function at compile time that defines what can cast to what
i don't think this has ever been a problem, the real issue is that it gets confusing when it's more complex
in fact it's quite awful https://github.com/acquitelol/elle/blob/rewrite/src/compiler/lib/convert.rs
but it works
als o in c++ it's just a mess
as when
it won't let you deref that
that's the point
why is that strange
better than a match fr
the declaration doesn't reflect the usage in the same way
roinga
Declaration matches usage is and has always been nonsense
that doesn't stop it from being sort of logical some of the time
int * a declares a variable a of type int*, not a variable *a of type int
well no but semantically void has no size, therefore dereferencing is just nonsense because in assembly the type you're dereferencing refers to the size of the register to load from
like you can't load a buffer of (*β§ββ¦*) sized stack memory
It's not that it has no size, it's that it's not a type
well it very much is a type, it's the unit type
Not in c++
hm
I prefer the pointer as *type name = value
AWFUL
nono this is good
much easier to parse in fact
Type after is objectively superior in a world with type inference
Why are you parsing a multiplication in my type
lol true
ok well i think i'm done implementing the static arrays
i just need to test all cases
there are a lot of edge cases where this could go wrong
@valid jetty you love C++ callback type syntax
what even is that
typedef void (*cb)(int);
I prefer typedef void cb(int); and then using cb*
- static array of structs, setting a struct's field
- struct with a static array, taking the address of an index in that array in the struct
- multidimensional static arrays
- dynamic array of static arrays
- static array of dynamic arrays
etc.
pointer to a callback then
pointer to any function
and anyway this is the C syntax
c++ has int(int, int)
iirc
and std::Function<int, int, int> for closures
something like that i'm not a c++ dev
roieeeπ
til this works...
No, std::function<int(int, int)> for dyn dispatched functions
yop
@valid jetty rewrite Elle in C#
i guess this is what happens when you use 500 languages
int(int, int) is kinda like rust's [T] in that you can't have values of it directly, only behind pointers
oh hm
idk in elle you can only have function pointers
fn(i32, i32) -> i32
dyn dispatch is a myth
@valid jetty can you make alias to a function pointer in elle
no not really
do
@lyric latch any idea what could be a good way of getting an npm dep in docker from private registry
i swear to god i am going to lobotomize typescript-eslint
WHAT
i LOVE eslint but i hate it actually
@lucid trail should this be allowed
i think it should be explicit and fail on the length not being 16
hmm ok
seems like its working
is there anything like i32[2].join(i32[2]) => i32[4]
that would be cool
you cant set the size in generics, otherwise yes
fn __arr__::join<T, A, B>(T[A] self, T[B] other) -> T[A + B] {
T[A + B] res;
for i in 0..A + B {
if i < A {
res[i] = self[i];
} else {
res[i] = other[i - A];
}
}
return res;
}
``` something like that
this has a lottttt of holes however
this is probably about 10 refactors away from being real syntax
T[A][B].transpose() -> T[B][A]
i just dont know how i would make the static array bounds generic
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
i have.. an idea
however whether it works uhhh..
interesting
My website is >50% divs 
teach
Idk
@lucid trail
woaw how did you do it
i made the size an internal type that just holds a number and then monomorphized it like any other type
this type is not representable with code but it can be monomorphized
if want_to_make_good_code then
make_good_code()
end
this is sooooo silly thank you for this idea
YAY
roie
could you do T[A][B]...[F].rank() => 6 (has no reason to exist but would be cool)
although I would assume no variadic generics yet
that would simply be insane
if there were conditionals based on type conditions, that wouldnt be too hard
also i feel like this is the wrong way round?
well no actually
you access it correctly by a[row][col] but the type is defined as T[cols][rows]
could you do specific values like restricting .cross_product() to 3 and 7
isn't it actually ambiguous
you could do ```rs
fn foo<A, B>(i32[A][3], i32[7][B])
hm wdym
oh wait that was a stupid question
it's not clear if its 4x2 or 2x4 when i look at it
well i think most languages would type it as T[4][2] (row major) which is a problem because i type it as column major
hm
im about to make it row major
does T[A][i] ensure i<A, array indexing
why would it need to
kind of like a tuple
instead of asserting a.len() == b[0].len() couldn't you just do T[B][C] b
yep it works
fn __arr__::mul<T, A, B, C>(T[A][B] a, T[B][C] b) {
T[A][C] res;
for i in 0..a.len() {
for j in 0..b[0].len() {
sum := 0;
for k in 0..a[0].len() {
sum += a[i][k] * b[k][j];
}
res[i][j] = sum;
}
}
return res;
}
thatβs sick
smh crab couldve been Rust
oh okay
got tile revealing working
sleep
@valid jetty im doing aoc in rust this year
is this minesweeper or gambling?
i've decided
i may try it in elle
but i won't be competing for the fastest time i'll just do it whenever i get to it
i need my beauty sleep i can't sleep for 3h a night every night and wake up at 4:45am the whole december again
or well until the 12th
I'll probably go with golf python again
i will be in Kazakhstan starting day 7
so it unlocks at 10 am π
you know you can just go to sleep earlier
im doing AOC in JS this year
does this mean i wont have anyone to compete with
TypeScript
or i'll redo the one lang a day thing
i think Satan did it in ts types
so insane
i wanna to do it in c++ templates
gpu
yeah
add 2 hours delay
so I have a chance
it will be like a >12h delay, if i don't wake up to do it i will just wake up at a normal time and then i have school
at school i have lessons and people to be with, so i'll just do it when i get home
css syntax is crazy @crude star


