HNHacker News
TopNewBestAskShowJobs

TheNewAndy

497 karma · joined August 3, 2010

submissionscomments
TheNewAndy··on Can you make a basic web app without Googling? I can’t
I developed most of my iOS game without internet access (I did it mostly on a train).

I actually did this twice - once using a Mac, xCode, swift, and spritekit. Then the exact same app again using a Linux machine, text editor, C, and SDL2.

Doing things in C was far better - I just opened up the relevant SDL header files when I needed information, and was able to get basically everything non-iOS specific up and running without any internet.

I definitely drew on a fair bit of experience and hunches (e.g. writing audio synthesizers from scratch often involves picking a bunch of magic numbers, and if you pick them wrong it can sound completely awful).

Now I have a mac laptop again, I still would lean towards C+SDL2 over swift+SpriteKit (though I do continue to experiment).

TheNewAndy··on Any Monotone Boolean Function Can Be Realized by Interlocked Polygons (2010)
... and from memory, it does include sliding tile puzzles like from this paper.
TheNewAndy··on Any Monotone Boolean Function Can Be Realized by Interlocked Polygons (2010)
If you enjoy this kind of paper, then I highly recommend this book:

https://www.routledge.com/Games-Puzzles-and-Computation/Hear...

It has a huge number of examples of how to build similar gadgets using lots of different kinds of games.

TheNewAndy··on Any Monotone Boolean Function Can Be Realized by Interlocked Polygons (2010)
See also:

https://arxiv.org/pdf/1203.3602.pdf

You can also encode any monotone boolean function by hanging a picture on the wall on N nails (one nail per variable).

e.g. a "normal" hanging of a picture on two nails would encode an AND gate (it only falls if both nails are removed). But by twisting the string the right way, you can make it encode an OR gate (so it falls if either nail is removed).

TheNewAndy··on Rust is now overall faster than C in benchmarks
The poster you are replying to didn't suggest hardcoding intcmp into qsort - just making it so the implmentation of qsort is available to the compiler when the comparison function is known (i.e. just like with C++).

When this is done, the compiler can inline qsort, and replace the indirect function call with an inlined version of intcmp, and then things are equivalent.

TheNewAndy··on Ask HN: What's a side project you built to make money that hasn't?
Sorry about that. I am (probably overly) cautious of tax implications so it is currently US and AU only. Maybe I should reread the legal stuff and try to get some more places open.
TheNewAndy··on Ask HN: What's a side project you built to make money that hasn't?
Thank you so much. Really appreciated.
TheNewAndy··on Ask HN: What's a side project you built to make money that hasn't?
Sorry about that. I am hoping to open it up to more places, just being small I need to be a little bit aware of the tax implications. Having my incompetence lead to missing sales is preferred to having it lead to tax evasion.
TheNewAndy··on Ask HN: What's a side project you built to make money that hasn't?
I built this for a bit more than just "making money" (wanted some experience), and it is still early days. But I made an iOS game:

https://apps.apple.com/us/app/two-birds-one-stone/id15396463...

So far, my main win has been to qualify for the apple small business program, so I will qualify for the reduced apple commission next year.

http://ideationapps.com/ (has gameplay video and other stuff for the curious).

TheNewAndy··on Undocumented arm64 ISA extension present on the Apple M1
Yes. I have recently released my first game in the app store. It is a simple game, and so this is probably the 3rd rewrite of it.

The second rewrite was when I finally had an apple device, so I thought "I will do everything the apple way" - I used Swift and SpriteKit, and tried to do everything exactly how I thought the Apple people would like.

I then dropped that laptop, and was told it would cost more than the price of the laptop to repair, so I decided to do another rewrite - this time, using my linux laptop.

The experience of writing it in plain documented C, and using libSDL2 for most of the IO was far superior. Writing my own physics engine instead of using the SpriteKit one made the actual gameplay better (because it meant I could easily fudge physics a bit to make it more fun).

Only at the very end of the project did I then go through the painful process of making it happy with xcode, happy to build for iOS, and then finally happy with the Apple review process (including hacking my SDL build to remove bluetooth peripheral support so I didn't need to request unwanted permissions).

I now have an M1 Macbook Air, and I've briefly looked again at doing things the "apple way" (e.g. swiftui) and I'm coming to a similar conclusion.

TheNewAndy··on Dev-C++ Is a Low Memory Windows Native C++ IDE Built in Delphi
I think there is a level of familiarity bias that happens with debugging tools. I could probably get away with making gdb my login shell I live in it so much, and when I find myself using Visual Studio's debugger, I find it incredibly clunky. The things people complain about for gdb (e.g. you can't see the source code for where it is executing) I don't find to be a big deal (I just jump to the correct line in my text editor). Meanwhile, using Visual Studio is a complete pain for me, for reasons that clearly don't matter to people who use Visual Studio all the time (e.g. while possible, running multiple instances of a program side by side is annoying, quickly evaluating arbitrary expressions is more painful, setting data breakpoints is needlessly complicated (do they still ask if it is C or C++?), etc.

I think it must just be one of those things where the tool you use shapes the way you work, and so then when you switch tools, but try to work in the same way, you get frustrated.

TheNewAndy··on Dev-C++ Is a Low Memory Windows Native C++ IDE Built in Delphi
I'm not sure that Visual Studio is particularly good at debugging zig either...
TheNewAndy··on Research in Programming Languages (2012)
That is an interesting take, and it seems common in PL research (even if unspoken).

I love the formalism and "hard" maths of PL design - but if the purpose of a PL is to bridge the chasm between how computers work (i.e. machine code) and how people work, then disregarding one side of this isn't right.

The belief I previously held was that this is ok because computers don't get smarter, but you can teach people about the difference between contravariant and covariant types, and then pretty soon they will be happy scala programmers. Now I am not convinced - a simple language which fits in people's heads, and a way of leaving comments. Yes there will be bugs that don't get picked up at compile time - this happens in all languages - but the bugs that would be caught by a richer type system in another language tend to be the ones that are the easiest to fix.

TheNewAndy··on App privacy labels now live on the App Store
I think the original poster has seen an example of this, and they think apple could go further.

I certainly was surprised to see the sentence:

"Privacy practices may vary, for example, based on the features you use or your age."

I filled in the questions in app store connect recently, and since it is just a simple game without anything remotely privacy invading, I happily answered all the questions in the most "privacy respecting" way. To then see this sentence hinting that the privacy stuff might be different if people use unspecified features, or be particular ages... that is certainly a surprise.

TheNewAndy··on Show HN: Two Birds One Stone (iOS Game)
Hi all, this is my first iOS game. I have had the idea in my head for over 5 years (you can even play a version of this from back then online here http://ideationapps.com/2birds/2birds.html - but the web based version is terrible compared to the polished iOS version - not just graphically, but gameplay too). I finally had enough motivation to jump through all the hoops to get it in the App store.

There are a few other things on the site giving technical information which might be interesting too, but you can judge that for yourself.

TheNewAndy··on M1 and iOS Apps
I was trying to install my own app on my own M1 mac, and found that promo codes didn't work. This is just a post about that, and a few other assorted things I was curious about which I hadn't seen anywhere.
TheNewAndy··on Show HN: Chat bot powered by GPT-3
Me: hello?

Bot: Hey I'm here to answer your questions about Itemsy

Bot: An error occurred. Please try again.

Me: what was the error?

Bot: I'm sorry, I did not understand that. But I'm happy to tell you more about Itemsy.

Me: ok, tell me more then

Bot: Itemsy is a tool for managing the content that you read online. You can think of it as Pinterest for the things you read. You can save it for yourself, share within a closed group or publish to your followers.

Me: could I use it to share this chat?

Bot: Sure!

Me: how?

Bot: Just click the share button and choose the channel you want to share it to.

Me: where is the share button?

Bot: What do you mean exactly? Could you please try saying it some other way?

Me: you said to "just click the share button" - where is it?

Bot: I'm sorry, I didn't catch that. Could you say that again?

Me: just re read the chat

Bot: I'm happy to answer any Itemsy-related question!

Me: where is the share button?

Bot: I'm a bit confused. Feel free to ask me any Itemsy-related question!

TheNewAndy··on Blech Programming Language
In writing performance critical cross platform embedded code, I have found that exact width integer types are less useful than the "minimum width" style types you get from plain C (e.g. you can't write cross platform code with an 8-bit exact width integer type, because there is no such type on some platforms). It is disappointing to see this language provides no such types.
TheNewAndy··on Using memory errors to attack a virtual machine [pdf]
I was reminded of this when reading the comments in the "malloc geiger counter" story. Page 9 has a great photo of a computer with a light pointed at the memory to help have more bit flip errors.
TheNewAndy··on Show HN: Handwritten.js – Convert typed text to realistic handwriting
hmmm, not necessarily the same output each time
TheNewAndy··on Show HN: Handwritten.js – Convert typed text to realistic handwriting
Try "fox" in style 2 with maximum legibility. It goes loop-the-loop several times.
TheNewAndy··on Weakening Cycles So That Turing Can Halt
I feel like this is circling around total functional programming. I found this to be an accessible paper on this:

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.106...

The language it uses enforces that all recursive steps "simplify" the input, and gives a simple definition of "simplify".

Note that the language is not (nor does it try to be) Turing complete - intuitively you could imagine that there might be some level of expressiveness which is not enough to get to halting problem like levels of complexity, but enough to get "real world" complexity.

TheNewAndy··on California, Oregon and Washington announce western states pact
Instead of "mini-country", I would call just call it a group of united states.
TheNewAndy··on Pinephone – Community Edition: UBports
Haha, oscar = is = os with autocorrect.

another classic is abdicate = and = abd with autocorrect

Until recently, 22nd was 2nd = 2nd with autocorrect which was pretty bad.

TheNewAndy··on Pinephone – Community Edition: UBports
I have been using it on my primary phone since ubuntu touch was discontinued (the phone is old and originally ran Ubuntu touch).

It is has always been pretty horrible, but in a nice simple way. The bugs in it are pretty blatant (e.g. on screen keyboard covering up pictures in picture messages) and some of the design decisions seem to have been wrong (the memory management seems so much worse than just doing nothing and letting things swap to disk ).

But I prefer predictable obviois bugs over things where the system oscar overly complicated (like an ipad which refuses to install updates and constantly asks for apple id confirmation codes that never appear).

Maybe other is better woth better hardware (Aquaris E5), but I am comparing it to the nokia n9 and find ot lacking overall.

Also, the autocorrect is horrible and I typed this message on the phone. So forgive any weirdness.

TheNewAndy··on The oldest company in almost every country (that is still in business)
I was expecting to see https://en.wikipedia.org/wiki/Avedis_Zildjian_Company for USA. I suspect there is always some wiggle room in the definitions of "oldest", but wikipedia dates it as earlier than Shirley Plantation (and it is also older than the company given for Armenia).
TheNewAndy··on Meta-learning neural Bloom filters
I'm a bit confused by this (I've only read the summary that is linked to).

As I understand it, the "raw" neural bloom filter is basically a function which you can query "with what certainty can you say that item X is in the set". Unlike a classic bloom filter, it will never be able to say "item X is definitely not in the set". Once you add thresholds, this turns into a function which can say "might be a member" or "might not be a member".

So to avoid having false negatives, it sounds like they have a backup "classic bloom filter". e.g. from the summary, this is the full algorithm:

> 1. If the Neural Bloom Filter predicts membership with probability greater than the chosen threshold, return “(might be a) member” > 2. Otherwise check the secondary Bloom filter, if it indicates the element might be a member, return “(might be a) member” > 3. Otherwise return “not a member”

Assuming the secondary (classic) bloom filter is the same size as what they are comparing to, then there can't be any space savings - it is strictly an addition.

If the secondary bloom filter is smaller than it would have otherwise been, then it will introduce more false positives - and since a negative from the neural bloom filter means "listen to the secondary bloom filter", then this just means that the error can only ever be worse than using just the secondary bloom filter (since it is possible that the neural bloom filter might get something wrong that the secondary bloom filter would have got right).

TheNewAndy··on The Incredible Proof Machine (2016)
Very fun, but I've never seen proofs in this format. I would expect to see the "prerequisites" on the top of the line and the "thing that follows" below. e.g.

https://screenshots.firefox.com/uhqTk89wKMgvig3n/books.googl...

TheNewAndy··on Write tests. Not too many. Mostly integration (2017)
Not saying you are wrong, but I think your examples are all a bit interesting (in a good way):

Misspelling a key while encoding to JSON: In a system with JSON in it, the JSON part of the system I would consider to be a part with dynamic types. So, that errors can be introduced in a part of the system that is using something resembling dynamic types can be seen as the result of moving away from static types.

Adding two values where you should have subtracted: In general, this can't be detected by static typing, but there are also examples where it can (for example - try adding two pointers in C - this is a type error because only subtraction is supported)

Forgetting to log an error: Personally, I don't see this as practical at the moment, but if the popularity of rust means that linear typing because a bit more "normal" to people, then having errors where it is a type error to not use them is a possibility.

Personally, I'm a believer in using languages with simple static type systems, but pretending they have fancier type systems by the way of comments and asserts. Sure, a compiler can't check the invariant you mentioned in your comment, but with the language tech we have at the moment (and I would guess for the foreseeable future) a typical human can't understand a moderately complicated invariant that a compiler can check.

TheNewAndy··on Estimating the chances of something that hasn’t happened yet
This feels related, and is interesting:

https://en.wikipedia.org/wiki/Sunrise_problem

(estimating the probability that the sun will rise tomorrow)

← PreviousPage 4 of 7Next →