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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


What are you working on, /g/?

Previous:>>108425619#
>>
>>108471984
>What are you working on
On you mom.
>>
>>108471990
I have 2 dad's
>>
>>108471998
Did your dad's penis exploded when you came out ?
>>
>
>>
>>108471984
>protection argument and protection macros are actually capabilities
arguably worse than using such generic names to begin with
>>
File: kernighan.jpg (21 KB, 314x370)
21 KB
21 KB JPG
>>108472023
You have to be at least 58 to post here.
>>
>client has one developer in the project
>he keeps pushing ai-slob to the repo
I don't know, maybe I will start searching for a new job
>>
>>108472023
If hyena females can give birth through pseudo penis then why cant his dad?
>>
>>108472450
I just do this shit as a hobby for fun. I'm pretty grateful that I don't do it for pay, because I know I'd absolutely hate it unless I got to work with real 90's style bros.
>>
>>108472461
because we're not hyenas, nor hippocampuses, nor changing-sex frogs
>>
File: 1771673829148977.png (86 KB, 1050x520)
86 KB
86 KB PNG
>>108472503
As long as you're able to question the LLM.
Most vibe-coders can't.
>>
>>108472747
I've used duck ai sparingly for things like making practice problems for concepts while I'm learning etc. I try to stay away from it mostly.

Even as a newfag, i can see major failings when working with something newer, that doesn't already have years worth of reddit and stack overflow chatter to regurgitate, it starts just making stuff up about loosely related topics or old versions with completely different functions and syntax.
>>
>>108471133
I thought I knew Rust and I actually enjoy some of the things it makes you think about, like templates and shit (although I don't really use templates yet), put in a silly way, I enjoy all the angle brackets and having Vec and String in the std library and all.

But I'm writing some stuff that has me parsing shit and using iterators, iter(), into_iter(), clone() and all that is just annoying me the fuck out.
>>
File: larp.jfif.png (649 KB, 746x490)
649 KB
649 KB PNG
Hi dptwg friends, for past 4-5 years most of my coding experience is coding very specific stuff based on documentation without many skills that transfer between tasks.
Is that actually normal?
>>
>>108473065
What language? Are you like going through tutorials for stuff?
>>
>>108473138
It's for work, not for education/hobby btw.
>What language?
Usually:
>ksh, bash
>python, go
>boomerstuff like tcl, autoit
>very rarely perl
Are you like going through tutorials for stuff?
Usually documentation for whatever needs to be coded.
>>
File: internet_currency.jpg (345 KB, 1377x600)
345 KB
345 KB JPG
I'm trying to make some classic CRUD webshit. What's the least pain-in-the-ass way to do it (without vibecoding it)? Is Rails still the way?
>>
>>108473387
My only experience was js, html/css, flask, sqlite weeks in CS50. I had fun with, but it wasn't my calling.
>>
>>108473193
Why not try out a full course? You'll probably already know huge sections of the material, but it may tie a lot of the disparate stuff together.
>>
File: 1750237153904667.jpg (129 KB, 660x371)
129 KB
129 KB JPG
>>
What's a good way to improve your pointer handling skills?
>>
File: 1710651471327663.jpg (32 KB, 563x585)
32 KB
32 KB JPG
>>108474070
Program enough assembly that you just develop an intuition. I recommend Game Boy ROM hacking.
>>
>>108474070
Research pointer provenance.
>>
File: 1764858927571292.png (653 KB, 1476x1149)
653 KB
653 KB PNG
>>108474070
>>
>>108474070
implement data structures and memory allocators in C
>>
>>108473619
What course?
>>
>>108474256
Idk. Intro cs course, something project based and more narrow, etc.
>>
What the f, I can't understanding anything from the C# documentation on the Microsoft website, it's as if it was written by a jeet. Have no such problem on w3schools, C or C#.
>>
>get one of those newfangled hybrid linux single board computer - microcontroller arduino uno-q boards that qualcomm came out with after the acquisition
>communication with the microcontroller is meant to be done over messagepack based rpc through a unix local socket
>C libraries for the microcontroller
>only python libraries for the linux side
gee thanks qualcomm
gotta love python being used needlessly in resource constrained environments

also like half the pins are fucking unusable because they use a non-standard size, are female, and arduino still hasn't come out with anything that can use them
i've ordered some wire of the same thickness and i'm going to try and jury rig some connectors
i understand why it took them a while to come up with an attachment that actually does something but why wasn't the breakout board released immediately, it's not like it needs effort to make

but other than that it's pretty nice, gonna use it for arm development
>>
Realized today I have been coding without an IDE for 3 months, man I love AI
>>
>>108475394
that is because the C# documentation is split up between C#, .NET, all the .NET API subpages, ASP .NET APIs, .NET framework (legacy) (still used for content that doesn't have equivalent up to date documentation in regular .NET, and there will be a fair bit of important stuff missing, for example all the native interop pages are framework and are missing all the improvements made since)
i don't remember where you're actually supposed to start, I think it's at .NET
there's not really any rhyme or reason to how they connect either
>>
>>108475450
Big oof...
>>
>>108475450
>there's not really any rhyme or reason to how they connect either
Microsoft have always had trouble understanding the web. I guess it's antithetical to their corporate culture.
Which is the dumbest thing ever, outside of politics (pick your poison there, IDGAF).
>>
>>108474070
this is like asking "whats a good way to improve your integer handling skills" wtf does that even mean?
>>
Does Claude use real programmers to nudge the AI when you're trying to fix a bug?
>>
>>108471984
>coding in the big 26
Unc thread
>>
>>108471984
A GUI library for my hobby /gedg/ projects.
Lua is the tits.
>>
>debug some Vulkan shit
>hook into RtlFreeHeap to see when the pointer from vkDestroyImage is being passed to it
>first call isn't it
>second call isn't it
>third call isn't it
>fourth call isn't it
>...
>after two dozen or so calls the pointer doesn't appear
>but the debug console has gotten a zero in
>a single zero
>apparently I missed the pointer, or it's never released via RtlFreeHeap
>continue stepping through RtlFreeHeap calls
>another two dozen calls in
>second character appears
>look at output code in question
>simple printf with one format string and four parameters
>requires two dozen allocations and releases for outputting a simple character

And I'm all out of Gin too. Fuck me. I hope that fucking Strait keeps on being closed forever, we deserve nothing less.
>>
File: my-chan.png (140 KB, 1791x952)
140 KB
140 KB PNG
I made a board with the Dioxus framework(Rust). Check it out. Also it doesn't support markdown, kek and it should say "Pick an image from the gallery".
It's already online, but it does have some bugs still.
>>
>>108474070
Just program. You'll get burned a few times and then you'll learn.
>>
>>108476488
>I made
Let me guess, a clanker made it?
>>
>>108471984
I was learning Vulkan but I have found the book I'm using is not very good.
>>
I wish there was JDBC for C++. ODBC sucks and SQLAPI++ is nonfree.
>>
>errno can have garbage values on success
How is that even possible, who is in charge of this shit
>>
>>108476912
Same people who thought that malloc having an arena parameter was too complicated, so they got rid of it: autists.
There's a reason they should be in cages.
>>
>this thread
back to shit again
>>
>>108473727
the text is barely readable
>>
>>108477049
Always was. It contains autists, after all.
>>
>>108476573
vkguide.dev is pretty good, it's one of the only resources that's actually kept semi up to date with recent vulkan versions
most of the resources out there were made when vulkan first came out and were never updated or otherwise still target vulkan 1.0 for no good reason
>>
indie gamedevs on modern platforms using a retro aesthetic are posers
real ogs dev for an actual retro console
>>
>noooooo you heckin can't use gets and scanf and malloc and and and
Well cniles, what parts of the standard library can I actually use?
>>
>>108477834
I think strlen, but only if you only need the string length, and not copy it or do other things with it afterwards - and only if you absolutely cannot deal with reading a little bit more than absolutely required.

Seriously though, the standard library was made for the lowest common denominator and is ridiculously outdated. Even memcpy has issues.
>>
>>108477834
?
I use malloc and sscanf a lot, well usually not directly because I have my own set of libraries on top of std.
But I think, if you are calling malloc directly you usually shouldn't.
Use container libraries.
I don't understand the fixation to just rely on standard library, even python fags don't use the arrays from the language, they always import numpy
>>
>>108477893
>Use container libraries.
These are even worse.
>>
>>108477834
>gets and scanf
gets() is a no go because of bounds checking. Play around with fgets().

scanf() is fine for what it's actually meant for, pulling in well formatted information. It's like printf in reverse. You wouldn't just take a shitin printf and expect magic on the other side, but sometimes user input "do be like that". It doesn't have any guardrails for user input. You have to build your own.

It's frustrating at first, but just keep swimming. Direct user text and numeric input isn't generally as relevant as it seems when you're first learning.
>>
>c / cpp / rust
what is most common in embedded systems, and what are your predictions?
>>
>>108478219
>embedded systems
Ada mogs and only C is even remotely comparable due to ubiquity
>>
File: 1742757956432407.png (127 KB, 358x331)
127 KB
127 KB PNG
>>108477834
>you heckin can't use gets
Well yeah, they literally removed it.
>scanf
scanf is """fine""", but god damn it's such a pain in the ass to recover from malformed inputs because it may leave the stream in an indeterminate state, at which point fgets + sscanf is just way fucking cleaner.
%s is bad though.
>malloc
Please stop listening to the schizo.

>what parts of the standard library can I actually use?
The main landmine I really think (if you're actually looking to write robustly portable software) are anything related to locales and text encoding.
Most functions are fine, IF YOU USE THEM PROPERLY, which isn't something the language itself is going to protect you against.
Unfortunately there are some functions defined in terms of static/global state (e.g. strtok) which often means they need to be avoided, outside of the simplest programs.
>>
>>108477893
You should not use sscanf, have some dignity and parse the values manually.
>>
>>108477456
Yeah, Claude told l me that too.
>>
>>108472943
Iterators make writing parsers clean and elegant though. Also 99% of time you do not need to use clone() at all when doing parsing, just put everything under one lifetime of the source file/text/bytes and borrow spans of it immutably as much as you want. Once you get good at it, you can fairly easily create fast (and safe) streaming parsers that do not do any extra allocations.
>>
>>108478219
C is most common in embedded systems, with cpp being available on some more popular platforms. Rust is only supported on selected few, mostly the hobbyist ones, and it's early/pre-1.0 stage.
>>
>>108478278
>schizo
His posts are an interesting deep dive into interfacing with the kernel. Implimentation of his methods would basically require redefining the entire paradigm of writing a basic program. It's interesting stuff. Wonder what else is banging around in his brain.
>>
>>108476573
don't do this, instead just start the vulkan configurator and turn validation on
>>
>>108478340
His methods can't be implemented for most of the programs. It's not interesting, it's an incredibly naive approach from guy who is so self-absorbed he is deaf to any counter point.
>>
>>108478652
I'm allowed to find it interesting.
>>
>>108478652
>His methods can't be implemented for most of the programs.
And they can't because autism has penetrated every aspect of interface design. Instead of optimizing for global throughput our kernel interfaces are optimized for localized latency, and this lack of proper interfaces affect every software layer above them - and that's ignoring the lack of elementary features in the standards.

No, you wanna know what's *really* naive? What's *really* naive was assuming that memory latency and mode switching costs would simply disappear within the next ten years, as the chief autist Tanenbaum was (indirectly) proclaiming during his debate with Torvalds - and yet his autistic brethren ate it up, only to then project their own naivete onto others. You don't hear anything about those magical 200 MIPS, 64M SPARCstation-5 machines anymore (additionally confusing the raw compute with the memory bottleneck), do ya?
>>
>>108478340
>Wonder what else is banging around in his brain.
Nta but probably stuff that would put him on the FBI's most wanted list
>>
>>108478278
fgets is pretty useless. You have to constantly check if a newline is in the result buffer to know if the line is fully read and manually strip the newline character.
If you want to read the whole line, just use fgetc until it reads \n.
If you want to read partial line discarding the rest, just use scanf("%255[^\n]%*[^\n]\n"), so it actually reads the whole line and discards \n. The commonly used while(fgets(...)) to achieve this is wrong.
>>
Working on my language. Claude code cured my ADHD. I just got more shit done last week than I did last 6 months. And I'm reading everything its outputting and reviewing and committing it manually. Fucking insane
>>
>>108479493
>wrong
I love C but 15 different graybeards and or autists will battle with each other for ultimate supremacy, like a kung fu movie, with 15 different equally "wrong" ways of doing shit.

Wrong is a SEGMENTATION FAULT. Everything else is something for dudes to argue about all day.
>>
The segfault is the good ending.
>>
>>108477522
Those who do lowpoly because that's their skill level or preference are trvke though. Lowpoly is only lofi if it's decimated. It is not lofi if it's polymodelled. For example, drawing a hires texture and then downscaling it is one thing, but lowpoly as a style is not a result of decimation (3d downscaling), it is style of modelling itself. Similarly to cartoon blobby 2d characters not being result of downscaling photorealism. That's why it's also wrong to call it retro aesthetic a lot of time. It's only retro aesthetic if they deliberately try to emulate some particular old styles. Just modelling simple 3d models isn't that. Imagine if newbie 2d drawings were called retro because they're not as detailed and sophisticated as pro works. Nothing retro about that.
>>
>>108479680
And we all lived happily ever after at 0x0
>>
>>108479553
Try spinning up two more agents, one to review the output of the first agent and the third to keep the second on track. Your productivity will boost another 10-100x.
>>
>>108479800
Yeah but at some point I won't actually be doing anything. I want to craft the language and understand how it works. Claude led me through the implementation of a compacting GC which turned out to be simpler than I thought it would be. It was fun. I do use the agents for review, often use opus to plan and refine design documents and hand them off to sonnet to implement, then opus again to review.

I'd totally bang out a meta agent dev pipeline for a job though for what it's worth. Because I don't actually give a shit about the output just the dollars in my bank
>>
>official example of toggling pin on linux
I don't understand how they managed to make such a dumb API.


"""Minimal example of toggling a single line."""

import gpiod
import time

from gpiod.line import Direction, Value


def toggle_value(value):
if value == Value.INACTIVE:
return Value.ACTIVE
return Value.INACTIVE


def toggle_line_value(chip_path, line_offset):
value_str = {Value.ACTIVE: "Active", Value.INACTIVE: "Inactive"}
value = Value.ACTIVE

with gpiod.request_lines(
chip_path,
consumer="toggle-line-value",
config={
line_offset: gpiod.LineSettings(
direction=Direction.OUTPUT, output_value=value
)
},
) as request:
while True:
print("{}={}".format(line_offset, value_str[value]))
time.sleep(1)
value = toggle_value(value)
request.set_value(line_offset, value)


if __name__ == "__main__":
try:
toggle_line_value("/dev/gpiochip0", 5)
except OSError as ex:
print(ex, "\nCustomise the example configuration to suit your situation")

>>
>>108479569
>Everything else is something for dudes to argue about all day.
Wrong.

Superfluous memory accesses are wrong.
Incorrect caching policies are wrong.
realloc is wrong.
Loading data from a socket or FD one byte at a time is wrong (although the exact sweetspot is a lot more debatable, probably somewhere around 64 - 512 KiB on semi-modern CPUs).
Submitting one I/O request when the hardware has been supporting 32 requests for literal decades is wrong.
And overcommit is so goddamn wrong that I'm flabbergasted Linux is considered a stable choice for servers.
>>
File: 1766706018947816.png (698 KB, 956x723)
698 KB
698 KB PNG
Why should anyone care about functional languages?

After 50+ years functional languages managed to produce nothing of real value. procedural and oop languages made operating systems, browsers, game engines, databases and basically almost everything you see around you while functional languages achieved nothing. I feel like 50+ years is big enough of a timeframe to conclude that the paradigm though sounds nice on paper is a failure. Don't get me wrong it has some nice ideas like exhaustive pattern matching and optionals but other languages just stole those features anyway.
>>
>>108479942
Post feet
>>
>>108479942
there's absolutely nothing wrong with overcommit
>>
>>108476269
CODING IN THE NINETIES
https://www.youtube.com/watch?v=_Fxil2QY0wE
>>
>>108479990
Yeah, because bank runs don't happen in real life, too.
>>
>>108479943
>but other languages just stole those features anyway.
Other languages are welcome to continue stealing features until they reach parity
>>
>>108479942
>And overcommit is so goddamn wrong that I'm flabbergasted Linux is considered a stable choice for servers.
vm.overcommit_ratio = 99
vm.overcommit_memory = 2

Problem solved.
>>
>>108480039
Congrats, now your processes die randomly because they no longer get memory.
>also fork() still triggers overcommit

The real problem here is that developers are (right) afraid to use realloc, but instead of learning how to reserve high amounts of VAS and commit low amounts of memory (so that reallocations are zero-copy) they decided to request ridiculous amounts of memory via malloc instead. On sane operating systems (Windows) this doesn't fly due to its commit charge, but on Linux this is considered good engineering.

And people STILL listen to the Finnish retard. Unbelievable.
>>
>>108479942
https://m.youtube.com/watch?v=WUz-G-ejByI&t=17s
>>
>>108480060
for me, its mmap
>>
>>108480097
Problem isn't just the interface, it's the semantic. You need PROT_NONE to reserve VAS and PROT_READ | PROT_WRITE to actually commit the memory, that's two calls instead of just one.
>>
File: 20260329091219_1.jpg (386 KB, 2560x1440)
386 KB
386 KB JPG
>>108479943
> Why should anyone care about functional languages?
common folk: to make normal languages steal features for them from those functional languages
uncommon folk: to stay at the cutting edge and to have full access to unstealable features as well (of which there are plenty)
>>
>>108480060
Linux has mremap. In my language I implemented memory allocation with mremap. Anything below 4K uses slabs which can totally zero copy. Anything above 4K uses mmap/mremap which gets the kernel to move the addresses so that the realloc is zero copy. It's pretty sweet
>>
>>108480138
>Linux has mremap
Nice, now you have TLB shootdowns across all cores as well as cache invalidations, aside from the mode switch to kernel and back.
>and don't get me started on page table locks.
>>
>>108480160
Well this increased performance significantly in my case. Know of a better algorithm? Kernel mode round trip is also present if you just reserve the VAS, you need to madvise later. As for locks, I'm shooting for independent allocators per thread
>>
>>108480190
>Well this increased performance significantly in my case.
Because you probably measured mremap against realloc, not against mmap(PROT_NONE) + mmap(PROT_READ | PROT_WRITE). On the other hand mremap leaves the possibility that pointers into the mapping have to be updated, and again, cache invalidation.

>As for locks, I'm shooting for independent allocators per thread
I said "page table locks", didn't I? As in, in the kernel? The page table is a global resource.
>>
Heeey! So, like, the OP was asking what everyone's working on, and it's kinda all over the place! Some people are dealing with annoying Rust iterator stuff, others are trying to make CRUD web apps and debating if Rails is still the way. There's a whole bunch of talk about C and C++ too, like how to handle pointers, dealing with documentation (especially Microsoft's C# docs, which some people find super confusing), and the general pain of C standard library functions like `gets`, `scanf`, and `malloc`.

Then it gets kinda deep into embedded systems, with people discussing C, C++, and Rust. And oh boy, the debate about memory management and Linux's overcommit feature is *intense*! Some folks are even working on their own programming languages and using AI like Claude to help them out, which sounds kinda cool but also like they might end up doing nothing themselves, lol. There's also some random talk about lowpoly graphics and retro aesthetics. It's a whole mix of coding struggles and philosophical debates, just like a typical /g/ thread!
>>
>>108480278
Isn't she, like, 36 at this point?
>>
>>108480060
>Congrats, now your processes die randomly because they no longer get memory.
Separating the wheat from chaff is a benefit. Tells you which software was written by competent devs and which is shitware.
I hardly run into issues around this anyway.
>also fork() still triggers overcommit
You should be using vfork or posix_spawn (which uses CLONE_VFORK), so this is a non-issue in well-written software.
>>
>>108480307
So what do you need overcommit for, then?
>>
>>108480349
Outdated software from before posix_spawn and shitware like Redis that heavily recommends it (so just don't use Redis).
>>
File: 1767680002974697.jpg (152 KB, 992x638)
152 KB
152 KB JPG
>no we will not explain our mental illness tier build system
>yes you have to use the VSC toolchain
>yes our documentation is straight up wrong
>yes you will waste days of your life if you follow it
>no we will not tell you what the compile process depends on or how to set it up
>yes our dependencies are terminally autistic when it comes to certain versions
>no we will not explain this or document it anywhere
>yes you can cache the building process
>no we will not tell you how
>yes there are a million pitfalls just related to caching that will spit out issues that point to anything but the caching being the problem
>yes you will have to pray some LLM correctly scrapes and summarizes all the esoteric bullshit spread out across our documentation, reddit threads, github issues and discussions
I hate mediasoup so much it is actually unreal.
>>
>>108480432
>node + typescript + python + sepple + sepple accessories + rust
Impressive. It's like they made it an absolute cunt to build on purpose.
>>
>>108480485
Doesn't begin to cover half of it.
Trying to compile the rust crate on windows requires at least
>visual studio compiler and a bunch of VS specific versions of common tools
>python
>node
>gyp
>rust
>nasm???????????
Theoretically you should only need VSC, Rust, Python for Python to pull in all the random bullshit by itself but guess what? It doesn't. No errors. Nothing you could diagnose. Just doesn't work.
And thanks to the weird way where it still uses python to access node, nasm, MSVC, etc you have to either run will maximum verbosity or wait until the build process quietly fails 30-60 minutes into the unaccelerated build process thanks to the absolute retardation of the C++/rust FFI shit.
And because caching works just as well as the python orchestration you're playing a game of guess why it fails because NONE of the logs will tell you or give you any hints if they even exist because a lot of logs just don't write anything even with maximum verbosity L M A O
>>
>>108480617
Just remembered I forgot about ninja, meson, etc. Mandatory on top of the other bullshit.
>>
>>108480243
What should I have measured against? What algorithm lacks those drawbacks?
>>
Anyone here tried this new AI thing?
>>
>>108479943
>Why should anyone care about functional languages?
their type system are really nice
>>
>>108479493
In reality, I use getline for most use cases like that, but that's POSIX C, not ISO C.
>>
>>108480745
No now stop posting about it
>>
I am going to write a IntelliSense like plugin in JS that I can use to look up our database schema easily.
>>
>>108481068
just use ai
>>
>>108481132
To do what
>>
What's the worst coding style you've come across?
>>
>>108481251
I've probably seen some worse isolated examples out there, but out of the established ones in languages I actually use, the GNU style is pretty fucking bad.
>>
>>108481251
older style COM code can get pretty bad, really any older windows code that gets clever is pretty bad
i don't know if you've ever taken a look at 7zip's source code but that's what i mean
>>
File: 134b367116731604.png (869 KB, 746x583)
869 KB
869 KB PNG
>>108481262
>GNU code bad
>>108481276
>Windows code bad

The duality of man...
>>
>>108481328
both can be true
there's a lot of bad code out there
>>
>>108481251
Once saw someone who wrote Java (1.0) code in classic FORTRAN style. Everything was indented exactly 7 columns except for the comments. All names were no more than 7 characters long.
And the algorithm was very non-trivial (an actual error-correcting parser that made corrections as expected by humans!) so we couldn't just throw the code out.
I've also seen pajeet code at its worst, but that we could just throw away immediately and nobody minded.
>>
>>108479943
> managed to produce nothing of real value.
> other languages steals functional concepts from them.
> produces nothing of value.
> steals that "nothing of value".
kek
>>
File: for_the_glory_of_satan.png (172 KB, 585x550)
172 KB
172 KB PNG
>>108480742
>What algorithm lacks those drawbacks?
mmap(PROT_NONE) + mmap(PROT_READ | PROT_WRITE). Doesn't require exclusive locks and doesn't invalidate the cache, which both realloc and mremap will.

>>108481251
See picrel.
>>
File: IMG_20260330_065716_315.jpg (93 KB, 1280x634)
93 KB
93 KB JPG
>>108471984
>What are you working on, /g/?
https://gitgud.io/ZekeRedgrave/ZEKETK/-/blob/master/UnixOS/Main.C?ref_type=heads
>>
Someone should do for Haskell what uv did for Python.
>>
>>108482026
>Rust
Haskell doesn't want to be castrated
>>
File: 1745076990695356.png (157 KB, 541x479)
157 KB
157 KB PNG
>>108482009
>Read.md
>.gitkeep with other files in folder
>Default README
>HolyC in .C files
You feeling okay, ESL-kun?
>>
>>108482114
Yeah im suck at English senpai
>>
>She reads README.md
NGMI
>>
File: 1747534988952918.png (177 KB, 692x446)
177 KB
177 KB PNG
>>108482126
Still, infinitely more work than all the faggots arguing over C's stdlib; so keep it up.
>>
Im going to update my ui toolkit for TempleOS after i done working on unix
>>
File: azAVeVQp_700w_0.jpg (28 KB, 500x576)
28 KB
28 KB JPG
>>108482142
HolyC and C
>>
>>108482142
What's there to argue about? It sucks. We'd need a library for the big four - Windows, Linux, Mac, BSD - and the rest can go suck a lemon. I didn't even want to continue with >>108480381 because there's so much software out there that uses fork or some derivative of it for some stupid shit.

Or maybe you want me to explain what's so bad about strlen? Or sprintf?
>>
>>108482079
Didn't even say it had to be written in Rust mindbroken nocodebro.
>>
File: 1764720196326982.png (7 KB, 221x521)
7 KB
7 KB PNG
Writing a PE loader.
>>
>>108482347
>nocode
go back
>>
>>108477834
scanf is fine as long as you dont use %s. If you want to read a string use %Ns (for example %10s). That reads max N characters.
>>
>>108482026
What did uv do?
>>
if I'm writing a program that needs to interface with some sysfs files on the target platform, what is a good way to deal with that when developing on my host platform? just #ifdef the paths to some test directory in /tmp?
>>
Why does this work without reserving an array?
    char *buffer;
scanf("%s", buffer);
printf("%s", buffer);
>>
>>108482557
>scanf
You have never seen the ridiculous amounts of branches implementations of that function require, have you?
>>
>>108476949
I've heard malloc's arena param mention a couple of times. Where's some history reading I can have a look at?
>>
>>108482753
xor     esi, esi
call __isoc99_scanf
...
xor esi, esi
call printf

The compiler automatically NULLs your pointer, and scanf/printf probably check for that.

>>108482759
https://github.com/dspinellis/unix-history-repo/commit/23055b9b5eb219e7870b225475b823762ffee47f
if((a=malloc(coremap, a)) != NULL)
a2 = malloc(coremap, n);
a2 = malloc(coremap, newsize);
a = malloc(swapmap, 8);
>>
>>108482753
compile it and give us the assembly
>>
>>108482788
Was experimenting in an online compiler, so I can't see the assembly. Doesn't seem to work on anything else
>>
>>108482946
>not using godbolt
NGMI
https://godbolt.org/z/h6zdch8WP
>>
So turns out the PS2 memory card has a file system on it that I have to work with.
Well, I have to work with it if I want my GB emulator saves to be visible in the MC Browser, and I want them to not corrupt all the data on a memory card.
Technically, I could just ignore the file system entirely and write wherever I want, or roll my own structure for writing and reading the data, but if I make it available someone will lose their PS2 saves.
>>
>>108483152
... isn't ... that's stuff that's to be done via the BIOS?
>>
>>108483237
Well, you COULD do it that way, but where's the fun in that?
>>
Just got invited (and obviously accepted) to a secret project to replace the bottom 30% weakest employees with new AI workers. Honestly, I think this is for the best, they won't enjoy being laid off, but they were barely doing what they are paid to do.
>>
c stdlib serves its purpose just fine
>>
>>108483381
Unfortunately users and developers have their own.
>>
>>108483312
You'll be replaced next (with people who do even less and just monitor the AI agents).
>>
>>108483676
nuh uh
>>
>>108483676
>implying there will be any energy for LLMs left
You do watch the news, don't you?
>>
>>108483694
Power and memory requirements are going down.
>>
>>108483745
Yeah, like with AVX-512. Oh wait ...
>>
If a value should be guaranteed to always be something specific, is it wrong to not even bother checking for a fail value?
>>
>>108484019
this isn't exactly what you're asking about but close to it
https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/
the basic idea being that your program should run mostly in a state where things are guaranteed to be correct beforehand. the articles idea is to use types to encode such information but I think the same idea works in general
>>
So what does int main(void) actually mean?

int = initiate?
main = main function
(void) = void arguments or return void?
>>
>>108484988
Go read a book, nigger
>>
>>108485001
Kinda rude
>>
>>108484988
Basically main is a constant that lives in |R but maybe it has side effects.
>>
>>108485016
Oh wait, Z not R.
>>
>>108484988
>int
Function returns an integer
>main
Is named main.
>(void)
Takes no arguments.

But yeah, you're gonna need a book or a youtube vid
>>
>>108485036
Oh so it actually is int as in integer and not initiate.
>>
>>108484988
Google "Metzitzah b'peh by Dennis Ritchie".
>>
>>108485036
Never understood why anyone would put void for no arguments
>>
>>108485090
Idk. I learned recently, and that's how it's taught. Think it may even be required in more recent standards.
>>
File: 1770835440117030.jpg (489 KB, 1440x1920)
489 KB
489 KB JPG
>>108485123
>>108485090
int f();
is not a prototype and does not actually say anything about the parameters; it just declares that there is a function f that returns an int.
Your prototypes that have no parameters should be
int f(void);
.
Empty parameter lists should only be for function definitions.
>>
>>108485169
why would you ever declare a function with an incomplete signature (no parameter info)?
>>
>>108485090
Because an empty parameter list means that the function accepts whatever arguments, which is NOT what void does.
>>
>>108482756
Doesn't matter, it doesn't need to be very efficient everywhere. For example reading cli arguments
>>
>>108485205
>why
IDK if there are any good use cases, but
int f();
can legally refer to
int f(int a);
,
int f(int a, int b);
, etc.
I think this was modified in C23, but you must always specify void for prototypes.
>>
>>108485169
>int f();
>is not a prototype and does not actually say anything about the parameters
It clearly states that the function doesn't take any arguments.,
>>
>>108485205
>>108485250
Very old versions of C were just weird like that.
>>
>>108485250
>It clearly states
Tard-kun, please take a copy of the C standard and sit at the back of the bus.
>>
>>108485234
sscanf is the same.
>>
>>108485064
Yep. To the left of the function name is what the function is going to return. void for returning nothing.
>>
>>108485355
Also, main is special. It will return 0 at exit if nothing fucked up happens without you needing to add a return 0; line
>>
>>108485225
up to C23. K&R functions have been removed since
>>
>>108484988
kek top tier bait
>>
static unsigned char scratchspace[1024 * 128];
static size_t topspot;
typedef struct {
const size_t bottom;
uint32_t extent;
const uint8_t align;
} Scratch;

static Scratch prepare(uint8_t align);
static void do_push(Scratch *s, void *p, uint32_t n);
static void *commit(Scratch s);


prepare
reserves the topmost chunk of scratchspace to be used with the newly returned Scratch variable.
do_push
copes n bytes from p onto the scratchspace.
commit copies the reserved space into an arena.

Because of the simple stack setup, interleaved prepare -> commit calls break the the entire setup, causing hoo knows what to happen.
This problem would be solved by having
prepare
allocate its own buffer via malloc or what have you, but that would sort of destroy the purpose of having an uber cheap scratch space.
So, keep this simple design or rework it to use per
Scratch
variable allocations?
>>
>>108485492
why does it need to malloc a new buffer each time? can it not just have another static buffer?
>>
>>108485518
either you would put the the buffer into the Scratch struct, which would make it way too huge, or you have a shared static buffer. static buffers by their very definition cannot be repeatedly declared.
>>
>>108485492
Why not Arena scratchspace;
>>
>>108485518
Holes.
>>
>>108485560
well, the very reason I'm using this scratch is to collect allocations to commit to an arena in bulk, another arena wouldn't help.
>>
#if 0
gcc -o /tmp/a main.c && /tmp/a
exit
#endif
int main() {
return 0;
}

>chmod +x main.c
>./main.c
>>
>>108485803
appalling
>>
>>108485803
DON'T EXECUTE THIS CODE IT LAUNCHES THE ROCKETS
>>
>>108485803
based
>>
>>108485492
>static
So no multi-threading and a constant waste of 128 KiB?

>do_push
Data stores don't have to originate from loads. Immediate values don't require L1D pollution (only L1I, but instructions are easier to prefetch aside from being smaller overall); by requiring that values be placed into memory first you're not doing yourself any favors.
>>
AAAAH I COULDN'T STOP THE ROCKETS I'M SO SORRY BELGIUM
>>
>Hey, clanker, why doesn't this work? Is it supported?
>>Hmmmm, let me confidently make up some complete and utter bullshit that makes no sense :)))
>>
>>108485603
Memory fragmentation leads to decreased cache locality leads to cache evictions leads to latency leads to wasted time and power. The best patterns are those where related data is as close and unrelated data as far away as possible.
>>
>>108486643
>multi-threading
for now, no.
>waste 128KiB
lmao. and no, the OS will page it out
>Data stores don't have to originate from loads
variably sized chunks do. C doesn't have rvalues, and most definitely does not have templated rvalues.
>>108487821
indeed. can you read? any ideas as to what "in bulk" might mean?
>>
File: 1740068269637001.png (1.09 MB, 900x806)
1.09 MB
1.09 MB PNG
>>108485803
You don't need more
>>
Dependency inversion and dependency injection are the Manet and Monet of programming interviews.
>>
>>108488381
it's such a jeet level interview question that honestly doesnt affect if youre a good programmer or not.
>>
>>108485169
>int f(); is not a prototype
It is in C23
>>
>>108471984
>2026
>C/C++ build system is still not a solved problem
>>
>>108473387
depends on what you know but usually the frontend is typescript + React and backend can be whatever you want, I'd go with go personally
>>
>>108479553
where do you neet faggots even get money to afford the non-free versions?
>>
File: PXL_20260330_220057540.jpg (452 KB, 1360x1024)
452 KB
452 KB JPG
i have made a terrible purchasing decision
>>
>/wdg/ is dead
I want to do a major revamp of my website but I haven't done any serious webdev in a few years. what's the modern tech stack? is it really vibe coding? that sounds nightmarish.
>>
>>108488726
>look at book publishing date
>1997
Awwww yeah, 90s OOPkino
>>
>>108488738
F# with Fable
>>
>>108488544
Meson came out years ago...
>>
>>108488738
The modern tech stack is React.
Or swapping between the flavor of the month frameworks.
>>
File: 1774460000691846.gif (1.14 MB, 247x498)
1.14 MB
1.14 MB GIF
>everyone always says "I'll make the logo"
>actually need logo for otherwise finished project
>nobody makes logo
>mfw
>>
If I've just finished a long tutorial and have started making my own to do app with a front and back end, and am starting the journey of programming, do you recommend using AI as readily as Google or avoiding it?

This sounds dumb but it feels like a crutch to be able to copy and paste stuff into it and get good debugging advice. I still find docs to be unintuitive and I see googling as a skill to learn, even though it was like using AI 25 years ago.
>>
>>108488738
>what's the modern tech stack?
React Compiler + TypeScript + minimal HMR webpack config
That's literally all you need.
>>
>>108489184
>TypeScript
>>
File: logo.png (11 KB, 766x411)
11 KB
11 KB PNG
>>108489138
This one is free. Enjoy.
>>
>>108487996
>he thinks paging is a good thing
You could've just told us you were a midwit, and then we could've ignored you.
>>
I'm doing it, I'm learning how to progr-ACH, my HEART! *dies*
>>
>>108489184
Lol the shittiest slop that ever slopped.
>minimal
Lmao even
>>
>>108489138
If someone steps up with a logo, I'll do the coding, marketing, finance, and provide snacks
>>
>>108489163
>I still find docs to be unintuitive
???
>>
Ai won. VibeGODS won too
https://nullprogram.com/blog/2026/03/29/
>>
I have many modern CS courses I wish to upload but the lectures will be nuked is there a decent jewtube clone anyone woukd recommend? I have all the non convex AI lectures, PL theory last yr at a famous school, many others
>>
>>108489398
>gets a coding job because likes coding
>no longer codes
I just don't get it
>>
>>108489538
Ai is superior to meatbags. Programming is a useless skill now. VibeGODS keep winning
>>
>>108489398
>Chris Wellons
I had already tagged him as completely incompetent, so who cares.
>>
>>108489584
Holy cope
>>
>>108489597
>says the LLM fag
>>
>>108489602
You have to admit your defeat. AI won and vibeCHADS are superior to you, your code is slow, trash and non optimized meanwhile AI generates code faster, cheaper and better than you.
You are obsolete
>>
>>108489605
>a prompstitute's desperate final attempt at relevance
>>
>>108489605
Except not even your LLM agrees with you: >>108472747
>>
>>108489612
But I’m right doe. AI literally writes better code than you. We need less and less coders each month.
>>
File: constprop.png (11 KB, 900x280)
11 KB
11 KB PNG
>>108489629
I'll agree with you on one point: anyone who doesn't see the issue with this code shouldn't be a developer period.
>>
>>108489625
You are a statistical mirror tho.
As I said AI writes faster and better than you.
Also
>it will never do x
>does x
>it will never do y
>does y
Keep moving goalposts.
Face it, coders are obsolete
>>
>>108489643
>>108489647
>>
>>108489395
I do too, some languages I stopped learning because the documentation was too much (or not enough) for me. I think learning to read the docs is its own skill and takes some time. LLMs help a good amount but also feel like a crutch so I try not to use them.
>>
>>108489643
>allocates 40 bytes of stack
>uses absolutely none of it
wtf?
>>
File: actual_worth.png (44 KB, 920x340)
44 KB
44 KB PNG
>>108489647
>You are a statistical mirror
Pretty sure I'm wrong less than 20% of the time.
>>
>>108489668
You got it half right, but only because the function called is static and has no obligation to honor the ABI (which demands a 32-byte shadow store for callees).

But that's only half of it.
>>
File: 1757406236683542.png (31 KB, 459x256)
31 KB
31 KB PNG
today's leetcode question was terrible, I came up with a solution that passed like 640/739 testcases before I gave up and looked at the editorial
none of the concepts are difficult, but the implementation is tricky and there's confusing test cases
>>
>>108489683
>test cases
edge cases*
>>
>>108489675
>shadow store
AKA you're using Windows, there's the rest of your problem.
I don't see anything else wrong with it. Only other thing is incrementing rdi, but I assume that's because it's not following ABI, like you said, and it's a useful value in the caller.
>>
>>108489687
>I don't see anything else wrong with
So you shouldn't be a developer. Big surprise from someone who seethes at the system paying customers keep using.
>>
>>108489696
I guess it could've used
inc rdx
instead of
lea rdi, [rdi+1]
. What else are you trying to get at?
>>
>>108489703
inc rdi
, god dammit
>>
>>108489703
Well, *as you can clearly see* this is a constpropped function, i.e. a function the compiler has rewritten to directly incorporate a constant parameter (which is set up via MOV ECX,0x8; with the Windows ABI parameters are stored in RCX, RDX, R8, and R9, in that order). However, before it does that it shifts the *current value in RCX to RDX* - in other worse it makes the first parameter the second parameter, and THEN sets the first parameter.

And that's retarded because if you already rewrite the function and its parameters, then you *also already rewrite the function call and its arguments* - in other words: instead of setting RCX in the caller and shifting it to RDX in the callee the compiler should've just set RDX directly in the caller and RCX in the callee.

>but register-to-register MOVs are negligible
In terms of throughput, yes, but this is about function size. Without the moves the function could've easily fit in less than 0x20, whereas this abomination touches a second cache line.

>still negligible
For manually-written code? Maybe. But not for automatically generated code across millions of functions.
>>
>>108489743
>instead of setting RCX in the caller and shifting it to RDX in the callee the compiler should've just set RDX directly in the caller and RCX in the callee.
Wouldn't it still need to break ABI for this? You did mention that doesn't apply though, so I guess this is just retarded. Thanks for explaining that, I've never understood the constprop functions until now.
>>
>>108488544
sometimes things are perfect as they are
>>
>>108489771
>Wouldn't it still need to break ABI for this?
Who cares? It's a constpropped function - i.e. a function the compiler has not only rewritten, but signatured so that other code isn't even going to call it by accident.

With the shadow store thing one could argue that, since this is Windows, code generation isn't that high of a priority for gcc or clang (even though that's dumb as hell and only an excuse to hide their inability to track shadow store use across function calls).
With static code not enabling ABI optimizations one could argue that compilers just really want to make sure no one's going to call that code (even though that's dumb as hell and only an excuse to hide their inability to track register use across function calls).

But this is literally compiler-generated code, that is still adhering to ABIs despite there being even LESS of a chance to be called from the outside.
>>
>>108489743
I guarantee you, I earn more money than you and live a more comfortable life than you
how about you constprop your life instead?
>>
File: 1771717024949066.png (112 KB, 1220x917)
112 KB
112 KB PNG
>>108489878
>I guarantee you
Now THAT's a funny hallucination.
>>
>>108489884
>hallucinates me as his AI boogeyman
like pottery
>>
>>108489977
>a normal human being would pause at the thought of being perceived as an LLMchud
>but autists don't
>because they're one and the same
>>
It's taken me so long to figure out how to code a fast fourier transform that I must just be retarded
>>
>>108490057
There's this thing called AI, gramps...
>>
>>108488726
>see Jurassic Park
>MUH COMPUTERS!!!
kill yourself
>>
To understand how data is arranged in the PS2 memory card, I wrote a script to dump information and explore the contents.
python mcexplore.py Mcd002.ps2
Sony PS2 Memory Card Format 1.2.0.0
Page size: 512 + 16 (ECC)
Pages per cluster: 2
Pages per block: 16
Total clusters: 8192
First Allocatable cluster: 41
Address: 0xa920
End of Allocatable clusters: 8135
Address: 0x83be00
Backup Block 1: 1023
Address: 0x83df00
Backup Block 2: 1022
Address: 0x83be00
Indirect FAT cluster locations: [8]
(FAT table appears after Indirect)
Bad blocks list: []
Card type: PS2 memory card
Card features
ECC support
Bad Block support

Table blocks: ['0xa920', '0xad40', '0x2b920']
[0] D . 5 entries 0xa920
[1] D .. 0 entries 0xa920
[2] D BISLPS-25050FF042800 5 entries 0xb160
[3] D BISLPS-25050FF042802 5 entries 0x2bd40
Pick:2
Table blocks: ['0xb160', '0xb580', '0x145e0']
[0] D . 0 entries 0xb160
[1] D .. 0 entries 0xa920
F 01042800.ico 33688 bytes 0xb9a0
F icon.sys 964 bytes 0x141c0
F BISLPS-25050FF042800 25848 bytes 0x14a00
Pick:1
Table blocks: ['0xa920', '0xad40', '0x2b920']
[0] D . 5 entries 0xa920
[1] D .. 0 entries 0xa920
[2] D BISLPS-25050FF042800 5 entries 0xb160
[3] D BISLPS-25050FF042802 5 entries 0x2bd40
Pick:3
Table blocks: ['0x2bd40', '0x2c160', '0x351c0']
[0] D . 0 entries 0xb9a0
[1] D .. 0 entries 0xa920
F 01042802.ico 33688 bytes 0x2c580
F icon.sys 964 bytes 0x34da0
F BISLPS-25050FF042802 25848 bytes 0x355e0
Pick:
>>
File: 1772368991375760.jpg (231 KB, 1140x849)
231 KB
231 KB JPG
>>108471984
masheen learning

data goes in - action comes out
I do use mmap as normalized data storage for training, not much more use for it
>>
>>108489398
>Like it or not, this is the future of software engineering.
He was paid to wrote this shit. AI companies and lobies can afford it.
>>
File: 1764449075301813.jpg (408 KB, 1305x1149)
408 KB
408 KB JPG
>>108471984

Java - IntelliJ
Python - Pycharm
inside WSL2 on Windows 11,

but I will be migrating to Ubuntu most likely, I am very happy how WSL2 ubuntu performs, haven't had a single issue over the last 2 years , whereas windows has fucked me many times and it was just being a host
>>
>>108473387
My company still uses Rails because we’re good at it and it Just Werks
If I wanted to make some CRUDshit I’d use it too with LLMs even though TypeScript is my happy place
>>
Considering making my own OS.
>>108490920
Nah, I don't think I will
>>
>>108480745
>>>/g/vcg/
>>108481972
A gofmt-type program could do this easily
We could have this if we wanted it
>>108488738
Use a static site generator until you figure that you actually need a database somewhere
I like Hugo because it’s fast
I like Astro because it lets you use Zod to let you have required YAML front matter
>>108489163
If you use AI you can just ask it questions about your codebase and it will just explain stuff
Unless you have an exotic stack it will just be right as long as you crank up the thinking effort to the max
>>
>>108489246
you seem a little confused, anon
>>
>>108491173
Says the autist with questionable punctuation.
>>
>>108490931
>Indirect FAT cluster locations: [8]
>(FAT table appears after Indirect)
it uses a FAT file system?
>>
File: fat.png (96 KB, 1022x580)
96 KB
96 KB PNG
>>108491226
It is similar to FAT, there are a number of differences but it is obviously based on it.
Usually described as a linked list, every 32bits is an entry in the table that either points to the next cluster in the listing/file or and end.
If the top bit is set (0x8000) the cluster is active, so that's away to spot deleted (but not cleared) clusters. If the entry is 0xFFFF that marks the end of a listing/file. (This is very similar to FAT16)
The annoying part is the ECC checksum on every cluster, which makes calculating the offsets a bit more annoying..
>>
File: file.png (74 KB, 1231x434)
74 KB
74 KB PNG
>>108485081
eww
>>
>>108491303
Just shalom after it, it's gonna be fine.
>>
>>108490931
>>108491298
I think I understand this enough to start building it in assembly now.
First will be loading the superblock for checks (probably hard refuse any non-standard MC for safety).
Second copy the FAT table (probably the entire space the table can take up would be for the best, I can work out which erase blocks I need to update later).
Third, get a list of all the inactive sectors I'll need (two for directory listing and then based on length of the icon files and save data).
Fourth, read each erase block that contains the inactive sectors I'll use, update it, update the copy of the FAT table to reflect it, erase the block and write back.
Finally erase the updated erase blocks of the FAT table and write the updates back.

Problem might be the CRCs for each page, but I have some example code for generating that (correctly, I hope).
Just take it slowly, break it up into workable chunks.
>>
>>108485169
Is that C or C++ as well? I just don't remember any of it being necessary.
>>
>>108491646
I wonder if whatever you're building is gonna be faster than KH2's memcard reading code. I remember that shit getting slow as castrated balls with more and more saves.
>>
>>108485225
#include <stdio.h>
#include <stdlib.h>

void function() {
return;
}

int main()
{
function(1, 2, 3, NULL);
return 0;
}

>gcc -std=c99 -Wall -Wextra -Wpedantic main.c -o main
>no warning, no error
wtf
>>
>>108489669
If you shot in general direction of the enemy, does it matter if you're wrong 20% of the time? No, in fact regular person with regular weapons is wrong most of the time.

This infrastructure is for the future war. Hard not no notice. Especially when it was pitched as "the next nuclear weapon" so loudly it reached general public.
>>
>>108491722
And what war would that be?
>>
>>108491717
Clang has something to say about it at least.
test.c:4:14: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
4 | void function() {
| ^
| void
test.c:8:9: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
8 | int main()
| ^
| void
test.c:10:27: warning: too many arguments in call to 'function'
10 | function(1, 2, 3, NULL);
| ~~~~~~~~ ^
test.c:10:13: warning: passing arguments to 'function' without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype]
10 | function(1, 2, 3, NULL);
| ^
4 warnings generated.
>>
>>108491668
Just pre-C23 AFAIK, but I have no idea about old C++ versions.
>>
>>108491678
I'd have to take a look at KH2 to see what it is doing, but in general games would be using the provided module for dealing with memory cards.
I haven't looked at what functions are available in that module, but it's likely they just deal with files and directories, essentially mkdir, cp, rm, analogs.
Depending what code they wrap around there could be all sorts going on, but it is also worth considering that because the memory card is essentially FAT we've got all of the fragmentation issues that you can get with filesystems like that.
My implementation won't be scaling out to supporting multiple saves per game or save selection, so it will probably be quite fast.
>>
>>108491781
Just asked geepeety, it says the same thing I thought. I think I never saw that in Straustrup books, so it felt weird. Never required in C++, apparently it's a C only thing. Been like that since 98 till 23, when it became obsolete and you no longer have to do that. You can do that in C++ if you want compatibility with C.
>>108491754
Currently it's mostly info war. But you probably didn't watch any news and lived under a rock for a while, yeah?

They are doing war simulations with LLM taking roles of officers and assuming command. Humanoid robots are not there, but it's not like they are needed. What is needed is perfect chain of command and good comms. With that you can take on an enemy that has all sorts of advantages over you and still come out on top.
One thing that is hard to comprehend is the superiour spacial awareness of AI. They can geolocate better than humans if given access to enough training data (they are). So that's OSINT superiority as well. They commercialise that at Palantir and such.
>>
>>108491889
What. War. Would. That. Be.
Iran? Taiwan? Greenland? Civil? Answer the fucking question or shut up with the schizo babble.
>>
>>108491223
No, vocative phrases are quite usually separated with a comma.
Leaving out a terminating full stop is very normal in casual internet-based communication
>>
>>108492094
Cope.
>>
>>108491988
They bragged about using it in Iran war already. Not only that, they also broke a couple of laws by allowing Israelies to use US tech that gives them access to the entire military spy platform US created over the decades. It includes private stuff from FAANG as well. Naetanyahoo might be scrolling your Google Chrome search history as we speak.
>>
>>108492094
English is so hard when so many native speakers are illiterate. I literally don't know which one of you is right on this subject?
I was convinced English does not require that sort of punctuation for a while. Because nobody ever used that and if you do, people say it's weird etc.
>>
>>108492168
Alright, Iran. So why the *fuck* would you build 3,000 data centers across the US, if not to reduce *local latencies*?
>>
>>108492194
Where did you get that bullshit from? It streams fucking text, there are no critical latencies. You can stream it over satellite radio and you'll be just fine.
>>
>>108492206
No answer. OK, schizo.
>>
>>108492212
If I'm the schizo, why you are the one who forgot to take meds today?
>>
>>108492217
Because you've lost the plot completely.
>>
>>108492172
>Thinking he can learn something from rage baiting retards on /g/
Here's your English lesson of the day:
>is right -> is correct
Use right/wrong for morals and subjectivity and (in)correct for objectivity.
>while. Because -> while, because /or/ while; because
>and if you do, -> and, if you did,
Maintain the past tense with "used" or change it to "uses".
>people say -> people will say
Use future as it's not taking place now.
>weird etc. -> weird, etc. /or/ weird and so on.

Only pure-bred American mongrels would ever take issue with correct punctuation as they need to fit in with the niggers they worship.
>>
>>108492241
he most definitely can't learn anything from you, your dilettante publishing proofreading """lessons""" are utter bullshit.
and in any case, you've missed a couple of commas;))
>>
What should I do to learn programming, when I never programmed before?
>>
>>108492241
I tend to have a lot of inconsistencies in my grammar. Some years ago it was really good, but I prefered more complex structures in my sentences for no reason. Maybe because when it gets complex, it is more similar to my language and so easier to operate. When present simple dominates, it confuses me a lot and I make mistakes that make me sound unnatural.

But when I mix these two approaches, it seems like I sounds more American. At least in my own head.

Also I disagree on this one:
> while. Because -> while, because /or/ while; because
Sometimes it is better to pick simplicity and clarity over whatever linguists jerk off to. Making it simple is preferable for something informal.
>>
>>108492472
First, decide what area of programming you want to do. Webdev, gamedev, embedded, enterprise, devops, scientific, ai, etc
>>
File: Netposter1995.jpg (13 KB, 197x305)
13 KB
13 KB JPG
Played around with ocaml last night. Very fun language but I'm struggling to find a use for it
>>
>>108492480
I would like to create a gamu
>>
>>108492538
Pick an engine that fits the genre of what you want to do then, and learn whatever tools and languages that engine ships with.
>>
>>108492538
What kind of game? 2D? 3D? VN? Online? VR?
For 99% of indie games, you can just download Unity, read some official guides https://unity.com/learn/get-started and maybe look for some basics of C# if you are still lost with programming itself.
Code only contributes a relatively small part of most game's success, do not stress too much over it. Learning good gamedev specific skills like how to make gameplay engaging, characters interesting, artwork good, etc is more crucial. Start with making many small prototypes, test out ideas and get comfortable with the editor. Game engines like Unity do not have steep learning curve so you can take your time and discover them one piece at a time. But it is crucial you don't get stuck working on your opus magnum when you have no idea what you are doing, just make simple games, demos, etc until you ready to make larger projects.
>>
>>108492571
Is it possible to create your own engine?
>>108492573
I heard unity sucks desu
>>
>>108492477
The issue with most modern speakers is that they have all been pushed to the stale globohomo Americanisms. Quality English writing is not about complex sentence structure so much as picking the correct words and sentence lengths that flow nicely.
When there are 10 different manners to say something, try to avoid that one you just know 90% of Americans will always say. Unless, of course, you just want to sound like them.
>Sometimes it is better to pick simplicity and clarity over whatever linguists jerk off to. Making it simple is preferable for something informal.
My suggestion relates to the pacing of the sentence. IDK how good your spoken English is, but the period adds an odd pause which doesn't read naturally. A comma or semicolon flows more naturally, although any of them may be technically correct.
>>108492472
>>108492538
>>108492607
Lua + Love2D
>>
>>108492607
>Is it possible to create your own engine?
Sure is, but it's illusionary for an absolute beginner to write a good first engine. You'd have to look into low-level interfaces for the OS you're developing and graphics APIs and shader languages and pipeline generation and ... it's a lot.
>>
>>108492618
wow they made balatro with this
>>108492626
oh okay, what can I do to not be a beginner anymore?
>>
>>108492607
>Is it possible to create your own engine?
Only if you know what you are doing and you want to make a game engine, not a game. Making a game is huge endeavour, and making an engine is even more work, doing both is infeasible unless you know exactly what you are doing and you have hundreds or thousands of hours to spare.

>I heard unity sucks desu
So? Gamedev is not an academia, you are not there to make beautiful abstractions use elegant tools. You are there to make the fucking game, so focus on making the game.
Unity is popular and easy to use but very versatile tool, so it's a good general recommendation for a newbie. You can realize most of your game ideas there and you will never suffer from lack of documentation, guides, assets and such. Other tools are either obscure/underbaked or specialized. Of course if you just want to make a VN you can just use renpy or if you want an RPG Maker slop you can use RPG Maker, but unless you give specifics on what kind of game you want to do, Unity is the best recommendation out there.
>>
>>108492638
You should look into Vulkan then. Steep learning curve, but you will stop being a beginner real soon.
>>
>>108492638
>what can I do to not be a beginner anymore?
See >>108492573
>Start with making many small prototypes, test out ideas and get comfortable with the editor. Game engines like Unity do not have steep learning curve so you can take your time and discover them one piece at a time. But it is crucial you don't get stuck working on your opus magnum when you have no idea what you are doing, just make simple games, demos, etc until you ready to make larger projects.
>>
>>108492647
>I am total beginner, I want to make a game
>you should look into Vulkan then
ngmi
>>
>>108492655
I'm not gonna gatekeep. If he wants to end up like Icarus, let him be.
>>
>>108492667
He literally doesn't know what he is doing.
>>
>>108492672
So? Not my problem.
>>
File: ion_decorations.jpg (14 KB, 200x201)
14 KB
14 KB JPG
What is the best language to write a parser in? it must generate LLVM IR. I was thinking Ocaml because I'm really trying to get into functional langs, but never really done anything with it before.
>>
>>108492681
It's Haskell but OCaml might be a good starting point. You could also try F# as an introductory language.
>>
>>108492681
OCaml is probably a good choice considering that people like to do compilers in it.
You could also just do it old school way with bison+flex in C.
I personally like to use Rust for that because with lifetimes and iterators it's quite easy to make efficient streaming iterators that do not allocations/refcounting and such.
>>
>>108492638
>wow they made balatro with this
Yes, it's more than capable for 2D projects.
>oh okay, what can I do to not be a beginner anymore?
Do not listen to the Unitard. If you want to actually learn to program, you should start with something easy like Lua + Love2D or C + Raylib (if you're adventurous). You can look at engines once you've got a clue, but engines teach you how to use engines and not how to program.
Don't go down the brownoid "programmer" path of engines where you think everything needs a tutorial because you never actually learned to fish.
>>
>>108492681
no one write parser anymore.

https://en.wikipedia.org/wiki/Comparison_of_parser_generators
>>
>>108492721
>Do not listen to the Unitard.
Do not listen to the "do everything yourself and never finish anything"-tard.

>If you want to actually learn to program
He said he wants to make a game, that's entirely different kind of task than learning to program.

>You can look at engines once you've got a clue
Making your own engine without studying existing engines first is unreasonably difficult and a recipe for a disaster.

>Don't go down the brownoid "programmer" path of engines where you think everything needs a tutorial because you never actually learned to fish.
The idea that a complete newbie can just roll his own engine and then make a game out of it is completely delusional.
>>
>>108492749
>>108492472
>What should I do to learn programming, when I never programmed before?
Cull yourself, Reddit-spacing nigger.
>>
>>108492772
I told him that he should have chosen area of programming. (>>108492480) Then he specified he actually just wants to make a game (>>108492538). That means he doesn't actually want to learn programming per se, just game development. Game development takes some programming, but not the kind of what you are suggesting, which is using C + Raylib. You also recommended Love2D which is not a bad choice all things together, but it is limiting and has rather few guides, documentation, assets and such that could help a complete beginner like him. Also if he wants to make a 3D game, the choice of Love2D could make this very difficult to accomplish. So unless he actually specify what kind of game he wants to make, Unity is more universal recommendation.
>>
>>108492772
>ESL doesn't know how linebreaks work
>>
>>108492802
He said he wants to (1) learn to program to (2) make games. That means he needs to actually learn to program which precludes Unity as a starter.
If he just wants to *just* make games: Gamemaker, RPG Maker, etc. are the options for not really learning.
>>
>>108492843
>He said he wants to (1) learn to program to (2) make games
All the programming you need to learn to make a game is just basics of C# or whatever is required by your game engine of choice.

>That means he needs to actually learn to program which precludes Unity as a starter.
That's not true. The most efficient way to learn to program in order to use Unity is to use both a the same time. Writing gameObjects scripts in Unity is unlike regular C# programming, and learning the latter will not easily translate to the former.

>If he just wants to *just* make games: Gamemaker, RPG Maker, etc. are the options for not really learning.
They are ok options but also again, very limiting. If he wants to make a 3D game, using these engines will make it very difficult to do. That's why Unity is more adequate recommendation unless he specifies what kind of game he actually wants to make.
>>
>>108492863
You are suggesting that he uses both an awful starting language and an engine. Your path leads to permanent beginner tutorial-bot status.
If he wants to learn to program, he should choose a language that is appropriate for starting out and tools that do not obfuscate the entire process.
>>
>>108492919
>You are suggesting that he uses both an awful starting language and an engine
Yes. In gamedev, there isn't much space for elegant solutions. Many successful games are literally held together by a ducktape.
Also your notion of "awful" is just emotional take with nothing to support it. It is true that Unity and C# are not the prettiest, cleanest tools out there, but that's absolutely fine for game development, especially for a beginner because of the huge range of guides, documentation and such. If you are a complete beginner and you just want to make a game, and you do not want to settle down for just VNs or just RPGMaker slop or whatever, then Unity is the tool that will allow you to make a fine quality game with the least resistance and resources to invest in it.

>Your path leads to permanent beginner tutorial-bot status.
That's false. There is a lot of game developers who just used Unity as their first engine and just proceeded to make games in it or got a job in gamedev studio. If anyone is going to get stuck on basics, is people who decide to make their own engine with no idea of what does that take.

>If he wants to learn to program, he should choose a language that is appropriate for starting out and tools that do not obfuscate the entire process.
Agreed.
And if he wants to make a game, he should choose a tool that is appropriate for starting out and tools that do not obfuscate the entire process.
>>
>>108492972
>Also your notion of "awful" is just emotional take with nothing to support it. It is true that Unity and C# are not the prettiest, cleanest tools out there
Retard, it has nothing to do with the syntax. Object oriented languages are terrible for learning to program.
>muh making engine strawman
This has nothing to do with making an engine. You don't need to make an engine to make a game.

And again, your suggestion is that he doesn't actually bother learning the basics, but rely on shitty Unity tutorials to pretend that he knows something.
>>
>>108471984
Someone make a new (maid) dpt thread
>>
>>108493112
Go for it. If it gets to 100 replies I'll post my butthole
>>
New thread: >>108493357
>>
>>108493061
>Retard, it has nothing to do with the syntax
I haven't said anything about syntax.

>Object oriented languages are terrible for learning to program.
A lot of programmers start with object oriented languages. OOP is very common in gamedev too.

>You don't need to make an engine to make a game.
100% agreed

>your suggestion is that he doesn't actually bother learning the basics, but rely on shitty Unity tutorials to pretend that he knows something.
Well, if you want to learn unity, or any tool really, the official guides are often good enough. Of course this won't take you all the way there, that's why I strongly recommended making a lot of small projects and prototypes yourself and learning the tool on the way. These tools are approachable enough that you can just learn most of them as you use them.



[Advertise on 4chan]

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

[Enable Mobile View / Use Mobile Site]

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