<rgrinberg>
about the whole applicative business, to be honest i'm not 100% sure if the api is applicative at all. where's <*> and return? Regardless I don't think that spoils anything.
shinnya has joined #ocaml
<Drup>
rgrinberg: it's not applicative, no
<Drup>
I could add return, but it's ... silly, honestly
<Drup>
I looked at how regex-applicative does it, and it looks so artificial. "return v" is the regex that matches the empty text and returns v.
<Drup>
(and I won't have neither app nor fmap anyway)
<rgrinberg>
That does let you write cool things like return (+) <$> (int <* str "x") <*> int
<Drup>
yeah but as I said, no fmap/app for tyre
<Drup>
you get conv instead :p
annoymouse has quit [Quit: Connection closed for inactivity]
<rgrinberg>
Drup: did you consider making name on conv optional?
shinnya has quit [Ping timeout: 260 seconds]
wu_ng has joined #ocaml
wu_ng has quit [Read error: Connection reset by peer]
wu_ng has joined #ocaml
<Drup>
rgrinberg: I would rather consider having another conv function for things that do not fail (and then, no need for a name)
bruce_r has joined #ocaml
<rgrinberg>
I see. Although i'm at a loss for a name that isn't conv'
al-damiri has quit [Quit: Connection closed for inactivity]
nichola__ has joined #ocaml
nicholasf has quit [Disconnected by services]
nichola__ is now known as nicholasf
<Drup>
yeah, me too ...
<rgrinberg>
Drup: going back to the ip example, every number should really be 0-255. Should that validation be done in or outside of tyre?
mengu has quit []
<Drup>
rgrinberg: that's kind of why converters can fail ;)
mcc has quit [Quit: Connection closed for inactivity]
d0nn1e has quit [Ping timeout: 240 seconds]
d0nn1e has joined #ocaml
pierpa has quit [Ping timeout: 244 seconds]
agarwal1975 has quit [Quit: agarwal1975]
adelbertc has quit [Quit: Connection closed for inactivity]
rbocquet has quit [Ping timeout: 250 seconds]
rbocquet has joined #ocaml
mcc has joined #ocaml
tmtwd has joined #ocaml
rand__ has joined #ocaml
Guest80340 has quit [Ping timeout: 250 seconds]
Guest80340 has joined #ocaml
Heasummn has quit [Ping timeout: 240 seconds]
Guest80340 is now known as fluter
Algebr` has joined #ocaml
nicholasf has quit [Remote host closed the connection]
myst|fon has quit [Quit: Connection closed for inactivity]
nicholasf has joined #ocaml
rgrinberg has quit [Ping timeout: 276 seconds]
oldmanistan_ is now known as glesica
rgrinberg has joined #ocaml
<Algebr`>
probably won't happen, but any http proxy servers available in ocaml?
tmtwd has quit [Ping timeout: 265 seconds]
<Algebr`>
I don't want to write one
<Algebr`>
hannes: what about tlstunnel, can I build a https proxy server on top of it? Maybe I didn't quite understand it
<Algebr`>
would prefer an ocaml solution rather than the python one I will have to use instead
<Algebr`>
okay, it looks like a proxy server isn't that hard to implement...I am spending too much time in ocaml mindset.
Ravana has quit [Ping timeout: 265 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
MercurialAlchemi has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
adelbertc has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
Sorella has quit [Quit: Connection closed for inactivity]
rgrinberg has quit [Ping timeout: 244 seconds]
nichola__ has joined #ocaml
nicholasf has quit [Ping timeout: 250 seconds]
nicholasf has joined #ocaml
manizzle has joined #ocaml
nichola__ has quit [Ping timeout: 255 seconds]
Mercuria1Alchemi has joined #ocaml
Ravana has joined #ocaml
clog has quit [Ping timeout: 240 seconds]
Reshi has joined #ocaml
Guest85327 is now known as adrien
Madars_ is now known as Madars
freusque has joined #ocaml
mcc has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has quit [Remote host closed the connection]
Simn has joined #ocaml
govg has joined #ocaml
pyx has joined #ocaml
pyx has quit [Client Quit]
FreeBirdLjj has joined #ocaml
Reshi has quit [Ping timeout: 265 seconds]
Ankhers has quit [Ping timeout: 265 seconds]
teiresia` has joined #ocaml
bruce_r has quit [Ping timeout: 255 seconds]
teiresias has quit [Ping timeout: 265 seconds]
Mercuria1Alchemi has quit [Ping timeout: 244 seconds]
Ankhers has joined #ocaml
Mercuria1Alchemi has joined #ocaml
trevorriles has quit [Ping timeout: 250 seconds]
trevorriles has joined #ocaml
trix has quit [Ping timeout: 265 seconds]
jave_ has quit [Read error: Connection timed out]
jave has joined #ocaml
ryanartecona has joined #ocaml
<flux>
I wonder how difficult it is to implement a decent javascript interpreter in ocaml. seems like it shouldn't be too difficult. it would augment nicely the current javascript-stuff available for ocaml, sort of like close the circle ;)
<reynir>
heh
<adrien>
if only it had decent performance and no security issue
<flux>
well, great performance is probably difficult to achieve without JIT
<flux>
I actually have a very small non-performance-intensive application in mind: PAC-interpreting http-proxy
<flux>
I would hate to admit it, but it would probably be the easiest to write in node ;-)
<flux>
(pac = server gives you a javascript file that decides for you which proxy server (if any) to contact to get a connection to given protocol:host:port)
<adrien>
flux: TCO!
<adrien>
microsoft would definitely say you need to take everything into account, not only the upfront cost ;p
<flux>
I'm pretty sure though the difference between implementing that with node and then fixing it a few times a year ;-) is still more cost-effective than writing the sufficient javascript interpreter for ocaml.. but the latter could be more interesting ;-)
<flux>
such a thing could be useful for self-contained testing of packages such as js_of_ocaml or bucklescript. though in the first phase it would probably test more the interpreter than the compiler ;)
<adrien>
maintenance, and sys admin
kamog has quit [Quit: Konversation terminated!]
k1000 has quit [Ping timeout: 244 seconds]
<reynir>
jscert contains jsref which is an interpreter (doesn't do IO)
k1000 has joined #ocaml
<brab>
jsref is only meant to run the test262 tests
<Drup>
the reference implementation for webassembly is in ocaml :p
adelbertc has quit [Quit: Connection closed for inactivity]
<CuriousErnestBro>
anyone from jane street here?
FreeBirdLjj has quit [Remote host closed the connection]
snhmib has joined #ocaml
jstolarek has quit [Ping timeout: 260 seconds]
ocp has quit [Ping timeout: 276 seconds]
ryanartecona has quit [Ping timeout: 240 seconds]
jstolarek has joined #ocaml
ciniglio has quit [Ping timeout: 244 seconds]
dario9 has joined #ocaml
bbc has quit [Ping timeout: 265 seconds]
ryanartecona has joined #ocaml
infinity0 is now known as Guest49439
Guest49439 has quit [Killed (wilhelm.freenode.net (Nickname regained by services))]
infinity0 has joined #ocaml
sdothum has joined #ocaml
Guest92877 has quit [Ping timeout: 240 seconds]
Reshi has joined #ocaml
Guest92877 has joined #ocaml
loxs has joined #ocaml
Guest92877 is now known as nore
<loxs>
when we match lists we can use [] and [el] but not [hd :: tl]. The latter needs to be without the square brackets, otherwise the compiler complains with a cryptinc error. Why is this inconsistency or is it an inconsistency, it may be something I don't understand
<flux>
loxs, great question! in fact, it's consistent, not inconsistent
<loxs>
flux, how is it consistent?
<flux>
[a; b; c] is syntacttic candy for a::b::c::[]
<loxs>
so can I use el :: [] when I mean [el]?
<flux>
yes
infinity0 has quit [Ping timeout: 244 seconds]
<loxs>
alright, it's a bit strange to my erlang brain, but makes sense :)
<flux>
also :: is right-associative, so a::b::[] is the same as a::(b::[])
<loxs>
right
<flux>
but don't worry, you'll find some inconsistency from ocaml some day.. ;-)
<loxs>
wow, I can even call the function like: mylast (1 :: [])
<flux>
do you have ocaml 4.03 perchance?
<loxs>
yes
ryanartecona has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 244 seconds]
<flux>
then this is possible: type 'a foo = [] | (::) of 'a * 'a foo;;
<flux>
and after that you can write [4; 3; 2] and get an instance of foo, not a list
FreeBirdLjj has quit [Ping timeout: 276 seconds]
<loxs>
this is still too complex for me, I'm just starting, I have no idea what that means
<flux>
well, you'll find out soon enough I think :)
<flux>
sum types are pretty common in ocaml, even polymorphic ones, though probably pretty rare to define them with using those two constructor names, because it was introduced with 4.03..
bbc has joined #ocaml
<Algebr`>
flux: you scared him away =P
<Algebr`>
them*
<Algebr`>
loxs: [] is just a linked list
<Algebr`>
loxs: are you familiar with linked lists?
<loxs>
I am familiar, all is good
<Algebr`>
oooo, ccc has a CFP, I wonder what level is expected?
<Algebr`>
for a paper there.
MercurialAlchemi has joined #ocaml
infinity0 has joined #ocaml
ryanartecona has joined #ocaml
<loxs>
where in the ocaml source code is the List module?
<Algebr`>
probably under stdlib
<Algebr`>
stdlib/list.ml
rgrinberg has joined #ocaml
copy` has joined #ocaml
wu_ng has quit [Ping timeout: 265 seconds]
govg has quit [Quit: leaving]
rand__ has quit [Ping timeout: 276 seconds]
ryanartecona has quit [Ping timeout: 240 seconds]
<brab>
Algebr`: I was away for a while … we only do JS, and we have someone who is going to start porting ES2015 features soon
<Algebr`>
probably because of how its being parsed
Denommus has quit [Ping timeout: 260 seconds]
Sorella has joined #ocaml
pierpa has joined #ocaml
ocp has joined #ocaml
ryanartecona has joined #ocaml
Reshi has quit [Ping timeout: 265 seconds]
loxs has quit [Quit: Leaving]
ocp has quit [Ping timeout: 250 seconds]
ocp has joined #ocaml
CuriousErnestBro has quit [Remote host closed the connection]
yomimono_ has joined #ocaml
ryanartecona has quit [Ping timeout: 260 seconds]
nicholasf has quit [Remote host closed the connection]
ee_ks has joined #ocaml
nicholasf has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 255 seconds]
wu_ng has joined #ocaml
ryanartecona has joined #ocaml
pyon has quit [Quit: Fix config.]
pyon has joined #ocaml
dario9 has quit [Quit: Konversation terminated!]
ryanartecona has quit [Ping timeout: 250 seconds]
profmaad has joined #ocaml
agarwal1975 has joined #ocaml
<profmaad>
Hi all, I have an Oasis/Ocamlbuild issue
<profmaad>
I'm building a library with a single module and get the following error after adding "linkall" to the tags for it
<profmaad>
Error: Files src/ppx_bitstring.cmx and src/ppx_bitstring.cmxa
<profmaad>
both define a module named Ppx_bitstring
<profmaad>
I can't figure why ocamlbuild wants to link both the cmx and cmxa
sh0t has joined #ocaml
CuriousErnestBro has joined #ocaml
beanmachine has joined #ocaml
<reynir>
I don't think I can help, but maybe posting the OMakefile in a pastebin would help?
beanmachine is now known as benmachine
<profmaad>
I just found a workable solution. If I restrict my linkall tag to only the cmxa in that folder, it compiles fine and that is roughly want I want anyway
<profmaad>
Except it doesn't actually set "force link" on the cmxa. Oy vey.
<Drup>
profmaad: if you use oasis, you shouldn't have to precise linkall to begin with
<profmaad>
I'm trying to do that to solve downstream issues. The lib in question is a ppx_driver based rewriter
<Drup>
ah
<profmaad>
And the compiler, when building a ppx_driver binary, drops my cmxa on the floor, even though it has top-level side effects
<profmaad>
note the code checked in right now doesn't have the linkall tag and compiles fine
<profmaad>
except it doesn't have "force link" on the ppx_bitstring.cmxa
Denommus has joined #ocaml
annoymouse has joined #ocaml
<profmaad>
(also, strike what I said earlier. it doesn't compile with "<src/*.cmxa>: linkall". I still had that commented out *doh*)
<annoymouse>
How can I pass the integer multiplication operator into a function?
<annoymouse>
Is there some function that the operator calls that I could instead call directly?
<flux>
annoymouse, good question! foo ( * )
<flux>
* is actuall an exception to the rule of open paren, operator, close paren
<profmaad>
annoymouse: ( * ) should work (note the spaces)
<annoymouse>
profmaad: Ah thanks
<flux>
(* would mark the beginning of a comment
<flux>
some people like to use spaces in all cases, to not make this an exception
<annoymouse>
profmaad: and can I use that prefix or must it be used infix?
<flux>
if your function is like: let mul op x y = op x y, then you must use infix
<annoymouse>
flux: Yeah that's the problem I was having
<rks`_>
flux: eh?
<profmaad>
prefix works
<annoymouse>
Ok sweet
<flux>
if it's like let mul ( * ) x y = x * y works as well
<annoymouse>
No basically I'm trying to pass it into a reduce function I wrote
<flux>
(but so sodes ( * ) x y)
<flux>
rks`_, eh what?
<annoymouse>
Yes
al-damiri has joined #ocaml
yomimono_ has quit [Ping timeout: 250 seconds]
Reshi has joined #ocaml
ryanartecona has joined #ocaml
FreeBirdLjj has joined #ocaml
Denommus has quit [Quit: Bye]
<benmachine>
flux: your comment about "you must use infix" I think confused rks and me
wu_ng has quit [Read error: Connection reset by peer]
wu_ng has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 250 seconds]
Mercuria1Alchemi has quit [Ping timeout: 250 seconds]
ryanartecona has quit [Ping timeout: 265 seconds]
CuriousErnestBri has joined #ocaml
CuriousErnestBro has quit [Ping timeout: 265 seconds]
<lyxia>
reduce (fun x y -> x * y) here, used infix.
ryanartecona has joined #ocaml
<freehck>
people, is there a way to make Map.Make functor name his tipe more appropriate way? F.e. I want merlin to tell me "string_pair" instead of "SPmap.key".
<freehck>
s/tipe/type/
yomimono_ has joined #ocaml
<Algebr`>
maybe try type checking it again
<Algebr`>
like two times in a row
<freehck>
Algebr`: it works! O_o
<Armael>
merlin does some unfolding of the type if you ask it repeatedly to show the type of the same thing
bruce_r has joined #ocaml
<flux>
benmachine, excellent point, I meant prefix of course :)
larhat has quit [Quit: Leaving.]
nicholasf has quit [Remote host closed the connection]
freusque has quit [Quit: WeeChat 1.4]
zpe has quit [Remote host closed the connection]
Reshi has quit [Ping timeout: 240 seconds]
shinnya has joined #ocaml
kamog has joined #ocaml
CuriousErnestBri has quit [Ping timeout: 265 seconds]
ontologiae has joined #ocaml
mcspud has quit [Ping timeout: 250 seconds]
johnf has joined #ocaml
mcspud has joined #ocaml
sepp2k has joined #ocaml
kolko has quit [Read error: Connection reset by peer]
kolko has joined #ocaml
zpe has joined #ocaml
FreeBirdLjj has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
jwatzman|work has quit [Quit: jwatzman|work]
sh0t has quit [Remote host closed the connection]
Anarchos has joined #ocaml
jstolarek has quit [Ping timeout: 244 seconds]
teiresia` has quit [Changing host]
teiresia` has joined #ocaml
teiresia` is now known as teiresias
d0nn1e has quit [Ping timeout: 265 seconds]
ocp has quit [Quit: Leaving.]
Sorella has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has joined #ocaml
d0nn1e has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
ggole has quit []
kakadu has quit [Quit: Page closed]
sepp2k has quit [Quit: Leaving.]
shinnya has quit [Ping timeout: 276 seconds]
tane has joined #ocaml
FreeBirdLjj has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
d0nn1e has quit [Ping timeout: 244 seconds]
d0nn1e has joined #ocaml
jstolarek has joined #ocaml
d0nn1e has quit [Ping timeout: 244 seconds]
d0nn1e has joined #ocaml
adelbertc has joined #ocaml
Anarchos has joined #ocaml
kamog` has joined #ocaml
kamog has quit [Ping timeout: 265 seconds]
sh0t has joined #ocaml
TheLemonMan has joined #ocaml
shinnya has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
annoymouse has quit [Quit: Connection closed for inactivity]
hugomg has joined #ocaml
hugomg has quit [Read error: Connection reset by peer]
ryanartecona has quit [Quit: ryanartecona]
octachron has joined #ocaml
Anarchos has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
agarwal1975 has joined #ocaml
cantstanya has quit [Quit: WeeChat 1.5]
cantstanya has joined #ocaml
bruce_r has quit [Ping timeout: 265 seconds]
ee_ks has left #ocaml [#ocaml]
fraggle_ has quit [Ping timeout: 265 seconds]
MercurialAlchemi has quit [Ping timeout: 265 seconds]
fraggle_ has joined #ocaml
ryanartecona has joined #ocaml
kakadu has joined #ocaml
fraggle_ has quit [Ping timeout: 265 seconds]
d0nn1e has quit [Ping timeout: 248 seconds]
d0nn1e has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Orion3k has joined #ocaml
fraggle_ has joined #ocaml
<TheLemonMan>
Drup, you have a small typo in your article about diff lists (Hidley-milner -> Hindley-Milner)
kamog` is now known as kamog
nicholasf has joined #ocaml
nicholasf has quit [Ping timeout: 265 seconds]
yomimono_ has quit [Ping timeout: 250 seconds]
_andre has quit [Quit: leaving]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
rand__ has joined #ocaml
orbifx has joined #ocaml
rand__ has quit [Client Quit]
agarwal1975 has quit [Quit: agarwal1975]
AltGr has left #ocaml [#ocaml]
ee_ks has joined #ocaml
bruce_r has joined #ocaml
dlbeer has joined #ocaml
jstolarek has quit [Ping timeout: 244 seconds]
rgrinberg has quit [Ping timeout: 265 seconds]
octachron has quit [Quit: Leaving]
CuriousErnestBro has joined #ocaml
dlbeer has quit [Ping timeout: 244 seconds]
dlbeer_ has joined #ocaml
dlbeer_ is now known as dlbeer
snhmib has quit [Quit: WeeChat 1.3]
orbifx has quit [Ping timeout: 276 seconds]
ee_ks has left #ocaml [#ocaml]
tane has quit [Quit: Leaving]
sh0t has quit [Remote host closed the connection]
zpe_ has joined #ocaml
jave has quit [Ping timeout: 244 seconds]
zpe has quit [Ping timeout: 265 seconds]
jave has joined #ocaml
Sorella has joined #ocaml
rgrinberg has joined #ocaml
<copy`>
TIL you can use `compare a b = 0` to compare records which might contain nan
Denommus has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
tmtwd has joined #ocaml
kakadu has quit [Remote host closed the connection]