Better HN
topnewbestaskshowjobs
Log inSign up

barristan

13 karma · joined Mar 6, 2013 (13y ago) · 14 submissions

Submissions

comment 13y ago · link · parent

In case anyone is looking for other novel ways to solve Sudoku. I wrote a CP language a while back that does pretty fast solving for the right kind of problem [1]. Folks might also find this Sudoku benchmarking blog post interesting [2], it includes links to solutions in a bunch of languages.

1) http://sabrlang.org/sudoku

2) http://attractivechaos.wordpress.com/2011/06/19/an-incomplet...

comment 13y ago · link · parent

They do say an elephant never forgets. It's possible that after stomping through the fence and releasing all the bees the elephant simply continues to charge into the field. But once the elephant is shooed out of the field, the next time it considers entering, it will remember the bees and might reconsider.

It's also possible the elephant doesn't stomp through the fence, but simply meanders toward it until it feels the wire. After which some of the bees come out and the elephant simply decides to not break through the wire and to instead return from where it came.

comment 13y ago · link · parent

Yes, this seems to be the nature of communities both online and offline. A community becomes known for something like hipsters in Brooklyn, cat memes in Reddit, or motherhood paraphernalia in Pinterest. More people of the demographic with the same mindset join and stay, whereas everyone else feel unwelcome and gradually leave.

comment 13y ago · link · parent

Pretty good, I prefer Binky myself (http://www.youtube.com/watch?v=f-pJlnpkLp0), but to each their own.

5.

Adrift Generation with Constraint Programming(fizbizfiz.biz ↗)

1 points · by barristan · 13y ago · discuss

6.

Static Site Generation with Flask(obsoleter.com ↗)

2 points · by barristan · 13y ago · discuss

comment 13y ago · link · parent

It does seem to make more sense to just roll your own static site generator rather than try to learn a whole new framework and language like Jekyll, which then might not even give you everything you want. This is particularly true if you where to use a robust templating engine like Jinja2.

comment 13y ago · link · parent

This is an ideal problem for constraint solving. If there is one thing constraint solving does well it is make NP-Hard problems more manageable. I wrote up a quick solution to the first puzzle in sabr (1), you can see what the puzzle result looks like here (2). The key insight is: "each color must be surrounded by exactly two of its color, unless it is on an end, in which case it is surrounded by exactly one" after that it's just a matter of coding it up. It's not much extra work to go from here to a generator, which I may make later if I have time. Cool puzzle game, I like it ;D.

1) https://github.com/dbunker/SABR/blob/master/module/other-tes...

2) https://github.com/dbunker/SABR/blob/master/module/other-tes...