quipa has quit [Remote host closed the connection]
BitPuffin has quit [Remote host closed the connection]
kvda has joined #ocaml
zolk3ri has quit [Quit: Lost terminal]
troydm has quit [Ping timeout: 240 seconds]
Fare has joined #ocaml
silver has quit [Read error: Connection reset by peer]
troydm has joined #ocaml
<jgkamat>
hey, does anyone know how to switch the -S assembly output from ocamlopt to use intel ASM syntax instead of att?
env__ has quit [Ping timeout: 248 seconds]
env__ has joined #ocaml
shw has joined #ocaml
env__ has quit [Ping timeout: 240 seconds]
<jgkamat>
also, not sure if someone will find this interesting, but I think this I made the first interactive source->asm viewer for ocaml https://s25.postimg.cc/s088vljov/Pab_Aq2.gif
ygrek has quit [Ping timeout: 240 seconds]
mbuf has joined #ocaml
<copy[m]>
jgkamat: That's quite cool!
<jgkamat>
D
<jgkamat>
*:D
mbuf has quit [Quit: Leaving]
lostman has quit [Quit: Connection closed for inactivity]
* benzrf
applauds
gareppa has joined #ocaml
TarVanimelde has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
dogui has quit [Quit: Reconnecting]
gareppa has quit [Quit: Leaving]
<companion_cube>
nice!
orbitz has quit [Read error: Connection reset by peer]
mbuf has joined #ocaml
argent_smith has joined #ocaml
inr has quit [Remote host closed the connection]
argent_smith has quit [Client Quit]
inr has joined #ocaml
r3s1stanc3_ has joined #ocaml
r3s1stanc3 has quit [Ping timeout: 256 seconds]
troydm has quit [Ping timeout: 260 seconds]
troydm has joined #ocaml
seliopou has quit [Ping timeout: 256 seconds]
adrien has quit [Ping timeout: 256 seconds]
moei has quit [Ping timeout: 256 seconds]
lix has quit [Ping timeout: 256 seconds]
hnrgrgr has quit [Ping timeout: 256 seconds]
lix has joined #ocaml
adrien has joined #ocaml
letoh has quit [Ping timeout: 256 seconds]
rks` has quit [Ping timeout: 256 seconds]
hnrgrgr has joined #ocaml
hnrgrgr is now known as Guest51813
rks` has joined #ocaml
zolk3ri has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
<ELLIOTTCABLE>
wow, that's neato, jgkamat
<discord>
<rgrinberg> Emacs only?
<ELLIOTTCABLE>
available anywhere?
<ELLIOTTCABLE>
unrelatedly: is there a way to have opam install the *dependencies* of the current .opam file, without installing the package itself?
<Fardale>
opam install --deps-only
<ELLIOTTCABLE>
(using Travis; and I want to separate the "install-dependencies" from the "build project"; both for caching purposes, and to differentiate build-errors from build-failures.)
<ELLIOTTCABLE>
omg I was reading `opam help pin` instead of `opam help install`. It's so obvious now; thanks, Fardale .
<ELLIOTTCABLE>
jgkamat: took me a sec, but I roffled hard at "rmsbolt"
Fare has quit [Ping timeout: 244 seconds]
<Drup>
jgkamat: could you make the same for (f)lambda ? :D
<Drup>
(and get it into tuareg mode)
<Drup>
It's really neat
<ELLIOTTCABLE>
is --deps-only opam 2.0 only?
<ELLIOTTCABLE>
the opam 1.2.2 on my CI, when attempting `opam install --deps-only .`, is complaining and failing. works locally on my 2.0, though.
<Drup>
opam install <path> is 2.0
<ELLIOTTCABLE>
what's the proper invocation for 1.2?
<ELLIOTTCABLE>
mmmmaybe <filename>.opam?
<Drup>
hm, you can't really do that in 1.2
<Drup>
you pin then install --deps
<ELLIOTTCABLE>
damn hard to experiment with this when it's ten minutes for the CI to catch the push, and build
<ELLIOTTCABLE>
hmm doesn't pinning cause it to build though
<Drup>
opam pin --no-action
<ELLIOTTCABLE>
yahhs
<ELLIOTTCABLE>
okay before I go into a ten minute loop and figure out I've typo'd something: I'm building the deps for `./sedlex.opam`; i should be able to `opam pin add sedlex . --no-action` followed by `opam install sedlex --deps-only`?
<Drup>
That should be good, yes
<ELLIOTTCABLE>
<3 Drup
<ELLIOTTCABLE>
after the last dozen times you've helped me out in here, I definately owe you a beverage-of-your-choice-and-chat if you ever come to Chicago :3
TarVanimelde has joined #ocaml
<Drup>
Thanks :p
jaar has joined #ocaml
leastbit has joined #ocaml
leastbit has quit [Client Quit]
<reynir>
(you might want to unpin afterwards depending on what you're doing)
jaar has quit [Remote host closed the connection]
jaar has joined #ocaml
<ELLIOTTCABLE>
gah still failed. screw it, time for a local vm with opam 1.2.
<Drup>
You mean, with opam 2 ?
gikiam has joined #ocaml
<steenuil>
is there a ppx similar to ppx_lwt for JS promises in Reason?
<Drup>
wait, ocaml-ci-scripts can pin arbitrary packages for you
<Drup>
you have an array "PIN", and it'll do the right thing
<ELLIOTTCABLE>
blar. k. need to go read thru the source again.
<Drup>
(also, it's probably `pin add`)
jaar has quit [Remote host closed the connection]
jaar has joined #ocaml
<ELLIOTTCABLE>
oh problem was that that one (the opam script, as opposed to the basic ocaml script) did exactly what I'm trying to avoid with the --no-action / --deps-only here: treats package compilation as preperation, i.e. doesn't properly fail the build if your project fails to compile (as opposed to compiles, but fails its tests) somewhere on the matrix
jaar has quit [Remote host closed the connection]
jaar has joined #ocaml
<Drup>
Huh, it definitely fails the build if your package doesn't compile
<ELLIOTTCABLE>
it can't possibly; the whole thing goes in the 'install' section
<ELLIOTTCABLE>
it's a wholesale all-or-nothing thing, since the script directly and non-guardedly invokes the basic/ocaml version of itself
<ELLIOTTCABLE>
so either you put the *whole* thing as a test command (`script` in travis terminology), and a failure of the network, or in ocaml itself compiling, is a "build failure" (and everything that entails),
<ELLIOTTCABLE>
or you put the whole thing as an install command (what the ocaml-ci-scripts documentation demonstrates), leaving your library's compilation as an 'install' step, i.e. aborting the whole row of the build matrix with an error if it fails
<ELLIOTTCABLE>
blah don't worry about it, I'm sleep-deprived and explaining this poorly rrofl
silver has joined #ocaml
env__ has joined #ocaml
troydm has quit [Ping timeout: 240 seconds]
Guest12493 has joined #ocaml
Guest12493 has quit [Read error: Connection reset by peer]
dhil has joined #ocaml
env__ has quit [Ping timeout: 260 seconds]
GDiaX has joined #ocaml
GDiaX has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<steenuil>
ELLIOTTCABLE: yeah, I saw they were planning to bake something like async/await into the language, which I'm not that enthusiastic about
<steenuil>
into ReasonML that is
<ELLIOTTCABLE>
there's a proposal for removing the percent from syntax extensions, which, idk, seems to defeat the point of syntax extensions?
ELLIOTTCABLE has quit [Remote host closed the connection]
strmpnk has quit [Remote host closed the connection]
l1x has quit [Remote host closed the connection]
ilovezfs_ has quit [Remote host closed the connection]
vinoski has quit [Remote host closed the connection]
banjiewen has quit [Remote host closed the connection]
<steenuil>
huh
banjiewen has joined #ocaml
vinoski has joined #ocaml
strmpnk has joined #ocaml
ELLIOTTCABLE has joined #ocaml
ELLIOTTCABLE is now known as Guest11621
tsani_ has quit [Ping timeout: 240 seconds]
l1x has joined #ocaml
ilovezfs_ has joined #ocaml
<companion_cube>
are you identified, Guest11621 ?
tsani has joined #ocaml
<cjd>
what's $~a ?
<cjd>
+q $~a
<companion_cube>
I think it only allowed identified people to talk
<cjd>
ah ok
<companion_cube>
ask adrien :)
<cjd>
/nod
* cjd
wrote a voice bot
<cjd>
voices everyone after 30 seconds
<Maxdamantus>
Hm .. out of interest, what's the rationale for variant constructors taking "multiple arguments" instead of just taking a tuple?
<Maxdamantus>
ie, why can't I write `fun a -> Foo a` where `fun (a, b) -> Foo (a, b)` works?
<companion_cube>
Maxdamantus: one of the reason(s) is memory layout, afaik
<companion_cube>
Foo(a,b) is one memory block
<def`>
it is an unfortunate syntax :P
<companion_cube>
Foo ((a,b)) (with a tuple, when Foo takes only one arg) is two blocks: one for Foo, one for the tuple
<Maxdamantus>
Oh wow, so things change when you just add a pair of brackets around that.
<companion_cube>
in the definition, they do, at least
<companion_cube>
Foo of ('a*'b) is not the same as Foo of 'a * 'b
<Maxdamantus>
I guess it's not a huge leap given that `a * b * c` is neither `(a * b) * c` nor `a * (b * c)` at the type level.
<reynir>
companion_cube: do you have any code for identifying to nickserv?
<companion_cube>
my client does it for me, I think
<companion_cube>
it's been years
<Maxdamantus>
reynir: don't identify with nickserv, identify using the IRC password mechanism.
<reynir>
I mean for calculon
<reynir>
Ah
<Maxdamantus>
reynir: that way you don't have to worry about things like the nick being taken temporarily.
<Maxdamantus>
and it's usually easier, since IRC clients generally make it easy to specify an IRC password, but services change behaviour across networks.
<companion_cube>
for calculon, nothing :(
<companion_cube>
irc-client doesn't provide anything and I've never bothered to look
<Maxdamantus>
Note: use "username:password" as your IRC "password"
<companion_cube>
are you afraid of rainbow tables?
quipa has joined #ocaml
<Fardale>
It is not standard that when you send a password to connect to a server it transfert it to NickServ
<Fardale>
But it a common behaviour
Robdor has quit [Quit: Ping timeout (120 seconds)]
Robdor has joined #ocaml
<reynir>
Ah, you can pass a password to Irc_client.connect
icee18 has joined #ocaml
icee18 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
l1x has quit []
<companion_cube>
never tried it, but go on!
<reynir>
will do, but got distracted by *work* :P
<Maxdamantus>
Right, I'm kind of assuming this has to do with Freenode.
<Maxdamantus>
btw, regarding `Foo (a, b)` possibly being two blocks .. shouldn't it be a fairly straightforward "optimisation" to make it take one block?
<Maxdamantus>
I don't see why `Foo ()` and `Foo` should be any different in memory.
<adrien>
being able to authenticate would be useful for a bot
<adrien>
(irc bot)
<Maxdamantus>
and I'd kind of expect a sum type with a single variant to not actually add anything in representation to the underlying structure (like `newtype` in Haskell)
<adrien>
and +q $~a indeed prevents non-authenticated users from talking
<companion_cube>
Maxdamantus: the problem is polymorphism
<companion_cube>
OCaml doesn't specialize based on types
<companion_cube>
(and it couldn't always do it, anyway: `type 'a foo = A of 'a | B of ('a*'a) foo`)
<Maxdamantus>
Well, in that case you have two members in the sum. If you have one, you just end up with a structure that has an infinite size which the compiler can ignore as uninstantiable.
<Maxdamantus>
but maybe the polymorphism point is important.
jaar has quit [Remote host closed the connection]
jaar has joined #ocaml
<companion_cube>
this structure is allowed in OCaml, and you can't specialize it, afaik
<companion_cube>
so that rules out monomorphization
<Maxdamantus>
Yeah, I think this case is usually termed "polymorphic recursion"
<companion_cube>
yep
<companion_cube>
also found in GADTs
<companion_cube>
I suppose OCaml could have both flavors of polymorphism, it's just a lot of work
l1x has joined #ocaml
<def`>
Maxdamantus: you can get the same behavior as newtype with unbox annotation
<companion_cube>
but you can't have `Foo ()` be of size 1 (or even as a word) :(
<reynir>
Hmm, I'm not sure it works...
<reynir>
(PASS username:password
<def`>
companion_cube: actually Foo () will be lifted to a constant by the compiler and not allocated
<def`>
so it gets a treatment very close to F
<def`>
Foo*
<def`>
However `fun x -> Foo x` will still be allocated. (The compiler don't try to infer that all Foo x are the same :P)
<companion_cube>
def`: well only in specific conditions, right? :p
<companion_cube>
toplevel let x = Foo (), sure
<def`>
well, in the condition that you write Foo ()
jaar has quit [Remote host closed the connection]
jaar has joined #ocaml
<companion_cube>
sure
<companion_cube>
in general it's going to be a polymorphic context though (otherwise why put a unit there)
<reynir>
hmm, you can also auth with certificates with freenode..
<def`>
companion_cube: it's not too bad, if it is produced in a monomorphic context, it can at least be used freely in a polymorphic one.
<Maxdamantus>
Preferably, `Foo ()` values would just be omitted.
<def`>
what do you mean?
<Maxdamantus>
If a function takes a value of type `unit`, or of `foo` where `type foo = Foo of unit`, that function should essentially be compiled to a C function that takes no arguments.
<Maxdamantus>
Since every possible argument that could be passed contains no information.
<Maxdamantus>
assuming compilation to C.
<Maxdamantus>
if C already included "empty" values (eg, empty structs, where `sizeof x == 0`), then you could just use that for simplicity.
<Drup>
OCaml doesn't compile to C.
<Maxdamantus>
in which case the C compiler would essentially be doing the same thing.
<Maxdamantus>
Sure, I'm just using it as an example.
<Maxdamantus>
in machine code it just means something like there not being a register allocated for that argument.
<Maxdamantus>
or any memory allocated in the stack frame or whatever.
<Maxdamantus>
Just easier talking about a more concrete potential target like C.
<Maxdamantus>
Also regarding C, imagine if C had a unit type instead of void.
<companion_cube>
if C was well designed it'd be named rust
<Maxdamantus>
at the moment, you wouldn't expect any space allocation for the "return value" of a function "returning" void.
<Maxdamantus>
and if they used an actual unit type, you wouldn't expect any programs to actually compile any differently.
<Maxdamantus>
since "returning the unit value" still requires no space.
<Maxdamantus>
It would just be more logical, with no extra cost.
<Maxdamantus>
win–win
<Maxdamantus>
I would be surprised if a function in Rust were compiled differently based on how may `unit` arguments it takes.
<companion_cube>
that's assuming everything is monomoprhized
<companion_cube>
(rust does it the way you say, yes)
<Maxdamantus>
ie, will some `fun foo(a: unit, b: unit, c: unit){ .. }` be compiled differently to `fun foo(a: unit){ .. }`? (I suspect not)
<Maxdamantus>
(dunno if that's valid Rust syntax)
<companion_cube>
I'm not sure why you would pass several unit arguments, but I think they'd compile to the same thing
Guest11621 is now known as ec
<Maxdamantus>
Right, unit is only useful as a concept because you sometimes want to use it as a special case of something generic.
<Maxdamantus>
(eg, functions have to return values, so if you want a function that doesn't return anything meaningful, you use `unit`)
<def`>
If you monomorphize, you don't care about whether the type is unit, you should look for whether a value is used/deconstructed/observed.
<companion_cube>
a cooler thing in rust is that HashMap<K,()> is optimal in memory, and is used as a HashSet
<Maxdamantus>
(a parser might produce values, so if you want a parser that only consumes input and doesn't produce a meaningful value, you use `unit`)
<companion_cube>
don't worry, people on this channel know how to use unit…
Warped6 has joined #ocaml
Warped6 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
neatonk has quit [Ping timeout: 244 seconds]
<Maxdamantus>
So given that OCaml compilation is apparently not monomorphised at all, does that mean every tuple value is a pointer?
parisianCoder has joined #ocaml
<Maxdamantus>
I think I can see ways of compiling code polymorphically where you're not forced to do that.
<Maxdamantus>
It would involve passing in a size argument for a type parameter.
<Maxdamantus>
(so any type argument basically turns into a size_t argument during compilation)
<Maxdamantus>
and eg, an array implementation will allocate an object of size `sizeof int + n*argSize`, where `n` is the length of the array (sizeof int) for the header that denotes the size.
<Maxdamantus>
and if you make a `unit array`, `argSize` will be 0, so you just end up with an int object.
mbuf has quit [Quit: Leaving]
<Maxdamantus>
and the `set` function for a `unit array` will copy `0` bytes from its argument to the byte position `sizeof int + p*0` in the object.
mentifis0 has joined #ocaml
mentifis0 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<companion_cube>
yes, every tuple is a block
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest4594 has joined #ocaml
Guest4594 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
roger_rabbit14 has joined #ocaml
roger_rabbit14 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
kvda has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
spew has joined #ocaml
Jesin has quit [Ping timeout: 265 seconds]
cryptocat1094 has joined #ocaml
navaja has joined #ocaml
neatonk has joined #ocaml
Jesin has joined #ocaml
navaja has quit [Read error: Connection reset by peer]
jaar has quit [Remote host closed the connection]
jaar has joined #ocaml
kamog has joined #ocaml
neatonk has quit [Ping timeout: 248 seconds]
jaar has quit [Remote host closed the connection]
jaar has joined #ocaml
kamog has quit [Quit: Leaving.]
Alucard4200 has joined #ocaml
Alucard4200 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
neatonk has joined #ocaml
anzuof7 has joined #ocaml
anzuof7 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<Drup>
Leonidas: didn't you used to have rights on the toml package ?
pmetzger has quit [Remote host closed the connection]
pmetzger has joined #ocaml
mbuf has quit [Read error: Connection reset by peer]
pmetzger has quit [Read error: Connection reset by peer]
pmetzger has joined #ocaml
C0c0dril014 has joined #ocaml
C0c0dril014 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
gareppa has joined #ocaml
quipa_ has joined #ocaml
quipa has quit [Ping timeout: 248 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
<Leonidas>
Drup: also no. But I appreciate how much influence you think I have :) I have rights on the zmq package.
<Drup>
the current maintaner is unresponsive, and companion_cube has been trying to do things with it
gareppa has quit [Quit: Leaving]
ziyourenxiang has joined #ocaml
FreeBirdLjj has joined #ocaml
steenuil has quit [Remote host closed the connection]
steenuil has joined #ocaml
tane has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
<Leonidas>
I guess it'll have to be forked then :(
steenuil has quit [Remote host closed the connection]
steenuil has joined #ocaml
pmetzger has quit []
Bronsa has quit [Ping timeout: 265 seconds]
steenuil has quit [Quit: Leaving]
rjbou has joined #ocaml
zolk3ri has quit [Ping timeout: 240 seconds]
Anarchos has joined #ocaml
zolk3ri has joined #ocaml
deba5e12 has quit [Quit: WeeChat 2.1]
Denommus has joined #ocaml
Algebr has joined #ocaml
<Anarchos>
why is Term not compiling in :
<Anarchos>
module type SIGNATURE;; module type TERM = functor (Sig:SIGNATURE) -> sig end;; module Term = functor (Sig:SIGNATURE) -> (struct end : TERM(Sig));;
TarVanimelde has quit [Quit: TarVanimelde]
Fare has quit [Ping timeout: 276 seconds]
dhil has joined #ocaml
Fare has joined #ocaml
troydm has joined #ocaml
quipa_ has quit [Quit: Leaving]
quipa_ has joined #ocaml
rjbou has left #ocaml [#ocaml]
quipa_ has quit [Quit: Leaving]
quipa_ has joined #ocaml
quipa_ is now known as quipa
Anarchos has quit [Quit: time to live]
dhil has quit [Ping timeout: 240 seconds]
steenuil has joined #ocaml
ratschance has quit [Remote host closed the connection]
<def`>
TERM is a signature not a functor, you cannot apply it, TERM(Sig) has no meaning
ratschance has joined #ocaml
dhil has joined #ocaml
zv_ has quit [Ping timeout: 255 seconds]
kakadu has joined #ocaml
Denommus has quit [Ping timeout: 244 seconds]
Denommus has joined #ocaml
neatonk has quit [Ping timeout: 260 seconds]
dhil has quit [Ping timeout: 268 seconds]
dhil has joined #ocaml
neatonk has joined #ocaml
neatonk has quit [Ping timeout: 260 seconds]
neatonk has joined #ocaml
neatonk has quit [Ping timeout: 276 seconds]
shw has left #ocaml [#ocaml]
tane has quit [Quit: Leaving]
Fare has quit [Ping timeout: 265 seconds]
Algebr has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 240 seconds]
cryptocat1094 has quit [Quit: gtg]
leastbit has joined #ocaml
demonimin has quit [Ping timeout: 268 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Jesin has quit [Remote host closed the connection]
Denommus has quit [Remote host closed the connection]