learning idris & idris for web dev

711 views
Skip to first unread message

Kiuhnm Mnhuik

unread,
Jun 8, 2015, 12:14:07 PM6/8/15
to idris...@googlegroups.com
Hi everyone!
I have two questions:
  1. What's the more efficient way to learn IDRIS?
  2. Can IDRIS be used for web development (both client and server)?

My background is asm, C, C++, C#, Python, Scala, Javascript and I'm thinking of learning Idris. I know nothing about dependent types and I don't know Haskell.

As for the question about web dev, I'd like to develop SPAs (single page applications).

David Feuer

unread,
Jun 8, 2015, 12:35:31 PM6/8/15
to idris...@googlegroups.com
Idris is still a rather experimental language. If you're going for
practical things like web apps, you're probably better off with
Haskell (see especially Yesod, Scotty, Happstack, Snap, GHCJS, and
Haste), Purescript (a Haskell-like language designed especially to
work well in a Javascript environment), and/or Frege (also
Haskell-like, but JVM-focused). That said, if you've always wanted to
"get in on the ground floor", you could be the one to figure out how
to do web apps in Idris!
> --
> You received this message because you are subscribed to the Google Groups
> "Idris Programming Language" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to idris-lang+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Leif Warner

unread,
Jun 8, 2015, 1:19:40 PM6/8/15
to idris...@googlegroups.com
1. For me, the tutorial was enough: http://docs.idris-lang.org/en/latest/tutorial/index.html
Sections 2.2 and 2.3 of the Agda tutorial by Ulf and James that I had read previously were a good background for me, too:
2. Yes; Idris can compile to JavaScript to run in the browser, and also to some format to run on the server (node, C, etc). People have made wrappers for various browser APIs, like Canvas. On the server side, Simon did a web framework example: https://github.com/idris-hackers/IdrisWeb. It looks like it hasn't been developed in a bit; it's likely more work is needed on it (Idris the language is under active development and old code probably needs updates as things change). I think that web framework uses CGI. There's some networking / TCP socket stuff for Idris for the server side; some HTTP stuff could be built on that I imagine. Could also bind to libcurl for making outgoing HTTP calls.

Idris is somewhat similar to Scala, among the languages you listed; your experience there I think will help you most with Idris.

That said, Idris is a new language, as David mentioned, and wouldn't likely be your best choice if you wanted to get something intro production ASAP. It is an exciting project to hack on, however.

--

David Christiansen

unread,
Jun 8, 2015, 1:37:08 PM6/8/15
to idris...@googlegroups.com
Simon Fowler did a bit of work on Web programming in Idris:
http://eb.host.cs.st-andrews.ac.uk/drafts/ifl2013.pdf . I believe the
code has bit-rotted a bit, but it should be fixable, or it could just
be used for inspiration.

Otherwise, the absolute basics are in place: Idris can compile both to
a server app using the C backend and to client code using the JS
backend. The JS backend can also generate Node code if that's more to
your liking. You'd have to do a fair bit of work building
infrastructure, but that can also be fun :-)

As far as the most efficient way to learn Idris goes, the best
resource is still the official tutorial. It is written for people
who've done some Haskell, but you should be able to get something out
of it even if you don't know Haskell. The best place to ask quick
questions is the IRC channel, followed by this mailing list.
Suggestions for how to improve the explanations in the tutorial are
highly welcome, and contributions to it are even more welcome!

Welcome!

/David
Reply all
Reply to author
Forward
0 new messages