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
serge has joined #ocaml
serge has quit [Ping timeout: 260 seconds]
Haudegen has quit [Ping timeout: 260 seconds]
fds has quit [Ping timeout: 255 seconds]
spew has quit [Quit: Connection closed for inactivity]
serge has joined #ocaml
serge has quit [Ping timeout: 240 seconds]
RalfJ has quit [Ping timeout: 272 seconds]
RalfJ has joined #ocaml
serge has joined #ocaml
RalfJ has quit [Ping timeout: 272 seconds]
serge has quit [Ping timeout: 260 seconds]
serge has joined #ocaml
serge has quit [Ping timeout: 240 seconds]
RalfJ has joined #ocaml
serge has joined #ocaml
RalfJ has quit [Ping timeout: 272 seconds]
serge has quit [Ping timeout: 240 seconds]
malina has joined #ocaml
wingsorc has joined #ocaml
serge has joined #ocaml
serge_ has joined #ocaml
serge has quit [Ping timeout: 240 seconds]
serge_ has quit [Ping timeout: 260 seconds]
serge has joined #ocaml
serge has quit [Ping timeout: 255 seconds]
RalfJ has joined #ocaml
RalfJ has quit [Ping timeout: 272 seconds]
RalfJ has joined #ocaml
webshinra has quit [Remote host closed the connection]
serge has joined #ocaml
serge has quit [Ping timeout: 240 seconds]
mahmudov has quit [Remote host closed the connection]
serge has joined #ocaml
serge has quit [Ping timeout: 240 seconds]
wingsorc has quit [Ping timeout: 240 seconds]
ecrok has joined #ocaml
<ecrok> hi
<ecrok> hi
<ecrok> hi
ecrok has left #ocaml [#ocaml]
kleisli has quit [Ping timeout: 260 seconds]
quiso has joined #ocaml
<quiso> hi
<quiso> hi
<quiso> hi
quiso has left #ocaml [#ocaml]
Droheq_ has joined #ocaml
<Droheq_> hi
<Droheq_> hi
<Droheq_> hi
Droheq_ has left #ocaml [#ocaml]
Criephoakl has joined #ocaml
Criephoakl has left #ocaml [#ocaml]
<companion_cube> I wonder if we should set +s to force ssl here
<companion_cube> it tends to repel spammers afaik
eghiogray has joined #ocaml
eghiogray has left #ocaml ["hi"]
plah has joined #ocaml
plah has left #ocaml ["hi"]
Yoasl has joined #ocaml
<Yoasl> hi
<Yoasl> hi
<Yoasl> hi
Yoasl has left #ocaml ["hi"]
mbuf has joined #ocaml
tormen_ has quit [Ping timeout: 240 seconds]
kleisli has joined #ocaml
<nicolaus> Hi, I have this module1.ml then this module1.ml would like to create multiple instance of module2.ml
<nicolaus> how can i achieve this?
mfp has quit [Ping timeout: 245 seconds]
malina has quit [Remote host closed the connection]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
mbuf has quit [Remote host closed the connection]
mbuf has joined #ocaml
oni-on-ion has quit [Ping timeout: 258 seconds]
callcc[m] has joined #ocaml
dborisog has joined #ocaml
malina has joined #ocaml
narimiran has joined #ocaml
vicfred has quit [Quit: Leaving]
<vsiles> nicolaus: can you be more explicit about their content and you mean by multiple instances ?
<vsiles> you might have to use "real" modules, and not file as modules (not sure)
<nicolaus> sorry, I named my files like [name]module.ml
<nicolaus> like one sort of main function would create multiple instances of one function
<vsiles> still a bit confused. Go to go commute, I'll be back afterwards. Feel free to drop some actual code if you can :)
<nicolaus> yes sorry, I also don't know how to specifically point it out on words without code. :)
mbuf has quit [Ping timeout: 258 seconds]
webshinra has joined #ocaml
Serpent7776 has joined #ocaml
<callcc[m]> I am making quickjs bindings in ocaml, and I have a problem
<callcc[m]> there are two different JSValue define in quickjs.h, decided by JS_NAN_BOXING .
<callcc[m]> my questions is, what is the best way to define JSValue in ctype?
Serpent7776 has quit [Remote host closed the connection]
Serpent7776 has joined #ocaml
mbuf has joined #ocaml
<vsiles> nicolaus: back online. Feel free to drop some examples :D
RalfJ has quit [Remote host closed the connection]
RalfJ has joined #ocaml
mbuf has quit [Ping timeout: 255 seconds]
mbuf has joined #ocaml
toppler` is now known as toppler
nullcone has quit [Quit: Connection closed for inactivity]
RalfJ has quit [Ping timeout: 272 seconds]
<nicolaus> hi vsiles, as far as I have read and searched. I think the term is concurrency. Running the same lines of code via different threads.I don't know if it makes sense to you already
RalfJ has joined #ocaml
<vsiles> you have a function f in a module A and you want to run multiple instances of it on different inputs, concurrently, in a module B
<vsiles> something like that ?
<nicolaus> i am planning to call a function in module B from module A. module A stores the ID of all the instances of module B
<nicolaus> So, A decides which module B thread/process to kill
<nicolaus> I am also planning that module A can still send functions/signals to module B while running
<nicolaus> i don't have a sample code yet because I don't know still how to implement it.
<vsiles> What I don't get is what you mean by "intances of module B" ? If moduleB.ml wants to call a function in moduleA.ml, you just have to build them both and use moduleA.f() in moduleB. I guess it's the architecture of moduleB I'm not getting
<def`> maybe there is global state in the module?
kleisli has quit [Ping timeout: 255 seconds]
dmiles has quit [Ping timeout: 268 seconds]
<nicolaus> No, module A calls module B. moduleA then stores some kind of process ID's or any identifier of running instances of module B.
mbuf has quit [Quit: Leaving]
<vsiles> a module is a bunch of code, it's not a process/executable, so I'm really lost, sorry
<vsiles> do you want to do actual process management ? moduleA forks a bunch of new process executing moduleB, and keeping tab on them ?
<nicolaus> ahh that's why we did not understand each other, because i keep using module as a term. lol
<nicolaus> but yes, that's my plan
<nicolaus> and hopefully still be able to send out functions to these processes
<vsiles> I don't know much about system programming in ocaml but I'm pretty sure it provides fork/exec and things like that. If you want multi-thread (not processes), you should at least look at the Lwt library (but I'm not the best to answer about that)
dhil has joined #ocaml
ggole has joined #ocaml
<nicolaus> thanks vsiles
<Leonidas> Lwt does not do multi threading, in the same way as Async does not do multithreading
<Leonidas> nicolaus: I think you should describe the problem you want to solve, not your attempts to solve it since the way you describe things it makes it harder to understand
FreeBirdLjj has joined #ocaml
<nicolaus> Leonidas, these instances that I do want to keep track would receive asynchronous data and I want to work on those data immediately that's why I am thinking of implementing it by multiple threads of the same program/lines of code
sarna has joined #ocaml
<Leonidas> yeah, then you don't need any threads at all
<Leonidas> just use Async/Lwt
<nicolaus> ohh, ok. i'll check it out
<nicolaus> thank you so much for the help
mbuf has joined #ocaml
vicfred has joined #ocaml
rzmt has quit [Ping timeout: 265 seconds]
<Nikkel> I have a design question
<Nikkel> I want to use yojson to create a deriver for a list of (string, string list) assocs
<Nikkel> but I don't know how to define it here.
andreas303 has quit [Ping timeout: 240 seconds]
andreas303 has joined #ocaml
<Leonidas> an assoc is just a `(string, Yojson.t) list`
<Leonidas> nicolaus: oh, now I get it. You can't just specify random keys in assocs in ppx_deriving_yojson
dhil has quit [Ping timeout: 240 seconds]
<Leonidas> ppx_deriving_yojson maps a an JSON object to a record, and a record has to have fixed keys.
dhil has joined #ocaml
Serpent7776 has quit [Quit: Leaving]
spew has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
gareppa has joined #ocaml
gareppa has quit [Quit: Leaving]
<companion_cube> seems like +S kept the spammer away \o/
<simpson> The spam stopped hours ago, based on logs of the only other channel I saw which had it. There was not much, all told.
<companion_cube> still, it's interestingly correlated
<simpson> Sure. I'm merely trying to temper false-positive readings.
malina has quit [Ping timeout: 240 seconds]
<companion_cube> well it also worked on another chan I'm on, a while ago :)
<reynir> Yea, it works fairly well from what I hear, but it also keeps some legit users away I'm afraid
<companion_cube> I mean, who uses a client that can't SSL?
<companion_cube> bots, I understand, but clients…
<reynir> Probably basically none
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
dhil has quit [Ping timeout: 240 seconds]
nullifidian__ has joined #ocaml
nullifidian_ has quit [Ping timeout: 260 seconds]
<CcxWrk> I'm not sure if the official webchat is marked as TLS (even though people access it via HTTPS)
<companion_cube> what's the official webchat using, remind me?
<CcxWrk> Oh, they moved to Kiwi now. Was patched qWebIRC before I think.
<companion_cube> can't find the URL for that actually, where is it listed? :)
<Leonidas> companion_cube: https://webchat.freenode.net/
<Leonidas> basically https://freenode.net/ and the leftmost of the 3 large buttons :)
<companion_cube> I mean, I thought there was a link on ocaml.org or something :p
testcaml has joined #ocaml
<Leonidas> companion_cube: there's just an irc:// URI here: https://ocaml.org/community/
<testcaml> ah, seems to work o/
testcaml has quit [Remote host closed the connection]
<Leonidas> (curiously, the link is behind Meetup (which finds 0 meetups in less than infinite distance from my location) and G+ (which is dead))
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
<gahr> I am trying to use let* but I get an error let operators are not supported before OCaml 4.08
<gahr> my compiler is 4.09
<companion_cube> are you sure you're in the right opam environment?
<gahr> at least by judjing by _build/log, which mentions /usr/home/gahr/.opam/4.09.0/bin/ocamlc.opt
<gahr> I have ppx_let v0.13.0 Monadic let-bindings
<companion_cube> not sure if you still need ppx_let though
<gahr> right I just tried with and without, same error
<gahr> core uses it, so I can't just uninstall it
<companion_cube> 🤷 no idea then, sorry
<gahr> opam switch says
<gahr> → 4.09.0 ocaml-base-compiler.4.09.0 4.09.0
<companion_cube> did you `eval $( opam env )` though?
<companion_cube> ah yeah, OMP, damn
<rks`> :)
<gahr> OPAM_SWITCH_PREFIX=/usr/home/gahr/.opam/4.09.0
<gahr> CAML_LD_LIBRARY_PATH=/usr/home/gahr/.opam/4.09.0/lib/stublibs:/usr/home/gahr/.opam/4.09.0/lib/ocaml/stublibs:/usr/home/gahr/.opam/4.09.0/lib/ocaml
<gahr> OCAML_TOPLEVEL_PATH=/usr/home/gahr/.opam/4.09.0/lib/toplevel
<companion_cube> yeah it's just that a library tries to port your code back to the 4.07 AST
<companion_cube> which doesn't have let operators
<gahr> how do I figure which one?
<gahr> must be one of the ppx I'm using I guess
mbuf has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
dhil has joined #ocaml
<Leonidas> most likely
<Leonidas> maybe you can then just use dune rewriting %)
<companion_cube> moar magic…
<gahr> I don't know what that means.. I'm very entry level..
ygrek__ has joined #ocaml
<Leonidas> gahr: dune has a mode where it does what ppx_let does but for the let* syntax
<gahr> ah cool, how do I turn it on?
<Leonidas> companion_cube: don't want to drop the @? :p
<Leonidas> personally I'm holding out and not using the let* syntax to begin with
<gahr> why?
<companion_cube> Leonidas: you scared? :p
<Leonidas> without a matching match* it is strictly less useful than ppx_let
<gahr> I'm using match (foo, bar) with | (Some foo, Some bar) -> Some (do something with foo and bar) | _ -> None
<gahr> let* foo = foo in let* bar = bar in Some (do soemthing with foo and bar)
<gahr> is nicer
<Leonidas> one could argue that the way the monad is specified in ppx_let is somewhat clearer but thats arguable and frankly I don't really use it
<companion_cube> I also holding out from all ppx :p
<gahr> that might help...
<Leonidas> gahr: I often have cases like `match%map request () with | Ok v -> … | Error … -> …`
<Leonidas> with let I would need to introduce a rather pointless binding
<gahr> got to run, thanks
<companion_cube> is it like `request () >|= function …` ?
<Leonidas> companion_cube: yes
<dash> Not gonna let automation steal your code writing job eh
<Leonidas> companion_cube: I actually used that a lot even in my Lwt code
<companion_cube> yeah `match%lwt` was nice
<Leonidas> `match%bind` works with Lwt too :p
<companion_cube> god I hate pervasive monads so much
<dash> Ready for lessnads
<companion_cube> ready for effects
nullcone has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #ocaml
Jesin has quit [Quit: Leaving]
FreeBirdLjj has quit [Ping timeout: 272 seconds]
Jesin has joined #ocaml
mahmudov has joined #ocaml
FreeBirdLjj has joined #ocaml
amiloradovsky has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
<companion_cube> gosh, batteries 3.0… didn't think I'd live to see that day :D
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 272 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<thizanne> wait until it becomes trendy again
<companion_cube> I wouldn't hold my breath
FreeBirdLjj has joined #ocaml
mrd_ has joined #ocaml
mrd_ has quit [Client Quit]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
mrd has quit [Quit: the quit message at the end of the universe]
mrd has joined #ocaml
mrd has quit [Changing host]
mrd has joined #ocaml
FreeBirdLjj has joined #ocaml
ggole has quit [Quit: Leaving]
kleisli has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 272 seconds]
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
andreas303 has quit [Remote host closed the connection]
andreas303 has joined #ocaml
dborisog has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
oni-on-ion has joined #ocaml
TC01 has quit [Ping timeout: 265 seconds]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
TC01 has joined #ocaml
leah2 has quit [Remote host closed the connection]
leah2 has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
leah2 has quit [Remote host closed the connection]
leah2 has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
narimiran has quit [Ping timeout: 258 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 272 seconds]
sagax has quit [Ping timeout: 272 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
Jesin has quit [Quit: Leaving]
FreeBirdLjj has joined #ocaml
Jesin has joined #ocaml
amiloradovsky has quit [Ping timeout: 240 seconds]
amiloradovsky has joined #ocaml
TakinOver has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 258 seconds]
Jesin has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
mahmudov has quit [Ping timeout: 265 seconds]
amiloradovsky has quit [Ping timeout: 248 seconds]