[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 / qa] [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: 1616065595790.png (1.43 MB, 850x1200)
1.43 MB
1.43 MB PNG
What are you working on, /g/?

Previous thread: >>103521394
>>
>>103567216
>building Flutter app
>make a CPU-intensive function that takes 30 seconds to compute for the average input file
>wrap it in a Dart isolate so that the interface doesn't hang
>computation now takes well over two minutes, but at least the interface doesn't hang so that the user gets to look at a progress indicator or push the Back button
>no idea if the slowdown is because I did something wrong or if Dart isolates are just that slow
>>
File: me.png (464 KB, 496x513)
464 KB
464 KB PNG
>>103567216
yes
>>
>>103567993
>Flutter
>app
lol
>>
how is cuda so based? this is some next level shit. i cant believe ive been missing out on all this fun.
>>103567993
whats the cpu intensive function? i dont know how well the dart compiler optimizes but you should probably consider writing the function in something else and use ffi.
>>
>>103569251
you enjoy writing cuda or writing something else that writes cuda for you?
>>
File: Code_Fos8Fuvfaq.png (82 KB, 1550x735)
82 KB
82 KB PNG
i memed myself into using rust again
>>
>>103570020
does rust have higher kinded endofunctors
>>
>>103570236
yes
>>
>>103570239
so Rust is useless?
>>
>>103567216
>last thread didn't even hit bump limit before archiving
Grim
>>
>>103570381
name 1 useless higher kinded endofunctor, particularly in the universe of monoids
>>
>>103571000
/aocg/ is the new /dpt/
>>
>>103571039
Gaaaaay
>>
how do i get array 1 in python with beautiful soup?
like

soup.find_all(container[1])

this sounds silly but theres no way to get that value on freaking beautiful soup
id use javascript but im aksi using selenium
>>
What editor do you use to program C++?
>>
>>103572334
kate, gcc/g++, make, gdb
don't need any more than this
>>
>>103570236
what
>>
>>103573035
does Rust have higher kinded endofunctors
>>
>>103571032
Read that sentence as if you are not mad
>>
File: srsly.jpg (64 KB, 862x752)
64 KB
64 KB JPG
>wcwidth
>requires wchar_t
>requires non-standard implementation
>returns -1 instead of 0 when it's a non-printable character
humiliation ritual
>>
>>103573440
>"The width of wchar_t is compiler-specific and can be as small as 8 bits. Consequently, programs that need to be portable across any C or C++ compiler should not use wchar_t for storing Unicode text."
>>
>>103574207
indeed, if you want to do anything to do with unicode without reinventing anything, you are forced to go through humiliation ritual of O(n) string iterations and conversions for every little thing you do.
>>
>>103567216
I look like this.
>>
>>103571000
Baker didn't put /dpt/ anywhere in the post. No one posted in it because no one could find it.
>>
File: 1719385299685924.jpg (501 KB, 1216x2752)
501 KB
501 KB JPG
ama going to upgrade terminal user event system (input APIs)

how do ya like my perfectly designed parallelism API on the pic? without any doubt it is superior to others
>>
>>103576638
ive applied immediate controls technique (ImCTRL hehe) to async APIs, it is derived from ImGUI technique. see, i always mention sources where i drank from. im not a primitive copyist
>>
>>103567216
Building a full-stack project for an assignment using Vue and Bun with mongoDB
>>
>>103573357
same to you friend
>>
Can someone give me a rundown on when to use a stack-based vm vs a register-based vm? I'd like to implement reflection in the vm with as little overhead as possible.
>>
>>103577767
use a stack-based vm when you want simplicity of implementation
use a register based vm when you want maximal speed, or to easily compile to bare metal
>>
>>103577767
>>103577805
if you have to ask, the correct choice is to learn how to weld
>>
Nothing fills me with more impotent cuck rage than when an API has large functions or methods and I literally just need to hook into a certain piece
>>
>>103577846

You will never be a real programmer. You have no commits, you have no pull requests, you have no public repos. You are a low IQ brown man twisted by an unearned comp sci degree and coding bootcamps into a crude mockery of nature's autism.

All the “validation” you get is two-faced and from bots. Behind your back people say you're a useless DEI hire. Your parents are disgusted and ashamed of you, your “tech bros” laugh at you behind closed doors.

Real programmers are utterly repulsed by you. Thousands of forum posts have allowed programmers to sniff out frauds with incredible efficiency. Even devs who “pass” have no creative output and excessively verbose with AI generated tech buzzwords. Your GitHub profile is a dead giveaway, and even if you manage to score a 3 month internship at some tech company, they'll lay you off the second they find out that you haven't completed any non school related projects.

You will never be happy. You cope by saying that your bullshit software is using a "proprietary test framework" so you can't open source it, but deep down you know it's because you don't want people to see your incompetence where all you did was push README updates over and over, and that the core codebase was stolen off an open source GPL licensed project which you're shamelessly profiting off.

Eventually it will be too much to bear. You'll buy a google gift card, a spoofed business phone number, and start cold calling old people into redeeming your scam.

This is your fate. This is what you chose. There is no turning back.
>>
>want to try neovim instead of eclipse
>need to install java plugin
>ok nbd, wait this shit makes no sense
>wants me to install lazy
>can't do that right either
fucking hell I hate being a brainlet and not being used to github.
>>
>>103578036
Are you good?
>>
>>103570020
how can you tolerate those inline type and argument name hints?
Just a pure annoyance.
>>
>>103578106
honestly if you need fucking java you might as well just stay in eclipse, neovim will be a strictly poorer experience.
>>
>>103578970
yep. 3 steps forward, 2 steps back trying to get this shit to work. I'm done trying.
>>
File: ruby.jpg (76 KB, 1402x1033)
76 KB
76 KB JPG
>>103567216
Php oldfag here with 9 years of experience writing shit websites for psychopath oligarchs, learning to use Ruby 10 years late.
yzla3n
4jnyt4b
rf7e54p
6ynpyqg
kryecth
43f6tki
zxxewfl
ejsff2id
.onion

If it's so easy to get an onion link via the operating system (I use Debian), then why the fuck should I bother with DNS and port forwarding? This onion link tunneling thing is the best thing since sliced bread.
>>
>>103578106
>>103578970
For me, it's Netbeans.
>>
>>103567216
rape

>>103577342
how can you call yourself a programmer
>>103577846
what is ptrace, ld_preload, binpatching, etc.
don't be a brainlet
>>103578106
just set up jdtls
if you're using kotlin you're screwed, just use idea
>>103580125
because nobody other than you is using tor for normal communications
>>
I've been fighting my linker all day and I'm becoming pretty sure the memory exception I'm running into is a fatal flaw with OpenWatcom than my fault...
>>
>>103580833
I like it how the onion link doesn't change like an IP address every time, I generated it once and in-between VM reboots and shit internet issues, it just works.
>>
>>103580904
neither does the domain name you bought
you *did* buy the domain, right anon?
>>
File: crust.png (61 KB, 687x894)
61 KB
61 KB PNG
>>103578894
NTA. You either live with it or remove rust-analyzer and set the syntax highlighting to plaintext for good measure.
>>
>>103567216
thanks for fixing the thread title OP
previous thread was made by a braindead retard
>>
>>103577767
reflection has nothing to do with wether the VM is stack-based or register-based
reflection is the compiler making available data structures about type definition (and possibly other things) to the program at run time (or at compile time if the language has macros or compile time execution)
>>
Front-end development is a fucking disease and I cannot wait for this project to be over so I'm rid of it.
>>
>>103567216
i wonder if regex parsing is faster than manual parsing. The regex engine is probably hyper optimized and such, right?
>>
>>103584693
depends what you mean by parsing: recursive descen parser using a regex engine? "parsing" simple string like is done in aoc?
depends if the base language is fast or not: C vs perl/python. regex engine can be faster
depends how much backtracking there is in your regex pattern, how much you managed to eliminate
depends if the regex engine interprets, compiles to native code, performs regex specific optimizations
>>
>>103584781
>regex engine can be faster
if you're using a scripting language, loops and conditionals, incrementing the position variable, etc. will be slow in the scripting language
>>
Whatever happened to Eli Selig? Was he banned, hospitalized for schizophrenia, offed himself over all the satellite communications? I don't know where to ask this, but he made a java program so
>>
File: 1734568737816516.jpg (380 KB, 995x1024)
380 KB
380 KB JPG
>>103584693
I'm probably wrong but I think a handwritten parser and optimizing regex engine would only be equivalent for parsing particular grammars like LR(0 or 1)
>>
>>103584997
He's inside your head
>>
>>103584693
Precopiled regex patterns or interpreted at runtime? A handwritten parser written by someone slightly competent will run over runtime regex patterns in the same programming language given that the regex impl is not using FFI
>>
>>103567216
b
>>
OpenAI announced yet another model. It's not over, is it? When will it be?
>>
>>103590150
not programming
>>
>>103587589
>A handwritten parser written by someone slightly competent will run over runtime regex patterns in the same programming language given that the regex impl is not using FFI
Depends on what you're matching, what engine you're using, etc. These things are not simple.
>>
>>103590150
>It's not over, is it?
The hypetrain has no brakes.
Programmers should ignore OpenAI's shit because it's just slopmax, unless you don't mind code that's wrong in nasty ways.
>>
>>103567216
Making a text based scifi/space game on web tech
>>
File: 1000003371.png (288 KB, 480x488)
288 KB
288 KB PNG
give it to me straight, is programming gonna be one of those things that AI takes over soon?
>>
been working on this shitcoin smart contract for the past few weeks written in Rust
I'm pretty much done with it
I never made one before, so it's all new to me but I've been testing it a bunch with a bunch of typescript tests i made to make sure it's sturdy
I think deploying it will cost around a hundred dollars or so.
I think I have to make a website, a Twitter, and a telegram group for it, then make a bunch of fake accounts to like artificially hype it up, and then I can deploy it and hopefully make a million dollars and give the money to my family and kill myself
>>
>>103591048
What used to be done by 10 people will now be done by one or two.
But FOSS have/had been more influential than AI.
Like Xitter vs Xitter clones for example.
Everything is becoming almost free or very cheap.
anyway this logic is hard for people to understand, so they will blame AI.
>>
>>103591048
It's over, bros.
>>
How long of a delay between requests should I put to prevent getting a 429 error? Is there a general etiquette for it?
>>
>>103591827
desu?
>>
>>103591992
429 is the too many requests error some websites give you if you spam them too much. I'm writing a scraper and I wanna slow it down enough for them to not throw a hissy fit.
>>
>>103591048
idk man, """"AI"""" still struggles to do basic string parsing
i think we'll be okay for awhile
>>
>>103592009
sorry I meant desuarchive because I'm having this error too. I'm downloading sequentially and waiting 1.5s but it's not enough to avoid it. Maybe they check the number of requests per second and there is no avoiding it with a single computer.
>>
>>103592226
Oh right. No I'm not scraping desuarchive, I'm scraping gsmarena. 1.5s seems like it should be more than enough though, although I think archives have relatively strict request restrictions.
>>
>>103591048
No.
>>
>>103592308
h-how do u know tho?
>>
>>103581389
You can just disable the inlay types alone without disabling Rust analyzer.
>>
I have been filtered by SICP's explicit control interpreter. Send help.
>>
>>103592455
Source: I work and I see people trying to solve shit with Copilot and failing.
>>
>>103592493
>explicit control interpreter
what's wrong with lisp fags? that's just a virtual machine
you don't understand how to compile function definitions and function calls?
>>
>>103592810
forgot pic
>>
>>103571032
The fuck are you guys talking about?
>>
>>103576638
PHP has promises now?
WTF is Process::

I'm confused
>>
>>103592810
You can compile (for speed) or interpret (to debug) the code.
Meaning you do all the work on the REPL compiling code ahead of time by interpreting, and when you're done you save the image and compile it to produce an executable.
>>
>>103592810
>>103592814
Hey I'm trying to learn this stuff. I successfully made a recursive eval function, it works, I understand it. Now I want to turn that existing interpreter into a stack machine. I no longer understand it.
>>
>>103592781
that's crazy because i don't work and Copilot helps me solve most of my problems
>>
>>103593244
Well because you don't work you don't have people hacking up the most absurd shit to the point only a strong knowledge of fundamentals can unravel and patch a huge pile of shit.
The manual says to not do A because it's undefined behaviour but people go and do A and now something broke and the bot tells you to not do A because you're an idiot and the manual says so but you can't just replace the million ocurrences of A so now you have to do an educated guess and ao a patch, fixing it proper is "too risky".
>>
i spent all day learning how bubbletea works and i kind of ended up hating the framework and how it works it seems like its going to be an exponential increase in difficulty setting up different submenus and screens. i was also shocked to see that things like tea.Msg and tea.Cmd are essentially untyped and free-wheeling it with interface[}
>>
>>103592954
what part don't you understand? variables, closures, compiling expressions, compiling conditionals and loops (with all the labels involved), compiling function calls and definitions?
I started writing a wall of text but chances are it's not covering the thing you don't understand.

by emitting I mean appending assembly instruction (symbolically or in bytecode) into an array

when you have a number N, you emit the "push_literal N" instruction

when you have a variable, it depends on what type of variable it is. it can be a global variable, a local variable in a function, or it can be a variable coming from a closure. before the proper compilation phase, you need an analysis phase for determining this and other stuff, it's usually called symbol resolution.

when you have (expr_a + expr_b), you recursively compile expr_a, then expr_b, then emit "op_add"
>>
File: 1731383098630679.png (93 KB, 649x527)
93 KB
93 KB PNG
std::end(my_life);
>>
long time;

hehehehhee
>>
>>103594851
the first smart frogposter
>>
File: gigachad_matrix.png (12 KB, 366x395)
12 KB
12 KB PNG
>>103594851
#define start end
>>
>the trannies are now trying to transpile C to rust
>>
https://github.com/ran-sama/pq-mlkem768x25519-openssl-debian

Successfully implemented mlkem768x25519 on a Debian OpenSSL server.
>>
File: 1617143117838.png (146 KB, 350x350)
146 KB
146 KB PNG
>>103595357
>transpile
>>
File: not-prevented-by-rust.png (230 KB, 1583x1088)
230 KB
230 KB PNG
>>103595357
>safe rust
memory safe lang shills sind gigerst dumme
>>
>>103595482
you forgot "user being a fucking retard"
>>
>>103595498
The user? The programmer is. No language will replace good practice. Writing constant time crypto already requires a skilled dev to disable compiler optimizations for functions that *need* to execute in constant time not to leak keys.
No language ever will make a coder intelligent. So just code in C and just be born smart. It's not that hard.
And I'm generalizing, not attacking you. I just want Rust shills to cope. Their language is shit and not safe >>103595482
>>
>>103595536
no, I meant the user, you fucking moron
>>
File: Sigmund_Freud.jpg (97 KB, 300x400)
97 KB
97 KB JPG
>>103595538
Oh I have an IQ of 139, it's going to be very hard for you to seed doubt about my way superior intellect. Besides I'm just replying to you for continuing my monologue. It's not really my intention to show any interest in you.
I have my university degrees already. Do you? No need to answer, you know? I already know your reply. I'm being rhetorical here.
>>
>our users keep driving off a cliff, how do we fix that?
>but we fixed it with safety belts?
>>
>>103595580
ban military-style assault cliffs
>>
what is the best C++ book?
>>
>>103596374
the one that you are burning on a bonfire
>>
>>103596374
the holy bible
>>
>>103596374
Why are people obsessed with books?
Words words words without saying anything
Why do you need anything more than reference documentation?
>>
>>103592869
"Process" is a static object that handles process operations. yes yes, any OOP language can have promises. imo "official" aka hardcoded asynchronicity is a disadvantage of the language.

---
why programmers are usually photographed when they are over 50? didnt reach "success" yet? if you want your face everywhere then have to go teacher or talker way, but those will degrade other skills and time
>>
Help me settle a debate at work. We have a system which publishes ~500k messages per day. Which is better?

1. Publish all messages to a single topic. Consumer services will consume all messages but contain logic to decide if it's a message they are interested in or not. This is easier for us to set up/maintain as it only requires us to publish a message to a single topic, but it means consuming services will be consuming shit loads of messages and discarding the 99% they don't care about

2. Publish messages to more specific topics. Consumers subscribe to a specific topic and only get messages they care about, so no wasted processing. Down side is we need to set up and maintain many topics and that number will grow over time

Or are both valid? Our tech lead is pushing for 1 because it's 'easy' but I think option 2 is far better
>>
>>103598146
use graphql
[x] easy
[x] consumers only get wanted messages
if this is not a technical but a classification problem, get someone else to classify things: the consumers, an AI.
>>
>>103598146
doesnt really matter. the reason why select 1 (i kinda like one big chat slops myself, but still somehow related) is because the "system" is already framed to "a single topic".

now, its refactoring and redesign (a big big pain to some individuals, one of the reasons why there are such ideologies that say code that change often is bad) to uncork the 2 - multiple topics.

if there were no topics, then you simply create [message_id,topic_id] reference table and thats it, all the rest goes to UI. but now topic is probably bound to a message
>>
>>103598146
2 is obviously better.
it seems like a classic short term ease bias. Where one choice is "solved" in your head, so any perceived (long-term) problems will be massively diminished. While the latter is more up-front and long-term work, so it seems worse and less ideal.
But 2 inherently can be engineered much better, Whereas most of the work in 1, will be to emulate 2's inherent design, especially long-term.
>>
>>103567216
How is her top not slipping off her boobies?
>>
>>103599086
EXTREMELY hard perky nipples friction holding.
>>
>>103594098
I'm just trying to implement delimited continuations. I thought that reifying the stack in order to memcpy it to a continuation object was the way to do it. I just realized that this will fuck up my entire primitive function implementation since the scheme stack is completely separate from the C stack and therefore they can't be captured. Same issue guile scheme has here:

https://www.wingolog.org/archives/2010/02/26/guile-and-delimited-continuations

So now I'm trying to come up with a way to copy the entire C stack all the way up to the prompt so that I can restore it. Some deep magic in this shit.
>>
>>103599086
gravity is a side effect but gigatits worth of space leaks are forever
>>
>>103598146
2
consumer services' maintainers will bug you about issues in either case, so it's better to just take control of everything early
actual number of topics shouldn't matter as long as you model your service's architecture for consuming "many" topics
>>
>>103591048
Has "AI" solved the halting problem yet, and actually give any confidence that code does what it says it does without detailed human review anyway?
>>
>>103595536
>So just code in C and just be born smart. It's not that hard.
this needs to be repeated over and over whenvere anyoene mentrions rist, it sloves nothing
>>
File: mountain_gorilla1_2020-1.jpg (529 KB, 1600x1067)
529 KB
529 KB JPG
Yo niggas which api should I use to write xml incrementally in Python? I see options for incremental parsing like xml.etree.ElementTree.iterparse but nothing for output. I need to read and write big ass xml files effieciently
>>
>>103600495
>Yo niggas
>big ass
yall is less cringe
>>
>>103599299
>I'm just trying to implement delimited continuations
Good luck lol. I'd take an imperative language with TCO, lambas, coroutines and backtracking any day instead of this. Much easier to understand.

>I just realized that this will fuck up my entire primitive function implementation since the scheme stack is completely separate from the C stack and therefore they can't be captured.
Isn't it the opposite? that you can more easily copy the stack if it's in the heap?

>So now I'm trying to come up with a way to copy the entire C stack all the way up to the prompt so that I can restore it. Some deep magic in this shit.
That's the kind of stuff you need to do in assembly. You could maybe memcpy the C stack from C but you need to fiddle in the dark about the start and end of the section you need to copy. Besides, you need to modify RSP and RBP anyway.
>>
>>103600810
reddit spacing
>>
Going to finally start learning 3D graphics, wish me luck bros.
>>
File: swVvBG6.jpg (114 KB, 1141x656)
114 KB
114 KB JPG
>>103600977
that's called pragraphs, nigger
>>
>>103600810
I need it because coroutines are basically continuations anyway, might as well do the entire thing.

>Isn't it the opposite? that you can more easily copy the stack if it's in the heap?

That's right but the problem is primitive functions implemented in C won't get captured by a continuation even if I have a virtual machine with an explicit stack, and if I find a way to capture it I can just capture the whole evaluator state without bothering with a machine and manual stack management.

if (is_fn(car(expr)))
fn = car(expr)
args = cdr(expr)
for all args, args[i] = eval(args[i])
env = nest(env)
for all variables, bind(env, variable_names[i], args[i])
for all expr in fn.body, eval(expr)
if (is_primitive(car(expr)))
// eval args
primitive.func(env, args) // C function call with C stack


The primitive function call on the native stack can't be captured. At least not without some heavy wizardry?

>That's the kind of stuff you need to do in assembly.

That's fine. I was hoping someone would have done this before so I could read and study source code.

>You could maybe memcpy the C stack from C

That's my idea.

>but you need to fiddle in the dark about the start and end of the section you need to copy.

Yeah. My idea is to use some GCC builtins to get the frame pointers when delimiting and when capturing, and using those. I'll also need to save many of the registers according to platform ABI.

>Besides, you need to modify RSP and RBP anyway.

Those are all trivial... I'm worried about pointers into the stack. Looks like I'll need to scan the entire stack like an array of longs and update everything that falls within range to point at the new values somehow. This looks wrong
>>
>>103567993
>>building Flutter
stopped reading there
>>
>>103601737
I will make a ton of Linux desktop apps in Flutter and there's nothing you can do to stop me
>>
vulkan sure has some gems
VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT
>>
>>103602393
>what if we let our zoomer OOP fag juniors design our C API.
>what could go wrong?
>>
>>103602438
behold
VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT
>>
>>103601733
>the problem is primitive functions implemented in C won't get captured by a continuation even if I have a virtual machine with an explicit stack
Right, I hadn't thought of that. That's the kind of thing that make you think that writing a native compiler is easier in the long run than writing a virtual machine. So much friction everywhere.

I don't really understand continuations. But if what you need to do when creating a continuation, is copy the entire "logiacl" stack from the current function until the bottom of the stack, VM stack and C stack alike, I guess you could do it like this basically:

at the first call to the C function of your interpreter, save RSP in the VM struct as the bottom of the stack
when you make native calls the C stack will grow
when you need to do the copy, you copy your heap stack somewhere and you copy the C stack from the current RSP until the "bottom" RSP, and also saved the current RSP as well as every register
then lisp code is evaluated and mutate the stack. when you need to restore the stack, you copy the heap stack that you saved and you copy the saved C stack bytes in between the "bottom" RSP and the saved current RSP at the time you copied the stack, then restore the registers

>I'm worried about pointers into the stack.
I'm trying to think of a problem but can't find one. If you do the thing I've written above, after saving the stack and after restoring it, anything put on the stack by native code will be stay in place or respectively be moved back at the same place, there is no relocations. It's not the same situation as a moving GC. If you moved back the native frames somewhere else and resumed execution, that would be a problem because there could be heap allocated objects, local variables or registers containing pointers to the old place where the frames used to be.
>>
this is a PENIS number generator...

unsigned int r( unsigned long long int *s ){
*s += 1;
unsigned long long int x = ((*s * 0xbfad23521) ^ (*s * 0xfeefbaaf));
x = ((x >> 3) ^ (x << 7)) * (1 | (*s ^ 0x16716761));
return x ^ (x >> 32);
}
>>
>>103598146
Option 2.
As a consumer, I very likely will have to handle different topics in different ways and having callbacks dedicated to it instead of some sort of switch case filtering the topics is annoying.

>Down side is we need to set up and maintain many topics and that number will grow over time
my gut says the same problem exists in 1. You'll still have to maintain some sort of topic identifier so your consumers can discard what they dont care about
>>
What are some non-trivial projects I can do entirely in Compiler Explorer? (only inputs are command line arguments and non-interactive stdin, only outputs is stdout, stderr, and exit value). So far my only idea is a glob/regex matcher.
>>
>>103593244
Try having a project with more than one source file and build configs.
AI at its current state can't take into account your project/API/lang version, build system, whole project context, current issue/goal.
Until you can tell AI (simple diagnostic. yes, simple): "why is X clipping", "fix indefinite loop when doing x", "find and fix any issues in path management in argument handling or file/folder loading if there were to be a space or non-latin lang characters or malicious relative paths and give a report about the changes using asciidoc"
Or (generative): "add contact us menu item to the About menu button, using the program global style and have it display a popup of our social media found at "class name" which provides emails and social media name plus description, link, and icon. add a friendly intro/welcoming message and our logo on top to explain when and why to contact us. Extract the embedded resources using {res} class"
Until then, AI is no more than technical debt and a shitty rubber duck that costs money where you put more effort into feeding the context until you figure it out yourself while typing.
It's great at pasting snippets, I'll give it that. Too bad that's not enough to justify the massive slow down in my workflow or sending my code to microcock and big AI just to optimize a regex pattern.
>>
>>103567216
Any anons with android experience? what should I start with if I want to write an application, views or jetpack compose? From the little bit of research I did jetpack seems to be the current thing and google is pushing it hard. However, UI and code being mingled together, I don't know, just feels wrong. I guess it's just a habit from GTK, where ui definition and code were separated.
>>
>>103605772
>non-trivial projects I can do entirely in Compiler Explorer
none
>glob/regex matcher
that's hardly non-trivial
>>
>>103591048
No. AI is complete shit at coding. If you can use AI to do your entire job then a shitty pajeet could've done your job years ago.
>>
>>103607333
Unironically a web interface with a native shell that communicate via a JS channel or navigation handler or special url handler is good enough for most needs.
When was the last time you used a native looking app with a bunch of native buttons and checkboxes that wasn't from f-droid or a built-in app?

Installing a 1 GB (compressed) IDE, another GB for SDK, another GB for an older SDK, another GB for a future SDK
Learning to use the IDE, only to have it change fundamentally the next update
Learning the build process (won't happen KEK)
Getting depressed over animations
Updating library versions
Writing code in a specific way because of years of 'fixing' attempts to corelibs
What you see is not what you get
Different screen sizes

Hell no. Not in a 'native' android way.
>>
KSP autism. I made my own OOP layer in KOS and jsut finished a task scheduler.

Of course I can jsut use krpc but I like how KOS simulates a processor in game
>>
>>103607478
not a single incorrect statement yet, I still want to go on. I want to have a go at writing a 4chan app, and probably fail without achieving anything.
>inb4 just use 4chanxt+ff mobile
>>
>>103607526
Jetpack compose then. Views are trash with harder theming, incomprehsible errors on faulty XMLs , and STILL require a lot of code behind to manage the view and bind data.
You can still do separation of concerns in Compose by splitting logic (code-behind/services) from composables.
That aside, you may want to consider flutter if Compose starts getting on your nerves.
It the same as compose, but better and hot reload is such a massive productivity boost.
>>
>>103607510
>colons everywhere
The person who made this hates usable fingers.
>>
File: file.jpg (128 KB, 897x647)
128 KB
128 KB JPG
>>103607585
I see, thanks!
>>
File: isaidcmere.png (56 KB, 197x184)
56 KB
56 KB PNG
>average /dpt/ programmer
>>
helping a noob
https://www.videohelp.com/software/ffmpeg
ffmpeg -i infile.mp4 -c:v libvpx-vp9 -b:v 0 -crf 36 -row-mt 1 -threads 16 -frame-parallel 1 outfile.webm
pause
>>
File: 1714831112723635.png (430 KB, 524x600)
430 KB
430 KB PNG
Remember /dpt/, you can just do stuff.
>>
>>103567216
I'm trying to make my prompt look pretty and I'm undecided as to what colour to use for my $.
>>
I have to admit, I have been writing code using winapi for a while, but I still don't really understand COM actually does.
>>
>>103608807
its not created for understanding, it is created for microsoft aware IDEs. continuation of ActiveX. as i see it: "installs" component binary by putting some ID into registry (similar to DLL "registration", maybe copies binary somewhere).. then, there are some special system APIs, but IDE user just puts/places/embeds it somewhere at the window (RAD designer mode), sets properties etc.
>>
>>103608807
COM is basically a common way to represent and share classes/objects and interfaces in memory so different programming langauges can communicate or utilize the COM functionality
It also exposes ways to manage memory (ref counting iirc?) so you don't worry about who owns what.
It's a very powerful concept and I think it would've been a good huge brother to cdecl for anyone needing anything more than a barren wanna-be ABI
>>
>>103608499
The complementary color of your terminal background
>>
>>103608807
It's just a way to use object oriented programming and virtual inheritance using interfaces when you have two completely independently developed binaries that may not be written with the same compiler or even the same language
>>
I hate computers
>>
>>103607620

Yeah, it is how KOS works.
>>
>>103610938
incorrect. recently ive compiled a library and ivoked a certain function within that DLL from gvim's vimscript. it is not COM.

COM/ActiveX binaries were intended to spark interest to IDEs and also compensate the lack of sophisticated GUI controls like grid. there are many components/controls for sale, they are especially needed for truncated languages like VisualBasic, FoxPro, etc. all are developed with IDE, cant build without IDE.

https://stackoverflow.com/questions/12680981/com-vs-non-com-dll
>>
how do you manage custom libraries for your own projects? make it entirely independent and then add as a git module in the project?
>>
>>103611522
Your first paragraph is confusing and doesn't disprove the post your replied to.
COM is _also_ a fancier way of LoadLibrary, but that does not mean it's not also at heart merely a contract for laying out objects and presenting interfaces in memory.
Also, you shouldn't interact with COM dlls directly if you intend to use COM functionality.
>>
File: fish.jpg (92 KB, 472x331)
92 KB
92 KB JPG
>>103608499
check out fish, it changes the prompt color based on which directory you're in. And it generally has the best default settings of any shell.
>>
>>103611705
i bet youre an IDE user :]]
>>
>>103611713
trooner software. use FAR manager. its like Excel vs Lotus 1-2-3
>>
>>103611668
It stays in a local ./include directory until it becomes useful enough to be copied to the global include path. For a public git I keep the local version synced with any changes made after that point unless it makes the project less organized
>>
>>103611942
so you eventually package and install it as a proper library? or just have a folder of custom libs somewhere that you point to?
>>
>>103612079
It's just a directory under ~/, they change often so packaging for /lib and /usr/include would be extra friction

I've installed some custom site packages properly under /usr for guile, but only because that interpreter doesn't check your path until after its initial module loading phase
>>
im using go. There's a library on github that I forked, applied a fix and now I want to use my fork
I modified my go.mod to point to my repo, but go keeps complaining about some version shit.
I tried a bunch of things but I get a bunch of different errors, all related to version
how to I force go to pull from my repo in the latest commit of the master branch?
>>
Where should I get started if I want to learn C programming for hardware? I have some basic knowledge of C, but I want to do something tangible with it.

To begin with, I just want to make an LED blink or a buzzer buzz, but I'd like to do this in something close to standard C, on a controller with no or almost no operating system.
>>
>>103613102
buy an arduino
>>
>>103613102
The easy bit is usually manipulating the hardware; it's normally memory-mapped so you read or write the correct location and things happen. This is literally what
volatile
is for.
The hard part is often the timing.
>>
>>103613102
Maybe start with microcontrollers, AVR 8-bit microcontrollers such as the ATMEGA168 or ATMEGA328 are the easiest to get into with programming with C with their microchip studio IDE but you need to buy a programmer where the official ones are expensive (cheapest is 60 usd) or you can buy one from aliexpress for super cheap like a USBasp but they can be finicky to setup. You can also buy an arduino uno which uses the ATMEGA328 and use it to write bare-metal C and then just use arduino software to flash it, but honestly avoid the arduino community theres a lot of shit information and retards in it and it will hold you back from actually learning.
STM's STM32 nucleo boards use 32bit microcontrollers and have an inbuilt programmer so you dont need to buy a separate one so its also a good place to start, they are more relevant in the industry too.
Be prepared to read really long scary looking datasheets but they're really not that bad although i prefer AVR's datasheets over STM's desu
>>>/diy/mcg
>>
Use postman for work and hate it ever since it forced to always be online and required an account. Want to make an alternative and figured to use that opportunity to learn a new language. Can I just jump into a GUI app and learn C# or should I learn some basics first? I use the Javascript stack for my job but have done Java/C++ for side projects and in college before.
>>
>>103578106
I love vim and Neovim but I feel there's some languages where the IDEs are better. Eclipse for Java and VS Studio for C# come to mind.
>>
>>103607510
Why does it look like some bastard child of Lua and JavaScript?
>>
What does multi-paradigm and paradigms have to do with programming?
>>
If C had better namespacing and the ability to use primitives for default arguments I'd be somewhat happier with it
For the former I've resorted to using dollar signs when compiling with GNU as a workaround, and some tools aren't able to parse that due to it being non-standard
>>
>>103613383
>Can I just jump into a GUI app and learn C# or should I learn some basics first? I use the Javascript stack for my job but have done Java/C++ for side projects and in college before.
You would save yourself time just doing it with a scripting language IMO
>>
>>103614303
namespaces and real constants are my most desired C features (constexpr is coming in a limited form, but I would have preferred 'const' to just be respected instead of borrowing C++ names)

I also wish the preprocessor didn't use its own language and instead you wrote compiler extensions directly in C that would be compiled for the host and used by the target compiler on your source as native features
>>
>>103614500
You can avoid a lot of the mess of the preprocessor by using static inline functions (possibly with _Generic dispatch to get something like overloading). Yes, they only do things that fit the form of a function (including the type signature), but that's good for a lot.
>>
>>103614328
Python was actually what I used the most in college, might go with that.
>>
File: xnx4nwuz4wkgrx72.jpg (60 KB, 720x679)
60 KB
60 KB JPG
>>103613602
look, there are languages you cant use without IDE. same as there are truncations that lead to IDE or the debugger.

for example JavaScript async code. it cant be developed without a debugger. where is the debugger? - Chrome browser.

thats quite simple if one realizes what goes where. the async code may be debugged with traditional approach which i became a proponent recently - dumping and logging in the process. async codes interlace, so traditional approach wont work straight, it must be improved, but it cant be improved because JavaScript promises are hardcoded into language and all further APIs is based on them. PHP has the potential for traditional approach but i consider removal of unnecessary fibers and generators until its too late for the language.
>>
>>103614844
what the fuck are you talking about
>>
why in Jon Blow always an angry little chuddy? when the fuck is he going to release his language
>>
>>103615204
do you know what "interlacing" means dumbsterhead?

async code is interlaced during runtime (execution) so the output logs become interlaced - unreadable mess. only the simple debugging is possible this way.

but serious projects (which exclude brainlets like you) require sophisticated and exhaustive debugging, testing and work

so eat your welfare and get the fak out of tech to your lesbian dances art
>>
Honestly i lost my faith in C++ where should i learn Rust ?
>>
>>103615282
>why in Jon Blow always an angry little chuddy?
https://www.youtube.com/watch?v=gWqnz-7iQbY
>when the fuck is he going to release his language
Never.
>>
>>103615282
he's still trying to sort out AST macros even though he admitted to barely using them. He feels they're an "important" feature before 1.0/release
so TBA
>>
>>103615382
>tranny lost his faith
you can't lose something you never had
>>
>>103615537
A Lisp with no GC and with Common Lisp's tools, debuggability and hot reloading would be peak gamedev productivity.
Should have invested into OpenGOAL.
>>
>>103611713
What determines each directory's color?
>>
File: Screenshot.png (3 KB, 576x494)
3 KB
3 KB PNG
I like Tetris because it's like, oh how hard could it be? And then you start running into all the gotchas and things you hadn't considered at first. There's still a lot more to do, but here's how far I got in 518 bytes.
https://pastebin.com/JatW863w
>>
Should I bring my copy of K&R on holiday with me? I'm not bringing any electronics but choosing the books I should take is driving me up the wall.
>>
>>103615537
I think there are too many conflicts between a statically typed imperative language and how Lisp macros' model of evaluation works, it needs a different model for doing metaprogramming. For one thing tree walk interpreting doesn't work well for an imperative language.
An imperative language can be compiled, run and generate an arbitrary AST which can at its turn be compiled and run though. It may be even better than macros in fact, it would easier to reason with because code generation is not mixed with evaluation, AST generation would only go forward contrary to what Lisp does, compile time code would be fully name resolved, typed checked or even type inferenced, and it could be compiled as efficiently as needed.
>>
>finally download Vscode because ooga booga copilot is free
>open up my project file
>test out ai code reviews/fixes
>they work some of the time
>try to undo code changes
>vs code runs slow as balls
>sometimes freezes
Why is Vscode shilled so much when its a slow piece of garbage? Holy fuck. Its so insanely slow.
>>
>>103617323
If you can't actually program or do the exercises while you're reading it, you're just gonna forget most of it.
>>
I finally executed my vision of making a transparent task scheduler with KOS. No manual task management bullshit, just make normal classes and methods and itll take care of the rest. Now building complex programs in KOS should be a breeze. The task scheduler is surprisingly fast and you cant really notice every method call being a task that is executed on the scheduler.

The neat thing about my task scheduler is that I can easily extend it so that it will naturally use extra cores to execute your class methods so if for some silly reason you need more processing power you can just slap another core on your ship.

Now that the hard stuff is done the rest of development should be a breeze, but unfortunately I got real world work shit to do this week.
>>
Building a bot to cheat in online chess
>>
>>103617570
Thank you.
>>
>>103617545
To be fair VSC wasn't always unacceptably slow, It's definitely gotten way slower over time.
>>
>>103617545
What are you doing to make vscode slow??? Speed has never been an issue with me.
>>
>>103618113
As I said, all I'm doing is undoing some changes to the code. And its lagging/freezing. The file isn't even that big, just 1mb file. Notepad++/Notepads2/3/4 have always been extremely efficient for me. So I dont honestly see why VS is that slow.
>>
>>103617545
The only thing I use VSCode for consistently is LaTeX with different engines, for some reason most of my standard choices don't export PDFs well under them
>>
>>103617120
Nice. I added an equivalent to your quick block-fall code to what I have in Forth. It compiles to 1315 bytes of code plus the 384 bytes for my well buffer, I don't use the screen directly.
https://pastebin.com/YAbmjJMe

All my block coord calculation is address-generic as I intend to reuse it to draw the hold and next pieces.
>>
>>103607510
To this day I wonder why nobody's made an open source version of KSP. It's such a good fucking game. It deserves an open source engine
>>
>>103602157
you won't do shit
>>
File: boggie smash.gif (3.63 MB, 500x281)
3.63 MB
3.63 MB GIF
>update visual studio for the first time in 2 years
>everything is x10 slower (no exaggeration)
>>
File: Screenshot.png (4 KB, 576x494)
4 KB
4 KB PNG
>>103621488
To add the next box, I ended up having to add a @SHAPE_PTR which contains the address of either @SHAPE or @NEXT_SHAPE, so that the drawing subroutine knows which piece and color it's supposed to print by following the pointer. I also gave up on having the dots in the playfield, even though they're in the original game, to simplify things a bit.
>>
>>103607510
>I made my own OOP layer
What things did you put in there? Straight single inheritance without virtual methods would be the easiest, for example.
>>
File: 983479.png (14 KB, 806x525)
14 KB
14 KB PNG
>>103621488
why not SIXTEL or similar thing? i would never do those in text, though i think TUI-style can be done with high-level templating. ill probably make some block movement with keys to test keyboard input
>>
should I instead use classes to bundle my function together if I was working with a lot of api's endpoints?

Instead of using a global token value I could instead scope it within the class.
>>
File: BOFVN.jpg (53 KB, 429x600)
53 KB
53 KB JPG
>>103567216
>What are you working on, /g/?
Trying to get smart indentation to work with a user defined language in Notepad++. The advanced feature only works with C style langs and on top of that there is no way to apply a UDL globally. Using QuakeC and just want my brackets where I want them AND to have autocomplete. What's the best way for that?
VSCode: plugin has no autocomplete
NeoVim: Do I want to go down its LSP rabbit hole?
>>
Thunks are stored in the boobs.
>>
>>103623846
Wazzat?

>>103623710
I haven't added anything but I did rearrange and simplify.
https://pastebin.com/NYGKN5N5
https://paste.ofcode.org/HPRnKM9qd2zDPcnXahHrYu
The second site has Forth highlighting but it kills links after a week.
>>
File: 1707802844075498.jpg (48 KB, 690x690)
48 KB
48 KB JPG
So now that they downgraded chatgpt o1-preview to o1, its really dumb and it cant help me.

I have been working on a python script and was making progress but now its really dumb it used to take a minute to respond to me but now it responds in half a second and it doesn't seem to listen.

Also i ran out the quota almost immediately because it's broken my script and made it worse several times and it wont correct my code anymore and only gives me general suggestions for fixing it. It used to fix everything for me and i could tell it in sudo code what i wanted it to do. Now it cant even make comments right.

I am stuck with my script using a inverted file index to hold all my fibonacci numbers and multithreading but its really slow and it doesnt know why and 4o refuses to work with it and it constantly tries to change the data structure.

I am considering buying the pro plan to get the real o1 back, but it's 200$ per month. Has anyone tried?
>>
File: 1000003239.jpg (45 KB, 680x656)
45 KB
45 KB JPG
any of you anons do smart contract development?
I've been working on a Solana smart contract in Rust for awhile. I hate crypto but I'm hoping I can make some money
I think I'm almost done with it, I just have to figure out how to assign metadata to it on the blockchain and there is a library for that so I have to research it
>>
File: 00009-1908661350.png (834 KB, 896x1152)
834 KB
834 KB PNG
they should start teaching rust in schools
>>
Using Java, I am building a demonstration of a stock ticker.

>10 threads started, each pretending to be a stock
>Each has price changed once a second
>Each sends on a queue the new price
>Consumer thread receives the messages from the queue
>Makes the price of each stock individually available on Rest endpoint
>Tricky: Make sum of all prices available on a Rest endpoint

Learning about how RestControllers work in Spring in terms of threads. But I'm not sure if the price of each thread was published faster whether the consumer side would be too slow?

If we grew the number of stocks from 5 to 10, or a 1000, how would I better make the consumer collect up all those messages?

Or would it be better to have multiple consumers taking from the message and merging that data? It's mostly about how to make the sum of them all available in a fast and efficient way.
>>
File: 1721631815162791.jpg (359 KB, 850x1200)
359 KB
359 KB JPG
>>103567216
I just found out that it's really easy to run into UB if you want to bypass the borrow checker in Rust and it really took the wind out of my sails.

Any copes I can use? I've just sitting here looking at my screen for 2 days now without writing anything, because I do make use of some pointers in my project and now I have to always be wary of reentrancy when creating refs to these pointers and worst, the think that owns the original data.

Any tips, rustchads?
>>
>>103629553
>finding out that rust falls apart if you try to use non-tree structured memory
absolute meme lang
>>
File: Screenshot.png (4 KB, 576x494)
4 KB
4 KB PNG
>getting mad at the RNG for not giving the shape I want at a particular moment
It really is starting to feel like Tetris.
https://pastebin.com/kCL4XHQ9
>>
>>103627021
They want the dumb goyim to pay.
Chads learn what they're doing and don't need to give sama anything.
>>
File: 1705625234564828.png (241 KB, 2173x1254)
241 KB
241 KB PNG
I am seeing some disgusting non C style syntax in this thread.
Post whatever you're working on and let it be a white man's language
>>
>>103567216
Working on a neural network with evolutionary training written in Forth for the past few days. The network calculation is done in C for performance and I've checked the disassembly and it uses SIMD so that's nice. It also uses multi tasking (pthreads) in Forth for training.
It already works for basic networks like XOR and AND and now I'm working on getting it working for more complex things.

I'm mainly experimenting with feed forward networks and trying out some ideas, like training with extra "unused" nodes that get passed from the output back into the inputs as a way to provide a sort of a memory that it has to learn itself how it wants to use it.
>>
>>103611713
made in rust
>>
bros why is making a gui program so shit in current year? is webshit really the only answer if i don't want to spend days scrolling through documentation and writing hundreds of lines of stupid boilerplate for a hello world counter with 2 buttons and a textbox?
>>
>>103635478
It really depends on the language and toolkit/framework desu. Look at how trivial it is to create basic GUIs with Lazarus/Delphi. I don't like ObjectPascal but I wish I did so I could just use Lazarus and never have to worry about GUI shit again.
>>
>>103635478
Depends.
>Loonix GUI only
GTK
>Winblows GUI only
Qt
>Both Loonix and Winblows
Make your own shit with SDL.
>Wait I want it to run on mobile too
Suicide.
>Ok just mobile
Flutter.
>is webshit really the only answer
Yes, unironically.

>>103635546
Or Swing/JavaFX if you're a saar.

Hate this fucking shit, having to download 500 dependencies for Tauri because muh Chromium.
>>
>>103636235
i despise people who make their opengl window a """gui""", guis should primarily be software rendered
>>
>>103635478
>why is making a gui program so shit in current year?
Doing it in C? That was always painful for anything but the most uselessly trivial GUIs (buttons are too useful for that; think plain blank windows only). Working around that pain is why we have toolkit libraries, and they're complicated with a lot of documentation once you get beyond the most basic bits. (Some languages other than C have it a little better, but you still end up dealing with a lot of details.)
If it makes you feel happier, webshit also has a lot of documentation at about the same point. Understanding CSS and JS and REST is where you end up reading a whole lot, and even more if you decide to use React or other shittastic webshit stuff as that tends to assume you know the basics.
GUIs are complicated because there's a lot of choices and a lot of stuff happening behind the scenes.
>>
>>103636265
>guis should primarily be software rendered
It's either that or having a build pipeline and a dependency fight for each system.
>>
>>103635478
Just use Flutter. Works fine even for desktop apps so long as you don't need multiple windows.

>but Dart sucks
use ClojureDart then.
>>
merry haskell
>>
>>103638258
>unwrap present monad
>get coal
>>
>>103567216
daily gooning thread
>>
>>103636235
gtk is cross platform.
You can even install xorg on windows so directly using X is also cross platform.
>>
>>103635478
You could use tcl/tk.
>>
>>103595561
Having a university degree ≠ successful
>>
>>103567216
I don't program outside work but I keep clicking this thread to see those big fat natural anime tiddies every time im on /g/
>>
>>103639107
daily programming tits
>>
>>103639147
<3
>>
>>103638527
Highly underrated and simple to use once you get over the "everything is a string and a list" syntax. It's kind of like lisp in a way.
>>
>>103617050
hash of the pathname
set -l shas (pwd -P | sha1sum | string sub -l 6 | string match -ra ..)
set -l col (for f in $shas; math --base=hex "min(255, 0x$f + 0x30)"; end | string replace 0x '' | string pad -c 0 -w 2 | string join "")
>>
File: fizz.webm (599 KB, 1280x720)
599 KB
599 KB WEBM
>>103635478
I use either Flutter or a web interface served via localhost. I did the beginner tutorials on wxWidgets, QT and GTK and thought they were all horrible.
>>
ImportError: This is the kaolin placeholder wheel from https://pypi.org/project/kaolin/. Please follow https://kaolin.readthedocs.io/en/latest/notes/installation.html for installation

why the fuck is this legal?
>>
>>103636311
desu if you find something that wraps x11 and win32 with a pixel buffer, your off to the horses. though i imagine youll need to build whatever other libraries your using cross platform which is a problem even with SDL
>>
>>103636265
>guis should primarily be software rendered
Why? What's your reasoning?
>>
>>103640200
significantly easier to code for, easier to debug, simpler and less error prone (user doesnt have to worry about muh outdated driver or muh incompatible card or only X version of graphics API being available) and more predictable performance
also from what I understand rendering on the GPU requires frames to be drawn every tick which is inherently wasteful for a GUI which largely does no work when the user is not interacting with it.
ive seen programs like Zed, the cosmic stuff and those GPU accelerated terminal emulators be "fast" sometimes and "slow" other times, I dont know if i have a shit tier GPU but ive many "X feels slow" and "werks on my machine" posts about these programs
>>
>>103640503
*seen
>>
>>103639305
What is set -l? What is string? Why are these things impossible to find?
>>
>>103640824
>Why are these things impossible to find?
tf are you talking about? They're right there in the documentation
https://fishshell.com/docs/current/commands.html

https://fishshell.com/docs/current/interactive.html

https://fishshell.com/docs/current/cmds/string.html
>>
>>103640503
I see, it does make things easier and more portable but isn't the efficiency worth it? Even with SIMD a CPU is far slower than a GPU at rendering sprites for example.
>rendering on the GPU requires frames to be drawn every tick
It doesn't have to be this way but people are apparently lazy and just redraw everything at a fixed frame rate. You could just redraw regions or redraw the entire frame when things change instead.
>>
File: 1000003242.jpg (62 KB, 542x540)
62 KB
62 KB JPG
made a python bot that uses the openai API and reddit API to search specific subreddits and shill specific shitcoins
I tried making it for Twitter at first but the Twitter API rate limits are insane and you have to pay a fuck load to upgrade it
>>
Anyone know why outside of the main sources for programming docs almost all programming tutorial websites are from india or written by indians? How tf did this happen? I thought you guys said indians are subhumans. Where are all the western written tutorial pages for programming languages?
>>
>>103640954
>Where are all the western written tutorial pages for programming languages?
We call them books
>>
>>103640954
Most of the indian programming tutorials are either copied and pasted from other sources or generated by AI or low quality or a combination of all of them.
If the article is written by Durgesh or some indian name I close the tab.

It's just like with ads in the past before ad blocking. I no longer see indian articles as they are filtered out by my brain like an automatic ad filter.
>>
>>103641004
>>103640954
good morning sirs, please redeem the tutorial, thank you goodnight
>>
AoC over, /dpt/ can thrive once again
>>
just run the stupid function in a different thread you rust stupid fuck i dont want to await retard
>>
>>103640900
its only more efficient CPU wise, going through the graphics driver and memory card introduces significant memory overhead, and also memory leaks too lul. if you software render it you could get away with not even storing a copy of the window in memory just its "descriptor". its the reason nearly every gui toolkit these days uses like at least 40MB.
also drawing a gui isn't particularly intensive, so the overhead of the possibly very shitty graphics driver might eclipse improvement gained from using the GPU
>>
>>103640954
its only the case when your trying to use something slop. embrace the obscure and esoteric and get tutorials from white aryan men only
>>
>>103641937
>going through the graphics driver and memory card introduces significant memory overhead
Unfortunately it does, but mainly because of how the drivers store everything in main memory that it uploads to the GPU and doesn't free it. Not sure why the drivers (specifically amdgpu) do this, do you know? Maybe I'm misremembering but it may have something to do with error recovery (specific to OpenGL?) so you end up with multiple copies, once in the main memory in your program, once in the driver and then also on the GPU.
>and also memory leaks too lul
I've read about them but never experienced them myself thankfully.
>>
>>103635478 (Me)
ITS ALL SHIT ANONS AAAAAAAAAHHHHHHH
>decide to stop bothering with native toolkits and just do webshit
>everything going well
>decide to use a bitmap font
>blurry as hell because browsers simply cannot into bitmap fonts
>a million hacky css/js solutions online, none of which actually work
WHY IS IT LIKE THIS
WHY CAN'T ANYTHING JUST WORK?????
>>
>>103640954
I don't think I've read even a single article on Clojure written by an Indian
>>
>>103643046
just use comic sans
>>
>>103643046
>use a bitmap font
Why would you even do that?
No good bitmap fonts for modern displays exist, they're all tiny low-res piles of trash made for 640x480 monitors
>>
>>103643046
skill issue
>>
>>103644146
still have to work on some of the heading fonts though, finding big bitmap fonts is a pain
>>
>>103641883
another vistim of the burrow checker
>>
>>103643046
>use a bitmap font
why the fuck would you do that? they don't handle highdpi displays well at all
>>
>>103643599
>tiny low-res piles of trash
>>103644776
>they don't handle highdpi displays well at all
Just scale by a number divisible by two and don't use a blurry ass resize algorithm?
>>
>>103567216
Haskell!!!!!
>>
File: 1722298468108274.png (822 KB, 852x856)
822 KB
822 KB PNG
Merry Christmas!
https://x.com/lauriewired/status/1872095726899171716
>>
>>103635446
and? i use fish and helix even though i dont program in rust. its just good software
>>
Why did they pick to use semicolons for the end of statements instead of periods?
>>
>>103647983
Periods are already used as decimal points.
Trying to type
double n = 3.4.
would make n = 3, and there would just be a meaningless "4" expression afterwards.
>>
>>103649082
Is that why Europe uses a comma for decimals?
>>
>>103649175
Who knows? Regardless, even commas are already an operator that does stuff in most programming languages.
The semicolon doesn't have any other obvious use, and in real language it's used to sort of end a statement (to be followed by another related statement) so it makes sense for how it's used in programming languages. Also it probably helps that a ";" is easier to see than a ".", so it's less likely to miss when used as a statement ender.
>>
why didn't somebody just fork C++ like 20 years ago to add proper modules, vs. preprocessor/include bullshit?

even if it totally broke backward compatibility, it wouldn't have taken more than a few years to port all the common libraries that everybody depends upon, starting with the smaller ones and then building up to the larger ones that depend on those.
>>
File: file.png (30 KB, 482x304)
30 KB
30 KB PNG
I'm learning wxWidgets, and I'm using vcpkg to remove some of hassle of managing dependencies while I'm learning.
Tried some unicode characters, and they don't seem to be supported, how come? I thought unicode support was the default with wxWidgets.
>>
>>103635196
>multiple malloc calls in a function body
>>
>>103650069
It's been a long time since I've used wxWidgets, but I recall having problems with my editor insisting on using wrong encoding in the file, so the strings in the executable were also in the wrong encoding and they displayed incorrectly.
>>
>>103649175
not all of Europe is retarded
>>
>>103571304
Look at https://www.crummy.com/software/BeautifulSoup/bs4/doc/#find-all
The function always returns a list, but its arguments can be all sorts of things. What you're doing with your function call is supplying the find_all() with the second element of the container, be it list, a tuple or another sort of collection data type. What does the container object look like? Is it really what you want the beautiful soup to search for? Or do you want the second element of the returned data? In that case, either do
element = soup.find_all(container)[1]
# or
elements = soup.find_all(container)
second_element = elements[1]
>>
>>103621724
I did ur mom
>>
>>103646229
looks like shit. Only good purpose of such a font would be to get a retro terminal feel.
>>
The best bitmap font is sun12x22
>>
did anon make any progress learning Haskell
>>
>>103636235
>Hate this fucking shit, having to download 500 dependencies for Tauri because muh Chromium.
Pretty sure tauri just uses the system-provided webview.
It's what all of their shilling amounted to when it launched and they compared against electron.
Now, the question is: How do you end up with 500 deps for mere glue over system-provided functionality?
>>
>>103650069
those should be used from a scripting runtime like PHP. why need them compiled? which unicode format u8 u16 u32
>>
>>103649597
Because C exists and doesn't suck unlike C++.
>>
>>103652104
>and doesn't suck
Not so sure about that one
>>
>>103652122
If you write code in C and immediately miss some feature from C++, it's because you're a bad programmer.
>>
>>103652153
What if I miss some feature not in C++ either, or dislike some feature in C?
>>
>>103652104
>doesn't suck
Both have EXACTLY the same compiler issues, dependecy management hell, and shitty build ""systems"".
Syntax and feature wars are for undergrads and NEETs.
>>
>>103652173
GNU Make works on my and my user's machines, don't care about (You).
>>103652171
Skill issue.
>>
>>103652171
Also this is 2024 and they just bloat the c stdlib with all the crap they add to C++ anyway.
>>
>>103652202
>GNU
Stop licking GNUssy thrush so hard
>not standard C
>not portable
>trash
>>
>>103652258
It's standard to suck jewish cocks, which is why I do things the non-standard way.
>>
>>103652279
Fair point.
>>
why is compiling C++ with clang so slow on windows compared to linux?
this is making me lose it
>>
>>103652454
likely NTFS issue
>>
>>103652508
That and/or mingw shitty abstractions if he is using it
>>
>>103652524
more likely it's antivirus, mingw code is better than 100% of windows code
>>
>>103652508
i compiled the same project on the same disk that i mounted on linux
>>103652524
i said i compile with clang, gcc is also way faster
>>
>>103652791
gcc has -pipe flag, that skips filesystem entirely for a lot of things, does clang?
>>
>>103652813
it does, i think that clang has pretty much the same flags with gcc too
>>
>>103650069
https://docs.wxwidgets.org/stable/overview_unicode.html
Put simply, wxwidgets made the wrong choice.
>>
      running build_ext
running build_rust
error: can't find Rust compiler

If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

To update pip, run:

pip install --upgrade pip

and then retry package installation.

If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.


python was mistake
>>
      
error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
--> tokenizers-lib/src/models/bpe/trainer.rs:526:47
|
522 | let w = &words[*i] as *const _ as *mut _;
| -------------------------------- casting happend here
...
526 | let word: &mut Word = &mut (*w);
| ^^^^^^^^^
|
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
= note: `#[deny(invalid_reference_casting)]` on by default

warning: `tokenizers` (lib) generated 3 warnings
error: could not compile `tokenizers` (lib) due to 1 previous error; 3 warnings emitted

Caused by:


I hate trannies so fucking much
>>
>>103652173
>dependecy management hell
dependecy freedom is not "hell", but I guess I could understand why you might think that coming from the Node Communist Party
>>
I am having a hard time transitioning from the "this is taking too long because I'm retarded" phase to the "this is taking too long because it's objectively challenging" phase
>>
Can I start threads with assembly to parallelize an algorithm? Or is it better to use C for such things?
>>
>>103655496
send pull request with reqrite in c for getfaster better perofrmance
>>
>>103656508
Of course you can, you can make system calls in assembly or function calls to an external library like pthread.
>>
>>103657191
That sounds neat, I'll have to try it. Is there nothing that it can't do? I don't get why I wouldn't use it for everything.
>>
>>103657250
Check out the sys_clone and sys_fork syscalls on linux.
>I don't get why I wouldn't use it [assembly] for everything.
I write my programs in Forth, with added C and assembly for performance. I only write assembly when I know I will likely beat the C compiler for some very performance critical path or I am trying to beat a benchmark. With assembly I can ignore conventions and everything in between to make it as fast as possible.
My reasoning is simple: the code that I write in 5-15 minutes of C takes me hours in assembly and the C compiler does a good enough job in the majority of cases. There were even cases where I wasn't able to beat the C compiler, but that's likely due to my inexperience.

It's hard for me to justify writing assembly for an architecture that I don't enjoy, such as x86_64 or ARM.
>>
>>103657580
Oh, so you think I'll get bored quickly? I don't mind taking time to do things. What platform do you like assembly for best if x86 is annoying? I don't mind getting old computers or something. I used to do stuff on my ti89, that was 68k. But I'm not very advanced.
>>
>>103657250
>Is there nothing that it can't do?
Technically it can do everything but that's a lot of work compared to writing in C. You don't have any type system either.
That's why languages in general and their compiler exist from C like languages to regular expressions, so that you can express more directly the main logic of you program. Languages are nothing more than ergonomic tools for programming.
>>
>>103657647
I've written Forth on FreeDOS (basically MSDOS) with dxForth and I enjoyed writing words (Forth functions) in intel 8086 assembly. I suppose it helps that writing assembly on that platform is the path of least resistance to do what you want and optimization wasn't the main reason for me to use it.
>Oh, so you think I'll get bored quickly?
Now that I think about it further, I just don't like trying to beat the C compiler on modern architectures. Too many things you have to do:
>figuring out which instruction is the fastest for my machine
>figuring out or knowing all assembly tricks (such as left shift vs mul when *2)
>pipelining (instructions and memory/cache accesses)
>jump/cache alignments
>branch prediction vs branchless (sometimes one or the other is faster, machine dependent)
>using different length instructions or different instructions entirely to efficiently align without resorting to noops
>probably other things I'm forgetting
I don't think you'll get bored of it if you enjoy it, there's a lot to learn and I only scratched the surface. I just personally don't like it, at least not for x86_64 or ARM.
>>
>>103657874
>I just personally don't like it, at least not for x86_64 or ARM.
The big problem is that there's a lot of variation in architectural detail down at the low level, with all the different micro-architectures and stuff like that. It's usually best to leave it to compilers, especially as the compilers have tables of instruction costs that are contributed by the makers of the chips. You can beat compilers, but it usually isn't worth the programmer effort it takes.
>>
>ghostty
>simplicity
I lol'd it has an overwhelming number of features, documentation that rivals the unix v7 in length at 10x the code footprint (so around 100x more undocumented bugs than v7)
It's crossplatform in the BAD sense where instead of being independent of any environment it plays in them like a pig in mud.
What even is this "shell integration" do you want programs to be separate or integrated MAKE UP YOUR MIND! It sounds like you want to have your cake and eat it too. I want shell integration but it's NOT MY FAULT if they don't play nice. Take responsibility.

If it took you 12 seconds to cat a file to any other device you would rightly be pissed, but if that device is a terminal, something the user interacts with, all of a sudden locking up for 12 seconds is not only expected, it's praised. Wow so fast 12 seconds and I don't even have to restart the terminal to clear the garbage preventing me writing to the shell just ctrl-c and ctrl-l wow TAKE MY MONEY
>>
Why would you say this when it's clear to everyone that he's more than 100x away from "maximum render speed"
Smarter would be to achieve near maximum render speed then cap it.

>Much too often to terminals worry only about the performance of `cat /dev/urandom`...

A comment like this makes me this you just don't have a good grasp on the rendering speed even integrated graphics and that you get your info from wayland dev blogs over high performance applications

Damage tracking is just another bad idea like css that results in overcomplicated brittle programs. Recomputing the whole thing every update is much simpler in the long term



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