[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]


File: terry.jpg (122 KB, 640x480)
122 KB
122 KB JPG
What are you working on, /g/?

Previous:
>>107060072
>>
>>107088317
Microsoft rushed to implement unicode when UTF-8 was not even a thing and now they have UTF-16 as historical baggage.
>>
>>107088317
latin languages matter the most, utf8 is superior
>>
>>107088464
Following along https://news.ycombinator.com/item?id=13082825

Q: Is there any C compiler that doesnt target an abstract machine so it can be used as a portable assembler as it was intended?
>>
File: 1737453842305455.jpg (52 KB, 800x495)
52 KB
52 KB JPG
>>107088464
A weapon to remove islam from thia planet once and for all.
One could call it a weapon of mass destruction, but nothing of value will be lost, a humane approach to eradicate the aftermath of 60 year long misguided politics.
>>
Crazy you can do that. Now I'm wondering if it's possible to allocate memory with mmap and run JITed code.
#!/usr/bin/perl
use strict;
use warnings;
use v5.10;

my $syscall_read = 0;
my $syscall_lseek = 8;

my $file = shift // exit;

open my $fh, "<", $file or die "can't open '$file': $!";

my $buf_size = 32*1024;
my $buf = "\x00" x $buf_size;

while (1) {
my $read = syscall($syscall_read, fileno($fh), $buf, $buf_size);

if ($read < 0) {
say STDERR "ERROR: $!";
last;
}
elsif ($read == 0) {
last;
}
else {
print substr($buf, 0, $read);
}
}

close $fh;
>>
>>107089172
do you have yo "allocate" $buf? seems like perl should create it's own buffer buf_size internal to syscall
otherwise what does perl do if you write out of bounds of $buf?
>>
>>107089243
>do you have yo "allocate" $buf?
Yes, it looks like it just get the raw numbers from the internal boxed number values and get the buffer pointer from the boxed string values and pass them as they are.
https://github.com/Perl/perl5/blob/blead/pp_sys.c#L5990
>seems like perl should create it's own buffer buf_size internal to syscall
Maybe, but for this to happen it would need to check which syscall you are doing and it doesn't. They would need to do this for each supported OS x architecture, and this will never happen.

>my $buf;
>Use of uninitialized value $buf in syscall at ./print_file.pl line 24.

>my $buf = "":
>free(): invalid next size (fast)
>Aborted (core dumped) ./print_file.pl file.txt

>my $buf = "\x00";
>malloc_consolidate(): invalid chunk size
>Aborted (core dumped) ./print_file.pl file.txt

>my $buf = "\x00" x 32;
>line 1
>line 2
>line 3
>line 4
>lineSegmentation fault (core dumped) ./print_file.pl file.txt
>>
>>107089445
manual memory allocation and UB in a scripting language is pretty neat
maybe using syscall sbrk() and implementing malloc/free entirely in perl to allocate buffers to use with other syscalls would eliminate the confusion
>>
>"make your own gui toolkit"
I don't know how
>>
>>107089838
then don't
it's a waste of time anyway
>>
File: standards.png (24 KB, 500x283)
24 KB
24 KB PNG
>>107089865
This
>>
Go unironically revitalized my interest in programming. It's so much more fun than C.
>>
>>107088464
Microphone and playback streaming in pure JS from web browser. For some reason playback is perfectly fine but haults when mic streaming tries to start, and mic streaming just is crapping out even though I have it ensure the user allowed the permission and then ensure it got initiated by a user event.
>>
Just released my third version of my NES emulator. Pretty high accuracy, but still lacks a lot of mapper support.

>2007 NTSC converted PAL demo running
https://files.catbox.moe/be6plr.mkv
>DD3 running
https://files.catbox.moe/pkumvy.mkv

All programmed in Pure C11 with SDL3.
>>
>>107090710
>Where is Matt.txt
>>
Why yes, my homemade OS can run Doom, thank you for asking!
>>
>>107090900
?
>>107090997
Looks sick man. What Lang?
>>
>>107091040
>What Lang?
C
>>
>>107091065
Nice. How long did it take? And Is it a monolithic kernel or micro?
>>
>>107091040
>?
you have a github account, right? and a repo called "nones"?
>>
>>107091134
Yes, but I was not sure what your original comment was trying to convey.
>>
I'm making a C-like programming language which I'm using to make a simple 32bit OS.

The language is already fully functional (but not feature complete or bugs-free) and I managed to build with it simple kernel that boots, reads a floppy, goes into user mode.

https://github.com/rafalgrodzinski/bits-runner-builder
>>
>>107091123
>How long did it take?
4 months on and off.
>And Is it a monolithic kernel or micro?
Currently Doom is the only thing running in user mode, though I'd like to change that eventually.

>>107091258
Based fellow OSdever
>>
where's the best place online to get code reviews done?
>>
Maybe this thread will be the thread that change my life 4ever.
> be me 32
> Working as a IT engineer in a big cooperation.
> Doing default tasks
> last year i got a task to automate stuff with powershell
To be honest i loved programming in powershell and thinking about learning more. I think i wanna learn C to program cool stuff on a gnu/linux system. Any of you guys tips or advice?
>>
>>107091589
There are few if you search around, but I'd be careful with taking some of what they say seriously. At least, if you're going the AI route. I've had AI tear my shit apart like there's no tomorrow and even make shit up to criticize about it. I literally had one tell me once that using "more descriptive names like 'set_target_y' instead of 'set_target_y' would be better for readability."

Then, I got bored and pasted pic related into the same AI (not my code). It just raved about how wonderful it was. I then pointed out some obvious problems and it started telling me about how it was right the entire time and I have potential buffer flows in my code and that strcat/strncat can't be constexpr. I had to point that out to it before it noticed it.

Basically, tl;dr, code review AI almost made my brain implode with stupid.
>>
>>107091887
Fuck. Forgot the pic.
>>
>>107088464
you mean vibe thread?
>>
>>107091711
the standard advice is to read K&R since it's short and well-written for the most part
I'd then take an algorithms and data structures online course
do some leetcode on the side and maybe brush up on your math if needed using something short and simple like khan academy
then you could start branching off to whatever interests you and learning the specifics for that subject
learn git, other languages, etc.

anyways that's more of a general path that doesn't take years but also isn't overwhelming and gets you to an acceptable skill level for your age
but I mean if you're the type of autist who likes reading 1000 page textbooks or doing 5 courses simultaneously or you're a math genius, then do that
>>
File: 1743021021223970.png (518 KB, 1024x768)
518 KB
518 KB PNG
>>107092176
>the standard advice is to read K&R since it's short and well-written for the most part
Technical writing peaked in the 60s/70s, where it's both light, precise, and good humored like a zen koan
>>
Work Graphs might be worth picking up D3D12 for.
>>
>>107091887
dont ask LLMs to give you subjective opinions on code. only ask them to find bugs. never trust what they say, verify everything yourself.
>>
>>107092364
>Technical writing peaked in the 60s/70s, where it's both light, precise, and good humored like a zen koan
Those books are worthless because they didn't know how to program back then.
By today's standards, the code produced in the 60's and 70's is complete dogshit spaghetti.
>>
>>107093390
>work graphs
gross
for me it's VK_EXT_device_generated_commands
>>
>>107089172
I've been trying to write a simple "ret" instruction, set the protection and do a function pointer call but it won't work. The same program works in C. The only explanation is that perl is calling mprotect behind the scenes, there are indeed mprotect calls in the source but they don't show up in strace somehow.
>>
Posted in the wrong thread.
So I got a pretty surprising result.
I tried making a quad tree replacement using a simple grid bucketing. It was intended for small objects but I came up with an idea how to deduplicate query results of large objects spanning many cells.
So I accidentally querying that easily beats quad tree and is barely faster than rtree even in cases that look like they should be pessimistic, at the cost of way slower removal of single elements and not being sparse.
Is this actually a thing or did I make something new?
>>
>>107091400
Based.
Any plans to add something advanced like GUI or GTK support for GUI stuff?
>>
Is there any simple tool to determine which files/functions make up the biggest portion of the final compiled executable size?
>>
>>107094789
objdump, possibly readelf
>>
File: nodes.png (8 KB, 1024x768)
8 KB
8 KB PNG
>>107088464
Wrote a node editor to assist with circuit layout
>>
File: 1762112476947~2.jpg (51 KB, 1280x1206)
51 KB
51 KB JPG
HTTPS, XSS, DCHP (IPs), API, BSC, PROMETHEUS(PromQL), GITLAB, VXLAN (UDP, IP).
>>
shill me some books to ask for for Christmas since my family won't get off my ass about buying me something
>>
File: 1750244599641451.jpg (457 KB, 1920x1080)
457 KB
457 KB JPG
A kike, a troon, and a goblin.
>>
>>107096706
Knuth box set
>>
retro gaming frontend, gstreamer is a ho
>>
>>107097494
looks kino actually, maybe not the whole box set since its pricey but volumes 1 and 2 should be enough
>>
>>107091887
AI code review sounds like pure ass
>>
I want to know if I'm onto a good path.
I want to implement savestates. I thought I could map 0x1000 bytes of memory onto a base address 0x1000, for example, and do all my allocations in that chunk of memory. If I wanted to save a state I could memcpy all that onto another address (0x2000 for example). If I wanted to load the state, all I should do is copy the memory at 0x2000 and move it to 0x1000 and it all should work because the pointers will be pointing at the right place, right?
Or is there a less retarded way?
>>
>>107098093
Oh, it seems to work, and I was trying to serialize the entire lua state by traversing the tables like a retard.
>>
#define include <stdio.h>
#define define printf("main");
#define main int main() {\
define\
}\

#include include
main


im learned macros
>>
File: 1762187038181.jpg (238 KB, 1461x877)
238 KB
238 KB JPG
>>
>>107098093
How often do you need to save state, how much data and what's the shape of the data?
>>
In the name of God, and May God Damn the Jews.

I'm here for another day of shitposting.
>>
>>107098581
Good morning sir.
>>
>>107098603
Guten Morgen. I am just a simple banker from le Pays Bas.
>>
https://www.youtube.com/watch?v=OLY2coSRf7g

Every country needs this.
>>
>>107098333
cool app ajeesh
>>
File: 1746660484733317.png (124 KB, 1318x869)
124 KB
124 KB PNG
it's better than doing it in c++ but damn
>>
>>107098461
I'm probably going to need to save the state at least 60 times a second, once per frame so I can rewind and roll back, but the size would be like 1 or 2 megabytes at most. I can't really tell you about the layour, but I'm trying to save the state of a lua VM. I suppose if I use a static base address I could even save it to disk. I did manage to make it work with a custom allocator, but I don't know if it'll give me problems later.
>>
https://www.youtube.com/watch?v=33y9FMIvcWY


Can somebody direct this moron to a fucking BOOK?

Why do people expect to be able to understand math without a book?
>>
>>107098838
encyclopedias are books
>>
>>107098838
You can't hear the autism in his voice?
>>
>>107098882
They are 'volumes', not books.

>>107098897
Yeah anyone who makes a video so intellectually fragmented must be autistic of some sort. I can never imagine myself making a video about such mundane subject.


All this given, I think people need to read books to understand technical subjects, of any kind. Whether humanities (e.g. philosophy) or physics or math. Don't expect to find good information on a web page.

Feed a dozen books on a single subject to an LLM, and tell it to write you a book on that subject. That's how I approach learning these days.
>>
>>107098928
btw, make sure to convert PDF/DJVU files to text files before feeding it to an LLM.

The LLM aggregator I use only allows me to upload five documents. So I use this Fish function to convert them to five text files:

# Defined in /home/chubakpdp11/.config/fish/functions/convdir2txt.fish @ line 1
function convdir2txt
set -l ncat 0
set -l nprod 1
for f in *
set -l bnm "$HOME/$argv[1]-$nprod.txt"
ebook2txt $f $bnm
set ncat (math $ncat + 1)
if test (math $ncat % $argv[2]) -eq 0
set nprod (math $nprod + 1)
end
end
end


$argv[2] is the number of books in each text file.
>>
>>107098941
This is the `ebook2txt` function:

# Defined in /home/chubakpdp11/.config/fish/functions/ebook2txt.fish @ line 1
function ebook2txt
echo "==LITERATURE BEGIN: $argv[1]==" >> "$argv[2]"
if test (isdjvu $argv[1])
djvutxt $argv[1] >> "$argv[2]"
else
pdftotext $argv[1] - >> "$argv[2]"
end
echo "==LITERATURE END: $argv[1]==" >> "$argv[2]"
end


`pdftotext` is from popple-utils. `djvutxt` is from libre-djvu.
>>
>>107098955
So save all the books you have in a subject in a single directory, and fun the function on that directory.

I have over 5000 books and papers, and I have tagged their subjects in the filenames.

Imagine you want to research static analysis, so all you do is:

$ mcd sca-books # `mcd` makes a directory and `cd` into it
$ cp ~/acc-lit/*sca* .
$ convdir2txt "literature-on-static-analysis" 80


Then, feed those text files to an LLM. Tell it to:

> Write me a 48-chapter book on static analysis, it must contain this subject, and that subject...


Ask it to give you the table of contents for the book. It will give you the table of contents, as you asked. Then, tell it to write you each chapter in a separate prompt:

> Give me "Chapter #2: Why Homosexuality is a Sin". Conclude the chapter within a single response.

If you don't tell it to "Conclude the chapter within a single response", it will leave the chapter in the middle of the response, and you must ask it to continue from where it left off.

Then, click on the 'Copy Markdown' button under the response, this is the button that copies the entire markdown of the text, and do this:

$ xclip -selection clipboard -o >> ch-01.md


You can save this entire command into an alias.

After you are done generating the chapters with the LLM, and having saved them to Markdown files, use this Pandoc to compile them into a single HTML file:

https://gist.github.com/Chubek/39792620290f02b4d3fb4fd6a710f2f7

This function should take care of most issues Markdown files generated by LLMs have, e.g. using `\textsc` which cannot be converted to MathML.
>>
>>107099029
Remember to use a pound mark before chapter numbers. So when you want to, for example, find the response for chapter 3, you'd search for the string "Chapter #4". In a round-robin kind of way. I hope I'm making myself clear.
>>
>>107099029
And finally, I recommend using QuteBrowser to read all these HTML files. Don't use Firefox, or Chrome. QuteBrowser might not be strong enough to browse the web, but it excels at reading HTML documents.
>>
How that the dust has settled, was all that "counting" stuff by the maidfag a genuine schizo delusion, or was it all a troll?
>>
>>107098832
>but the size would be like 1 or 2 megabytes at most.
each time you need saving the state?
Makes me think that there is another parameter, the granularity of the state saving. It could be at every frame but it's a bit pointless, you could save the state one time per second. You could also keep the state of every second of the last 60s and then sparingly keep the older states. You would keep 1 state per 2s of play for -1min to -2min, then 1 state per 4s for -2min to -5min, etc.. You decide of the appropriate saving curve.
>>
Holy shit. Look at this cat:
https://www.youtube.com/watch?v=zSsnL3QX3eA

I want a cat so badly, but the last one we had bore a litter of kittens and caused a lot of trouble. Have you noticed their belly skin drops off when they have kittens. Disgusting.

(and no, I don't have 1.5 million tomans to have them spayed).

We had this cat, Bella, she was black and white, and she could not mew. But when it came to mating calls, man, she could mew hard. This makes me think, queens produce the sound of mating from a different place from where they mew.
>>
>>107091400
>Currently Doom is the only thing running in user mode
This cannot be more based
>>
Anon made an OS. Awesome.

I'm personally waiting to make my own compiler before I make my own OS. Now that I got a job in SCA it might take longer.

But if anyone wants to start making their own OS, here's a collection of several 'documents' I've collected from Z-Library, basically documents made my professors and people like that for their students, 8-9 documents on OS dev:

https://github.com/Chubek/chubek/blob/master/os-howto-united.pdf

OSTEP is a good book too.
>>
https://www.youtube.com/watch?v=XcB-PjkAjWI

Tom7 takes autism to another level. Still, his thesis is one of the best pieces of academic literature in compsci.
>>
>>107099588
8 billion people on this planet and his is the only good channel.
>>
>>107099869
I discovered the Suckerpinch channel when his NES video came out. I just love how he does not care about 'le algorithm' because he is smart enough to understand Recommender Systems like Youtube's, and tags and titles his videos in a way that it reaches most people looking for them.

His thesis is about an ML-based Source-to-Source compiler (which idiots call a 'transpiler', seriously, if you use this word, that means you're a fucking idiot!) that uses intensional logic to carry across sound "mobile code", that is, a code that is supposed to run on many computers (basically what the same idiots call "VanillaJS" and theory-loving chads like me call "Mobile ECMAScript"). I highly recommend reading this dissertation, "Modal Types for Mobile Code". Funnily enough, in his TeX badness video, he says the cover for his thesis mistyped it "Modal" and "Model". Took me back to the days when my father was writing his second thesis (he was a pediatric dentist, not something exciting as PLT) and he kept running around to get it typesetted. They used a word processor, whose name I forgot, but it was a Persian-specific application that did not even use Unicode. The government was too stupid to ever set a standard for Persian, so everyone used their own encoding for text. He gave me the floppy disk that contained his thesis, but I lost it.
>>
File: angry-emoji-hat.png (346 KB, 1024x1024)
346 KB
346 KB PNG
>>107099960
I remembered the name of the word processor, "Zarnegar" which means "Gold Writer". Seriously, fuck those idiots who never set an encoding standard for Persian. There is a pseudo-standard that people used before Unicode, though:

https://en.wikipedia.org/wiki/Iran_System_encoding

I think the guy who set this standard is the same bipolar moron who is supposedly 'Iran's best programmer" or something. Forgot his name, I only remember reading on his blog that he was hospitalized. Which is really weird, since I am a bipolar Persian programmer, and I know it's impossible to get admitted into an Iranian university if you have the disease. You can't study and pass the exam with bipolarity. Bipolarity makes your brain stupid.
>>
File: name saars.webm (3.8 MB, 800x700)
3.8 MB
3.8 MB WEBM
>>107098333
>>107098749
>>
https://www.youtube.com/watch?v=FM1GtQuSXP4

> lives 90min away from his place of work

jeebuz.
>>
>>107100134
> GUI software for something that could have been easily CLI

That's jeet as sheet. I write my programs according to Unix standard, as enumerated by Eric Raymond.
>>
>>107100134
needs to stop faster after slowing down
>>
Adding sound to my gamedev toolkit with OpenAL. Yet another broken API, relying on static state (alcMakeContextCurrent). Welp, at least it works, and is supported basically everywhere.
>>
My boss has given me $100 to buy a phone with.

Recommend a budget phone. I only want it for texting and calling. If it has a QWERTY keyboard, with which you can write mathematical notation and code with (so I can relay SCA stuff), the better.

I realize $100 is not much btw. I can't add anything to this budget. I'm poor af.

If I can change the OS, that's a plus.
>>
>>107100906
>>>/g/spg/
>>
>>107100223
for me, it used to be ~60mins. I am never ever going back to office.
>>
>>107100750
OpenAL is pretty ok for cross-platform anon. There's like 1 or 2 DLLs you have to package in with your executable if on Windows and if you're on Linux you can just make a .deb installer and include a list of libs in the required section. Overall not a bad choice.
>>
>>107101249
>OpenAL is pretty ok for cross-platform
That's why I chose it. It even works on the web with Emscripten, so in this regard it's pretty great. My only problem with it is static state, and necessity to switch audio contexts. It's a similar story as with OpenGL. I'd rather prefer all their functions took context as a parameter. I guess they figured most programs will use only one context (which is a reasonable assumption), and that's why they chose this design.
>>
>>107099320
He showed how to count to neural networks, then got bullied off the board by Numberlets who literally don't know how to count.
>>
>>107099320
He was btfo multiple times by people who know a little of math.
>>
>>107099320
>was all that "counting" stuff by the maidfag a genuine schizo delusion
He posted working prototypes so no, counting is better known as linear search. The intergalactic science foundation staffed by crossdressers was part delusion/fetish/aesthetic, but as a vibe was less neurotic than the status/sexuality complexes of our other schizos
>>
>>107102166
kek. working prototype for what? counting?
post context of where his prototype was posted id gladly have a look (or exact link if you can)
>>
File: file.png (183 KB, 1583x1295)
183 KB
183 KB PNG
i made a todo list, i'm not sure where to go from here.
i don't know how to do stuff like web scraping or ripping youtube videos and formatting and othger cool stuff.


how did you guys go about it?
>>
>>107102251
in my case- necessity is the mother of invention.
find something to make your life better, then write it
my method to learn is to tackle a problem thats just beyond what i currently know, then learn by solving it
>>
programming in C and C++ is a bigger danger to civilization than nukes
>>
>>107102292
good. ac-C-elerate
>>
>>107102215
https://desuarchive.org/g/thread/106952251/#106953941
Links to the various interpreters he wrote would likely come up by searching "counting+java", I only recall one of the projects was called SLAM
>>
>>107102353
based anon. thanks
>>
hey, i wanna make a program/script that runs in tapermonkey or violentmonkey.

Where it reads a 4chan thread, and then replaces all instances of a word with something else.

Like it sees the word "kys" and replaces it with "kiss your sister", "faggot" with "friendo", "nigger" with "neighbour" and so on.

It does it automatically.

How would i go about doing this?
>>
>>107102353
>A Bipolar Binary Neural Network is a network where all weights/biases/inputs/outputs are 1 or -1. I have constructed a Godel Encoding which maps the Whole Numbers to them. So you can find any BBNN with counting.
>yeah, now we can attribute a number to all BBNNs.
>whatfor you say? idk. but its something we can do...
its still completely worthless, but i appreciate your effort
have another you
>>
>>107102251
>i made a todo list, i'm not sure where to go from here.
add dates/times and turn it into a day planner/scheduler
make it import and export .ics files

>>107102269
>find something to make your life better, then write it
this
you just won't learn programming if you only write code that has no use
>>
>>107102420
>I've tried nothing and I'm all out of ideas
>>
>>107102496
like how do i start? do i look at a violentmonkey guide or something? i don't know how to read webpages.
>>
Are there any corporate style SWE techniques you actually swear by?
>>
>>107102615
>corporate style SWE techniques
like what?
i think i use sound programming practices, but its corpos were talking about so i expect anything
>>
>>107102166
At one point he was adapting it to Python/qiskit, but realized a quadratic speedup is still not enough and was asking for a better quantum computer and a research facility to try to find exponential speedup. That was the last I heard of the project.
>>
>>107100235
SAAR THE JAVASCRIPT WILL NOT RENDER THE BUTTON IN TERMINAL SAAR
>>
>>107102615
What do you even mean by corporate style? There is a lot of shitty corporate legacy code.
>>
File: nodes-2.png (3 KB, 1024x768)
3 KB
3 KB PNG
>>107094937
Aligning nodes and guessing the size of components sucked so added a grid and annotations (just scalable yellow nodes you can't connect to, but can still add to a group), so in this example the size of the filtering caps is now visible

Last thing to add is serialization to a file, probably a basic plaintext format
>>
>>107102615
AbstractFactoryBeans and so on.
Behold the elegance of ENTERPRISE QUALITY Java:
https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
>>
File: file.png (173 KB, 2560x1285)
173 KB
173 KB PNG
okay i sorta did something like it
>>107102420
but i had to use chatgpt, i inspected the elements on the page and found that 4chan has classes called postmessage and sorta edited those, but the mutation messed me up. i just copy pasted stuff.

how are you meant to learn this stuff?
like i know there's documents but i didn't know mutation was a thing or how to really use it.

i feel so stupid
>>
>>107103649
also 4chanx stopped working for me, so i might not even keep this script
>>
>>107102615
refactoring code and caring about maintainability are pretty corporate practices

>>107103441
typical cnile/nocoder shitpost - same shit reposted for 10 years
>>
Templates being zero cost abstractions is complete and utter bullshit. All the duplicate code ends up in the instruction cache at runtime.
>>
>>107103700
This is why I'm designing a language where you can control wether generic functions will be monomorphized or use a virtual table. I think it should monomorphized by default (to encourage you to write generic code) and give you the option to use virtual calls.
>>
>>107102615
No.
Just write the fucking function.
>>
>>107104101
>This is why I'm designing a language where you can control wether generic functions will be monomorphized or use a virtual table. I think it should monomorphized by default (to encourage you to write generic code) and give you the option to use virtual calls.
just use Haskell
>>
>>107103700
>Templates being zero cost abstractions is complete and utter bullshit. All the duplicate code ends up in the instruction cache at runtime.
Post benchmark
>>
>>107104101
>This is why I'm designing a language where you can control wether generic functions will be monomorphized or use a virtual table. I think it should monomorphized by default (to encourage you to write generic code) and give you the option to use virtual calls.
Rust already does this using "dyn" and "impl" keywords.
>>
>>107104307
I accept your concession.
>>
>>107104259
>just use a GC-ed purely functional lazy language
NOPE
>>107104316
Nice, but Rust is unusable as far as I'm concerned, and there are other features I want and a lot of them also just about function/methods.
I'd like a good orthogonal system that allows you to factor code like you want, between function + sum types, classes and abstract classes, type classes. It would also be good to be able to say, write classes but use function with match (jump tables) instead of virtual calls.

Also, a module system where the the module can take compile time parameters and instantiate and specialize all the function it contains. Parameters could be type variables, allocators, a concrete class implementating an abstract class, regular values, maybe architecture specific parameters, etc... Lots of things useful for writing generic code.
>>
>>107103677
>java
>cnile
is "cnile" the new "nazi"?
>>
>>107104530
there is literally nothing wrong with gbs of garbage per second
>>
>>107104722
apparently there is because performance critical softwares are not written in GC languages
>>
>>107104721
it's java written by a cnile
also the annoyance is more from reposting the exact same thing and never anything else than the actual thing being reposted
get new material
>>
File: C-teve-ballmer.jpg (15 KB, 320x240)
15 KB
15 KB JPG
>>107104836
for starters, its c-ultists, not cniles
and then yeah, what do you expect?
c is all about writing your own interfaces
wtf are we gonna talk about if its not that?
>optimization
horseshit.
interfaces, interfaces, interfaces.
>>
>>107104780
performance critical software runs on operative systems which are literally a big gc
>>
File: xzibit.png (250 KB, 538x1043)
250 KB
250 KB PNG
>>107104940
yeah
but your program gets garbage collected upon exiting it, not everytime you change context
also: imagine putting another gc on top of that
i assume yfw
>>
>>107102269
>>107102449
>find something to make your life better

I've never been able to do this. I started off solving artificial problems for fun, then quickly ran out of things to do. I haven't written any code outside of work in months. I'm so bored.
>>
>>107104972
well, heres an easy fix for that:
think entrepreneurship-wise
what could you program to sell for more monies

you got - automation
or -vidya as easy choices
you could also pick up marketing to do things properly

i have a saying:
you gotta approach life with balls and a raging erection.
meaning: if you do the bare minimum,
then you'll get the bare minimum
>>
>>107104972
>>107104997
also dont expect to become milionaire with your first project
i got another saying/truthism:
you will always fuck up your first attempt
thats what apprenticeships are for

well, you wont be an apprentice in anything, but you will fuck up your first attempt at everything. which is ok, normal, and totally expected. keep trying
>>
File: 1710112536473443.jpg (15 KB, 259x194)
15 KB
15 KB JPG
>>107104940
>haha you're bad but I'm twice as bad as you
>>
>>107104997
let's say I have a project that's useful to people and even have users
How do I actually connect it so that it's monetizable?
Do I connect stripe?
Do I need a company for stripe?
The bureaucracy is killing me
I don't know how to start
>>
>>107105184
youre doing things wrong
monetization considerations happen during the design or even feasibility stages
feasibility study emits constraints
constraints which then get considered during design

you dont start with design
you start with feasibility then market study (if its two separate steps for you)
market study is:
1)conceptualizing the demand (finding what itch you could be scratching)
2)considering competing products
3)testing your samples on live public, see responses, "ask" for how much they would pay you for it. you wont be asking per se, you will be using soc. engineering to get truthful answers

ill be the first to call marketing people "marketingroids"
thats because they think they can exist without a product to sell
but marketing is an actual know how
basically, learning marketing is rtfm'ing how to sell shit
>>
>>107105184
>>107105252
cont.
what i meant with that
is that you engineer your product during the design stage so that its easy to monetize
and you consider how easy is it is to monetize said product when considering if a project is "feasible"
it might be feasible per se
but if you cant get your butter from it, then it isnt
its un-feasible from a financial perspective- you would be losing money and thats a hard nope
>>
This is something that anglofags will never understand, but since, thanks to the US government funding huge computer science research in the mid-20th century, most CS terminology and nomenclature is in English. Maybe, if the Italian government funded Olivetti, or the French computer scientists at INRIA gave a shit about anything else except String Rewriting Systems, we would have more Romance-inspired terms, but I digress.

So now that I'm translating a scientific paper into Persian, I must find a balance between using English terms, and those that are 'innately' Persian, as offered by the Persian Language Academy. I found this dictionary:

https://github.com/hkhojasteh/EN-FA-CS-Dictionary

But it does not yield what I mostly need, which is PLT terms. I had to ask Claude Sonnet 4.5 to give me a table of terms that he deemed appropriate for translation into Persian.

I've studied French lit for 3 semesters at FUM. I used to be able to write retarded short stories in French (one of them was named "le sang crimsoi", about a prostitute that is killed by her John, and I printed out this one-page story and gave it to my professors, ALL OF WHOM WERE FEMALE, and one of them was calle "12 for Dinner", a thriller that I don't remember what it was at all, you see, I take drugs... lotsa them, in a perfect world, I would be Hunter S. Thompson of my generation) and now, I don't remember shit about the language. But I know the Frogs love their language, and have an academy, like Persian does. They call Lambda calculus "le calclul lambda", call downloading "telecharger" and call uploading "televerser". They call a byte an "Octet" (do these retards know that a byte is not necessarily 8 bits wide? We still have architectures with non-octet bytes!) and most importantly, they call a computer an "Ordineatuer". In Persian we call a computer a "Raayaneh", meaning "The Wise One".

So yeah translating technical literature from Angolish is hard... Italy should have funded Olivetti.
>>
yeah
kinda revolutionary thought for /g/:
marketing considerations take part in how you engineer a product
yall should look into this. i wouldnt mind having milionaires on this board posting the cool stuff they create
>>
>>107105276
>>107105252
You're answering a different question
I didn't ask how to get clients
But I guess how to monetize it
Because I'd need to create a company and deal with a lot of paperwork, I can't just tell people to pay money to a buymeacoffee
I guess what paralyzes me is the fear that I don't pay some tax
For my website I actually had the pricing tiers in mind and before buying the domain, and before buying the domain I searched for the most catchy one
The "let's say I have a project that's useful to people and even have users" was a hypothetical as I'm still making it
But I guess the part that I've never done before is actually monetization, it's just stressful because it's a lot of responsibility
It probably becomes easier after the first try
>>
>>107105184
also i kinda need more info to give you more advice
but broadly speaking theres two ways to approach the problem:
either you shill the fuck out of your product
or you let the product doing the shilling for you
if you do the former, you do like adobe. no free samples
if you do the latter, which youre actually already doing
you give out freemium
and you start monetizing through two tiers, like openai does
but only once you have a mass of clients
bc some will drop
and you need a mass of them remaining to let the number game play
as in:
if you end up with one user, he might have a ton of friends
he might have none
its a cointoss if your product will survive

but if you got 100k of clients
then shit averages out and you can work with percentages
>>
>>107105348
>I guess what paralyzes me is the fear that I don't pay some tax
*shrug*
thats what accountants are for
worst case scenario you wipe your ass with him
legally, hes responsible for that shit
i think. cant say for sure for your country but he is in mine
>>
>>107105377
Yeah I think that's the mentality I have to take
That errors in good faith will be negligible to the total gain, so it's still worth trying and making the errors
>>
>>107105348
>>107105377
you still have to look at their hands
get acquainted with taxation laws.
everyone should, in my country- belgioom, its even mandatory to pass a semi-accounting course to be allowed to start a company
its not long, its called "managerial course", its basic accounting shit
>>
>>107105398
still, be careful
when a project will show that it becomes really profitable, you might want to avoid possible additional legal costs
do due diligence
but dont shit your pants either
and consider that theres cases where you can offload responsibility to someone else
>>
Speaking of products, can somebody PLEASE write a text messaging app for Android where we write Markdown + LaTeX math, and it renders as 'rich text' in the receiver's phone? I mean regular-ass texting, not some profoundly nice protocol. Not Apple shit. You can render the text as HTML, use MathJax or KaTeX to render math. Maybe use Prism.js for syntax highlighting.

I would not pay for this app, but I will donate to it if it's FOSS and accessible.

My boss works for security organizations, he only trusts text messaging. He's given me a small amount of money to buy a phone, because all I currently have is a dumbphone which you can't text with. I'm also getting a Bluetooth keyboard. I could potentially use this phone as some sort of "distraction-free writing device".
>>
>>107105430
Yep, I'll have to look into it, thanks
>>
>>107104972
>I've never been able to do this.
just think what things you do manually that might take up a bunch of your time
ever looked for an image you knew you had somewhere but couldn't find it? write an application for organizing your images
even simple stuff can result in a decently sized program
>>
>>107105446
>security conscious
>uses BT kb
are you gonna tell em?
>>
>>107105463
godspeed
>>
>>107105470
They can be intercepted? I did not know that.
>>
>>107105501
any emission can get exploited
but BT is an explicit one
>>
>>107105501
>>107105593
cont
always use wires whenever its practical
then the exploiter would have to have physical access to the wire-age to exploit emissions
nothing is 100% but you can manipulate things in your favor
>>
>>107088464
How do I stop doing nothing and just program something
>>
Dogshit general.
>>
>>107105681
Code up a small program, one simple function, play with it a bit and expand it a bit
And then you're warmed up
>>
>>107105501
>>107105617
>nothing is 100% but you can manipulate things in your favor
yea
bc if your employee culture is ass
and everyone lets everyone in like it was a henhouse
then yeah, you can force the adversary to have physical access to the infra to do their shit
but that isnt a problem in any way, so its as well as if you just kept using BT kbd's
>>
>>107105617
>>107105593
Thanks man. I'll keep that in mind. Can we use a computer keyboard with a phone via some sort of convertor? I have a small keyboard I'd bought for keyboard shortcut's using the 'keyd' utility in Linux. It's collecting dust on my desk, because I could not come up with any use for a 'shortcut-only keyboard'. It'd be good to find a use for it.
>>
>>107105701
cont of cont
needless to say i have experience in that shit
i visited the whole of fukken antwerpen zoo when i was 16
i mean the fukken workshops and all
the offices
all because my gf at the time had a couple crushed fukken packaged cookies and i told everyone im coming from aĉkhan and samir shop and i had a delivery to do

fukken
social engineering before the term even existed
but yeah. if your company culture is liberal ass
dont be surprized you get fucked.
in the ass. balls deep
>>
>>107105757
i dont know
im not a phonefag
i gave my smartphone to my father and now im rocking a dumbphone shitsung i think im gonna smash against a wall bc recharging doesnt prevent the phone from shutting down
buy nokia if you want a dumbphone
>>
smartphone was also a shitsung
but theyre smarkphones are actually pretty good
mine is/was an a32 from 2019 if im not mistaken
2025 and its still snappy
got myself one when i entered a talent cultivator/school/bootcamp
id say bootcamp but once youre in you get privileged treatment for employment so bootcamp++ at least
>>
File: sad-emoni-long-hair.png (773 KB, 1024x1024)
773 KB
773 KB PNG
>>107105808
I need to text. Dumbphones with keyboards are rare. I had a Sony Ericsson dumbphone with keyboard, and I sold it for pennies, a decision I regret.
>>
s19 if anyone's curious
and i got the smartphone bc i needed one for some internal shit
for which i ended up finding a workaround anyways
anyhoo
i bought one
made me angry bc im an old fuck
and i want buttons, not fukken gestures
so i gave it to pops
>>
>>107105893
i feel the pain
my fav phone of all times was a dumbphone with an actual keyboard
the fukken keys were even domed, i mean, the key wasnt flat, it was kinda circular
for maximum handiness and big gorilla hands compatibility

we regressed
theres no two ways about it-
functionality wise, we regressed on certain fronts
>>
>>107105925
Alan Kay said GUI was just a 'stop point' for 'something better, eventually'.

Apple and Microshaft fucked it up. Basics of GUI has not changed since 1970s and Xerox PARC.

Adding touch to it made it worse. Like spraying perfume on a turd.

Most millitaries around the world have banned use of touch-based interfaces.

I personally use the Linux terminal (with Fish shell/i3 wm) and I'm fine.
>>
Why is it that when one schizo gets killed off another more annoying one instantly fills the vacuum. Do these guys have a six sense for detecting posters who aren't sufficiently annoyed or something.
>>
>>107105978
>Alan Kay said GUI was just a 'stop point' for 'something better, eventually'.
that something better is neuralink 22.0
everyone dislikes the 1.0
but also everyone wants the 22.0
>Most millitaries around the world have banned use of touch-based interfaces.
thats because of reliability issues
that discussion actually runs deeper
it started in aeronautics and the use of boosted controls.
not even fly by wire, even hydraulic boosting, full analog
>I personally use the Linux terminal (with Fish shell/i3 wm) and I'm fine.
based and cli pilled. i started my pc adventures with msdos
actually i started with an old ass atari, but i was too young to understand anything
>>
>>107106038
all me
>>
>>107106038
The schizos were never real take your meds
>>
>>107106038
post programink
smother the random discussion in the flow
i will participate if its c
currently dpt is a refugeee isle for everyone > 100 iq. but were > 100iq, i dont think my interlocutor wants to ruin dpt
i certainly dont
>>
you know what?
yea
->dpt
->whatchure working on
self discipline
i have a pathway laid before me
but my problem is when i conceive of something
then i become lazy

rn im working on a lil something that takes human readable data from my hard drive
and turns it into fuill binary
its utterly uninspired work
i really dont wanna do that
the most interesting part was optimizing an ascii to float with intrinsics
but now i done it i have to do the booooooooooring shit
and i want to commit kys w/a brick
repeatedly.
but lifes a crackhoe and tf youre gonna do about that, init?
fkn hel
>>
File: ai-lmao2.png (117 KB, 1266x896)
117 KB
117 KB PNG
i heard a saying
brogramming is 99% of cleaning-mcdos-shitter-tier of work for 1% of pure creativity
bros
why did they made me taste the creativity part
i wanna go tf back and its all i can think about
>>
File: angry-emoji-long-hair-2.png (586 KB, 1024x1024)
586 KB
586 KB PNG
>>107106038
Blame the world governments for pumping Ritalin and various sorts of Amphetamines into their population. Since this morning, I've taken 5 Ritalins and I have my 3rd Vyvanse on my desk, waiting for that sweet, sweet moment when I take it.

My uncle has Novartis Ritalin (all I can muster is shitty Iranian "StimDate" off-brands) and I just took one after my dinner of soft-boiled eggs, white toast and what you folk call "Greek Yogurt".... I'm in heaven. Ritalin and Vyvanse make me euphoric because I'm bipolar masterrace, not dumb stupid ADHD. If Ritalin, Vyvanse and other Amphetamines make you euphoric, you are 100% not ADHD. I'm bipolar because I went to the mental hospital, twice, and they diagnosed me after 11 years of RAGE. Pure rage...
>>
>>107106342
>. Since this morning, I've taken 5 Ritalins
this expalins alot
but for krishnas sake
stop fucking reposting the lowest tier of reaction memes
fukken please
its a fucking facebook emoji with hairs, nigger
>>
>>107106089
working on modernizing my basic graphics development environment setup to start experimenting with rdna4 and occasionally skimming through various resources to see how it differs from my rdna2 gpu
some interesting stuff like dynamic memory management for gpu vector registers
but apparently like none of the drivers actually produce shaders that use it outside of a few code paths
>>
File: nerd-doggo-hez.png (298 KB, 572x583)
298 KB
298 KB PNG
>>107106342
here, let me help you
hez doggo
a modicum of inventiveness
its lazy
its derivative
but its not a fukken facebook emoji with hair on it
>>
>>107106382
thats the thing
just cut out the middle man
alllocate big fukken buffers in opencl
and deal with it yourself
bc thats how you get performance

t. also plays around with gpushit
unless youre doing business logic with compute shaders bc you need portability bc youre making a gaym
then good luck, brother
im barely learning this shit
opencl is eaaaassyyyyy compared to that
>>
File: angry-emoji-straw-hat.png (462 KB, 1024x1024)
462 KB
462 KB PNG
>>107106365
>>107106395
> Facebook emojis

I generate them myself with Nano Banana. They are 100% OC. Also, that is the point. It's "irony". Look it up.
>>
File: herr-carlos-veggies.jpg (60 KB, 600x600)
60 KB
60 KB JPG
>>107106447
yeah but irony never works out on the internet
idk if you should look it up but if you lurked more you would have known it
also ai has no soul
youre memes are just inferior
>>
>>107106459
When I came to 4chan in 2010 when I was 17, over three years, I collected 2 folders (which on Linux are called 'directories') called "Image Dump #1" and "Image Dump #2". I had gigabytes of images I saved from 4chan. My HDD got bricked, and I lost them all... I no more collect images, from anywhere on the web. It's all ephemeral, all fluid, all volatile... all runs away with one bad sector.
>>
File: wave.png (39 KB, 177x311)
39 KB
39 KB PNG
btw
>opencl
>big name drop
it isnt
its just c but asynchronous
people who do glsl are the real brains
bc you do that
but abstracted away
>hurr durr easier
thats a good experience to learn HOW, EXACTLY abstraction makes things more difficult
im not saying glsl is bad btw
but that it exists within a context
and extrapolating from that, why someone might want access to the actual controls of the thing
>>
File: tier-list.png (28 KB, 183x404)
28 KB
28 KB PNG
>>107106493
yea
didnt happen to me but i nuke installs
and i nuke everything
including memes
including the ones i made myself

its a matter of pride
i will always remain creative so i dont need to hold onto the old shit
>>
>>107106521
Unironically based image.
Rust -> Troons and Retards
C++ -> Meh.
C# -> Gaydevs.
JS -> Retards and scriptkiddies.
...
>>
>>107106493
>>107106521
cont
but your ai gend fukken slop is another thing
its slop
i dont wanna see it
and i speak for the board
i dont mind the use of ai
what i mind is the total lack of originality
>>
>>107106549
you get the meaning but im actually ironical about that
but also only 50% ironical bc i dont want to deal with anything else
>>
>>107106555
You are right but look at the current state of modern software there is no originality in it since 2006 it's all fucking same trash and indians who can't code for shit. Windows 7 was last good Windows for example Windows 11 meme.

Linux good before now Rust ridden troon trash with billions of forks on simple soft and nothing works.
>>
>>107106521
Yeah I did nuke my entire work from 2022 to 2024 last summer. All my code... Gone. It was joyous.

When I was quitting Bupronorphine, I used to nuke my Youtube recommender system every goddamn day. I nuked my watch history for the past 10 years, I did it last year, and I honestly, honest to Jesus Mohammad Moses, I started weeping when I was sure everything was nuked. Even my account was deleted.

I think my recommender system is due for another nuking.

I remember, this was 10 years ago, my late brother was watching Youtube on my old PC, and he asked me if he could watch PewDiePie, I told him "NO, I DON'T WANT THAT CANCER IN MY WATCH HISTORY!!!!1'.

You know, I had many moments with my brother. When he was just 1, he burned his hand, and he knocked my glass of soda (I was 6), and I went all bipolar manic and started slashing him with an elastic thread. But I don't regret that, I was 6 ffs, and brothers fighting is very healthy, he needed to be beaten, to learn the way of the world.

But I do regret not allowing him to watch PewDiePie. I wanted a 'serine' Youtube watch histroy.

brb, nuking my watch history.
>>
>>107106572
There is no reason to deal with anything else while C is slow you are free to do whatever the fuck you want + you don't have to deal with any kind of OOP and C can handle everything from games to apps to writing whole fucking OS.
>>
File: w11-devs.png (413 KB, 546x502)
413 KB
413 KB PNG
>>107106573
i am original
and thats all i need to measure others by the same token
(even if i can be derivative. often am, actually)

>>107106579
if you donrt make a ceremony of it
if its instantaneous, it wont work
make a fire out of wood
take what you want to get rid of, i mean, what symbolizes it
can even be a drawing, but you have to pick something thats a symbol to you
then get lawn chair
make fire
and throw the target into it
and you chill until the fire ends
you let all the thoughts go through your head
but when the fire dies
-and dont extinguish it-
it dies
and so every associated thought to the matter/person/etc

you know this shit youre a jeet
its the same shit
euros are jeets but we had 10k years of natural selection, so talk and think with respect btw
>>
>>107104997
>what could you program to sell for more monies

What if the answer is nothing?

>>107105467
> what things you do manually that might take up a bunch of your time
Again, there is nothing here.
>>
>>107106600
yea but the libs...
thats the angle.
one should use c when the memops actually do matter
ofc one can do everything with c, but why bother? thats the counter...
>>
>>107106654
>What if the answer is nothing?
everyone has game they could enjoy
>its gonna be autistic
have you ever heard of "factorio"?
>>
>>107106600
> C is slow

WHAT C COMPILER.

Languages are not entities, you know? Especially languages as highly-standardized as C is.

Maybe Rust could be called an 'entity', but even then, we're getting GCCRust any day now, and we already got GCCGo.

Like, when you say "Shasfal is slow", this imaginary language called Shsfal, which implementation of it?

Compiler optimization is an expansive subject. It goes from simple peephole opt to polyhedral analysis.
>>
>>107106655
It's universal tool that can do a lot so if you master it you won't have to touch other cancer. I mean yes we can say you can put down the nail into wood with hammer faster then with an axe but axe can do it too and given the skill about in the same time.
>>
>>107106664
Im saying C is slower for development not as it is slow as language when it comes to performance jesus christ... that would be heresy
>>
>>107106664
>standardized c
thats c but fighting one hand behind its back

real c is when you interact with the compiler, the asm AND the cpu

quick example:
this:
a + b + c + d

and this:
(a + b) + (c + d)
>>
>>107106671
yea ofc
nginx is written in c
paiton is written in c
but if youre a good engineer youll use the right tool for the job

actually
if you want to write a server id say c is a decent choice
but if you just want to have a rando blog, maybe going the nginx + wordpress route might be a better option
>>
>>107106639
> wood

Here, we traditionally use charcoal. Not wood. Because we do have forests in the valleys, but the plains is mostly covered with some trees here and there, and mostly badlands.

In the north, they got jungles and they use firewood. In the central-west, they got forests that are being quickly deforested due to stupid yokels cutting the trees down for firewood.

65٪ of the country is still desert, and those parts use thistles.

I say 'use', I mean 'used'. They all use oil and oil products now. We have a lot of it. And we can't sell it so we use it ourselves.

When I was a kid, my father's hometown did not had gas pipes laid, so in the extremely cold, snowy winters (remember being semi-arid and arid does not mean it does not snow, this is not a fucking tropical country, it still snows several times each winter in most parts of the country -- yes, even in the plains) they used krisinine heaters. Smelled like shit. Honestly, you could wake up one day and see you've died and RIP'd out of existence because the krisnine heater had exploded or something.

So the only way I can get wood to burn my memories away is to go cut a tree at the park near our home, and they'll arrest me for that. There's no 'bundles of firewood' for sale here. Only charcoal. Minecraft style. Chicken jockey.
>>
>>107106715
you know this shit
the purifying aspect of fire
you just have to keep what youre burning free of other purpose
its the same shit
then you throw you're associative symbols into the fire to reset the charge
"fire purifies"
it actually resets.
like steel.
anyhoo
make your campfire fag
then come back to us
>>
>>107106713
yup
>>
File: rdna3_hardware_model.png (429 KB, 1130x285)
429 KB
429 KB PNG
>>107106507
>its just c but asynchronous
no it's not, it's C but you're implicitly writing multithreaded SIMD (or something that allows divergence between vector lanes somehow in the case of modern NVIDIA cards that NVIDIA calls MIMD which is never really explained)
also opencl C, especially vanilla opencl C without features like subgroups is about as abstracted as glsl from the hardware
its programming model is nestled squarely between opengl glsl compute and vulkan glsl compute with all the bells and whistles turned on while hip and cuda being vendor specific have direct hardware feature access and AMDGPU ASM (or NVIDIA PTX since they don't let you write real assembly) being the closest to an actual hardware model
>>
>>107106715
>>107106741
one last thing
watch the fire til it dies
its a psychological trick, you will understand when that happens
>>
>>107106748
look
to me
its buffer x
and then vector types
which you access like mini arrays
it doesnt get simpler in my mind

glsl though
you got the weir ins and outs
and the fucking mappingqs and shit
its weird to me
maybe im weird
but opencl is straightforward as fuck compared to glsl
for me, at least
>>
>soilence
yeah
youre used to that shit
but you underestimate what it costs to keep in mind how youre gonna translate a pure compute problem into a friggin RENDERING pipeline
fukken glsl is NOT supposed to do that
and openclC is just C. only with slightly different rules...
>>
its legit is more easier-er
ill die on that fukken hill
>>
>>107106662
gamedev requires not just writing code, but also being good at art, music and design, which are not skills that I have.
>>
>>107106871
a) you can outsource
b) allow me to introduce you to song of syx
https://www.youtube.com/watch?v=oucHl9NM97g

actually, the most important thing is not graphics, but sound
>>
the most important thing in a game is just one more number bro just one more stat I HAVE to grind in this skinner box just one more upgrade PLEASE
>>
>>107106912
nah thats only a dimension of player engagement
it doesnt swork with ie. hearts of iron players who dominate the whole planet with afghanistan
>>
>>107106912
>>107106919
cont
maybe a more classical counter example:
dwarf fortress.
you always have to deal with losses
its THE game that disallows a "perfect garden" style of gameplay
>>
(it actually adjusts thz menaces to how well youre doing. like rimworld does. actually RW creator cited DF as major inspiration for his project from what i heard)
>>
aaaah
here we GO
https://www.gamedeveloper.com/design/how-i-rimworld-i-fleshes-out-the-i-dwarf-fortress-i-formula
based chud gpt btw
fukken correlation machines ftw
i can indeed remember only fragmentary shit
its like, compressed memories and chatbawts are 100% compatible with that
>>
>>107106654
>Again, there is nothing here.
then write programs for other people
ask parents, siblings, online 'friends' if they do anything manually that you could try automating with a program
>>
>>107107038
yes, but how do you make em phay
>its your neighbors you dweeb
thats what makes em vulnerable though
>>
>>107106893
Even something like Songs of Syx is far far far beyond my artistic abilities. I can learn a programming language, framework, or game engine. I can learn algorithms and data structures. But I see no path to learning art, music, or game design.

>>107107038
>friends

Now you're just mocking me, anon.
>>
>>107107167
How to get a game tester:
1) Go to a bar at night.
2) Wait until a woman passes out.
3) Kidnap her.
4) Tell her she can't leave the basement until she finishes the game.
5) Feed her a bowl of eggs.
No excuse.
>>
I'm well-versed in online culture enough to quickly code this video as far-right ragebait:

https://www.youtube.com/watch?v=YK2mLTxryhk

Sorry for off-topic, but correct me if I'm wrong. I don't watch American movies (I literally don't, it is not impossible to never watch an American movie), I've never watched a superhero movie that was not directed by Bristopher Golan. But I'm "in the know" enough to somehow point out the fact that, people who call James Gunn anything but an average director who makes popcorn flicks for the unwashed masses of America, are somehow connected to the far-right part of the political spectrum. He also 'talks' like one. I don't know how to relay this, but the register these so-called 'chuds' use in their language is unique.
>>
rewriting the compiler for my os, i'm adding regalloc and actually organizing it well this time. also, is ioctl worth implementing or should i stick to control files like in plan9? or maybe provide a bounded ioctl and pack the parameters into a struct?
>>
>>107107285
"Adding" regalloc? It did not have it before? So how did it work then? You can't have a compiler with it.
>>
>>107107369
yes you can, i just stuck to using gprs r0-r4 of my cpu arch. r3 = addresses, r0/r1 left/right operands, r2 result, r4 for anything else. absolute nightmare lmao
>>
>>107107167
>But I see no path to learning art, music, or game design.
its actually a matter of rtfming though
in case of doubt, fall back to the basics
>>
>>107107407
Uh. I think it's still register allocation, but in a 'naive' way. Since you're still allocating register, but not in a smart way.

Start with a simple Round-Robin algorithm. Then move on to Linear Scan. I recommend Linear Scan against Graph Coloring. c9x.me likes it. I think QBE uses it.
>>
>in case of doubt, fall back to the basics
>which means, that in absolute theres basics to be had in all disciplines
>including art
yes theres a theory to art.
theres even a theory to humour.
you may not be briliant, but you can be competent
>>
>>107107233
>somehow connected to the far-right

No one cares. It's such a shame technology has been hijacked leftists and sexual degenerates.
>>
>>107107456
yea i suppose you could call it that lol
i'll look into those - thank you
>>
>>107107490
this.
shit was pretty apolitical before the zealots came in
>>
tech was always centrist
hear me out:
centrism is keepi,ng what works, change what doesnt
its NOT the amalgamation of the rigid adherence to old ways bc thats what worked until now
and its NOT bourgeois revolution which is the left (cf. origins of what "left wing" means)
which is full corpo
unironically tech was always anarchist-populist.
fukken centrizm. in other words- non ideological rationalism
>>
Reject the left.
Reject the right.
Embrace Java.
>>
>>107107632
thats the spirit
>>
but do C actually
>>
>>107105893
Cute emoji woman.
>>
>>107107490
I don't care either. I'm Iranian, and although I'm an atheist, my politics are pretty conservative and I consider myself to be a 'Cultural Muslim', the same way Richard Dawkins calls himself a 'Cultural Christian'. So you can imagine my politics are adjacent to that of people like Dawkins, that dude who got knocked on on the corner of the London street by an Antifa hoodlum, or the late Christopher Hitchens.

However, my politics are not, at all, interoperable with Western politics. I believe homosexuals must be dealt with (maybe not by death, but by oppression) and transgenderism being legalized in Iran was a mistake. I'm also pretty Anti-semitic.

What I find weird is that, Americans don't 'reflect'. Even Java reflects and introspects, but Americans, not. Some lady on a Youtube channel called "Farm to Taber" said American farm owners tend to keep passports of HO2 workers. This is the exact same thing done in Gulf Arab countries. But when THEY do it, they are 'le bad'. When the Westoid does it, it is 'le exception'.

I'm honestly fed up with Westoid's lack of ability to reflect on their misgivings. They have raped, pillaged, plundered and murdered three-quarters of the planet, and they expect, after only one generation of 'pretending' colonialism is gone, their hands are clean.

I'm just so fed up with this whole 'west' thing. Just die already. Noah's second flood cannot come any sooner (and given the changes in climate, it may come sooner than we expect). Wash out all these goddamn retards who think they are better than the rest of us.
>>
>>107107722
>t. poltard, only brown
post code
>>
>>107107722
Also, keep in mind that I have no love lust with the Arabs. I hate all Semitic people. Jew or Arab. If it's Semitic, it's a deadly snake that must be dealt with.

People often forget that Jews and Arabs are cousins. In more than one way. only 17% of Jews in Israel are Ashkenazi. The rest are Arab scum.

>>107107749
I post code everyday. I'm just manic right now. Looking for a fight. I don't wanna post on /pol/ because everyone there is a drunk loser single dad who just skipped the weekend with his child because he was not paid at his janitor's shift at the drug store. Not very 'erudite' so to speak.
>>
Ok whatever my mania subsided. I have a job now and I was just handed $100 by my boss to buy a phone, so my life is 'relatively' ok for now, so my mania lasts for about 2 minutes.

Still, I stand by my opinions that Jews are snakes. All Semitic people are snakes. They must be dealt with, using state-of-art Zyklon-B. In fact, I have half a mind to make a C compiler called Zyklon-C. A compiler that repels Arabs and Jews. And all the scum who support them.

What is the difference between some rich asshole in the Global North giving millions to Israel, and some rich asshole in the Global North giving billions to the Saudi Princes.

Anyways;

Check out my pager: https://github.com/Chubek/Nevermore. I wanna add syntax highlighing + search to it.
>>
>>107107764
if youre lookin for a fight
posting code is the best way to find one
regardless of the lang theres gonna be people who are gonna challenge your solutions
>>
>>107107764
>>107107875
cont
if you write in c, its possible you will find me amongst them
especially if yuo write in c.
thats how we get better so you can consider it brotherly love
>>
>>107107875
Ok. I'm currently planning on making an RTL-friendly documentation language, similar to Markdown, that compiles down to HTML and Docx (for now). This is mostly for my own use, and writing the translation tasks I am handed to at my SCA job.

I want to write it in Ruby, and use Caracal for the Docx input.

I wanna use ERB templates for the HTML output.


Fight me on my solution. And in fact, truly fight me. I wanna know if there exists something like Caracal, but for HTML, for Ruby.

Or fight me on my choice of Ruby.

inb4 use Pandoc. No, none of Pandoc's supported languages are RTL-friendly.
>>
>>107107911
*for the Docx output.

For reference, Caracal uses a Ruby DSL to output Docx. And it uses HTML tag names.

I wanna know if there's a way, that I, without having to implement my own Ruby DSL, to have cross-target HTML/Docx output, with the same 'tag functions'. Like how Caracal uses `h1` for Docx, I want that `h1` to translate to HTML, given a simple boolean flag.
>>
>>107107911
as a c programmer id skip all of that and emit html/css directly from the framework
as in:
"window, size relative: 1/3,
ascii size:16 font:impact text:''this is a text" etc
using intermediary frameworks sounds like alot of hassle
but thats me
>>
so basically writing a macro-html/css that takes in a config file. so basically javascript, but reinvented
bc ima c boi and i cant be arsed to learn others spaghetti
>>
>>107107939
C does not mean 'no libraries'. Even embedded C programming is based on external libraries. For example, where I to use C, I would definitely use libxml2, since both Docx and HTML are based on XML, and XML is based on SGML. Tim Berners Lee ripped off SGML to make HTML, then XML came along, etc. What I'm saying is, given both HTML and Docx follow the same format of SGML/XML, I will definitely use libxml2, if I were to use C, that is.

But doing it in C is retarded. In fact, I have half a mind to do it in JS, so I can use the 'docx' library that is browser-embeddable, so my sister can just use a webpage to write her Word documents using the markup language. She's a med student, and she has to use Word for her patient reports. I think she'll appreciate a tool like that. As long as it is easy.

In fact, I want it to be both easy, and have macros/variables. Or "Strings" as TROFF puts them.

I'm really confused vis-a-vis the syntax. I tried to have ChatGPT design a syntax for an RTL-friendly, Persian-friendly markup language. But it fucked up.

This is certainly the conundrum.
>>
>>107107977
yeah no you missed the pun
>when one is used to using a hammer
>everything looks like a nail
ofc its not rational to buil a webserv from scratch in c
or is it?
im capable of doing that just for the keks
but also if i were to do something 100% secure id do it in c bc then the code is not a factor
only the libs and syscalls are
>>
File: distrust-the-science.png (26 KB, 353x315)
26 KB
26 KB PNG
yea i said it
unironically c is safer than anything else bc its so much simpler to audit
le safety meme only concerns interns and seething tranies
>>
>>107107958
I don't know why you think 'implement everything from scratch' is a wise thing to do.

I was like this, for a while. I admit. I thought everything being implemented from scratch was good. Terry-style. Terry has ruined a lot of people.

But I'm bipolar, not schizo, so I got out of the CIA-nigger-sized 'implement everything from scratch' hole I had dug myself into, and I ADMIT I LEARNED A LOT IMPLEMENTING THINGS FROM SCRATCH, but if you want people to actually USE your shit, you must use libraries. I won't got as far as using a ready-made IR like LLVM or QBE for my compiler, but I'll certainly use libraries like Z3 for dataflow analysis, etc.

I'm currently planning on implementing ECMAScript (JS), with focus on systems programming, CSP-style threads (a la Go and Erlang), and a C interoperability layer. This is the `.gitmodules` file I've prepated for the external libraries:

https://gist.github.com/Chubek/a6a30d3146267e9f1aab009b39bc7d8a

It's a lot of externals, yes. But good software 'stands on the shoulder of giants'. I realize most of these are not 'giants' per se, but they compile very fast. For example, `libtommath` to handle `BigInt`, compiles faster that GNU MP, and I don't need the decimal stuff anyways.
>>
File: modern-sepples.jpg (149 KB, 800x533)
149 KB
149 KB JPG
>>107108027
>I don't know why you think 'implement everything from scratch' is a wise thing to do.
i didnt say that
wghat, the implication of using c?
but i btfo the libc w/o recourse
its the justification to even use c
if one doesnt btfo the libc
then theyre better using see plus plus
>>
>if one doesnt btfo the libc
>then theyre better using see plus plus
kinda by definition, when you think about it
if you dont beat the libc, then better use the libc
>>
>>107108018
> le safety meme

It's not a meme man. If it's a meme, then why was I just paid $100 as pre-payment for translation of an article regarding UAF (Use-After-Free) in the Kernel.

Safety is a big concern, and the SCA industry is massive. PLT fags like me could only get a job in SCA.

>>107108039
I will never use C++. Garbage language. I dropped out of college because the professor (a woman who wore a surgical mask all the time, as if we gave her AIDS or something just by being in the same room as her) wanted to teach C++.
>>
>>107108054
its 1000% a meme
if i can shit out 20 klocs w/o a single fault
it is a fucking meme
t. dropped out of the 10th grade

>I dropped out of college because the professor...
hopefully youre doing good, anon
usually college is a ticket to an easy life
>>
>>107108054
btw, the money was for buying a phone, not pre-payment.

I ended up buying a Redmi. I don't know what model. Something pre-14. I don't care about FUCKING phones. Cancers eating society alive.
>>
>>107108090
Not the shitty college I went to.

I'm 32 but I'm retaking the entrance exam so hopefully, at this late age, I could be accepted into FUM's ECE program.

I want to make 'alternative-architecture' machines. Like the dataflow machine, implemented in hardware.

I had Sonnet 4.5 generate me code that supposably implemented the dataflow machine for FPGAs. I certainly don't trust it.

I just love doing these stuff. I already know plenty of CS so I'm going to college to study something new like ECE.

Another thing I wanna build is big-ass computers. I don't mean in the modern sense, clusters of microprocessors and stuff like that. I mean BIIIIG machines. Something like the VAX or the PDP-11, brought to the 21st century.

Miniaturization is a Jewish plot.
>>
File: rule-followers.jpg (90 KB, 571x607)
90 KB
90 KB JPG
>>107108130
ok
me, i have something like 350klocs under my belt
i only coded for x86-64, and im self taught so theres plenty of things i dont know
but i know enough to compete with paragon implementations of certain stuff
like the e-something l-something algorythm
for the anon who posted the libs:
yes i got the libs, i dled them
i currently have them on my computer
no, im too lazy to look up how to compile them
because i made a mistake in my time-computation
im actually on par with the EL algorythm
on a worst case scenario
so i didnt bother looking further into it
im supposed to have other shit to do
but i programmed 100 lines since then and then sat on my fingers bc im such a big fuckup
maybe tomorrow ill do better
/rant
>>
File: free-internet.jpg (114 KB, 679x725)
114 KB
114 KB JPG
no, not /rant yet
i computed the constraints
the algo takes 60 cycles
i have ~400 items
thats 24.000 cycles to convert the shit

but i have 270.000 cycles to play with when i deal with a cold cache
~30k with a warm cache
i didnt even need to go that far bc the usecase is on cold cache
>>
Terry looked weird as shit, that's why he was schizoid
>>
>>107108206
to people who are curious:
that babbe boils down to parsing text files formatted in a specific way ~twice as fast as my sdd can fetch em
but also i have a special case ascii to float thats as fast as a paragon implementation thereof
>>
which isnt too impressive of itself
but it means i have a journeyman level of c
feels good bros
>>
File: C-avior.jpg (1.67 MB, 750x1399)
1.67 MB
1.67 MB JPG
yae
ima fukken C-ult initiate
yae nikkuh
fukken
you owe me taxes
>>
File: jungle.jpg (461 KB, 2048x1536)
461 KB
461 KB JPG
>>107108169
>>107108206
You're over-schizo'ing dude. I cannot comprehend your post. I'm an ESL speaker of English, mind you, so maybe that's why I cannot follow your diatribes.

>>107108217
Ok. Here's a disheveled photo of me in the Iranian Northern-Caspid jungles, about ~10 years ago. Do I look /weird/ enough?

I will never do video streams, though. I cannot verbalize as elegantly as I write prose. I have no idea what my English accent sounds like. I think it's a mix of the garden-variety Persian, with some Balkans thrown in.

This guy, Yanush (his channel is called 'Living Ironically in Europe') has an accent I aspire to.

My obsession with sounding 'good' in English is a dead-end cause anyways. I doubt that I'll ever be put into a situation where I'd have to speak English. The soft power of Anglosphere is quickly fading. Most 3rdie countries (and by '3rdie' I mean
'not East Asia or WEuro/NA', basically, I mean places like Russia, Iran, Turkey, Balkans, Central Europe to an extent, basically any country that has developed janky games in the past 30 years -- stable enough to develop vidya, not prosperous enough to develop GOOD vidya!) are starting to teach languages like Korean in their schools, and Chinese.

English is quickly becoming the 'Aramaic of the 21st century'. This was a language everyone and their dad spoke in the early ADs, but the place it was born, 'Aram', was leveled and turned into dust waaay before Baby Jesus said his first words.

We need a lingua franca. And the reason French did not become it, was not that nobody spoke it, plenty of people spoke French. My great uncle spoke great French, he learned it at MUMS (where my sister is not studying medicine). But French is a fucking haaard-ass language.

English is a fucking peasant tongue. It has no conjugation. French has like sixty gazillion tenses. English has, I dunno, 2? Plus, you'd die before you learn the subjonctif. English does not have anything close to that level of complexity.
>>
>>107108402
Although, English has some weird 'gotchas'. Imagine I'd said "complexion" instead of "complexity".

Fuck this peasant tongue. It has no standard way of forming words.
>>
File: clown.png (762 KB, 680x750)
762 KB
762 KB PNG
>>107108402
>I'm an ESL speaker of English, mind you, so maybe that's why I cannot follow your diatribes.
nah its ok, im just drunk
we had a discussion on dpt about the fastest way to do an ascii to float
thats what im alluding to
>>
>>107108417
> ASCII to float

I implemented that in 6 languages as a part of PoxHash, which I've linked to before, but anyways:

https://github.com/Chubek/PoxHash

This was a challenge to implement everything from scratch. This application was made pre-LLMs, mind you. All my own code.

It implements ASCII to float in the interface files for each language.

Have a look at all 6 of them.

I wanna implement this for more languages. But I have REAL software to write.
>>
>>107108430
yeah
but were talking about the fastest way to do that in c though
thers a lookup and approximation method
and theres the simd way of doing that
and the discussion was whose is better

turns out both methods are more or less equal
were talking about ~60 cpu cycles
for scale a function call in c takes 10-15
a conditional miss takes 15
>>
File: 5x16-fourtoedstatue.png (1.13 MB, 746x2094)
1.13 MB
1.13 MB PNG
>>107108039
How old is C++?
>>
>>107108430
>>107108473
cont
a read from l1 cache takes 4 cycles
at this scale, each read from cache counts
one read is ~8% of the whole runtime
>>
>>107107414
What manual? What basics?
>>
>>107108492
idk exactly
35y? i think something like that
>>
>>107108402
Nah you just look like a coder
>>
>>107108496
idk man i watched so much design shit i cant even tell you where to start
i also had drawing lessons at school
alongside latin an extra maths
bc i went to the equiv. of westpoint for my country
anyhoo
idk where to start
idk, ask chud gpt. or maybe start with color theory but i legit never tought of ever having to tell someone how to learn artshit
https://en.wikipedia.org/wiki/Color_theory

i have no idea how to teach you
but i can assure you theres theory to everything
you can rtfm art. you wont be a genioos, but you will be competent
>>
>>107108562
depends what you want to do with said ML
it can be impractical due to compute power and other stuff

what do you have in mind?
>>
>>107108562
No. We were making simple models to distinguish digits from scratch during the 2nd year or so of CS.
>>
>>107108594
thats actually a little bit complex
you could have just the corelation of two inputs and that would be ML
you could train that on a game boy
>>
maybe im exaggerating but the point still stands
>>
>>107108606
???
>>
>>107108628
yeah
you work on a bitmap
which means a big input matrix

what if your input was just two pixels?
>>
>>107108644
nah you can forget about it
not enough compute
>>
>>107108644
>>107108650
for reference: each vertex is gonna be 3 numbers
multiply it by the number of triangles, more or less, close enough
maybe divide it by 2 to get more accurate, but youre still several orders of magnitude off what your target arch. is capable of
>>
fuck glib, fuck GOBJECT MODEL, fuck gtkmm, fuck carmablache, fuck workbench, fuck XML files, FUck GNU AND FUCK GTK4
>>
>>107108654
google collab?
what is it?
google compute but misspelled?
>>
>>107108665
not a problem if you make your own gui toolkit like i did
>>
>>107108671
yeah so basically you have to compute the relation between all of them
and cross reference that with your dataset
oh, and all that happens through curve fitting, so youre gonna multiply that by the no of iterations youre giving yourself

i dont think youre targetting the right machine
i think youre gonna have more chance using a gpu
>>
>>107108679
show me a screenshot
and yeah rolling your own immediate mode gui is a million times more pleasant to start
>>
>>107108640
People make GPT based LLMs in Minecraft redstone, it literally doesn't matter.

>what if your input was just two pixels?
Then it will be utterly useless. Are you retarded?
>>
>>107108671
>>107108687
cont
and i dont think you have enough data to train a model
if you dont have access to some open domain shit i think the project is dead in the water
>>
>>107108690
>some free gpu you can use at google collab to use.
idk man
that sounds unrealistic
i dont even do gen ai, i do ml
and even for recognition your dataset wont be enough
and you dont have enough compute to do that in a timely manner
>>
>>107108707
neh
not gonna work with your dataset and hardware
better look for force multipliers when you do your 3d
>>
File: 250930-204137.png (1.08 MB, 1920x1080)
1.08 MB
1.08 MB PNG
>>107108688
pic related
>and yeah rolling your own immediate mode gui is a million times more pleasant to start
my gui toolkit is retained mode
immediate mode is inefficient when implemented naively and becomes more internally complex than retained when trying to make it efficient
the api design that mixes input with ui layout also creates unfixable design flaws (layout depending on input requires doing layout multiple times etc)
>>
>>107108756
ml is not necessarily an nn kek
or rather
if you bend definitions,
every program can be reformulated as a NN
with each function/method being a "neuron"
>>
File: elektrokot.jpg (36 KB, 750x742)
36 KB
36 KB JPG
>>107108756
>>107108779
cont
a better definition of ml would be-
>self adjusting program
>but based on stats
>and usually in two stages but not necessarily
>>
>>107106430
>more performance
I don't think so. Half of the pipeline is built into the hardware.
>>
>>107108814
yeah but not performance in that way
performance in the way that you have direct control over the memory operations
which means doing stuff like coalescing your reads and explicitly utilizing local or even registry type storage
maybe shits different with vulkan but you dont have such a granular control with glsl
>>
File: no-handicapped-aloud.png (44 KB, 1080x972)
44 KB
44 KB PNG
>>107108814
>>107108881
cont
also ive been told that kernel efficiency is the ratio of mem ops time to proper compute time and youre supposed to get to 1
which makes sense
you want to saturate your memory bandwidth when youre dealing with gpus.
youre doing big volumes, thats why one's using gpus, thats the usecase
>>
(oh, yeah, bc mem ops happen at the same time as compute ops on a gpu. simplifyingly)
>>
>>107108901
you want to generate shit thats more complex than chud gpt
forget about it
>>
with cmake do you always have to make something a library to share it between projects, or is there some way to bundle it as 'source code to be compiled by the one who uses it"?

I created the following:
>library to use in a few projects
>project A using library
>project B using library
now I create a new "not library" that uses the library and is used by both project A & B. I would like it to act as if it were source code buried under the projects themselves but located externally (because it's shared across projects). how could I achieve this? I don't want to make it a library because then I have to deal with building it independently and it sourcing dependencies itself rather than getting them from the project that is using it. Also while everything under this common source directory will work on both projectA & B, they can pick and choose to only use parts of it where as if it's a library they kind of get stuck with the whole thing
>>
>>107109706
Just make it another library. It's far less of a headache.
>>
Adding side pots to my GTO solver.
>>
just stop making these threads at this point no one wants to post in this schizo hive
>>
>>107106690
>>
>>107112394
I post my projects and snippets of code here and give 0 fucks what happens in this thread 99% of time.
>>
>>107112564
O3 makes an optimization pass over what youre giving it, overwriting the hints
>but putting it in parentheses adds a store
yes, but thanks to that whats in the parentheses can be computed separately, fully taking advantage of ilp
>>
>>107088464
I am camping nude in the Mojave desert working on a suntan without tan lines :)
>>
>>107088464
 u = { x = 1, y = 2, z = 3 }
print(#u)

>lua
I don't undertand if the assignment operator "=" returns the value, the variable or a true/false is the operation was successful or not,
and, the "#" operator should show the length, but why "u" have length zero? I don't get it
>>
>>107113080
>O3 makes an optimization pass over what youre giving it, overwriting the hints
So? Your "hints" do not mean shit, standard C says nothing about stores or whatever. As soon as the code generates the same observable output compiler can do anything it wants.
>>
File: carlos-veggies.png (272 KB, 600x600)
272 KB
272 KB PNG
>>107113132
>muh standard autism
ah, youre angry bc you didnt know about this shit.
youre welcome i guess
>>
>>107113132
>As soon
*as long
>>
File: 1409901609892.jpg (43 KB, 372x372)
43 KB
43 KB JPG
>>107113141
What?
>>
Are there any ways to simplify this?

  template <bool BIT>
static constexpr u32 find_sequence(u64 *buckets, u32 num_buckets, u32 num_bits) {
u32 run = 0;
for (u32 bk = 0; bk < num_buckets; ++bk) {
u64 bucket = buckets[bk];
if (!BIT) bucket = ~bucket;
u32 bit = 0;
do {
if (bucket & 1) {
const u32 ones = tzcnt(~bucket);
run += ones;
bucket = ones == 64 ? 0 : bucket >> ones;
bit += ones;
if (run >= num_bits) return (bk * 64 + bit) - run;
if (bit < 64) run = 0;
} else {
const u32 zeroes = tzcnt(bucket);
run = 0;
bucket = zeroes == 64 ? 0 : bucket >> zeroes;
bit += zeroes;
}
if (!bucket) break;
} while (true);
}
return U32_MAX;
}
>>
File: libc-ohio.png (681 KB, 1334x750)
681 KB
681 KB PNG
>>107113157
yea
you throw the standard at me while ignoring that shit can be implementation defined
but also even the processor has properties of its own like out of order execution, and instruction level parallelism

welp, the standard isnt everything.
growing out of the standard is where learning actually advanced c begins
>>
File: kernighan-on-lamao.png (261 KB, 850x400)
261 KB
261 KB PNG
>>107113157
>>107113184
and the parenthesis are a great example for that
theyre a hint youre giving to the compiler to allow it to make a better job
it isnt present in the standard as you noted
but it is something that gets taken into account by the compiler, and you see it when you compile with -O0, all optimizations disabled
>>
>>107113184
>>107113204
This is not how compilers work.
This is also my last response to you.
>>
>>107113160
What does the code do? What is in the buckets?
>>
>>107113226
Finds a sequence of consecutive bits. Bits.
>>
File: g-fc.jpg (51 KB, 640x434)
51 KB
51 KB JPG
>>107113221
this is exactly how compilers work
the whole language is actually hints.
even the asm produced is actually hints.
now your seemingly secure view of programming is crumbling to pieces, i can let you go
>>
>>107113244
This sequence can span multiple buckets right and the content of them is random, right?
>>
>>107113226
>>107113273
Yes, it's to find free areas in a bitmap.
>>
New bread: >>107113418
>>
>>107113160
make this branchless.
now.
>>
>>107114202
I can't.
>>
>>107114253
>:(



[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.