BitPuffin|osx has quit [Ping timeout: 255 seconds]
<MercurialAlchemi>
Drup: yeah, I disappeared brutally
<MercurialAlchemi>
hm
jeffmo has quit [Quit: jeffmo]
<MercurialAlchemi>
I think being able to compose filters (eg, have y=z as an independent part, and be able to attach it to the query via an 'and' or 'or' operator, at least, is important
johnf__ has quit [Read error: Connection reset by peer]
<flux>
the '_a is something one sees in types that don't yet have their type fixed, and once you use them, it becomes fixed
<flux>
no, scratch that: ..in values that are _potentially_ mutable and don't yet have their type fixed
<flux>
ie. [|None|]
<flux>
the rules how let a = [|None|] is '_a option array yet let a () = [|None|] is () -> 'a option array are at play here I think
k1000_ has quit [Quit: .]
<Algebr>
the (type t) is that private types? also isn't clear to me. this feels like a lot of type system voodoo.
<flux>
it's called the "value restriction"
k1000 has joined #ocaml
<flux>
it gives you a type you can use locally, as its scope is the whole function
<flux>
with 'a the scope is only the left side of the = -character
<Algebr>
so its like an anonymous type, sort of, that's only in the scope of this one function
<flux>
a bit like yes.. it's like a polymorphic type describing an input value, an output value, a local variable or some combination thereof, that needs to be polymorphic
<Algebr>
how does one learn about this besides IRC
<flux>
it's useful as well if you want to write a function that works on polymorphic values and want to ensure your function doesn't accidentally turn into monomorphic one
<flux>
for example: let identity : 'a -> 'a = fun a -> a + 1 -> 'a becomes 'int' here
<flux>
let identity (type t) (a : a) : a = a + 1 -> compilation error
<keep_learning>
flux: I should update my opam version ?
<flux>
definitely
<flux>
start from the scratch once again :-)
<flux>
also as a general note about using opam: you should have "aspcud" installed, it really makes the dependency resolver better (even if this doesn't affect this problem)
<flux>
even opam 1.2.0 beta seems to be almost a year old at this point
<flux>
but good luck, I need to be moving
keep_learning_ has joined #ocaml
<keep_learning_>
flux: Sorry got disconnected.
keep_learning has quit [Ping timeout: 246 seconds]
<keep_learning_>
brew install opam will help ?
<Algebr>
presumably you'll want to do brew update first
<keep_learning_>
Yes
emma has joined #ocaml
<emma>
hi guys.. what can you tell me about ocaml.. i know nothing. but im curious. It seems so exotic
<Algebr>
emma: its a really fun programming language and it hits the sweet spot in terms of speed, expressiveness and abstraction. Oh course that's opinion
yaewa has joined #ocaml
<emma>
what makes it unique?
<emma>
how do you pronounce it?
<Algebr>
O-Caml
<emma>
okay
<emma>
what family of languages is it in?
<Algebr>
ML
moei has quit [Ping timeout: 252 seconds]
<Algebr>
functional programming as well
<emma>
is ML a language also?
<emma>
does O stand for open?
<Algebr>
O stands for Objective, OCaml has objects as well
<emma>
so there must be a caml
<Algebr>
ML is a family of languages, and ml is a language as well from the 70s.
<Algebr>
supposedly there is a caml, and a caml-light or something (That's history)
<Algebr>
was*
<Algebr>
so F# is in the ML family as well
keep_learning_ has quit [Ping timeout: 246 seconds]
<emma>
is haskell in the family?
<Algebr>
in common languge I would say yes, but maybe not in the strict technical answer. I don't know.
tmtwd has joined #ocaml
tmtwd has quit [Client Quit]
<emma>
so it is very mathematical?
<emma>
Algebr: what sort of things have you made with ocaml?
<destrius>
wikipedia has a decent summary of ocaml and haskell, that could be a good starting point for learning more about the languages
<Algebr>
Its a programming language, so I guess it can be as mathematical as you want. I made a terminal game https://github.com/fxfactorial/lambda-invaders , used it to talk to Amazon web services, now I have a job in it
<emma>
sweet
<destrius>
its mathematical in the sense that variables and functions work the way they do in maths, as long as you don't have any side effects
<Algebr>
its pretty sure, I love ocaml.
<destrius>
which is a property of most functional languages
<Algebr>
sweet*
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Haudegen has quit [Ping timeout: 264 seconds]
matason_ has joined #ocaml
matason_ is now known as matason
Haudegen has joined #ocaml
ghostpl has joined #ocaml
obadz has quit [Ping timeout: 252 seconds]
Simn has joined #ocaml
obadz has joined #ocaml
Algebr has quit [Ping timeout: 252 seconds]
manizzle has quit [Ping timeout: 272 seconds]
Submarine has joined #ocaml
Submarine has joined #ocaml
ghostpl has quit [Remote host closed the connection]
Denommus` has joined #ocaml
Denommus has quit [Ping timeout: 248 seconds]
ghostpl has joined #ocaml
lordkryss has joined #ocaml
bjorkintosh has joined #ocaml
yomimono has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
nullcat_ has joined #ocaml
Submarine has quit [Ping timeout: 255 seconds]
yomimono has quit [Ping timeout: 256 seconds]
Denommus` has quit [Ping timeout: 265 seconds]
Denommus` has joined #ocaml
<companion_cube>
o/
<nullcat_>
morning /
thomasga has joined #ocaml
ysz has joined #ocaml
<nullcat_>
companion_cube: "This expression has type string/3 but an expression was expected of type string/15 ← interesting error message though"
<nullcat_>
encountered this on Tuesday
<nullcat_>
:(
<companion_cube>
oh
ysz has quit [Read error: Connection reset by peer]
ysz has joined #ocaml
<nullcat_>
and then I asked people in lab if they use merlin when they hack compiler. none
<companion_cube>
this error is still 100× better than not having merlin
<nullcat_>
yeah
<nullcat_>
100x
<nullcat_>
we also probably discovered some bug of opam-compiler-conf... i couldn't describe clearly but when you switch compiler using opam-compiler-conf, and then u open editor and use merlin... it doesn't work
Kakadu has joined #ocaml
<companion_cube>
nullcat_: where do you work?
<nullcat_>
you need to use opam-compiler-conf to remove your local branch and reinstall it
<nullcat_>
just interning at ocamllab...
<companion_cube>
oh ok, nice
ysz has quit [Client Quit]
<nullcat_>
anyway, using merlin when hacking compiler is not really pleasant
<nullcat_>
i asked jeremy if he uses merlin. he said no and suggested me a guy called Francis (* cannot remember the exact name*). he said that guy probably uses merlin with compiler hacking
<flux>
why is not pleaseant? I would expect the reverse to be true.
<nullcat_>
ok, it's not perfect
<flux>
or is the tree too difficult for it somehow?
<nullcat_>
it shows weird error that bothers programmer
<flux>
ia0, you can get the effect of 'undefined' with "assert false" as far as I know
<flux>
if you want to find the paths at runtime
<flux>
alternative you can use failwith "descriptive message here"
tmtwd has quit [Remote host closed the connection]
<flux>
I actually like very much implementing new apis (that I have a good picture of in my head) by first writing the .mli, then filling in the .ml file with failwith "not implemented" implementations and then moving forward with the implementation.. or even test case if I feel TDDish enough!
<ia0>
flux: yes I am actually using "Lazy.from_fun (fun () -> ignore (assert false); old_value)"
octachron has joined #ocaml
<flux>
well, you don't need to do any trickery, (fun () -> assert false) will work straight out of the box
<flux>
assert false is handled specially by the compiler; it knows that it won't return, so it will have type 'a
<flux>
(failwith works the same but without any special compiler support)
<ia0>
Yes, it's just that I want to keep the old value which I will restore once the refactoring is done
<flux>
ok :)
<flux>
well, you could use comments :)
<ia0>
yes :-)
<flux>
maybe my version would have been too flexible anyway. this way you enforce the type.
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
psy__ has quit [Ping timeout: 256 seconds]
psy__ has joined #ocaml
Kakadu has joined #ocaml
seanmcl has joined #ocaml
tani has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tane has quit [Ping timeout: 252 seconds]
AltGr has left #ocaml [#ocaml]
_andre has joined #ocaml
rgrinberg has joined #ocaml
Haudegen has quit [Ping timeout: 276 seconds]
rgrinberg has quit [Ping timeout: 264 seconds]
Haudegen has joined #ocaml
tani has quit [Quit: Verlassend]
thomasga has quit [Quit: Leaving.]
ghostpl has quit [Ping timeout: 264 seconds]
nullcat has joined #ocaml
<nullcat>
``parser'' is a keyword because of camlp4?
<flux>
it's not really a keyword
<flux>
but some editors like to think that way because of a popular campl4 extension (used to be..)
<nullcat>
ok
<nullcat>
actually i remember i saw it in manual
<nullcat>
but manual does not explain
thomasga has joined #ocaml
thomasga has quit [Client Quit]
matason has quit [Ping timeout: 244 seconds]
yomimono has quit [Ping timeout: 256 seconds]
<Drup>
flux: (about merlin and eliom) unfortunatly :(
keep_learning has quit [Ping timeout: 246 seconds]
<flux>
drup, ppx would fix it I suppose 8-), but I guess it's quite a task
<Drup>
not completely
<flux>
well, at the very least it would allow it to work outside client-contexts with ease? now it works nowhere
<flux>
but I can see that the client side support might need some serious reworking..
<Drup>
?
<Drup>
It's not that simple
rgrinberg has joined #ocaml
emanuelz has quit [Quit: emanuelz]
Submarine has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Ping timeout: 252 seconds]
zpe has joined #ocaml
rand000 has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
Submarine has joined #ocaml
zeRusski_ has quit [Read error: Connection reset by peer]
zeRusski_ has joined #ocaml
zpe has joined #ocaml
tmtwd has joined #ocaml
tmtwd has quit [Client Quit]
bezirg has left #ocaml [#ocaml]
jabesed has joined #ocaml
yomimono has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
seanmcl has joined #ocaml
milosn has joined #ocaml
idegen has joined #ocaml
wwilly has joined #ocaml
emma has quit [Ping timeout: 246 seconds]
matason has joined #ocaml
badkins has joined #ocaml
rand000 has quit [Quit: leaving]
rand000 has joined #ocaml
nullcat has quit [Read error: Connection reset by peer]
nullcat has joined #ocaml
rgrinberg has joined #ocaml
wwilly has left #ocaml ["Leaving"]
Haudegen has quit [Remote host closed the connection]
djellemah_ has joined #ocaml
djellemah has quit [Disconnected by services]
djellemah_ is now known as djellemah
Haudegen has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
zpe has quit [Remote host closed the connection]
Haudegen has quit [Read error: Connection reset by peer]
ollehar has quit [Remote host closed the connection]
Haudegen has joined #ocaml
octachron has quit [Quit: Leaving]
Denommus` is now known as Denommus
Haudegen has quit [Ping timeout: 264 seconds]
Haudegen has joined #ocaml
jeffmo has quit [Quit: jeffmo]
ollehar has joined #ocaml
jeffmo has joined #ocaml
ollehar has quit [Ping timeout: 272 seconds]
jonludlam has quit [Ping timeout: 246 seconds]
Haudegen has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Ping timeout: 256 seconds]
slash^ has joined #ocaml
Haudegen has joined #ocaml
rgrinberg has joined #ocaml
Submarine has quit [Remote host closed the connection]
rand000 has quit [Quit: leaving]
badkins has quit []
robink has quit [Ping timeout: 244 seconds]
darkf has quit [Quit: Leaving]
robink_ has joined #ocaml
psy__ has quit [Remote host closed the connection]
zpe has joined #ocaml
<hcarty>
Does Lwt include something like a "val never : 'a Lwt.t" which sleeps forever?
<Drup>
fst (Lwt.wait ())
<hcarty>
Drup: Ah, of course. Thank you!
<Drup>
(it might be cancellable, not sure)
<hcarty>
Looks like it: Lwt.cancel (fst (Lwt.wait ())) returns immediately in utop
<Drup>
you could make it non-cancelable if you want
<hcarty>
That's what I want in this case. Effectively Lwt.pick [if flag then real_thread else sleep_forever; other_real_thread; ...]
<Drup>
why not Lwt.pick (if flat then real_thread :: l else l) instead ?
<hcarty>
Drup: That's what I have currently. The number of enabled/disabled threads could vary.
<hcarty>
Though I suppose I could handle that by grouping them appropriately.
<Drup>
let (+++) (b,t) l = if b then t :: l else l
<Denommus>
what libraries to use to make a REST client in OCaml?
<Denommus>
I just want the client, not the server, for now
<hcarty>
Denommus: Cohttp and the curl bindings are both usable as a client
<Denommus>
hcarty: what about parsing JSON?
<Denommus>
hcarty: also, does it support HTTPS?
<Drup>
jsonm/ezjsonm for json
<Drup>
and yes, it supports https
amnn has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
<dmbaturin>
Denommus: There's also a HTTP client in ocamlnet.
zpe has joined #ocaml
milosn has quit [Ping timeout: 256 seconds]
zeRusski_ has quit [Remote host closed the connection]
psy_ has quit [Read error: Connection reset by peer]
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hetu has joined #ocaml
zeRusski_ has joined #ocaml
psy_ has joined #ocaml
<Denommus>
thanks
badkins has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
milosn has joined #ocaml
<def`>
nullcat: maybe not Francis, but Georges?
robink_ is now known as robink
lordkryss has quit [Quit: Connection closed for inactivity]
Haudegen has quit [Ping timeout: 276 seconds]
shinnya has quit [Ping timeout: 256 seconds]
<nullcat>
not sure
<nullcat>
it's some name starting with F
jonludlam has joined #ocaml
zpe has quit [Remote host closed the connection]
ollehar has joined #ocaml
Hetu has quit [Remote host closed the connection]
Haudegen has joined #ocaml
thomasga has joined #ocaml
MrScout has joined #ocaml
dsheets has quit [Ping timeout: 246 seconds]
yomimono has quit [Ping timeout: 265 seconds]
thomasga has quit [Quit: Leaving.]
Simn has quit [Ping timeout: 252 seconds]
thomasga has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<creichert>
does 'utop' load libraries in ~/.opam/$VER/lib? When I run plain ocaml toplevel the libraries are loaded, when I run 'utop' they are not (same .ocamlinit)
<creichert>
I think I am wrong, running 'ocaml' just has more search path loading chatter
<MercurialAlchemi>
creichert: it loads libraries in the switch it is installed in, I think
thomasga has joined #ocaml
Hannibal_Smith has joined #ocaml
lobo has joined #ocaml
zeRusski_ has quit [Ping timeout: 252 seconds]
Simn has joined #ocaml
matason has quit [Ping timeout: 264 seconds]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
SomeDamnBody has joined #ocaml
<SomeDamnBody>
Is there any way to resolve circular dependencies in ocaml code?
yaewa has quit [Quit: Leaving...]
moei has joined #ocaml
<SomeDamnBody>
This is really annoying. I get my library to compile by providing mli files, but now it's being a pain in the ass because some modules aren't defined
<SomeDamnBody>
WTF
thomasga has quit [Quit: Leaving.]
slash^ has quit [Quit: Leaving.]
slash^ has joined #ocaml
matason has joined #ocaml
ggole has quit [Ping timeout: 244 seconds]
<zozozo>
SomeDamnBody: do you really need circular dependencies for your modules ?
<SomeDamnBody>
well it's for a library, and I really just need the damn thing to compile
<SomeDamnBody>
honestly, I don't want to refactor it
<SomeDamnBody>
but I had to in order to improve efficiency
<zozozo>
but then all your modules need to be in the same file
<zozozo>
but most likely, it is more of a problem with the way you designed your modules
<SomeDamnBody>
*sigh
<SomeDamnBody>
alright, well... I think I will back up and try and just change the function calls
Kakadu has quit [Quit: Page closed]
matason has quit [Ping timeout: 264 seconds]
yomimono has joined #ocaml
<SomeDamnBody>
thanks zozozo
<SomeDamnBody>
I wish I had known that co-recursive module implementation would be quite such a bother
<zozozo>
well, to *need* recursive modules, you have to do something quite complex I think
Hannibal_Smith has quit [Quit: Leaving]
<zozozo>
SomeDamnBody: I'm curious, what kind of library are you making ?
<SomeDamnBody>
I'm not making a library, I'm improving one
<zozozo>
ok, what does it do ?
bjorkintosh has quit [Ping timeout: 252 seconds]
<SomeDamnBody>
It's piqi
wraithm has quit [Quit: leaving]
<SomeDamnBody>
Basically it's an ocaml implementation of protobuf
<SomeDamnBody>
zozozo, ^
<zozozo>
ok, then where does the need for recursive module arises ?
tarball13 has joined #ocaml
<SomeDamnBody>
well basically, piqi supports multiple formats and uses a common data schema specification language
<SomeDamnBody>
so there's all of this structured conversion code that allows for transforms between the various formats
<SomeDamnBody>
as well as serialization to from ocaml vernacular
<SomeDamnBody>
There is a lot of inherent inter-dependency of code
tarball13 has quit [Client Quit]
<SomeDamnBody>
I didn't know that modules couldn't be co-recursive or interdependent
tarball13 has joined #ocaml
<zozozo>
are you sure it couldn't be solved by separating the definition of each format (having a module for each format that only defines it and implement basic operations over it) from the tranformations ?
tarball13 has quit [Client Quit]
tarball13 has joined #ocaml
<Drup>
you can have recursive modules, you just need to annotate all the module with their complete type
<Drup>
(and there are a lot of quirks, too)
tarball13 has left #ocaml [#ocaml]
<SomeDamnBody>
Yeah, that's too long for my route
<SomeDamnBody>
I really am incurring a lot of overhead getting tangled up dealing with module problems that really aren't mine
<SomeDamnBody>
the problem has gotten way out of hand in that, all I wanted to do was refactor to eliminate some non-tail recursive calls
<SomeDamnBody>
I just want to edit to have the right function calls and be done.
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sh0t has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
lobo has quit [Ping timeout: 265 seconds]
obadz- has joined #ocaml
obadz has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 272 seconds]
ygrek has joined #ocaml
matason has quit [Ping timeout: 252 seconds]
sh0t has quit [Remote host closed the connection]
seanmcl has quit [Ping timeout: 264 seconds]
thomasga has joined #ocaml
lobo has joined #ocaml
lordkryss has joined #ocaml
tmtwd has joined #ocaml
<SomeDamnBody>
zozozo, probably I could do that, but I'm not going to. I was able to make progress, get everything to compile and achieve my ends without doing that
nullcat has joined #ocaml
<zozozo>
ok, if it works and looks maintainable, everything's good
walter|r has joined #ocaml
tmtwd has quit [Remote host closed the connection]
struktured has joined #ocaml
meteo_ has quit [Ping timeout: 276 seconds]
<Drup>
thomasga: pretty sure I saw it in a mirage (or mirage team) blog post, but I can't find it again
swgillespie has joined #ocaml
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
<thomasga>
Drup: blog post on what?
<Drup>
automatic deployment
<Drup>
It's basically the one I got my original shell script (I modified it a bit after that ...)