Better HN
topnewbestaskshowjobs
Log inSign up

mlgh

7 karma · joined Dec 26, 2016 (9y ago) · 9 submissions

Submissions

comment 9y ago · link · parent

Now you can annoy curl users by putting null byte in the beginning of the document.

comment 9y ago · link · parent

Sorry, but the implementation posted is O(|pattern| * |name|), not linear. http://ideone.com/2xCXyY

comment 9y ago · link · parent

Thank you! After reading blog-post I had zero understanding of what the problem is about and how they solve it. Tried to read again - no luck. Then I opened codejam link and saw that it's basically about placing maximum amount of bishops using maximum matching. (Other parts of problem are trivial)

That's really sad that this pattern of bad explanations is so frequent in the internet.

comment 9y ago · link · parent

Ah, got it: http://jsfiddle.net/h2yJn/2968/embedded/result/ (though I felt that it's easier to use arrow keys for motion and W/A/S/D for expanding)

comment 9y ago · link · parent

Sorry, what do you mean by motion and expanding numbers?

There are only 4 actions in this puzzle: expand to left, expand to right, expand up and expand bottom (and U for undo)

Here is version where you can also use W-A-S-D instead. http://jsfiddle.net/h2yJn/2966/embedded/result/

Also, if you manage to solve this puzzle, don't hesitate to post back on how you did it :) (e.g. pastebin the list of actions that is below the grid)

Direct link to the source if anyone wants to modify it somehow: http://jsfiddle.net/h2yJn/2966/

6.

Show HN: 8-5 puzzle(jsfiddle.net ↗)

1 points · by mlgh · 9y ago · 3 comments

comment 9y ago · link · parent

9/11

comment 9y ago · link · parent

If you think that awesome wm is bloated, try dwm on which awesome wm was historically based. The key bindings look the same. After I've noticed that I haven't used 90% of awesome wm functionality, I moved to a dwm which is basically 2k lines of readable C code in a single file and never looked back - it's so easy to configure it to do exactly what you need.