companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.11 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.11/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
_whitelogger has joined #ocaml
hockpa2e has joined #ocaml
<brettgilio> I'm writing an IRC server using Lwt. does anybody have any guesses as to an upper limit of connections Lwt can reliably support?
<companion_cube> quite a lot
<brettgilio> I will eventually do a benchmark on my results, but the other benchmarks I've seen in one other existing benchmark for a server configuration using Lwt readily capable of 10,000.
<brettgilio> but I'm not sure what a realistic maximum here would be. of course this depends on the machine, network, and operating system
<hockpa2e> hi, Menhir question. mid-rule actions aren't working quite like I expect. If I do this:
<hockpa2e> amodule: MODULE mn=moduleName midrule({mod_name := mn}) ASSIGN ...
<hockpa2e> when I build it tells me mn is undefined.
<companion_cube> hu, I never tried that
<hockpa2e> is there a more approved way to do this kind of thing?
<companion_cube> I don't know, I didn't know there were mid rule actions
<hockpa2e> hmm
hockpa2e has quit [Quit: Leaving]
laokz has joined #ocaml
laokz has quit [Remote host closed the connection]
laokz has joined #ocaml
mfp has quit [Ping timeout: 246 seconds]
sm2n has joined #ocaml
hnOsmium0001 has joined #ocaml
vicfred has quit [Quit: Leaving]
nullcone has joined #ocaml
_whitelogger has joined #ocaml
interruptinuse has quit [Quit: ZNC - https://znc.in -- bye bye!]
mmohammadi9812 has joined #ocaml
interruptinuse has joined #ocaml
reynir has quit [Ping timeout: 272 seconds]
reynir has joined #ocaml
waleee-cl has quit [Quit: Connection closed for inactivity]
laokz has quit [Ping timeout: 258 seconds]
narimiran has joined #ocaml
Serpent7776 has joined #ocaml
laokz has joined #ocaml
ggole has joined #ocaml
decentpenguin has quit [Read error: Connection reset by peer]
decentpenguin has joined #ocaml
sagax has quit [Read error: Connection reset by peer]
berke has joined #ocaml
mmohammadi9812 has quit [Quit: I quit (╯°□°)╯︵ ┻━┻]
ldbeth has joined #ocaml
<ldbeth> so I think this bug with flambda still exists in 4.11.1
<ldbeth> just get knocked by that and switch to default build
vicfred has joined #ocaml
laokz has quit [Ping timeout: 240 seconds]
dckc has quit [Ping timeout: 256 seconds]
sagax has joined #ocaml
dckc has joined #ocaml
dhil has joined #ocaml
olle has joined #ocaml
ldbeth has quit [Quit: ERC (IRC client for Emacs 26.3)]
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
Haudegen has joined #ocaml
nullcone has quit [Quit: Connection closed for inactivity]
jbrown has joined #ocaml
olle has quit [Quit: leaving]
olle has joined #ocaml
malc_ has joined #ocaml
mfp has joined #ocaml
dhil has quit [Ping timeout: 258 seconds]
olle has quit [Remote host closed the connection]
dhil has joined #ocaml
berke has quit [Ping timeout: 272 seconds]
laokz has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
olle has joined #ocaml
laokz has quit [Ping timeout: 265 seconds]
laokz has joined #ocaml
<olle> Idiomatic way to do effects-as-objects in OCaml - NOW!
* olle Do it, do it, do it
<d_bot> <ostera> is that a demnad or an announcement?
<olle> Hm
<olle> Yes
<olle> I declare it!
malc_ has left #ocaml ["ERC (IRC client for Emacs 28.0.50)"]
<d_bot> <Et7f3> can't find any update in change log
<d_bot> <stab> *cough* modular implicits
<olle> ?
<Drup> I don't even know what "effect as objects" is supposed to mean
<olle> How dare you
<olle> Sorry, effects-as-data
<Drup> how dare *you*: you proclaim something without even giving a link, or why it's good
<Drup> oh, and you even use the wrong name
<Drup> I give you no points!
<olle> I didn't proclaim it, I declared it.
<olle> D:
<olle> No OCaml point today. Null point.
<Drup> (also: it looks like the JS crowd discoverted property testing, good for them, we can keep using quickcheck)
<olle> unrelated?
Haudegen has joined #ocaml
<Drup> that framework is literaly property testing + mocking
<olle> What's property testing?
<Drup> I mean, it's okay, but I'm not sure why you are declaring it like it's a revolution
<olle> Drup: No, I want OCaml to provide an idiomatic way to do effects-as-data.
<Drup> cool, then do it :)
andreas303 has quit [Ping timeout: 240 seconds]
<olle> Bah, I can't.
andreas303 has joined #ocaml
<d_bot> <psafont> @Et7f3 and https://github.com/stedolan/crowbar
waleee-cl has joined #ocaml
<olle> Yeah, but not related.
<olle> Well.
<olle> It's related to something.
<olle> I was talking about the best way to wrap "print_endline 'asd'" in a lambda or record or whatever.
<olle> Save all effects to later.
<d_bot> <ostera> you mean `lazy` ?
<d_bot> <ostera> @Drup okay so i've got some horrible but functional things in place
<octachron> or a finally tagless encoding?
<d_bot> <ostera> I can go from this
<d_bot> <ostera>
<d_bot> <ostera> ```erlang
<d_bot> <ostera> -module(recv).
<d_bot> <ostera> -export([f/0]).
<d_bot> <ostera> f() ->
<d_bot> <ostera> receive
<d_bot> <ostera> {int, I} -> print_int(I);
<d_bot> <ostera> {str, B} -> print_string(B)
<d_bot> <ostera> end.
<d_bot> <ostera> ```
<d_bot> <ostera>
<d_bot> <ostera> to this:
<d_bot> <ostera>
<d_bot> <ostera> ```ocaml
<d_bot> <ostera> let rec recv =
<d_bot> <ostera> function
<d_bot> <ostera> | () ->
<d_bot> <ostera> (match recv () with
<d_bot> <ostera> | `int (i) -> print_int i
<d_bot> <ostera> | `str (b) -> print_string b)
<d_bot> <ostera> ```
<d_bot> <ostera> I'm earning a special place in hell I'm sure
<d_bot> <Drup> amusing
<d_bot> <ostera> but here's what's bugging me
<d_bot> <Drup> I'm surprised you are even trying to compile to source OCaml
<d_bot> <Drup> that sounds like a headache
<d_bot> <Drup> I would go the malfunction route
<d_bot> <ostera> I'm trying to run the typechecker on the generated source OCaml
<d_bot> <ostera> and it actually does work, for some programs
<d_bot> <Drup> but not for other, because erlang's code patterns are not all ML-friendly ?
<d_bot> <ostera> one of the transforms I have goes from `Erlang.Ast.t -> Parsetree.structure`
<d_bot> <ostera> (which is the one that got me those pretty printed snippets)
<d_bot> <Drup> sounds about right
<Armael> how do you retreive the erlang AST?
<d_bot> <ostera> note: I do *not* expect all of it to actually typecheck correctly
<d_bot> <ostera> Armael I wrote a parser
<Armael> oh ok
<d_bot> <Drup> (of course he did :D)
<d_bot> <ostera> xD
<d_bot> <ostera> anyway, @Drup here's my question
<d_bot> <ostera> that ML program errors with this
<d_bot> <ostera> `Assert_failure typing/typecore.ml:1476:6`
<d_bot> <Drup> ahah, oh that sounds good
<d_bot> <Drup> let me look
<d_bot> <Drup> which version of ocaml ?
<d_bot> <ostera> 4.11.1
<d_bot> <ostera> no switch extensions
<d_bot> <Drup> oh, that's easy
<d_bot> <Drup> you are building malformed tuples
<d_bot> <ostera> great!
<d_bot> <ostera> that should be easy to fix
<d_bot> <Drup> @octachron weren't we suppsed to have hardened pre-check to explain those errors in a semi-understandable way ?!
<d_bot> <Drup> @ostera more precisely, a malformed tuple *pattern* with less than 2 elements
<d_bot> <ostera> pattern you say
<d_bot> <octachron> The compiler pipeline goes through the ast invariant check
<d_bot> <ostera> ah, right, empty tuple should be the unit constructor in ml
<d_bot> <Drup> Exactly
<d_bot> <octachron> If don't use pparse, you can circumvent the check
<d_bot> <Drup> also, as @octachron , there is a pass to check the validity of the ast, you should call it, I don't remember where it is
<d_bot> <ostera> that worked
<d_bot> <ostera> right now i'm calling into Typemod directly
<d_bot> <ostera> but I'd be happy to call anything else with less arcane outputs
<d_bot> <ostera> ah, no, wait, I thought that worked but it didn't
<d_bot> <ostera> same error still
<d_bot> <octachron> It is more a question of checking the generated parsetree with either `Ast_invariants.{structure ,signature}`
<d_bot> <ostera> `Error: broken invariant in parsetree: Tuples must have at least 2 components.`
narimiran has quit [Ping timeout: 240 seconds]
<d_bot> <ostera> thanks @octachron and @Drup this is a lot more helpful 🙌
<d_bot> <Drup> As for the rest, if you want to invoke the rest of the pipeline in the "normal" fashion, use `Compile_common`/`Compile`/`Optcompile`
vicfred has quit [Quit: Leaving]
<olle> lazy != effects-as-data, necessarily
<olle> but wrapping each effect in a promise is one way.
<olle> octachron: what's finally tagless? free monad?
<d_bot> <ostera> @Drup yeah i've essentially grabbed the flow in Compile and hijacked it
spew has joined #ocaml
dckc has quit [Ping timeout: 256 seconds]
<olle> DSL with interpreter?
dckc has joined #ocaml
GewaltDisney has joined #ocaml
<olle> ONE interpreter for ALL effects in a project?
<olle> Does that scale?
<d_bot> <ostera> ah, oleg!
<d_bot> <ostera> that man must have access to a time machine
<d_bot> <ostera> so much good stuff he publishes
<Leonidas> oleg is a consortium of a lot of smart people :D
<d_bot> <ostera> @octachron how practical would it be to write a big language in tagless final style?
<d_bot> <ostera> big ~= ocaml
<d_bot> <Drup> not very x)
<d_bot> <Drup> well, tagless final is a tradeoff
<octachron> olle, you can compose interpreters see the "Extending the language" part
<d_bot> <Drup> you gain extensibility in variou fashionable ways, in exchange of ease of use and SAN points
<d_bot> <ostera> SAN = sanity?
<d_bot> <octachron> SAN points are overrated
<d_bot> <ostera> what are SAN points
<d_bot> <Drup> @ostera you only say that because all yours are gone
* d_bot <ostera> could somebody think of the children
<d_bot> <ostera> you're gonna make me google aren't you
<d_bot> <ostera> oh so it was what I thought it was
<d_bot> <Drup> More precisely, https://1d4chan.org/wiki/Sanity
<d_bot> <ostera> then i'm with @octachron on this one
<olle> Too academic to be accessible for normal code-monkeys as I
laokz has quit [Quit: Leaving]
<d_bot> <Drup> the ease of use is a real problem though. Look at smondet's talk on using funtors+tagless final, it's powerful, but it's *really* not nice code
<companion_cube> the thing in BAP?
<d_bot> <Drup> (I highly like the fact that the slide on the capture is just a big picture of oleg pointing some code)
<companion_cube> gosh, oleg is a real person?!
<d_bot> <Et7f3> I believe I have seen oleg here
<d_bot> <Drup> He's a mystical being that can write in at least 4 alphabets, one of them being category theory.
<companion_cube> he's the rare catch in pokemon go, too
<zozozo> but is he a shiny pokemon ?
<companion_cube> he's a multi-prompt pokemon
<companion_cube> these are hard to handle
nullcone has joined #ocaml
<olle> There's also "Advanced Tagless Final - Saying farewell to Free (Luka Jacobowitz)"
<olle> Guess my weekend is "saved" :|
<d_bot> <psafont> @mseri no hurry, really 🙂
<zozozo> does anyone here has experience with menhir's incremental api ? I'm searching for the simplest way, when in an error case, to get the lookahead token (or current token), that caused the error (to produce error messages such as : expected .... but got .... )
<d_bot> <ostera> zozozo: would the .messages file help here?
<zozozo> @ostera : partly, I'm already using them (to generate the "expected" part of the message from the given state), but I haven't yet seen how to get the last generated token
<def> zozozo: just remember the last token you offered
<def> (once in menhir, tokens are transformed into terminals, you can recover the terminal using the introspection API by querying the incoming symbol of the LR1 state)
<zozozo> def: ok, thanks
dhil has quit [Ping timeout: 264 seconds]
Anarchos has joined #ocaml
hnOsmium0001 has joined #ocaml
<vsiles> what is the latest 'stable' ocaml release ? 4.09.1 ? 4.10.0 ?
tane has joined #ocaml
vicfred has joined #ocaml
<def> 3.12
<d_bot> <ostera> what really
<d_bot> <Anurag> vsiles: 4.11.1
<companion_cube> def: tu es bien joueur
<d_bot> <ostera> catalan?
<vsiles> Anurag: I missed the 11.1 ! Thanks
<def> companion_cube: ;)
<d_bot> <Et7f3> French 😉 @ostera
dhil has joined #ocaml
mbuf has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
reynir has quit [Ping timeout: 260 seconds]
reynir has joined #ocaml
<d_bot> <dj charlie> > Compose Conference
<d_bot> <dj charlie> Got really excited thinking it was the one I went to then lol but NO it was overseas
<d_bot> <dj charlie> ||was me and one other guy there who wrote OCaml there everyone was a Haskell weenie||
olle has quit [Ping timeout: 260 seconds]
Haudegen has joined #ocaml
Tuplanolla has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
brandstifter has joined #ocaml
mbuf has quit [Quit: Leaving]
brandstifter has quit []
jnavila has joined #ocaml
kanishka has joined #ocaml
tane has quit [Quit: Leaving]
GewaltDisney has left #ocaml [#ocaml]
GewaltDisney has joined #ocaml
Anarchos has joined #ocaml
narimiran has joined #ocaml
kanishka has quit [Quit: Quit]
olle has joined #ocaml
olle has quit [Remote host closed the connection]
tane has joined #ocaml
reynir has quit [Ping timeout: 260 seconds]
reynir has joined #ocaml
kanishka has joined #ocaml
GewaltDisney has quit [Ping timeout: 272 seconds]
kanishka has quit [Ping timeout: 245 seconds]
raver has quit [Quit: Gateway shutdown]
ggole has quit [Quit: Leaving]
narimiran has quit [Ping timeout: 265 seconds]
<cemerick> def: Caml Light 4 lyfe?
Anarchos has quit [Read error: Connection reset by peer]
jnavila has quit [Quit: Konversation terminated!]
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
Anarchos has joined #ocaml
delysin has quit [Quit: WeeChat 2.9]
delysin has joined #ocaml
nicoo has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 240 seconds]
nicoo has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
tane has quit [Quit: Leaving]
aecepoglu[m]1 has joined #ocaml
Manis[m]11 has joined #ocaml
jun has joined #ocaml
aecepoglu[m] has quit [Ping timeout: 246 seconds]
Manis[m]1 has quit [Ping timeout: 246 seconds]
jun_ has quit [Ping timeout: 246 seconds]
amiloradovsky has joined #ocaml
amiloradovsky has quit [Ping timeout: 240 seconds]
Tuplanolla has quit [Quit: Leaving.]