Amorphous has quit [Read error: 60 (Operation timed out)]
alexyk has quit [Client Quit]
Amorphous has joined #ocaml
struktured has quit [Read error: 60 (Operation timed out)]
alexyk has joined #ocaml
Axle has joined #ocaml
<alexyk>
how do you reraise exception form handler with the same arguments as original?
Axle has quit ["Leaving."]
jeddhaberstro has quit []
jeddhaberstro has joined #ocaml
jeddhaberstro has quit []
jeremiah has quit [Read error: 104 (Connection reset by peer)]
purple_ has quit [Remote closed the connection]
jeddhaberstro has joined #ocaml
jeddhaberstro has quit [Client Quit]
jeremiah has joined #ocaml
<det>
This is really weird.
<det>
caml_callback(callback, string);
<det>
gives me an error: error: called object ‘caml_callback’ is not a function
<det>
but
<det>
caml_callback(callback, string, string);
<det>
is fine
<det>
meh, I think I figured it out
<det>
I think "CAMLlocal1 (callback)" preproccessor magic creates a value "caml_callback"
johnnowak has joined #ocaml
sporkmonger has quit []
johnnowak has quit []
<hcarty>
alexyk: # try failwith "foo" with Failure s as ex -> print_endline s; raise ex;;
<hcarty>
alexyk: prints "foo" then raises Failure "foo"
<alexyk>
hcarty: thx!
<hcarty>
alexyk: Not a problem. In general, if you match a pattern, you can add "as foo" to bind the value to "foo" in the appropriate scope
<hcarty>
It can be very useful at times
struktured has joined #ocaml
struktured has quit [Read error: 110 (Connection timed out)]
aconbere has joined #ocaml
<aconbere>
I'm brand new to ocaml and trying to understand the use of *| and +|
<aconbere>
sum (a +| cen) tail
<aconbere>
for example
m3ga has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
aconbere_ has joined #ocaml
aconbere has quit [Read error: 110 (Connection timed out)]
struktured has joined #ocaml
struktured_ has joined #ocaml
Associat0r has quit []
struktured has quit [Read error: 110 (Connection timed out)]
<thelema>
aconbere_: look at what modules are opened, or if there's a [let (+|) x y = ...] function defined.
bohanlon has quit [kornbluth.freenode.net irc.freenode.net]
cataska has quit [kornbluth.freenode.net irc.freenode.net]
cataska has joined #ocaml
bohanlon has joined #ocaml
funebre has quit []
johnnowak has joined #ocaml
struktured_ has quit [Read error: 110 (Connection timed out)]
aconbere_ has quit ["Lost terminal"]
struktured_ has joined #ocaml
ygrek has joined #ocaml
Snark has joined #ocaml
johnnowak has quit []
alexyk has quit []
alexyk has joined #ocaml
itewsh has joined #ocaml
<Camarade_Tux>
thelema, I actually had a nice browser : myie/maxthon, the rendering engine was IE (though there was mozilla activex) but it had tabs, mouse gestures, plugins, closed tab buffer, zoom, settings for everthing in the browser, and so on while firefox was not even 1 and had fast no plugins available
<Camarade_Tux>
but if you think the available browsers suck, welcome to the club and I hope you'll give me some feedback ;)
smimou has quit ["bli"]
_zack has joined #ocaml
marmotine has joined #ocaml
ikaros has joined #ocaml
rwmjones has quit [Read error: 110 (Connection timed out)]
rwmjones has joined #ocaml
Camarade_Tux_ has joined #ocaml
Camarade_Tux has quit [Read error: 110 (Connection timed out)]
Camarade_Tux_ is now known as Camarade_Tux
<Camarade_Tux>
how can I define a new type with something from C ?
itewsh has quit [Read error: 60 (Operation timed out)]
<Camarade_Tux>
no, nothing special was needed apparently
purple_ has joined #ocaml
itewsh has joined #ocaml
Associat0r has joined #ocaml
slash_ has quit ["leaving"]
itewsh has quit ["KTHXBYE"]
cataska has quit [Read error: 104 (Connection reset by peer)]
vixey has joined #ocaml
thruspa has joined #ocaml
love-pingoo has joined #ocaml
ecc has quit ["leaving"]
thruspa has quit ["Saliendo"]
Stefan_vK1 has joined #ocaml
Stefan_vK has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
dejj has joined #ocaml
smimou has joined #ocaml
purple_ has quit ["Leaving"]
Guest41813 has joined #ocaml
Guest41813 is now known as purple_
GoNoGo has joined #ocaml
_zack has quit ["Leaving."]
nicko2 has joined #ocaml
struktured_ is now known as struktured
noon has joined #ocaml
<noon>
print_endline "hello, world";;
<Camarade_Tux>
print_endline "noon, the bot is not currently online";;
<Camarade_Tux>
=)
<noon>
oh, is there really such a bot here??
<olegfink>
xavierbot's its name
<Camarade_Tux>
there is one but it's not always online not to flood the channel
<noon>
well, I have a stupid question: how can I load a .ml file in the current working directory from ocaml toplevel? open File;; does not seem to work...
<olegfink>
#use "file.ml";;
<noon>
great! thank you!
<Smerdyakov>
noon, it's worth realizing that [open] never makes new code available; it just gives you shorter names for things that were already there.
<noon>
oh I see...
<noon>
still, I don't understand why I can use String.length but not Mymodule.Myfun even though it is in the current working directory and I added -I .
<Camarade_Tux>
noon, did you #use "mymodule.ml" ?
<noon>
[#use] imports the names into the toplevel without need of the Mymodule prefix or [open]
<noon>
do you mean that String has a particular status compared to user-defined modules?
<Camarade_Tux>
noon, no, String comes from string.cma, it had already been compiled
<noon>
oh I understand - compilation is needed in that case.
<noon>
thank you.
<Camarade_Tux>
it's not *needed* but if you just use, you'll have to call using 'myfun', not 'Mymodule.myfun'
<Camarade_Tux>
btw, your function name can't begin with a capital letter so it's myfun, not Myfun
<noon>
I see, I see
<noon>
so #use is basically a #include for toplevel
<noon>
as if I had written the file's contents by hand?
<Camarade_Tux>
noon, exactly
Sylvestre has joined #ocaml
Associat0r has quit []
jeddhaberstro has joined #ocaml
Sylvestre has left #ocaml []
GoNoGo has left #ocaml []
<noon>
I cannot really rely on comparison of functions:
<noon>
<GPLv2> I know my rights; I want my phone call!
<noon>
<DRM> What use is a phone call? if you are unable to speak?
<noon>
(as seen on /.)
<noon>
oops
<noon>
# let a=fusion and b=fusion in a == b;;
<noon>
- : bool = true
<noon>
# let a=(<) and b=(<) in a == b;;
<noon>
- : bool = false
<Camarade_Tux>
you can't compare functions
<noon>
(where fusion is a function name)
<Camarade_Tux>
it's allowed for cases as in your first example, but that's it
<Camarade_Tux>
actually it should maybe fail
<noon>
well, I'm using ==, so I don't expect the structural comparison of course
<Camarade_Tux>
ok, I was about to ask you if you were using == on purpose ;)
<noon>
but it means that (<) is a particular function
<noon>
# let less = (<) in let a=less and b=less in a == b;;
<noon>
- : bool = true
<noon>
the implementation does not hide here :)
<noon>
(the implementation of ocaml)
<noon>
I believe it means that (<) is represented nowhere in memory
love-pingoo has quit ["Connection reset by pear"]
<noon>
# List.concat == List.flatten;;
<noon>
- : bool = true
<Camarade_Tux>
the unbearable part in programming : two lines which look exactly the same and of course only one working ='(
<olegfink>
Camarade_Tux: well, with unicode there are much more possibilities
<Camarade_Tux>
actually I just tried with diff and they're the same ;)
<olegfink>
eh, ocaml doesn't like unicode :-(
<olegfink>
# let a=5 in let �[4m�=4 in a;;
<olegfink>
Error: Illegal character (\176)
<Camarade_Tux>
that's sad we can't have variables named snowman ='(
<Camarade_Tux>
(I mean the unicode snowman ;) )
<olegfink>
wow, the new ghci's thing for input editing (whatever it's called) thinks that it's a good idea to beep at unicode input (it probably thinks everything above 0x80 is a metacharacter)
<Camarade_Tux>
so even iso8859-1(5) won't work ?
<olegfink>
yep.
<olegfink>
just tried with some basic compose accents
<olegfink>
I remember jeehnooh's readline used to do it back in early 2000s or so
<olegfink>
hm, I think /etc/inputrc is configured correctly
* Camarade_Tux
get the shotgun and kills ghci
<olegfink>
ah, this nice piece of holy shit probably has its own config...
<flux>
well, atleast it _does_ have a line editor.. ;-)
<Camarade_Tux>
I was about to ask if somebody had tried the bsd licensed readline equivalent ;p
<olegfink>
Camarade_Tux: I just use a decent terminal...
<olegfink>
who needs that 70s-style crap if there is an editing terminal?
<olegfink>
Camarade_Tux: editline? that's what ghci now uses...