<d_bot>
<Continuation Calculus> Can I assert to dune that a dependency exists?
<d_bot>
<Continuation Calculus> I have an .exe that has a target in a subfolder, but dune errors with `does not denote a file in the current directory`. So I was wondering if there was a way to just take care of the build order myself, and assert to dune that a given dep exists
olle has quit [Ping timeout: 250 seconds]
<d_bot>
<Continuation Calculus> TIL: `(no-infer <DSL>) to perform an action without inference of dependencies and targets. This is useful if you are generating dependencies in a way that Dune doesn’t know about, for instance by calling an external build system.`
<d_bot>
<Continuation Calculus> I guess that's recent because I've never heard of it, but this is 👌
Tuplanolla has quit [Quit: Leaving.]
<d_bot>
<Continuation Calculus> Looks like it does not work with `diff` though 😦
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
zebrag has joined #ocaml
<d_bot>
<nsmmrs> I got Alcotest, inline tests, and MDX tests (tested docs) all working in this tiny project: https://github.com/nsmmrs/romanum
<d_bot>
<nsmmrs> I may have removed the inline tests - can't remember. But it was all very seamless, despite three testing tools being used at once.
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
wyrd has quit [Ping timeout: 276 seconds]
wyrd has joined #ocaml
nfc_ has quit [Ping timeout: 256 seconds]
<d_bot>
<monk> the people behind mdx unsurprisingly use it for also testing/keeping up to date their book RWOC
<d_bot>
<monk> so i'm guessing it would also be a good example case
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
waleee has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
waleee has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
unyu has quit [Quit: WeeChat 3.4]
nfc_ has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
unyu has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
waleee has quit [Ping timeout: 240 seconds]
chrisz has quit [Ping timeout: 268 seconds]
chrisz has joined #ocaml
<d_bot>
<Inst> also
<d_bot>
<Inst> where's your memes channel?
<d_bot>
<Inst> If I post a picture of ocaml-tan, will I get banned?
<dh`>
if I have a constructor with a large record type, is there a way to write: match e with | STUFF { elt; } -> let elt = foo in { e with elt; }
<dh`>
that is, not need to type in al the record fields in both the pattern and the result if I only want to muck with one of them?
<dh`>
s/al/all/
<d_bot>
<GNU Radio Shows> what exactly do you want to return?
<d_bot>
<GNU Radio Shows> a modified version of `e` (which is still `STUFF { ... }`?
<d_bot>
<GNU Radio Shows> or just the updated record
<dh`>
sorry, should have STUFF in the result
<dh`>
writing STUFF { e with elt; } says this isn't allowed because the type could escape (doesn't seem resonable)
<dh`>
but there's no obvious syntax for writing STUFF { e.STUFF with elt; } or whatnot
<companion_cube>
`match e with STUFF r -> let elt = foo in STUFF {r with elt}`
zebrag has quit [Quit: Konversation terminated!]
<d_bot>
<GNU Radio Shows> that only works if r is it's own record type, and not defined inline with the STUFF constructor, I think
<companion_cube>
`STUFF r` can also be spelled `STUFF ({elt; _} as r) -> …`
<companion_cube>
no, it works with inline records :)
<d_bot>
<GNU Radio Shows> the compiler has an extension that lets you treat an inline record as a single value
<companion_cube>
you just can't return r, but you can use it in the branch.
<d_bot>
<GNU Radio Shows> and access properties
<d_bot>
<GNU Radio Shows> but you aren't allowed to let it escape yes
<dh`>
huh, I figured detaching the record like that would be specifically not allowed
<companion_cube>
it's locally allowed :)
<companion_cube>
(welcome to cryptic error messages about types "escaping" if you try to)
<d_bot>
<GNU Radio Shows> as an aside, why is this considered an extension if ocaml isn't standardized? isn't the language pretty much defined by what the main compiler supports
<companion_cube>
I had the same question recently, and octachron said that it's basically a historical quirk
<companion_cube>
as in, it's a part of the manual where "new stuff" tended to go
<companion_cube>
but it's going to slowly change, one hopes. It's part of the language.
<dh`>
not letting the type escape is reasonable, or at least, it's a reasonable design decision to not let it implicitly also be a standalone type
<companion_cube>
that's be quite complicated I think
<companion_cube>
if foo.STUFF becomes its own type, then it's probably a sub-type of foo
<dh`>
escape analyses aren't difficult
<companion_cube>
subtyping is tough and all that
<dh`>
oh, letting it escape? nah, the obvious thing is to just make it another type, with no explicit name
<dh`>
creates record disambiguation headaches though
<dh`>
one of the things I really don't like about type inference and records is how record field names kinda become global
<dh`>
(but I don't know a solution either)
<companion_cube>
it's become a lot cleaner
<dh`>
ocaml's become a lot smarter about it just in the past few years I've been using it
<dh`>
yeah
<dh`>
and it beats haskell where they _are_ global
ralu has joined #ocaml
<d_bot>
<GNU Radio Shows> I was going to say "why not have it be an anonymous record" and then I remembered OCaml doesn't have these
<companion_cube>
that'd break both the type inference, and the compilation scheme for records, I think :)
<d_bot>
<GNU Radio Shows> compilation scheme I can understand, but why would it break type inference? aren't polymorphic variants a similar problem
<companion_cube>
ah, well, then you have `object`
<companion_cube>
`object method x=1 end` and voilà
<companion_cube>
it's just not at all the same as a record, underneath :)
<d_bot>
<GNU Radio Shows> that's true
<dh`>
making it anonymous doesn't break anything except user interaction with it, since you can always assign it an internal name
<dh`>
(and you could always give it the name foo.STUFF since that currently generates a parse error)
<dh`>
although I suppose then you have to worry about constructor and module names overlapping
<companion_cube>
I imagine that internally, foo.STUFF is indeed a record type :)
<companion_cube>
just one you can't name
<dh`>
(somewhat relatedly though it would be nice to be able to write foo.typename.field when you need it instead of writing an annotation where foo is bound
<dh`>
)
<companion_cube>
and bound to a lexical scope so it can't escape
<companion_cube>
foo.Module.field works!
<companion_cube>
if you put records in modules
<dh`>
doesn't help for common field names like "name"
<dh`>
unless you go overboard with modules and that seems likely to end badly
<companion_cube>
in some cases, i tend to put most types in their own module
<companion_cube>
name them Foo.t, and all that
<companion_cube>
then, foo.Foo.name works a-ok
<dh`>
doesn't work too well for interconnected AST types
<companion_cube>
yeah, agreed. that's one catch.
<companion_cube>
disambiguation or type annotation then :)
<dh`>
wait, is there a disambiguation syntax other than a type annotation?
<dh`>
(the reason I don't like adding type annotations much is that they have awkard precedence in declarations and you grow a lot of parens)
<companion_cube>
sorry, I meant adding a prefix to fields of each record
<companion_cube>
otherwise, it's type annotation indeed (which I personally like)
<dh`>
ah right
<d_bot>
<darrenldl> do people prefer namespacing via module or via prefix and suffixes?
<companion_cube>
I'd say modules are better, unless you have a lot of mutual recursion (like the AST case dh` mentions)
<d_bot>
<darrenldl> (im biased toward former since there are three groups of such functions, and lifting them up to the parent module seems to make it look very cluttered
<d_bot>
<darrenldl> companion_cube: aha cheers
bobo_ has joined #ocaml
spip has quit [Ping timeout: 256 seconds]
vijon has joined #ocaml
vijon has quit [Client Quit]
gravicappa has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Serpent7776 has joined #ocaml
Haudegen has joined #ocaml
Tuplanolla has joined #ocaml
bgs has joined #ocaml
dalek-caan has joined #ocaml
<gentauro>
06:25 < dh`> and it beats haskell where they _are_ global
<gentauro>
dh`: in Haskell, they are `syntactic-sugar` for `functios` taking the record and providing the `nth` value of the tuple
* gentauro
Example: `data Foo = Bar Int Char` => data Foo = Bar { foo :: Int, Bar :: Char }`
<gentauro>
that's why it's recommended to not created a mixture of sum and product types in Haskell
* gentauro
Example: `data FooBar = Foo Int | Bar { bar :: Char }` as the following will compile, but will break at runtime: `bar $ Foo 42`
mbuf has quit [Quit: Leaving]
cedric has joined #ocaml
gravicappa has quit [Ping timeout: 256 seconds]
olle has joined #ocaml
bartholin has joined #ocaml
bartholin has quit [Ping timeout: 240 seconds]
bartholin has joined #ocaml
wyrd has quit [Ping timeout: 276 seconds]
wyrd has joined #ocaml
gravicappa has joined #ocaml
jlrnick has joined #ocaml
epony has quit [Quit: QUIT]
AeroNotix has joined #ocaml
<AeroNotix>
How can I follow the progress on multicore on Arm?
<AeroNotix>
e.g. with the progress, outstanding work, getting involved in testing (etc)
jlrnick has quit [Ping timeout: 240 seconds]
mmohammadi9812 has joined #ocaml
epony has joined #ocaml
wyrd has quit [Ping timeout: 276 seconds]
wyrd has joined #ocaml
mro has joined #ocaml
travv0 has joined #ocaml
bartholin has quit [Ping timeout: 250 seconds]
<sadiq>
AeroNotix, good question. There isn't really a separate multicore anymore, so all development (issues and PRs) will happen against trunk.
<sadiq>
there's some work going on at the moment by a couple of developers on arm64. Once there's a build that passes the testsuite it'll go up on ocaml/ocaml as a PR, that's probably the best opportunity to grab it and do some testing.
<sadiq>
for timeline we're you're probably talking in the order of weeks rather than months though
<sadiq>
(though with any of this kind of stuff show-stopping and virtually impossible to debug problems are what causes things to slip)
bartholin has joined #ocaml
<AeroNotix>
sadiq: thanks!
spip has joined #ocaml
bobo_ has quit [Ping timeout: 256 seconds]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
motherfsck has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
zebrag has joined #ocaml
mmohammadi9812 has quit [Ping timeout: 240 seconds]
mro has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
shawnw has joined #ocaml
dalek-caan has quit [Quit: dalek-caan]
bartholin has quit [Ping timeout: 250 seconds]
shawn has joined #ocaml
bartholin has joined #ocaml
shawnw has quit [Ping timeout: 256 seconds]
waleee has joined #ocaml
kaph has quit [Ping timeout: 256 seconds]
mmohammadi9812 has joined #ocaml
mmohammadi9812 has quit [Ping timeout: 256 seconds]
motherfsck has quit [Ping timeout: 256 seconds]
motherfsck has joined #ocaml
mro has joined #ocaml
perrierjouet has quit [Remote host closed the connection]
perrierjouet has joined #ocaml
motherfsck has quit [Ping timeout: 256 seconds]
motherfsck has joined #ocaml
bartholin has quit [Ping timeout: 268 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bartholin has joined #ocaml
gravicappa has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
motherfsck has quit [Ping timeout: 250 seconds]
motherfsck has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
perrierjouet has quit [Quit: WeeChat 3.4]
perrierjouet has joined #ocaml
m5zs7k has joined #ocaml
bartholin has quit [Ping timeout: 240 seconds]
AeroNotix has quit [Ping timeout: 250 seconds]
AeroNotix has joined #ocaml
mro has quit [Quit: Leaving...]
<d_bot>
<monk> happy sunday everyone, hope it's going well
olle has quit [Ping timeout: 256 seconds]
Tuplanolla has quit [Quit: Leaving.]
cedric has quit [Quit: Konversation terminated!]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]