dark_light changed the topic of #ocaml to: OCaml 3.09.2 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
youknow365 has quit [Remote closed the connection]
jcreigh has joined #ocaml
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
bzzbzz has quit ["leaving"]
Jonex has quit [Read error: 104 (Connection reset by peer)]
DRMacIver` has joined #ocaml
DRMacIver has quit [Read error: 60 (Operation timed out)]
DRMacIver` is now known as DRMacIver
Carillon has joined #ocaml
hikozaemon has joined #ocaml
<Carillon> hey guys, ocaml newbie here...has anyone here tried making a Qt wrapper for ocaml? i'm not sure how the slots stuff would translate, but would be appreciate any expert thoughts.
SEAMOSS has joined #ocaml
Carillon has quit [Read error: 60 (Operation timed out)]
SEAMOSS is now known as Carillon
shawn has quit [Read error: 60 (Operation timed out)]
Revision17 has joined #ocaml
Smerdyakov has quit ["Leaving"]
d-bug has joined #ocaml
Revision17 has quit ["Ex-Chat"]
shekmalhen has joined #ocaml
tristram has joined #ocaml
kaleef has joined #ocaml
kaleef has left #ocaml []
kaleef has joined #ocaml
smimou has joined #ocaml
shekmalhen has quit ["/quit"]
shawn has joined #ocaml
joshcryer has quit [Client Quit]
slipstream has quit [Read error: 110 (Connection timed out)]
kaleef has quit ["Leaving"]
Snark has joined #ocaml
hinderer has joined #ocaml
hinderer has quit [Client Quit]
kowey has joined #ocaml
moreymat has joined #ocaml
|Lupin| has joined #ocaml
moreymat is now known as kwikwi
<kwikwi> lo all
<kwikwi> does anybody here know how to force the encoding when writing a text file on the disk (using Pervasives) ?
<kwikwi> e.g. my application writes an XML file, and I want it to be encoded in UTF-8
<kwikwi> at the moment it's in my locale (ISO-8859-1), which I don't want it to be as the locale is... you know... locale (and the program must run on other platforms)
<|Lupin|> kwikwi: What areyou usingto produce XML ? Ar you using an existing library ?
<kwikwi> I'm using XML-Light, which only produces a string
<kwikwi> I assume ocaml doesn't encode its string internally in the locale encoding
<|Lupin|> kwikwi: If I were you I'd have a look to Cduce and Camduce. You'd probably feel much more comfortable with these tools t produceyou XML.
<kwikwi> so the problem must be in the output part
<kwikwi> mmmm, sure... but it's one more requirement, whereas XML-Light is already needed for other parts of the greater application with which mine works
<kwikwi> I'll have a look at them nonetheless |Lupin| , thx
<|Lupin|> Ok. Ar yousure that there is no function provided by XML-Light to define which encoding one wants ?
Demitar has joined #ocaml
Jonex has joined #ocaml
<kwikwi> It's possible I missed something
<kwikwi> but the documentation is quite short and... I found nothing relative to encoding
<kowey> google mentions something about the netstring library
<kowey> i hear of a function "recode_string"
<kwikwi> mmm
<kwikwi> thx kowey
<kwikwi> i'll browse it later, gotta go
<kwikwi> +
<smimou> kwikwi: else you can use the camomile library to convert your string to utf8
_fab has joined #ocaml
shawn has quit ["Leaving"]
m3ga has joined #ocaml
Demitar has quit ["Ex-Chat"]
Demitar has joined #ocaml
<|Lupin|> bye Camlers
|Lupin| has left #ocaml []
m3ga has quit ["disappearing into the sunset"]
<kwikwi> smimou: i'll have a look at it, thx
kowey has left #ocaml []
Carillon has quit [" HydraIRC -> http://www.hydrairc.com <- 100,000+ downloads can't be wrong"]
creichen has quit [Read error: 131 (Connection reset by peer)]
creichen has joined #ocaml
yondalf has joined #ocaml
<yondalf> anyone use vim? how do you turn off the automatic line wrapping when i code ocaml?
<zmdkrbou> :set tw=1000 or whatever value you want
<zmdkrbou> but using more than 80 columns is baaaad
<yondalf> thanks
Jonex has quit [Read error: 104 (Connection reset by peer)]
yondalf has quit [Read error: 60 (Operation timed out)]
hikozaemon has quit ["Leaving..."]
Smerdyakov has joined #ocaml
ulfdoz has joined #ocaml
<dylan> or :set notw...
<zmdkrbou> heh, didn't know that :)
ulfdoz has quit ["reboot0rn"]
ulfdoz has joined #ocaml
hcarty has joined #ocaml
<hcarty> Is there a shorthand syntax in OCaml for generating a list or array of values, like [ 1 .. 100 ] in Perl?
slipstream has joined #ocaml
kwikwi has quit ["leaving"]
finelemon has joined #ocaml
<Smerdyakov> hcarty, not that I know of in the main language... I'm sure someone has made a camlp4 extension for it.
tristram is now known as dibalout
finelemo1 has quit [Read error: 113 (No route to host)]
<hcarty> Smerdyakov: Thanks, I'll look around
<Smerdyakov> Why not just write a function for it, though?
<hcarty> I can... force of habit mainly :-)
<hcarty> I've been using Perl for a long time, and the quick syntax is handy and readable for me. I've started learning OCaml for thesis/research related work - I'd like to avoid Fortran/C as much as possible.
<Smerdyakov> It's also often true that code that wants the notation you mention is poorly written.
<Smerdyakov> Instead, use a higher-order function that iterates over that range of values.
<hcarty> Ok, thanks for the tip. It's difficult finding and breaking some of these old habits.
DRMacIver has quit [Read error: 104 (Connection reset by peer)]
Oatmeat|umn has joined #ocaml
<dylan> hcarty: haskell has the notation you mention, for the record. :)
Snark has quit [Read error: 104 (Connection reset by peer)]
ookk has joined #ocaml
<ookk> how do i get everything in a list in between head and last?
<ookk> i would like to match a list against head::middle::last
<hcarty> dylan: Haskell is tempting... but this will eventually be for fairly large-scale number crunching... some numerical simulation work, and a ton of satellite data analysis/manipulation. So the (supposed?) speed benefits of OCaml over Haskell have pushed me in this direction.
<hcarty> I'm still early in the process though, and Haskell definitely has a lot going for it. Not the least of which is pugs :-)
<dylan> it's not possible to do head :: middle :: last as pattern matching.
<dylan> you could write a function to do that, though
<ookk> yeah i suppose i could but i thought there was something built in :)
<ookk> dont want to invent the wheel ;)
<dylan> ocaml's standard library leaves a lot of wheels un-invented
<ookk> heh
<hcarty> Speaking of un-invented ... is there anything special that needs to be done to use the extlib modules from an interactive ocaml session? #load "extlib/extLib.cma";; doesn't work for me. A subsequent open Std;; tells me Std is an unbound module.
<ookk> i dont understand why head::last matches [1] for instance
<zmdkrbou> because [1] is 1::[]
<ookk> ok
<ookk> so if i want to match [1] i have to have a pattern like this _::[] ?
<zmdkrbou> or [_], yes
<ookk> but [_] and _::[] matches [1,2,3] also
<ookk> i just want it to match a list with one element
<zmdkrbou> _::[] doesn't match [1;2;3]
<zmdkrbou> in x :: y, x is an element of type 'a and y is of type 'a list
<ookk> oh i see
ookk has quit ["This computer has gone to sleep"]
dibalout has quit [Read error: 110 (Connection timed out)]
mnemonic has joined #ocaml
<mnemonic> hi
hcarty has quit ["Download Gaim: http://gaim.sourceforge.net/"]
mnemonic has quit ["leaving"]
shawn__ has joined #ocaml
smimou has quit ["bli"]
Smerdyakov has quit ["Leaving"]