flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
mikurubeam has joined #ocaml
darkf has joined #ocaml
sw2wolf has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
tobiasBora has quit [Quit: Konversation terminated!]
<notk1> why doesn't Set have map but it has fold ?
emmanuelux has joined #ocaml
emmanuelux has quit [Quit: emmanuelux]
ollehar has quit [Ping timeout: 252 seconds]
notk1 has quit [Remote host closed the connection]
<oriba> <orbitz> To say google created map-reduce is a bit of an exageration though, it's a fairly old technique
<oriba> yes
<oriba> but didn't they patented it?
<oriba> patented math
<oriba> SW-patents are evil
travisbrady has joined #ocaml
milosn has joined #ocaml
leoncamel has joined #ocaml
milosn_ has quit [Ping timeout: 260 seconds]
derek_c has quit [Quit: leaving]
clintnewsom has joined #ocaml
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
mikurubeam has joined #ocaml
awm22 has quit [Quit: Leaving.]
madroach has quit [Ping timeout: 248 seconds]
patronus1 is now known as patronus
madroach has joined #ocaml
awm22 has joined #ocaml
NaCl has quit [Ping timeout: 256 seconds]
jpdeplaix has quit [Ping timeout: 245 seconds]
jpdeplaix has joined #ocaml
oriba has quit [Quit: oriba]
NaCl has joined #ocaml
ousado has quit [Remote host closed the connection]
mikurubeam has quit [Ping timeout: 256 seconds]
mikurubeam has joined #ocaml
clintnewsom has quit [Quit: clintnewsom]
clintnewsom has joined #ocaml
travisbrady has quit [Quit: travisbrady]
clintnewsom has quit [Quit: clintnewsom]
clintnewsom has joined #ocaml
yacks has joined #ocaml
amaloz has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
paddymahoney has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Disconnected by services]
darkf_ is now known as darkf
gnuvince has joined #ocaml
yacks has quit [Ping timeout: 264 seconds]
clintnewsom has quit [Quit: clintnewsom]
yacks has joined #ocaml
sw2wolf has left #ocaml []
mikurubeam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Remote host closed the connection]
gnuvince has quit [Ping timeout: 245 seconds]
Snark has joined #ocaml
adotbrown has quit [Ping timeout: 260 seconds]
ggole has joined #ocaml
ttamttam has joined #ocaml
derek_c has joined #ocaml
adotbrown has joined #ocaml
q66 has joined #ocaml
awm22 has quit [Quit: Leaving.]
awm22 has joined #ocaml
chambart has joined #ocaml
awm22 has quit [Client Quit]
dtg has quit [Read error: Connection reset by peer]
astrobun_ has joined #ocaml
destrius has joined #ocaml
ttamttam has quit [Ping timeout: 245 seconds]
ttamttam has joined #ocaml
adotbrown has quit [Ping timeout: 256 seconds]
Cyanure has joined #ocaml
cdidd has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
mcclurmc has joined #ocaml
thomasga has joined #ocaml
gnuvince has joined #ocaml
Cyanure has quit [Read error: Operation timed out]
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
cago has joined #ocaml
ivan\ has joined #ocaml
mika1 has joined #ocaml
rwmjones has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
derek_c has quit [Quit: Lost terminal]
rwmjones has joined #ocaml
Yoric has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Disconnected by services]
darkf_ is now known as darkf
Neros has quit [Ping timeout: 260 seconds]
eikke has joined #ocaml
Yoric has quit [Ping timeout: 256 seconds]
rwmjones is now known as rwmjones_holiday
ttamttam has quit [Ping timeout: 245 seconds]
Yoric has joined #ocaml
ttamttam has joined #ocaml
mikurubeam has joined #ocaml
ulfdoz has joined #ocaml
ontologiae has joined #ocaml
yacks has quit [Ping timeout: 256 seconds]
<destrius> Hi, I've read somewhere that the BatPrint module is obselete, is this true, and if so what's the standard printing module one should use nowadays?
yacks has joined #ocaml
awm22 has joined #ocaml
rwmjones_holiday has quit [Read error: Operation timed out]
<orbitz> For batteries I don't know, I know Core just added custom printf support
rwmjones_holiday has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
ollehar has joined #ocaml
destrius has quit [Quit: Leaving.]
ccasin has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
chambart has quit [Ping timeout: 256 seconds]
thomasga has joined #ocaml
_andre has joined #ocaml
mcclurmc has joined #ocaml
rwmjones_holiday has quit [Read error: Operation timed out]
ttamttam has quit [Quit: ttamttam]
Neros has joined #ocaml
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
rwmjones_holiday has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
ulfdoz has quit [Ping timeout: 256 seconds]
Razzllls has joined #ocaml
<Razzllls> hello
<Razzllls> why does Set not have a map function like list does?
chambart has joined #ocaml
ttamttam has joined #ocaml
hkBst has quit [Ping timeout: 256 seconds]
<adrien_oww> there is fold so you should be good
<adrien_oww> also, I'm wondering how that'd work with functors
ollehar has quit [Ping timeout: 245 seconds]
<zorun> actually, since Set is a binary search tree (red-black trees iirc), map would not be very efficient
<zorun> because elemnts would move inside the tree
Yoric has quit [Ping timeout: 260 seconds]
Yoric has joined #ocaml
dwmw2 has quit [Read error: No route to host]
dwmw2_gone has joined #ocaml
clintnewsom has joined #ocaml
chambart has quit [Ping timeout: 252 seconds]
<ggole> It wouldn't be linear
<ggole> (I think the stdlib uses avl trees, actually)
ttamttam has quit [Quit: ttamttam]
ollehar has joined #ocaml
hkBst has joined #ocaml
chambart has joined #ocaml
RagingDave has joined #ocaml
clintnewsom has quit [Quit: clintnewsom]
Pantoufle has joined #ocaml
oriba has joined #ocaml
ollehar1 has joined #ocaml
Yoric has quit [Quit: Instantbird 1.4a1pre -- http://www.instantbird.com]
Yoric has joined #ocaml
travisbrady has joined #ocaml
travisbrady has quit [Client Quit]
gustav__ has joined #ocaml
travisbrady has joined #ocaml
Kakadu has joined #ocaml
<Razzllls> so the problem is performance?
<rixed> Razzllls: BatSet does have a map.
<Razzllls> rixed: what is the difference?
smondet has joined #ocaml
<ggole> Isn't BatSet polymorphic, and not functorised?
<ggole> That would solve the interface problem
<Razzllls> what does it mean functorised?
<thelema_> Razzllls: the problem for functorized set is two part: 1) you can only map from one type to itself and 2) if your mapping function isn't order-preserving, the tree will have to be rebuilt, so might as well have user do a fold.
<thelema_> Razzllls: meaning that you construct a Set module from an OrderedType module
<thelema_> ggole: yes, batSet has map, both for order preserving and for non-order preserving
<Razzllls> why can't you map to a set with a different type?
zpe has joined #ocaml
<Razzllls> don't all types have a type of order?
<thelema_> Razzllls: because when you construct the Set module, it only knows about sets of one type
amaloz has joined #ocaml
<Razzllls> oh
<Razzllls> but don't you have 'a Set types?
<thelema_> Razzllls: there's a polymorphic compare function that works (sort-of) for all types, but it is problematic in mant cases
<thelema_> Razzllls: yes, BatSet has a 'a set type (polymorphic sets), and it has map and op_map
<ggole> thelema_, order preserving? I take it this is for cases where you are mapping, say, { key: int; other_info: other_thing; } and your set is keyed on only part of the type.
<Razzllls> I see
<ggole> Otherwise it seems it would be error prone.
<Razzllls> thelema_: can you tell me a case where it's problematic?
<Razzllls> in the case it creates a set that contians the same element because the function to compare is not correct?
<ggole> Diverges on anything anything cyclic.
<thelema_> Razzllls: for instance where part of your value is a function, then the polymorphic compare dies.
<ggole> And that, too
<Razzllls> hm
<Razzllls> oh so that means there are types that can't be comparable?
gustav_ has quit [Remote host closed the connection]
<ggole> Partly: it means that the built-in polymorphic compare is often problematic
<thelema_> Razzllls: yes, values of type (int -> int) can't be compared
<Razzllls> but who would build a set of types that can't be compared?
<thelema_> it might be nice to have a set of functions +1, +2, +n
<ggole> It's nice to be able to including such types within other types that you would like to compare
<ggole> Er
<ggole> +grammar
<Razzllls> you can still find a criteria to compare those functions thelema_ no?
gustav__ has quit [Quit: leaving]
<ggole> If you have { foo: int; bar: (int -> int) }, you can write a useful comparison function easily enough, although the generic version will fail.
<thelema_> Razzllls: not if they're actually functions as opposed to just the parameter part of some closure
<thelema_> ggole: good example
<zorun> or you can still use == on functions :)
gustav_ has joined #ocaml
<thelema_> zorun: true, but that doesn't help for sets (trees need compare function)
<zorun> though you don't really have an order this way
<zorun> yesh
<zorun> -h
<Razzllls> thelema_: can't you find a criteria of comparisons for functions?
<Razzllls> thelema_: I mean define on?
<Razzllls> one
<ggole> In order to tell whether they are structurally equal, you have to solve the halting problem.
<thelema_> Razzllls: not in general.
ulfdoz has joined #ocaml
<Razzllls> I see, so the problem is that not all objects are comparable
<ggole> That's half of it. The other half is that many comparable objects can't be compared with the builtin primitives.
<thelema_> yes. Another example is sets themselves.
<thelema_> The builtin comparison will tell you if the trees are the same, not whether the sets are the same
<ggole> And if they are, say, pointers to foreign objects, the builtins have no knowledge of their structure
<ggole> To handle those cases you really need to be able to supply an argument to control how to do so
<ggole> Thus the Map and Set functors
<Razzllls> so to implement a correct Set MAp
<Razzllls> I mean a true Map for all sets, it needs to work on functions from comparable to comaprable?
<thelema_> Razzllls: it has to do the "right thing" for all values, which is impossible.
<Razzllls> thelema_: if you have a comparable interface that objects must implement to be part of Set type?
<Razzllls> thelema_: then you can have map work on that?
<Razzllls> I mean to enforce the map function to return a comparable type
<thelema_> Razzllls: You can do this with a polymorphic Set, although not the default polymorphic set in batteries, which doesn't allow custom compare functions
<thelema_> only the Set.PSet polymorphic set, which does allow custom compare functions. The only case you'd use it is that you wanted to 'map' across different types.
<orbitz> Core has a polymorphic Set i believe
<thelema_> other than that, it's just inferior to a functorized set
SanderM has joined #ocaml
myx has joined #ocaml
darkf has quit [Quit: Leaving]
ulfdoz has quit [Ping timeout: 240 seconds]
<Razzllls> is anyone here familiar with continuation passing style?
ulfdoz has joined #ocaml
<pippijn> Razzllls: what's there to be familiar with?
<Razzllls> pippijn: I am trying to understand how to represent a recursive function using cps, more general to automatically transform one using cps
<Razzllls> there exists ways to automatically transform a function into cps, ?
<ggole> Sure, take a look at Steele's thesis
<Razzllls> I have to do that for a compiler, transform the AST into cps AST stuff
<ggole> Then definitely take a look at Steele's thesis
<ggole> Which is the origin of such ideas
<Razzllls> well I am kinda time pressed, how much time would it take me to do that?
<Razzllls> maybe there is a faster way
<ggole> Maybe there is
<ggole> That's the one I'd choose though
<Razzllls> is it possible to find Steele's thesis for free? tried to google it can't find it
<ggole> Yes: google for rabbit a compiler for scheme
<Razzllls> thank you ggole I will take a look
<ggole> If that's too much to swallow, maybe there's a blog post or something. I dunno.
<Razzllls> 282 pages unfortunately I don't think ill have the time
<ggole> You don't have to read all of it: just the chapters on transformation to cps
<Razzllls> oh I se,e thank you ggole I'll take a look
hkBst has quit [Quit: Konversation terminated!]
<ben_zen> oh man continuations
<Razzllls> ok what I have so far
<Razzllls> f i j = body
<Razzllls> becomes
<Razzllls> f i j k = k body
<Razzllls> ?
ia0 has joined #ocaml
Cypi has joined #ocaml
Razzllls has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931]]
travisbrady has quit [Quit: travisbrady]
jbrown has quit [Remote host closed the connection]
myx has quit [Quit: ушёл]
rwmjones_holiday has quit [Read error: Connection reset by peer]
rwmjones_holiday has joined #ocaml
cago has left #ocaml []
mika1 has quit [Quit: Leaving.]
mathieui has quit [Ping timeout: 264 seconds]
mathieui has joined #ocaml
oriba has quit [Read error: Connection reset by peer]
SanderM has quit [Remote host closed the connection]
notk0 has joined #ocaml
<notk0> hello, what is the difference between begind and end
<notk0> and using paranthesis inside a match case?
ttamttam has joined #ocaml
<thizanne> notk0: it's the same thing
<notk0> oh I see, thank you thizanne
<notk0> | [VPtr addr] ->
<notk0> if addr >= 1024 then (env, VInt 1)
<notk0> else (env, Vint 0)
<thizanne> # 2 * begin 3 + 4 end;;
<thizanne> - : int = 14
<notk0> does this look good?
<notk0> or I should do a match when instead of if?
<thizanne> as you like
<notk0> is there an advantage to one vs another?
<thizanne> I don't know how both are compiled, but anyway it's epsilon
wwilly has quit [Remote host closed the connection]
<thizanne> I prefer using match for structures and if then else for values
<notk0> I see
<adrien> you cannot match for addr >= 1024
<thizanne> but sometimes `when` is useful, say you have A and B cases for your match, and following a condition A could be treated like B
<adrien> you have to use "when addr >= 1024" and that will do the same as an if
<thizanne> adrien: he can write when addr >= 1°24, I think it's what he's asking
<notk0> adrien: oh I see, didn't know that
<notk0> I asked if there is an advantage of using when
<notk0> I would assume the order matters
<notk0> if I put the case of a general match, and below it a when case, the second one will never be called
<thizanne> notk0: I think you should just not use when for now, and when you'll need it you'll know it
<notk0> I see, thank you thizanne
thomasga has quit [Quit: Leaving.]
cdidd has quit [Remote host closed the connection]
ontologiae has quit [Ping timeout: 276 seconds]
Pantoufle has quit [Ping timeout: 264 seconds]
zpe has quit [Remote host closed the connection]
faheem has quit [Ping timeout: 264 seconds]
ollehar has quit [Ping timeout: 245 seconds]
ollehar1 has quit [Ping timeout: 252 seconds]
thomasga has joined #ocaml
zpe has joined #ocaml
Yoric has quit [Ping timeout: 272 seconds]
zpe has quit [Read error: No route to host]
zpe has joined #ocaml
travisbrady has joined #ocaml
lopex has quit []
lopex has joined #ocaml
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
bholst has quit [Quit: No Ping reply in 180 seconds.]
eikke has quit [Read error: Operation timed out]
tane has joined #ocaml
awm22 has quit [Quit: Leaving.]
awm22 has joined #ocaml
ggole has left #ocaml []
awm22 has quit [Ping timeout: 245 seconds]
bholst has joined #ocaml
awm22 has joined #ocaml
mcclurmc has quit [Ping timeout: 264 seconds]
ontologiae has joined #ocaml
Armael has quit [Ping timeout: 248 seconds]
awm22 has quit [Quit: Leaving.]
Armael has joined #ocaml
Armael has left #ocaml []
Armael has joined #ocaml
eikke has joined #ocaml
notk0 has quit [Quit: Leaving]
Yoric has joined #ocaml
yacks has quit [Quit: Leaving]
cdidd has joined #ocaml
Yoric has quit [Ping timeout: 272 seconds]
derek_c has joined #ocaml
_andre has quit [Quit: leaving]
BiDOrD has quit [Ping timeout: 264 seconds]
chambart has quit [Ping timeout: 245 seconds]
BiDOrD has joined #ocaml
mfp has quit [Ping timeout: 245 seconds]
mfp has joined #ocaml
Kakadu has quit []
rwmjones_holiday has quit [Ping timeout: 256 seconds]
Yoric has joined #ocaml
BiDOrD has quit [Ping timeout: 264 seconds]
gustav__ has joined #ocaml
BiDOrD has joined #ocaml
rwmjones_holiday has joined #ocaml
amaloz has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ttamttam has quit [Remote host closed the connection]
Yoric has quit [Ping timeout: 246 seconds]
BiDOrD has quit [Ping timeout: 256 seconds]
BiDOrD has joined #ocaml
derek_c has quit [Ping timeout: 255 seconds]
derek_c has joined #ocaml
gustav__ has quit [Quit: leaving]
chambart has joined #ocaml
travisbrady has quit [Quit: travisbrady]
smondet has quit [Ping timeout: 252 seconds]
Yoric has joined #ocaml
mcclurmc has joined #ocaml
stephane__g has joined #ocaml
stephane__g has quit [Client Quit]
pkrnj has joined #ocaml
Snark has quit [Quit: Quitte]
Yoric has quit [Ping timeout: 246 seconds]
tianon has quit [Ping timeout: 256 seconds]
tianon has joined #ocaml
BiDOrD has quit [Ping timeout: 276 seconds]
ontologiae has quit [Ping timeout: 248 seconds]
RagingDave has quit [Quit: Ex-Chat]
BiDOrD has joined #ocaml
eikke has quit [Ping timeout: 246 seconds]
awm22 has joined #ocaml
cdidd has quit [Ping timeout: 255 seconds]
chambart has quit [Ping timeout: 264 seconds]
eikke has joined #ocaml
thomasga has quit [Quit: Leaving.]
eikke has quit [Ping timeout: 256 seconds]
zpe has quit [Remote host closed the connection]
pkrnj has quit [Quit: Computer has gone to sleep.]
eikke has joined #ocaml
chambart has joined #ocaml
gnuvince has quit [Remote host closed the connection]
gnuvince has joined #ocaml
pkrnj has joined #ocaml
chambart has quit [Ping timeout: 256 seconds]
sw2wolf has joined #ocaml
tani has joined #ocaml
ulfdoz has quit [Ping timeout: 256 seconds]
tane has quit [Ping timeout: 260 seconds]
derek_c has quit [Quit: Lost terminal]