Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jawher
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
Java vs Go: Impressive Solutions for Invented Problems
(jawher.me)
2 points
by
jawher
6y ago
|
0 comments
2.
▲
by
jawher
8y ago
May I suggest you give https://github.com/jawher/mow.cli a look/try ? Disclaimer: I'm the author of mow.cli ;)
3.
▲
by
jawher
9y ago
Thanks for citing mow.cli [1] and glad you're liking it! And you are spot-on regarding closures: it was a design choice made expressly for the purpose of being able to: - scope command specific flag and args, instead of having one gian
4.
▲
by
jawher
12y ago
docopt() does few things and does them well: * parse the call arguments and split them into options and arguments * perform a very basic validation, i.e. handle the options which take a value and those who don't Granted, mow.cli is muc
5.
▲
by
jawher
12y ago
Parser combinators would certainly have been easier for me, the library author but not necessarily so for the end user. Contrast how it is done now: [-R [-H | -L | -P]] [-fi | -n] [-apvX] SRC... DST With a parser combinator based app
6.
▲
by
jawher
14y ago
> Nice hand-waving of an argument, by throwing a useless Wikipedia link in there as some kind of appeal to authority No need to get agressive over this :) I disagreed with your first comment regarding the dynamic nature of the JVM, and
7.
▲
by
jawher
14y ago
> The JVM, at its core, is not working with static types. The bytecode itself is free of static types, except for when you want to invoke a method, in which case you need a concrete name for the type for which you invoke that method ...
8.
▲
by
jawher
14y ago
> BUT that is happy to let you write a Windows program or a Mac program or a Linux program if that's what you want. Care to explain the last bit ? Because Java also lets you invoke native code (and hence platform specific) if you want t
9.
▲
by
jawher
15y ago
Is it just me or does anybody else think that polluting your code with debugging and logging informations is not such a good idea ? I understand the value of these informations, but changing your method signatures to take them is going too
10.
▲
by
jawher
15y ago
> Maven is a bad dependency/package manager because of the complicated nuance What nuance ? >XML Fair point. I don't know what they were thinking when they decided not to use attributes, but come on, XML is not that bad. > Java
11.
▲
by
jawher
15y ago
Can't you take te same approach ClojureScript took, i.e. to generate a straitforward translation to JavaScript, and then let Google's closure compiler take care of the optimizing thing ? For instance, for this Roy generated JS: var Tr
12.
▲
by
jawher
15y ago
While I share your enthusiasm, I'd like to point out some problems with "Sending rovers to all the planets": 4 of them are gaseous giants, literally no solid ground to land on. Venus is a no go too with its crushing atmospheric pressure, su
13.
▲
by
jawher
15y ago
That depends on what kind of products you make: If it's a website, then you have absolute control over what stack and database to use. But if you're selling any kind of app that needs a database, then you'll need to support different databa
14.
▲
by
jawher
15y ago
It's not just the SQL. There's also the mapping code between your objects and the SQL. for instance, for a select query: select first_name, last_name, login, email from users where id = 5; Depending on the language and ORM you use,
15.
▲
by
jawher
15y ago
> This doesn't seem like an insoluble problem; rather than use an ORM to generate an impenetrable glue layer, it would be better to use code generation tools to create a clean database model and a glue layer that can be easily over
16.
▲
by
jawher
15y ago
It depends on the ORM you use, but I'm afraid it's not as simple as "you can later hand write SQL queries to speed things up". This will interact badly with the ORM's cache/transaction handling: your select queries won't see uncommitted cha
17.
▲
by
jawher
15y ago
> The structural change is regular. That is you don't have to learn each name plural. Not all the time. And if they do, there still are subtle variations in suffixes. For example: - Kalb (dog) => Kilab (dogs) - Liss (thief) => L
18.
▲
by
jawher
15y ago
The answer to your first question is yes, a lambda is always assigned to a SAM type. As to your second question, yes, you can cast a lambda to explicitly specify it's target SAM type: obj.method((Runnable)(()=> println("oh hai !")
19.
▲
by
jawher
15y ago
Even Java has the Void type, meaning you can write: Function<Void> It's a bit shady though as you still have to return a value from the body of the method, and that value has to be null.
20.
▲
by
jawher
15y ago
To the best of my understanding, lambdas-as-objects would mean providing structural types, i.e. generic function types that are able to describe the structure of a lambda (arguments and result type). e.g. (a fictive syntax): Function
21.
▲
by
jawher
15y ago
On why you might not want to mix your markup with the templating logic (copied from a blog post I wrote a while back [1]): - Designers and developers will have a hard time working on the same file, especially the designers who don’t necessa
22.
▲
by
jawher
15y ago
There is also http://www.goodreads.com/ , a feature packed (maybe too much) and a generic (as in not tied to any reading app/device/mode) ... how shall I put it? reading management solution with a social flavour to it.
23.
▲
by
jawher
15y ago
Beating the averages: http://www.paulgraham.com/avg.html
24.
▲
by
jawher
15y ago
Thanks !
25.
▲
by
jawher
15y ago
Genuine question: What does Sencha (a JS UI lib) have to do with Edge (an IDE) ?
26.
▲
by
jawher
15y ago
I fail to see how the lambdas, when added, will make the language more complex. Here's an example: given a list of persons, we'd like to extract all the adults. Compare the good ol' way of doing things in Java: List<Person> persons
27.
▲
by
jawher
15y ago
Yes, invokedynamic[1] 1. http://blog.headius.com/2008/09/first-taste-of-invokedynamic...
28.
▲
by
jawher
15y ago
As I see it, the Model in MVC is everything that is not C or V. It encompasses the service layer, the DAOs, the data objects and what have you. The term Model on it's own doesn't mean much, and is very overloaded with meaning. You can see i
29.
▲
JVM Language Summit 2011 talks and slides
(wiki.jvmlangsummit.com)
1 points
by
jawher
15y ago
|
0 comments
30.
▲
by
jawher
15y ago
Yep, I was expecting something like: class Lorem(val ipsum: Dolor) extends Sit { def amet(consectetur: Adipisicing) : Elit = sed.do((eiusmod: tempor) => incididunt) }
More ›