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
mxns_ has quit [Ping timeout: 250 seconds]
beajeanm has quit [Quit: Ping timeout (120 seconds)]
tmhoang520 has quit [Quit: Ping timeout (120 seconds)]
SquidDev has quit [Quit: Ping timeout (120 seconds)]
SquidDev9 has joined #ocaml
beajeanm has joined #ocaml
tmhoang520 has joined #ocaml
dwt has quit [Quit: ZNC 1.8.2 - https://znc.in]
leah2 has quit [Read error: Connection reset by peer]
pagnol has joined #ocaml
mxns has joined #ocaml
dwt has joined #ocaml
pagnol has left #ocaml ["ERC (IRC client for Emacs 25.2.2)"]
mxns has quit [Ping timeout: 245 seconds]
mxns has joined #ocaml
wingsorc has quit [Quit: Leaving]
vsssa has joined #ocaml
vsssa has quit [Quit: Connection closed]
ArthurStrong has quit [Quit: leaving]
mxns has quit [Ping timeout: 260 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 245 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 250 seconds]
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
mxns has joined #ocaml
waleee-cl has quit [Quit: Connection closed for inactivity]
mxns has quit [Ping timeout: 245 seconds]
mxns has joined #ocaml
ania123 has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 265 seconds]
mxns has joined #ocaml
ania123 has quit [Quit: Connection closed]
narimiran has joined #ocaml
mxns has quit [Ping timeout: 240 seconds]
mal`` has quit [Quit: Leaving]
mal`` has joined #ocaml
shawnw has quit [Ping timeout: 268 seconds]
SquidDev9 has quit [Quit: Bye!]
SquidDev has joined #ocaml
Putonlalla has joined #ocaml
mro_name has joined #ocaml
mro_name has quit [Remote host closed the connection]
mro_name has joined #ocaml
mro_name has quit [Remote host closed the connection]
mxns has joined #ocaml
mro_name has joined #ocaml
mxns has quit [Ping timeout: 240 seconds]
mro_name has quit [Client Quit]
arecaceae has quit [Remote host closed the connection]
arecaceae has joined #ocaml
mro_name has joined #ocaml
leah2 has joined #ocaml
Haudegen has joined #ocaml
olle has joined #ocaml
mxns has joined #ocaml
mro_name has quit [Remote host closed the connection]
mxns has quit [Ping timeout: 240 seconds]
snowpanda has quit [Quit: Leaving...]
mro_name has joined #ocaml
mro_name has quit [Client Quit]
mxns has joined #ocaml
serif[m] has quit [Quit: Idle for 30+ days]
mxns has quit [Ping timeout: 250 seconds]
sz0 has joined #ocaml
hackhorn has quit [Quit: Leaving]
salkin-mada has joined #ocaml
<salkin-mada> hello i am compeltely new to ocaml. i just set up my system using opam and dune. for my first project i want to use the OSC impl. so i did a opam install osc. all whent well. btw. i am on arch. in my dine init project. i am trying to use the send receive OSC example from the osc package. though this is meant for the REPL, hilevel thingy. #require bla bla. etc.
<salkin-mada> So in my nvim session i have the lsp and treesitter stuff going. seems to be ok.
<salkin-mada> but the question is really.
<salkin-mada> HOW to get the `require` to work? `require "osc.lwt" throws -- Unbound value require
jbrown has joined #ocaml
<salkin-mada> or HOW to get the osc pack into my new dune initialized project. So that in the end of the day i can try these examples: https://github.com/johnelse/ocaml-osc
<salkin-mada> As you can tell this is al very new to me :) thanks for any help/pointers.
<octachron> require is for the REPL. In a dune project, you need to add the dependency to the dune entry for your library/executable with (libraries libname1 libname2)
bartholin has joined #ocaml
<d_bot> <undu> dune needs metadata to define executable or libraries, a good tutorial to start with dune metadata is https://dune.readthedocs.io/en/stable/quick-start.html it explains how to add a dependency to an executable. In your caseyou can replace lwt with osc
<salkin-mada> ahh i seee. okay okay :) haha
<salkin-mada> thanks so much d_bot. really appreciate it.
<d_bot> <undu> people are happy to help here, we know starting with ocaml tooling is not the easiest thing ever 🙂
<salkin-mada> indeed :)
<salkin-mada> also thanks octachron :)~
kakadu has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
tane has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 265 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
Haudegen has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 250 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
<d_bot> <dj charlie> wish me luck peeps bringing ocaml into a mono go codebase
mxns has joined #ocaml
mxns has quit [Ping timeout: 268 seconds]
sagax has quit [Ping timeout: 246 seconds]
waleee-cl has joined #ocaml
mxns has joined #ocaml
<olle> Cool
Tuplanolla has joined #ocaml
wonko7 has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
TheLemonMan has joined #ocaml
<olle> dj charlie, how did it go? :D
bartholin has quit [Quit: Leaving]
isd has joined #ocaml
xenu has quit [Ping timeout: 246 seconds]
isd has left #ocaml ["User left"]
xenu has joined #ocaml
sagax has joined #ocaml
Haudegen has joined #ocaml
jbrown has quit [Ping timeout: 260 seconds]
jbrown has joined #ocaml
Jesin has quit [Quit: Leaving]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
tryte has quit [Ping timeout: 240 seconds]
tryte has joined #ocaml
Jesin has joined #ocaml
ArthurStrong has joined #ocaml
narimiran has quit [Ping timeout: 240 seconds]
Tuplanolla has quit [Quit: Leaving.]
tane has quit [Quit: Leaving]
<salkin-mada> Hi again :) new to ocaml and dune here. I am trying to make a filetype mapping in vim which resemples what i do with .cpp(make), .cpp(pio), .rs, .lua, .scd etc. <C-e> is doing a simple `:terminal <build> and <run> && exit`. first part is fine with `dune build` but how to use `dune exec` ?? is `dune exec ./hello_world.exe` just a "shorthand" for `./_build/default/hello_world.exe` ? or how can i use `dune exec` without
<salkin-mada> specifying the `.exe` file.
<salkin-mada> Hi again :) new to ocaml and dune here. I am trying to make a filetype mapping in vim which resemples what i do with .cpp(make), .cpp(pio), .rs, .lua, .scd etc. <C-e> is doing a simple `:terminal <build> and <run> && exit`. first part is fine with `dune build` but how to use `dune exec` ?? is `dune exec ./hello_world.exe` just a "shorthand" for `./_build/default/hello_world.exe` ? or how can i use `dune exec` without
<salkin-mada> specifying the `.exe` file.
<salkin-mada> Hi again :) new to ocaml and dune here. I am trying to make a filetype mapping in vim which resemples what i do with .cpp(make), .cpp(pio), .rs, .lua, .scd etc. <C-e> is doing a simple `:terminal <build> and <run> && exit`. first part is fine with `dune build` but how to use `dune exec` ?? is `dune exec ./hello_world.exe` just a "shorthand" for `./_build/default/hello_world.exe` ? or how can i use `dune exec` without
<salkin-mada> specifying the `.exe` file.
<salkin-mada> Hi again :) new to ocaml and dune here. I am trying to make a filetype mapping in vim which resemples what i do with .cpp(make), .cpp(pio), .rs, .lua, .scd etc. <C-e> is doing a simple `:terminal <build> and <run> && exit`. first part is fine with `dune build` but how to use `dune exec` ?? is `dune exec ./hello_world.exe` just a "shorthand" for `./_build/default/hello_world.exe` ? or how can i use `dune exec` without
<salkin-mada> specifying the `.exe` file.
<d_bot> <zseri> why is that message repeated 4 times?
<salkin-mada> ah sorry.
<salkin-mada> PEBCAK
<d_bot> <zseri> does `dune exec hello_world.exe` work?
<salkin-mada> nope. it gives me a hint - `./hello_world.exe`
<salkin-mada> what i am hoping to do is `dune build && dune exec && exit`
arecaceae has quit [Remote host closed the connection]
arecaceae has joined #ocaml
<salkin-mada> okay i see. `dune exec` needs a PROG specified.
<drakonis> use dune exec ./hello_world.exe instead
<salkin-mada> check. i was just puzzled by the fact that it looks like a *nix like shell `./this_file_exists_in_the_current_directory`<execute it> but the `hello_world.exe` is not in the root of the workspace/project so why use this "notation" for `dune exec` when the file is actually located in `./_build/default/hello_world.exe` why not just use `dune exec hello_world` - without the `./` and the `.exe` part. both seems to be
<salkin-mada> implicit.. or maybe there is something i am missing here :)~
<salkin-mada> okay this works nicely -> https://paste.rs/u6N.lua
Haudegen has quit [Ping timeout: 265 seconds]
<salkin-mada> is there any good source of OCaml example node which is not REPL based? Its a bit hard to understand how to structure a program when all the examples i find is with `#` and require etc. which i then learned is REPL only . including all the `;;`
<salkin-mada> ps. i've programmed in ocaml with dune actively for 30 mins. did a setup (up and running) earlier today.
<salkin-mada> so i guess i am on the lookout for good sources of learning material based around dune. besides the https://dune.readthedocs.io/en/latest/quick-start.html
<steenuil> if you're using dune you just have to keep all the modules you want to use in the same directory as the main one, you don't have to do anything to add files
<steenuil> that is you don't have to add anything to the dune file
<steenuil> also for learning resources, the new version of Real World OCaml seems to use dune and at chapter 4 it drops the repl
<salkin-mada> i see. okay. so i can dump ocaml packages/libraries directly in my project root or i can have dune do the work for me by populating the dune file with (libraries .1. .2. .3.).
<steenuil> oh, no if you want to use libraries you should definitely use opam to install them and then put them in (libraries ...)
<steenuil> *external libraries
<salkin-mada> yes. thats what i am doing for the ext libs . thanks - now gonna check this -> http://dev.realworldocaml.org/
<salkin-mada> i am trying the example from the `osc` package again.
<salkin-mada> and getting ->
<salkin-mada> Error: This expression has type Osc_lwt.Udp.Client.t Lwt.t
<salkin-mada> but an expression was expected of type Osc_lwt.Udp.Client.t
<salkin-mada> is something wrong with the package or am i misunderstanding how to use the REPL based example in non REPL way (lo level ocaml, i guess)
<salkin-mada> aha i see its me doing silly wrong things :)~
<salkin-mada> if an example says `require lwt.syntax` and uses `lwt` where you would expect a `let`. How would i go around and use that in a dune project?
<salkin-mada> i tried to (libraries lwt.syntax) but this is not recognized.
<salkin-mada> hehehe. sorry dont mean to spam this channel with my newbie .ml questions and thoughts. Will stop for now. But let me know is there is something OBVIOUS i a missing in regards to getting the "OSC send receive" example to work in a NON REPL project. straight up OCaml with dune. :]=
<salkin-mada> `open Lwt.Syntax` i guess