Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jhawthorn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
Writing an AI for a turn-based game
(johnhawthorn.com)
3 points
by
jhawthorn
9y ago
|
0 comments
2.
▲
by
jhawthorn
9y ago
You would use the LDR instruction to load the word from RAM. So just one instruction, but with some slower memory access. When writing ARM assembly, the assembler (at least the ones I've seen) abstract this detail away from you. You ca
3.
▲
Show HN: Convert curl commands to Ruby's net/http
(jhawthorn.github.io)
12 points
by
jhawthorn
10y ago
|
0 comments
4.
▲
by
jhawthorn
13y ago
I made a small rails app which presents reddit AMAs nicely http://ama.hawth.ca/1xj56q Here's the source https://github.com/jhawthorn/riama
5.
▲
by
jhawthorn
13y ago
The f suffix has been removed in favour of the existing "foo".freeze (which is now recognized and optimized in the parser) https://www.ruby-lang.org/en/news/2013/11/22/ruby-2-1-0-prev...
6.
▲
by
jhawthorn
13y ago
I would argue the opposite: you should always use rvm (or similar) in production. I've done this for many projects, it's great to have the same ruby version and patchset in development, CI, staging, and production. rvm is also well supporte
7.
▲
by
jhawthorn
14y ago
Not saying python 3 should have been compatible with 2. Just that this was not an apt comparison.
8.
▲
by
jhawthorn
14y ago
I would guess error handing (freeing memory, closing fd's). A goto lets you avoid deeply nested if statements.
9.
▲
by
jhawthorn
14y ago
Difference being that new versions of java, windows, c++ compilers work with the existing software.
10.
▲
by
jhawthorn
14y ago
I wouldn't use god. It's had issues crashing or misbehaving in the past. I've found monit very stable if a little awkward to configure correctly. Today I would use systemd with monit for additional monitoring. systemd ensures that the same
11.
▲
by
jhawthorn
14y ago
These are clearly slides, meant to be fullscreen on a projector. Up/Down, Left/Right, PgUp/PgDown all work, much like they would in powerpoint. I'm a little baffled by this threads hostility towards the lack of a friendlier design.
12.
▲
by
jhawthorn
14y ago
You will not run into this problem. Linux is almost always used for production servers and is popular for development as well.
13.
▲
by
jhawthorn
14y ago
Similar is https://www.pwdhash.com/
14.
▲
by
jhawthorn
14y ago
I've been using fullwidth characters. Due to their simplicity to convert to and read. This page of course has the advantage of more variety in characters. Fullwidth conversion code in ruby: "string".tr(' !-~', "\u3000" + (0xFF01...0xFF5
15.
▲
by
jhawthorn
14y ago
Oh, no! Missed noticing my first link from HN for a few days. Hopefully I can clarify some of this. First, this is in no way faster than cuSPARSE or cusp. I wrote this for an originally for a school assignment (hence older cuda version) and
16.
▲
by
jhawthorn
15y ago
Other than recommending #map, #select, et al, the rest is poor advice. Consider the following recommendation input.inject({}) do |hash, item| hash.merge(item => process(item)) end Far, far slower, more memory intensive (big