mfp changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.11.2 released | Inscription for OCaml Meeting 2010 is opened http://wiki.cocan.org/events/europe/ocamlmeetingparis2010
brooksbp_ has joined #ocaml
fschwidom has quit [Remote host closed the connection]
brooksbp has quit [Ping timeout: 245 seconds]
mutewit has quit [Quit: leaving]
M| has quit [Ping timeout: 245 seconds]
M| has joined #ocaml
<orbitz> halfie: check ount Int32
<halfie> orbitz: okay, will give it a shot today
<orbitz> Int32.of_string "1073741829";;
<orbitz> halfie: also, pa_do lets you use modules like Int32 in a sane fashion
<halfie> orbitz: cool! ... I really hate Ocaml :-)
<orbitz> halfie: that' stoo bad
<orbitz> it's a really awesome language
Mr_Awesome has quit [Read error: Connection reset by peer]
<halfie> I have been spoiled by Python :(
<orbitz> ah
<orbitz> giv eit awhile, you'll hate Python
<orbitz> god knows I do
<orbitz> (slighlty joking. I don't mind python but after a decade I have found certain aspects of it bother me considerbaly)
<halfie> Ocaml is not a problem I think. It is the whole idea of functional programming that is strange .. for years I have been using C and Python
<halfie> so OCaml is a mind-bender of sorts
<orbitz> Ocaml isn't too bad since you can be fairly imperative in it
<orbitz> the main problem iwth Ocaml is the lack of a good distirbution IMO
maskd has quit [Quit: leaving]
<alpounet> fix;;
<alpounet> oh, the bot isn't here.
<aavogt> orbitz: what do you mean by distribution?
<orbitz> aavogt: For someone who comes from Python, what you get in the ocaml tar.gz from INRIA is severely aenemic
<orbitz> People new to ocaml also don't care about GODI or Batteries or OASIS. They want to slam them some keyboard and make cool programs with the minimal amount of work to get the libraries to do that
<aavogt> python is the exception with respect to standard library size
<orbitz> Ruby too?
<aavogt> I have not looked at ruby
<orbitz> aavogt: Even C++'s stdlib has a superior string module IMO
<orbitz> Heck, some might argue C's doe stoo
<orbitz> the difference being it's really really freakin easy to write those functions in Ocaml, but a newb doesn't nkow that
<orbitz> What comes standard in haskell is also pretty huge
<aavogt> ghc is getting rid of libraries
<aavogt> ex. opengl bindings are separate
<aavogt> orbitz: if you consider what's in the spec though, haskell has less than the inria ocaml
<orbitz> I find that hard to believe
<orbitz> aavogt: default ocaml only has 1 integer type and it is 16 bits
<orbitz> aavogt: this is just the haskell report, not necssiarlyw hat GHC will include. is this correct (GHC has so much more than Haskell defines)
<aavogt> so what are we actually comparing here?
<orbitz> I also don't think Ocaml is a committee language
<orbitz> so it's hard to compare
<orbitz> I would say Ocaml is closer to GHC than close to Haskell 98
<halfie> join #mpd
<orbitz> In terms of being a distirbution of a language rather htan teh definition
<orbitz> But regardless of what haskell defines you sohuld get, in GHC you get a lot of stuff with the base download. In Ocaml you get less. And IMO I think this is a fact that keeps some people from seriously using Ocaml. They download it, realize that String module doesn't even have a split function, roll their eyes and go back to Python
<orbitz> I'm exagerating of course but I think the problem still exists
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
<halfie> you bet it exists (going back to Python right now!) ;)
<aavogt> this is because it's hard to learn something new to accomplish something you could already
<halfie> yes, sadly the whole system which I am trying to extend is written in Ocaml .. So probably I will have to re-write the whole thing in Python
<halfie> or learn OCaml ...
<orbitz> halfie: I suggest you learn Ocaml. While it has the problem i just pointed out (in my opinion), Ocaml the language is absolutely fantastic
<orbitz> halfie: I am moving a lot of my Python to Ocaml in my spare time
<halfie> orbitz: I see. I will try my best to learn Ocaml ...
<orbitz> halfie: i highly recommend watching http://ocaml.janestreet.com/?q=node/61
<orbitz> the first 20 or so minutes is all about finances which you may be un interested in, but i beleive Minksy maeks a great argument for hcoosing Ocaml if you are concerned with the quality and realiableness of your software
ccasin has quit [Quit: Leaving]
john4lists has left #ocaml []
enthymeme has joined #ocaml
Amorphous has quit [Ping timeout: 276 seconds]
Amorphous has joined #ocaml
thrasibule has quit [Ping timeout: 264 seconds]
yakischloba has quit [Quit: Leaving.]
yakischloba has joined #ocaml
yakischloba has quit [Client Quit]
jeddhaberstro has quit [Quit: jeddhaberstro]
Shoggoth has quit [Quit: Ex-Chat]
dark has quit [Ping timeout: 265 seconds]
joewilliams_away is now known as joewilliams
struktured has joined #ocaml
valross has joined #ocaml
yakischloba has joined #ocaml
kaustuv has joined #ocaml
kaustuv has quit [Client Quit]
joewilliams is now known as joewilliams_away
ulfdoz has quit [Ping timeout: 245 seconds]
joewilliams_away is now known as joewilliams
ikaros has joined #ocaml
ulfdoz has joined #ocaml
M| has quit [Ping timeout: 248 seconds]
M| has joined #ocaml
joewilliams is now known as joewilliams_away
derdon has joined #ocaml
ttamttam has joined #ocaml
ttamttam has quit [Quit: Leaving.]
ulfdoz has quit [Read error: Operation timed out]
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
yakischloba has quit [Quit: Leaving.]
Yoric has joined #ocaml
ttamttam has joined #ocaml
Tianon|Away has joined #ocaml
Tianon|Away has quit [Client Quit]
Yoric has quit [Quit: Yoric]
brooksbp has joined #ocaml
brooksbp_ has quit [Ping timeout: 246 seconds]
derdon has quit [Ping timeout: 276 seconds]
enthymeme has joined #ocaml
protz has joined #ocaml
alpounet has quit [Quit: ``Do what you think you can't do.'']
rwmjones has joined #ocaml
silas has quit [Ping timeout: 248 seconds]
silas has joined #ocaml
Shoggoth has joined #ocaml
_zack has joined #ocaml
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
alpounet has joined #ocaml
kaustuv has joined #ocaml
<kaustuv> Has anyone had any luck with using LablGTK + OpenGL without LablGL, such as with glcaml or glMLite? It seems from the source that a LablGL dependency is hard coded in GlGtk. Do I just have to live with it?
Yoric has joined #ocaml
Yoric_ has joined #ocaml
Yoric_ has quit [Remote host closed the connection]
Yoric_ has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
Yoric_ is now known as Yoric
pimmhogeling has joined #ocaml
valross has quit [Quit: Ex-Chat]
Submarine has joined #ocaml
komar_ has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
barismetin has joined #ocaml
barismetin has quit [Changing host]
barismetin has joined #ocaml
seafood has joined #ocaml
seafood has quit [Quit: seafood]
barismetin has quit [Remote host closed the connection]
barismetin has joined #ocaml
pimmhogeling has quit [Remote host closed the connection]
barismetin has quit [Remote host closed the connection]
barismetin has joined #ocaml
barismetin has quit [Changing host]
barismetin has joined #ocaml
avsm has joined #ocaml
fraggle_ has joined #ocaml
pimmhogeling has joined #ocaml
lvillani has joined #ocaml
munga has joined #ocaml
ikaros has joined #ocaml
<munga> hello : I've a small problem with Str ... can anybody have a look at this : http://pastebin.org/148083 ?
<munga> the problem is that the string_match function never returns (ocaml 3.11)
<flux> interesting
<flux> seems like a (serious) bug, the regexp isn't anything exotic either
<flux> my recommendation regardless of the issue: use Pcre instead
<flux> it has perl regexps and it doesn't use ugly global state
pimmhogeling has quit [Remote host closed the connection]
ikaros has quit [Quit: Leave the magic to Houdini]
<munga> flux thanks for the assessment I'll fill a bug on the bts
ikaros has joined #ocaml
<thelema> well, the regex definitely diverges. Looks like flaw in the engine.
<flux> maybe it's not state machine-based
<thelema> almost certainly it's not - there's not nearly enough code
<thelema> I think.
<flux> heh, Str.string_match (Str.regexp "\\(.*\\)*z") "hello hello hello hello" 0;; takes a little time
<flux> but if I add more characters, the time apparently doubles always
<flux> so it's a complexity issue. possibly unfixable?
thrasibule has joined #ocaml
<thelema> possibly.
Shoggoth has quit [Quit: Ex-Chat]
Shoggoth has joined #ocaml
pimmhogeling has joined #ocaml
_zack has quit [Quit: Leaving.]
fraggle_laptop has joined #ocaml
seafood has joined #ocaml
_zack has joined #ocaml
barismetin has quit [Remote host closed the connection]
_andre has joined #ocaml
barismetin has joined #ocaml
barismetin has quit [Changing host]
barismetin has joined #ocaml
pimmhogeling has quit [Ping timeout: 245 seconds]
_andre has quit [Client Quit]
Nepomuk has joined #ocaml
_andre has joined #ocaml
barismetin has quit [Remote host closed the connection]
barismetin has joined #ocaml
jsk has joined #ocaml
jonludlam has joined #ocaml
ccasin has joined #ocaml
Shoggoth has quit [Quit: Ex-Chat]
Shoggoth has joined #ocaml
jsk has quit [Read error: Connection reset by peer]
jsk has joined #ocaml
pimmhogeling has joined #ocaml
jsk has quit [Quit: Leaving.]
jsk has joined #ocaml
seafood has quit [Ping timeout: 276 seconds]
jonathandav has joined #ocaml
derdon has joined #ocaml
jsk is now known as jsk-afk
<orbitz> In using .mli files can i seperate type annotation from function defintion in Ocaml? like how in Haskell i can do foo :: x -> y
<flux> in ocaml you would put such type definitions in the mli-file, yes
<flux> if you want to put the type definition to the .ml-file, you can use syntax like: let foo : x -> y = fun x -> ..
<orbitz> cool, because i liek top level functions type annotated but let foo (x : int) (y : int) : int = .. is pretty ugly IMO
<orbitz> flux: ah, is that common at all? seems almost uglier?
jsk-afk is now known as jsk
ssp2055 has joined #ocaml
<flux> I use at times. it has the advantage of catching type errors earlier and the syntax is more close to the one in the mli-files.
<thelema> if you want, you can do :
<thelema> let f : int -> int -> bool = fun x y -> x = y + 3
<thelema> but best is to annotate in the .mli
<kaustuv> GL bindings in OCaml really are a mess. LablGL is only version 1.2, GLCaml doesn't bind GLU and GLX, and glMLite is GPL3 (wtf!).
matthias_gorgens has joined #ocaml
joewilliams_away is now known as joewilliams
boscop has joined #ocaml
drk-sd has joined #ocaml
<julm> GPLv3 <3
<Camarade_Tux> LGPLv3 + linking exception?
ikaros has quit [Quit: Leave the magic to Houdini]
<alpounet> GPL sucks
<orbitz> everything sucks
<kaustuv> GPL3 sucks exceptionally because it is incompatible with LGPL2+LE
komar_ has quit [Ping timeout: 258 seconds]
yakischloba has joined #ocaml
kaustuv has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<alpounet> it forbids the use in closed softwares
<Camarade_Tux> it's all a matter of what you want to do
<Camarade_Tux> now, even fsf.org doesn't advise to make such libraries gpl and not lgpl
Mr_Awesome has joined #ocaml
komar_ has joined #ocaml
Shoggoth has quit [Quit: Ex-Chat]
_unK has joined #ocaml
barismetin has quit [Quit: Leaving...]
sepp2k has joined #ocaml
protz has quit [Read error: Operation timed out]
thieusoai has quit [Quit: Leaving]
_zack has quit [Quit: Leaving.]
thieusoai has joined #ocaml
begonzo has joined #ocaml
Yoric has quit [Quit: Yoric]
begonzo has quit [Remote host closed the connection]
begonzo has joined #ocaml
begonzo has quit [Client Quit]
ttamttam has quit [Quit: Leaving.]
begonzo has joined #ocaml
<begonzo> hello
<Camarade_Tux> :-)
<begonzo> can you explain me the error in the file?
<begonzo> i send it you
<Camarade_Tux> nah, pastebin it
begonzo has quit [Ping timeout: 268 seconds]
begonzo has joined #ocaml
<begonzo> here i am
thieusoai has quit [Quit: Leaving]
<Camarade_Tux> begonzo: pastebin your file, don't dcc it
<begonzo> uh
<begonzo> i thought it arrived to you
avsm has quit [Quit: Leaving.]
<Camarade_Tux> well, could have but you shouldn't use dcc for that, a pastebin is more appropriate since it doesn't limit to only one person
<begonzo> :)
<begonzo> yes..i didn't know it
brooksbp_ has joined #ocaml
<begonzo> however nth_child and parent methods fail
<begonzo> because the types are unbounds
pimmhogeling has quit [Ping timeout: 245 seconds]
<Camarade_Tux> I _think_ you need to tell it the type of the method
<Camarade_Tux> [[[ let (l : 'a tr list) = t.children in ]]], that could do it
<begonzo> ah... uhm
<begonzo> ok...i try
brooksbp has quit [Ping timeout: 268 seconds]
<begonzo> nth_child runs now!! wow
<begonzo> but parent still not..
<begonzo> yes!! it run
<begonzo> thank you
<Camarade_Tux> btw, what have you changed for parent?
<begonzo> i write the type for 't' too
<Camarade_Tux> that's what I would have done too
<Camarade_Tux> there might be something better/sexier/... however, dunno
begonzo has quit [Ping timeout: 246 seconds]
begonzo has joined #ocaml
ttamttam has joined #ocaml
jsk is now known as heads
heads is now known as jsk
jsk is now known as jsk-away
ulfdoz has joined #ocaml
alpounet has quit [Remote host closed the connection]
thieusoai has joined #ocaml
pimmhogeling has joined #ocaml
fraggle_laptop has quit [Quit: Quitte]
begonzo has quit [Ping timeout: 276 seconds]
begonzo has joined #ocaml
Yoric has joined #ocaml
pimmhogeling has quit [Ping timeout: 245 seconds]
Demitar has quit [Quit: Bubbles!]
begonzo has quit [Ping timeout: 276 seconds]
Demitar has joined #ocaml
Submarine has quit [Read error: Operation timed out]
brooksbp_ has quit [Quit: Leaving...]
alpounet has joined #ocaml
_andre has quit [Quit: leaving]
_andre has joined #ocaml
ikaros has joined #ocaml
ttamttam has quit [Quit: Leaving.]
Submarine has joined #ocaml
geb has left #ocaml []
yakischloba has quit [Quit: Leaving.]
yakischloba has joined #ocaml
enthymeme has joined #ocaml
krankkatze has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
komar_ has quit [Ping timeout: 258 seconds]
yakischloba has quit [Quit: Leaving.]
_andre has quit [Quit: *puff*]
[1]choppa has joined #ocaml
[1]choppa has left #ocaml []
babalu has joined #ocaml
halfie_ has joined #ocaml
<babalu> hello, i'm trying to use ocamlopt on windows; i first had to install mingw for 'as', and then flexlink, but now i get ** Fatal error: Cannot find file "libws2_32"; can someone help?
lvillani has quit [Quit: Leaving]
komar_ has joined #ocaml
<Camarade_Tux> babalu: not libws2_32.a ? (note the ".a") or .dll.a?
<babalu> no
halfie has quit [Ping timeout: 264 seconds]
<Camarade_Tux> you're trying to compile ocamlopt yourself?
<babalu> no i've installed the mingw port of ocaml and now i'm trying to use ocamlopt.exe to compile my program
<Camarade_Tux> ok, you have a file named "*ws2_32*" somewhere?
<Camarade_Tux> (not the .dll, on your mingw system)
avsm has joined #ocaml
<babalu> Camarade_Tux, i have libws2_32.a in C:\MinGW\
ulfdoz has quit [Read error: Operation timed out]
<Camarade_Tux> C:\MinGW or C:\MinGW\lib?
<Camarade_Tux> also, quick, dirty work-around: copy libws2_32.a to libws2_32, that's really ugly but I'm curious if it fixes the problem and if there are others
<babalu> sorry it's in lib\
<babalu> Camarade_Tux, it still cannot find it even after this
ulfdoz has joined #ocaml
<Camarade_Tux> ah!
<Camarade_Tux> remmeber, and I had that problem two days ago =)
<Camarade_Tux> export OCAMLLIB=/c/mingw/lib
<Camarade_Tux> and try again
<babalu> :D
<Camarade_Tux> (and remove that ugly copy I told you to do ;-) )
<babalu> Camarade_Tux, i'm working on windows right now so will this syntax work?
<Camarade_Tux> you're in msys?
<babalu> in what? yes i'm using the windows console
<Camarade_Tux> I mean: only cmd.exe or in msys?
<babalu> cmd.exe
<Camarade_Tux> you haven't installed msys at all?
<babalu> what is that?
<Camarade_Tux> it's a kind of minimal posix system (minimal, ugly, often annoying)
<babalu> i've added c:\mingw\lib to the OCAMLLIB environment variable, but now i get: >> Fatal error: cannot open pervasives.cmi Fatal error: exception Misc.Fatal_error
<Camarade_Tux> where have you installed the ocaml files?
<babalu> in C:\Program Files\Objective CaML
maattd has joined #ocaml
<babalu> Objective Caml*
<Camarade_Tux> rename that folder to something without space, it always causes problems
<Camarade_Tux> actually, move it outside of Program\ Files for now, maybe c:\mingw\ocaml
<babalu> damn vista and authorization issues
<Camarade_Tux> I said something wrong, OCAMLLIB shouldn't point to C:\mgw\lib (but if it works), it should be set to C:\mingw\ocaml\lib, but we'll see how it goes
<babalu> Camarade_Tux, i reinstalled ocaml in C:\mingw\ocaml but i still have the same error
<Camarade_Tux> babalu: ok, got it (I started a windows virtual machine to test): you should only need to set OCAMLLIB to c:\mingw\lib
<Camarade_Tux> on the other hand, I have ocaml directly in the same tree as mingw
<Camarade_Tux> meaning ocaml.exe is in c:\mingw\bin
<babalu> hm ok; so what should i do?
<Camarade_Tux> you need the PATH environment variable to contain C:\mingw\bin and OCAMLLIB to be the location you have pervasives.cmi in
ulfdoz has quit [Ping timeout: 246 seconds]
<babalu> Camarade_Tux, OCAMLLIB does contain c:\mingw\ocaml\lib and there is pervasives.cmi in this folder
<babalu> and the path environment variable also contains mingw\bin (i needed to add it for the program 'as')
<Camarade_Tux> OCAMLLIB is only c:\mingw\ocaml\lib or is there another path separated with a ';' or ':'?
<babalu> well i also put c:\mingw\lib, separated with a ';' C:\MinGW\ocaml\lib;C:\MinGW\lib
<Camarade_Tux> I'm not sure ocamlopt will try to split that variable so try with _only_ C:\mingw\ocaml\lib
<babalu> but then i got the libws2_32 error message, should i copy the content of mingw\lib into mingw\ocaml\lib?
<Camarade_Tux> you tried with only c:\mingw\ocaml\lib and are still getting it?
mariusz_ has joined #ocaml
<alpounet> rwmjones, xavierbot's gone
<babalu> yes because libws2_32 is in mingw\lib
<Camarade_Tux> babalu: then, extract/move ocaml directly into c:\mingw so they share the same lib folder
<babalu> ok
yakischloba has joined #ocaml
<babalu> thanks a lot it's working :)
<Camarade_Tux> \o/
<Camarade_Tux> with mingw, currently, I think it's desperate to try to keep things clean so I just throw everything in the same folder/hierarchy
Submarine has quit [Ping timeout: 240 seconds]
<babalu> :)
<Camarade_Tux> (will soon improve :-) )
xavierbot has joined #ocaml
<alpounet> welcome back xavier
<julm> :O
* Camarade_Tux wonders if xavierbot is self-aware
<julm> print_endline "La lutte continue !";;
<xavierbot> La lutte continue !
<xavierbot> - : unit = ()
<Camarade_Tux> hahaha :P
<julm> print_endline "print_endline \"La lutte continue !\";;";;
<xavierbot> print_endline "La lutte continue !";;
<xavierbot> - : unit = ()
<julm> mince c'est pas #ocaml-fr /o\
komar_ has quit [Quit: WeeChat 0.2.6]
babalu has quit [Read error: Connection reset by peer]
yakischloba has quit [Quit: Leaving.]
jeddhaberstro has joined #ocaml
valross has joined #ocaml
Nepomuk has quit [Quit: Leaving]
seafood has joined #ocaml
bzzbzz has joined #ocaml
derdon has quit [Ping timeout: 276 seconds]
avsm has quit [Quit: Leaving.]
mariusz_ has quit [Remote host closed the connection]
mariusz_ has joined #ocaml
krankkatze has quit [Remote host closed the connection]
mariusz_ has quit [Quit: Ex-Chat]
mariusz_ has joined #ocaml
seafood has quit [Quit: seafood]
_unK has quit [Remote host closed the connection]
Yoric has quit [Quit: Yoric]
yakischloba has joined #ocaml
yakischloba has quit [Client Quit]
yakischloba has joined #ocaml
yakischloba has quit [Client Quit]
asurai has joined #ocaml
maattd has quit [Ping timeout: 240 seconds]
sepp2k has quit [Quit: Leaving.]
boscop has quit []
<alpounet> can't we pass parametrized type to other parametrized types ? as in :
<alpounet> type 'a foo = Foo of int 'a;;
<xavierbot> Characters 26-28:
<xavierbot> type 'a foo = Foo of int 'a;;
<xavierbot> ^^
<xavierbot> Error: Failure: "invalid type"
fraggle_ has quit [Ping timeout: 276 seconds]