Better HN
topnewbestaskshowjobs
Log inSign up

rootlocus

3,292 karma · joined Jul 1, 2013 (13y ago) · 1,194 submissions

Submissions

comment 3y ago · link · parent

Between duck-typing languages like python and javascript and the minefiled that is C++, I think Java and C# fit a pretty nice sweet-spot. Java absolutely has "just data", they're mostly used for DTOs and database Entities, with tools like lombok @Data and `records` being some nice mechanisms of implementing them.

Inheritance, when used for implementing is-a relationship, is a pretty powerful tool. If you're surprised by overriding, maybe instead of complaining about `Parent parent = new Child()` examples, try to see a `Writer writer = new PdfWriter()`. Are you still surprised that `writer.write(document)` generates a pdf?

There are absolutely horrible ways of designing code in Java, but that can be said about any language.

comment 3y ago · link · parent

Simple anecdote: A colleague of mine had a really hard time getting some topologic sort to work. I kept finding issues with his implementations and he was getting frustrated so we aggreed to have a pair programming session. He wanted to put all the code in a single method (not terribly long, maybe 30, 40 lines), but the conditions kept nesting and no matter how much he tried to figure them out, he couldn't get them to work. I convinced him to extract two methods which would only be used once and only inside this sorting method. He was vehemently against it. After he finally agreed he realized the code was so easy to read, it was basically self-explanatory and obviously correct. No ammount of fiddling with the if statements could've produced that.

I don't impose fixed line counts for my methods. But when it makes sense, the readability improves a lot.

comment 3y ago · link · parent

And part of that context is your personal preference. Zig purposely chooses to prevent hidden control flow [1]. If operator overloading is a preference of yours, the language will get in your way. And that's fine. But it doesn't mean you can't build the "right abstraction" with it. These tradeoffs force you, for instance, to add an allocator to every type that needs dynamic allocation. For me that's great because it's evident which components need memory and I can make a conscious decision on what strategy to use with each one (or to avoid them entirely). For someone else, that might be a PITA. There is no "right" abstraction here.

1. https://ziglang.org/learn/overview/#small-simple-language

comment 3y ago · link · parent

If you want total control over your hardware, you're free to use machine code. Is a type system a leash? I mean surely you want to interpret memory however you want without the language getting in the way of forcing you to use methods. Are unique/shared pointers a leash? Or the borrow checker? They restrict what you can do with your objects because you're a poor programmer who can't code correctly. No true developer needs memory safety. Are calling conventions a leash? Surely you know better how to manage the stack and registers and everyone else should listen to you and do it the way you prefer.

comment 3y ago · link · parent

There are no "right abstractions". There are tradeoffs with advantages and disadvantages. Your preferred abstractions are by no means the "right" ones, especially since you don't even define what they are.

comment 3y ago · link · parent

Google has stolen data from pages and showed it without attribution on their search page: https://docs.house.gov/meetings/JU/JU05/20190716/109793/HHRG...

comment 4y ago · link · parent

Disney employs full-time artists that can do that anytime. They pay her specifically for comissions.

comment 4y ago · link · parent

It's original enough that Disney pays her for contracting work.

comment 4y ago · link · parent

> as you don't need to lift the pen/pencil from the paper as often Except for crossing your Ts and dotting your Is and depending on your language's alphabet, other diacritics which breaks the flow since you're switching from gliding over the paper to pattern matching letters and words from the start of the sentence.

comment 4y ago · link · parent

> great interop back and forth with Java.

That's something all JVM languages share. Not that easy with compiled languages unfortunately.

comment 4y ago · link · parent

> The problem is that all and I mean all of these idealogical driven agendas require tyranny because I for one do not agree with your world view.

There's always someone who disagrees with someone else's world view, that doesn't make it tyranny.

comment 4y ago · link · parent

Sounds like it has lots of benefits and no downsides, which begs more research. The website however seems to have a leftover placeholder text under "Our bugs are bettering the world" > "Disease Free":

That wasn't real text. Just holding some space here. Real text is going to be awesome.

comment 4y ago · link · parent

A bit forced, and they all sound like denial, but I can see all the stages if I squint.

comment 4y ago · link · parent

> If I use square tiles and hide the seams between adjacent tiles, will it look OK?

Square tiling is very obvious, as you can see from the first example [0]. Hex tiling shifts tiles to a less obvious pattern. Also, as I can see from the video, tiles can be rotated while hiding the seams perfectly, which eliminates repetition altogether.

0. https://github.com/mmikk/mmikk.github.io/blob/master/picture...

comment 4y ago · link · parent

https://github.com/ayojs/ayo comes to mind.

comment 4y ago · link · parent

I have interviewed "senior devops" candidates that didn't know what procfs was.

edit: We didn't consider them for the role.

comment 4y ago · link · parent

It also misplaces C++ in that list.

comment 4y ago · link · parent

Graalvm has support for ahead-of-time compilation of JVM languages. They promise "native executables [that] start nearly instantaneously, are smaller, and consume less resources of the same Java application".

This is how things like Babashka (Clojure CLI scripting runtime) are possible [0]

0. https://babashka.org/

comment 4y ago · link · parent

Java EE != Spring Framework != Spring Boot

comment 4y ago · link · parent

Because it has a VM (portability, multiple languages interact seamlessly, bytecode manipulation at runtime, low compile times), insanely fast GC, best tools in the industry (IDEs, static code analysis, debugger, libraries), and it's still fast enough to write HFT software with it.

It's even possible to compile it ahead of time, making projects like a Clojure CLI scripting runtime with almost instant startup time possible (babashka).

comment 4y ago · link · parent

Reverse hype in a nutshell: "I don't know it, but I don't like it because it's overhyped by people I don't respect"

comment 4y ago · link · parent

> Assuming a volume of 10000 particles above 0.3 microns:

That volume is not the same volume processed by all filters in the same amount of time.

In the first minute:

    E12  filters 10000 particles   @ 99.5% performance   -> removes 9950,   leaves 50
    H13  filters 10000 particles   @ 99.95% performance  -> removes 9995,   leaves 5
    RLv1 filters 10 particles      @ 99.995% performance -> removes 10,     leaves 0
    RLv2 filters 1000000 particles @ 99% performance     -> removes 990000, leaves 10000

RLv1 only filters a tiny amount of air each minute, while RLv2 filters a lot of air each minute (I've improved the flow, but drastically botched the performance)

By your method, RLv2 is 2000x slower than H13, but in the same ammount of time filtered 99x more particles. RLv1 needs to run 99000 minutes to filter the same amount of particles RLv2 does in one minute.

The example is meant to show air flow totaly dominates performance, and it's not "a trick" to multiply by it. I also want to point out that comparing the amount of particles "left" (50 vs 5 vs 0 vs 10000) is nonsense and absolutely no indication of performance in any way.

comment 4y ago · link · parent

Consider a purifier that purifies 99.995%. According to your "probabilities", that's a 100x improvement. Now consider this purifier purifies 1 cubic millimeter of air per hour. That is to say, each hour 1 cubic millimeter of air is 99.995% purified (no probability). Would you say that this purifier is 100x better than the IKEA one with 99.5% purification at 1 cubic feet of air per minute? Considering air flow is not a trick.

comment 4y ago · link · parent

Another application of Amdahl's law.

comment 4y ago · link · parent

My airpods have been ran over by a car, and they've been through a full laundry machine wash cycle and they still work, but I don't play with the lid because I'm afraid I'l break the hinge.

comment 4y ago · link · parent

From the article:

> Jason Yuan has promoted the idea of “fidgetability” where, similar to a key fob or lighter, digital actions can be designed to feel satisfying.

I love fidgeting. I used to have a switch tumbler in my pocket just to turn it off / on when I didn't have anything to do with my hands. I think I would've enjoyed a checkbox that allowed you to drag it slightly to check it instead of just tapping. You can't add "fidgetability" with just flashy animations and sfx. You need something to do with your thumb: turn it on and off, feel the thing respond, turn it half way, try to keep it there before it snaps into place, that kind of thing.

I read an article some time ago that argued phones are the worst tools for our hands. While everything else is designed to use the entire hand or at least a few fingers while providing subtle feedback on every action that requires us to exercise multiple muscles to control properly, the phone only requires your thumb.

comment 4y ago · link · parent

I haven't tried to understand it, but I was getting the same error with zsh. Works with bash though.

comment 4y ago · link · parent

> They're spending up the wazoo on Xbox

> Windows is hurting as a retail business.

> License costs have been driven down by Chromebooks and resurgent Macs

> That leaves Azure and Office as the big cash cows.

Where are you pulling all this data from? And I don't mean coarse data from various articles, anectodal evidence or personal observations, I mean actual evidence that microsoft's revenue share is dominated by office and azure? Microsoft sells a lot of stuff to a lot of entities, I'm not convinced you can sum up their revenue so neatly without opening their books.

comment 4y ago · link · parent

You start with a 66% chance of choosing a goat. The host opens a door and shows a goat. If you switch, you turn that 66% chance of choosing a goat into a 66% chance of choosing the prize. The fact that the host knew or didn't know what was behind the door is irrelevant.

Also, if the host opened the door with the prize, what would happen then?

comment 4y ago · link · parent

Last time I was interested in this, most AAA games used some sort of html solution for UIs: scaleform [1] / awesomium / ultralight [2].

1. https://www.birdtools-developers.com/scaleform/

2. https://ultralig.ht/

1
567
40