10 ms·
Mio: A High-Performance Multicore IO Manager for GHC [pdf]
- quchen 13y agoThe file also states that "Mio will be released as part of GHC 7.8.1", which is scheduled around October if I recall correctly. Neat
- gnuvince 13y agoPainful to hear about such wonderful developments when you are a Debian Stable user :(
- calibraxis 13y agoWhat are the problems of making Haskell from source? (I did it recently, and it takes a long time, and you have to install a bunch of other random things... But at least it works in the end. I guess that sucks for devops?)
- chalst 13y agoI run into far more version conflicts installing Haskell software through Cabal than any other language environment. Fortunately there is a solution: cabal-dev gives you per-directory package repositories. From https://plus.google.com/u/0/111990768169655655719/posts/Se5eFQdAWk8 https://plus.google.com/u/0/111990768169655655719/posts/Se5e... > Cabal is a package manager that by default compiles packages either to a system database (if invoked as root/admin) or a per-user database. Since Haskell code is very often fussy about exact version numbers, and because Cabal offers essentially no way to uninstall packages, this is very painful. Cabal-dev is a front-end to Cabal that gives you per-directory repositories: suddenly conflicts go away, and you can remove packages by deleting the directory's repository and reinstalling everything again. It's a kludge, but it is very helpful. Cabal-dev: https://github.com/creswick/cabal-dev https://github.com/creswick/cabal-dev ---Postscript Or in stronger terms: http://comments.gmane.org/gmane.comp.lang.haskell.libraries/16922 http://comments.gmane.org/gmane.comp.lang.haskell.libraries/... > I would say, "You should never mutate your user or global package database" and recommend using cabal-dev. The way cabal-install does destructive updates is evil. In particular, it likes to mutate your global or user package database. You run the risk of building something and then breaking it later by mutating its dependencies.
- mercurial 13y agoAlternatively, hsenv is very good too (it's closer to Python's virtualenv)
- quchen 13y agoInstalling GHC manually is not hard, the website even provides pre-compiled binaries. I started doing it for different reasons, but was surprised how painless the process was. After doing it multiple times, I wrote together a file that guides me through the process, which you can find here: https://github.com/quchen/articles/blob/master/install_haskell_platform_manually.md https://github.com/quchen/articles/blob/master/install_haske...
- gnuvince 13y agoThanks for that nice guide! I was actually expecting to install GHC by hand eventually (for now, 7.4 is sufficient).
- SkyMarshal 13y agoSince you're on Debian you can use the awesome Update Alternatives to install Haskell, which is an even better way in my opinion: https://github.com/byrongibson/scripts/blob/master/install/haskell/README.md https://github.com/byrongibson/scripts/blob/master/install/h... Tons of advantages to doing it that way, including the ability to easily maintain multiple versions of both GHC and Platform on the same system and swap between them with a single command. Also doesn't clutter up /usr/local/ with binaries not managed by apt or dpkg. More generally, update-alternatives is a godsend for Stable users. It's like RVM or RBENV in the Ruby world - lets you install and manage multiple versions of the same platform and easily swap between them with a single command, including the system version from repos if you want. It frees you from out of date software in the repos while still providing a system to manage the complexities of it all.
- mercurial 13y agoIf it's your local machine, you may be able to pull it from experimental when it comes out. If it's a server, can't you just compile everything statically and deploy the resulting executable?
- petsos 13y agoWell, you get what you ask for.
- alperakgun 13y agoIs this a research paper, or a currently available library where I can download somewhere?
- porges 13y agoFrom the introduction: > Mio will be released as part of GHC 7.8.1
- tazjin 13y agoThe GHC release containing this is scheduled for release in 1-2 months. You can already build it from source though.
- tazjin 13y agoThe GHC release containing this is scheduled for release in 1-2 months. You can already build it from source though.
- bsaul 13y agoDoes anyone know why functional programming languages are so much favored by research teams over other types of PL ? Every time i hear someone doing PL research, it's always on some kind of functional programming language such as Haskell or ML.
- miga 13y agoElegant structure with simple core, and closeness to mathematical foundations makes complexities more clear and tractable.
- DanWaterworth 13y agoEnforced purity makes lots of things much easier, STM is a prime example.
- tomp 13y agoIt's not about functional programming languages per se, it's just that a lot of core/academic PL research often focuses much more on concepts than on implementation, and languages with strong type systems (all of which are functional, in part also because OO/subtyping is hard to reason about formally) are ideal for encoding these concepts. There is, however, a lot of research about implementation going on using other languages as well. Most GC research, for example, is done using JVM and Java programs. For this particular paper, it would be really hard to choose a different platform, though, because GHC is one of the rare industrial runtimes that offer lightweight threads.
- pron 13y agoExactly. And low-level concurrency research (snapshot algorithms, n-cas) is usually done in C or Java, and so on. BTW, Java has lightweight threads, too: https://github.com/puniverse/quasar https://github.com/puniverse/quasar (I'm the main author)
- dubbledidu 13y agoEh... what exactly is "lightweight" about your threads? As far as I see you still use the same, standard JVM threads everyone uses, combined with a thread pool. What am I missing?
- fauigerzigerk 13y agoI've been wondering about garbage collection in pure functional languages lately. It is often said that statically typed pure functional languages allow the compiler to do a lot more correctness checking. Shouldn't the same formal reasoning features also enable much better garbage collection algorithms? Or would that be asking for a solution to the halting problem?
- jallmann 13y agoWith a purely linear type system, memory management could be handled statically, negating the need for traditional GC. The underlying behavior would be closer to C-style just-in-time {de-}allocation, or C++ RAII. LinearML is an attempt at this: https://github.com/pikatchu/LinearML https://github.com/pikatchu/LinearML
- danking00 13y agoRegarding Linear Type Systems and friends I recommend reading parts of Jesse Tov's PhD thesis [1], "Practical Programming with Substructural Types". I found parts of it pretty accessible as an undergraduate. In particular he uses substructural types to put types on the network protocol of a server and client. Neat stuff. There's also the wikipedia page on Substructural Types [2]. [1] http://www.eecs.harvard.edu/~tov/pubs/dissertation/ http://www.eecs.harvard.edu/~tov/pubs/dissertation/ [2] http://en.wikipedia.org/wiki/Substructural_type_system http://en.wikipedia.org/wiki/Substructural_type_system
- ithkuil 13y agoThat's awesome! Any good pointers to interesting articles about that? I found this: http://www.eg.bucknell.edu/~lwittie/research/space04.pdf http://www.eg.bucknell.edu/~lwittie/research/space04.pdf
- jallmann 13y agoDon't know of any articles, but there are a number of papers on linear logic and linear type theory. Most are pretty dense, but the first few pages of Wadler's "Linear types can change the world!" give a very readable overview of the area. http://homepages.inf.ed.ac.uk/wadler/papers/linear/linear.ps http://homepages.inf.ed.ac.uk/wadler/papers/linear/linear.ps
- DennisP 13y agoIt's going to be interesting to revisit techempower's benchmarks when this comes out. http://www.techempower.com/benchmarks/ http://www.techempower.com/benchmarks/
- est 13y agoFirst of all you have to write a C20M-capable client to replace ab. And high concurrency tends to break MySQL easily. DB is always the bottleneck here, always.
- IanChiles 13y agoSo maybe it's time for a SQL database written in Haskell to take advantage of these new developments? (both Mio and Intel's HRC)
- AaronFriel 13y agoProbably not, the limiting factor for most database systems, even of the plain old boring scale-up not scale-out SQL kind, is disk IO. Before SSDs and virtualized storage, it was all about having cabinets full of disks (usually in expensive SANs) for fast database applications. Enterprise hard disk drives only gave you low triple digit IOPS, I think the highest I've ever read in a 2.5" HDD is about 450 IOPS. If you wanted data resiliency, you used RAID60 or RAID10 or some exotic variant that would usually give you on the order of a 30-50% reduction in capacity and sometimes as much as a 75% reduction in write IOPS - it's always been the writes that have been killer, that's the stuff you need to make sure persists. RAID6 with a crappy controller or on an overloaded good controller would make you pay the write hole tax. Commodity SSDs give you up to, if you're willing to take peak numbers, on the order of 45,000 IOPS. To get to that kind of performance in the last decade, you'd need a cabinet with between 200 and 400 2.5" HDDs, depending on everything involved. Now, that's all 2000s era stuff. The future is bright, thanks to virtualized storage arrays turning commodity storage into massive virtual SANs with tiered storage on consumer SSDs being used like race tires, consumables replaced periodically to maintain top performance, and so on. Even so, the biggest benchmarks I've seen for enterprise systems with multiple 10GbE adapters running raw disk IO has been on the order of 1 million IOPS. I'm sure exotic systems will put out higher numbers, after all there are machines that support over 100 physical CPUs, but they aren't attainable and certainly aren't a broad market. All of those words were said to essentially say that databases have almost always been constrained by disk IO. The SDN controller in the paper? Limited if any disk IO. A SQL database? It probably could be written in naive, pre-java.nio Java and still IO limitations would dwarf the overhead of the language. (There are exceptions, I'm ignoring certain overheads, etc.) Maybe a NoSQL solution in Haskell would scream with this new IO manager, but I suspect it's going to be correctness rather than performance that drives anyone to implement their database in Haskell right now.