News for hackers. Stuff that matters.

AlexSW

It's not obvious to me that comparing GDP per capita is a fair comparison when talking about one country with immigration vs one without. A lot of the immigration I believe to be not so skilled. But we needed lower-skill jobs filled too.
Re:Performance of the Python 3.14 tail-call interpreter on Monday March 10, 2025 @03:57PM (#43325271)
Ah of course! It's improving the branch target predictor. Makes sense, thanks!
Re:Performance of the Python 3.14 tail-call interpreter on Monday March 10, 2025 @10:15AM (#43320894)
I'm struggling to confirm that my intuition of why the compiler optimisation is faster than the naive switch expansion.

Is it about the layout of where the assembly instructions end up, and spacing around them? Or the CPU pipelining working better? Or...?

Re:Microsoft is plotting a future without OpenAI on Saturday March 08, 2025 @03:26AM (#43298547)
There are reasons for not wanting to sell their brainchild to Musk (of all people) that don't involve money.
Re:Ask for no, don't ask for yes (2022) on Sunday February 23, 2025 @10:34AM (#43149973)
Timeline, maybe.
Re:Database mocks are just not worth it on Tuesday December 31, 2024 @09:42AM (#42558954)
Could you give an example or two of languages/frameworks that have demonstrated abstracting the transaction blocks away? I'm not sure I'm following so I think this will help.
C.f. 'git', which you probably do use and etymologically is obviously a bit rude and humorous too.
Could you link to the particular case you're referring to?
Re:Why the CORDIC algorithm lives rent-free in my head on Saturday May 11, 2024 @12:16PM (#40329021)
An error in the article.
Re:Generating Fantasy Maps (2016) on Thursday February 01, 2024 @04:52AM (#39214287)
Agreed!
Re:DNS over HTTPS is not what I thought on Thursday February 01, 2024 @04:50AM (#39214273)
Hard-coded in what? Every DoH client?
Interesting ideas and vulnerability! With a nice and concise summary. Thanks for sharing
Re:Colliding Secure Hashes on Friday December 22, 2023 @06:47AM (#38733266)
As always, it depends what properties you're relying on MD5 for. Just because something uses MS5 doesn't mean it's broken, because its preimage resistance (i.e. 'invert this hash') and second preimage resistance (i.e. 'find an input that goes to the same hash of this other input') are both not broken (yet) from a practical perspective.

Sometimes whether a cryptographic protocol relies on collision resistance can be surprisingly nuanced, so it should be phased out for this alone (and as we have better options) but for simple examples (e.g. to make a signed hash of an executable, which is probably equivalent to what you're describing) it's not broken.

Re:Effective Neovim: An Instant IDE [video] on Sunday November 05, 2023 @10:03AM (#38151700)
The overlap with VS Code is very helpful for Neovim too though, as Neovim integrates well with technologies and plugins intended for VS Code. My C++/Rust debugger setup comes from installing VS Code, getting it to install its debugger, and then pointing Neovim at it.
Or at least which country?
Re:Types versus sets (and what about categories?) on Friday September 01, 2023 @02:17AM (#37347451)
Why should one be bothered by it?
Re:"How's your PhD going?" A study on mental health on Tuesday July 04, 2023 @05:50PM (#36592954)
Presumably that the opportunity cost can be rather high.
Re:An Open Source Mouse and Trackpad Utility for Mac on Friday June 23, 2023 @01:19PM (#36449732)
+1 to BetterTouchTool! I'm mostly a keyboard person (typical 'vim' user etc.) but being able to switch tabs using a two-finger tap left and right on the touchpad is so pleasant that I find it worth the investment for BetterTouchTool alone. Configuring this for the different keybindings of different programs flexibly is really great. And it's a one-time payment including fixes and improvements - I've had it for years.
Is the scripting language based on bash (etc.)?

One thing I enjoy about fish is that it's not just a shell, but also a modern scripting language alternative to sh/bash. Seems like I would lose this with Murex?

(There's no right or wrong choice for Murex here, just that has to choose one way or another.)

Re:Why Perl? on Monday June 12, 2023 @12:20PM (#36296031)
I personally have run into breaking changes in Python's regex module, which is pretty fundamental to such uses as mentioned above.

If I recall correctly, they changed how `re.escape` worked between Python 3.6 and 3.8 (I'm not sure which minor change exactly) in terms of which symbols received a backslash before them, thereby breaking my code.

Re:Notes apps are where ideas go to die. And that’s good on Thursday June 01, 2023 @03:35AM (#36148467)
Where are you running into problems which require these mathematical techniques? I don't ever recall wishing I'd memorised any of these.

For context, I did a Maths degree, so I'm familiar with them all. I just never find myself needing them.

Re:Writing Python like it's Rust on Sunday May 21, 2023 @05:50AM (#36019347)
I don't think this is a completely accurate comparison, as TypeScript is transpiled to JavaScript and this provides restrictions to the expressibility and usability of types at runtime, which I've sometimes hit my head against. C# has much more type information available at run time, as does Python.
Re:First Rust Code Shows Up in the Windows 11 Kernel on Saturday May 13, 2023 @02:33AM (#35926166)
How so? I believe I understand Windows' thread scheduler and this conclusion isn't obvious to me at all; from my understanding it seemed perfectly reasonable.
Re:Neovim 0.9 on Friday April 07, 2023 @10:04AM (#35481684)
I think that, strictly speaking, this cannot be entirely true, as VS Code gets language support from the same place that Neovim does - namely from LSP servers. VS Code simply packages these up in extensions, whereas in Neovim you need to install them. Plugins exist to automate this entirely - see Mason. Yes, it is all plugin-based, but this is as opposed to extension-based VS Code.

Some of the VS Code extensions provide some nice added value, such as LLDB debugging for C/C++ and Rust, but you can actually get this in Neovim, you just need to install the extension in VS Code and then point to it from Neovim. If you dig around, you can see this in my dotfiles, linked in another comment. And this is only an issue for debugging compiled code to give nicer variable information for e.g. strings, which is quite specific.

I've also found Microsoft's recent move to Pylance from Pyright has meant a few small things aren't there for Python, which admittedly was disappointed, but again, broadly this isn't an issue at all.

Otherwise, I've not found this issue with Neovim at all.

Re:Neovim 0.9 on Friday April 07, 2023 @09:34AM (#35481411)
OP didn't reply, but here's my set of dot-files in case you still wanted to have a gander at someone's. You can find the Neovim configuration in the neovim directory.

https://github.com/AlexSWall/dot-files

Re:Neovim 0.9 on Friday April 07, 2023 @09:31AM (#35481391)
What did Vim give you that Neovim didn't provide?
Re:It's probably time to stop recommending Clean Code (2020) on Saturday February 18, 2023 @12:41AM (#34844257)
Which SOLID principles have you found issues with, either theoretically or in practice? They still seem like broadly sensible principles to me.
Re:Ask HN: What's your proudest hack? on Monday December 12, 2022 @07:18PM (#33962606)
How did you get it out of RAM so cleanly?
Re:A list of advanced math tricks by Terence Tao on Monday December 12, 2022 @12:58PM (#33957832)
Glad it made a bit of sense! But that's a fair point about whether it really constitutes 'understanding'.

I suppose it's equivalent here to whether knowing the meaning of a particular sentence in the alien language qualifies as understanding it, vs being able to meaningfully speak about it in this alien language, and use the sentence in a conversation. Seems like just semantics to me.

Re:A list of advanced math tricks by Terence Tao on Monday December 12, 2022 @11:16AM (#33956361)
I think you're getting at the point with this though:

> I actually wouldn't have figured it out if he hadn't pointed out this is induction.

A lot of these other ones are not that complicated either, it's just hard to parse and sometimes requires a small bit of math knowledge, which I think is within reach if you're familiar with induction and would only take e.g. a minute for you to understand if someone explained it (ideally with a blackboard than in text).

Some of those are definitely nonsense to me. But, to put my money where my mouth is and to give some examples (as you spent the time to type that out), 'invariance under linear combinations' just means that, if something holds for f(x), then it holds for 2f(x), f(x) + 10, etc. (these are all linear combinations). So then saying 'suffices to check basis elements' means 'just check f(x), and the others all fall out for free'.

As another example, convex combinations: Google 'convex hull' for images, but basically this one is just saying just check the 'extreme elements', i.e. the 'corners' at the boundary, and everything in the middle falls out for free because we have 'invariance under convex combinations'. A convex combination here is just a some point in the middle of these extremes.

While these may not be immediately obvious when reading them, the pictures or ideas are actually sometimes quite simple.

I hope that helps.

Older »