#🪅-progaming
1 messages · Page 77 of 1
Uh
can i do ```rs
let x = if x {
if !x.y() { break false; }
perform_thing();
true
}
i've used this litererally everywhere lol
I'll file that that under "yes, weird sql dialect"
it’s very often that i wanna do this but because it’s an expr and i can’t return i have to make it a nested statement
let x = 'a: {
if x {
if !x.y() { break 'a false; }
perform_thing();
}
true
};
and also if let Some(x) with a follow up condition in the if
that is another way i need to nest
if let Some(x) = y && x.is_something() { } will be stabilized in next release
A browser interface to the Rust compiler to experiment with the language
oh ok then i guess i’m gonna fix everything that doesn’t use it
i have soooooo many such cases
Things being stable in nightly but not in stable is kinda weird though
it’s literally ```rs
if let Some(x) = y {
if x.z() {
}
}
And what do you expect a char followed by a colon to mean
I just #![feature(let_chains, never_type)] in most of my projects
is there a token system which is just simple
instead of using signing it just remembers all token hashes
then you can invalidate them
Greping all of my projects, it seems I have ```
1 abi_thiscall
1 assert_matches
1 box_patterns
1 core_intrinsics
1 float_next_up_down
1 fmt_helpers_for_derive
1 generic_const_exprs
1 is_sorted
1 iter_order_by
1 proc_macro_quote
1 ptr_metadata
1 slice_from_ptr_range
2 array_methods
2 backtrace_frames
2 if_let_guard
2 pointer_byte_offsets
2 proc_macro_span
2 test
3 array_chunks
4 slice_flatten
5 provide_any
5 try_trait_v2_residual
6 pattern
6 proc_macro_diagnostic
7 try_trait_v2
8 lazy_cell
8 never_type
10 array_try_from_fn
11 error_generic_member_access
12 array_try_map
18 try_blocks
30 let_chains
39 decl_macro
Though some of them are several copies of the same project because fuck organization

why the fuck did git diff > patch.patch save it as Macintosh (CR) 
i'm trying to replace a patch with my own and uh does it matter that the header of the patch differs
like when i use goland to make a patch it adds some additional headers
when i use git diff > something.patch it just has none

the original patch:
From 54e045b9e8ecfca24aac7ece00f0fc7d3969b32e Mon Sep 17 00:00:00 2001
From: Jonathon Hall <jonathon.hall@privateinternetaccess.com>
Date: Thu, 27 May 2021 11:55:33 -0400
Subject: [PATCH 1/3] Add main, /dumplog, /findinterface, /cleaninterface to WG
service
---
embeddable-dll-service/build.bat | 3 +-
embeddable-dll-service/main.go | 136 +++++++++++++++++++++++++++----
2 files changed, 120 insertions(+), 19 deletions(-)
diff --git a/embeddable-dll-service/build.bat b/embeddable-dll-service/build.bat
index 0d2cbdbb..be294310 100644
--- a/embeddable-dll-service/build.bat
+++ b/embeddable-dll-service/build.bat
@@ -34,8 +34,7 @@ if exist ..\.deps\prepared goto :build
patch made with git cli:
diff --git a/build.cmd b/build.cmd
index dcd53e0..60f7f46 100644
--- a/build.cmd
+++ b/build.cmd
@@ -52,11 +52,9 @@ if exist .deps\prepared goto :build
patch made with goland:
Index: build.cmd
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/build.cmd b/build.cmd
--- a/build.cmd (revision 4b1b67e3b6657ee90176233b0d57070bd0e32ccb)
+++ b/build.cmd (date 1745971111919)
@@ -52,11 +52,9 @@
why are they all different 
No, the header does not matter
Nice sql injection you have there
sadly no sql injection 😔
this is enterprise code we are talking about all the values here have been sanitized 5 controller levels up
guh i have a feeling what i'm doing might violate the repo's license 
why are they even doing it like they literally made zero changes to it lol
@lucid trail
that place which threw an error before
maybe it shouldnt say semicolon it should say delimiter token
good
oh that makes sense
basically now i just restrict what tokens can come after specific exprs if the token stream is not fully consumed by the end of the parsing of it
because for example you can parse A::B as an enum literal, but then theres still a . token right at the end in that token stream which hasnt been consumed so you can put the enum literal's ast node into a different parser and continue parsing
the issue is that before i wasnt raising an error when the token stream wasnt consumed but the token wasnt one of the known ones
it was just an empty case
ie _ => {}
??
yeah
i got warnings before for too many bools in my structs
and for having Option<Option<T>>
static code analysis is so cool
trueee

nix logo on wallpaper
you dont complain about windows logo on wallpaper
oh the name is irrelevant??
on windows
Wow, your scheme makes absolutely no difference between dark and bright colors
thats not what cognitive complexity means 😭
read the help:
i think they're working on it
the function body is too complex it does too many things
yop i realized that by now
what scheme
Colors
u mean the palette?
theyre difference shades of catppuccin mocha
i only use dark mode
catppuccin is adding tints/shades and redoing ansi
nop
if i understand correctly one row is for light mode and one is for dark mode
i dont need light mode
It's unrelated to dark/light mode
Terminals have 16 customizable colors
You only have 10
i use the default kitty catppuccin mocha theme
i intentionally keep it that way, but yeah
i didnt even know what it was and i like how my colors look
Here's my colors
what do i do here
warning: module has the same name as its containing module
--> src/parser/mod.rs:2:1
|
2 | pub mod parser;
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
the logic is in parser.rs and i dont see how i can find a better name for it
windows 11 default wallpaper doesn't have it
add it to #![allow]?
windows 11 isnt the only one
the catppuccin color palette doesn't have enough shade varieties
take my config with a grain of salt but this is what i use
#![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::cargo)]
#![allow(
clippy::format_in_format_args,
clippy::too_many_lines,
clippy::wildcard_imports,
clippy::option_option,
clippy::module_inception,
clippy::single_match,
clippy::struct_excessive_bools,
clippy::fn_params_excessive_bools,
clippy::too_many_arguments
)]
in austria we call this Schere
warning: this function has too many lines (341/100)
--> src/interpreter/interpreter.rs:24:5
|
24 | / pub fn evaluate(&mut self, expression: Expression) -> Result<Value> {
25 | | match expression.kind {
26 | | ExpressionKind::Assignment {
27 | | name,
... |
368 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_lines
= note: `#[warn(clippy::too_many_lines)]` implied by `#[warn(clippy::pedantic)]`
ig id have to split up each expression kind into its own function
reminds me of that one time i was writing ts for work and forgot to enable eslint
https://github.com/eagely/icypeas/commit/8303c13c8a8af509f5bad2c33cacd52975baaaea
tell me about it
i have 285 suggestions
and thats after spending hours fixing most of them

the metadata stuff???
am i supposed to have that
omg im gonna run this on my thesis
idk
just how are there less than in icypeas
horror
a lot of them are removing usued async, early await and format args
@hoary sluice can icypeas do this ```rs
use std/prelude;
fn direction(i32 *other) -> bool {
return !other ? direction(&0) : &0 > other;
}
fn main() {
io::printf(
"The stack is growing {}wards for your architecture.",
direction(nil) ? "up" : "down"
);
}
a lot more is vibe coded in my thesis than in icypeas
i was gonna say
lol
in my thesis i probably have sections that ive never read before
yea but it has less warnings
wtf
yop
send
what
i alr sent
scroll up
icy had like ~180 iirc
cant check now
i have sections that i have never read before
the what thingie
^
horror
altho i have implicit prints enabled
..what does that mean
did you make the print hello world thing real
omg this throws an error now YAY
rosie you are so gullible
nop
i meant
when the interpreter evaluates something it prints the value
i dont have a print funcion
no i just like, wanted to see
all languages are cool to look at
(except j*va)
theres nothing to see i cant detect anything from io let alone stack direction
need to make ascii decimal to string so i can write hello world in church numerals
stack direction is literally just calculating a difference between the pointers from 2 stack frames its not that difficult
although i guess you dont have pointers
which is a slight issue
lmao
- i dont have pointers
- i dont have memory alloc
- neither me nor icypeas know what the stack actually is
the stack is a statically sized memory region for local variables, as a way for persistent storage when things cant fit in registers without heap allocation
something like that
its fast to allocate as you just subtract/add from a pointer to get a new one
ik what the stack is but not the details
like direction
ig if the memory address decreases it grows down?
its just whether you subtract or add to the stack pointer to allocate things
on modern cpus it grows downwards
creating a new stack frame (a frame when you enter a new function) will give you a 100% certainty of whether the stack is growing downwards or upwards
if you just allocate 2 stack variables and compare their pointers that wont work correctly because there is no rule that the variables must be allocated in a specific order by the compiler (unless volatile)
so you need to generate a new stack frame to ensure that theyre actually allocated in the order you want
then allocate 16MB of variables
why
and take the average direction
gn
cant
in a year you can
has anyone ever tried to build a client from the ground up for discord?
like an open sourced discord client built from ground up
a lot of people
most failed though
theres one for macos called swiftcord
bonfire probably
sure there are third party clients for discord
https://github.com/diamondburned/dissent (golang, doesn't impersonate official client at all and doesnt send xsp pls dont use)
https://github.com/uowuo/abaddon (c++, makes actually effort to impersonate client but seems to send not enough headers, just xsp, referer, and origin, also outdated chrome version in superprops)
yop
what's the best way i can use something like GetProcAddress in rust
like so i can load a func from a dll
Use the GetProcAddress function from the windows-rs crate.
use windows::Win32::System::LibraryLoader::*;
use windows::Win32::Foundation::*;
fn main() -> windows::core::Result<()> {
unsafe {
let module = GetModuleHandleA(None)?;
let addr = GetProcAddress(module, "function_name\0".as_ptr() as *const i8);
// ... use addr
}
Ok(())
}
is that real
looking at this code still traumatises me...
i guess at least my custom auth has got a little better than when i started
i.e. linear search over all keys
thank you rust..
another useless discord feature gawdamn
what is your latest hobby
cryptography shit 😇
got into it uh
today.
anyone know if its possible to make a plugin that auto sends a meesage when a channel cooldown is down?
Spam plugin doesn't sound like a good idea
no, not spam Im a seller on a black market
but I keep forgetting to send my sell message
and im losing buyers this way
an auto post would be perfect for that
use a bot and stop using discord as a marketplace
Adopt me pets black market
what
yes
making a bot for a server im in using python (only coding lang i know to use 😭 ), anyone know a good free host i could use for it? i know i could just run it on my own laptop but i'd rather not have it be eatin resources
All the good free hosts have already been exploited by cryptominers and the like
There are none left
🫡
i do have an old tablet i dont rlly use anymore, any way i could possibly run the bot using that lmao
considering its a pretty old tablet tho it may run slow right
if you have like an old desktop computer which you dont use anymore
you could use that
Perhaps look into using Cloudflare workers if your bot uses only interactions?
unfortunately not
ill look into that, thanks!
thats cool
its cooler because i get the unsigned ones for free
fn u64::max() -> u64 {
return 18_446_744_073_709_551_615;
}
fn u64::min() -> u64 {
return ~u64::max();
}
fn u32::max() -> u32 {
return 4_294_967_295;
}
fn u32::min() -> u32 {
return ~u32::max();
}
fn u16::max() -> u16 {
return 65_535;
}
fn u16::min() -> u16 {
return ~u16::max();
}
fn u8::max() -> u8 {
return 255;
}
fn u8::min() -> u8 {
return ~u8::max();
}
Personally I'd do u64::min = 0, u64::max = ~u64::min
yall wanna see something cursed?
https://github.com/deniz-blue/games-bot/blob/main/src/games/TicTacToe.tsx
cool
nothing cursed whatsoever about using something react like for games
why use unreal engine when you can use react ported to discord 
i mean realistically it doesnt matter
this is fun
that you can do this instead of making actual functions
banana
Elle arrow functions 💀
clean your laptop by tossing it into water
Defile your laptop by tossing it into hot dog water
baptise your laptop by tossing it into holy water
steve jobs your laptop by making it stand up in a toilet
@hoary sluice @fleet cedar is this sane
https://github.com/rust-lang/rust/blob/master/tests/ui/mismatched_types/binops.stderr rust hardcodes errors????????????????????????????
Is that not okay
no its okay i just didnt know lol
i thought they did like, attributes or proc macros somewhere to define them
I thought the lengths of things like ^^^^----------^^^^ or | were calculated
ok they dont hardcode it
i was wrong
that file is just what the compiler emits when compiling an erroneous file
that way it can be used for testing
you're looking at tests too
lol wtf
oh
i feel like transmuting in the stdlib is probably fine right
idk of a better way to do it
seems to work tho
[limits.le:6:5] f64 f64::MAX = 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000
[limits.le:6:5] f64 f64::MIN = -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000
[limits.le:6:5] f32 f32::MAX = 340282346638528859811704183484516925440.000000
[limits.le:6:5] f32 f32::MIN = -340282346638528859811704183484516925440.000000
guh i was expecting the debugger access
got the same message
Wow, fastest and most performant?
me when ai slop
lol i didn’t even read it
@valid jetty @fleet cedar @placid cape any of yall got the link to the site that show aoc leaderboard beyond 100 ppl?
sorry but im pretty sure ed is faster
ty
there was another one that was much simpler
and i think u could link to a specific person
i need a link to #115 2023 on my resume 🙂
if the person wrote this website correctly (using ids) you can still link to it
no they didnt
horror
WHY IS NOONE USING IDS
lol i drop 102 places on the median lb
cause i have 4 top 10 finishes out of 7 lb spots
having an id is great for this kind of thing 😭
how am i gonna explain to an interviewer that im too incompetent to solve hard ploblems 😭
you can do https://url.com/a#id and it snaps to that id's element on the page
yeah because this page doesnt use ids
only classes
WAIT @hoary sluice YOU BEAT ME GLOBALLY IN 2024 NOOO
pog
i got points on the last day but not enough to beat either of you two lmao
i see
it was exactly as i predicted lol
no points on p1 but just barely points on p2 because of its lack of existence and my knowledge of that lack of existence
so unfair
i did d25 properly
yall just compared the strings directly i think
no just d25
oh you said d25
are you blind it says edited
import sys
def can_fit(ls, ks):
return not any(l == '#' and k == '#'
for lr, kr in zip(ls, ks)
for l, k in zip(lr, kr))
def solve(c):
check = lambda i: [b.split('\n') for b in c.split('\n\n') if all(c == '#' for c in b.split('\n')[i])]
ls = check(0)
ks = check(-1)
return sum(1 for l in ls for k in ks if can_fit(l, k))
with open(sys.argv[1]) as f:
print(solve(f.read()))
``` 
no i know but currently im sitting in a car where the light is making my laptop impossible to see
solution.py: Lines 5-27
def schematic(grid: list[str]) -> list[int]:
return [
sum(1 for row in range(len(grid)) if grid[row][col] == "#")
for col in range(len(grid[0]))
]
def locks_keys(filename: str) -> tuple[list[list[int]], list[list[int]]]:
data = [x.splitlines() for x in open(filename).read().split("\n\n")]
locks = list(map(schematic, [d for d in data if d[0].count(".") == 0]))
keys = list(map(schematic, [d for d in data if d[-1].count(".") == 0]))
return locks, keys
def can_fit(lock: list[int], key: list[int]) -> bool:
return all(l + k <= 7 for l, k in zip(lock, key))
def part_1() -> int:
locks, keys = locks_keys("input.txt")
return sum(1 for lock in locks for key in keys if can_fit(lock, key))
yeah really similar to mine
Day25.kt:
package solutions.y2024
import Solution
import utils.sdnl
import java.io.File
class Day25 : Solution(2024) {
override fun solvePart1(input: File) = input.sdnl().partition { it[0] == '#' }.let { (keys, locks) -> keys.sumOf { k -> locks.count { l -> l.indices.all { l[it] != k[it] || k[it] != '#' } } } }
override fun solvePart2(input: File): Any {
return "me when the chronicle gets delivered"
}
}
i fixed it afterwards
how is this readable to you
sdnl 😍😍
guys i cannot believe they named a child after a pubsub platform 😭
ok fair
Do you mean like cryptographic ECDSA-P256 signatures?
We stan ECDSA-P256
@valid jetty typst couldve been so good but they made whitespace significant
cryptography is my favorite money making method
Is there a reference/doc that I can read that explains how to build vesktop with a custom build of vencord?
have you ever used the context keyword in a function before
it’s kinda cool
@valid jetty i can remove the wip on icypeas in my resume now cause its kinda usable
the what
context
repeating it doesnt help
it makes a function lose its return value (it becomes dynamic) which means you can’t use it anywhere in another function, but if you call it at the rendering site it gives you info about the place you’re rendering like the current font, position, etc
you CAN however only apply context to the root function and everything else doesn’t need it because it’s inherited from the root function
you should research it it’s interesting
i have no idea what you just said but it sounds cool
is it advisable to put "familyguy" for this string the documentation claims is unushed
think of it like a generic function but instead of being generic over args it’s generic over an implicit context that lets you do extra stuff
history.replaceState(null, "absolutely gigantic pigmented testicles", "/");
i still dont understand
what does it actually do
ive never even defined a function in typst idk whats different about it
it’s sort of like ellemeta if you know how that works
nop
the function is called with extra stuff and the return value can be swayed as a result so it becomes dynamic
it gives the function “context” about stuff where it’s called
like the font applied when it’s called
otherwise you have no way to do that because functions are idempotent
and then you cant use it in another function?
nop because the return value is lost
but you can use it if you only put the context keyword on the root function which is called to render on the page
ok that i dont understand
hold on gimme like 10 mins
is this
or
(ignoring translation errors)
basically you can have this function
#let foo() = if text.lang == "jp" [foo] else [bar]
it picks the literal text foo if the lang is jp, else bar
its a sysadmin job
but if you try to call it
it wont let you
because you can have a different lang at different points in the file
so you add the context keyword ```rs
#let foo() = context if text.lang == "jp" [foo] else [bar]
oh and it checks if the lang is jp at the call site?
however now, you never know at the function definition what the return type will be
so the return type is lost
why dont you know the return type
hence you can no longer call foo in other functions
if foo and bar are the same type
idk why but the function becomes dynamic
you get this thing called "content" which is just anything that can be rendered
you no longer have real types
i will sign up and get the job before you
id like to see you try
well, all of typst is dynamically typed, the types that "exist" are fake, like ts
when you do context you just do type erasure
at the expense of extra call-site info about the file in the function call
this doesnt state any education or work experience requirements and the guy at the recruiting day said they have this https://www.svc.co.at/cdscontent/load?contentid=10008.793074&version=1738326560 as the entry level where you need to know cd and ls and that theyll probably take me
ok tbf jetbrains ai autocomplete is complete ass
sorry whats cd :)
i only use zoxide 🙂
i feel like you dont have to even really be a programmer to know what cd is tho
or a sysadmin
or know anything about computers much at all
lc.octr
44k a year is like grocery store
-# <:i:1363558878872080414> 🇩🇪 German <:i:1363556471303831552> 🇺🇸 English
We offer meaningful work in a dynamic environment with flexible working hours and attractive training opportunities. This position has a minimum collective agreement salary of EUR 44,450 gross per year. A market-conform collective agreement overpayment is offered depending on qualifications and experience.```
ok no thats 30 but still
in if text.lang == "jp" [foo] else [bar] text.lang depends on the call being in a context block
but what you can do, is this
#let foo() = text.lang == "jp" // doesnt need context block
#let bar() = context if foo() [a] else [b]
as long as the root function call has a context
everything that depends on a context will be callable without type erasure if its called within that function
its similar to ellemeta in the way that the function gets extra info about the call site when its called
you get all of this if you need it
oh yes ik how ellemeta works but i read it as elementa lol
i was thinking of ellemeta
lmfaooo
when u said this
but yes conceptually its like ellemeta but you dont lose the return value when you use ellemeta
I don't know what you mean by "loses its return value", doesn't the context expression just produce an opaque content
yes, which is essentially losing its return value
No?
you can no longer use it in stuff like conditions of if statements in non-contextual functions
because even if it returns a boolean it will return content
hence "loses the return value" though i guess i meant more like void* than void
if you know what i mean
obviously the return value still exists you just dont know what it is anymore
it is essentially like returning an any in typescript or whatever
or i guess more like returning unknown because it wont let you use the value
oh wait no it was this one https://www.svc.co.at/cdscontent/load?contentid=10008.792507&version=1734513807
this is oriented towards high school graduates with windows experience
and they pay 34
fuck windows

@hoary sluice https://www.youtube.com/shorts/GObdGWzbqao
No
yes
try gaming on linux then
have and do
works perfectly
yall keep bringing the same argument like we havent heard it a million times already
valorant doesnt work, go cry about it
this is sylvan franklin
he uses the same keyboard as me
try running raft then
raft has gold rating on protondb works just as well as any other game that doesnt use kernel anti cheat
im not paying 20 euro to prove a point
steam literally made their handheld console use linux and theyre the biggest gaming platform like there is nothing to argue here
"gaming doesnt work on linux" was an argument in 2017
it only doesnt work if theres a required windows kernel anti cheat; the actual game works perfectly fine but the devs block you from playing because youre not using their anticheat - this affects like 3 games
roblox explicitly tries to make it NOT work on linux and yet it still does, perfectly
because its either:
- roblox runs on linux, but there will be bunch of people cheating
- roblox doesn't run on linux, and there will be less people cheating
they made their anticheat once lenient enough to run on linux, and it was a mistake
It literally uses the android version what are you on about
90% of the time there is an active reason against linux support instead of "laziness" and it seems like 90% of linux users cant seem to grasp this
the official android client of roblox
please tell me where i said laziness
??? No
please tell me where i was talking to you specifically
😭
Linux kernel used in Android is massively different from normal kernel
Why is your name file
because i felt like it
Waydroid - Android in a Linux container
How do i learn code
laziness isnt an argument people are trying to make, if the devs are "lazy" that means they just dont care about linux support and their game will still run perfectly because of the awesome work valve has put in to proton
the only way it doesnt work on linux is if they make a windows-only anticheat and block anyone whos using linux
like val
laziness is very much an argument people are trying to make what the hell are you talking about 😭
yea maybe in 2020 or smth
why would you argue laziness when the game works
proton is open source and people who like using linux and really want to play a specific game which has poor linux support either contribute to proton or make guides for how to run that game https://github.com/ValveSoftware/Proton
and today almost every game will run flawlessly
that tells me nothing
afaik container is just a fancy VM
?
linux kernel used in Android is massively different from normal kernel
i know, why is this relevant
?
im not even talking about a specific game what are you trying to say in that message
because pretty much every game that doesnt use kernel anti cheat will work on linux
some, very rarely, with adjustments required
you are arguing with proton in mind, proton is half a step away from just booting up a vm/emulator, im specifically talking about people who want native ports of their games
they do not realise game developers often have their reasons for specifically not supporting linux
well yea i know making native linux ports of games, especially those not written in cross platform engines is hard and not worth doing for most game devs, especially indie devs, since linux is a very small portion of the community and theyd likely have way more success just working on more features instead of a native port, but this is why proton was made, its based on wine whose acronym literally means "wine is not an emulator", its translates windows api calls and doesnt emulate a full windows system, hence it has minimal performance impact, and games often result in having better performance than on windows just because theyre running on a linux system
ok
im sure theres people whove opened issues about native ports but its genuinely not neccessary and the devs can keep making windows only games, its perfectly fine as long as they dont implement a windows kernel anti cheat
ok
doesn't wine uses Z: instead of C: for whatever reason
it uses C: and has the host linux file system mounted to Z:
but why would this matter
mounting Z allows apps to access your linux file system, eg. when im working in microcap i want to be able to store my project files on my linux file system, not a fake c drive created by wine nested deep in a random directory
gonna add a check to all my apps that checks if there is a drive mounted on Z that contains a linux system then immediately crash, i will also check every single microsecond so the check will use up at least 50% of all system resources at any given time
i dont think that will actually slow it down by much
@hoary sluice anything else to add? https://github.com/acquitelol/elle/blob/rewrite/FAQ.md
first line is a bit wrong
this maybe/
why are you even comparing to c
im not gonna talk about all the features because thats right below that message
When building vesktop, I see it is using downloadVencordFiles() function to download the latest release of Vencord from github. I want to use my local checkout instead. Is there a way to do that without modifying the vencordLoader?
because its a low level language
its C ABI compliant, all C code is directly callable from within elle with no wrappers
hence, comparison to C
ok
wait does rust 2024 allow async fn in traits???
that wouldve been useful in my diploma thesis
You just change the vencord directory inside the vesktop settings
is it really as simple as that? what folder is it looking for?
well i was using 2021 which is 1.56
why did noone tell me that 😭
i thought async_trait was just a thing you had to use
2021 edition was added in 1.56 and is supported in every version since
just go to Settings > Vesktop Settings > scroll all the way down > Open Developer Settings > Vencord Location > Change
a
why dont they follow semver
They do
why make year editions instead of big versions
i thought editions were for major syntax changes?
Editions are for non-backward-compatible changes
This allows evolving the language in a backward-compatible way, since code written in previous editions still works
which is just a major version bump in semver?
Major version implies breaking changes
we should be on rust 4.10 or something not 2024
Rust 1.86 supports 2015 edition, 2018 edition, 2021 edition, and 2024 edition
you mean editions add new stuff that old editions dont know about and major semver makes the new version not compile the old version?
A 2.x would mean that there exists old code that it can't compile anymore
ah ok
im still on rust 2021 tbh

rust is literally squatting all the good names
should i say anything else about this
rather this
woohoo im with the cool kids
oh i didnt know it was this easy

lol that's funny i have to do polyfill for chrome because only firefox/safari supports toHex

suffering
i guess that can be my polyfill
imagine monkey patching Uint8Array just for that

horror
it doesn't seem to work
in what way
array.map(x => x.toString(16))
mind blown...
unless you wanna convert the whole UInt8Array into a single hex string
util.js: Lines 21-41
export const arr2hex = data => {
const length = data.length
let string = ''
let i = 0
while (i < length) {
string += encodeLookup[data[i++]]
}
return string
}
export const hex2arr = str => {
const sizeof = str.length >> 1
const length = sizeof << 1
const array = new Uint8Array(sizeof)
let n = 0
let i = 0
while (i < length) {
array[n++] = decodeLookup[str.charCodeAt(i++)] << 4 | decodeLookup[str.charCodeAt(i++)]
}
return array
}
here u go
horror
fastest possible hex->number and number-> hex conversions for JS possible
faster than most native code out there
hm nice thanks but i think i want to torture myself
can you just do like
yes, but they are all a lot slower
Array.from(array).map(x => x.toString(16).padStart(2, '0')).join('');
``` this? or something
i wrote that code targetting 100Gbit/s data streams
so it needed to be faster
because nodejs's native hex utils for this were too slow
i just found it hilarious the idea of needing a polyfill for chrome in 2025
because i am gonna use toHex if it's supported
that seems sensible
nah toString(16) is the expected way
its just mad slow
toHex is non-standard afaik
also.
nah its just from a "suggestion draft" from end of 2024
which was never standardised
but ff being ff, implements all the wrong shit
there's an example with a polyfill
polyfill-core.mjs: Lines 260-268
checkUint8Array(arr);
if ('detached' in arr.buffer && arr.buffer.detached) {
throw new TypeError('toHex called on array backed by detached buffer');
}
let out = '';
for (let i = 0; i < arr.length; ++i) {
out += arr[i].toString(16).padStart(2, '0');
}
return out;
so basically your code but less efficient
yep, but as you might imagine, its insanely slow

sure but this is for oauth
i was trying to implement code verifier and challenge and just filling a 64 byte buffer with values and converting it to hex seemed like a clean way to create a 128 char random string
other lazy solutions]
oh lord no please
just use crypto.randomUUID()
too short
or randombytes
yeah, you need to encode them somehow as a string? 😭
and hex is kind of the most obvious way?
seems like the ideal would be base 66

as it allows A-Z a-z 0-9 -._~
but this fries my brain
do bin
zsh is insane
all this to clear the scrollback buffer (reading the docs took an hour)
zle -A clear-screen _orig_clear_screen
_CLEAR() {
printf '\033[3J'
zle _orig_clear_screen
}
zle -N _CLEAR _CLEAR
bindkey _CLEAR
const numberFunctions = {
toHex() {
return (this as number).toString(16).padStart(2, '0');
}
}
type NumberFunctions = typeof numberFunctions;
interface Number extends NumberFunctions {};
Object.assign(Number.prototype, numberFunctions);
const arrayFunctions = {
toHex() {
return (this as unknown as any[]).map(x => x.toHex()).join('');
}
}
type ArrayFunctions = typeof numberFunctions;
interface Array<T> extends ArrayFunctions {};
Object.assign(Array.prototype, arrayFunctions);
console.log([133, 241, 3].toHex());
for no reason at all
seems like the official oauth site is using this
i wonder what license it's under
it's also using snake case
patching global prototypes
fucking perish
oh wait
you want a polyfill right
what is this site...
how else are you gonna polyfill toHex in all contexts if not monkey patching the global proto
why would u polyfill a non-standard api in all contexts
numbers to hex doesn't even exist
oh lol
they wanted to polyfill it earlier
@winged mantle is simply coping about having to do number.toString(16)
isnt that just toString(16)
yes!
i might have been mildly trolling
yes
ok well
const arrayFunctions = {
toHex() {
return (this as unknown as any[]).map(x => x.toString(16).padStart(2, '0')).join('');
}
}
type ArrayFunctions = typeof arrayFunctions;
interface Array<T> extends ArrayFunctions {};
Array.prototype.toHex ?? Object.assign(Array.prototype, arrayFunctions);
console.log([133, 241, 3].toHex());
``` its silly
i wonder if you could create base64 by just calling toString(64) a bunch
😭
so what i usually do to people that patch globals is i take the left nut, i twist it 7 times, then i smash it into the right nut, and then nail them both
thank you for coming to my ted talk
you have no other way if you want to polyfill tho
when i said polyfill i was considering doing something like
if ("toHex" in array)
value = array.toHex()
else
value = // messier impl

husk
something tells me this doesn't work properly
anyway it's not your duty to spoonfeed me
that wouldn't work
you'd need to do .toHex.?()
yeah
this seems to map the actual numeric values
it doesn't map to a string array but rather another bytearray
so it doesn't convert to hex at all

why does safari also implement it and the mdn page mention nothing about it not being standard
the proposal does seem to be... recommended for implementation?
i am just gonna treat this like eventually chrome will add it
hmm i made a realistation
i think the function i want is toBase64
(which is also safari and firefox only)
i will just copy and paste this
https://gist.github.com/jonleighton/958841
it looks like oauth expects base 66 idgi lol
but base64 with characters replaced is close enough
tf is base66
they have two extra chars
looks like in firefox and safari you can do it all in one step guh array.toBase64({ alphabet: "base64url" })
like 66 total chars or they use 2 chars instead of + and /
but in chrome you need to do btoa(String.fromCharCode(...new Uint8Array(array))).replace("+", "-").replace("/", "_").replace(/=$/, "")
❤️
perfection
esnext.uint8-array.to-base64.js: Lines 18-49
if (globalThis.Uint8Array) $({ target: 'Uint8Array', proto: true }, {
toBase64: function toBase64(/* options */) {
var array = anUint8Array(this);
var options = arguments.length ? anObjectOrUndefined(arguments[0]) : undefined;
var alphabet = getAlphabetOption(options) === 'base64' ? base64Alphabet : base64UrlAlphabet;
var omitPadding = !!options && !!options.omitPadding;
notDetached(this.buffer);
var result = '';
var i = 0;
var length = array.length;
var triplet;
var at = function (shift) {
return charAt(alphabet, (triplet >> (6 * shift)) & 63);
};
for (; i + 2 < length; i += 3) {
triplet = (array[i] << 16) + (array[i + 1] << 8) + array[i + 2];
result += at(3) + at(2) + at(1) + at(0);
}
if (i + 2 === length) {
triplet = (array[i] << 16) + (array[i + 1] << 8);
result += at(3) + at(2) + at(1) + (omitPadding ? '' : '=');
} else if (i + 1 === length) {
triplet = array[i] << 16;
result += at(3) + at(2) + (omitPadding ? '' : '==');
}
return result;
}
});
which do i use
oh wait can base64 end with double equals
replace(/=?=$/, "")
so good
😭
cursed
but at least if chrome adds support i can just strip this out
🙏
code
that too ;3
W. teach
Array.from().map()

hop on
Array.from(arrayLike, x => x.toString(16).padStart(2, "0"));
love tokyo night 
Working on a new thing
cmake building experience 
bananas
cmake is not that bad cuh
It is
But it's slightly better than the others
new_as_master : O
does banana support nixos
and configuration via nix
Use the coupon code techsperts at https://nordpass.com/techsperts to get a free 14-day trial of NordPass! No credit card is required.
Tech waste in the corporate world is out of control. Whether this company purposely drilled the LCD, frame, and battery of this laptop to prevent it from being sold, or they did so thinking they were destroying t...
@hoary sluice i asked ai to write tic tac toe in elle and surprisngly it did really well
after i gave it a basic example it wrote the whole tic tac toe with only 2 errors
that was kinda insane??
i mean it didnt use enums but still
i wrote it myself afterwards
entire tic tac toe in 190 lines, including draw state and game resetting and everything
why are they even destroying the drives literally just dd if=/dev/zero of=/dev/drive
and that includes button position calculations and stuff
writing wrong tic tac toe is not really well
im guessing the errors were cause it thought its c?
or rust
yeah but considering it has absolutely no input about elle code to train on other than a single basic file it did well
when i ask llms for typst help they give me md
no the error is that it tried to make a static length array like in rust
i dont think thats how you make arrays in rust
that is basically the only thing, after i fixed that it just compiled and worked
it is for static ones
like with a length known at compile time
you can do [type; len]???
since when???
since like forever??
😭
but keep in mind these are static arrays
they have to be evaluatable at compile time
yea ik
its just the rust way to make int[5] in C i guess
llms are going to take all the programming jobs 🤫
i mean no they arent
but im just surprised that the llm did such a good job at generating valid elle code
if i asked it like 3 months ago it would be 100 syntax errors away from being compilable
is https://invalid a good placeholder to use

idk it wouldn't surprise me if it confuses some browsers
invalid://invalid.invalid

it';s just to keep the url constructor happy as all i grab from it is url.pathname + url.query + url.hash
trying to test on internet explorer ig i need mark of the web
oh nvm what's the comment you used to need to add
it doesn't work on internet explorer 😦
you can't do new URL
object doesn’t support this action
so does chrome 😭
by the time i actually developed stuff i stopped using ie
so i never knew the devtools actually had useful features at all
internet explorer is one of the worst browsers by today's standards
i was surprised the devtools were actually useable
it feels funny seeing actually kind of nice devtools which are reporting that Object.setPrototypeOf does not exist
hasn't that existed for at least a decade
it even does one thing i can think of better than chrome
oh nvm chrome is not as insane as i remembered
i swear when testing enter was running the line instead of filling in auto complete in the console
i must have presed ctrl+enter somehow?
chrome and firefox devtools do different things more annoyingly we need to bring back internet explorer
true
@valid jetty since i know u actively use notion, is there anything you miss in the app?
read that as kink premium 
only you to blame
i did the naive solution and it worked but apparently theres a faster solution (still n^2) where you just ||for each domino, scan to the left end and to the right end and compute the net force applied on the domino||
react reference???
@hoary sluice arrays in ictpos when
wtf is ictpos
i alr have arrays
yes i was throwing
x:xs lists in lambda calculus 🙂
im working on reorganizing the project
cause i copied elle project structure and made lexer/enums.rs, parser/enums.rs and interpreter/enums.rs but i want an mvc structur
e
wayland when
too hard
me writing a wayland compositor would be 99% of the time code not worky and that 1% would be after hours of struggle
ictpos more like icltspmo
in ictpos???
its called icypeas not icltspmo
Citation?
trademark?
citation would be a decent name for a lang but its not searchable
@hoary sluice @placid cape https://github.com/acquitelol/elle/blob/rewrite/examples/graphics/tictactoe.le love???
could call it citrus
it’s like citation ish
citrus already exists and i like icypeas
fair
tsoding would totally do it
@valid jetty do u have ci cd
only thing i left is errors and precedence in parser
precedence is used only by the parser and will for the foreseeable future stay that way
mvc for a compiler 
Value from interpreter might be used at an analysis stage or smth
well theres not really a view so more like mc
i share values from all parts together
yea that was getting ugly
i hate spring boot
i hate spring boot
i hate spring boot
why is my kafka not registering my consumers 😭
importing parser::enums::Expression in the interpreter
there are tokens in the compiler and types in the parser, not ideal but it somewhat makes it better because i can pass things around
you hate spring boot
you hate spring boot
you hate spring boot
why is your what not what your what
although not extensible for other targets
wdym because u can pass things around
like, instead of constructing a seperate compiler-specific operator for binops i just use a token and pass that through the parser when contructing the ast node which is used for codegen
or, instead of making a seperate type parser and constructing a compilation-target agnostic type i just construct the type directly
what
i love monolithic backends 🥰🥰🥰
could you repeat that in english
you mean youre using token inside the parser and compiler instead of making new types?
elle types right now are generated at parsing time directly, which means the parser is directly tied to the compiler as the types are qbe-based
sorry i realized what you meant
Type as in, elle's types
like i32[], u64 *, etc
types are not constructed in a compiler-agnostic way
i know thats exactly why i did it like this lol
but its not ideal if i wanna add say, js or wasm in the future
and what does that have to do with moving your data types to model
i mean it doesnt really im trying to explain my thought process for why i structured it how i did
i dont understand how this relates to elle types
expression shouldnt be defined in the parser if its also used in the compiler
it is not, im saying types are directly constructed in the parser
to create (i32, (string, f64 *)[]) you need to be able to parse such a type
and this ties the qbe types almost directly with the parser which is parsing these types
the types are directly constructed at the parsing time
how is it better
its not if i wanna add more targets, but it is because i dont need to create a seperate generic structure that can be then narrowed down by the compilation target
like instead of returning Type as Array<Type> | Pointer<Type> | etc which is then properly constructed in each backend i can specifically generate the right type at parsing time
what how does the 2nd part of this sentence make any sense
you can still do all of this, the only change is
use crate::parser::enums::Expression;
to
use crate::model::Expression;
most of these arent even enums
token is a struct, location is a struct
uhhhhh sure i guess but isnt that essentially what the enums file is doing
yeah idk
i just called it enums when i first wrote it and it stayed that way
yes but thats bad software design
less organized
i copied it from you
codegen
then stuff used within codegen
primitive/top level
""""model""""
then the thing that ties it all together
yeah well dont do that lol
it was called enums when i first started the project back in april 2024
it would be a good idea to rename it to model or something today
but the parser is due a rewrite anyway so
im waiting for that
shrug
parser using items from the lexer seems reasonable to me
because its operating on the output from the lexer
it shouldnt
the parser shouldnt be aware the lexer exists
if the lexer is deleted and the parser receives a hardcoded token stream it should still work
thats exactly what this was about btw
the lexer parser and compiler all know each other exist because of the fact there is only a single compilation target
you mean you use one token enum for all tokens?
yes 😭
so do i and ive been planning on changing that
i mean im doing it in order of code size
cause its annoying to parse the name of an identifier out of a token
this is what i meant
compiler first because it used to be 2 files making up 8k lines of code
next parser then lexer
thats
hm
i have parser.get_identifier for this

function name will never not be an idenfitier cause thats enforced by the parser
if its not an identifier then it wont be parsed as a function assignment
pub fn get(&self, expected: &[TokenKind]) -> String {
let mut found = false;
for kind in expected {
if &self.current_token().kind == kind {
found = true;
break;
}
}
let token = self.current_token();
if !found {
elle_error!(token.location.borrow().error(format!(
"Expected one of {:?} but got {:?}",
expected, token.kind
)))
}
let Token {
value: ValueKind::String(identifier),
..
} = self.current_token()
else {
elle_error!(token.location.borrow().error(format!(
"Expected one of {:?} for function name, got {:?}",
expected,
self.current_token()
)));
};
identifier
}
pub fn get_identifier(&self) -> String {
self.get(&[TokenKind::Identifier, TokenKind::ExactLiteral])
}
``` keep in mind this code is at least 5 months old and has never been refactored
explain this
function name is stored inside a token which can contain all of these other values https://github.com/eagely/icypeas/blob/main/src/model/token_kind.rs but it never will
the parser only parser a function assignment if it starts with an identifier
but the interpreter cant be sure of that
i could unwrap it but then i have an unwrap and thats ugly
i copied basically only the enums.rs and TokenValue thing
ice on peas
oh you dont even have tokenvalue
😭 imagine if your github profile had 100% issues id end it all
i have never contributed to foss 😎
where do i see that
u gotta enable it
where do you even see this exactly
why is it called valuekind
that makes no sense
😭
TokenKind and ValueKind
mine
Token is made up of both of them
TokenKind and TokenValue???
idk 😭
i try to avoid making issues because every time i make one i feel like ive just overlooked something 🔥
so when i see an issue i just fix it myself 😭
lol literally so me
eagely will hate me because of 1 of the 2 problems in computer science: naming things, cache invalidation, and off by one errors
naming things, cache invalidation, and windows
lmfao
most problems in computer science are caused by windows
and lua
and nowadays ai too
like sure i dont like it but me and lua are chill
i helped interview potential CS teachers today and all 3 were honing in on how they love ai (one was considerably better than the others)
huh
a pupil interviewing teachers?????
it wasnt just me lol
my cs teacher is so based
expressly hates ai
oh my god my keyboard is killing me
makes fun of it
says he doesnt care if his students use ai and he knows most of them do and its fine as long as they can explain the code
which they cant
so they fail
- has simulated cpus and wrote his own instruction sets before
- has used python, c, c#, c++, java, javascript before, so hes just a language agnostic programmer
- has experience in opengl with c++
- has written a whole project in C
- has written a game in c# with unity and unreal but also doesnt like the language (understandable)
- favourite data structure is an array of pointers
- did not spend half of the interview talking about how computer science is evolving and we need to adapt by giving microsoft money to train llms
lmao horror
and HE ASKED MY WHAT MY FAVOURITE DATA STRUCTURE IS (thats a question i asked all candidates because it really threw them off and made them think)
im not sure what that is
- ok that doesnt say anything, ive simulated advent of code cpus
- like everyone else
- 5 minutes or 5 years?
- how big is it? ive written like 5 small projects in c
- ive done that in godot and you could do it in 2 hours for a resume
- wtf does that even mean
- based giga based accept him now i want him to teach me and carry my firstborn
oh this is progaming channel
he asked u back?
i answered arrays because you can make most other data structures out of them like queues stacks sets hashmaps heaps OR double ended queues because they have faster lookup time compared to regular linked lists but also O(1) insertion time
my favorite data structure is https://github.com/eagely/adventofcode/blob/main/src/main/kotlin/utils/grid/Grid.kt
- still good knowledge to have when youre teaching 16-18 year olds
- youd be surprised
- if he becomes a teacher here i will ask
- he said it was a relatively large project
- ok i guess but considering the whole course is in c# its good that he knows it
- i asked every candidate what their favourite data structure is at a random point in the interview because it really throws them off
- lmao