HNHacker News
TopNewBestAskShowJobs

LordHeini

744 karma · joined March 23, 2016

submissionscomments
LordHeini··on Skeptical of rewriting JavaScript tools in "faster" languages
As someone who as written a lot of Go and trained a couple of people in it.

The "more difficult" in this quote makes me somewhat angry.

`This breaks down if JavaScript library authors are using languages that are different (and more difficult!) than JavaScript.`

JS is absolutely not easy!

It is not class oriented but uses funky prototypes, it has classes slapped on PHP-Style.

Types are bonkers, so someone bolted on TypeScript.

It has a dual wield footgun in the form of null/undefined, a repeat of the billion dollar mistake but twice!

The whole Javascript tooling and ecosystem is a giant mess with no fix in sight (hence all the rewrites).

The whole JavaScript ecosystem is ludicrously complicated with lots of opinions on everything.

Tooling is especially bad because you need a VM to run stuff (so lots of rewrites).

This is why Java never got much traction in that space too.

Go for example is way easier to learn than Javascript.

Here i mean to a level of proficiency which goes beyond making some buttons blink or load a bit of stuff from some database.

Tooling just works. There is no thought to spend on how to format stuff or which tool to use to run things.

And even somewhat difficult (and in my opinion useless) features like classes are a absent.

Want to do concurrency? Just to `go func whatever()`. Want it to communicate across threads? Use a channel it makes stuff go from A -> B.

Try this in JS you have to know concepts like Promises, WebWorkers and a VM which is not really multithreaded to begin with.

LordHeini··on Cargo Airships Are Happening
No really because the gas helium or oxygen, is super low density (in fact the lowest 2 density gasses there are). This means that you would need a compressor which can on one end suck super large volumes of gas but sill achieve high compression. Those are heavy and need lots of energy which you don't have on an airship.

I looked up some compressor manufacturers. And got roughly the following:

Large helium compressors, which compress like 2000 liters of helium per minute to 200bar, weight around 2 tons and consume power in the order of 60kw.

Not sure if 2000 liters per minute is the right amount but you get the idea.

So even if you can fit that thing on your airship, the 60kw power plant and all its accompanying fuel does not fit.

And remember you are doing this because of fuel usage the first place! So you would be using fuel to compress gas which you have to compress because you are using fuel...

Usually gasses like this are compressed (and liquified) via something like the Linde process:

https://en.wikipedia.org/wiki/Hampson%E2%80%93Linde_cycle

That is industrial scale and does not go onto anything that moves...

And you would need to store your compressed gasses somewhere too.

All of this is super complex, heavy, requires stupid amounts of energy and thus is way to costly to do on something that flies.

LordHeini··on Cargo Airships Are Happening
Sounds good does not work.

Reminds me of CargoLifter:

https://en.wikipedia.org/wiki/CargoLifter

The german article states that the price the Zeppelin GmbH (yes those guys) calculated, that the costs of transportation via airship, would be about 10 times as high as conventional methods.

CargoLifter used helium which is stupidly expensive, this is supposed to use hydrogen and more modern materials but i think that does not make a factor of 10.

Also "current FAA guidance disallows the use of hydrogen as a lifting gas". So good luck with that.

As you burn fuel you must either gain weight or vent gas.

Old Airships had either rain collectors (yep really) or piston engines which burned gas with a similar density to air (which digs a lot into your carrying capacity and volume).

Venting helium is way to expensive and one of the reasons CargoLifter failed, was that they never managed to get water collection running.

This article and the linked website have no idea how to solve the propulsion problem. There is some stuff about turbines going with the the old Zeppelin approach, of burning gas. Or something about solar cells, which obviously would not work because solar cells are rigid and heavy but this is supposed to be semi rigid. And you would need heavy batteries too.

Also airships sink when they get wet. And it gets warm the gas expands and it rises. You need ballast to account for that; this is large so it will do that a lot.

Don't forget how stupidly large these things are and thus how much wind is a problem. The linked website claims a predicted length of 388 and width of 78 Meters minimum!

So maneuverability is going to be a large problem, you can overcome this by adding lots of propellers everywhere but that add weight and uses fuel.

Now imagine a 388x78 m giant filled with hydrogen, with hordes of engines everywhere, dropping of a bunch of containers at some delivery center...

Since wind might be coming from every direction you need a landing circle (!) of roughly a km in diameter. This is why old Zeppelins landed at large (!) airstrips or sometimes on masts attached to skyscrapers.

Then cargo gets loaded off and ballast of the same weight must be moved onto the ship.

That ballast has to go somewhere, so the ship either needs water tanks (again loss of carrying capacity). Or the landing strip has some attachable ballast (how do you transport that back and forth?).

If you have the infrastructure to accommodate this thing you can be reached by truck or rail, which is cheaper, not depended on weather and so on... And weirdly enough you can be reached by cargo aircraft which is a solved problem!

Door to door delivery was exactly what CargoLifter was supposed to do. But it was basically a more expensive and clunky helicopter. Thus it failed.

LordHeini··on Why does man print "gimme gimme gimme" at 00:30? (2017)
Am I the only one to think that this is so incredibly sweet?

More software should have these nice little things to remind us stupid little humans of our weird but oh so important humanity.

LordHeini··on How were 70s versions of games like Pong built without a programmable computer?
Unrelated but important. Whatever you do if you end up in Berlin for whatever reason.

Go to the computer spiele museum https://www.computerspielemuseum.de/

LordHeini··on Rust needs an extended standard library
From personal experience I would copy the Go approach and do both.

Go has a large and extensive stdlib which can do basically anything.

On top nearly everything has an interface defined by that lib, which is used by third party libraries too.

So a lot of code, libraries and so on becomes sort of plug and play and just works together.

That is really great and one of the reasons why i made our company use Go for our backed stuff.

A bad standard library like PHP or a non existent like Javascripts is a thing that is a massive hindrance to developers. It wastes so incredibly much time it is absolutely insane. Ask me how I know...

The Rust people are in the unique situation that they could actually kill the fragmentation and set a standard. It's a lot if work but there are good examples to copy ideas from.

LordHeini··on Steam Removed Forced Arbitration from Their Subscriber Agreement
Yep i looked it and that seems to be the case in german law.

Ther is actually some sort of way to resovle that called the blue pencil test.

https://en.wikipedia.org/wiki/Blue_pencil_doctrine

LordHeini··on Steam Removed Forced Arbitration from Their Subscriber Agreement
That arbitration rule is invalid in Europe, UK and Australia anyway.

Its one of those weird peculiarities present in US law which apply virtually nowhere else but show up in quite a few agreements across the world.

I wonder how valid the whole agreement is if it contains points which one can not possibly agree to.

LordHeini··on Why are the violins the biggest section in the orchestra?
Trumpets usually have tuning slides which are actuaded during play. Usually the tone is too high on specific button combinations in certain registers. On those the player moves the slide out a little. It's really a no brainer for the most part.

Alternatively you can give them additional valves which are tuned slightly differently. Which is usually found on Tubas and other deeper brass instruments.

There are more technical solutions like compensator valves too.

LordHeini··on Why I Prefer Exceptions to Error Values
I think exceptions are bad not because of the principle but because code is written by humans.

We use Go in our company and every intern learning it complains about the error handling at first.

Then they write a bunch of programs and those basically never crash. I had and intern write a somewhat complex service mangling large amounts of Geodata which was his first go service ever. That thing ran for years without crashing once (it died due to an hardware problem).

The reason is simple: Golangs stupidly verbose error handling forces you to constantly think about the unhappy paths. Every function is littered with error handling and it makes you aware of possible problems and rigorously forces you to not forget them.

Exceptions are the opposite: people do whatever and have someone else deal with the fallout later. This leads to people not thinking about errors and then someone using catch(all)-> doNothing kind of "solutions".

On top of that exception based error handling is what i call transparent (like in invisible). So you can write a function using some other function without being aware the there could be exceptions thrown (unless your Language uses checked exceptions like Java).

One can not possibly know every detail and remember the constantly. So if something goes wrong, you end up with super deep stack traces at unexpected places. This is unlike Go code where the error usually is handled at the earliest point possible with (hopefully) reason and contingency.

LordHeini··on Common mistakes when using the metric system
It is highly language dependent.

In Germany you will sometimes see Qm for "Quadratmeter" (m²).

LordHeini··on Sony shutting down Concord, refunds after 2 week launch. 8 year dev, 25k sales
Yes but the social justice stuff is mostly overblown.

It's a case of the "go woke go broke" crowd taking themselves more important than they really are.

Who in his right mind would follow the 8 year development of just another generic Overwatch clone and remember anything the devs or some marketing dude said during that time?

Right nobody.

Gamers don't really care about any of that.

They lock onto Steam, see the store, which says: "Here is another generic Hero Shooter which looks like all the others, its completely unoriginal has no strong IP and no new gameplay. But it costs 40 bucks and is mostly Ok".

The gamer goes "jeah whatever, my library is long enough already" and plays something else.

LordHeini··on Micro-libraries should never be used
I think discussions like this mostly miss the point.

Obviously you want basic, stable and well documented functionality in your programming language.

But JavaScript does simply not have it. So how do you solve this dilemma?

1) the everything is an import way: use NPM and create a dependency hell from hell (requires Satan) made by Lucifer (same as Satan but different) using lava with fire (requires node v <= 9.42.0815) and heat (deprecated) requiring brimstone (only node v > 10.23) with a cyclic dependency on the Devil (incompatible with Satan).

2) the Golang way: copy paste ALL the things, only for your co worker to copy paste all the things again, only for your co worker to copy paste all the tings again, only for your...

Way 1 wastes your time when it breaks (sooner than later) but is necessary for non trivial functionality. Way 2 works only for trivial packages so choose your poison.

JavaScript (apart from not being a good programming language in general) is sorely missing a std lib.

One could argue that having a bad std lib is even even worse (PHP anyone?) but it is really hard to decide.

Sadly JavaScript is just unfit for the purpose it is being used for.

LordHeini··on Ask HN: How do you find a "boring" tech job?
The lazy way: Get on xing LinkedIn and the like. Respond to all the recruiters and let them put you on their lists.

Watit and pick the one offering a boring job at something like an insurance company.

LordHeini··on Medieval game pieces emerge from the ruins of a German castle
Nice that they provide the 3d scans.

I want to 3d print the knight and it seems so strange that I can do that with a thing someone made 800 years ago.

LordHeini··on Song lyrics getting simpler, more repetitive, angry and self-obsessed – study
This is a very common thing in music and I would say more the Norm than one might think.

Historically often librettists where responsible for texts. For example in opera there the librettist was as important as the composer and his texts might have been used in multiple operas.

Among the most famous examples would be the European hymn Freude schöner Götterfunken. The text is by Schiller and the music by Beethoven.

LordHeini··on Song lyrics getting simpler, more repetitive, angry and self-obsessed – study
No that's not true.

The international audience usualy does not understand the lyrics because it does not speak English.

So it does not care at all.

That leads to funny cases where childish sounding pop music wiht juicy texts gets played everywhere.

I recently read an article about a pop song about small dicks which was popular in europe for some time.

The artist got invided to a live performance in a Spanish Kindergarten.

LordHeini··on Ask HN: Why are bathtubs in the US undersized for adults?
What do you mean with undersized?

My standard European bathtub is roughly 140x52 cm on the inside.

That is too short. So either the knees, or the upper body stick out of the water.

Not sure about the width though. What is the average width of an American? Being wider than half a meter seems unusual.

LordHeini··on Casino-like apps have drained people of millions
It is totaly weird indeed.

Some People seem to get in the zone and get completely lost. Sometimes that happens to me while coding. But i can't do it for long and unlike gambling it pays.

It is hard to get up from the machine and some even shit themselves. The big casinos often have emergency teams for the people who get heart attacks and die on their chairs in front of the slot machine.

It is truly bizzare I never understood the appeal but some people are drawn to this and get absolutely zombiefied.

Gambling addiction truly is one of the worst things that can happen to someone.

LordHeini··on Casino-like apps have drained people of millions
Some time ago I watched a documentary about gambling addicts. They claimed they were playing because the game puts you in a kind of stupor which is like being high. Winning money did not matter to them as long as the high held on. It is a bit counter intuitive but winning money is not the point of gambling. If an addict wins money he will imedialty spend that money to gamble more.

This app skips the winning and some degree spending, money part altogether. Which is smart if you want to exploit gambling addincts and avoid regulations.

LordHeini··on Ask HN: What is the least obnoxious way to ask for cookie permissions?
Apart from the others suggestions.

Make sure that it does work with extensions like I don't care about cookies. That one is usually easy but make sure it works with the uBlock script too.

Do not have that the banner force any site reloads. Analytics for example can be loaded into a page wihtout reloading.

If that is done the ad blocker users will never notice the banner.

LordHeini··on Effect of Breakfast Skipping and Late Night Eating on BMI with Type 2 Diabetes
It is for studies because, the average person with a high BMI has higher body fat on average.

That might not be the case individually but with multiple people the few outliers don't matter.

LordHeini··on Set up Linux on your Chromebook
The cool thing is that you can use the debug bridge to install/uninstall apps which you otherwise can not on Chromebooks.
LordHeini··on Ask HN: Why is LK-99 public?
Why would the electrons spread evenly?

They move over to the other side and back and forth resulting in an oscillator.

That causes all your energy being radiated into the surrounding via radio waves.

That is how your microwave oven works but instead of a superconductor it uses a magnetron with free flowing electrons.

LordHeini··on Ask HN: Why is LK-99 public?
Well CPU's are made of transistors. So one could ask if it is possible to make a transistor out of a superconductor.

The answer is yes. It is possible to quench a superconductor with an external magnetic field for example and make it an insulator. These things actually do exist but i forgot the name.

But switching that field still requires energy. So while it is possible to build such a CPU there would be still energy required to do any calculations.

Today's CPU's don't heat up because of internal resistance (mostly) but because there is current flowing due to the field effect transistors needing their gate voltages being raised and lowered.

Lowering that voltage means the energy must be vented somewhere which results in heat. That would not change if any part is superconducting.

LordHeini··on Room-Temperature Ambient-Pressure Superconductor LK-99 preprint revision 2
Sure it would work like copper wire minus the losses due to resistance.

Probably it would not make much sense to replace glass fiber because problems like (thermal) noise and cross contamination by other signals would still exist.

LordHeini··on Oceangate Statement, “We now believe that [all crew] have sadly been lost.”
It depends on the depth.

But if the leak is noticed at say 20m they would have surfaced.

A leak with the amount of pressure at 1000m would cause a high speed jet like from a water cutter. That in turn would cause the material around the leak to be ground away.

This is really bad for the structural integrity and boom the whole thing implodes in a fraction of a second.

LordHeini··on Ask HN: How do you approach a problem you are not sure has a solution?
Ask somebody from a different branch of work, who has very bad understanding of that problem.

They often have a bizzare idea somehow leading to the right track. They solve it in a completely different way or know that the problem does not matter to begin with.

Its like rubber duck programming with a smart duck.

I once had some weird data problem and complained about it to a sales guy. He called the customer to not enter certain things,and the problem was gone.

LordHeini··on Deduplicate a slice in Go, use sort or a map?
The same would be true for the initial map:

Replacing

  encountered := map[uint64]bool{}
with

  encountered := make(map[uint64]bool, len(elements))
Should be faster.

Golang Hashmaps initially have one bucket with a size of 8. If more elements are added new buckets are created.

So giving a hint to initialize a correct number of things should always be faster.

LordHeini··on Product Deconstruction and Review: Rexona Spray Can (2022)
As a non professional it is always astounding how different the designs for injection molding are from hobbyist 3d printer parts.

For 3d printing there so many caveats to make something easy to print. But for molds that seems to be on a different level.

How you they now the plastic goes everywhere? Do they use flow simulations or is it experience?

← PreviousPage 2 of 8Next →