[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1778702162115597.jpg (181 KB, 850x850)
181 KB JPG
What are you maids working on?

Previous: >>109505781
>>
>>109546620
I made a function to print numbers in my programming language.
glo puti = (\n = 
| n = (
@puti n / 10
putc 48 + n % 10
) _
)

@puti 12345
>>
>>109546941
write fizzbuzz
>>
>>109546941
>@puti n
>>
File: IMG_1549.jpg (20 KB, 569x351)
20 KB JPG
>>109548224
>>
File: putin-walk-swag-walk.gif (200 KB, 220x124)
200 KB GIF
>>109548224
>>
>>109548224
which hole do i put it in
>>
>>109548457
wide putin best putin
>>
>>109548554
stdin
until she says stdout
and then you piss barbed wire
>>
>>109547640
>how do you handle current running jobs while a setting is changed?
When the connection configuration changes, you need to throw away local job delegate objects and rebuild everything from the remote service. Think about it like this: one of the connection configuration items is the user's ID on the service, and different IDs may see entirely different jobs.
Which does point to it being important to make sure any changes in the old view are committed to the service (or thrown away, if that's what the user chooses to do) before the connection detail update is applied. Never discard user-initiated changes without their approval.
>>
>>109548457
This is what happens when you watch too much hidamari sketch
>>
this fucking segment tree question SUCKS
https://leetcode.com/problems/longest-substring-of-one-repeating-character/
>>
>JuliaCon day 1 talk 1
>it's SPJ talking about Haskell
Is this NTR?
>>
File: julia.jpg (29 KB, 427x640)
29 KB JPG
>>109550016
Would be on brand.
>>
>>109547589
Done.
glo puti = (\n = 
| n = (
@puti n / 10
putc 48 + n % 10
) _
)

glo ln = (\=
putc 10
)

glo putfizz = (\n =
putc 102
putc 105
putc 122
putc 122
)

glo putbuzz = (\n =
putc 98
putc 117
putc 122
putc 122
)

glo fizzbuzz = (\n =
| not n % 15 = (
@putfizz
@putbuzz
)
| not n % 3 = @putfizz
| not n % 5 = @putbuzz
| _ = @puti n
@ln
| 100 - n = @fizzbuzz n + 1 _
)

@fizzbuzz 1
>>
is haskell a meme language or can you actually do productive things in it ?
>>
>>109550222
yes
>>
>>109550222
Just look at all the useful software written in Haskell and you will have your answer.
>>
>>109550306
hledger
pandoc
>>
>>109550222
you can productively produce white papers on type theory or something
>>
>>109550167
Gorgeous
>>
How many ducks can Haskell shove in my ass?
>>
File: IMG_9705.png (147 KB, 538x480)
147 KB PNG
How do I write a procode?
>>
what do i need to make to be a proper programmer ?
>>
>>109551629
Minecraft in Python at 60fps
>>
>>109550016
like you wouldn't want to have spj talk about anything, admit it chud
>>
I love Rust.
>>
I hate C.
>>
I hate Rust.
>>
>>109550222
Haskell is perfectly capable of making useful things, theoretically.
>>
>>109551969
>t. borrow checked
>>
>>109551629
Registry dumper or syscall tracer.
No, I'm not kidding.
>>
>>109552544
>things that already exist
Why.
>>
>No, I'm not kidding.
yes, we are acutely aware of your shortcomings as a human
>>
hey buddy sorry for getting a little feisty there... it's just that registry dumpers make me nervous
>>
>>109552576
>things that already exist
That's not what it's about, motherhumper. It's about being better than everyone else.

Oh, speaking of which:
>>109542345
Still waiting.
>>
File: 1786056433656883.jpg (36 KB, 637x358)
36 KB JPG
A REGISTRY DUMPER TOUCHED MY GIRL PENIS!
>>
>>109551930
Doesn't matter. C hates you, too
>>
File: autism.jpg (115 KB, 828x649)
115 KB JPG
>MY GIRL PENIS
Holy.
Total autism death *now*.
>>
>>109552667
I'm going to be better than everyone else by making things they don't make, not by copying them but better.
>>
>by making things they don't make
Yeah, and that's how you end up with worthless, retarded, autistic shit like overcommit.
Your race is finished.
>>
>>109552706
I'm not a vibecoder.
>>
Wasn't talking about vibecoders. Was talking about autists.
>>
>>109551970
this, most Haskell programmers simply choose not to
>>
Erlang is the best programming language.
Learn Erlang.
>>
Today I found out that std::move() on a stack object made raw pointers dangle.
Called here:
for (auto thread_tuple : db->queryRows<std::tuple<int, int, std::string, std::string>>("SELECT id, permission_object_id, slug, title FROM board")) {
// Board board(this, db, std::get<0>(thread_tuple), std::get<1>(thread_tuple), std::get<2>(thread_tuple), std::get<3>(thread_tuple));
auto board = std::make_unique<Board>(this, db, std::get<0>(thread_tuple), std::get<1>(thread_tuple), std::get<2>(thread_tuple), std::get<3>(thread_tuple));
std::print("{}, ", board->getId());
board->cacheAllThreads();
this->slug_to_board_id.emplace(std::get<2>(thread_tuple), board->getId());
this->boards.insert(std::make_pair(board->getId(), std::move(board)));
}

Issue resolved by storing in heap with unique_ptr:
// std::unordered_map<int, Board> boards;
std::unordered_map<int, std::unique_ptr<Board>> boards;
>>
>>109553659
std::move is just a cast
>>
My AI companions are now able to keep a summary of the conversation so they don't forget old events completely. Currently the voice generation endpoint returns only an audio file but I will need to change it to return some waveform data for previewing the audio. I could base64 encode the audio file and send everything as a json but I'd have to decode the base64 on reception or I could two files as a multipart HTTP response but that isn't supported by the server library I'm using so I'd have to build the response manually, so right now I'm thinking of returning the audio file and putting the waveform data directly in the HTTP response header
>>
>>109554078
>>109552932
>>
>>109553659
>>109554063
this, basically it just calls the move assignment operator. trivial types perform a copy, but more complex types (string, std containers) will perform a specialized operation that leaves the original value invalid.
>>
Why do rustaceans like Builder pattern so much?
>>
>>109554262
the language kinds of force you to do it.
it's the same with c++ when you try to enforce strict const correctness.
>>
>>109550222
The time I tried I ended up with a program that froze randomly and no easy way to debug it so I gave up
>>
>>109554095
I don't know what vibe coding is exactly but its probably not what I do since I've only heard this term recently and I program the same way it was done 30 years ago by typing text into a text editor, I don't even use a GUI or IDE or anything. The newest thing I'm using is Rust since the library I needed wasn't available in C or C++. I have mixed feelings about this Rust language.
>>
>>109554707
you cant be real, anon
post screenshot of your work environment
>>
>>109554262
No default args on functions kinda forces you into it
>>
File: 1780584868624152.jpg (54 KB, 680x907)
54 KB JPG
>looked through beginning C++ game programming book at library for the hell of it
>I understood all the topics from beginning to end

I made it!
>>
>>109554894
>could have made a game, but didn't
>could have wrote a book, but didn't
i have some bad news, anon
>>
File: file.png (95 KB, 1358x559)
95 KB PNG
This is the reason I keep making the big bucks. C++ continues to filter indians.
>>
>>109554911
Already working on a game. Just funny that there was a time, all the topics in a game programming book were advanced to me. But now it and C++ are just mundane now years later.
>>
>>109554913
How many times have I copied code out of the C# standard library and pasted it in my C++ project I can't even remember
>>
>>109546620
maids back! hi maids! rewriting my shitty hyprland config into lua because theyll phase it out this year and considering if i should just switch window managers
>>
File: 2026-08-14_14h46m20s.png (1.29 MB, 1120x991)
1.29 MB PNG
>>109554722
It's not particularly interesting. I type the code in vim then I "alt+tab" to another terminal and type the commands to compile, run, debug etc. The colors are bad because I'm working inside a VM where I haven't bothered configuring my color scheme.
>>
>>109555297
ah.
>syntax highlight
isnt it something that would make your text editor be considered ide-ish?
when i think of a text editor im thinking nano, or notepad
>>
>>109555441
I consider something an IDE when it integrates tools like for debugging, profiling, code completion and showing hints about the function signatures etc. I think even nano has syntax highlighting though.
>>
>>109555494
ok. definitions, i guess.
esp; with something like vim, known for its extensibility, straddling the limit bw ide and text editor
>>
>>109554639
probably space leaks or infinite recursion anon
>>
>AI just brute force invented a hashing algorithm that gives hash collisions for a hash function that I do not even have the source code for by just giving it a single example
ok, NOW it's over
>>
>>109555982
its probably a common hash algorithm it identified by the case with known flaws
>>
>>109552679
Does matter. My hate gives me strength.
>>
I had to use AI to show me an example of how something works. How do I write it in my own logic flow and code?
>>
>>109556188
Go ask your LLM.
>>
What's the difference between human code and AI code? Do detection software just see a pattern that's generated by AI and go with that as the basis for it being AI generated? What if my code is similar to AI generated code?
>>
>>109556665
Because I'm literally watching the LWT episode right now:
>the algorithm found two factors to be most indicative of job performance ... name was Jared ... [and] high school lacrosse

Like, what do you not understand about hallucinations?
>>
>>109550062

had sneakers to move around at age of 29
dont hate the player hate the game
>>
>>109556665
usually commits are a dead giveaway.
>>
Age related loss of programming ability?
As I've gotten older sure I have more experience but I am finding I can hold less information in my head at once and my vision is deteriorating.
In an interview with Japanese programmers they said programming has a life of 30 years and then your mind is just too far gone to continue.
>>
>>109556665
/*
*
* Increases the variable by 1.
*
*/
i--;
>>
>>109558540
uint1_t
>>
File: 1772027956224604.png (73 KB, 674x707)
73 KB PNG
????
>>
>>109558707
i could have answered
but this is the maid trany version of dpt
so i wont
this thread has been marked as trash-thread
bc of maids
bc "meids" are actually pedos
and good fukkrn riddance
>inb4
the chief maid's name was eli.
do the maths.
>>
btw
>nuh off topig
im just repeating what a jany told me

even the janies hate """"maids""""
maids are to be sacrificed to kek.
and this is what it is
>>
>>109558747
it's a cartoon character
you could just talk about programming
>>
>>109558774
id rather get 3db
fuck maid-threads

honestly, theyre cancer

id rather say lore than contribute to this perversion
>>
>>109558774
its not like i cant say valuable shit
but maids are just persona non grata

make a proper dpt thread
>>
>>109558810
>c programmer
my condolences, boomerism is terminal
>>
>>109558817
anon,
if you want inna gpus
its either c or a complete mindfuck called spir-v

c is legit the sane option, here
>>
>>109558837
rust works
>>
>>109558817
*opencl C actually
ill publish a thin-ish lib so you all can do opencl w/o having to deal with the bullshit, soon
im stress teting it rn
i dont want to peddle deficient shit

im working on it
slowly, but i do
>>
>>109558848
not on gpus
bc its a trannylang
eternally filtered and such

why did you even bring that up?
im not even in the mood to bash you crabs
>>
>>109558848
Rust is godly.
>>
>>109558432
Funny.
Every time I've had to deal with Japanese they were absolutely fucking shit. I STILL remember having to argue directly with a programmer for a popular printer company that their fucking protocol didn't fucking work, and we probably could've gotten them on false advertising charges or whatever.
>>
>>109559112
>group cope therapy
rust is a fuck in the ass
this may or may not be what one is looking for,
depend on one's inclination in thigs
>>
>>109559136
Cschizo.
>>
>>109559144
>cschizo does wtf ever he wants
drink ayahuasca
if you dont end up in a mental asylum, you will undrerstand

move fast, brak things, innit?
>>
>>109559144
>>109559157
actually
ayahuasca chooses you, if youre ready
you'll vomit it up otherwise
and thats ok
its pretty damn hardcore
you can easily fuck your brain up with that shit

also follow instructions. youre not supposed to eat meat or diary for 3 days bf drinking the stuff
dint be a joker, people died bc they didnt take this shit seriously
its not a joke, its a rite of passage
dont be a fucking retard
you can legit fukken die
>>
>>109559216
Man, and they call ME schizo.
>>
>>109559117
really?
I assumed the japs were the best in the world.
>>
>>109559225
its bc people dont have a true realization of the stuff thats out there
ayahuasca removes the natural limits you have in your brain
but theure there for a reason

after my trip i felt like after a huge fucking fight for a week
legit, braoin damage-light
and thats because you remove the limits of your brain
which is the exact danger
the limits exist for a reason
if you go too far beyond youll start wrecking shit

ayahuasca is legit dangerous
dont fukken trifle with it
do salvia before
if you handle it, maaaybe ayahuasca is ok for you.

also culturally- salvia is a white mans drug
>>
File: greenhill.png (1.57 MB, 2560x1920)
1.57 MB PNG
>>109559243
You should RE some of their shit.
TCRF has an entire collection of retarded shit from them.
>>
>>109559225
>>109559273
to drive the point home:
i will NOT take ayahuasca again
not bc the trip was bad
but bc its something legit dangerous, and one should treat it with due respect

its legit a rite of passage
i passed the test, but thats bc i was ready, bc i readied for my whole life, actually
>>
still fukken felt like a mild concussion for a week
because being limit-less is too attractive
but i felt im burning neurons and i stepped back

i think this is the key point:
know that you can, but deliberately choose to pull back
because youre burning your brain up

if youre american, youll surely see demons though
best do it with tribesmen so they can guide you, or pull you back if needed
>>
>>109559225
>>
>>109559344
it is what it is.
and you didnt hear shit yet

did i mention i want to capture souls in machines?
bc i do...

or rather:
to simulate a body with a machine to invite a soul to inhabit it

did i mention im also a reiki practicionner?
bc i am, even if i tend to forget it

but i do c mostly
and its only when im drunk that i let go of the mask, dw
usually youre gonna hear me bashing crabs
>>
>>109558707
This is just a stack.
>>
>>109559413
explain
>>
If you don't use Rust you're not a real programmer.
>>
I hope every thread from now on is a maid thread to make that guy leave

>>109558432
I saw sean barrett (stb libs guy) recently say that he feels like he's only gotten better with age
>>
File: IMG_1586.jpg (78 KB, 728x1070)
78 KB JPG
Maid thread?
>>
>>109559586
If you use Rust you're not a real woman
>>
File: JS promises.png (348 KB, 612x810)
348 KB PNG
>>109546620
nothing i gave up
>>
>>109559824
But you will be.
>>
File: REDDIT USER.png (251 KB, 1444x912)
251 KB PNG
He's having trouble understanding the concept of ownership. Can you explain it to him, anon?
>>
>>109560376
yes the government owns everything and you own nothing
>>
I have written zero code today.
>>
>>109561191
Because you are reading, right? Right?
>>
About 10 years ago I started taking random classes at a CC without a degree in mind, just taking stuff that sounded interesting. I took an Intro to C++ class first and now it appears I am 4 classes away from a degree in CS and Psychology so I signed up for the degree program because why not? Since its been 10 years I decided to retake the Intro class but they won't even let me audit it and instead put me into the 200-level C++ class so I now have 3 weeks to relearn it. I did take a Python class last year and I know while they are different languages and one is compiled and the other interpreted many share a common structure.

So besides the obvious entry level shit like input/output, true/false, while/for and if/then stuff what else should I learn to be at least 50% ready for a 200-level C++ class?
>>
>C++
Imagine wasting 10 years of your life on this.
>>
>>109564253
Its not a waste for me, I got a BSc in Engineering in 2013. This was one or two night classes after work for fun, over 10 years which have accumulated enough credits for me to be able to get two Associates in Psych and CS. Of course I'm going to do that if it adds even a little something to my CV. I don't plan on doing programming for work at all, which is why I am asking here and not going to some crazy boot camp.
>>
>>109564253
Yeah making these dumb rants about shit no one cares about does seem like a pretty huge waste of your life.
>>
>no one cares about
Oh, people do. But since autists have never been people to begin with ...
>even if they constantly lying about it
>which is exactly why they should be treated the same as psychopaths

>Its not a waste for me
Now that's just cope.
>>
Rewrite the C standard library in Rust.
>>
>>109564205
go get a copy of the syllabus of the relevant classes, fucktard. why are you asking us?
>>
File: IMG_0110.jpg (48 KB, 736x736)
48 KB JPG
The syllabus touched my penis.
>>
>>109565041
now you have syllaphus
>>
I'm a code runner and I like codegrams.
>>
Reverse a string in your language of choice.
>>
>>109566348
reverse

>inb4 unicode
>>
>>109566348
s.reversed()
>>
>>>/x/42826405
([`Chain[else]`]).else(Puppetry::initiate)
>>
File: 1755908569659632.png (165 KB, 2706x1112)
165 KB PNG
I've compiled my first rust program
>>
>>109566348
lists:reverse(YourString)
>>
>>109567083
grats. you're now a tranny
>>
File: 1764310767441430.png (243 KB, 2476x1110)
243 KB PNG
dude what the fuck writing rust is so painful holy shit!!!!! why the fuck do 32 bit ints silently overflow to 0 instead of giving me an overflow exception???? and why the fuck do I have to mark everything as being borrowed when im looping over an array??? it took me 3 minutes to figure out how to get the length of an array as a NUMBER instead of whatever usize is
>>
>>109567148
>why do 32 bit ints overflow to 0
why wouldn't they
>>
File: 1775887575782648.png (134 KB, 1815x839)
134 KB PNG
>>109567162
because in swift an int overflow fails loudly, unless you explicitly silence it
num1 += num2 //error when overflows
num1 &+= num2 //silently overflows
>>
>>109567274
yeah well maybe swift is wrong and also gay
did you think about that?
>>
>>109567083
What does the exclamation mark after the function name do?
>>
>>109567773
in rust println is a macro and not a function
>>
>>109555297
Anon, you can open a terminal as a buffer in vim. (See :help Terminal-mode)
To open the terminal
> :term <CR>
To open the terminal in a new tab
> :tab term
Once you're in a terminal buffer, press i to enter terminal mode. Unlike insert, you exit terminal mode by pressing the following keys.
> <leader><Ctrl-n>
Leader is <Ctrl-\> by default.

Then ctrl+pg down/up (I think) to change tabs

Super convenient.

You can also press ctrl+z to send a job to the background in bash. Then you could do your build there & then type fg to bring the background job (vim) back
>>
File: crazymonkeyproblem.jpg (107 KB, 1251x747)
107 KB JPG
Not mathematically exact but fast:
function f(n) {
let o = new Float64Array(n + 1);
let a = new Float64Array(n + 1);
let c = 0, d = 2**-499;
o[0] = 1;
for (let b = 1; b <= n; ++b, ++c) {
a[0] = o[0] + o[1];
for (let i = 1; i < b; ++i)
a[i] = o[i - 1] + o[i + 1];
a[b] = o[b - 1];
if (c == 499) {
for (let i = 0; i <= b; ++i) a[i] *= d;
c = 0;
}
[a, o] = [o, a];
}
let s = 0;
for (let i = 0; i <= n; ++i) s += o[i] * i;
return s * 2**-c;
}
>>
I'm trying to build a specific feature for my web app but I can't find any examples for what I need. I am looking at the official documentation website but I don't what I need to to build what I want. What should I do without using AI?
>>
Holy frick, Haskell's design is a Godsend. Name person is so much easier to parse than person.name.
>>
>>109568599
Dubs confirm.
>>
File: IMG_1602.png (6 KB, 605x483)
6 KB PNG
Should structs within structs be managed by reference or be packed inside a single large struct?
>>
>>109568599
People working for Haskell corps are used to OOP and push for:
OverloadedRecordDot (using it)
OverloadedRecordUpdate (finally implementing it [never ever])
Also the design is old, ML can do: #name person
And accessors being functions is a fuckup.
Can't be duplicated.
And not making records uniconstructor allows you to do:
data T = T1 { a :: Int } | T2 { b :: Int }
b (T1 0)
which blows up (ML doesn't let you do this).
There are papers for extensible record implementations that never materialized.
>>
>>109568669
You know that the answer is "it depends".
Why are you asking such dumb questions.
>>
>spent like 60% of my time in tonight's leetcode contest trying to solve q4 because it looked doable
>kept TLE'ing
>I was trying recursion
>it's bitmask dp
:(
>>
I need more cute maids in my life.
>>
File: IMG_0661.jpg (59 KB, 961x785)
59 KB JPG
My recursive function needs updating but I want to go to sleep.
>>
>>109569123 (Me)
I stayed up and fixed my recursive function. I’m so proud of myself.
>>
there is literally never a good reason to write a recursive function
>>
>>109569345
Python agrees with you.
>>
File: 1769030976059036.png (34 KB, 734x262)
34 KB PNG
>>109569123
>>
>>109569123
is that Sabine Hossenfelder?
>>
File: 1778087248444111.png (303 KB, 512x512)
303 KB PNG
holy shit rust has a macro for initializing an array

//Swift
var grid = Array(repeating: Array(repeating: 0, count: cols), count: rows)

//Rust
let mut grid = vec![vec![0; cols]; rows];
>>
>>109569468
I love Rust.
>>
Best C# tutorial out there?
>>
>>109569486
yeah until you come across shit like this:
for n in nums { } //deallocates nums afterwards
for n in &nums { } //does not deallocate
>>
>>109569557
That actually makes sense because if you're borrowing you don't want to deallocate before returning.
>>
>>109568485
You have to shit yourself.
>>
>>109569581
it's a struct. the reference lives on the stack. every other language just keeps it alive until it goes out of scope.
for some fucking reason rust "transfers the ownership" of the array to the iterator, then the iterator transfers ownership of each item to whatever your code is doing, and then fucking nukes the array.
like what?

also
//swift
let maxVal = nums.max()!
//rust
let maxVal = nums.iter().max().unwrap();
>>
>>109546941
In mine, it's
fn puti(n) {
if(ge(n, 10)) {
puti(div(n, 10));
}
writech(add(48, mod(n, 10)))
}

puti(12345);


I didn't implement infix operations yet, that's coming in a different phase.
>>
>>109558837
You can do gpu programming in literally anything. You have to have brain problems to think it's just c, specifically if you know spir-v exists. It's like saying the only way to program for cpu is c or assembly.
>>
>>109559243
They're some of the worst. Not the worst but they're terrible.
>>
>>109564253
>nt
dropped
>>
>implying other systems are substantially better
Holy.
>>
>>109569330
Mom's gonna freak!
>>
>>109569468
In C, this is just
int grid[cols][rows] = {};
>>
>>109570502
>stack
>>
>>109569710
>it's a struct. the reference lives on the stack. every other language just keeps it alive until it goes out of scope.
and this is ok because its mentally easier to work with uniform rules i.e. there's no need to change behaviour based on underlying type
max -> Option is also good since it can catch bugs with 0 array size
I've worked as programmer (arch/lead/whatever) for like 16 years and using rust is so much better than any lang when you're building something more complex than crud api
>>
>>109570597
use Haskell
>>
>>109570628
not applicable to determenistic realtime high perf/latency work i do
>>
>>109570597
Why not use C++? Not saying you're wrong but I want to know where you think it falls short.
>>
>>109558872
>not on gpus
https://github.com/rust-gpu/rust-gpu
https://github.com/rust-gpu/rust-cuda
https://www.vectorware.com/
>>
my concurrent queue, or rather a distributed M:N jobs system than a queue, is approaching a stable state
the short of it is:
im clobbering Disruptor (at least a C++ port I pulled) WorkerPool in all dimensions. moodycamel pushes a lot more items per second but has worse tail latency, and while ill need to borrow a bigger CPU im pretty sure i scale better with increasing consumers

however unlike Disruptor and moodycamel, i support variable payload types and truly wait-free (non-CAS) publishing for the entire thread pool
>>
>>109569765
Why the js syntax?
>>
>>109573098
It's modified opendylan syntax, not js syntax. The main differences are: {} instead of begin/end, fn instead of "define function", and reduce dependency on ; to determine end of clause. Just a matter of taste.
>>
Which one?
myarray[0 3]
myarray = array 0 3
>>
>>109564253
I can never ever understand the person that would rant about this.
They are like Ayyliens from Mars or maybe Ganymede.
>>
How appropriate, there are countless descriptions of autists perceiving normal people to appear like ayyliens.
The shit a broken brain does to you.
>>
File: eat ze bug.jpg (56 KB, 680x510)
56 KB JPG
>>109569581
> borrowing
Trash language created for wage slaves, always borrowing and never owning anything.
>>
>>109573773
Rust has plenty of ownership, idiot.
>>
>>109570517
In C++ is just:
std::vector<int> v(rows * cols);

You are free to access the data as you want with multidimensional span:
auto m = std::mdspan(v.data(), rows, cols);
>>
Me playing with my language. All I have left to implement are arrays.
glo _puti = (\n = 
| n != 0 = (
@_puti n / 10
putc 48 + n % 10
) _
)

glo puti = (\n =
| n == 0 = putc 48
| n < 0 = (
putc 45
@_puti @neg n
)
| _ = @_puti n
)

glo neg = (\n = 0 - n)

glo ln = (\=
putc 10
)

glo putiln = (\n =
@puti n
@ln
)

glo putn = (\n =
putc a n
@putiln c b n
)

s = {a = 65 b = {c = 66 d = {e = 67}}}

| (e d b s) != 67 = @ln _

@putn s
@putiln 0
@putiln @neg 5
>>
File: pepone.gif (364 KB, 112x112)
364 KB GIF
>>109573833
Rust, not you.
>>
>>109573850
Cute, but I don't care.
>>
>>109573870
You do not deserve nice things.
>>
Since when is Rust a nice thing?
>>
>>109573773
>borrow's women's identity
>deletes penis
>>
Discovered Typst had an sqlite library. Spent a few hours past my normal sleeping time dicking around with it. Made a balance statement generator for the three people who owe me money. Lamented the fact that the library doesn't support prepared statements. Therefore, if I wanted to shove this on a network, I'd need to handle a shit ton of sanitization just to prevent an injection.

Is a little
SELECT id FROM Accounts WHERE name=?

too much to ask for?
>>
>>109546941
Now do floats
>>
>>109574674
>Lamented the fact that the library doesn't support prepared statements
It's in the same process as your code. IT DOESN'T NEED TO. (You can cache the compiled statement if you want, as long as you're not altering the indices significantly.)
>>
>>109574674
Prepared statements are automatic in all modern systems.
>>
>>109574806
Sqlite queries in Typst can only be constructed by concatenating strings. There is no prepared statement interface to the underlying plugin.
>>
>>109572976
and i asked deepseek v4 to optimize my shit and with some perf calls and a few inlines, unnecessary test suite overhead reduced, and a couple redundant atomic RMWs culled from the hot consumer path my thing is plenty competitive with moodycamel (no-tokens, w/ tokens is more apples-oranges comparison) in raw items/sec
>>
File: 1770467967408417.jpg (83 KB, 1024x1022)
83 KB JPG
>no inheritance in rust
>instead you have "composition" (basically inheritance with extra steps)
????????
>>
File: 1778302855034856.gif (2.8 MB, 453x498)
2.8 MB GIF
>>109575563
>try to index an array
>STOP
>YOU CAN'T DO THAT
>YOU HAVEN'T CAST i32 to usize YET
>>
>>109575563
There is trait inheritance though.
>>109575761
Indexing is a function call at the language level, and it accepts a usize, not an i32.
>>
>>109575761
Not doing implicit conversions is among the best features of the language.
I take small annoyances while writing over endless frustration while debugging.
>>
>>109575563
"is a" vs "has a"
most people are too retarded to be trusted to use inheritance properly, so forcing people to use composition generally leads to more maintainable code
>>
Rust is awesome.
>>
I'm getting tired of debugging.
>>
>>109576160
better call sol
>>
>>109576160
I SUCCESSFULLY DEBUGGED IT
>>
What does obfuscated Haskell look like?
>>
this type autism has to go. i can't do it any more. please.
>>
>>109574853
>Sqlite queries in Typst can only be constructed by concatenating strings.
But maintaining a cache (some sort of map from the SQL string) would be possible. As long as they're not so retarded as to require string substitution of query parameters.
But... well, they can make their own mistakes I guess.
>>
I love Rust pattern matching.
>>
>>109576822
two days into learning rust and I want to shoot myself
>>
I'm finished, I'm done. I'm not typing any more type bullshit in again. Figure it the fuck out. Why do I have to tell the computer this every step of the way in 2026 and more importantly, why do so many programmers like doing it?
>>
>>109576853
We like to watch you suffer.
>>
>>109569765
Does it use inferred typing?
>>
>>109576853
You need more inferred typed languages.
>>
I love inferred typing.
>>
File: IMG_1628.jpg (34 KB, 640x480)
34 KB JPG
Rust is inevitable.
>>
File: 1768862316911790.png (144 KB, 2293x827)
144 KB PNG
>>109576983
>every function is isolated
>even if it's inside the scope of another function
writing rust is like scratching your nails on concrete
>>
>>109577005
Good. Rust doesn't need JavaScript autism.
>>
Rust is the most autistic, reality-removed language out there though. It needs all the autism it can get.
>>
>>109577021
Rust is fine. Its compiler forces programmers to adhere to reality instead of UB.
>>
Reality cares about raw pages, SIMD instructions, out-of-order execution. It doesn't care about ownerships or borrowing. Those are head-padding for literal autists who refuse to stop throwing themselves into the wall.
>>
>>109577047
The head padding is much comfier than a dozen debugging tools. And most of the things you mentioned relate to speed which Rust has plenty of.
>>
>>109577005
i'm slowly requiring less help from claude to make my shit compile!
impl Solution {
pub fn stone_game_v(stone_value: Vec<i32>) -> i32 {
let mut pref = vec![0; 1]; let mut run = 0;
for s in stone_value.iter() { run += s; pref.push(run); }

let n = stone_value.len();
let mut memo = vec![vec![-1; n]; n];
return Self::dp(&pref, &mut memo, 0, n - 1);
}

fn dp(pref: &Vec<i32>, memo: &mut Vec<Vec<i32>>, i: usize, j: usize) -> i32 {
if j <= i { return 0 }
if memo[i][j] != -1 { return memo[i][j] }

let mut best = 0;
for k in i..j {
let split_left = pref[k + 1] - pref[i];
let split_right = pref[j + 1] - pref[k + 1];

if split_left == split_right {
let best_split = Self::dp(pref, memo, i, k).max(Self::dp(pref, memo, k + 1, j));
best = best.max(split_left + best_split);
}
else if split_left < split_right {
best = best.max(split_left + Self::dp(pref, memo, i, k));
}
else {
best = best.max(split_right + Self::dp(pref, memo, k + 1, j));
}
}

memo[i][j] = best;
return best;
}
}
>>
The Rustlings are making the borrow checker more lenient soon.
>>
>>109577047
>out-of-order execution
Bloat.
>>
>>109577060
>comfier
has nothing to do with making good responsive software
>>
>>109577096
it should be able to infer at compile time whether something gets mutated or only read (like literally every other language) and assign the correct reference instead of having to mark it yourself every single time
>>
>comfier
Yeah, as I said, autism. Now accept your fate.
>>
File: dust_allocations.png (24 KB, 311x634)
24 KB PNG
Also
>Rust has plenty of speed
Whatever you say, autist.
>>
>>109577128
So everything should be kept on the stack?
>>
>>109577154
No.
>>
Everything should be kept in registers. If your program has more than 8 variables that’s a problem.
>>
I think I might finally have a bootstrappable language. I’ll find out.
>>
>>109577277
Dubs confirm.
>>
So who was that motherfucker who claimed that allocators don't store the size of the allocation right before an allocation block?
https://godbolt.org/z/36cKv9bov
>>
>>109577373
Every C compiler needs that or else realloc won't work. Whoever said that is a dumbtard.
>>
File: IMG_9704.png (1.31 MB, 1000x1126)
1.31 MB PNG
Realloc didn't touch my penis.
>>
>>109577404
The bitch claimed allocators have some sort of directory to look that shit up, which was also supposed to the be the reason for free_sized.
>>
>>109577414
... are you autistic, retarded, drunk, or a mixture of all three?
>>
>>109577429
Are you?
>>
I'm so glad I never have to use C again.
>>
>>109577437
No, I don't post garbage like you.
Now you.
>>
File: IMG_1407.gif (86 KB, 640x358)
86 KB GIF
>>109577468
>t. psychopathic jew that can't stand cute anime girls
>>
File: 1767296459085102.png (193 KB, 450x418)
193 KB PNG
>reverse linked list
>in rust
>>
>muh jews
OK, autistic.
>>
>>109577488
t. Obvious jew
>>
>muh obvious jews
Whatever you say, autist.
>>
>>109577487
The Lisp way doesn't work in Rust?
>>
File: 1597561699112.png (1.87 MB, 2048x1614)
1.87 MB PNG
>>109577511
Heck if I know.
>>
>whatever you say, autist
whatever you say, jew
>>
File: gm.jpg (27 KB, 500x400)
27 KB JPG
>>109573951
I deserve far more than what this world has to offer, now and forever.
>>
>>109552692
>>
When will the anime hating jews leave?
>>
>>109577569
That doesn't include nice things.
>>
Why would I ever stop making autists feel uncomfortable?
>>109573951
>>
>>109577487
1. Singly linked list or doubly linked list?
2. If doubly linked, will the std::collections LinkedList type do, or does it need to be on some custom linked list (e.g. you have a linked list you have made as part of a custom allocator)?
3. Are we reversing in-place or are we constructing a new list?
4. If we are reversing in-place, is it necessary to avoid additional allocations (i.e. must we swap all the pointers around)?
>>
>>109573858
Could you explain the syntax?
>>
>>109577197
>If your program has more than 8 variables that’s a problem.
x86 problems.
>>
>>109577625
I honestly wouldn't bother.
>no PBCD conversion for his integer printout
>>
>>109577511
>The Lisp way doesn't work in Rust?
Reverse or nreverse?
>>
>>109577625
Sure, glo means global. The \ starts a lambda. @ applies a lambda. | are guards (conditional statements.) Curly braces create an anonymous record. Record fields are accessed by putting the field name before the record eg fieldname record.
>>
>>109577638
I'm living the arm64 life.
>>
>>109577647
The manual recursive version.
>>
>>109577647
This one
myReverse :: [a] -> [a]
myReverse [] = []
myReverse (x:xs) = myReverse xs ++ [x]
>>
Whenever I say yes you just say no. Whenever you say stop I start to go.
>>
>>109576885
At the moment it is typeless, like asm or forth. I haven't yet decided if I want to port my hindley-milner code or if I'll do more ordinary typing. The problem with HM is that it tends to devolve into type-soup madness in real programs, while the problem with ordinary typing is the extra overhead in small programs of writing types for things that are trivially obvious. Rust's approach of function-only typing doesn't solve the HM type soup issue, so that's not something I'm considering.
>>
File: file.png (5 KB, 153x153)
5 KB PNG
>>109576983
Not so fast.
>>
>>109577744
I just do global inferred typing like Haskell, TypeScript, and Crystal. It's so nice I can't live without it.
>>
>>109577744
>At the moment it is typeless, like asm
Da fuck.
>>
>>109577744
I made a completely typeless language once. It's fun until you need a struct. I get the same fun from global inferred typing though.
>>
>>109577814
There is no problem with having structs in typeless languages though. Again, it's the same idea as in forth, so declaring a struct creates functions that build the right constructs. The "type" is just the order and size of elements in memory, that's all there is to it. Then you have accessors through the same synthesis process and you have typeless structs.
>>
>>109577833
Neat but now that I know how to do global inferred typing I'm keeping it instead of making another typeless language. I'm keeping the guardrails up.
>>
>>109577749
What's so great about that?
>>
>>109577853
More power to you. Like I said, this always defers into type soup madness in larger programs, so I don't like it. But for small programs it's great for sure.
>>
>>109577943
AI forbidden.
Trannies scared.
People who use it are called ziggers.
Soon llvm will be removed, getting rid of more tranny cancer.

Otherwise, despite some syntax warts, it's a good lower level language with higher level facilities, without bdsm retardation. It also has cool features like non-colored functions asynchronous execution.
>>
>>109577973
Does it have very little ub?
>>
File: 1771991778934959.png (139 KB, 818x1018)
139 KB PNG
>>109577749
>>
>>109577964
I was thinking of making a language that requires type definitions for functions like Rust and proper Haskell. However, that gets old real fast even if better for larger programs. Maybe there's a nice middle ground somewhere.
>>
>>109577973
That is such autism-speak.
>>
>>109577989
Ok today was world first that I looked at the zig documentation. Zig has this:
> @as(u8, 1) <<| 8 == 255
> But zig doesn't have arithmetic right shift
What the fuck did they mean by that? Are they brainlet retarded? If you get fance with bitshifts, then also implement arithmetic shift, nigger. What the fuck is wrong with people?
>>
>>109577989
>no new releases since may
>3200+ open issues
>5000+ open pull requests
they have unlimited tokens to do completely autonomous (this is what they claim they do) and this is the end result
>>
>>109577749
>what makes it so great?
>it's better than C
oh wow
>>
>>109577712
go go go
>>
>>109577988
https://ziglang.org/documentation/0.1.1/#undefined-behavior
>Undefined Behavior
>Zig has many instances of undefined behavior. If undefined behavior is detected at compile-time, Zig emits an error. Most undefined behavior that cannot be detected at compile-time can be detected at runtime. In these cases, Zig has safety checks. Safety checks can be disabled on a per-block basis with @setDebugSafety. The ReleaseFast build mode disables all safety checks in order to facilitate optimizations.
>>
>>109578085
Sounds like Rust.
>>
>>109578013
Yes, I think the ideal type system hasn't yet been found. I think full global type inference, or alternatively gradual typing (but I prefer the former), are much nicer than local (like in rust) for a variety of reasons. Personally my plan is to experiment with it within the basic framework of typeless. The way my PL works, I can rewrite any part (including adding compile-time type inference or type errors, etc.) simply by importing another file, so it's easy enough to experiment this way.
>>
>>109578090
The cool thing about Zig is that it has 99% of the benefits of rust, without the BDSM trannyshit. Convenience without contortions.
>>
File: 1780731953307025.gif (18 KB, 220x208)
18 KB GIF
>>109577989
>when the rust rewrite literally doubles your project's LoC count
>>
Redpill me on affine types.
>>
>>109578149
Autists don't give a shit about that.
In their retarded, subhuman minds it's all about
>muh scary memory vulnerabilities
and
>comfiness

We really have to eradicate the autistic race.
>>
>>109577079
Don't know why but Rust syntax scratches some weird autistic itch. Looks like hell at first glance but it's damn explicit.
>>
>>109577989
>Bun
Why should I use this atrocity instead of php?
>>
File: 1783638044970636.png (190 KB, 1485x1130)
190 KB PNG
swift my beloved
now to do this in rust :*
>>
>>109577692
anon please use an accumulator
>>
>>109578159
It's the other way around, retard. I'm autistic (diagnosed), and my brain throws a fit at complexity. I'm obsessed with simplicity and doing more with less, to a fault.
>>
>>109576983
Rust is fine but they really need to put someone sane in charge of Cargo—it has to be one of the shittiest "build systems" I have ever used.
>>
>>109578241
>I'm autistic (diagnosed)
we know
>>
ok lets take a quick nap before coding. I already feel overwhelmed again from not being able to decide what to do
>>
coroutines in C feel really good, man
>>
>>109578256
How do we combat this? I've had so many projects die to this kind of paralysis.
>>
>muh simplicity
Yes, we know, autist. And that's a bad thing, but for reasons your retarded, compromised brain will NEVER understand.

Just know that your betters will take care of you.
>>
>>109578265
Use AI—AI can think for you.
>>
>—
>>
File: 1776215140027265.png (84 KB, 983x1059)
84 KB PNG
>>109578199
getting a little less painful
>>
>>109578265
Write a comment about something, just throw some text on the screen and let it snowball from there. It's the same with drawing, a circle is already so much more into it than the empty paper.

A series of smallest possible steps.
>>
>write program for myself
>other people I know see me using it and want a copy
>project name is based on a slur for my people since I didn't think anyone else would ever want to use it
jej
>>
>>109556030
>it's probably just that
Nigger, you would not be able to do this if you committed your whole life to this task.
>>
File: purple-lifes.jpg (89 KB, 976x549)
89 KB JPG
>>109578313
Thanks for the reminder. I will continue working on building my own AI.
But I started doing it in Go. Technically I could restart and do it in Rust to learn more rust. Hmmm....
>>
>>109578344
I think for me it's more about accepting mistakes (as in, a borked API that doesn't work as well as it should), than problems with getting moving. I feel that as I've learned more about my craft and made more mistakes, instead of feeling emboldened to explore further and make more, I've just kinda retracted into my she'll afraid to move.

I really like programming, but I'm really bad at it, I suppose. Yours is still a nice suggestion, I'll try that.
>>
File: balance_statement_program.png (668 KB, 1970x3538)
668 KB PNG
Source code for >>109574674

Was it necessary for me to write this? No. Did it end up being a fun little SQL and Typst exercise? Yes.
>>
>>109578241
Nobody knows what autism is or does, and there's a resident autist who keeps posting buzzwords about his bizarre obsessive ideas about what autists are even after being proven wrong several threads in a row. It's not worth responding.
>>
>even after being proven
I love how autists like you literally cannot stop lying. It's like it's encoded into your very brains.
>>
>>109579048
Not really. The only thing we know is that autistic brains look different. But only in comparison. You couldn't spot an autist by only looking at the brain
>>
Yes really, autistic liar.
>>
File: file.png (206 KB, 2994x1384)
206 KB PNG
>+10 years of service
>no limits other thank country blacklist and american laws
what's the catch?
>>
I hate header files
>>
>muh header files
Literal skill literal issue.
>>
>>109579354
header files are not difficult, they are just a time waster
>>
>>109579354
it's not even a skill issue. It's just retards and soys complaining about something that for sure will not change in the near future.
Decisions have been made. Either deal with it or use a different language
>>
>>109579378
Oh, you are right. They are a time waster, if you don't understand how they work. Because then suddenly your compile times explode. Fucking brainlets man
>>
>>109579389
they are a time waster because they are nothing but completely redundant, unnecessary information that exists only so that the compiler only has to make 1 pass. nonsense busywork
>>
>>109579413
>they are nothing but completely redundant, unnecessary information that exists only so that the compiler only has to make 1 pass.
Retard take.
>>
>>109579354
complaining about header files is same as saying the problem with Go is the
if err != nil
pattern. very surface level "issues" and not usually worth commenting on even.

I like header files, it's a good way to look at the API of a program.
>>
>>109579437
it's a factual take. faggot

maybe if the year is 1970 and you're a pioneer and the hardware constraints and your limited knowledge make it a necessity, I understand. but in [current year] it's just not solving the problem and offloading it onto the programmer
>>
Nah, it's a retard take no discussion.
>>
>>109579472
I accept your concession. Cope and sneethe.
>>
>lying autist lying again about concessions
Another Tuesday.
>>
>>109579497
you lost
>>
>>109579497
>>
>>109579456
>maybe if the year is 1970 and you're a pioneer and the hardware constraints and your limited knowledge make it a necessity, I understand. but in [current year] it's just not solving the problem and offloading it onto the programmer
Yes, but why do you fucking nigger fuck retards still complain?
You obviously know why it's there. Why it was created. So just shut the fuck up? It's not going anywhere, faggot
>>
>>109579609
Don't try to argue with their ilk. Just call them autists to their face to remind them just how much outside of humanity they truly are, so that maybe they finally accept their fate and get suicided by 764.
>>
>>109579497
>Another Tuesday.
It's Friday.
>>
>>109579759
it's bedtime. gn
>>
>>109577989
Well la dee da.
>>
File: 1663220320036450.gif (688 KB, 286x310)
688 KB GIF
github is down
i keep getting rainbow unicorn
i can't do work
>>
>>109580486
It's a sign.
>>
>>109580646
all my colleagues are on vacation
am the only one trying to work right now
am feeling lonely



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.