HNHacker News
TopNewBestAskShowJobs

m1el

1,120 karma · joined December 30, 2014

submissionscomments
m1el··on The coolest way to generate combinations (2009)
The pseudo-code is relatively easy to implement, but it's better to rename the variables.

https://gist.github.com/m1el/6016b53ff20ae08712436a4b073820f...

m1el··on U.S. workers have gotten less productive – no one is sure why
https://www.smbc-comics.com/comic/productivity-2 Mystery solved by an comic author with economy degree :)
m1el··on The computers are fast, but you don't know it
> if a developer can reason about the state changes of their app without redux, they should do so if there are performance concerns. Right?

That is correct :)

However, I'm not sure how many developers will be able to maintain the project and keep the invariants implicitly ingrained in the codebase by the smart developer who can reason about mutable state changes.

m1el··on The computers are fast, but you don't know it
Hi, I believe I understand you. If you look at immutable data structures implemented using JS primitives, it will surely look terrible. However, there's a lot of benefit to using a FP approach like Redux.

It's much easier to reason about state updates if all you have is pure functions. It allows you avoid very annoying and hard to catch bugs. I've seen this personally, when replacing a spaghetti component with a straightforward `useReducer` hook.

Unfortunately, we don't really have a performant way to express this pattern in JS (or even in other languages?). You could use something like elm-lang, but it's not as widespread.

m1el··on C#: IEnumerable, yield return, and lazy evaluation
Cross-pollination of ideas is a good thing.

The only problem, what if your language adopts an idea which prevents you from having a better API?

As far as I know, coroutine/generator doesn't prevent you from doing anything.

m1el··on Nano98: Windows 98 that boots and runs under 5MB (2003)
Thanks, this seems like a good source of information!
m1el··on Nano98: Windows 98 that boots and runs under 5MB (2003)
I wish this was possible today. But I won't get a small Windows 10 distribution no matter how hard I try or how much I'm willing to pay.
m1el··on Google Drive bans distribution of “misleading content”
Name calling implies I applied a label to a person, I didn't apply any label to a person.
m1el··on Windows 365 Cloud PC
> This approach creates a fully new personal computing category, specifically for the hybrid world: the Cloud PC.

Cloud computing is the antithesis of "personal computing", you lying asshole.

m1el··on Audacity may collect “Data necessary for law enforcement, litigation” and more
Yes, it does build.
m1el··on Audacity may collect “Data necessary for law enforcement, litigation” and more
Hey, just wanted to tell you that the code you have currently doesn't compile.

`SentryHelper.h` is required for `ADD_EXCEPTION_CONTEXT` macro, which can be empty. `HelpMenus.cpp` has a syntax error in preprocessor directives and an extra comma.

m1el··on Second-guessing the modern web (2020)
> ALL of them suck. ALL of them are incredibly hard to lint, test, get right. They scale badly. They're all awful.

Hard disagree. Lisp family of languages have tree templates that are easy to lint, test and get right. They also scale as well as- or better than React.

See: https://github.com/yokolet/hiccup-samples

m1el··on One man’s fight for the right to repair broken MacBooks
You may also find people murdered by words, yet no charges for murder.
m1el··on One man’s fight for the right to repair broken MacBooks
> Is the seller paying for the manufacture of these parts, or is Apple.

I don't know the actual situation, but let's say for the sake of argument;

- Apple pays $1M to make 1M chips, with the contract that forbids making these parts to sell third parties.

- A Shenzhen shop pays $15K to make 10K of the same parts, the manufacturer breaches the contract, violates Apple's IP and makes extra parts for the shop. None of this involves "theft" in any meaningful sense of the world.

m1el··on Performance Showdown: Rust vs Javascript (2020)
After reading this blog post, I had a question: why doesn't it take less than millisecond in Rust code? And the answer is that the author allocates a string for each character, and does more allocation by calling to_uppercase/to_lowercase. There's a hundredfold improvement in speed by using char or u8 to iterate over a string.
m1el··on A modern tool for the Windows kernel exploration and observability
You can look at process SID (security identifier), which should give you info about the user.
m1el··on Show HN: Tiny 1k Rust binary on Windows
Can you, though?

Compiling that source on Windows using visual studio produces a 98K executable.

m1el··on Re-Thinking the Desktop OS
I sincerely can't tell. I tried reading what is it about, and 6 years later I still don't understand what is it about.

If you feel like it, please tell me if I'm missing anything:

https://urbit.org/understanding-urbit/

> 1 - Technology

Well, step one is explaining the brand new VM and OS built on top of it. Non-starter. Then explanation follows by claiming global IDs, allocated using a blockchain.

> 2 - User experience > We want Urbit to be a single, simple interface for your whole digital life. > A picture of nokia 3110 signifying OSv1, > iPhone v1 signifying OSv2, > and a blank space, signifying the supposed new OS version 3

What?

I've re-read the entire website multiple times and I'm yet to understand the problem they're trying to solve, or lessons I'm supposed to learn.

Maybe it's me, maybe nobody just told me that I don't understand new technology. But this seems like an elaborate toy for nothing.

m1el··on Re-Thinking the Desktop OS
Sometimes when there's a discussion on alternative operating systems, people bring up Urbit. Urbit advertises itself as an OS with simple foundation: Nock VM. Here's the entire specification for Nock: https://github.com/urbit/urbit/blob/master/doc/spec/nock/5.t...

You may notice that there's barely any English in this specification, or even examples. But that's not the main problem. The main problem for me is that this VM lacks support for arithmetic operations. Well that's not quite true. It has all the necessary components to support arithmetic operations: it has comparison and increment. Congratulations, now go build your own Peano from scratch.

The author claims that this is not a problem! The VM will optimize your increments in the loop to subtraction, and it will optimize those nested loops to multiplication and division. But now you have an even worse problem! How the hell are you going to detect that a loop is a subtraction?! It's a halting problem hard task. So instead what you end up having is a VM with an informal specification, and if you stray away too much from it, your program is going to run hundreds of loops just to subtract two values, which means the program may boil up the oceans until it finishes.

And if you're being so smarty-pants about increment and equality being sufficient for arithmetics, why not use Church numerals? That's an even simpler foundation that the Nock VM!

https://tromp.github.io/cl/Binary_lambda_calculus.html

m1el··on Extracting ROM constants from the 8087 math coprocessor's die
> while others (such as log2(3)) are more puzzling.

> I'm a bit puzzled why the 8087 doesn't need the constant log2(1 + 2^-1)

log2(3/2) = log2(3) - log2(2) = log2(3) - 1

Problem... solved?

m1el··on End-to-end encryption in the browser
I can build a native app from the codebase myself. I can be sure that a native up won't change in-between launches.

> In any E2E context you have to trust the client code.

I don't have to trust code which is continuously being delievered from the server. This is an intractable problem.

m1el··on End-to-end encryption in the browser
And how can I be sure that the code delivered by the server is the same code as in the public codebase?

Nothing stops the owner of the service to run arbitrary JavaScript in Users' browser.

m1el··on End-to-end encryption in the browser
I appreciate the effort, but this is one of those cases in which there isn't much security added by encryption.

If I assume the website owner is malicious (or subverted by powers that be), I cannot trust the JS code provided by the website. Key disclosure is as trivial as one line hidden somewhere in megabytes of JS code delievered from the server. Which makes "end-to-end" part nearly meaningless.

m1el··on Creating a Pencil Effect in SVG
I've seen several pencil-like textures, and this one looks great! Thank you for sharing this effect.

Also TIL SVG has displacement maps and noise.

m1el··on Ray Tracing Essentials, Part 1: Basics of Ray Tracing
When you shoot a ray from camera perspective, you've already chosen which pixel it's going to contribute to. "Platonic" pixels are infinitesimally small.

In reality, pixels on the screen and camera sensor have an area. If you choose a random position on that area, you get anti-aliasing "for free" because there's going to be variation in the direction of rays that contribute to the same pixel.

m1el··on An alternative argument for why women leave STEM
Great question, and there are multiple explanations that can work, although I disagree with the previous poster:

There is more than one hierarchy of competence. For each occupation, hobby and skill there's it's own hierarchy. So if there's ~30 hierarchies, approximately half of competitors are going to be in top 2% of at least one.

Edit: and if we're talking about purely monetary measures, have a read: https://www.wsj.com/articles/SB10001424052748704409004576146...

m1el··on Floatplane – Linus Tech Tips launches their own video hosting platform
An example where this might be appropriate: using font icons. Selecting an unusable unicode character is not what most users want.
m1el··on Floatplane – Linus Tech Tips launches their own video hosting platform
To anyone who makes sites like these, please consider removing the following CSS rule:

https://i.imgur.com/RWqwd0P.png

Thank you,

-- someone who thinks selecting text is not something you should screw with.

m1el··on When XML Beats JSON: UI Layouts
> So why does it need to be wrapped in a format that's verbose, underspecified, doesn't have comments, doesn't have namespaces and doesn't have any notion of metadata?

Because the OP article doesn't even consider s-expressions, so I'm working with the tools I was given.

Personally, I find it frustrating that EDN (or some other form of s-exprs) aren't widely adopted.

m1el··on When XML Beats JSON: UI Layouts
> The first argument is the name of the element, but what is the second one?

If the second argument is an object/dictionary, it's attributes. Otherwise, it's the first child. Alternatively, the ambiguity can be resolved by using null/0 instead of empty attributes.

← PreviousPage 2 of 7Next →