Hacker Newsnew | past | comments | ask | show | jobs | submit | disposedtrolley's commentslogin

Agreed. It also requires that you unlock your phone.


The Wallet app prompts you to set this up when you initially add the transit card too, IIRC.


It’s also enabled by default now if I remember correctly.


Same in Berlin. I think the reasoning is that it'd cost more money to fit ticket gates compared to loss of revenue from fare evaders.

Makes for such a smooth journey as most people are doing the right thing.


In Germany you now just get the Deutschlandticket and take every bus, tram, metro or regional trains anywhere.


> This is thankfully mostly solved now by AI.

How did you solve this with AI?


They said “mostly”. AI solves 90% and then you solve the other 90%.


Lol. On almost every post someone comes in to say that $problem was easily solved by AI. Usually out of the whole context of the thread.

Snake oil level comments.


What is the 90%?


I had it read all of the emails find which accounts were associated with the old email and then go switch them to the new email. I only had to manually intervene for 2 accounts out of 36ish.


The premise of that article is neat, but it looks to be entirely LLM-generated (in addition to the header image) that it’s almost impossible to read.


I did notice that, and the other article I have saved about setting up Ollama on a Macbook Air is even more clearly AI. But I'm assuming/hoping the author had an LLM generate it from their notes/Github project.


I wrote a rudimentary autopilot in Go that used a Kalman filter to maintain straight and level flight. It was a fun exercise!


And I wrote one in Python to climb/turn as well! And to navigate to any of the built-in X-Plane navaids -

https://austinsnerdythings.com/2024/04/06/adding-track-follo...

and the first post in the series -

https://austinsnerdythings.com/2021/10/15/creating-an-autopi...


Nice! I’m writing in C this year too, although I’m very much a beginner in C.

What kinds of optimisations have you had to do? Are you hosting your code anywhere?


For doing it in C, by far the most useful thing you could do is implement your own generic hash table. Having a good hash table handy makes things a lot easier. Though since you're a beginner you might want to find a good library for it at first. Writing a hash table is great C exercise though, so I definitely recommend doing it at some point.

I don't necessarily want to share my github as it contains my real name, but I'd be willing to send you a tarball of my 2020 code tomorrow if you send an email to mtlmtlmtlmtl at pm.me

I've just now started on day 1 for this year, so no code there yet worth showing off.


I think I understand how to build a hash table except for one thing: which hash function should you use? Is there a simple one that’s good enough for most things? How do you pick one?


You would write your hash table constructor to accept a hash function as a function pointer then pass in the appropriate hash function for whatever the key type is.

You can use the same hash function for any arbitrary struct as long as there's no pointers in it. If there are pointers, you'd have to implement one combining the hashes of all the members through something like xor. I used fnv1a_64 for my hash function in AOC 2020 which is a pretty good general choice for strings and other contiguous objects and is just 10 lines of code. Pseudocode on Wikipedia or I'm sure you can find C code on Stackoverflow. Hope that helps :)


if your hash table is a really good modern open addressed hash table, something like Google's Swiss Tables, you need a really good hash because you will be badly penalised otherwise, these modern structures demand a hash with proper behaviour for even halfway reasonable performance.

If it's just a My First Hash table with closed addressing, buckets etc. you needn't care too much. If you're hashing integers, just use the integer itself, that's a terrible "hash" but with this like 1980s data structure it's good enough.


A lot of the time if the key is an int however you can get away with an array assuming the range is reasonably small.

Worth noting that for AOC I got by just fine with the simplest possible bucket based implementation.



I can recommend a podcast set there if you’re after more Svalbard-themed entertainment!

https://thewhitevault.com


I love browsing the Strange Loop channel on YouTube. So many interesting topics that you wouldn’t normally search for!


Yes, but you'll also need space for a rack and contend with noise, heat, and electricity usage.

Don't get me wrong -- I love my Dell R730xd but it's definitely a commitment.


Fujitsu TX100 s3, TX120 s3, Dell ML110, HP microserver series are little towers, quietish (you can change out the fans to make them practically silent).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: