HNHacker News
TopNewBestAskShowJobs

hota_mazi

2,724 karma · joined May 30, 2016

submissionscomments
hota_mazi··on Kotlin Coroutines vs. Threads Performance Benchmark
That's really not the conclusion, and not something you should seriously do.

The rule of thumb should be:

- Is your task CPU bound? Put it in a thread pool.

- Is your task spending most of its time waiting (e.g. network call)? Use a coroutine

hota_mazi··on Richard Stallman reveals he has cancer in the GNU 40 Hacker Meeting talk [video]
> I'd say he's known for Linux

Er... what?

He's known for forcing the name Gnu to be appended to Linux because of some wildly exaggerated claims of ownership.

We're talking about rms, not Linus.

hota_mazi··on Java 21 makes me like Java again
Go gives you the illusion of simplicity because it gets rid of guard rails and error checking. If you remove all error checking, of course your code is going to look a lot simpler. It's also going to be a lot more wrong and crashy.

Wait until your code base grows, your team grows to >10 developers, and you will understand what I mean.

Java (and preferably Kotlin) are a lot more serious about making sure your code is robust before it compiles.

hota_mazi··on The History of Windows 95
I was a big Amiga fan back then, and I think for a long time, it was a superior machine to pretty much anything else (preemptive multitasking, multi chips, great graphics and sound, etc...).

In 1995, I booted Windows 95 for the first time and as soon as I saw it, I immediately thought "That's it, game over for the Amiga. Windows has won".

It looked gorgeous, was reasonably fast, featured preemptive multitasking (10 years after the Amiga...).

I sold my Amiga in the months that followed, with much sadness.

hota_mazi··on x86 is dead, long live x86
> I haven't actively used Windows since 2008. It's such an obnoxious OS to use

You might want to modernize your perception of it, holding on to 15 year old views is not a very smart move in the tech industry.

Windows 10 and 11 are a joy to use, and to develop. I used a Mac for 15 years and switched to Windows to develop 5 years ago, and now macOS looks extremely antiquated and creaky for development.

hota_mazi··on x86 is dead, long live x86
You probably live in the US and parent lives... anywhere else in the world really.
hota_mazi··on How MOS 6502 illegal opcodes work
Yup, that's POP CS, 0x0f.

Since it made no sense to use, it became the way 286 and later processors used to indicate multibyte opcodes.

When a 286 is running the code, encountering a 0x0f means that the following opcode is multibyte, while on an 8088, all opcodes are single bytes.

hota_mazi··on Why checked exceptions failed
Checked exceptions failed because developers are lazy and don't want to check for errors.

Checked exceptions force you to do more work, but it's essential work to make your code more robust.

Replacing them with runtime exceptions gives you the illusion of clearer code, but all you have is actually code that is more likely to crash.

hota_mazi··on File for divorce from LLVM
Given the barrage of negative comments on the PR and here as well, it really feels like Andrew is the only person in favor of that change.

It's his language, obviously, but I strongly suspect that if this PR goes through, it will completely kill any kind of momentum that Zig has today and will most likely doom the language to obscurity.

Which would be a real shame.

hota_mazi··on Effective Rust (2021)
> Everyone just started using unchecked exceptions because they provide an easier coding experience.

Yes, in much the same way that no longer checking for error codes provides an easier coding experience.

But it makes your code more crashy.

hota_mazi··on fe: A tiny, embeddable language implemented in ANSI C
Everyone who uses Clojure, and even people who don't, but know Lisp, understand the point: since parentheses are used in Lisp to delineate everything, it makes sense to use a different pair of symbols to make parameter lists stand out more.

Maybe saying it's "completely pointless. It literally serves no purpose" is a bit overly dramatic, don't you think?

You could have limited yourself to saying you don't personally like it because it breaks with tradition.

hota_mazi··on Writing a C Compiler (2017)
I disagree.

As opposed to most compiler articles, this one actually covers code generation for every section of its chapters, which is really great.

I also like that every chapter focuses on a specific feature and describes how to implement it end to end: lexical/syntactic parsing, AST, and x86_64 generation.

Great series!

hota_mazi··on fe: A tiny, embeddable language implemented in ANSI C
And yet, Clojure, the most used Lisp today, decided to use brackets instead of parentheses for parameter lists, breaking with 50 years of Lisp tradition. How dare they??

But I'm sure you know better than them.

hota_mazi··on fe: A tiny, embeddable language implemented in ANSI C
Slavery was widely confirmed for even longer. Tradition, right?

How about instead of using tradition to decide if something is beneficial or not, you just assess it on its value?

hota_mazi··on fe: A tiny, embeddable language implemented in ANSI C
> Because it's a 50-year old convention

That's a terrible reason to justify... well, anything, really.

hota_mazi··on Why Lisp Syntax Works
While the barebones aspect of Lisp is appealing, there is no way I will commit again to a language that's not statically typed.

There is a difference for a language between "readable" and "understandable".

To me, languages that don't have type annotations (ideally with type inference) might look pleasing to the eye but they are a nightmare to maintain and modify because so much vital information is missing.

hota_mazi··on Why Lisp Syntax Works
I've actually gone one step further and I'm pretty sure I can adapt to anything now.

I coded in Java for 20+ years and then switched to Kotlin. Semicolons were gone, it was a breath of fresh air.

And then I learned Rust and I faced what I thought were two absolutely insurmountable obstacles: semicolons AND snake_case. I considered Rust ugly for these reasons and really dragged my feet. But I was curious about the language, so I perservered.

One week later, I wasn't noticing any of these any more. I still do think that semicolons are a manifestation of a language developer who favors their time over mine, but it's become more of a pet peeve than a deal breaker.

The human mind is wonderfully flexible.

hota_mazi··on Nintendo reportedly issues DMCA takedown for Switch homebrew projects
Sure, but playing a game you haven't bought is clearly illegal, there is no grey area there.
hota_mazi··on Nintendo reportedly issues DMCA takedown for Switch homebrew projects
Playing a game you haven't bought is illegal, there is no grey area here.
hota_mazi··on Nintendo reportedly issues DMCA takedown for Switch homebrew projects
My thought exactly.

The freedom of individuals clearly stops at illegal acts.

hota_mazi··on Wikipedia user edits over 90k uses of “comprised of”
Couldn't it be argued that it's totally okay to have two separate meanings for "to comprise" as a direct verb (A comprises B), and mean the opposite when used in indirect form (B is comprised of A)?
hota_mazi··on The Little Book of Deep Learning [pdf]
I know La/TeX is the standard for this but I'm still irritated that it forces all diagrams to appear at the top of the page, which really gets in the way of explaining things clearly.

This books suffers a lot from this limitation, with figures sometimes appearing 5 pages before they are actually referenced in the text.

hota_mazi··on The 2-MAXSAT Problem Can Be Solved in Polynomial Time
> Hence, we provide a proof of P = NP.

Is this serious?

hota_mazi··on Space Invaders creator reveals game’s origin story
Indeed. And it's not hard to find screenshots of the actual game since Space Invaders is a very popular project for people interested in emulation:

https://github.com/cbeust/space-invade.rs

hota_mazi··on Wavelength
Plenty more floundered because of that shortsightedness.

Surely you realize that picking one of the most successful apps created this past decade is not the resounding endorsement you think it is.

hota_mazi··on Zig Quirks
> void popFront() => ++index;

So in D, `popFront()` not only returns... nothing (void) but then returns... an index?

No wonder nobody uses this language.

hota_mazi··on Zig Quirks
> Properties help avoid this anti-pattern by making it possible to transparently swap in a computed property for what used to be a plain field.

Java's getters and setters *are* properties. Just with more syntactic sugar than languages that natively support properties, but the semantic is exactly the same.

hota_mazi··on Zig Quirks
> Java does indeed represent an anti-pattern of verbose and frequently trivial getters and setters.

It's not an anti-pattern.

This is how Java provides the exact functionality that you describe as very important (field encapsulation). Because Java doesn't support properties, it needs to go through getters and setters.

As you point out, more modern languages support this functionality directly in the language with properties.

hota_mazi··on Java 20 / JDK 20: General Availability
If you think today's Microsoft is anything like the Microsoft of 20 years ago, you need to start reading up on tech news other than Slashdot.
hota_mazi··on Java 20 / JDK 20: General Availability
Or you forming an opinion 30 years ago and never changing it.

Textbook definition of "closed minded".

← PreviousPage 2 of 34Next →