#programming
1 messages · Page 25 of 1
anyway the important thing is thinking about how your data flows
Not hard to make anyways, that one is just IPC sockets which have a lot of libs in any language.
any program fundamentally just moves a bunch of data around small-ish functions
which is what makes these kind of languages beautiful
true
and if the data dependencies are simple the program is also simple, and if they are some cyclic self referential hellhole they become hard to think about
chat, is there a way to invert ONLY the pdf page in chromium's viewer as opposed to the entire viewer like you can with pdf.js (without running pdf.js inside chromium)
very interesting 
anyway instead of listening to me go learn stuff (like a good programming textbook i always recommend is SICP since it teaches a bit of everything) and build stuff (the more different kinds of projects you do the more you will learn, for example i work on languages, networking, low level stuff, each area has different methods of thinking about stuff)
or use them
i was like super mad today because rocm and cuda's stablediffusion results are different
and eventually i ended up looking PRNGs, but most of them are like in C++ or Rust 
too harsh for smooth brain ML only person
i know ML
you know ML
we are not the same
depending on the language it's just declaring a bunch of functions, that's it
which is why it's often automated
also wondered why not make a build system that uses c++
oh, okay
https://github.com/tsoding/nob.h may i interest you in nob (c not c++ but still)
as in, not written in c++, but written with cpp
ooh, wonder how hard it would be to extend it to work with cpp
one extern c block probably
have fun 
but yeah, iirc nob targets c89 so it should work pretty much everywhere which is nice
i haven't used it for massive projects but the few smol ones i've used it with it's been really nice
is there any reason you couldn't use it on big projects?
i just haven't had any new ones
it should work just fine realistically, unless you throw something gigantic at it maybe
cmake lets you fetch dependencies automatically if you're into that
oh, hmm
and is generally just more extensive
tbf there's nothing stopping you from just using curl and doing that with nob too
you are just writing c/c++ after all
true
speaking of cuda stuffs, i should reinstall torch

cuda was not working, but with now the blessing of uv, there is automatic setup
how would uv help with cuda shenanigans 
oh damn
that's pretty dope
i sure love how installing torch results in a 6.3GB venv
thanks nvidia
Most useful feature honestly
Goodnight 
good eep to you 
Welcome to the preview release for Cooperative Vector support in D3D12. This exposes powerful new hardware acceleration for vector and matrix operations, enabling developers to efficiently drive neural rendering techniques directly from individual shader threads in real-time graphics pipelines. In research and in industry, machine learning bas...
neural rendering, hmm
did i just fall victim to sudo pacman -Syu 
One thing you could use this for, as far as I can tell it just allows you to define some blas operations in shaders
Wdym
ok maybe i just need to reboot
Why not just render the entire thing using AI 
ok thank gosh i dont need to recompile my kernel to get samba support back


VISUAL STUDIO ARGHH

never touched windows in my life
briefly tried to use python on windows
gave up
yk just fuck it we ballin straight to cuda 12.8
Do yourself a favour and just use wsl

speaking of that, i should really remove wsl and start clean too
its like beyond tangled

bro unironically uses visual studio instead of msys or something
but it's one of the best things on windows
i had very bad experience with msys
its just classic windows cuda
fsr i couldnt do pip directly and back then my dumb ahh brain just gave up
besides i dont understand windows at all
i have been with unix my entire life (macos and linux)
-# teerible experience with macos btw
Goodmorning 
did you just eeeped 50 minutes
morbing
every goddamn time I see this thing it's in the last place I expect
My brain is failing to solve it without something to write down on
Don't actually know the algorithm
The Tower of Hanoi (also called The problem of Benares Temple, Tower of Brahma or Lucas' Tower, and sometimes pluralized as Towers, or simply pyramid puzzle) is a mathematical game or puzzle consisting of three rods and a number of disks of various diameters, which can slide onto any rod. The puzzle begins with the disks stacked on one rod in or...
where is the Loss
Good morning
It's the loss of braincells of people that know what the problem is
but there is no problem
all disks can be moved to tower 3
i dont "remember" it but i derived ||O(2^N)|| just now
I keep getting these and "are you gay" tests all over youtube for some reason
you misinterpreted it, its задача not проблема in this context
are you though
no

discord took a billion years to send it just pretend i sent it after shadows message
that'll teach me not to quote reply]
not to not quote reply
to quote reply
that's the one

my brain is cooked all i can think of when looking at negation is logic and continuations
only able to speak in not operations
I wouldve just implemented bruteforce approach
||if you find a way to move N disks, you can move N+1 disks||
I doubt it- unless with a ginourmous code base
there is a recursive way?
its the only way i know
call the previous n-1 with the same principle
When something can be solved recursively it can always also be solved without recursion
but also a lil bit of recursion never hurt anyone
at least if you use tail recursion
strictly speaking not true as you cant always start from base cases, but more importantly is it really corecursion if you have to use a stack
looks like real osu code to me
right foldng a linked list 
(yes you can technically do it with a stack)

why steam game is installing its internal data to my c drive even when I explicitly mention it to download it on D
what the fuck is unity even about

get C:'d lol
this guy stinks
very interesting behavior of unity found
love to shove everything in locallow
i dont know what is happening anymore
jump with continuation, but the continuation is linear 
unless you have stack unwinding in which case it is affine 
speaking of linear i should translate towers of hanoi to linear logic for fun
hashbrown just abstracts probing
is @inline broken?
Since when did torch or pip required admin terminal
well, anyway finally managed to install
have you checked how long ssh takes to execute yet
its probably cause my d drive, it requires admin privileges sometimes
20 minutes before i realized i was doing something wrong 
classic env mismatch
restarting the python LSP usually helps with that
Another common solution is starting the editor in the venv (for some reason)
Yeah this sounds like the lsp hasn't realised the environment it's in
btw, would a gc realistically live in lily? i feel like it shouldnt (nobody uses gc in systems programming even though it can save so much memory smh) but at the same time it will probably have some code for interoperability with lily so you can reuse lily's code for hashmaps etc
i wanted to chuck it into a "lily.experimental.gc" module or something but i guess no need since everything is subject to change for now anyway
like maybe 500loc rn
its around 300LoC but its wip
i read rust-analyzer-adjacent docs and i from what i read just a parser is not enough to fully utilize incremental compilation, the more complex the LSP code the more it benefits from good structure
seems reasonable
but the cool thing is that if you implement your LSP code as pure functions it doesn't really matter how you pass data around since caching etc is separate from simple "A -> B" functions that you can plug wherever
do you think it's worth trying to implement robin hood probing or should i just try and implement chunking
i mean i tried chunking and i didnt see an improvement, you're welcome to try though
i remember writing something like occupied * 0x0101010101010101 in one of my attempts but idk how to do it without counting trailing zeroes
In combinatorial mathematics, a de Bruijn sequence of order n on a size-k alphabet A is a cyclic sequence in which every possible length-n string on A occurs exactly once as a substring (i.e., as a contiguous subsequence). Such a sequence is denoted by B(k, n) and has length kn, which is also the number of distinct strings of length n on A. Each...
you lost me
scroll down
oh
wait i like this hash table approach
there are only 256 possible combinations of 1 and 0 bits
so you could easily write a functions that checks the hash table for invalid collisions
but my concern is that this would require a pointer addition and read and a bunch of other stuff and just doing it the normal way would be faster
people online are suggesting that the branch predictor enables better performance on just using conditionals if the input numbers are uniformly random
yeah
what if i also store a 32 bit hash on the Entry struct
what for?
just an extension of the swisstables principle, if you store the hash you need to do less computations on the input data
though i guess it doesnt really help locality at all
the main point is doing less reads not less computations
this is true
perhaps if i really dont care about memory efficiency i can store keys and values separately for cache optimisation
ah quadratic hashing, i just realised, would want a prime-number length
also remove align(1) i dont think it helps at all (though didnt seem like it hurt either)
will do
actually with linear probing removing align 1 seems to improve it
very slightly
i never run benchmarks enough times to notice slight improvements so i didnt notice 
your hashmap will be used for interning strings and sharing common ast subtrees in the lsp no pressure

interestingly ableos and x86 seem to prefer different load thresholds
did we get within an order of magnitude of rust?
and rust is?
0.2
so we did 
yes
i can probably implement an hbvm llvm target some day to compare rust and hblang performance on ableos its like not a priority at all though since you know lsp and all that
i feel like there should have been more commas in that message
its readable
anyway these are what ive settled on
while im using linear probing at least
not good for memory efficiency
sorry that 1 should be a 2
isnt the former just self.entries.len >> 1
so for x86 the load threshold is 0.75, and for hbvm, its 0.625
can probably write these nicer
so 3/4 on ableos and 5/8 on x86
similar constants
but going far in either direction from those seem to pessimise the performance quite a lot
probably hasher dependant but i dont really care
also might depend on insert/remove patterns
it will
im not considering average usage at the moment which is a mistake
but hey ho
just look at the other hashmap impls
the other hashmap impls: multiple 10ks of loc abstracting everything away (because they have real users with different needs unlike us)
i also think they have unnecessarily large hashmaps though
they could get 90% of the performance within 300 cloc surely
good morning #hblang
i feel like a big thing with this hashmap is going to be inlining
without inlining, you are jumping all over the place
probably, also inline hashing
though thats just one call per insert/remove so who cares
with hashbrown code i feel like 90% of what i read is just inline documentation 
also all the different methods, entry api, etc, theres a lot that goes into "production-ready" hashmaps
even if hashmaps are super simple at their core
yeahh
its nice when you can just ignore all that and write barely-documented code with the interface stability guarantees being "if you didnt want me to change it maybe you shouldn't have used it"
i found a better threshold on both x86 and ableos
which is 77%
marginal gains
@ 200ms with 1m elements
near exact
fish
apparently swisstable impls often probe linearly within a bucket but use non-linear probing between buckets
well, groups, these arent exactly typical buckets
makes sense
try at your own peril, woe is you https://github.com/google/cwisstable/blob/main/cwisstable/internal/control_byte.h
Single-header C11 port of https://abseil.io SwissTable - google/cwisstable
bwa
just let go, you've done enough 
from here on out its doubling the code for 20% performance
just nt worth it
you can use this as a template for the implementation of batching if you do want to go down that route
i found a minor performance improvement by checking if meta is GE to tombstone
based on a8995f76fb134e2a61b97d58efc18264ab9b8751
will read
it only implements batched delete and it doesnt use any of google's bit tricks
but i tried to make it as fast as i could (and failed, but i didnt make it noticeably slower at least)
also their hash mixer https://github.com/google/cwisstable/blob/main/cwisstable/internal/absl_hash.h
it's kinda random though, still
unless you have perfect conditions everytime
The github pagewasalmost fixed, but it compiled wrong on my laptop
Works on my machine ahh code 
As long as it works on my device ahh mindset
@sage crag also a little thing you could do if you want to work on hashmaps a bit more is implement hashset (a thin wrapper over hashmap(K, void))
This is how you develop a working SaaS
or a working just about anything that goes to prod, really, theres so much corner cutting
they can just use HashMap(K, void) 
im done with hashmaps for a while
good because they're beginning to scare me
im getting tired of minor performance gains
i managed to get it to 1.29 seconds under optimal conditions
good enough imo
mhm especially considering no inlining, unoptimized asm, no autovectorization, etc
40% performance improvement from when it started
when inlining comes out i'll test again
also when the foldhash bug gets fixed on x86
while using like two orders of magnitude less code than other impls
only being 6x slower than rust on 5 million elements is pretty good
unfortunately the same cant be said of say, 6 million elements
hashmaps scale very badly
llvm + simd is a powerful combo
mhm
and to be fair
the compilation time is sub 70ms
so, 6 times slower than rust but compiles 60 times faster 
rust is a very fast language to begin with
the performance is close enough to leave a decent margin for unoptimal code (which i won't write of course
) so i think the interning part is covered now
erm
by the way, this is 800ms just inserting
and 400ms removing
so approx 50% of the runtime inserting is rehashing
basically they're not as fast in the best case but they give predictable performance (and iteration order)
no hashdos and stuff
i might write a special insert function for rehashing
mhm
right rehashing is what i thought was the only remaining optimization without batching
but tombstones make it tricky since lower hash values may trickle up to the higher hash half and vice versa
there were a few numbers optimisations
im also not doing optimal tombstone removal right now
so real world performance will suffer
the compiler will probably handle that when inlining happens
is my hope
still though, even if you remove the cost of rehashing entirely you sit at 800ms runtime for 5 mil elements
still 4x slower than rust
pretty good though
just realized the interner will have to unintern stuff when GC removes it... i actually have no idea how to implement that cleanly but i'll figure it out i guess
What the fuck :D
Also morning chat 
It might be 1 in the afternoon, but ya know. Sleep cycle is fucked 
ripp
i did get an idea - weak references that use the relocation mechanism for setting their own address to null, permanently invalidating themselves, then iterating over the hashmap to remove all the nulls can be done at the end of a regular GC cycle (provided the hashmap doesnt move stuff around when removing which it wont with the current impl)
then this part is covered, and the rest is just operations on a graph (which is half of what language development is about anyway)
I'M SO MAD RN CUZ MY BLENDER IS SO DUMB IT CAN'T DO 1 * 2 * pi * 1 * 1 / 64 PROPERLY(in a more complex way)

actually i want to point out that on the same bench, rust's default hashmap is 457ms
though they are using siphash3
wait what did you compare to before?
hashbrown?
or just same hashmap with different hash?
same hashmap with a different hash
here's running the same with the "equivalent" hasher to the one we use
hi shiro
my implementation is poor though
hashbrown hashmap is actually slightly faster than this
though it doesnt get faster if i swap the hash algorithm
so it seems its mainly an algorithm difference
in fact, its likely rust's hashmap is just hashbrown using siphash3
you can probably const'ize the length checks in the hasher but hashing is probably the least expensive part
the hasher is fundamental to the speed of the hashmap though
if your hash x -> x
then your hashmap becomes O(n) insertion 
yup if your impl doesnt match the original hasher then thats pretty broken 
i took an unrelated benchmark and slapped hblang in there 
#include catch_segfault.h
strlen_2(const char *s) {
int a = 0;
int b = 1;
*(s+b);
while (!segfaulted()) {
a = b;
b *= 2;
*(s + b);
}
ptr = s + (a + b) / 2;
while (segfaulted () || *ptr != 0) {
if (segfaulted()) {
b -= (b - a) / 2;
} else {
a += (b - a) / 2;
}
ptr = s + (a + b) / 2;
}
return (a + b) / 2;
}
thoughts
if strlen is zero then it errors because you dont catch the initial segfault
was assuming the header just did something to make segfaults set an error flag instead of crashing
I don't actually know any method to catch segfaults
i dont think its an exception its just a flag probably
you can read the kernel sigsegv signal but you cant catch a segfault before it goes to the kernel
you can mask the segfault signal and define the error flag setting in a sigaction
but a flag here does work
this is not running on linux though i think
lol
it's not platform specific I think
there must be a way to detect segfaults
and prevent your program from crashing from them
there is a segfault interrupt on x86 cpus, but that's all you get
then it would be pretty broken because reading past end of string is perfectly legal and not at all guaranteed to segfault
the OS handles it otherwise
and the handler for that interrupt is generally the OS
yeah it's not guaranteed to work at all
fork and check if the child process dies 
ask me how i know 
if you put too much on the heap it becomes less likely
wait genius?
by legal i mean it causes undefined behavior which is allowed to explode your PC or go back in time and kill your grandfather before you were born 
worry not, I'm not using the values read
I'm just using whether or not they were read without a segfault
doesnt matter
they're allowed not to segfault if they want to
or, again, do anything else
for example, there is a possible optimization in which this program actually goes back to main and runs your program all over again
Does *(s+b); even survive optimization?
it should survive
the joys of UB
it will do exactly what it always does until you want it to do something specific
the standard says "UB" because "well it may be different on different ISAs and we wouldnt want to force everyone to add a billion checks everywhere", but for compiler writers it means "if you can detect this in the code then this code won't actually run so we are allowed to emit whatever we want in there"
can always put it in a variable
strlen_2:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-24], rdi
mov DWORD PTR [rbp-4], 0
mov DWORD PTR [rbp-8], 1
mov eax, 0
pop rbp
ret
asm identical with and without *(s + b);


doesn't help if you don't use it, then you just get a compiler warning on top 
then the compiler just converts your program to mov eax, ret
volatile variable should work, surely

rotate rotate
volatile basically means "dont cache it" it doesnt mean anything else
we need to get a SAT solver on the arg images
malloc something and put the value in there
then free it at the end of the program
or just black_box
I'd like to see the compiler optimize that
shiros these days dont know the wonders of stack all they know is eat hot chip and malloc
C compiler as usual is my number one enemy
if you malloc a buffer and then only use it for an int it compiles to a stack assignment
im ok with that
that's best case scenario in fact
no, because then it compiles it to nothing
what
dead code elimination
the compiler isnt oneshot, the static analysis keeps going
compilers are evil magic
isn't volatile mostly meant for I/O memory where reads and writes actually have to happen because there may be side effects to them?
I wouldn't be surprised if the C standard says otherwise but surely most compilers don't optimize accesses to volatile variables out
this is true
volatile is common for memmapped io on embedded systems
malloc one byte, read as int, AND with 1, OR with 1, and then realloc to that length
compiler will fix it
bet the compiler can't fix that
i think its main purpose is stuff like spinlocks but yeah you're probably right, godbolt is needed to verify it though
realloc and malloc are c library functions that have special cases in the compiler
if you call mmap directly it might not
You can probably safely read to the end of the memory page but that is very platform specific? And you would still need to scan for zeroes since there could be other data including strings after it but you night be able to do this in blocks of 4 or 16 characters at a time for a speedup?
actually i know this case
c always ensures strings are 1 character longer than needed
reading 1 beyond the buffer is not UB but reading past that is UB
here it would depend if you strings are stack or heap
if they are stack it will probably work
gcc explicitly stores and loads a variable with volatile even at O3 
https://godbolt.org/z/cEMv9zEeP
heap strings will probably fail because the kernel will give you a full page, provided the kernel doesnt decide to memprotect outside the allocated region 
i'm tryint to load the standard but my internet is dying as always (also i learned that hurricane electric is to blame but i'm not exactly a paying customer so oh well)
memprotect only works on full pages, i think, so that should be ok
like you said though, architecture and system specific
@tender river segfault hashmap
malloc a ptr, which becomes the base offset
then, for each inserted item, malloc a whole page
iirc volatile for local variables is different than those that are global or in structures, so maybe that is the reason?
then when probing, if the index is a segfault, then its vacant
and if it isnt a segfault, then its not our problem
shouldn't be
if anything I'd expect local variables to be more likely to be optimized out, so this was already kind of a worst-case test and gcc still didn't touch it
C99 standard says this 
An object that has volatile-qualified type may be modified in ways unknown to the
implementation or have other unknown side effects. Therefore any expression referring
to such an object shall be evaluated strictly according to the rules of the abstract machine,
as described in 5.1.2.3. Furthermore, at every sequence point the value last stored in the
object shall agree with that prescribed by the abstract machine, except as modified by the
unknown factors mentioned previously. What constitutes an access to an object that
has volatile-qualified type is implementation-defined.
tl;dr there are some guarantees but it's mostly implementation-defined
yay i dont have to load it
- read according to the rules of the abstract machine
- write according to the rules of the abstract machine
- if the type is volatile idk your guess is as good as mine
Looks like GNU libc already does this, who knew... 
yeah, it implies that reads and writes have to happen, but doesn't say what they actually mean for volatile variables 
which makes sense, the C standard shouldn't be concerned with how memory works on a specific system at all, portability and all that
at one point i had an idea of making a super cursed standards-conforming C compiler but i realized it would be impossible to program anything in it
could still be a fun project... just not an easy one
why would it be impossible?
possible, but there are like a billion things the C standard leaves up to implementation, byte size for one
does cstd support trinary
The only thing I can see in the way of that would be the question of how a trinary XOR would work.
Theres probably more but this seems like an important one
In logic, a three-valued logic (also trinary logic, trivalent, ternary, or trilean, sometimes abbreviated 3VL) is any of several many-valued logic systems in which there are three truth values indicating true, false, and some third value. This is contrasted with the more commonly known bivalent logics (such as classical sentential or Boolean log...
i found the SETUN opcodes
will take a while to translate please wait
you can always read to the end of your memory page, as that is the smallest size the cpu actually checks permissions on, however you will need to check/guess whether your application is using 4KiB pages or 2MiB pages as both can be used by the cpu at the same time.
(there are also hugepages at 1GiB but the OS needs to be configured to allow those specifically)
okay i wont bother but basically since each trit is positive, negative or neutral, its seems theres no xor built in but theres tritwise multiplication (basically "and")
i like that it has breakpoints (break instruction that stops execution and continues when you press a physical button)
debugging in 1959 
there are no other tritwise operations btw, unless you count shift
one more step ahead
time to think of a way to add every pixel on each column together
matrix multiplication?
What is that?
it's 1D DFT before the summation
huh neat
I should really look into how the dft works instead of treating it like a black box
so e^(-2i * pi * x * y / 64) * ori[y]
where ori being the original image's first column
yuh

Huh, does discord not support LaTeX?
e^(\frac{-2i\times{\pi}\times{x}\times{y}}{64})
Interesting
cuz LaTeX can be exploited if Discord does not handle it correctly
Yeah, but like, the basic notation are generally safe. Also, GitHub supports it
GitHub did have an exploit when it came off of LaTeX if I recall that cause correctly
All I found is this
https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/LaTeX Injection
Oh, I found it
https://www.netizen.net/news/post/4541/mathjax-latex-exploit-github-users-use-css-injection-for-profile-customization
This vulnerability in GitHub's MathJax rendering allows for arbitrary CSS injection in README files, potentially leading to style manipulation on GitHub pages. The issue stems from improper handling of the \unicode macro, enabling attackers to inject CSS into the element. Mitigation involves direct manipulation of the DOM element style object t...
Then again, the mitigation already exists. Oh well
adding features that users actually want? discord would never
does it still count as boilerplate if its a bunch of stupid connectors but getting them right is super tricky and will blow you up 
@stark needle how is that arc a770 holding up
because I'm still stuck on my gtx 1660 and it really is showing its age
if anyone else has any affordable gpu suggestions that fit my annoyingly exact requirements feel free to tell me
basically looking for something that is:
- no wider than 2 slots (like the image)
- no more than 2 pcie power slots (barely considering 12vhwpr, I'd like to avoid it)
- not going to milk me for all the money in my bank account
I've heard decent stuff from the Intel B580 if you can find one, haven't daily driven intel dedicated graphics so take it with a grain of salt.
current options seem to be:
- 4060 ti
- 9070xt reaper (unreleased, not sured if it properly works)
- either a b580 or a a770
it is seemingly like an increasingly good option I just ideally want to have either cuda or rocm
my 6600 xt fits the bill i think
oh I should also throw in that the card should be a reasonable upgrade from my current one, I don't want to have to replace it any time soon
and that seems like a vram downgrade at the very least
i go by ratings from videocardbenchmark.net
6600 xt and B580 seem about equal, although B580 has more vram
I normally use techpowerup.com
as far as i know that site directly compares theoretical max performance to get those numbers
which seems limited
the biggest issue with my current gpu is the way it runs modern games
it does manage ~60-70fps it just sits at 100% usage and gives me insane input latency
Ah, so always boasting numbers. Not the greatest for comparing day to day
other than that I just need something that can:
- work nicely enough with blender
- encode / decode video
like 90% of my gaming is in tf2 I could run that on my igpu if I really wanted to
used 2080 supers seem to go for around $250 to $300 on ebay
it looks like sunshine supports intel's hardware encoding so I'm in with a chance
from what i remember like a week or two ago the 6600 xt was going for around $250 on ebay
if you're wondering how those gpus compare:
vram is still limited though
hmm
Gonna be swapping an NVMe today
honestly I might just go for a b580
Moving to dual boot linux
it supports a decent amount of funny video encoding stuff, is very cheap and has 2x my current vram
fair enough
probably not a perfect fit for the "never needs replacing" but unfortunately gpus just keep getting fatter and more power hungry
6700 xt has 12gb vram and seems to be around $300 used
I used to have a 970
Na must be the 980

I still have one in my server used for minor transcoding
Still chugging from 2015
(Though its heavily modified from Nvidia)
my only issue with 6xxx series (or older) amd is iirc they have pretty trash hardware encoding
Av1
One warning about the intel Arc cards, the legacy OpenGL performance is pretty bad under certain conditions, though that should not be relevant unless you use some truly ancient and demanding software.
does solidworks count as ancient and demanding
And I mean like < 3.0 so every project started this millenia should be good, hopefully
(I may not even end up using soldworks so its w/e in reality)
I work in CAD/CAM and our QA found out the hard way 
Very noice
Ancient... depends on which version. But demanding, yes. VERY
But if you only need simple CAD, Fusion360 is free for personal use. BricsCAD has one-time purchase, and onshape also has free for personal use
yeah I'm probably gonna toy around with f360 for the time being, given I can snag an educational license from them
but also I could nab a solidworks license from my uni and learn it for the shits and giggles
The important thing is to learn the fundamental. If you've mastered that, even using FreeCAD would not be that impossible
yeye fair
But if you need to get a job, then get a certification. The industry (at least in my country) is still using old SolidWorks and AutoCAD
a certification would be neat but I haven't super looked into it
Works
I have no real background in engineering I just happen to be less useless with it than the average person
Ahh, then yeah. Fusion360 is super easy for beginner. Onshape also compete in that regards for more simpler design, and less resource hog since it runs on the browser
I don't really mind a resource hog, plus the way onshape's free tier works sketches me out
I'll stick with fusion for now 🙏
there's also the 1080 ti with 11gb of vram
I probably just need to find some kind of course / guide / cert / etc. to properly learn the software instead of just going off vibes though
from my experience with getting a solidworks certification all you really need to know is how to use a few important features and how to make simple parts in a limited timeframe
the courses for this stuff are usually "here's a sheet diagram of a part, go make it in CAD" and maybe a guide on how to use a feature that will be useful for that part
t
hi konii
hi t
it really isn't but you have no idea how much i've seen others struggle with it
I am well aware from participating in a group project where someone vibed their way through fusion
its never a good sign when you manage to make a step file so bad onshape can't open it
genuinely how
I am trying to find a screenshot of the model
but from what I remember they had some very messed up surfaces
best part was the triangle pattern they tried to cut into the surface which created ~1000 constraints and froze fusion every time you did anything
bruh
What's up yall
don't question the design it never made it out of cad
but there has to be a better way to make that pattern in cad than copy-pasting a single triangle everywhere lol
that seems pretty normal?

you are correct
forgot what the feature is called but it can repeat a selection of lines at regular intervals
my issue wirth this was the abuse of carbon fibre everywhere
idk what you mean by that but I can open the image just fine
there's also a rotational version of it that rotates the shape around a point
yeah I kinda assumed that would exist somewhere
ah it's the "linear pattern"
no big gay pikachu :(
it's just a jpg? can you even fit malware of any kind on that
i mean it happens
you can open the link in browser
discord is great at randomly not embedding stuff
I do agree it does
you could mess with the metadata and/or use a parser/decompressor vulnerability, but yeah, it's rare
Or it could not even be a jpg file, seen that before
tf they gonna do with your ip even
i see
it probably just didn't embed because of the insane resolution
Yep rez
who tf decided a phone should take 200MP images
Yet someone manage to send gif of full minecraft movie
Yeah, but its still around 65MB
it's probably laggier to embed a 50MB image with crazy resolution than to embed a 100MB video file in 200p or whatever
it's not like the entirety of the video is displaying at once
discord gif handling got a lot better after they moved to react native iirc
But to be fair, its due to how shitty gif is for actually moving stuff
True
I remember when any gif over like 1MB would bring the kotlin app to its knees
yet they still haven't figured out a way to have the gifs in favorites show up in a recognizable form instead of doing this until the gif is fully loaded
would be absolutely insane if they had thumbnails stored locally or something (they'll never do this because it would only benefit users and would take a bit of work from a developer)
would be insane if they used an imageset that loaded a static webp first
that too
I think the issue is probably due to the mildly scuffed way discord handles the saved gifs menu
@tender river thought you would like this one
not suprised, but still pointless on a phone
I find the 8k camera useless on this one, let alone higher
my phone allegedly does 64MP but its just a waste of storage
I have zero faith in phone sensors anyways, pixel count barely decides their quality
I shoot 4k and RAW, because I do photography sometimes
clearly if you can't zoom in close enough on an image to see the textile pattern of a carpet it's too low-res to consider buying
yet it still can't show readable text properly LOL
tbh samsung still handles text better than iphones in my experience
One of my previous phones had very good text quality, shame I can't use it.
Okay cool
What does text quality even do?
but yeah the image is just too big to load as an embed
makes text readable
in terms of camera quality
makes text readablw
can't find a good comparison though 😔
64 mp is absurd
all i know is that my samsung A51 can take pictures of my homework that have clear and readable subscripts and superscripts
good enough
my a52 is unsuprisingly very similar
no way
though I'm pretty sure my OIS broke
If it could be used to average out stuff instead of raw res then I'd say it is slightly better.
it probably is in the lower resolution modes
In hardware instead of software, less to process in theory.
I'd need to look into it if I want to make more points for or against it.
tbh if I'm doing anything where I care about image quailty I'm not using a phone anyways
they lack behind so much in other ways
I don't have issues on the software side, just smol sensor
Not much precision you can get at all
Lads I got my stupid camera mount thing to work pog
Now I only need x and y not the z axis
also these fuckass lens flares
like yes I know a real camera also gets lens flares but not to this degree
yay, its a stool with a wood slab clamped onto it with the camera at the edge of the stool, I got my yolo model to actually run well so now it's finishing the coordinate translation code yippee
the sun is attacking
solar flares if they were epic
@tender river if you can submit some issues of things you have been experiencing that would be great
its hard to categorise them in just one channel
this in hblang repo
tf is that for
Hi Wheelz 
îts 2025 and I'm implementing a insertion sort 
Sick

UPDATE: As of June 3rd 7:45 CEST, Meta/Facebook Pixel script is no longer sending any packets or requests to localhost. The code responsible for sending the _fbp cookie has been almost completely removed.
LMAO
disclosed and instantly pulled the plug
Does anyone have an image that I can use as the banner for my programming portfolio

nuclear reactor
(you're gonna have to be more specific about what you want if you want anything meaningful)
no computers
oh
I love playing incremental games!
stateless 
anyway seems like a question by a person who just learned what fp is and hasnt actually used any fp language, their question would be half answered if they learned a fp language (or even concepts like tail recursion and fold) and full answered if they actually did some programming that required lots of data processing (which is just about any program from UI to databases) and ended up having to write fp in whatever language they were using at the time, whether it be JS or C++
tl;dr the primary use for functional programming is writing neuro sdk mods in F# 
(sorry if you wanted an actual answer and this was a bit handwavy)
gotcha, dont really remember anything but i'll keep that in mind

i already submitted the issues regarding those u8 binops
if anything else comes up, a test case or some way of reproducing bug is required
though you dont need to be told that 
codex
can you do my job for me for 20$/month subscription
yes
Ah

Actually, that's better for me-
structs are infinitely better than classes anyway
I'm coming from C like 
IIRC they had some difference in the default visibility of attributes, but yeah, same thing 
(referring to class and struct keywords in C++)
yeah, I would have been surprised if there weren't at least some differences
I don't know why structs with member functions feel so icky (I know why, C brainrot)
do they actually not have inheritance?
I'm quite sure I used C++ classes with inheritance at some point but maybe I'm just going insane
@grok is this true?
methods are too much for the c programmer's mind
all struct functions must take a struct ptr

yes
I discovered the concept of a static getter and felt like a caveman coming out of the lights cave
I'm still such a beginner it's scary sometimes
gcc disagrees 
https://godbolt.org/z/acfqvsarY
the stackoverflow overlords have spoken
Time to switch to c--

WHAT IS THAT THING
D
kill it with fire
ropher
don't worry about it
One project of the advanced part at my school has us building a B compiler
most of them exist
Alphabet stack soon
And the next one after that is a C compiler 
The B spec provided is glorious
alphabet ouroboros quine 
method pointers 
i remember some incredibly cursed things to get some particular kind of method pointers
i have (programmatically) created a test that checks every binary op, every unary op, and every upcast under permutation 
or was it because method pointers can't be trivially casted to function pointers in C++
this is not a neuropoghd time
i'll go find that code
it is
binsearch time
ueaj
i found it
v52_0: u32 = 4
v52_1: u32 = 1
v52_0 >>= v52_1
if v52_0 != 2 return 52
no way my old C++ code uses tabs
youre not supposed to be here
my fascination with programming languages started after writing this code and realizing it fucking sucks
this was uuh in 2018
this is real chayleaf lore
wait it works
why does it crash the compiler
it literally works
too much stack values?
some specific register allocation may trigger it
as an ai language model
lets find out
no, i dont have an allocator
surely just pass it in there nothing could go wrong
this feels like a bad idea to change function args of

im just going to make an arena and not deinit it
add it to struct initialization
but i guess you might have to have it recursively which would suck
just separate into multiple functions and report and move on
i found a canary
got it working 
i dont know
this is very annoying. all other types properly upcast with both lhs and rhs, but not i64 and uint
v361_0: u64 = 5
v361_1: uint = 3
v361_r := v361_0 + v361_1
there's no reason this cant upcast into u64
oh i didnt even know theres explicit u64
yeah
uint and int are meant to be ptr width
u64 and i64 were added because we complained
i still prefer sN to iN though
s32 yes please
sint is less nice though
shorten it to sin 

if functions can be fun why cant signed integers be sin
we have a function called sin
clearly this means we need contextual scopes this is not at all a bad idea 
rust kinda has them btw, proc macro and trait can have the same name

ml has them with module an type potentially having the same name
but yeah not a good idea unless you design a language from scratch with that in mind
i've long realized that pointless aliases are best avoided
no you should do it
no.
always something in my way
nope no idea how to fix that one, other than "just fix allocBytesWithAlignment surely that's the wrong one"
what if i just remove the assert
surely its a good idea
segfault
im just going to upload this 
and mlokis can figure it out tomorrow
yup its like a billion minimal repros 
maybe it will inspire him to actually test this in the compiler's fuzzer 
a maximal repro
now that i think of it creating a testing framework sounds like a good idea... it doesnt sound that hard (autogenerate code for every .hb file that has a tests := {) but would you want tests to live with the code or in a separate file
i generally dislike unit tests being in source files
perhaps it seems silly, but i prefer the tests to be centralised
i dont mind either way
i think if theres a nice correspondence between modules and tests tooling is easier to develop
for example, i could add an lsp feature to run tests for a specific module on save or on demand
can someone explain to me why this works if it even does, i skipped math lectures
let digits = (value.abs() as f64).log10().floor() as usize + 1;
log_10 of a number is the number of times you need to multiply 10 to get to that number
take the floor, which puts that to the nearest whole number
and you get the number of 10s to get to the nearest power of 10 to that number
which will be the number of digits in base 10
my brother's laptop has a metal frame, and metal hinges. but lenovo in their infinite wisdom decided to make the piece connecting the 2 from plastic 









it broke 
then you know how the algorithm works

in general, you can use a logarithm of base N to get the number of digits in a number with base N
base 0 
this reminds me of the whole debate on whether 0 should be a natural number
its true if you take log_0(x) as infinity
different countries use different definitions of natural numbers 
i like to include 0 in natural numbers
because it distinguishes them from positive integers
an actual counterexample is base 1
111 (base 1) == 3 (base 10)
but log_1(3) is undefined
111 isnt a base 1 number
0 is the only base 1 number

when did they teach you nondecimal bases btw
in our case it was primary school but i dont remember if it was 2nd, 3rd or 4th grade
hm
"Nondecimal bases"?
not base 10
well, i believe the first time would have been IT
non-decimal bases are not really a concern for UK maths students until A-levels
@sage crag 50M parameter llm schizo
look at me im a 50m parameter llm
holy, did you go to a special school or what
binary as part of IT in like 8th grade for us
We had Roman numerals in 3rd grade, binary in 8th
don't worry nobody bothered actually learning it anyways and cheated on all tests
roman numerals surely dont count 
i mean i went to a montessori school so thats why i guess
oh yeah makes sense then
hi

yeah i pushed the test
im just gonna let mlokis deal with that
if there's something wrong with it he will yell at me about it
@sage crag what do you think of this
its useful to some people
i dont think i would ever use it
though it would get used in ableos if it existed
since ableos is very gui-centric
well, adding it later shouldnt be a problem
hm
i was thinking about something
but now its gone

head empty 
do you want to standardize some kind of tests directory format for tests that live separately from the code
i can offer editor actions that run those at least
though, i dont use them myself when developing for other languages
theres a lot of lsp features but i kinda only use renames and error highlighting
hard to think about editor tooling when you barely use it 
i'll just forget about fancy features for now and focus on building the dependencies of a proper lsp impl
it does not matter
unit testing shall be done or shant be done whether or not the lsp has support for it
thanks for the consideration but the extra work is just not meaningful to anyone's usecases right now 
it would probably be important if hblang was more popular
yeah i just thought i probably need quite a lot of tests for the libraries i write because of the language's current state
and that just writing the code and checking it works by writing something in main and moving on is not a good iea
at the moment im taking the approach that documentation and testing for my code is less important than volume of code
the compiler is so unsound its impossible to use the results of your tests for actually testing things
i guess thats the way to weed out the most critical bugs
do I stay up late waiting 3 bajillion years for bitcoin to transfer or sleep
you should download more bitcoin

do you actually need to wait for it or are you just anxious for no reason
surely the recipient can wait 
join moving coinbase -> proton -> elsewhere because I'm getting sick of coinbase being up my ass on every button I click
(I'm sure there's better options)
proton as in protonmail/protonvpn? do they offer crypto stuff now, or is there some exchange or whatever named proton
proton offer a bitcoin wallet via proton wallet
I'm sure I could use a local wallet instead
but this is nowhere near enough money for me to care about proton having the keys to my wallet
personally i just store my wallet in my keepass db which is replicated between all of my devices so its relatively safe in there
if you get access to my laptop while its unlocked you can steal 1 eth 

lol just remember all the words ez

probably not too hard since i rely on swayidle for locking but you'd have to climb up to the third floor without anyone calling the police
no i mean like
just let me steal it
you know

sure, go on
thanks
be warned, the accursed information stored in my laptop is a heavy burden the bearer of which shall pay a heavy price
who would've guessed proton -> elsewhere happened in seconds compared to the literal 10 minutes coinbase -> proton took
is it a one-time payment or a subscription fee
one time but multiple times
just say subscription fee
no its multiple times but its bounded
😔
its not a subscriptio



