companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.12 released: https://ocaml.org/releases/4.12.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 272 seconds]
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 265 seconds]
waleee has quit [Ping timeout: 245 seconds]
berberman_ has joined #ocaml
berberman has quit [Ping timeout: 268 seconds]
vicfred_ has joined #ocaml
vicfred has quit [Ping timeout: 256 seconds]
gzj has joined #ocaml
<d_bot> <darrenldl> i use mparser a lot, found it to be a pretty good toolbox
vicfred__ has joined #ocaml
nd__ has joined #ocaml
vicfred_ has quit [Ping timeout: 250 seconds]
nd__ has quit [Ping timeout: 256 seconds]
zebrag has quit [Quit: Konversation terminated!]
Nahra` has quit [Ping timeout: 258 seconds]
gzj has quit [Remote host closed the connection]
Absalom has quit [Quit: the lounge - https://webirc.envs.net]
Absalom has joined #ocaml
wilfred has joined #ocaml
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 265 seconds]
gravicappa has joined #ocaml
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 258 seconds]
sagax has joined #ocaml
<d_bot> <thangngoc89> Are there any implementations of suffix-array available?
vicfred__ has quit [Quit: Leaving]
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 272 seconds]
dhil has joined #ocaml
bartholin has joined #ocaml
Nahra has joined #ocaml
olle has joined #ocaml
reynir1 has joined #ocaml
reynir has quit [Ping timeout: 252 seconds]
reynir1 is now known as reynir
wilfred has quit [Quit: Connection closed for inactivity]
bartholin has quit [Quit: Leaving]
bartholin has joined #ocaml
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 272 seconds]
Serpent7776 has joined #ocaml
bartholin has quit [Quit: Leaving]
hackinghorn has joined #ocaml
bartholin has joined #ocaml
waleee has joined #ocaml
vb has quit [Remote host closed the connection]
nd__ has joined #ocaml
<d_bot> <Competitive Complications> I'm using `Printexc.record_backtrace true`, dune printenv shows `-g`, I'm even using bytecode build, I don't use Lwt, and I still get very bad stack traces
<d_bot> <Competitive Complications> Am I missing something?
nd__ has quit [Ping timeout: 272 seconds]
<d_bot> <octachron> What do you mean by bad stack traces?
nd__ has joined #ocaml
<d_bot> <Competitive Complications> @octachron Lots of function calls missing
<d_bot> <octachron> There might be some exception reraises that mess up the trace.
<d_bot> <Competitive Complications> hmmm
<d_bot> <Competitive Complications> there are none unfortunately
<d_bot> <Competitive Complications> only simple failwiths
mbuf has joined #ocaml
waleee has quit [Ping timeout: 272 seconds]
<d_bot> <ggole> Are the missing functions tail called?
olle has quit [Ping timeout: 258 seconds]
indicator has joined #ocaml
<indicator> I'm trying to build https://github.com/lemaetech/jsoo_todomvc.git, opam install js_of_ocaml-ppx works fine, but dune build (same opam switch, ocaml-base-compiler.4.12.0, and current working directory) thinks 'Error: Library "js_of_ocaml-ppx" not found.'. Any clues?
<d_bot> <octachron> This looks like you are missing an `eval $(opam env)`.
<d_bot> <Competitive Complications> some of them yeah
<d_bot> <ggole> It's natural for a function to disappear from the stack if it ends in a tail call
<d_bot> <Competitive Complications> how can i make it so that's not the case for specified functions?
<d_bot> <Competitive Complications> (I just realized i have way more tail calls than I naively expected)
<d_bot> <ggole> You could stick something after the tail call (to make it not a tail call)
<d_bot> <Competitive Complications> yeah, that's an interpreting function, so that would imply changing all the places it calls itself recursively
<d_bot> <Competitive Complications> i was more wondering about a `non-tailcall` annotation or something
<d_bot> <ggole> I don't remember seeing anything like that
<d_bot> <ggole> In general the stack can't be relied on the capture the past of a program; only the future
<indicator> No, I have run eval $(opam env)
<indicator> And I ran everything in that paste in that same shell
cedric has joined #ocaml
<d_bot> <Alistair> Anyone know how to do this? (sorry for reposting, but didn't really get an answer the first time)
<d_bot> <Alistair> (For context, looking at adding tests to: https://github.com/johnyob/ppx-open)
<indicator> Interestingly, `ls ~/.opam/4.12.0/lib/ | grep js_of` only shows `js_of_ocaml` and `js_of_ocaml-compiler` in there, no `js_of_ocaml-ppx`
mbuf has quit [Quit: Leaving]
<indicator> Even if I create a new switch and set that switch, opam install still thinks js_of_ocaml-ppx is installed. Makes me think it's found from a system install, but I don't see one.
Tuplanolla has joined #ocaml
zebrag has joined #ocaml
<indicator> Ahh, I had an `_opam` directory in my working dir (at the root of the jsoo_todomvc project). I think that came from me running `make dev-switch` in jsoo_todomvc (experimentally, not really knowing exactly what it would do, then forgetting about it), which runs `opam switch create . ocaml-base-compiler.4.10.0 --deps-only --with-test --working-dir`. So, knowing that, I see from the docs that opam thinks that a directory switch (a concept
<indicator> I didn't know about until just now) overrides the env var configuration from `opam env`, but... dune doesn't? Still confused about that last part I think.
Guest1599 has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
indicator has quit [Remote host closed the connection]
mbuf has joined #ocaml
berberman has joined #ocaml
olle has joined #ocaml
berberman_ has quit [Ping timeout: 250 seconds]
zebrag has quit [Ping timeout: 252 seconds]
zebrag has joined #ocaml
mbuf has quit [Remote host closed the connection]
olle has quit [Ping timeout: 256 seconds]
<d_bot> <EduardoRFS> that's not an option, OCaml just emits jmp instead of call every time it's possible
<d_bot> <EduardoRFS> which is at almost any case
remexre has joined #ocaml
<remexre> did something happen to Typedtree? I remember it being part of compiler-libs, but it's not on https://ocaml.org/api/compilerlibref/index.html
cedric has quit [Quit: Konversation terminated!]
<octachron> It is still part of the library, but it is in the documented part
<octachron> Partly because it is even more unstable than the parsetree.
waleee has joined #ocaml
<remexre> hm, okay...
<octachron> it is *not* in the documented part
<remexre> er yeah I misread that the inverse way you mistyped it lol
gravicappa has quit [Ping timeout: 272 seconds]
Guest1599 has quit [Ping timeout: 246 seconds]
oriba has joined #ocaml
<d_bot> <monk> i think i'm going to try reading that opal library till i understand what it's doing for all 150loc lol
Serpent7776 has quit [Quit: leaving]
bartholin has quit [Quit: Leaving]
waleee has quit [Ping timeout: 272 seconds]
wilfred has joined #ocaml
Melantha has quit [Ping timeout: 268 seconds]
Melantha has joined #ocaml
<d_bot> <monk> silly question, but can someone explain why `()` needs to be added for application to occur in this context?
<d_bot> <monk> ```ocaml
<d_bot> <monk> utop[46]>let ite x e1 e2 = match x with true -> e1 | false -> e2 ;;
<d_bot> <monk> - : val ite : bool -> 'a -> 'a -> 'a = <fun>
<d_bot> <monk> utop[47]> ite true (fun _ -> 4) (fun _ -> List.hd []) ;;
<d_bot> <monk> - : '_weak3 -> int = <fun>
<d_bot> <monk> utop[48]> (ite true (fun _ -> 4) (fun _ -> List.hd []))() ;;
<d_bot> <monk> - : int = 4
<d_bot> <monk> ```
<d_bot> <monk> does `()` get used to represent both unit and function application?
<d_bot> <monk> i took an example that had `()` originally in the expression arms of the match statement, ie `true -> e1() | false -> e2()`just to mess around
<d_bot> <Splingush> Both your arguments are functions. So evaluating `ite true fun1 fun2` returns one of the functions. The `()` is then the argument used the evaluate the returned function.
<d_bot> <monk> ah, thank you
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
dhil has quit [Ping timeout: 252 seconds]
vicfred has joined #ocaml
<d_bot> <monk> what about caching/laziness makes this function no longer print out `"hello world"` after the thunk is forced?
<d_bot> <monk> ```ocaml
<d_bot> <monk> utop[67]> let lazy_hello = lazy begin print_endline "hello world"; 1 end ;;
<d_bot> <monk> val lazy_hello : int lazy_t = <lazy>
<d_bot> <monk> utop[68]> lazy_hello ;;
<d_bot> <monk> - : int lazy_t = <lazy>
<d_bot> <monk> utop[69]> Lazy.force lazy_hello ;;
<d_bot> <monk> hello world
<d_bot> <monk> - : int = 1
<d_bot> <monk> utop[70]> Lazy.force lazy_hello ;;
<d_bot> <monk> - : int = 1
<d_bot> <monk> ```