quernd8 has quit [Quit: Ping timeout (120 seconds)]
quernd8 has joined #ocaml
Soni has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
Soni has quit [Ping timeout: 256 seconds]
Soni has joined #ocaml
motherfsck has joined #ocaml
motherfsck has quit [Ping timeout: 268 seconds]
chrisz has quit [Ping timeout: 256 seconds]
chrisz has joined #ocaml
motherfsck has joined #ocaml
dooptydoo90x has quit [Quit: WeeChat 3.5]
amk has quit [Ping timeout: 256 seconds]
amk has joined #ocaml
motherfsck has quit [Ping timeout: 240 seconds]
mbuf has joined #ocaml
bgs has joined #ocaml
rwmjones has quit [*.net *.split]
hannes has quit [*.net *.split]
terrorjack has quit [*.net *.split]
h0rror has quit [*.net *.split]
emp has quit [*.net *.split]
delyan has quit [*.net *.split]
Boarders___ has quit [*.net *.split]
mstevens has quit [*.net *.split]
noddy has quit [*.net *.split]
thizanne has quit [*.net *.split]
ohperitel_ has quit [*.net *.split]
omni has quit [*.net *.split]
omni has joined #ocaml
ohperitel has joined #ocaml
rwmjones has joined #ocaml
mstevens has joined #ocaml
hannes has joined #ocaml
delyan has joined #ocaml
thizanne has joined #ocaml
emp has joined #ocaml
Boarders___ has joined #ocaml
h0rror has joined #ocaml
bgs has quit [Remote host closed the connection]
Serpent7776 has joined #ocaml
quernd81 has joined #ocaml
quernd8 has quit [Quit: Ping timeout (120 seconds)]
quernd81 is now known as quernd8
xgqt has quit [Quit: WeeChat 3.7.1]
xgqt has joined #ocaml
brettgilio has quit [Remote host closed the connection]
bartholin has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
spip has joined #ocaml
kakadu has joined #ocaml
neiluj has joined #ocaml
terrorjack has joined #ocaml
dhil has joined #ocaml
<neiluj>
going back to the functor issue I has, is there still a way to keep the functor implementation intact while still restricting the signature of an input module
<neiluj>
knowing that the functor implementation actually doesn't use the extra values that we're dismissing with the signature restriction
<neiluj>
?
<neiluj>
I understand that in light of what octachron replied earlier that is not possible
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
Haudegen has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
<discocaml>
<froyo> example?
random-jellyfish has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
<neiluj>
changed plans, trying something else...
dooptydoo90x has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
<discocaml>
<Kakadu> I'm trying to build a .cmxa library with ocamlfind. `ocamlfind opt -package base.shadow_stdlib -linkpkg -a` It says `Option -a cannot be used with .cmxa input files.` Is it an issue with METAs, or am I invoking ocamlfind badly?
<neiluj>
"The second module type is not included in the first" is a bit vague
<neiluj>
reportedly, DATA has the missing value
alexherbo2 has quit [Ping timeout: 245 seconds]
<octachron>
You have a list of missing functions
<octachron>
Note that module type are invariant (with respect to module subtyping), the implementation and interface version of module types must be equal.
<neiluj>
oh so the error is not about the module type, but more about the implementations conforming to the module type?
<neiluj>
that's what the error is actually telling indeed (written verbatim)...
<octachron>
... the error is about module types that don't match between the implementation and the interface, since the module type of the implementation must be a subtype of the module type of the interface.
<neiluj>
but still, is there a way to tell what is referred to as "first" and "second"?
<neiluj>
ok! thanks very clear
<octachron>
Is this the exact error message that you get?
<octachron>
(But yes avoiding first and second in those error messages is my error todo list)
<neiluj>
yep I simply changed the package/module names to generic ones
<neiluj>
oh cool :)
<neiluj>
in the meantime is there a way to tell which implem doesn't comply with the module type?
<neiluj>
I'm trying to grep to find all definitions of such modules
alexherbo2 has joined #ocaml
<octachron>
Would it be possible to link the code? (I would be interested to extract a smaller test case for the compiler, the elision mechanism seems to be overworking here)
alexherbo2 has quit [Ping timeout: 245 seconds]
<neiluj>
octachron: sure, it's a big codebase beware :)
<neiluj>
\msg octachron if I can help you set up anything I'm available
<neiluj>
oops
bartholin has quit [Quit: Leaving]
alexherbo2 has joined #ocaml
alexherbo2 has quit [Ping timeout: 245 seconds]
riverdc_ has joined #ocaml
<companion_cube>
pro tip: always start with /query octachron, then type your message :p
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
random-jellyfish has quit [Ping timeout: 245 seconds]
curium has quit [Quit: Gateway shutdown]
curium has joined #ocaml
noonien has joined #ocaml
motherfsck has joined #ocaml
waleee has joined #ocaml
mbuf has quit [Quit: Leaving]
Anarchos has quit [Ping timeout: 265 seconds]
motherfsck has quit [Ping timeout: 250 seconds]
motherfsck has joined #ocaml
dooptydoo90x has quit [Quit: WeeChat 3.5]
<discocaml>
<zahadoom13> Help? OCaml doesnt support unicode?
<discocaml>
<octachron> OCaml does support unicode.
<discocaml>
<octachron> It just doesn't try to pretend that programs can support unicode with programmers understanding unicode.
neiluj has quit [Ping timeout: 265 seconds]
<discocaml>
<zahadoom13> in the same sense that C89 supports unicode?
<discocaml>
<octachron> without programmers*
<companion_cube>
Pretty much like C, yes, but with better bytestrings
<discocaml>
<octachron> What are you trying to do?
<discocaml>
<NULL> `# Printf.printf "%s\n%!" (Scanf.scanf "%s" (fun s -> s));;` correctly printd back `ⓡ` for example
<discocaml>
<zahadoom13> just playing around with the language... So far? I'm really not unimpressed...
<discocaml>
<zahadoom13> my comparison is F#... and it seems like OCaml is much less mature...
<discocaml>
<zahadoom13> just playing around with the language... So far? I'm really unimpressed...
<companion_cube>
F# has the whole .NET ecosystem to draw on
<discocaml>
<zahadoom13> Yeah... I'm kinda used to that... same for C, Python, TypeScript...
<companion_cube>
I think you're right that OCaml support for unicode is not great, if you consider things like Re (regex) or scanf (which is not very useful anyway)
<discocaml>
<zahadoom13> you guys have only now gotten threads 😛 even if they are slightly better threads....
<companion_cube>
You can do things correctly with uutf/uucp/etc.
gentauro has quit [Read error: Connection reset by peer]
<companion_cube>
We always had threads, we just got rid of the equivalent of the GIL
<discocaml>
<zahadoom13> sure, but how come the plain standard string isn't unicode...
<discocaml>
<NULL> What would that mean ?
<companion_cube>
It's a bytestring, and can be used for utf8 as is
<discocaml>
<zahadoom13> seems like a step back to C
<companion_cube>
Same as C and C++ really
<companion_cube>
Right. Note that some other languages picked the wrong horse (utf16), which doesn't seem great either.
<discocaml>
<octachron> @zahadoom13 , no threads were available in caml light pretty much at the same time that in the linux kernel (at the end of 90s).
<discocaml>
<zahadoom13> where do you realistically meet the issues with UTF16?
<discocaml>
<octachron> The problem is that random access to utf-{8,16} is pretty much less useless, because that doesn't match any useful notion of graphical characters.
<companion_cube>
For ascii like text, it's wasteful (2 bytes per ascii char); for full unicode it has no advantage over utf8 (it's still not random access)
<companion_cube>
So really, just pick utf8, like modern languages all do
<discocaml>
<zahadoom13> threads without parallel processing is nice but, but its kind of silly... NVM OCaml has parrallel processing now. though it appears there are several libraries for that?
<companion_cube>
Fwiw the ocaml stdlib now has functions to decode/encode utf8, so there is support for unicode
gentauro has joined #ocaml
<companion_cube>
Yeah there are helper libraries, not that it's mandator to use them
<discocaml>
<zahadoom13> i need to manipulate non ascii stuff
<companion_cube>
That will work. Just not with scanf.
<discocaml>
<octachron> even with scanf, `Scanf.sscanf "grèce ≈ ελλασ" "%s %s %s" (fun x y z -> x, y, z)` works as expected.
<discocaml>
<octachron> The devil is in the detail of "manipulate non ascii stuff".
<companion_cube>
scanf is tricky anyway, it's not that useful
<discocaml>
<octachron> with the usual rules of avoid peeking at the graphical layout and/or grammatical structure of user text since you are not probably a linguist (and are probably not familiar with all human scripts beyond simple alphabetical scripts, Chinese and Japanese scripts).
<discocaml>
<zahadoom13> UCS-2 covers all languages used today....
<discocaml>
<octachron> Unicode covers a very significant amount of languages used today.
<discocaml>
<octachron> UCS-2 aka "we failed to implement utf-16" does not.
<discocaml>
<zahadoom13> USED as actually used by people who have access to computers. this doesn't include arcane scripts...
<discocaml>
<octachron> But you can have a look at Unicode 15 beta report to see that even Unicode needs to adjust to cover actual use in China for instance.
<companion_cube>
I have no horse in that particular race, but in any case, random addressing codepoints is really useless
<companion_cube>
Even in French i use multiple codepoints for one char sometimes - that's how I input accents
<companion_cube>
So ucs2 would just be more space inefficient than utf8
<discocaml>
<zahadoom13> that's not one char
<companion_cube>
It sure looks like one char when displayed
<companion_cube>
And it should count as 1 char if you compute the length
<discocaml>
<zahadoom13> I mean it's a matter of definition. in Hebrew אָ is treated conceptually like two symbols
<companion_cube>
Cool for hebrew, but I'm talking about French
<companion_cube>
é is one char, even when represented by two codepoints
<discocaml>
<zahadoom13> in Hebrew, I also would never want to split them 🙂
<discocaml>
<zahadoom13> I mean it symbolyses 2 things, but if you separate them they both brake.
<companion_cube>
Right
<discocaml>
<NULL> Now what ? Do you agree that the length of a unicode string is independent of its length as a byte sequence ?
<discocaml>
<zahadoom13> I agree that both UTF-8 and UCS-2 suck. Although, I want a default implementation for strings where 95% of the time I wouldn't care....
<companion_cube>
You're the only one saying utf8 sucks, I think :)
<discocaml>
<NULL> And what's the issue with OCaml strings then ?
<discocaml>
<zahadoom13> utf-8 sucks for storage and implementations...
<discocaml>
<octachron> utf-8 is the most efficient for storage for european scripts, and is only problematic for CJK scripts, which you don't care to support properly?
<discocaml>
<zahadoom13> the length in bytes is inconsistent
<discocaml>
<NULL> > Do you agree that the length of a unicode string is independent of its length as a byte sequence ?
<companion_cube>
It's not even problematic, it's slightly less efficient but it works.
<discocaml>
<octachron> That's not a problem since random access to unicode scalar values is not something that is useful.
<companion_cube>
And that's if your text is pure japanese/chinese/..., if there's markup it averages out
Serpent7776 has quit [Ping timeout: 246 seconds]
<discocaml>
<zahadoom13> I'm fine with UTF-8 honestly....
Anarchos has joined #ocaml
<discocaml>
<zahadoom13> oh, and the compiler is crap.
motherfsck has joined #ocaml
<companion_cube>
Lol that's the worst possible criticism of ocaml
<discocaml>
<zahadoom13> I mean I'm sure it's wonderful, like any FP language, but the messages are are meaningless
<companion_cube>
The ecosystem is questionable but really the compiler is solid.
<companion_cube>
Ah, the syntax errors?
<discocaml>
<NULL> "It's crap. Sure it's wonderful as a whole, but that part is sub-par"
<discocaml>
<zahadoom13> I'm sure the ASTs are marvelous.... I'm talking as a novice user....
<companion_cube>
The grammar does have a couple crappy corners that make for poor error messages...
<discocaml>
<zahadoom13> F# actually was horrible at first too in that sense, but they really improved. still not InteliJ "let me fix that mistake for you...." level, but its more usable...
neiluj has joined #ocaml
<discocaml>
<octachron> If the critics are syntax errors, it is more than OCaml is one of the last compiler holding on a generated parser from a declarative grammars ... but in few ~~months~~~~years~~OCaml versions soon we will have an updated menhir with support with good syntax error messages.
<discocaml>
<NULL> What does that mean exactly ? A new version of menhir, or just changing to its newer interface ?
<companion_cube>
@octachron can the errors for badly nested `let` really be fixed!
<companion_cube>
?
<discocaml>
<octachron> There is prototype of a better way to scale menhir error messages to a grammar as large as the OCaml one.
<discocaml>
<octachron> @companion_cube , if I remember correctly this is one of the basic test case.
<companion_cube>
Hmmm ok
<companion_cube>
I remember it being a massive pain
<discocaml>
<zahadoom13> Yes. you can point to the error with a reasonable probability of being right.... I think. not sure i understand the grammar well enough
<companion_cube>
Caused by the grammar, really
<discocaml>
<zahadoom13> It's not that large. I also tried out Scala.
<discocaml>
<octachron> The new error report tools work by analyzing the parser stack, and thus one can check if there is "one not reduced let" in the stack (if I remember correctly).
<discocaml>
<zahadoom13> Guy's please dont let OCaml become Scala. I hope to come back here one day, when you have a usable echosystem....
alexherbo2 has quit [Remote host closed the connection]
<companion_cube>
What would "become scala" mean?
<companion_cube>
@octachron cool!
<discocaml>
<zahadoom13> adding wayyyy to many features to the language that don't play along.
<companion_cube>
Afaict scala 3 looks great
<discocaml>
<zahadoom13> honestly one of the best things I like about F# is that the FP stuff and the OO stuff are there next to each other, and that's it. And that the whole parametric types thing, is limited to simple generics. and no propper Monads, only "computational expressions"
bartholin has quit [Quit: Leaving]
<companion_cube>
It does seem pretty nice
<companion_cube>
Scala is a lot more powerful but F# seems quite nice overall
<discocaml>
<zahadoom13> you mean expressive not powerful
<discocaml>
<zahadoom13> I know Haskell only superficially but it seems a lot more thought out than scala...
<discocaml>
<zahadoom13> The problem with F# is MSFT and their politics, and .Net has some shortcomings....
<discocaml>
<zahadoom13> Oh well... back to Python I guess... The language for everyone! especially if they dont really care about programming
bgs has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[]: i've been blurred!]