ushdf has quit [Read error: 60 (Operation timed out)]
ushdf has joined #ocaml
willb has joined #ocaml
Linktim_ has joined #ocaml
_zack has joined #ocaml
threeve has joined #ocaml
hsuh has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
longh has quit [Read error: 54 (Connection reset by peer)]
alexyk has quit []
mlh is now known as mlh_zombie
willb has quit ["Leaving"]
<blue_prawn>
good night!
blue_prawn has quit ["Client exiting"]
<palomer>
who wants to run a program?
Linktim_ has quit ["Quitte"]
alexyk has joined #ocaml
det has joined #ocaml
Sinden has joined #ocaml
<yziquel>
palomer: what kind of program?
<alexyk>
why doesn't Set include of_list? Not only do I have to write stupid little modules to instantiate, I also have to write all kinds of of_list!
<alexyk>
is there a way to add to a module after it's instantiated with Set.Make?
<alexyk>
I have MySet = Set.Make(My) and would like MySet.of_list; -- way to add it "right in" MySet?
<yziquel>
I'm trying to install godi on a windows system. The README file says there are two flavours on windows, both using cygwin for scripting, but using cygwin dll or mingw for compiling... I need the mingw one... But how can i be sure that the godi-rocketboost tarball uses mingw???
<alexyk>
yziquel: easier to use F# :)
<yziquel>
alexyk: perhaps, but i do not have a choice, running on a virtual machine, and have a deadline...
<yziquel>
I *must* use mingw...
<yziquel>
alexyk: why not declare your module as A, then include A in another module which will contain your extra stuff and call it again A.
<yziquel>
?
<palomer>
yziquel, gtk
<alexyk>
yziquel: interesting
<palomer>
yziquel, do you have a bugzilla account?
<yziquel>
alexyk: i did something like this once: in a file called A.ml, i defined explicitely a recursive module A inside, and then included it, so that A.mli could kick off the A.A recursive module, and keep it as A.ml only.
Sinden has quit ["Leaving"]
<yziquel>
palomer: taking an awful lot of time to compile...
<yziquel>
no one knows how i can be sure to compile against mingw in windows?
<yziquel>
palomer: compiled. what do i do?
tvn1981a has joined #ocaml
<tvn1981a>
hi, is there a way to get how much memory usage a list of data structure is using ?
<tvn1981a>
I have a growing list of object (e.g., type T) and I would like to know overtime how much memory this list consumes
<yziquel>
tvn1981a: the brutal way would be to create a C binding that inspects the values of the list.
<yziquel>
i guess...
<tvn1981a>
I use ps aux | grep program_name and see that my programs takes lots of memory as it runs . I am not sure if the cause is of memory leak or just because the data structure grows
<yziquel>
palomer: ./test2 gives a gtk window that pops up on the top left corner, intitled "GTK Entry".
<yziquel>
palomer: however, when i click on the cross to close it, gnome says to me that the program is not answering.
<palomer>
yziquel, can you run top at the same time
<palomer>
yziquel, it takes a long time to compile? strange
<yziquel>
89% CPU usage...
<yziquel>
palomer: somehow off the target, i presume.
<palomer>
I need memory usage
<palomer>
run it for, like, 3 minutes then tell me the memory usage
<yziquel>
Xorg and the virtual machine are trying to keep up with the pace, but test2 is far ahead...
<yziquel>
ok. running for 3 minutes.
<yziquel>
palomer: what's your worry with this piece of code?
<yziquel>
palomer: memory usage went up from roughly 1% to 2.6%.
<palomer>
what's the memory usage for the process?
<yziquel>
2.6% of total memory... but i do not what my total memory is.
<alexyk>
thelema: error is in the line 118, let rec polys rank = ...
<thelema>
palomer: posted.
<alexyk>
I'm translating Dominic Fox's F# code generating polyominoes into OCaml and had to instantiate all kinds of little Sets... making me strangely attracted to F#'s Set<'a>
<alexyk>
obviously Set has no of_list or map, so I had to concoct some
<thelema>
it's not hard to have a polymorphic set - ocaml does it with hashtables.
<alexyk>
thelema: I thought I first will do it the hard way anyways :)
<thelema>
you just have to be willing to use the pervasives compare, and duplicate the code for the functorized version
<alexyk>
thelema: did it twice, will suffice :) next time it's Hashtbl... but now I get on top of Set
<thelema>
hmm, I get a problem with an unterminated string literal - maybe a copy/paste error
<thelema>
yup,
<thelema>
Error: Unbound value PolySet.empty
<alexyk>
was sitting in an ocaml session for too long -- lemme reload
<thelema>
hmm... File "poly.ml", line 122, characters 17-22:
<thelema>
Error: This function is applied to too many arguments,
<thelema>
(after re-arranging polyset to come earlier)
<thelema>
L122: let hexominoes = polys 6
<alexyk>
thelema: yeah, I was developing in ocaml interpreter, lemme ponder a minute
<alexyk>
obviously things get defined and redefined
<alexyk>
on top of each other...
<alexyk>
ah it works! :)
<alexyk>
is there a way to tell ocaml to clear up all state, without exiting?
<alexyk>
to #use afresh
<thelema>
not that I've ever done.
<alexyk>
well it works in explicit call polys 6, but the line, let polys = 6, needed ;
<alexyk>
I forgot a bit the actual executable statements syntax -- trying to do let hexaminoes = polys 6 in ... gives syntax error at "in"
<alexyk>
wtf?
<thelema>
toplevel lets don't use in.
<thelema>
only lets within other things
<thelema>
let hexominoes = polys 6
<thelema>
(* There are 35 hexominoes *)
<thelema>
let _ = printfn "There are %d hexominoes" (PairSet.size hexominoes)
<alexyk>
ok! that should be, (PolySet.cardinal hexaminoes) :)
<alexyk>
thelema: I saw batteries has a syntax to avoid let _ = ? :)
<thelema>
it isn't needed if you end all your toplevel expressions with ;;
<thelema>
and if you don't do that, the syntax is ambiguous. so the extension has been removed as it didn't do anything really.
<flux>
think for example what would happen such a limitation wasn't in place: let a = ref, a would have type 'a -> 'a ref
<flux>
actually that example doesn't work :)
BSWolf has joined #ocaml
<flux>
but there is a problem (not too unrealistic either although I dont' remember an example off-hand ;)) that would allow (very unsafe) type casting
BSWolfy has quit [Read error: 60 (Operation timed out)]
<flux>
nah, simple let a = ref [] will have a problem
seafood has quit []
* palomer
is against the value restriction!
<flux>
well, I suppose you have a better solution then?-)
<palomer>
restricted type variables!
<palomer>
(just kidding)
<palomer>
removing refs and using monads for everything (hahaha)
mishok13 has joined #ocaml
thelema has quit [Read error: 110 (Connection timed out)]
ushdf has quit ["leaving"]
<palomer>
hrmph.
<palomer>
what a doozy
filp has joined #ocaml
bla has quit [Read error: 113 (No route to host)]
_zack has joined #ocaml
<flux>
man, I finally wrote a decentish substring module for parsing mailboxes, and while the GC load has gone smaller, it isn't any faster. infact, slightly slower.
<flux>
perhaps I should try bypassing the in_channel layer also
dam1 has joined #ocaml
vixey has quit ["Leaving"]
bla has joined #ocaml
gal_bolle has joined #ocaml
_zack has quit ["Leaving."]
ulfdoz has joined #ocaml
Camarade_Tux|bed is now known as Camarade_Tux
marmotine has joined #ocaml
_zack has joined #ocaml
bla has quit [Read error: 110 (Connection timed out)]
bla has joined #ocaml
GustNG has joined #ocaml
<flux>
I think I've discovered the holy grail of data structures: "fully connected graph"
<flux>
the "replace references from parent object to child objects with weak references from child object to parent objects" turned out to be a bit more difficult to manage than I thought
Iskr has joined #ocaml
hkBst has joined #ocaml
Snark has joined #ocaml
bohanlon` has joined #ocaml
bohanlon has quit [Read error: 104 (Connection reset by peer)]
marmotine has quit [Read error: 113 (No route to host)]
<Camarade_Tux>
yziquel, do you really need godi ? if you only have a few libs to install, doing so by hand may be a better solution
okagawa has joined #ocaml
yziquel has quit [Read error: 104 (Connection reset by peer)]
yziquel has joined #ocaml
<yziquel>
Camarade_Tux: sorry, computer crashed. What did you write?
<Camarade_Tux>
yziquel, do you really need godi ? if you only have a few libs to install, doing so by hand may be a better solution
<yziquel>
What I need is definitely to compile things against mingw
<yziquel>
I need Unix package, access to Internet sockets
<yziquel>
and a few other things like getopt
okagawa has left #ocaml []
Camarade_Tux_ has joined #ocaml
<Camarade_Tux_>
hehe, my turn to be disconnected ;)
<yziquel>
ok, both connected...
<yziquel>
I need Unix essentially, and I want to use mingw essentially.
<Camarade_Tux_>
you don't need godi then
<rwmjones>
yziquel, are you trying to cross-compile?
<yziquel>
rwnjones: yes...
<yziquel>
with INET sockets
<yziquel>
in the app.
<Camarade_Tux_>
it would ease a few things during the compilation (are you using findlib under linux ?) but you'd probably spend more time getting godi to work
<yziquel>
yes, using findlib under linux, and the makefile uses findlib...
<yziquel>
(and I've got C bindings too in the code ...)
* Camarade_Tux_
still has to try ocaml+godi with wine
Linktim has joined #ocaml
okagawa has joined #ocaml
<Camarade_Tux_>
hmmm, impossible to get ocaml mingw maxi
<yziquel>
rwnjones: from the snapshot, what do you think is usable...?
<yziquel>
it seems godi has just a small failure. Does anyone know where and how to specify the ocaml standard lib directory? And how to make godi resume?
Camarade_Tux has quit [Read error: 110 (Connection timed out)]
Camarade_Tux_ is now known as Camarade_Tux
<Camarade_Tux>
you should not try to make it 'resume'
<Camarade_Tux>
I've already given the path to that directory but I can't remember, sorry
alexyk has joined #ocaml
<yziquel>
When I launch ocaml it says it cannot find "pervasives.cmi"...
<yziquel>
But i can see where this file is explicitely.
<yziquel>
So why can't ocaml find its standard libraries...?
<Camarade_Tux>
have you set the various paths ?
<yziquel>
nope. what are they?
sporkmonger has joined #ocaml
<Camarade_Tux>
that was a reflex and I forgot to ask you where you had installed ocaml : /usr, other path ?
<yziquel>
well /home/username/local/godi/(s)bin/...
<guyzmo>
fup, to output summaries of ocaml program, you know like in eclipse
<guyzmo>
yup*
seafood has quit [Client Quit]
<guyzmo>
also why not have also an ocaml class browser
<guyzmo>
(and modules)
<flux>
well, there is ocamlbrowser, but it may not be exactly what you're looking for
seafood_ has quit [Connection timed out]
<flux>
then there's otags
<guyzmo>
hm... otags ? I only knew about ocamlwizard
<flux>
and then there's ocamlspotter
<doy>
there are a couple ocaml plugins for eclipse
<flux>
ocaml-tutorial.org could perhaps use a list of ocaml-related tools
<flux>
or would that be outside its scope ;)
<guyzmo>
doy - yup, but I'm not talking about eclipse, it was just to define what I mean by "outliner" :)
<guyzmo>
flux - ok, thanks for the hints :)
<flux>
guyzmo, also, I've found key sequence C-c h very useful in Emacs
<guyzmo>
flux - what does it do ?
<guyzmo>
(I'm not emacs-friendly)
<flux>
say you're on List.iter, it finds that particular documentation (list.mli, right place in it)
<guyzmo>
(though emacs is very good)
<guyzmo>
ah nice
<flux>
but indeed if you haven't tried, you shuld also try compiling an .ml-files with -dtypes and then hitting C-c C-t over a value
<flux>
it will tell you the type of that expression
<guyzmo>
using tuareg mode, I assume
<flux>
yes, but it requires ocaml-mode to be around
<flux>
to use its caml-types.ml
<guyzmo>
ok
<flux>
I don't know how ocamlspotter integrates into emacs, though, so it might provide its own similar functionality anyway
<flux>
it should be -dtypes on steroids
<guyzmo>
and to explain, I want to add ocaml support for pida (pida.co.uk) an ide in python that supports emacs and vim integration
<flux>
so cute, they love me already, and I only went to see their web site! ..
<flux>
;)
yziquel has quit [Remote closed the connection]
Amorphous has quit [Read error: 110 (Connection timed out)]
<flux>
guyzmo, in any case I think adding support similar to emacs' C-c C-t would be very nice to have in any IDE
<flux>
I'm not sure if it's its task to do it, though
<flux>
if it already has integration with emacs and vim..
okagawa has left #ocaml []
<guyzmo>
flux - for sure
Amorphous has joined #ocaml
<guyzmo>
well, my view of *that* IDE, is to provide everything that should be graphical tied together around the editor
okagawa has joined #ocaml
<guyzmo>
like project and file management (M-x speedbar really sucks :p) among other things
okagawa has left #ocaml []
willb has joined #ocaml
Snark has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
tomh has joined #ocaml
<flux>
iswitchb is nice ;)
willb1 has joined #ocaml
willb1 has quit [Read error: 104 (Connection reset by peer)]
rwmjones_ has joined #ocaml
Linktim_ has quit [Read error: 104 (Connection reset by peer)]
Linktim_ has joined #ocaml
jeremiah has joined #ocaml
mishok13 has quit [Read error: 145 (Connection timed out)]
s4tan has joined #ocaml
<s4tan>
hi
pango has quit [Remote closed the connection]
pango has joined #ocaml
<s4tan>
I have a little problem, I'm creating a lexer, and i must match something like '(' _* ')', but i want a lazy match. I have tried to use the 'Lazy' keyword, but i doesn't work in my case, any idea?
<doy>
what do you mean by a lazy match?
Linktim has joined #ocaml
<s4tan>
for example
<s4tan>
function foo(a,b,c); function bar(d,r,f);
Linktim_ has quit [Read error: 113 (No route to host)]
<s4tan>
with '(' (_*) as str ')', I have str = a,b,c); function bar(d,r,f
<s4tan>
instead i want to match only a,b,c
<doy>
oh, the term you're looking for there is 'non-greedy'
<s4tan>
oh yes tnx :)
<s4tan>
i google for this term :)
<doy>
but in order to match things like foo(a, b, bar(c)) correctly, you're going to need to be a bit more complicated than that
<s4tan>
yes i know, but that it is not my case, i need to match only function definition
<doy>
okay
<Raevel_>
is it possible to curry a function taking only one argument without evaluating it? i'm just playing around and for instance List.iter (print_string "1") list did not do the trick
<doy>
looks like you should be able to move that rule into a separate parse function called from your main one, and use 'shortest' instead of 'parse'
<doy>
List.iter (fun _ -> print_string "1")
<doy>
?
s4tan has quit [" mIRC 6.31 in Italiano by Sagitt - www.mircmania.it"]
<Raevel_>
thanks doy that did the trick
<Raevel_>
i'm coming from haskell world so i'm a little confused :-)
<Raevel_>
and that probably didn't make any sense, since i'm a terrible haskell programmer
Raevel_ is now known as Raevel
longh has joined #ocaml
sporkmonger__ has quit []
sporkmonger has joined #ocaml
rwmjones_ has quit ["Closed connection"]
sporkmonger has quit [Client Quit]
okagawa has joined #ocaml
filp has quit ["Bye"]
vixey has joined #ocaml
sporkmonger has joined #ocaml
_JusSx_ has joined #ocaml
willb has quit ["Leaving"]
* palomer
also came from a haskell background
<palomer>
haven't looked back since
<doy>
what made you switch?
<vixey>
It's possible that using more than one language can be effective
willb has joined #ocaml
<doy>
i'm just curious to hear from someone who's actually given haskell a shot and didn't like it... i've never actually used haskell myself, but all i can ever find about it are people talking about how awesome it is
<palomer>
I liked haskell
<palomer>
what made me switch...
<palomer>
I switched for technical reasons
<palomer>
I wanted to compile into something that had references
<flux>
I've tried haskell a bit, and while it's elegant to be pure, it might be tiresome at points
<palomer>
and I wanted my meta language to be the same as my object language
<flux>
but perhaps I haven't given it a real try
<palomer>
my code is much cleaner in ocaml
<palomer>
and I've yet to encounter a state related bug
<vixey>
doy, I don't like haskell standard library there are really stupid mistakes in it but the actual language is interesting
<palomer>
the reasons I switched turned out to be irrelevant
<palomer>
mistakes in the standard library?
<palomer>
never encountered any
<flux>
by mistakes I don't think he means bugs
<palomer>
anyways, I'm addicted to polymorphic variants and objects
<palomer>
and I've ceased to see state as the enemy
<palomer>
actually, I lied; I have run into a few state related bugs
<palomer>
but not too many
* palomer
is off!
_zack has quit ["Leaving."]
<palomer>
oh, and I forgot to mention that unification is _so much easier_ in ocaml
* palomer
is really off
<vixey>
unification ?
<flux>
don't trust him.. he's prolly still lurking around.
<vixey>
I do not
<vixey>
I have written first order unification in both actually
<flux>
how was it in haskell?
<flux>
I'm guessing he means he wants to use mutability a lot when doing it?
willb1 has joined #ocaml
<vixey>
only since I know haskell a little better, I could parameterize it over the datatype - I'm sure this is pretty easy in ocaml too using modules though
willb1 has quit [Read error: 104 (Connection reset by peer)]
<vixey>
but other than, it's just as easy in each
willb2 has joined #ocaml
<flux>
hmm, I'm banned from #haskell
<doy>
heh
<vixey>
serves you right for liking ocaml!
<flux>
I wonder for what reason
<flux>
could be technical
<flux>
have I bounced a lot here?
<flux>
at around 11:11 UTC yesterday
okagawa has left #ocaml []
<Camarade_Tux>
flux, what do you mean by "bounced" ?
<flux>
disconnected/reconnected repeatedly
<Camarade_Tux>
then, no, you didn't
<Camarade_Tux>
flux, could you try to /join #haskell ?
<flux>
aah, now I get it
<flux>
I'm ircing from the same host as tuomov!
<flux>
;-)
willb has quit [Read error: 113 (No route to host)]
<flux>
camarade_tux, it just says: pe205912 [FreeNode] -!- Cannot join to channel #haskell (You are banned)
<flux>
tuomo isn't very popular internet person
<mbishop>
haha
<Camarade_Tux>
#haskell didn't like him writing a competitor tiling wm ? :p
<mbishop>
speaking of
<mbishop>
whatever happened to tuomov
<flux>
well, the guy can have opinions.. loud ones
<mbishop>
I liked some of his opinions
<flux>
I don't think I've ever seen the guy, before or after the point when something would have "happened" :)
<flux>
(although it wouldn't be fully unlikely either, as we're members of the same computer club, modeemi)
<Camarade_Tux>
unrelated, has anyone tried ocamlfuse/fuse ?
<hcarty>
Camarade_Tux: There was a post on the mailing list about a filesystem implemented using OCaml + ocamlfuse some time ago
<hcarty>
It was implemented in a way that the directory hierarchy acted as a search, IIRC
<Camarade_Tux>
hcarty, LFS iirc
<Camarade_Tux>
your comment actually answer my question ;p
<Camarade_Tux>
I was wondering whether fuse fs had to be with files and folders, seems so
<hcarty>
I think it has to be mapped to files and folder from the user's perspective...
<hcarty>
But it may be possible to make, say, a database browser through fuse
<hcarty>
Map tables to directories and such
<hcarty>
Actually, I'd be surprised if that weren't possible
<Camarade_Tux>
the api seems to need files and folders but there's no real reference, the fuse project lacks an introduction
<hcarty>
Camarade_Tux: Given something like sshfs (I think that's the name?), there should be some mechanism for using non-file source material to populate the FS.
<hcarty>
But having never programmed with fuse, this is mostly speculation on my part
<Camarade_Tux>
hcarty, from what I've seen, in fuse you give functions to read folders, open files, close them, ... so it would need folders
<Camarade_Tux>
but I can't seem to find a quick how-to =/
<Camarade_Tux>
hcarty, *all* the examples show the same structure, I guess the filesystems have to be hierarchical, and that's exactly what I wanted to know, thanks :)
Associat0r has joined #ocaml
<flux>
camarade_tux, what kind of filesystem would you think that would not be hierarchical?
<flux>
and still mountable to a unix system..
<Camarade_Tux>
flux, I wanted to know if it could expose other paradigms, it was unlikely but I needed to be sure
snhmib has quit ["Good riddance!"]
<flux>
camarade_tux, but, in the end, all you have is files and directories.. perhaps you could expose your data via another protocol ;)
<Camarade_Tux>
flux, the problem is they have no _clear_ description, hierarchical fs is perfect for me, the approach and the api wasn't though ;)