<primosoma>
is there anyone that know the ssl library?
rgrinberg has joined #ocaml
<d_bot>
<Fermion> I'm having some trouble with clangml in utop.
<d_bot>
<Fermion>
<d_bot>
<Fermion> ```
<d_bot>
<Fermion> utop # #require "clangml";;
<d_bot>
<Fermion> Error: Reference to undefined global `Parse'
<d_bot>
<Fermion> ```
<d_bot>
<Fermion> this should work, right?
<d_bot>
<Fermion> actually, utop-full works! Why would that be?
Haudegen has quit [Ping timeout: 256 seconds]
bobo has joined #ocaml
spip has quit [Ping timeout: 260 seconds]
<d_bot>
<Et7f3> utop-full also preload some other libraries like compiler-libs that contain Parse module.
<d_bot>
<Et7f3> Yes. Some of us use ssl library. What do you want to know ?
Tuplanolla has joined #ocaml
<primosoma>
I'm trying to connect to an irc server. It seems that the client is connected but I don't receive any answer from the server. If it is possible I paste the code in the chat
<primosoma>
(or I can create a GitHub gist)
<companion_cube>
(use a pastebin or gist yes)
<companion_cube>
are you using a library?
<primosoma>
yes. I use Ssl module. I installed it with opam
sleeping_papaya has quit [Ping timeout: 260 seconds]
sleeping1 has quit [Client Quit]
<d_bot>
<gar> I need to get a foo.cmi file for a foo.ml file. I can extract the .mli file by passing `-i` and then compiling it, but I can also pass `-intf foo.ml -o foo.cmi`, or rename `foo.ml` to `foo.mli` and compile it with `-intf`. Will these produce identical .cmi files?
<companion_cube>
typically, just use dune and it'll do the dirty work for you
sleeping_papaya has joined #ocaml
ralu has quit [Ping timeout: 260 seconds]
waleee has quit [Quit: WeeChat 3.3]
ralu has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zebrag has quit [Remote host closed the connection]
sleeping_papaya has quit [Ping timeout: 256 seconds]
mbuf has joined #ocaml
xd1le has joined #ocaml
Haudegen has joined #ocaml
Everything has joined #ocaml
JSharp has quit [Ping timeout: 264 seconds]
JSharp has joined #ocaml
v0idpwn has quit [Ping timeout: 264 seconds]
v0idpwn has joined #ocaml
<d_bot>
<fakusb> I want to let people experiment with OCaml by using the toplevel, but don't want them to have access to my filesystem, or load modules.
<d_bot>
<fakusb>
<d_bot>
<fakusb> Is there a build-in way to tell toplevel "please don't touch anything except stdin/ stderr and stdout?
<primosoma>
fakusb, maybe a container?
<d_bot>
<fakusb> Yes, a container would be an option, but I want to find out if i can get away with less.
<d_bot>
<fakusb> How bad of an idea is it to disallow all directives (for example, by filtering out `#`, and filtering out the few Stdlib functions that touch the file system before passing on the phrases a user writes to ocamltop?)
<d_bot>
<fakusb> The setting is semi-private, in that only students on the discourse server of our course would have access to it
<d_bot>
<fakusb> (i plan a discord bot 🙂 )
<d_bot>
<fakusb> You mean the general concept of containers, not something build-in to ocaml, do you?
<primosoma>
yes, i mean docker
<d_bot>
<fakusb> (Or a library)]
olle has joined #ocaml
Tuplanolla has joined #ocaml
bartholin has joined #ocaml
xiongxin has joined #ocaml
jlrnick has joined #ocaml
<d_bot>
<octachron> @gar : you cannot compile an implementation file as an interface `ocamlc -intf foo.ml` will emit a syntax error as soon as `foo.ml` contains non-type-level items. Similarly, `ocamlc -i foo.ml` emits a mli file aimed at human reader, and it can fail to produce a valid mli file. The canonical path is to compile the file with `ocamlc -c foo.ml` which produces a correct `foo.cmi` file for all valid `foo.ml`.
<zozozo>
@fakusb : there's try-ocaml that does that (one of the solutions being that the toplevel is actually executed on the client, so no trouble for the server)
romildo has joined #ocaml
<d_bot>
<fakusb> A good idea; we actually use https://try.ocamlpro.com/ as the suggested way for our students to learn OCaml.
<d_bot>
<fakusb>
<d_bot>
<fakusb> I was thinking about what would be needed to provide a discord bot that provides the toplevel, more as a per project for myself than as something solving a huge problem.
bartholin has quit [Ping timeout: 256 seconds]
romildo has quit [Quit: Leaving]
jlrnick has quit [Ping timeout: 245 seconds]
bartholin has joined #ocaml
bobo has quit [Read error: Connection reset by peer]
bobo has joined #ocaml
sleeping_papaya has joined #ocaml
kandu has joined #ocaml
kakadu has quit [Remote host closed the connection]
sleeping_papaya has quit [Ping timeout: 268 seconds]
<d_bot>
<gar> @octachron Thanks, did not know that about `-i`. @companion_cube I'm using Bazel, not Dune.
bartholin has quit [Ping timeout: 256 seconds]
bartholin has joined #ocaml
<d_bot>
<Et7f3> You will always forget one way.
<d_bot>
<fakusb> Yeah, i think so. I think the way to go is docker.
<d_bot>
<fakusb> Just out of couriosity: are there known cases of ocaml code that types, uses only the stdlib minus the file/stream part, but doing nasty stuff, like reading memory in a bad way?
kakadu has joined #ocaml
<d_bot>
<Et7f3> Obj
<d_bot>
<Et7f3> maybe dynlink
<d_bot>
<Et7f3> other API that can be added when upgrading compiler
<Armael>
Marshal as well
<d_bot>
<Et7f3> Yes this one is really evil
<d_bot>
<Et7f3> Sys.command
kakadu has quit [Remote host closed the connection]
<d_bot>
<Et7f3> even if you disallow it. The compiler use it internally so you might be able to inject command with specially crafter flag.
<d_bot>
<gar> I'm running into a problem with codept. Not sure if this is the right forum, but here goes: I generate a file, `codept.args`, listing all the modules in the project, and I pass it to codept using `-args`. I do this because I need global deps analysis. The problem is that some of the files do not appear in the output. The cause seems to be that the codebase includes duplicate sourcefile names; for example, `main.ml` occurs in multip
xiongxin has quit [Quit: xiongxin]
glassofethanol has joined #ocaml
<d_bot>
<octachron> I would suggest to open an issue and I will look at it.
<d_bot>
<octachron> If the stars are aligned using the `-nested` argument which puts all modules `foo/dir/m.ml` into the `Foo . Dir` namespace might solve the issue without creating problems.
<d_bot>
<octachron> Otherwise, if the duplicate modules are only leaf modules, you could put them in their own namespace with `Namespace[main.ml]`.
<d_bot>
<octachron> For instance, `codept test/main.ml Exe[main.ml]` places the second `main` module in the `Exe` namespace solving the issue.
<d_bot>
<octachron> Otherwise, you will need to communicate more about the namespace structure to `codept` in order to explain how the project is differentiating between the duplicate modules.
<d_bot>
<gar> Ok thanks, I'll fiddle around with your suggestions and open an issue with either a problems or some documentation.
zebrag has joined #ocaml
kakadu has joined #ocaml
<companion_cube>
@gar oof, good luck
mro has joined #ocaml
Everything has quit [Quit: leaving]
mro has quit [Remote host closed the connection]
xiongxin has joined #ocaml
kakadu has quit [Remote host closed the connection]
mro has joined #ocaml
xiongxin has quit [Remote host closed the connection]
waleee has joined #ocaml
bartholin has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
mro has quit [Remote host closed the connection]
glassofethanol has quit [Quit: Lost terminal]
bartholin has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mbuf has quit [Quit: Leaving]
xd1le has quit [Quit: xd1le]
mro has quit [Remote host closed the connection]
wwilly has joined #ocaml
bartholin has quit [Ping timeout: 245 seconds]
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
bartholin has joined #ocaml
bgs has quit [Ping timeout: 268 seconds]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
bgs has joined #ocaml
bgs has quit [Remote host closed the connection]
bartholin has quit [Ping timeout: 264 seconds]
bgs has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
olle has quit [Ping timeout: 245 seconds]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
bartholin has joined #ocaml
mro has joined #ocaml
sleeping_papaya has joined #ocaml
olle has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
sleeping_papaya has quit [Ping timeout: 268 seconds]
rgrinberg has joined #ocaml
sleeping_papaya has joined #ocaml
bartholin has quit [Quit: Leaving]
sleeping_papaya has quit [Ping timeout: 256 seconds]
olle has quit [Ping timeout: 264 seconds]
mro has quit [Quit: Leaving...]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
<d_bot>
<Fermion> Hey folks -- Merlin in emacs will complete standard namespaces like "List" and "Format" but won't do packages I #required,
<d_bot>
<Fermion> I feel like I'm missing a step here.
<d_bot>
<Fermion> or well -- I'm pretty confused. There's a nice document here https://discuss.ocaml.org/t/ocaml-repl-driven-development/4068/4 about sending stuff to the toplevel. I have a dune project with (executable (name foo) (libraries bar)), and I want to edit foo.ml in an interactive way
<d_bot>
<Fermion> as in, edit some stuff, send it to the repl, and so on and so forth. The repl doesn't know anything about bar though, so i guess I have to #require it in
<d_bot>
<Fermion> but I'm not supposed to #require in foo.ml!
<d_bot>
<Fermion> so it's all very confusing how I'm supposed to set stuff up to do this kind of development