HNHacker News
TopNewBestAskShowJobs

the1

-16 karma · joined July 10, 2012

submissionscomments
the1··on A Sinatra-inspired micro web framework for Java
yah, it required me to install a JVM. And JVM required me to purchase a personal computer that can host the JVM. And electricity and stuff. Such an unnecessary barrier to entry.
the1··on A Sinatra-inspired micro web framework for Java
yah they should've done something like:

    send(JSONSerialization.with(StringSerializer.class, DateTimeSerializer.class).serialize(JSONObjectFactory.put(PairFactory.of(String.class, String.class).getInstance("author", "system"), PairFactory.of(String.class, String.class).getInstance("message", "Only json is allowed"), PairFactory.of(String.class, DateTime.class).getInstance("time", new Date())).getInstance()))
no, it's just json4s dsl for constructing json. If you wanted, you could've used constructors yourself:

    send(pretty(render(JObject(List(JField("author", JString("system")), JField("message", JString("Only json allowed")), JField("time", JString(new DateTime().getTime().toString()))))
usually scala libraries come with an easy to read/write DSL version of the API along with a more verbose java-style API shown above. Many libraries don't document with a plenty of examples. But, it really takes 10 minutes to learn DSL version in many cases. And, it gives you wings. There are plenty of benefits of DSL. You can research online about them.
the1··on Eve: A Python REST API Framework
does it generate documentation for all link relations, media types, and available resources in workspace?
the1··on Effective Scala
that runtime is larger than firefox update. why not make a proper user agent?
the1··on Favicon Cheatsheet
pollute yo metadata with vendor crap. just like jpeg.
the1··on Introducing Brick: Minimal-markup Web Components for Faster App Development
no, what web/html should be is xml and xslt
the1··on Ask HN: What will entertain us in 20 years?
https://ja.wikipedia.org/wiki/3S%E6%94%BF%E7%AD%96
the1··on Compiling to Lua
why not pay him to get websocket support out? who prioritizes his work queue?
the1··on Node.js incorrectly parses HTTP methods
maybe something like:

    curl -v -s -X "GE$(printf '%.s ' {0..100000})" localhost:8888
It doesn't kill node process.. but there could be buffer overflow or similar bug in that parser code.
the1··on LinuxMint 15 delivers smooth alternative to Ubuntu
yah I like breaking updates. that thrill whenever I do pacman -Syu
the1··on FP vs. OO, from the trenches
is facebook.com about people or simulating people?
the1··on Can you help me understand the benefit of require.js?
javascript "module" dependencies are written in javascript, not in html renderer.

in development:

    <script data-main="your-module.js" src="require.js"></script>
in production:

    <script src="your-module.min.js"></script>
One problem I haven't solved is when html renderer writes inputs to your javascript module. I can either print my module's main body in html:

    <script>
        require(['yourModule'], function(yourModule) {
            var config = {% server template vars %};
            yourModule.start(config);
        });
    </script>
Or use global config variable and shim.
the1··on Successful People create Religions
RMS real rich.
the1··on Python: Common Newbie Mistakes, Part 1
no, default parameter should not be evaluated every time the function gets called.

current behavior is totally fine. it is well defined that somelist.append(x) appends x to somelist inplace.

the1··on Best ways to learn a foreign language
you need a repetitive stream of natural language. then brain automatically analyzes it.

usually, you pick one 30 minute to 60 minute video, and watch it every day, 6 days a week. make sure you take a break every week. you watch it to the point where you can mimic what they are saying as the video is playing. you don't have to know exact meaning of your utterance. but you already have some sense. then, you transcribe it on paper (you need to learn writing system by this time). maybe use dictionary to learn actual words. rehearse with the video. if have friends, rehearse with them. memorize it. move on to the next video.

start with sitcoms then maybe news broadcast, reality shows (court shows are great), movies...

video is just one example. if you're learning a language where you can't find suitable videos (there might be no production in the language), make friends who speak the language. record their conversations. play repetitively until you can follow along with a loud voice. transcribe.. etc.

the1··on Salt: Like Puppet, Except It Doesn’t Suck
if you're using EC2, why not just create an AMI and forget about configuration tools?
the1··on NeoCities
haha I created www account, too.
the1··on On Scala
ah, getOrThrow! nice.
the1··on On Scala
let's say you have more than one future:

    findAirline:        AirlineCode =>                Future[Option[Airline]]
    getFlightsForToday: Airline =>                    Future[Seq[Flight]]
    findAvailable:      Seq[Flight] => Constraints => Future[Option[Flight]
compose them so that I get:

    findFlight: AirlineCode => Constraints => Future[Flight]
I don't want `Future[Option[Flight]]` since Future has own error handling (using Try). No cheating by using scalaz monad transformer.
the1··on Google App Engine now supports Git Push-To-Deploy
http://gitolite.com/the-list-and-irc/deploy.html
the1··on Vine for Android
This app is incompatible with your Virgin Mobile LGE VM670.
the1··on Poll: Full-time software engineers in the Bay Area, what's your annual salary?
hey, I click the up arrow and it disappeared. so I clicked all other up arrows. am i doing it right?
the1··on Show HN: CMS Server written in Go (alpha)
what's wrong with webdav?
the1··on Shortly: a Serverless Pastebin Service - All Data is Stored in the URL
doesn't work with unicode.
the1··on Ask HN: How do you book hotels?
My secretary calls hotels. Or, it's up to her.
the1··on John Carmack starting port of Wolf 3D in Haskell
it's gonna be another perl 6.
the1··on JSON API
please at least include referer link in the response
the1··on PHP Commandments
there's no generic "helpers". probably he meant to be more specific like htmlparsinghelper.
the1··on Git pull --rebase until it hurts
yah, programs should read programmers' mind and do what we want automagically.
the1··on Google Now on your iPhone and iPad
Me too.

I was robbing a bank and Google alerted me that I should leave "now".

Which was really weird for me, since I had a lot of gold to transport.

Apparently, it read through my emails, seen a glitch from other galaxy, figured out portal has opened, and already calculated how long it would take for the aliens to invade the earth.

← PreviousPage 3 of 6Next →