<oriba>
gasche, you wrote: "on my test file, just sharing strings by caching them in a hashtable divided memory usage by 2 when using Csv.load"
<oriba>
can you explain me this, or show some code?
<oriba>
A hash is a key-value store... so I would use it to look up an item by key
<oriba>
how do you use it sto save memory usage?
<oriba>
hmhhh, when data has multiple strings with same contents... hmhhh...
manizzle has quit [Quit: Leaving]
manizzle has joined #ocaml
Simn has quit [Quit: Leaving]
manizzle has quit [Client Quit]
manizzle has joined #ocaml
shinnya has joined #ocaml
johnelse has quit [Quit: leaving]
bezirg has quit [Ping timeout: 246 seconds]
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 246 seconds]
oriba has quit [Quit: oriba]
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 258 seconds]
ygrek has joined #ocaml
badkins has quit []
[zedascouves] has joined #ocaml
[zedascouves] has quit [Ping timeout: 260 seconds]
bytbox has quit [Remote host closed the connection]
rgrinberg1 has quit [Quit: Leaving.]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
rgrinberg has joined #ocaml
axiles has joined #ocaml
philtom has joined #ocaml
waneck_ has joined #ocaml
waneck has quit [Ping timeout: 260 seconds]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 240 seconds]
__w_a_n_e_c_k__ has joined #ocaml
waneck_ has quit [Ping timeout: 244 seconds]
__w_a_n_e_c_k__ has quit [Read error: Connection reset by peer]
rand000 has quit [Quit: leaving]
ygrek has quit [Ping timeout: 272 seconds]
MercurialAlchemi has joined #ocaml
keen____ has joined #ocaml
keen___ has quit [Ping timeout: 246 seconds]
taion809 has quit [Ping timeout: 258 seconds]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 258 seconds]
philtom has quit [Ping timeout: 246 seconds]
philtom has joined #ocaml
thetabyte has quit [Quit: Leaving.]
philtom has quit [Ping timeout: 245 seconds]
morphles has joined #ocaml
Kakadu has joined #ocaml
ygrek has joined #ocaml
rgrinberg has left #ocaml [#ocaml]
mcclurmc has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Disconnected by services]
darkf_ is now known as darkf
mcclurmc has quit [Ping timeout: 260 seconds]
yacks has quit [Quit: Leaving]
tane has joined #ocaml
ygrek has quit [Ping timeout: 258 seconds]
sinelaw has joined #ocaml
mort___ has joined #ocaml
jc1 has joined #ocaml
jc1 has left #ocaml [#ocaml]
lordkryss has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
yacks has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
Simn has joined #ocaml
mort___ has quit [Quit: Leaving.]
tani has joined #ocaml
tane has quit [Ping timeout: 250 seconds]
Submarine has quit [Read error: Connection reset by peer]
hhugo has joined #ocaml
eugene_klm has joined #ocaml
mcclurmc has joined #ocaml
ggole has joined #ocaml
mcclurmc has quit [Ping timeout: 246 seconds]
marynate has joined #ocaml
q66[lap] has quit [Ping timeout: 250 seconds]
<whitequark>
Drup: so I'm looking to update findlib now to allow for ppx drivers
<whitequark>
Gerd's suggestion of archive(ppx) = "./whatever.cma" doesn't take into account the fact that there could be several ppx loaded...
q66 has joined #ocaml
zpe has joined #ocaml
ddosia1 has quit [Ping timeout: 240 seconds]
<dmbaturin>
Is it possible to write a nontrivial function with 'a -> 'a signature? :)
pminten has joined #ocaml
srcerer_ has joined #ocaml
srcerer has quit [Ping timeout: 272 seconds]
<axiles>
dmaturbin: if you can have side effects, yes
Kakadu has quit [Quit: Konversation terminated!]
<axiles>
dmbaturin
<axiles>
on a purely functional programming, I d'ont think there are any other functions beside the identity function
ddosia has joined #ocaml
<whitequark>
I wonder how would one go at proving that 'a -> 'a has an unique inhabitant
<axiles>
whitequark: in a formal context, for example System F, I think we can prove that the only normal closed term M of type \forall a . a -> a, is the identity function \lambda x . x
<whitequark>
axiles: yes, sure, but how?
<nicoo>
axiles: Even with side effects, if you don't have something aking to ocaml-ty, I don't see how you would do it.
<whitequark>
nicoo: well, it would just return its argument, and do something else.
<axiles>
nicoo: let f x = print_endline "Hello World"; x
<dmbaturin>
But side effects are not fun.
<nicoo>
Yes, I didn't think of side-channels
<ggole>
There's always variations on let id x = (fun _ -> x) ()
<ggole>
Is that "the same"?
* nicoo
was trying to think of a function which doesn't (always) return x when fed x.
<whitequark>
nicoo: you can do that too.
<nicoo>
ggole: Sure, it normalises to the same thing.
<axiles>
whitequark: In System F, ssume we have a close normal term M of type \forall a . a -> a
<nicoo>
whitequark: I'm pretty sure I can, but I don't find how (without run-time type information)
<whitequark>
nicoo: let x = ref None;; let f y = match !x with Some z -> z | None -> x := y; y
<dmbaturin>
Suppose there's more than one 'a -> 'a functions. Then composition of those functions is 'a -> 'a too.
<marynate>
hi, newbie try to build OCaml on windows (VC toolchain) but got error: make[1]: Entering directory '/cygdrive/e/dev/tools/OCaml/ocaml-4.02.0/byterun'
<ggole>
let id x = if Random.bits () = 0 then infloop () else x
<whitequark>
indeed
<marynate>
ooop, sorry for mess up ur coversation
<nicoo>
whitequark: I thought of it, but this isn't of type 'a. 'a -> 'a
<axiles>
By the fact that M is normal it is othe the form \lambda x . x of x M_1 ... M_n.
<dmbaturin>
marynate: It's fine.
<ggole>
I suppose the purists would argue that nontermination is an effect.
<gasche>
yes!
<axiles>
By the fact that M is closed, M is of the form \lambda x . M_1
<whitequark>
nicoo: oh, right, value restriction
<ggole>
axiles: so "unique" refers to a class of programs, not a single program
<axiles>
ggole: modulo beta-equivalence
<nicoo>
whitequark: Yes, this would definitely be unsound :3
<gasche>
in a pure lambda-calculus, each term has an equivalent beta-short, eta-long normal form
<ggole>
Right, I suppose that's inevitable, can't really rule out various encodings of the same thing
<whitequark>
axiles: hmmm
<gasche>
you can prove that (forall a . a -> a) is uniquely inhabited by a direct syntactic search
<axiles>
correction: By the fact that M is normal it is othe the form \lambda x . M_1 of x M_1 ... M_n.
<gasche>
in the space of beta-short, eta-long normal forms
<axiles>
from here you can continue the proof
<whitequark>
axiles: gotcha!
<gasche>
namely, the normal constructor of (forall a. ...) is (Lambda . ..), the normal constructor of (a -> ...) is (fun (x:a) -> ...), and at this point there is a single possible way to prove (a) in context (x : a), which is to use (x).
<gasche>
(parametricity is another way to prove this but it is more complex)
<gasche>
maybe the _tags pattern is too restrictive, does using "true: " instead fixes the problem?
<Leonidas>
gasche: oh, right. Thanks. I also removed the "pkg_" prefix
<Leonidas>
now it works.
<gasche>
ah yeah
<gasche>
it's package(name)
mcclurmc has quit [Ping timeout: 245 seconds]
<gasche>
one reason why <*.ml> would not be a good pattern is that you also need package() when linking (so going from some *.cmo to a *.byte)
<gasche>
on the other hand, if only module Foo needs Cohttp, then <src/foo.*> should work
<gasche>
marynate: I don't know about Windows tools, so I'll give up on that one, sorry
<gasche>
(note that there is a prepackaged Windows installer that is supposed to work, but I suppose you have a reason for building OCaml manually)
<marynate>
gasche, no worry, thanks anyway! Actually I'm building haxe which asking MSVC version of OCaml, and I can only find installers for MingW/Cygwin, so...
<dmbaturin>
Speaking of the installers, I was going to verify the ocaml.org/install instruction for OS X and send a pull request. Time to do that.
<Leonidas>
gasche: thanks for the hint
<Leonidas>
currently fighting with cohttp, which seems to have changed massively between release and git version, same for conduit.
<ggole>
I suspect it is due to the record shortcut syntax
Kakadu has joined #ocaml
<ggole>
Assign Server.callback an explicit value and it will probably go away.
mcclurmc has quit [Ping timeout: 258 seconds]
<ggole>
That is, I think the shortcut syntax is desugared as { Server.callback = callback; ... }, and callback of course isn't bound - the fix would be to rewrite it explicitly as { Server.callback = Server.callback; ...} (assuming that is what you want).
slash^ has joined #ocaml
oscar_toro has joined #ocaml
hhugo has joined #ocaml
jave_ has quit [Ping timeout: 240 seconds]
slash^ has quit [Read error: Connection reset by peer]
jc1 has joined #ocaml
dav_ has joined #ocaml
tane has joined #ocaml
dav_ has quit [Client Quit]
jc1 has left #ocaml [#ocaml]
cago has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 258 seconds]
hhugo has quit [Quit: Leaving.]
jbj has quit [Ping timeout: 258 seconds]
yacks has quit [Quit: Leaving]
yacks has joined #ocaml
<bernardofpc>
whitequar> TeX expands _ into that ... thing -> no, it's not TeX, it's just your macro set (probably some perverted type of LaTeX). TeX just assigns _ to "math-only symbol" and complains about "missing $ inserted" (sorry to necromance that one)
slash^ has joined #ocaml
morphles has quit [Ping timeout: 250 seconds]
qiukun has quit [Ping timeout: 260 seconds]
jbj has joined #ocaml
larhat has quit [Quit: Leaving.]
Thooms has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 244 seconds]
<Drup>
whitequark: I'm still a bit confused at ppx drivers
<whitequark>
Drup: well, ppx_deriving is a ppx driver.
<whitequark>
a special case, but still one
<Drup>
special case enough
johnnydiabetic has quit [Ping timeout: 246 seconds]
ysz has quit [Quit: This computer has gone to sleep]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
Thooms has joined #ocaml
morphles has joined #ocaml
simulacrum has quit [Remote host closed the connection]
hhugo has quit [Quit: Leaving.]
<tobiasBora>
Does anyone here has a write access to the opam-repository ? If so could you please remove the condition on gettext to work on Ocaml < 4.02 ? I emailed the developper and he told me the 0.3.5 version should work on Ocaml >= 4.02.
yomimono has joined #ocaml
<Drup>
tobiasBora: just do a pull request
<Kakadu>
tobiasBora: you can always test locally
<gasche>
a commit message in opam-repository (git log packages/gettext) says
<gasche>
" restrict gettext.0.3.4 to <OCaml 4.02 due to format string incompatibility
<gasche>
"
morphles has quit [Ping timeout: 260 seconds]
<gasche>
it dates back to Aug 29, so before the release, thus the issue may have been fixed if it is on the compiler side
<gasche>
gettext 0.3.5 has a commit message saying it "should work on 4.02", but still the same <4.02 version bound
bezirg has quit [Ping timeout: 272 seconds]
<gasche>
tobiasBora: you should probably investigate the issue or ask the maintainer (Sylvain?) to make sure it is no more
<gasche>
(grepping for format strings in the source could be enough to see where the problem is/was)
<tobiasBora>
gasche: I have already asked to Sylvain and he says it should be good
eikke has joined #ocaml
<tobiasBora>
Drup: I will
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
bytbox has joined #ocaml
Submarine_ has joined #ocaml
Submarine_ has joined #ocaml
yomimono has quit [Ping timeout: 245 seconds]
yomimono has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
mbac has quit [Quit: bbln]
avsm has quit [Quit: Leaving.]
shinnya has joined #ocaml
morphles has joined #ocaml
tac_ has joined #ocaml
manud has joined #ocaml
morphles has quit [Ping timeout: 245 seconds]
hhugo has joined #ocaml
fezghoul has joined #ocaml
ustunozgur has joined #ocaml
axiles has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 245 seconds]
MercurialAlchemi has quit [Ping timeout: 258 seconds]
<tobiasBora>
Does anyone knows how is bad with my one-line edit ?
<evert>
I'm trying to learn ocaml with the 'ocaml from the very beginning' book, but i don't understand the books answer to one of the first quiz questions: http://dpaste.com/1GM4Y97
<Drup>
tobiasBora: why don't you look at the travis results ? :)
<Drup>
simply click on the red cross
<Drup>
you'll quite clearly see what's wrong.
<ggole>
evert: what don't you understand about it?
<evert>
my solution seems to work, so what's the need for the extra if?
<Drup>
evert: the extra if is simply an optimisation.
<tobiasBora>
Drup: Well for the Linux fail the only error I can see is "E: Some index files failed to download. They have been ignored, or old ones used instead.". I don't see any link with my modification...
<Drup>
so travis failed miserably, and it's not your fault :p
<Drup>
evert: if you ask me, both solution are wrong, because they don't behave well for n < 0 ;)
<tobiasBora>
Drup: So should I make another push request ?
<ggole>
evert: it doesn't seem necessary, it's either a style thing or a (questionable) optimisation
<Drup>
tobiasBora: no, just make a comment
<evert>
ok, thanks, in that case i won't sweat over it, hard enough as it is to wrap my head around the recursion stuff
<fezghoul>
Drup: but it compiles to bytecode. I've been installing different versions of libstdc++ to no avail. Is there an explicit linking command I need?
q66 has quit [Quit: Leaving]
<Drup>
does the bytecode works ? It could just be making errors at runtime when trying to call the C libraries ...
<fezghoul>
Drup: thats the weirdness. The bytcode does indeed work. It works in utop too.
<Drup>
strange
<Drup>
I don't know.
<fezghoul>
Drup: re2 just isn't finding the c++ standard library (its what it looks like to me, but I'm no c++ expert). In anycase, just thougth I'd see if other Ubuntu users had problems.