martintrojer has quit [Quit: ZNC - 1.6.0 - http://znc.in]
martintrojer has joined #ocaml
igitoor has joined #ocaml
igitoor has quit [Changing host]
avsm has quit [Quit: Leaving.]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
tianon has quit [Changing host]
tianon has joined #ocaml
jonludlam has quit [Ping timeout: 264 seconds]
sgnb has joined #ocaml
larhat has quit [Quit: Leaving.]
Submarine has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest34286
tianon has quit [Read error: Connection reset by peer]
matason has joined #ocaml
tianon has joined #ocaml
Guest34286 has quit [Ping timeout: 256 seconds]
Simn has joined #ocaml
thomasga has joined #ocaml
reem has quit [Remote host closed the connection]
slash^1 has joined #ocaml
slash^ has quit [Ping timeout: 252 seconds]
mort___ has joined #ocaml
rgrinberg has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
rgrinberg has quit [Ping timeout: 265 seconds]
reem has joined #ocaml
contempt has quit [Ping timeout: 264 seconds]
ggole has joined #ocaml
yomimono has joined #ocaml
contempt has joined #ocaml
avsm has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
freling has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
dant3 has joined #ocaml
Simn has joined #ocaml
siddharthv is now known as siddharthv_away
yomimono has quit [Ping timeout: 256 seconds]
dsheets has joined #ocaml
freling has quit [Quit: Leaving.]
Haudegen has quit [Ping timeout: 250 seconds]
larhat has joined #ocaml
Submarine_ has joined #ocaml
Submarine has quit [Ping timeout: 264 seconds]
thomasga has joined #ocaml
jonludlam has joined #ocaml
sdothum has joined #ocaml
slash^1 has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
JuggleTux has quit [Ping timeout: 272 seconds]
reem has quit [Ping timeout: 255 seconds]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
lordkryss has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest61387
Guest61387 has quit [Ping timeout: 256 seconds]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
siddharthv_away is now known as siddharthv
thomasga has quit [Client Quit]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
_andre has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
jonludlam has quit [Ping timeout: 264 seconds]
dsheets has quit [Ping timeout: 265 seconds]
thomasga has joined #ocaml
kakadu has joined #ocaml
freling has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
thomasga has quit [Quit: Leaving.]
grmartin has quit []
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
The_Mad_Pirate has quit [Quit: Konversation terminated!]
dsheets has joined #ocaml
yomimono has joined #ocaml
badkins has joined #ocaml
ghostpl_ has joined #ocaml
siddharthv is now known as siddharthv_away
cesar_ has joined #ocaml
cesar_ is now known as Guest13194
jonludlam has joined #ocaml
Remyzorg has quit [Ping timeout: 272 seconds]
Guest13194 has quit [Ping timeout: 264 seconds]
Submarine_ has quit [Remote host closed the connection]
freling has quit [Quit: Leaving.]
Remyzorg has joined #ocaml
rgrinberg has joined #ocaml
idegen has joined #ocaml
rgrinberg has quit [Ping timeout: 252 seconds]
freling has joined #ocaml
thomasga has joined #ocaml
Simn has quit [Ping timeout: 252 seconds]
thomasga has quit [Quit: Leaving.]
tane has joined #ocaml
jonludlam has quit [Ping timeout: 245 seconds]
reem has joined #ocaml
jonludlam has joined #ocaml
reem has quit [Ping timeout: 252 seconds]
rand000 has joined #ocaml
yomimono has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
ygrek has joined #ocaml
rgrinberg has quit [Ping timeout: 248 seconds]
yomimono has joined #ocaml
nonuby has joined #ocaml
<nonuby>
given a tuple (a * b) bound to x, if I want to access b is the only concise way match x with a, b -> b ?
<ollehar>
nonuby: can also deconstruct with let
<ollehar>
let (a, b) = x in
<sgnb>
nonuby: or use "snd x"
JuggleTux has joined #ocaml
<nonuby>
ah okay didnt realise about snd, that handy when only want one part, cheers
<Leonidas>
but only on a binary tuple
<Leonidas>
which covers most tuples, but still
<ollehar>
triples?
<ggole>
You have to write your own for triples
<ggole>
Or just use let
thomasga has joined #ocaml
<Leonidas>
exactly.
cesar_ has joined #ocaml
cesar_ is now known as Guest75262
thomasga has quit [Client Quit]
Guest75262 has quit [Ping timeout: 256 seconds]
ollehar has quit [Remote host closed the connection]
freling1 has joined #ocaml
shinnya has joined #ocaml
freling has quit [Ping timeout: 256 seconds]
MrScout_ has joined #ocaml
WraithM has joined #ocaml
ollehar has joined #ocaml
MrScout_ has quit [Remote host closed the connection]
freling has joined #ocaml
freling1 has quit [Read error: Connection reset by peer]
struk|work has joined #ocaml
pobivan has quit [Quit: pobivan]
Algebr has joined #ocaml
dsheets has quit [Ping timeout: 256 seconds]
<Algebr>
How is one supposed to write the val for a function in a mli when the function takes labeled arguments? I get syntax errors when using ~ in a .mli
kdef has joined #ocaml
<toolslive>
val f : x:int -> unit
<flux>
btw, ocamlc -i can generate an .mli file out of .ml
<Algebr>
got it, thanks
<flux>
also the type signature is shown in the toplevel when you enter the function there
<Algebr>
yea, I was just trying to use ~ in the .mli and it was messing up
nonuby has quit [Remote host closed the connection]
jonludlam has quit [Ping timeout: 248 seconds]
oriba has joined #ocaml
dsheets has joined #ocaml
rgrinberg has joined #ocaml
shinnya has quit [Ping timeout: 250 seconds]
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
rgrinberg has quit [Ping timeout: 272 seconds]
mort___ has quit [Ping timeout: 256 seconds]
amirmc has joined #ocaml
Algebr has quit [Remote host closed the connection]
thomasga has joined #ocaml
<Leonidas>
whitequark: does Llvm_passmgr_builder.set_opt_level 3 do something different than calling opt -O3?
<Leonidas>
I saw degraded performance when using passmgr instead of opt.
kushal has joined #ocaml
<Leonidas>
looks like opt also does inlining?
<whitequark>
set_opt_level does set inlining level
<whitequark>
but opt and set_opt_level have slightly different code paths
<whitequark>
when in doubt, refer to opt's source
<seangrove>
I keep getting an Error: Unbound module IndexedDB, but I have a IndexedDB.mli file in the same directory
<seangrove>
One moment, let me dig with ocamldep and friends
ccomp has joined #ocaml
paradoja has joined #ocaml
<ccomp>
Has anyone run into the issue of adding a hard-coded list of datatype sizes for cross-compilation? I need to do it and just computed the sizes, but I'm not sure how
<ccomp>
Should I just alter the configure script by hand?
<adrien_znc>
well, yes
<adrien_znc>
but
<adrien_znc>
which value do you want to add?
<ccomp>
adrien_znc: I'm looking to cross-compile for RISC-v
<adrien_znc>
if it's 7, you need to know that the runtime might not work very well :P
<adrien_znc>
ah
<adrien_znc>
so 16, right?
<ccomp>
values: 4 8 8 2 8
<adrien_znc>
argh, makes more sense: I had forgotten that github's linecount put the corresponding line on the middle of the screen and not at the top
Submarine has joined #ocaml
Submarine has joined #ocaml
<adrien_znc>
the thing is that cross-compilation is a bit like wet paint currently
<adrien_znc>
for your specific question, yes, you'd duplicate the 4 lines and make them match your needs
ggole has quit [Ping timeout: 256 seconds]
MrScout has joined #ocaml
<ccomp>
adrien_znc: It worked, but now I need to add the endianness
<adrien_znc>
you'll need to sprinkle stuff in several places in configure, it's probably not the last thing you'll need to change
rgrinberg has joined #ocaml
<ccomp>
adrien_znc: Any idea what needs to be done to the endianness section to make a little-endian exception? The obvious changes aren't working
<ccomp>
e.g. copying the mingw lines and changing the pattern to riscv64* or riscv64-*
slash^ has joined #ocaml
<ccomp>
or adding riscv64* as an or option to the mingw pattern
yomimono has quit [Ping timeout: 265 seconds]
<adrien_znc>
ccomp: do you intend to upstream your changes?
<ccomp>
adrien_znc: Definitely at some point. Honestly, I've been asked to get this up and running as part of a GSoC application which is due in two days
<adrien_znc>
hah :P
<ccomp>
so I'm more focused on getting it going, and then writing about the experience and upstreaming stuff
<ccomp>
:P heh, yeah
<adrien_znc>
you can run configure as
<adrien_znc>
sh -x ./configure ...
<ccomp>
I'll have all summer to upstream stuff, hopefully
<adrien_znc>
to get shell debug stuff
<adrien_znc>
that should help a bit
<adrien_znc>
the code is deeply flawed in the presence of bin_fmt on the machine
<adrien_znc>
it relies on the sub-test returning with an uncommon return value (like -1/127)
<adrien_znc>
because the sub-test builds an executable, tries to run it and typically fails
<ccomp>
yeah I was confused by the logic behind that
<adrien_znc>
except binfmt on linux can run the test through wine for instance
darkf has quit [Quit: Leaving]
<adrien_znc>
the idea was that this would be uncommon enough
<adrien_znc>
of course it turned to be very common
<adrien_znc>
so the code there has to change
<ccomp>
oh right
<adrien_znc>
(maybe you have binfmt + qemu)
<ccomp>
yeah I see what I need to do now
<adrien_znc>
maybe it'd be good to apply the same logic as with the type sizes
<ccomp>
I also just never really work with shell scripts that have logic in them (I usually just switch to python)
<ccomp>
Yeah, dumb mistake - I just immediately jumped for the duplication of the mingw logic without noticing that it was obviously returning 2
axiles has quit [Quit: Quitte]
<adrien_znc>
dumb code*
<adrien_znc>
(I'm the one to blame)
cesar_ has joined #ocaml
cesar_ is now known as Guest42409
<ccomp>
...it worked... :D
<ccomp>
lots of bytedump nonsense, but it configured successfully
<ccomp>
time to try making
Guest42409 has quit [Ping timeout: 256 seconds]
<adrien_znc>
:D
<ccomp>
adrien_znc: No dice yet, it seems. When I call make, it just gives me the little five-liner telling me to refer to INSTALL, etc.
rgrinberg has quit [Ping timeout: 255 seconds]
<ccomp>
configure exited with a 0 status and reported success on the last line, oddly
<adrien_znc>
make world
<ccomp>
oh right, obviously. :P
<ccomp>
Thanks again
<kushal>
What should the next book to read after "OCAML from the very beginning"? If any book has more practical code example etc.
Submarine has quit [Remote host closed the connection]
jwatzman|work has joined #ocaml
<kakadu>
kushal: Real World OCaml maybe?
<kushal>
Kakadu, okay
ollehar has quit [Quit: ollehar]
<whitequark>
i ought to write Imaginary World OCaml
dant3 has quit [Remote host closed the connection]
<ccomp>
adrien_znc: I'm now dealing with the lack of sys/dir.h and the corresponding lack of a #ifdef HAVE_SYS_DIR_H preproc condition, fwiw
<ccomp>
let me know if you have any advice
<ccomp>
I could just put the cond in and see if it breaks anything, I suppose
badkins has quit []
<adrien_znc>
when building which file?
<whitequark>
ccomp: what is the platform you're building it for?..
<adrien_znc>
also, do you have that on the target system?
asinine-pyon has quit [Quit: My morality has evaporated under the harsh UV light.]
<ccomp>
oh wait. I'm looking at the conditions now, and it seems that I may just need to add an additional include path
<ccomp>
it seems to be trying to use dir.h because it falsely concludes that I don't have dirent.h
<ccomp>
whitequark: RISC-V
seangrove has quit [Ping timeout: 250 seconds]
pyon has joined #ocaml
thomasga has quit [Quit: Leaving.]
MrScout has quit [Ping timeout: 256 seconds]
MrScout has joined #ocaml
<ccomp>
adrien_znc: Source of confusion identified. dirent.h exists, but is just a stub declaring #error "<dirent.h> not supported"
<ccomp>
so, I may be up a creek for now
<ccomp>
I'll talk to the project mentor
rgrinberg has joined #ocaml
<adrien_znc>
:D
<adrien_znc>
check quickly how it's done for windows
<adrien_znc>
(but I think it has that .h)
MrScout has quit [Ping timeout: 256 seconds]
amirmc has quit [Quit: Leaving.]
badkins has joined #ocaml
divyansh_ has joined #ocaml
tane has quit [Quit: Verlassend]
ghostpl_ has quit [Remote host closed the connection]
thomasga has joined #ocaml
<ccomp>
adrien_znc: Sorry, I was in the shower, and now I'm off to lunch. I'll be back soon. Thanks again for the help.
seangrove has joined #ocaml
ccomp has quit [Quit: WeeChat 1.1]
ollehar has joined #ocaml
MrScout has joined #ocaml
Simn has joined #ocaml
seangrove has quit [Ping timeout: 248 seconds]
jonludlam has quit [Ping timeout: 264 seconds]
ghostpl_ has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
matason has quit [Quit: Later!]
manizzle has joined #ocaml
MrScout has quit [Read error: Connection reset by peer]
MrScout has joined #ocaml
mort___ has joined #ocaml
MrScout has quit [Remote host closed the connection]
cesar_ has joined #ocaml
cesar_ is now known as Guest23898
mort___ has quit [Quit: Leaving.]
jonludlam has joined #ocaml
Guest23898 has quit [Ping timeout: 265 seconds]
MrScout has joined #ocaml
tane has joined #ocaml
kakadu has quit [Quit: Page closed]
TheLemonMan has joined #ocaml
ccomp has joined #ocaml
pgomes has joined #ocaml
Haudegen has quit [Ping timeout: 246 seconds]
ZenMatt has joined #ocaml
Submarine has joined #ocaml
idegen has left #ocaml [#ocaml]
thomasga has quit [Ping timeout: 256 seconds]
MrScout_ has joined #ocaml
<ZenMatt>
Hello, looking to create equal lists from one list in ocaml. The two lists being more or less of equal size. What I have right now is something like : let rec split : 'a list -> 'a list -> 'b list = fun ls ->
<ZenMatt>
match ls with | [] -> [], [] | hd :: tl -> let a = hd in let b = tl in split ( (something) (something )
MrScout has quit [Ping timeout: 265 seconds]
<ZenMatt>
trying to get my line of thought right. I know I must create two variables to hold portions of the two lists I'm about to create, but I'm unsure how to them recursively
<ZenMatt>
oh dear. I see where I'm getting mixed up. I was using some other format.
<ZenMatt>
Thanks
badkins has quit []
reem has quit [Remote host closed the connection]
<ZenMatt>
With an insert function for the dictionary. I simply match 'dictionary' with ?
<ZenMatt>
( k, v ) -> my key, my value
reem has joined #ocaml
<dmbaturin>
ZenMatt: You can construct records with just "let make k v = { key=k; value=v }".
<ZenMatt>
hmm
<ZenMatt>
well
<ZenMatt>
right now it looks here's where I'm at
<ZenMatt>
let insert : 'a -> 'b -> ('a, 'b) dict -> ('a, 'b) dict = fun a b c -> match c with | (_, _) dict -> (a, b) dict
<ZenMatt>
or something to that effect
<ZenMatt>
minus the 'dict' in the pattern
<ZenMatt>
typo
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
dsheets has quit [Ping timeout: 256 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
JuggleTux has quit [Ping timeout: 248 seconds]
Submarine has quit [Quit: Leaving]
<dmbaturin>
ZenMatt: Hhm, I'm not sure if I understand the logic here. What should your insert do, in human language?
<ZenMatt>
essentially something like this
dsheets has joined #ocaml
<ZenMatt>
match 'dict' with | {key : _ ; value: _ } -> {key = a; value = b}
toolslive has quit [Quit: Leaving]
<ZenMatt>
going to sleep on it a little :) appreciate the advice from earlier and the other day
<dmbaturin>
Why do you need to match here? If the argument is a dict entry, it already has a key and a value due to the type constraints. :)
Algebr has quit [Remote host closed the connection]
JuggleTux has joined #ocaml
<ZenMatt>
well
<ZenMatt>
the signature is 'fun a b c '
<ZenMatt>
I figured a and b were the key values
<ZenMatt>
and wasn't sure how c should be used
<ZenMatt>
save for just matching it
<dmbaturin>
Where did you get the signature from?
yomimono has quit [Ping timeout: 244 seconds]
<ZenMatt>
it's taken from some lecture slides I'm going through. The signatures are given
<dmbaturin>
Oh. Well, I'd double check. It's very strange that the dict consists of just one entry here.
<ZenMatt>
and I thought it'd be fun to finish them. For the case of inserting an element into a dictionary, he wrote fun a b c -> ()
<dmbaturin>
Got a link to the slide?
<ZenMatt>
required log in
ericwa has quit [Read error: Connection reset by peer]
<dmbaturin>
The () part makes me think the dict could be "('k * 'v) list ref" or something.
<mrvn>
no ref
<ZenMatt>
here's what I have, and it doesn't get angry at me : let insert : 'a -> 'b -> ('a, 'b) dict -> ('a, 'b) dict = fun a b c -> match c with | {key=_,;value=_} -> {key = a; value = b}
<ZenMatt>
with dict being type ('a, 'b) dict = { key: 'a ; value: 'b}
moei has quit [Quit: Leaving...]
<ZenMatt>
with that, there are no complaints in top level
<mrvn>
that makes no sense
<ZenMatt>
I suppose it doesn't, Im quite new at this
<mrvn>
a dictionary that contains always exactly one key/value makes no sense
<ZenMatt>
ah right
<dmbaturin>
The naive (but not always bad) approach is "('k * 'v) list". There are some functions for it in the standard library even, usually they have "assoc" in their name.
<ZenMatt>
dmbaturin you asked me it wasn't necessary to match it, before I sleep, can I see what you meant?
pgomes has joined #ocaml
<ZenMatt>
told me *
<dmbaturin>
ZenMatt: That match is useless since you don't use the values obtained by destructuring the old entry in any way.
<ZenMatt>
Right okay
<dmbaturin>
Also, your function returns an 'a, 'b dict rather than unit.
<Anarchos>
For a porting of compcert to another architecture, what is the next file to modify after Machregs.v ?
<dmbaturin>
I'd check the slides in the morning. Most likely you either missed something due to sleepiness, or the slides make no sense. :)
mort___ has quit [Quit: Leaving.]
<ZenMatt>
Yeah I suppose you're right. Thanks
tianon has quit [Read error: Connection reset by peer]
larhat has quit [Quit: Leaving.]
tianon has joined #ocaml
cesar_ has joined #ocaml
badkins has joined #ocaml
cesar_ is now known as Guest80687
reem has quit [Remote host closed the connection]
ZenMatt has quit [Quit: Page closed]
<Anarchos>
adrien how to specify the --prefix option to the 'opam install' command ?
reem has joined #ocaml
Guest80687 has quit [Ping timeout: 256 seconds]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 272 seconds]
Simn has quit [Read error: Connection reset by peer]
claudiuc has quit [Ping timeout: 265 seconds]
<adrien>
no idea
Asmadeus_ is now known as Asmadeus
Haudegen has joined #ocaml
dav has quit [Ping timeout: 246 seconds]
dsheets has quit [Ping timeout: 256 seconds]
reem has quit [Remote host closed the connection]
ohama has joined #ocaml
rwmjones has quit [Read error: Network is unreachable]
rwmjones has joined #ocaml
reem has joined #ocaml
<Anarchos>
how to know if a bytecode is for 32 or 64 bits ?
<whitequark>
not really any way, I think
reem has quit [Remote host closed the connection]
dsheets has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
reem has joined #ocaml
struktured has joined #ocaml
xificurC has quit [Ping timeout: 245 seconds]
Anarchos has quit [Quit: ZZzzZz]
<Drup>
hum, is the bytecode actually different ?
tane has quit [Quit: Verlassend]
<whitequark>
yes
<whitequark>
you can't compile a 32-bit ocamlc and run it using 64-bit ocamlrun to produce 32-bit bytecode
tianon has quit [Read error: Connection reset by peer]
bjorkintosh has quit [Ping timeout: 256 seconds]
tianon has joined #ocaml
TheLemonMan has quit [Quit: leaving]
testcocoon has quit [Ping timeout: 264 seconds]
MrScout has quit [Ping timeout: 265 seconds]
MrScout__ has joined #ocaml
moei has joined #ocaml
kakadu has quit [Remote host closed the connection]
reem has quit [Remote host closed the connection]
reem has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
dsheets has quit [Ping timeout: 256 seconds]
reem has quit [Remote host closed the connection]
yomimono has joined #ocaml
reem has joined #ocaml
reem has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
<Denommus>
if I have a sig on a .ml, do I need to declare it again on the .mli?
<Drup>
yes
thomasga has joined #ocaml
thomasga has quit [Client Quit]
cesar_ has joined #ocaml
cesar_ is now known as Guest5946
reem has joined #ocaml
reem has quit [Remote host closed the connection]
Guest5946 has quit [Ping timeout: 265 seconds]
Algebr has joined #ocaml
<Algebr>
Looking through the compiler's src, it is actually the case that it emits C-- and then compiles that to asm? I thought that C-- was just for ghc
<Drup>
C-- is a very common IR.
<Algebr>
Drup: I'm also looking for the garbage collector, but it looks like its defined in assembly directly.
tianon has quit [Read error: Connection reset by peer]
<smondet>
Algebr: no the GC is written in C (I think mostly in ./byterun/)
tianon has joined #ocaml
<Algebr>
smondet: ah, see it
<smondet>
and I think C-- is common in the same way as, say, SQL, ervybody has a different non-compatible dialect
<whitequark>
Algebr: it doesn't emit C--, it emits a... C-- -like data structures
<whitequark>
it has practically nothing to do with actual C--, except the name maybe
reem has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
testcocoon has joined #ocaml
<Algebr>
I guess its not surprising but all the early commit message are in french