Already a member? Log in

Sign up with your...

or

Sign Up with your email address

Add Tags

Duplicate Tags

Rename Tags

Share It With Others!

Save Link

Sign in

Sign Up with your email address

Sign up

By clicking the button, you agree to the Terms & Conditions.

Forgot Password?

Please enter your username below and press the send button.
A password reset link will be sent to you.

If you are unable to access the email address originally associated with your Delicious account, we recommend creating a new account.

ADVERTISEMENT
ADVERTISEMENT

Links 1 through 10 of 247 Renzo Borgatti's Bookmarks

Nice and incremental explanation of how to complicate your lif, ehm, handle seed based random numbers in referentially transparent context. Randomness, although often a self-contained problem, is another of those programming activities in Haskell requiring some effort. It essentially requires repeatability using a seed. Catering the seed along is tedious so pipelining it through a Monad seems a natural fit and what at end you should do for infinite generation of randoms.

Share It With Others!

Scary stuff here. In almost every place on the Internet that someone mentions the use of unsafeIO there are at least 10 comments saying not to do it. Well, some explanation here in the related documentation. Things that might happen when you do this ranges from side effects happening more than one time, ordering of IO not guaranteed, potential type system breakage and more. Use at your risk.

Share It With Others!

I tend to forget the meaning of the colon infix operator, here's a 101 from StackOverflow. It's very simple prepend operation on lists. So the type is: a -> [a] -> [a], that is taking an "a" and a list of "a" and returning again a list of "a". So similarly to lisp where the (list 1 2 3) syntax is equivalent to (cons 1 (cons 2 (cons 3 nil))) in haskell [1 2 3 4] is equivalent to 1 : 2 : 3 : 4 : [].

Share It With Others!

Memoization for a strictly type language requires a little bit more work to get it working (compared to dynamically typed languages with powerful macros, such as Clojure). This Haskell wiki page collects a few options. The first option is clearly intercept the call and use some associative data structure. If recursion is involved the trick is to find a way to map the function over the (potentially) infinite domain of input values and then use laziness to just evaluate what's necessary.

Share It With Others!

When searching for persistent data structure and Haskell there are confusing results. Somebody claims some data structures uses structural sharing to emulate mutability on top of immutable data, some other posts talks generically about boxed values. The fact that there are several porting of Clojure like persistent data structures on top of HAMT makes me think that there is no coherent persistency from the ground up in Haskell core. This is one of those libraries, trying to mimic Data.Map interface as much as possible.

Share It With Others!

Sweet! A Haskell news aggregator written in Haskell for Haskell people! If you click on the "group" tab as show here, you get the feed grouped by source. There is really everything worth mentioning, from tweets to github, from reddit to IRC. Probably even too much. Project sources are available as well as the rss /feed.

Share It With Others!

Frege is an Haskell-like language that compiles down to byte code to run on top of the JVM. It’s not just Haskell-inspired, it tries to be as similar to Haskell as possible. A list of the restrictions is provided, but what you can already do is quite long and includes typeclasses with parametric polymorphism, type inference, lazy evaluation, pattern matching, all category theory abstractions like functors, monads, monoids plus much more. The fact that the compiler itself, the standard library and the REPL is written in Frege itself already gives an idea that the project is mature.

Share It With Others!

A honest thread about real experiences of people writing Haskell in commercial environments. Reading this, the main strength of Haskell seems to be its resistance to design misunderstanding once the types have been carefully thought out. Large Haskell applications can better survive developers turnover or half baked design choices. Of course that's assuming you build software to avoid rewrites, likely for application lasting years instead of months (I'm saying this because with micro-services you tend to rewrite as a practice). A few messages down the "immense learning curve" is compared to the non-immense budget of companies who cannot afford an entire business in Haskell. Tutorials and books are not missing, but a cook-book style approach is what is lacking.

Share It With Others!

This is an interview with Duncan Coutts from TechMesh 2012. Duncan is currently the cabal maintainer and working on many other important Haskell packages. This interview is about concurrency in Haskell and it gets quite deep into technical stuff. Some questions about TVars/MVars, STM and Cloud Haskell and how the lightweight Haskell threads enable all sort of good stuff.

Share It With Others!

Type conversion from string can be done with "read" in Haskell. The opposite of that would be "show" if the type derives Show of course. Read and Show are the types that need to be derived in order to implement read/show capabilities and of course Prelude types tend to be consistent with this. I couldn't find references to potentially unsafe evaluations (some overflow errors maybe) depending on reading from a string. In Clojure there is a *read-eval* variable preventing this. Wondering if there is something similar for Haskell or simply all types implementing Read are considered safe.

Share It With Others!

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT