← /g/

/dpt/ - Daily Programming Thread - We're so back! edition

New launches split creator fees 50% to the poster and 50% to the launcher. No tripcode is needed to launch; poster claims require verified ownership.

Anonymous12/01/26(Tue)02:49:47 No.110481580
1793506979053282
What are you working on, /g/?

Previous thread: >>110451013
Anonymous12/01/26(Tue)02:52:24 No.110481588
first for what the fuck is the point, I'm too retarded to learn anything and the rich get richer either way
Anonymous12/01/26(Tue)02:54:30 No.110481596
I was just writing a bit more assembly and realized that I have to refactor again.
Still trying to write something that could potentially look like an OS.
Did a few built-in commands with argc/argv style, but also essential commands like find file have that. So I need to separate this into actual ls command and finding a file to check if it exists and get the cluster number.

Actually OS dev is really easy, because you just do dumb things. But you have to be consistently doing dumb things. Don't get smart
Anonymous12/01/26(Tue)02:55:31 No.110481602
>>110481588
>I'm too retarded to learn anything
if your IQ is above 69 (or was it 59?), then you possibly can learn something
Anonymous12/01/26(Tue)02:59:46 No.110481616
>>110481580
>Putting edition in the name field
It's so over edition
Anonymous12/01/26(Tue)03:01:34 No.110481628
>>110481616
autism is back edition.
I have been in this shithole for over 10 years. Yet I am not the one with one gazillion stallman or anime pictures. I don't open threads. The faggots usually do.
Anonymous12/01/26(Tue)03:09:46 No.110481675
>>110481602
Last I checked 69 is the cutoff for being considered retarded enough to be disabled by the government.
Anonymous12/01/26(Tue)03:16:17 No.110481708
>>110481580
Dumb Go wrappers for some cli tools
Pretty comfy, my first time writing Go
Anonymous12/01/26(Tue)03:33:48 No.110481775
>>110481628
i barely have any because i keep losing all my files
Anonymous12/01/26(Tue)03:37:12 No.110481786
Is hoarding and locally saving older C and systems books to read a smart move in the era of AI?
Anonymous12/01/26(Tue)04:19:59 No.110482004
>>110481786
why would you ask this question? run us down on how things will go in your mind for that question to make sense
Anonymous12/01/26(Tue)05:02:42 No.110482198
>>110481616
>Putting edition in the name field
might want to see an optometrist
Anonymous12/01/26(Tue)07:11:13 No.110482779
>>110482198
What's your favorite MLP episode?
Anonymous12/01/26(Tue)11:15:25 No.110484306
IMG_20261201_171003_832
I makes sounds!!!
https://i.4cdn.org/wsg/1796141615001264.webm

Well that's a beginning.
On the one hand side I kinda want to learn how to implement a driver for that, on the other hand claude is calling me, because I just want to use it.
I'll try to implement it without AI. I can do it. Floppy can't be this hard. It's just a lil encoding this n that.
As soon as I can read blocks, I am done. THe fat12 stuff is already done in assembly
Anonymous12/01/26(Tue)11:48:25 No.110484553
>>110481616
That's what happens when you dont use AI
Anonymous12/01/26(Tue)13:25:01 No.110485350
min-atest
Python clone written in Go, it just got the break & continue statements.
Anonymous12/01/26(Tue)13:31:29 No.110485404
>>110482198
It's been this long since I've made a new thread I forgot it had a separate subject field
Anonymous12/01/26(Tue)13:54:57 No.110485655
>Using CUDA on Windows absolutely NEEDS a full Visual Studio install with zero workarounds
Complete bullshit.
If it works on Linux without this crap why do I need it here.
Anonymous12/01/26(Tue)14:15:19 No.110485839
>>110485655
You don't need it, but you want it. nVidia knows better than you what you want
Anonymous12/01/26(Tue)15:37:07 No.110486527
Question from a C++ newbie.
I'm currently reading "Principles and Practice Using C++". Is the use of streams with the << overload usually used? I just find it weird coming from C's printf.
Anonymous12/01/26(Tue)15:38:24 No.110486535
>>110486527
Yes, you shouldn't be using printf in sepples.
Anonymous12/01/26(Tue)15:41:31 No.110486562
Anonymous12/01/26(Tue)15:54:16 No.110486674
>>110481786
>Is hoarding and locally saving older C and systems books to read a smart move in the era of AI?
They're making books now with LLM content so if you want to avoid LLMslop you could get books before LLMs came out. Why would I pay for a book with LLM written content? I could just ask an LLM myself
Anonymous12/01/26(Tue)16:39:58 No.110487047
>>110485350
>this is sparta
Honestly based. I haven't heard that in a while. It reminds me of better days.
Anonymous12/01/26(Tue)17:15:15 No.110487314
char, short, int, float, double, long long
I've been learning about size of function
Anonymous12/01/26(Tue)17:17:52 No.110487330
advent of code time! today was very easy
Anonymous12/01/26(Tue)17:20:26 No.110487349
1760914600688864
>releasing your code under the least restrictive license because nobody is going to use it anyway
Anonymous12/01/26(Tue)18:20:10 No.110487850
images(1)
It's joever
Anonymous12/01/26(Tue)18:47:01 No.110488067
In C I want to make a parser that can accept a file stream or a string, but I'm not sure how to wrap both behaviors elegantly
Anonymous12/01/26(Tue)19:01:44 No.110488178
I'm writing a string library. I don't want to deal with c-style strings anymore. Next I may write some macros to eliminate off-by-one errors in dealing with for-loops.
Anonymous12/01/26(Tue)19:15:11 No.110488287
>>110488067
>>110488178
Lmao, C the language that trolls you.
Anonymous12/01/26(Tue)19:17:25 No.110488307
>>110488178
>I'm writing a string library. I don't want to deal with c-style strings anymore. Next I may write some macros to eliminate off-by-one errors in dealing with for-loops.
Next up: a macro that makes C strings safe by turning them into a length-tracked string type—and a spellchecker for “programming.”
Anonymous12/01/26(Tue)21:25:26 No.110489071
How do I be productive in Haskell?
Anonymous12/01/26(Tue)21:30:25 No.110489083
>>110481775
get online backup and local backup
Anonymous12/01/26(Tue)21:31:47 No.110489089
>>110486527
I think there’s a newer thing now but operator<< is the standard way to do it in C++98 — it’s type-safe and extensible, and printf is neither
Anonymous12/01/26(Tue)21:32:30 No.110489093
IMG_1818
The Haskell backup's off by one error touched my penis.
Anonymous12/01/26(Tue)21:35:10 No.110489103
>>110488178
what issue are you having with them? having to store or find lengths of arrays is more of a general c problem for sure though.
Anonymous12/01/26(Tue)21:43:31 No.110489150
>>110489093
I don't think that really happened
Anonymous12/01/26(Tue)21:45:44 No.110489163
>>110489071
Identify problems that Haskell is poorly suited to handle (like writing video games, like Carmack said) and don’t use Haskell for those problems
>>110488178
are you copying Go’s `struct { char *s; size_t len, cap; };` design or doing something wild
Anonymous12/01/26(Tue)23:01:58 No.110489594
>>110481580
Manual coding? That's a lost art
Anonymous12/01/26(Tue)23:42:17 No.110489836
haskell
>>110489093
Did you cum?
cum :: Num a => [a] -> [a]
cum = scanl1 (+)
Anonymous12/02/26(Wed)01:32:07 No.110490360
I have to admit, writing Rust FEELS great.
I am not sure yet if it's great, but it feels good. It feels safe ;-)
Anonymous12/02/26(Wed)02:25:01 No.110490576
space_shooter
After tests, Cosmos syntax is undergoing revision to better write video games. Write video games in the Cosmos programming language.
Anonymous12/02/26(Wed)04:11:10 No.110490937
1795960536290832
>>110489093
sometanias drown while others die of thirst.
Anonymous12/02/26(Wed)04:57:29 No.110491083
I know boomers that don’t understand how to use a smartphone or computer even though they are surrounded by them, can I learn some programming from nothing and learn enough so that I understand programming and ai enough that I’m not like boomers who are surrounded by tech they don’t understand?

I want to understand it and be able to manipulate it at least enough that I have some control.
Anonymous12/02/26(Wed)05:00:10 No.110491090
>>110481596
>and realized that I have to refactor again
This is basically continuous.
In my advice, always complete a feature before doing some refactoring, and then work on a new feature. Otherwise you'll make no progress at all.
Anonymous12/02/26(Wed)05:01:45 No.110491093
>>110481580
Take it slow, snailcat!
Anonymous12/02/26(Wed)05:27:13 No.110491191
programming is for ableist virgins
Anonymous12/02/26(Wed)05:39:55 No.110491243
>>110491191
You could have been a virgin, but you chose to get your dick wet.
Not my problem.
Anonymous12/02/26(Wed)05:46:11 No.110491270
>>110491090
True, but sadly I am not that smart.
At work I can usually get it done, because I have to. But when I am on my own, I am lost pretty fast
Anonymous12/02/26(Wed)07:17:58 No.110491579
>>110490360
Holy shit
>write generic fat12 interface in Rust like 2 months ago, back then only used for an sd card
>now implement that same fucking interface for floppy reads
>I can now read a floppy drive
Holy fucking shit. I love rust now. I will never go back to writing assembly in TempleOS, even tho that was more based
Anonymous12/02/26(Wed)07:20:24 No.110491589
>>110491083
pretty much all of the programming that I get done is done by Claude
and knowing how to program lets me verify that it’s not obviously retarded/misinterpreting even though I’m not good at the programming language in question
however this will miss subtle bugs
the question is what else would you do with your time that may or may not be more useful
Anonymous12/02/26(Wed)07:20:59 No.110491593
>>110491579
sweet
gratz
Anonymous12/02/26(Wed)07:23:05 No.110491605
today i learned that the very professional programmers at credit card companies have no checks for auto-pay transactions scheduled too close to manual payments, and your account can be double-charged!
Anonymous12/02/26(Wed)10:44:13 No.110492820
hq720
>>110491083
>I want to understand it
Whatcha readin fer?
Anonymous12/02/26(Wed)10:45:28 No.110492830
>>110491191
theres a certain irony on calling someone a virgin and complaining about ableism
Anonymous12/02/26(Wed)14:15:58 No.110494321
Has anyone in here ever written a document-owning rich text editor? Ive been working on this shit for like a month this has been the biggest fucking pain in the ass i've ever dealt with.
Anonymous12/02/26(Wed)14:20:35 No.110494360
how are you supposed to test shit that writes to databases?
Anonymous12/02/26(Wed)14:38:54 No.110494524
>>110494360
write mock interfaces, see if sensible data comes in, then test against a real database
Anonymous12/02/26(Wed)15:03:54 No.110494765
>start advent of code with sml
>sml standard library doesn't have sort or loop
Wtf even C has those, fucking functional fags...
s0ychan!!05ryGtqrSNJ12/02/26(Wed)16:14:20 No.110495413
>>110494360
It helps if you have a DB interface which works with SQLite, easy to spin up test databases
Anonymous12/02/26(Wed)16:25:41 No.110495478
>>110494321
>the biggest fucking pain in the ass i've ever dealt with
that's why we don't do that very often; there's a silly amount of detail to deal with because it's actually a complicated task
Anonymous12/02/26(Wed)16:56:47 No.110495715
>>110494360
spun-up test databases
you could do worse than to see how Rails does it
Anonymous12/02/26(Wed)17:23:08 No.110495925
>>110494360
integration tests
Anonymous12/02/26(Wed)18:19:45 No.110496277
hey guys I am very dumb
how do I make a GUI program with python?
Anonymous12/02/26(Wed)18:23:16 No.110496294
>>110496277
import gui
Anonymous12/02/26(Wed)19:05:02 No.110496566
>>110496294
ok nothing happened
Anonymous12/02/26(Wed)20:30:07 No.110497032
screenshot
I am porting my programs to ta simplified structure where you just have #include ".c" instead of build systems and header files as all my programs are simple.

I prefer C but tkinter is the only GUI with a tolerable language. gtk and qt are fucked and I don't like tcl.
Anonymous12/02/26(Wed)20:42:07 No.110497095
>>110496277
literally tkinter. out of the box it looks like arse but you can set options to make it look good.
Anonymous12/02/26(Wed)20:46:47 No.110497119
I give you faggots all my demons. Now you have to deal with them. The demons will make vibecoding harder for you and give you urges to use asm
Anonymous12/02/26(Wed)21:47:31 No.110497388
>putting everything under a try/catch block and calling it a day
Is this a code smell?
Anonymous12/02/26(Wed)21:49:27 No.110497399
>>110497388
It made webdevs look bad.
Anonymous12/03/26(Thu)04:55:10 No.110499768
This is something I put in my ~/.sbclrc.
(defun vars (&optional (inherited? nil))
"List variables in current package.
If `t' is passed, also list inherited variables from other packages."
(let (vars)
(do-symbols (s *package* vars)
(if inherited?
;; then (list everything available)
(when (boundp s)
(push s vars))
;; else (list only vars defined in this package)
(when (and (eq (symbol-package s) *package*)
(boundp s))
(push s vars))))))
s0ychan!!05ryGtqrSNJ12/03/26(Thu)05:03:32 No.110499813
>>110497388
that's what I did on my C++ web server to stop it from crashing
Anonymous12/03/26(Thu)05:34:20 No.110499982
screenshot
>>110497388
Literally nothing matters, just do what you want.
Anonymous12/03/26(Thu)05:39:30 No.110500008
ffb083d693fcffe0c059560e86ce8023
>>110497388
it's what you call a "nice try"
especially if it's 100+ lines of code throwing 5+ different exceptions

also you can just rethrow exceptions to the method above. you can even add throwing exceptions to main()
Anonymous12/03/26(Thu)07:25:52 No.110500615
TIL: Char is unsigned on RISC-V
holy fucking feminine cock
> https://docs.riscv.org/reference/abi/v1.0/riscv-cc-c-cpp-type-details.html
> 4.1.2. C/C++ type representations
> char is unsigned.

Did they listen to Terry Davis? Not sure if based or unbased tho
s0ychan!!05ryGtqrSNJ12/03/26(Thu)13:49:40 No.110503467
2026-12-03 archiving na
archiving 4chan posts.
i had it all in JSON files but they were impossible to work with, so i'm moving it to SQLite.
Anonymous12/03/26(Thu)14:20:59 No.110503762
astro recog
hell yeah bros, Astro's official blog highlighted my custom website for "spectacular visuals and smooth animations". was worth it to slave over the project and push optimization to its limits

>https://alexeiraymond.com/
Anonymous12/03/26(Thu)14:59:03 No.110504096
>>110500615
>TIL: Char is unsigned on RISC-V
What difference does it make?
How does signed/unsigned apply to chars?
Anonymous12/03/26(Thu)15:03:51 No.110504133
>>110504096
the C data type ...
Anonymous12/03/26(Thu)15:27:14 No.110504335
>>110481580
When was the last time we had a Nagato Yuki pic for the OP? I'm visiting this thread after a couple years and seems completely alien to me.
Anonymous12/03/26(Thu)15:33:02 No.110504381
Is a recursive function reentrant?
Anonymous12/03/26(Thu)16:06:55 No.110504658
>>110504381
sort of? thats not really what you use reentrant to mean
Anonymous12/03/26(Thu)16:10:54 No.110504682
>>110504658
I find the term etymologically confusing.
Anonymous12/03/26(Thu)16:18:44 No.110504730
Anonymous12/03/26(Thu)16:18:55 No.110504731
>>110490360
Be careful mentioning Rust, somebody is going to post a picture of a tranny and then try to convince you that they aren't obsessed.
Anonymous12/03/26(Thu)16:22:01 No.110504758
>>110504731
this poster is a rust troon btw, a common thing troons do is accuse other people of being obsessed with them
Anonymous12/03/26(Thu)16:26:04 No.110504787
>>110491579
That is cool and all, but you can do that in any language. Even C can do that, you just make a struct with function pointers, and write some functions that convert your concrete types to the struct that represents your interface. Not dogging on you obviously, just if you didn't know, maybe it is helpful. Rust is definitely good stuff.
Anonymous12/03/26(Thu)16:29:09 No.110504808
GoneFishing
>>110504758
Caught one already. I'm honestly impressed it was so fast this time.
Anonymous12/03/26(Thu)16:35:55 No.110504853
>>110488067
How about accepting a struct containing a function pointer, which you will call by passing in whatever parameters you might need, perhaps a pointer to some buffer your parser can own, and the two implementations of that (for strings and files) are responsible for filling your buffer with data. And then you do something with the buffer, and call it again when you want more data. This is basically the "Sans-IO" pattern where you avoid doing I/O in your code and instead delegate that to the caller.
Anonymous12/03/26(Thu)16:39:31 No.110504879
60kB
>>110504787
Yes, I know that. It was just comfy in rust.
But can you read 60 kB from a floppy with C??
Anonymous12/03/26(Thu)16:41:07 No.110504887
>>110504730
It's called reentrant because it's safe to call again (re-enter) before it has returner. As I understood it. I'm my mind a function that's intended to be called recursively fits that definition.
But like you said, that's not really what it's supposed to mean. I'm pretty sure I could contrive to implement a recursive functions that's not async-safe.
Anonymous12/03/26(Thu)16:41:55 No.110504893
>>110488067
Write two functions, one that accepts a file stream and the other that takes a string; they can call the same back-end implementation if you want, with just a different "get next token" function passed in. Use _Generic in a macro to make a trivial wrapper to select which front-end to call.
Anonymous12/03/26(Thu)16:44:36 No.110504908
44861cea1e620b706be4d1d19f1e834d
>>110504879
NTA and I use neither language (I'm an C++98 psycho) but literally yes programmers DID read MORE than 60KB from a floppy with ANSI C for like at least 45 fucking years
Surely you have to be trolling
Anonymous12/03/26(Thu)16:47:11 No.110504923
>>110504908
>I hate fun
Ok from SD card (attached via SPI running at 6 MHz) it takes about 13s, so double the speed
Anonymous12/03/26(Thu)16:48:04 No.110504928
>>110504908
>>110504879
Why wouldn't you be able to read 60kb because of your language? Maybe I don't understand something. But either way, who cares, I'm happy you had fun. Want to share something interesting you learned while building it?
Anonymous12/03/26(Thu)16:49:47 No.110504938
>>110504887
>I'm pretty sure I could contrive to implement a recursive functions that's not async-safe.
It's trivial. Just call a non-async-safe operation (like strtok) at some point in the function apart from doing the recursion.
Anonymous12/03/26(Thu)16:52:45 No.110504962
>>110504938
What makes a function non-async-safe? Is it just as simple as using static (but not thread-local) memory in your function?
Anonymous12/03/26(Thu)16:52:54 No.110504963
>>110504928
>Why wouldn't you be able to read 60kb because of your language?
I remember a few BASIC variants that couldn't, but that was because they would run out of RAM if you tried and the floppies were formatted in the dumbest way possible so files were titchy.
Thank god that shit is long gone.
Anonymous12/03/26(Thu)16:53:07 No.110504968
>>110503467
If you need to query a bunch of JSON files, I really like duckdb. It can treat JSON files as if they were SQL tables, and it's surprisingly fast. Duckdb has replaced jq for some of my JSON workflows.
Anonymous12/03/26(Thu)16:54:07 No.110504973
>>110504962
Usually yes. Used to be a big problem with many syscalls too, but most of them have been fixed.
Anonymous12/03/26(Thu)16:55:49 No.110504985
>>110504963
Well that is interesting, I didn't know.
Anonymous12/03/26(Thu)16:57:24 No.110504996
>>110504928
I learned that I am not sure if I like Rust.
Wanting to build a simple ring 0 only, as God intended, fun operating system is a fucking pain in the butt actually.
Because making things global seems to be always ugly (tho I do not understand Rust in depth yet). So I don't know, on the one hand side it seems to be a fun language, but my toy tinkering might be the wrong target. So maybe I'll be language hopping again.
At least my hardware seems to work. Right now this is only mirroring the uart, but somewhere in my pile of shit there must be a PS/2 vhdl module that I could JUST attach to my fpga.
And what I really learned is that jealous people are underestimating crazy time what Terry Davis did. Even making a plan and thinking about how you could bootstrap a fucking system from nothing is insane. He did write his first fucking compiler with TASM.

So maybe I'll go back to C or my risc-v assembler (written in HolyC). But hearing the floppy click was a fun experience. Drove me mad for months to see it collect dust. But the plan is wokring out. Soon (TM) my computer will live and strive. It will dodge all three letter agencies. It will be free.
Anonymous12/03/26(Thu)17:12:17 No.110505113
IMG_20261203_230803_278
also back in the day I used to find peace in wiring up shitty jumper cables to shitty proto boards.
But now it kinda sucks. Either because I am an old fuck now or because my projects got too complex and it's just too many wires now.
Need to build a proper adapter PCB for the floppy :(

But soldering the components on the board that is attached to the fpga was a pain too. That's like 30 0402 components. Damn, that sucked. And I don't know if I could rearrange it to have enough space for 0603 or even 0804. I could get rid of half the pull-up resistors. So that's about 16 pull-ups that I need in the end, plus a few caps
Anonymous12/03/26(Thu)17:24:01 No.110505220
>>110504996
Fair enough, if you gave it a shot and don't like it, better to use what you enjoy. I can't recommend much since I've never worked on an OS in Rust specifically, but if you haven't seen the phil-opp OS series, maybe it can help. I haven't read it, but heard about it. Anyway, good luck with your project.
Anonymous12/03/26(Thu)17:30:15 No.110505277
file
I just finished the CS50p lectures and I'm working on a blackjack game as my final project
Anonymous12/03/26(Thu)17:32:49 No.110505299
funcat
>>110505220
Oh I was thinking about that the other day, but I couldn't remember the name.
That all helps to some degree, but there are 2 main problems (maybe 3):
1) The absolute majority (obviously) uses x86, which seems to bring a lot of stuff already with the vga mode and printing and stuff
2) The ones that do bare metal on ARM or risc-v are only very shallow and my brain refuses to come up with a good structure (this is one of the better ones https://popovicu.com/posts/writing-an-operating-system-kernel-from-scratch/ )
3) I am just fucking retarded and make it extra hard for myself by wanting to design most of the hardware myself and building my own SoC on an fpga. At least I accepted to use someone else's CPU now. So this means I have to come up with all the I/O routines myself

But that's what my dream is and maybe I can do it one day. I am repeating too many steps, but it's like 1.1 steps forward and only 1 back. So the snail has some momentum
Anonymous12/03/26(Thu)17:35:13 No.110505321
>>110505277
play the busted sound from GTA 2 on a loss, no??
https://www.youtube.com/watch?v=-yG0ZEjeySc
Anonymous12/03/26(Thu)17:49:20 No.110505431
MrOverzealousFoulBallCatcher
>>110505299
Well you definitely aren't retarded, this is just going to take some time. You're bound to achieve something and learn along the way. Cheers to you.
Anonymous12/03/26(Thu)17:51:55 No.110505446
>>110504887
You don't call recursive functions re-entrant because you call them recursive which is already more specific. Re-entrant is used more for parsers, co-routines etc
Anonymous12/03/26(Thu)17:58:33 No.110505486
>>110505321
i'll have to check if it complies with the project rules, but sure
Anonymous12/03/26(Thu)18:14:00 No.110505603
>>110504381
maybe, maybe not
depends on how it does what it does
Anonymous12/03/26(Thu)18:30:39 No.110505710
>>110505446
Recursive functions are usually reentrant, but not if they also call non-reentrant functions. Reentrant functions can also be called from other threads.
Anonymous12/03/26(Thu)18:37:58 No.110505769
>>110505710
>Reentrant functions can also be called from other threads.
not always, it depends what you mean by reentrant
Anonymous12/03/26(Thu)19:58:08 No.110506344
file
I am trying to do something akin to sing-box in rust. if you dont know what s-b is, it's basically a singular program that has a lot of proxy protocols included, client and server. My primary excuse was that dev likes to break config every 2 months and uses json out of all thing.
Strictly speaking, this excuse is already null and void because someone has already done what I was thinking of basically exactly.
https://github.com/cfal/shoes/

I guess I don't even have an excuse anymore and I will have to just write it with the explicit goal of learning networking and rust...
as a crude start I only have a socks5 inbound, direct outbound and plan on writing a trojan outbound next.
I'm thinking of going all-in on tokio utilities.
This is also the 2nd iteration, first time I relied on gemini too much with trait stuff. I want to learn it properly...
Anonymous12/03/26(Thu)21:14:31 No.110506863
last-raven
>>110506344
>learning networking
Yep yep, good luck, it is a long road but interesting. I had a good experience with Tokio. My program is getting large now and has a hybrid architecture, most internal parts are plain sync and I run private single-threaded event loops in separate threads. When I want to do something in the background, I send a message to one of the event loops. I've done this before in C using libuv also and had a good time there as well. We live in a time with lots of cool cozy libraries and fun projects to try and stuff to learn!
Anonymous12/03/26(Thu)21:42:07 No.110507067
1765366928449303
>>110506863
I like that you can go multi thread async with minimal changes to the overall code, and even then still have escape hatches like spawn_blocking, though .await took way longer than I'd like to admit to wrap my head around as a concept.
as for the programming side, it was very satisfying to see something I've written take in outside connections and successfully connect to my sing-box server.
I don't really know what an idiomatic rust is, for that I just ask gemini for issues. I don't mind ai feedback as it's rather hard to find someone to ask about such things 7/24
Anonymous12/03/26(Thu)22:28:29 No.110507411
>>110507067
I guess you can think of the code before and after each .await as two states that you would normally write into a state machine, the compiler just makes it for you. It is pretty handy. Looks good to me.
Anonymous12/03/26(Thu)22:34:22 No.110507461
>>110505113
I'm proud of you, unc. I wish I had some PCB knowledge and some soldering skills. I suck so much, that I bought a pico board with pre-soldered pins
Anonymous12/04/26(Fri)01:17:49 No.110508567
images
Nocoder retard here, sorry. So, basically any decent compiler performs optimizations through heuristics and a cost model to determine if an optimization is worth it by branching?
Anonymous12/04/26(Fri)03:59:23 No.110509479
IMG_20261204_095605_178
>>110507461
It's not easy to solder 0402 components. Took me a few hours.
But you can do it. Doing it is the only way to learn it.
I soldered 0402 before, but I did not remember how awful that is and apparently before I did not solder capacitors. They are the fucking worst.
Because they hold a charge, so they are magnetic and a lot of energy is lost. So you especially have a hard time when soldering against ground, because tons of energy gets sucked somewhere. Then you somehow gotta grab that shit that is jumping around with your pincette.

Just look at the caps left of IC1. I even ditched the ones on IC2, because I was so mad.
The ones on IC3 (bottom left) were the important ones tho and they look like absolute retard shit, because these were 10uF caps and they were holding even more charge than everything else.
It does work tho, so that's good
Anonymous12/04/26(Fri)04:12:06 No.110509560
>>110509479
Jesus Christ.
Anonymous12/04/26(Fri)04:34:00 No.110509673