Pure, the successor to Q
Author |
Message |
btiffin
|
Posted: Sat Jun 15, 2013 6:24 am Post subject: Pure, the successor to Q |
|
|
Dr. Albert Graef from the University of Mainz in Germany has developed a pretty cool programming language with Pure.
http://en.wikipedia.org/wiki/Pure_(programming_language)
The first 1000 Fibonacci numbers;
code: |
extern int puts(char*);
do (puts.str) (take 1000 (fibs 0L 1L)) with fibs a b = a : fibs b (a+b) & end;
|
last line of that one being
26863810024485359386146727202142923967616609318986952340123175997617981700247881689338369654483356564191827856161443356312976673642210350324634850410377680367334151172899169723197082763985615764450078474174626L
And I guess it's not just the language, it's the interactive environment that makes it fun(ner) to explore.
Nice built in help, source reflection etc.
http://code.google.com/p/pure-lang/wiki/PurePrimer1
And, well thought out integration with C, so it went into OpenCOBOL on the first try.
http://sourceforge.net/p/open-cobol/discussion/109661/thread/e8dc11b0/#e992
Can you see it now? A crusty old COBOL coder, cranking out FP routines and showing auditors lazy evaluated bindings to term rewrites that include open ended infinities? For banking?
I had issues with a Fedora 18 install, Pure wanting LLVM 3.2, and tripping on 3.3, but a few files from a Fedora 17 setup, and good to go for exploring.
Cheers |
|
|
|
|
|
Sponsor Sponsor
|
|
|
mirhagk
|
Posted: Fri Jun 21, 2013 4:45 pm Post subject: RE:Pure, the successor to Q |
|
|
Have you tried haskell? The GHCI is a blast to play with, and it supposedly has really good C integration as well. |
|
|
|
|
|
crossley7
|
Posted: Fri Jun 21, 2013 8:05 pm Post subject: RE:Pure, the successor to Q |
|
|
haskell compiles to C code before compiling down completely so it is extremely fast. My prof used it as pseudo code last year and there were a bunch of really cool things. Plus its a functional language which can be lots of fun once you get used to it. |
|
|
|
|
|
btiffin
|
Posted: Wed Jun 26, 2013 11:40 pm Post subject: RE:Pure, the successor to Q |
|
|
mirhagk; Pure uses Haskell for its pure-gen package. pure-gen is a header file binding generator (for things like pure-gtk). But I can't say I have more than 15 minutes in with ghc and the toolset.
crossley7; Yeah, I'm pretty sure Pure got a lot of ideas from Haskell, the interpreter running C translations and compiles as you type commands. Pretty cool for how speedy it feels.
Cheers |
|
|
|
|
|
|
|