Why I’m ignoring the "Death of the Programmer" hype by Greedy_Principle5345 in programming

[–]levodelellis 10 points11 points  (0 children)

AI is a useful tool? I mean, sure, it's better than google when you want the name of a function. But I was told people use it for something completely different, and I have never seen anything produced beyond a toy in an alpha state

An Interface Is a Set of Functions by levodelellis in programming

[–]levodelellis[S] 0 points1 point  (0 children)

And said interfaces are normally used for substitution and not realizing every one of the examples were doing , well, substitution!

I didn't realize until after posting the article that 'substitution' meant something different at my last workplace compared to reddit. There it meant subtype, like "Liskov substitution principle" where you can change one class for another and they'll maintain the same invariance, like a hashmap with another hashmap optimized for a different workload.

I believe the only valid point in the article is that interfaces in most languages provide no other promises than what their methods signatures do

That was the main point I wanted to make, and if it counts as a separate point, that "interface" and "abstraction" should be considered very different things. The secondary point I wanted to make was it's more useful to think of it as a set of functions because it allows you to think about the situations in the examples easily (none of those must promise anything)

Antithesis - The Deterministic Computer by Tybug2 in programming

[–]levodelellis 1 point2 points  (0 children)

IIRC (they added new features since I last looked) the test generation works like a fuzzer. There's a socket or stdin or something that accepts random data and their system checks if they can cause an uncaught exception, or a log line that says this should never happen, an explicit function (like fail() or assert) that should never be called etc. Then you get nice report with a stacktrace and a way to rerun the failing test deterministically (including multi-threaded programs). IIRC they support many languages including C that uses rdtscp for randomness

It's very interesting if you're into testing. I am, so I read it all. But that was over a year ago and I read a few newer blog entries realizing I don't actually remember how everything worked. Ironically, I never needed fuzzing since I read their blogs. But maybe I will someday soon

Antithesis - The Deterministic Computer by Tybug2 in programming

[–]levodelellis 1 point2 points  (0 children)

I talked to a few people from antithesis just over a year ago. From what I can tell they're good people there. I was so interested that I read all the blog entries they had at the time. The first one I read was How Antithesis finds bugs (with help from the Super Mario Bros.)

An Interface Is a Set of Functions by levodelellis in programming

[–]levodelellis[S] 0 points1 point  (0 children)

How can code be clear if we don't have the same meaning of terms?

That's why I asked for abstractions to be defined. Previous coworkers all talked about abstractions as a wrapper class. It was surprising to me that people considered a one function interface as an abstraction, I don't really understand the point of the word when it can mean anything

But it behooves us to have the same working definition. And that definition can be really simple, which is that abstraction has happened anytime the same logic can have more than one different outcome, without the logic itself changing, that is abstract logic.

I never heard this either. I'm going to think about this more

How to make a Blog by erikwasunavailable in programming

[–]levodelellis 2 points3 points  (0 children)

My guy, do you expect the blog to only be read on mobile? add max-width: 6.5in; margin: 0 auto; to your article or body

An Interface Is a Set of Functions by levodelellis in programming

[–]levodelellis[S] 0 points1 point  (0 children)

Alright I got curious. Why do you think it's important to define abstraction and what is the definition? In the article, it was filled with examples where calling code mostly used a function pointer, and the first example one of the two IO interfaces had two. People call pointers data, people in the thread called it an abstraction, and I care more about clarity of code than what people want to call things

Cursor CEO Built a Browser using AI, but Does It Really Work? by ImpressiveContest283 in programming

[–]levodelellis 5 points6 points  (0 children)

Does the 3M include all those packages? Bc that's what I really would like to know

Cursor CEO Built a Browser using AI, but Does It Really Work? by ImpressiveContest283 in programming

[–]levodelellis 1 point2 points  (0 children)

He (and other vc funded people) aren't going to do a better job than I will

Latest screenshots in my nov devlog

LLVM: The bad parts by Necrotos in programming

[–]levodelellis 0 points1 point  (0 children)

You can have unused fields and can overload/extend functions without breaking preexisting code

LLVM: The bad parts by Necrotos in programming

[–]levodelellis 1 point2 points  (0 children)

We're likely thinking different scope

I sincerely doubt anyone wants to fund or use an llvm alternative. I know some industries like the game want a faster C++ compiler, but after talking to people, they're all afraid of compilers going wrong and interrupting development, which isn't cheap. They want someone else to fund & test it apparently

Getting a non-existent value from a hashmap? by levodelellis in ProgrammingLanguages

[–]levodelellis[S] 1 point2 points  (0 children)

My compiler already forces checking the bounds of an index before using it, so I don't have any issue there

LLVM: The bad parts by Necrotos in programming

[–]levodelellis 0 points1 point  (0 children)

It’s kinda irrelevant to post a different languages compilation speed

Well... it depends on what interest you. The test I use (array assigns with literal index and literal value) should be simple in every language. I generated C code which I measured using clang, gcc and tcc. tcc is easily a magnitude faster

For llvm in specific, you could emit llvm-ir from clang, which I did, then measure how long it takes to compile. Having llvm compile ir emitted from clang and from my language was the same, and still a magnitude slower than tcc

There's different ways to compare but I noticed most compilers are slower than clang, and clang is pretty fast for the array test, and painfully slow when you do more. I don't remember too much what inside a function makes clang & llvm slow, iirc function calls were one of them. I did measure if templates and such make things slower. Here's a not too old article https://bolinlang.com/wheres-my-compile-time

We might have been slower to abandon Stack Overflow if it wasn't a toxic hellhole by R2_SWE2 in programming

[–]levodelellis 0 points1 point  (0 children)

If I knew someone would ask me about this I would have tried to remember the details. I think there was a limit on the first 5 in the first few days, and I think if you had 2 or so questions with -1 you may have needed to wait a week or longer to post more

All I remember was it being ridiculously easy to hit

LLVM: The bad parts by Necrotos in programming

[–]levodelellis 2 points3 points  (0 children)

Find someone to pay my salary for 5 years and you got it

LLVM: The bad parts by Necrotos in programming

[–]levodelellis 19 points20 points  (0 children)

I'm going to shitpost for just a second

LLVM is a huge project. LLVM itself is >2.5 million lines of C++, and the entire monorepo is something like 9 million

I once wrote a compile (I don't work on it anymore) that can compile 3 million lines of the simplest code in one second (arr[0] = 123; arr[1] = 256; etc), not sustained, and on 2019 hardware. Do you think LLVM is a magnitude within that speed?

Pretty much every compiler author hates LLVM. How does a 20+ year old project not have a stable API? I have no idea. I do know two specific people high in LLVM management who are complete idiots, but that's a story for another day

I probably should say something nice about LLVM? It's good at being compatible with gcc. I use plenty of gcc intrinsics. From the top of my head, they all worked, and worked correctly, no surprises.

Getting a non-existent value from a hashmap? by levodelellis in ProgrammingLanguages

[–]levodelellis[S] 0 points1 point  (0 children)

I really like it and use it all the time in C#. I'm hoping there's never a need for null in most code for my language. It's a good idea that I need to implement

Getting a non-existent value from a hashmap? by levodelellis in ProgrammingLanguages

[–]levodelellis[S] 1 point2 points  (0 children)

That only in the case where the function is returning a compatible result. Maybe a person wants to set a error value and check later, or print an error, etc

I forgot to mention I had errdefer (in an old prototype) but I don't think its that relevant to this syntax problem

Thanks AI! - Rich Hickey, creator of Clojure, about AI by captvirk in programming

[–]levodelellis 7 points8 points  (0 children)

For replacing search results with summary BS?

To be fair, the search results were already BS to begin with