HNHacker News
TopNewBestAskShowJobs

strictfp

2,733 karma · joined April 30, 2011

submissionscomments
strictfp··on Typestates in Rust (2018)
1) A typesafe variant of this example, caught by the compiler, is what he implements further down 2) There is. Rust has the Drop trait, which guarantees destruction when going out of scope. Even better than `with` statements since the API doesn't require anything special from the user.
strictfp··on Leonard Kleinrock on what went wrong with the internet
Internet only allowed us to witness another iteration of implemention of the nasty methods already employed by nations, corporations and other entities to assert their power over the general population; information hiding, secrecy, isolationism, monopolies, weaponization of information, denial of anonymity etc.

The original intent of internet was to establish a honest and open platform for information sharing, and for me (personally at least) the development so far has only convinced me that most establishments out there are utterly incompatible with those values.

strictfp··on Apple Developer Documentation Is Missing
Apple payments APIs are the worst APIs I've ever worked with. They're inconsistent, badly documented, have unannounced breaking changes and contain so many gotchas it isn't funny. For example, some of the most relevant data is attached to the response but isn't officially supported and may or may not be correct.

It's not exactly fun to code up payment integrations, and so I was kind of hoping to get it over and done with. But with Apples payment APIs, we needed months of production data to figure out how to use them without shooting ourselves in the foot.

Using the API felt like interfacing with some badly configured eventually consistent MongoDB cluster that a bunch of juniors stuffed full of receipts, using the entirely wrong data model.

strictfp··on 63 Cores Blocked by Seven Instructions
So, one busy process performs a file operation that triggers a system restore checkpoint, and the OS locks the entire drive during this file operation? Sounds strange to me.

Is the problem that the checkpointing critical section has the same duration as the triggering file operation?

I get that there must be some sort of critical section for setting a checkpoint, but I don't understand why it takes so long, and why it would be affected by how busy the userspace process that triggered it is.

I would expect it to have a short barrier-style critical section; drain all outstanding writes, record some checksum or counter from a kernel data structure, and then release all writers again.

In my mind this should be kernel code only, entirely unaffected by userspace, and if designed nicely, quite fast.

So I guess I don't get what is going on here.

strictfp··on My Favourite Git Commit
OR you could just write

Replace invalid ASCII char. Fixes rake error 'invalid byte sequence in US-ASCII'.

I don't want your entire life story in my commit log.

strictfp··on EU brings in 'right to repair' rules for appliances
Same with electric toothbrushes. They lodge the battery in between electronics, probably because they realized people were replacing them.
strictfp··on Understanding the working of X11 from the ground up (2017)
It could have evolved into REST (which it didn't, but they're deceptively similar).
strictfp··on Good Code Design from Linux
And then there was Inferno
strictfp··on The Myth of Consumer-Grade Security
At the very least, there's the real time clock.
strictfp··on How Rust optimizes async/await
We're getting generators as well? Awesome.
strictfp··on Down the Rabbit-Hole
IMO it's not that clear-cut. A VM is safer than a webpage which is safer than an nacl-plugin, which in turn is safer than an UAP app. But in the end you risk privilege escalation for everything which isn't airgapped.
strictfp··on Spying on HTTPS
They could have just added it as a flag to plugins, showing a clear security warning, potentially requiring a review.
strictfp··on NULL license plate not such a bright idea
Or "[object Object]"
strictfp··on The Problem of Mindfulness
Sure, but fixing the bigger problems, such as stress in the workplace, would have many more benefits.

Ans as far as the analogy goes, it might be hard to fix the entire surface of the earth, but that's a strawman, because we have plenty of urbanised and indoor areas where you don't need shoes.

What's the easiest? To cover the entire earth in asphalt, or make all cars be 4wd?

strictfp··on Goodbye Docker: Purging Is Such Sweet Sorrow
The actual reason is that sysadmins don't have arcane requirements of what you can install in your Docker images. It will continue to be popular until sysadmins accomodate developers, or until the sysadmins catch on and start restricting docker environments.

Ok, that's kind of cynical, but still true to a large extent if you ask me.

strictfp··on The Problem of Mindfulness
The same coping mechanism is being used in NLP. I have a feeling it's just a way of dealing with an environment which isn't healthy for the human being. It would be better to adjust the environment.
strictfp··on Algebraic Effects for the Rest of Us
I've heard the phrase "forming an algebra" being used for delaying effects by means of recording the intents into a data structure. So for instance a function which initially performs file i/o as a side effect, could instead return a data structure "FileOperations" with entries like "FileWrite(a.txt, Hello world)".

Maybe that's where they got the name from? Although performing the effects directly through a pause/resume mechanism doesn't sound algebraic to me.

strictfp··on PEG Parsers
I might have misread what Guido is writing in the article then;

" So how does a PEG parser solve these annoyances? By using an infinite lookahead buffer! The typical implementation of a PEG parser uses something called “packrat parsing”, which not only loads the entire program in memory before parsing it, but also allows the parser to backtrack arbitrarily. While the term PEG primarily refers to the grammar notation, the parsers generated from PEG grammars are typically recursive-descent parsers with unlimited backtracking, "

I read that as implying generating a typical recursive descent, with the classical degenerate branching cases that TDOP partially solves.

strictfp··on PEG Parsers
Ok, thank you for clarifying. If you don't mind me asking, is the manual approach to lookahead common to most PEG parsers? And if so, why would packrat be associated with infinite lookahead?
strictfp··on PEG Parsers
My understanding is Pest doesn't use packrat, and thus doesn't have the unbounded lookahead mentioned in the article. I figure that unbounded lookahead comes with a lot of downsides, and my opinion is that Pest solves lookahead in an interesting way. It felt relevant given the focus on lookahead in the article.
strictfp··on PEG Parsers
I recently used the Rust "Pest" PEG parser, and it took an interesting approach to lookahead. It delegates the problem to the grammar writer.

For instance, you are responsible for declaring any possible branches with choice operators.

The approach becomes quite similar to manual lookahead in a recursive descent parser, but more declarative.

I presume that this makes the runtime characteristics of the parsing a lot more predictable and bounded, and I'm surprised I hadn't thought about the solution before. Seems like a great idea, and worked well for my usecase.

https://pest.rs/book/grammars/syntax.html

strictfp··on Rechargeable vs. Alkaline Batteries
Bought the IKEA charger because it was so slick and compact. Very happy with both charger and batteries, can recommend. Crazy low price as well, but to me that wasn't a factor.

Charger review here: https://lygte-info.dk/review/Review%20Charger%20Ikea%20Ladda...

strictfp··on A personal story about 10× development
This story is basically about a 10x coder and architect which acheives his 10x by belittling others by means of architecture astronauting and personal job security.
strictfp··on What's Coming in Python 3.8
Yeah, well Rust isn't exactly a success story in that regard if you ask me. A couple of weeks ago I tried to figure out how to format a float properly in Rust, and the way they made it work is a lot worse than straight up printf-style if you ask me.
strictfp··on MITM on HTTPS traffic in Kazakhstan
This is why I'm always advocating for political engagement for fighting these kind of issues. It's not exactly hard for a government to ban or forbid circumventing their monitoring. It does take time, but they're about to catch up.
strictfp··on What's Coming in Python 3.8
Also, why abandon printf-style? All languages tend to converge to printf over time, it's simply the most tried and tested model out there!
strictfp··on Why doesn't Linux apt use HTTPS?
doesntanyurlyoucomeupwithexist.com
strictfp··on China's rising tech scene threatens US brain drain as ‘sea turtles’ return home
I'm from the nordics and I when I was younger I thought of the US as the ultimate place to be.

Now, having been there quite a bit, I must say that it really doesn't impress.

The impression I got visiting the US in general (NY, Seattle, San Fran, LA), is that it all seems quite ran down, full of inequality and social problems, and lacking soul, mainly from being so consumerist.

And although I would concievebly earn a lot more working over there, the total cost of living would probably more than make up for that increase. Especially considering having kids.

My friend who is a US citizen with a well-paying engineering job in the LA area, is considering moving back. The work culture is quite hectic, and the amount of trouble they've been through with child care, insurance issues etc are making them reconsider. Not to mention that the area is super-busy and you spend a large portion of your free time in your car.

This obviously doesn't describe the entirety of the United States, but sometimes I wonder if people from the US are aware of living conditions in other western countries. I'm not so sure that the US is coming out on top any longer.

strictfp··on Developers don't understand CORS
Wait. If the resource at bank.com is protected by a CORS filter, the request which is issued at step three will have an origin header, and the CORS implementation is free to issue a 401 at that point. At least as far as I have understood. That would be tightening the restrictions. Am I missing something?
strictfp··on Former top executives of France Télécom on trial for harassing employees
The mind-twisting part of statistics is that Fat Tony is partially right. Because although each independent throw has the probability of one half, the total resulting series is very unlikely.

So you could simultaneously be at awe of the incredible improbability of throwing another heads while proclaiming meh over the 50% chance of the last throw.

It's all a matter of perspective.

← PreviousPage 9 of 25Next →