<cokanut>
equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.
<tobast>
cokanut: I though Pervasives.compare would call that under the hood. But that’s actually stupid, when I think about it.
MercurialAlchemi has joined #ocaml
<tobast>
Set.S.equal seem to work.
Mercuria1Alchemi has joined #ocaml
<octachron>
Pervasives.(compare/equal) works by looking at the internal memory representation of values (with some care to try to do the right thing when possible)
<octachron>
unfortunately, for sets this yields a finer equality that the canonical equality for sets ( i.e s1 = s2 ⟺ (x ∈ s1 ⟺ x ∈ s2) )
<tobast>
This is actually really cumbersome
<tobast>
I have to cook up an equality function for pairs of sets of sets of ints
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<companion_cube>
usually it's doable with combinators
rcsole has quit [Ping timeout: 240 seconds]
tane has quit [Ping timeout: 240 seconds]
copy` has joined #ocaml
wagle has quit [Remote host closed the connection]
wagle has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
<rgrinberg>
Drup: jbuilder will not support -ppx. It will only support migrate tree's ppx runner
tane has joined #ocaml
<Drup>
What does that even mean ? Are you saying it doesn't support ocamlfind package ? That's pretty much bullshit
<Drup>
And how do you do anything of interest if I only distributed the binary of my ppx (the fact that I use migrate internally is irrelevant at this point, it's already compiled in)
<Drup>
This basically means that you can't add a simple dependency towards ocamlfind package foo.bar that happens to have a ppx.
<Drup>
You need to live yet once again in jst's closed world assumption, where you define your own frontend driver
<companion_cube>
what was the point of jbuilder anyway?
<companion_cube>
you need another build system for development anyway
freusque has quit [Quit: WeeChat 1.7]
<rgrinberg>
I like having proper multiple opam sub packages + using alises instead of packs. Really helps for projecs like cohttp
<Drup>
that's completely off topic, though
<rgrinberg>
Yeah, I'm answering companion_cube
Onemorenickname has quit [Ping timeout: 240 seconds]
<rgrinberg>
Drup: do you mind voicing a complaint about this in that issue?
<rgrinberg>
I think adding the traditional way of wrunning ppx should be trivial. Since it's basically outsourcing all the work to findlib anyway
<Drup>
then why is it not already here ?
<Drup>
if it's a restriction just for the sake of it, that's not a good sign for how jbuilder is designed
<octachron>
companion_cube, afaik the main point of jbuilder is (was?) to simplify the splitting of janestreet monolithic code base into smaller open source packages
<companion_cube>
I mean the point for people outside JST, yeah
<companion_cube>
(I'm sure they don't write software they don't need)
rcsole has joined #ocaml
<Drup>
rgrinberg: Anyway, I think I made my reasoning clear. I don't really have the will nor the interest to fight/discuss the design of yetanotherbuildtool ;)
<rgrinberg>
doing these deductions about intent isn't very productive. Drup if there's a good use case for it then I'm optimistic that diml can be convinced.
<Drup>
What about "being able to handle ocamlfind ppx packages that are currently in production" ? ;)
<rgrinberg>
there are plenty of things that jbuilder supports that are useless for jst by the way.
<companion_cube>
really?
<companion_cube>
(things that are not useful only for them, sure)
<rgrinberg>
Sure, windows support is 1 example
<companion_cube>
ah, I see, interesting
<Drup>
huh, they want windows support, core_kernel is supposed to work on windows
<companion_cube>
but they don't use the windows support for themselves, is t hat right?
<companion_cube>
core_kernel is so 2015, base is the new core_kernel!
larhat has joined #ocaml
mengu has joined #ocaml
larhat has quit [Client Quit]
mengu has quit [Ping timeout: 264 seconds]
AlexDenisov has joined #ocaml
jabroney has joined #ocaml
jnavila has quit [Quit: It was time]
AltGr has left #ocaml [#ocaml]
<rgrinberg>
I'm not the one to ask about whether they use windows internally, but it doesn't seem likely. In any case, there's plenty of other evidence. For example a stable versioning scheme for the jbuild format
<companion_cube>
well they want their libs to be popular, I guess
<companion_cube>
and for that they need to play nicely with the community
<rgrinberg>
I don't see how using jbuilder is relevant to using core, async, etc.
<companion_cube>
to base, isn't it?
ygrek has joined #ocaml
<rgrinberg>
I don't see what's the relation to base. But I don't know much (or care) about base anyway
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Drup>
rgrinberg: regardless, you are the one who wanted to use jsoo.ppx inside a package built by jbuilder, you already need this stuff :)
<rgrinberg>
i should be the one saying regardless, i don't know why this base stuff was even brought up :P
<rgrinberg>
Anyway, let me try a workaround. The situation isn't as bleak as you think ;)
Onemorenickname has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
rcsole has quit [Ping timeout: 260 seconds]
<cokanut>
Any advice on structuring an n-ary tree? Usual examples for beginners are all about binary trees, but I need children to be a list of nodes, and each node needs metadata. I think I need to use a polymorphic type, but can't nail the syntax. This is what I have in mind: tree = Leaf {node: metadata} | Non-Leaf {node: metadata, children: tree}
shinnya has quit [Ping timeout: 268 seconds]
<companion_cube>
rgrinberg: I thought jbuilder was designed to build preprocessed pacakges where ppx were removed, etc. which is exactly the case of base
<Drup>
cokanut: you're missing the "of" keyword
<Drup>
type tree = Leaf of {node: metadata} | Non-Leaf of {node: metadata, children: tree}
<Drup>
also, it's ';', not ','
<cokanut>
Wow. That's all? (commas are a relic of old languages, sorry)
<rgrinberg>
Drup: setting the preprocessor this way works: (preprocess (action (system "ocamlfind ppx_tools/rewriter `ocamlfind query lib`/ppx")))
<Drup>
that's remarquably unportable
<Drup>
(but .. you can't pass arbitrary options to ocamlfind/ocamlc ?
Flerex has joined #ocaml
<rgrinberg>
companion_cube: I haven't seen any jbuilder features that facilitate that. if you want my uninformed guess why they made is jbuilder, I'd say that jst wants to publish their packages with module aliases and use the same build metadata internally and externally (jbuilder vs. jenga)
snowcrshd has quit [Ping timeout: 256 seconds]
Denommus` has joined #ocaml
snowcrshd has joined #ocaml
Denommus has quit [Ping timeout: 264 seconds]
rcsole has joined #ocaml
annoymouse has joined #ocaml
annoymouse is now known as pzp
BitPuffin|osx has quit [Remote host closed the connection]
BitPuffin|osx has joined #ocaml
jabroney has quit [Quit: Leaving.]
Onemorenickname has quit [Ping timeout: 260 seconds]
<companion_cube>
oh, jbuilder supports incremental compilation now
<companion_cube>
so it is a real build system after all
<Drup>
oh ?
<companion_cube>
rgrinberg: you know if jbuilder deals with packs properly?
<rightfold>
I'm excited, writing another type checker in OCaml
ygrek has joined #ocaml
<rgrinberg>
oh yeah, it got that recently. I haven't tried it out all though
<rgrinberg>
It doesn't deal with packs. It only uses aliases. But AFAIK those are strictly superior to packs. Unless you need to support really old version of OCaml
<companion_cube>
no they're not :/
<rgrinberg>
And yes it deals with aliases properly.
<companion_cube>
you have to prefix everything with Foo_ in your own code
<rgrinberg>
no you don't ;) jbuilder will do it for your module names
<rgrinberg>
and then insert the appropriate -open everywhere
<companion_cube>
that's the kind of magic I really dislike
al-damiri has joined #ocaml
<companion_cube>
makes it hard to move to another build system, for instance
<companion_cube>
:/
thewickedaxe has joined #ocaml
<rgrinberg>
better than magic that's just broken. (the discussion we had about ocamlbuild seems relevant)
larhat has joined #ocaml
<companion_cube>
hum
<rgrinberg>
I think anton's namespaces plugin for ocamlbuild does the same thing though
<Drup>
yeah, that doesn't shock me. namespace is pretty much that
<companion_cube>
never heard of this
<companion_cube>
so, is jbuilder replacing jenga or what? I'm confused now
<companion_cube>
(if it's properly supported, otherwise, it now seems pretty fine as a build system, at least judging from the examples in quick-start)
<rgrinberg>
no. jbuilder 2 things: an sexp based format for defining ocaml projects, and a very simple and portable build system for executing them
<rgrinberg>
but the build rules are portable enough to be used by more than 1 build system
<rgrinberg>
jbuilder *is* 2 things
<octachron>
Does jbuilder handle nested namespaces? If my memories is right, a good part of the complexity of anton's namespaces comes from nested namespace support
<rgrinberg>
jenga is that other build system that will be used to run jbuilder rules for more perf./server mode in dev. But I don't see why you can't use your favorite build system to do the same.
<flux>
ocaml is also two things: a great tool for building programming languages, and a great tool for building build systems ;)
<rightfold>
Compiler construction 😍
<Drup>
s/great/terrible/
Onemorenickname has joined #ocaml
<flux>
let's settle for "a tool" ;-)
thewickedaxe has quit [Ping timeout: 240 seconds]
Mercuria1Alchemi has quit [Ping timeout: 246 seconds]
<rgrinberg>
octachron: I don't know the answer to that yet. Never even knew namespaces supported nesting
Onemorenickname_ has joined #ocaml
Onemorenickname has quit [Ping timeout: 258 seconds]
rcsole has quit [Ping timeout: 240 seconds]
k1000 has joined #ocaml
mengu has joined #ocaml
mengu has quit [Ping timeout: 258 seconds]
<companion_cube>
ok, interesting way of seeing things
<companion_cube>
a ± standard format for writing build plans is already far better than what we currently have
gasche has joined #ocaml
<gasche>
if you are a student and not too far from Europe, you should consider attending the Programming Language Implementation Summer School in Italy: https://pliss2017.github.io/
<companion_cube>
and if you are interested in PL implementation ;)
<companion_cube>
o/ gasche
d0nn1e has quit [Ping timeout: 240 seconds]
dhil has quit [Ping timeout: 260 seconds]
d0nn1e has joined #ocaml
rcsole has joined #ocaml
freusque has joined #ocaml
snowcrshd has quit [Ping timeout: 264 seconds]
kakadu has joined #ocaml
rcsole has quit [Ping timeout: 240 seconds]
_y has quit [Ping timeout: 258 seconds]
_y has joined #ocaml
gasche has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
jnavila has joined #ocaml
snowcrshd has joined #ocaml
dmj` has joined #ocaml
thewickedaxe has joined #ocaml
<dmj`>
Is this a good channel to ask questions about MirageOS
<fds>
There is a #mirage :-)
<fds>
But I doubt anyone would really mind if you asked here.
jbrown has joined #ocaml
<dmj`>
fds: ok cool :)
<dmj`>
Has anyone run unikernels produced from mirage on AWS’s xen hypervisor directly? I’m not referring to running it on a hypervisor in a hypervisor, (putting xen on an ec2 instance), but putting it on the same hypervisor that other Ec2 instances use.
<dmj`>
hope that makes sense
jabroney has joined #ocaml
<dmj`>
fds: *crickets*
larhat has quit [Quit: Leaving.]
<fds>
Sorry, I don't actually know anything. :-D
<fds>
But, it's evening here, so you might not get any response in #mirage either.
<fds>
Sometimes IRC is slow. :-)
octachron has quit [Quit: Leaving]
_andre has quit [Quit: leaving]
TheLemonMan has joined #ocaml
rcsole has joined #ocaml
<dmj`>
yes, understandable :)
<dmj`>
think the mirage docs have helped me though
<_y>
why oooh whyyy are all mainstream computer algebra systems dynamically typed
<_y>
and with an awful scoping policy
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Ping timeout: 264 seconds]
<companion_cube>
because maths is hard to type, I think
AlexDenisov has joined #ocaml
<tautologico>
Axiom is typed... not really mainstream though
AlexDeni_ has quit [Read error: Connection reset by peer]
<tautologico>
I think that's because language design for CAS is pretty ad hoc, as is the case for statistical/engineering/scientific languages
<tautologico>
see R/Matlab/etc
<companion_cube>
also many of them are pretty old
<tautologico>
languages created by people that don't know all that much about programming languages, but have problems to solve
<tautologico>
it's surprising there's so little competition in this area of scientific programming... Julia is one of the few who tried to enter this space recently
<tautologico>
Fortress also failed
<_y>
tautologico, exactly, i tried Axiom once, it being so proud of being typed confirmed my opinion that usual CA software are not :-°
<_y>
companion_cube, Sage is 10 years old
<_y>
that’s because of that pycrazyness
<tautologico>
_y: yes, most of them are not. Also Sage does not have a specific language, it adopts Maxima, which is much older
AlexDeni_ has joined #ocaml
<tautologico>
but there is SymPy, more recent but still untyped (it's python after all)