News for hackers. Stuff that matters.

felipehummel

Re:Study mode on Wednesday July 30, 2025 @11:00AM (#44735110)
That's the best and succinct description of using ChatGPT for this kind of things: it's a floor raiser, not a ceiling raiser.
Re:Dotty 0.2.0-RC1 on Wednesday July 12, 2017 @09:33AM (#14752355)
That's no true at all. The syntax is pretty similar with few key differences. The idea is for dotty to become Scala 3.0. But, in the meantime, the next Scala 2.* versions will pave the way for 3.0. Meaning to avoid too many breaking changes in 3.0.

The above has been said repeatedly by Martin Odersky (creator of Scala) and the folks on the Scala compiler team in talks and discussions.

Re:Everyday hassles in Go on Tuesday December 30, 2014 @08:59AM (#8814583)
You may try out using Scala as script language like this: "scala myScript.scala". The first startup times are slower, and even after that it may be slower than Python/Ruby but it still may be sufficient for your use case.

Using "sbt ~run" (re-runs your program automatically at every file change) may also be an option.

Re:Let the Type System do the Work on Monday April 21, 2014 @10:04PM (#7625353)
Although named arguments are good, you won't use it in all function calls.
Re:Ask HN: Why Haskell? on Sunday March 30, 2014 @09:18PM (#7498926)
Can you elaborate on this: "and to handle all cases..".
Re:Why vacation at tech companies should be mandatory on Tuesday March 04, 2014 @05:33PM (#7343707)
From my brazilian perspective it's very strange to read this. In Brazil, vacation is mandatory by law. Any employee has 30 days of vacation by year. But the moment the employee goes on vacation and how he does it (30 days straight, 15-15 days, 20-10...) is still discussed previously with the employer.

I'm not judging which one is better, just acknowledging the culture difference.

Re:What Long Hours Really Mean on Wednesday November 06, 2013 @05:25AM (#6681941)
Not really a natural law, but medicine from time to time finds out that working too much or sleeping less or not having time for pleasure/fun/family hurts your health.
Re:Will Scala ever be enterprise-ready? on Tuesday November 05, 2013 @07:23PM (#6679618)
You can actually make it automatically convert in both directions with just an import. But it is good practice to do it explicitly. In my opinion, for a typesafe language, this is a good way to do it.
Re:Bloom: A Language For Disorderly Distributed Programming on Sunday October 13, 2013 @02:00PM (#6543462)
I think "distributed" in this context is about multiple machines/servers. Not multiple plataforms.
Re:Rediscala: Non-blocking Redis driver for Scala on Thursday August 08, 2013 @02:35PM (#6180859)
A few suggestions: you could remove this kind of idiom: .map( result = { ... }) In the blocking commands example the snippet resembles the Javascript callback hell when it could be simpler to read: https://gist.github.com/felipehummel/6187248

Also, even simplifying it, it still seems overcomplicated. The returning type: Future[Try[Option[(String, ByteString)]]] is too much. Can't you remove the Try or the Option? Futures can already hold either a Sucess or Failure, so isn't the Try redundant?

Re:Brand new Scala-lang.org on Tuesday July 30, 2013 @12:26PM (#6128046)
Chrome in OS X here and it all seems fine.
Comparing Pattern matching to "ifs and elses" shows that, saddly, he didn't really understand its power.

Also, his opinion on Options seems to forget its advantage that the compiler won't let you use a "nullable" object without proper care. It is the main thing about it.

From the talk, it seems that he was new to Scala, didn't properly understand its concepts, wrote a bunch of spaguetti code and then blamed the language.

Re:Intelligent Agents Find Meaning of Text on Sunday January 20, 2013 @06:20PM (#5088724)
I didn't understand what it is supposed to do.
Re:Scala 2.10 now available on Friday January 04, 2013 @07:52PM (#5010859)
It hasn't been a real problem for me. But I cant say the same for every kind of program developed in Scala. I'm not saying that it is not a problem and I dont recognize it. Its just that, for me, the problem is much smaller than some people here seem to think.

Maybe I've waited too long too many times for gcc to compile C/C++ that when I went to Scala I thought waiting some seconds to compile is okay =P

Re:Scala 2.10 now available on Friday January 04, 2013 @07:17PM (#5010760)
How many times you do full recompile during a day? I'm curious because in my workflow I rarely do full recompile.
Re:Scala 2.10 now available on Friday January 04, 2013 @11:47AM (#5008420)
Just use sbt ~compile. It will compile every time a file changes (only what is needed) . I've been using Scala full time for a year now, and I've never been bothered by compiling time.
Re:Using Scala to handle exponential growth at a startup on Tuesday December 18, 2012 @05:04PM (#4939854)
One simple example of Scala power is the greatness of the Future pattern (scala, akka, finagle/twitter and other implementations).

You can still have the exact same Futures functionality in Java, but they will be so much more verbose and annoying to use that it ends up not being a good idea.

Re:Using Scala to handle exponential growth at a startup on Tuesday December 18, 2012 @04:45PM (#4939764)
Scala compilation is indeed slow (although I think C++ is worse). But I always have a "sbt ~compile" running, compiling every file as they change. So the compilation time is pretty much irrelevant to me. While using eclipse, I guess, you'd get the same speed too.
Re:Using Scala to handle exponential growth at a startup on Tuesday December 18, 2012 @04:41PM (#4939744)
The "much harder to read" varies greatly between codebases. Most "sane" codebases are 90% (random percentage) as easy to read as Java. Just collection initialization, transformations, simple pattern-matching, method invocations... Some times there is an ugly nested flatMaps/maps/filters. But in my experience, in general, they're more the exception than the rule.
Re:Clustering related stories on Wednesday April 18, 2012 @11:23AM (#3858396)
Can you elaborate on how you merge clusters? Many times a clusters will be just single-doc clusters, how to check if you need to merge two single-doc clusters? (it seems like the same process that was done in the first place to create the clusters: doc x doc similarity)
Re:Google is close to releasing Siri rival called Majel on Thursday December 15, 2011 @09:39AM (#3356274)
saturdaysaint said GUI.
Re:Google is close to releasing Siri rival called Majel on Thursday December 15, 2011 @09:14AM (#3356177)
Siri has pretty much no interface. The AI/data part of the problem is much, much harder.
I also would really like to read more about successful use of Scala in various companies. Twitter uses it, but is it happy with Scala?

Older »