gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
CoryDambach has joined #ocaml
bacam has quit [Read error: Connection reset by peer]
wuj has joined #ocaml
CoryDambach is now known as UberLeetScaryHac
UberLeetScaryHac is now known as JokerDoom
mjonsson has joined #ocaml
avsm has quit [Quit: Leaving.]
jakedouglas has quit [Quit: Leaving.]
drksd is now known as rks
iago has quit [Quit: Leaving]
avsm has joined #ocaml
JokerDoom is now known as CoryD
avsm has quit [Quit: Leaving.]
jpd has quit [Quit: This computer has gone to sleep]
CoryD has quit [Quit: Leaving]
jpd has joined #ocaml
wuj has quit [Ping timeout: 265 seconds]
petabit has joined #ocaml
petabit has quit [Remote host closed the connection]
petabit has joined #ocaml
petabit has quit [Killed (idoru (Spam is off topic on freenode.))]
avsm has joined #ocaml
caligula has joined #ocaml
valross has quit [Remote host closed the connection]
ulfdoz has quit [Ping timeout: 245 seconds]
patronus has quit [Ping timeout: 264 seconds]
Yoric has joined #ocaml
avsm has quit [Quit: Leaving.]
patronus has joined #ocaml
ygrek has joined #ocaml
patronus has quit [Ping timeout: 240 seconds]
patronus has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
ttamttam has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
Yoric has quit [Quit: Yoric]
Yoric has joined #ocaml
Yoric has quit [Quit: Yoric]
ftrvxmtrx has quit [Quit: Leaving]
<Axsuul> How come this doesn't work well?? http://codepad.org/6b83K6iP
<Axsuul> however, if I do
<Axsuul> raise(Foo (["a"], ["b"; "c"; "d"]));;
<Axsuul> it works
Yoric has joined #ocaml
ikaros has joined #ocaml
munga has joined #ocaml
munga has quit [Read error: Operation timed out]
<gildor> Axsuul: Foo is a constructor
<gildor> it needs its argument
<gildor> the (...) in l2 build a Tuple
<gildor> but the (...) are argument of Foo not a tuple
<gildor> the same apply when you do pattern matching
<gildor> you cannot do | Foo a -> a
<gildor> (with the exception of _ : | Foo _ -> ()
<gildor> )
munga has joined #ocaml
<Axioplase_> (or in other words, the fact that constructors are not functions, stinks. That's one thing I like about haskell: you can do "data Foo Int Int; let x = foo in let y = x 1 in y 2")
<Axioplase_> (not that it is useful, I think I never had this in actual code.)
ftrvxmtrx has joined #ocaml
bacam has joined #ocaml
<Axsuul> ah i see :) thanks
<gildor> constructors are not functions -> this has been discussed on caml-list
<gildor> Axsuul: even if we have it, I am not really sure it will be a big time saver
ygrek has quit [Ping timeout: 245 seconds]
asmanur_ has quit [Ping timeout: 240 seconds]
asmanur has joined #ocaml
Yoric has quit [Quit: Yoric]
<Axsuul> Alright, err, another funky problem coming up
<Axsuul> this is just a snippet of my code but
<Axsuul> its giving me an error on line 14?
<adrien> you probably neeed being/end or (/)
<Axsuul> something alone the lines of.. a pattern was expected which matches values of type exn
<adrien> begin try
<adrien> ...
<adrien> end
<Axsuul> ah
<adrien> | Star star
<adrien> since the construct is the same, it doesn't know where the clause is from
<Axsuul> brilliant, thanks
<Axsuul> dang, never knew of such a syntax
<Axsuul> i guess they are similar to the curly braces
<adrien> :-)
<adrien> yeah, "begin"/"and" and "("/")" do the same thing: they group
Fullma has quit [Ping timeout: 252 seconds]
Fullma has joined #ocaml
<Axsuul> adrien: is there any way to say
<Axsuul> if No exception was caught?
<adrien> typically, you'd merge that part of your code right after the part that raises the exception
<adrien> makes sense?
<Axsuul> hmm, no sorry, could you rephrase that
<adrien> with an exception, your code will be interrupted right in the location that raises the exception which means that anything you write after that location will only be executed if no exception was raised
<Axsuul> what if im doing the try .. with
<Axsuul> like I actually want to opposite to happen
<Axsuul> If an exception is raised, i want to catch it, and do something.. however, if no exception is raised, I want to raise an exception
<heller> does something like parsec exist for ocaml?
<adrien> try let foo = function_that_may_rise_an_exception in raise (Done foo) with | Ex1 -> print_endline "ex1" | Ex2 -> print_endline "ex2"
<Axsuul> adrien: for example, would something like this work? http://codepad.org/U3jaBauM
<adrien> heller: afaik, yes
<adrien> haven't used it though
<adrien> Axsuul: should
<adrien> but if it's simply Some/None result, I'd use an option type
<heller> adrien: ok, I've only seen oyacc and this recursive descent parser camlp4, so i guess this camlp4 will be the parsec equivalent?
_unK has joined #ocaml
_andre has joined #ocaml
<adrien> googling mentions ostap but I think there's a more recent one, however I don't parse lots of things and have never used these
Yoric has joined #ocaml
<adrien> ah, in Batteries!
<adrien> batteries.forge.ocamlcore.org/doc.preview:batteries-beta1/html/api/Future.Parser_co.html
<adrien> see the word of warning however
<Axsuul> thanks adrien
<Axsuul> damn, never thought I would say this, but OCaml is growing on me and I kinda like it :)
<Axsuul> especially when things work! bahah
<adrien> ^ ^
<heller> adrien: thanks
<adrien> heller: some people here will know the current state of
<adrien> Parser_co better than I do, wait a bit maybe
ttamttam has quit [Remote host closed the connection]
<hyperboreean> the `rec` modifier is only to let the language know that the current function can be called from within it ? why doesn't it add any restrictions if a recursive call isn't made ?
diml has quit [Quit: WeeChat 0.3.1.1]
diml has joined #ocaml
<gildor> hyperboreean: I think it the rec is not used, it doesn't change anything to the generated code
<gildor> it -> if
<Axsuul> is there any way to silence the output of a command?
<Axsuul> i.e. let x = 3;;
<Axsuul> i dont want the
ygrek has joined #ocaml
<Axsuul> val x : int = 3
<gildor> compile it?
<Axsuul> hmm but no other way?
<gildor> in the REPL, I am not sure, because this is propably the purpose of the ocaml toplevel
<Axsuul> ic
<gildor> # let null_printer fmt _ = ();;
<gildor> val null_printer : 'a -> 'b -> unit = <fun>
<gildor> # #install_printer null_printer;;
<gildor> # let x = 3;;
<gildor> val x : int =
<gildor> the best I can do
<Axsuul> hehe thanks
<_andre> there's probably a way to create a custom toplevel and use Toploop.use_silently
sexy has joined #ocaml
Amorphous has quit [Ping timeout: 252 seconds]
Axsuul has quit [Ping timeout: 250 seconds]
wuj has joined #ocaml
iris1 has quit [Remote host closed the connection]
junis has joined #ocaml
<junis> greetings fine people
Amorphous has joined #ocaml
<gildor> junis: hello
<junis> hello gildor ... how are you
sdschulze has quit [Quit: Ex-Chat]
sexy has quit [Remote host closed the connection]
th5 has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
<orbitz> Hello
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 252 seconds]
<junis> greetings orbitz
boscop_ is now known as boscop
<orbitz> morning junis
<orbitz> heller: btw, functors are very template-like in many ways (perhaps more powerful?)
<orbitz> heller: and we have firstclass modules now too
munga has quit [Quit: Ex-Chat]
ccasin has joined #ocaml
mjonsson has quit [Ping timeout: 240 seconds]
<hcarty> Yoric: I'm not sure how to reply to your answer directly on stackoverflow, but for what it's worth - the Batteries string and super-printf extensions are still included in the latest Batteries releases
jakedouglas has joined #ocaml
<flux> orbitz, nope, not more powerful. templates are turing complete.
<flux> mind you, most often you don't need tc :)
init1 has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
jonafan has joined #ocaml
<heller> orbitz: yeah, i am still at the introduction of the manual ;)
<heller> flux: yeah, TMP is pretty awesome ... and when you are at the compile time / runtime boundary, C++ almost feels like a functional language ;)
<flux> indeed, C++ has a bastard child of fp and logic programming language embedded
<heller> yup, it feels a little awkward though
<heller> so i decided i take a shot at ocaml
<flux> well, it was a good shot to make ;)
th5 has quit [Quit: th5]
<heller> let's wait and see
iago has joined #ocaml
<adrien> tophide can hide some values in the toplevel (they should start with an underscore iirc)
<adrien> it's a syntax extension
<adrien> it has some drawbacks however, I think I had some strange errors sometimes (using it with mikmatch)
lpereira has joined #ocaml
lpereira has quit [Quit: Leaving.]
lpereira has joined #ocaml
Yoric has quit [Quit: Yoric]
<orbitz> i've been packaging up some of my ocaml projects and puttin gon github and fleshing them out
strangy has joined #ocaml
sdschulze has joined #ocaml
strangy has quit [Quit: Leaving]
strangy has joined #ocaml
Axsuul has joined #ocaml
iago has quit [Quit: Leaving]
ulfdoz has joined #ocaml
Tobu has quit [Read error: Operation timed out]
<hcarty> orbitz: Announcements/other information on the forge would be handy as well, if they are generally useful
jonafan_ has joined #ocaml
ftrvxmtrx has joined #ocaml
jonafan has quit [Ping timeout: 265 seconds]
jonafan_ is now known as jonafan
ulfdoz_ has joined #ocaml
ygrek has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
ulfdoz_ is now known as ulfdoz
joewilliams_away is now known as joewilliams
shawnps has quit [Quit: leaving]
wuj has quit [Ping timeout: 265 seconds]
bitbckt_ is now known as bitbckt
bitbckt has quit [Changing host]
bitbckt has joined #ocaml
Tobu has joined #ocaml
ulfdoz has quit [Ping timeout: 264 seconds]
Tobu has quit [Ping timeout: 276 seconds]
junis is now known as Guest12443
rudi_s has quit [Quit: leaving]
rudi_s has joined #ocaml
init1 has quit [Quit: Quitte]
Guest12443 has quit [Ping timeout: 245 seconds]
ulfdoz has joined #ocaml
_andre has quit [Quit: leaving]
strangy has quit [Quit: Leaving]
ygrek has quit [Ping timeout: 245 seconds]
bzzbzz has quit [Ping timeout: 240 seconds]
maskd has joined #ocaml
junis has joined #ocaml
<junis> greetings fine people
<junis> i'm sad .o\
<junis> ... tell me a funny story
<junis> is there an X window manager writen in ocaml...
<junis> ...like they have stumpwm that's written entirely in common lisp
<schmrkc> junis: yes
<junis> how is it called
srcerer has quit [Quit: ChatZilla 0.9.86 [Firefox 3.6.10/20100914125854]]
<schmrkc> junis: there's gwml
<schmrkc> junis: perhaps more.
<junis> thank you schmrkc ... i'll look at it
<schmrkc> junis: not sure if there has been any update to it the last number of years.
<bitbckt> xmonad is the most "famous" one
<junis> xmonad is written in haskell
<junis> i don't like haskell
<schmrkc> junis: What does the implementation language of the software matter anyway?
<junis> i don't know ... maybe it matters cause someone has to write it... say you made a ratpoison contribution and the you want to use it in stumpwm ... it's just not possible cause they are written in different languages...
<junis> ... you see now
<schmrkc> that seldom works even if the implementation language is the same.
<schmrkc> even though sabetts has had a heavy hand in both stump and ratpoison they're quite the different internally.
<junis> what does seldom work?
<schmrkc> ok example
<schmrkc> you write a software A and a software B.
<schmrkc> both in ocaml
<schmrkc> both do kinda the same thing
<schmrkc> and you write some extra code for one
<schmrkc> why would this extra code work in software B just because the implementation language is the same?
<schmrkc> the internal structure of the software is bound to be different.
<schmrkc> and some contribution you would write for stump maybe even wouldn't make sense in ratpoison. For example if it was using features that ratpoison didn't even support in the first place.
<junis> schmrkc: you're soapboxing ... i was just asking bout a window manager written in ocaml...
<schmrkc> junis: I am just answering your question. If you don't want an answer then do not ask.
<junis> 21:42 <schmrkc> junis: What does the implementation language of the software matter anyway?
<junis> ... what did that mean anyway
<schmrkc> junis: You ranked your dislike for a specifick implementation language as a barrier to your useage of xmonad. I asked why it even mattered.
srcerer has joined #ocaml
<junis> oh... sorry... i understand now... but i never said that i would only use it... maybe i would also like to extend it... you see... as an exercise in ocaml ..to help in the development of a wm writen in ocaml
<schmrkc> Right yes. ok.
<schmrkc> well you could always write one from scratch.
<schmrkc> xlib isn't that complicated.
<junis> maybe i will.... thank you schmrkc .o)
<schmrkc> junis: I am sorry I misunderstood what you said earlier.
<schmrkc> carb deprevation. messes with my head (:
<junis> why don't you eat something then
<junis> anyway .. i should have explained myself better then i did
<schmrkc> junis: cutting diet.
<junis> what is cutting diet
<hcarty> Has anyone here tried ocamlbuild 3.12.x's support for ocamlfind?
<hcarty> It does not seem to support building with threads
<hcarty> The documentation is sparse, so I'm not sure if I'm doing something incorrectly.
<schmrkc> junis: I'm on a diet and exercise regimen with the main specific goal of cutting fat from my body.
<schmrkc> junis: while preserving muscle mass.'
<junis> oh... are you a bodybuilder
<schmrkc> No, not really. more of a girevik and powerlifter.
<schmrkc> programming my barbells in ocaml
* junis laughs
<junis> but are you well built ... like a body builder... i totally adore teenage fitfags... do you have a picture
* schmrkc laughs.
<schmrkc> I'm not quite a teenager.
<junis> ... anyway... do you have a picture...
<junis> ... i mean .. like.. of your torso
boscop_ has joined #ocaml
<schmrkc> no
<junis> .o\
boscop has quit [Ping timeout: 250 seconds]
boscop_ is now known as boscop
_unK has quit [Remote host closed the connection]
<junis> oh... i remember you from bob_f's channel
ikaros has quit [Quit: Leave the magic to Houdini]
<schmrkc> ya bob_f is pretty much the reason I'm on irc
<schmrkc> he's my idol and all.
<junis> what a piece of work is bob_f , how noble in reason how infinite in faculties in form and moving how express and admirable in action how like an angel in aprehension how like a god... the beauty of the world......
lpereira has quit [Quit: Leaving.]
<junis> bob_f doesn't talk to me anymore... .o( he said i'm a piece of shit
<schmrkc> ok
<schmrkc> you could just join #bfirc and talk to him I guess?
<junis> i don't wish to bother him... he said he doesn't want me talk to him anymore
joewilliams is now known as joewilliams_away
<junis> ... i am a very bad person .o/
Axs has joined #ocaml
<schmrkc> ok
Axsuul has quit [Ping timeout: 250 seconds]
<junis> ... that makes me so sad
<junis> .o(
junis has quit [Remote host closed the connection]
junis has joined #ocaml
ccasin has quit [Quit: Leaving]