HNHacker News
TopNewBestAskShowJobs

TheNewAndy

497 karma · joined August 3, 2010

submissionscomments
TheNewAndy··on Cloning a Laptop over NVMe TCP
Linux ships with all the drivers installed (for a fairly high value of "all") (typically)
TheNewAndy··on Does anyone have to do software development on airgapped sysems at work?
I do most of my non-work development on a non internet connected computer purely because I do it on a train. It isn't strictly airgapped, but I did develop an iOS game nearly entirely this way (with the very final steps needing to be done online, and also on an apple machine)

Things that I find:

- I develop primarily in C, so I have man pages for the stdlib accessible

- I try to rely on header files for documentation of other things, and find them to be far better than things like auto generated documentation or even manually written guides

- For algorithmic style things, I don't like to implement things without understanding, and to me that means being able to have them in my head to a good enough standard that they can be implemented without needing to be online. e.g. one of the sounds in my game is made by a physical model of a string, and while it is not the best synth that has ever been made (in fact, it is pretty bad), I definitely understood it enough to get something plausible without needing references

- There are things that I suspect would be quite difficult to do offline. Maybe they are just the things I am unfamiliar with, but I suspect that some project types are just harder to do offline

- You tend to accumulate useful documents on your Dev machine. Keep these organised as it turns out to be very nice to have on other machines. Language specs, file format specs, protocol specs etc

TheNewAndy··on DVD's New Cousin Can Store More Than a Petabit
At least historically, the definition of "byte" has been "the smallest addressable unit" which on most of today's machines is 8 bits, but not all (I believe the SHARC floating point DSPs are still 32-bit bytes, and there are probably more). Using bits for things makes sense from this perspective as the number of bytes would depend on which processor it is connected to.

I know that these days people consider that a byte is 8 bits by definition, but I think that probably isn't a great linguistic move (we already have a word for that - octet)

TheNewAndy··on Purism Liberty Phone to Be Featured in Orpheum Films Collaboration
Careful with this company. Do some research before buying anything from them so you know what you are getting into. Still waiting for my refund...
TheNewAndy··on A Love Letter to Tinkerable Software
I believe the intention of those was that it was actually a "slow down" button just with enhanced marketing. But when you played an old game which was designed with no frame limit cap, you could slow the game down to a playable speed with the button.

Unfortunately, I had no such button on the family computer, so many games were unplayable because of our speedy 486SX33

TheNewAndy··on Cold-blooded software
Depends if you mean python the interpreter or python the language. e.g. pypy still supports python2 and has "indefinite support" or something along those lines.

Even the cpython2 interpreter is no longer supported by the original authors, but that doesn't stop someone else from supporting it.

TheNewAndy··on Lessons from debugging a tricky direct memory leak
If you have a memory leak, then take a process that has been leaking for a while and look at its memory. Just pole a few places at random and statistically you should quickly find what is leaking. I am pressure this would have cut down a lot of the investigation needed in this story (though it is always easy to say this kind of thing after the biug has been found)
TheNewAndy··on The largest number representable in 64 bits
Thanks for your reply - and I probably would have missed it except by complete chance.

I still don't think it has properly clicked, because the function "f(x) = xN" still needs me to know what N is - despite it being an integer.

For example, let's suppose that you manage to have a conversation with God and you discover that BB(100) has the value of 42, and Chaitlin's number is 1/2.

Does Chaitlin's number suddenly become computable? My intuition is that it remains uncomputable, but maybe my intuition is wrong... I guess by the definition, it is computable, but you can't prove it.

I'm also struggling with the reciprocal of BB(100). This is rational, so maybe it too is computable.

I guess I am struggling with the lack of a constructive proof and what that means - it is like we are saying "there exists an algorithm to do X, but the algorithm can't be known", and maybe that is the core of me being wrong - we can prove that such an algorithm exists, and so 1/BB(100) is computable just like BB(100) is computable 0 but every time I write this down, I still can't see how this logic doesn't also break down with actually non-computable numbers. e.g. "There is a function f(x) which returns an integer, I can't tell you what the integer is, but it is the one that results in showing that Chaitlin's number is computable"

Anyway, if you notice this and do reply, then very much thank you - and apologies if your reply goes unread

TheNewAndy··on The largest number representable in 64 bits
I believe you are correct, however I am struggling to see how.

If you have the time to help me with my understanding then I would appreciate it.

I'm looking at wikipedia's formal definition, which says that for x to be computable, you need to provide a function from naturals to integers such that if you pick a denominator of a fraction (n), this function can give the numerator such that (f(n)-1)/n and (f(n)+1)/n end up straddling the value which is computable.

So, for an integer N, you make f(x) = xN then (f(n)-1)/n = N-(1/n) and (f(n)+1)/n = N+(1/n).

Therefore, for any integer N, it is computable.

Now, what is stopping me from doing something similar with a real?

If I say: f(x) = floor(xN)

Now (f(n)-1)/n = floor(n*N)-(1/n)

It is at this point where I realise I need to go to bed and sleep. If you see this and have the time to explain to me where it falls apart with reals, then I will be most happy. To be clear - I'm quite sure I am wrong, and this isn't me being passive aggressive about it.

TheNewAndy··on The largest number representable in 64 bits
What is the 100th busy beaver number? I believe this is an integer, and I also believe it is not computable
TheNewAndy··on Ask HN: Thoughts on buying a real set of Encyclopædia Britannica
I know one person who did something like this, and I don't think they ever actually followed through on doing the reading part. I don't think encyclopedias are even supposed to be read that way - so based on the sample size of 1, then I would say don't do it.
TheNewAndy··on CWE Top Most Dangerous Software Weaknesses
I use valgrind regularly, and prefer it over asan. asan will result in a faster executable which is nice, but I far prefer valgrind's output than asan's (this might be preference, but I find it to be clearer), and various things break when building with asan so I never make it default. Being able to valgrind stuff without recompiling is very convenient.

I'm also not sure if asan has an equivalent to --leak-check=full

TheNewAndy··on Fulfilling a reader's request for my “dot files”
I am not the author, but I imagine that it could have started out as just a preference, but turned into great hatred as they kept on being introduced in more and more places. I don't mind colour, but really dislike incorrect colouring (not enough to any effort to do anything about it). Or maybe she really likes colour, but likes to use it very sparingly so it highlights things more effectively. I think there can be plenty of reasons, and I would be unsurprised if her reasons are ones that I guessed
TheNewAndy··on Strlcpy and Strlcat – Consistent, Safe, String Copy and Concatenation (1999) [pdf]
I've never understood the circumstances where it is ok for a copy/concatenate operation to also include a bonus "truncate the result" operation at the end. I'm a believer that you should use strcpy and strcat, and also make sure your buffers are large enough. If you can't make them large enough, then you can't do the operation you are trying to do (and I would say that doing it incorrectly via truncation isn't obviously better since this seems like silent corruption to me)
TheNewAndy··on Ask HN: Most efficient apparatus in kWh/liter to extract water from atmosphere?
Rain water tank?
TheNewAndy··on The Lapdock Kit
Be wary of ordering anything from them. My order from 2019 is now ready to ship, but I have since changed my mind and asked for a refund instead. That was about a month or so ago, and while their words assure me that they will do it, they have refused to provide even an ETA for it.
TheNewAndy··on What does it mean to trademark a color?
Another example would be cadbury (chocolate company) and another shade of purple. It makes sense - if you go into the shops and see a wall of purple, it is nice if you know what this actually represents, and don't have all the different brands converging on the colour of the most popular brand.
TheNewAndy··on The C free() API means memory allocation must save some metadata
I don't think this is necessarily true. You could just have malloc() bump an allocation pointer by the size, return the pointer pre-bump, or return NULL if we run out of space. Then free() can do nothing.

If you decide you want to have a malloc/free implementation that isn't as garbage as that, then you need some way to ensure malloc() does not ever return a pointer to memory that was already handed out - and I would argue that the book-keeping for this is this metadata being talked about. Even if free() took a "size" parameter, this would still be needed.

TheNewAndy··on The MiniDisc deck you hoped to never see [video]
From memory, you could end up fragmenting things, and I think this would typically result in losing some of the capacity of a disk.

I think people would do a disk to disk dub in these situations as a form of "defrag" operation.

You could also get an 80 minute disk, put it in a recorder and get it to read it, then sneakily swap it with a 74 minute disk without letting the recorder's eject switch trip, then force a TOC write, and you would be able to upgrade a 74 minute disk to an 80 minute version.

TheNewAndy··on Ask HN: PC working/processing so much harder on low data connection, know solve?
Speculation, but are you sure it isn't the other way around, and something is chewing up your CPU time, which is then turning into the bottleneck. If you did profiling to actually determine where the CPU time was being spent, then you would probably be able to make a more educated guess.
TheNewAndy··on USB-C hubs and my slow descent into madness (2021)
I have used the dock with windows and Linux machines and seen solar issues btw. So I would expect the same with an Intel mac
TheNewAndy··on USB-C hubs and my slow descent into madness (2021)
It is missing Ethernet, which seems to be important to the author.

Having heard positive things about caldigit, I got their USB-C Pro Dock and I get frequent screen blanking with my M1 Mac, and often some of the USB ports fail to work. I don't use the ethernet port, but I think it is a Realtek (so likely the same thing the author is complaining about)

I have spoken to caldigit support and so far they have replaced the dock once, and now have gone pretty quiet.

TheNewAndy··on Librem 5: First Impressions
Have you seen how thick the librem 5 is? I think it is think because of the two m.2 slots in it, but I don't think you would want it any thicker.
TheNewAndy··on Vanced has been discontinued
I'm not a power user, but I have found this combination works well:

Firefox + uBlock Origin + Video Background Play Fix

uBlock Origin -> removes the ads (but no sponsorblock) Video Background Play Fix -> lets you turn off the screen or switch tabs with it still playing

TheNewAndy··on Why Apple’s new M1 chips are essential for rapid iOS development
With the amount of cash apple has, it very much is about bothering. They have the resources to make their development tools not terrible, but instead they seem to be investing in... cash for a rainy day.
TheNewAndy··on Why Apple’s new M1 chips are essential for rapid iOS development
You are correct. It is frustrating because clearly it can be hardware accelerated, just Apple hasn't really bothered themselves to do this
TheNewAndy··on Why Apple’s new M1 chips are essential for rapid iOS development
One thing that is surprisingly slow on the M1 is running an OpenGL ES application in the simulator.

I developed a game on a shoestring budget, and hoped that an M1 would be able to be used for capturing video of the game at the resolutions that Apple wants, but it was way too slow to be able to do this, so I had to just leave video out of my store page.

The same app run on your M1 mac with its iOS compatibility works completely fine (as it should, it is a 2d game with about 10 sprites that just get drawn with scaling and no rotation).

TheNewAndy··on Vanced: YouTube adblocker for Android
I used to have no adblockers on anything, and I was fine with it. Then I had kids, and I wasn't really comfortable with bringing them up in an environment where when you tell a computer to do one thing ("Play this video") it does a different thing ("I will do that, but not before I do what I want to do"). There are a few websites that have ad supported videos that I am ok with my kids watching, and putting uBlock Origin on the computers means that when I tell my computer to play videos from those sites, I know that it is going to do just that, and I won't have my kids being manipulated by stuff they don't understand.

Ads in software are just a case of a computer not doing what you have asked it to do. It has always been ok to ignore ads - putting them on computers does not make them special in any way.

This is just my parenting, and I can imagine that other people want their children to value other things - and I might change things as they get older so they can understand how the ads work. Right now, they are not ready for that.

TheNewAndy··on Vanced: YouTube adblocker for Android
I use firefox + uBlock Origin + <some extension I can't remember the name of that lets videos play if it goes into the background>. Is there something I am missing out on?
TheNewAndy··on DarkPattern.games: Find Healthy Mobile Games
I made a game for touchscreens, and a single pixel of "error" in input could be the difference between winning and losing. The game will cheat behind the scenes to try a few variations on your inputs to see if any of them can win - and it chooses the winner if it finds one.

I don't really consider this to be cheating though - it isn't like a person is capable of doing pixel perfect inputs to a touchscreen, nor is a touchscreen going to give pixel perfect finger positioning.

← PreviousPage 2 of 7Next →