adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Upcoming OCaml MOOC: https://huit.re/ocamlmooc | OCaml 4.03.0 release notes: http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
darkf has joined #ocaml
brunoro has joined #ocaml
johnelse has joined #ocaml
darkf has quit [Client Quit]
darkf has joined #ocaml
jeffmo has joined #ocaml
Heasummn has joined #ocaml
brunoro has quit [Ping timeout: 264 seconds]
orbifx-m2 has joined #ocaml
al-damiri has joined #ocaml
eh_eff_ has quit [Ping timeout: 276 seconds]
orbifx-m has quit [Ping timeout: 272 seconds]
orbifx has quit [Ping timeout: 272 seconds]
veggie_ has quit [Quit: WeeChat 1.5]
ee_ks has joined #ocaml
orbifx-m has joined #ocaml
orbifx-m2 has quit [Ping timeout: 276 seconds]
Algebr``` has quit [Ping timeout: 264 seconds]
shinnya has quit [Ping timeout: 240 seconds]
Algebr``` has joined #ocaml
eh_eff_ has joined #ocaml
Algebr``` has quit [Ping timeout: 272 seconds]
eh_eff_ has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
ee_ks has quit [Ping timeout: 272 seconds]
brunoro has joined #ocaml
kv_ has joined #ocaml
brunoro has quit [Ping timeout: 264 seconds]
alexst has quit [Quit: Lost terminal]
copy` has quit [Quit: Connection closed for inactivity]
noethics has joined #ocaml
mfp_ has quit [Ping timeout: 240 seconds]
<noethics> anyone know an ocaml http2 library
<noethics> or should i juse use ffi
rgrinberg has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #ocaml
eh_eff_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
eh_eff_ has quit [Ping timeout: 240 seconds]
Algebr``` has joined #ocaml
Algebr``` has quit [Ping timeout: 244 seconds]
jeffmo has quit [Read error: Connection reset by peer]
tmtwd has joined #ocaml
wu_ng has joined #ocaml
jeffmo has joined #ocaml
zapashcanon has joined #ocaml
brunoro has joined #ocaml
pyon has quit [Quit: Dammit, Emacs.]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<sgronblo> companion_cube: does ocamlbuild count as a "proper build system"?
brunoro has quit [Ping timeout: 272 seconds]
sdothum- has quit [Ping timeout: 276 seconds]
jeffmo has quit [Quit: jeffmo]
sdothum has joined #ocaml
sdothum has quit [Remote host closed the connection]
sdothum has joined #ocaml
jeffmo has joined #ocaml
jeffmo has quit [Client Quit]
shum has joined #ocaml
rgrinberg has joined #ocaml
fraggle_ has quit [Ping timeout: 272 seconds]
govg has quit [Ping timeout: 276 seconds]
fraggle_ has joined #ocaml
pierpa has quit [Ping timeout: 244 seconds]
Orion3k has quit [Quit: Leaving]
pierpa has joined #ocaml
wu_ng has quit [Read error: Connection reset by peer]
brunoro has joined #ocaml
wu_ng has joined #ocaml
brunoro has quit [Ping timeout: 240 seconds]
pierpa has quit [Ping timeout: 240 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 276 seconds]
fold4 has quit [Ping timeout: 250 seconds]
ocabot has quit [Ping timeout: 272 seconds]
jcloud has quit [Ping timeout: 272 seconds]
w1gz has quit [Ping timeout: 272 seconds]
M-ErkkiSeppl has quit [Ping timeout: 240 seconds]
M-Illandan has quit [Ping timeout: 240 seconds]
jcloud has joined #ocaml
Cypi has quit [Ping timeout: 250 seconds]
Algebr``` has joined #ocaml
M-jimt has quit [Ping timeout: 272 seconds]
riveter has quit [Ping timeout: 250 seconds]
sgronblo has quit [Remote host closed the connection]
sgronblo has joined #ocaml
Cypi has joined #ocaml
axiles has quit [Ping timeout: 250 seconds]
fold4 has joined #ocaml
axiles has joined #ocaml
riveter has joined #ocaml
Ankhers has quit [Ping timeout: 250 seconds]
fUD has quit [Quit: Connection closed for inactivity]
Algebr``` has quit [Ping timeout: 272 seconds]
Ankhers has joined #ocaml
w1gz has joined #ocaml
tmtwd has quit [Ping timeout: 276 seconds]
kakadu has joined #ocaml
manizzle has joined #ocaml
nicholasf has joined #ocaml
shum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
MercurialAlchemi has joined #ocaml
eh_eff_ has joined #ocaml
FreeBirdLjj has joined #ocaml
eh_eff_ has quit [Ping timeout: 264 seconds]
brunoro has joined #ocaml
groovy2shoes has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 276 seconds]
brunoro has quit [Ping timeout: 272 seconds]
M-ErkkiSeppl has joined #ocaml
Algebr``` has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 240 seconds]
Algebr``` has quit [Ping timeout: 240 seconds]
AlexRussia has quit [Ping timeout: 240 seconds]
noethics has quit [Quit: Leaving]
rgrinberg has quit [Ping timeout: 244 seconds]
Sorella has quit [Quit: Connection closed for inactivity]
eh_eff_ has joined #ocaml
M-jimt has joined #ocaml
<sgronblo> Is Opium again one of these RTFS packages?
eh_eff_ has quit [Ping timeout: 276 seconds]
Heasummn has quit [Ping timeout: 272 seconds]
<sgronblo> So now I am trying to figure out how to run ocamldoc in my clone of opium. `ocamldoc -d docs opium_kernel/*.mli opium/*.mli` gives me a bunch of errors about unbound modules.
<sgronblo> Do the filenames have to be provided in compilation order?
M-Illandan has joined #ocaml
brunoro has joined #ocaml
<sgronblo> Are all French people asleep now or?
Orion3k has joined #ocaml
brunoro has quit [Ping timeout: 264 seconds]
<reynir> it's 7:40 in the morning
<sgronblo> Good morning!
<reynir> morning :)
<sgronblo> I am about to give up on this for today
<sgronblo> I would just be happy if I could figure out how to generate these docs first
<sgronblo> I am just not sure how to specify the filenames. I am guessing the compilation order must be included in one of these files at the root of the repo...
<sgronblo> Ok, giving up :(
<sgronblo> Too many build systems and tools which are difficult to use...
MercurialAlchemi has joined #ocaml
Algebr``` has joined #ocaml
brunoro has joined #ocaml
Algebr``` has quit [Ping timeout: 276 seconds]
brunoro has quit [Ping timeout: 240 seconds]
paolooo has joined #ocaml
AlexDenisov has joined #ocaml
paolooo has left #ocaml [#ocaml]
Algebr``` has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
orbifx-m2 has joined #ocaml
fluter has quit [Ping timeout: 265 seconds]
orbifx-m has quit [Ping timeout: 276 seconds]
fluter has joined #ocaml
brunoro has joined #ocaml
Simn has joined #ocaml
alfredo has joined #ocaml
kakadu has quit [Remote host closed the connection]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
brunoro has quit [Ping timeout: 264 seconds]
brunoro has joined #ocaml
orbifx-m has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
orbifx-m2 has quit [Ping timeout: 264 seconds]
fraggle-boate has joined #ocaml
Algebr``` has quit [Ping timeout: 240 seconds]
nicholasf has quit [Remote host closed the connection]
freusque has joined #ocaml
zozozo has quit [Remote host closed the connection]
<companion_cube> sgronblo: yes it counts
<companion_cube> I don't know about opium docs
<companion_cube> (I agree it's not the most easy to get it; the readme is nice though)
AlexDenisov has joined #ocaml
AlexRussia has joined #ocaml
TheLemonMan has joined #ocaml
brunoro has joined #ocaml
fraggle-boate has quit [Ping timeout: 272 seconds]
brunoro has quit [Ping timeout: 240 seconds]
darkf has quit [Read error: Connection reset by peer]
zozozo has joined #ocaml
manizzle has quit [Ping timeout: 244 seconds]
eh_eff_ has joined #ocaml
rbocquet has quit [Ping timeout: 272 seconds]
eh_eff_ has quit [Ping timeout: 276 seconds]
rbocquet has joined #ocaml
Algebr``` has joined #ocaml
fedjo has quit [Remote host closed the connection]
manizzle has joined #ocaml
AlexRussia has quit [Ping timeout: 240 seconds]
fraggle-boate has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 276 seconds]
Simn has quit [Ping timeout: 272 seconds]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jwatzman|work has joined #ocaml
nicholasf has joined #ocaml
mfp_ has joined #ocaml
nicholasf has quit [Ping timeout: 240 seconds]
AlexDenisov has joined #ocaml
<theblatte> hmm, merlin gets confused if I declare a value with some type and one of its shadowed definitions doesn't have that type, even if the exposed value does have the right type
<theblatte> eg val foo : int \ let foo = "a" \ let foo = 5
<theblatte> merlin complains on let foo = "a"
Simn has joined #ocaml
tmtwd has joined #ocaml
<sspi> any good tips for getting into Irmin?
<Drup> I hope you like functors
<sspi> @Drup do tell more :)
<Drup> Well, you'll see ^^'
nicholasf has joined #ocaml
nicholasf has quit [Ping timeout: 276 seconds]
<Algebr```> sspi: Irmin uses functors a lot.
brunoro has joined #ocaml
ygrek_ has quit [Ping timeout: 264 seconds]
andromias is now known as emias
brunoro has quit [Ping timeout: 244 seconds]
tianon has quit [Ping timeout: 276 seconds]
wu_ng has quit [Ping timeout: 276 seconds]
<Algebr```> hmm, did npm search eslint and node exploded with a stacktrace, ran out of memory.
FreeBirdLjj has joined #ocaml
tmtwd has quit [Ping timeout: 276 seconds]
FreeBirdLjj has quit [Ping timeout: 264 seconds]
shum has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlexRussia has joined #ocaml
manizzle has quit [Read error: Connection reset by peer]
AlexRussia has quit [Ping timeout: 272 seconds]
eh_eff_ has joined #ocaml
eh_eff_ has quit [Ping timeout: 272 seconds]
shum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
AlexRussia has joined #ocaml
manizzle has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
nicholasf has joined #ocaml
kamog has joined #ocaml
fraggle_ has joined #ocaml
zpe has joined #ocaml
jave has quit [Ping timeout: 276 seconds]
_andre has joined #ocaml
jave has joined #ocaml
Ravana- has quit [Ping timeout: 276 seconds]
Ravana has joined #ocaml
AlexRussia has quit [Ping timeout: 272 seconds]
freusque has quit [Ping timeout: 272 seconds]
Ravana has quit [Ping timeout: 240 seconds]
Ravana has joined #ocaml
nicholasf has quit [Remote host closed the connection]
freusque has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
AlexRussia has joined #ocaml
freusque has quit [Ping timeout: 272 seconds]
brunoro has joined #ocaml
freusque has joined #ocaml
AlexDenisov has joined #ocaml
brunoro has quit [Ping timeout: 276 seconds]
eh_eff_ has joined #ocaml
rgrinberg has joined #ocaml
eh_eff_ has quit [Ping timeout: 276 seconds]
loxs has joined #ocaml
<loxs> is it possible to print/log an arbitrary data structure?
<companion_cube> no, although you can generate printers automatically with ppx_deriving nowadays
<loxs> I wonder how is it even possible to do real work in OCaml :)
<loxs> don't you guys need to print data structures constantly?
<companion_cube> well, there isn't such a universal printer in most languages
<companion_cube> (I mean, a useful one)
<companion_cube> I print a lot, but I just write printers and use them
<companion_cube> (with the advantage that I use Format, giving me good pretty-printing)
<loxs> what do you mean by there isn't such a universal printer?
<hannes> loxs: for debugging I usually print some fields, but it is also a good idea to write a pretty printer for your custom data structure in OCaml :)
<companion_cube> loxs: there is not `print : 'a -> string`, is what I mean
<loxs> I feel lost :)
<loxs> but it's not true that this is the case in most languages
<loxs> actually ocaml seems to be my first where you can't print any structure
<loxs> I'll give the example with console.log() in javascript
<companion_cube> wait, what other languages are you used to?
ee_ks has joined #ocaml
<companion_cube> hmm, does console.log() print deeply nested structures?
<loxs> of course
<loxs> also, erlang's io:format("~p", Structure) does it
<loxs> python also comes to mind
<loxs> in this case I'm learning ocamllex and menhir and I try to make sens of everything.... like for example try to analyze what the lexer returns
<companion_cube> python only prints <Foo at some_ptr_address>
<companion_cube> not very useful
<loxs> and by not being able to print... it's a bit hard
<companion_cube> but ok, granted, dynamic languages can have some default printers
govg has joined #ocaml
<loxs> yeah, in most languages you can't print functions (which doesn't make sense anywais) but you can usually print hashes/maps, records etc.
<loxs> also, there should be a way to do it, as you usually get a textual representation of stuff when you play with it in utop
<rgrinberg> loxs: give ppx_deriving.show a try
octachron has joined #ocaml
<rgrinberg> companion_cube: it's a shame that the stdlib doesn't provide printers consistently
<rgrinberg> i don't think a single type in Unix has a printer for example
<companion_cube> yeah, yeah
<companion_cube> let's not speak about the stdlib
<rgrinberg> lol. ok ok
<loxs> sorry, this is going to be a noob question, but what does the ":" operator do in the above example?
<rgrinberg> i don't see any examples above
<loxs> (in the link about ppx_deriving)
<loxs> example: val show : [< `A | `B of i ] -> bytes = <fun>
<companion_cube> usually : is for typing
<companion_cube> it's a type declaration
<loxs> I still know too little ocaml as it seems
<companion_cube> you should follow a tutorial before diving into menhir
<loxs> oh, it's the output of the interactive toplevel
<loxs> now I get it
freusque has quit [Ping timeout: 272 seconds]
<loxs> and yeah, seems like learning parsing in OCaml is not the best idea, not only because of not knowing ocaml, but also because of not knowing parsing in general
nicholasf has joined #ocaml
<Drup> are you following the OCaml MOOC ? There is a link in the motd, it just started.
<rightfold> what is MOOC?
<rightfold> ooh, massive open online course
nicholasf has quit [Ping timeout: 272 seconds]
<rightfold> I thought it was some OCaml-specific term
<rightfold> because it ends with "OC" :P
johnelse is now known as johnel_away
johnel_away is now known as johnelse
kv_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlexDenisov has joined #ocaml
zpe has quit [Remote host closed the connection]
AlexDenisov has quit [Client Quit]
AlexDenisov has joined #ocaml
brunoro has joined #ocaml
sdothum has quit [Quit: ZNC 1.6.3 - http://znc.in]
<jstolarek> I am planning to port my project from using OCamlMake to some other build/distribution tool
<jstolarek> I was recommended to take a look at topkg
<jstolarek> but I am a bit confused with its documentation
<jstolarek> I am not sure whether I should write all the files required by ocamlbuild, ocamlfind etc, or will topkg take care of that automatically once I configure it?
<Drup> what's your project ?
<jstolarek> I should probably say"project I am working on" rather than "my project"
<jstolarek> 'cause it's definitely not mine :-)
<Drup> ahah, indeed ^^'
<Drup> honestly, do you have a good reason to part it ?
<jstolarek> yes
<jstolarek> at least I believe so
<jstolarek> 1. all the build artefacts are placed in the same directory as source files. This is horrible
<jstolarek> 2. We want to be able to release the project via OPAM
loxs has quit [Quit: Leaving]
<jstolarek> 3. OCamlires to manualy figure out module dependencies
<gasche> I'm surprised by (2), using OcamlMakefile should not prevent OPAM
<jstolarek> s/Ocamlires/OcamlMake requires/
<jstolarek> I am not saying it is prevening
<jstolarek> I would like some sort of integrated solution
<gasche> I think that topkg is a *packaging* tool, as it it will do the configuration before build and installation after build, but not directly a build system
<gasche> it's a neat tool, so you can start by using it and see which build system you can conveniently fit within (maybe OCamlMakefile)
<Drup> topkg is quite integrated with ocamlbuild
<gasche> ah
<gasche> then I guess ocamlbuild makes sense
<Drup> (but yes, it's not a build tool at all, just drives ocamlbuild)
<jstolarek> ok, so using topkg still requires me to configure build with ocamlbuild?
<gasche> I was going to say "either ocamlbuild or omake" anyway
<gasche> if you don't want to deal with a build system at all, oasis may be a better choice
<jstolarek> yes, that is one of the alternatives as well
<gasche> but in my experience, once you start doing more delicate things, you will need to meddle with the build system below oasis in any case
<gasche> (although I guess that improves with each oasis release)
<companion_cube> and it's possible to mostly avoid the "delicate things"
<companion_cube> (at least oasis takes care of libraries and packs)
<gasche> yes, but it may be delicate to retro-fit the more structured approach in an existing project
<jstolarek> so far the most delicate thing that needs to be done is conditional compilation of some modulues depending on libraries installed in the system
<gasche> also jstolarek you should really use Menhir instead of ocamlyacc
<Drup> (I personally think topkg is unsuited for projects bigger than 3 modules, but heh, I don't even like it, so I'm partial)
<jstolarek> gasche: what are advantages of Menhir over ocamlyacc?
<companion_cube> oasis does the whole conditional compilation thing, or makes it possible thourhg opam
<gasche> jstolarek: well everything is better
<gasche> more readable, more compact grammars
<gasche> better debugging
<gasche> a better documentation
<Drup> companion_cube: it does conditional libraries. jstolarek wants conditional dependencies for a binnary, which is not well supported by ... pretty much anyone
<companion_cube> oh
<Drup> It's going to be painful regardless of the choice
<companion_cube> wait, why wouldn't oasis deal with it?
<companion_cube> Build$: flag?
<Drup> not very well :/
<companion_cube> if it's compiling a binary conditionally it's fine
<jstolarek> Drup: I guess that being able to conditionally compile some extra modules with some sort of compilation flag will suffice
<companion_cube> I do it all the time
<companion_cube> ah, this is harder though
<Drup> companion_cube: "if lib m is installed, I compile module M and link it with the rest of my program" ?
<jstolarek> companion_cube: can oasis do both build and OPAm packaging?
<Drup> jstolarek: everyone can do opam packaging, you just write your opam file and that's all, it's extremly simple
<jstolarek> sure, it's just that if I can do that automatically from oasis than I'd rather do it that way
<jstolarek> rather than writin opam file if I don't have to
brunoro has quit [Ping timeout: 244 seconds]
<Drup> there is oasis2opam, but I would write it myself
<companion_cube> I'd really like oasis to produce .merlin though
<jstolarek> what's .merlin ?
FreeBirdLjj has joined #ocaml
<companion_cube> the configuration file for merlin (which is a nice semantic editor plugin)
<jstolarek> another question: can I limit the number of parallel builds done by opam?
<jstolarek> I am compiling Coq and it starts like 4 or 6 threads on a dual-core machine with 2GBs of RAM :-/
<Drup> yes, see ~/.opam/config
<Drup> If your goal is to release to opam, I would advice to do just that. Write your opam file and there you go. You can consider cleaning up the build system as the next step
<Drup> (are you a new phd student working on links ?)
FreeBirdLjj has quit [Ping timeout: 272 seconds]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jstolarek> Drup: post-doc
<jstolarek> I think cleaning the build system has higher priority at the moment than releasing to OPAM
llamatarianism has joined #ocaml
<Drup> Good luck then, You can probably start by trying oasis and try oasis next. I wouldn't be surprised if the other members of the links team have strong opinions about the choice of build system, though :p
AlexDenisov has joined #ocaml
<Drup> and try topkg next if things doesn't work out*
ee_ks has left #ocaml [#ocaml]
FreeBirdLjj has joined #ocaml
fraggle-boate has quit [Quit: Quitte]
fraggle-boate has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 276 seconds]
<jstolarek> Drup: surprisingly, not that much resistance to a new build system ;-)
<Drup> Sure, but which one ? :D
<gasche> I think making everyone adopt Merlin, and also using Menhir, would have more impact
<jstolarek> that's what I'm trying to figure out
<gasche> (there should be .merlin file at the root of the project)
<gasche> (and also: having an opam package is actually important)
<jstolarek> yes, opam package is the next step - once I figure out the build system
<jstolarek> I think it will be easier in this particular order
<jstolarek> menhir is something for a more distant future
kakadu has joined #ocaml
yegods has joined #ocaml
yegods has quit [Remote host closed the connection]
<jstolarek> I read through oasis documentation and one thing is not clear to me
<jstolarek> how do I tell oasis to run ocamlyacc on some files?
<Drup> you don't need to, it'll figure it out
<jstolarek> ok, if you say so
<jstolarek> and this whole merlin thing. Can I get oasis to generate .merlin file?
<Drup> unfortunatly no.
<Bluddy[m]> solvuu-build generates .merlin files
Algebr``` has quit [Ping timeout: 264 seconds]
<llamatarianism> are there packages for emacs for highlighting .mly and .mll files?
<llamatarianism> I could just use tuareg mode, but then whenever I save it'll give me errors, since it's not an actual ocaml file
<jstolarek> now that I've read about oasis I am beginning to wonder what are advantages of oasis over simply using ocamlbuild
<Bluddy[m]> jstolarek: not much. I think we should do away with OASIS if possible. Too many moving parts in the ecosystem already
<Bluddy[m]> look into solvuu-build
<Bluddy[m]> it's an ocamlbuild plugin that aims at simplifying more difficult configurations
govg has quit [Quit: leaving]
* jstolarek is lookin ag solvuu-build
<companion_cube> Bluddy[m]: I disagree
<companion_cube> solvuu is probably not ready yet (especially w.r.t docs)
<companion_cube> oasis is still the simplest build system, imho, for small to medium projects, and can adapt to new backends
<Bluddy[m]> companion_cube: good point.
<companion_cube> it's not going away
pierpa has joined #ocaml
brunoro has joined #ocaml
<Bluddy[m]> jstolarek: solvuu-build is not mature, keep that in mind
<Bluddy[m]> companion_cube: I think it'll go away if an alternative experience is better
jpdeplaix2 is now known as jpdeplaix
<Drup> Please be careful when you advise tools that are not even in version 0.1 ...
<Bluddy[m]> Drup: fair enough
<companion_cube> Bluddy[m]: an obviously better experience, yes
<companion_cube> but I don't think it's going to happen soon
<Bluddy[m]> jstolarek: sorry about that. I really shouldn't have pointed you in that direction
<companion_cube> not as a replacement for everything oasi does
<Bluddy[m]> companion_cube: from what I can tell, it is a pretty full replacement
copy` has joined #ocaml
<Bluddy[m]> solvuu, that is
<companion_cube> really? even for multi-lib, multi-binary projects, including the configure, etc.?
brunoro has quit [Ping timeout: 240 seconds]
jao has joined #ocaml
<jstolarek> is the only documentation available for solvuu the README.md ?
<jstolarek> hm.... does oasis support cleaning? ie. removing files generated during compilation
<Drup> "make clean" ?
freusque has joined #ocaml
alfredo has quit [Quit: Textual IRC Client: www.textualapp.com]
FreeBirdLjj has quit [Remote host closed the connection]
<jstolarek> yes, but the question is whether I need to figure out which files are generated and the write clean target in a Makefile or is it smart enoough to figure it out?
<jstolarek> as in `cabal clean`
<Drup> "make clean" is literally how you do it, oasis generates a makefiles that does everything for you
<jstolarek> hm...
AlexRussia has quit [Ping timeout: 264 seconds]
<jstolarek> this means that if I wanted to have some extra actions in my Makefile (say, uploading documents to a web server) then I need to replace those with a shell script?
<Drup> No, just add them to the makefile
<Drup> oasis only touches things inside the oasis section
<companion_cube> oasis has some interesting examples on github: lwt, containers ;)
<jstolarek> hm...
<companion_cube> (I mean, you can see what a typical _oasis looks like)
<jstolarek> so if I change oasis configuration, then it will modify the makefile accordignly?
<companion_cube> I almost always have additional rules in the makefile, the generation mechanism knows not to erase them
freusque has quit [Ping timeout: 272 seconds]
MercurialAlchemi has joined #ocaml
freusque has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 264 seconds]
sh0t has joined #ocaml
eh_eff_ has joined #ocaml
AlexRussia has joined #ocaml
eh_eff_ has quit [Ping timeout: 272 seconds]
freusque has quit [Ping timeout: 272 seconds]
shinnya has joined #ocaml
<llamatarianism> hey guys
<llamatarianism> I'm having trouble trying to figure out how to compile menhir and ocamllex files
<llamatarianism> I guess I just don't really know how ocamlbuild works
<llamatarianism> whatever I do, feels like it either causes an error or makes a (mostly empty) _build directory
brunoro has joined #ocaml
shepi has joined #ocaml
<shepi> Hello!
<octachron> llamatarianism: do you use ocamlbuild -use-menhir option?
<llamatarianism> octachron: don't worry, I figured it out
<llamatarianism> I had an ADT representing my abstract syntax tree in another file and it was freaking out because I hadn't compiled that
<llamatarianism> I kinda assumed it would compile it for me I guess :P
jwatzman|work has quit [Quit: jwatzman|work]
<llamatarianism> shepi: hullo
nicholasf has joined #ocaml
<llamatarianism> octachron: thanks for offering to help anyway by the way :)
brunoro has quit [Ping timeout: 244 seconds]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shepi> I have a possibly trivial question about functors in OCaml. I define a functor F over some module X containing a type t. The functor only contains "include X". If the type t in X is a record type, it is not exported; if t is something like "int", "int * int", "string", then it will be exported. Is it possible to get the scalar type to be exported?
<shepi> module type X = sig type t end
<shepi> module F = functor (X : X) -> struct include X end
<shepi> module A = F (struct type t = int * int end)
<shepi> module A : sig type t = int * int end
<shepi> module B = F (struct type t = { x : int; y : int } end)
<shepi> module B : sig type t end
<shepi> (replace scalar with record in my question :p I hope it is not bad taste to put some code here ...)
<Drup> It is, please use pastebin ;)
nicholasf has quit [Ping timeout: 264 seconds]
<shepi> Ok sorry about it :p I promise I will never do it again :D
<shepi> Sorry not used to pastebin, here with syntax coloring :-) http://pastebin.com/nQ5X0ytZ
<shepi> I would like the type t to be exported in module B, like t is exported in A (or to be told that this is not possible without creating a separate module with the type { x : int; y : int })
<Drup> If you want to re-export the constructors, the answer is no, you can't really do that. The type equality that says that F(X).t = X.t should be exported. The issue here is that module X doesn't exist, so X.t doesn't have a name.
<Drup> try to bind the module first, then apply the functor
<octachron> shepi: record type are nominal, so F( struct type t = {x:int} end ) creates a new record type {x:int}, that is unreachable outside of F
<shepi> Ok, thank you for your explanations :-) Binding the module first looks less "clean" so I wanted to be sure I had to :D
archer121 has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<archer121> hi, I am trying to write a function to merge two lists. This is my code: http://paste.ubuntu.com/23251790/ and I am getting this error: http://paste.ubuntu.com/23251791/ Can anyone look into this for me?
tianon has joined #ocaml
<archer121> *merge two sorted lists
AlexRussia has quit [Ping timeout: 272 seconds]
<llamatarianism> `h1 :: merge_i t1 h2::t2` is probably your problem
eh_eff_ has joined #ocaml
<llamatarianism> that gets parsed as `h1 :: (merge_i t1 h2 :: t2)`
<llamatarianism> just put parens in the right place:
<llamatarianism> wait hold on that's not wrong
<llamatarianism> wait, yeah it is.
<archer121> yeah, `h1 :: (merge_i t1 h2 :: t2)` was what I wanted.
<llamatarianism> lemme make it clearer: `h1 :: ((merge_i t1 h2) :: t2)`
<llamatarianism> function application binds more tightly than operators do
<archer121> I see.
<llamatarianism> so yeah, you need some parens.
<llamatarianism> `h1 :: merge_i t1 (h2 :: t2)`
kamog has quit [Quit: Konversation terminated!]
<archer121> `if h1> h2 then h1 :: merge_i t1 (h2::t2) else h2 :: merge_i (t1::h1) t2` still gives me the same error.
eh_eff_ has quit [Ping timeout: 244 seconds]
<llamatarianism> `t1::h1`
<llamatarianism> I think you mean `h1::t1`
<archer121> woops, just realised that
kamog has joined #ocaml
<archer121> thanks a lot, buddy!
<llamatarianism> no problem!
<llamatarianism> what editor are you using, by the way?
<llamatarianism> I'm using emacs with tuareg mode, and whenever I save a file, it automatically checks it for errors and shows exactly where they are. SUPER useful.
<llamatarianism> actually I think that's a merlin feature. not exactly sure
octachron has quit [Quit: Page closed]
<shepi> how do you remember all these weird key combinations?
<shepi> you should use vim!
<llamatarianism> I do!
<llamatarianism> I'm using evil mode
<shepi> :D
<llamatarianism> emacs has a bunch of really cool plugins and stuff, which is why I don't use straight-up vim,
<llamatarianism> but I like vim's key combinations a lot :)
<shepi> I was just making fun actually :p I don't want to troll about text editors :p
<llamatarianism> ah, alright :P
eh_eff_ has joined #ocaml
AlexRussia has joined #ocaml
chris2 has quit [Ping timeout: 255 seconds]
<sgronblo> good morning, people. yesterday I got frustrated while trying to run ocamldoc on Opium and failing. could somebody help me figure out how it's supposed to be done?
<Drup> rgrinberg: ^
<rgrinberg> sgronblo: make an issue on the tracker and I will take a look. I personally don't find ocamldoc useful but I can take a look at fixing it
<sgronblo> rgrinberg: all right, are there any docs for opium available or are you just supposed to read the effing source?
<sgronblo> it doesnt need to be ocamldoc
<rgrinberg> sgronblo: ^_^. you can read the .mli's those should have the docs you would normally see in an ocamldoc
<rgrinberg> if any function in particular isn't documented then just let me know
brunoro has joined #ocaml
<sgronblo> right, but you should be able to use those doc comments to generate a pretty documentation site?
<sgronblo> and publish on github pages
<rgrinberg> sgronblo: i should. but personally i always browse docs in my editor so i never use it
<rgrinberg> good point though... it's not that hard to make it work
<sgronblo> I only found out about opium like 2 days ago and think it seems really promising. But I think it could feel even more premium and attractive to new users if it had online docs.
<sgronblo> also, i read your blog posts about both the unveiling of opium and your decision to move over to lwt. in the opium post you mentioned something about switching it over to lwt but that one was written like 6 months earlier so i assume that the switch to lwt is already over now?
<Drup> rgrinberg: See it that way: Having online doc would force you to have an introductory documents that explains in which direction to look
<Drup> (currently opium is completely terrible at that)
brunoro has quit [Ping timeout: 272 seconds]
<rgrinberg> fiiiine. I'll do it.
<Drup> :]
<rgrinberg> sgronblo: yes everything is using lwt. and core's gone too
nicholasf has joined #ocaml
orbifx-m2 has joined #ocaml
nicholasf has quit [Remote host closed the connection]
orbifx-m has quit [Ping timeout: 240 seconds]
<sgronblo> rgrinberg: all right, cool. but currently the way to check the docs is to just read the .mli files?
<rgrinberg> yes. if i were to generate ocamldoc's, they would contain that info in any case
<companion_cube> you can try ocp-browser, it works very nicely with packages that install .cmt (or .cmti?) files
archer121 has quit [Quit: Page closed]
<sgronblo> All right, this ocp-browser is already a little bit smoother than just reading source files
chris2 has joined #ocaml
orbifx-m2 has quit [Ping timeout: 272 seconds]
<companion_cube> press 'space' to get the docs, if you're lucky :)
<companion_cube> it's pretty nice indeed
orbifx-m has joined #ocaml
orbifx-m2 has joined #ocaml
orbifx-m has quit [Ping timeout: 264 seconds]
kakadu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
brunoro has joined #ocaml
orbifx-m2 has quit [Ping timeout: 272 seconds]
brunoro has quit [Ping timeout: 244 seconds]
kakadu has joined #ocaml
smondet has joined #ocaml
<llamatarianism> how do you actually compile ocamllex stuff?
nicholasf has joined #ocaml
<llamatarianism> I'm trying to do it with ocamlbuild like this:
<companion_cube> if you use module Foo and have foo.mll
<companion_cube> ocamlbuild will find out
<llamatarianism> it complains that it can't find it
<companion_cube> is it in the right directory?
<llamatarianism> no idea
<llamatarianism> it's in the same directory as the file
<companion_cube> hmmm
<companion_cube> you can always look at _build/_log to see what ocamlbuild tried
<llamatarianism> if I try doing:
<llamatarianism> `ocamlbuild -ocamllex lexer.mll` or `lexer.native`, it just doesn't do anything
<llamatarianism> `$ Finished, 0 targets (0 cached) in 00:00:00.`
<llamatarianism> if I just do: `ocamlbuild lexer.native`, then it complains about syntax errors
nicholasf has quit [Ping timeout: 272 seconds]
<companion_cube> ocamlbuid lexer.native sounds right
<companion_cube> what are the syntax errors?
FreeBirdLjj has joined #ocaml
kakadu_ has joined #ocaml
<sgronblo> companion_cube: how do you get the help screen to show up in ocp-browser??? they should be teaching you that on first run...
<Drup> Alt+h
<llamatarianism> companion_cube: it compiles to this thing (lexer.ml) -> http://pastebin.com/mCQ7SWsb
<Drup> honestly, I'm not sure how to convey that better without being annoying to experienced users
<llamatarianism> which I'm pretty sure isn't valid ocaml
<llamatarianism> so I think that's the cause
<llamatarianism> but I have no idea why it looks that way
<Drup> llamatarianism: that's valid
<Drup> well, I guess that's only the beginning
<llamatarianism> the error is at the beginning
<llamatarianism> File "lexer.ml", line 8, characters 0-3: Error: Syntax error
<companion_cube> Drup: see, it should be somewhere (in a corner)
<companion_cube> the file is partial
<companion_cube> llamatarianism: first: `of String` is invalid
<Drup> companion_cube: which corner ? It's a bit space-constrained :(
<llamatarianism> oh yeah, oops
<companion_cube> maybe left of "kinds: "
<llamatarianism> thanks, but that didn't fix it
<companion_cube> you should fix the .mll of course
<companion_cube> just checking
slash^ has joined #ocaml
smondet has quit [Remote host closed the connection]
smondet has joined #ocaml
<reynir> Ah, just noticed they mention alt+h in the NAME section of the ocp-browser man-page
<llamatarianism> companion_cube: okay I think I fixed it
<llamatarianism> I think this did it:
<llamatarianism> `ocamlbuild -use-menhir lexer.native`
<companion_cube> weird, it should not depend on whether you use menhir
<llamatarianism> but tbh it could be anything cuz I was kinda messing around trying to get it to work. which is frustrating :\
<Drup> sgronblo, reynir: honestly, I would happily take concrete proposition on that
<reynir> I'm not sure the NAME section is the best place to put that information - it's usually something I skip
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<reynir> Drup: Put it in the DESCRIPTION section of the man-page, I would suggest :-)
FreeBirdLjj has joined #ocaml
<Drup> hum
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<llamatarianism> oh I know!
<llamatarianism> companion_cube: my ocamllex file contained `open Parser`
<llamatarianism> so that's why it depended on whether or not it was using menhir
<companion_cube> ah I see
<llamatarianism> without that, it was treating it like an ocamlyacc file
<companion_cube> no, a .mll files is always for ocamllex
<companion_cube> but the parser would ail
<companion_cube> fail
<companion_cube> you should look in _build/_log and the last lines will show the place where compilation fails
<llamatarianism> I'll do that when my wrists stop hurting from typing `ocamlbuild` over and over :P
<companion_cube> doesn't your terminal provide history? :p
<companion_cube> I just up-arrow enter
<companion_cube> (or maybe ctrl-r oc<enter>, to look up in history)
<Drup> ^C^C yay compilation command
<llamatarianism> it does, I'm just dumb
<shepi> *unaware
<shepi> those who play with OCaml can not be dumb :]
<llamatarianism> heheh
<llamatarianism> a big part of why I use ocaml is just cuz I'm too dumb to deal with haskell :P
<llamatarianism> lenses and kleisli arrows and monad transformers and...blegh!
<shepi> haha, I tried haskell, it has some parts that are good, really
<shepi> like the fact that "modules" have inferred types
<llamatarianism> it has a lot of neat stuff
<llamatarianism> but I prefer modules to typeclasses, and I like print statements.
<Drup> hum ? Haskell doesn't have anything that deserve the name of module system
<Drup> (at least not yet, not until backpack)
<shepi> :p
<shepi> I feel OCaml is safer and faster
brunoro has joined #ocaml
<shepi> but I have to admit, haskell code looks really beautiful (and cryptic)
<shepi> Anyway no language is better than Coq
_andre has quit [Ping timeout: 264 seconds]
brunoro has quit [Ping timeout: 272 seconds]
octachron has joined #ocaml
octachron has quit [Read error: Connection reset by peer]
<llamatarianism> hurray!
<llamatarianism> finally, after several hours, my parser actually parses and my lexer actually lexes :)
tobias232323 has joined #ocaml
<companion_cube> yay!
<llamatarianism> http://pastebin.com/QjphX5Xy <- it can parse this!
<llamatarianism> can't do anything useful with it yet :P but it can parse it
octachron has joined #ocaml
<companion_cube> ^^
<companion_cube> it's a lot of setup, but then parsers are easy to modify and extend
<llamatarianism> well that's good
<llamatarianism> cuz I'm having to do a lot of modification
<llamatarianism> because currently, it can only parse 1 expression in an entire file :P
smondet has quit [Quit: #emacs]
<octachron> I would have not thought that batteries' documentation heading levels would be that disorganized
<companion_cube> is it that bad?
smondet has joined #ocaml
kakadu_ has quit [Remote host closed the connection]
<octachron> The main problem is that it goes from the level'{1' to the level '{9'
Denommus has joined #ocaml
<octachron> A 9 level hierarchy might be fine for a megacorporation, it feels a little heavy for a library
Denommus has quit [Client Quit]
ygrek_ has joined #ocaml
<octachron> The issue probably stems from the fact that fragment of the documentation inherited from the stdlib convention to start at '{6'
Denommus has joined #ocaml
groovy2shoes has quit [Remote host closed the connection]
<octachron> whereas some other fragments, decided that it would be more natural to start between '{3' and '{5'
Ravana has quit [Ping timeout: 264 seconds]
<companion_cube> hmmm I'm not sure
<companion_cube> isn't {1 the largest?
Ravana has joined #ocaml
<Drup> 1 is at the same level as the title of the module
<Drup> (I start at 2, personally)
<Drup> which may feel a bit too high
slash^ has quit [Read error: Connection reset by peer]
<Drup> In pure latex (or html) tradition: you shouldn't decide the weight of a title for it's resulting look, but for it's semantics (and fix the look :p)
MasseR has quit [Ping timeout: 252 seconds]
SIGGIL has joined #ocaml
mankyKitty_ has joined #ocaml
mankyKitty has quit [Ping timeout: 252 seconds]
groovy2shoes has joined #ocaml
mankyKitty_ is now known as mankyKitty
sfri_ has joined #ocaml
MasseR has joined #ocaml
M-Illandan has quit [Ping timeout: 276 seconds]
brunoro has joined #ocaml
AlexRussia_ has joined #ocaml
Simn has quit [Read error: Network is unreachable]
AlexRussia has quit [Ping timeout: 263 seconds]
|jbrown| has joined #ocaml
Simn has joined #ocaml
cthuluh_ has joined #ocaml
<llamatarianism> how would you implement optional semicolons with menhir and ocamllex?
sfri has quit [Read error: Connection reset by peer]
jbrown has quit [Ping timeout: 252 seconds]
SIGILL has quit [Ping timeout: 252 seconds]
chelfi has quit [Ping timeout: 252 seconds]
sigjuice has quit [Quit: ZNC - http://znc.in]
cthuluh has quit [Ping timeout: 252 seconds]
tokenrov1 has quit [Ping timeout: 252 seconds]
sigjuice has joined #ocaml
tokenrove has joined #ocaml
Ravana has quit [Ping timeout: 244 seconds]
brunoro has quit [Ping timeout: 264 seconds]
<flux> llamatarianism, would it work to have line end be its own token, and then handle it in the grammar so that either line end or ; is acceptable?
<flux> I guess you don't mean that ie. a()b() should be permitted because a();b(); would be
AlexRussia_ has quit [Ping timeout: 272 seconds]
<llamatarianism> flux: that could work
<llamatarianism> but it'd be annoying if I just want to ignore newlines altogether
<llamatarianism> like, if `let x = 2 in x` and `let x = 2 \n in x` are both valid
<llamatarianism> it's prob the only way though
<llamatarianism> so I'll just have to make it work
<companion_cube> so, indentation based?
<llamatarianism> I want it to be like ocaml
<llamatarianism> where it's not indentation-based
<llamatarianism> but `;;` is optional
<companion_cube> err yeah but it's not based on \n
<flux> ;; isn't really optional, even though you don't need it :)
<llamatarianism> true
<flux> it really is different program with and without ;;
<companion_cube> I think ;; is something I would change if I could change the syntax
<flux> 5;;\n6;;\n is valid ocaml, but 5\n6\n isn't
<llamatarianism> yeah, I'm not literally gonna use `;;`
<llamatarianism> cuz `;;` is ugly and weird :P
<llamatarianism> but I want the same kinda semantics
<reynir> ;;;
<llamatarianism> ;_;
<reynir> heh
<flux> (* ahoy parser, the previous passage may now be parsed *)
<octachron> why forgo unicode ∎ ?
<reynir> ooh, what's that symbol
eh_eff_ has quit [Ping timeout: 272 seconds]
<llamatarianism> apparently it's the symbol for 'end of proof'
vinoski has quit [Read error: Network is unreachable]
<octachron> ^ yes, it is one of the symbol for end of proof (aka qed aka cqfd)
vinoski has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 244 seconds]
<llamatarianism> cqfd?
<zapashcanon> "ce qu'il faut démontrer" in french
<octachron> french version of qed: quod erat demonstrandum ⇒ Ce Qu'il Fallait démontrait ⇒ what needed to be demonstrated
AlexRussia_ has joined #ocaml
<llamatarianism> cool
<llamatarianism> it now parses multiple lines! ^^
chelfi has joined #ocaml
<llamatarianism> welp, I gotta go everyone
<llamatarianism> seeya! 👋
llamatarianism has quit [Quit: Page closed]
tobias232323 has quit [Ping timeout: 272 seconds]
tobias232323 has joined #ocaml
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
FreeBirdLjj has joined #ocaml
octachron has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Ping timeout: 264 seconds]
iZsh has quit [Ping timeout: 252 seconds]
iZsh has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
octachron has joined #ocaml
Drup has quit [Ping timeout: 252 seconds]
Drup has joined #ocaml
AlexDenisov has joined #ocaml
M-Illandan has joined #ocaml
agarwal1975 has joined #ocaml
<agarwal1975> imad_: Please note Jane Street has further split its Core suite into a smaller lib called Base. This is a subset of Core_kernel, and I think is meant to be js_of_ocaml compatible.
Sorella has joined #ocaml
octachron has quit [Read error: Connection reset by peer]
tobias232323 has quit [Ping timeout: 264 seconds]
henrytill_ has joined #ocaml
<Drup> agarwal1975: will* not released
henrytill has quit [Ping timeout: 252 seconds]
<agarwal1975> oh, too bad.
<agarwal1975> I’m confused about their libs. Did they announce their plans anywhere?
eh_eff_ has joined #ocaml
nicholasf has joined #ocaml
nicholasf has quit [Ping timeout: 244 seconds]
jeffmo has joined #ocaml
<agarwal1975> I had read that thread and don’t recall it saying Base will *not* be released. Just re-read it and I still don’t see that. Can you clarify?
<Bluddy[m]> Base will be released, it just hasn't been released yet.
<Bluddy[m]> that was Drup's correction
<Bluddy[m]> btw any progress on solvuu-build? I accidentally recommended it to someone here today, forgetting that it too, has not been released.
<agarwal1975> oh, I mis-read his message. gotcha. Sure, right, it will be released.
SIGGIL is now known as SIGILL
octachron has joined #ocaml
<agarwal1975> So could be interesting enough to investigate it for use with js_of_ocaml.
<agarwal1975> A new release of solvuu-build was done yesterday. It’s in opam.
<companion_cube> nice!
<companion_cube> but it seems like there are 2 packages?!
<companion_cube> solvuu-build and solvuu_build ?
<smondet> companion_cube: the dash one is the new version
<companion_cube> maybe the old package should die? :)
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<agarwal1975> yeah, I believe solvuu_build should be removed from opam, but I have the sense the opam team considers it wrong to delete a package.
<agarwal1975> maybe I’ll submit a pull request to delete it, and see if they accept it.
<companion_cube> yeah, it will trigger a discussion, at worst
<companion_cube> and be less confusing anyway
jeffmo_ has joined #ocaml
<Bluddy[m]> agarwal1975: probably should
<agarwal1975> It’s related to my old request: https://github.com/ocaml/opam/issues/1879
jeffmo has quit [Ping timeout: 244 seconds]
jeffmo_ is now known as jeffmo
<agarwal1975> I imagine the opam repo getting more and more messy over time, but hey whatever… there could be other solutions.
<Bluddy[m]> there's garbage buildup anyway of packages that don't build/aren't maintained aren't used
<agarwal1975> NPM has 300,000 projects and somehow they’re managing.
<Bluddy[m]> what system do they use?
<Bluddy[m]> they famously also have packages containing one line of code, right?
<jmasseo_> or less
<agarwal1975> Maybe bucklescript will allow every ocaml package to be put on NPM too.
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
Denommus has quit [Quit: going home]
octachron has quit [Quit: Leaving]
agarwal1975 has quit [Ping timeout: 272 seconds]
<Bluddy[m]> agarwal1975: It's crazy how clean the syntax for solvuu-build is. I have to start using it asap.
orbifx has joined #ocaml
<orbifx> rgrinberg: here?
<rgrinberg> orbifx: yup
tmtwd has joined #ocaml
<orbifx> rgrinberg: has opium been "battle tested"; any projects out there receiving significant heat?
<rgrinberg> orbifx: not much. but it's really just a thin wrapper around cohttp that enforces a simple composition pattern (middleware)
<rgrinberg> and cohttp is "battle tested"
<rgrinberg> aka we know its limitations
<orbifx> security is my main concern here, not performance so much. Are the limitations you are refer to security related?
<rgrinberg> personally, i wouldn't run a cohttp server without something like nginx infront of it
<rgrinberg> we definitely don't account for things like slowloris
sh0t has quit [Remote host closed the connection]
<rgrinberg> but if you run it behind nginx, it should be "a-ok"
<orbifx> that is my plan yeah, but why behind nginx? performance or malicious queries?
<orbifx> also rgrinberg, does opium support unicode?
sillyotter has joined #ocaml
<orbifx> also to the wider channel, should I be using Camomile or BatUTF for unicode?
brunoro has joined #ocaml
sillyotter has quit [Client Quit]
<Drup> I would rather use bunzli's stuff
<Drup> uutf & co
darkf has joined #ocaml
<orbifx> Should have checked if he has done something. Should know better by now :P
<Bluddy[m]> Drup: of course, every bunzli lib sounds like a protocol name
brunoro has quit [Ping timeout: 264 seconds]
<Drup> for a website, camomile might work, it's really heavyweight, which is annoying
<Drup> (it will be more feature-complete)
<orbifx> I don't see what features I might need for this other than storing and a bit of parsin
<orbifx> need to find out by rgrinberg first if opium supports it
orbifx-m has joined #ocaml
<rgrinberg> orbifx: i'm not sure what opium supporting unicode would mean
<Drup> I doubt opium cares in any way
<orbifx> are parameters for example compatible with unicode?
brunoro has joined #ocaml
<orbifx> Drup: probably just passes the transparently
<orbifx> rgrinberg: I guess I can try to find out P
<orbifx> rgrinberg: it's probably late for you, but do you see any issues with: https://github.com/orbifx/logarion/blob/master/src/web.ml
<rgrinberg> no, but afaik url paths are ascii. if not then this is an issue with cohttp as well
<orbifx> rgrinberg: what about post parameters?
<rgrinberg> orbifx: those are usually url or multipart encoded. so they should work fine
<orbifx> also here is about internationalised URLs: https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Internationalized_URL
brunoro has quit [Ping timeout: 244 seconds]
<rgrinberg> if the charset is utf8, you will have to apply the decoding yourself though
<orbifx> seems to work for simple capture and save (no processing)
<orbifx> I just tried not a POST method and that is fine
orbifx has quit [Ping timeout: 272 seconds]
<orbifx-m> rgrinberg: let me know if you see anything amiss with my use of opium. Or any suggestions
<orbifx-m> The paths are experimental for now
<rgrinberg> orbifx-m: looks good so far :P
<rgrinberg> the Lwt_main.run in ymd_of_req might be a little sketchy though
<rgrinberg> orbifx-m: how come you're using batteries and not containers?
orbifx-m has quit [Ping timeout: 264 seconds]
orbifx-m2 has joined #ocaml
tmtwd has quit [Ping timeout: 244 seconds]