smimou changed the topic of #ocaml to: OCaml 3.08.3 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/
humasect_ has joined #ocaml
humasect has quit [Read error: 54 (Connection reset by peer)]
humasect_ has quit [Client Quit]
dan2_ is now known as dan2
Nutssh has quit ["Client exiting"]
CosmicRay has joined #ocaml
ulfdoz_ has joined #ocaml
dan2 is now known as bob2_
bob2_ is now known as bob2__
CosmicRay has quit ["Leaving"]
bob2__ is now known as DWeb
ulfdoz has quit [Read error: 110 (Connection timed out)]
DWeb is now known as dan2
Snark has joined #ocaml
eyda|mon has joined #ocaml
<eyda|mon> what does !! infront of a variable mean?
<eyda|mon> dereferences a reference?
<mflux> my guess is that someone defined a !!-operator
<mflux> infact I'm quite sure that's what happened ;)
Submarine has joined #ocaml
kinners has joined #ocaml
Herrchen has joined #ocaml
pango has quit [Remote closed the connection]
vdrab has joined #ocaml
mattam has joined #ocaml
wrunt_ has joined #ocaml
ejt has joined #ocaml
wrunt has quit [Read error: 113 (No route to host)]
kinners has quit ["bbl"]
smimou has joined #ocaml
mlh has quit [Client Quit]
vdrab has quit ["bye"]
eyda|mon has left #ocaml []
<Submarine> Smerdyakov, are you here?
vezenchio has joined #ocaml
<ejt> do people use the ocaml debugger much ? I don't and was wondering if I'm missing out
<shrimpx> i've never actually needed it -- but maybe that speaks to the complexity of my code? dunno
<shrimpx> i've never used a java debugger either and i code a decent amount of that
<shrimpx> debuggers are for memory corruptions in my book =)
<bubba123> When I use a debugger it is usually to understand someone elses code.
<ejt> the times I feel I need it is when an unexpected exception hits the top level of my program
<ejt> I'd like to know who threw it
<shrimpx> yea
<shrimpx> in the case of java, a nice trace is printed when that happens
<shrimpx> but yea, really, when i use debuggers, 99% of the time is to get backtraces
<ejt> aha, I can use ocamlrun and set a backtrace option accordingto the man page ...
<ejt> yep, this works beautifully: OCAMLRUNPARAM='b=1' ocamlrun ./oscheme < and.scm
Submarine has quit ["Leaving"]
<mflux> ejt, OCAMLPARAM=-b ./software ?
<mflux> argh
<mflux> maybe I should read the irc to the bottom before sending ;)
<mflux> and my advice apparently wasn't even accurate
<ejt> lol
ulfdoz_ is now known as ulfdoz
<ulfdoz> re
kinners has joined #ocaml
Submarine has joined #ocaml
_shawn has joined #ocaml
Skal has joined #ocaml
_fab has quit [Remote closed the connection]
TeXitoi has quit [Read error: 60 (Operation timed out)]
shawn_ has quit [Read error: 60 (Operation timed out)]
Snark has quit ["Leaving"]
Submarine has quit ["Leaving"]
_JusSx_ has joined #ocaml
Snark has joined #ocaml
Skal has quit [Remote closed the connection]
kinners has quit ["leaving"]
Submarine has joined #ocaml
__DL__ has joined #ocaml
|Lupin| has joined #ocaml
kowey has joined #ocaml
<|Lupin|> Hello folks
<kowey> hi channel
<|Lupin|> Can someone please explain us in which situations types like '_a appear, please ?
<kowey> I can give an example where it appears, it helps
<kowey> let foo comparefn a b = (comparefn a b);;
<kowey> foo (=);;
<kowey> - : '_a -> '_a -> bool = <fun>
<kowey> (btw: this is |
<kowey> this is |Lupin| and me asking the question together
<ejt> it happens where the '_a can stand for different types
<ejt> eg, fun x -> x;;
<ejt> - : 'a -> 'a = <fun>
<kowey> well.. what's the difference between 'a and '_a?
<ejt> ie. it can take any type and return it
<ejt> ah, good question
* ejt googles
<kowey> hmm interesting
<ejt> so I guess they're saying it's 'unknown' rather than polymorphic ?
<kowey> well... i suppose a context would be useful here
<kowey> i was just trying to build a quick little unit testing function
<kowey> (hang on)
<kowey> the idea was to have something which takes a comparison function, and applies it against two thigs
<kowey> test : ('a -> 'a -> bool) -> 'a -> 'a -> bool
<kowey> but let's say, 9 times out of 10, the comparison function i want is (=)
<kowey> so i say let test_eq = test (=)
<kowey> test_eq : '_a -> '_a -> bool
<kowey> ?!
<mflux> in that case I believe you need to apply the function fully, instead of using partial application
<mflux> so let test_eq a b c = test (=) a b c
<ejt> test_eq = test (=) works fine
<mflux> hm, no wait, how do those go
* kowey rereads the link
<kowey> hmm
<ejt> but it does have types with underscores
<kowey> right... so let's say, i don't just want a comparison function
<kowey> but a show function! (i'm more fluent in haskell than caml)
<kowey> so test: ('a -> 'a -> bool) -> ('a -> string) -> 'a -> 'a -> bool
<kowey> if i do test_eq string_of_int
<kowey> test_eq has one of these weak types...
<kowey> so i can no longer do
<kowey> test_eq string_of_int_pair (hypothetical (int*int -> string))
<mflux> ejt, it doesn't really work, if you try test_eq 1 2, test_eq 'a' 'b' after that
<mflux> my 'c' was extra, of course..
<ejt> mflux: oic
<kowey> or yes, mflux is right... much simpler example
<ejt> so yes '_a means 'to be decided
<ejt> this is reasonable behaviour IMO
<kowey> really?
<ejt> just define eq_int and eq_char appropriately
* kowey tries mflux's suggestion
<kowey> well... ejt, i guess... but i kinda wanted to be able to reuse my test_eq
<kowey> :-(
<kowey> like test_eq a b, test_eq (a,b) (c,d), etc
<mflux> hmm
<mflux> why not just define test_eq a b = test (=) a b ?
<mflux> and you can do that then too?
<kowey> oh right... i even said i'd right your suggestion
* kowey tries
<kowey> hey... no more underscore
<kowey> hmm. ok thanks much!
<mflux> glad to be of help
<kowey> now i'm just not 100% sure i understand why it works this way
<ejt> I must finish reading that type systems book :)
<|Lupin|> ejt: Which one ?
<|Lupin|> ejt: Which book are you speaking about ?
ejt_ has joined #ocaml
<|Lupin|> ejt_: Which book were you speaking about ?
<kowey> anyway, cheers, folks
kowey has quit ["Get MacIrssi - http://www.g1m0.se/macirssi/"]
|Lupin| has quit ["leaving"]
ejt has quit [Read error: 110 (Connection timed out)]
mattam has quit [Connection reset by peer]
mattam has joined #ocaml
Banana_ has quit ["Reconnecting"]
Banana has joined #ocaml
gim__ has quit [Read error: 113 (No route to host)]
gim__ has joined #ocaml
inka has joined #ocaml
gim__ has quit [Read error: 104 (Connection reset by peer)]
ejt_ is now known as ejt
svenl has quit [Remote closed the connection]
svenl has joined #ocaml
svenl has quit [Remote closed the connection]
CosmicRay has joined #ocaml
gim__ has joined #ocaml
gim__ is now known as gim
ejt has quit ["leaving"]
mattam has quit ["rentrage"]
eyda|mon has joined #ocaml
TeXitoi has joined #ocaml
Gueben has joined #ocaml
mattam has joined #ocaml
j_n has quit [Read error: 104 (Connection reset by peer)]
bubba123 has quit []
j_n has joined #ocaml
pango has joined #ocaml
Smerdyakov has quit [Client Quit]
Submarine has quit [Remote closed the connection]
mikeX has joined #ocaml
<mikeX> dumb question, but is ocaml network friendly?
<mikeX> meaning, how good a choice would it be for programming a network/socket application?
Msandin has joined #ocaml
<pango> mikeX: do you know mldonkey ?
<mikeX> yes
<mikeX> i didn't know what the ml stood for apparently
<mikeX> : |
<mflux> the sources could be better documented though
<mflux> and have less intermodule dependencies..
SmerdyOffice has joined #ocaml
Submarine has joined #ocaml
mikeX has quit ["Leaving"]
pango has quit ["Leaving"]
Msandin has quit [Read error: 110 (Connection timed out)]
Snark has quit ["Leaving"]
pango has joined #ocaml
SmerdyOffice has quit ["bye"]
j_n is now known as j__
inka has quit [Read error: 110 (Connection timed out)]
Herrchen has quit ["good night"]
CosmicRay has quit [Read error: 110 (Connection timed out)]
CosmicRay has joined #ocaml
gim has quit [Read error: 54 (Connection reset by peer)]
vezenchio has quit [""Under democracy one party always devotes its chief energies to trying to prove that the other party is unfit to rule—and bot]
TeXitoi_ has joined #ocaml
TeXitoi has quit [Read error: 110 (Connection timed out)]
__DL__ has quit [Read error: 54 (Connection reset by peer)]
CosmicRay_ has joined #ocaml
CosmicRay_ has quit [Client Quit]
mlh has joined #ocaml
Gueben has quit ["Leaving"]
_JusSx_ has quit ["leaving"]
CosmicRay has quit ["Client exiting"]
Submarine has quit ["Leaving"]
CosmicRay has joined #ocaml
smimou has quit ["?"]
gim has joined #ocaml
mattam has quit ["Lost terminal"]