HNHacker News
TopNewBestAskShowJobs

the_mungler

38 karma · joined September 1, 2022

submissionscomments
the_mungler··on Show HN: KSON, a love-letter to the humans maintaining computer configuration
Yeah, definitely some tradeoffs there. I do like that it makes the common use cases easy. And yeah, I did make quite the "turduckin" as you put it .

A more concrete criticism: suppose you wanted to embed some markdown, where all of the content consisted of an indented code block.

%markdown: a code block

    fn foo(){

        # do stuff

    }
%%

My understanding is the leading spaces would be removed, breaking the formatting and making it normal text instead of a code block.

the_mungler··on Show HN: KSON, a love-letter to the humans maintaining computer configuration
I'm not the biggest fan of the embed block syntax, for two reasons. 1. Having `%\\\%` escape to `%\\%` is confusing. Assuming you want to embed kson inside kson it would look like this:

```

%kson: level 1

  %kson: level 2

    %kson: level 3

      - "a list"

      - "of values"

    %\\%

  %\%
%%

```

Note that for each level of nesting, the delimiters inside the block have to increase, instead of the ones outside. In a long embedded block you probably copied from elsewhere, you have to check every escaped delimiter to make sure it has the correct number of back slashes and update it. It would have made more sense to have a varying number of % correspond to a matching set to close it. e.g. %%%kson: foo matches %%% and closes it.

2. It's impossible to represent strings where every line has at least some leading indent, because they "always strip their minimum indent".

I think both these issues are solved by using zig's style of raw string literals. An embed block could start with %tag and each following line with % continues the block. No closing delimiter or delimiter escapes needed.

```

%kson: level 1

  %%kson: level 2

  %  %%kson: level 3

  %  %  %  - "a list"

  %  %  %  - "of values"

  %  %  %  - "indented"
```

Granted, this also kind of looks ugly with percent signs. But the upside is you could paste in each sub level, and a text editor could insert the symbols for you before each line, just like they already do when highlighting text and commenting it out.

the_mungler··on Apple reverses course on death of Progressive Web Apps in EU
That's sort of the point. The EU is requiring Apple to allow alternative app stores with all the same features as the main one. Originally Apple decided to remove these features from Safari rather than allow actual alternative browsers not based on webkit to have access.
the_mungler··on Apple reverses course on death of Progressive Web Apps in EU
A PWA usually makes use of a few features, most commonly push notifications, local storage, and install to home screen. The last one allows a web app to open as if it's a standalone native app, basically only a web view with no nav bar.

It's these features that Apple is restricting to webkit.

the_mungler··on Firefly III: A free and open source personal finance manager
I've been looking through the repository on GitHub and I for the life of me can't figure out where the SQL code is. How is the database created? What do the tables look like? I've never looked at a php codebase before, I'm quite lost. I'm guessing this is using some ORM provided by Laravel?
the_mungler··on Amazon, Audible uses drm to lock in customers
Yeah, the article certainly goes a bit over the top. As far as drm goes though, the lock analogy doesn't hold. You can't lockpick a house and then distribute unlimited unlocked free copies of it. DRM only needs to be broken once and can be widely distributed, but makes the experience worse for regular customers. There are tons of examples of this all over. Netflix only streams in 720p to browsers (except for edge). Video games with drm can be impossible to run on computers with unusual setups (Sure, I get cheating can be a problem, but this even happens for some single player games). Sometimes software will refuse to work because it is trying to "phone home" to verify a license while some servers are down.

But yeah, generally I think this article isn't the best on the subject. Just hadn't been posted on this site, so I thought it would be good to discuss.

the_mungler··on Explosions are great, actually
Rockets fall under some pretty big restrictions government wise. You know, guided missiles and all that. While SpaceX is a private company, the people allowed to work on their rockets are very much restricted. I believe they can employ Americans and Canadians, but anyone else is not allowed to work there.
the_mungler··on The EU suppressed a 300-page study that found piracy doesn’t harm sales (2017)
Even then, I don't believe they stream 4k to browsers. They only stream to devices like smart tvs or official Netflix apps with high quality. Your average browser is limited to 720p. This is the quintessential "pirating is better" example.
the_mungler··on Explosions are great, actually
"friction from the atmosphere" = drag. The previous commenter explains the effect friction has.
the_mungler··on Explosions are great, actually
I don't know exactly in this case, but congressmen have always been making NASA rockets more expensive. They often made it so that at least a part of the rockets were built in their respective states, making things more expensive than needed.
the_mungler··on Explosions are great, actually
Usually there is a defined "flight envelope" and if it deviates from that, they detonate. I'm guessing they simply waited as long as possible, and once it left the designated buffer is when they finally detonated it.
the_mungler··on Explosions are great, actually
Not really. How would you test a rocket engine at low atmospheric pressure? You can't exactly stick a rocket engine in a vacuum chamber and light it. Then once you're launching something into space, you may as well have a first stage to go along with it. Are you saying they should have launched the booster stage by itself? Why? What would they learn from that? Would you ever expect them to launch a booster on it's own in practice?
the_mungler··on Explosions are great, actually
Well, it did successfully lift off the pad. I honestly didn't think it would make it that far.

"The ... Failure happens ... Before anything flies the first time" I'm no aerospace engineer, but I doubt this was the case in the early days of jet engines(if that is the case, then I stand corrected). The new raptor engines are full flow staged combustion, only the second of their kind. Having this many light right next to each other and burn for that long at high altitude is a huge milestone.

the_mungler··on Explosions are great, actually
You're right, Mexico would be a better place to launch rockets from. You want to be close to the equator, and on an east coast so you can launch rockets over the water and avoid dropping boosters on people. Rockets generally are launched to the east to take advantage of Earth's rotation (we're all moving about 1,000 mph to the east, so launching west requires about 2,000mph extra Delta v). SpaceX is a USA company, and I believe their rocket technology is considered a government secret and must stay in the USA. So that's why SpaceX themselves aren't putting launch pads in Mexico.

Also I believe equatorial orbits are still possible to achieve from USA launch sites, it just means more fuel/ reduced payload.

Interestingly, the James Webb telescope was launched from French Guiana, which is almost right on the equator.

Also Israel is one of the few countries that regularly launches their rockets to the west, as they only have a West Coast.

the_mungler··on Explosions are great, actually
This is still in the USA. They still had to get approval from the EPA to set up all of this stuff. I realize this comment is satire, but the reason this location was chosen has to do with orbital mechanics. A launch pad close to the equator can send payloads to a larger range of orbital inclinations.
the_mungler··on Nuclear Power Is the Answer to Global and Environmental Energy Woes
No, I'm talking about recycling fuel rods for use in our current nuclear reactors. I'm fuzzy on the details, but a fuel rod becomes unusable way before all the uranium is used up because of a build up of "nuclear poisons" which interfere with fission in the reactor. You can also get some plutonium when recycling, which can also be used in a LWR.

I'm not talking about exotic breeder reactor designs, or molten salt reactors. France has been recycling fuel rods for some time now. The U.S. just prohibits this due to proliferation concerns.

Edit: breeder reactors are usually more about being able to use other less rare elements for fuel, like thorium, or being able to use more common isotopes of uranium. Yes, they often propose using recycled waste to "kick start" the breeding process, but they're not needed to recycle fuel rods.

the_mungler··on Nuclear Power Is the Answer to Global and Environmental Energy Woes
The story gets better here when you consider that most "waste" can actually be reused (93% of uranium fuel rods used in LWRs could be recycled). Also consider, more radioactive materials (the parts we can't currently recycle, outside of some exotic hypothetical reactor designs) have shorter half lives, and so aren't a problem for as long.

The best containment proposal I've seen is deep geological disposal.

Also consider, making fuel rods removes some radioactivity from the environment, so if you change the requirements from "keep all byproducts contained forever" to "keep all byproducts contained until radiation levels are no worse than where we got it from" the problem becomes more tractable.

the_mungler··on How to sell tickets fairly
Yeah, you're right about that. I'll admit this topic sent me down a bit of a rabbit hole on how this could be accomplished. An alternative scheme could be a Vickery Clarke Groves or generalized second price auction. These bidding schemes are used to price online adverts. Once the auction closes, let people choose their seats in order of who paid the most. This let's you place one bid, and individually prices each seat, but the downside is you don't know how good a seat your bid will get you. Still, would probably be easier to understand. If you bid more, you get first pick.
the_mungler··on Safely writing code that isn't thread-safe
To be fair, rust at kernel level seems to have way more unsafe code than usual, though I have no experience in that area so I can't say much. In rust you absolutely can "just take a lock around some shared data", but it is a bit different then other languages. mutexes actually contain the data they guard, making it impossible to modify unless you have the lock. There is another article about muexes by this same author if you want more details: http://cliffle.com/blog/rust-mutexes/
the_mungler··on How to sell tickets fairly
Good point, but you could address that by splitting up the seats into multiple auctions depending on the quality of the seats.

People could even bid "conditionally" for multiple sections, and once bidding closes you resolve the separate auctions in order from best to worst. If a person with multiple bids gets a good seat, their bids in the other sections get cancelled.

Seems to me that this could have very similar results as the dutch auction method, but each ticket is more fairly priced. Your ticket costs the same as the next guy, assuming they have a seat in the same section as you.

Edit: also, as mentioned somewhere else here, you're likely to have a threshold where everyone wants to buy once they see available seats start to disappear, causing a kind of "bank runoff" where everyone rushes to buy tickets all at once, putting us back where we started.

the_mungler··on How to sell tickets fairly
Why not have a big closed auction? Everyone has a week or so to submit how much they are willing to pay for a ticket. Once the auction closes, sort by price and take the number of seats available. Everyone pays the minimum price that still fits in the seats available.

I'm imagining a large scale Vickery auction, sorry if I'm not explaining super well. Everyone pays the same, but people get a price they think is fair.

the_mungler··on How to sell tickets fairly
Hmm, that actually seems quite likely to me.
the_mungler··on Privacy vs. “I have nothing to hide” (2019)
What Clarence Thomas is saying is that these decisions shouldn't have been made by the supreme court, not that these things shouldn't be allowed. In his view these decisions require the legislative branch to rule on, not nine lifetime appointed judges. I'm not sure I entirely agree that the constitution has zero room for implied rights, but that's where I think he's coming from.

Edit: the Crux of the issue is that the supreme court can just as easily make bad rulings as they can good ones. To pick an admittedly dated but relevant example, the supreme court once ruled that black people are property and must be returned to their "owner", regardless of the laws of the state they were currently in.

Or we could just say "supreme court justice hates minorities and gay people and wants to make his own (interracial) marriage illegal." Who needs nuance?

the_mungler··on Privacy vs. “I have nothing to hide” (2019)
>There’s also the obvious warmth and protection from the elements (like UV) they provide.

If we only wore clothes for "warmth and protection" then why do we wear them indoors? The point is still valid.

the_mungler··on Privacy vs. “I have nothing to hide” (2019)
I've never had anyone ask me about my current salary in an interview, isn't that kind of illegal? Or surely at least considered poor form...