troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
troydm has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
smazga has joined #ocaml
mxns has joined #ocaml
ojuicer has joined #ocaml
<ojuicer>
i have a silly question: when i type `open Async` in utop i get `Error: Unbound module Async`, but when i `opam install async` it tells me the package is already installed
<ojuicer>
how do i diagnose the problem?
smazga has quit [Ping timeout: 240 seconds]
<companion_cube>
You need to #require "async" in utop
<ojuicer>
I see
<ojuicer>
so is there any difference between "open Core" and #require "core"
<ojuicer>
except for fact that i no longer need to type Core.method
<companion_cube>
Yes, the require is a utop thing to load the library
mxns has quit [Ping timeout: 272 seconds]
<ojuicer>
but when i type "open" in utop it also works? :P
<companion_cube>
Open is not necessary, it just brings stuff into scope
<companion_cube>
No, open is a language level feature
<companion_cube>
Require is a compilation /library level thing
<ojuicer>
sorry, what do you mean by language level feature
mxns has joined #ocaml
mooster has joined #ocaml
smazga has joined #ocaml
snekx has joined #ocaml
<snekx>
Hi. I am getting "Unbound value >>=". Any idea how to fix it? Is it some import issue?
<snekx>
It works neither in the top level nor the ocamlbuild.
mxns has quit [Ping timeout: 260 seconds]
mooster has quit [Ping timeout: 245 seconds]
smazga has quit [Ping timeout: 264 seconds]
mxns has joined #ocaml
snekx has quit [Remote host closed the connection]
<companion_cube>
ojuicer: well `open` is part of OCaml the language
<companion_cube>
#require is a directive used only in the toplevel (including utop)
<companion_cube>
in a .ml file, to be compiled, you can use `open` and it makes sense
<ojuicer>
what really happens when i type "open Core"
<ojuicer>
out of curiosity?
mxns has quit [Ping timeout: 272 seconds]
<sleepydog>
it brings all of the names in the Core module into scope. so instead of having to type Core.List.fold_left you can type List.fold_left, etc
<ojuicer>
sorry i meant like behind the scenes
mxns has joined #ocaml
<ojuicer>
like does it find some module and loads it into the code or something?
<ojuicer>
where does it look?
<sleepydog>
no, it doesn't find the module. the module is already there
<ojuicer>
where is the module?
<sleepydog>
well that depends on how you're environment is setup. if you're using opam, it's probably somewhere under ~/.opam
mxns has quit [Ping timeout: 246 seconds]
<ojuicer>
yes, i'm using opam
<sleepydog>
i'm not too familiar with this area, but i believe 'ocamlfind' is usually used to find the module files and load them into your toplevel.
<ojuicer>
yeah, i'm curious where i might be able to see the source code
<ojuicer>
i remember once looking in ~/.opam/repo/default/packages, but didn't find anything
<sleepydog>
ah, i'm not sure if opam keeps the source. i think there's a cache where you could find it
<sleepydog>
but you can always find the source repo on opam.ocaml.org
<ojuicer>
yeah i've always wondered what really happens when i type something like "opam install <module>"
<sleepydog>
if you are curious, the manual (https://opam.ocaml.org/doc/Manual.html) seems like a good place to start. I'm happy to let opam figure it out for me and not think about it :)
smazga has joined #ocaml
<sleepydog>
when i first got into ocaml i tried using nix to manage my ocaml dependencies and i got tired of it quickly
mxns has joined #ocaml
lopex has quit [Quit: Connection closed for inactivity]
<ojuicer>
hmm. strange that the master branch of janestreet's base is currently throwing errors when i run make
<ojuicer>
but now through opam i can see which branch is being used in the package :)
smazga has quit [Ping timeout: 265 seconds]
mxns has quit [Ping timeout: 268 seconds]
smazga has joined #ocaml
mxns has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
ArthurStrong has joined #ocaml
smazga has quit [Ping timeout: 264 seconds]
mxns has quit [Ping timeout: 268 seconds]
ojuicer has quit [Remote host closed the connection]
mxns has joined #ocaml
smazga has joined #ocaml
djellemah has quit [Ping timeout: 260 seconds]
Jesin has quit [Read error: Connection reset by peer]
smazga has quit [Ping timeout: 264 seconds]
mxns has quit [Ping timeout: 256 seconds]
nullcone has quit [Quit: Connection closed for inactivity]
mxns has joined #ocaml
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
troydm has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
mxns has joined #ocaml
smazga has joined #ocaml
mxns has quit [Ping timeout: 264 seconds]
smazga has quit [Ping timeout: 264 seconds]
zebrag has quit [Ping timeout: 260 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
cet is now known as kitties
smazga has joined #ocaml
mxns has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
smazga has joined #ocaml
smazga has quit [Ping timeout: 272 seconds]
mxns has quit [Ping timeout: 272 seconds]
sm2n_ is now known as sm2n
narimiran has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 264 seconds]
mbuf has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 264 seconds]
Bahman has quit [Remote host closed the connection]
waleee-cl has quit [Quit: Connection closed for inactivity]
smazga has joined #ocaml
smazga has quit [Ping timeout: 265 seconds]
decentpenguin has quit [Read error: Connection reset by peer]
decentpenguin has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 246 seconds]
smazga has joined #ocaml
sleepydog has quit [Ping timeout: 246 seconds]
smazga has quit [Ping timeout: 256 seconds]
mxns has joined #ocaml
shawnw has joined #ocaml
mxns has quit [Ping timeout: 268 seconds]
jlr has joined #ocaml
nullcone has joined #ocaml
smazga has joined #ocaml
mro_name has joined #ocaml
bartholin has joined #ocaml
smazga has quit [Ping timeout: 256 seconds]
mbuf has quit [Ping timeout: 264 seconds]
olle_ has joined #ocaml
smazga has joined #ocaml
lopex has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
<Mehdi[m]>
Hi folks, I am having a bit of trouble configuring Merlin with Emacs correctly. It is not able to locate definitions of modules and functions defined in my project 😕 Is there a guide on how to troubleshoot Merlin?
dborisog has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
Serpent7776 has joined #ocaml
Tuplanolla has joined #ocaml
mfp has joined #ocaml
mxns has joined #ocaml
mbuf has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
jlr has quit [Ping timeout: 268 seconds]
jlr has joined #ocaml
jlr has quit [Remote host closed the connection]
mro_name has quit [Quit: Leaving...]
samoht[m] has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 264 seconds]
smazga has joined #ocaml
flux has quit [Quit: Bridge terminating on SIGTERM]
pqwy[m] has quit [Quit: Bridge terminating on SIGTERM]
smondet[m] has quit [Quit: Bridge terminating on SIGTERM]
labor[m] has quit [Quit: Bridge terminating on SIGTERM]
undu[m] has quit [Quit: Bridge terminating on SIGTERM]
Manis[m] has quit [Quit: Bridge terminating on SIGTERM]
mmohammadi9812 has quit [Quit: Bridge terminating on SIGTERM]
Mehdi[m] has quit [Quit: Bridge terminating on SIGTERM]
dash has quit [Quit: Bridge terminating on SIGTERM]
jimt[m] has quit [Quit: Bridge terminating on SIGTERM]
Seylerius has quit [Quit: Bridge terminating on SIGTERM]
lnxw37d4 has quit [Quit: Bridge terminating on SIGTERM]
BitPuffin has quit [Quit: Bridge terminating on SIGTERM]
aspiwack[m] has quit [Quit: Bridge terminating on SIGTERM]
samoht[m] has quit [Quit: Bridge terminating on SIGTERM]
avsm[m] has quit [Quit: Bridge terminating on SIGTERM]
andreas303 has quit [Quit: andreas303]
peddie has quit [Quit: Bridge terminating on SIGTERM]
smazga has quit [Ping timeout: 265 seconds]
andreas303 has joined #ocaml
mxns has joined #ocaml
Mehdi[m] has joined #ocaml
nullcone has quit [Quit: Connection closed for inactivity]
mxns has quit [Ping timeout: 246 seconds]
smazga has joined #ocaml
smazga has quit [Ping timeout: 246 seconds]
Haudegen has joined #ocaml
aspiwack[m] has joined #ocaml
pqwy[m] has joined #ocaml
dash has joined #ocaml
undu[m] has joined #ocaml
Seylerius has joined #ocaml
flux has joined #ocaml
samoht[m] has joined #ocaml
mmohammadi9812 has joined #ocaml
jimt[m] has joined #ocaml
labor[m] has joined #ocaml
Manis[m] has joined #ocaml
lnxw37d4 has joined #ocaml
peddie has joined #ocaml
smondet[m] has joined #ocaml
avsm[m] has joined #ocaml
BitPuffin has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 264 seconds]
mxns has joined #ocaml
mbuf has quit [Ping timeout: 256 seconds]
mxns has quit [Ping timeout: 264 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
djellemah has joined #ocaml
mxns has joined #ocaml
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
mxns has quit [Ping timeout: 256 seconds]
reynir is now known as sorbus
mxns has joined #ocaml
sorbus is now known as rowan
rowan is now known as reynir
mxns has quit [Ping timeout: 260 seconds]
raver has joined #ocaml
mxns has joined #ocaml
waleee-cl has joined #ocaml
mxns has quit [Read error: Connection reset by peer]
mxns has joined #ocaml
zebrag has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 272 seconds]
shawnw has quit [Ping timeout: 264 seconds]
tryte has quit [Ping timeout: 240 seconds]
nicoo has quit [Ping timeout: 240 seconds]
tryte has joined #ocaml
smazga has joined #ocaml
<d_bot>
<d4hines> I would like to diff two strings in a nice way for unit testing, where the differences are highlighted in a human-friendly way. Any suggestions for libs?
nicoo has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
smazga has joined #ocaml
Guest32 has joined #ocaml
Guest32 has left #ocaml [#ocaml]
smazga has quit [Ping timeout: 240 seconds]
smazga has joined #ocaml
smazga has quit [Ping timeout: 256 seconds]
mbuf has joined #ocaml
smazga has joined #ocaml
djellemah has quit [Remote host closed the connection]
andreas303 has quit [Remote host closed the connection]
<cemerick>
how/why does the "foo" prefix get lost in the output here? `Format.(asprintf "foo %a baz" (fun fmt v -> pp_set_margin fmt 100; pp_print_string fmt v) "bar");;`
<cemerick>
obviously the margin setting is causing it, but that seems....bad? 🙃
<sadiq>
sleepydog, rr works really well.
<sadiq>
hardware watchpoints backwards in time just feels like cheating
<sadiq>
(and is super helpful when doing GC work)
olle_ has quit [Ping timeout: 246 seconds]
neiluj has quit [Ping timeout: 272 seconds]
<octachron>
cemerick, modifying the formatting geometry during the printing is not supported by Format.
<cemerick>
octachron: Noted; in that case, that sort of illegal state change almost feels worthy of throwing an exception
<sleepydog>
sadiq: yea, i've used it a few times in the past and it was magical. i'm glad to hear it works well. and i think ryzen cpus are supported now, or close to being supported
<sadiq>
I think they've just started being supported - depending on the generation you may need to turn off some stuff.
<sadiq>
that was a blocked on me getting an AMD system until now.
olle_ has joined #ocaml
<cemerick>
so what I was trying to do above with the margin was eliminate any line breaks or indentations from the "formatted" result (desirable in places where e.g. an error message is going to a user in a context where a hard margin would look strange)
<d_bot>
<stab> Am i doing something stupid with this line? `Async.Reader.contents reader >>| (fun cont -> print_endline "here i guess";print_endline cont)` I looked at my sender in netcat and the message shows up and then closes the socket which is what's expected (i wait for the message to be flushed then terminate then close the socket and terminate). but on the server side when i grab the contents it's completely empty
<d_bot>
<stab> it feels like it's just grabbing an EOF and nothing else
neiluj has joined #ocaml
zebrag has joined #ocaml
narimiran has quit [Quit: leaving]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
<d_bot>
<stab> oh weird it looks like read_line is returning way before it receives any input
zebrag has quit [Client Quit]
zebrag has joined #ocaml
aquijoule_ has quit [Remote host closed the connection]
richbridger has joined #ocaml
raver has quit [Quit: Gateway shutdown]
Serpent7776 has quit [Quit: leaving]
mro_name has joined #ocaml
<sleepydog>
stab: if you have 'open Async', it seems to have its own implementations of print_endline, read_line and friends. are you expecting those to block?
<sleepydog>
i've never used Async but if you're using Async.print_endline you might want to use >>= instead of >>| because print_endline might return a promise rather than actually doing the work
<sleepydog>
actually print_endline seems like it blocks. ignore me
<d_bot>
<stab> yeah im getting prints it just seems to be empty and i have no idea why
raver has joined #ocaml
<sleepydog>
could you share a little more code?
<d_bot>
<stab> yeah ill create a gist give me a sec
<d_bot>
<stab> It dies due to the readline on line 9 giving EOF which raises expected to parse message
<sleepydog>
hmm, sorry, i can't see what you're doing wrong
<d_bot>
<stab> no problem im still trying to debug it i guess it could be on the sender side but like using a netcat listener or whatever shows the text fine
<sleepydog>
so on the sender, you just run netcat, type something, press enter, then ctrl-d ?
<sleepydog>
or what is the sender?
raver has quit [Quit: Gateway shutdown]
jnavila has quit [Quit: Konversation terminated!]
<sleepydog>
you could use tcpdump to confirm the packets are sent
<d_bot>
<stab> the sender is another async program but i ran a netcat listener to show the output and it does indeed output the message i expect
<d_bot>
<stab> i also ran wireshark while the programs were communicating and observed the message in flight
<d_bot>
<stab> so like im fairly sure it's a server issue but idk
raver has joined #ocaml
neiluj has quit [Remote host closed the connection]
<d_bot>
<stab> I like the the library other than the fact my code doesn’t work lol! The monadic way of doing it felt good until it didn’t work hahah
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]