Hacker News new | past | comments | ask | show | jobs | submit | jalada's comments login

Reminds me of Spotify's post about shuffling songs: https://engineering.atspotify.com/2014/02/how-to-shuffle-son...


I actually how people do purposefully non-random randomness more interesting. Like in this article.

Video games are known to cheat a lot, usually in the player's favor. The Tetris randomizer for instance is well documented. Early games drew pieces truly randomly, but now, the standard is to draw randomly from a bag of all 7 pieces until it is empty, then repeat, limiting flood and draught. Along the way, other algorithms have been used with the same purpose.

But sometimes, even the numbers are fake, for example, a 95% success rate may be closer to 99% in reality because it matches more closely what players feel 95% should be like.


The new Baldur's Gate game has a setting called "karmic dice", where it apparently biases the dice rolls to not cause repeated outcomes as much (i.e. if you're passing checks a lot, it will start to bias towards lower results, and if you're failing checks a lot, it will start to bias towards higher results). They devs made the interesting decision to have that setting on by default, which I'm guessing is based on the experience they expect more players to want. Regardless of my own preference, I think it's pretty cool they made that an explicit setting that players can choose to keep on or turn off.


I was once tasked with creating a DVD game that was meant to randomly pick questions from its available pool. Learned lots of things about how unrandom random can be. On the lower end of DVD players, there was a stored list of values between 0 and maxInt that was randomized when created. Each call of the random function would just move the pointer to the next item in the list. This meant that it would essentially play the questions in the same order every time. I can't remember the specifics if the list was reset when loading a disc or when the player was turned on.

Turns out, the company wanting the game got scarred of some patent that invoked the word random, so we had to reprogram the thing essentially do the same as that player. We had multiple sequences of randomized questions, and the game pick one of the sequences to play back in order when started.


This reminds me of an mp3 CD player I had. I don't remember if the feature was called shuffle or random, but it played the same sequence of tracks every time. I could only fully enjoy it once per CD.


I had a CD player in my SUV that had the same problem. The only saving grace is that it could play mp3s from the CD, so I had mixes that had 100 songs on them.


I once wrote a small script (in C#) to pick a few tens out of a few 1000s. I got weird repeats. I switched to a cryptographically secure RNG, and the repeats were gone. It was probably pure chance, but I stopped using the normal random function ever since ;)


Just for curiosity sake, I looked at the standard RNG in C# and it is indeed flawed, but probably not enough to be seen unless you are doing formal tests.

In [1] it says that numbers have a 0.5034 probability of being odd due to rounding errors in the algorithm that picks a number in a range, which is unacceptable for a simulation, but may actually be better than a real coin toss [2]. The raw RNG is also flawed but not that badly [3]

[1] https://fuglede.dk/en/blog/bias-in-net-rng/

[2] https://arxiv.org/abs/2310.04153

[3] https://gist.github.com/fuglede/772402ecc3997ada82a03ce65361...


Okay, now you made me want actually look into that ;) I should be able to recreate the old code (it was years ago, but I still have the script) and make a comment if I end up actually finding statistical anomalies.


It will have to stay a mystery, looking at distribution, both algorithms looked the same.


Do you still have your original code? Finding out if the weird repeats were real, and especially why, would make a super interesting blog post.


The old code was var r = new Random() ;)

I'm assuming I either hit an PRNG bug (after all, I encountered a compiler bug in university already), or more likely, that I simply imagined the issue or bad bad luck with the data. Never did a statistical analysis after all.


It's looking dated now but I built https://www.rivered.io 10 years ago, based on the same theory, inspired by Dave Winer's discussion on the topic: http://scripting.com/2014/06/02/whatIsARiverOfNewsAggregator....


I miss the various *planet feeds. I've started but then stopped building copies over the years. Whenever I get interested I don't have time to do the work and whenever I have the time I don't have the interest.


I know there's a lot of concerns about generative voices, but it's a shame the only solution is 'insist on a live recording of random phrases'. For those whose voices have already degenerated, but who have hours of recordings available from historical sources (e.g. speech therapy sessions), it's too late to ask them to record something fresh.

Don't get me wrong, it's fantastic to see the tech being used this way. My Dad has lost most of his speech due to some kind of aphasia-causing condition and if this had been available just a year or two ago it could've been a big help for him; it's reassuring that others earlier in the journey will benefit from this.


It's not necessarily the only solution, just the one Apple has started with. My guess is that at least in part there are technical reasons, since even this structured approach will require overnight processing (source: WaPo) by Apple.

I do think additionally, in the case for a situation like with your dad, Apple would need to verify that he is the same person that there's hours of audio of. That strikes me as a difficult at Apple's scale.


Archive link for mentioned Washington Post article: https://archive.is/CPk7H


Note that article says the overnight processing is done by the device, not by Apple itself.


You may want to check out Rhasspy/Piper [0,1]. The Piper page includes training instructions.

[0] https://github.com/rhasspy

[1] https://github.com/rhasspy/piper


When I was in Paris in 2019 I tried to use their e-scooters and it was nearly impossible because angry locals had sharpie-d over every barcode so you couldn’t scan them. I’m surprised the companies haven’t left already.


Huh, that would be pretty effective I imagine, and sounds like a classic French approach to the problem, low effort, high impact.

But wouldn't the rental companies just switch to NFC-scanning? I know most of the bikes in Sweden technically have it, even though I don't think many actually use it because our QR codes aren't being defaced and it's just easier.


The QR code is usually just for easier use, you can also unlock them in the apps via selecting the vehicles on the map.


The situation has well changed since 2019.


Thanks for tip! We are flooded by these also in Prague, can't walk normal on sidewalk, as if cyclists riding on sidewalks was not bad enough.


Blame your government for not creating adequate bike lanes or curbing car usage, instead of people just trying to get around. Nobody wants to be in each others way, it's just that most of the time cyclists have nowhere else to go.


E-scooter (my own) rider from Prague: the cycling infrastructure here ranges from okay to pretty-nice-actually, and it's slowly getting better, so that's good, but there's a LOT of drunk tourists using the rental e-scooters in the [medieval, cramped] center.


nah, it ranges from non-existent (for most of the city roads/streets) to okay, most of the roads dont have bike lane at all since all available place where they could be is taken by parking spots

also there is no point for (e)scooters in Prague considering trams, buses and subway operating everywhere for less than a 0.5USD per day for unlimited travel, which is why pretty much no locals use them, they are also pretty much impossible to use in extended city center with cobble stones


Cute. My parents' house has, for a few years now, been plagued by crows attacking the windows in the early hours of the morning, dive-bombing them, standing outside them screaming, pecking them, etc. If they're not attacking the house they're on the roof or in nearby trees screaming.

The closest to a solution has been to cover every window with outside blinds to at least stop them smashing into them.

I stayed with them for a few months and was woken up by this every morning without fail. Honestly, it was pretty distressing.

I love birds and feed them in our garden (so do my parents!), but I wouldn't want to encourage crows to follow me around after that. I'm always in two minds about this tendency for humans to...humanise...animal behaviour.


I can understand that. But I figure, I live near a huge shopping mall and a golf course, built on what used to be the finest farmland for miles around. The winter flock of crows, probably many thousands strong, still come here every winter.

They're now competing with the endangered seagulls, which used to roost in large colonies on the coast, but due to predation from introduced species (mink), plastic pollution in the ocean and commercial fishing, have now decided it's better to live on the flat roofs of our malls and apartment blocks.

We're messing so much with their lives already. A little kindness on an individual level doesn't seem like it would make things worse. I try not to humanize them too much, let them be birds, let them be wild (in particular I don't try to tempt them to overcome their natural wariness at humans).


Orinoco cards were also great for wardriving, I paid a premium to get one over here in the UK (where they were way less common) with an external antenna connector on it.


Pixie Labs | Full Stack Developer (Senior Engineer) | Remote (UK-based) | Full-time | See job spec for compensation details | https://pixielabs.io

Pixie Labs is a digital product agency. We partner with organisations to design, build and launch software that brings their most valuable technology-driven experiences to life. As a senior engineer, you’ll help head up our clients’ development projects and write high-quality, reusable code whilst also sharing your knowledge and expertise with the rest of the team to help them do the same.

You may think an agency isn't for you - often it means hitting unrealistic deadlines imposed by clients, or writing terrible throwaway code just so the company gets paid. We're not like that; we focus on delivering at a sustainable pace and working closely with our clients to manage expectations. You can see for yourself how we manage and deliver projects in our handbook: https://handbook.pixielabs.io.

We're fairly polyglot, but specialise in and make heavy use of Ruby on Rails, Turbo (Hotwire and Stimulus), React and of course Next.js.

Full job spec: https://apply.workable.com/pixie-labs/j/18B26E12B9/


Heads up for anyone thinking about trying out a homeserver or two. To my knowledge there is no way of moving from one piece of homeserver software to another. So for example if you start with conduit you're stuck with it. I think there are a bunch of plans all over the place to mitigate this, but I don't think they're there yet.


Very good.


Thanks for sharing, OP! I had a lot of fun learning Rust whilst building this, which means some of my code is probably questionable. Any hints about what I've done wildly wrong are much appreciated :)


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

Search: