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
Tuplanolla has quit [Ping timeout: 240 seconds]
Haudegen has quit [Ping timeout: 240 seconds]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
zebrag has quit [Remote host closed the connection]
White_Flame has quit [Ping timeout: 252 seconds]
White_Flame has joined #ocaml
mfp has quit [Ping timeout: 252 seconds]
shmibs has quit [Quit: leaving =o]
shmibs has joined #ocaml
nicoo has quit [Ping timeout: 240 seconds]
nicoo has joined #ocaml
Sanduni has joined #ocaml
Sanduni has quit [Client Quit]
shmibs has quit [Quit: leaving =o]
shmibs has joined #ocaml
vicfred has quit [Ping timeout: 240 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
mbuf has joined #ocaml
olle has joined #ocaml
delysin has quit [Quit: WeeChat 3.1]
wonko7 has joined #ocaml
Serpent7776 has joined #ocaml
Tuplanolla has joined #ocaml
wonko7 has quit [Ping timeout: 265 seconds]
<olle> Hm, what's the purpose of a parser.y file? oO
<d_bot> <Cyclomatic Complexity> hey
<d_bot> <Cyclomatic Complexity> After building my code, I want to run a few checks / benchmarks / tests, but that are qualitative
<d_bot> <Cyclomatic Complexity> As in, it doesn't yield a list of yes/no checks, just various numbers
<d_bot> <Cyclomatic Complexity> Is there a library that lets me automate building a report out of these?
Haudegen has joined #ocaml
bartholin has joined #ocaml
st8less has quit [Quit: WeeChat 2.9]
<d_bot> <bikal> @octachron Been playing with gadt equality technique you mentioned. However, am bit stuck. Would you be able to help me get unstuck - getting compiler error at line 52. https://gist.github.com/bikallem/94638dc89de8bc6eac4ec4bf1c062b14
<d_bot> <bikal> or is this not possible?
mro_name has joined #ocaml
<olle> Is it possible to dump the linebuf created by Menhir lexer?
<d_bot> <bikal> Updated gist with `Obj.magic` to make it compile and use it. Value `f` has the correct value `Some 123` so the `Eq.Eq` is valid but it seems compiler can't infer/calculate that. Is there a way to nudge the compiler to correctly infer that type without use of `Obj.magic`?
bartholin has quit [Ping timeout: 265 seconds]
mro_name has quit [Remote host closed the connection]
MangaD has joined #ocaml
bartholin has joined #ocaml
<MangaD> Hello, I am trying to write a function in OCaml that gets the nth unicode character in a string. Is there any library that does this or must I write such a function myself?
<d_bot> <bikal> Perhaps this .. https://erratique.ch/software/uutf/doc/Uutf}
<d_bot> <octachron> @bikal : your issue is that the equality function that you have written is useless. You want to get a `(a,b) Eq.t`, not a `(a,a) Eq.t`.
<d_bot> <octachron> The reason is that string equality between names is not strong enough to prove equality of the types.
<d_bot> <octachron> You need to use extensible sum types since they have an identity that is guaranteed by the type system.
<d_bot> <bikal> ok. let me try that
mfp has joined #ocaml
<d_bot> <bikal> Dang ... gadt really does exercise ocaml type fu muscle .. 🙂 getting frustrated at times but enjoying somewhat 😀
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]
mro_name has joined #ocaml
mro_name has quit [Remote host closed the connection]
neiluj has joined #ocaml
neiluj has quit [Changing host]
neiluj has joined #ocaml
bartholin has quit [Ping timeout: 252 seconds]
mro_name has joined #ocaml
bartholin has joined #ocaml
<d_bot> <Recruiter6061> I just wanted to do some ocaml to be ready for test then end up on article why null bad https://www.lucidchart.com/techblog/2015/08/31/the-worst-mistake-of-computer-science/
mbuf has quit [Quit: Leaving]
mro_name has quit [Remote host closed the connection]
tinga is now known as pflanze
mro_name has joined #ocaml
bartholin has quit [Ping timeout: 240 seconds]
bartholin has joined #ocaml
<d_bot> <MisterGraf> hello, i need help
<d_bot> <MisterGraf> i have an Exam for soon
<d_bot> <MisterGraf> & honestly i am lost with ocaml
<d_bot> <MisterGraf> i know on paper the systeme for having the fonction
<d_bot> <MisterGraf> but idk how to write it
<d_bot> <MisterGraf> can some1 can help me
mro_name has quit [Remote host closed the connection]
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
<d_bot> <Recruiter6061> same here lol
White_Flame has quit [Ping timeout: 240 seconds]
<d_bot> <Butanium> if you need some resource to learn it check this link https://www.cs.cornell.edu/courses/cs3110/2020fa/textbook/intro/intro.html
<d_bot> <Butanium> someone sent it above and it seems quite good
White_Flame has joined #ocaml
bartholin has quit [Ping timeout: 252 seconds]
mro_name has joined #ocaml
bartholin has joined #ocaml
Jesin has joined #ocaml
zebrag has joined #ocaml
delysin has joined #ocaml
wonko7 has joined #ocaml
mro_name has quit [Quit: Leaving...]
<d_bot> <MisterGraf> @Butanium u think ppl can correct me?
<d_bot> <MisterGraf> ```ocaml
<d_bot> <MisterGraf> let rec fusion comp l1 l2 =
<d_bot> <MisterGraf> match l1 with
<d_bot> <MisterGraf> [] -> []
<d_bot> <MisterGraf> |x1::reste ->
<d_bot> <MisterGraf> match l2 with
<d_bot> <MisterGraf> [] -> [l1]
<d_bot> <MisterGraf> |x2::reste2 -> if comp x1 x2
<d_bot> <MisterGraf> then ((x1::l1)::l2)
<d_bot> <MisterGraf> else l1::fusion comp l1 reste2;;
<d_bot> <MisterGraf> ```
bartholin has quit [Ping timeout: 246 seconds]
landonf has quit [Excess Flood]
landonf has joined #ocaml
<d_bot> <Butanium> I won't try to understand what you are trying to code neither why it doesn't work
<d_bot> <Butanium> so consider giving more detail
<d_bot> <Butanium> we are not at your disposal so make an effort and ask **specific** question
<d_bot> <MisterGraf> is writted on french i gonna put google trad
<d_bot> <MisterGraf> don t moove
<d_bot> <MisterGraf> fusion (<) [1; 4; 7; 8] [2; 7];;
<d_bot> <MisterGraf> - : int list = [1; 2; 4; 7; 7; 8]
<d_bot> <MisterGraf> i need to have that
MangaD has left #ocaml ["Leaving"]
<d_bot> <bikal> 👌 Thanks for this tip. Finally it's compiling and working now. https://gist.github.com/bikallem/94638dc89de8bc6eac4ec4bf1c062b14
bartholin has joined #ocaml
<d_bot> <bikal> although I wonder if I were to extend `tid` to `type _ tid += Int32 : int32 tid` in client code, the `eq` wouldn't work, hmmm
<d_bot> <Butanium> nice 👍
<d_bot> <Butanium> ^
<d_bot> <bikal> I am guessing it's because `tid ()` function mints a new type every time it's called, right.
olle has quit [Ping timeout: 260 seconds]
White_Flame has quit [Remote host closed the connection]
White_Flame has joined #ocaml
White_Flame has quit [Ping timeout: 252 seconds]
mro_name has joined #ocaml
mro_name has quit [Quit: Leaving...]
White_Flame has joined #ocaml
mosterdt__ is now known as mosterdt
<d_bot> <Christophe> Can you be specific on what is not working, what is the error?
<d_bot> <Christophe> Did you get a type error, or not the expected result maybe?
<d_bot> <MisterGraf> Error: This expression has type 'a list but an expression was expected of type
<d_bot> <MisterGraf> 'b -> 'b list -> bool
waleee-cl has joined #ocaml
bartholin has quit [Ping timeout: 246 seconds]
bartholin has joined #ocaml
olle has joined #ocaml
arecaceae has quit [Remote host closed the connection]
arecaceae has joined #ocaml
wonko7 has quit [Ping timeout: 252 seconds]
neiluj has quit [Quit: leaving]
bartholin has quit [Ping timeout: 252 seconds]
bartholin has joined #ocaml
vicfred has joined #ocaml
olle has quit [Ping timeout: 240 seconds]
bartholin has quit [Quit: Leaving]
sagax has quit [Remote host closed the connection]
<d_bot> <Samir> Do you have the line ?
Haudegen has quit [Ping timeout: 252 seconds]
Serpent7776 has quit [Quit: leaving]
Tuplanolla has quit [Quit: Leaving.]