adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
andreas303 has quit [Remote host closed the connection]
malik has joined #ocaml
andreas303 has joined #ocaml
pigeonv has quit [Ping timeout: 260 seconds]
jao has joined #ocaml
amiloradovsky has quit [Ping timeout: 260 seconds]
vicfred_ has quit [Quit: Leaving]
vicfred has joined #ocaml
HyperMonkey has quit [Ping timeout: 245 seconds]
Anurag has joined #ocaml
Anurag has quit [Client Quit]
olle has quit [Ping timeout: 265 seconds]
olle has joined #ocaml
HyperMonkey has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mfp has quit [Ping timeout: 265 seconds]
kvda has joined #ocaml
kvda has quit [Client Quit]
kvda has joined #ocaml
kvda has quit [Client Quit]
waleee-cl has quit [Quit: Connection closed for inactivity]
kvda has joined #ocaml
[mark] has joined #ocaml
mbuf has joined #ocaml
_whitelogger has joined #ocaml
jao has quit [Ping timeout: 265 seconds]
zebrag has quit [Quit: Konversation terminated!]
narimiran has joined #ocaml
dborisog_ has joined #ocaml
malik has quit [Read error: Connection reset by peer]
vicfred has quit [Quit: Leaving]
sz0 has joined #ocaml
Haudegen has joined #ocaml
cantstanya has quit [Read error: Connection reset by peer]
andreas303 has quit [Write error: Connection reset by peer]
nicoo has quit [Read error: Connection reset by peer]
nicoo has joined #ocaml
andreas303 has joined #ocaml
foocraft[m] has joined #ocaml
cantstanya has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
madroach has quit [Remote host closed the connection]
HyperMonkey has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
kvda has joined #ocaml
kvda has quit [Client Quit]
olle__ has joined #ocaml
infinity0 has quit [Ping timeout: 264 seconds]
zmt01 has joined #ocaml
zmt00 has quit [Ping timeout: 260 seconds]
[mark] has quit [Quit: Konversation terminated!]
sleepydog has quit [Ping timeout: 260 seconds]
[mark] has joined #ocaml
[mark] has quit [Quit: Konversation terminated!]
mfp has joined #ocaml
peterbb has joined #ocaml
dckc has quit [Ping timeout: 256 seconds]
narimiran has quit [Quit: leaving]
dckc has joined #ocaml
amiloradovsky has quit [Ping timeout: 260 seconds]
peterbb has quit [Read error: Connection reset by peer]
pigeonv has joined #ocaml
tane has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
amiloradovsky has joined #ocaml
infinity0 has joined #ocaml
muskan has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
_whitelogger has joined #ocaml
foocraft[m] has joined #ocaml
foocraft[m] has quit [Changing host]
foocraft[m] has joined #ocaml
muskan has quit [Remote host closed the connection]
leah2 has quit [Ping timeout: 265 seconds]
leah2 has joined #ocaml
waleee-cl has joined #ocaml
HyperMonkey has joined #ocaml
andreas303 has quit [Ping timeout: 240 seconds]
<HyperMonkey> I'm having trouble getting started with Lwt. I'm trying to compile the tic example from ocsigen.org/tuto/6.4/manual/lwt , but I keep getting: This expression has type unit Lwt.tbut an expression was expected of type unit
<HyperMonkey> this is when trying to invoke tic from some kind of main
<HyperMonkey> like this: let () = (tic ());; I've tried longer forms that try to bind also
<HyperMonkey> with async I know I had to enter an event loop at some point, not sure how that works with Lwt
peterbb has joined #ocaml
<Leonidas> HyperMonkey: Lwt_main.run ?
<Leonidas> HyperMonkey: `Lwt_main.run @@ tic ()` or so
<Leonidas> It is somewhat easier than with Async, where the set-up to do so is rather lot of boilerplate :(
<HyperMonkey> hm ok that worked thaks
<Leonidas> no pobrem
<HyperMonkey> lol
* Leonidas :)
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
andreas303 has joined #ocaml
raver has quit [Read error: Connection reset by peer]
Haudegen has quit [Quit: Bin weg.]
Anurag has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Anurag has quit [Quit: Anurag]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<HyperMonkey> I dislike reading code with @@ in it .. use some parenthesis already .. remember that ML family is derived from Lisp
jbrown has quit [Ping timeout: 252 seconds]
Haudegen has joined #ocaml
<companion_cube> @@ is great
<companion_cube> don't overuse it, but ML is not a lisp (anymore?)
<olle__> how dare you
<olle__> SystemF is a Lisp
<companion_cube> is it now?
<companion_cube> I thought systemF is a type system, and lisp are a family of actual (mostly untyped) languages :p
<HyperMonkey> well Lisp came first and then ML was like "set's add strong static typing to Lisp" and code as data fell out
<HyperMonkey> let's*
<companion_cube> and let's add algebraic types, pattern matching, modules…
jbrown has joined #ocaml
<HyperMonkey> it appears that Lwt_io.read "blocks" until end-of-file before returning anything ... how do I specify to block until at least one byte is read and then return one or more bytes depending on that is available and convenient to the OS?
[mark] has joined #ocaml
leah2 has quit [Ping timeout: 260 seconds]
<companion_cube> there are other functions, I think
<companion_cube> I forgot if Lwt.read is the one returning the whole content
<companion_cube> but you can write into a `bytes`, for example
<HyperMonkey> maybe I just have to specify ~count the docs are ambiguous as to what that does exactly
<HyperMonkey> yeah it works now
<HyperMonkey> I have make echo server in Lwt ..
leah2 has joined #ocaml
jao has joined #ocaml
jao is now known as Guest97871
Guest97871 has quit [Remote host closed the connection]
jao- has joined #ocaml
FreeBirdLjj has joined #ocaml
<HyperMonkey> how do I get >>= without opening all of Lwt? I tried open Lwt.Syntax but it didn't work
<companion_cube> open Lwt.Infix
<HyperMonkey> thanks .. found a couple places where I hadn't prefixed Lwt
<HyperMonkey> ok so switching from async to lwt brings my binary down from 20M to 5.2M .. nice
<companion_cube> :DDD nice
dckc has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
dckc has joined #ocaml
Anarchos has joined #ocaml
<HyperMonkey> what's the deal with unikernel/mirage? doesn't the virt layer slow things down somewhat? isn't it better to just avoid dependencies on other programs and compile to PID1 for example?
<HyperMonkey> and how do I get ocamlopt to produce a static binary? I couldn't find anything that looked relevant in the manpage
<Anarchos> HyperMonkey is'nt it static by default ?
<HyperMonkey> found you need `-ccopt -static`
<HyperMonkey> but I get these warnings: using X in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
<HyperMonkey> so producing a static pid1 binary that can work without other files might be a bit challenging (but not on the order of mirage)
<HyperMonkey> apparently alpine is the solution to that rgrinberg.com/posts/static-binaries-tutorial/
raver has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
andreas303 has quit [Remote host closed the connection]
<HyperMonkey> ah apparently there is even opam switch for musl
<HyperMonkey> some people say it doesn't work properly though
<HyperMonkey> what have I got to lose by trying to rebuild my opam cache with musl switch ...
andreas303 has joined #ocaml
X-Scale has joined #ocaml
andreas303 has quit [Ping timeout: 240 seconds]
andreas303 has joined #ocaml
Haudegen has joined #ocaml
zebrag has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
TheRuralJuror has joined #ocaml
Anarchos has quit [Read error: Connection reset by peer]
Anarchos has joined #ocaml
olle__ has quit [Ping timeout: 260 seconds]
mbuf has quit [Quit: Leaving]
<HyperMonkey> well now with musl I get a fully statically linked binary at 4.5M .. not bad
<companion_cube> pretty ok indeed
<olle> (lambda calculus is a lisp?)
<companion_cube> (no)
<olle> (booo)
<HyperMonkey> the first two sentences in wikipedia for ML reads: ML is a ... language. It has roots in Lisp, and has been characterized as "Lisp with types".
<olle> (ada lovelace was a lisper, as was weaving machines)
<olle> leibniz loved lisp
<olle> How much proof do you need?
<simpson> olle: The lambda calculi are oriented around abstraction and application alone. nCat has a good overview of the bigger picture, but their framing might be too generic: https://ncatlab.org/nlab/show/lambda-calculus
<olle> i had a book about that, used to study a little bit
<olle> back in the good old days
<companion_cube> HyperMonkey: that's a bad characterization, imho
<companion_cube> lisp without macros, with types, with pattern matching, …
<olle> (defun pattern-match ...) :D
<olle> wait, maybe it's lambda in lisp, defun in scheme...
<olle> "a programmer is a language designer"
<olle> behold! a new dsl for each code-base.
<simpson> It's because a single lambda-abstraction is as powerful as *any* Turing-complete abstraction. You might hear the meme "lambda, the ultimate" because of this.
<simpson> The amount of code required to *implement* the abstraction can balloon quite quickly, which is an interesting caveat. Another way to think of it, from the Lisp/macros perspective, is that an abstraction can only be worth a certain amount of generated code.
<companion_cube> languages are not just code, they're also social conventions
<companion_cube> if you add static typing and sum types to your lisp
<companion_cube> it doesn't matter because no one else does
<simpson> olle: I *really* like Shutt's perspective on this, but be warned that Shutt is dense and you'll need to go one paragraph at a time: https://fexpr.blogspot.com/2013/12/abstractive-power.html
<companion_cube> (but then, again, everyone does their own silo'd DSL)
<simpson> companion_cube: Yes. This idea of fragmented dialects is really important. C++ is a great example ecosystem, where libraries like Boost form their own fresh versions of the C++ language.
sleepydog has joined #ocaml
<simpson> Indeed, IIUC, this is what led to the idea of "Common" Lisp! People wanted to unify all the different dialects that they had evolved.
<companion_cube> and common lisp is very different than a ML
<companion_cube> 🤷
TheRuralJuror has quit [Ping timeout: 256 seconds]
<simpson> Yeah. Like, wouldn't SML be "Common" ML? The entire attitude that the community has towards standardization and common code reuse seems very different.
<companion_cube> SML should be the common ML, but it's been dead for years…
[mark] has quit [Read error: Connection reset by peer]
[mark] has joined #ocaml
<simpson> Right! And, from the perspective of write-once-compile-anywhere, not many dialects can really import SML modules as-is, right? So it's not at all the Lispy ball of mud. (And whoever coined the snowball meme already knew all of this.)
<companion_cube> I'm not following
<companion_cube> SML compilers can use SML code
<companion_cube> OCaml is its own language
<olle> simpson: nice link
<simpson> Right. But there's Lispy textual syntax which makes up a linguafranca between programmers, and Common Lisp can be seen as an attempt to reverse-engineer that common way of expressing stuff.
<olle> Don't have to go to C++, C macros have the same tendency
<companion_cube> oh god no
<companion_cube> simpson: are you saying that CL is trying to be a universal language?
<companion_cube> (I'd strongly disagree, but well)
<simpson> companion_cube: No, I'm saying that when folks in PLT circles type out stuff like (+ x y z) that they are expressing a common semantics that isn't tied to any particular Lisp dialect, and that since ML doesn't have a similar textual syntactic tradition, there's no similar interchange which could lead to module intercompatibility.
waleee-cl has quit [Quit: Connection closed for inactivity]
<simpson> olle: Right. For example, I'm currently learning a "library", Cello, which is implemented as C macros. I'm treating it as basically its own language, because it replaces so much of typical C. http://libcello.org/
<companion_cube> what if they write `(define f …)`?
<companion_cube> or `deffun f` or whatever it is ?
<olle> simpson: have a look at the PHP source code, not a line without a macro
<simpson> Then you know which of the two major accents they speak.
<companion_cube> or `lambda` instead of `fn`?
<simpson> Another example community that I'm
<companion_cube> the few PLT people I know use tiny toy languages to talk about their types, and would use `a+b` for sums
<simpson> *that I'm more fluent with would be Forth, where even just "DUP DROP" vs "dup drop" gives interesting accent information, despite denoting the same tokens and semantics.
<companion_cube> well, maybe lisps have a bit of syntax in common (basically, function application); so do MLs (basically, function application); and so… ? :p
<olle> companion_cube: i thought you were a plt person :D
<companion_cube> I'm not, I'm into computational logic
<companion_cube> whole different world! :p
<olle> what's that?
<olle> curry-howard?
<companion_cube> automat{ed,ic} theorem proving
Haudegen has joined #ocaml
<olle> kk
<simpson> companion_cube: Type-driven, not syntactic, probably? Like, HOL or Coq or Idris, but *not* Metamath?
<companion_cube> actually not, I like classical logic
<companion_cube> (my jam used to be automatic proving in first order logic, now I've drifted towards higher order logic)
<simpson> Interestingly, there is a linguafranca project for HOL, OpenTheory: http://www.gilith.com/opentheory/ I've tried writing a bit of an interpreter for their stuff, but there's a lot of foundational stuff that has to be set up.
<companion_cube> yes, I'm using that actually!
<companion_cube> it's a bit ugly, but I like that it gives a lot of theorems for free if you have a HOL
<simpson> Yeah, that's largely what drew me to it. I'm very interested in not just category theory, but categorical presentations: Given that we've proved that there's only one of something, can't we just write it down exactly once and be done with it forever?
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
<companion_cube> well depends on how you prove it
<simpson> In a topos, using boring topos tools, right? Like, if the topos theory dream was that we could just do mathematics anyplace, then can't we have a dream of just running proofs anyplace?
FreeBirdLjj has quit [Remote host closed the connection]
<companion_cube> I have no idea, I'm not into CT :p
<simpson> I don't know. I get off into the clouds quickly when wondering about this stuff, sorry. There's a parallel thread in ##programminglanguages where we're discussing Lisp and ML syntax.
vicfred has joined #ocaml
<olle> how do I update opam?
<olle> self-upgrade?
<olle> god, they don't have that option
<olle> why??
<olle> why would a build system not include itself?
zebrag has quit [Quit: Konversation terminated!]
<companion_cube> it's a package manager, not a build system
<companion_cube> not all package managers do that, btw, it's tricky
zebrag has joined #ocaml
<olle> hm
peterbb has quit [Quit: peterbb]
<d_bot> <Bluddy> to be honest, opam could bootstrap itself. install a local, updated version of itself, and then call that version if it finds it.
<companion_cube> maybe, but I'd rather they focus on more useful things
<d_bot> <Bluddy> I don't even think it's that hard. Just have opam be a package on opam.
<d_bot> <Bluddy> that what pip does.
<d_bot> <Bluddy> that's what pip does.
<companion_cube> and what if opam is installed on a non-user-writable path?
<d_bot> <Bluddy> check for the existence of another opam executable in the .opam directory and call it, passing all arguments.
<companion_cube> but on which switch? :p
<d_bot> <Bluddy> presumably the current switch is set.
<companion_cube> better make sure they're all compatible then :D
<companion_cube> otherwise you could have `opam sw` fail because it's the wrong opam…
<d_bot> <Bluddy> you'd need some kind of scheme to choose which switch should store the default opam, but I don't think it's a huge barrier.
<companion_cube> I'd rather have a working system switch and a good lockfiles workflow
<companion_cube> opam 2.1 might be able to address the latter
<d_bot> <Bluddy> working system switch?
<companion_cube> the system switch has been broken ~ forever
<d_bot> <Bluddy> oh I see.
<d_bot> <Bluddy> why is that a problem?
<d_bot> <Bluddy> (I mean, i get that it's not great, but why is that an issue for you personally?)
<companion_cube> well I'd like to not pay 1GB per new switch, you know
<companion_cube> I have small SSDs
<companion_cube> I also have a working OCaml compiler from my distro, it's a shame it's not being put to use
<d_bot> <Bluddy> can't you uninstall the ocaml compiler from your distro once you install the local switch?
<d_bot> <Bluddy> I mean, I get that some people want to use their package manager instead
Haudegen has quit [Ping timeout: 256 seconds]
Haudegen has joined #ocaml
<d_bot> <Bluddy> 1GB per new switch is just bad sharing
<d_bot> <Bluddy> I wonder if opam will ever be able to catch up to esy in that sense
madroach has joined #ocaml
[mark] has quit [Ping timeout: 260 seconds]
[mark] has joined #ocaml
zebrag has quit [Read error: Connection reset by peer]
zebrag has joined #ocaml
inkbottle has joined #ocaml
zebrag has quit [Ping timeout: 240 seconds]
<d_bot> <Et7f3> Esy can only share native package (because they doesn't have a dependency on ocaml) but for other: esy has to rebuild the new package.
muskan has joined #ocaml
<companion_cube> and esy has weird padding hacks, too
<olle> why is -linkpkg needed?
<olle> why isn't it implied?
<companion_cube> because you could be building a library I guess?
<olle> isn't that already explicit?
<olle> or am i confusing it with C?
<companion_cube> 🤷
<olle> i dunno
<olle> i got this golden message from the websocket example:
<olle> Fatal error: exception (Failure "resolution failed: no scheme")
<olle> Failure...
<companion_cube> does the example use `failwith` as a shortcut?
<olle> companion_cube: no, and there's no such string "no scheme" in the example source
<companion_cube> maybe it's in the stdlib, idk, looks like a DNS error
<olle> compile with -g i guess?
<olle> hm
<robi> no scheme sounds like a missing protocol
<olle> ya
<robi> check the websocket string
<robi> whether it has ws or wss prefix
<companion_cube> good call
<robi> if it has neither then it would blow up, but that's a miserable error message
<d_bot> <khady> > I wonder if opam will ever be able to catch up to esy in that sense
<d_bot> <khady> If it is possible to extract from esy the code that is doing the path replacement in build artifacts, then it is not hard to make the necessary changes in opam. I’ve been planning to have a look at that for a long time but I’m a bit too lazy to code out of work during lockdown
<companion_cube> question is, do opam devs want that?
<olle> robi: this is only the server
<robi> it could also be http/s
<khady[m]> Opam devs don’t have to be involved. It would be using the hook system that is already in place
<robi> does the server try to request from any APIs?
<olle> wait...
<olle> sorry, i'm retarded
<olle> must run with -s to start as server
<olle> but yeah, that error message...
<robi> it should've been a ValueError (or ocaml's equivalent, not an ocaml expert here) with "expected ws/wss scheme in URL"
Haudegen has quit [Quit: Bin weg.]
Haudegen has joined #ocaml
<olle> hm
<robi> that failure message sounds like one of those old UNIX error message jokes
<robi> $ PATH=pretending which sense
<robi> no sense in pretending
<olle> haha
<olle> sockstat doesn't show anything listening :d
peterbb has joined #ocaml
<robi> would be great to get the source code if that's not a problem
<olle> robi: yes, it's on github, sec
<olle> (not mine)
<robi> cool
<HyperMonkey> is there a simple tool-based way to get the name of a library that provides a module? I keep having to google what to add in -package
<companion_cube> not really :/
<olle> should be same module name as package name?
<companion_cube> sadly not
<robi> olle: not necessarily
<olle> D:
<companion_cube> the situation may improve soon-is
<companion_cube> h
<companion_cube> but it's a mess currently
<robi> why is it not `open package.module'?
<robi> C does it better! #include <lib/component.h>
<robi> or ideally you would be able to use packages like a filesystem, like include paths in C
<robi> open package/SomeModule
<companion_cube> C doesn't have namespaces, so… no :DD
<companion_cube> https://github.com/ocaml/RFCs/blob/master/rfcs/ocamlib.md <-- look at that though
<robi> C does have namespaces, if the library author is disciplined
<robi> don't be like ncurses
<companion_cube> C has social conventions that try to emulate namespaces
<robi> yes, that's what i was getting at
<robi> but the namespaces discussion is besides the point
<robi> even if modules aren't a 1:1 mapping for files in a package, you should still be able/encouraged (forced?) to prefix the package name
dborisog_ has quit [Ping timeout: 265 seconds]
<companion_cube> the package is just not an OCaml thing
<companion_cube> (just like an apt package isn't a C thing)
<companion_cube> the RFC above tries to make it so that library name = module name, at least, which would indeed be nice
<robi> wouldn't that mean limiting packages to a single module?
<robi> or at least a single importable one
<olle> pfff, fails with Fatal error: exception Websocket.Protocol_error("Bad headers") when connecting from browser. booo.
<companion_cube> robi: modules can be nested
<companion_cube> dune already does that by default, actually
<robi> that's odd
peterbb has quit [Read error: Connection reset by peer]
<olle> Fatal error: exception Websocket_lwt_unix.HTTP_Error("Malformed request HTTP version:
<olle> i got this working 6 years ago
<olle> dunno wtf happened since then ><
<olle> gonna check my old code-base...
<companion_cube> are you trying to access it via a secure connection?
<olle> companion_cube: tried both ws and wss, but i don't have anything setup locally, no server or such
[mark] has quit [Quit: Konversation terminated!]
peterbb has joined #ocaml
<HyperMonkey> where can I find a balanced binary search tree implementation for ocaml? deletion optional but a plus
<companion_cube> HyperMonkey: `Map` or `Set`
olle__ has joined #ocaml
olle__ has quit [Ping timeout: 265 seconds]
<olle> bitstring.syntax is the old p4 stuff, right?
<olle> and now it's ppx_bitstring?
<companion_cube> bitstring.ppx I think
<olle> hm i'll try thanks
<olle> sigh, can't install ppx_bitstring because of conflicts now
<olle> the websocket lib i used before is 8 years old, but at least it worked for me
<olle> but, of course it depends on p4 etc
<olle> - ppx_bitstring -> bitstring < 3.0.0 -> ocaml < 4.06.0 -> ocaml-base-compiler < 4.06.0
<olle> does this mean ocaml strictly lesser than 4.06?
<olle> so 4.05?
<companion_cube> it's just bitstring
<companion_cube> and bitstring.ppx
<olle> no such package in opam (bitstring.ppx)
<companion_cube> it's just bitstring
<companion_cube> bitstring.ppx is a subpackage
<olle> ok
<olle> hm
<olle> companion_cube: you know what happened to Lwt_unix?
<companion_cube> it's in lwt.unix?
<olle> dunno
<olle> what's "lwt.unix"?
<olle> a submodule or a package?
<companion_cube> submodule
<olle> ah
<companion_cube> I mean
<companion_cube> sub-library of `lwt`
<olle> how do i access it if lwt is linked? Lwt.Lwt_unix did not work
<olle> I have
<olle> ocamlfind ocamlc -g -thread -package "unix threads num extlib cryptokit bitstring lwt" -for-pack Lwt_websocket -c channel.mli
<olle> but get
<olle> Error: Unbound module Lwt_unix
<HyperMonkey> what if you add lwt.unix to packages?
<olle> source is just
<olle> 13 val accept : Lwt_unix.file_descr -> (channel * Lwt_unix.sockaddr) Lwt.t
<olle> HyperMonkey: how could it be a package if it's not a package in opam? maybe i'm confused
<olle> ocaml package != opam package?
<olle> HyperMonkey: worked
<olle> ><
<olle> hm, do i need to open bitstring to use expressions like match%bitstring?
<companion_cube> you need to use the ppx
<companion_cube> I strongly suggest you use dune
<olle> companion_cube: it's not my lib, i'm just adjusting the makefile
<companion_cube> ah well, good luck with taht…
<olle> companion_cube: not just a compiler switch? -ppx, and bitstring.ppx package?
<companion_cube> don't ask me, you'll have to read a lot of docs
<olle> hm
<HyperMonkey> I think the name of the ppx program follows -ppx
<olle> HyperMonkey: i'm including bitstring.ppx now
<companion_cube> yeah but bitstring.ppx is probably a lib, not an executable
<companion_cube> you're going to have to read through years of design changes for ppx
<companion_cube> (and ppx drivers and whatnot)
<olle> huh?
<olle> they just changed "bitmatch bits" to "match%bitstring bits"
<companion_cube> I mean, the way ppx extensions work
<companion_cube> not this ppx in particular
<olle> ok
<olle> misunderstanding, i'm not changing an old version of bitstring, just a lib that depends on bitstring p4
<companion_cube> I know
<companion_cube> but to use modern ppx without dune, you're going to have to learn how it's compiled
<olle> are you kidding me?
<companion_cube> no I'm not
<olle> so no -syntax ppx?
<companion_cube> not even sure what `-syntax` is
<olle> ah wait
<octachron> You need to compile the ppx lib into a ppx executable.
<olle> companion_cube: that's old ocamlp4o compiler stuff
<companion_cube> ah, well
<olle> wait wait
zebrag has joined #ocaml
<olle> it was enough to add `|` after { and before } in the syntax extension usage
inkbottle has quit [Ping timeout: 256 seconds]
<olle> no Makefile changes except bitstring.ppx
<olle> now i just have a "normal" compiler type error (int, unit, bla bla)(
muskan has quit [Remote host closed the connection]
waleee-cl has joined #ocaml
<olle> urmagerd, it compiled :O
<olle> HyperMonkey: hehe, get what you mean now, gotta google to find the including package
<olle> isn't mutex stdlib?
<olle> i get this
<olle> Error: No implementations provided for the following modules:
<olle> Mutex referenced from /home/rock64/.opam/4.07.0/lib/lwt/unix/lwt_unix.cmxa(Lwt_main)
<HyperMonkey> did you set -thread?
<olle> ah
<olle> no
<olle> HyperMonkey: cool, worked! thank you
<olle> OK, I can connect now from the browser
<olle> so weird
<olle> maybe i don't understand how to setup ssl or tsl correctly in the new lib
<olle> also, the latest websocket lib just fails immediately if it's not tls (tsl?)
<olle> sorry for spamming and thanks for feedback
<olle> enjoy the weekend, guys (and girls)
Anarchos has joined #ocaml
HyperMonkey has quit [Remote host closed the connection]
pigeonv has quit [Ping timeout: 246 seconds]
HyperMonkey has joined #ocaml
jnavila has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
peterbb has quit [Read error: Connection reset by peer]
peterbb has joined #ocaml
Haudegen has joined #ocaml
nullifidian__ has quit [Quit: Leaving]
<olle> shouldn't lwt support session types?
<companion_cube> well, it's written in OCaml, so, no
<Anarchos> olle what are session types ?
<olle> Anarchos: not sure :D
<olle> but, afaik, one way to enforce protocol order statically
<Anarchos> ok
<companion_cube> seems pretty annoying to use
<olle> i'd argue it's neither more nor less laborous than lwt itself.
<olle> saying that without using any... just glancing the examples. :|
peterbb has quit [Read error: Connection reset by peer]
<olle> but i guess it's moot if you-know-who can finish and merge you-know-what
peterbb has joined #ocaml
<companion_cube> well it's laborious in addition to lwt
<olle> i had a dream that it could be included like "behind" lwt or something, but i'm not competent enough to judge that
<olle> since the session-type system seem to use Thread module already
<olle> give it to an INRIA master student ^^
<Anarchos> olle vilain !!
<companion_cube> olle: so that it's never merged? sure
<olle> vilain? i don't speak french, sorry
<olle> companion_cube: lol
peterbb has quit [Read error: Connection reset by peer]
* Anarchos looks for users of dypgen
pigeonv has joined #ocaml
jnavila has quit [Quit: Konversation terminated!]
runawayfive has quit [Ping timeout: 272 seconds]
vicfred has quit [Quit: Leaving]
vicfred has joined #ocaml
runawayfive has joined #ocaml
<HyperMonkey> is there a ppx or something that blocks partial applications of functions?
<HyperMonkey> or warns about them?
<HyperMonkey> I just read the article blog.janestreet.com/the-dangers-of-being-too-partial
<Anarchos> who experience 'functional value' error while marshalling ?
Haudegen has quit [Quit: Bin weg.]
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
tane has quit [Quit: Leaving]
<d_bot> <Et7f3> @HyperMonkey for unit/or value you don't care you can use `let _: type = f args` if you omit the annotation the compiler will complain. You can try to enable warning 5 https://github.com/ocaml/ocaml/blob/79f1c734621ea75bfacaed9ea20ebef7479194b2/utils/warnings.ml#L707
<olle> another master student assignment: extend ocsigen with websockets.