Arc Forumnew | comments | leaders | submitlogin
2 points by chriseidhof 5538 days ago | link | parent

I'm working on a library for doing continuation-based web-programming with Haskell. Currently, the arc challenge looks like this:

  arc = do name <- getInput
           link "click here"
           display $ "You said: " ++ name
A workflow that asks for two integers (each on a separate page) and multiplies them looks like this:

  add = do x <- getInput
           y <- getInput
           display $ "The product is " ++ show (x * y)
The "getInput"-function is in a typeclass, it generates default instances for basic types like Integers and Strings. This library is based on iTasks (search for clean+iTasks).


2 points by Seanner27 5520 days ago | link

This is the only one that I could see someone who has never programmed in their life and has an IQ of less than 100 actually be able to modify successfully. If they wanted to multiply x,y,z with an additional input page, obviously z <- getInput would go after the y <- getInput, and then x * y * z in show's argument. Of course it's not clear why each input gets a new page and what each page might look like or how to customize it or whatever, but it's impossibly readable...

The ABCL implementation isn't bad either...who'd've thought make-page would make a page? I would've thought

get p/rfd_<asdf>::x[] set - insert 10 more lines of random characters -

Because ruby or python or lolperl with one-of-thousands-of-custom-last-minute-user-made-libraries make for easier comprehension of each other's code.(?) If you want to save time programming, stop inventing new languages and libraries every 3 minutes. Everyone start working together on a vast open-source library-of-everything so we can all communicate with our programs the way we can communicate with English by making a big online programmer-dictionary. If every other post on this forum was written in French/Russian/Chinese we would have a difficult time indeed understanding each other. For some reason however it is acceptable to write in 30 different computer languages, each with 30 different libraries meaning I have to learn 900 different things just to understand this new web Hello World program. And so I can take shots at languages, I think some of the perl solutions are beyond terrible. I tried to explain to my girlfriend why I was breaking up with her, but she didn't understand "f<3.$*@$>?><$#####K-->d3" which of course loads 3 continuation-based web applets supporting proxy-qubits that save session info on a multi-router hyperbolic quantum computer. I'm releasing that library shortly, if anyone is interested.

-----