flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
<Yoric[DT]> brendan: nah, it's the same Hashtbl.t as in the base library.
<brendan> </shameless fishing for help>
<Yoric[DT]> sanguinev: :)
<Yoric[DT]> brendan: :)
<sanguinev> Where can I find the doc for output_channels
<Yoric[DT]> sanguinev: in the documentation of OCaml.
hkBst has quit [Read error: 104 (Connection reset by peer)]
<sanguinev> Yoric[DT]: That's what I thought too...
<Yoric[DT]> (Standard library and Unix library)
* sanguinev goes off to hack it in the quickest and dirtiest way possible.
<Yoric[DT]> enjoy
<sanguinev> Thanks for the help BTW. :)
<Yoric[DT]> np
<Yoric[DT]> brendan: there's a library of data structures for OCaml.
<Yoric[DT]> I believe they also have a reimplementation of hashtables.
<Yoric[DT]> Perhaps this could be of use to you.
<brendan> oh? where's that?
<Yoric[DT]> OCaml Reins.
<brendan> great, thanks!
<Yoric[DT]> np
willb has quit [Read error: 110 (Connection timed out)]
Platyna has left #ocaml []
Amorphous has quit [Remote closed the connection]
det has quit [Remote closed the connection]
det has joined #ocaml
Amorphous has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
realtime has quit [brown.freenode.net irc.freenode.net]
schme has quit [brown.freenode.net irc.freenode.net]
kg4qxk has quit [brown.freenode.net irc.freenode.net]
brendan has quit [brown.freenode.net irc.freenode.net]
realtime has joined #ocaml
schme has joined #ocaml
kg4qxk has joined #ocaml
brendan has joined #ocaml
jonasb has quit [Remote closed the connection]
nuncanada has quit ["Leaving"]
middayc has quit ["ChatZilla 0.9.84 [Firefox 3.0.5/2008120122]"]
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
Axioplase_ has quit ["brb"]
Axioplase has joined #ocaml
Ori_B has joined #ocaml
<Ori_B> hi.
<Ori_B> I have a rather bizzare type error...
<Ori_B> I have a function defined as returning a string list
<Ori_B> let edits word = ...;;
<Ori_B> doing '"asdf" :: (edits blah)' gives no error, but doing 'iter print_string (edits blah)' says
<Ori_B> This expression has type string -> unit but is here used with type char -> unit
<Ori_B> does anyone have any idea what's going wrong here?
christian__ has joined #ocaml
<christian__> GO Ocaml GO!!!
<Ori_B> heh. unfortunately, it's not going for me.
<christian__> nanana
<christian__> try linux...try opensuse..there is ocaml packages out there that worx
<christian__> anyone experience with jocaml?
<Ori_B> christian__: eh, ocaml works for me, but I get a very obscure type error.
<Ori_B> This expression has type string -> unit but is here used with type char -> unit
<christian__> wrong type -> wrong thought
<Ori_B> when I do 'List.iter print_string (edits word)'
<Ori_B> but 'print_string (List.reduce (fun a b -> a ^ " " ^ b) (edits word))' works
<christian__> what should it do?
<christian__> its too late for me to think about it...srry
<christian__> print_string is not a function...it evaluates to Unit
<christian__> or so
<christian__> good night
AxleLonghorn has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
det_ has joined #ocaml
det has quit [Read error: 104 (Connection reset by peer)]
tar_ has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
<sanguinev> Ori_B: Try ("asdf") :: (edits blah)
<sanguinev> Ori_B: I suspect that OCaml might think "abc" :: "def" == "abc" ^ "def" ?
<sanguinev> Nevermind.
_jedai_ has joined #ocaml
<thelema> Hi
|jedai| has quit [Read error: 110 (Connection timed out)]
<Ori_B> sanguinev: yeah, I have no idea where it's pulling the 'char' from
<Ori_B> I don't have any variables that should be a char, and other string operations work there too
<thelema> no, abc::def != abc ^ def
<thelema> the first is a list, the second a longer string.
<Ori_B> thelema: any idea what could be causing the error I'm seeing?
<Ori_B> I can work around it, but I have no clue what the issue could be...
<thelema> well, it looks like your function ref strings
<thelema> grr...
<thelema> your function returns a list of characters?
<thelema> in haskell, a string is a list of characters, in ocaml, a string is... a string. it's much more like an array, except it's byte indexed, and ocaml arrays are word indexed
<thelema> 'c' is a character. "c" is a string with length 1
<thelema> "foo" is a string of length 3, 'foo' is not valid
brendan has quit [brown.freenode.net irc.freenode.net]
realtime has quit [brown.freenode.net irc.freenode.net]
schme has quit [brown.freenode.net irc.freenode.net]
kg4qxk has quit [brown.freenode.net irc.freenode.net]
realtime has joined #ocaml
schme has joined #ocaml
kg4qxk has joined #ocaml
brendan has joined #ocaml
<thelema> btw, [List.reduce (fun a b -> a ^ " " ^ b)] is pretty inefficient - try String.concat
<Ori_B> thelema: exactly.
<Ori_B> thelema: which is why I'm so confused.
<Ori_B> '"asdf" :: (edits word)' typechecks just fine
<Ori_B> iter print_string (edits word) doesn't
<thelema> List.iter?
<thelema> (be careful with your [open]s
<Ori_B> yes, List.iter
<Ori_B> it doesn't matter if I add the 'List.'
<Ori_B> that's the first thing I tried
<thelema> and the type error for iter is that you have a (string -> unit), but what's expected is a (char -> unit)... hmmm...
<thelema> the type error is being indicated on print_string, no?
<thelema> which tells me that somehow it believes that (edits word) has type char list.
<thelema> I can't explain why (edits word) would work in the context ["asdf"::(edits word)] if it weren't a string list.
<thelema> even more surprising is that your use of List.reduce fixes things.
<Ori_B> thelema: yes, I know. If I wasn't a total noob, I'd suspect a compiler bug...
<thelema> Ori_B: that's quite unlikely. Any chance you can paste your code? (pastebin.ca)
<Ori_B> give me a minute. it's currently not compiling thanks to me being in the middle of a few edits
<thelema> just enough to reproduce the problem, of course.
<Ori_B> (yeah, that's the whole thing. a dumb spellchecker)
<Ori_B> if you change line 94 to... wait. wtf. it works now.
<Ori_B> let me find a version that doesn't work, because I want to know what I changed accidentally to make it work
<thelema> ok.
<thelema> you should write [let parse_args () = ...] - without the () will cause it to be evaluated immediately. with () delays execution
<thelema> it's not too bad to have code like that executed before the "main" function, but stylistically it's undesirable
<Ori_B> thelema: ah, thanks
<thelema> ah, the problem is iter vs. iter. when you do [open List;; open String;;], if there's any functions in both, the string version hides the List one.
<Ori_B> http://pastebin.ca/1322489 <-- and there you go
<thelema> String provides an iter function that iterates over characters in a string.
<Ori_B> ............OH.
* Ori_B is stupid.
<thelema> try just [open List;; open String;; iter;;]
<Ori_B> ok. I know why adding List.iter didn't work
<Ori_B> I only added it in one place, so the error was repeated.
<thelema> doh
<Ori_B> thanks :)
<Ori_B> I won't do that again
<thelema> not for a long time, at least.
AxleLonghorn has left #ocaml []
Snark has joined #ocaml
seafood has quit []
_jedai_ has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
Axioplase has quit ["bbl"]
_zack has joined #ocaml
Axioplase has joined #ocaml
Snark has quit [Read error: 113 (No route to host)]
|jedai| has quit ["KVIrc 3.4.0 Virgo http://www.kvirc.net/"]
|jedai| has joined #ocaml
animist has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
jknick has quit ["leaving"]
|jedai| has joined #ocaml
_zack has quit [Read error: 113 (No route to host)]
_zack has joined #ocaml
pierre- has joined #ocaml
Associat0r has quit []
ikaros has joined #ocaml
christian__ has quit [Read error: 113 (No route to host)]
Snark has joined #ocaml
vpalle has joined #ocaml
buzz0r has joined #ocaml
<buzz0r> Anyone using wxwidgets or qt via perl4caml or pycaml? Or do you just use gtk or winapi?
|jedai| has quit [Read error: 110 (Connection timed out)]
<buzz0r> this guy made it with wxpython and pycaml
<buzz0r> but the files are offline
|jedai| has joined #ocaml
<buzz0r> there is also an qtcaml project more or less active (last update 5 months)
<buzz0r> but couldnt compile it
<buzz0r> ideas?
<buzz0r> i mean about the cross plattform gui quesiotn in general
<rwmjones> buzz0r, sounds a bit heath-robinson, but it should work (from perl4caml at least)
<rwmjones> we use gtk for cross-platform UIs from OCaml
<rwmjones> originally like this: http://merjis.com/developers/xphelloworld but now we use an OCaml cross-compiler to do everything from Fedora hosts
<buzz0r> ok, thx for the answers! just bookmarkd it
<buzz0r> I also thougt aobut using rocaml
<buzz0r> already tried it with wxruby + Shoes (another ruby gui)
<rwmjones> a long time ago someone did some wxwidgets bindings, however using swig so it probably sucked
<buzz0r> it helps compiling ruby modules from ocalm
<buzz0r> yes, last updated 2004 :)
<buzz0r> Ill try to email the gui that is actually doung it with wxpython somehow and ask him to put his sample on the net again. Ill give you the link then.
<buzz0r> hmm
|jedai| has quit [Operation timed out]
<buzz0r> rwmjones: did you have good experinces with perl4caml?
|jedai| has joined #ocaml
<rwmjones> well I wrote it, so yes
<buzz0r> oh great
<rwmjones> anyhow yes it works fine ... uses lots of memory and is quite slow, but that's entirely down to perl itself
<buzz0r> thats ok with me. wow this is a great piece of work you made! thanks a lot you work on this
<buzz0r> hmm
<buzz0r> so, do you think it would be possible to use wxperl?
<buzz0r> form ocaml?
<rwmjones> yeah, I see no reason why it won't work. You'll have to use the "low level" perl bindings, unless you go to the effort of wrapping them in nice high level OCaml objects. See the source to perl4caml for how to do that.
<rwmjones> ie you'll have to use this interface: http://resources.merjis.com/developers/perl4caml/Perl.html
<rwmjones> instead of the high-level classes we have for some other Perl classes (see: http://resources.merjis.com/developers/perl4caml/)
<rwmjones> but you can write one for wxperl if you are inclined ... please contribute it back to me
<buzz0r> ah ok, so i actually write "real perl code" in my ocaml app ?
<rwmjones> no
<rwmjones> you can eval perl expressions, but I wouldn't recommend that (not really maintainable)
<rwmjones> you have to use perl sv's, av's, hv's directly
<rwmjones> using the low level interface
<rwmjones> and functions like Perl.call_method
<rwmjones> whereas a high-level wrapper would hide that from you (except you have to write the wrapper so it's not really "hidden")
<rwmjones> compare
<rwmjones> to
<rwmjones> really you're better off looking at the perl4caml source code to understand the difference
<buzz0r> hmm, ok, then i will have a deeper check on this and how it works
<buzz0r> but i look forward to it
<buzz0r> ill give you feedback, thx for the links to the documentation.
seafood has joined #ocaml
seafood_ has joined #ocaml
_zack has quit ["Leaving."]
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
seafood has quit [Read error: 110 (Connection timed out)]
Axioplase is now known as Axioplase_
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
_zack has joined #ocaml
ikaros has quit [".quit"]
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
s4tan has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
xah_lee has quit []
sporkmonger has joined #ocaml
sporkmonger_ has joined #ocaml
sporkmonger has quit [Read error: 104 (Connection reset by peer)]
Asmadeus has quit [Remote closed the connection]
sporkmonger has joined #ocaml
Asmadeus has joined #ocaml
seafood_ has quit []
sporkmonger_ has quit [Read error: 110 (Connection timed out)]
christian_ has joined #ocaml
|jedai| has quit [Connection timed out]
|jedai| has joined #ocaml
Asmadeus has quit [Remote closed the connection]
Asmadeus has joined #ocaml
sgnb has quit [Remote closed the connection]
sgnb has joined #ocaml
love-pingoo has joined #ocaml
Stefan_vK1 has joined #ocaml
bzzbzz has joined #ocaml
Stefan_vK has quit [Read error: 110 (Connection timed out)]
vixey has joined #ocaml
|jedai| has quit [Read error: 60 (Operation timed out)]
|jedai| has joined #ocaml
Asmadeus has quit [Remote closed the connection]
willb has joined #ocaml
buzz0r has quit ["Ex-Chat"]
love-pingoo has quit [Read error: 110 (Connection timed out)]
love-pingoo has joined #ocaml
patronus has quit ["leaving"]
patronus has joined #ocaml
chupish has joined #ocaml
Asmadeus has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
jlouis has joined #ocaml
itewsh has joined #ocaml
* rwmjones needs to find a hotel in grenoble ...
* maxote rwmjones, a 3 spoons motel is cheaper than a hotel
r0bby has quit [Client Quit]
r0bby has joined #ocaml
Yoric[DT] has joined #ocaml
s4tan has quit []
psnively has joined #ocaml
|jedai| has quit [Connection timed out]
<psnively> Gleetings, earthrings.
|jedai| has joined #ocaml
|jedai| has quit [Read error: 60 (Operation timed out)]
|jedai| has joined #ocaml
ched has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
vpalle has quit [Connection timed out]
Amorphous has joined #ocaml
<itewsh> I need help for regexp
<itewsh> I'm trying to extract the link in this string : "GET http://www.google.fr/webhp HTTP/1.1"
<itewsh> here is what I am attempting to do : Str.split_delim (regexp "\\(GET\\|POST\\)\\|HTTP/[.0-9]*") "GET http://www.google.fr/webhp HTTP/1.1" ;;
<mrvn> convert to lower case first
bluestorm has joined #ocaml
<itewsh> hum, no in fact : split_delim (regexp "\\(GET\\|POST\\)\\|HTTP.*") "GET http://www.google.fr/webhp HTTP/1.1" ;;
<psnively> Has anyone else tried to build eigenclass' "typed relational algebra" code?
<mrvn> itewsh: split by " " and take the middle
<itewsh> but I get : string list = [""; " http://www.google.fr/webhp "; ""]
<mrvn> itewsh: so?
<itewsh> mrvn: hum, yes, but
<itewsh> hum yes
<itewsh> I also need to check whether I have a "GET" and a "HTTP"
vpalle has joined #ocaml
<mrvn> itewsh: again, split by " "
<mrvn> or rather "[ \t]*"
<mrvn> or lookup the regexp for an url and http request and use them.
<mrvn> in the RFCs
<itewsh> hum ok
<itewsh> hmm*
jak3 has joined #ocaml
<jak3> is it possible to write a method that accepts variable of any type?
<bluestorm> you mean, polymorphism ?
<jak3> yes
<jak3> for example can i want an 'add' function that can add both ints and floats
<jak3> can i write*
<bluestorm> that's not the same thing
<bluestorm> you can easily write a function that does the same thing over any type
<bluestorm> let couple x = (x, x)
<bluestorm> 'a -> 'a * 'a
<mrvn> jak3: no. But you can write a type that can hold either int or float and add those.
<bluestorm> what you want is to do a _different_ thing on different types, that's ad-hoc polymorphism and not supported
<psnively> But see g'caml.
<jak3> ok thanks
<mrvn> Or, if you have a couple (and more complex) of such functions, you can write a functor that you instantiate with the basic arithmetic functions.
<psnively> Yeah, and there's the delimited overloading camlp4 extension, too.
vpalle has quit [Connection timed out]
vpalle has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
pango has quit [Remote closed the connection]
OChameau has quit [Read error: 113 (No route to host)]
pango has joined #ocaml
ygrek has joined #ocaml
Associ8or has joined #ocaml
_zack has quit ["Leaving."]
_zack has joined #ocaml
<Yoric[DT]> Ok, documentation generation worked around.
<Yoric[DT]> Gasp, the Batteries toplevel works but Emacs/Tuareg doesn't like it :(
<hcarty> Yoric[DT]: Is the Batteries master git branch 3.11-safe?
psnively has quit []
<Yoric[DT]> Should be.
<Yoric[DT]> Give me 30 seconds to commit.
<hcarty> And I missed your ping the other day ... was it just a request for testing?
<Yoric[DT]> Yes.
<Yoric[DT]> Pushed.
<jonafan> today i must write visual basic .net
<hcarty> Yoric[DT]: pulled and building here...
<Yoric[DT]> hcarty: thanks :)
<Yoric[DT]> jonafan: sympathies :(
<jonafan> i wonder.... i use vb .net for this particular task because its pretty good at COM
<jonafan> i wonder if F# would be good at COM as well
<jonafan> VB .NET doesn't care when you attempt to send messages to COM objects that it doesn't know the interface for
<jonafan> I'd imagine that if F# treated these objects the same way ocaml treats classes and objects, it'd be great
Snark has quit ["Ex-Chat"]
<hcarty> Yoric[DT]: Builds and installs here
<hcarty> But there is a #man error
<Yoric[DT]> Which one?
<Yoric[DT]> What kind of error?
tar_ has quit []
<hcarty> This is using godi, OCaml 3.11 and the git master branch
<mfp> hcarty: you have godi + 3.11 working?
<hcarty> The build, install and general use seems to go smoothly though
<hcarty> mfp: Yes
<mfp> I was told it didn't work at all
<hcarty> mfp: Currently using the "ocaml311" CVS branch, though I've also built a test "--section 3.11" install
<hcarty> It works well for me
<mfp> with 3.11, that is (I do have 3.11.0+beta2-dev2 + GODI working)
<hcarty> A 3.11-specific section was recently released
<mfp> really? wasn't listed on the site IIRC
<hcarty> But without that, you just have to be careful which packages you install as not all will work
<hcarty> I think it's still considered to be in testing, but it's openly available. There have been a few posts about it on the godi mailing list
<mfp> I had to patch a few to get 3.11.0+beta2-dev2, but that was with section 3.10 + CVS branch
<mfp> thanks, knowing this might save me quite some time :)
<hcarty> mfp: You're quite welcome... good luck! :-)
<Yoric[DT]> hcarty: weird.
<Yoric[DT]> hcarty: how did you install?
<Yoric[DT]> (i.e. did you build the documentation)
<hcarty> Yoric[DT]: make all opt install install-doc
<hcarty> Then "ocamlfind batteries/ocaml"
<Yoric[DT]> mmmhhh....
<hcarty> Oh, sorry... had that on the pastebin
<hcarty> There is a doc/godi-batteries/html/ but not doc/godi-batteries/doc/
seafood has joined #ocaml
* Yoric[DT] will take a look at this.
vpalle has quit [Read error: 60 (Operation timed out)]
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
pierre- has quit [Read error: 110 (Connection timed out)]
xah_lee has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
seafood has quit []
seafood has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
jonasb has joined #ocaml
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
sporkmonger has quit []
|jedai| has quit [Read error: 110 (Connection timed out)]
AxleLonghorn1 has joined #ocaml
|jedai| has joined #ocaml
bluestorm has quit [brown.freenode.net irc.freenode.net]
vixey has quit [brown.freenode.net irc.freenode.net]
Stefan_vK1 has quit [brown.freenode.net irc.freenode.net]
haelix_ has quit [brown.freenode.net irc.freenode.net]
bluestorm has joined #ocaml
vixey has joined #ocaml
Stefan_vK1 has joined #ocaml
haelix_ has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
ChrisRoland has joined #ocaml
chupish has quit ["leaving"]
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
_zack has quit ["Leaving."]
sporkmonger has joined #ocaml
ozzloy is now known as rum
rum is now known as whiterussian
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
jlouis has quit ["Lost terminal"]
ChrisRoland has quit ["Java user signed off"]
ygrek has quit [Remote closed the connection]
<itewsh> where does "output_string" come from ?
<itewsh> ah
<itewsh> pervasives
<itewsh> srry
realtime has quit [Remote closed the connection]
realtime has joined #ocaml
xah_lee_ has joined #ocaml
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
xah_lee has quit [Read error: 145 (Connection timed out)]