[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

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


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



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