#🪅-progaming
1 messages · Page 116 of 1
it's almost like people who create libraries don't use their own libraries
Yep
honestly sensible libraries should never allocate anything by default
allocation should be the exception, not the rule, and made very clear
if create or new or alloc isn't in the name and a function calls malloc/calloc that seems like pretty bad api design
i suppose there are some bad apis out there so it's nice to be reassureed
The c language does not. C programming does.
jesus i cant imagine not using an ultrawide for coding
moved vscode to my 16:9 display and that happened
XD
wtaf
you have a problem
consider making the tiles horizontally scrollable instead of stacked like that
if you do that it's fine
you're fucking insane
you know how fucking hard its to find them when u do that?
ngmi
i have a macbook and use a trackpad
which means i can horizontally scroll with a gesture
so it is perfectly fine
sure
but you still waste 5 minutes looking for said tabs
i never said it doesnt work
implementing scrolling is piss
but finding 1 tab out of 50 is impossible with scrolling
??? i just know where my code is
just for u to need to scroll back cuz u need to switch back
and then open it from the sidebar
LMAO
i wish i could use the sidebar
i'd zoom out, but even on max zoom-out the sidebar doesnt fit 10% of my project
look how tiny the scroll bar is
Wdym tiny
vscode's scroll bar shows how much of the entire tree is visible
ex: here u can see 90%
not enough config files
Insane
so here u can only see 1/10th of the content
since the scroll bar is ~130px out of ~1.3k
whats insane
I am
i dont have an editor config, i dont have prettier, i dont have llm configs
this is as minimal as it gets for what i need
i need 3 tsconfigs, because one is for web stuff, and one is for nodejs local config stuff, and i dont want my nodejs config polluting my web config, because otherwise i'd get node globals like process, and node imports like fs, inside the web part of the project
so you need the root compound config for TS server to work
and 2 separate configs one for web and one for node, so your tooling can use that specific config, for example sveltekit uses the .web. config
yeah but 14 config files is still fucking insane to me 😭
yeah
but wtf am i to do
i need the tailwind config, i need the vite config, ci need the svelte config, tailwind requires postcss, i need eslint it even does what prettier does, components.json is needed for shadcn
and the introspection shit i could move to a diff folder i guess
but thats for the graphQL api's i'm running
.
you could easily add 10 more configs here
yeah sure i’m not saying you should get rid of all them but i’m just always amazed by how many different tools configs and other shit a single web project can have
trust me when i say this is still very minimal
for a full blown project that is
the amt of shit these configs do is insane, and they are so joined together its unfunny
even my eslint config imports the svelte config and the tsconfig
and the tsconfig imports the graphql schema, which is generated by the introspection
so i can have static type analysis on inline gql queries
so then my eslint config can throw errors when my gql queries are invalid, or when i access fields in the query responses that arent actually queried
....okay maybe not so minimal
c++ swap kind of feels more intuitive than move?
but the lack of = default and = delete is killing me
Move is indeed often implemented as swapping with a default
https://github.com/acquitelol/sparxmaths/issues/44 ??????????????
who the hell makes an issue with just fucking code
???????????????????????????????????????????
please fix
what's the local being borrowed here
source_text and allocator
Have ParsedProgram take ownership of them, or box them ig
Why are you cloning them
it does
because i want to use ParsedProgram after the lifetime for &self is over
Hmm could it be that you're referencing &allocator in Parser::new, but rust can't tell if res.program contains a reference to that allocator? Idk tbh 😭
Program does have a lifetime so maybe it does
Maybe u need to explicitly specify the lifetime in the function return type and possibly some of the variable types
even if i did, how would i add a lifetime for an owned type
the whole point of Rc is to not worry about lifetimes
I meant ParsedProgram<'a>, and maybe the local Program<'a>
Or store source_text in ur struct too, since ig it requires a reference
@royal nymph wanna see something turbo, mega giga fucking cursed?
obtaining undici's agent constructor, without importing the 2MB library into your code, but instead using the nodeJS built-in
this is up there with some of the most tarded shit i've done for peformance
fucking works
XDDDDDDDDD
I don't get that
like because you never once opened the settings menu in vscode
is it the inlay hints?
the settings menu in vscode is god awful ux-wise, unless you know what a feature is called you'll have to scroll through 10000 options to find it
yes
thats because vscode has 10000 options
do you want an AI agent in there to help you search?
like what do you expect?
XD
you cant magically un-setting the settings
it has groups and categories
search and filter
u cant rly ask for much more than that
I have opened the settings menu before I just didn't know that existed as an option!
didn't mean to make u angry or anything
just letting me find the relevant options based on which panel/ui thing I have focused would be nice
like for example how vivaldi lets you modify a bar or a panel by right clicking on it and clicking on customize
oh lord that would be insane to implement
esp considering settings includes shit like extensions
...doable but crazy amt of work
how come?
If an extension adds a custom panel/sidebar, it should also be easily associated with its own settings
if it does shit like modify inlay hints or autocomplete or whatever, that should also be easily detectable
sure but how should custom panels then be treated
like u can add custom views, panels, buttons, pages, even custom UI
so this quickly spirals out of control
I think the main issue I have with it is the monotony and cognitive overload tbh
intellij has a much cleaner settings window where everything is clearly separated, and options can have clearly defined suboptions
😭
XD
I agree
I never had an issue configuring stuff in intellij
probably smth about vscode that is a red flag is that u sometimes gotta edit the config file manually
that's not a sign of a good config ui lol
yeah 😭
also idk how this is on intellij or other jetbrainsware but custom themes are SO ANNOYING on vscode
like let me just change a config file with the colors or smth
but I gotta make a whole ahh package
I never even tried to do it bc it seemed like such a hassle
meanwhile zed 
yea true lol
zed needs a config menu 😭
tho i think it isnt as bad because there arent like hundreds of settings yet i think
but tbh i never even touch settings
yea and they're pretty well documented with plenty of examples
they should just let discord css developers restyle the whole window fr fr
vscode themes are usually pretty underwhelming cuz they only use predefined theme variables
I think icon themes do some hacky shit just to replace an image
I hope zed fixes all this
I think zed will be the next industry standard
once it has official windows support
and when there's a settings ui
lol
hey you should disable ai in your zed
i had those type hints or whatre they called disabled back on windows
because they kept suggesting me some bs code
but now on macos there isnt such
hey you should enable ai in your zed
hi
{
"disable_ai": true,
"features": {
"edit_prediction_provider": "none"
},
"collaboration_panel": {
"button": false
},
// "relative_line_numbers": true,
"chat_panel": {
"button": "never"
},
"agent": {
"enabled": false,
"button": false
},
"show_edit_predictions": false,
"edit_predictions": {
"enabled_in_text_threads": false,
"disabled_globs": ["**"]
},
"diagnostics": {
"include_warnings": true,
"inline": {
"enabled": true,
"update_debounce_ms": 150,
"padding": 4
}
},
"vim_mode": true,
"theme": "Catppuccin Mocha Glass",
"soft_wrap": "editor_width",
"ui_font_size": 14,
"buffer_font_size": 6.0,
"buffer_font_weight": 300,
"buffer_font_family": "Maple Mono",
"buffer_font_features": {
"zero": true,
"cv02": true,
"cv03": true,
"cv04": true,
"cv98": true
},
"ui_font_weight": 300,
"ui_font_family": "Maple Mono",
"terminal": {
"font_family": "Maple Mono"
},
"format_on_save": "off"
}
the best font
the most peak font ever
I could see my prof used maple mono the moment i saw it cause of the @ sign. Also the slides look like this
maybe i should switch to it
best font
oh so that’s where that @ is from
the @ looks too much like a fingerprint to me
true
holy shit
i feel like i just won a medal
this is the first time i crashed v8
that said im doing REAAAAALLY dumb shit
Yep, a really bad regex engine with horrible compile times, poor performance, bad ergonomics due to being older than string_view, and none of this can be fixed backward compatibly
it can easily be fixed
deprecate the old one and make a new one

or that
#define NON_SHITTY_REGEX 1
#include <regex>
don’t use rust
i love how rust has aliases in documentation
but for some reason they didn't add them to the web docs directly
so you can get this
you will love my project
building 2 non rust libraries and linking to them
will be adding 2 more
@deep mulch
@solid gazelle
this would be very broken
#include <regex2>
That's exactly why rust does not have regex in stdlib
There's no one regex implementation that suits all needs, and once something's in std it cannot be incompatibly changed
codemods and tests
@lyric latch Revenge will use Bun
weird statement
there's no one list implementation that suits all needs, that's exactly why there shouldn't be lists in the stdlib
just make a regex implementation that suits some needs
however, c++ never tries to just suit some needs, that's how we ended up with the language we have today

there are many languages with regex implementations that are perfectly sufficient for 99.9% of use cases
even in rust everyone just uses the same regex crate
yea it's doable
who uses anything but this https://github.com/rust-lang/regex
i don't think the problem with C++ regex is it doesn't do everything
I think the problem with it is it does everything, and not particularly well
An implementation of regexes, supporting a relatively rich set of features, including backreferences and lookaround.
This crate provides a safe high level Rust binding to PCRE2.
first one says it's built upon the regex crate and has the same api, so it could just be merged into one thing
Yes you could absolutely do that
And it would be a worse experience for literally everyone involved
Why?
More complicated for devs, less choice for users, more complex performance characteristics including risk for exponential time if you don't read the docs in detail
Just have a feature flag for the fancy features if you're worried about accidentally using them
feature flags? is this kotlin?
And that would be better than separate crates, how?
no it wouldn't 😭
you know it's possible to have separate functions right
That you don't have to remember and specifically search for the crate that supports your exact use case
Imagine having to switch to a different library halfway through development cuz regex crate #1 doesn't have a regex crate #2 feature
it's not rocket science
Burden of proof isn't with me anyway
Why would merging them, let alone into stdlib, make anything better?
JS, Go, Java/Kotlin, C#, python, etc all have inbuilt regex and they all work for the vast majority of users
because you should not have to install a library for the most basic features 
Good dependency management beats bloated stdlib in literally every way
i don't really see why pulling in an official rust maintained library is a big deal
however.. what's wrong with an stdlib like go's where it has lots of useful stuff
Same things as the last fifty times anyone asked
Stagnation, mixed with officially blessing a specific choice that's not necessarily the best
opinionated languages are good
yeah...
standardisation makes it easier to understand other people's code
the actual problem is when stdlib ends up with niche things
I half think std::io, std::fs, std::path, and std::net should be an external crate
having a shared vocabulary is important
i think vocabulary types should be in the standard lib
True
you are insane
this just leads to third parties making their own stdlibs which now become a standard
like boost or apache commons
boost::optional
i used boost so much more pre c++11
i wrote something like this in my code today
new(arr) int[sizeof arr / sizeof *arr]();
ew
yes
Yes
Very
https://github.com/APR1LH4CK/mouhid someone might find this useful
its prettyyy accurate some things are missing though
isnt that just ghidra output
yes i just ctrl + c'd each function into ghidra
(no)
why constants are declared here and not inlined?
stuff isnt complete yet + the decompilation is messy cuz it was originally just 1 big text file
its just reconstructed to be more readable since the decompiled output is messy
not to be compiled or anything lol
oh ok
what even is mouhid.sys
mouse driver
i think the main issue is it's a portability nightmare
i'm using c99 dependencies... and functions and headers which were only added in c99 which c++98 doesn't strictly have
conclusion: just use c++11, it doesn't stop you from doing anything
my
is so smart https://bun.com/blog/behind-the-scenes-of-bun-install
buntards
my
is so
s for some reason
i love this
"so uuuh we made it faster, by making it not install stuff"
huh
it resolves modules differently
so that it can be "cached"
which means npm i and bun i will yield different results
On average, it runs ~7× faster than npm, ~4× faster than pnpm, and ~17× faster than yarn.
why is yarn so fucking slow
cuz it makes 4mil syscalls 
didn't yarn used to be the fastest
then it fell behind while every single other one raced ahead in terms of speed
pretty much
its more that yarn stopped changing
and everything else improved
but pretty much same thing
@valid jetty https://www.youtube.com/watch?v=BIPXoBCDJv4 watch
GNUradio files available from https://github.com/gallicchio/basicSDR
See also
https://gallicchio.github.io/learnSDR
--- Learn SDR with Professor Jason Gallicchio
if you spend too much time installing packages that's because you're a nextjscel
https://www.youtube.com/watch?v=h_7d-m1ehoY @valid jetty watch
This video presents an introductory tutorial on IQ signals - their definition, and some of the ways that they are used to both create / generate modulated RF signals, and demodulate / analyze RF signals. IQ signals are most often used in the transmit and receive paths of Software Define Radios (SDR). A PDF of the drawings can be found here:
ht...
@grok tldr
i nearly ended up using unordered_map in my cursed codebase
but it turned out to be easier just writing my own hashmap impl
copying a hash function from stackoverflow without credit, naturally
bro brave removed the web filesystem api for no reason and locked the issue thread discussing it since 2021
it works in all chromiums except brave
oh
yep you need the flag to enable it
but the FSA brave has isnt spec compliant
and has a lot of security issues
since you can open system directories and restricted and root folders
lmao why
riiiight?
thats so retarded
its the only problem i have with brave
the FSA
i mean its still only one flag
but still
yeah it's annoying
i mean as long as you don't allow it you're fine, no?
yep!
but its something to be aware of
you can open the root of a C directory
and browse ur entire OS
and make a file explorer like that
is that just if the user manually picks root
i thought websites couldnt select which path
yep
yeaah they can only pick preset directories like "downloads, documents" etc
yeep i remember now
but normally u cant select those directories either
but brave lets u
usually only subdirectories in those dirs
i just needed it for this so I don't have to manually select the file each time

is there any way to not need the Go button
it needs user interaction to read the file
if its read only then u can just query the permissions on page interaction
I wish it could read it as soon as I opened the site without interaction (I did the "allow access every time")
if its write u need the prompt
yeah this
i did allow each time so I just have to press the Go button and no prompt
but I wish I didn't even need the go button
i don't really get the security benefit of requiring a user interaction
if the user didnt press allow each time it will prompt for permission anyway
and if they pressed allow each time they know it will have access
for something like clipboard yeah absolutely so if you somehow get redirected to a shady site it can't immediately access your clipboard
but for the filesystem api the permission prompt makes the user interaction requirement redundant in my eyes
since the permission prompt is also user interaction
nah it does
yeah that's what I do :P
good work
smh
it is common knowledge that 1 Smoot per microfortnight ≈ 1 meter per second
no need for weirdness
smoot
why does this even exist
who thought allowing fs access to websites was a good idea
its like webusb
me
lets me gain access to your files
NO
webusb is so good
nuh uh
i have yet to see a good use for it aside from flashing android roms
and even that is still jank because you sometimes need device drivers anyways
and that doesnt justify it's existence
ff was right to not add it
peripheral makers' configuration software use webusb so you don't need to install dedicated software
see:
- wooting - https://wootility.io/
- keychron - https://launcher.keychron.com/
- via firmware - https://usevia.app
though i don't know many other use cases of webusb either
i have a keyboard that still requires drivers to even use the webusb config utility
and it fucking sucks
i dont want a web configuration tool
no internet? good luck changing your keyboard settings
its so dumb
it's really useful
why is it not a good idea
and webusb is also cool
built in credential stealer for dumb people
you have fundamentally misunderstood how it works
the user has to select a file or folder the website gets access to
oh
it's like when android apps ask you for a folder
you choose the folder and it won't let you choose too high up folders
it has many use cases
for example code editors (like vscode) in your browser
or something like a video player
you give it access to your video folder and now it can display them in the browser
it's really neat
you could also give a website write access to some folder and now it can automatically save created files there, much more convenient than always showing a save dialog
huh
i guess thats kinda neat
i feel like thats still potentially ripe for abuse
less so though if it prevents selecting folders too high up
I don't really think there's too much abuse potential
you could just make the user download and run malware instead or smth

ig yeah
@ornate quiver would you download malware if i sent it 
nop
guhhh
@ornate quiver do you know if theres anything to make rust android errors more verbose
like segfaults and stuff
like line numbers if possible
its basically a proc macro for catch_unwind
whats catch_unwind
Invokes a closure, capturing the cause of an unwinding panic if one occurs.
explain what + means here
oh
i think catch_panic is broken
error[E0596]: cannot borrow `env` as mutable, as it is not declared as mutable
--> /home/nick/.local/share/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/catch_panic-1.0.0/src/handler.rs:37:5
|
37 | env.throw_new("java/lang/RuntimeException", msg).unwrap();
| ^^^ cannot borrow as mutable
|
help: consider changing this to be mutable
|
29 | pub fn default_handler(mut env: JNIEnv, err: Box<dyn Any + Send + 'static>) {
| +++
show your usage
returning a type that matches the R generic + UnwindSafe trait
oh wait i forgot that the actual crate is outdated
one sec you have to use my fork
malware
rushiinsane
rushiinsane
i have a fork of a fork
cause the original crate is dead
catch_panic = { git = "https://github.com/rushiiMachine/catch_panic.git", rev = "1a228e5" } # https://github.com/sorz/catch_panic/pull/1
there
rushiinsane
wait
yop
soon rushii will try to rewrite aliuhook in rust
i will rewrite lsplant in rust
Hooking in rust is hell
sounds like macroing time
well it doesn't do the hooking logic anyway lmao
@ornate quiver wyd
Just use c++ for that like a normal person
but it does use a lot of void*
write symtab searcher in rust @ornate quiver
blob DAMN cozy
rust should add a feature where it enables unsafe everywhere even without unsafe block
just killed a ninolet
YOP
the poor mans version of this is making every function unsafe
first patch dev not from china
i want to learn rust i just don't really have something to do
work on my project with me
i don't have any knowledge in that field
i dont really know the processing stuff
im not radio nerd
Hi
hi satan
rust is useless dont learn

yeah im not taking advice from you
memory safety is a gimmick
just write good code
hes right
rust is only useful for personal projects
nobody in the industry uses rust other than crypto blockchain
not yet
who care
i spent the last 2 years of my life using rust and now i cant get a proper job
cause my resume is only rust
do u have projects for a resume
kinda
i can have fun doing two things
im not saying dont do rust
im saying rust wont help on a resume
i love rust i want it to be used everywhere
i don't care about putting it on a resume
then go use rust
i program for fun
shepherd day job programming hobby?
ew i hate outside
the dream
i use that
teamviewer but you can selfhost and it's got a web client
so you can truly remote from anywhere with internet access
rust users try not to reference rust in their project name or description challenge
(difficulty: FREAKING IMPOSSIBLE)
@frosty obsidian will work for mcdonalds soon
they have to use edition 2021 because this makes unsafe rust even more insufferable https://doc.rust-lang.org/edition-guide/rust-2024/unsafe-op-in-unsafe-fn.html
Almost as if you're supposed to have as little unsafe as possible
yeah i know it's so funny
hi smart webpack people how do I avoid having to do this
https://github.com/extendify-mod/extendify/blob/next/lib/webpack/loader.ts#L10
(all it does is assign .c to wreq)
@valid jetty did you watch the videos
Rust's proc macros suck btw jfyi
Why
ehhhhh
they kinda suck but at the same time no other lang has something better
i'm resorting to comptime codegen because of how bad proc macros can be tbh
I just copy pasted it from the crust repo
use reflog to find the commits you dropped
i think rosiecord is somewhere in the 15000s
lol
peak?
jai
whar
jai has better metaprogramming capabilities than rust
What even is jai
??? a programming language developed by jonathan blow?
never heard of the language or the person
@valid jetty i vibe code a portfolio website
"I develop independent projects across domains in Kotlin and Rust, aiming for simplicity and performance." 
I love vibe coding
it looks fine on mobile too
Good idea
make elle ai @valid jetty
idk what that design style is but I hate it
also what the fuck is it doing to my cursor
skeuomorphism
no skeumorphism is making things look physical
I think this is called Linear UI?
cuz it comes from https://linear.app
and/or Untitled UI
oh
zeet using design buzzwords
zeet is a design buzzword
the only good thing that looks good o nthat website is the initial loading for the hero image
@deep mulch does compose web have hot reload
@hoary sluice the fucking #opentowork on your linkedin 😭
i dont think so
not really
evil
closest thing is it just reloads entire site on changes
Get to know Nick Owens
@royal nymph @jade stone @lyric latch this does work btw
never does extend never
thank god
vap insane
wait im LYING
nop
im lying about it "working", never extends everything
i said never extends T u put it backwards
yop
its cus never extends everything
cus its the empty set type
and the empty set is a subset of all sets
meanwhile, the cursed thing I'm implementing as portfolio page:
this reminds me of that one blog that's styled like an os
you were lied to
@jade stone
true
it makes me wanna KMS how complicated it is to just open a simple subprocess in c++
@deep mulch how do I wasm externals
the whole #🎨-css-snippets is filled with "frosted glass theme" bs and its lowkey pissin me off
no hate tho
liquid ass theme soon
How do i write hello world
hey grok print hello world
what about it
its a linkedin feature
@jade stone random thought, would it be possible for dev companion to show store names on hover/inline? 
I always navigate to every single store then copy the name and go back to rename the mangled import 😭
@hoary sluice remember this
and this lol https://unofficial-d25-2026.netlify.app/
me when rosie designs a puzzle that is impossible to solve
@valid jetty do i aoc in rust this year
ITS NOT IMPOSSIBLE
i just didnt make a solvable input
because idk how to construct inputs
are you sure you wanna do this
looks ok
@valid jetty @valid jetty @valid jetty i HAVE to use rust
i will be doing aoc on a 9950x3d potentially
what 😭
i wont be home in december but i might remote desktop into it
no just bruteforce hard days
you are
nop
Yeah
Very possible
@tired vigil you could probably add it yourself, check out https://github.com/sadan4/VencordCompanion/blob/main/packages/webpack-ast-parser/src/WebpackAstParser.ts#L1229 for how it handles resolving store methods
WebpackAstParser.ts: Line 1229
tryParseStoreForExport(
insane
hiii
btw are the parsed stores actually used for anything rn
Yes
It's used for the jump to definition LSP handler
Stores are just singletons so when you jump to the definition, you're just jumping to an instance of them. So this resolves it to the actual store method
@hoary sluice https://github.com/poteto/hiring-without-whiteboards
i would be happy if i even got an interview
i will gladly do a whiteboard interview
guh nothing even remotely close to me
i feel like i would do really bad at whiteboard interview
i'm just that fucking good
that i brick chromium
[doesnt show up during OBS recording, wack]
Probably best to vibe check them in #1256395889354997771 first
https://www.jeffgeerling.com/blog/2025/digging-deeper-youtubes-view-count-discrepancy
https://github.com/easylist/easylist/issues/22375
Explanation and data(not mine): https://www.youtube.com/watch?v=YX1eEe8erkQ commit made on 2025-09-11 3:44 UCT that has high likelihood of correlation with drop in views as it's one of default ...
the drop off in YouTube views caused by a one line change in a block list
yeah that tracks
the maintainer reply 😭
average easylist response
they already knew about this in the past and temporarily disabled it
but now reenabled it
lol
sane
yea
hopefully the absolutely insane maintainer reopens the issue and it's at least partially reconsidered
but whatever, no shot that's happening
i wonder whether ubo will override the rule themselves
if easylist doesn't then maybe
something like this?
I'm telling you it's not
Easylist is more of the shittest lists than an actual list
They will block entire domains for no reason
Yeah :3

@valid jetty I GET TO WRITE RUST
wharrr
_ isn't real how
why use maybe_unused when you can just have a function which does absolutely nothing with everything passed
another c++ crime i commited

why do {} while(false)
means macro works even if you have no braces
wdym by no braces
if (thing)
panic("argh");
couldn't you just use braces instead of do while
then this breaks because the semicolon ends up being after the braces
if (thing)
panic("argh");
else
other_thing();
guh
i just ended using an always inline function when i did something like that
and pass the source info as params
i remember there were some macros which only worked if i inlined them into the source
that's how i found out about this trick

i have no idea why the macros didn't work though
but they included inline assembly
guhh this makes no sense
how is node 22 and >= 24 ok
but not 23
https://youtu.be/N6ElaygqY74
I love this video
Before you comment about how no programs use AVX-512, you should probably note that chrome uses AVX-512. (And I'm not talking about libraries that chrome uses either.(I probably should've mentioned that in the video))
An AVX-512 video that doesn't just revolve around RPCS3.
0:00 AVX-512 power efficiency
1:47 Power efficiency outside RPCS3
5:55...
good
List<String> my_list;
my_list.add("hello"_str);
my_list.add("world"_str);
for (String &str : my_list)
out.println("%s", str);
why force the _str suffix
implicit conversion bad
Printf is apart of the c++stdlib now
wha since when does typescript have _ as a valid type argument
print and println, not printf iirc
tbh i love how c format strings work
apparently the new std::print is also slow in terms of compile time
Right.
aw
All macros are
my cpu doesn't even support AVX512
isn't it template based
Overgrown macro.
i'm not a template magician but i know you can have variadic args
is it still slow with std::cout << std::format(...)
i just use stdio.h
maybe i should use qt for every project so i can do qDebug() <<

i wish rust had overloading
What cpu are you on or is this a “I uSe ArM” moment?
Rust recursive macros
that's not overloading
i7-3930K, and its Sandy Bridge CPU
i don't particularly like overloading
Blud
Over a decade old
Get ANYTHING new
i think my favourite use of overloading is swap though
lazy and no point currently when everything works fine as is
You spend more on power consumption than a new pc would cost
new Intel CPUs consume more energy (and no, I aint getting amd)
- that’s just wrong
- why not amd?
because i often do virtualization and want stability (historically Intel was more stable than amd, and Hyper-V/whpx is primarily made for intel)
Virtualization issues are mostly figured out on amd
just tri-boot macos, windows and linux
nope
eslint my beloved
pnpm i -D @typescript-eslint/{parser,eslint-plugin} @stylistic/eslint-plugin{,-ts} eslint eslint-plugin-{unused-imports,simple-import-sort} jiti
whats that
basically you have an array of points, the length is arbitrary, which form a line
and given multiple of these lines
color all intersecting ones differently
but you also have to use the least number of colors required to achieve this
it doesnt seem too difficult? idk
try it
would need more info on how many points and colors
number of points per line is arbitrary, can be anywhere between 2 and u64::MAX
can be different per line
so the points and lines would just be randomly generated?
meow
lines from here
lines := [
[$(0, 0), $(2, 2), $(4, 4)],
[$(-1, -1), $(-1, 2), $(-1, 4)],
[$(-2, 0), $(-1, 4)],
[$(1, 0), $(1, 3)],
[$(3, 1), $(3, 3)],
[$(0, 3), $(3, 0)],
[$(4, 0), $(4, 4)],
[$(-3, 0), $(-3, 5)],
[$(2, 2), $(4, 0)],
[$(0, 0), $(0, 1), $(0, 2)],
[$(0, 0), $(5, 5)],
[$(0, 5), $(5, 0)],
[$(1, 1), $(3, 3)],
[$(2, 2), $(6, 6)],
[$(4, 4), $(8, 8)],
[$(1, 4), $(2, 2), $(4, 1)],
[$(3, 5), $(3, 3), $(5, 2)],
[$(5, 5), $(7, 4), $(6, 2)],
[$(0, -3), $(3, -3)],
[$(6, 6), $(8, 8), $(10, 6)],
[$(10, 6), $(8, 4), $(6, 6)],
];
rust..
@valid jetty make elle tuples use { } instead of $()
it would need an extra special case for parsing the wrapped exprs
elle ai will read the code and convert to rust
guh?
like python and rust
couldnt you just only allow a block based on the previous chars
(x) is a wrapped x and then (x,) is a single element tuple of x inside
like if theres a function signature before {} then its definetely a block
well no because you can have blocks on their own
why
fn main() {
{
x := get_x();
defer x.free();
...
}
{
y := get_x();
.. you get the point
}
}
@valid jetty i have to make some project for my operating systems class
has been for like over a year bestie
idk how you dont know this
well yes but that adds extra bloat
the point is that you can do that
it works sorta like a "i wanna automatically free this thing later, but not when the function returns, just like a bit later"
well i mean elle has a gc so you dont need to use this for memory allocation, rather for things like file handles, sockets, db connections, etc
evil
standalone blocks basically let you do this too
zoooooot when are you doing the line problem
my solution || was to find the intersection between each polyline by checking whether the segments intersect, then do graph coloring to give each unique intersection a different color ||
code in elle
took me like 1h 30m
if this was aoc i would fail
delete
that looks really interesting
you should try it
i think you need to find the line with the most intersections and just use that many colors
would that work
i did graph coloring but that would also work yes
i think the hardest part is finding whether the polyline intersects
yeah but its not just a normal line of 2 points
it can be any number of points
what
like
[$(0, 0), $(2, 2), $(4, 4)]
well isnt that just multiple lines
of the same color
idk how i would represent that
uhhh yes but if one of the segments intersects another line you gotta make them all a different color
this is how i did the intersection
fn orientation((i32, i32) a, (i32, i32) b, (i32, i32) c) {
return math::sign((b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x));
}
fn on_segment((i32, i32) a, (i32, i32) b, (i32, i32) c) {
return (c.x >= math::min(a.x, b.x) && c.x <= math::max(a.x, b.x)) &&
(c.y >= math::min(a.y, b.y) && c.y <= math::max(a.y, b.y));
}
fn segments_intersect((i32, i32) p1, (i32, i32) p2, (i32, i32) q1, (i32, i32) q2) {
d1 := orientation(p1, p2, q1);
d2 := orientation(p1, p2, q2);
d3 := orientation(q1, q2, p1);
d4 := orientation(q1, q2, p2);
return d1 != d2 && d3 != d4
|| (d1 == 0 && on_segment(p1, p2, q1))
|| (d2 == 0 && on_segment(p1, p2, q2))
|| (d3 == 0 && on_segment(q1, q2, p1))
|| (d4 == 0 && on_segment(q1, q2, p2));
}
fn Array::is_intersecting((i32, i32)[] self, (i32, i32)[] other) {
for p1, p2 in self.windows(2) {
for p3, p4 in other.windows(2) {
if segments_intersect(p1, p2, p3, p4) {
return true;
}
}
}
return false;
}
double for loop check if any line in a cross any line in b
but you also have to take into account colinearity
what is that
rosie i forgot everything
last time i did competitive programming or any non school math was 2024 pretty sure
yeah me too
does that change anything tho
yes
isnt that part of the intersection check of normal segments
for a in lines
for b in lines
if b.any(bb -> a.any(aa -> aa.intersects(bb))
count++
no?
you also have to deduplicate but that shouldnt be hard
you also have to use the least number of colors
you can generate that number of max intersections and get the number of colors
but now you have to assign each color to each intersection
idk just try it lol
result should look like this
each new intersecting line gets a new color
yeah
well
i used greedy graph coloring for that, its like the go-to for this kind of problem
fn Array::assign_groups((i32, i32)[][] self) {
adj := Array::with_capacity<bool[]>(self.len())
.filled()
.iter()
.map_with(fn(v, self) Array::with_capacity<bool>(self.len()).filled(), self)
.collect();
for i in 0..self.len() {
for j in i + 1..self.len() {
if self[i].is_intersecting(self[j]) {
adj[i][j] = true;
adj[j][i] = true;
}
}
}
colors := Array::with_capacity<u64>(self.len()).fill(u64::MAX);
for u in 0..self.len() {
used := Array::with_capacity<bool>(self.len()).fill(false);
for v in 0..self.len() {
if adj[u][v] && colors[v] != u64::MAX {
used[colors[v]] = true;
}
}
c := 0;
while c < self.len() && used[c] {
c += 1;
}
colors[u] = c;
}
return colors;
}
i took like 1h 30m but i wasnt really speedrunning i was just blehhhh
im too lazyyyy
id have to set up my aoc env
i switched to nixos after the last time i did aoc
just open a python repl and start writing stuff lmao
or idk if you wanna do it in kt
what.....
i forgot progaming
literally so me
were doing dijkstra in school and i genuinely forgot how to do everything
its so over for me
ive only done java since july
husk
j*va
ive been focusing less on programming since like may, but even before that, ever since aoc i havent been doing any competitiv prgigm
c++ 😭
somehow i managed to remember what a min binary heap is
which is what a priority queue is implemented with
thats kinda shocking that i still rember
never heard that in my life
i will try to get the remaining 36 stars before december
@valid jetty you HAVE to do https://codingcontest.org this year
its essentially a more efficient way to store costs, useful for dijkstra
instead of linear search for the min cost, you use a balanced tree structure
we need to do a coop
and traverse it to get the min cost
not make a team but help eachother
im so physics rn..
so just a binary tree?
and i have so much other stuff going on
personal statement
uni applications
mock exams
driving lessons
blehh
bestie it is 4 hours
i thought you were 14
you can take 4 hours off
its a heap
since when
why didnt i know
thats what i wanted to say but that sounded wrong
youre doing the 4 hours
its sooo fun
i will vibecode it
i vibe coded last year
was #1 in the world to solve level 4 and then didn't solve level 5
finished #101
im surprised you didnt vibecode aoc atp
by like double
i vibe coded all my aoc
im actually not a human
have you ever heard of a red black tree
nah i use ai for it but not to the point of vibe coding
yes
like explaining stuff
lmao yeah thats fair enough
im actually RangerMcSexy
i may be going to the university of edinburgh..
is that good
i think so
im going to a remote uni in germany
it doesnt really matter for me
2 year bachelor probably
insane..
i may be able to land a masters 5FT 1 year abroad
at some uni
if i get really lucky with predicted grades
5 feet 1 yard??
5 full time of which 1 is abroad..
skipping bachelor?
yeah
like at leeds
4 years full time or 5 years full time (abroad) to get a masters in engineering for cs
4 years for a masters?
yes its skipping bachelors
i had to do an interview for one (no technical questions) and a placement test (using chatgpt) for the other


ing it