News for hackers. Stuff that matters.

callmecosmas

Re:Why Class? on Sunday November 24, 2013 @08:03PM (#6791951)
Haskell seems pretty left brained to me!
Re:Mathematicians Team Up on Twin Primes Conjecture on Wednesday November 20, 2013 @01:53AM (#6766698)
Actually at the bottom of page 2 of Maynard's preprint he states: "We emphasize that the above result does not incorporate any of the technology used by Zhang to establish the existence of bounded gaps between primes."

So it seems like it is actually a coincidence, though they were both building off of the same previous work (GPY) so maybe it's not that surprising.

Why not F#?
Re:Emacs package Geiser improves Scheme development on Tuesday July 23, 2013 @03:01AM (#6088611)
I think the main difference is that SLIME is for Common Lisp and Geiser is for Guile/Racket. More than that, I don't know enough about SLIME to say.
Re:Why the world needs Haskell on Wednesday July 10, 2013 @03:30AM (#6017977)
Haskell certainly has a big learning curve, but the experience will be much more rewarding than learning Clojure or F#. Haskell is a (relatively) uncompromising language and Clojure and F# are really just trying to take some of the features of Haskell and bring them into the mainstream. So if you learn F# or Clojure it may help you if you ever try to learn Haskell, but if you learn Haskell, F# and Clojure will be trivial to learn.
Re:Functional Programming in 5 Minutes on Sunday May 19, 2013 @04:00PM (#5734184)
You don't actually need the second lambda since all Haskell functions take one argument, so you can just do

  f = \x y -> x + y
and you'll have an implicit lambda before the y.
Re:Functional Programming in 5 Minutes on Sunday May 19, 2013 @03:56PM (#5734165)
Python implementations do not have tail call optimization but that doesn't really have anything to do with functional programming.

Common Lisp has mutable data structures by default and actually I think one of the most elegant parts of CL is the setf macro http://www.lispworks.com/documentation/HyperSpec/Body/m_setf..., which is a very clean interface to changing state.

The best functional lisps to use right now would be Clojure and Racket. They both use immutable data structures by default, though neither is "pure". Clojure if you want all the good JVM bits and maybe actually convincing your manager to use it and Racket if you just want to learn using a language that's more beginner-friendly (http://htdp.org/ and the DrRacket IDE) or (mostly) compatible with Scheme (SICP, Little Schemer, etc.).

I've found there aren't really any widely used purely functional languages out there except Haskell (which needs it due to laziness).

Re:Writing a Vi-like Graphics Editor in Racket on Tuesday May 14, 2013 @10:51AM (#5705214)
I'm a grad student that works in Racket and fwiw I find that I prefer emacs for editing but DrRacket for testing and debugging. It has great tools for documentation, locating errors and macro expansion and of course it all works out of the box. I also use Geiser, but I've found it buggy and unreliable (including instantly shutting down my OSX machine if I tell emacs to kill it when I quit, plus I still haven't figured out how to limit its memory consumption).
Re:Learning Lisp The Bump Free Way on Wednesday April 24, 2013 @05:35PM (#5604144)
If you're going to try Scheme and you're scared of emacs/vim, I'd suggest Racket. It's got a nice IDE (DrRacket) and a lot of the community is focused on teaching so there's a lot of resources for newbies http://racket-lang.org/learning.html
Re:The most useful thing in bash on Thursday April 18, 2013 @12:13AM (#5568857)
I'm an emacs lover myself, but for that use-case it seems like all you need is rlwrap: http://utopia.knoware.nl/~hlub/rlwrap/#rlwrap
Re:Introducing Clochure: a better Clojure on Monday April 01, 2013 @11:57AM (#5473831)
Racket allows for (), [] or {} in code and it seems that in practice [] is used to distinguish some syntactic forms that have nested parens from normal function calls such as the let and cond forms. So instead of

  (cond ((...) (...))
        ((...) (...)) 
        (else ...)) 
you get

  (cond [(...) (...)]
        [(...) (...)]
        [else ...]) 
which seems to me to be more readable. See here for an example http://docs.racket-lang.org/reference/if.html?q=cond#%28form...
Re:The PyCon Incident on Wednesday March 20, 2013 @07:29PM (#5411422)
I mean I can see how that would be a sexual joke given a certain tone of voice.
Re:Spoiler Alert – JQuery plugin for sensitive content on Monday February 25, 2013 @01:36AM (#5277640)
Cool work but doesn't mix well with text selection. I'm not into js but I wonder if it would be easy to distinguish between clicking on one spot and clicking and dragging for say copy-pasting.