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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: michael-jackson.jpg (63 KB, 736x552)
63 KB
63 KB JPG
What are you working on?

previous >>108159899
>>
File: no salary needed.jpg (440 KB, 960x960)
440 KB
440 KB JPG
>>
Today I will sleep.
>>
>>108194822
Good. That's no problem for me. I am coding hard already. Gotta get this done.
The esp32's arrived yesterday and i want to do a different project now. Peer pressure is on
>>
>>108194835
>Peer pressure is on
We don't care.
>>
File: 1771545574609.jpg (70 KB, 1055x709)
70 KB
70 KB JPG
>>108194835
>>
>>108194876
brother, what are you even doing?
>>
>>108194628
Klussy
>>
File: 1766057979331671.mp4 (343 KB, 360x270)
343 KB
343 KB MP4
>>108194628
>>
>>108194639
https://www.youtube.com/watch?v=HoADqXCoka8
>>
>>108195022
My CPU is doing nothing.
It's still quite laggy, especially in the first few seconds. Gets better after a while.
Not sure what that is. The CPU is just juggling a bit of memory. All image capturing, scaling and h264 encoding is done inside the fpga.
But I think ill just wrap it up here.
Soon (tm) I can implement some sobel and gaussian blur filters then in hardware. I shouldn't get caught up in js trash.
Will also soon(tm) chance to the imx219 sensor, but too lazy to find out the registers needed and to adjjust the timings. Would be cute if it automatically worked for both cameras
>>
>>108195083
PS: That's a 600 MHz risc-v quadcore. Doing all of it.
>>
>>108195083
See, after a few seconds, maybe minutes lol, the stream is stable and working with rather short delay
>>
File: 1765383526025978.png (176 KB, 1649x944)
176 KB
176 KB PNG
>just realized that a lot of job sites like linkedin don't let you see job listings unless you're logged in
>webkit makes a brand new web browser instance every time the application restarts, logging you out
its always shit you would never think about that become the catastrophic problems
>>
File: 1758514627364135.jpg (59 KB, 828x771)
59 KB
59 KB JPG
anyone made anything cool and or made money with vibe coding ?
>>
Will AI primarily replace programmers who use boilerplate languages?
>>
File: cool.png (172 KB, 1971x2090)
172 KB
172 KB PNG
>>108195511
The twitter zoomers made a lot of cash with building gpt wrapper apps and selling them on instagram with hot girls. But they are not cool, as far as i know.

I have vibe coded a neat app to listen to music with frens. You can create playlists, add youtube and bandcamp links, they get downloaded with yt-dlp and added to the playlist.
Music stream is in sync with all listeners.
I am scared to leave it online tho. Gotta at least add some basic dummy auth. I recently did some go auth tutorial for basic and token auth. It works neat, just gotta vibe it in now.
>>
>>108195511
owners of vibecoding tools have access to all your ideas
if you vibecode smt good they gonna steal this and scale dat stuff with their money
>>
Opinions on Gleam? Is it better than Erlang or Elixir? Hearing a lot about it recently.
>>
>>108195655
They woupd only steal it if it's a billion dollar idea, none if them is interested in a 200k per year business.
>>
Is it worth it to try and "learn" C++ without the STL?
I heard it greatly improves compile times but, to be fair, none of my projects at my current level take more than 5 seconds to compile... I suppose that kind of shit is only an issue for very professional programmers.
>>
>>108195621
>selling them on instagram with hot girls
It scares me to think that there are people dumber than zoomers.
>>
>>108196468
What will you do when the problem calls for a vector?
>>
>>108196693
Reserve-high/commit-low.
>>
I was told by /g/ that this is where the tampermonkey bros reside?
>>
>>108195064
(((they))) cancelled that too
>>
>>108195083
Performance counters?
>>
>>108197038
What do you mean?
All counters on the right side come directly from hardware. So 31 frames per second are getting processed
>>
>>108197238
No, what I mean is that a lot of processors are collecting performance statistics in the background, but stop doing so if they haven't been retrieved in a while. These collections can have a severe impact on compute-bound workloads until the processor realizes that no one cares about the data, and stops collecting it.

On my machine for example it takes 6 or 7 seconds (pun intended) until I get 100% of a given core.
>>
>>108197416
oh okay, didn't know that. Thanks. Yes i remember risc--v having quite a lot of performance counters, if implemented
>>
>>108194628
rate my program: https://github.com/orlfman/FFmpeg-Converter
>brought to you by autism and grok AI
>>
>>108197707
That interface is total garbage, and I'm not even a UI/UX/Uwhatever monkey.
>>
>>108197763
i'm not artistic, i'm autistic and in my head, it works great. i honestly can't think of any other way.
>>
>>108197863
The curse of FOSS UX in a singular post.
>>
>>108197863
>rate my program
>in my head, it works great
Just admit this is about your fucking ego.
>>
>>108197883
not really. i honestly have no idea how to make the UI look more appealing to others because in my head, what is there, is how i think.
i know its garbage to most but no one ever gives me a design idea to copy (to be "inspired by"). i have a hard time with originality.
>>
>>108198060
Mate.

If you can look at picrel and not immediately get the ick ... like, categories. Subtables. Select File, Output Name, Output Directory, all of these should be aligned to a grid. Next category. No ordering at all.

Or further down: single line items. You're wasting 80% of your real estate on absolutely nothing.
>and again, not a UI/UX monkey, just apparently not on the spectrum
>>
>>108198144
ok, thank you
>>
File: juke.png (61 KB, 1130x847)
61 KB
61 KB PNG
>>108198159
For reference: this is a jukebox I hacked together a couple years ago. Not by all means perfect, but still.
>>
>>108194628
>she should join our startup
>>
>>108194628
Are there reveals of her klussy if not then I am not interested.
>>
File: qf70j130ra6z.jpg (91 KB, 640x604)
91 KB
91 KB JPG
Idk but I am trying hard
>>
>>108198182
i think i understand what you mean by grid now. thank you for the example. that does look nicer.
>>
how good is dia's (or whatever) reverse compiler to C?
so if I had this code, would it actually generate C code, without being full of x86 intrinsics?
https://github.com/farbrausch/fr_public/blob/8c8f82c2ae01133370e649bbc05916e7aceecadd/werkkzeug3/genbitmap.cpp#L499
>>
>>108198304
mov       esi,[s]
mov edi,[d]
mov ebx,[x]

>caller places values onto the stack, probably from some register
>callee loads values from the stack into registers again
>potentially the same registers
How the fuck we still don't have register overwrites for parameters is beyond me.
>>
Now that LLMs are a thing what language do you do your comfy hobby programming in? Has it changed anything for you?

Because I have to write web slop for work I've just gone back to C for fun. Pointers are fun. Memory management is fun. System devs are living the dream.
>>
>>108198981
based makiposter
>>
>>108198981
I spent a few years programming in Go on the hope that other people in my company would more easily be able to work on it, and an anti-job-security move after I got a bit too lost in using niche languages unnecessarily (in my own estimation).
With LLMs, I threw up my hands. What am I suffering for? I should just write in an actually good language, and stick with it. I have an easy excuse now that LLMs can explain my codebase in a 'hard' language more easily than coworkers can pick up my code in the 'easy' language.
>>
>>108198981
>LLMs
buy an ad
>>
>>108199235
buy an cock
>>
>>108199235
haha you are trans
>>
>>108198981
for me its ruby on rails because i like rails
>>
>>108198259
ive spent most of the day messing with ui redesigns and man i wish i wasn't ui retarded. kinda wish i just went with gtk with libadwaita. libadwaita makes anything look nice regardless how artistically inept you are.
sigh, why must i use kde.
>>
>>108198981
>Has it changed anything for you?
No.
I code in the things I like for my hobby programming because I'm doing it for me.
>>
What kind of fun projects are you guys doing?
I miss when /g/ had a new meme project being shilled all the time in 2022
>>
File: HBljvjrWUAA_jze.jpg (95 KB, 1280x1062)
95 KB
95 KB JPG
>>
>>108199926
buy an ad
>>
>>108194628
wtf is a 'kloss'
>>
>>108200689
a family of karlies who kode
>>
>>108200689
>
>>
>>108200728
age with karlie...
>>
>>108194794
>no salary needed
>empties an entire lake each day
>consumes a small city's worth of electricity each day
>>
>>108195064
Fisting
>>
>>108200816
>>
>>108198182
> Autio
>>
>>108200839
Lol, complete nonsense. Great AI you've got there.
>>
>>108200839
Are the local open source consumer models in the room with us?
>>
>>108200925
People noticed and asked their LLM about power consumption, so they had to shut it down.
>>
>>108199882
adding custom site support to my booru client
>>
>open(2) fails if the path is too long, despite the file existing
What a joke of an operating system. Is the "proper" way to open files really calling openat on each component of the path?
>>
File: trimmer.png (662 KB, 1014x685)
662 KB
662 KB PNG
>>108199882
>What kind of fun projects are you guys doing?
This isn't super interesting, but I've been trying to do a little ffmpeg video trimmer thing. The idea is the only thing I really do with videos is trim them with ffmpeg, so I'll throw Qt on top and then I'll just have the app when I need.
>>
>>108201408
You sound surprised, almost as if you didn't expect to run into yet another microkernel interface fuckup.
>>
>>108201408
how long is the path in total? how long is the longest file or directory in that path? how many directories?

or just post the path
>>
>>108201539
>inb4 Error: Comment too long (4332/2000)
>>
can someone explain why I need to learn anything but rust? im vibing all my apps using it and it always works
>>
>>108201652
then answer the initial questions retard
>>
File: 1762116397926266.png (668 KB, 700x700)
668 KB
668 KB PNG
>>108201662
Nope, you're good.
>>
>>108201669
>ADHDler didn't see or understand the "inb4"
>>
>>108201450
Post the source code. Don't care about quality, would love to see.
>>
>>108201539
>>108201652
Yes it is that long, but what are you supposed to do if you're traversing a user's filesystem and you hit a path that long? openat seems like a waste, open should just werk.
>>
>>108201715
Listen, the chef kernel dev made his decision when he adopted a microkernel API to a monolith. This fuckup is his responsibility, even if he autistically denies it - so just use openat and don't feel bad about it.
>>
As a biomed fag whose only ever used jank ass R scripting since undergrad, I've finally decided to go back and learn c++ like a real man. So far, I have had to come to terms with things I always took for granted, like being able to trivially eliminate duplicate entries in a vector, or transpose a table, or get what type a variable is. Secondly, people on the internet really really really want me to type std:: one trillion times, but I'm just not gonna. My souce code is not an HIV clinic, I am including the standard namespace. If some fucking animal wants to redefine terms from the standard library and thus cause a conflict, I'm just not using their code.
>>
>>108201784
>learn c++ like a real man
Alright, who's gonna tell him?
>>
>>108196245
https://gleam.run/
>Black lives matter. Trans rights are human rights. No nazi bullsh*t.
Tranny language.
>>
>>108201806
I thought trannies did webdev and videogame mods, not that carmack shit
>>
>>108194628
Love Karlie
>>
>>108201829
>carmack
You have never seen the nonsense that was the Doom Zone Memory System. He wasn't a real man either.
>>
>>108201815
>process.send(subject, "Hello, Joe!")
... I get it, you're limited to the fucking kernel interfaces, which are already complete garbage ... but now you're solidifying dumb decisions in userspace too.

I swear to god, autism fucking everywhere.
>>
>>108201662
if you're slopcoding you'll want to let the AI build often and repeatedly while you're out catching STDs, and Rust's slow compilation will make all of that much slower and it'll get fewer iterations.
Most languages are pretty shit in this respect, especially safer ones, but this is the big downside with Rust vs. a fast-compiling language like OCaml or Go.
Otherwise, Rust both deserves and is well-suited to slop.
>>
>>108202079
you are like
>>
>>108201711
>Post the source code. Don't care about quality, would love to see.
sure its just a thin wrapper over a single ffmpeg command. python + qt (pyside is their official thing) and has all the widgets and player junk

    def save_trim(self):
if not self.current_file:
return

base, ext = os.path.splitext(self.current_file)
output = base + "_trimmed" + ext

start_sec = self.trim_bar.start / 1000
end_sec = self.trim_bar.end / 1000

cmd = [
"ffmpeg",
"-y",
"-i", self.current_file,
"-ss", str(start_sec),
"-to", str(end_sec),
"-c:v", "libx264",
"-crf", "18",
"-preset", "medium",
"-c:a", "aac",
output
]

subprocess.run(cmd)
print("Saved:", output)


https://pastebin.com/raw/9fpCfRsp
>>
File: 16620945575010.jpg (3.85 MB, 3600x3600)
3.85 MB
3.85 MB JPG
>>108198981
For me its Forth.
>>
>>108202634
pedo language
>>
Bros have you taken your meth yet?
I almost forgot. Lets take the meth (lisdexamfetamine) and kode hard
>>
On Saturdays I work on my setup. I just added a few macros to my keyboard. Unfortunately my phone was off so I missed the delivery of my cable management tray. Maybe I will work on my window manager now. Soon I will be super productive!
>>
>>108202806
Can you please overdose and code to death? Thanks.
>>
>>108203097
you can't really overdose lisdex
>>
>>108203160
I'm absolutely willing to test that hypothesis on you.
>>
File: file.png (113 KB, 420x518)
113 KB
113 KB PNG
I had some downtime yesterday and knocked out 12 problems in a row. Finally got around to finishing this stupid list. Some of the problems in there are really obtuse and make me feel like a complete retard.

Next is the blind 75, I'm only like 20 questions in but unlike in the 150 I haven't come across anything that makes my brain hurt.
>>
>>108194628
>What are you working on
I ain't working on shit cuz everytime I think of an idea its already been made 60 times on github.
>>
>>108203170
Okay, no problem for me.
But I just recently reduced my dosis. So not happening anytime soon :-)
>>
>>108203453
You make it sound as if you have a say in this matter.
>>
File: aya confuse.jpg (63 KB, 712x712)
63 KB
63 KB JPG
>>108194628
>feel lazy so ask llm to do thing i want
>its output only partly works or is very bloated
>spend hours trying to tard wrangle the llm to fix it / tidy it up
>give up
>write my own solution thats far cleaner, simpler and actually works how i want it to
anyone else keep falling into this loop?
>>
>>108203675
Good, lets go to lidl
>>
>there's an infinite number of numbers between any 2 points on the number line
>this isn't a problem for graphing
>there's an infinite number of imaginary numbers between any 2 points on the number line
>WE NEED A NEW AXIS
>>
>>108204084
I'm no mathologist, but it seems like the more 0.001s you add the number, the closer it gets to the next number, but no matter how many i's you add to a number it doesn't get any bigger
>>
>>108204084
Are you stupid? The new axis is just to make imaginary numbers easier. It's just a concept
>>
>>108204153
>The new axis is just to make imaginary numbers easier.
Huh? They have their own axis because they're independent of the real number component.
>It's just a concept
So are real numbers.
>>
>>108204189
that's how normies distinguish them. Electricity doesn't need a new axis. it just uses both. It can live its life without stupid axis
>>
File: 1759549017184.mp4 (116 KB, 380x386)
116 KB
116 KB MP4
I have a question about Sled

I currently store structs keyed by an auto-incremented ID (e.g. bid UserBan).

Now I need to query by another field inside the struct (e.g. uid or active = true).

In SQL I would do WHERE uid = ? AND active = true, but in Sled I understand there’s no secondary index.

What is the idiomatic way to model this in Sled?
>>
>>108202806
i just take my hydrocodone. knock myself out, have some cup of tea, window cracked open to let the cold air in, wrapped in my blanket, with my little candle light on in my room and spend hours working on a single function but man am i comfy.
>>
>>108202391
should add an option to do copy. and expand it to support extracting only audio, with options of copy or re-encoding it.
>>
>>108204627
>>108202391
oh and some improvements:
            "ffmpeg",
"-y",
"-ss",
"-i",
"-t",
"-c:v", "libx264",
"-crf", "18",
"-preset", "medium",
"-c:a", "aac",
output

>place -ss before -i as it drastically improves seeking. it makes it faster and more accurate.
>-t instead of -to because trim duration is more accurate than -t
also can use pathlib for input handling. better handling.
>>
I wish someone would groom me into learning mathematics
>>
>>108204715
make an unfairly hard game, and add cheating to it that depends on points that you can accrue by gaining mathematics knowledge.
This is obviously meta-cheatable by lying and saying "yeah I learned a bunch of stuff, bring me back to life", but that's so obviously cheating yourself rather than the game that it's a much easier feat of discipline to not do it. This is also avoidable by avoiding the game.
With open source games, or trivially hacked games (RPGMaker, RenPy, Twine), you can find something you already enjoy rather than create the game, but you'll likely need to make it more difficult. You can also add and remove personal challenges to unaltered and mainstream games.
>>
>>108204627
>>108204664
oh cool thanks!
>>
>>108205210
I have to charge my headphones now and will make some pasta. See your later!
>>
File: clj.png (321 KB, 3840x3840)
321 KB
321 KB PNG
>>108198981
>>
>>108205210
I dont quite understand what you meant anon, I just wanted to learn math so that I could learn lisp.
>>
>>108194628
I made a textboard.

Txtbrd .com
>>
>>108205720
>I just wanted to learn math so that I could learn lisp.
who told you you needed to know math to learn lisp? this is very wrong.
>>
File: GoogolMaps_En.jpg (1.35 MB, 4494x3179)
1.35 MB
1.35 MB JPG
>>108204715
Get into recreational mathematics.
>>
>>108205805
you dont? It had lambda calculus as the logo, so I thought it requires that level of math.
>>
>>108205894
you don't need to brace for learning like for a punch. Go start learning and see where you fall short.
>>
>>108205856
they don't know i have an oracle machine
>>
File: umigalaxy.png (1.87 MB, 3841x3685)
1.87 MB
1.87 MB PNG
>>108195511
Nothing technically impressive, but I'm creating a media tracker + forum
>>
File: 1759245212678638.jpg (31 KB, 455x439)
31 KB
31 KB JPG
>>108194628
Has she posted her klussy yet?
>>
>>108205907
I'll try then, thanks.
>>108205856
Thanks anon, this is interesting, I dont understand what all of that is.
>>
>>108205894
try to execute this and to understand this
#!/usr/bin/sbcl --script

(defun println (str)
(princ str)
(terpri))

(println (+ 1 2))

(defun add (a b)
(+ a b))

(println (add 1 2))

(let ((a 1) (b 2))
(println (add a b)))

(println ((lambda (a b) (+ a b)) 1 2))

(let ((mylambda (lambda (a b) (+ a b))))
(println (funcall mylambda 1 2)))

(defun make-add ()
(let ((a 1))
(lambda (b) (+ a b))))

(let ((myadd (make-add)))
(println (funcall myadd 2)))
>>
>>108206179
man what a clean language
OCaml needs so much more syntax, and a lot more parentheses:
let println (str) =
(print_int str); (* wtf ocaml! *)
(print_newline ())

let () = (println ((+) 1 2))

let add a b = ((+) a b)

let () = (println (add 1 2))

let () =
(let a = (1) and b = (2) in
(println (add a b)))

let _ = ((fun (a) (b) -> ((+) a b)) 1 2)

let () =
(let mylambda = (fun (a) (b) -> ((+) a b)) in
(println (mylambda 1 2)))
>>
>>108206259
You didn't make a closure / currying? This was the end goal of my little examples.
>>
>>108206259
just use Haskell
>>
>>108206179
Thanks anon, so its multiple ways of calculating and printing 3 to the terminal? Lisp looks so sleek.
>>
>>108206303
I didn't scroll down.
let make_add () =
(let (a) = (1) in
(fun (b) -> ((+) a b)))

let () =
(let (myadd) = (make_add ()) in
(println (myadd 2)))

>>108206309
I'm lazy enough
>>
>>108206179
I used to think lisp was cool because at first glance it looks like you're building a program by composing fewer and simpler primitives, just like muh emergent behavior physics. But when I looked into it it felt more like it had the same primitives as every other language, and just made all of them look similar by coercing them into the same form where everything is implicit and based on ordering.
I guess I got filtered
>>
>>108206397
Common Lisp has a (too) powerful object system, still entirely unparalleled macros (c.f. Let Over Lambda and On Lisp), a (too) rich (and anachronistic) standard library, a standard for that matter, a (too) powerful debugger, an OK module system, gradual static typing, and lots of very good implementations with fast native compilation. If you view languages through a lens that only admits unique features, then all Lisp has is some unusual macro ability, but if you look at the whole language in context, it's genuinely very good and still very competitive.
technically.
in terms of technology, it very competitive.
in terms of language design, Lisp gives up at almost at the outset and says "here are some parts, go design your own language that suits your problem", and every language like that ends up sucking. Language design needs more effort and a more rigid skeleton than this. Only language designs are excited by having to design the language alongside the program.
>>
>>108206042
Ordinals based on oracle turing machines can still be reasoned about. But uncomputable googology is kind of meh in general anyway.
>>
>>108198368

I'll take "what's __fastcall" for $100, please.
>>
>>108198981
>Pointers are fun. Memory management is fun.
Yes.
>>
>>108206397
>composing fewer and simpler primitives
That's one of the nonsense people keep vomiting. Lisp "primitives" are not primitives at all and stringing lambdas together to make basic features other languages have is a really bad way to program.
>>
>>108201829
for reasons unknown, troons are drawn to writing kernel-level GPU stuff.
>>
>>108206512
No, you moron. That's NOT what __fastcall is. __fastcall is yet just another ABI that uses registers for some parameters, but without the ability to set up *which* registers for *which* parameters. You cannot tell it to use EAX for the first, ESI for the second, EDI for the third, adn ECX for the fifth (the fourth parameter happens to be propagated and doesn't even need a register).
>>
File: 1746630671651242.png (1.06 MB, 1179x1828)
1.06 MB
1.06 MB PNG
>>
>>108206259
Why are you using the worst language in the ML family?
>>
>>108206259
https://ocaml.org/manual/5.1/api/Ocaml_operators.html
don't piss yourself in fear lispbab
>>
>>108208813
Is that Theo nigger trying to become a lolcow in programming and tech spaces or what?
First him seething at the ffmpeg community manager, on the same breath seething at lunduke for covering his seething, now playing pretend as if he's a prolific developer and not a fucking narcissistic youtuber.
>>
>>108208831
because it's the best language by far. SML is an aesthetic downgrade from OCaml when you get into the details of the language, like even record syntax, or mandatory parens on tuples. SML's also dead.
Haskell is only good for getting sucked up into your own ass solving non-problems unrelated to any task ever at hand, and even at this there are better languages.
The other MLs are irrelevant. OCaml has a superior module system, GADTs, superior type inference, even a good OOP system with structural typing and its own niche in the language, and a very good ecosystem and implementation. It's only initially jarring in the implications of full type erasure (no println!()) and in making sure that an Ariane 5 disaster never happens again (+. float ops)
>>
>>108208813
Theo is a faggot.
>>
>>108208864
well it got him views, no?
>>
File: 1763578374951261.jpg (37 KB, 680x383)
37 KB
37 KB JPG
>>108208875
>SML is an aesthetic downgrade from OCaml
HAHAHAHAHAHAHAHAHAHAHA
>Haskell is only good for
Stopped reading there. Nobody is fooled, you got filtered. Just say you're too retarded for it next time, thinly veiled cope just makes you look worse.
>>
File: redhat.png (615 B, 80x80)
615 B
615 B PNG
>>108209509
I have a good cock
>>
>>108209509
Look at records in SML. Actually write a significant amount of code in either language. OCaml is *only* off-putting at first.
>you got filtered
Have enough confidence in yourself to drop something's that bad instead of treating its badness like a test of your ability to cope with it. The point of a programming language is actually to write and maintain programs, and Haskell is bad at that. The difficulty that you're so satisfied by is artificial and pointless. People like you get one-shot by syndicalism and niche communist theory. In the past you would've dismiss Copernicus as "filtered by epicycles", only coming up with some simpler theory because he's too dumb for real astronomy.
Again, there are more impressive languages even for this, like ATS or Lean 4 - or BQN or K.
This post about dropping OCaml for Lean 4 is unintentionally a very good advertisement for OCaml: https://kirancodes.me/posts/log-ocaml-to-lean.html
>>
why is she so flat?
>>
I have been given divine intellect from God.
>>
>nano
>>
>>108209691
god said 'sports are homo. Tackle a horse'
>>
>>108209704
nice one.
let i = ref 1
let fizz = [|"Fizz"; ""; ""|]
let buzz = [|"Buzz"; ""; ""; ""; ""|]

let rec loop () =
Printf.printf "%d\r%s%s\n" !i fizz.(!i mod 3) buzz.(!i mod 5);
incr i;
if !i < 101 then loop ()

let () = if not !Sys.interactive then loop ()

this Nim is charming for making it a compile-time error to miss one of the cases, without an ADT:
func fb(n: int): range[0..3] =
int(n mod 3 == 0) shl 1 or int(n mod 5 == 0)

for i in 1..100:
case i.fb
of 0b00: echo i
of 0b01: echo "Fizz"
of 0b10: echo "Buzz"
of 0b11: echo "FizzBuzz"
>>
>>108209704
*randomly interprets \r as \r\n and fucks up the output*
>>
>>108210972
Sounds like a you-problem.
>>
>>108210972
Computers don't randomly do anything.
>>
>>108210993
it's random if i don't care to investigate the actual cause
>>
I keep cooming to AI porn, how do I stop this and focus progressing my project
>>
>>108211377
make it your project
>>
>>108207209
So why can't you adapt your assembly code to use the __fastcall ABI definition to interop with C code, why do need to chose the registers yourself? If you want that just make your own ABI or stay entirely in assembly with full control? Respect the ABI of external functions and use whatever you want for your own code.
>>
File: 1770195842852713.jpg (454 KB, 1600x900)
454 KB
454 KB JPG
>>108198981
I have unironically started making my own Lisp programming language.
When it's ready I will do all my hobby programming in it.
>>
>>108203675
It always ends like that, keeps forgetting my requirements and rules all the time, makes a bloated abomination that barely works, keeps getting worse the more I try to direct it to something better, then I get fed up and call it a useless piece of shit and write it myself in 1/10 of the lines of code. It's kind of a stress release valve to mock and insult the clanker though I have to say.
>>
>>108199882
>I miss when /g/ had a new meme project being shilled all the time in 2022
We could bring that back...
>>
>>108194628
I'd pound her klossy if you know what I mean
>>
>>108211691
what do you mean
>>
>>108211690
I have a kernel project almost finished, but not sure if someone would use it, it's single task and for ARM
I'm on my way to make a package manager and add a few more useful features
>>
>>108211813
total fluorite impregnation
>>
whats the best programming language?
>>
>>108194628
>cd code
>cd..
>pwd
>cd..
>cd ..
>ls
>cd code
>cd ..
>cd ..
>>
>>108212344
C
>>
>>108212344
Scheme (Racket).
Python if you are retarded.
>>
I'm building an app and working out the structure, what is good pratice.

So far I've got service classes, they all get the event/message bus, so they emit that a job's been done whenevr they do something.

Then my event handler class listens to the event bus and reacts to it to update the gui/reflect the changes.

So my controllers and then API can just own the service classes and use them as need be without worrying about the UI state.

IS there a "better" way or is this usually how its done in complex apps?
>>
>>108212621
Sounds like a bloated mess.
>event/message bus
So is it event based or message based? Because those are different approaches.
>an app
A what?
>>
>>108212645
event bus or message bus are same thing really in a app bus since your inclined its a sub and pub pattern. It publishes that it did something, then anything listening recieves the result of the publisher and reacts. It fires and forgets.
>>
Guys, DO NOT use AI.
It's purposefully gives you wrong answers all the time so that you keep buying their coins. No one in this world will ever tell me again that AI is good.
It's just a pure waste of time and a big PR hoax. Fuck them
>>
>>108212344
python if you're a gigachad and not the poor cuck that waste time. Life itself is dynamic
>>
>>108212360
>>108212376
>>108212719
im learning python how much time does it take to master it for earning something more than minimum wage... i have finished a bit of the basics on moocfi
>>
>>108212805
10k hours
>>
>>108212805
how long can a rat swim in water? https://en.wikipedia.org/wiki/Behavioural_despair_test
how long does an unwilling student to learn anything?
>>
>>108212805
>how much time does it take to master it for earning something more than minimum wage
Wrong mindset IMO, that's like saying "how much time does it take to master mathematics for earning something more than minimum wage", it's an objective that doesn't make any sense.
You shouldn't learn Python for Python sake, you should learn computing and programming in general through Python, if you do this correctly once you learn a language you know them all (maybe with the exception of manual memory management for which you should learn C).
I don't know if the resource you've been reading is good or not, but a mix of theory and practice is required for best learning programming in my opinion.
Start making small projects, start playing with algorithms and data structures by solving problems on codewars, read books.
>>
>>108212805
do BFS in python
pydantic
strict type checking
ruff
pylance
PEP best practices
design patterns
learn most of the common objects and types (features, advantage and downsides)

then you learn different language cause a lot of similar stuff carries over
>>
>>108212663
>event bus or message bus are same thing
No they are not.
Event bus broadcasts events (pub-sub simply allows to restrict broadcasting to subscribers) and does not care if they are received or who receives them, message bus allows for more granularity usually a message will have a destination (which might be also a queue shared by many therefore making it kind of like pubsub) and usually some sort of guarantees that the message has been delivered.
Furthermore events usually implies callbacks, with messages you can do things like sending them through a network for distributed systems.
Like if you want to learn what a message bus is try looking at RabbitMQ or something like that.
Anyway what kind of application are you even doing exactly?
>>
>>108194628
I've finally got around to poking with making a VST2 miniframework in C.
It's still half-baked currently. Criticism appreciated.

> files.catbox.moe/ajh5o2.7z
>>
>>108213194
Oh, for fuck's sake catbox...
>>
>>108213194
>7z
nice virus
>>
>>108206127
cool I like projects like this. what are you using?
>>
>>108213340
Dubious yes, but source also included.
>>
>>108194876
you made it, anon. you reached the peak. now into the drawer it goes, forever.
>>
>>108211615
>So why can't you adapt your assembly code
What the fuck are you talking about? Assembly code? We're talking about *telling the C compiler where to put certain parameters so that the code generator can avoid having to issue superfluous MOV/PUSH instructions on every single call*.

The moment you have to write actual assembly code the optimizer stops properly optimizing. We don't want that. So we want to tell the compiler where the callees draw their parameters from, so that it can properly generate calling code.
>>
>>108214853
I mean, that's what *we are* talking about here, right? __fastcall? Use of intrinsics rather than raw ASM blocks? Not that current optimizers would know how to properly optimize those as well, but at least there's the chance of future optimizations, right, at least those intrinsics are proper functions rather than impenetrable assembly blocks that the compiler is unlikely to ever be able to comprehend.
>>
>>108212705
>It's purposefully gives you wrong answers all the time so that you keep buying their coins.
It's not purposeful. It's just a profitable failure mode.
>>
>>108214620
>source also included.
that you can't access without decompressing a vulnerable archive format,
irrelavent answer
>>
>>108200581
It's free
>>
>>108215096
Until it's not.
>>
>>108208813
I don't follow
>>
>>108208813
What software did Theo ship?
>>
>>108215043
I live under a rock. Did I miss some big 7zip exploit?

In any case, have a zip file.
> files.catbox.moe/8xj9xo.zip
>>
>>108215163
he's shipped exactly as many programming languages on Jon Blow
>>
>>108215396
>>108215396
He shipped several game, that is real software. I don't know Theo thingy but judging by what he's saying I'd say he can't do shit.
Also, Blow actually made one PL. You can't take it away just because he hasn't published it.
>>
Months away from finishing a multi-year long term project and only now am I wondering if I spent my life time correctly.
I'm going to finish it anyway but holy shit this might have been a mistake and a huge waste of time for what I ended up creating.
>>
Is there some way to write good code, other than just think about it really hard each time? Is there something like a system or algorithm that I can use that will make it near impossible to produce bugs?
>>
>>108215665
What kind of project?
I've been working on an algorhitmic trading platform since three years, been making very slow progress lately and I have no idea if this will end up useful in the end, so I can understand.
>>
>>108215688
>since three years
For. It's either
>since <point of time, like "2023">
or
>for <span of time, like "three years">
>>
>>108215747
ESL website.
>>
>>108215688
I actually like any opportunity to talk about it but here I am reluctant to because I think it would identify me.
Despite never promoting it, I have double digits of people asking me about it and the status over the years.
It gives me motivation that at least 1 person besides me might find this valuable, and ultimately I want/need this anyway and I have become a very good programmer in the process.
My next project will not take years as a result.

>been making very slow progress lately
Sometimes it be like that. Especially if it's not a professional project.
I just have to work on this slog? Damn. I guess I might, sometimes. When I can.
>>
>>108215767
>excuse to stay mediocre
>>
>>108215747
Not in European English.
>>
File: IMG_20260222_235253570.jpg (2.75 MB, 3392x1944)
2.75 MB
2.75 MB JPG
i added theming to my launcher been refactoring all weekend too
>>
>>108216061
Eurodivergent English isn't English.
>>
>>108216066
>English men to Americans
>you're speaking english wrong!
>Americans to Europeans
>you're speaking english wrong!
>>
>>108216255
Even the Brits use since/for properly. You just suck at English.
>>
>>108216302
>You just suck at English.
That's what the English people tell the Americans.
>>
>>108216580
Sorry, the most correct English dialect is the one natively spoken by the most people, and the USA has 5x as many people, so kindly shut up and continue being irrelevant.
>>
>>108216609
The USA doesn't have 5x more people than English-speaking Europeans.
>>
>>108216622
>English-speaking Europeans.
What most Europeans are speaking isn't English though, so stop copeing.
>>
File: ss.jpg (2.05 MB, 3841x5654)
2.05 MB
2.05 MB JPG
>>108213382
NextJS for the frontend, nestJS for the backend, and postgresql for the database.
It was my first project doing backend and first time putting anything online by myself and setting up a VPS so it was a nice learning experience. I'm just hoping I didn't forget a security setting and my database isn't wide open for hackers.
>>
>>108216653
you're speaking to an Indian who is planning to surprise you with Indian demographics and spoken language.
>>
>>108201387
added and released a new version
>>
>>108216609
Hel yur brotha, we been yappin' tru freedum inglish. Yee haw heil trump.
>>
>>108216672
>English speakers in India: 130m
>English speakers in Europe: 210m
>English speakers in USA: >300m
Still coping
>>
So I was hired to modernize a legacy Java banking app with a small, long-term team. The app is painfully slow and dated. Surprisingly, my senior dev buddy supports updating it, but I want to ensure the rest of the team feels respected rather than forced.

My background is Next.js/TS. A friend in fintech loves Kotlin, and I’m considering pushing for that. I don't know the language yet, but it seems like the perfect middle ground since it is fully interoperable with their existing code and much easier for Java devs to adopt.
>>
>>108216727
>Kotlin
Bloatware.
https://www.youtube.com/watch?v=Q4VWCOgk6wc
>>
>>108216725
>>English speakers in Europe: 210m
>>English speakers in USA: >300m
300m != 5 * 210m, concession accepted
>>
>>108216784
>UK == Europe
Why would a European would think this?
>>
>>108216750
so rust?
>>
Is it fun to work through SICP or another project-based book like that? I knew Python five years ago and haven't written anything since. Need things to do to spend my time instead of continuing to waste away.
>>
>>108216823
nigger, what
>>
>>108216784
English is not *native* but learned secondarily in all but the 50-60 mil in Britain. 300/60 = 5
>>
>>108211813
What's the ram footprint and approx required clock speed for decent perf? Is it something I can put on an MCU?
>>
File: GNU-Hurd.png (333 B, 80x80)
333 B
333 B PNG
>>108217259
Linux is not an operating systems onto itself
>>
>>108217718
user@desktop:image_gen/ $ python3 gen.py
Enter image prompt: Linux is not an operating systems onto itself
Saved image to: outputs/somename_1771833411_fb24f10e.png
user@desktop:image_gen/ $ open outputs/somename_1771833411_fb24f10e.png
>>
File: buffer.webm (226 KB, 480x270)
226 KB
226 KB WEBM
I am back at doing stuff for my clock.
More colors and double buffering working.
Now some better coordinate mapping, then we need some shapes and then scaling up
>>
wtf is this split panel thing at the top of the code view in VSCode and how do I disable it
>>
>>108218564
nvm I found it. 'Sticky Scroll'
>>
VSCock
>>
VSBalls
>>
>>108218606
>>108218701
Code::Cocks
>>
>>108218879
Neocock
>>
File: file.png (65 KB, 810x891)
65 KB
65 KB PNG
>>108194628
Preface - I'm sorry, but I have never touched any computer code before. Tar and feather me if I'm out of line here, traipsing into your thread and potentially disregarding board culture.

But I have a desire to make my own open source computer program, in order to make something that behaves like Quizlet, but has a lightweight and portable feel to it like Anki or Wenbun. The impetus for this desire was after I used "elon.io" (goofy name).
>https://steemit.com/japan/@jalayn/a-review-of-elon-io-a-cool-and-free-website-for-learning-japanese-basics
I liked the concept as it was finally something I felt like I could use and enjoy at a pace I liked. It had automatic text-to-speech, it tracked all relevant data, but I disliked that all of my work is inaccessible locally. I was transcribing a Korean textbook by hand (picrel) into this sort of Quizlet-esque lesson form. This took a long time, and it's only the first unit. Imagine the sense of loss if I forgot my login or they change their pricing scheme after I've transcribed the entire thing. I want to be able to make sure all my work stays on my own computer, rather than become inaccessible due to circumstance.

TL;DR: I'm a programming noob that wants to turn a simple concept into a tangible computer program that I can start using for my own benefit as soon as possible. None of it is my own original idea, I just want to cobble together mimicries of already existing programs. Do you have any advice to spare for a beginner other than to buy a Python reference book and start throwing shit at the wall until something works?
>>
>>108219070
So you essentially want to make an offline clone of a web-based service. I would look into HTML, Javascript/whatever frameworks they're using, and re-write the thing so that it stores your stuff locally, in the browser profile.
>>
>>108219115
I will get some HTML and Javascript reference material and figure out what
>re-write the thing so that it stores your stuff locally, in the browser profile.
means. Thanks for translating my thoughts into words.
>>
dead forum
>>
dead forum, but unironically.
AI took their lives
>>
i'm a professional linux ricer and i've done K&R, now i need to learn python for my math major
how do i approach it? I've never really dealt with libraries just did some leetcode in C++
>>
>>108220084
just solve the problem at hand. Almost all languages are the same. It's just different syntax
>>
>>108220158
i've done fuck all programming i'm not used to using libraries at all as i've said i basically know just the syntax
like i want to use matplotlib but i dont want to go back and forth looking up functions all the time how would i approach this so i'm proficient in using it
>>
>>108220189
>dont want to go back and forth looking up functions all the time
but that's literally how it works. Unironically.
You just gotta figure our your workflow. Either your lib has good built-in docs and you can just get everything with LSPs or you have a reference sheet open in your browser.
If your work long enough with a lib you'll get to know it, but there is no way around the back and forth
>>
>>108220322
no it isn't unless youre a 1xer you're the type of retard who gets laid off
>>
>>108220850
okay. Enjoy your leetcode :)
Meanwhile my code is taking a ride on a train rn
>>
>>108220959
how the fuck do you get a job being this retarded i could totally do it
>>
File: akvua8.jpg (69 KB, 843x296)
69 KB
69 KB JPG
>>108220965
I just apply to the job, say "hi i am autistic", welcome abroad
>>
>>108221078
firm handshake
>>
>>108220189
Array languages are not bad, its only 20-40 primitives you chain together and they are all called in one or two ways mostly. Very easy to remember. I would try dyalog apl if you are working with data that mostly fits into arrays. I have the same issue with most languages. Too much looking shit up.
>>
File: 400.jpg (16 KB, 550x400)
16 KB
16 KB JPG
https://www.gingerbill.org/article/2026/02/19/choosing-a-language-based-on-syntax/

embarrassing
https://news.ycombinator.com/item?id=47075934

Concerning the article itself, I cringe at the fact the he prefered mandatory semicolons but that he changed it to optional semicolons to please some JavaScript faggots because otherwise they wouldn't use his language. Utterly spineless. If he had a vision for his language, it won't get realized.
>>
File: 1732753730402521.png (66 KB, 676x676)
66 KB
66 KB PNG
>>108222458
>otherwise they wouldn't use his language
These terms are acceptable.
>>
>>108222458
>cause direct fric -
tion.
>of a syn -
>tax decision
>more ex -
>perienced with programming and other programming languages, this senti -
>ment
I like a lot of this guy's design sense with Odin, but what is this psychopath doing here
>>
>>108198368

Generally any registers the caller doesn't want clobbered get put onto the stack. But the calling convention for most operating systems involves putting functions parameters into registers (and any that don't fit onto the stack) and the caller doesn't care if those get clobbered.
>>
>>108223057
... what are you *talking* about? Register preservation? We're talking about telling the compiler where to draw parameters from for a callee, or rather the inability to do so.

But, sure, let's talk about register preservation. Let's talk about how compilers don't even acknowledge const hints, to tell the caller that the parameter is never written to and can thus be reused, for subsequent calls with the same value - because that would require tracking which parameters were put into registers and stack memory from a previous call, which is yet another thing compilers are unexpectedly shit at *despite* over thirty-five years of C++ madness.
>>
>>108223154
>that would require tracking which parameters were put into registers and stack memory from a previous call,
Of course compilers track this. How would register allocation work if they didn't?

I don't know how other ABIs work but in function calls on linux x86-64, the argument registers are not preserved.
>>
>>108223225
>How would register allocation work if they didn't?
Now you're confusing function-wide register use with tracking values across function calls. The first one is ... well, I'd like to say "easy to do", but even clang has shown that they like to preserve RBP even though there's no fucking need to, but if anything this reinforces my point how compilers have no idea what they're doing - and that's *with* them being married to the ABI.

Speaking of which:
>the argument registers are not preserved
Read the last post again. And then again. And then again. Until you understand that declaring a parameter as const is a pretty good way to tell the caller that the callee rescinds its "right" to re-write the value, meaning it can be re-used by the compiler.
>>
>>108212705
Wait, people actually PAY to use those slop generators? Fuck that shit.
>>
File: 1000018606.jpg (111 KB, 1242x1221)
111 KB
111 KB JPG
>>108195022
This fucks me off no end. Having 36 effective cores, 90% of which do fuckall 90% of the time, and a graphics card that sits at 40% utilisation
And some fucking cocksucking pajeet will try and gaslight me "you need to upgrade saaaaaar XD"
fuck you
>>
>>108223548
This is why you need to learn to program, so that you are less dependent on the incompetence of others.
>>
File: 1000021083.jpg (3.16 MB, 3000x4000)
3.16 MB
3.16 MB JPG
>>108223579
I'm a fabricator and already overwhelmed by the incompetence of others
>>
>>108223548
Think of the analytics those cores could be doing
>>
>>108223548
Spread the message.
>>
Does anyone here remember the old 4chan /prog/? Thats what I'm trying to do currently. I can't even find screenshots of it though. I remember you could post ASCII art, but that's about the only feature I remember.
>>
>>108223345
>Now you're confusing function-wide register use with tracking values across function calls.
I don't, but the thing is that this would require big changes to compilers. Most the optimizations work on individual functions and currently register allocation is done on individial functions afaik. To do what you want, you would need information from interprocedural analysis while doing code generation. The code generation would need to be orchestrated by an algorithm that would look at the function call graph.

I'm pretty sure the Pass Manager in LLVM is already orchestrating analyses and optimizations based on the function call graph, and code layout optimzations need to look at the call graph so if orchestrating the code generation based on the call graph would be a logical developpment, supposing it's not already like that.

>declaring a parameter as const is a pretty good way to tell the caller that the callee rescinds its "right" to re-write the value, meaning it can be re-used by the compiler.
That's not how it works, that's not what "const" express. "const" acts on values and local variables at the IR level, not on the hardware registers. You could make a language where this is what "const" would mean but in C it's not that strong.
>>
>>108219070
>>108219277
The general structure of a modern app is a "client"/"frontend" (think webpage or mobile app) that displays data and then a "server"/"backend" (typically operated by the software vendor) that it communicates with to basically store and retrieve information. What the other anon was saying is that your idea is more or less to reverse-engineer the frontend, and then instead of storing your data on Quizlet or whoever's server, store it on your own system. If you go with a web app (HTML/JS), then you can make use of certain commands to store data in the browser (this is what "cookies" are). Hope this helps fren
>>
>>108223821
>I don't
Yes you did.

>this would require big changes to compilers
SO FUCKING WHAT? >>108223154
>*despite* over thirty-five years of C++ madness.
How much more time do you need, hm? Another thirty-five years? A hundred? A different compiler altogether? What the fuck is clang all about, then?

Or maybe just a triple-digit IQ? I can provide that one, don't you worry none.

>you would need information from interprocedural analysis while doing code generation
... dude. The compiler already tracks if you write to a const value and emits an error message during function compilation. Literally the only thing the compiler has to look at is the signature, which it ALSO keeps track of because of type safety.

>That's not how it works, that's not what "const" express.
This is how that works (especially for the stack), that's how it should've worked from the very beginning, and even if you get some language lawyer to successfully argue against it (eat my fist and sue me): compiler builtins.
>>
>>108200839
i like the answer and all, but... while i would love to have it all locally, it is not like local GPU usage does not consume electricity. if anything as we have seen with crypto, it usually leads to even bigger problems.
>>
>>108222458
This dude is:
>BRO SYNTAX MATTERS SO MUCH ALGOL IS THE BEST
>BRO SYNTAX DOESN'T MATTER JUST ACCEPT MY EMPIRICALLY TESTED LANGUAGE QUIRKS
gingerbill, king of midwits.
>>
>>108223900
it's called NUANCE
you wouldn't get it
except for sometimes when you'd get it
>>
why do these cocksuckers at leetcode like their bit manipulation questions so much? most useless shit ever
>>
File: file.png (57 KB, 579x531)
57 KB
57 KB PNG
How true is this?
>>
>>108224065
holy nocoderism
>>
File: file.png (568 KB, 610x973)
568 KB
568 KB PNG
>>108194628
reminder she looks like a troon now
>>
>>108224132
still would
>>
>>108224112
>Fast like C
>Modern C++
Lol
Lmao
>>
>>108224227
C++ nearly always beats C on any chart ever shown. I'm just going to ignore your uncolored nigger babble. A retard who can't even put their code into Vim or a text editor to make it easier to read doesn't get an opinion.
>>
>>108224132
looks like a wood elf
>>
>>108224112
>Productive like Python
Only productive for small programs. When a program becomes large enough, the absence a strong static typing makes them unproductive.

1) static typing catches bugs
2) without static typing you force yourself to add manual type checks everywhere
3) types put the focus on data types as it should be and it enables proper abstractions like type polymorphism, function overloading, classes/abstract classes/interfaces, type classes, etc...
>>
>>108224284
Thank you for the non-schizo answer. What's your take on Typescript then?
>>
>>108224270
>sees the evidence right in his face
>denies it anyway
OK, autist.
>>
>>108224338
I'm not denying anything, I'm not reading your low quality schizo post.
>>
>>108224349
Whatever you say, autist.
>>
File: 1686508999225177.png (482 KB, 1246x862)
482 KB
482 KB PNG
>>108224284
That critique doesn't work anymore, Python has static typing (and strong typing ofc), which you can directly have in your text editor through LSP.
Python only problem is performance, but it doesn't matter for most software.
>>
Retards getting btfo'ed by our very own resident schizo will never not be funny.
>>
>>108224112
>But simpler than all three.
is where this gets hard. Fast + productive has been an option for mode than a decade. Some languages are dragging ass on a good concurrency and parallelism story, but that's common as well.
>>
>>108224279
would elf
>>
>>108224296
What about it? It's a webshitter language, it compiles to JS, no thank you. It doesn't look really impressive in terms of type system or abstractions, and pparently it has "any" which disable the type system or something?

>>108224378
Bullshit.
>which you can directly have in your text editor through LSP.
If it's not in the compiler it's not static typing.
Also you can't really have static typing in the first place if the language does late binding.

>Python only problem is performance
No. see >>108224284
No metaprogramming, abstractions are a joke, no type safety.
>>
>>108224382
The answer was GO btw
>>
>>108224566
>Go
>Fast like C
AHAHAHAHAHA
>>
>>108224571
probably feels that way to someone still talking about Python at all
>>
>>108224518
>Bullshit
If you cannot accept reality it's not my problem.
>If it's not in the compiler it's not static typing.
Said who?
Static typing has intrinsically nothing to do with compilers, the type checker just happens to be inside the compiler in compiled languages because it allows it to do certain kinds of optimizations, but in an interpreted language (well to precise Python is compiled to Python virtual machine code and only then is the machine code interpreted) it can be a separate component.
>Also you can't really have static typing in the first place if the language does late binding.
This is completely false, static typing and late binding are orthogonal.
Static typing means types are checked before runtime.
Late binding means that name lookups happen at runtime.
The implication is that there is a small number cases where the soundness of a program written in a dynamic language cannot be completely proven before runtime, like for example when you eval a user inputted string at runtime, or in general when you mutate the bindings at runtime, but these are edge cases, you can absolutely prove the soundness of a Python program before runtime as long as you are aware of this.
In exchange you can express more things in a dynamic language than in a static language, basically you get the best of both worlds.
>No metaprogramming
It has things like operator overloading and descriptors.
But I concede that it doesn't have macros.
>abstractions are a joke
You can express the same abstractions as any other language.
>no type safety
You have type safety in Python as said above.
Python has both strong typing, as for example a = 1 + "1" will give an exception in the interpreter, and static typing as for example a: int = "1" will give a type error in the static type checker.
>>
>>108224227
What book do i read to understand this breakdown?
>>
>>108224673
tl;dr he is a wintard since he mentioned the WriteConsole syscall, therefore his opinion can be safely ignored
>>
I was looking if any schools near me have C++ specific degrees and what the fuck kind of course is this?

>C++ with Ai assistance
https://careertraining.laniertech.edu/training-programs/c-plus-plus-course-with-ai-assisted-coding/?Category=computer-science
>>
>>108224707
retards have FOMO for AI, even though if AI is worth anything, you should always be able to catch up completely on using it just by asking it "how should I use AI like I've been swilling the hype all this time?"
>>
>>108224684
>WriteConsole syscall
Nice way to out yourself as a retard, dumbass.
WriteConsole is NOT a syscall.
>inb4 I wouldn't know, I don't program for such a toy OS
OK, autist who belongs in a cage.

>>108224673
>books
>>
>>108224752
>autist that belongs in a cage
I'm sure that the decade that you still live in is much better than ours, but Windows means "Windows 11" and it's more humiliating to defend such a thing than to abandon it. Go use OpenBSD if you don't want to submit to Linux
>>
File: 1759222677804143.gif (1.87 MB, 354x450)
1.87 MB
1.87 MB GIF
>>108224752
I wouldn't know, I don't program for such a toy OS.
>>
>>108224772
Sorry, but unlike most autists I program for people. Paying people, that is.
>>
>>108224518
Here we go.

>Static typing has intrinsically nothing to do with compilers
It needs to know the type of integers to know how to compile arithmetic operations (integer vs float), arithmetic comparisons (signed vs unsigned), bitwise shifts (shift logical vs arithmetic), both local variable and memory load/stores (width), array load/stores (size of array elements), struct load/stores (offsets), function calls (values can be places in different registers depending on their type, or be places on the stack if there are sufficiently enough arguments), etc, etc... This also applies to the optimizing compiler because it needs to partially evaluate the program.

The compiler proper (AST to CFG/IR/bytecode), optimizing compiler, instruction selector, register allocator and the assembler need to know the machine types.

>but in an interpreted language [...] it can be a separate component.
That "it can be a separate component" is only true for dynamically typed scripting language because their compilation if half-assed, so this isn't not saying much really.
Interpreted language can be statically typed so it's not inherent to interpreted language.
>>
>>108225032 cont
>>108224518
>>Also you can't really have static typing in the first place if the language does late binding.
>This is completely false, static typing and late binding are orthogonal.
True, but in the case of Python, you can rebound a variable or function with a different type than the original one.

>In exchange you can express more things in a dynamic language than in a static language,
Absolutely not. A static language can do everything a dynamic one can, you just have to write explicitly some code that would be implicit in the dynamic language. Even eval(). Nothing says that a static language can't compile at runtime.

>But I concede that it doesn't have macros.
Yes exactly, or even regular compile time execution which wouldn't create an AST.

>You can express the same abstractions as any other language.
No. Python doesn't have sum types, type polymorphism, abstract classes, and things like that.

>You have type safety in Python as said above.
But you that it was the LSP, so not Python.

It's true that non-static strong typing gives you type safety in the literal sense, but it's *much* weaker than a statically strong type system because with the former you can run your program and you don't know wether it will fail midway because of a type error or not. So it's better than implicit conversions but only slightly, it reality it sucks. There is no reason to have something inferior like that.

>Python
>soundness
lol lol lol. It's time to cut umbilical cord.
>eval()
>mutating binding at runtime
so much for static typing. so much for late binding.
>>
>>108225032
>>108225039
whoops, for >>108224635
>>
File: 1711850335226046.jpg (1.22 MB, 2748x4096)
1.22 MB
1.22 MB JPG
>>108225032
>>108225039
>It needs to know the type of...
Yes as I said usually the type checker is inside the compilers because it's useful to have it there for doing the compilation and optimization, but it doesn't have to necessarily be that way.
>That "it can be a separate component" is only true for dynamically typed scripting language because their compilation if half-assed
You seem to think that compiling means necessarily that you have to compile to x86 or to ARM or to a CPU instruction set in general, but these are just specific cases implemented as hardware of what are abstract machines, there is nothing "half-assed" about compiling for the instruction set of a virtual machine, in the case of Python it's a stack virtual machine, you don't need types for this kind of compilation because the VM operates on boxed objects and it's completely type agnostic and dispatches operations through the object's own type slots at runtime, for example when you add two numbers how they are added is determined at runtime based on the __add__ method, it's a different execution model but it's not incompatible with static typing and the "scripting language" label is meaningless, it's not even that different than say Java or C# in the end.
>>
>>108225032
>>108225039
>in the case of Python, you can rebound a variable or function with a different type than the original one.
Yeah, normally in Python variables don't have types, it's values that have types, it's the same as Lisp or Lua or whatever other high-level language.
On top of that type annotations give also a type to the variable.
>It's true that non-static strong typing gives you type safety in the literal sense, but it's *much* weaker than a statically strong type system
Python has a statically strong type system though, you can prove before runtime that you won't ever get type errors as long as you annotate all variables and all function signatures unless you mutate the bindings at runtime, basically to make it simple if you program in typed Python the same way you program in C you will have equivalent statically strong typing.
>A static language can do everything a dynamic one can
With a runtime, yes, without it, no. You would need as you said to ship the compiler with the program, or to write your own virtual machine and parser and interpreter.
>Python doesn't have sum types, type polymorphism, abstract classes
It has all three though?
The type Union[A, B] or just A | B is a sum type. And you can also do parametric polymorphism. (although it's worth noting that these are for static type checking only)
The abc module in standard library is all about abstract classes.
>But you that it was the LSP, so not Python
It's supported in the language from version 3.7, also it's not the LSP that type checks, LSP is just a protocol to make tools comunicate with the editor, it's the type checker that actually type checks.
>>
File: kk.jpg (224 KB, 1583x2374)
224 KB
224 KB JPG
>>108209691
Pregnancy upgraded her to mosquito bites.
>>
>>108223821
Oh, and also:
>you would need information from interprocedural analysis while doing code generation
Inlining.
>>
>have to wait another 8-10 months for jai compiler
>then another 1-2 years for 1.0
>then another 5 years for all of the issues found through mass adoption to get worked out
I want better C, and I want it NOW (don't @ me ziggers)
>>
>>108212350
What a slut.
>>
>>108212350
Still a better programmer than 99% of nu/g/shitters.
>>
You're trying too hard.
>>
>>108225241
>You seem to think that compiling means necessarily that you have to compile to x86 or to ARM or to a CPU instruction set in general
No, I don't. It's the same problem when compiling for a bytecode VM designed for a statically typed language. You NEED iddfferent operations for integers and floats, different comparisons for signed and unsigned etc.. This is true for the JVM for example.

>Yes as I said usually the type checker is inside the compilers because it's useful to have it there for doing the compilation and optimization, but it doesn't have to necessarily be that way.
Like I said. A whole lot of operations are compiled differently depending on the type. Types are not just for type checking.

>there is nothing "half-assed" about compiling for the instruction set of a virtual machine
I specifically said it wasn't about interpreted language but about dynamically typed language.

Yes "half-assed" doesn't really mean anything but I gave you plenty of examples that shows that types are not just for type checking. Just because this doesn't apply to shitlangs like Python doesn't make it less true.
>>
>>108225394
Odin, C3, D with Joka or BetterC, Nim, Nelua, V
there are drawbacks to each, and none of them feel like 1.0 no matter how old some of them are, but you can use them now.
>>
>>108225394
>trusting vidyatards
You have better chances making your own C-like language.
>>
>>108225394
also if you enjoy Zig's new political-lolcow direction and just don't like the language, there's Hare
>>
>>108225639
Buy an ad Drew.
>>
>>108225250
>"scripting language" label is meaningless
Come on, everybody understands this to mean a dynamically typed GC'ed interpreted language.

>you can prove before runtime that you won't ever get type errors as long as you annotate all variables and all function signatures unless you mutate the bindings at runtime
and what you can't prove is that the program WON'T run into a type error. Statically types languages guarantee that the program is well types AND that it won't stop in the middle of it's execution because of a type error.

>You would need as you said to ship the compiler with the program, or to write your own virtual machine and parser and interpreter.
That's for compiling at runtime, ie have something ""equivalent"" to eval(). Even then you could have special language feature to avoid having to parse yourself the program you want to compile, like reusing the quoting mechanism that you'd use for macros.
But concerning the other features of dynamic languages, like late bounding and dynamic typine, those are trivial to replicate with very little code.

>It has all three though?
Maybe, but given that it's not statically typed, with each layer of abstraction comes the possibility of bugs. WIth a statically typed language you can have 10 layers of interfaces and if it compiles it will be fine. I wouldn't attempt this in a scripting language.

>It's supported in the language from version 3.7, also it's not the LSP that type checks, LSP is just a protocol to make tools comunicate with the editor, it's the type checker that actually type checks.
If it's optional it means it doesn't have the benefits, like correctness and performance.
>>
>>108225678
>Statically types languages guarantee that the program is well types
*that the entire program is well typed
dynamically and strongly typed languages doesn't give you this guarantee, just that the execution won't evaluate "mis-typed" operations or something
>>
>>108225678
>dynamically typed GC'ed interpreted language
no Lisp is a scripting language, not even Emacs Lisp. Erlang is not a scripting language. Java and Smalltalk and HyperCard are not scripting languages.
Scripting languages are genre rooted in a specific time and context, like a genre of music, with awk, tcl, perl, and friends. This was a very strange period and it doesn't much resemble the current period, except in this respect: scripting languages were used to create lots of unmaintainable slop, to call that productivity. We're getting that again today.

>Python python python
fuck Python, how do either of you even care about this thing anymore. Go look at Crystal which is a dead and sad language, but at least a faithful try at getting a static-typed language to feel like Ruby.
>>
>>108225394
>I want better C, and I want it NOW
C++ has existed forever grandpa calm down
>>
>>108225745
>C++
>better C
HAHAHAHA
>>
>>108225678
>you can't prove is that the program WON'T run into a type error
Show me a typed Python program that causes this, without mutating bindings at runtime (no eval, etc) and without using typing.Any or typing.cast (everything properly annotated). You will see for yourself that it's not easy to prove what you're sating and that you in fact get actual proper static typing guarantees.
>>108225734
>Lisp and Python are a scripting languages
>but Erlang and Smalltalk are not
Lol, completely arbitrary.
All general purpose turing complete languages are programming languages, the term "scripting language" doesn't mean anything.
>Go look at my meme language
Nah.
>>
>>108225394
here's the FizzBuzz from this thread in V:
const output = ['', 'Fizz', 'Buzz']

fn main() {
mut i := 1
loop:
println('${i}\r${output[int(i % 3 == 0)]}${output[2 * int(i % 5 == 0)]}')
i++
if i < 101 {
unsafe {
goto loop
}
}
}

string interpolation really helps here!
>>108225824
please put more work into reading. There's a "no" and a "not" around the "Lisp".
"Scripting language" is a not a pejorative that's functionally a synonym of some other term while conveying that the speaker doesn't like the thing. Nobody spoke like this 20 years ago (except in more obvious forms: "MicroShaft", "Micro$oft"). It's actually how these languages were marketed and what drove their popularity.
>>
>>108225734
>no Lisp is a scripting language, not even Emacs Lisp
then how do you categorize them?
>Erlang, Smalltalk
fair enough
Java is statically typed

>Scripting languages are genre rooted in a specific time and context, like a genre of music, with awk, tcl, perl, and friends.
Fair enough but whatever you call perl, it also applies to python, ruby, php and javascript in my book. Since they have roughly the same language characteristics and features.

>Python, how do either of you even care about this thing anymore.
I sure don't

>>108225824
>Show me a typed Python program that causes this, without mutating bindings at runtime (no eval, etc)
Why? Real Python program do this kind of stuff.
>>
>>108225778
Yes, C++ is better. That's why it's used pretty much anywhere professional where performance actually matters. How often do you see C used in performance critical areas?
>>
>>108225875
OK, autist.
>>
>>108225918
I accept your concession little nigger boy.
>>
There is no concession, there's only your mental condition that should've yielded you a lifelong stay in a cage.
>>
>>108225394
what features do you want?
>>
File: 1768209152550324.png (195 KB, 518x595)
195 KB
195 KB PNG
>DataContainer.main global variable
or
>initialize a datatcontainer when the app starts
>pass it around all the different views through environment variables and functions
>>
>>108224112
obviously it's Pascal
>>
File: Textboard (1).png (130 KB, 768x1009)
130 KB
130 KB PNG
ahh finished it. progchan.com and I think its basically working how I remember. I ripped out the kahera theme for html and css. actually the themes are pretty ugly I gotta work on that.
>>
File: 1768785921674556.png (83 KB, 755x551)
83 KB
83 KB PNG
>400 lines for this
I am slowly losing my shit trying to integrate claude more into my workflow because 90% of the time it's quicker to just do a google search
>>
>>108226425
Enjoy your 90% (in benchmarks).
>>
>>108226425
also, here's the actual code (which I got from google):

extension EnvironmentValues {
@Entry var customDismiss: () -> Void = { }
}


SomeView()
.environment(\.customDismiss, doSomeShitFunction)


class SomeView {
@Environment(\.customDismiss) var customDismiss

func dismissView() {
customDismiss()
}
}


fucking absurd
>>
File: cff.png (65 KB, 625x626)
65 KB
65 KB PNG
>>108223540
>(You)
Yes. They somehow keep me motivated, yet they frustrate me a lot
>>
>>108223891
>Yes you did.
Then maybe you need to read my post again, and again, and again.

>Literally the only thing the compiler has to look at is the signature
Yes it would work but it wouldn't necessarily be an improvement.

Even if const has the semantics you say it has, ie preserving the register argument that have a const type, this is not part of the ABI. It doesn't break the ABI either but it is a constraint and compiling functions so they respect this introduce a little bit of register pressure.
If the callee has many variables/temporaries it is going to spill that register and then reload it before returning (forbiding to spill it would create to much pressure, it would stupid), which was what you wanted to avoid in the caller in the first place.
If the callee must spill and reload to preserver the register, and if the caller use that preserved register, this is neither better or worse than if the caller has saved the register before the call and reloaded it after it returned. But if the callee reload the preserved the register and the caller doesn't even use it then it's a net loss.

Hence the interprocedural analysis to make sure it's worth it.
Furthermore, the arguments to be preserved may have been shuffled in the callee and the caller could know where they end up and this would avoid a few register-register moves.
Furthermore, this is the only way to be even more aggressive and make private functions use custom ABIs. Isn't it what you want? By definition, this kind of optimization requires context-sensitivity in the sense of function call graph.

>that's how it should've worked from the very beginning, and even if you get some language lawyer to successfully argue against it
Nevermind C's semantics. "register" of all things hasn't been working for decades, it's incredibly optimistic to think you can cleverly use "const" to enanle custom ABI calls optimizations.
>>
*to enable custom ABI calls optimizations.
>>
>>108226602
>Then maybe you need to read my post again, and again, and again.
I did, and you did.

>Yes it would work but it wouldn't necessarily be an improvement.
So now we're at the goalpost-moving phase? And yes, it would absolutely be an improvement. Heck, compilers don't like to clobber parameter registers *anyway*, because guess what, that would require tracking the last use of said parameter, which compilers are unexpectedly shit at - if a register gets clobbered, then it's because the callee calls another function with another parameter.

class x
{
public:
void y(void) const;
void z(void) const;
};

void foo(void)
{
const x X;
X.y();
X.z();
}


push   rbx               # Preserve RBX
sub rsp,0x30 # Retarded ABI stuff
lea rbx,[rsp+0x2f] # Create object on the stack
mov rcx,rbx # Place object into the first parameter register.
call 12 <_Z3foov+0x12> # Call
mov rcx,rbx # Place object into the first parameter register *AGAIN*.
call 1a <_Z3foov+0x1a> # Call
nop # ??? Padding doesn't explain it, the instruction is already at 0x1A.
add rsp,0x30 # Retarded ABI stuff
pop rbx # Restore RBX
ret


So don't give me that type of bullshit.

>this is not part of the ABI
Boo hoo. Stop being married to the fucking ABI. If a function wants to change the ABI it should be allowed to do so, at least in controlled ways. Everything else are fucking excuses by incompetent clowns.
>>
>>108226634
And by
>If a function wants to change the ABI it should be allowed to do so, at least in controlled ways
I mean: in the signature. Not randomly, but in a way that any caller can see how the function wants its parameters to look like, and what promises it makes with regards to clobbering. Obviously the ABI is important, but that doesn't mean it should be static and never-changing.
>>
>>108226634
>So now we're at the goalpost-moving phase?
Half right. I thought you were talking about custom ABIs in your earlier post, but you were only talking about const.
>>
File: constprop.png (11 KB, 900x280)
11 KB
11 KB PNG
>>108226673
Dynamic ABIs. Have a baseline, but allow changes to it. Heck, allow the compiler to make changes to it during propagation.
>>
>>108226774
>>108226774
>>108226774



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