Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
danneu
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
danneu
10y ago
Great game. It could use an explanation of the (+#) modifiers though. For example, does (+#) green just add +1 to your attacks, and (+#) red add +1 to each enemy attack? I was proudly rocking some (+#) red armor of treachery until I realize
32.
▲
by
danneu
10y ago
I think static typing + solid IDE support is too useful to pass up, and that's what Kotlin has. But Kotlin also has simplicity that, for example, Scala doesn't. I tried Clojure after spending a couple months with Scala and giving
33.
▲
by
danneu
10y ago
For fun, I've been working on a simple hobby web server in Kotlin that wraps Jetty: https://github.com/danneu/kog I think Kotlin is the statically-typed language I've been waiting for, especially with the tea
34.
▲
by
danneu
10y ago
Clozemaster is great and has already become part of my daily drill. I noticed that my daily streak grows just from doing a single exercise that day. I recommend letting us set a point threshold (maybe low | medium | high) that we must meet
35.
▲
by
danneu
10y ago
Now let's say you're in a route handler where the buck stops, and you need to compose any number of async calls, some branching on if-else logic and/or the results of other async calls. This is where the "just wrap it&qu
36.
▲
by
danneu
10y ago
Extracting inline callbacks leads to indirection, especially if you're only extracting to avoid indentation. It doesn't make the code simpler or easier to follow. Promises and especially async/await let you read code top to b
37.
▲
by
danneu
10y ago
Finally, an article to link to my girlfriend when she finds me eating ice cream at 3am. It's a stretch, but I'm easily convinced after 8pm.
38.
▲
by
danneu
10y ago
I can imagine a (tragic?) sci-fi love story where a once-couple meets again thousands of years in the future. One of them opted to keep their memories of the other on every reincarnation all those millennia, but the other didn't.
39.
▲
by
danneu
10y ago
val handler = Router { get("/", fun(): Handler = { Response().text("Hello, world") }) get("/<a>/<b>/<c>", fun(a: Int, b: Int, c:
40.
▲
Show HN: Kog, a simple kotlin server inspired by clojure's ring (just for fun)
(github.com)
4 points
by
danneu
10y ago
|
1 comments
41.
▲
by
danneu
10y ago
I refactored the User.rb file of a massive, legacy Rails app with that classic save-the-world beginner hubris. For one, I thought I was helping out by alphabetizing all the methods. Ended up with a diff that basically scrambled all 100k lin
42.
▲
by
danneu
10y ago
http://package.elm-lang.org/packages/eeue56/elm-all-dict/2.0... is an example of a Dict where you pass in a custom (key -> comparable) function when initializing the datastructure.
43.
▲
by
danneu
10y ago
The restriction only applies to native modules (modules that ship with Javascript): https://groups.google.com/forum/#!msg/elm-dev/1JW6wknkDIo/H9...
44.
▲
by
danneu
10y ago
Await doesn't synchronously block in Javascript. http://docs.scala-lang.org/overviews/core/futures.html#block...
45.
▲
by
danneu
10y ago
> if I'm server side and using something dynamic, I might as well > use something nicer like ruby or python. You could say the same thing about Javascript. "Might as well use the language I already use on the
46.
▲
by
danneu
10y ago
Growing up, my family would do a 24 hour drive to visit family in Pennsylvania, and my dad would get the Sega/N64 working in the van with an inverter for my sisters and me to play on this tiny 10in screen. I looked forward to the 24 ho
47.
▲
by
danneu
10y ago
I'd rethink that. Every connection to the server closes, and whatever else it might be doing stops, because someone hits your syntax error? And they completely DoS your server by slowly refreshing the page? Surely the best practice is
48.
▲
by
danneu
10y ago
Some interactions with 3rd party libraries (like rendering stuff, leaflet.js, pixi.js) fall along natural event-driven faults, like the game update tick finishing, something managed by Elm being clicked, that sort of thing. In these cases,
49.
▲
by
danneu
10y ago
And you can inline if-statements with an IIFE when you need a little more space: {(() => { if (cond1 && cond2) return <div>foo</div> else ... })()} Though it makes GitHub
50.
▲
by
danneu
10y ago
It's not much. On the Javascript side, the Elm `app` is like an event emitter where you listen for updates and send it data. var app = Elm.Main.embed(...) app.ports.gameState.subscribe((data) => ...) app.ports.tileClic
51.
▲
by
danneu
10y ago
The cutting edge of front-end development has been arriving at ways to split business logic from layout elements for some time now. Redux, Om, Reframe, Elm, etc. They all amount to hooking up components to a state transactor where the busin
52.
▲
by
danneu
10y ago
It's nice to fire up an old Elm app and be able to make changes immediately. Not just because of the compiler errors, but also because of its other limitations, like having your effects isolated via `Cmd`s and ports.
53.
▲
by
danneu
10y ago
I used Clojure for three years before realizing that all of the dynamically typed languages you listed still have the same hard problems: making large code changes and reasoning about existing code. I also realized that in the real world, t
54.
▲
by
danneu
10y ago
Yes, I run such websites. A paid tier is a surprisingly narrow business model. People aren't willing to pay for much, and not every website has such an explicit product. A lot of that is just conditioning, as people aren't used to
55.
▲
by
danneu
10y ago
I meant that the code has to be deployed to a separate system. Application code that touches the file system is still deployed along with the application code. You might commit schema.sql into your application repository, but that's no
56.
▲
by
danneu
10y ago
You're updating code that needs to be executed against an external layer instead of just the application layer.
57.
▲
by
danneu
10y ago
Also, "working hard" is pretty meaningless without context, especially if we're going to talk about regretting it. For example, carving out some time at night for your side projects that might pay your rent one day vs. stayin
58.
▲
by
danneu
10y ago
> Start slow, build your foundation, learn your bits and bytes, > data structures and sorting algorithms first then venture out. Maybe that works if you've already convinced yourself that you're going to learn
59.
▲
by
danneu
10y ago
The comments on my technical blog were always so friendly and encouraging. People telling me how my tutorial helped them or answering each others questions. Redirecting them to the HN pit of cynicism and leave-no-stone-left-unturnedism soun
60.
▲
by
danneu
10y ago
Well, hopefully an SSG is saving you time compared to just writing a quick crawler that saves each route of your local Express app into a deployable static folder. If you find yourself credentializing in the source of an SSG because it turn
More ›