← Home ← Back to /g/

Thread 106197035

318 posts 112 images /g/
t. pogeet !!b2oSUmilA2N No.106197035 >>106197463 >>106197601 >>106197655 >>106197711 >>106201137 >>106201734 >>106204295 >>106206071 >>106209703 >>106219431 >>106220150 >>106221594 >>106230277 >>106230342 >>106234723 >>106238496
/dpt/ daily programming thread
what are you working on /g/?

>previous: >>106162162
t. pogeet !!b2oSUmilA2N No.106197083 >>106197226 >>106197711 >>106198355
as for me, I just started working on creating a general purpose visual programming language frontend for LLVM.
Struggling with grammar atm
Anonymous No.106197226 >>106197305 >>106197305 >>106197454 >>106204354
>>106197083
never heard of LLVM, but some form of visual programming language is on my bucketlist.
Maybe closer to a vector drawing -> executable code pipeline though
t. pogeet !!b2oSUmilA2N No.106197305
>>106197226
>never heard of LLVM
its the default backend option of every modern programming language for achieving effortless cross-platform
>>106197226
>vector drawing -> executable code pipeline
I'm doing exactly that.
It should always be vector drawing. Software rasterization will be very expensive because zooming in and out is an essential and highly used operation in visual programming environments. Its better to let the GPU deal with the rasterization part.
I'm sticking to purely functional design so that flow graphs can be managed easily. Gotta see.
Anonymous No.106197454 >>106202397 >>106205050
>>106197226
>never heard of LLVM
>on /dpt/
rock bottom
Anonymous No.106197463
>>106197035 (OP)
A program to perform record linkage between schools in my company's database and schools in the database of our school district clients. 90% of school districts are too retarded to load the NCES GUID for their schools into their database (a national ID that was made to solve this problem).

Right now it's 95% accurate, but I'm shooting for something that can be used with little human oversight, seeing as there are tens of thousands of schools we are wanting to data link. 99% accuracy would be nice, but I think sub 99% accuracy with a near zero false positive rate would be acceptable as well.

Right now I am extracting any phrase that would indicate a school's grade levels from a thesaurus list sampled from both data sets, and marking each school with a grade level type. Then I am breaking the remaining words up and performing a Jaccard similarity score. The best match is the one with the highest similarity while sharing a grade level type.

Acronymization, abbreviation, and special snowflake grade level descriptions ("Kinder Edu Ctr") seem to be the only things the program whiffs on. Acronyms should be easy enough to check for. But abbreviations can easily lead to false positive sub sequence matches. And recognizing novel grade level descriptions seems like something I would need a trained LLM for.
Anonymous No.106197601
>>106197035 (OP)
Jeet code
Anonymous No.106197655
>>106197035 (OP)
Fixed the installer script in the pipeline because my dumbass did not include all dependencies with the Windows desktop client, also working on fine tuning the web interface a little more

Mentally preparing myself for the mental fuckery of cross platform voice. Also considering adding multi media and files to appeal to normies but still on the fence about it
Anonymous No.106197711 >>106199063
>>106197083
rare edit!
>>106197035 (OP)
I'm writing a videogame. It's 2d, but I think the planned mechanics are actually kind of creative. I'm going through the motions of working up from simple projects to learn.
Anonymous No.106197732
nothing, i just browse 4chan all day.
Anonymous No.106197742
I made my CLI snake game in colour thanks to ncurses.
Wish I wasn't a complete codelet, but that's one step forward.
Anonymous No.106198355 >>106199063
>>106197083
Cool, I'm currently reading a book about LLVM backends. Wonder if it's a waste of time instead of actually coding though. But it's giving me great insight about how things work internally so far.
Anonymous No.106198972 >>106199063 >>106199770
>work hard making an app
>look into starting to publish it
>open the app store for the first time and look up similar apps
>there are multiple with exactly the same premise with 0 reviews
grim........
t. pogeet !!b2oSUmilA2N No.106199063
>>106197711
>I'm writing a videogame
ah, feel free to drop by at /gedg/ >>106189131
>>106198355
>Wonder if it's a waste of time
its basically assembly so there will be a lot to learn, which was why I picked it up. Seems like you are feeling it.
>>106198972
better luck next time, anon saar
Anonymous No.106199136
>daily
Anonymous No.106199770
>>106198972
you should do the market research before the work
Anonymous No.106199793 >>106200018
>>106199722
tried my hand at Rust to see what it's all about and I developed a deep hate towards it. had to completely refactor for each piece of shit option, ended up with double the code compared to my Bash version, and wasn't near half done. I hate it so fucking much it's unreal, 2000 lines of code for nothing and wasn't half done and it was like few hundreds of lines in Bash this is just brainrot
Anonymous No.106200018
>>106199793
>vibe codding PHP + Bash webshitter
>filtered by Rust
Like pottery.
Anonymous No.106200108 >>106200585
Has there been ANY progress on microsoft's stl in like a year or something? I'm guessing they're under orders from the people who run the government that they want C++ on the way out like when they did those security advisories and all that garbage they've shoehorned into 26 because of intelligence agencies
Anonymous No.106200307 >>106200317
Is elixir worth learning ? Mostly for distributed infrastructure and high reliability. BEAM seams very useful for that, after all erlang was build for telecom
t. pogeet !!b2oSUmilA2N No.106200317 >>106202371
>>106200307
the only reason to learn elixir is phoenix liveview
Anonymous No.106200585 >>106200701 >>106200729
>>106200108
i mean you can check yourself the source is on github, though some of the files needed to build it are still in the visual studio STL dirs
https://github.com/microsoft/STL/commits/main/
they don't really need to update the copy that ships with VS preview like they used to, you're expected to build it yourself if you actually want the newest stuff
seems like at least some amount of effort is maybe going to a generic ISA independent vectorized algorithm implementation?
Anonymous No.106200701 >>106200729 >>106200822
>>106200585
Ok but not much work is going into implementing remaining C++23 or implementing C++26 library features
Anonymous No.106200729 >>106200744 >>106200822
>>106200585
>>106200701
https://github.com/microsoft/STL/wiki/Changelog
>P3223R2 #5604 Making istream::ignore() Less Surprising
>P0472R3 #5382 Put monostate In
>P3323R1 #5213 Forbid atomic, Specify atomic_ref
>[partial] P3471R4 #5274 Standard Library Hardening
The last big thing was in 17.13 which was fully released (not preview released) in february (preview was last year)
Keep going back and there's more tiny things with few big features. flat map and set have been on a branch since jan 24
Anonymous No.106200744 >>106200822
>>106200729
Compare this to some of the shit you could add for C++26 easily
>optional
>function_ref, copyable_function
>submdspan
>indirect, polymorphic
Anonymous No.106200822 >>106200838
>>106200701
the like 5 missing C++23 library features all require new compiler builtins, and they don't actually commit those parts of the STL until the toolchain updates

>>106200729
>>106200744
yea no MS can't just add things to existing stuff all willy nilly, there's still no indication we're anywhere near the major STL ABI break vNext (which they are also working on, it's just not in the public repo) where they drop the XP compatible ABI
they got burned pretty hard by the small mandated ABI break to so i believe they're a lot more careful there now too
realistically the
>generic ISA independent vectorized algorithm implementation
they're working on is probably or executors internals related
but C++26 hasn't even been finished yet
Anonymous No.106200838 >>106200846
>>106200822
if you look at all the PRs it doesn't look that way since they normally have traits for vectorisable parts of the algorithm
weren't they told the abi wouldn't break for the next version? realistically an abi break should take a long time so they can go over everything, not an excuse to stop adding shit
also fuck executors, and reflection, and contracts
Anonymous No.106200846 >>106200856
>>106200838
and safety profiles
Imagine if all of the time wasted on those shitty misfeatures had been spent on something useful like heterogeneous computing
Anonymous No.106200856
>>106200846
>inb4 parallel algorithms could make use of executors
it's not enough
captcha is hxxmad
Anonymous No.106201137 >>106201219 >>106210755
>>106197035 (OP)
>what are you working on /g/?
Rewriting my abstractions so I can ditch esp-idf, FreeRTOS and C++, and just go pure Rust on bare metal.
t. pogeet !!b2oSUmilA2N No.106201219 >>106201275
>>106201137
the only thing you should be ditching is Rust.
esp-idf and freeRTOS are the industry standard.
You are build some embedded shit, not keep on developing it.
Anonymous No.106201275 >>106201337
>>106201219
I don't understand your point. esp-hal is developed by espressif, same company that makes esp-idf. It's just as supported.
t. pogeet !!b2oSUmilA2N No.106201337 >>106201381 >>106202125
>>106201275
>esp-hal
>looks inside
>use case?
its been over 5 years since I've done any embedded shit and wtf is this?
esp-idf with C was very good. This is totally pointless. Its just a hardware abstraction layer on top of esp-idf.
Memory safety is a skill issue, not a language issue.
All the memory issues that we have with C will also be present in esp-hal because of its low level nature and lots of unsafe() shit.
WTF is the point of using rust for this again?
Absolutely pointless existence.
Anonymous No.106201381 >>106201395
>>106201337
t. pogeet !!b2oSUmilA2N No.106201395
>>106201381
Anonymous No.106201734
>>106197035 (OP)
I'm working my way through the third chapter of Crafting Interpreters to learn Zig. It hasn't been too difficult so far, since C translates pretty directly to Zig for the most part, and the Zig syntax and standard library have actually made my implementation more elegant in places. I'm liking this language so far.
Anonymous No.106201817
I'm an emacsfag but lately I've been toying around with other editors because I'm tired of the jank and slowness of emacs. Gotta say it's pretty wild how far you can get with your TUI editor of choice, tmux, fzf, and the usual GNU *utils, it's like I'm rediscovering my 'puter.
Anonymous No.106202125
>>106201337
>WTF is the point of using rust for this again?
hes part of the conpsiready to undermine the free softwear movement with mit liceneses
Anonymous No.106202371 >>106202475
>>106200317
Not telecom or distributed fault resilients systems?
Anonymous No.106202397 >>106202475
>>106197454
/dpt/ died when the maidposters were banned.
t. pogeet !!b2oSUmilA2N No.106202475 >>106202576 >>106204924
>>106202371
anything that leverages the BEAM is an amazing choice for distributed fault resilient system. Even gleam.
Its that particular phoenix liveview web framework that sets elixir apart from the rest. A true evolution in the web shit environment.
>>106202397
no wonder. I had no choice but to revive it myself after some anon popped up at /gedg/ and asked why /dpt/ and /gedg/ were dying.
Anonymous No.106202549 >>106204910
Exception 0xc0000005 encountered at address 0x7ffc638d5460: User-mode data execution prevention (DEP) violation at location 0x7ffc638d5460


Cool.. what does that mean
Anonymous No.106202576 >>106202826 >>106204418
>>106202475
I'm not really interested in web desu. But does that mean learning Elixir is still worthwhile compared to erlang ? Ultimately, as long as it uses BEAM, it's the same thing, and erlang and elixir are interoperable nah ? Might as well learn the most recent and enjoyable stuff
t. pogeet !!b2oSUmilA2N No.106202826 >>106203034
>>106202576
>But does that mean learning Elixir is still worthwhile compared to erlang ?
it can be.
Its well known as the language of choice of solo developers who pulled off "one man army" feats.
Both are basically the same thing with varying syntax. Its like comparing C vs C++(not in terms of complexity but in terms of QOL features. C++ is unnecessarily complex).
Anonymous No.106203034
>>106202826
Time to learn elixir then :D
Anonymous No.106203379
>The VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_KHR flag, allowing the implementation to defer the allocation of swapchain image memory until first acquisition.
What is the benefit to this? Less upfront memory pressure?
Anonymous No.106204295 >>106219163
>>106197035 (OP)
I had a particular use case for dmenu back when I was daily driving linux, but with most of my work (as in getting paid for a job, work) computing done on windows I kinda missed it, and I didn't feel like bothering with trying to compile it myself. I just slapped something together in python that kind of does the same thing, or at least the functionality I need from it.

Full disclosure, I completely vibecoded the GUI, but there's still some more backend code I need to write to get it to do what I want which I plan to write myself. I always found GUI programming to be a pain in the ass and never bothered to put enough effort into learning how to do it, and I probably wouldn't have much use for it outside of maybe 1 or 2 tiny projects like this per year.
Anonymous No.106204354
>>106197226
>visual programming language
Maybe not exactly what you're talking about, but have you heard of labview, or simulink? Two big commercial "programming" languages that operate with a block diagram kind of structure.
Anonymous No.106204418
>>106202576
nigga definitely learn Elixir. it has macros and access to the entire AST, where Erlang does not. Elixir has the stream and enum protocol, which find use in like 50% of functions.
anyone telling you that Erlang is better than Elixir has used neither.
Anonymous No.106204541
I suck so much at programming that I'm starting to open a Youtube channel and start making "tutorials".
At least that would move me into learning more, right?
Anonymous No.106204910
>>106202549
Segmentation fault.The program counter is pointing to data.
Anonymous No.106204924
>>106202475
If you use a maid as an OP image a few times, they might come back. I think most of them still lurk, they just stopped participating when jannies started aggressively banning maidposters on sight.
Anonymous No.106205050 >>106205832 >>106223823 >>106232728
>>106197454
no shit, most of the posts here are about "vibe coding" these days... on a hobby forum of all places

I wish they fucked off to HN or wherever they think someone is interested in their completely meaningless bullshit
Anonymous No.106205832 >>106223823
>>106205050
I think it has to be bots (psyop and or ads) or jeets
Nevermind vibe coding, vibe posting is the fucking worst
I'm so sick of seeing "So I asked gpt and it said ...", it's worse than twitter screencaps
Anonymous No.106206071 >>106207054 >>106210057 >>106219373
>>106197035 (OP)
how do I call the system's assembler and linker from within a C program.
I can just use system(3), but there should be way to start those programs without forking an entire shell.
Anonymous No.106206938 >>106206995
>grinding leetcode
ugh. It is funny using python and every example is using fucking typing. Why go through all this fuss, just use Java.
le dynamic typing meme is gone.
Anonymous No.106206995
>>106206938
I'd rather use a lisp or something instead of python (not for leetcode though, but in general)
Anonymous No.106207054 >>106207573
>>106206071
>I can just use system(3), but there should be way to start those programs without forking an entire shell.
fork, pipe (if needed), exec, waitpid
Anonymous No.106207573 >>106207989
>>106207054
eh sure, bit that's the same with a little more work.
I phrased it quite poorly, what I meant is whether there are any functions that hook into as(1) directly, without having to start an entire new process
Anonymous No.106207989 >>106210184
>>106207573
>what I meant is whether there are any functions that hook into as(1) directly, without having to start an entire new process
That's impossible because as(1) in an executable file, you have to launch a process to execute it. I guess what you're looking is access to the internal library of as/gas (GNU assembler) but I don't know if this software provides a library. as/gas is part of binutils so look at what they've got, also maybe gcc has something.
If they don't have a library, which would be pathetic, you can use NASM. It has a C library.
Anonymous No.106208416 >>106208431
if each browser tab is a separate process and renders independently, how does the rendered page "get into" the main browser window process?
Anonymous No.106208431 >>106208484
>>106208416
one of the Inter Process Communication mechanism: pipe, socket, shared memory
Anonymous No.106208484 >>106208658 >>106208801
>>106208431
do you know which method specifically modern browsers use though?
Anonymous No.106208658
>>106208484
nope
t. pogeet !!b2oSUmilA2N No.106208801
>>106208484
That's really hard to say.
I don't know shit about chrome so I'll try to give an example from what I know of firefox.
Firefox uses its own message-passing, actor model library for dealing with IPC shit.
https://firefox-source-docs.mozilla.org/ipc/ipdl.html
IPC is used in a several places, like DOM level, gecko processes, GPU observer, async I/O and a lot more places. Content process are well sandboxed and subdivided into types based on what features each content process is supposed to have. How the IPDL serializes and passes the message over is another complex topic. Finding if IPDL is using pipes or shared memory under the hood is difficult through documentation. Looking through source code is the best way to get certain about it.
Anonymous No.106209306
I’m retarded. What can I do in terms of
Pen testing with the Scapy library in Python?
I’m a total noob, please help.
Anonymous No.106209547
Can anyone recommend a decent easily embeddable PL for me to consider alongside Lua and Chibi Scheme for extensions and configuration? Most of the code will probably be just to implement state machines and save/communicate results in some form of tables. Speed isn't important because I'll probably just run it asynchronously.
Anonymous No.106209703 >>106209704 >>106217923
>>106197035 (OP)
I'm cooking an absolute fucking bombshell right now and everyone will know when I drop it (sometime in the next 14 days)
The only hint I'm giving is it's written in C99
Anonymous No.106209704 >>106209755
>>106209703
new programming language?
Anonymous No.106209755 >>106209959
>>106209704
no I'm not trans
it's going to be huge though
Anonymous No.106209959
>>106209755
dude
Anonymous No.106209970 >>106219884
GPT 5 is fucking retarded. I'm getting LLM fatigue bros. I'm just going to stop using it all together other than to generate dummy data. This shit is so overblown
Anonymous No.106210022
how do i stop getting bored/frustrated and switch to a new project every time and ended up never finishing anything?

this has been my problem for the longest time, like around 3-5 years already
Anonymous No.106210057 >>106210184 >>106210332 >>106211851
>>106206071
i don't think gcc/the gnu binutils offers it but every component of llvm is a library first, this does include running tools in and of themselves or just individual parts and layers of them
you just have to build up a config/invocation then call its driver function
Anonymous No.106210184
>>106207989
>also maybe gcc has something
I had a look, and after lots of ceremony it (on my system) just calls posix_spawn for cc1, as, and collect2 . _.
but yeah, I've just switched to nasm for now

>>106210057
didn't think of llvm, thanks
Anonymous No.106210332 >>106211851
>>106210057
>every component of llvm is a library first
As it should be. GCC is really a pile of shit. I bet that the initial compiler made by Stallman a baroque turd and then it grew all lopsided around it.
Anonymous No.106210337
*was a
Anonymous No.106210755 >>106217241 >>106220089
>>106201137
This was such a good idea.
Without all the IDF/RTOS bloat, the size of program instantly dropped from 1.3mb to 50kb without any effort. And now DMA and async is so much easier to do and everything just werks.
Anonymous No.106211278 >>106211292 >>106221264
FUUUUUUCK
Anonymous No.106211292 >>106211378
>>106211278
>he didn't buy a 4chan gold account
Anonymous No.106211378
>>106211292
it's a site I've been scraping, but it's not 4chan
Anonymous No.106211851 >>106212014 >>106212230 >>106212687
>>106210057
>>106210332
llvm doesn't have an assembler component lmao
Anonymous No.106212014
>>106211851
>here's your system language backend
Anonymous No.106212230 >>106212931
>>106211851
https://github.com/llvm/llvm-project/tree/main/llvm/include/llvm/MC
?
Anonymous No.106212687 >>106212931
>>106211851
yes it does, don't be fucking retarded, it just doesn't install symlinks for a frontend with a command line that calls itself an assembler
the driver describes itself with its real filename as like machine code playground, and of course it can be invoked as part of clang as well
it's also a dissasembler as well
i think it supports more than just GNU style assembly?
Anonymous No.106212931 >>106212985 >>106213117
>>106212230
>look at these header files that do absolutely nothing
>>106212687
no it doesn't, llvm produces assembly code, but can't assemble
Anonymous No.106212985
>>106212931
>look at these header files that do absolutely nothing
Yeah... they're header files. What do you expect them to do other than declare stuff. I just linked that to show you it's part of the public API.

Here's an overview
https://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html
Anonymous No.106213117
>>106212931
oh so you're just stupid
llvm actually contains a significant amount more than you apparently think it does
so does clang
so does everything in their monorepo
they cover the entirety of GNU and MSVC toolchains, literally most if not all their binutils iirc, for both (including independent implementations of things that are normally part of wine like windows resource file compilation)
except they cover them as libraries, the executable programs that get installed are actually just thin shims, often to multiple tools and not just one single binutil

those headers are for the LLVM machine code library which iirc is used for things like handling inline assembly as well as disassembly and also handles correcting hardware errata
Anonymous No.106213723 >>106214169
Gonna give Jai another look.
Anonymous No.106214169 >>106214320 >>106214577
>>106213723
It finally came out and it doesn't deliver on what it promised.
Anonymous No.106214320
>>106214169
>it doesn't deliver on what it promised.
I didn't see this one coming
Anonymous No.106214557 >>106214732 >>106235272
If i web scrape 1 page and collect the data on my personal pc, what would be the easiest way to push any updates to my phone (either as a notification or sms)?

I was thinking something along the lines: Scraper->json->email notification but is there any better (easier) solution?
Anonymous No.106214577 >>106215945
>>106214169
What did it promise?
Anonymous No.106214732
>>106214557
I'd go with email. Easy to configure notifications for certain senders and APIs are usually cheap or have free tiers.
Anonymous No.106215945 >>106216513
>>106214577
I don't know where to start. It was supposed to expressive enough and extensible enough that the core language didn't need dozens of features builtin, as for not turning into C++. But if it was like that you would see it instantly in the standard library and in the documentation.
Anonymous No.106216029
Should I make a online battle client/fan game or video game as part of my portfolio for job seeking or is that a waste of time?
Anonymous No.106216144
should i learn m4? i see it in tons of different projects
Anonymous No.106216513
>>106215945
>expressive enough and extensible enough that the core language didn't need dozens of features builtin
The core language seems pretty simple from what I've looked at. There's a few quirky things but nothing too egregious.
Anonymous No.106216595
Working on rot13 in Java. Not too bad, just have a little more to go.
Anonymous No.106217241 >>106217492 >>106220089 >>106228471
>>106210755
Now with embassy I have a more control over how everything is executed. Adding profiling to futures is super easy, so I made a tool for visualizing what the MCU is doing. When I press the boot button on the dev board, it dumps the data onto RTT/JTag which gets picked up by custom runner script which displays it on a graph.
I have to add async to SPI drivers. Right now, the MCU is just busy waiting for transfers most of the time.
Anonymous No.106217492 >>106218035
>>106217241
Interesting. Are you making anything in particular?
Anonymous No.106217923 >>106218388
>>106209703
rereading this I realize that this might sound like a veiled terrorist threat lmao
to be clear to any glowers reading, I am talking about a HARMLESS PROGRAMMING PROJECT
Anonymous No.106218035 >>106218317
>>106217492
Yeah, handheld gaming console. >>106140851
Anonymous No.106218224 >>106218758
How long did it take you to realize that you won't get far without having to read API documentation and having to work with other people's code?
Anonymous No.106218317 >>106218724
>>106218035
Cool. I've always wondered if there's a low-cost SoC out there with 3D triangle rasterization hardware you could use to make something maybe PS1 level. Not something fancy enough to have GLES support, just to get a sense for what programming that kind of hardware directly is like without an API.

Probably less trouble to get a slightly faster core and do software rasterization but still.
Anonymous No.106218388
>>106217923
If it has anything to do with number theory, anonymous secure communications, cryptography, alternative web protocols or maids, expect to be banned on sight every time you talk about it, and to be harassed by glowies for years after.
Anonymous No.106218724
>>106218317
AFAIK there is no such hardware. However, ESP32 is not that slow either. If you found some cheap, fast dual ported ram and used two chips, one dedicated to graphics, you might get something on the order of PS1. It didn't even had depth buffer.
Anonymous No.106218758
>>106218224
I have always been reading documentations and collaborating with other people.
Anonymous No.106219163
>>106204295
Cool. I just made a little file-system-based shortcut menu system for dwm using dmenu in shell. It's surprising how much you can quickly hack together using just a simple, graphical fuzzy finder. I could never live without it either.
Anonymous No.106219373
>>106206071
popen? not sure what you're asking since the canonical way to spawn a process on UNIX derivatives is fork + exec
Anonymous No.106219431 >>106219535 >>106220584 >>106220587
>>106197035 (OP)
I'm working on a web based robotic digital twin simulator for a school project. The state machine running the robot object is fit with its own component health indicator, parts wear timer, Instruction list and interpreter. I'm still in the planning phases of it.
t. pogeet !!b2oSUmilA2N No.106219535 >>106219716
>>106219431
>web based robotic digital twin simulator
what are you using?
I would use ros2 and rely on gazebo for this.
Anonymous No.106219716 >>106220018
>>106219535
The curriculum is designed to be for webshitter but i want to go into mechatronics so I'm breaking this into two layers. Front end will be using the usual mix of HTML, CSS and JS with Three.js being the thing that will load and visualize the robot and its 3D environment. For the backend, I'm using pure java. So we have a web based panel with a state machine that communicates over the internet using timed instruction threads with event handling and sockets.
Anonymous No.106219884
>>106209970
are you using the thinking version
t. pogeet !!b2oSUmilA2N No.106220018
>>106219716
noice!
t. pogeet !!b2oSUmilA2N No.106220089 >>106222195
>>106210755
>Without all the IDF/RTOS bloat
you do realize that HAL is just a bloat on top of that bloat, right?
You probably compiled without optimization flags in C while using esp-idf or something.
What you showed here >>106217241 is something I did using an android app and a dual core async web server in node mcu a few years back and the final size wasn't anywhere close to even half an MB.
I got no idea what is going on in the embedded world anymore but at this point, I'm too afraid to ask.
Anonymous No.106220150
>>106197035 (OP)
I don't know. My compiler/interpreter is dead. I got bored. Fuck. What should I do next? and no registry dumpers on my watch.
Anonymous No.106220151 >>106220240 >>106232446
I one shot vibe coded a thing that simulates pokemon gameboy cries, and makes a bunch of random crazy noises
pretty cool
maybe turn it into a tracker or something next to make music
Anonymous No.106220240 >>106232446
>>106220151
whoa its a music tracker now and coming up with the most insane songs
Anonymous No.106220369 >>106220384 >>106221531 >>106221746 >>106221748 >>106223164
#define make_u32_from_two_u16(hi,lo)
Anonymous No.106220384 >>106220451 >>106230467
>>106220369
shite
caller can't tell the order of arguments
Anonymous No.106220451 >>106220495 >>106221238
>>106220384
How do you make the order of the arguments obvious beyond their names, Mr Linus.
Anonymous No.106220495 >>106220781
>>106220451
>their names
caller doesn't see their names
so either define it locally or use x<<16 | y
Anonymous No.106220584
>>106219431
>web based
do you really this part has any relevance?
Anonymous No.106220587 >>106220680 >>106227225
>>106219431
>web based
do you really think this part has any relevance?
t. pogeet !!b2oSUmilA2N No.106220680 >>106220764
>>106220587
NTA but yes, highly.
performance drops by a minimum of 100 times and so does dev time and complexity if its the web platform and not native.
Anonymous No.106220695
How to overcome perfectionism?
My library already reached 10K lines of code, but I rarely shill it around since I feel it still needs improvements
Anonymous No.106220764
>>106220680
Anonymous No.106220781 >>106221299
>>106220495
Its not a problem that's limited to bit wise operations. Some go with input parameters then out parameters when it comes to order and others go with the libc way, so how are you meant to make the functions obvious? 20-30 characters long function names?
Anonymous No.106221238 >>106222195 >>106222195
>>106220451
One verbose way would be to make the function take in a struct, then use the C99 struct literal syntax. (And then hope your compiler optimizes the overhead out)
struct arg { u16 hi, lo; };
u32 u16u16_2_u32(arg a) { ... }

// Usage
u32 foo = make_u32_from_two_u16((arg) { .hi=420, .lo=69 });

If Swift has one feature done right, it is named arguments.
Anonymous No.106221264
>>106211278
Did you scrape it without a time out between requests like a retard?
Anonymous No.106221299
>>106220781
there's no one size fits all solution
you're gonna have to compromise
just be consistent througout the codebase
Anonymous No.106221531 >>106221594 >>106221666
>>106220369
#define combine_two_unsigned_sixteen_bit_integers_into_a_single_unsigned_thirty_two_bit_integer_where_the_left_argument_will_be_the_high_sixteen_bits_and_the_right_argument_will_be_the_low_sixteen_bits_unsafe(hi, lo)[/code]
Anonymous No.106221594 >>106221666 >>106223189
>>106197035 (OP)
Any debugger recommendations for windows?
>>106221531
"Wider code is better code" and its consequences on the sale of wide screen monitors
t. pogeet !!b2oSUmilA2N No.106221666 >>106221739
>>106221594
>Any debugger recommendations for windows?
https://github.com/EpicGamesExt/raddebugger
>>106221531
this is exactly how snake case is supposed to be used.
Anonymous No.106221739
>>106221666
Kinda janky in my experience but it's livable with.
A list of bugs(?) I could not reproduce:
- Pressing F5 sometimes stops execution at a breakpoint, usually not, so have to start program by stepping in and then pressing F5 to break at breakpoint
- Some variables do not show up on the mouse hover window, nor in the evaluate expression window, so their value remains a mystery
At least the startup time is nowhere as obnoxious as VS.
Anonymous No.106221746
>>106220369
harmful shit
make_u32_from_two_u16(hi,lo)
(u32)hi << 16 | (u32)lo
Anonymous No.106221748 >>106221773 >>106222033
>>106220369

No. This is garbage and it came in too late. I asked for early pull
requests because I'm traveling, and if you can't follow that rule, at
least make the pull requests *good*.

This adds various garbage that isn't RISC-V specific to generic header files.

And by "garbage" I really mean it. This is stuff that nobody should
ever send me, never mind late in a merge window.

Like this crazy and pointless make_u32_from_two_u16() "helper".

That thing makes the world actively a worse place to live. It's
useless garbage that makes any user incomprehensible, and actively
*WORSE* than not using that stupid "helper".

If you write the code out as "(a << 16) + b", you know what it does
and which is the high word. Maybe you need to add a cast to make sure
that 'b' doesn't have high bits that pollutes the end result, so maybe
it's not going to be exactly _pretty_, but it's not going to be wrong
and incomprehensible either.

In contrast, if you write make_u32_from_two_u16(a,b) you have not a
f%^5ing clue what the word order is. IOW, you just made things
*WORSE*, and you added that "helper" to a generic non-RISC-V file
where people are apparently supposed to use it to make *other* code
worse too.

So no. Things like this need to get bent. It does not go into generic
header files, and it damn well does not happen late in the merge
window.

You're on notice: no more late pull requests, and no more garbage
outside the RISC-V tree.

Now, I would *hope* there's no garbage inside the RISC-V parts, but
that's your choice. But things in generic headers do not get polluted
by crazy stuff. And sending a big pull request the day before the
merge window closes in the hope that I'm too busy to care is not a
winning strategy.

So you get to try again in 6.18. EARLY in the that merge window. And
without the garbage.
Anonymous No.106221773 >>106221795 >>106221807
>>106221748
Whenever I see a post this long, I assume it's ChatGPT slop, and definitely not worth reading.
Anonymous No.106221779 >>106221787
Anyone knows some tool than can mock/mimick different type of servers/protocols so I can train my backend network programming skills easily?
Anonymous No.106221787
>>106221779
any library implement those protocols in question, duh
Anonymous No.106221795
>>106221773
>I assume it's ChatGPT slop
It isn't.
Anonymous No.106221807
>>106221773
newfriend pls get out

https://lore.kernel.org/lkml/CAHk-=wjLCqUUWd8DzG+xsOn-yVL0Q=O35U9D6j6=2DUWX52ghQ@mail.gmail.com/
Anonymous No.106221981 >>106221989 >>106222032 >>106222033
Recommend me a new project right fucking now.
I need a new thing to sink my time into.
I'm tired of wage slaving.
Anonymous No.106221989 >>106221996
>>106221981
Niche fetish porn game.
Anonymous No.106221996
>>106221989
Not into fetish porn. Gooning is harmful for the brain and body.
Anonymous No.106222032 >>106222044
>>106221981
Soft body modelling software, with an option to export to a format of your choosing.
t. pogeet !!b2oSUmilA2N No.106222033 >>106222044
>>106221748
>And sending a big pull request the day before the merge window closes in the hope that I'm too busy to care is not a winning strategy.
ultra based
>>106221981
>shameless shill
https://odin-lang.org/
Anonymous No.106222044 >>106222082 >>106222083
>>106222032
So it's related to 3d then, sounds hard?
>>106222033
>>shameless shill
>https://odin-lang.org/
I've heard of Odin. I just don't know what I'd use it for.
t. pogeet !!b2oSUmilA2N No.106222082
>>106222044
>I've heard of Odin. I just don't know what I'd use it for.
its a general purpose language so you could use it for anything.
since the other suggestions were a video game and 3d software, I though I'd suggest the simplest yet highly performant tool for the job.
Odin's ecosystem lags when it comes to networking toolchain but apart from that, its fairly good.
Anonymous No.106222083 >>106222169
>>106222044
Not really, signed distance fields are supposedly easy to implement, see:
https://danielchasehooper.com/posts/shapeup/
Anonymous No.106222169
>>106222083
Ok. That's actually looks and sound really interesting. I've seen this one demo where this guy builds a full blown animated character with signed distance fields. I've seen it in shadertoy as well. Thanks friend. I think this is quite interesting and actually a good one. I want to see if I can do something similar.
Anonymous No.106222195 >>106222291 >>106222311 >>106223176 >>106223501
>>106220089
>>Without all the IDF/RTOS bloat
>you do realize that HAL is just a bloat on top of that bloat, right?
Why are you talking about things you have no idea about?
Your previous responses also were in a bad faith and lacking any substance.
Fortunately you are a tripfag so I will not have to see any of your posts again. Into the filters you go.

>>106221238
>>106221238
I really like how Rust solved this.
u*::to_be_bytes(self) -> [u8; N]
u*::to_le_bytes(self) -> [u8; N]
u*::to_ne_bytes(self) -> [u8; N]
u*::from_be_bytes([u8; N]) -> self
u*::from_le_bytes([u8; N]) -> self
u*::from_ne_bytes([u8; N]) -> self

These functions are not ambiguous and super handy when dealing with mixed endianness in your code. Especially when combined with Iiterator::array_chunks(). You can just bytes.into_iter().array_chunks().map(u32::from_be_bytes), type deduction infers chunk size and you get an iterator over u32s from big endian byte array.
Anonymous No.106222291 >>106222437
>>106222195
>to
>from
to is enough, from is pointless
Anonymous No.106222311 >>106222540
>>106222195
>le_bytes

total reddit
Anonymous No.106222437 >>106222469 >>106222532
>>106222291
How are you going to parse an u32 from bytes in some particular endianness in a portable way?
Anonymous No.106222469 >>106222492
>>106222437
I think he's sperging out about the `to` and `from` part. It will be less readable but he won't have to type `to` and `from`
Anonymous No.106222492 >>106222556
>>106222469
Ah. Rust doesn't support function overloading if that's what you would want.
Anonymous No.106222532 >>106222565 >>106222998
>>106222437
Uh. Somehow I thought these were functions for converting numbers into numbers, not numbers to/from strings, because of the context of the discussion. Now it makes sense.
Anonymous No.106222540 >>106223598
>>106222311
to be or not to be
Anonymous No.106222556
>>106222492
I would want `to` and `from` to be there regardless.
Anonymous No.106222565 >>106222998 >>106227896
>>106222532
They are for converting fixed sizes byte arrays into numbers, strings are not involved. There are functions like u32::to_ne() -> u32 and u32::to_le() -> u32 which just swap bytes within an integer, but I think they are more confusing and imo integer types should not be used to store integers from non native endianess. I always use fixed size byte arrays like [u8; 4] to indicate that this should not be interpreted as normal, native integer.
Anonymous No.106222908 >>106223201
Is there is a modifying range-based alternative for std::views::zip?

// works
for( const auto& [offset, string] : std::views::zip(v1, v2) )
{
// ...
}

// doesn't work
for( auto& [offset, string] : std::views::zip(v1, v2) )
{
// ...
}
Anonymous No.106222998 >>106223071
>>106222532 (me)
but I still don't like "from" though, "to" is enough but more importantly "from" is confusing as fuck. In the context of data type conversions, "from" can be used to mean "convert this well defined data type into our ""native"" data type that you are not even supposed to know what it is exactly". This thing is absolute cancer.
>>106222565
>fixed sizes byte arrays into numbers, strings are not involved
same thing. If it were real stringsβ„’ the functions would have the same signature and they would do exactly the same thing, minus a bounds check maybe.
>There are functions like u32::to_ne() -> u32 and u32::to_le() -> u32 which just swap bytes within an integer, but I think they are more confusing and imo integer types should not be used to store integers from non native endianess.
There do are more confusing but if you receive numbers that are in the opposite endianness there is necessarily a point where a variable will contain them.
Anonymous No.106223071 >>106223380
>>106222998
>In the context of data type conversions, "from" can be used to mean "convert this well defined data type into our ""native"" data type that you are not even supposed to know what it is exactly". This thing is absolute cancer.
It converts from some known endianess to the endianess of the machine the code is running on. It should be obvious.

>If it were real stringsβ„’ the functions would have the same signature and they would do exactly the same thing, minus a bounds check maybe.
Strings generally are more nuanced. Fixed size arrays are just composite type, they are bunch of bytes by value. C style strings, C++/Rust strings and memory slices are pointers. Fixed size arrays are not pointers.
They also lack statically known size. Which on one hand necessitate length checks, but also require a dereference and would not allow .array_chunks().map(u32::from_be_bytes) style code.

>There do are more confusing but if you receive numbers that are in the opposite endianness there is necessarily a point where a variable will contain them.
If you are receiving integers in some specific endianness, 99% chance you are just receiving a bunch of bytes not wider integers. Mostly likely you are just reading data stream over network or from a file. And from_be_bytes and from_le_bytes are designed to work with bytes.
Anonymous No.106223164 >>106223402 >>106224065
>>106220369
that sort of naming unironically reeks of llms
Anonymous No.106223176
>>106222195
byte order is not visible with something like ((u32)hi << 16 | (u32)lo), as it doesn't fuck around with the memory repr
Anonymous No.106223189
>>106221594
>Wider code is better code
to me, when the abbreviations are clear (hi, lo, offs), short code seems easier to read than wide code
Anonymous No.106223201
>>106222908
std::views::zip already gives you a tuple of references
this prints 0,0 0,0 0,0
#include
#include
#include

int main()
{
std::vector v1 = { 1, 2, 3 };
std::vector v2 = { -1, -2, -3 };

for (auto [a, b] : std::views::zip(v1, v2)) {
// a and b are references
a = 0;
}

for (const auto& [a, b] : std::views::zip(v1, v2)) {
// a and b are still references
b = 0;
}

for (const auto& [a, b] : std::views::zip(v1, v2)) {
std::cout << a << ',' << b << ' ';
}

return 0;
}
Anonymous No.106223299 >>106223789
Hey embedded guy have you ever heard of using Swift for embedded https://github.com/swiftlang/swift-embedded-examples
Probably not much reason to look into over Rust but I kinda like some aspects of Swift like easily being able to define extensions over standard traits.
Anonymous No.106223380 >>106223800
>>106223071
>It converts from some known endianess to the endianess of the machine the code is running on. It should be obvious.
I was talking about data conversions in general. Here it's obvious but with things like "from_utf8" you never know what's going on.
>Fixed size arrays are just composite type, they are bunch of bytes by value. C style strings, C++/Rust strings and memory slices are pointers. Fixed size arrays are not pointers.
I agree that in theory the compiler could do what it wants with a fixed size array and transform the callee and caller to use machine words for short arrays, but if it doesn not I don't see how a pointer or reference could be avoided.
>necessitate length checks, but also require a dereference and would not allow
Not necessarily, you could remove the bounds check inside and instead make the caller do it, if there is a need. The caller may already know that the output buffer is large enough or that the pointer into the input buffer is far from the end.
>99% chance you are just receiving a bunch of bytes
Of course, and yes you could load bytes individually and modify the endianness, but it's also possible to load 32 or 64 bits directly and then change the endianness, it will likely be faster. So that's not a necessity but it can happen and it can be desirable.
Anonymous No.106223402
>>106223164
That's probably exactly what it was. Vibe coding, and Linus shouting it down.
t. pogeet !!b2oSUmilA2N No.106223501
>>106222195
>Into the filters you go
unfortunately, I can't do the same.
>I really like how Rust solved this.
nah, Odin did it better
https://pkg.odin-lang.org/core/encoding/endian/
get_
put_

as straight forward as it could be
Anonymous No.106223598
>>106222540
that is the question
Anonymous No.106223789 >>106223998
>>106223299
No, I haven't. It looks interesting, but I think embedded is probably more suitable for systems programming.
>Probably not much reason to look into over Rust but I kinda like some aspects of Swift like easily being able to define extensions over standard traits.
Nice. What happens if you pass an array with different length?
One thing I like about Rust is how you can write such extensions for literally any type. You can use traits to add methods to primitives, tuples, singletons, even to the bottom type if you wish. You should be able to make something like a type level lisp interpreter, with code made purely out of zero sized types, with just singletons(atoms) and tuples(lists). An interesting idea for next project I guess.
Anonymous No.106223800 >>106225255
>>106223380
>Here it's obvious but with things like "from_utf8" you never know what's going on.
>Converts a slice of bytes to a string slice
It's pretty straightforward. It just takes some arbitrary bytes slice and reinterprets them into str if they are valid utf8. str is guaranteed utf-8 encoded string so that's why a byte slice [u8] and str is not the same thing.
>I agree that in theory the compiler could do what it wants with a fixed size array and transform the callee and caller to use machine words for short arrays, but if it doesn not I don't see how a pointer or reference could be avoided.
[u8; 4] is an array, not a slice or string or pointer. It's just 4 bytes by value, by definition. Just like a tuple (u8, u8, u8, u8) or struct { byte1: u8, byte2: u8, byte3: u8, byte4: u8 }, except they are guaranteed to be places one after another in memory and allows for numeric indexing. A callee receives entire array by value, as in memcpy'd not by reference. Notice no dereference in pic related.
>Not necessarily, you could remove the bounds check inside and instead make the caller do it, if there is a need. The caller may already know that the output buffer is large enough or that the pointer into the input buffer is far from the end.
All of this irrelevant if you just deal with bytes by value
>Of course, and yes you could load bytes individually and modify the endianness, but it's also possible to load 32 or 64 bits directly and then change the endianness, it will likely be faster. So that's not a necessity but it can happen and it can be desirable.
Yes, and that's what you archive when you do some_byte_iter.array_chunks().map(u32::from_be_bytes). No need to wrestle around with pointers, alignment, etc.
Anonymous No.106223823 >>106225100 >>106227824
>>106205050
>>106205832
Yeah, this general was so much better when everyone was posting the same programming challengle.jpg for the 9000000th time proceeded by 5 retards only trying to do the fizzbuzz one.


KYS.
Anonymous No.106223998 >>106224156
>>106223789
>What happens if you pass an array with different length?
The wrong thing in that case most likely since it just reads from the start.
You can extend types directly in Swift as well, extending traits is just more general.

Also I hadn't seen this before
https://github.com/swiftlang/swift-embedded-examples/tree/main/Tools/SVDs
Not Swift related but having a machine-readable spec of MCU IO maps to autogenerate code from is a cool idea.
Anonymous No.106224065
>>106223164
now I want to know if the guy who submitted passed Linus' answer to the LLM in question
Anonymous No.106224079 >>106224156
Which local llm do you use to help assist you? is devstral-small-2507 any good?
Anonymous No.106224156 >>106224234
>>106223998
>You can extend types directly in Swift as well, extending traits is just more general.
Oh yeah, you can do that in Rust too. But there is no generic traits for numeric types in std though, so you would need to resort to some crate or define them yourself.
You can also blanket implement traits for more complex scenarios with generic bounds. Like:
impl Foo for T
where T: IntoIterator,
F: Copy + Ord + AsRef<[u8]> {

Which reads as implement this trait Foo for any such T that can be converted into an Interator which will yield elements of type F which can be cheaply copied, form a total order and acts as a reference to a slice of bytes. Swift is functional AFAIK so I guess you can do something very similar in it too.

>https://github.com/swiftlang/swift-embedded-examples/tree/main/Tools/SVDs
I have no idea what this is to be honest. Is this like a definition standard for generating HALs? It kind of looks like what they call PAC in embedded Rust. Which is the minimal abstraction that allows you to freely control any registry. On the other hand HAL is a little more high level, giving you minimal interfaces to control entire peripherals without having to worry about setting up every registry yourself.

>>106224079
I don't. I asked chatgpt-o4 once to generate types for a json and it did rather bad job.
Anonymous No.106224234 >>106224298 >>106224328
>>106224156
The one thing that bugs me about how its done in Rust is that whole getting an error for trying to define an extension on a type or trait not defined by the current trait. I know it's for a reason and there are workarounds but it's still kinda annoying.
Anonymous No.106224298 >>106224328
>>106224234
It's much better than dealing with tricky coherence issues on dependency update. It would really make it extremely hard(or impossible) to avoid breaking stuff downstream when you change or add impls. (I will still take this over SFINAE any day all day)
However using supertraits and repr(transparent) wrappers+Deref makes this nonissue if you are just writing an application, you just need to learn these few tricks. Realistically, it is only an issue in some cases when making a library, but it's just matter of making a PR to whatever library you use with some conditional peer deps impls you need.
Anonymous No.106224328
>>106224234
>>106224298
Oh, and it's not an issue if you just want to "define an extension on a type or trait not defined by the current trait". Coherence rules only apply if you try to implement an external trait on an external type. But any external type can be made into a non-external one simply by
struct FooEx(Foo);
impl Deref for FooEx {
type Target = Foo;
//...
Anonymous No.106225100
>>106223823
Shut the fuck up zoomer
Anonymous No.106225255
>>106223800
>All of this irrelevant if you just deal with bytes by value
Ok I see what you meant by "fixed size arrays are not pointer" now, you're right.
Anonymous No.106226941 >>106227247 >>106227395
Anonymous No.106227225
>>106220587
Yes. It's supposed to be a closed loop ecosystem and a demonstration for my webshit skills so i can complete my degree. I can also configure it to run on AWS or some cloud bullshit if need be.
Anonymous No.106227247
>>106226941
nen echi
Anonymous No.106227395
>>106226941
Anonymous No.106227824
>>106223823
Fizzbuzz was always a stupid easy task that was only ever used to filter out absolute shitters. Still works for that if you can keep them from using an AI while doing the test in front of you...
Anonymous No.106227896 >>106228471
>>106222565
>integer types should not be used to store integers from non native endianess
Except you need to communicate with other devices sometimes, and those other devices may demand that binary data be presented to them in particular endiannesses. And you also need to be able to handle binary file formats that have particular endiannesses in them.
Or maybe you live in a sufficiently insulated little world that you can get away with pretending that you don't need any of that, but that's like putting a paper bag over your head and pretending the world can't hurt you.
Anonymous No.106228471 >>106230364
>>106227896
You should have read my post to the end. I explained what I do in literally the next statement after the one you've quoted.
Instead of using wide integers to store integers from other endianness, I store them in byte arrays. u32 has the same size* [u8; 4], but the latter makes it clear you should not be treating this as a regular integer. And it makes complete sense, if you try to do arithmetic on it you will get garbage, it should only be treated as bunch of bytes to be further parsed before it can be used.
For example consider this: >>106217241
MCU I am using is little endian, but the screen I am using is big endian(pixels are 16 bit rgb565). So my framebuffer(which is conveniently also a DMA buffer) is a plain [u8] byte slice(which is what SPI expects anyway), despite being actually an array of u16, just in different endianness. And a procedure to fill it with single color looks like this:
pub fn fill(&mut self, color: Color) {
self.buffer
.as_mut_slice()
.array_chunks_mut()
.for_each(|chunk| *chunk = color.as_u16().to_be_bytes());
}

I wouldn't store these colors as u16 in the frame buffer because me, or someone else, might accidentally read it and assume it's a native integer.

*although their size is the same, the aliment is not. [u8;4] has alignment of 1 byte. This might make them easier to compact and save space in some scenarios, but also might back fire if you are using extern "C" and trying to do FFI to different endianness for some retarded reason. In that case, you shouldn't use fixed size arrays anyway since C has no such thing.
Anonymous No.106228680 >>106229969
Another reason to why I think you shouldn't use plain integers to store numbers from different endianness, imagine doing this with floats...
It's an extreme example and has serious technical merit to why do it, but even despite the fact that integers uniformly fill entire range of possible values no matter the endianness, it still does not support operations you would typically expect from an integer.
t. pogeet !!b2oSUmilA2N No.106229962
bump
Anonymous No.106229969
>>106228680
>imagine doing this with floats...
so what
>it still does not support operations you would typically expect from an integer.
that's gayest things any programmer ever said
Anonymous No.106230277
>>106197035 (OP)
https://www.youtube.com/watch?v=VYkNP9uvLV8
kek, this mexican guy made a 40 minute tier list video, and literally translates every sentence into english.
He says everything twice.
Anonymous No.106230342
>>106197035 (OP)
fuck all right now, between semesters so im taking a vacation for the first time in three years
current project is just expanding knowledge on networking
Anonymous No.106230364
>>106228471
oh hey ive done yuge fuck ints too
Anonymous No.106230443 >>106230546 >>106232931
Did anyone meet Laurie at DEFCON?
Anonymous No.106230467 >>106230999 >>106239046
>>106220384
typedef struct {
uint16_t hi, lo;
} args_make_u32_from_two_u16;

static inline uint32_t fn_make_u32_from_two_u16(args_make_u32_from_two_u16 args) {
return ((uint32_t)args.hi << 16) | args.lo;
}

#define make_u32_from_two_u16(...) fn_make_u32_from_two_u16((args_make_u32_from_two_u16){__VA_ARGS__})

int main(void) {
uint32_t x = make_u32_from_two_u16(.hi = 0xabcd, .lo = 0x1234);
printf("x = %" PRIx32 "\n", x);
}
Anonymous No.106230546
>>106230443
Shadow like a grandfather clock as she walks by
Anonymous No.106230864 >>106231896
Each day I visit this thread hoping to see maids discussing their projects. Each day I am disappointed.
Anonymous No.106230999 >>106231089
>>106230467
now it can't be parsed without being preprocessed first
if you have to do this with a macro or function, name it cat16 or something that has the connotation of a left to right order and hope the caller gets it
Anonymous No.106231089 >>106231162 >>106231356
>>106230999
It's a solved problem, Linus is just a boomer
Anonymous No.106231150 >>106231249 >>106231282 >>106231319
Hey guys. I was wondering if you guys could point me to a resource/lecture so that I can learn how to manipulate sums this way(pic related) in order to complete the exercises on this book on algorithms that I am currently reading. The book is called "The Algorithm Design Manual" for anybody curious.
Anonymous No.106231162
>>106231089
nope
you're just an incompetent nigger who gets lost in trivialities instead of getting shit done
Anonymous No.106231249 >>106231286 >>106231319
>>106231150
I don't know but some of the steps here are pretty obvious, e.g. "1 for each k in 1..j inclusive" that's just counting, it's going to be j.
Then splitting sums is a common trick. 1 to i are values that shouldn't be part of the sum but 1 to n includes (hence the subtraction).
The next step is a known formula for the sum of n from 1 to n, you can work it out by pairing high and low terms but you usually just remember it.
Sums are linear when it comes to terms that don't use the sum variables, e.g. sum_i (ka + b) = k sum_i a + sum_i b.
I think for the rest it just uses known formulas for the sum of n^2 and n up to n but subtracts the final one (because the sum is to n-1, not to n).
Anonymous No.106231282 >>106231292
>>106231150
https://brilliant.org/wiki/sum-of-n-n2-or-n3/
https://math.colgate.edu/~rstephens/CalcII/Series_Index.pdf
https://seriouscomputerist.atariverse.com/media/pdf/book/Concrete%20Mathematics.pdf Chapter 2
Anonymous No.106231286
>>106231249
Thanks for the insight. I will probably spend some time solving sum problems to get more comfortable with the notation and learn some sum formulas so that I don't get lost between steps.
Anonymous No.106231292 >>106231319
>>106231282
Thank you so much. I will go over all of these.
Anonymous No.106231297
Currently overhauling the code for a class I'm TAing in university this upcoming semester. I'm trying to make a Python script that controls a remote controlled car via keyboard input. I tried using pynput, but it didn't work. Should I just use input() or are there more convenient packages I can use for this?
Anonymous No.106231319 >>106231341 >>106231371
>>106231150
>>106231249
>>106231292
I was taught this at school shortly prior to university incidentally. Also you can re-arrange nested sums if they're either finite or if they are infinite and converge (and the sum start/end does not depend on the outer sum variable). i.e. sum_i sum_j f(i, j) = sum_j sum_i f(i, j) for either a finite sum or a converging infinite sum. For finite ones you can just imagine you're doing a sum for (i, j) in the cartesian product.
Incidentally I did start (I can't remember if I finished?) Knuth's book anon linked there and it does have a whole section on sums. It's quite dense though.
What might help you is to think of it in programming terms
int x = 0; // imagine this is infinite precision
for (int i = 1; i <= n; ++i) { // sum(i = 1 to n)
x += i; // i
}

and to think of what refactorings are available that preserve the result
Anonymous No.106231341
>>106231319
Pretty cool tip. Thank you anon, I will keep that in mind.
Anonymous No.106231356
>>106231089
if you want to go anywhere with C you need to be comfortable with simple bitwise manipulations like that
Anonymous No.106231371
>>106231319
>they're either finite or if they are infinite and converge
brings me back
Anonymous No.106231653 >>106231729 >>106231882
>what are you working on /g/?
novel volumetric fog algorithm for my game engine using analytical integration rather than raymarching
Anonymous No.106231729 >>106232038
>>106231653
how does it work?
Anonymous No.106231882 >>106232038
>>106231653
I don't care about making games at all but I've always found making and improving a game engine very interesting.
Anonymous No.106231896 >>106238608
>>106230864
The biggest maid project is still active anon
https://github.com/reshsix/libmaid
Might be getting some really interesting additions soon
Anonymous No.106232038
>>106231729
based on this paper if interested. tl;dr you evaluate the integral from the eye to world point to see how close the ray passes to your light sources, with features like fog density functions replacing traditional SDF https://www.cs.columbia.edu/~bosun/images/research/sig05/download/rtsc.pdf

>>106231882
same desu. I've only made a couple games with it but spend hours upon hours adding niche features for my autistic pleasure
Anonymous No.106232259 >>106232270 >>106232478 >>106232510 >>106232898
Seriously meant question. How much code do you generate with LLM?
Anonymous No.106232270
>>106232259
Zero. But I do get paid to fix up dogshit code generated by LLMs, so I'm happy :)
Anonymous No.106232308 >>106234060
I found this old minipad and I made a collection of scripts that let me use it to do stuff. the actual functional buttons being the rows in the bottom right and then 4fun just made it flash some letters and a volume meter across the top.

eventually want to make it easier to program by holding the button down and recording key stroke macros or selecting executables (possibly with a gui) cause right now that shit is hardcoded in profiles. But it does switch profiles based on window titles so I've got that going for me.
Anonymous No.106232446 >>106232788
>>106220151
>>106220240
post the audio files it generated
Anonymous No.106232478
>>106232259
None. Languages with macros makes LLM irrelevant.
Anonymous No.106232510
>>106232259
intellisense has existed for decades bro
Anonymous No.106232559 >>106232603 >>106232898
vibe coding lessens the demand on your mind and body allowing you to produce material while absently rubbing your hand all over your dick. it used to be once you caught yourself doing that you had to sit up straight and refocus, but now you can just keep it like that the whole time. i can work for hours on end now. thanks chat gpt
Anonymous No.106232603 >>106232623 >>106232681 >>106236062 >>106236328
>>106232559
the AI bubble is going to burst soon, isn't it?
Anonymous No.106232623 >>106232898
>>106232603
It seems to me that, on the contrary, it's growing. Many of my colleagues at work are starting to generate most of their code. Not that they don't review it or generate it blindly, but they generate more than they write themselves.
Anonymous No.106232681 >>106232805
>>106232603
These things can lurch along half-dead for remarkably long amounts of time, thanks to the sunk cost of the wealthy idiots whose cash we're burning
Anonymous No.106232728
>>106205050
I refuse to believe vibe coding is real actually being used to self-describe, it's supposed to be a term for people who don't know anything and just use LLM's to (extremely poorly) make things for them
Anonymous No.106232788
>>106232446
Here's from the tracker version, not the normal crys version
sorry for bad audio, recorded from phone
https://vocaroo.com/18kQ6ynI6FBa
Anonymous No.106232805
>>106232681
>he thinks it's their money
Where do you think they got the money from? The government prints it out of thin air because they control the money supply.

But nooooo we can't have a free market where bullshit like this is illegal noooooo!!!!
Anonymous No.106232865 >>106232898 >>106232907
Do you recommend using llms to learn about programming languages? E.g. I'm currently trying to learn more about c++, and so far llms answer questions and give example code, or should I just read the articles on cppreference.com?
Anonymous No.106232880 >>106232891
automatically adding

udm=14

to my browser's search bar was the best thing I've done all year
Anonymous No.106232891 >>106232904
>>106232880
>using google's search engine in 2025
Anonymous No.106232898
>>106232259
>>106232559
>>106232623
>>106232865
I've got spammed by ads all my life and I never cared about the product, I'm not going to care now for this literal dogshit.
Anonymous No.106232904 >>106232963
>>106232891
what do you use?
Anonymous No.106232907
>>106232865
It can be useful when you're not sure how to phrase questions, or haven't got the right keywords.
But you need to verify what it says with traditional methods because they talk a lot of shit.
Anonymous No.106232931 >>106232998 >>106234516
>>106230443
Yeah I saw Laurie, had a black top with a red mini-pencil skirt IIRC and was talking with a group of people, and I didn't want to bother them.
it's too bad, I have one crucial question I just HAVE to ask ""her""
Anonymous No.106232963
>>106232904
https://find.4chan.org/
Anonymous No.106232989 >>106234050 >>106236946
making a reverb vst plugin to generate impulse response buffers for different shaped rooms
Anonymous No.106232998
>>106232931
next time then
https://i.4cdn.org/wsg/1754986283634150.mp4
t. pogeet !!b2oSUmilA2N No.106234050
>>106232989
noice!
also, bump!
Anonymous No.106234060
>>106232308
When I got my hands on a minipad like this, I made a program that reads OSU! maps and plays them on it. I never really went around making it read your input and give you score though.
Anonymous No.106234516
>>106232931
I want to suck her girlcock so bad bros...
Anonymous No.106234723 >>106235001
>>106197035 (OP)
I wrote a simple compacting garbage collector in Forth. It's not polished however and I'm going to revisit some implementation details that I don't like about it. For the use case I'm thinking about a domain specific language that deals with strings, but this could also be easily used for heap allocating objects for OOP, but I've not experimented much with object oriented Forth yet.
Anonymous No.106234850 >>106234938 >>106235139
Is there a place to practice what you learn/know?
Anonymous No.106234938
>>106234850
Yeah, your IDE
t. pogeet !!b2oSUmilA2N No.106235001 >>106235130
>>106234723
>object oriented Forth
I like forth and never knew there was such a thing, will look into it. Thanks for sharing.
Anonymous No.106235130
>>106235001
Apparently the largest Forth program known is OOP and contains millions of lines of Forth according to Stephen Pelc (one of the commercial Forth developers, VFX Forth). There are many ways to do OOP in Forth. The one I briefly looked at was miniOOF due to how tiny it is: https://github.com/forthy42/gforth/blob/master/mini-oof.fs
Anonymous No.106235139
>>106234850
a job
find an open source project to contribute to
work on your own project
Anonymous No.106235268 >>106236940 >>106238184
Gonna write a metaprogram layer that lets me do OOP in Jai
I'll call it Jai++
Anonymous No.106235272
>>106214557
telegram bot?
Anonymous No.106236062
>>106232603
if the retarded crypto bubble (not actually useful and important crypto like monero) hasn't burst yet, I get the feeling AI will never go away. society is just changing.

congrats. you now understand how your great grandparents felt about the television or whatever.
Anonymous No.106236328
>>106232603
No, it's not going to. You will have the 10x engineers earning even more money (basically use AI models to write code and act as a reviewer + use your advanced knowledge to properly guide the AI) while the demand for less skilled programmers will drop (no need for a person who not only does not know anything but also is less productive than AI).
Anonymous No.106236663
I believe I've acheived AGI in pic rel. Where is my VC money?
Anonymous No.106236940 >>106239500
>>106235268
>Jai++
>not Kai or Jaj
Anonymous No.106236946 >>106240452
>>106232989
let's hear it (benis shape room)
Anonymous No.106237058
https://github.com/haskell/core-libraries-committee/pull/354/files
>Propose values we commit to
which monad prevents this unwanted effect?
Anonymous No.106237692 >>106237823 >>106237907
>be burgers
>invent a classy software industry
>invent software engineering
>1996
>prefer to flood the internet with shitty .com web stores
>suddenly prioritize time to market over bugs
>condition the entire world to accept bugs as normal
>rewrite textbooks to disregard software engineering
Anonymous No.106237823 >>106237841 >>106237907
>>106237692
you forgot:
>require everyone to have an expensive college degree to work in the field even though everything you have was made by people without degrees
>market is now saturated with CS grads
>complain that there aren't enough tech workers
>import 5 million jeets to write corporate jankware
>jankware ends up costing companies more money
>embedded jankware ends up costing people their lives
>your projected profits in the next 5-10 years will plummet to third world levels but at least you made a few stock portfolios look good
I hate my country so much it's unreal.
Anonymous No.106237841 >>106237891
>>106237823
there's no way you hate your country as much as unreal engine 5
Anonymous No.106237891 >>106237899
>>106237841
I hate my country as much as i hate the rust programming language
Anonymous No.106237899 >>106237914
>>106237891
sadly there's more than a 59% chance your country will still be around next year
Anonymous No.106237907 >>106238022 >>106238411
>>106237692
>>106237823
US culture is severely unbalanced due to being constructed by masons and protestants
The value on productivity is way too high, while rest, arts and entertainment is seen as something bad unless it can be made a profit of
The country is basically a balloon being inflated with air, with no solid base for the immense growth it has, so to keep things from exploding they needed corpo and woke ideologies to make everything the safest as possible
Anonymous No.106237914
>>106237899
At the very least, there's the same percentage of chance that the rust devs won't be sticking around long enough
Anonymous No.106238022 >>106238194 >>106238461
>>106237907
>The value on productivity is way too high, while rest, arts and entertainment is seen as something bad unless it can be made a profit of
You're kind of correct in a few areas but the premise that we can agree on is that we americans don't value quality anymore. We place too much of an emphasis on quantity. In corpo spaces, you'll hear the most famous jargon word called "cost effectiveness". That word enables sales teams to make engineering decisions that impact the quality of the product. If you talk to a bunch of american car repair guys, their complaints about modern cars are all the same. Plastic this, "smart"that, proprietary this, expensive and laborious procedures, etc.

>The country is basically a balloon being inflated with air, with no solid base for the immense growth it has
This. We have no manufacturing base, no productive exports, no emphasis on domestic knowledge or expertise. All we have are layers of financial abstractions built on a dwindling hard commodity base that gets outsourced in pieces year by year, decade by decade, jeet by jeet, chink by chink.
Anonymous No.106238184 >>106239498
>>106235268
Doesn't look like this is possible in the way I was hoping it would be
You only get access to ASTs after they're typechecked and you can only modify procedure bodies as far as I can tell. The compile time code injection stuff seems more tuned for instrumenting than rewriting stuff arbitrarily. Not sure if macros would be a better avenue.

I get that Mr. Blow has a massive hate-boner for anything resembling OOP but some simple mechanics would have gone a long way. This crap about having a tag enum for subclasses and then switching at runtime is retarded.
Anonymous No.106238194 >>106238244
>>106238022
>We have no manufacturing base, no productive exports, no emphasis on domestic knowledge or expertise. All we have are layers of financial abstractions built on a dwindling hard commodity base that gets outsourced in pieces year by year, decade by decade, jeet by jeet, chink by chink.
it's easy to blame corrporations and shit, but we also have a people that purchases retarded shit and is susceptible to behavioral science campaigns designed to maximize the wealth of executing groups (basic human behavior, which will never be ridded of, so one ought to design a system that works with human behavior to optimize for societal growth).
the common man is the problem.
Anonymous No.106238244
>>106238194
>the common man is the problem.
I agree and was also getting to that issue. Unions, lobbyists, people's voting patterns, politicians and their self serving interests are all to blame for it at the very core of this issue. I'm not blaming corporations, I'm blaming the kinds of short sighted people that run everything. Everyone over here in america is a high time preference fool. We're all in a race to the bottom.
Anonymous No.106238322 >>106238357 >>106238391
Are C and C++ the only viable options for high-performance desktop GUIs?
Anonymous No.106238357 >>106238422
>>106238322
>high performance
define your problem domain, and what exactly you mean by "high performance"
Anonymous No.106238391 >>106238420 >>106238422
>>106238322
GUIs are typical example of IO bound application. Performance of the GUI part itself doesn't matter. What matters is the performance of the system they interface to.
Anonymous No.106238411
>>106237907
>The value on productivity is way too high
I'd say big corpos no longer care about producing anything. That world is no more. Now they get their revenue from signaling and being in cahoots with the money printerers.
Anonymous No.106238420
>>106238391
Haskell GUI...
Anonymous No.106238422 >>106239878
>>106238357
I'm trying to make a rofi clone and I need it to start like really quickly. Plain X11 in C/C++ seems to be the fastest. GTK is sloooow.
>>106238391
It's just an application launcher.
Anonymous No.106238461 >>106238507
>>106238022
>we americans don't value quality anymore
But the media says you burgers are now into good jeans. Can you make software great again?
Anonymous No.106238496 >>106238536 >>106239458
>>106197035 (OP)
i'm working on something called trying not to jump off a cliff (stopped caffeine cold-turkey yesterday)
Anonymous No.106238507
>>106238461
>Can you make software great again?
Absolutely. I'd like to make a lot of things great again, but i think I'd like to move to Brno, Czechia. It isn't just software that i'm interested in, but it's Mechatronics.
Anonymous No.106238536 >>106238573
>>106238496
anon why the FUCK would you quit cold turkey? that shit's honestly worse than cigs for quitting. I remember wanting to vomit.
Anonymous No.106238573
>>106238536
i don't have the discipline to ease off. i just tank it for a few days and it's all good.
Anonymous No.106238608 >>106238823
>>106231896
I'm glad a project is active, but I miss the actual maid threads and maid posts. Eli is permabanned and has been credibly threatened by glowies. I was worried that Ellen was dead, because the same people who got Eli are after her and they are way more likely to just shoot a Mexican than a Jew. If her project is still active, she probably isn't, assuming it is still her running it and it hasn't been taken over by someone responsible for inserting backdoors into libmaid. Even Maid Research threads made by random lower profile maids just get deleted within minutes of posting.

https://desuarchive.org/g/thread/106167821/#106167821
Anonymous No.106238823 >>106238874 >>106239826
>>106238608
There's no conspiracy that big happening anon...
I didn't post much as Ellen Joe since maid threads were banned, and was building another identity/group for my projects
I believe Eli and the maid threads are banned because of the insistence on embedding data into images, thing that I have opposed myself and tried to find alternatives to
I personally believe there could be a truce with the jannies if we shared code normally and didn't derail other threads
I'm also not a Mexican...
Anonymous No.106238874 >>106238913
>>106238823
(I am half black half abo)
Anonymous No.106238913
>>106238874
I'm half-divine and half-atlantian, one hundred percent babylonian
Anonymous No.106239046
>>106230467
I assume you don’t use those long snake case var names in production.
Anonymous No.106239340
I assume that none of you work in production or this industry is doomed.
Anonymous No.106239458 >>106240506
>>106238496
Caffeine is literally the worst stimulant in existence.
Anonymous No.106239498
>>106238184
>Doesn't look like this is possible in the way I was hoping it would be
>You only get access to ASTs after they're typechecked and you can only modify procedure bodies as far as I can tell.
Dead on arrival. Compiler hooks my ass.

I don't really understand what features you need to implement to have OOP though. You want to automatically generate virtual table and have an implicit self parameter? and what AST access do you need to implement this? Regular macros / code insertion that work before the type checking? access to the symbol table maybe?
Anonymous No.106239500
>>106236940
Jbi
Anonymous No.106239826
>>106238823
>she took off her maid dress
Anonymous No.106239878 >>106240441
>>106238422
raycast for macos is really responsive (more than native spotlight) and is written in swift, and has some rendering engine it seems too for react.
Not sure the language matter much, as long as it doesn't have a GC, I would imagine what really matters is a gui lib that also has low latency
Anonymous No.106240441
>>106239878
Interesting. So I guess X11 is the way to go. Although what's really annoying is that when using Cairo, the text takes like 100ms to appear after the window.
Anonymous No.106240452
>>106236946
Anonymous No.106240506
>>106239458
This but the opposite.
Anonymous No.106241615
How come uProf disables hardware performance counters if you have Virtual Machine Platform enabled? Is it inaccurate for wsl, inaccurate while wsl is running or what? If it's good some of the time it would be good to have an option to enable it because you can still collect through the CLI
Anonymous No.106242003 >>106242064
>raw dogged 300+ lines refactor updating multiple services in one hour
>everything works first try
I love statically typed languages so much it's unreal.
Anonymous No.106242064 >>106242311 >>106242406
>>106242003
have fun in your type system chastity cage appeasing the hateful dominatrix you call a compiler
Anonymous No.106242311
>>106242064
>everything is a map
>just add more keys bro
>no you CANNOT remove or change code, only extend it
I'm good.
Anonymous No.106242406 >>106242456 >>106242585 >>106243122 >>106243380
>>106242064
Types are the programming equivalent of training wheels. If you somehow have a problem with them, that is just a massive skill issue on your part. I like dynamically typed languages and usually make fun of people who feel types are beneficial for any reason, or brainlets who claim dynamically typed languages are hard to read, but this is just pathetic.
Anonymous No.106242456
>>106242406
post code faggot
Anonymous No.106242585
>>106242406
>what does this return
>map
>and this
>map
>and this
>map
>and this
>map
>WTFFFFFFFFFF WHY DID IT EXPLODE ON STEP 20 WHY DIDNT YOU PUT :cocks 6 IN THE TRANSDUCER ACKKKKKKKKK WRITE MORE TESTS MORE TESTS AND DON'T TOUCH IT
Anonymous No.106243122
>>106242406
nice fizzbuzzer take
Anonymous No.106243380
>>106242406
based test appreciator
based introspective soul
based REPL connoisseur
Anonymous No.106243558 >>106243562 >>106243811 >>106243921
Vibe coding WIP
Don't steal!
Anonymous No.106243562
>>106243558
Anonymous No.106243811
>>106243558
omg I love Oatmeal Creme Pies
Anonymous No.106243921
>>106243558
If you guy were the inventor of Facebook, you'd have invented Facebook.
Anonymous No.106243965 >>106244021 >>106244613
I keep flip flopping from wanting to write a programming language to writing a game engine and making progress in neither.
Anonymous No.106244021
>>106243965
Why not make your programming language and write your game engine in it? That's what they are for. It could make writing the game engine easier/a lot easier but that's on you.
Anonymous No.106244339
me pianogramming while waiting code to compile
Anonymous No.106244613 >>106244985
>>106243965
such a short and simple post yet it's like a disappointment concentrate
>a game engine, aka. the second most poser-thing someone can be writing
>a programming language, aka. the absolute most poser-thing someone can be writing
>"wanting to", not even actually writing anything
Anonymous No.106244910 >>106245686
>bump limit
see you in 3 days /dpt/
Anonymous No.106244985 >>106245648
>>106244613
>>a programming language, aka. the absolute most poser-thing someone can be writing
There is a real need but the plebs are making bad/useless/not-good-enough-to-switch languages and with shit implementations. This includes all the LLVM languages.
Anonymous No.106245648
>>106244985
>There is a real need
what's the need?
Anonymous No.106245686
New thread:
>>106245679
>>106245679
>>106245679

>>106244910
Lazy people not just OPing threads.