adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org and http://caml.inria.fr | http://ocaml.org/releases/4.02.0.html | Public channel logs at http://irclog.whitequark.org/ocaml
fraggle_ has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
cesar has joined #ocaml
fennec has joined #ocaml
fennec has joined #ocaml
cesar is now known as Guest13102
tac_ has quit [Ping timeout: 244 seconds]
Guest13102 has quit [Ping timeout: 240 seconds]
tac_ has joined #ocaml
FatDarrel has quit [Ping timeout: 244 seconds]
taion809 has joined #ocaml
ygrek has joined #ocaml
sheijk has quit [Quit: .]
bytbox has quit [Remote host closed the connection]
eikke has quit [Ping timeout: 272 seconds]
SethTIsue has quit [Quit: SethTisue]
ontologiae has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
AltGr has joined #ocaml
hhugo has quit [Quit: Leaving.]
bytbox has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
badkins has quit []
lgm has quit [Ping timeout: 250 seconds]
jzelinskie has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
jzelinskie has joined #ocaml
dotfelix has joined #ocaml
shinnya has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
cesar has joined #ocaml
cesar is now known as Guest22478
dotfelix has quit [Ping timeout: 272 seconds]
Guest22478 has quit [Ping timeout: 272 seconds]
yomimono has joined #ocaml
burgobianco has quit [Max SendQ exceeded]
burgobianco has joined #ocaml
WraithM has quit [Ping timeout: 272 seconds]
WraithM has joined #ocaml
warrick_ has quit [Quit: leaving]
waneck has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
mcclurmc has joined #ocaml
taion809 has quit [Remote host closed the connection]
yomimono has quit [Ping timeout: 272 seconds]
marchdown has quit [Quit: marchdown]
cesar has joined #ocaml
cesar is now known as Guest90197
Guest90197 has quit [Ping timeout: 245 seconds]
zpe has joined #ocaml
marchdown has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
WraithM has quit [Ping timeout: 240 seconds]
WraithM has joined #ocaml
tnguyen has joined #ocaml
marchdown has quit [Quit: marchdown]
siddharthv_away is now known as siddharthv
WraithM has quit [Ping timeout: 245 seconds]
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 272 seconds]
darkf has joined #ocaml
axiles has joined #ocaml
darkf_ has quit [Ping timeout: 272 seconds]
FatDarrel has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
darkf_ is now known as darkf
koderok has joined #ocaml
koderok has quit [Client Quit]
zpe has quit [Ping timeout: 245 seconds]
WraithM has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest4125
ygrek has quit [Ping timeout: 260 seconds]
Guest4125 has quit [Ping timeout: 272 seconds]
tac_ has quit [Read error: Connection reset by peer]
tac_ has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
hhugo has joined #ocaml
mawuli_ has quit [Ping timeout: 272 seconds]
rgrinberg has quit [Quit: Leaving.]
FatDarrel has quit [Quit: FatDarrel]
tac_ has quit [Quit: Leaving]
larhat has quit [Quit: Leaving.]
ygrek has joined #ocaml
cago has joined #ocaml
Thooms has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
ddosia has quit [Quit: Leaving.]
ddosia has joined #ocaml
eugene_klm has joined #ocaml
thomasga has joined #ocaml
Simn has joined #ocaml
badon has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest33508
Guest33508 has quit [Ping timeout: 240 seconds]
eugene_klm has quit [Ping timeout: 272 seconds]
ollehar has joined #ocaml
ggole has joined #ocaml
jpdeplaix has quit [Ping timeout: 244 seconds]
zpe has joined #ocaml
Kakadu has joined #ocaml
larhat has joined #ocaml
oscar_toro has joined #ocaml
jpdeplaix has joined #ocaml
jonludlam has joined #ocaml
thomasga has quit [Quit: Leaving.]
eikke has joined #ocaml
thomasga has joined #ocaml
Thooms has quit [Quit: WeeChat 0.4.3]
simulacrum has quit [Quit: No Ping reply in 180 seconds.]
marchdown has joined #ocaml
simulacrum has joined #ocaml
Kakadu has quit [Ping timeout: 246 seconds]
marchdown has quit [Quit: marchdown]
Kakadu has joined #ocaml
Snark has quit [Ping timeout: 246 seconds]
fraggle_ has joined #ocaml
rand000 has joined #ocaml
hhugo1 has joined #ocaml
hhugo has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
marchdown has joined #ocaml
Thooms has joined #ocaml
avsm has joined #ocaml
iorivur has joined #ocaml
hsuh has quit [Ping timeout: 258 seconds]
avsm has quit [Quit: Leaving.]
marchdown has quit [Quit: marchdown]
hsuh has joined #ocaml
marchdown has joined #ocaml
avsm has joined #ocaml
adrien_oww has quit [Ping timeout: 246 seconds]
sepp2k has joined #ocaml
adrien_oww has joined #ocaml
cesar has joined #ocaml
cesar is now known as Guest33902
Guest33902 has quit [Ping timeout: 258 seconds]
voglerr has joined #ocaml
thomasga has quit [Quit: Leaving.]
bezirg has joined #ocaml
WraithM has quit [Ping timeout: 272 seconds]
hhugo1 has quit [Quit: Leaving.]
thomasga has joined #ocaml
Thooms has quit [Quit: WeeChat 0.4.3]
tane has joined #ocaml
AltGr has left #ocaml [#ocaml]
avsm has quit [Quit: Leaving.]
zpe has quit [Remote host closed the connection]
rand000 has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
kanzaros has quit [Ping timeout: 245 seconds]
osnr has quit [Ping timeout: 260 seconds]
isomorphismes has quit [Ping timeout: 258 seconds]
isomorphismes has joined #ocaml
osnr has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
kanzaros has joined #ocaml
avsm has quit [Quit: Leaving.]
iorivur has quit [Ping timeout: 272 seconds]
badon has quit [Quit: Leaving]
marchdown has quit [Quit: marchdown]
lordkryss has joined #ocaml
marchdown has joined #ocaml
<whitequark> what's the current best method of building OCaml for Android?
<whitequark> https://github.com/vouillon/ocaml-android is kind of outdated
<Drup> there is an opam switch with a cross-compiler, isn't it ?
marchdown has quit [Quit: marchdown]
<Drup> well, it's probably the same thing, in fact
<dmbaturin> Is there only cross-compiler, or the compiler itself can run on android too now?
zpe has joined #ocaml
Snark has joined #ocaml
pminten has joined #ocaml
<adrien_oww> why wouldn't it be able to run on android?
<whitequark> Drup: I don't think there is
<whitequark> there are ones for rpi and armv6-freebsd...
thomasga has quit [Quit: Leaving.]
cesar has joined #ocaml
cesar is now known as Guest86642
rgrinberg has joined #ocaml
BitPuffin has joined #ocaml
Guest86642 has quit [Ping timeout: 258 seconds]
rgrinberg has quit [Client Quit]
rand000 has joined #ocaml
eizodo has joined #ocaml
marchdown has joined #ocaml
siddharthv is now known as siddharthv_away
marchdown has quit [Client Quit]
tnguyen1 has joined #ocaml
tnguyen has quit [Ping timeout: 240 seconds]
Drup has quit [Quit: Tatayoyo]
Drup has joined #ocaml
oscar_toro has quit [Quit: Leaving.]
hhugo has joined #ocaml
sad0ur has quit [Quit: leaving]
iorivur has joined #ocaml
koderok has joined #ocaml
fennec has quit [Quit: This computer has gone to sleep]
koderok has quit [Client Quit]
pminten has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
tnguyen1 has quit [Ping timeout: 246 seconds]
tnguyen has joined #ocaml
tnguyen1 has joined #ocaml
cago has quit [Ping timeout: 246 seconds]
tnguyen has quit [Ping timeout: 260 seconds]
iorivur has quit [Ping timeout: 245 seconds]
Drup has quit [Quit: Tatayoyo]
Drup has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
darkf has quit [Quit: Leaving]
bytbox has quit [Remote host closed the connection]
iorivur has joined #ocaml
cago has joined #ocaml
cago has quit [Ping timeout: 246 seconds]
dubst3pp4 has joined #ocaml
hhugo has quit [Quit: Leaving.]
dubst3pp4 has quit [Client Quit]
SethTIsue has joined #ocaml
koderok has joined #ocaml
koderok has quit [Client Quit]
badkins has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Quit: Leaving]
dsheets has joined #ocaml
nojb has joined #ocaml
marchdown has joined #ocaml
marchdown has quit [Client Quit]
samebchase has left #ocaml [#ocaml]
rand000 has quit [Ping timeout: 244 seconds]
bezirg has quit [Ping timeout: 272 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
hhugo has joined #ocaml
tnguyen1 has quit [Ping timeout: 272 seconds]
eikke has quit [Ping timeout: 258 seconds]
tnguyen has joined #ocaml
eikke has joined #ocaml
segmond has quit [Ping timeout: 245 seconds]
tnguyen has quit [Ping timeout: 272 seconds]
hhugo has quit [Quit: Leaving.]
samebchase has joined #ocaml
<samebchase> Attempting to install anything with ocaml is giving me a network in unreachable error. Has anyone else faced this?
<samebchase> s/ocaml/OPAM?
<adrien_oww> ping example.com ?
<adrien_oww> curl http://example.com
<adrien_oww> unlikely to not be an issue in your network config
<ggole> On the same machine you are IRCing from?
<adrien_oww> and proxy?
<adrien_oww> any*
<samebchase> yeah
<samebchase> pinging works
<ggole> Uh, could be a permissions issue?
<Drup> samebchase: which server is it trying to reach ?
<Drup> samebchase: also, which version of opam ?
<samebchase> opam.ocaml.org
<samebchase> 1.1.1
<ggole> Surely a wrong server name wouldn't give "network unreachable"
hhugo has joined #ocaml
clog has quit [Ping timeout: 246 seconds]
<samebchase> https://pastee.org/perhe : is the error
avsm has joined #ocaml
<samebchase> I can even ping opam.ocaml.org. Strange
<Drup> samebchase: very weird, no idea.
SethTIsue has quit [Ping timeout: 244 seconds]
<ggole> How did you install opam?
<adrien> network unreachable is when you don't have the route
<adrien> basically
<adrien> what is the download that it attempts to do?
ollehar has quit [Ping timeout: 272 seconds]
<samebchase> ggole: AUR
<samebchase> adrien: e.g. default Downloading https://opam.ocaml.org/archives/menhir.20130912+opam.tar.gz
ygrek has joined #ocaml
<samebchase> Would installing a more recent version of OPAM help?
<companion_cube> samebchase: looks like an old version of menhir
<companion_cube> did you "opam update" ?
<ggole> I can't think of anything except permissions.
<samebchase> I'll [ERROR] Skipping https://opam.ocaml.org as the repository is not available.
<samebchase> is what I get while doing `opam update`
tnguyen has joined #ocaml
shinnya has joined #ocaml
<Drup> samebchase: maybe the issue is with https
<samebchase> on my side?
<Drup> yes
rand000 has joined #ocaml
Anarchos has joined #ocaml
clog has joined #ocaml
<Kakadu> What `opam remote` prints out?
<Kakadu> If default URL has https prefix you can change it into non-SSL
<samebchase> 0 [http] default https://opam.ocaml.org
<samebchase> that's what it prints out
cesar has joined #ocaml
cesar is now known as Guest87639
<Kakadu> mine prints without S
<samebchase> any way of changing it?
<Kakadu> you can use `opam remote remove` and opam remote add
<samebchase> some config file somewhre?
<Drup> don't even need config file, look at the documentation for "opam remote"
<samebchase> okay
<ggole> Just opam remote add will do, I think (it adds at a higher priority)
<Kakadu> opam remote set-url !
Guest87639 has quit [Ping timeout: 260 seconds]
<samebchase> opam remote add default http://opam.ocaml.org got me this error: Cannot download http://opam.ocaml.org/urls.txt, please check your connection settings.
<ggole> Sounds like the same problem
rand000 has quit [Quit: leaving]
<Kakadu> so, It is not https
SethTIsue has joined #ocaml
ollehar has joined #ocaml
<ggole> You might have to poke around with iptables or some such thing
<Kakadu> mmmm
<Kakadu> you can get IP adress of opam.ocaml.org and write it as server
<Kakadu> maybe it some DNS issue
<Kakadu> I don't know
<Kakadu> It is very strange that pings are working OK
<ggole> I meant the linux admin tool, not the IP address
<ggole> If ping sees it, things should be fine in that regard.
<Kakadu> maybe some intermediate server is configured to pass ping ICMP packets and to decline other ones
nifty___ is now known as niftyn8
bytbox has joined #ocaml
<Kakadu> ggole: Yeah, I got that you are talking about ipatables
<ggole> That would be easy to check: wget --output-file /tmp/junk https://opam.ocaml.org/urls.txt
<ggole> If wget succeeds and opam fails, it would be a pretty sure thing that there is a config problem
<Kakadu> Opam executes wget or curl in background, btw
<Kakadu> so, I predict that wget will fail
<ggole> Executes it with opams permissions
<ggole> Ugh, it should be --output-document
<ggole> I fail at reading man pages
<Kakadu> Ah, he has left
marchdown has joined #ocaml
rand000 has joined #ocaml
<adrien> samebchase: what if you download with wget?
niftyn8 is now known as nifteen8
nifteen8 is now known as n1ftyn8
Thooms has joined #ocaml
ollehar has quit [Remote host closed the connection]
ollehar has joined #ocaml
slash^ has joined #ocaml
marchdown has quit [Quit: marchdown]
mawuli_ has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
zpe has quit [Remote host closed the connection]
slash^1 has joined #ocaml
slash^ has quit [Ping timeout: 260 seconds]
oriba has joined #ocaml
Hannibal_Smith has joined #ocaml
FatDarrel has joined #ocaml
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
larhat has quit [Client Quit]
siddharthv_away is now known as siddharthv
gikiam2 has joined #ocaml
Thooms_ has joined #ocaml
hsuh_ has joined #ocaml
eikke has quit [Ping timeout: 245 seconds]
SethTIsue has quit [Read error: Connection reset by peer]
martintrojer_ has joined #ocaml
gargawel_ has joined #ocaml
contempt has quit [Disconnected by services]
hsuh has quit [Ping timeout: 244 seconds]
Thooms has quit [Ping timeout: 244 seconds]
gikiam1 has quit [Ping timeout: 244 seconds]
martintrojer has quit [Ping timeout: 244 seconds]
rand000 has quit [Ping timeout: 244 seconds]
gargawel has quit [Ping timeout: 244 seconds]
araujo has quit [Ping timeout: 244 seconds]
robink has quit [Ping timeout: 244 seconds]
kanzaros has quit [Ping timeout: 244 seconds]
rand000 has joined #ocaml
<samebchase> https://github.com/wayneeseguin/rvm/issues/2989 is the problem I think
contempt has joined #ocaml
kanzaros has joined #ocaml
<adrien> haha
nojb has quit [Ping timeout: 272 seconds]
araujo has joined #ocaml
robink has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
badkins has quit []
<samebchase> how do I make it use wget instead?
<adrien_oww> it'll be the same
voglerr has quit [Quit: WeeChat 0.4.3]
<adrien_oww> if that is the issue, you need to fix your networking
<samebchase> could it be this new router I'm using?
<adrien_oww> could be
voglerr has joined #ocaml
<samebchase> any pointers as to what I can try?
voglerr has quit [Client Quit]
voglerr has joined #ocaml
eikke has joined #ocaml
<adrien_oww> do the downloads with curl/wget work outside of opam?
<samebchase> yeah
morphles has joined #ocaml
WraithM has joined #ocaml
nojb has joined #ocaml
<samebchase> ipv6.google.com doesn't work
rgrinberg has joined #ocaml
<ggole> Is that an actual server?
wwilly has joined #ocaml
nojb has quit [Read error: Connection reset by peer]
nojb` has joined #ocaml
eikke has quit [Ping timeout: 246 seconds]
<samebchase> atm
Thooms_ has quit [Quit: WeeChat 0.4.3]
badkins has joined #ocaml
avsm has quit [Quit: Leaving.]
nojb` has quit [Remote host closed the connection]
Kakadu has quit [Quit: Page closed]
<adrien> samebchase: can you pastebin the outputs of "ip r" and "ip a" along with "cat /etc/resolv.conf"
<adrien> ?
cesar has joined #ocaml
cesar is now known as Guest3796
zpe has joined #ocaml
<samebchase> and https://pastee.org/cwbk6 for `ip r`
rand000 has quit [Ping timeout: 250 seconds]
<oriba> how can the user-agent-string be changed in oCamlnet? it's "Netclient" at the moment.
olauzon has joined #ocaml
Guest3796 has quit [Ping timeout: 245 seconds]
<flux> oriba, can you set the headers? apparently it only sets it to "Netclient" if it's not set.
zpe has quit [Ping timeout: 244 seconds]
<oriba> flux, just looking, where I can access the headers
rgrinberg has quit [Quit: Leaving.]
<oriba> flux, there is so much OOP stuff and one class uses the other, and all that docs are linearly... not hierarchically
<oriba> So, finding out, where a method may be found is not that easy, IMHO
<oriba> a hierarchical diagram would be nice...
<flux> have you looked at the .mli files?
SethTIsue has joined #ocaml
<flux> probably you have an object you use for sending the request.. find a way from it to header objects :)
<oriba> flux, I'm looking at the html-files of the documentation... thats normally the way I do it.
<flux> I like .mli, it's all in the same file :)
<flux> though actually I would like to have manual pages..
<flux> but so few packages build/install them by default..
rgrinberg has joined #ocaml
<flux> and then there are some ocamlscope-like interface search engines
<flux> they could also support things "I have object X and a string, how do I get object Y from it" :)
<oriba> "and then there are some ocamlscope-like interface search engines" ? what? where?
<flux> oriba, but when you get to http://projects.camlcity.org/projects/dl/ocamlnet-3.7.6/doc/html-main/Http_client.html , there's stuff hidden, where in .mli they are right there, to be searched
rgrinberg has quit [Client Quit]
<flux> well, for one, http://ocamlscope.herokuapp.com/
<flux> but I think there was another one but I cannot remember its name..
<oriba> flux, the problem with hidden information is what I mean: it needs many clicks, and maybe with the wrong click, things will not be found... maybe mli-file is really better, hmhhh
lgm has joined #ocaml
<lgm> Hello, Good Folks!
zpe has joined #ocaml
<oriba> flux, "There is no app configured at that hostname" hmhh
rand000 has joined #ocaml
<samebchase> adrien: does `tracepath6 google.com` not working mean anything?
<lgm> What's the standard way to refer to the type of the module generated by calling Hashtbl.Make( SomeModuleDefiningAKey )
<flux> I think the search is not very useful with Netclient
rgrinberg has joined #ocaml
<oriba> flux, aha, that link works. thx
slash^1 has quit [Read error: Connection reset by peer]
<ggole> lgm: module type of <module-expr>
andie has joined #ocaml
rand000 has quit [Ping timeout: 272 seconds]
rand000 has joined #ocaml
eugene_klm has joined #ocaml
<Drup> lgm: Hashtble.S
andie has quit [Client Quit]
<Drup> you need a "with type ..." annotation too
q66[lap] has quit [Ping timeout: 250 seconds]
<lgm> ggole: i don't think i understood your suggestion. Here's a pastebin indicating my attempt to use your suggestion: http://pastebin.com/RtuZMyFK
q66 has joined #ocaml
lordkryss has joined #ocaml
<Drup> lgm: it's not a good suggestion anyway, module type of ... is sort of a last resort. In this case, the output signature of the functor is exported as type S
q66[lap] has joined #ocaml
<lgm> Drup: i don't think i've understood your suggestion. Here's a pastebin indicating my attempt to use your suggestion: http://pastebin.com/48QfYuQs
<Drup> lgm: but in your attempt, the problem is simply that you should put "module type FOO = ..." before
hhugo has quit [Quit: Leaving.]
<Drup> What are you trying to achieve with that ?
<lgm> Drup: # module type StrTblType = Hashtbl.Make( StrKey );;
<lgm> Characters 47-49:
<lgm> Error: Syntax error
<lgm> module type StrTblType = Hashtbl.Make( StrKey );;
<lgm> ^^
<lgm> #
<Drup> No ...
<Drup> module type Foo = module type of Hashtbl.Make( StrKey );;
rand000 has quit [Ping timeout: 272 seconds]
rand000 has joined #ocaml
avsm has joined #ocaml
<Drup> You can't put a signature as top level item, it can only be a signature *declaration*
<lgm> Drup: thanks! that incantation is just what i needed.
<Drup> and about the S signature, I told you it was *Hashtbl.S*, not just (a randomly generated module).S
<ggole> Hashtbl.S only exists as a workaround that predates 'module type of', doesn't it?
<companion_cube> not really
<Drup> ggole: no, it's the only way around
<Drup> module type of exists as a workaround for people that don't export the output signature
<ggole> Hmm :/
<companion_cube> module type of Hashtbl and module type of Hashtbl.Make(Foo) aren't related at all
<companion_cube> because the type has respectively one and two type args
<ggole> Well no, you'd use module type of Hashtbl (Something)
<Drup> companion_cube: read again, that's not what he was saying
avsm has quit [Client Quit]
<ggole> Er, Hashtbl.Make (Something)
<companion_cube> ok
<companion_cube> that's more accurate than Hashtbl.S now
<ggole> More accurate?
<Drup> you need a "with type ..."
<ggole> Oh, it has the concrete type. Yes.
siddharthv is now known as siddharthv_away
Kakadu has joined #ocaml
Kakadu_ has joined #ocaml
tnguyen has quit [Quit: tnguyen]
sinelaw has joined #ocaml
<sinelaw> does ocaml have something equivalent to haskell's ST monad?
<tane> https://github.com/rgrinberg/ocaml-mtl maybe have a look there
<sinelaw> with rank 2 types
<sinelaw> does ocaml need rank-2 types to implement the same feature?
<Denommus> sinelaw: the module system may be used to implement rank-2 types
<Drup> but it's not because you can that you should :3
<sinelaw> but do you need rank 2 types to achieve the same functionality?
<sinelaw> e.g. a pair of getter/setter operating on a hidden ref
Hannibal_Smith has quit [Read error: No route to host]
<Denommus> Drup: how would you implement instead?
rgrinberg has joined #ocaml
<Denommus> Drup: I'm honestly unaware of how OCaml solves this specific problem, and I thought we'd use modules and functors anywhere we'd use rank-2 types in Haskell
eugene_klm has left #ocaml ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
<Drup> depends of the problem. Basically you use something adhoc
<sinelaw> Drup, what do you do for the get/put example?
<Drup> Just use a ref ?
<sinelaw> the assumption is that you're not just using a ref instead
<sinelaw> (e.g. if the get/put do more than just set a ref)
<Kakadu> structure with mutable fields?
larhat has joined #ocaml
octachron has joined #ocaml
<Drup> sinelaw: give me a sec, to refresh my memory about ST
eugene_klm has joined #ocaml
<sinelaw> kakadu, example?
rand000 has quit [Ping timeout: 245 seconds]
shinnya has quit [Ping timeout: 260 seconds]
dsheets has quit [Ping timeout: 272 seconds]
rand000 has joined #ocaml
<Drup> sinelaw: do you really need to be polymorphic over the content ?
<Drup> or is it just the case of "I would do that in haskell, how do I do the exact same thing in OCaml ?"
rgrinberg has quit [Quit: Leaving.]
<sinelaw> Drup, I'm trying to understand how type inference can work here without rank-2 types, and was hoping that ocaml does it
Kakadu_ has quit [Quit: Konversation terminated!]
thomasga has joined #ocaml
<Drup> I'm affraid I don't even see the issue. Look at the library linked by tane for a functorized version. You will have applied operators for a specific monad (instead of using type classes and hkt) but that's all
<octachron> Naive question looking at runST type, what about something like type 'a st = { runST : 's. 's -> 'a } ?
oriba has quit [Quit: oriba]
SethTIsue has quit [Read error: Connection reset by peer]
<sinelaw> octachron, runST is supposed to take an ST action as its argument
<mrvn> octachron: how would you ever use that? You won't know the right type.
<sinelaw> type 's 'a st = { runST : 'a. ('s -> 's 'a st) -> 'a }
<sinelaw> approximately.
<mrvn> the 'a. makes no sense there
<sinelaw> type 's 'a st = { runST : 'a. ('s. 's 'a st) -> 'a }
<Drup> ( octachron : the only inhabitant of your type are function that don't use their input)
<sinelaw> sorry.
<mrvn> type ('s, 'a) st = { runST : 's -> 's 'a st -> 'a
<mrvn> }
<sinelaw> honestly, i haven't grasped rank-2 types enough yet
<sinelaw> what I'm trying to find out is if there's an alternative
<mrvn> I have no idea what you are trying to do
<sinelaw> mrvn, runST takes a single argument
<sinelaw> not two
<mrvn> sinelaw: that isn't the point
<sinelaw> mrvn, it should take a single value of type: ('s. 's -> 'a )
<sinelaw> argh.
<sinelaw> i meant: ('s. 's 'a st)
<sinelaw> anyway, my actual question is how to implement a pair of functions that operate on a hidden reference cell
<ggole> Are you implementing Univ or something?
<Drup> sinelaw: "let create r0 = let r = ref r0 in (fun x -> r := x , fun () -> !r)" ?
<Drup> It's hidden :D
<Drup> (I still don't understand what you want, though)
<sinelaw> bear with me.
<sinelaw> one sec
<sinelaw> is there an ocaml bot here?
<Drup> no
<sinelaw> cool.
<thomasga> Drup: yay!
<Drup> ?
<nlucaroni> hmm, couple of those pre-defined ones don't work.
<Drup> thomasga: what's the "yay" for ? :D
<thomasga> for the nice js toplevel :-)
<Drup> oh, this one has been there for quite some time now
<Drup> there is even a meta-ocaml one
<Drup> more than 6 month, I think .
<thomasga> really? not very well advertised the
<Drup> yeah ... maybe :x
<Drup> thomasga: btw, since you are
mawuli_ has quit [Ping timeout: 245 seconds]
<thomasga> (c'est cassé les exemples avec Graphics)
<Drup> During my last discussion with vincent, he presented me a new thing is working on, and said "I maintain a cache on client side, but I have some issues with keeping consistency with the server" ... :]
<thomasga> haha
<sinelaw> Drup, you were missing some parens
<sinelaw> let create r0 = let r = ref r0 in ((fun x -> r := x) , (fun () -> !r));;
<Drup> sinelaw: indeed
<Drup> thomasga: So, hum, we will need to work on that :p
<thomasga> about cool js_of_ocaml demo there is that: http://andrewray.github.io/iocamljs/oh261.html
<thomasga> (need to evaluate the full page to see the magic happen …)
Thooms has joined #ocaml
<Drup> Yes, I know about that !
<Drup> I really need to create a tyxml tutorial using iocamljs
<Drup> yep, but versionned, hosted on ocsigen.org and with auto-recompilation using the dev version of tyxml, so that I can really make it grow with new features and all that
<thomasga> about the consistency issue: could maybe work on that together, I'm looking on new Irmin users (I working on making it more easily usable)
<Drup> as always, :time: is the issue :p
<Drup> thomasga: we clearly need an easy to use eliomized irmin
<Drup> like, you declare a cache in a shared section, and it creates the server part, the client, and auto update between the two
Hannibal_Smith has joined #ocaml
<thomasga> yea, would be nice
<thomasga> really need to finish my core_kernel removal patches then ...
<Drup> we have things like that already, sort of. Like Eliom_React.Up and Down, but it's not bi-directional
<companion_cube> :>
zpe has quit [Remote host closed the connection]
jzelinskie has quit [Ping timeout: 260 seconds]
rfv has quit [Ping timeout: 260 seconds]
jeroud has quit [Ping timeout: 260 seconds]
<Drup> thomasga: no online API ?
jeroud has joined #ocaml
rfv has joined #ocaml
jzelinskie has joined #ocaml
<thomasga> Drup: give me 5min, I'll do it
igstan has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
<Drup> :D
<Drup> maybe it's on the opam doc website, but I can't find the address again :x
<thomasga> and no, it's not there :p
avsm has joined #ocaml
<Drup> humm, david sheet showed me some hosted documentation at some point, but I don't remember where
<companion_cube> irmin still has a lot of dependencies oO
<thomasga> Drup: it's in there, but not all the packages have the doc
<thomasga> companion_cube: most are optional
<thomasga> but yes, it uses stuff
<companion_cube> the opam package looks like they are mandatory ^^
<thomasga> I know I know … :-)
leifw has quit [Ping timeout: 260 seconds]
n1ftyn8 has quit [Ping timeout: 260 seconds]
lordkryss has quit [Ping timeout: 260 seconds]
andreypopp_ has quit [Ping timeout: 260 seconds]
n1ftyn8 has joined #ocaml
leifw has joined #ocaml
lordkryss has joined #ocaml
cdidd has quit [Ping timeout: 272 seconds]
andreypopp_ has joined #ocaml
willy_ has joined #ocaml
ollehar has joined #ocaml
wwilly has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Remote host closed the connection]
elfring has joined #ocaml
<sinelaw> Drup, back to the get/put example, the type is fixed there by passing the initial value.
<Drup> Sure
<sinelaw> Drup, but if you use None instead, you get to see the magic.
<sinelaw> let create = let r = ref None in ((fun x -> r := Some x) , (fun () -> !r));;
<sinelaw> val create : ('_a -> unit) * (unit -> '_a option) = (<fun>, <fun>)
<sinelaw> fst create 2;;
<sinelaw> create;;
<sinelaw> - : unit = ()
<sinelaw> - : (int -> unit) * (unit -> int option) = (<fun>, <fun>)
<sinelaw> the type changes :)
<Drup> no magic here, only value restriction
cdidd has joined #ocaml
mcclurmc has joined #ocaml
<Drup> replace "create" by "create ()" to make it a function (and be able to create multiple references) and you won't have the issue
<sinelaw> ok
<Drup> here, in your example, you create a reference to something of a defined type
<Drup> The typechecker just don't know what yet, it will depends of what you are trying to do with it
<Drup> but you obviously can't put things of different type in it, so it's not polymorphic
araujo has quit [Ping timeout: 272 seconds]
<sinelaw> ok, that rule is what I was after.
<Drup> sinelaw: you can see it too if you do "let ref_list = ref []"
<sinelaw> hmm
<Drup> (my first affirmation was wrong, it's not value restriction, just normal monomorphic type)
yomimono has joined #ocaml
<sinelaw> Drup, note the underscored type variables in the first type of create
<sinelaw> '_a
<Drup> Yes, that's the typechecker way of telling you "I can't make this variable polymorphic, so it will be specialized"
<sinelaw> ok
<sinelaw> so what is "real" value restriction then?
<Drup> let f = List.map2 (:=) ;;
<Drup> compared to : "let f l1 l2 = List.map2 (:=) l1 l2"
<octachron> or consider the function: let id s x = x which is polymorphic of type 'a->'b -> 'b
ollehar has quit [Ping timeout: 250 seconds]
<octachron> then if you define let f = id () its type is '_a -> '_a
<Drup> octachron's example is simpler than mine, yes :p
<octachron> the idea is that the compiler cannot trust a function return to be truly polymorphic
<sinelaw> because it may be hiding a reference?
<mrvn> for the right value of it
<maurer> What's the best way to represent a block of binary data in ocaml?
<maurer> string?
<Drup> bytes* :3
<mrvn> or Bigarray
<madroach> why not string?
<Drup> ask gasche about the difference between string and bytes
<mrvn> limited to below 16MiB on 32bit.
<ggole> You have to do silly casts between char and int with String
<octachron> sinelaw : yes, for instance : let false_id = let store =ref None in fun x -> match !store with None -> (store:= Some x; x) | Some y -> store:=Some x; y
<maurer> Drup: I don't see a bytes type, other than a library called ocaml-bytes which appears to be literally just string
<maurer> mrvn: And on 64-bit? I anticiapte needing more than 16MB
<ggole> bytes is new in 4.02
<mrvn> maurer: a billion times more or so
<madroach> ggole: val Bytes.get : bytes -> int -> char
mawuli_ has joined #ocaml
<Drup> maurer: please read the 4.02 changelog
<maurer> Drup: Oh, uh, awkward. I don't think any of our target environments have 4.02 yet :(
<maurer> What did people use before 4.02?
<Drup> maurer: or look at xavier's slides
<ggole> String
<ggole> :(
<sinelaw> octachron, nice
<maurer> Oh :/
<sinelaw> I'm beginning to appreciate Haskell's IO monad :)
ollehar has joined #ocaml
<Drup> sinelaw: it comes with other troubles
<Drup> \o/
<thomasga> not sure how it renders
<Drup> I see that dbunzli-powered ocamldoc theme is popular :p
<sinelaw> Drup, such as?
<Drup> sinelaw: monad towers.
<maurer> ggole: Would using bitstring or string be better, assuming I can't get access to 4.02?
<Drup> maurer: you can use ocaml-byte and be easily compatible with -safe-string in the future
<sinelaw> Drup, you mean a pile of monad transformers?
<madroach> maurer: findlib 1.5.2 provides a Bytes module for backwards compatibility.
<Drup> sinelaw: yes
<maurer> madroach: Trusty still ships 1.4
<sinelaw> Drup, they're a bit cumbersome to use, but I don't see them as a "trouble". they composing DSL behavior elegantly
<Denommus> hm, if I have a record, I can't have a variant for it?
<sinelaw> *allow
simulacrum has quit [Remote host closed the connection]
<Denommus> e.g., type 'a foo = { value: 'a; next: 'a foo } | Nil
<ggole> Denommus: no, you have to name and wrap explicitly
<Drup> Denommus: type 'a foo = { value: 'a; next: 'a foo } and 'a cell = Cell of 'a foo | Nil
<ggole> (With the indirection that implies, unfortunately.)
<Drup> one of the 'a foo is an 'a cell, obviously
<ggole> It really would be nice to have named constructor arguments.
<Drup> frisch was working on inlined records inside a Sum type
<Drup> type 'a foo = Cell of { value : 'a ; next 'a foo } | Nil
<ggole> Yeah, I remember that proposal
manizzle has joined #ocaml
simulacrum has joined #ocaml
rgrinberg has joined #ocaml
<madroach> ggole: How do I avoid char / int casts with Bytes?
<ggole> You can't, I was mistaken. Sorry.
<ggole> (I thought that it took/produced int, which is wrong.)
<ggole> Although you could always write your own wrapper...
<madroach> ok. Would have been nice. The need to do those casts really is annoying. But it reminds you, you might be about to truncate an int.
<Drup> thomasga: making your own irmin store seems quite complicated
<thomasga> there are backends
<Drup> I know
<thomasga> (Git, in-memory, etc)
<Drup> but an eliom one would need to be custom, I was looking at the requirements
<thomasga> just need to implement something similar to RO, AO and RW in http://samoht.github.io/irmin/IrminStore.html
<thomasga> (read, mem, add, update)
<thomasga> for abstract keys and values (hence the RO_MAKER, AO_MAKER and RW_MAKER in http://samoht.github.io/irmin/IrminStore.html)
<thomasga> every backend implements http://samoht.github.io/irmin/Irmin.BACKEND.html
simulacrum has quit [Remote host closed the connection]
<Denommus> Drup: that proposal is what I tried to do, in fact. It's intuitive
<thomasga> Travis is dying … only yellow dots in https://github.com/ocaml/opam-repository/pulls
<Drup> thomasga: travis was very slow yesterday too
<Drup> thomasga: I think I will need a bit of explainations about what are block and tags and how the whole things interact
SethTIsue has joined #ocaml
<Drup> I mean, the first functor I saw was http://samoht.github.io/irmin/Irmin.Make.html, and http://samoht.github.io/irmin/IrminBlock.STORE.html as input to write is a bit intimidating :3
<thomasga> block are heap blocks
<thomasga> tags are heap roots
<thomasga> (heap as in the ocaml heap)
simulacrum has joined #ocaml
<thomasga> this functors takes the backend implementations to build higher-level stuff :-)
<thomasga> so you don't have to write anything new there
<thomasga> (hopefully ...)
<Drup> yep, I noticed when I went to see the implementation of the in memory verison
<thomasga> the simplest implementation for a backend is https://github.com/BFarinier/irmin/blob/master/examples/objAO.ml#L7
<thomasga> but don't do that :p
<Drup> <3
<Drup> btw, backends are not in the documentation
<thomasga> ha
<Drup> are examples up to date ?
<Drup> ah, nevermind, missed a line
<thomasga> yes, examples should work fine
<thomasga> anyway, need to go
<Drup> ok, I have a very crude idea of the thing, and that will enough for tonight :p
<thomasga> feel free to ask question on mirage mailing list or on the issue tracker
ollehar has quit [Quit: ollehar]
<Drup> I'm not sure I will work on it right now
<Drup> but it's going to happen at some point :)
<Drup> (lot's of ppxs to do before !)
_andre has quit [Quit: leaving]
larhat has quit [Quit: Leaving.]
morphles has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Quit: Leaving.]
simulacrum has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
sepp2k has quit [Quit: Konversation terminated!]
cesar has joined #ocaml
cesar is now known as Guest62796
avsm has quit [Quit: Leaving.]
Guest62796 has quit [Ping timeout: 244 seconds]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
araujo has joined #ocaml
araujo has joined #ocaml
rand000 has quit [Quit: leaving]
BitPuffin has quit [Ping timeout: 245 seconds]
dblhelix has joined #ocaml
avsm has joined #ocaml
<dblhelix> is there a representative/standard benchmark suite for the OCaml compiler? something like, for example, nofib for Haskell?
lordkryss has quit [Ping timeout: 260 seconds]
lordkryss has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
Kakadu has quit [Remote host closed the connection]
<ggole> Things may have progressed since then though.
SethTIsue has quit [Quit: SethTisue]
<dblhelix> ggole: thanks
<ggole> Did you want to compare OCaml versions or something?
IbnFirnas has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
<dblhelix> that’s one use case, indeed
<dblhelix> another is to add some instrumentation to for example the byte-code compiler and interpreter to keep track of how often some construct is used
axiles has quit [Remote host closed the connection]
<Denommus> what's the idiomatic way of handling a single match case with multiple guards?
dblhelix has quit [Quit: Bye!]
<companion_cube> match foo with | a when b && c -> ... ?
<ggole> Multiple as in match ... with X when foo -> ... | X when bar -> ..., or as in match ... with X when foo && bar && baz?
elfring has quit [Quit: Konversation terminated!]
marchdown has joined #ocaml
avsm has quit [Quit: Leaving.]
olauzon has quit [Quit: olauzon]
<Denommus> ggole: sorry, my connection went down
<Denommus> ggole: the former
<ggole> I would typically rewrite that as an if nested inside the clause
<Drup> It's not really the same
<ggole> Sure: if you need the difference, then leave the guards in
<Denommus> Drup: why?
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
<Denommus> Drup: I personally dislike writing the same case multiple times because of maintainability
<ggole> You might have different bindings: Foo (x, _) when a -> ... | Foo (_, y) -> when b -> ...
Hannibal_Smith has quit [Quit: Sto andando via]
<Drup> what ggole said.
marchdown has quit [Quit: marchdown]
<Drup> you may want to fall back to a case where the bindings are different, and in this case, an embeded if won't do
<Denommus> in my case, the bindings are identical. Everything is identical except the guards
tane has quit [Quit: Verlassend]
<Drup> then why are you using a match to begin with, if you only need boolean tests , :D
<Drup> just do an if then else if else if else
<Denommus> Drup: there's two match cases. The second has multiple guards
<ggole> Seems reasonable to rewrite that as an if inside the clause then.
<Denommus> just did it, it looks nice
<Drup> I would say it's a matter of taste and will depends on the side of the pattern, the number of branches and the thing I hate in my breakfast
<Drup> size*
<Drup> :]
<Drup> ate* too ~~
<Denommus> I often use match by default
igstan has quit [Quit: igstan]
<Denommus> unless it's a really, really simple boolean check
<ggole> I just go by gut feeling and then make up justifications after the fact.
* ggole coughs
<ggole> It's nice to tend to do things the same way though, even if the differences aren't important
<nicoo> Drup: What do you hate in your breakfast ? :>
WraithM has quit [Quit: Lost terminal]
thomasga has quit [Quit: Leaving.]
octachron has quit [Quit: Leaving]
badkins has quit [Remote host closed the connection]
cesar has joined #ocaml
cesar is now known as Guest63457
FatDarrel has quit [Quit: FatDarrel]
marchdown has joined #ocaml
Guest63457 has quit [Ping timeout: 246 seconds]
Unhammer has quit [Remote host closed the connection]
lordkryss has joined #ocaml
hhugo has joined #ocaml
eugene_klm has quit [Ping timeout: 260 seconds]
tac_ has joined #ocaml
ggole has quit []
tac_ has quit [Client Quit]
FatDarrel has joined #ocaml
hhugo has quit [Quit: Leaving.]
meiji11 has joined #ocaml
eikke has joined #ocaml
marchdown has quit [Quit: marchdown]
sinelaw has quit [Quit: Leaving]
Submarine has quit [Quit: Leaving]
badkins has joined #ocaml
FatDarrel has quit [Ping timeout: 272 seconds]
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
ontologiae has quit [Ping timeout: 250 seconds]
typedlambda has quit [Ping timeout: 250 seconds]
typedlambda has joined #ocaml
Simn has quit [Quit: Leaving]
darkf has joined #ocaml