companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.14.0 released: https://ocaml.org/releases/4.14.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
rgrinberg has joined #ocaml
xgqt has quit [Ping timeout: 240 seconds]
xgqt has joined #ocaml
bobo_ has quit [Ping timeout: 240 seconds]
bobo_ has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
azimut has quit [Ping timeout: 268 seconds]
rgrinberg has joined #ocaml
dextaa has quit [Read error: Connection reset by peer]
rgrinberg has quit [Client Quit]
dextaa has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
<d_bot> <JeysonFlores> Why is OCaml's linguist color green but the actual logo of the language is orangy?
ansiwen has quit [Quit: ZNC 1.7.1 - https://znc.in]
ansiwen has joined #ocaml
mbuf has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<d_bot> <sim642> Is there supposed to be any rythm and reason to those colors? I've gotten very used to that green
Serpent7776 has quit [Quit: leaving]
<d_bot> <cod1r> github probably just chooses a color based off of whatever they feel is appropriate
<d_bot> <cod1r> i do like that green though
Haudegen has joined #ocaml
<d_bot> <josé> :triggered_ocaml:
<d_bot> <Et7f3 (@me on reply)> They also need to have a color that doesn't conflict with other languages so we can distinguish them at a glance
waleee has quit [Ping timeout: 244 seconds]
<d_bot> <josé> Rust currently has the orange color no?
<d_bot> <josé> Didn't it become popular decades after ocaml?
<d_bot> <josé> 🦀
bastienleonard has joined #ocaml
<d_bot> <josé> Common lisp is also green 🤔
williewillus has quit [Quit: Ping timeout (120 seconds)]
williewillus1 has joined #ocaml
williewillus0 has joined #ocaml
williewillus1 has quit [Ping timeout: 276 seconds]
Tuplanolla has joined #ocaml
<d_bot> <JeysonFlores> The main idea of giving colors to languages is to be identificable, assigning a color people can relate quickly. The logo being the main visual representation of a language is often used to get that color
<d_bot> <JeysonFlores> They often give colors based on arbitrary decisions, however it can be changed, if the community wants it, a pull request can be opened on linguist's repo requesting the color change.
bastienleonard has quit [Ping timeout: 244 seconds]
<d_bot> <JeysonFlores> The colors are owned based on hexadecimal colors, so even if there's another language with an orange-alike color (like Swift) as long as it's not the same hex color is fine.
<d_bot> <Et7f3 (@me on reply)> they still need to be diferent enough for dev with visual defficience
<d_bot> <josé> different variations of one color is what i'm referring to
<d_bot> <josé> to support what he said
<d_bot> <undu> that green is was used in the old ocaml manuals: https://caml.inria.fr/pub/distrib/ocaml-4.02/ocaml-4.02beta-refman.html
<d_bot> <undu> it's all very early 2000s
<d_bot> <josé> 👀
<d_bot> <bnguyenv> There was a discuss thread on this subject (which basically says the same thing as what's been said here) : https://discuss.ocaml.org/t/the-color-associated-with-ocaml-on-github-is-bad-lets-make-it-good/5597
<d_bot> <Lyna> Hello, I'm french user of ocaml, I can't open windows in ocaml on vs code, and I have no idea why
<d_bot> <octachron> With which library are you trying to open a graphical window?
<d_bot> <Lyna> None
<d_bot> <octachron> That's not possible? How are you trying to open a graphical window then?
<d_bot> <Jektrix> Its similar to the shell colour
<d_bot> <Jektrix> On github
waleee has joined #ocaml
<d_bot> <Lyna> Ok...
<d_bot> <Lyna> Before I use spyder but now I want use vs code for ocaml, I have download ocaml on vs code...
<d_bot> <Lyna> I'm really lost
bartholin has joined #ocaml
<d_bot> <octachron> Ok, you meant to say that you have trouble configuring VScode for OCaml. In this case, you need to install ocaml-lsp-server with opam and the OCaml Platform extension.
<d_bot> <NULL> (If you have trouble with English, you can ask questions in #débutants)
<d_bot> <Lyna> Oh yes thank you
azimut has joined #ocaml
waleee has quit [Ping timeout: 244 seconds]
waleee has joined #ocaml
jpds has quit [Write error: Connection reset by peer]
adanwan has quit [Read error: Connection reset by peer]
adanwan has joined #ocaml
jpds has joined #ocaml
<d_bot> <mpmfrans> @octachron same for me
<d_bot> <octachron> I am sorry, @mpmfrans , but I am not sure in which context you are answering .
<d_bot> <mpmfrans> Configuring VScode for Ocaml
<d_bot> <mpmfrans> Although I mostly work on Linux
<d_bot> <mpmfrans> Ubuntu
<d_bot> <octachron> Did you install ocaml-lsp-server with opam and the OCaml platform extension with VScode?
<d_bot> <mpmfrans> No
<d_bot> <mpmfrans> I was looking for a tutorial to set it up
raskol has joined #ocaml
<d_bot> <mpmfrans> thank you!
raskol has quit [Ping timeout: 240 seconds]
spip has joined #ocaml
bobo_ has quit [Ping timeout: 240 seconds]
rwmjones has quit [Ping timeout: 244 seconds]
rwmjones has joined #ocaml
<d_bot> <mpmfrans> I did read this tutorial already though its more like I want to run utop for example in VSCode
<d_bot> <mpmfrans> And I am not entirely sure when I installed Ocaml for VSCode what the sandbox is and I cant select one
Haudegen has quit [Ping timeout: 240 seconds]
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
raskol has joined #ocaml
bartholin has quit [Quit: Leaving]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
<d_bot> <Ulugbek> Maybe the official documentation (which explains what a sandbox is) can help
raskol has quit [Ping timeout: 272 seconds]
<d_bot> <mpmfrans> thank you!
waleee has quit [Ping timeout: 244 seconds]
<d_bot> <ncl> is this (still?) true, this seems like a bit of a stretch and/or outdated (https://ocaml.org/docs/garbage-collection)
<d_bot> <Bluddy> It is true. What's missing is the fact that C/C++/Rust allocate a lot of stuff on the stack, which is the best possible allocation strategy for short-lived items.
MrPingouin has left #ocaml [WeeChat 2.3]
Haudegen has joined #ocaml
waleee has joined #ocaml
waleee has quit [Ping timeout: 272 seconds]
mbuf has quit [Quit: Leaving]
raskol has joined #ocaml
<d_bot> <ncl> i guess, but the claim that `free` is expensive feels dated at best except for "bad code" eg. malloc/free in a loop or just unfortunate edgecases which is an argument also made in the other direction
<d_bot> <ncl> it doesn't feel *wrong* per-se so much as a bit overstated in practice and more to the point of "if you don't have to deal with memory yourself you can't as easily make the mistake of managing it poorly"
bastienleonard has joined #ocaml
<d_bot> <Bluddy> No regular allocation and deallocation really is more expensive. It's not dated -- it's just that C/C++/Rust get so much of a boost from their other advantages, such as stack allocation and lack of boxing, that it's mostly irrelevant. For C and C++ that tradeoff comes with a lot of danger. For Rust, it doesn't.
<companion_cube> in C++ if you want to go faster, you can use custom allocators, but they're more work (and danger) than the minor heap
<d_bot> <Bluddy> right. but you're already working at speeds > ocaml
<d_bot> <Bluddy> due to the other factors
<d_bot> <Terence> hello, I can't get the syntax right to apply a functor signature when the functor has an argument :
<d_bot> <Terence> if I have type
<d_bot> <Terence> ```ocaml
<d_bot> <Terence> module type FooFonctor = functor (F:Foo) -> sig
<d_bot> <Terence> val bar : Foo.t -> unit
<d_bot> <Terence> end
<d_bot> <Terence> ```
<d_bot> <Terence>
<d_bot> <Terence> How do I apply it to
<d_bot> <Terence> ```ocaml
<d_bot> <Terence> module FFImpl (F: Foo) = struct [...] let bar _ = () end
<d_bot> <Terence> ``` ?
<d_bot> <octachron> Module type are specifications. You can't apply a specification. What you want to do is to write the module type for the functor result, and add back the equalities between the functor argument and the resulting module types with with constraint.
<d_bot> <octachron> See https://ocaml.org/api/Map.html for an illustration.
<d_bot> <octachron> (The other option is to constraint the whole functor but this is less composable if you ever need to write down the result signature).
<d_bot> <Terence> Thank you for your answer.
<d_bot> <Terence> So by using `with` on the module type the functor gives back ?
<d_bot> <Terence> I mean, am I able to use `with` for functions in addition to types ?
raskol has quit [Ping timeout: 240 seconds]
<d_bot> <octachron> You only need to add equality between types (since signature is the type of the module, and thus signatures only speak of the types of functions).
<d_bot> <Terence> ah so you mean defining the type of the output module which includes a new type I will fill up with the "with" ?
<d_bot> <octachron> In your case the module type would be `module type FooResult = sig type foo val bar: foo -> unit end`.
<d_bot> <octachron> And the functor result can be written as `FooResult with type foo := FooArg.t`
<d_bot> <Terence> ok I think that matches my last message, thank you 😄
raskol has joined #ocaml
raskol has quit [Ping timeout: 276 seconds]
raskol has joined #ocaml
neiluj has joined #ocaml
<neiluj> Hi! How would you debug malloc errors when working with C bindings in OCaml?
<neiluj> I tried valgrind but it doesn't print much even though the -g flag is added in the dune file
raskol has quit [Ping timeout: 244 seconds]
<d_bot> <Terence> and is there a way to make all the extra functions the input module defined that are not part of the signature still available in the output module ? Or this doesn't make sense ?
adanwan_ has joined #ocaml
adanwan has quit [Ping timeout: 268 seconds]
<d_bot> <octachron> If they are not part of the output module, it means they have been purposefully not exposed.
<d_bot> <Et7f3 (@me on reply)> neiluj: I would either double check gc rule. And call often GC to collect regularly
<companion_cube> I hear that calling `Gc.compact()` super often helps triggering the error
waleee has joined #ocaml
xgqt has quit [Ping timeout: 244 seconds]
xgqt has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Quit: Leaving...]
cedric has joined #ocaml
cedric has quit [Quit: Konversation terminated!]
bastienleonard has quit [Ping timeout: 240 seconds]
<neiluj> thanks, wil try this!
neiluj has quit [Ping timeout: 276 seconds]
rgrinberg has joined #ocaml
jpds has quit [Remote host closed the connection]
jpds has joined #ocaml
Haudegen has quit [Ping timeout: 276 seconds]
motherfsck has joined #ocaml
azimut has quit [Remote host closed the connection]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
azimut has joined #ocaml
rgrinberg has joined #ocaml