Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Alexy Khrabrov
Clojure!

Sent from my iPad

On Nov 2, 2010, at 2:31, Miguel Mitrofanov miguelim...@yandex.ru wrote:

 Ehm... Forth? TCL?
 
 Отправлено с iPhone
 
 Nov 2, 2010, в 9:04, Permjacov Evgeniy permea...@gmail.com написал(а):
 
 Let us think, that we need some scripting language for our pure haskell
 project and configure-compile-run is not a way. In such a case a
 reasonably simple, yet standartized and wide known language should be
 implemented. What such language may be?
 R(4/5/6)RS ?
 EcmaScript ?
 Some other ?
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] fundata1 -- Karmic Social Capital Benchmark and Shootout

2010-10-28 Thread Alexy Khrabrov
I am happy to announce fundata1 -- the largest-ever program per RAM allocation 
in Haskell, originally implemented in Clojure and then OCaml and Haskell for 
social network modeling.  

http://github.com/alexy/fundata1

It has now become the first large-scale social networking benchmark with a real 
dynamic social graph built from the actual Twitter gardenhose, with the data 
OK'd by Twitter and supplied along with the benchmark.

I wrote three reference implementations, all on github as well.  Clojure and 
OCaml are quite basic, while Haskell community had a chance to optimize its 
data structures and in fact fix a GC integer overflow while working on it.  
You're welcome to fork and improve all of these implementations, and supply 
others!

There's a Google Group, 

http://groups.google.com/group/fundata/

to discuss the shootout.  There's also a blog about it and other functional 
things at

http://functional.tv/

Let the fun begin!

-- Alexy Khrabrov
firstname.lastnameATgmaildotcom

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Configuring cabal install readline on Snow Leopard with MacPorts

2009-12-29 Thread Alexy Khrabrov
OK -- I've managed to build it as follows.

1.  Got the readline from the source at ftp.gnu.org.  Always fun to ftp to the 
mothership, got the patches while at it.  Always fun to remember where to cd to 
patch and which -p level to supply.

2.  Built and installed readline 6.004 with default /usr/local prefix.

3.  In the readline-1.0.1.0, manually ran ./configure 
--with-readline-includes=/usr/local/include 
--with-readline-libraries=/usr/local/lib

4.  runghc Setup.hs build # no runghc Setup.hs configure, messes things right 
back!

5. sudo runghc Setup.hs install

The only difference with cabal install is that (5) installs in /usr/local, but 
apparently subsequent cabal install modules which need readline finds it, even 
though installing in ~/.cabal/.

I wonder if having multiple libreadline5.x.dylib and ...6... in /opt/local/lib, 
the residue from the previous MacPorts, some not deactivated, may confuse 
Cabal.  In any case, installing things manually into /usr/local/ generally 
coexisted well with MacPorts for me, so this works for now.

Cheers,
Alexy

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Configuring cabal install readline on Snow Leopard with MacPorts

2009-12-28 Thread Alexy Khrabrov
I've tried to do cabal install readline on Snow Leopard with MacPorts and it 
fails with the infamous:

$ cabal install readline
...
checking for GNUreadline.framework... checking for readline... no
checking for tputs in -lncurses... yes
checking for readline in -lreadline... yes
checking for rl_readline_version... yes
checking for rl_begin_undo_group... no
configure: error: readline not found, so this package cannot be built
See `config.log' for more details.
cabal: Error: some packages failed to install:
readline-1.0.1.0 failed during the configure step. The exception was:
exit: ExitFailure 1

Googilng shows the usual explanation that Mac'y broken clone interferes; yet I 
do have MacPorts and readline 6 there.  So I try, per fixes recommended,

$ cabal install readline --extra-include-dirs=/opt/local/include 
--extra-lib-dirs=/opt/local/lib
...
checking for rl_readline_version... yes
checking for rl_begin_undo_group... no
...
-- same result.

Downloaded the package and do configure manually:

 ./configure --with-readline-includes=/opt/local/include 
--with-readline-libraries=/opt/local/lib
...
checking for readline in -lreadline... no
checking for rl_readline_version... no
...

Huh?
$ port contents readline
...
  /opt/local/include/readline/readline.h
...
  /opt/local/lib/libreadline.5.0.dylib
  /opt/local/lib/libreadline.5.1.dylib
  /opt/local/lib/libreadline.5.2.dylib
  /opt/local/lib/libreadline.6.0.dylib
  /opt/local/lib/libreadline.6.dylib
  /opt/local/lib/libreadline.a
  /opt/local/lib/libreadline.dylib
...

How should I properly tell cabal install readline where my readline is?
Cheers,
Alexy

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] where does ghc specify ar options

2009-03-09 Thread Alexy Khrabrov

BTW, how did you get the package installed in that location? Did it
involve copying into a temp dir and copying again? I believe that on
OSX, copying a .a file breaks the ar index. This is because for  
reasons

best known to themselves Apple decided that the index is only valid if
its timestamp is the same as the last modification time of the file.


OK -- what I did was rather drastic -- I got ar as a part of cctools  
off Apple's Open Source and verified that it didn't run ranlib on my  
Leopard 10.5.  However it turns out it's supposed to do so -- folks  
from MacPorts even got a flag -S to make it *not* tun ranlib...  Yet  
they're on PPC, and I'm on Intel (MBP).


So what I ended up doing is patching Apple's ar as described in that  
MacPorts thread:


Why ar doesn't call ranlib on Mac?

And after that, cabal-install did bootstrap.sh like a charm.

I know some folks say that they don't need to run ranlib on their  
Macs, and some do, and I could have  wrapped it in sh-wrappers and  
investigate it forever, but this issue has re-ar-ed its head often  
enough that I'm happy with just fetching the li'l slimy ar out of its  
source soup and fixing it in the bud.


Cheers,
Alexy

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] where does ghc specify ar options

2009-03-08 Thread Alexy Khrabrov
When bootstrapping cabal-install 0.6.2 on Mac OSX Leopard (Intel), I
get a problem when linking:

Linking dist/build/cabal/cabal ...
ld: in 
/private/var/folders/mw/mwJSf7ErEa4w8nWyKyyqDTY/-Tmp-/zlib-0.5.0.0/dist/build/libHSzlib-0.5.0.0.a,
archive has no table of contents

This had happened with other ar'chives on my Mac before where it
hadn't for some others.  In all cases the fix was to make sure ranlib
is run on the archive in question, or s is passed to ar during the
creation.  I have the latest XCode 312m gcc build 5490, and ghc 6.10.1
from MacPorts.

In order to ensure ar cr becomes ar crs, I need to find out where in
the ghc build process is it known how to create .a files?  Where can
an ar cr be changed to ar crs on a system-wide ghc build basis?

Cheers,
Alexy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Boost equivalent

2007-02-01 Thread Alexy Khrabrov
One of the great strengths of Python is Boost.Python.  Practitioners  
say it's a major advantage of Python over Ruby, for example.  So the  
question is not whether there's a Boost in Haskell -- C++ and Haskell  
are too different for it to have much meaning -- but whether there's  
or going to be a Boost.Haskell?


Cheers,
Alexy

On Feb 1, 2007, at 5:03 AM, John Ky wrote:
Does the Haskell community have an equivalent to C++ community's  
Boost project with the aim of writing libraries for the eventual  
inclusion into Haskell?


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell Cookbook?

2007-01-31 Thread Alexy Khrabrov

On 1/30/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote:

That reminds me, there's lots of very nice code on Haskell paste,

http://hpaste.org/

You could dump a lot of that into a cookbook, almost.


Thanks for the link, lovely, but very linear -- and not classified,
and not browseable even.  I clicked a bit until my mouse got tired and
there was only 5d age on display.  How about dumping this whole
codebase into a search engine such as Lucene?  Is it available in more
useful form for browsing/study?  (Even a tarball form will be fine...)

Cheers,
Alexy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell Cookbook?

2007-01-31 Thread Alexy Khrabrov

Also see that sequence.complete.org has many code snippets in the blog
section.  What would be a good way to systematize all such snippets
together with hpaste.org and those scrolling through the mailing list?
Perhaps some kind of ontology of snippets like the table of contents
of a cookbook?

Cheers,
Alexy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Is Excel the most used -- and fucntional -- programming lanuage on Earth?

2007-01-30 Thread Alexy Khrabrov

Heard that statement recently -- that Excel is a functional
programming language, and the most used one -- of any programming
languages -- on Earth!  Is it true?  Are there good examples of
typical FP style in Excel?

Cheers,
Alexy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell Cookbook?

2007-01-30 Thread Alexy Khrabrov

So I'm picking up Haskell bit by bit, and I found the code examples
transpiring here most useful.  Reflecting why it's harder to pick up
Haskell than say Ruby or Python, here's what I found -- those
languages deal with a typical domain available to any programmer --
his own computer/system/shell.  The artifacts are files, directories,
timestamps, etc.  The stuff every programmer understands in their
sleep.  APIs.  So I loved the shell-script beautification thread.
That's how I learn about new modules and their functions -- as use
cases.

I also found some pieces of Haskell strewn around people's websites,
blogs, forums; even at paste.lisp.org.  I'm gathering them for my own
purpose and trying to compile and run them.

Wouldn't it be nice -- in case it doesn't exist already -- a[n
O'Reilly[-like]] Haskell Cookbook?  That would be the best way to
learn Haskell.  I've found a wikibook on Haskell, but I look for a big
bag of small, self-contained programs.  Perhaps you esteemed veterans
can dig your small scripts and paste them into a wiki?

Examples needed -- how to connect to a database; to a web service
(e.g. Amazon); read a csv file; represent data equivalent to a
directory listing; a text file/XML; etc...

Cheers,
Alexy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] State of OOP in Haskell

2007-01-28 Thread Alexy Khrabrov

And OOHaskell didn't compile for me on GHC 6.6...  tells you about
currency of use.

On 1/28/07, Lennart Augustsson [EMAIL PROTECTED] wrote:

OOHaskell is ingenious, but it's a terrible way to use Haskell.
It's very unidiomatic Haskell, and it makes you do things in the
same old OO way.  Presumably people are using Haskell to do things
differently?
But as I said, I consider OOHaskell itself a work of genius. :)

-- Lennart

On Jan 27, 2007, at 22:24 , Alexy Khrabrov wrote:

 What about this OOHaskell:

 http://homepages.cwi.nl/~ralf/OOHaskell/

 -- how is it received in the café?  :)

 Cheers,
 Alexy
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] How did you stumble on Haskell?

2007-01-28 Thread Alexy Khrabrov

How do people stumble on Haskell?  I've taught ML at UPenn, and many
of my colleagues in Amazon are in SeaFunc -- switching from C funk to
func funk.  I've got Hudak's book a while ago, but didn't have
time/excuse to delve into it until recently.  Then the most fantastic
chain if events triggered it:

-- finally switched to Intel Mac
-- got Parallels
-- got a recent Linux, openSUSE 10.2, to stick into Parallels
-- decided finally to try Gentoo
-- found equery slow, came across Adelie/FQuery as fast equery
-- emerge adelie

To my surprise, saw it emerge GHC!  Realized Adelie is a Haskell way
to hack Portage.  Dug all things Haskell!

I also used Darcs for a long time.  It probably takes several pro et
contra factors to push away from boring things and to be inducted into
interesting FP things.  Again, UPenn focus on ML was invaluable, and
Ullman's book on ML superb -- and thin!

What's folks most interesting ways to arrive at FP?

Cheers,
Alexy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] State of OOP in Haskell

2007-01-27 Thread Alexy Khrabrov

Well, I'm thinking in terms of OOD/OOA/OOP -- Design, Architecture,
Programming.  That's about the only way to model a bog system.  Say I
have a stock market model -- I'll have a database of tickers, a
simulator to backtest things, a trading strategy, etc.

Do Haskell modules provide enough encapsulation to design a system in
terms of them?  What are the design/architecture units in Haskell if
not OO-based?

Cheers,
Alexy

On 1/27/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote:

deliverable:
 ...In the tradition of the letters of an ignorant newbie...

 What's the consensus on the OOP in Haskell *now*?  There're some
 libraries such as OOHaskell, O'Haskell, and Haskell~98's own qualified
 type system with inheritance.

 If I have GHC, which way to do anything OOP-like is considered right
 today?

Using existentials and typeclasses to do some OO things wouldn't be
considered unidiomatic (particularly, using existentials to package up
interfaces to values).

In general though, using a functional approach will produce better
(simpler) Haskell code, and make it more likely others will understand it.
Personally, I run in fear from OO Haskell ;)

Concrete examples of when you think you need an OO feature might be
useful, so people can discuss the more FP solutions to the same problem.

Cheers,
  Don


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] State of OOP in Haskell

2007-01-27 Thread Alexy Khrabrov

...In the tradition of the letters of an ignorant newbie...

What's the consensus on the OOP in Haskell *now*?  There're some
libraries such as OOHaskell, O'Haskell, and Haskell~98's own qualified
type system with inheritance.

If I have GHC, which way to do anything OOP-like is considered right today?

Cheers,
Alexy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] State of OOP in Haskell

2007-01-27 Thread Alexy Khrabrov

What about this OOHaskell:

http://homepages.cwi.nl/~ralf/OOHaskell/

-- how is it received in the café?  :)

Cheers,
Alexy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Concurrency in Haskell

2007-01-26 Thread Alexy Khrabrov

Well, I'm a bit suspicious if the top references on Haskell
concurrency are either research papers or compiler manual sections.
How about some good ol' bundles of them codes to peruse and take
example from?  E.g., dining philosophers?

Cheers,
Alexy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Concurrency in Haskell

2007-01-25 Thread Alexy Khrabrov

What's the state of concurrency in Haskell?  If Erlang's main strength
is light-weight parallelism, can something like that be done in
Haskell?

Are there good examples of useful code employing GHC concurrency
features one can play with?

Cheers,
Alexy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Strings in Haskell

2007-01-23 Thread Alexy Khrabrov

I wonder if that's another reason OCaml is used in a(t least one)
hedge fund -- why Jane St. preferred OCaml to Haskell, I wonder?  Was
it the state of affairs then that OCaml was more efficient (? --
WAGuess), and would they prefer Haskell now?  I'm trying to make sense
out of OCaml objects out of that already infamously annoying
Practical OCaml book, and class object blah... doesn't look like
much, not to say that class object sounds about as bad as most
English in that book.  (Written by an English major...  What a decline
in US education! :)  I come from ML background, so Haskell laziness
and OCaml objects are all new to me.  But my Haskell book, Haskell
School of Expression, is so much better written, that I'm reading it
much faster.

I'm CC'ing Yaron as his e-mail comes up in my Gmail context adwords on
the word Haskell.  :)  I'm interested in financial data mining and
market modeling -- are there any good application of FP there, say in
Lisp?

Cheers,
Alexy

P.S.  Somebody with an old-fashioned mail client please feel free to
change the subject to Financial Engineering with FP, gmail seems to
etch its subjects in stone.  :)

On 1/23/07, Martin Jambon [EMAIL PROTECTED] wrote:

On Mon, 22 Jan 2007, Alexy Khrabrov wrote:

 Greetings -- I'm looking at several FP languages for data mining, and
 was annoyed to learn that Erlang represents each character as 8 BYTES
 in a string which is just a list of characters.  Now I'm reading a
 Haskell book which states the same.  Is there a more efficient Haskell
 string-handling method?  Which functional language is the most
 suitable for text processing?

In OCaml, strings are compact sequences of bytes. And you can pass them
as-is to C functions:

http://caml.inria.fr/pub/ml-archives/caml-list/2002/08/e109df224ff0150b302033e2002dbf87.en.html


Martin

--
Martin Jambon
http://martin.jambon.free.fr


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Strings in Haskell

2007-01-23 Thread Alexy Khrabrov

On 1/23/07, Bryan O'Sullivan [EMAIL PROTECTED] wrote:

generate financial models for execution by clusters running Excel.


There used to be, on Slashdot, a saying: Now imagine a Beowulf
cluster of these!  :)

Cheers,
Alexy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Strings in Haskell

2007-01-22 Thread Alexy Khrabrov

Greetings -- I'm looking at several FP languages for data mining, and
was annoyed to learn that Erlang represents each character as 8 BYTES
in a string which is just a list of characters.  Now I'm reading a
Haskell book which states the same.  Is there a more efficient Haskell
string-handling method?  Which functional language is the most
suitable for text processing?

Cheers,
Alexy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe