HNHacker News
TopNewBestAskShowJobs

chartreusek

46 karma · joined November 10, 2016

submissionscomments
chartreusek··on The PocketReform is a made-in-Berlin Linux handheld
Some people actually prefer that layout too, it's an orthographic layout, which is likely less confusing that the slightly off layout of the full size reform. On the full reform the second row is 1.5 units over rather than 1.25, and the third is 2 units instead of 1.75. It messes you up a little at first, but you get quickly used to the layout and even switching back to standard is not an issue.

Many handheld devices in the age of physical keyboards used grid aligned qwerty keyboards, so it's not unique here.

chartreusek··on The PocketReform is a made-in-Berlin Linux handheld
Besides safety they have the added benefit of significantly longer lifespans (charge cycles) compared to Li-ion. The downside being their lower capacity. The high capacity LiFePO4 in the reform are current 1800mAh (it might be 2000 on the new cells they swapped to after supply issues of the originals). Which is fairly low for a 18650, but not terribly worse than the 2500-3000mAh of li-ion 18650 cells.
chartreusek··on The PocketReform is a made-in-Berlin Linux handheld
It is, just like the regular full sized MNT reform. You can reprogram the keyboard firmware (or even get a different PCB made as some people have done for the regular one). Part of the limitations on the layout is making it fit in a standard size while using off the shelf keycaps. The full sized reform only uses 1u and 1.5u key caps so the row spacing is off, but it eliminated having a bunch of odd sizes. Which also meant the space bar was split in two. Honestly for such a small device there's always going to be compromises in the keyboard. Either excessively small keys, or non-standard layouts. Just look at any of the UMPC offerings from the late 2000s, the Pocket CHIP, or even more modern ones like the GPD handhelds.
chartreusek··on Reverse engineering Skifree
One of the reasons that they prefer not to have them linked here is that the discussion inevitably boils down to "why did they post this on twitter as a thread instead of making a blog post and writing it out long form." As well as complaints about them getting distracted.

It's just that the community here tends not to like twitter threads, but likes the content.

chartreusek··on Firefox on Ubuntu 22.04 from .deb (not from snap)
You can install a sysvinit based stock debian if you wish. I've done it a few times recently, on low memory systems (<512MB) it does make a noticeable difference. It's mostly supported in terms of running, though the install is a bit manual:

https://wiki.debian.org/Init

There's also instructions for converting a running system, but I've had no luck with that. It just resulted in an unbootable system for me as it couldn't fully remove systemd there.

chartreusek··on Dos-like: Engine for making things with a MS-DOS feel, but for modern platforms
Took a bit to find it, but the license for the library is given at the bottom of dos.h

It's available under either MIT or Unlicense (public domain)

chartreusek··on GitHub scraped your code. And they plan to charge you
Sure, but there's still the license at play here. It's not like they trained it only on public domain/CC0 code. What happens when it verbatim outputs a significant amount of code that was originally MIT, or BSD, or GPL licensed without the appropriate attribution. It can create unintended copyright violations and potentially open people using it up to liability.
chartreusek··on C, C++, x86/x64 assembly: The case of forgotten return
It's definitely there to retain some backwards compatibility with existing K&R C programs. Though it does still somewhat exist in the C11 standards.

From 6.9.1 - "If the } that terminates a function is reached, and the value of the function call is used by the caller, the behavior is undefined"

Though 6.8.6.4 also says "A return statement without an expression shall only appear in a function whose return type is void"

So it seems like a non-void function hitting the end of the block without a return statement is allowed (provided the value isn't used). But having a "return;" in that function would not be in C11.

chartreusek··on C, C++, x86/x64 assembly: The case of forgotten return
Since the article is talking about C/C++

In C reaching the end of a non-void function is not undefined behaviour though. It's equivalent to ending with a return; However attempting to use the return value of that function is undefined behaviour. It'd be fine to have that warning be an error when compiling for C++, but not for C.

C89 3.6.6.4 (http://port70.net/~nsz/c/c89/c89-draft.html#3.6.6.4): "If a return statement without an expression is executed, and the value of the function call is used by the caller, the behavior is undefined. Reaching the } that terminates a function is equivalent to executing a return statement without an expression."

chartreusek··on Google to add 'news feed' to website and app
Didn't they try basically this before, then had it fail and discontinue in the form of iGoogle(2005-2013)? The idea of google going back to that is just nuts.

At least DuckDuckGo has got the search page concept right.

chartreusek··on C puzzles

  main(a,b){if(puts(*(int*)b)){}}
Needs to be compiled as a 32-bit program, and the executable renamed to Hello\ World!

:)