<rwmjones>
well, it's a packaging bug anyway ... they need to encode the ocaml dependencies into the archlinux package dependencies, as we did in Fedora (and Debian are now doing). See:
<bogen>
ocamlobjinfo hmm... ok... need to find the download site for that so I can package it
Yoric has joined #ocaml
patronus has joined #ocaml
<bogen>
ok, if it is a versioning thing with Pcre
<bogen>
than I broke that
<bogen>
:)
dmentre has joined #ocaml
<bogen>
it was out of date, people were complaining, so I adopted the package...
<bogen>
(And updated it)
Jedai has joined #ocaml
svenl has joined #ocaml
Narrenschiff has joined #ocaml
<EliasAmaral>
gildor, never figured how to work with ocamlfind, didn't thought it was so easy
<EliasAmaral>
it would made my homegrown makefiles more maintainable
<rwmjones>
bogen, ocamlobjinfo isn't an official part of the ocaml distribution, but it's a program that debian & fedora both build and distribute (in the original ocaml sources it's called "objinfo")
<rwmjones>
EliasAmaral, ocamlfind rocks
<rwmjones>
bogen, you should map ocaml md5 hashes to dependencies, to make it impossible for people to install incompatible versions ... for example in fedora:
<_zack>
rwmjones: and thanks, I'll update that link which is out of date now :)
ygrek has quit [Remote closed the connection]
<olegfink>
rwmjones: may I ask a completely non-ocaml question while it's quiet in here? I have a solution for bounds checking using mprotect(2) looking for a problem. I have large arrays, and for iterating them I use PROT_NONE pages on sides instead of bound checking on each iteration.
<olegfink>
Of course this doesn't get me any speedup because memory is slow beyond all such "optimization"
<olegfink>
however, I wonder is there an application in which such behaviour would be meaningful?
dark_light has joined #ocaml
bacam_ is now known as bacam
EliasAmaral has quit [Nick collision from services.]
smimou has quit [Read error: 104 (Connection reset by peer)]
smimou has joined #ocaml
ygrek has quit [Remote closed the connection]
_andre has quit ["leaving"]
middayc_ has joined #ocaml
middayc has quit [Read error: 60 (Operation timed out)]
middayc_ is now known as middayc
tmaeda is now known as tmaedaZ
aklt has quit ["Have a good christmas!"]
rlarson`` has quit ["Coyote finally caught me"]
Narrenschiff has quit []
fx_ has quit [Read error: 110 (Connection timed out)]
dmentre has quit ["Leaving."]
middayc has quit ["ChatZilla 0.9.86 [Firefox 3.5.6/20091201220228]"]
ttamttam has quit ["Leaving."]
joewilliams has joined #ocaml
thrasibule has quit [Read error: 110 (Connection timed out)]
jonafan_ is now known as jonafan
jlouis_ is now known as jlouis
ikaros has quit ["Leave the magic to Houdini"]
pimm_ has joined #ocaml
Pimm has quit [Read error: 104 (Connection reset by peer)]
pimm_ has quit [Client Quit]
Pimm has joined #ocaml
Yoric has quit []
Pimm has quit [Read error: 110 (Connection timed out)]
seanmcl has joined #ocaml
ygrek has joined #ocaml
ttamttam has joined #ocaml
ofaurax has joined #ocaml
pad has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
seanmcl has quit []
seanmcl has joined #ocaml
Submarine has joined #ocaml
sgnb has quit [Read error: 104 (Connection reset by peer)]
sgnb has joined #ocaml
rhar has joined #ocaml
rwmjones has quit [Read error: 104 (Connection reset by peer)]
rwmjones has joined #ocaml
chupish has joined #ocaml
aklt has joined #ocaml
ski_ has joined #ocaml
chupish has quit ["Page closed"]
rhar has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
ttamttam has quit ["Leaving."]
ulfdoz has joined #ocaml
rhar has joined #ocaml
ygrek has quit [Remote closed the connection]
rhar has quit ["Leaving"]
slash_ has joined #ocaml
Pimm has joined #ocaml
ikaros_ has joined #ocaml
thrasibule has joined #ocaml
ikaros has quit [Read error: 104 (Connection reset by peer)]
_zack has quit ["Leaving."]
* palomer
wishes ocaml had existentials
<palomer>
universals were introduced so that methods could have a polymorphic type, right?
thelema_ has joined #ocaml
<mrvn>
palomer: you can do them with records
valross has joined #ocaml
<palomer>
existentials?
<mrvn>
yes
<palomer>
do you mean the old {x : forall a. (t -> b) -> b} trick for exists a. t?
<mrvn>
or objects
<mrvn>
palomer: yes
<palomer>
cps for types!
<palomer>
mrvn, it's not the same though, forces you to write your code in cps
<mrvn>
not really. Just need an accessor function
thelema has quit [Read error: 104 (Connection reset by peer)]
<palomer>
instead of writing E[x] (the expression with x plucked in), you need to write a function (fun y -> E[y]), make sure it's polymorphic then apply the record field to it, no?
<mrvn>
iirc you actualy need a second record with another `a. type.
<palomer>
right
<palomer>
still forces you to factor every expression E[x] into (fun y -> E[y])
<mrvn>
yes. But that isn't writing your code in cps
<palomer>
isn't it a similar idea?
joewilliams has quit ["Leaving..."]
<mrvn>
writing your code in cps is a lot more change
<palomer>
I always thought both processes were similar
<palomer>
for a variable x, x becomes fun k -> k x
joewilliams has joined #ocaml
<palomer>
(in cps)
<palomer>
our process turns it into F (fun y -> y)
<palomer>
I guess you're right
<mrvn>
No, in cps every function gets another argument, the continuation, and no function ever returns but always calls the continuation
<mrvn>
cps doesn't change your variables.
<palomer>
got a reference?
<palomer>
the wikipedia article is no fun
<palomer>
(by not fun I mean not instructive)
<mrvn>
would have pointed you there too
<palomer>
it doesn't give the explicit transformation
<mfp>
palomer: btw., you can encode existential types directly using first-class modules in 3.12
<palomer>
what operations will we be able to perform on first class modules?
<palomer>
is it going to be yet another product type?
<palomer>
how will the modules be typed?
<mfp>
palomer: you pack modules as first-class values, then unpack and use them with let module = ...
<mfp>
their types correspond to erm module types
<palomer>
erm?
<palomer>
so let a = pack E (* a has type module *) ?
<mfp>
erm as in uh
<mfp>
let a = (module E)
<mfp>
1 sec
tmaedaZ is now known as tmaeda
<mfp>
no actually it was let a = (module E : S)
<mfp>
S being a module type
<mfp>
the type is (module S)
<mfp>
# module type S = sig type t val f : t -> int end;;
<mfp>
module type S = sig type t val f : t -> int end
<mfp>
# let x = (module struct type t = int let f x = x end : S);;
<mfp>
val x : (module S) = <module>
<palomer>
is there an equivalence among signatures?
tmaeda is now known as tmaedaZ
<palomer>
what if you do module type T = S
<palomer>
can you then do (a :> module T) ?
* mfp
tries
middayc has joined #ocaml
<mfp>
nope, it uses nominal typing
<mfp>
# (y :> (module S));;
<mfp>
Error: Type (module S2) is not a subtype of (module S)
<mfp>
with module type S2 = S;; let y = (module struct type t = float let f = truncate end : S2);;
<mfp>
oh
<mfp>
you can unpack and repack, that works
<mfp>
# (let module K = (val y : S2) in (module K : S));;
<mfp>
- : (module S) = <module>
<palomer>
what's the main purpose of this?
<mfp>
modules stop being only a "compile-time thing", giving more flexibility
<palomer>
no killer example?
<mfp>
e.g. in some code of mine I want to pick a module at runtime depending on the configuration
<mfp>
w/o first-class modules, I have to add an extra level of indirection inside the module to be able to choose an implementation dynamically
<mfp>
w/ first-class modules, I could have module Foo = match read_config bar with ... -> (val (module Bar : S) : S)
<palomer>
if they were encoded as objects in the first place, this wouldn't be an issue
<mfp>
yes, but objects don't carry types :-|
<mfp>
in fact, I used objects _inside_ the module to pick an implementation at runtime
<palomer>
I guess carrying types is a nice advantage
slash_ has quit [Client Quit]
seanmcl has quit []
joewilliams has quit [Remote closed the connection]
* palomer
is using super voodoo
<palomer>
I'm encoding my types as values using camlp4 and then using (=) on these values for coercion
<palomer>
my god this is ugly!
<palomer>
I even have type void = {void_value:'a . 'a}
Yoric has joined #ocaml
Yoric has quit [Client Quit]
ulfdoz has quit [Read error: 110 (Connection timed out)]
<thieusoai>
if I have a type atype = (int*string) . Then I have a varible of type atype as let a_var = (5,"hi") . How do I change number 5 in a_var to say 10 ?
<thieusoai>
I can do something like this let a_var = ref (5,"hi") in a_var := (10,"hi") ; !a_var;;
<thieusoai>
but that requires me to have to retype "hi" in (10,"hi") , I just want to change the first field
<aklt>
thieusoai: How about let a = (ref 10, "hi)?
ofaurax has quit ["Leaving"]
<olegfink>
aklt: you may want to use records instead
<olegfink>
e.g.
<olegfink>
type atype = { n : int; s : string; } ;; let a_var = {n = 10; s = "hi"} ;; {a_var with n = 5} (* -> {n = 5; s = "hi"} *)
<olegfink>
(and of course if you really want refs, use mutable fields)
Pimm has quit [Read error: 110 (Connection timed out)]