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)
<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