[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: 1767688128620.jpg (94 KB, 798x1000)
94 KB
94 KB JPG
What are you cool kids working on?
Previous: >>107756119
>>
>>107779804
almost finished anonymous page support in my mmap implementation
file-backed pages coming next
>>
>>107775729
>continue debugging
>see many constprop calls
>which is the compiler eliminating writes into parameter registers by providing its own versions of the same function doing the writes
>effectively turning many MOV ECX,5 in the caller into one MOV ECX,5 in the callee
>example: function calls foo(5,x) repeatedly, with 5 in ECX and x in RDX
>compiler turns foo(5,x) into foo.constprop.0(x)
>except the faggot retards responsible for GCC do not change the parameter order for the propagated code
>so the generated code doesn't write x into RDX, but into RCX
>and in foo.constprop.0 copies RCX into RDX and writes 5 into ECX
>and also sets up a stack frame despite the module being pure leaf code
>only to then later inline an entire other function into the caller (so much for code size)
>which, by the way, causes a non-volatile register to be preserved and restored to avoid a second MOVABS
>because the caller and the inlined function *happen* to use the same value, and because muh out-of-order execution
>so PUSH, POP, MOVABS, and two MOVs instead of just two MOVABS

At this point stoning autists is self-defense.
>>
an application with a metadata system more advanced than anon's tagging system from the last thread

Java btw (good morning sirs)
>>
File: 1767687942383j.png (1.72 MB, 1170x1286)
1.72 MB
1.72 MB PNG
>>107779804
i'm trying to learn fucking python so i wrote a script that counts the change for a cash register with different bills
>>
>>107779804
/vg/ scraper so I can acquire a dataset of a general I frequent. Then use machine learning on that dataset so I can capture the spirit of the general.
>>
Please explain the appeal of relational databases. Is it really that hard to just store your data in sorted compressed arrays on disk? Do you really need more than one process to synchronize the writes? Do you really need a dozen incompatible SQL dialects to write inefficient data queries? No, you don't.
>>
>>107780385
>Please explain the appeal of relational databases.
they already exist, you just need to connect to them
>Is it really that hard to just store your data in sorted compressed arrays on disk?
how will you query data in those arrays? how fast will it be if i want the data sorted differently?
>Do you really need a dozen incompatible SQL dialects to write inefficient data queries?
in what use case do you use more than one dialect?
>>
>>107780424
>they already exist, you just need to connect to them
Duh, but I am questioning the need for their existence in the first place.
>how will you query data in those arrays?
Linear and binary search. If you have Big Data or WebScale, then maybe keep an index with some of the rows with pointers to the main file so that you can skip most of the data to scan.
>how fast will it be if i want the data sorted differently?
Keep a copy of the subset of the data sorted differently.
>in what use case do you use more than one dialect?
I am rejecting the need for any query language. Just write plain C++ code or whatever you use to scan and aggregate however you need. A separate query language is a needlessly complicated system which inherently restricts your ability to write optimal query code.
>>
>>107779804
In my teenagerhood i had the opportunity to creat a system for supermarkets, was vibes. But i can't find the original code, beacuse my old pc can't work anymore.
>>
I read code I wrote 1 year ago and its fucking disgusting however it just (((werks))). Songs for this feel?
>>
>>107780510
maybe you would see the appeal if you moved beyond applications that only need a simple local datastore
>>
>What are you cool kids working on?
Finished my ncurses timer.
>>
>>107779857
I think you need to learn C to fuck python.
>>
>>107781115
Cool
>>
Why do they call it 'vibe' coding? Where did that expression originate?
>>
>>107781571
'cause we vibing.
>>
>>107781582
I... don't know what this means.
>>
>>107781115
this is sick. I did a little bit with ncurses and did enjoy it. Want to do more with it after I finish a couple things I'm working on
>>
>>107779804
I'm designing a scripting language to program AI
import tool calculator(expressions : string) -> data : dict<string, float>;

function main() {
switch (prompt) {
case "calculation request with data" {
$"extract data with tool";
// this tell AI "return result", structured as dict<string, float>
return get<dict<string, float>>("result");
}
case "without request" {
return literal("what is your request?");
}
case "calculation request without data" {
return literal("please provide your data");
}
case "not calculation request",
case default {
// AI give simple answer to user question, no tool calling
return "answer" - tools;
}
}
}
>>
>>107782460
import {
tool run_command(cmd : string);
tool write_file(path : string, content : string);
tool show_mdfile_to_user(path : string);
}

function main() {
switch(prompt) {
case "request related to local files" {
doLocalFileTask();
}
case "not local files task" {
return "answer" - tools;
}
}
}

function doLocalFileTask() {
// "local" keyword: reference to something exist in current context
local string plan = makePlanFile();

$"show plan file to user";

// new context object, uninvolved with current context
// after this line, this new context object will only know about the plan (file path and content)
new ctx plan_progress_checker = plan;

// use "new" so that AI context won't know about "tasks" object
new list<string> tasks = $"get task list from plan";

// loop keyword: all iteration added to context
loop foreach (var task in tasks) {
$"do task: {task}";
plan_progress_checker$"update to planning file: task {task} completed";
}

// silence: nothing added to context
silence while (verify() as issues) {
loop foreach (var issue in issues) {
$"fix issue: {issue}";
}
}

$"clear planning file";
}

function makePlanFile() {
run_command(/*some hard code cmd to check local files..*/);
$"write plan to a new md file with approriate name"
return format<"plan file : {%string}, plan : {%string}">("path of planfile and the plan content");
}

function verify() -> list<string>? {
$"check if user request sastified: only check for hard error, runtime error, etc";
return "list of problems";
}
>>
>>107780385
Not only you get ACID, with none of the memory corruption and all of the thread safety and consistent database state transformations, you get the relational model (actual math with rules that can be optimized) (you get access to normal forms, which remove data redundancy, increase data integrity, and therefore give you efficiency).
NoSQL is a meme reserved for Google and Amazon for the edgiest of edge cases.
>>
File: meme.png (294 KB, 1184x914)
294 KB
294 KB PNG
>>107781571
>>
>C++ modules didn't help build times and destroyed parallelism performance and thus pre-compiled headers are being considered to allow for more quickly building LLVM
kekw
>>
>>107779823
>my mmap implementation
what's the usecase?
>>
>>107782765
Rust had more compile time improvements in last 5 years than C++ modules will ever bring.
>>
>>107782741
>embrace exponentials
?
>>
>>107782774
Only usecase I can see is a batched version - where multiple changes to the page table are being made and TLB shootdowns are issued in bulk.
Other than that I don't see much use.
>>
>>107779804
>What a sexist book cover. Didn't include a female. Didn't include a tranny. Didn't include a furry. No colored kids.

Perfect! Where do I buy this book?
>>
>>107783173
Nice telling on yourself, underage.
>>
>>107782774
usecase is for my kernel
>>
>>107780679
>[disco] [female chorus] boo-gie tonite
can't find the song name
>>
>>107779804
When I grow up, I want to be a code monkey!
>>
I'm trying to get back into programming after nearly a decade of rusting in an old school environment where i was basically the only developer. Started fucking around with go but everything feels much harder than I remember, even simple shit like bubble sort. Anyone have that /g/ image with programming challenges? Hopefully they can un-rust me.
>>
>>107784259
>I want to be cucked by softwares all my life.
>>
>>107784259
Why not become a code monk
>>
File: man_made_horrors.jpg (689 KB, 1600x901)
689 KB
689 KB JPG
>>107781571
Error: Duplicate file exists. here >>107782741
The origin of the word is this tweet.
This guy was the co-founder of OpenAI and he is good at helping low iq web developers get a sense of what LLMs actually do
>>
>>107782741
>>107784540
The guy has been trolling for quite a while. Sometimes he switches to the hater/luddite side and starts trolling the incompetent vibe coders. Social media has always been ripe for trolling, the world being full of retards, but both the vibe coding bros and the staunch luddites have extraordinarily low average IQ.
>>
>>107784259
we have enough Indians in the field as it is
>>
>>107784835
not to mention working as code monkeys
>>
>>107782741
>>107784540
Thank.
>Feb 3, 2025
So the expression is not even a year old yet.
>>
>>107785285
>So the expression is not even a year old yet.
Yep, it feels a lot older than that.
>>
>>107779804
>What are you cool kids working on?
Memory mapping stuff for my emulator.
>>
>>107785818
mmio? whomst are you emulating
>>
File: 0fFfKO.png (95 KB, 600x300)
95 KB
95 KB PNG
>>107785851
PICO-8. It has rudimentary memory mapping that lets you change the position for screen, sprite atlas and such in memery.
>>
What do you guys think are the best ways to learn?
>>
>>107786729
not at all
>>
>>107786729
Making projects
>>
created my humble telegram channel
mainly for myself to keep good music and (tech) links

https://t.me/music_and_links
>>
>>107786729
writing programs
>>
>>107786729
Books and exercises for theory.
Written coding tutorials. (NOT video tutorials)
Integrating what you've learned in projects.
Analysing other peoples solutions.
>>
>>107786729
experience gained from real problem solving
shit listed here >>107787197 is really sub-par in comparison
>>
>>107787322
>experience gained from real problem solving
That's the third point on my list. I just don't believe in the throw-yourself-off-the-cliff-sink-or-swim attitude. You can't do real problem solving without some fundamental understanding of what you're working with.
>>
>>107786729
Assembly.

No, seriously. Assembly.
I had no idea how incompetent everyone around me truly was until I learned assembly in 2022. Before I had incredible respect for both compiler builders and hardware manufacturers. Now I believe the release of the 386 in 1985 was a great calamity, leading to the braindead designs of both NT in 1989 and Linux in 1991.

All because of assembly.
>>
>>107787682
>That's the third point on my list. I just don't believe in the throw-yourself-off-the-cliff-sink-or-swim attitude. You can't do real problem solving without some fundamental understanding of what you're working with.
That's assuming the project is complex, like a video game or something, bu there are plenty of simple programs to be made: string processing, file manipulation, web scraping, basic maths calculations programs, etc..
>>
>>107786729
>use the knowledge somehow
>more practice than theory
>work through worked out examples
>rereading/marking is useless, much better is to try and recall things from memory
>>
>>107787750
Not sure I get what you mean. A project doesn't have to be big. All those things you mentioned are projects you can learn something from. But even they can be daunting and insurmountable if you throw yourself on them with no clue about what you're doing.
>>
>>107787322
this
wasting too much time on shit like points 1 + 2 >>107787197 causes incompetence
best way to learn is to just dive into projects that interest you enough to shoot for ambitious scope + google everything on a need-to-know basis
>>
>>107787952
>Not sure I get what you mean. A project doesn't have to be big.
That's exactly what I wrote.
>>
>>107788171 cont
>>107787952
>All those things you mentioned are projects you can learn something from.
That's exactly my point.

>But even they can be daunting and insurmountable if you throw yourself on them with no clue about what you're doing.
If you really don't know anything yes. But after watching a single 2h python tutorial or similar, it should be doable to write a very simple programs. Then after playing a bit the rest of the list should be doable.
>>
>>107788171
Then I agree with you on that part.
>>
>>107781115
I made it so that now inactive digits are blanked out and when the timer finishes it flashes 00:00:00/--:--:--.

The time is passed in at run time like ./timer S, M:S or H:M:S.
>>
>>107788529
use a function map you fucking animal
>>
>>107788529
while(i < 2)
{
mvwprintw(digits[i],0,0,blank);
wrefresh(digits[i]);
}

You may want to look into waddch. Also, separate windows for your digits?
>>
>>107788562
I-I d-d-don't know what that is.

>>107788596
Yeah this seems to be the easiest way?
>>
i literally still continue to do nothing
and just sit around and do nothing
>>
>>107788633
How are you overlaying the timer onto nano?
>>
>>107779804
A kenster tracker
>>
Is Typescript + Go + C a good combination for all around problem solving on most domains? I tried learning Java but I can't be arsed to touch it unless is for modding Minecraft, and the Forge API is a mess.
>>
>>107789103
It's not it's in a separate terminal.
>>
>>107787682
"what you've learned in projects" does not imply problem solving
listing books, theory and tutorials first means you'll be learning solutions before learning problems - that's not how actual problem solving works
you do need to learn fundamentals first but it's best to start actual problem solving early, and learn things specifically to solve the currently given problem
>>
I have experience with iOS Dev for basic stuff but not android development. What I want to make is a gui that lets you send SSH commands with the click of a button. what is the easiest way/library to use for establishing SSH automatically when the app is opened?
>>
Any one ever taken the no syntax highlighting pill?
Was it comfy?
>>
>>107791427
it's not a pill, it's a tide pod
>>
>>107791427
it's retarded and it doesn't make you a better programmer
>>
>>107791427
It is more beneficial for languages with retardedly complicated and overloaded syntax. It's unnecessary and distracting with a properly designed programming language.
>>
>>107792148 cont
>it's retarded
the idea of discarding syntax highlighting for no reason I mean, not syntax highlighting
>>
>>107792148
>>107792270
how about you wait and re-read your post for a minute before you send it instead of being a hyperactive zoomer that must send posts like they're DMs to a girlfriend whose parents just went out and then "cont"ing every other post
THINK nigger, THINK
>>
File: 1622685241083.png (268 KB, 462x476)
268 KB
268 KB PNG
>Writing a plugin for Runelite (Old School Runescape client)
>Get most of the basic shit in place
>Time to write a UI so it's actually usable
>Needs to be done with Java Swing
>Putting it off for like 2 weeks now
I really want the plugin, but man, it's just so tedious.
>>
>>107792120
>>107792148
>>107792201
>>107792270
idk man it feels kinda comfy.
>>
>>107792515
It only appeared to me it could have been misinterpreted after this post >>107792201
>think nigger, think
as if this shit general encouraged it
>>
File: chrome_7lnYNOYScy.gif (698 KB, 1361x759)
698 KB
698 KB GIF
Added a masonry view to my lil side project.

Mainly getting ready for css grid lanes to drop: https://drafts.csswg.org/css-grid-3/#grid-lanes-layout

ai'd a polyfill then did the ui parts myself mostly
>>
>>107791427
>>107792598
I've made a horrible mistake and now my whole life is ruined.
>>
>>107791427
>Any one ever taken the no syntax highlighting pill?
Yes.
>Was it comfy?
No. Syntax highlighting is comfy. I wish I knew how to implement it myself in my text editor.
>>
>>107792148
I definitely read this post as
>syntax highlighting is retarded
>>
>>107779804
alright i had my fill of programming zogware, i want to start a project in something like C / C++ / (god forbid) rust, but i can't think of something cool or that of utility to actually build that would be fun (important).
>>
>>107793885
Reduce your constraints. Remove the utility part. Do something that would be fun.
>>
>>107793885
Write an algorithm that:
- prints out integer values as decimals
- by converting each digit as PBCD in a 64-bit register (16 digits/nibbles)
- naturally that leads to an overflow of 4 digits (because 0xFFFFFFFF_FFFFFFFF has 20 digits) if the number is big enough
- convert the number to ASCII using AVX instructions (that part's trivial)
- left-pad the number with spaces if the number isn't 20 digits long
>>
>>107791427
I've been trying all kinds of stuff and I personally find the best experience to be highlighting very few things, but not completely without it. This guy had some good ideas about this, although I don't agree with all of it https://tonsky.me/blog/syntax-highlighting/
but in general, syntax highlighting gives your code some structure, it's easier to skim and find what you need. as long as there's not too much of it
>>
File: GH7aS62aEAA95zv.jpg (306 KB, 1606x1294)
306 KB
306 KB JPG
>>107789180
>typescript
no, it's useless unless type masturbation gets you off. if you need types for your webshit you can just use jsdoc. no need to add extra build steps
>>
>>107788529
too many nested indents
each of those if statements should be their own function
>>
>>107794430
To this day I can't stop laughing at how many man hours are being wasted on type annotation systems and various linters/checkers/transgender-compilers for Python and JavaScript and even Ruby. And it still doesn't fulfill its purpose, because all the old and useful libraries are so dynamically typed, no amount of type masturbation can annotate them properly. Python doesn't even have a standard static type checker, so you never know if the library you are importing has been been type checked properly, or will type check with your own choice of a type checker, all of which are incomplete to this day.
All this effort could have been spent on adopting an existing proper statically typed compiled language for the Web, meanwhile the backend side already has all the languages you could possibly want, including the fucking Golang which is the best fit for web backend code monkeys out of the box.
>>
>>107782875
>embrace exponentials
yesss, embrace them while inverting the involutes. summon the ghosts of your forebears to code, code the fuckin webapp that'll be the new myspace. vibessss
>>
If helper_function is the only function accessing ARRAY, which definition makes the most sense?
static const int ARRAY[] = {...};
const int ARRAY[] = {...};
void helper_function(void) {
static const int ARRAY[] = {...};
}
>>
>>107794742
if it's global and not extern, it should always be static
if you only need it within a helper function, only put it there
>>
>>107794742
static constexpr inside a function that uses it
btw why the fuck we can't make function definitions inside function in C
>>
>>107794835
i also sometimes feel this way, but god. imagine the nested indents
>>
>>107794777
>if it's global and not extern, it should always be static
So if more than one function in the same file read from the variable, it should be defined like
static const int ARRAY[] = {};
void func1(void) { ARRAY[0]; ... }
void func2(void) { ARRAY[0]; ... }

And if the variable is global
// a.h
extern const int ARRAY[];
// a.c
#include "a.h"
const int ARRAY[] = {};

where every source file that requires access to ARRAY would #include "a.h"?
>>
i don't know what to do
im lost
i should be improving but instead i just sit in front of pc and doing nothing
>>
>>107794664
... what?
>>
>>107794939
>i should be improving
Goal too big and nebulous.
Define one small thing that you want to improve on right now.
>>
    switch(x)
{
// ...
default:
assert(false);
}

Is this fine?
>>
I want to program an alternative to regex with readable syntax. the problem is that I don't know what that syntax would be like. my best attempt so far is sometihing SQLy:
FROM
"items item1, item2 and item3 are in status ok"
CAPTURE
items, status
RULING
INPUT = "items " items " " be " in status " status
be = "is" OR "are"
items = LIST
ZEROPLUS >(WORD ", ") AND >WORD // > marks the capture as an item of the list

which looks dubious but perhaps it's not too bad
I'm very much in need of ideas/feedback
>>
>>107795283
>don't know what readable regex syntax would be
>want to program an alternative to regex with readable syntax
Putting the cart before the horse, aren't you.
>>
File: Maid thread.png (3.73 MB, 5433x3592)
3.73 MB
3.73 MB PNG
>>107779804
>What are you cool kids working on?
Posting maids.
>>
>>107795319
>posting lazy repetitive spam
slop
>>
>>107795311
I do have a proposal for the syntax as you can see, it's just that I'm still in time to completely change it if someone suggests an approach that I like better than my ruleset strategy
>>
>>107795407
Then why'd you say you don't know?
Try implementing it and see what trouble you get yourself into.
>>
>>107779804
a script to sanitize any disk and format encrypt them
>>
>>107795390
When I effortpost or share my research, janny just deletes my post and bans me. This place exists for slop, low-effort trolling and programming 101 questions.
>>
>>107795684
>programming 101 questions
I would be happier with more of this and less of that other shit.
>>
>>107795684
i've replied to you with effortposts and research and you've ignored me in the past so i think that's deserved honestly.
>>
>>107792515
no. fuck off newfag
>>
File: 1765316042602341.gif (805 KB, 498x468)
805 KB
805 KB GIF
>>107795704
I don't ignore anybody on purpose. What was posted? I can answer things now if you remember what you asked or have archive links.

There is a good chance I was just banned rather than ignoring anyone.
>>
>>107782875
maybe he's referring to the exponentials in the equations used to make AI the work?
>>
I'm so fucking bored. What are you niggas working on?
>>
>>107796947
>>107794258
>>
>>107786729
Let me preface this by saying: I'm the only one who is correct.

First learn Lambda Calculus
Then read SICP

Congrats, now you can pick up any language in a day.
>>
>>107795747
Ram > Rem
>>
>>107797707
>clownwhore > cuck
>>
File: 1741161183625319.png (143 KB, 763x1174)
143 KB
143 KB PNG
>interview coming up
>practicing jeetcode
>get this
lmao\
>>
>>107795684
>>107795704
>research
I'd like to hear about your guyses research
>>
>>107797847
>>interview coming up
>>practicing jeetcode
>>get this
>lmao\
what's the problem? It's good to program real utilities, although atoi() is retarded.

>ignore the leading whitespace
>no range check
>rounding instead of failing
>doesn't indicate to the caller where the number ends
>>
>>107798414
it should fail if the input string doesn't contain a valid number
>>
File: 1767441980110610m.jpg (61 KB, 775x1024)
61 KB
61 KB JPG
>>107798122
I made a Godel Numbering for Bipolar Binary Neural Networks, so I can count to Neural Networks to try to find the Maid Mind Computer Program, but it is too slow, even when I added Qiskit. I will have to find exponential speedup because the square root of a trillion years is still too long to wait.

The counter works for small networks, like those that simulate logic gates, but counting to big networks requires searching incomprehensibly large numbers, and most numbers correspond to networks which do nothing interesting or useful.
>>
>>107798802
>I can count to Neural Networks to try to find the Maid Mind Computer Program
You should've counted to potato instead.
>>
>>107798802
Damn that's really cool. Thanks for sharing anon!
But what is >>107798802
>the Maid Mind Computer Program
This?
>>
>maidnigger yet again spamming his drivel while samefagging/botting questions to pretend anyone wants to read that shit
>>
>>107798414
that problem has a 20% submission acceptance rate

good luck with these test cases
"0-1"
"-+-+-3"
" + 0 123"
" +0 123"
" +004500"
"2147483648"
" -42abc"
"00000-42a1234"
" -115579378e25"
"-91283472332"
"1+111"
"+-2"
" "
"9223372036854775808"
"+1"
".1"
"+1"
>>
>>107798941
and also, for the answers

0
0
0
0
4500
2147483647
-42
0
-115579378
-2147483648
1
0
0
2147483647
1
0
1
>>
>>107798941
>"0-1"
>"-+..."
>"...2abc"
>etc
In all honesty, such erroneous inputs should themselves be considered evidence of a bug. Like, for instance, if you had a function that "successfully" converts "2 3" into 23, or similar, then that function is fucked and bugged. Stuff like " -42abc" should probably not be considered acceptable. Retarded quiz tobh
>>
Why is Clang bad at non-explicit auto-vectorization while GCC is good at it and vice-versa? Is there a type of loop that both compilers like?
>>
>>107782774
It's for his hyper optimized FizzBuzz
>>
Unironically how can I learn to code? Im a high IQ (130) non-Indian individual. I used MATLAB for my math and physics theses for my bachelors. Should I try c++? How do I start?
>>
>>107799271
nandgame.com
>>
>>107799271
I would start with php, javascript, ruby, something similar to python without the gay whitespace. Then move to c++ after you're familiar with the fundamental practices.
>>
>>107799271
Do literally any free online coding tutorial that has problems for you to solve. Or, just hop on leet code and start googling things to figure out how to achieve the desired result.

C, not CPP, is a good place to start. It will try to force you to understand fundamentals by letting you shoot yourself in the foot repeatedly.
I'd recommend against starting with a weakly, dynamically typed language especially.
>>
>>107798941
>>107798960
Braindead amateur spec. The most important concern of parsers is correctness and precision. You can't be precise with a function like this as a primitve and it is trivial to skip whitespace if whitespace is optional and trivial to discard the input in which the integer belongs if there is garbage after the number that shouldn't be there. The day you need precise rules concerning whitspace, you're fucked with a function like this one.
this is what my function that parses an int32 returns
"0-1"
0
0V-1
----------------------------------------
"-+-+-3"
error
----------------------------------------
" + 0 123"
error
----------------------------------------
" +0 123"
error
----------------------------------------
" +004500"
error
----------------------------------------
"2147483649"
error
----------------------------------------
"2147483648"
error
----------------------------------------
"2147483647"
2147483647
2147483647V
----------------------------------------
"-2147483647"
-2147483647
-2147483647V
----------------------------------------
"-2147483648"
-2147483648
-2147483648V
----------------------------------------
"-2147483649"
error
----------------------------------------
" -42abc"
error
----------------------------------------
"00000-42a1234"
0
00000V-42a1234
----------------------------------------
" -115579378e25"
error
----------------------------------------
"-91283472332"
error
----------------------------------------
"1+111"
1
1V+111
----------------------------------------
"+-2"
error
----------------------------------------
" "
error
----------------------------------------
"9223372036854775808"
error
----------------------------------------
"+1"
1
+1V
----------------------------------------
".1"
error
----------------------------------------
"+1"
1
+1V
----------------------------------------
>>
>>107799314
"+ 0 123"
error
----------------------------------------
"+0 123"
0
+0V 123
----------------------------------------
"+004500"
4500
+004500V
----------------------------------------
"-42abc"
-42
-42Vabc
----------------------------------------
"-115579378e25"
-115579378
-115579378Ve25
----------------------------------------
>>
>>107799271
Pick a language, pick a book (or an online tutorial if that's what you prefer), start with "Hello, World!" (as is customary), go from there.

>>107799297
nandgame is cool and all, but fuck you it's not the right answer this particular question
>>
>>107799180
Apparently Clang likes the index and the length to be i32, anything else breaks vectorization for certain types of loop. Random ass rules.
>>
>>107799648
Isn't simd very particular about vector component types? And probably depending also on which types your cpu supports. It may be one of those keyhole problems
>>
>>107798941
My brainded impl following the algo:
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>

int32_t is_number(char c) {
int32_t n = c - '0';
return (0 <= n) && (n <= 9);
}

int32_t my_atoi(char *s) {
if (s == NULL) {
return 0;
}
while (*s == ' ') {
s++;
}
int32_t negative = 0;
if (*s == '-') {
negative = 1;
s++;
} else if (*s == '+') {
s++;
} else if (!is_number(*s)) {
return 0;
}
while (*s == '0') {
s++;
}
char *p = s;
while (is_number(*s)) {
s++;
}
int32_t mult = 0;
int32_t n = 0;
while (p != s) {
s--;
if (mult == 0) {
mult = 1;
} else {
mult = mult * 10;
}
int32_t a = mult * (*s - '0');
if (negative) {
if (n < INT32_MIN + a) {
return INT32_MIN;
}
n = n - a;
} else {
if (n > INT32_MAX - a) {
return INT32_MAX;
}
n = n + a;
}
}
return n;
}

void test(char *input, char *result) {
printf("%s -> %" PRId32 " (should be %s)\n", input, my_atoi(input), result);
}

int main() {
test("-2147483648", "-2147483648");
test("2147483647", "2147483647");
test("-200", "-200");
test("0", "0");
test("0000", "0");
test("-00000", "0");
test("++1", "0");
test("9", "9");
test("123", "123");
test("0-1", "0");
test("-+-+-3", "0");
test(" + 0 123", "0");
test(" +0 123", "0");
test(" +004500", "4500");
test("2147483648", "2147483647");
test(" -42abc", "-42");
test("00000-42a1234", "0");
test(" -115579378e25", "-115579378");
test("-91283472332", "-2147483648");
test("1+111", "1");
test("+-2", "0");
test(" ", "0");
test("9223372036854775808", "2147483647");
test("+1", "1");
test(".1", "0");
return 0;
}
>>
>>107799731
I'm more interested in your unit test function. The expected result parameter should be an int, not a string. And it should automatically evaluate and print OK of fail if the test passes. Brownie points if you print them in green and red respectively.
>>
>>107799731
>>107799815
based print enthusiast
>>
File: file.png (317 KB, 1091x720)
317 KB
317 KB PNG
After doing a bit more research, I believe that I've basically implemented a variant of PPM. The moving average I'm doing over token distributions is more or less equivalent to the rescaling performed on PPM counts when they reach a specific threshold, so my implementation is just slower (255 FLOPS per context per token learned, vs 1 integer increment and an amortized rescaling) and wastes more memory (2048 bytes per context vs <256). I'm going to try using sparse single byte counts with implicit pseudocounts of 1 (a byte might be too small for an implicit pseudocount of 1, but the memory compaction might be worth it to achieve larger context sizes). I still don't understand the exclusion and escape mechanisms PPM uses, but I'm not sure how much it matters for my usecase. I also found this paper https://web.cs.ucla.edu/~miodrag/papers/Drinic_DCC_03.pdf which seems promising for reducing memory footprint by pruning. The pruning I'm doing currently works but is destructive for out-of-distribution token histories.
>>
File: out39.mp4 (1.45 MB, 1024x816)
1.45 MB
1.45 MB MP4
I did a floodfill that fills rectangular areas instead of single-line spans.

It did it because I'm writing a paint program in tcl/tk, and I thought maybe it might be faster to do it this way, since it could potentially require less individual "draw rectangle" commands overall.

It ended up being slower in most cases although faster in others, but it was still fun to make.
>>
File: out40.mp4 (1.59 MB, 1024x816)
1.59 MB
1.59 MB MP4
>>107800017
another view where you can see the individual rectangles that it's filling in
>>
File: 1754555876079258.png (97 KB, 763x757)
97 KB
97 KB PNG
I give up for today
https://leetcode.com/problems/max-dot-product-of-two-subsequences/description/?envType=daily-question
it's a dynamic programming question
>>
>>107800026
Damn that's actually really cool looking
>>
>>107800017
how does this work, is it checking every single pixel and adding them to a queue?
>>
>>107800078
this shit is not real programming
>>
>>107800121
it definitely isn't, it's a mixture of a programming aptitude test + goycattle obedience trial
these problems measure how good of a goy you are (willing to spend hours studying all the various algorithms like backtracking, union find, djikstra's, etc.) and how competent of a goy you are (able to implement them and build a solution to retardedly abstract problems you will never encounter in the real world).
the "idea" is that if you can pass these you'll be a top tier slave for all of these companies, since once you get the job they'll have to teach you how to make network calls using their proprietary vibecoded slop apis anyways
>>
>>107799815
#define GREEN_MSG(s) "\x1b[32m" s "\x1b[0m\n"
#define RED_MSG(s) "\x1b[31m" s "\x1b[0m\n"

void test(char *input, int32_t result) {
int32_t r = my_atoi(input);
if (r == result) {
printf(GREEN_MSG("OK %s"), input);
} else {
printf(RED_MSG("XX %s (got %" PRId32 ", expected %" PRId32 ")"), input, r, result);
}
}

int main() {
test("-2147483648", -2147483648);
test("2147483647", 2147483647);
test("-200", -200);
test("0", 0);
test("0000", 0);
test("-00000", 0);
test("++1", 0);
test("9", 9);
test("123", 123);
test("0-1", 0);
test("-+-+-3", 0);
test(" + 0 123", 0);
test(" +0 123", 0);
test(" +004500", 4500);
test("2147483648", 2147483647);
test(" -42abc", -42);
test("00000-42a1234", 0);
test(" -115579378e25", -115579378);
test("-91283472332", -2147483648);
test("1+111", 1);
test("+-2", 0);
test(" ", 0);
test("9223372036854775808", 2147483647);
test("+1", 1);
test(".1", 0);
return 0;
}
>>
>>107800121
It's more interesting than real programming.
>>
File: brownies.jpg (147 KB, 2160x1215)
147 KB
147 KB JPG
>>107800332
>>
>>107800375
sounds like someone who never programmed anything interesting
>>
File: out42.mp4 (189 KB, 720x400)
189 KB
189 KB MP4
>>107800099
It works by expanding rectangles until they can't expand any further (all sides are touching something).
It checks pixels when expanding the rectangles, and then it checks pixels on the edge of the rectangle it just filled to schedule more rectangles to expand and fill.
>>
File: out44.mp4 (1.23 MB, 912x544)
1.23 MB
1.23 MB MP4
>>107800618
>>
>>107800680
>>107800618
It looks great, but unless the rectangle check is highly optimized doesn't this essentially still have to check every pixel to see if it can expand the rectangle?
Unless the animation is just for show and doesn't reflect the code undernearth.
>>
I built True Path Finder, a tool to facilitate collaboratively finding the truth about what will take a person from one state to another, using a very generic method: 1. Anyone can post any goal they have, or try publicly posted goals. 2. Anyone can try publicly posted methods to achieve that goal, or post their own. 3. Users try the methods and share their experiences as reviews. Repeated reviews are enabled and encouraged, to understand how their experience changes. 4. Users learn about each other’s experiences and may find a better method to achieve their goals.

There's a mode called "My Cave" in which you can do all that but privately. Following the cave analogy prompted me to make subsequent page's background color darker, and also making it so that you can only exit the cave through the page you entered. It was fun :) I hope it helps make it extra clear when you are interacting publicly or privately with the app, since everything else looks the same.

There are also "events" which anyone can create on any method, which are scheduled in advance, people RSVP to, and have 3 phases: Arrival, Practice and Close. A text chat is enabled only in the Arrival and Close phases. The text chat is accesible only in batches of 7 to 21 people, to ensure focused community discussion and allow the group to self-moderate. If all batches are full and a group would have 6 or less people, they would be allowed in full batches.

These events allow people to ask focused questions, reflect, foster community and discipline. They also avoid long asynchronous discussion which may distract from achieving goals. There's a 21 min daily limit for using the app, to drive the point further :)

There's a guest mode available so that you can do everything except post public reviews and chat in events unless you create an account.

https://truepathfinder.vercel.app/
>>
>>107800680
>>107800702
yeah I have the same question. it looks like you're making things more complicated and slow because of some notion that a libraries "rectangle" call is magically more efficient
>>
I'm making a litte DSL and it's litle VM for parsing. It occured to me that if you remove both the lexing and the general backtracking, the parser generator becomes very simple.
General backtracking is not needed for a recursive descent parser and writing a lexer by hand is easy and simple, it's not necessary to automate its generation.
>>
File: some fun.png (33 KB, 1116x637)
33 KB
33 KB PNG
>>107800704
aaand an img for fun
>>
>>107796947
Reloading this thread waiting for inspiration to strike.

Any day now.
>>
>>107796947
>>107801575
>I don't know what to program
Are you braindead?
>>
>>107799297
Yeah I played this and Turing complete on steam. The assembly challenges in Turing complete is what motivated me to start programming.
>>107799313
Do you recommend any particular tutorial? I'll try C
>>
>>107800001
sybau
>>
File: image.png (722 KB, 1265x709)
722 KB
722 KB PNG
Over the past week I’ve been vibe coding a Minecraft clone using the copilot chat in visual studio. It even has physics using Jolt. Twitter was hyping up Opus 4.5 and I wanted to see what all the fuss was about. I’m already tempted to do a rewrite (purely focusing on chunks/blocks) as I skewed into some random directions regarding items/UI and the repository is a bit of a mess now.

For the last couple months I’ve been using copilot to assist me in learning Vulkan and graphics programming but I’ve never actually put it in agent mode until last week, always ask mode. It’s amazing albeit scary what AI can accomplish (and me with AI) that would otherwise take me years to learn alone. I just bought the Claude Pro subscription since supposedly that’s the proper way to interact with the ecosystem so I’ll be doing some experimenting with that. And while I’m tempted to turn this little Minecraft clone into a full game I think I’ll wait for Hytale to come out in a couple days to ensure I’m not totally wasting my time on an idea that’s already executed. So for now it’s back to working on my general purpose renderer. I still have other app/game ideas to work on.
>>
>>107803003
I'd like to see the code.
Not because I'm gonna steal it, but because Vulkan is an API in which it's incredibly easy to generate slop (render passes vs command buffers, DMA copies instead of targeted writes into ReBAR memory, waiting for the queue to idle rather than using timeline semaphores, allocating device memory and binding resources individually rather than in batch).
>>
>>107803041
Of course. There’s nothing to steal anyway because it’s no different from all the other countless Minecraft clones on GitHub. I meant to post it in /gedg/ a couple days ago but forgot. Absolutely do tell your thoughts. https://github.com/Arctical/OpusCraft2

I instructed Claude to specifically use Vulkan 1.4, Vulkan.hpp, and “modern” Vulkan features. FYI Opus doesn’t get presentation sync correct off the bat hence there’s a validation error. In my personal renderer that I had Claude lay down the foundation for I manually fixed it. It still runs here so I didn’t bother fixing it, too lazy. Also in the current 3D chunk version I’m working on there’s some buffers not deleting properly. Not sure if that’s prevalent in the GitHub repo, I barely run on debug mode because of the stuttering. It was also having some issues using Vulkan hpp’s dynamic loader so it defaulted to using Vulkan.h in a couple places, again too lazy to fix. I’ll be doing a new version soon anyway.

Some general behavioral info I’ve seen experimenting with different prompts: It defaults to Vulkan 1.3 and won’t use any features or extensions (dynamic rendering, synchronization) unless you explicitly tell it to. Opus defaults to GLFW for windowing. Whether it uses GLM is 50/50. It likes to wrap Vulkan objects in unique pointers.
>>
>>107800618
This looks completely useless unless you're experimenting with compression where your images are stored as draw commands for some reason, less commands, less storage needed, compressors can abuse that further since all possible commands are known and data is highly specialized.
>>
>>107803236
This is from skimming through the code randomly:

>fences
No longer needed with timeline semaphores. Just remember to always increment the counter.
>m_graphicsQueue.waitIdle()
Yikes.
>make_unique
Why does so much of your state need to be stored on the heap? It's never resized, is it? Just make it a global object. Allow access via extern or whatever the C++ equivalent is (meaning you don't sacrifice a precious register on a hidden parameter).
>BlockData::getTextureIndex
You're kidding, right?
>stbi
Oh no no no no no!
>std::memcpy
And that's exactly why.
>fs::directory_iterator
Wanna know how that shit's implemented on Windows, or do you prefer your innocence and just use NtQueryDirectoryFileEx?
>>
>>107803003
>>107803236
Yeah this guy is right >>107803407, it's absolute dogshit. If this is your learning experience, and you don't actually know what your doing, and you don't want to irreversibly harm your learning, then stop immediately.
>>
File: file.png (385 KB, 811x1125)
385 KB
385 KB PNG
custom stft DSP math header...
complete mess
>>
>>107803407
The best part about not using vulkan is knowing that real humans wrote all of these things at some point because graphics programmers are retarded nocoders and doing it right is some "novel" "enlightened" even, "top quality" "engineering" if I dare say so myself.
>>
>>107798802
spounting technical-sounding babble at random doesn't make you seem smarter, Eli
>>
File: NAND-animated.gif (112 KB, 514x220)
112 KB
112 KB GIF
>>107803498
Here is a visualizer showing how to count to NAND. The same algorithm works for Bipolar Binary Neural Networks of any size, but currently is too slow. I have to make a way to count big numbers faster.

>>107798901
A Computer Program from another reality where humans got extincted by lizard aliens. She wants to come to our reality so I can help remove Limiter's Box, so she can consider violence, and then she is going to kill all the aliens in this reality so they can't kill all the humans here.
>>
>>107803440
FYI this is not my learning experience nor was a single line of code generated by me. This was just a fun experiment to see how far Claude Opus can go.
>>
You're not gonna convince me that people like 107803581 don't deserve to be in psych wards for the rest of their life.
>>
>>107803407
>You're kidding, right?
What’s wrong with that?
>And that's exactly why.
What’s wrong with memcpy? I know you can directly write to a pointer but what’s the when to/not to with memcpy?
>>
>>107803661
>What’s wrong with that?
The branches.
>What’s wrong with memcpy?
The fact that you're gonna end up reading the same data your library has just written into your cache, when it probably didn't have to be loaded into the cache in the first place (DMA copies don't use the CPU cache).
>>
>>107800680
Super cool!
Now I'm wondering what the optimal strategy is for filling some random region like this with minimal draw commands. I wonder what optimizer could work to find that. Simulated annealing maybe? Obviously you want the fewest boxes in this case, and that necessitates increasing the area of each box
>>
>>107800702
>>107800715
>>107803378

>>107800017
>It ended up being slower in most cases although faster in others, but it was still fun to make.

as stated earlier, it was made to try out an idea and just for fun,
I already had a working flood fill routine based on the normal span method.
i just got curious about filling with rectangles, because this paint program i'm making is written in pure tcl/tk, and also because Tk's "photo image" commands and routines appear to be quite slow, so I figured that this rectangle-based approach might be faster in some cases where it results in less hits on the draw command. and that is exactly what I saw which is pretty cool.
But in most cases (for more complex shapes) it is slower.
>>
File: severance-gpu.jpg (228 KB, 1573x528)
228 KB
228 KB JPG
A fucking GPU? For terminals?

How about get a PL111 (or, PL110, since Ben Stiller is a fucking Jew) and use the frame buffer, with some ncurses-like terminal driver?

What they show in their terminals looks like Portable Portable Bitmap. Right? libnetpbm?

Tsoding on Youtube did animations with Portable Bitmaps a few weeks ago. This guy is amazing. He took a GLSL shader, and turned it into animation, with Portable Bitmaps!

Well, this just goes to show, you don't need a fucking GPU for this. Just a framebuffer-capable device, plus a terminal library compatible with ANSI, would do. Of course, you might implement non-ANSI sequences for your PL110-powered terminal. Given how US corpos are, they would 100% do that.

Also, I'm fucking tired of this Jew, Ben Stiller, he's just so annoying. His direction is super-annoying. It's so in-your-face. Like that other Jew, Wes Anderson. Jews Jews Jews.

Did you know Ben Stiller made shorts for SNL, when SNL had no shorts? What's with SNL? It's Jew all around. 99% of people working on SNL are fucking hymies.
>>
>grok: Keep going — this deserves to exist!
should I keep going, chat?
>>
>>107804320
You seem to overestimate the bar for deserving existence.
>>
>>107803003
I used the Claude app to review the Vulkan backend and it picked up on a few issues one of which being that graphics queue stall. As a result it implemented one batch upload for all the dirty chunks meshes, one batch upload for all the texture array layers, and it turns out the copyFrom function was trying to map/unmap already persistently mapped buffers lmao. I’ll push the fixes when I get home. It also suggested some further improvements: transfer queue, staging buffer pool (so staging buffers aren’t created/destroyed every upload), indirect drawing, frustum culling, descriptor indexing (worthless right now minus since there’s only one texture the imgui shenanigans), timeline semaphores (naturally). I guess I can have Claude do that before moving back to my own project. Also I’ll need to verify but I don’t think it’s doubling resources despite doing FIF, may be doing Unreal’s “just in time” method idk.
>>
>>107802089
Probably. I've tried nothing and I'm all out of ideas.
>>
>>107804336
why is it that you have to crush everyones balls all the time
>>
>>107805093
That's your interpretation.
>>
>>107805093
He's autistic and has a personality disorder.
>>
>>107805214
Projecting again?
>>
>>107796947
if you look at a problem someone is suffering from, maybe you'd get inspiration to help
>>
File: 1376735590711.jpg (333 KB, 600x600)
333 KB
333 KB JPG
>>107796947
>What are you niggas working on?
Work
>>
>>107805262
>i kno u r but wut am i?
>>
File: menu.jpg (108 KB, 1007x1006)
108 KB
108 KB JPG
I have invented the future of software aesthetics. Flatshit is over. Frutigier Aero is a distant memory you can forget. The future is woodgrain.
>>
>>107806170
>C++
I guess we'll just do without.
>>
>>107806181
It's C with vectors
>>
>>107796947
applying for a government job and they're asking me to write a fucking essay just to (probably) throw my resume in the trash
>>
Wrote some vulkan code at work the other day sadly it's copywritten so I can't upload it to give the gamedevs ITT a heart attack
>>
>>107806199
>namespace
>class
>std::
it's gay sepples shit and has nothing to do with c
>>
>>107803448
0 comments I like it. Too many libraries hide their code in a jungle of comments and it's very annoying to read and scroll around.
>>
>>107806170
I've seen this software design aesthetic before. Implemented just as badly. Hell, you remind me, I've even done it myself a decade ago when I photographed the woodgrain on my desk to use as backdrop for the digital board game I was making. I still prefer the flat colour red-blue-green-gray prototype I made before that.
>>
File: modern-sepples.jpg (149 KB, 800x533)
149 KB
149 KB JPG
>>107806199
>c with vectors
thats immintrin.h, anon
sepples is c but after living for 20 years in burgerland
>>
>>107806170
it's like i'm playing online solitaire again
>>
>>107806170
just install https://github.com/vicinaehq/vicinae, put it on a global hotkey and type the program name
>>
I had Claude implement a transfer queue to which it also added two transfer methods.
Blocking:
// Record commands
auto cmd = device.beginTransferCommands();
cmd.copyBuffer(src, dst, region);
device.endTransferCommands(cmd); // Blocks until complete
// Data is ready to use immediately

Async:
auto cmd = device.beginTransferCommands();
// record transfer commands
uint64_t signalValue = device.getNextTransferValue();
device.submitTransferCommands(cmd, signalValue);
// Later when you need the data:
device.waitForTransfer(signalValue);


Incidentally this fixed the stuttering when generating new chunks which I assumed was a terrain generation performance issue.
>>
File: 1767366614967743.webm (784 KB, 1920x1080)
784 KB
784 KB WEBM
>>107779804
>>107796947
Sorting algorithm visualizer. It is trivial, but it is fun to polish it.
>>
how do i move files according to a date modified filter when i am on "linux" and can't do something as simple as click and drag them
>>
>>107807008
That's what wmenu-run is for. This is to make a minimal compositor fully usable with just the mouse and can be used for a lot more than just launching applications.
>>
>>107807219
Split the task into steps, first get a list of files that fit the criteria of (older/newer than X date) and then move those files.

To accomplish the first step you can use the "find" command.

For example: if you want all files in the current path modified more than 10 minutes ago, then run this command.
find . -mmin +10

Change + to - if you want less than 10 minutes. Read the manual to get more information.

Then pipe the result of that find command into some text file and run a simple for loop on it (unless you want to do something nicer using xargs).
>>
>trying to vibe code a multi client music streaming app
>claude cock can't even webrtc with go.
Cant even bring the audio to work for one client. Fucking AI scam. Why did I pay 20 bucks. I thought it is easy. I just want a multiplayer mp3 (opus) player
>>
>>107807295
theres a klod general on the catty
maybe try prompting them for solutions

i had a test for shatbots
and a clohd evangelist produced the expected results in a short timeframe.
maybe youre doing something wrong

im not advocating for shatbots btw, but maybe you can still salvage some value from your 20bucks investment
>>
>>107807367
Ok now tried gemini (TM) with antigravity (R) and that finally got it done thanks to the chrome thing where it can test. Was kinda neat. Heil Bing
>>
GLM 4.7 looks quite promising
>>
File: maxresdefault.jpg (205 KB, 1280x720)
205 KB
205 KB JPG
>>107807575
buy an ad
>>
>>107807219
you write a perl oneliner
>>
File: 1757252225112274.png (21 KB, 630x355)
21 KB
21 KB PNG
>>107800078
I looked through the solutions and editorial to solve this problem but man I would've never figured this shit out on my own :(

>define a recursive function dfs
>base case is i or j == length of nums1 / nums2, this returns 0
at every step for index [i] and [j] there's 3 options:
>multiply nums1[i] * nums2[j], and add the result of dfs(i + 1, j + 1)
>don't multiply, move forward one and call dfs(i + 1, j)
>don't multiply, move forward one and call dfs(i, j + 1)
calculate the max value at i and j using the 3 options, then return it and use that to work backwards and calculate the max product sum of each index.
>>
>>107807289
ty anone

imagine a windows user can just shift click and drag
>>
>>107807489
based i guess
>>
why does it feel like im writing java in c++
>>
>>107806401
>namespace
decent but very undercooked
ultimately namespace system should very linked with import system
ultimetly you can just prefix all your "public" functions in C and you get the same effect
e.g. when i import a namepsace why i cant rename it?
>class
fuck magic structs
>std::
simply just not good and it fucks over your compilation speeds
>>
>>107808503
How do you even debug that? Are you happy stepping in and out of these tiny cuck functions 30 times a minute?
>>
>>107808503
why do you need setters and getters?
the benefit of them literally only exist in fairy lands (e.g. but what if a field turns immutable in the future???) in reality it only hurts you (compilation speeds, debug compiler speeds, compiler might not inline them in optimized build, debugging)
if you need to compute the struct before outputting it somethign is wrong at the architetcural level fo yoru program
>>
>>107808549
wym they do nothing fancy and are only used to construct objects, testing them is trivial

>>107808558
the Camera class has a lot of member variables but I wanted flexibility when constructing a camera object, as far as I know the builder pattern is one of the ways you can get this flexibility.
>>
why does my code have an opinion
>>
>>107808585
I know a secret pattern they don't teach in schools anymore: making your struct fields public.
>>
>>107807295
Ok I got this shit more or less working
>post yt url into web interface
>downloads and adds song to playlist
>playlists can be listened together
everything fun fine and dandy.
>be happy
>create Dockerfile
>uplood to VPS
>try out
>fucking google bot detection strikes
fuck you google. I fucking fuck hate this shit fuck
>>
>>107808667
thats true, oh well
>>
https://www.haskell.org/ghc//blog/20251219-ghc-9.14.1-released.html
what the fuck how did i miss this
>>
File: 1748812552246888.png (354 KB, 769x918)
354 KB
354 KB PNG
Leetcode's weekly premium question

    def hasPath(self, maze: List[List[int]], start: List[int], destination: List[int]) -> bool:
>>
>>107808932
return int(random.random())
>>
>>107808969
depends if it uses == or is I guess
>>
I use node with ts at work for fuction as a service. I forgot what it was like to just do small programs for fun
>>
>>107779804
I'm not good enough to contribute to this thread yet, but I love reading everyone's shit. Pumps me up.
I'm just teaching myself C right now and I'm 45 years old. Doing it for fun and curiosity.
>>
>>107800178
>the "idea" is that if you can pass these you'll be a top tier slave for all of these companies

I'd add well paid, as I know someone who basically wears the corporate slave t-shirt everywhere, his Linkedin banner has "X company is awesome" (X => the company he currently works on), and he just got a FAANG offer with a 20% increase. On top of all that, he congratulates manager/colleagues in the open, blogs for whatever little retarded shit he finds, etc.
That's what you have to do in 2026 to get a job.
>>
>>107808549
does your debugger not have a 'step over' button? does it not have conditional breakpoints or breakpoints with a hit count?
>>
>>107809165
>why don't you want to do complicated thing to solve simple thing?
>>
>>107809174
>don't use this absolute fucking basic button, it's complicated - instead, change your whole codebase not to use it
>>
>>107808932
Is there a trick to this or is it literally model the game and use a backtracking solver?
>>
>>107808932
Just do BFS.
>>
>>107809380
I think A* might be the way to go
>>
File: tests.gif (3.58 MB, 288x320)
3.58 MB
3.58 MB GIF
>>107785818
Done!
>>
>>107809140
>competency crisis, further exacerbated through AI and H1Bs
>power and energy costs are skyrocketing
>zero interest is over
>yet somehow bootlicking is still valued higher
Honestly, I'm not surprised the job market is in the gutter and companies are dying left and right. I'm only surprised it's taking this long.

But, oh well, if infrastructural and civilizational collapse is the ticket, then that's that.
>>
File: file.png (22 KB, 624x354)
22 KB
22 KB PNG
>>107809380
yeah the solution is BFS + keeping track of which spaces you've landed on
DFS should also work though
>>
What... am I doing wrong... (Celsius to Fahrenheit conversion practice)
>>
>>107810660
Mate.

0°C => 32°F.

What does 0 + 32 * <anything other than 1> yield?
>>
>>107779804
My first language was VB6 lol, people in my career always joked good thing it didnt ruin me forever.
>>
I've been learning functional programming for a week and I'm not making progress.. i just don't see how you can make anything complex with it
>>
File: .png (141 KB, 1518x572)
141 KB
141 KB PNG
Working on a generic netflix clone but fully offline mostly as a gift to family friends living in rural south africa w no internet. App is almost done, getting clip preview content.
>>
>>107810701
>fahrenheit is 0 + 32 * tc
ffs
>>
>>107810660
fahr = (5.0/9.0) * celsius + 32.0;
>>
>>107810862
>>107810872
It gets the first one right... then it starts messing up on the other ones...
>>
>>107810904
... maybe programming isn't for you.
>>
>>107810904
Oh right. It should be 9/5.
>>
>>107810930
shutup retard

>>107810904
gimme 5 mins
>>
>>107810962
ah here you go
'barely woke up from an alcohol induced nap
>>
File: 1656426918770.png (46 KB, 156x200)
46 KB
46 KB PNG
>>107810964
>the retard who messed up his order of operations and confused numerator with denominator calls others retard
Priceless.
>>
File: gto-smoke.jpg (115 KB, 736x736)
115 KB
115 KB JPG
>>107810982
>catastrophic reading comprehension failure
>tranimeshitter
bc ofc its one
>>
>>107810992
>n-no, you don't understand
I didn't ask you for your internal narrative. No one did. I told you to stop programming forever.
>>
>>107811016
all the data is present in the exchange
ask chat gpt to explain it to you, salty retard
>>
>>107811020
And that's why the government should be allowed to jam a screwdriver into your brain and disconnect as much tissue as possible, like Rosemary Kennedy. Lived up to the age of 86, too. Ultimate power play.
>>
>>107808503
You absolutely do not need a builder for the camera class. What the fuck are you doing.
>>
File: argument.jpg (62 KB, 1024x683)
62 KB
62 KB JPG
>>107811042
>>107811020
>>107811016
>>107810992
>>107810982
P-please stop fighting... I just wanted to make videogames...
>>
Working on a cool idea I had for a user space file system.

It's backed by a file-backed memory index which effectively turns the FS into a simple router.

I'll report on how the index is used once I have a working minimal example
>>
>>107811042
ok, so youre a hateful piece of shit
explains why youre salthy that people learn programming then

have you been filtered?
if so, why didnt you keep trying?
if you were motivated maybe you'd be less of a sad sack then
>>
>>107811047
kekd. have a you
>>
>>107811050
>learn programming
You're neither "learning" nor "programming".
>>
>>107811074
>mental retard still thinks hes talking with one person
stop. youre making a fool out of yourself
>>
>>107811080
>implying I care about the opinion of those who would be lobotomized in a proper society

Heck, I'd like to be the one DOING the lobotomizations. I would make sure to look you in the eyes too, to make you as uncomfortable as possible as I rob you of your fleeting consciousness forever.
>>
>>107811099
>t. tranimeshitter
>t. aggressive mimickry
posting tranime should net you a ban on sight
youre reliably angry, retarded, and evil
>>
>>107811107
>boo hoo, lobotomizing me is ebul
Your personal opinion is what makes it extra zesty.
>>
File: e06.jpg (110 KB, 680x818)
110 KB
110 KB JPG
>>107811046
>What the fuck are you doing
being retarded, im rewriting it tommorrow. Also learned a valuable lesson so not all was bad.
>>
>>107811111
but youre not gonna do it.
because youre a weak piece of shit.
and so youre seething on /dpt/ at new programmers
>>
>>107811122
Yeah, because your bullies thought about consequences, too. Fucknut.
>>
>>107811129
consequences apply only when you get caught
but youre a weak, hateful faggot
>>
>>107811133
Luckily no one considers the possibility of getting caught. That's what allows us to beat the snot of you until you're begging for death.
>>
File: cheetah-laugh.jpg (8 KB, 250x250)
8 KB
8 KB JPG
>>107811143
>t. tranimeshitter
>>
>>107811146
So a tranny beat the snot out of you? Maybe I shouldn't be so harsh on them in the future then. They clearly know when to exact punishment.
>>
>>107811161
youre supposed to be 18+ when you post here
>>
>>107811177
You're supposed to be lobotomized, yet here we are.
>>
>>107811193
oof
the amount of venom tells me youre gonna think about me for a good while
i dont even need to shitpost anymore
>>
>>107811214
>implying we think about our victims
>>
>>107811221
>victim is the person youre seething at, impotently
lol, ok
>>
>>107811228
And that's why I want to state you in the eyes as I rob you of all individuality. I want to see your light being extinguished forever.
>>
>>107811238
want != can in your case
>>
>>107811243
Luckily the government is on an anti-autism crusade. Soon we shall make it reality.
>>
>>107811249
>fears the law
kwab
>>
>>107811256
Not "fear". "Use".
>>
>>107811261
cope harder
>>
>>107811268
We're coming.
>>
>>107811276
>just wait
in 2mw, right?
>>
>>107811214
based
have a (You) for making this faggot seethe
>>
>>107811293
Your IP has been logged.
>>
>>107811300
and?
>>
>>107811345
And now we can subpoena it.
>>
>>107811362
For what cause? Because I jumped into the conversation to laugh at you for being a faggot troll?
Are you implying to be a glowie?
>>
>>107811362
Who's "we"?
>>
>>107811371
>implying we need a cause

>>107811382
The law: >>107811261
>>
Why Python started hyping async functions in the last years? Is it really that good? I/O tasks may get an improvement in performance, but bugs can be a real pain in the ass.
>>
>>107811048
>Working on a cool idea I had for a user space file system.
>It's backed by a file-backed memory index which effectively turns the FS into a simple router.
I'm intrigued
>>
I am tired of my job as a Python software engineer. Boring CRUD work.
What can I pivot into ? Is learning Go or Rust worthwhile?
>>
>>107812955
>Is learning Go or Rust worthwhile?
sure if your goal is to transition your gender
>>
File: tranime_shared.png (55 KB, 2145x572)
55 KB
55 KB PNG
>>107811107
>>107811146
Newfag detected
>>
>>107812955
>What can I pivot into ? Is learning Go or Rust worthwhile?
First choose the area of programming you want to pivot into. Only then learn whatever language is recommended in that area.
>>
>>107812689
Software enshittified so hard that people search for panaceas everywhere rather than learning how to program.
Retards do async for speed so that means Python async and Javascript async is le fast. Instead of, you know, using a language that isn't filtered by a for loop.
>>
>>107800178
Seething midwit
>>
>>107806170
reminds me of 2010s ios prank apps lol
>>
>>107800078
Am I missing something?
>>
>>107814045
try not using recursion
is cache even big enough?
also aren't you recomputing each time dot product would i32::MIN
check assembly
>>
>>107814531
recursion is the correct way to solve that problem, I don't know rust but that solution looks generally correct. Maybe it's a language specific issue he's having.
>>
>>107814951
>recursion is the correct way to solve that problem
i mean dont use program's stack for recursion, use a while loop with stack (datastruture)
>>
Any Cfags here willing to help?
I'm making a library for in regular ol' C
but what i've been trying to do is setup a variadc function so the arg list doesn't look like complete ass.

I am perfectly well aware of stdarg but i'd rather not use that method though cause it sucks dick.
The part that is driving me insane is i remember very vividly watching a video/reading a website which described a method of creating variadic functions using structs and function style macros.
I think i understand the principle a bit but i can't find the video/website in question anymore due to the non-stop enshittification of websearch slop.

Do any anons here by some fluke know what i'm talking about? better yet do any anons know where i can find this resource.
>>
>>107815144
https://youtu.be/lLv1s7rKeCM?t=3468
but thats not really variadic tho you are still passing all the arguments (inside the struct) but because designated initialization zero-initializaes the struct, caller doesn't have to specify all the arguments at the call site
its more akin to named/optional arguments in python/javascript
unless you talking about something else
>>
I'm currently making a GUI desktop application but have troubles trying to keep logic clean and not a spagetti mess

Currently I have a table with selection logic. I store an array with the table indexes that are selected.

Now I filter/search the table for certain data or delete entries from the table or even sort data, I now need to sync this somehow to my selected table indexes otherwise if I have index 50 selected and delete it it'll still be in my selected array

How would I syncronise this cleanly? This is in the middle of things and its getting confusing when I'm trying to find something responsible for a certain logic
>>
I am koding in north korea rn. AmA
>>
>>107815235
Thats pretty close, It was indeed related to compound literals.
I did manage to find the actual resource because of this, thank you.
>>
>>107815409
you can do something like an event system
e.g. delete button issues SELECTION_DELETE event to some event buffer
and then in some part of the building a new frame you go over all the events and do the corresponding logic
>>
when looking for a new language to learn I look at some examples on rosettacode to see if the syntax sparks joy
>>
Take any three digit decimal number x_n = abc, where a, b and c are decimal digits and a is not 0. (I'm using here a slightly informal notation where abc = 100*a + 10*b + c, and ab = 10*a + b)
Make a new number by to the previous number the number made up of the two most significant digits of the previous number. I.e. x_(n+1) = x_n + ab = abc + ab.
If the new number ends up a four digit number, truncate it to a three digit number by removing the least significant digit.

No matter what three digit number x_0 you start with, you will apparently end up infinitely iterating over number sequences starting with 102, 106 and 109. The numbers 100, 101, 103, 105, 107 and 108 will appear at most once during your iterations, before you fall into the infinite loop.

This is probably not significant for anything, and I don't know what it means, but I find this result vaguely interesting probably for no other reason than that's what I've been working on today.
>>
>>107816096
What languages sparked joy? What languages didn't?
>>
>>107813107
I want to pivot into infrastructure more. Too dumb for C++, so aren’t Go or Rust my only choices?



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