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
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
smazga has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
smazga has quit [Ping timeout: 246 seconds]
smazga has joined #ocaml
<d_bot> <Sotaro OKUDA> Hi. I'm trying to build OPAM for x86 from source code. I succeed to build OCaml for x86 from source code. It works. But when I type "make lib-ext" and "make" for building OPAM it says they don't find the library or binaries below;
<d_bot> <Sotaro OKUDA> - cmdliner
<d_bot> <Sotaro OKUDA> - ocamlgraph
<d_bot> <Sotaro OKUDA> - extlib
<d_bot> <Sotaro OKUDA>
<d_bot> <Sotaro OKUDA> How can I have those binaries?
smazga has quit [Ping timeout: 260 seconds]
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
smazga has joined #ocaml
amiloradovsky has joined #ocaml
mxns has quit [Ping timeout: 240 seconds]
mxns has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
smazga has quit [Ping timeout: 264 seconds]
amiloradovsky has joined #ocaml
<d_bot> <Sotaro OKUDA> or How can I build those tools separately?
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 246 seconds]
smazga has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
Haudegen has quit [Ping timeout: 258 seconds]
mxns has quit [Ping timeout: 260 seconds]
<d_bot> <mbacarella> I don't have a lot of help to offer on this, but if I were trying to set up 32bit opam I'd try running a 32bit OS image on docker and doing a normal opam setup on that
mxns has joined #ocaml
vicfred has joined #ocaml
mxns has quit [Client Quit]
mxns has joined #ocaml
djellemah has quit [Quit: Leaving]
djellemah has joined #ocaml
reynir has quit [Ping timeout: 260 seconds]
reynir has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 264 seconds]
djellemah has quit [Ping timeout: 260 seconds]
rgrmrts has joined #ocaml
smazga has joined #ocaml
zebrag has joined #ocaml
inkbottle has quit [Ping timeout: 258 seconds]
smazga has quit [Ping timeout: 260 seconds]
<d_bot> <kit_ty_kate> what are you trying to do? Is the i686 binary on https://github.com/ocaml/opam/releases/tag/2.0.7, or the install script not working for you?
<rgrmrts> I'm pretty excited about multicore - how likely is it that domains being upstreamed will have a reasonable migration path if I start using the multicore compiler now? fwiw, this is not a project running in production
<companion_cube> I think the domains API is the most stable part of multicore
<companion_cube> the monthly blog posts seem to indicate it's the part that will be merged within the next year?
<companion_cube> (hopefully?)
<rgrmrts> yeah looking through the interface it looks pretty standard, but channels from domainlibs is obviously a very useful thing to be using
<rgrmrts> but, I guess, that's just a library... I didn't think there is/was any plan to upstream that
<companion_cube> I don't know
<rgrmrts> oh cool, I missed last months update and just went back to it, it had this presentation linked https://www.youtube.com/watch?v=Z7YZR1q8wzI&list=PLKO_ZowsIOu5fHjRj0ua7_QWE_L789K_f&index=6&t=0s which answers my question :)
wingsorc has quit [Quit: Leaving]
rgrmrts has quit [Quit: beep boop]
mxns has quit [Ping timeout: 272 seconds]
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
waleee-cl has quit [Quit: Connection closed for inactivity]
<d_bot> <Sotaro OKUDA> @mbacarella Thank you, that's nice idea. I'll try to. @Kate Thank you, I want to run OCaml on Alpine Linux x86. Since Alpine is based on musl and I did not find musl x86 build. I tried to execute non-musl x86 binary, but didnt work.
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
smazga has joined #ocaml
mxns has joined #ocaml
smazga has quit [Ping timeout: 246 seconds]
mxns has quit [Ping timeout: 256 seconds]
<d_bot> <EduardoRFS> does OCaml have any special error handling system? Like pattern matching against something to make a proper error message?
<d_bot> <EduardoRFS>
<d_bot> <EduardoRFS> I would like to have some special message for things like this:
<d_bot> <EduardoRFS> ```ocaml
<d_bot> <EduardoRFS> let x = 1 > 2 > 3
<d_bot> <EduardoRFS> ```
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
osa1 has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
emp has quit [Quit: ZNC 1.8.1 - https://znc.in]
amiloradovsky has joined #ocaml
emp has joined #ocaml
amiloradovsky has quit [Ping timeout: 240 seconds]
smazga has joined #ocaml
smazga has quit [Ping timeout: 272 seconds]
narimiran has joined #ocaml
smazga has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
yomimono has joined #ocaml
smazga has quit [Ping timeout: 260 seconds]
smazga has joined #ocaml
decentpenguin has quit [Read error: Connection reset by peer]
decentpenguin has joined #ocaml
mxns has joined #ocaml
smazga has quit [Ping timeout: 256 seconds]
mxns has quit [Ping timeout: 264 seconds]
vicfred has quit [Quit: Leaving]
olle has joined #ocaml
rwmjones|hols is now known as rwmjones
olle has quit [Ping timeout: 272 seconds]
mmohammadi9812 has joined #ocaml
larou has joined #ocaml
jnavila has joined #ocaml
snowpanda has quit [Quit: Leaving...]
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
<d_bot> <octachron> No. And this specific error does not seems straightforward to support since it requires to essentially reparse the input in some cases that do not typecheck.
olle has joined #ocaml
quizzop[m] has quit [Quit: Idle for 30+ days]
talyian[m] has quit [Quit: Idle for 30+ days]
smazga has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
mxns has joined #ocaml
<d_bot> <ggole> Yeah, this could be valid code with a redefinition of `>`
mxns has quit [Ping timeout: 260 seconds]
bartholin has joined #ocaml
ggole has joined #ocaml
<d_bot> <EduardoRFS> it's straightforward if your using the stdlib one, I know it can be valid with the redefinition of `>`
<Armael> which redefinition of `>` would make this valid?
<d_bot> <EduardoRFS> int -> int -> int
<Armael> but that doesn't work, I think?
<d_bot> <EduardoRFS> it works, is a valid AST
<d_bot> <EduardoRFS> ```ocaml
<d_bot> <EduardoRFS> let (>) = (+)
<d_bot> <EduardoRFS> ```
<d_bot> <EduardoRFS> please don't do that ever in your life
<Armael> right, but then "1>2" does not make sense anymore
<Armael> the result of "1 > 2 > 3" is an int instead of a bool
<d_bot> <EduardoRFS> exactly. that's his point
<d_bot> <EduardoRFS> it can be valid code
<d_bot> <ggole> Yep, it's not the parsers job to rule that out
<Armael> I mean, sure.
<d_bot> <EduardoRFS> that is why a pattern matching,
<d_bot> <EduardoRFS>
<d_bot> <EduardoRFS> ```ocaml
<d_bot> <EduardoRFS> match code with
<d_bot> <EduardoRFS> | (Apply (Stdlib ">"), ((Apply (Stdlib ">"), _, _), _)) -> "fancy"
<d_bot> <EduardoRFS> ```
<d_bot> <EduardoRFS> example that I was talking, sure we need to consider redefinition, but if we ignore it and directly match on the symbol not the ident, it should still works
<d_bot> <EduardoRFS> and it's a good error message if the signature matches `'a -> 'a -> bool` when `'a != bool`
<d_bot> <ggole> There might be a way to do that after symbol resolution, since `<` is bound to the external `"%lessthan"`
<d_bot> <EduardoRFS> oh right is a primitive, even easier
<d_bot> <EduardoRFS> my experience from what I see people making the case that Elm and Elixir have such great error messages, is mostly the pattern matching cases
<d_bot> <ggole> The problem is that the current compiler won't form a tree containing the resolved symbols unless the program passes the type checker
<d_bot> <EduardoRFS> well we have the Env and the Parstree, if it doesn't typecheck we can still fallbacks to identify the place that failed and check the pattern
<d_bot> <ggole> Yeah, but not quite the simple pattern matching that you suggested
mmohammadi9812 has quit [Ping timeout: 256 seconds]
<d_bot> <EduardoRFS> after having the tooling in place for special cases like this should be a lot simpler
<d_bot> <ggole> It would certainly be nice to get better error messages, they are pretty bad
<d_bot> <EduardoRFS> I wasn't actually thinking on literally pattern matching using a `case`
<d_bot> <EduardoRFS> I did too much typescript, ocaml error messages are great
<d_bot> <EduardoRFS> but could be better
<d_bot> <ggole> They are better than they used to be, but I wouldn't call them good
<d_bot> <EduardoRFS> I'm not sure I had experience with good error messages
<d_bot> <EduardoRFS> parsing can have great error messages, but type checking? That is hard
<Fardale> @EduardoRFS what error message do you want for your example ?
<d_bot> <EduardoRFS> oh right you guys from IRC can't see messages
mmohammadi9812 has joined #ocaml
<d_bot> <EduardoRFS> images*
<Fardale> I find this error message way to long for this.
<d_bot> <Drup> it's not so trivial to make a system that works well for this. IIRC, Elm works on the partial typeast (but Elm is a much much simpler language, which simplifies things a lot)
Haudegen has joined #ocaml
mmohammadi9812 has quit [Ping timeout: 246 seconds]
ewanas has joined #ocaml
mmohammadi9812 has joined #ocaml
mbuf has joined #ocaml
ewanas has quit [Client Quit]
larou has quit [Quit: Connection closed]
<d_bot> <Drup> there is a problematic tention in error messages, for beginners, this is great, for non-beginners, you need short and very precise
<d_bot> <ggole> Giving some context for obscure corners is nice even for non-beginners
<d_bot> <ggole> Maybe just a sentence and a manual reference rather than Elm's relatively verbose messages, but something
<def> Some time ago, we discussed this matter with gasche. One idea we had was to suggest alternative types for functions.
<def> E.g. "if the error could be avoided by considering that (<) has type : 'a -> 'a -> 'a, print this message"
<def> was to suggest error messages based on alternative types*
berberman has joined #ocaml
berberman_ has quit [Ping timeout: 260 seconds]
andreas303 has joined #ocaml
<d_bot> <EduardoRFS> I was also thinking on something like that to build partial typeast
<d_bot> <EduardoRFS> if some expression fails, replace it by 'a, but with a special Typeast node
<d_bot> <EduardoRFS> but I agree with Drup, but that's why I think having it only for superficial errors is important, a non-beginner is highly unlikely to commit it in the first time. But also maybe a toggle
<d_bot> <Kate> @Sotaro OKUDA oh I see. It's sad Alpine doesn't provide a package for x86. It does for some of the other architectures.
<d_bot> <Kate>
<d_bot> <Kate> Mh, I just tried on Alpine via Docker and master compiles fine with `./configure && make lib-ext && make`
<d_bot> <Kate> if it persists I would suggest you to make an issue on https://github.com/ocaml/opam/issues if you have the time
<d_bot> <ostera> @EduardoRFS an `--explain` flag?
<d_bot> <EduardoRFS> yeah it's a good one, or maybe just having the partialast available tools like merlin or refmterr for Reason could make sense of it
nkly_ has quit [Ping timeout: 240 seconds]
<d_bot> <EduardoRFS> seriously, `refmterr` makes the error messages have contrast which is so much fast to understand what is happening
<d_bot> <octachron> That specific point could be easily improved by having an expected and actual style in the error formatters.
mxns has joined #ocaml
nkly has joined #ocaml
mxns has quit [Ping timeout: 256 seconds]
olle has quit [Ping timeout: 258 seconds]
yomimono has quit [Ping timeout: 256 seconds]
yomimono has joined #ocaml
mmohammadi9812 has quit [Ping timeout: 256 seconds]
mmohammadi9812 has joined #ocaml
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
troydm has joined #ocaml
osa1 has quit [Ping timeout: 256 seconds]
mmohammadi9812 has quit [Ping timeout: 260 seconds]
mmohammadi9812 has joined #ocaml
jbrown has quit [Ping timeout: 272 seconds]
jbrown has joined #ocaml
h11 has quit [Quit: The Lounge - https://thelounge.chat]
nullcone has quit [Quit: Connection closed for inactivity]
olle has joined #ocaml
djellemah has joined #ocaml
h11 has joined #ocaml
malc_ has joined #ocaml
mbuf has quit [Quit: Leaving]
yomimono has quit [Ping timeout: 240 seconds]
yomimono has joined #ocaml
osa1 has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 272 seconds]
amiloradovsky has joined #ocaml
<d_bot> <ostera> @octachron do you have any pointers for that?
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
mxns has joined #ocaml
reynir has quit [Ping timeout: 272 seconds]
reynir has joined #ocaml
hnOsmium0001 has joined #ocaml
malc_ has quit [Remote host closed the connection]
yomimono_ has joined #ocaml
yomimono has quit [Ping timeout: 264 seconds]
reynir has quit [Ping timeout: 260 seconds]
reynir has joined #ocaml
TheLemonMan has joined #ocaml
drewr has joined #ocaml
smazga has joined #ocaml
waleee-cl has joined #ocaml
Tuplanolla has joined #ocaml
unihernandez22 has joined #ocaml
mxns has quit [Quit: ZNC 1.8.2 - https://znc.in]
unihernandez22 has quit [Client Quit]
mxns has joined #ocaml
mxns has quit [Ping timeout: 264 seconds]
motherfsck has quit [Quit: quit]
narimiran has quit [Ping timeout: 260 seconds]
reynir has quit [Ping timeout: 265 seconds]
reynir has joined #ocaml
smazga has quit [Quit: leaving]
tane has joined #ocaml
brown121407 has quit [Quit: ZNC 1.8.2 - https://znc.in]
olle has quit [Ping timeout: 258 seconds]
narimiran has joined #ocaml
mxns has joined #ocaml
brown121407 has joined #ocaml
brown121407 has quit [Changing host]
brown121407 has joined #ocaml
bartholin has quit [Remote host closed the connection]
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
nullcone has joined #ocaml
vicfred has joined #ocaml
aaaaaa has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
nkly has quit [Ping timeout: 260 seconds]
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
berberman_ has joined #ocaml
berberman has quit [Ping timeout: 240 seconds]
osa1 has quit [Ping timeout: 240 seconds]
reynir has quit [Ping timeout: 256 seconds]
reynir has joined #ocaml
ransom has joined #ocaml
reynir has quit [Remote host closed the connection]
reynir has joined #ocaml
nkly has joined #ocaml
mmohammadi9812 has quit [Read error: Connection reset by peer]
mmohammadi9812 has joined #ocaml
ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ggole has quit [Quit: Leaving]
inkbottle has joined #ocaml
zebrag has quit [Ping timeout: 260 seconds]
narimiran has quit [Ping timeout: 246 seconds]
amiloradovsky has quit [Remote host closed the connection]
jbrown has quit [Ping timeout: 272 seconds]
amiloradovsky has joined #ocaml
reynir has quit [Ping timeout: 240 seconds]
jbrown has joined #ocaml
reynir has joined #ocaml
reynir has quit [Excess Flood]
mxns has quit [Quit: ZNC 1.8.2 - https://znc.in]
mxns has joined #ocaml
ransom has joined #ocaml
lnxw37d4 has quit [*.net *.split]
Boarders has quit [*.net *.split]
jgkamat has quit [*.net *.split]
Boarders has joined #ocaml
jgkamat has joined #ocaml
lnxw37d4 has joined #ocaml
reynir has joined #ocaml
<d_bot> <Emile Trotignon> Hello ! I have a question regarding the compiler. A friend of mine sent me some code, and it is compilling, but I really do not know why. I have been looking through the documentation but there is no trace of this syntax in the grammar given on ocaml.org.
<d_bot> <Emile Trotignon> here is the code in question :
<d_bot> <Emile Trotignon> ```ocaml
<d_bot> <Emile Trotignon> module type ASPInstance = sig
<d_bot> <Emile Trotignon> (* module Ord : OrderedType *)
<d_bot> <Emile Trotignon> module Ord : OrderedType
<d_bot> <Emile Trotignon>
<d_bot> <Emile Trotignon> val number_of_flights : int
<d_bot> <Emile Trotignon> val expected_arrival_times : Ord.t array
<d_bot> <Emile Trotignon> val arrival_times_limits : (Ord.t * Ord.t) array
<d_bot> <Emile Trotignon> val corridors : Ord.t array
<d_bot> <Emile Trotignon> val regulated_period : Ord.t * Ord.t
<d_bot> <Emile Trotignon> val security_matrix : Ord.t array array
<d_bot> <Emile Trotignon> val unavailable_track : Ord.t * Ord.t
<d_bot> <Emile Trotignon> end
<d_bot> <Emile Trotignon>
<d_bot> <Emile Trotignon> let check_valid (module I : ASPInstance) = (* this line is the issue *)
<d_bot> <Emile Trotignon> Array.length I.expected_arrival_times = I.number_of_flights
<d_bot> <Emile Trotignon> && begin
<d_bot> <Emile Trotignon> let sorted = ref true in
<d_bot> <Emile Trotignon> for i = 0 to I.number_of_flights - 2 do
<d_bot> <Emile Trotignon> sorted := I.Ord.compare I.expected_arrival_times.(i) I.expected_arrival_times.(i + 1) <= 0 && !sorted
<d_bot> <Emile Trotignon> done;
<d_bot> <Emile Trotignon> !sorted
<d_bot> <Emile Trotignon> end
<d_bot> <Emile Trotignon> && Array.length I.arrival_times_limits = I.number_of_flights
<d_bot> <Emile Trotignon> && Array.length I.corridors = I.number_of_flights
<d_bot> <Emile Trotignon> && Array.length I.security_matrix = I.number_of_flights
<d_bot> <Emile Trotignon> && Array.for_all (fun row -> Array.length row = I.number_of_flights) I.security_matrix
<d_bot> <Emile Trotignon> ```
reynir has quit [Ping timeout: 246 seconds]
<Fardale> @Emile Trotignon this discord is bridge to irc, please don't past big code here and use a pastbin for that
<Fardale> this looks like first class module https://caml.inria.fr/pub/docs/manual-ocaml/firstclassmodules.html
reynir has joined #ocaml
<d_bot> <Emile Trotignon> Sorry for the disruption and thank you for the link !
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
yomimono_ has quit [Ping timeout: 260 seconds]
yomimono has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
sm2n has quit [Ping timeout: 260 seconds]
sm2n has joined #ocaml
jbrown has quit [Ping timeout: 272 seconds]
jbrown has joined #ocaml
tane has quit [Quit: Leaving]
reynir has quit [Ping timeout: 265 seconds]
reynir has joined #ocaml
reynir has quit [Excess Flood]
reynir has joined #ocaml
jnavila has quit [Quit: Konversation terminated!]
chris[m] has joined #ocaml
chris[m] is now known as Coueek[m]
mxns has quit [Ping timeout: 260 seconds]
zebrag has joined #ocaml
inkbottle has quit [Ping timeout: 260 seconds]
amiloradovsky has quit [Remote host closed the connection]
<d_bot> <mbacarella> can the bot be hacked to auto-pastebin code blocks?
mxns has joined #ocaml
amiloradovsky has joined #ocaml
<d_bot> <mbacarella> @Fardale help
<d_bot> <mbacarella> is this done with matterbridge?
mxns has quit [Ping timeout: 246 seconds]
<d_bot> <mbacarella> it's written in go. not volunteering. nevermind
<d_bot> <beheddard> `dune runtest` is running very slowly for me on my Ctypes binding library, but the blocks themselves run quite quickly when pasted into utop. Has anyone run into something like this or have an idea why it might be happening?