<oriba>
justicefries: not directly, what you asked, but close to it: http://sklml.inria.fr/
<justicefries>
oh, this looks interesting. thanks. :)
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 268 seconds]
mfp has quit [Ping timeout: 260 seconds]
amatheus has joined #ocaml
nomicflux has joined #ocaml
sepp2k has quit [Quit: Leaving.]
amatheus has quit [Remote host closed the connection]
smondet has joined #ocaml
nomicflux has quit [Client Quit]
smondet has quit [Ping timeout: 240 seconds]
wu_ng has joined #ocaml
struk|desk has quit [Remote host closed the connection]
struk|desk has joined #ocaml
nomicflux has joined #ocaml
silver has quit [Quit: rakede]
tizoc has quit [Ping timeout: 244 seconds]
tizoc has joined #ocaml
amatheus has joined #ocaml
rgrinberg has joined #ocaml
amatheus has quit [Remote host closed the connection]
amatheus has joined #ocaml
brunoro has joined #ocaml
etc has joined #ocaml
brunoro has quit [Ping timeout: 250 seconds]
sh0t has joined #ocaml
letaris has quit [Ping timeout: 260 seconds]
<etc>
I'm using oasis to build a mylib.cmo file and then trying to `#load "./_build/lib/mylib.cma"` within utop. The problem arises when I 'open Mylib' and there is no such module. Anyone know what I'm missing?
OCamlMyCaml has joined #ocaml
amatheus has quit [Remote host closed the connection]
<OCamlMyCaml>
hey everyone, would anyone mind answering a question about using functors in the context of first-class modules?
hhx has quit [Read error: Connection reset by peer]
nariyal has joined #ocaml
nariyal has quit [Remote host closed the connection]
darkf has joined #ocaml
etc has quit [Ping timeout: 260 seconds]
brunoro has joined #ocaml
justicefries has left #ocaml [#ocaml]
brunoro has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
nariyal has joined #ocaml
letaris has joined #ocaml
smondet has joined #ocaml
petroav has quit [Ping timeout: 268 seconds]
etc has joined #ocaml
smondet has quit [Remote host closed the connection]
smondet has joined #ocaml
Heasummn has quit [Ping timeout: 260 seconds]
sh0t has quit [Remote host closed the connection]
<etc>
Trying to import a library build with oasis into utop without doing 'sudo make install'. '#load "./_build/lib/Lib.cmo"' doesn't error but also doesn't import the module. Does anyone know how to do this?
ohama has quit [Ping timeout: 268 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
struktured has joined #ocaml
brunoro has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
brunoro has quit [Ping timeout: 260 seconds]
darkf has quit [Read error: Connection reset by peer]
AlexDenisov has joined #ocaml
MercurialAlchemi has joined #ocaml
nariyal has quit [Remote host closed the connection]
pierpa` has quit [Ping timeout: 248 seconds]
copy` has quit [Quit: Connection closed for inactivity]
jao has quit [Ping timeout: 260 seconds]
smondet` has joined #ocaml
FreeBirdLjj has joined #ocaml
smondet has quit [Ping timeout: 244 seconds]
cpdean has quit [Ping timeout: 250 seconds]
ohama has joined #ocaml
etc has quit [Ping timeout: 260 seconds]
nariyal has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
smondet` has quit [Ping timeout: 250 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
letaris has quit [Ping timeout: 248 seconds]
cpdean has joined #ocaml
cpdean has quit [Ping timeout: 260 seconds]
brunoro has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
brunoro has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
minn has joined #ocaml
noethics has joined #ocaml
dfdf has joined #ocaml
nariyal has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
nariyal has joined #ocaml
nariyal has quit [Ping timeout: 260 seconds]
brunoro has joined #ocaml
nomicflux has joined #ocaml
nomicflux has quit [Client Quit]
FreeBirdLjj has quit [Remote host closed the connection]
Algebr has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
darkf has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nariyal has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 244 seconds]
nariyal has quit [Remote host closed the connection]
nariyal has joined #ocaml
Algebr has quit [Ping timeout: 248 seconds]
nariyal has quit [Client Quit]
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Client Quit]
dhil has joined #ocaml
MercurialAlchemi has joined #ocaml
MercurialAlchemi has quit [Quit: Lost terminal]
MercurialAlchemi has joined #ocaml
Simn has joined #ocaml
brunoro has joined #ocaml
noethics has left #ocaml ["Leaving"]
brunoro has quit [Ping timeout: 244 seconds]
chattered has quit [Remote host closed the connection]
AlexDenisov has joined #ocaml
cpdean has joined #ocaml
dhil has quit [Ping timeout: 248 seconds]
kakadu has joined #ocaml
Algebr has joined #ocaml
cpdean has quit [Ping timeout: 268 seconds]
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
<Algebr>
Does anyone have a consistent and correct way of making the compiler on Linux use clang rather than gcc and be able to do it with just an _oasis file?
<reynir>
man ocamlopt says -cc
<reynir>
I don't know how to use it from oasis etc.
<Algebr>
reynir: yes, doing that in the _oasis file in opts
<Algebr>
NativeOpt: -cc clang++ but it still tries to use gcc
<reynir>
Can you confirm whether oasis passes -cc?
<Algebr>
reynir: yes, its passes it: ocamlopt -a -cclib -lbrotli_stubs -cclib -L/usr/local/lib -cclib -lbrotlidec -cclib -lbrotlienc -cclib -lc++ -cc clang++
<def`>
I don't know about oasis, but -verbose is always useful for debugging that kind of issues
<Algebr>
found that in _log in _build
<reynir>
hmm, ok
gwen has joined #ocaml
<Algebr>
but its odd because on linux its still using gcc
alfredo has joined #ocaml
brunoro has joined #ocaml
<Algebr>
hmm, seems to be a bug with ByteOpt
zpe has joined #ocaml
kakadu has quit [Remote host closed the connection]
etc has joined #ocaml
hank has joined #ocaml
<etc>
Does anyone know how to include a ppx rewriter while building an executable in oasis?
mfp has joined #ocaml
larhat has joined #ocaml
Orion3k has joined #ocaml
octachron has joined #ocaml
<minn>
Is there a toplevel that supports parametrized types? Both utop and ocaml complain when I try to constrain a parametric module type.
<minn>
I'm trying to learn about functors and modules, and not having an interactive session is making it a little difficult to rapidly try and test.
etc has quit [Ping timeout: 260 seconds]
<reynir>
Do you have an example of what doesn't work?
<minn>
oh, nevermind. i just needed another quantifier
<minn>
Apparently OCaml didn't like me quantifying over a type with kind * -> *.
<def`>
you cannot
<minn>
yeah, that's unfortunate
larhat has quit [Read error: No route to host]
quesker_ has joined #ocaml
larhat has joined #ocaml
Nahra` has joined #ocaml
<companion_cube>
quite
hnrgrgr_ has joined #ocaml
gustav__1 has joined #ocaml
aggelos__ has joined #ocaml
jimt_ has joined #ocaml
Nazral_ has joined #ocaml
pippijn_ has joined #ocaml
k1000_ has joined #ocaml
__y has joined #ocaml
sheijk_ has joined #ocaml
jstolare1 has joined #ocaml
iZsh_ has joined #ocaml
habnabit has joined #ocaml
riveter_ec2 has joined #ocaml
nathanielc_ has joined #ocaml
AlexRussia has quit [*.net *.split]
shakalaka has quit [*.net *.split]
sheijk has quit [*.net *.split]
aggelos_ has quit [*.net *.split]
_y has quit [*.net *.split]
gustav___ has quit [*.net *.split]
jstolarek has quit [*.net *.split]
pippijn has quit [*.net *.split]
_habnabit has quit [*.net *.split]
hnrgrgr has quit [*.net *.split]
nathanielc has quit [*.net *.split]
iZsh has quit [*.net *.split]
Nazral has quit [*.net *.split]
jimt has quit [*.net *.split]
dmiller has quit [*.net *.split]
quesker has quit [*.net *.split]
troydm has quit [*.net *.split]
MasseR has quit [*.net *.split]
k1000 has quit [*.net *.split]
Nahra has quit [*.net *.split]
riveter has quit [*.net *.split]
riveter_ec2 is now known as riveter
<minn>
Basically, I have a module that defines a parametric type. I'm not sure how to pass the module to functions without causing scope errors. For example, I want to write something like:
rfv has quit [Ping timeout: 240 seconds]
<minn>
let liftM (type m) (module M : Monad with type 'a m = 'a m) f u = M.bind u (fun a -> M.unit (f a))
<minn>
But of course, that will fail. I'm not entirely confident the syntax is correct, either.
shakalaka has joined #ocaml
rfv has joined #ocaml
Nazral_ is now known as Nazral
MasseR has joined #ocaml
troydm has joined #ocaml
dmiller has joined #ocaml
AlexRussia has joined #ocaml
red_caml has joined #ocaml
<companion_cube>
we would of course like to do that, but right now it's impossible
<companion_cube>
(type m) will not work
<minn>
So there's no real way to accomplish that, beyond lifting all those definitions into the module signatures?
larhat has quit [Read error: Connection reset by peer]
larhat1 has joined #ocaml
<companion_cube>
if you want to manipulate generic monads like that, you need functors
<companion_cube>
because indeed, only at the level of modules can you talk about parametrized types
<minn>
I see. That will take some getting used to. I suppose here, you would have to define a functor that maps the module to an extension.
Orion3k has quit [Remote host closed the connection]
wu_ng has quit [Read error: Connection reset by peer]
wu_ng has joined #ocaml
<companion_cube>
module Foo(M:MONAD): sig val liftM : .... end, yeah
<companion_cube>
it's like GADTs (before 4.00): encodable, but too ugly
cpdean has joined #ocaml
<minn>
I suppose defining a bunch of modules and functors is a little aesthetically unpleasing (I can never figure out names for all the resulting modules), but workable. Thanks for all the responses.
<companion_cube>
you can also define/apply modules locally
hank has quit [Ping timeout: 250 seconds]
<companion_cube>
in a function, say: `let module F = Foo(Lwt) in …`
<companion_cube>
so no need to find nice global names
cpdean has quit [Ping timeout: 260 seconds]
<minn>
So you just define the base modules and functors, then name the derived modules locally. That's cool.
archer121 has joined #ocaml
<archer121>
hi, how do I check if two functions are equal in ocaml?
<companion_cube>
there is no way of doing that
<companion_cube>
(anyway, it doesn't really make sense)
yomimono has joined #ocaml
<archer121>
I have two records. One of the fields is a function. Before manipulating on two records, I want to ensure that they have the same function in that particular field.
<companion_cube>
are `fun ()->2` and `fun ()->1+1` the same function?
<archer121>
nope
<archer121>
ow, wait.
<archer121>
So what do I do?
<companion_cube>
I don't know why you need to check if the functions are the same :)
<def`>
companion_cube: it doesn't really make sense...
<def`>
==
<companion_cube>
sure, but it still is extremely dangerous
<companion_cube>
== is really tricky
<def`>
I agree, and the compiler might specialize
<def`>
but the "it doesn't make sense to compare function" position of OCaml is just wrong
<companion_cube>
and you might get the function from partial application
<companion_cube>
well, ok, it kind of makes sense in a very dangerous way
<archer121>
thanks folks, I got around checking if the functions are same. I introduced another field which would be checked to see if the functions are same.
<def`>
yes, that's the right way to ensure that
<def`>
(objects in OCaml pack functions, data, and a "counter" for physical equality)
hootch` has joined #ocaml
Guest26 has joined #ocaml
<Algebr>
def`: why is it wrong
_whitelogger has joined #ocaml
<def`>
Algebr: extensional equality is not decidable, but what we call functions are actual objects in memory, and comparing memory content (intensional equality) should at least be allowed
<def`>
(at least when polymorphic comparison is part of the language)
<companion_cube>
but compare and (=) fail on functions, don't they?
<def`>
they do
<companion_cube>
I'd hope polymorphic compare will become slowly deprecated once (if) implicits arrive
<companion_cube>
but well
<def`>
yes I hope that too :)
<rightfold>
Me too
<flux>
slowly? no, rapidly!
<flux>
but sadly there's a big if.
<def`>
s/if/when :)
<flux>
a big "whne", ok ;)
sz0 has joined #ocaml
dhil has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
brunoro has quit [Ping timeout: 268 seconds]
hootch` has quit [Ping timeout: 260 seconds]
sh0t has joined #ocaml
<Algebr>
but == does work on functions
<Algebr>
right
brunoro has joined #ocaml
<def`>
right
brunoro has quit [Ping timeout: 248 seconds]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zpe has quit [Remote host closed the connection]
<flux>
== is fine even if a bit risky
<flux>
ocaml should get on with the times and rename == to ===
<flux>
actually IMO it wouldn't be not that bad a change, don't hurt me :)
eagleflo_ is now known as eagleflo
wu_ng has quit [Ping timeout: 268 seconds]
hootch` has joined #ocaml
<octachron>
flux, I think I would prefer ≡ to === and other =…= variants
<companion_cube>
I'd prefer like JST does: phys_equality or whatever
Sorella has joined #ocaml
smondet has joined #ocaml
brunoro has joined #ocaml
cpdean has joined #ocaml
<archer121>
fellas, how do I get the first character if a string and the rest of the string
<archer121>
?
cpdean has quit [Ping timeout: 260 seconds]
<archer121>
Pattern matching?
<flux>
sadly, no
<archer121>
so how do I do it?
<flux>
there are two alternatives: you can use String.get and String.sub
<flux>
or you can use a function not found in standard library to first convert the string into a list and then pattern matchh that
<companion_cube>
don't
<companion_cube>
it's inefficient
FreeBirdLjj has joined #ocaml
<flux>
but elegant!
<companion_cube>
this is not haskell :p
<flux>
such a function might be called explode or chars_of_string or list_of_string perhaps
<flux>
let's say you are parsing command line arguments.. effiience affects exactly nothing there.
<lyxia>
view patterns!
<flux>
and it's still linear time -efficient
<companion_cube>
flux: it's a very niche use case, and there's Arg/Cmdliner anyway
<flux>
could be an argument you get with cmdliner needs some sturctured parsing
<companion_cube>
sure
<companion_cube>
sometimes it's useful, but it's pretty rare
<companion_cube>
it should not be the default advice, nor the default behavior
<def`>
isn't there some ppx for string parsing, like mikmatch for camlp4?
zpe has joined #ocaml
<companion_cube>
I'm not sure it's there yet
<companion_cube>
(well, except sedlex)
<flux>
mikmatch was pretty cool.
dhil has quit [Ping timeout: 260 seconds]
petroav has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
shinnya has joined #ocaml
mpenet has joined #ocaml
ggole has joined #ocaml
smondet has quit [Read error: Connection reset by peer]
AlexDenisov has joined #ocaml
FreeBirdLjj has joined #ocaml
dhil has joined #ocaml
ygrek has joined #ocaml
silver has joined #ocaml
silver has quit [Remote host closed the connection]
silver has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_andre has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
AlexDenisov has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
sepp2k has joined #ocaml
ygrek has joined #ocaml
petroav has quit [Ping timeout: 268 seconds]
ocabot has joined #ocaml
<companion_cube>
!hello
<ocabot>
hello companion_cube
<Algebr>
!hello
<ocabot>
hello Algebr
<companion_cube>
ok, this useless feature is brought to you by adrien
<companion_cube>
who asked for a simple plugin :p
<companion_cube>
IRC bots are fun
sh0t has quit [Remote host closed the connection]
<flux>
of all channels I would have expected the bot to respond with IRC notices, as per the IRC RFC ;-).
<companion_cube>
bah.
freusque has joined #ocaml
<companion_cube>
too lazy for that :D
<companion_cube>
(tbh it could be done? I'm just not used to notices)
<flux>
yes, it's very hard to use NOTICE instead of PRIVMSG :)
<flux>
and the rationale behind that is that when bots respond to privmsgs and output notices, there can never be a loop
<companion_cube>
oh, interesting
<flux>
we should like that rationale! it's like an invariant!
okuu has quit [Ping timeout: 248 seconds]
rgrinberg has joined #ocaml
ocabot2 has joined #ocaml
<companion_cube>
!hello
<ocabot>
hello companion_cube
<ocabot2>
hello companion_cube
ocabot2 has quit [Remote host closed the connection]
ocabot has quit [Remote host closed the connection]
freusque has quit [Read error: Connection reset by peer]
<companion_cube>
it doesn't highlight me, must be your client
<companion_cube>
flux: on #rust@mozilla I think the bots reply with notice
<companion_cube>
I never really paid attention before, but now I know why, thanks!
cpdean has joined #ocaml
<lyxia>
it looks so authoritative
<lyxia>
Like, this channel knows what it's doing.
<companion_cube>
flux: since you look knowledgeable, is there a standard/easy way of detecting that the bot is disconnected from a channel (e.g. after a netsplit)?
<companion_cube>
I'd rather have it die than stay connected to the server but not on the right chan
<brunoro>
!hello
<ocabot>
hello brunoro
cpdean has quit [Ping timeout: 260 seconds]
<companion_cube>
new favorite command…
<brunoro>
:D
<brunoro>
always good to make new friends
<companion_cube>
note that it also works in query, if you're feeling like saying "hello" a lot
<flux>
companion_cube, you mean detecting if the server you're connected to is connected to some greater part of ircnet?
ygrek has quit [Ping timeout: 240 seconds]
<flux>
companion_cube, I guess you could subscribe to the network modification messages and then determine if you belong to the >50% part of it :-)
<flux>
I don't remember off-hand how that happens but I think it's a MODE
<companion_cube>
not really, I just want to know when, somehow, the bot is connected to the server but is not on its target channel anymore
<companion_cube>
(if you're interested in contributing to ocabot, btw, it's on github ;))
<flux>
if you don't/can't/don't wanna rely on tracking kick/part-messages, you could do periodic whois on yourself..
<flux>
I don't see a reason other than a kick that makes the bot leave a channel
<flux>
(unless it parts itself)
archer121 has quit [Ping timeout: 260 seconds]
<companion_cube>
I don't know, sometimes it gets stuck after netsplits, it seems
<flux>
maybe it doesn't so server reconnects neatly
<companion_cube>
I suppose a periodic whois would do it
<flux>
or handle failed channel join properly
<companion_cube>
heh, also
dhil has quit [Ping timeout: 268 seconds]
<flux>
another trick you can use is to have a dcc chat to your bot open
<flux>
that won't be affected by server activity
<flux>
once you get it open that is
<companion_cube>
:D
<companion_cube>
sounds overkill
<flux>
it's very common with bots
<flux>
you can ie. instruct it to connect another irc server in such scenarios
<flux>
though I guess you have also access to the shell..
<flux>
but this kind of access would be more safe to share to other people
<flux>
and easier than making a web page for it ;)
<companion_cube>
a web page? what for? :D
<flux>
for bot management!
<companion_cube>
sounds like really overkill
<MasseR>
Well irc bots are like hello world of networking and protocols
<MasseR>
So why not add something more to it at the same time :)
<MasseR>
I just added a script to weechat that sends all irc messages to rabbitmq queue and a haskell listener that listens to the queue and adds them to postgresql
<MasseR>
If that's not overdoing it, I don't know what is
<companion_cube>
have you clustered the postgresql server?
<flux>
I have!
<MasseR>
No(t yet)
<flux>
too bad the instances run on the same machine :)
<flux>
and if it ever did trip over, I would need to look up at how to restore regular operation.. I also have redundant dhcp and dns.
<flux>
those have been very useful when I need to ie. reinstall the machine doing one of those things
Guest26 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
kakadu has joined #ocaml
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
kakadu has quit [Client Quit]
<companion_cube>
the biggest issue with ocabot right now is the lack of support for TLS, btw
<companion_cube>
because there's a weird issue in integrating ocaml-ssl into ocaml-irc-client :(
<Algebr>
ssl package is always in some state of being busted =/
dfdf has quit [Quit: Page closed]
minn has quit [Quit: Leaving]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<companion_cube>
did you have bad experiences with it? :?
<companion_cube>
:/
dhil has joined #ocaml
nomicflux has joined #ocaml
AlexDenisov has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 248 seconds]
letaris has joined #ocaml
<flux>
pgocaml doesn't work with ssl either :/
natimic has quit [Ping timeout: 268 seconds]
agarwal1975 has joined #ocaml
smondet has joined #ocaml
nomicflux has quit [Quit: nomicflux]
letaris has quit [Ping timeout: 260 seconds]
cpdean has joined #ocaml
sh0t has joined #ocaml
nzyuzin_ has quit [Remote host closed the connection]
<Enjolras>
companion_cube: you can try ocaml-tls. It has a very simple interface
<Enjolras>
with lwt
<Enjolras>
it does not support EC but for irc it should be fine
<flux>
though apparently the ocaml-tls guys themselves think it shouldn't be used until it's been security-reviewed. I suppose it doesn't matter for irc, though.
<Enjolras>
> ssl package is always in some state of being busted
natimic has joined #ocaml
natimic has quit [Client Quit]
<Enjolras>
writing openssl bindings is a nightmare
natimic has joined #ocaml
<Enjolras>
flux: it is an irc bot... Should be fine
natimic has quit [Client Quit]
<Enjolras>
i'm not even sure freenode has tls in server to server connections
eikke has quit [*.net *.split]
so has quit [*.net *.split]
<flux>
but let's say we use the same library for a company chat!
so has joined #ocaml
so has quit [*.net *.split]
<hannes>
flux: (full disclosure: I'm one of the OCaml-TLS authors) I do actually use OCaml-TLS for both client and server side on a daily basis (and ship client side to 100s of people, server side to 10s of people)
<Enjolras>
hannes: what are you using it for out of curiosity ?
<hannes>
so far I did not encounter any security issue (and thus am not afraid of using it), but yes, more people digging into the code and reviewing it would be sensible
<Enjolras>
i tried to use for http, but 1/3 of connections are failing for lack of EC support in certificate chain validation
<hannes>
Enjolras: I've an XMPP client written in it which is used by various people
<Enjolras>
nice.
<hannes>
Enjolras: lacking EC support - I only see this sporadically (but I'm not really using it for HTTP)
<hannes>
server side I provide several websites using OCaml-TLS, amoung them are realworldocaml.org, nqsb.io, mirage.io, hannes.nqsb.io, ...
natimic has joined #ocaml
natimic has quit [Client Quit]
<companion_cube>
the piñata was not broken, was it?
<Enjolras>
i tried to use it in a crawler so it is not "you regular web experience" but commodo which is one big CA has only has EC root cert
<companion_cube>
it's a small target compared to openssl
<hannes>
I found a flaw in mirage-net-xen, and could've gotten the money...
<Enjolras>
if you actually look at the mozilla CA bundle, 5 of them use EC iirc
letaris has joined #ocaml
<hannes>
Enjolras: david is in charge for EC support. I'm waiting for it since a year...
<Enjolras>
though to be honnest another third of connections are failing because certificate is not valid %)
<flux>
I guess the problem is that if you rely on a client that doesn't do EC, and then someone decides to renew a new server cert with a key that only does EC, you're screwed?
<Enjolras>
hannes: will add to this list thanks
<Enjolras>
actuall it is not the same issue. I've no check about domains which only support ECDHE, but for domains where certificate is signed with ecdsa
<Enjolras>
it is more an ocaml-x509 issue
<hannes>
it fits very well in the issue as a separate comment
<hannes>
once we have ECC in nocrypto, the next day there'll be ECC in X.509 :)
<Enjolras>
will comment tomorrow when i have a look at the data again thanks
letaris has quit [Ping timeout: 259 seconds]
<hannes>
Enjolras: thank you
<Enjolras>
btw beside this it works very well
<Enjolras>
besides EC, i have same success rate as openssl on a very large scale test
<Enjolras>
several hundred thousands connections per second for 1 day testing
<hannes>
\o/
<jmasseo>
~gainers
<jmasseo>
sorry mischan
natimic has joined #ocaml
pierpa has joined #ocaml
Denommus has joined #ocaml
Muzer has quit [Read error: Connection reset by peer]
conrad1 has joined #ocaml
Muzer has joined #ocaml
mpenet has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
<libertas>
I've looking for a syntax error in this functions for an hour, but just can't find it. Can you please take a look: http://pastebin.com/jP8Z9w8U
<libertas>
it tells me the syntax is at the end ';;'
sh0t has joined #ocaml
<companion_cube>
in search, you define aux and never use it
<companion_cube>
something is missing line 8
<ggole>
in in isn't valid
<flux>
sounds like an enhanchement would be to detect 'in in', that's not ever a valid sequence
dhil has quit [Ping timeout: 260 seconds]
<libertas>
companion_cube: I'll look there, thank you
<libertas>
ggole: but if we have two nested let, shouldn't we use in at the end of each?
<flux>
my ocaml toplevel does mark the 'in in', though
<flux>
the syntax is: let x = y in z
<companion_cube>
libertas: you cannot nest `let` this way
<companion_cube>
let x = let y = foo in bar in … is fine
<flux>
the z must always exists there without exception
<companion_cube>
but you need some `bar`
<flux>
btw, my ocamlc also says the error is in line 9
<flux>
might campl4 be involved?
<libertas>
Thanks, I have some leads now!
<flux>
hmm, nope
<ggole>
libertas: you are correct that you should use in at the end of each, but you need an expression in the 'body' of each let
<libertas>
fine
MercurialAlchemi has joined #ocaml
<libertas>
I got it. I was missing a call like 'aux 0' in between the two 'in' and also had another error at the end: db.contRacts instead of db.contacts.
<libertas>
Thank you all.
jao has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
hellofunk has joined #ocaml
jstolare1 is now known as jstolarek
<hellofunk>
hello, i'm a total noob and just installed ocaml. when i run oasis, there is no command found. where does opam install the binaries to?
<companion_cube>
to somethng like ~/.opam/<switch>/bin/
<companion_cube>
where <switch> is the compiler version
<companion_cube>
`opam switch` to show it
<hellofunk>
so i should add that deeper bin dir to my path?
dhil has joined #ocaml
<companion_cube>
I think eval `opam config env` adds it to your path
yomimono has quit [Quit: Leaving]
<hellofunk>
right you are
<hellofunk>
that was not in the dummy tutorial at ocaml.org ;)
<companion_cube>
really? :/
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<companion_cube>
you are writing a library "pg"? check that a module with the name Pg.ml is in the proper path
<hellofunk>
i'm not writing anything yet, just following the getting started example, which shows Pg there. I should just delete that line?
<hellofunk>
it is suggesting to go through the steps first thing after creating a new empty src/ dir
hootch` has joined #ocaml
<hellofunk>
i guess i should find a better getting started tutorial. even the ocaml books don't show you how to actually get the system going on your machine
<companion_cube>
I'm surprised, I think "real world ocaml" does this in the first chapter
<companion_cube>
ah, it talks about eval `opam config env` ^^
hootch` has quit [Ping timeout: 248 seconds]
larhat1 has quit [Quit: Leaving.]
dakk has quit [Ping timeout: 260 seconds]
zpe has quit [Remote host closed the connection]
Algebr has quit [Ping timeout: 260 seconds]
AlexDenisov has joined #ocaml
hellofunk has quit [Ping timeout: 268 seconds]
annoymouse has joined #ocaml
<annoymouse>
What are modular implicits in OCaml?
brunoro has joined #ocaml
conrad1 has joined #ocaml
amatheus has joined #ocaml
conrad1 has quit [Ping timeout: 260 seconds]
annoymouse has quit [Changing host]
annoymouse has joined #ocaml
amatheus has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
<flux>
annoymouse, it's a way to bring structured function overloading to ocaml. the first application is going to be polymorphic print.
hootch` has joined #ocaml
smondet has quit [Ping timeout: 240 seconds]
<lyxia>
A couple generations later we'll have polymorphic + like it should be.
hootch` has quit [Ping timeout: 250 seconds]
<annoymouse>
flux: can a user overload the equals operator using modular implicits to use their own definition of equally for a user defined type?
<annoymouse>
And since when has it been a part of OCaml?
<lyxia>
It isn't yet.
Algebr has joined #ocaml
praisethemoon has joined #ocaml
<annoymouse>
So it's still a proposal
<annoymouse>
What's the likelihood of it being merged
mrvn_ has quit [Ping timeout: 248 seconds]
mrvn has joined #ocaml
<companion_cube>
no idea
freusque has joined #ocaml
struktured has quit [Ping timeout: 260 seconds]
Orion3k has joined #ocaml
dakk has joined #ocaml
freusque has quit [Quit: WeeChat 1.4]
djellemah has joined #ocaml
bronsen has joined #ocaml
Pepe_ has quit [Ping timeout: 250 seconds]
Pepe_ has joined #ocaml
nomicflux has joined #ocaml
hellofunk has joined #ocaml
<hellofunk>
after installing basic ocaml, is it possible to just open the repl and play around, or do i need to figure out the project management stuff first, i.e. oasis or makefiles, etc
dhil has quit [Ping timeout: 250 seconds]
<pierpa>
you can just open the repl and play around
<hellofunk>
how do i do that?
<Drup>
"utop"
<Drup>
("opam install utop" before)
<pierpa>
"after installing base ocaml"
<hellofunk>
since utop is not the bare bones ocaml I assume I'd instead use toplevel directly, but i can't find the command for that
<pierpa>
IIRC, it's 'ocaml'
<hellofunk>
ah geez, i was trying "toplevel" and a bunch of other things
<pierpa>
:)
<hellofunk>
i'm still struggling to find a proper basic oasis file that i can dump into a new project folder to get going. the one on the ocaml site has syntax errors (and zero indentation)
<hellofunk>
maybe i'm not smart enough for this programming language, but i do wish there was a simple tutorial that assume you have no idea what is going on and tells you what to change in the sample oasis tempalte to actually get it to work
<hellofunk>
that tutorial looks better, i guess there are many different tutorials, even on the ocaml site itself, and some are not so good
<hellofunk>
i will go through it
<hellofunk>
those sample oasis files on the other sites/pages should be removed or fixed
<companion_cube>
(cc Algebr ^ :p)
<Algebr>
yes, probably an indentation error, need to fix
<companion_cube>
I submitted a change to ocaml.org
<companion_cube>
but not your website :p
<companion_cube>
or.. did I -_-
<Drup>
I'm still not convinced by that tutorial, the oasis one is already quite straight to the point and explains things better
<Drup>
and the elisp code ... should not be there, just tell people to use opam user-setup
<companion_cube>
gah, I'll finish it tomorrow -_-
<hellofunk>
why is it recommended to use utop rather than toplevel
<Algebr>
Drup: feel free to submit a PR
<companion_cube>
utop is much better because it has completion and readline, hellofunk
<companion_cube>
(also, colors)
<Drup>
Algebr: a PR that removes it completely ? :D
<Algebr>
plus utop understand #require out the box, unlike regular ocaml
<hellofunk>
is oasis the typical way everyone manages projects, or are people often writing their own makefiles
<Algebr>
hellofunk: its a mess
<companion_cube>
there are several ways, but oasis is not too bad
<Drup>
hellofunk: don't write your own makefiles, ever
<hellofunk>
is it correct to think of oasis a bit like cmake?
<hellofunk>
it seems similar in purpose
<companion_cube>
I'm not too familiar with cmake, but cmake does also generate some makefile, doesn't it? and manage the configuration?
<Algebr>
yea, sort of like cmake I'd say
<Algebr>
which I use sometimes the community went with instead...
orbifx has joined #ocaml
<hellofunk>
i assume this line is not needed in the oasis file since that new page you linked doesn't show it, while the other do: OCamlVersion: >= 4.02.3
<hellofunk>
<Drup>
it depends, do you want to constraint the ocaml version ?
<Drup>
if you don't, then don't :D
ollehar has joined #ocaml
<hellofunk>
also, the line BuildTools:ocamlbuild is indented under the executable, but not and indented "child" in another
<Drup>
it can be used generically
ollehar has quit [Client Quit]
<Drup>
(it will then apply in all sections)
<hellofunk>
i just got my first oasis file to compile, yippee!! gonna go out and celebrate!!
natimic2 has joined #ocaml
<companion_cube>
\o/
<hellofunk>
that's a superior page, those others should be banished from the universe
zpe has joined #ocaml
<hellofunk>
whenever i try to understand the purpose of the double semicolon, all i get are terse phrases that say "it's just a peculiarity of toplevel", etc. what exactly does it mean?
natimic has quit [Ping timeout: 250 seconds]
octachron has joined #ocaml
<companion_cube>
;; tells the toplevel "start parsing now"
veggie_ has quit [Ping timeout: 248 seconds]
dhil has joined #ocaml
conrad1 has joined #ocaml
conrad1 has quit [Ping timeout: 268 seconds]
btbytes has joined #ocaml
ggole has quit []
hootch` has joined #ocaml
kakadu has joined #ocaml
veggie_ has joined #ocaml
smondet has joined #ocaml
hootch` has quit [Ping timeout: 260 seconds]
zpe has quit [Remote host closed the connection]
jaybanks has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
orbifx has quit [Ping timeout: 240 seconds]
jaybanks has quit [Remote host closed the connection]
sh0t has quit [Quit: Leaving]
jaybanks has joined #ocaml
jaybanks has quit [Remote host closed the connection]
jaybanks has joined #ocaml
test has joined #ocaml
test is now known as Guest18905
Guest18905 has quit [Client Quit]
jaybanks has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
jaybanks has joined #ocaml
jaybanks has quit [Client Quit]
ryanartecona has joined #ocaml
btbytes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
btbytes has joined #ocaml
ollehar has joined #ocaml
rgrinberg has quit [Ping timeout: 240 seconds]
Heasummn has quit [Read error: Connection reset by peer]
Heasummn has joined #ocaml
orbifx has joined #ocaml
veggie_ has quit [Ping timeout: 240 seconds]
jaybanks has joined #ocaml
jaybanks has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 260 seconds]
veggie_ has joined #ocaml
orbifx has quit [Ping timeout: 268 seconds]
letaris has joined #ocaml
ee_ks has joined #ocaml
jaybanks has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 260 seconds]
jaybanks has quit [Client Quit]
hootch` has joined #ocaml
hellofunk has quit [Remote host closed the connection]
copy` has joined #ocaml
oriba has joined #ocaml
letaris has quit [Remote host closed the connection]
hootch` has quit [Ping timeout: 268 seconds]
Algebr has quit [Remote host closed the connection]
hellofunk has joined #ocaml
jaybanks has joined #ocaml
jaybanks has quit [Remote host closed the connection]
jaybanks has joined #ocaml
zpe has joined #ocaml
jaybanks has quit [Remote host closed the connection]
jaybanks has joined #ocaml
djellemah has quit [Ping timeout: 248 seconds]
_andre has quit [Quit: leaving]
nomicflux has quit [Ping timeout: 250 seconds]
btbytes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conrad1 has joined #ocaml
conrad1 has quit [Ping timeout: 248 seconds]
jaybanks has quit [Quit: ERC (IRC client for Emacs 24.4.91.1)]
octachron has quit [Quit: Leaving]
hank has joined #ocaml
kakadu has quit [Remote host closed the connection]
<hellofunk>
i have installe utop and am following some instructions about its use, and they suggest editing the .ocamlinit file which it says opam has previously created for me. however, that file does not exist in the root of my home dir. should it be there?
ygrek has joined #ocaml
<companion_cube>
no idea, but you can create it, no problem
hootch` has joined #ocaml
hootch` has quit [Ping timeout: 260 seconds]
Denommus has quit [Quit: going home]
brunoro has quit [Ping timeout: 268 seconds]
annoymouse has quit [Quit: Connection closed for inactivity]
<justin_smith>
hello hellofunk, fancy seeing you here
<hellofunk>
justin_smith: yup, quite interested
<companion_cube>
is this the sound of a party starting?
<hellofunk>
i'm reading this: As a side-effect of type inference in OCaml, functions (including operators) can't have overloaded definitions ... however, isn't the operator < overloaded for both ints and float?
ocamlsrazor has joined #ocaml
<companion_cube>
it's not overloaded but one of the "magic" polymorphic operators
<hellofunk>
justin_smith: you using ocaml these days now?
<companion_cube>
(<): 'a -> 'a -> bool
<companion_cube>
but it's really magic built into the language
<ocamlsrazor>
hey all, would someone mind answering a question I have about functors w.r.t. first-class modules?
<hellofunk>
ocamlsrazor: nice nick
<ocamlsrazor>
LOL thanks
<ocamlsrazor>
essentially, I have some signature `module type M = sig type t = ... end` and I have a functor `module F (M1 : M) = struct type t = ...(involving M1.t)... end`. Would I be able to write a function of some hypothetical type `let f : (module M) -> int -> F(M).t = ...`?
ryanartecona has quit [Quit: ryanartecona]
<ocamlsrazor>
i.e. a function whose return type is generated by a functor
<ocamlsrazor>
, parameterized by an argument as a first-class module
btbytes has joined #ocaml
<companion_cube>
in some cases it should be possible
<companion_cube>
let f (type a) (module M:M with type t=a) (i:int): (module F_RES with type t=a) = …
<companion_cube>
assumine F(M): F_RES with type t=M.t or something like that
praisethemoon has quit [Read error: Connection reset by peer]
<Bluddy[m]>
the question is, do you really want to go there?
<companion_cube>
heh
<ocamlsrazor>
that's true, I suppose an equivalent solution would be to write a functor that includes the original and implements the functor I want
<companion_cube>
it's probably saner to write it as a functor indeed
<companion_cube>
you can instantiate the functor locally if needed
<apache2>
is there a way for a module signature to utilize the definiton from the .mli ?
<apache2>
(so I don't have to write the type declarations twice)
<companion_cube>
no
<ocamlsrazor>
but for completeness, F_RES would have a signature equivalent to the original functor but with the parameterized types
<companion_cube>
but a quite common trick is to write foo_intf.ml with the module signatures in it
<companion_cube>
and have `module type S = Foo_intf.S` in foo.ml and foo.mli
<hellofunk>
i'm rather curious about the error message i get when i write max -3 -4;;
<ocamlsrazor>
@companion_cube you can use ppx_import to import types from interface files
<hellofunk>
what does 'a have to do with positive/negative/
<companion_cube>
ocamlsrazor: I try to avoid magic :p
<companion_cube>
hellofunk: max: 'a -> 'a -> 'a
<ocamlsrazor>
fair enough lol
<companion_cube>
also, it's parsed as `(max-3)-4` in this case
<companion_cube>
you can write `max (-3) (-4)`
<hellofunk>
ah, parsing problem, my bad
<companion_cube>
or `max ~-3 ~-4` (unary minus)
cpdean has quit [Ping timeout: 268 seconds]
smondet has quit [Ping timeout: 260 seconds]
<hellofunk>
utop feels like i'm playing a circa '93 dos game. not a bad thing
<companion_cube>
yeah, but it's featuring OCaml, much modern