Arc Forumnew | comments | leaders | submitlogin
Ursula : an extensible functional language aiming at brevity for exploratory programing (uklinux.net)
4 points by sacado 6064 days ago | 5 comments


4 points by drcode 6064 days ago | link

It looks like a dreaded "line noise" language ala perl :)

-----

3 points by jmatt 6064 days ago | link

I think there is a more pleasant way to view it by decompiling.The language looks like byte code to me.

From the manual http://www.basis.uklinux.net/ursala/manual.pdf

  $ fun --main="˜&nSiiDPSLrlXS" --decompile
  main = compose(
    map field((0,&),(&,0)),
    compose(
      reduce(cat,0),
      map compose(
        distribute,
        compose(field(&,&),map field(&,0)))))
EDIT: Reread the manual. It is a mangled perl like language. Seems useful if you are crunching equations and plotting.

-----

1 point by graindish 6063 days ago | link

The language is compiled to virtual machine code similar to what the listing shows, and is closer to the functional programming camp than to perl (ultra fp geeky features for defining your own fixed point combinators in section 7.5.3).

-----

2 points by sacado 6064 days ago | link

I found it was more looking like K or something close.

-----

2 points by bOR_ 6064 days ago | link

K++ perhaps. I'm sort of making unjust fun of the language, but I seriously prefer ((())()()) to this.

  #import std
  #import nat
  
  #comment -[
  solves the general case of the 8 queens problem;
  invoke as queens -n, where n is a number > 3]-
  
  #executable <'par',''>
  #optimize+
  
  queens =
  
  %np+~command.options.&h.keyword.&iNC; -+
     ~&iNC+ file$[contents: --<''>+ %nLP*=; * '<'%='[ '+          ','%=', '+ '>'%=' ]']+ ~&rSSs+ nleq-<&l*rFlhthPXPSPS,
   ~&i&& ~&lNrNCXX; ~&rr->rl %tLnLtXLLWXMk+ ^/~&l ~&lrrhrSiF4E?/~&rrlPlCrtPX ~&r; ^|/~& ^|T\~& -+
      -<&l^|*DlrTS/~& ~&iiDlSzyCK9hlPNNXXtCS,
      ^jrX/~& ~&rZK20lrpblPOlrEkPK13lhPK2; ~&i&& nleq$-&lh+-,
   ^/~&NNXS+iota -<&l+ ~&plll2llr2lrPrNCCCCNXS*=irSxPSp+   ^H/block iota; *iiK0 ^/~& sum+-

-----