Which functional programming languages have bioinformatics libraries? [closed] - functional-programming

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Which functional programming languages have bioinformatics libraries easily available?
(Don't include multi-paradigm languages such as Ruby)
Update: Listing which major functional programming languages don't currently have easy access to bioinformatics libraries is also welcome.

Do you consider R as a functional and not multi-paradigm language?
If so, R has the biggest set of libraries for bioinformatics. There are many modules in CRAN, but BioConductor is what you are looking for. It as an active community and most of the libraries have been published on peer-review journals.
note: I think that apart from perl, python, and some small efforts in C/C++ and Java, no other programming language has good bioinformatics libraries at all.

I have started the first serious BioScala project, which includes a tutorial and design philosophy in ./doc. Furthermore I am explaining using Scala for bioinformatics at blog.thebird.nl. BioScala is a work in progress. As you can use both BioJava and BioRuby from Scala - and soon BioLib - you can hit the ground running.

The best-maintained, all-purpose, language-specific bioinformatics libraries are supported by the Open Bioinformatics Foundation: BioPerl, Biopython, BioJava, BioRuby, and BioLib (C++). These libraries are so convenient it's often easier to just write a script in one of those languages even if you'd prefer a different language otherwise.
As Andrew pointed out, you can use BioJava with from a JVM-based functional language like Scala or Clojure.
BioLib is newer than the others, but it's meant to work well with SWIG so any other language can link it. Haskell has a good FFI, so you could try using it with Biolib the NCBI toolkit library -- those are probably maintained better than BioHaskell.

Conversely, writing programs in Haskell is so convenient that it is often easier to supply any missing functionality yourself than to try to understand somebody else's obscure imperative code.
Although Eric takes issue with my maintenance skillz (hey, patches accepted, you know), I think Haskell is a nice platform for bioinformatics, letting the user write succinct and performant code. Works for me!

Biohaskell exists: blog, another link
Scala advocates mention that they can use BioJava: Scala for bioinformatics

And together to BioRuby, you have biogem for packages that are not in the core of bioruby, so you have plenty of more packages.

Related

Which English tutorial would you advise to learn OCaml? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I want to advertise OCaml to beginners, and I am looking for good tutorials in English; not that you have only heard of, but that you have actually tried and found useful...
I quite like the book Developing Applications With Objective Caml -- I guess the title should be updated to mirror the 'OCaml' naming decision. It is old and therefore slightly out-of-date, but on only minor aspects -- eg., it presents the stream syntax as belonging to the core language, but it is now outsourced as a Camlp4 extension. The book is surprisingly complete, and there is a lot of meat already in the chapters 2, 3 and 4.
This books covers a bit of system programming, but if it's what the reader is interested in, I would rather recommend the separate book Unix system programming in OCaml -- also translated into english by a community effort.
Finally, if one want to discover the theoretical underpinnings of OCaml, If found the U3 book, Using, Understanding, and Unraveling the OCaml Language to be a great resource. But it's only for readers that already know about OCaml.
PS: I have a very good opinion on Jason Hickey's introduction to Objective Caml as well, but I can't say I have read it in full, only glanced at it. That's the problem with "beginners" books, you can really read at most one good one.
For me, the primary one is:
$ apt-cache show ocaml-book-en
Package: ocaml-book-en
Source: ocaml-book
Version: 1.0-5
Installed-Size: 7061
Maintainer: Debian QA Group <packages#qa.debian.org>
Architecture: all
Recommends: www-browser | pdf-viewer
Description-en: English book: "Developing applications with Objective Caml"
This is the English translation of the O'Reilly's OCaml French
book "Developpement d'applications avec Objective Caml" that can
be found in the ocaml-book-fr package.
.
This package contains both the HTML and PDF version of the book.
:)
There is also great book for system programming in OCaml and cookbook-style resource here.
The tutorial I used when learning and the one I always recommend to beginners - ocaml-tutorial.org (mirrored at ocamlcore as original site went down).
Here is a book that is intended for newcomers to programming and also those who know some programming but want to learn programming in the function-oriented paradigm, or those who simply want to learn OCaml.
An OCaml port of the book How to Think Like a Computer Scientist has been created by Nicolas Monje.
According to the website, the PDF version of the book should be downloaded
From the book:
The goal of this book is to teach you to think like a computer scientist. This way of thinking combines some of the best features of mathematics, engineering, and natural science. Like mathematicians, computer scientists use formal languages to denote ideas (specifically computations). Like engineers, they design things, assembling components into systems and evaluating tradeoffs among alternatives. Like scientists, they observe the behavior of complex systems, form hypotheses, and test predictions.
The single most important skill for a computer scientist is problem solving. Problem solving means the ability to formulate problems, think creatively about solutions, and express a solution clearly and accurately. As it turns out, the process of learning to program is an excellent opportunity to practice problem-solving skills. That’s why this chapter is called, “The way of the program.”
On one level, you will be learning to program, a useful skill by itself. On another level, you will use programming as a means to an end. As we go along, that end will become clearer.
I've just started with Ocaml, and these are tutorials that I find most helpful:
Documentation and user’s manual - most useful and official
Introduction to Caml - this one i used in my first days (recently) and it was really helpful because of it's simplicity
I thought Jason Hickey's Introduction to Objective Caml was very good (the only actual text on the language I've read, and how I started). INRIA's documentation is nice as well; and reading module signatures by themselves is quite instructive once you get the hang of it ;)
Believe it or not, OCaml was the first language I (really) learned.
There is a new book "Real World OCaml" of Jason Hickey is going to be published soon. On the web-site there is a public beta available for free. Despite the fact the book is not finished yet, I didn't notice any major mistakes or irrelevancies.
It gave me a full-fledged understanding of OCaml. It contains lots of examples illustrating concepts and could be easily considered as a tutorial. I also liked that it partly covers standart modules (List, ListLabels, Map, Sys, String, may be some others).
"The Runtime System" section in this book is very useful. It provides details about compiler implementation, memory management, linkage with foreign code, language cost intuition. The latter I consider very important, because many functional programming books cover concepts without saying how expensive they are in terms of memory and time. Highly recommend this book, especially when there is a free online version.

Learning functional/Clojure programming - practical exercises? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm learning functional programming with Clojure. What practical exercises can you recommend? Online repositories with solutions would be perfect.
One idea I can think of is going through all the popular algorithms on sorting, trees, graphs etc. and implementing them in Clojure myself. While it could work, it may be pretty steep and I'm likely to do it inefficiently (compared to someone who knows what she's doing).
4clojure was launched recently. It takes a lot of inspiration from Functional Koans, and several of the puzzles from 99 Lisp Problems; but it improves on both by providing a learning experience for which you need only your browser.
Problems vary in difficulty from language tutorials like What is the second element of this list? to thought-provoking questions like Is it possible to arrange these N words so that each differs from the preceding one by at most one character, and more problems are being added every day.
I would recommend doing the Project Euler exercises:
http://projecteuler.net/
Project Euler is a series of
challenging mathematical/computer
programming problems that will require
more than just mathematical insights
to solve. Although mathematics will
help you arrive at elegant and
efficient methods, the use of a
computer and programming skills will
be required to solve most problems.
Because many programmers are solving Project Euler exercises, you can compare the solutions to other (non-functional) programming languages, but also Clojure solutions are available: http://clojure-euler.wikispaces.com/, so you can contrast imperative vs. functional/idiomatic Clojure.
Of course you will learn the most by first doing the exercises yourself, without consulting any of the solutions.
Try 99 Lisp Problems. The solutions aren't in clojure, but it should be easy to translate.
I recently started learning Clojure myself, and found labrepl useful.
It lets you get familiar with the basics and the REPL, contains a number of exercises and describes quite a bit of non-obvious stuff that is hard to find in the documentation since you don't yet know what you are looking for.
Recommended.
Edit
Also the Python Challenge, a series of puzzles that can be solved by a few lines of programming; the solution to a puzzle gives you the URL to visit for the next puzzle.
Although not specifically Clojure, the puzzles are quite entertaining and a good way to get your feet wet with any new language IMHO. (There are a couple of puzzles that are specific to Python, but the majority are not. See the forum for Python Challenge Hints when stuck.)
The Python Challenge differs from the Euler tasks in being more practical and less math oriented; tasks include things like filtering the bytes of an image and following hyperlinks programmatically.
There are some Functional Koans for Clojure: https://github.com/functional-koans/clojure-koans
I have not gotten round to trying these, but have heard good reviews.
As a once-upon-a-time LISP programmer, I found Clojure Koans https://github.com/functional-koans/clojure-koans extremely efficient and methodically sound.
Use a three window arrangement (editor + evaluator + repl) for instant feedback, documentation reference and on the fly experimenting.
The topics of the "tutorial" are well organized and gradually introduce more complex material. Certainly a good starting point if you have at least some LISP experience.
I would recommended studying the code in clojure.contrib on github.
As an exercise for learning FP I would recommend just writing the apps you're currently working on in Clojure, but try not to use any Refs or loops. Be dedicated to solving your problems functionally using recursion. If you think you have to use a Ref or a loop make sure you can explain why that is.
http://exercism.io/ has several not-so-trivial exercises, they give you a test and a description, you submit a solution and you refactor by looking at other people's code I highly recommend it, plus it's polyglot you can do the exercises in any programming language they support.
As others have mentioned Project Euler is a great place to start. But pick a good book that will teach you the fundamentals and the rationale for clojure's implementation, Programming Clojure by Stuart Halloway comes to mind.
Once you're done with that Timothy Baldridge offers several video tutorials where he dissects core.async, transducers, logic programming and lots of other fun stuff to play around with at: https://tbaldridge.pivotshare.com/
I strongly recommend Hackerrank, it has functional programming domain: https://www.hackerrank.com/domains/fp/intro
You may check your skills not only with clojure, but haskell, scala, erlang and many more

Resources for learning Verilog [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm new to Verilog. Can someone suggest a learning resource, book, video, blog or anything that they had a good personal experience with and helped them learn it faster?
If it helps, I have experience programming in several high-level languages, but have no experience programming in C.
Thanks
I'm a big fan of Stuart Sutherland's papers and books. He has an exceptionally deep understanding of the language and it really comes through in his writing.
As with any language, the best way to learn is by reading other people's code. To that end, consider OpenCores and OpenSPARC. If you have tools from Xilinx or Altera installed, consider looking through the source code for their IP cores (some cores will be obfuscated, but many are not).
Learning Verilog is very far from high-level languages. The syntax has been inspired by C, yes, but designing electronics (be it using VHDL or Verilog) is very different from writing software.
Having said that, I suppose that you have found the obvious through Google. For instance this tutorial, and them main Verilog site. The latter lists books and contains a free tutorial.
Verilog, first and foremost, is a hardware description language. So you need to have some background in digital design (or at least get yourself familiar with it). Also, the answer to your question will depend on the reason you want to learn Verilog:
are you going to do some FPGA development? If yes, Xilinx and Altera have lots of good Verilog examples and other learning resources. You can install free tools (with some limitations)
are you going to do ASIC development or verification? If yes, browse Synopsys or Cadence sites.
if you just want to learn the language then you'd need at least a simulator to do anything useful with your Verilog code. Look at Icarus Verilog simulator.
There are a number of good text books out there. Online tutorials can introduce the major concepts but there are far fewer hardware engineers using Verilog than there are programmers writing software. You won't get far trying to learn from the few web sites out there.
Of course, there is no point in learning Verilog if you aren't very familiar with digital logic design principles. Verilog is a modeling language, after all, and it is necessary to understand the hardware to model it properly.
"Verilog HDL" by Samir Palnitkar is an easy-to-read, introductory book for Verilog. I found it useful when I was learning the language.
I would recommend that your start with the book 'FPGA prototyping by verilog examples pong p. chu'
FPGA prototyping by verilog example
This book uses all synthesizable codes. The most important thing when programming with HDL (Hardware descriptive language) is that you have to keep what hardware are you making in FPGA with your verilog code statement. For example you make a mux when you use assign statement e.t.c.
You will be thinking hardware.
check this out. This can help write good verilog code with interactive syntax corrections. VGuru is first of its kind Learn-Practice-Teach platform. On the mobile device with less number of key strokes, we can complete a verilog code. Just by a click we can create testbench. https://play.google.com/store/search?q=skand+vlsi

Which functional programming language should I choose as first functional programming language? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I would like to learn a functional programming language to see a different programming paradigm.
My background in programming: Java (I have just passed the SCJP exam), some ruby and very limited Rails. I use bash for basic sysadmin tasks. I use Ubuntu 9.04.
As a second goal I would like to use fp to show kids (14-18 years olds) how math and cs interrelated. The guys are very good at programing (they are learning Python and Java at politechnical high school from the first year). However as tests show, they have difficulties with math esp. basic concepts of discrete math. I think we can develop their math skills by using programming (and I possibly that can be the topic of my teacher training thesis). I think a language with very basic vocabulary would serve this project best.
I vote for Haskell, which has the following advantages:
In Haskell, the simple case is actually simple
The complex case is (usually) still comprehensible by ordinary human minds
It has an ordinary syntax that's not too different from other non-functional programming languages (unlike, say, Lisp)
I'm a big fan of Scheme, not least because the best book on it is freely available.
If your primary goal is to work with teens, it makes sense to use the functional-language pedagogy and technology that is proven to work with teens, and that is PLT Scheme (aka DrScheme) with the How To Design Programs book (also free online). These guys have got great results from middle school through 3rd semester university. They have resources for teachers as well.
Many respondents like SICP. It is a wonderful book—but not to
learn from. If you already know Scheme, it is a good book to admire, but SICP is less about functional programming and more about how to implement all known interesting computer-science ideas in Scheme.
If your primary goal is to learn a really new programming paradigm, then Scheme lacks some features that are very important to many functional programmers:
Programming with pattern matching
Partial application of curried functions
A polymorphic static type system
Pure functional computation
If you want exciting ideas, try Haskell; Haskell makes it a lot harder for you to program your old thoughts in the new language. Instead, Haskell forces you to think new thoughts. In addition to many other resources, Real World Haskell is free online.
Final note: SO has had many similar questions on learning functional programming.
Scala and Clojure both run the JVM so you might be more familiar with their environments.
I'd try Scala. It's not purely functional, it allows you to use a variety of approaches--but much of your java knowledge should port (It's JVM based) including the JDK libraries, and it's one of the most advanced languages I've ever seen.
If you're interested in learning language features and expanding your knowledge of how languages work, I couldn't imagine a better alternative.
My vote goes to Scala or F#, which are both freely downloadable at the moment.
The advantage here is that they are mixed paradigm languages -- Natively they are functional languages, but you can also use imperative and Object Oriented programming. They also have large standard libraries -- Scala rides on the back of Java and F# has all of .NET, so you can program something interesting fairly quickly.
Scheme and Haskell are both pure functional languages, but unfortunately their standard libraries are relatively small, so it's hard-ish to do relatively common things, like parsing XML or scanning web pages.
Since you're already familiar with Python, why not just use its functional capabilities? For more, see this (draft) HowTo.
My question is what approach is likely to be best for the teens you're working with. If they're willing to learn something new and different, Scheme is an excellent choice as a functional language. It's as basic as they come. If you want to keep to a more familiar syntax, Haskell might be your answer.
If you are doing this for learning, then definitely Scheme with SICP. It's going to be hard and frustrating and will blow your mind if you don't have experience with this stuff, but you will learn a lot.
If you want to use functional programming in practice then F#, Scala and Clojure are worth looking at.

How can I get started with functional programming? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
With all the hype around functional programming, which are the best resources to getting started in functional programming [for a C# programmer]? I am not looking for C# 3.0 language improvements.
Shameless plug: I'm the co-author (well, glorified editor really :) of Real World Functional Programming. It's squarely aimed at people such as yourself. It teaches the principles of functional programming, mostly via F#, and also shows how you can apply the same principles in many cases in C#.
It assumes you know C# already, but introduces F# from scratch. It gives you enough knowledge of F# to get you started so you can experiment, but the aim is to teach a functional way of thinking rather than going into every nook and cranny of F# as a language. (In other words, if you want to start using F# as a production language, I'd get another book as well.)
It's not out yet, but you can get early access via the MEAP programme. Several chapters are available already, with more coming soon.
I think for a C# developer with .NET background, the best way to enter functional programming is to learn F#.
Pick a functional language. Python has many functional features. Haskell is purely functional.
Go to Project Euler.
Solve some problems.
If you look at the Project Euler stats, Python and Haskell are very highly ranked.
Edit
Functional Programming in Python:
http://www.ibm.com/developerworks/library/l-prog.html
http://www.amk.ca/python/writing/functional
http://linuxgazette.net/109/pramode.html
http://www.slideshare.net/adambyrtek/functional-programming-with-python-516744
http://scott.andstuff.org/FunctionalPython
http://docs.python.org/tutorial/datastructures.html#functional-programming-tools
http://www.freenetpages.co.uk/hp/alan.gauld/tutfctnl.htm
The free online version of Real World Haskell is a good, cheap way to get started.
Once you've done a few chapters, you'll be in a position to decide whether FP is for you, and whether you want to continue with Haskell or move on to some other language. You may even go on to buy the dead tree version (as I did).
The paradigms you learn from this book, especially the opening chapters, apply equally well to other functional languages. (I like to think my Javascript and Groovy benefited from my studying Haskell).
Spend some time looking at Lisp or Scheme as they're the mother and father of functional programming. PLT Scheme is a great environment to play with Scheme. Get yourself a copy of The Little Schemer as it's a good introduction to Scheme and will help you get up to speed fairly quickly.
Once you've got your head around functional try doing some of the Project Euler problems in a functional way.
I learned functional programming in college, using language Haskell.
In its homepage you most likely find what you need to get started :)
BTW, it takes a lot of practice to see the solution; algorithms, as such, are not what everybody's used to code in Object-Oriented, logic or procedural languages.
I agree with Mehrdad Afshari. If you are familiar with C# start functional programming with F#. The syntax is similar to lambda expressions in C#.
I've been liking learn you a haskell so far, it's pretty good for beginners.

Resources