News for hackers. Stuff that matters.

corruptio

Re:WikiTok on Tuesday February 04, 2025 @04:38PM (#42939185)
I need it to loop subway surfers on the side. To keep my attention.
Re:Show HN: Pipes puzzle (a.k.a. Net) on a hexagonal grid on Saturday July 30, 2022 @04:43PM (#32290098)
Yup, it finds the play area and starts clicking. I haven' tried the wrapped version yet, but i think the nonwrap is funner. Also I wouldn't mind a 50x50 .....
Re:Show HN: Pipes puzzle (a.k.a. Net) on a hexagonal grid on Saturday July 30, 2022 @12:27AM (#32284285)
Whelp this just ate up a night's worth of sleep... scripted something to automate finding the play area, pipe orientation and click the solution. https://www.youtube.com/watch?v=kIpyQRBuwt0

Really bad code here: https://github.com/justecorruptio/hexapipes

oook did some experiments... just counting the size of the delta streams: 17346B for 26^4 and 16852B for 32^4 (as described above)

interestingly, the sweet spot is a mix at 30^4 at 16797B

oo oo, idea... trying to implement it now:

With 5 bits per letter, you have 6 symbols left over. We can use those to represent alternate pairs like "A or E", so you can encode BANDS and BENDS at the same time. Looks like if you pick the 6 highest frequency replacements for each starting letter, you can reduce the full word list size by ~2k words.

A naive lookup table for the replacements is 26 * 2 * 6 = 312 bytes.

edit: oops double counted the reduction

Re:Python Default Dict on Wednesday May 05, 2021 @02:39PM (#27053911)
Reminds me of perl's autovivification, where you can even mix and match dicts, arrays, and scalars:

    $M{hello}[4]{world}[0]++
gives you:

    {
        'hello' => [
            undef,
            undef,
            undef,
            undef,
            {
                'world' => [
                    1
                ]
            }
        ]
    }
> The tiny peak at the edge is probably because the edge between the two walls sometimes has white paint showing through, so it's not a lighting effect.

I vaguely remember an old graphics professor mentioning that this peak would exist because of reflected light from the other wall, though I can't find any literature after some light googling. Is this a real thing, or am I crazy?

Re:Codec2: A Whole Podcast on a Floppy Disk on Saturday June 23, 2018 @04:51PM (#17383383)
Having grown accustom to MP3 artifacts, it's strange to hear artifacts that are natural, but just aren't quite right. More specifically, in the male voice sample: "sold about seventy-seven", I received it as "sold about sethenty-seven".
Re:A 220b spreadsheet app in HTML/JS on Saturday September 30, 2017 @01:29AM (#15371403)
Re:A 220b spreadsheet app in HTML/JS on Thursday September 28, 2017 @05:14PM (#15360786)
Here's another char off:

    (o=b=>{for(j in a)for(i in a)y=a[i]+j,b?document.write(`<${i*j?'input':'p'} onfocus=value=[o[id]] onblur=o[id]=value;o() id=${y}>`):eval(y+(".value"+o[y]).replace(/[A-Z]\d/g," +$&.value"))})(a="_ABCD")
Re:Show HN: Hacking airplane headphones on Monday July 18, 2016 @09:38PM (#12119012)
Or, just stick a regular 3.5mm headphone jack into the two-pronged hole half-way in. The contacts line up in such a way that one channel touch both inputs. Just turn up the volume a bit.
#define and &&

heh

Re:Ask HN: Any Go players here? (Not the language) on Tuesday August 04, 2015 @02:32PM (#10005284)
I deeply urge everyone interested in go to try to play it in person. Nothing beats a live face-to-face game against someone and then being able to review it on a board afterwards. You'll also find that the people who go to go clubs are very friendly and generally love to teach beginners.

There are a surprising number of local go club around the country: http://www.usgo.org/where-play-go

Especially, if you're in the SF Bay Area (my area): http://bayareago.org/#local-clubs

My solution:

    0: Z 2
    1: Z 3
    2: J 0 2 -> 4
    3: J 1 3 -> 7
    4: I 2
    5: J 0 2 -> 4
    6: J 1 3 -> 7
    7: I 2
    8: I 3
    9: J 1 3 -> 7
Handles the zero case. Only uses 4 cells total.
Re:Band releases album as kernel module on Wednesday April 23, 2014 @08:22PM (#7637830)
For the lazy, I'm no fun:

  curl https://raw.githubusercontent.com/usrbinnc/netcat-cpi-kernel-module/master/tracks/trk3data.h | perl -ne 'print chr hex' | mplayer -
Re:2048 implemented in 487 bytes of C on Wednesday April 09, 2014 @06:05AM (#7558495)
Author here. Per many requests, here is an annotated version https://gist.github.com/justecorruptio/10248923