<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: bazzargh</title><link>https://news.ycombinator.com/user?id=bazzargh</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sat, 18 Apr 2026 07:18:56 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=bazzargh" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by bazzargh in "Japan's Dododo Land, the most irritating place on Earth"]]></title><description><![CDATA[
<p>I quite enjoyed their Omega Mart in Vegas. Was there for work and gambling, shows, and gun ranges are really not my thing, glad there was something different. (I did wander round the strip but enjoyed the hike in Red Rock Canyon more)<p>When we went we got the priority tickets (can't remember the exact name of the deal) because there were no normal slots left that day; that does get you discounts on stuff but awkwardly the discount is at the gift shop _outside_ and it wasn't clear whether there were things at the fake supermarket checkout _inside_ that you couldn't get outside. It also gets you the card you boop for the scavenger hunt which makes you more involved in the whole thing. So yeah, they got us for some extra cash but it wasn't so bad as a one-off.</p>
]]></description><pubDate>Fri, 13 Feb 2026 15:05:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=47003522</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=47003522</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47003522</guid></item><item><title><![CDATA[New comment by bazzargh in "The fax numbers of the beast, and other mathematical sports"]]></title><description><![CDATA[
<p>I think maybe <a href="https://oeis.org/A263499" rel="nofollow">https://oeis.org/A263499</a><p>You can shorten the candidates list quite a bit: <a href="https://oeis.org/search?q=author%3A%22Chai+Wah+Wu%22+2015+Prime&sort=created&go=Search" rel="nofollow">https://oeis.org/search?q=author%3A%22Chai+Wah+Wu%22+2015+Pr...</a><p>The article says "Spring 2015" but in fact the magazine was published December 29, 2015. In the text it mentions <a href="https://oeis.org/history?seq=A250001" rel="nofollow">https://oeis.org/history?seq=A250001</a> so the interview could not have been earlier than October 2015; Wu's sequence is "recent".<p>There's a few sequences that jump out, this one, and the prime palindromes of 0's and 1s whose squares are palindromes; but that was August and seems too early.</p>
]]></description><pubDate>Wed, 04 Feb 2026 16:04:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=46887515</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=46887515</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46887515</guid></item><item><title><![CDATA[New comment by bazzargh in "Iterative image reconstruction using random cubic bézier strokes"]]></title><description><![CDATA[
<p>I was doing something related for genuary recently, but with different constraints - I wanted to make a photgraph look painted in a fauvist style, with visible brushstrokes (and a vivid, unrealistic colour scheme). When you're overlaying many, many strokes like that you end up hiding the errors but also hiding the digital brushtrokes; with very few strokes, placement becomes important.<p>Instead of just stroking with the average colour, I chose to only connect points that were similar in colour (because of the fauvist thing, I was mainly interested in hue; the paints are all intense). By doing this, I was trying to be edge preserving, without explicitly calculation, eg of the Sobel operator.<p>It kinda worked in that the edges came out clearly; the resulting painting was messy tho; the thick brushstrokes and the colours are intentional, but the brushstrokes going in random directions is not <a href="https://media.hachyderm.io/media_attachments/files/115/894/851/970/417/832/original/d9eff74f533793ad.png" rel="nofollow">https://media.hachyderm.io/media_attachments/files/115/894/8...</a> compare to an actual fauvist work, <a href="https://en.wikipedia.org/wiki/Robert_Delaunay#/media/File:Robert_Delaunay_-_Jean_Metzinger_-_Google_Art_Project.jpg" rel="nofollow">https://en.wikipedia.org/wiki/Robert_Delaunay#/media/File:Ro...</a> which still has the 'dithered' look to the face but the strokes are deliberately aligned, I'd fix that if I try again. (Delaunay also uses small strokes for detail, a thing I wasn't going to try in a throwaway program)<p>An earlier attempt at generating pencil sketches from photos - again, keeping the number of strokes small, and using parallel strokes for hatching - worked much better <a href="https://media.hachyderm.io/media_attachments/files/112/767/493/773/823/290/original/dfe5c2996d5c4779.png" rel="nofollow">https://media.hachyderm.io/media_attachments/files/112/767/4...</a> (it's just sobel to find edges and a bit of sampling with a filter to decide where to shade)</p>
]]></description><pubDate>Tue, 20 Jan 2026 05:44:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=46688308</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=46688308</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46688308</guid></item><item><title><![CDATA[New comment by bazzargh in "TimeCapsuleLLM: LLM trained only on data from 1800-1875"]]></title><description><![CDATA[
<p>You would find things in there that were already close to QM and relativity. The Michelson-Morley experiment was 1887 and Lorentz transformations came along in 1889. The photoelectric effect (which Einstein explained in terms of photons in 1905) was also discovered in 1887. William Clifford (who _died_ in 1889) had notions that foreshadowed general relativity: "Riemann, and more specifically Clifford, conjectured that forces and matter might be local irregularities in the curvature of space, and in this they were strikingly prophetic, though for their pains they were dismissed at the time as visionaries." - Banesh Hoffmann (1973)<p>Things don't happen all of a sudden, and being able to see all the scientific papers of the era its possible those could have fallen out of the synthesis.</p>
]]></description><pubDate>Mon, 12 Jan 2026 16:51:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=46591025</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=46591025</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46591025</guid></item><item><title><![CDATA[New comment by bazzargh in "During Helene, I just wanted a plain text website"]]></title><description><![CDATA[
<p>It's been shared here many times, but Terence Eden has a great anecdote about how the UK's GDS standards - lightweight, simple html - meant the site was usable even on a crappy PSP <a href="https://shkspr.mobi/blog/2021/01/the-unreasonable-effectiveness-of-simple-html/" rel="nofollow">https://shkspr.mobi/blog/2021/01/the-unreasonable-effectiven...</a></p>
]]></description><pubDate>Mon, 05 Jan 2026 17:30:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=46501841</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=46501841</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46501841</guid></item><item><title><![CDATA[New comment by bazzargh in "Total monthly number of StackOverflow questions over time"]]></title><description><![CDATA[
<p>it works for any number of integers. The first proof above (before tl;dr) is showing that every positive integer has a unique representation as a sum of distinct powers of 2, ie binary, and that no two integers have the same representation. You can watch a lecture about the representation of sets in binary here <a href="https://www.youtube.com/watch?v=Iw21xgyN9To" rel="nofollow">https://www.youtube.com/watch?v=Iw21xgyN9To</a> (google representing sets with bits for way more like this)<p>But again it's not useful in practice for very sparse sets: if you have say a million players, with at most 10 at the same poker table, setting 10 bits of a million-bit binary number is super wasteful. Even representing the players as fixed size 20-bit numbers (1 million in binary is 20 bits long), and appending the 10 sorted numbers, means you don't need more than 200 bits to represent this set.<p>And you can go much smaller if all you want is to label a _bucket_ that includes this particular set; just hash the 10 numbers to get a short id. Then to query faster for a specific combination of players you construct the hash of that group, query to get everything in that bucket (which may include false positives), then filter this much smaller set of answers.</p>
]]></description><pubDate>Mon, 05 Jan 2026 13:30:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=46498526</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=46498526</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46498526</guid></item><item><title><![CDATA[New comment by bazzargh in "Total monthly number of StackOverflow questions over time"]]></title><description><![CDATA[
<p>I'm saying it's a tautology because it's just a binary representation of the set.
Suppose we have 8 players, with x and y being 2 and 4: set the 2nd and 4th bits (ie 2^2 & 2^4) and you have 00001010.<p>But to lay it out: every positive integer is a sum of powers of 2. (this is obvious, since every number is a sum of 1s, ie 2^0). But also every number is a sum of _distinct_ powers of 2: if there are 2 identical powers 2^a+2^a in the sum, then they are replaced by 2^(a+1), this happens recursively until there are no more duplicated powers of 2.<p>It remains to show that each number has a unique binary representation, ie that there are no two numbers x=2^x1+2^x2+... and y=2^y1+2^y2+... that have the same sum, x=y, but from different powers. Suppose we have a smallest such number, and x1 y1 are the largest powers in each set. Then x1 != y1 because then we can subtract it from both numbers and get an _even smaller_ number that has distinct representations, a contradiction. Then either x1 < y1 or y1 < x1. Suppose without loss of generality that it's the first (we can just swap labels). then x<=2^(x1+1)-1 (just summing all powers of 2 from 1..x1) but y>=2^y1>=2^(x1+1)>x, a contradiction.<p>or, tl;dr just dealing with the case of 2 powers:
we want to disprove that there exists a,b,c,d such that<p>2^a + 2^b = 2^c + 2^d, a>b, c>d, and (a,b) != (c,d).<p>Suppose a = c, then subtract 2^a from both sides and we have 2^b = 2^d, so b=d, a contradiction.<p>Suppose a>c; then a >= c+1.<p>2^c + 2^d < 2^c + 2^c = 2^(c+1).<p>so<p>2^c + 2^d <= 2^(c+1) - 1 < 2^(c+1) + 2^b <= 2^a + 2^b<p>a contradiction.</p>
]]></description><pubDate>Sun, 04 Jan 2026 17:11:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=46489911</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=46489911</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46489911</guid></item><item><title><![CDATA[New comment by bazzargh in "Total monthly number of StackOverflow questions over time"]]></title><description><![CDATA[
<p>you're only sorting players within a single hand. so a list of under 10 items? thats trivial</p>
]]></description><pubDate>Sun, 04 Jan 2026 16:44:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=46489643</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=46489643</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46489643</guid></item><item><title><![CDATA[New comment by bazzargh in "Total monthly number of StackOverflow questions over time"]]></title><description><![CDATA[
<p>BTW, yet another way to do it (more compact than the bitwise and prime options) is the Cantor pairing function <a href="https://en.wikipedia.org/wiki/Pairing_function" rel="nofollow">https://en.wikipedia.org/wiki/Pairing_function</a><p>... z = (x+y+1)(x+y)/2 + y - but you have to sort x,y first to get the order independence you wanted. This function is famously used in the argument that the set of integers and the set of rationals have the same cardinality.</p>
]]></description><pubDate>Sun, 04 Jan 2026 14:51:36 +0000</pubDate><link>https://news.ycombinator.com/item?id=46488482</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=46488482</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46488482</guid></item><item><title><![CDATA[New comment by bazzargh in "Total monthly number of StackOverflow questions over time"]]></title><description><![CDATA[
<p>The typo is most likely the extra /, in (x/y)/(x^2+y^2) instead of (xy)/(x^2+y^2).<p>`2^x & 2^y ...is the & a bitwise operator...???? That would produce a unique ID? That would be very interesting, is that provable?`<p>Yes, & is bitwise and. It's just treating your players as a bit vector. It's not so much provable as a tautology, it is exactly the property that players x and y are present. It's not _useful_ tho because the field size you'd need to hold the bit vector is enormous.<p>As for the problem...it sounds bloom-filter adjacent (a bloom filter of players in a hand would give a single id with a low probability of collision for a set of players; you'd use this to accelerate exact checks), but also like an indexed many-to-many table might have done the job, but all depends on what the actual queries you needed to run were, I'm just idly speculating.</p>
]]></description><pubDate>Sun, 04 Jan 2026 14:29:22 +0000</pubDate><link>https://news.ycombinator.com/item?id=46488266</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=46488266</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46488266</guid></item><item><title><![CDATA[New comment by bazzargh in "Total monthly number of StackOverflow questions over time"]]></title><description><![CDATA[
<p>It looks like you have typos?
(x^2+y^2)+(sin(atan(x/y))*cos(atan(x/y)))
reduces to
x^2+y^2+( (x/y) / (x^2/y^2 + 1) ) - not the equation given? Tho it's easier to see that this would be symmetrical if you rearrange it to:
x^2+y^2+( (xy) / (x^2+y^2) )<p>Also, if f(x,y) = x^2+y^2+( (x/y) / (x^2+y^2) )
then f(2,1) is 5.2 and f(1,2) is 5.1? - this is how I noticed the mistake. (the other reduction gives the same answer, 5.4, for both, by symmetry, as you suggest)<p>There's a simpler solution which produces integer ids (though they are large): 2^x & 2^y. Another solution is to multiply the xth and yth primes.<p>I only looked because I was curious how you proved it unique!</p>
]]></description><pubDate>Sun, 04 Jan 2026 12:53:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=46487466</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=46487466</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46487466</guid></item><item><title><![CDATA[New comment by bazzargh in "Functional Flocking Quadtree in ClojureScript"]]></title><description><![CDATA[
<p>The boids in this demo form smaller flocks (both tighter, and fewer individuals) than other implementations I've seen. I had a look at the code and I'm not sure it's "right"? (I know the whole thing is subjective, I mean it doesn't follow the original)<p>In no particular order:<p>- the original boids code didn't cap the magnitude of acceleration after adding all the contributions; it added the contributions _by priority_, starting with separation, and if the max acceleration was exceeded it didn't add the others<p>- the max acceleration was decided by adding the _magnitudes_ not vectors of components, so the cohesion vector and the separation vector wouldn't cancel out - separation would win. I think this is why both this and the p5js one form very tight clumps which later "explode". That's this bit of the code (from <a href="https://www.red3d.com/cwr/code/boids.lisp" rel="nofollow">https://www.red3d.com/cwr/code/boids.lisp</a>):<p><pre><code>    ;;
    ;; Available-acceleration should probably be 1.0, but I've set it a little higher to
    ;; avoid have to readjust the weighting factors for all of the acceleration requests.
    ;;
    (vlet* ((composite-acceleration (prioritized-acceleration-allocation 1.3 ;; 1.0
          avoid-obstacles
          avoid-flockmates
          velocity-matching
          centering-urge
          migratory-urge
          course-leveling
          course-damping))
</code></pre>
- this implementation, unlike the p5js version it's based on, caps the acceleration _twice_ - before adding the contributions and after <a href="https://github.com/LauJensen/practical-quadtree/blob/7f5bdeac1cf8e0e6cff7b09bed9f024d2ce1d1d7/src/ftree/core.cljs#L105" rel="nofollow">https://github.com/LauJensen/practical-quadtree/blob/7f5bdea...</a> (this is the 'after' bit)<p>- the original had different radii for different components (the separation threshold was 4, the cohesion, alignment thresholds were 5)<p>- both the clojure and p5js versions use the same strength for cohesion, separation, and alignment. In the original, separation is much stronger (1, vs 0.3 for cohesion and 0.23 for alignment). Again this might explain the tight clumps.<p>I've not yet mucked with the rules to see if the behaviour recovers, but the p5js version makes it easy to hack on <a href="https://editor.p5js.org/pattvira/sketches/v_tmN-BC5" rel="nofollow">https://editor.p5js.org/pattvira/sketches/v_tmN-BC5</a> - as a first change, in draw() in sketch.js change the print statement to this:<p><pre><code>    print(frameRate(), boids.length);
    if (frameRate()>50) {
      boids.push(new Boid(random(width), random(height)));    
    } else if (frameRate() < 40) {
      boids.pop()
    }
</code></pre>
... and the two loops below it to use 'boids.length' not 'num'. Then the thing will dynamically adjust the number of boids to give you an acceptable framerate.<p>Aside: both the p5 and clojure versions do preserve the typo of 'seperation' from the Craig Reynold's code tho ;) ... I have to wonder if that's like 'referer' and now we have to spell it that way in a boids context.</p>
]]></description><pubDate>Mon, 22 Dec 2025 14:28:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=46354365</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=46354365</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46354365</guid></item><item><title><![CDATA[New comment by bazzargh in "Ask HN: What Are You Working On? (December 2025)"]]></title><description><![CDATA[
<p>"release" is maybe too strong a word, it's not a lot of code and I don't plan to put any more effort into the nonexistent interface since it was just built for personal use. But the code:<p><a href="https://gist.github.com/bazzargh/e1d2e2718af575a03206114a291907dc" rel="nofollow">https://gist.github.com/bazzargh/e1d2e2718af575a03206114a291...</a></p>
]]></description><pubDate>Wed, 17 Dec 2025 18:45:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=46303684</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=46303684</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46303684</guid></item><item><title><![CDATA[New comment by bazzargh in "Ask HN: What Are You Working On? (December 2025)"]]></title><description><![CDATA[
<p>On the subject of whisper being great... A few weeks ago a co-worker commented about the difficulty he'd had editing a work demo, I pointed at various jump-cutting tools that had automated what he did in the past (editing out silences). But I'd also wanted to play with whisper for a while...<p>So a couple of hours later I'd written a script that does transcription based editing: on the first pass it grabs a timestamped transcript and a plain text transcript for editing; you edit the words into any order you like and a second pass reassembles the video (it's just a couple of hundred lines of python wrapping whisper and ffmpeg). It also speeds up 4x any silences detected that sit within retained sequences in the video.<p>Matching up transcripts turns out to be not that hard; I normalise the text, split it, and then compare to the sequence of normalised words from the timestamped transcript. I find the longest common sequence, keep that, then recurse on the before/after sections (there's a little more detail, but not much). I also sent the transcription to ffmpeg to burn in as captions, because sometimes it makes the audio choppy and the captions make it easier to follow.<p>I know, tools have been doing this for years now. I just didn't have one to hand, and now I do, and I couldn't have done this without whisper.</p>
]]></description><pubDate>Mon, 15 Dec 2025 04:32:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=46270519</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=46270519</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46270519</guid></item><item><title><![CDATA[New comment by bazzargh in "Gemini 3 Pro Model Card [pdf]"]]></title><description><![CDATA[
<p>That's an odd take. Teams doesn't have the leading market share in videoconferencing, Zoom does. I can't judge what it's like because I've never yet had to use Teams - not a single company that we deal with uses it, it's all Zoom and Chime - but I do hear friends who have to use it complain about it all the time. (Zoom is better than it used to be, but for all that is holy please get rid of the floating menu when we're sharing screens)</p>
]]></description><pubDate>Wed, 19 Nov 2025 16:25:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=45981479</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=45981479</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45981479</guid></item><item><title><![CDATA[New comment by bazzargh in "Marble Fountain"]]></title><description><![CDATA[
<p>One of the results for hilbert curve marble tracks, mentioned elsewhere in the thread, was a video showing how to make one in blender, which has a physics engine so it can simulate it pretty well.<p><a href="https://www.youtube.com/watch?v=8YeXyUNCnhM" rel="nofollow">https://www.youtube.com/watch?v=8YeXyUNCnhM</a><p>I'd imagine that the 3d-printable models could be imported into blender, so it's 'just' adding balls and motion to the lift.</p>
]]></description><pubDate>Mon, 10 Nov 2025 13:38:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=45875902</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=45875902</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45875902</guid></item><item><title><![CDATA[New comment by bazzargh in "Image Dithering: Eleven Algorithms and Source Code (2012)"]]></title><description><![CDATA[
<p>You can also get reasonable results from using quasirandom sequences <a href="https://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/" rel="nofollow">https://extremelearning.com.au/unreasonable-effectiveness-of...</a> - which are trivial to generate.<p>That's the kind of thing I use dithering on BBC Micro because it's such a cheap technique, here in a thread directly comparing to Bayer-like dithering <a href="https://hachyderm.io/@bbcmicrobot@mastodon.me.uk/112005464902333250" rel="nofollow">https://hachyderm.io/@bbcmicrobot@mastodon.me.uk/11200546490...</a> or here faking the Windows XP desktop <a href="https://hachyderm.io/@bbcmicrobot@mastodon.me.uk/112886510133025202" rel="nofollow">https://hachyderm.io/@bbcmicrobot@mastodon.me.uk/11288651013...</a></p>
]]></description><pubDate>Tue, 28 Oct 2025 13:23:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=45732561</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=45732561</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45732561</guid></item><item><title><![CDATA[New comment by bazzargh in "Show HN: Scriber Pro – Offline AI transcription for macOS"]]></title><description><![CDATA[
<p>Also, disabling scrolling and using swipe for sections instead _at a font size that causes text to overflow_, depending on phone screen size, meaning a bunch of the site is _literally_ unreadable, since it's off the screen with no way to get there.</p>
]]></description><pubDate>Wed, 15 Oct 2025 14:09:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=45592847</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=45592847</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45592847</guid></item><item><title><![CDATA[New comment by bazzargh in "Inverting the Xorshift128 random number generator"]]></title><description><![CDATA[
<p>In the code I saw, at least twice in its history people had introduced a "pure lua" solution for speed, and were clearly unaware of the shotgun they'd just pointed at their feet. (as in, somebody saw the issue and fixed it, and then someone else _fixed it back_ before I came along).<p>But in case _I'm_ messing up here, I'll bow to your expertise: libuuid uses /dev/random, which uses a CSPRNG (ChaCha20) with entropy ingested via Blake2 from whatever sources the system can get, right?<p>We did actually do a bunch of before/after testing showing the collision rates (zero after), and I believe the cookie in question has been replaced with a third party identity system in the intervening years - but if we did it wrong, I'd like to know.</p>
]]></description><pubDate>Thu, 04 Sep 2025 16:01:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=45128760</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=45128760</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45128760</guid></item><item><title><![CDATA[New comment by bazzargh in "Inverting the Xorshift128 random number generator"]]></title><description><![CDATA[
<p>A word of caution. A few years ago we had a production impact event where customers were getting identical cookies (and so started seeing each others sessions). When I took a look at the code, what I found was that they were doing something very like your code - using a time() based seed and an PRNG.<p>Whenever we deployed new nginx configs, those servers would roll out and restart, getting _similar_ time() results in the seed. But the individual nginx workers? Their seeds were nearly identical. Not every call to the PRNG was meant for UUIDs, but enough were that disaster was inevitable.<p>The solution is to use a library that leverages libuuid (via ffi or otherwise). A "native lua" implementation is always going to miss the entropy sources available in your server and generate clashes if it's seeded with time(). (eg <a href="https://github.com/Kong/lua-uuid" rel="nofollow">https://github.com/Kong/lua-uuid</a>, <a href="https://github.com/bungle/lua-resty-uuid" rel="nofollow">https://github.com/bungle/lua-resty-uuid</a>)</p>
]]></description><pubDate>Thu, 04 Sep 2025 15:02:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=45128081</link><dc:creator>bazzargh</dc:creator><comments>https://news.ycombinator.com/item?id=45128081</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45128081</guid></item></channel></rss>