adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.06.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.06/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
yomimono has quit [Ping timeout: 268 seconds]
demonimin has joined #ocaml
demonimin has joined #ocaml
demonimin has quit [Changing host]
cbot has quit [Ping timeout: 256 seconds]
halogena1dtoast has joined #ocaml
loli has quit [Quit: WeeChat 2.1]
loli 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]
yomimono has joined #ocaml
cbot has joined #ocaml
JimmyRcom_ has quit [Ping timeout: 264 seconds]
coventry` has quit [Ping timeout: 256 seconds]
cbot_ has joined #ocaml
cbot has quit [Ping timeout: 248 seconds]
brettgilio has joined #ocaml
cbot has joined #ocaml
halogena1dtoast has quit [Ping timeout: 264 seconds]
cbot_ has quit [Ping timeout: 256 seconds]
cbot has quit [Ping timeout: 264 seconds]
cbot has joined #ocaml
malina has quit [Ping timeout: 256 seconds]
jao has quit [Ping timeout: 260 seconds]
cbot has quit [Ping timeout: 268 seconds]
halogena1dtoast has joined #ocaml
brettgilio has quit [Quit: Leaving]
brettgilio has joined #ocaml
mfp has quit [Ping timeout: 256 seconds]
zv has quit [Ping timeout: 248 seconds]
hdon has quit [Ping timeout: 255 seconds]
mfp has joined #ocaml
cbot has joined #ocaml
zv has joined #ocaml
hdon has joined #ocaml
jimt is now known as Jim7J1AJH
hdon has quit [Ping timeout: 260 seconds]
brettgilio has quit [Remote host closed the connection]
zv has quit [Ping timeout: 248 seconds]
ratschance has quit [Remote host closed the connection]
ratschance has joined #ocaml
letoh has joined #ocaml
hdon has joined #ocaml
zv has joined #ocaml
hdon has quit [Ping timeout: 268 seconds]
ratschance has quit [Ping timeout: 256 seconds]
mfp has quit [Ping timeout: 268 seconds]
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 264 seconds]
pierpa has quit [Quit: Page closed]
jbrown has quit [Ping timeout: 248 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
bartholin has quit [Ping timeout: 248 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
brettgilio has joined #ocaml
bartholin has joined #ocaml
Jim7J1AJH is now known as jimt
kvda has quit [Quit: Textual IRC Client: www.textualapp.com]
tarptaeya has joined #ocaml
brettgilio has quit [Quit: Leaving]
brettgilio has joined #ocaml
JimmyRcom_ has joined #ocaml
JimmyRcom_ has quit [Max SendQ exceeded]
jimmyrcom has quit [Ping timeout: 264 seconds]
brettgilio has quit [Quit: Leaving]
mbuf has joined #ocaml
brettgilio has joined #ocaml
silver has quit [Read error: Connection reset by peer]
brettgilio has quit [Remote host closed the connection]
brettgilio has joined #ocaml
jimmyrcom has joined #ocaml
brettgilio has quit [Remote host closed the connection]
JimmyRcom_ has joined #ocaml
zv has quit [Ping timeout: 268 seconds]
neatonk has quit [Ping timeout: 240 seconds]
pierpal has quit [Read error: Connection reset by peer]
JimmyRcom_ has quit [Ping timeout: 260 seconds]
JimmyRcom_ has joined #ocaml
cbot has quit [Quit: Leaving]
zv has joined #ocaml
jimmyrcom has quit [Ping timeout: 260 seconds]
nullifidian_ has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 256 seconds]
JimmyRcom_ has quit [Ping timeout: 240 seconds]
<Leonidas> or Base.String ;-)
<Leonidas> that has String.split ~on
pierpal has joined #ocaml
orbifx has joined #ocaml
sagotch has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Client Quit]
sgnb has quit [Read error: Connection reset by peer]
orbifx has quit [Ping timeout: 256 seconds]
sgnb has joined #ocaml
hdon has joined #ocaml
pierpal has quit [Ping timeout: 256 seconds]
TarVanimelde has joined #ocaml
freyr69 has joined #ocaml
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 256 seconds]
hdon has quit [Ping timeout: 240 seconds]
pierpal has joined #ocaml
mk9 has joined #ocaml
pierpal has quit [Ping timeout: 240 seconds]
mk9 has quit [Remote host closed the connection]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
BitPuffin has joined #ocaml
pierpal has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
pierpal has quit [Ping timeout: 256 seconds]
pierpal has joined #ocaml
jaar has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
Haudegen has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 268 seconds]
dhil has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Client Quit]
robmyers has quit []
robmyers has joined #ocaml
ziyourenxiang has joined #ocaml
zolk3ri has joined #ocaml
mfp has joined #ocaml
shw has joined #ocaml
dhil has quit [Ping timeout: 255 seconds]
pierpal has joined #ocaml
hdon has joined #ocaml
hdon has quit [Ping timeout: 240 seconds]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 248 seconds]
pierpal has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
pierpal has quit [Ping timeout: 240 seconds]
dhil has joined #ocaml
shinnya has quit [Ping timeout: 248 seconds]
terrorjack has quit []
terrorjack has joined #ocaml
hdon has joined #ocaml
hdon has quit [Ping timeout: 264 seconds]
sagotch has quit [Ping timeout: 240 seconds]
Haudegen has quit [Remote host closed the connection]
jao has joined #ocaml
_andre has joined #ocaml
zolk3ri has quit [Ping timeout: 256 seconds]
zolk3ri has joined #ocaml
pioneer42 has left #ocaml [#ocaml]
pierpal has joined #ocaml
pierpal has quit [Client Quit]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 260 seconds]
markoong has joined #ocaml
dhil has quit [Ping timeout: 268 seconds]
tautologico has quit [Quit: Connection closed for inactivity]
sagotch has joined #ocaml
mbuf has quit [Quit: Leaving]
Haudegen has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Client Quit]
<ZirconiumX> Given that int is 63 bits wide on a 64-bit platform, but 31 bits wide on a 32-bit platform, how do I use Int32 on a 32-bit platform, but int on a 64-bit platform?
hdon has joined #ocaml
<octachron> Nativeint
hdon has quit [Ping timeout: 256 seconds]
<ZirconiumX> Has to be unsigned, sadly
<ZirconiumX> Guess I'll use ocaml-stdint
dhil has joined #ocaml
mbuf has joined #ocaml
pierpal has joined #ocaml
jbrown has joined #ocaml
ratschance has joined #ocaml
<discord> <Perry> ZirconiumX: You might find this pull request interesting. https://github.com/ocaml/ocaml/pull/1458
mk9 has joined #ocaml
<ZirconiumX> Yeah, it would be nice. But isn't Int32 slower than int even in 64-bit, because of boxing?
<def`> It is.
pierpal has quit [Ping timeout: 260 seconds]
silver has joined #ocaml
<ZirconiumX> OCaml is probably a bad language to try something dumb like writing a PS2 emulator in, but at least it's expressive
<def`> I don't know. I think a PS2 emulator is a very hard project in itself.
<Drup> OCaml is very good at writing interpretors and things like that, so ...
<def`> OCaml might be appropriate, since you will likely need to jit a lot of the core code. Emulating devices will be a bit painful though, you need some care.
<ZirconiumX> Well, at the moment, there's PCSX2, which is apparently filled with hacks, and Play! which is not production ready
<Drup> (I have on my todo list to compile ocaml bytecode to gameboy assembly :>)
<def`> I would start with something simpler before though. An emulator for primitive ARMs for instance.
<ZirconiumX> Yeah, I plan to ship the heavy lifting to LLVM
<ZirconiumX> The PS2 central core is a MIPS 3 chip
<Drup> How does that help ? llvm can emits it, but can it lift it back to llvm IR ?
<ZirconiumX> My hope is that I can make the code relatively clean
<ZirconiumX> My code generates LLVM IR, and then LLVM JITs it
<ZirconiumX> That's the plan, anyway
<Drup> (also, for proper emulation, you need to be both timing and bug compatible with the original hardware. That's the really hard part)
<Drup> (Yes, game programmers do exploit those, because they are dirty people :p)
<ZirconiumX> Indeed it is, but hopefully I can hack my poor PS2 enough to extract said timings
<Drup> I'm not convinced you can make the llvm JIT to care :D
<ZirconiumX> Well, I'll cross that bridge when I come to it
<ZirconiumX> First I need a decent interpreter
<def`> Yes.
<ZirconiumX> I did publish the very, very basic source though
<ZirconiumX> I should write a .opam for it
<discord> <Perry> I think using llvm to jit bits of the code makes considerable sense. I was thinking of that before you mentioned it.
<ZirconiumX> Apparently the approach Dolphin (GC/Wii emulator) uses is that it JITs a sequence of instructions up until an unconditional branch
<ZirconiumX> Which I think makes sense
mk9 has quit [Quit: mk9]
neatonk has joined #ocaml
mk9 has joined #ocaml
<ZirconiumX> So, I'm looking at the Core .opam as a guide for writing a jbuilder config
<ZirconiumX> I tried out `jbuilder build -p ocps2 -j 4` as an example, but jbuilder complains that it doesn't know about package ocps2
<ZirconiumX> Am I misunderstanding the -p option?
mk9 has quit [Client Quit]
pierpal has joined #ocaml
<reynir> maybe `touch ocps2.opam` first?
* reynir can't remember how to jbuilder
zv has quit [Ping timeout: 256 seconds]
<Drup> ZirconiumX: you need a public_name thing
<ZirconiumX> Can you explain?
<Leonidas> Drup: Gameboy or GBA?
Haudegen has quit [Read error: Connection reset by peer]
<Drup> I would tend to say GBA
<Leonidas> That'd be neat. Actually both. LSDJ in OCaml! :D
<ZirconiumX> [14:58:48] reynir: maybe `touch ocps2.opam` first?
<ZirconiumX> This turned out to be one of the solutions
<ZirconiumX> It needs the .opam file
<ZirconiumX> Which is awkward when you're trying to write a .opam file
<reynir> no, sorry, it's one of the magic tricks I learned without understanding :D
<ZirconiumX> Now to try to get it to install
zv has joined #ocaml
yomimono has quit [Ping timeout: 265 seconds]
Haudegen has joined #ocaml
hdon has joined #ocaml
hdon has quit [Ping timeout: 240 seconds]
mk9 has joined #ocaml
cryptocat1094 has joined #ocaml
mk9 has quit [Client Quit]
freyr69 has quit [Remote host closed the connection]
shinnya has joined #ocaml
FreeBirdLjj has joined #ocaml
nullifidian has joined #ocaml
_andre_ has joined #ocaml
_andre has quit [Ping timeout: 256 seconds]
hdon has joined #ocaml
mbuf has quit [Quit: Leaving]
jaar has quit [Quit: Leaving]
hdon has quit [Ping timeout: 245 seconds]
hdon has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
cow-orker has quit [Quit: Lost terminal]
ziyourenxiang has quit [Ping timeout: 260 seconds]
Haudegen has quit [Read error: Connection reset by peer]
yomimono has joined #ocaml
FreeBirdLjj has joined #ocaml
_andre_ has quit [Quit: leaving]
shinnya has quit [Ping timeout: 276 seconds]
halogena1dtoast has quit [Ping timeout: 264 seconds]
mk9 has joined #ocaml
l1x has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
CcxWrk has joined #ocaml
FreeBirdLjj has joined #ocaml
mk9 has quit [Quit: mk9]
jnavila has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
sagotch has quit [Ping timeout: 256 seconds]
cryptocat1094 has quit [Ping timeout: 268 seconds]
philtor is now known as calloc
calloc is now known as Guest89057
cryptocat1094 has joined #ocaml
Guest89057 is now known as philtor
hdon has quit [Ping timeout: 256 seconds]
hdon has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
tarptaeya has quit [Quit: Konversation terminated!]
tarptaeya has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 260 seconds]
malina has joined #ocaml
Haudegen has joined #ocaml
freyr69 has joined #ocaml
yomimono has joined #ocaml
dhil has quit [Ping timeout: 256 seconds]
malina has quit [Ping timeout: 240 seconds]
coventry has joined #ocaml
ygrek has joined #ocaml
<coventry> Following some examples in the eliom manual, I would like to set `module Html = Eliom_content.Html.R` at the module top level, and then use syntax like `[%html "<html><head><title>Hello world</title></head><body>Welcome</body></html>"]`. This is leading to errors like `This expression has type string but an expression was expected of type string Eliom_shared.React.S.t`. Is this just wrong-headed? Should I only be using the reactive HTML
<coventry> for things which actually need to change?
<Drup> Ah, using the syntax extension with a reactive module
<Drup> I recently fixed a bug in tyxml for that
<Drup> If you take the dev version of tyxml, it should work
<coventry> Thanks. I'll give it a go.
freyr69 has quit [Read error: No route to host]
wilfredh has joined #ocaml
<wilfredh> what's the ocaml REPL equivalent of utop's #require?
<wilfredh> I've done 'opam install astring' and I can load it in utop with '#require "astring";;'
<ZirconiumX> Generally just use utop
<wilfredh> :)
<ZirconiumX> I think if you have topfind, you can do the same thing
<ZirconiumX> But by default the OCaml REPL doesn't have such a thing
<ZirconiumX> "29.xml" "K70 RGB MK.2" "6985"
<wilfredh> thanks, I'll give that a go
<ZirconiumX> Woops
<ZirconiumX> Wrong channel
<ZirconiumX> Sorry ;~;
<wilfredh> the integration in Emacs with the ocaml repl is really nice, I'll need to figure out the utop equivalent
<wilfredh> aha, I was missing CAML_LD_LIBRARY_PATH. With that, utop seems to be a drop-in replacement
<steenuil> opam config env should set that up for you
<steenuil> or rather, eval `opam config env`
cryptocat1094 has quit [Ping timeout: 245 seconds]
<Armael> wilfredh: there's an utop mode for emacs
<Armael> it works pretty well
<Armael> (ftr, when using the standard toplevel, you have to do #use "topfind";; before being able to do "#require ...;;". utop just does it for you automatically)
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
<discord> <Perry> I didn't know there was a utop mode for emacs!!!
<Armael> !
<discord> <Perry> No, it's true!
<Drup> It doesn't do much
<discord> <Perry> I had no idea. That said, I almost never use the top level. I've never really known what to use it for.
<Armael> well, it gives you utop in a buffer, + keybinds to send stuff to utop
<Armael> that's all I want
freyr69 has joined #ocaml
<discord> <Perry> I still don't quite get what people use the top level for.
<reynir> I use the toplevel for exploring, often
coventry has quit [Remote host closed the connection]
<discord> <Perry> What sort of exploration? Like what's a typical thing you do?
<discord> <Perry> To me, it always seems like too much work to enter something in to the top level only to have it vanish, and compile cycles are nearly instant anyway...
<Armael> toplevel gives you free printers
<discord> <Perry> I've never quite "gotten" what the toplevel is good for.
<Armael> I guess
<reynir> Well, exploring some API/library. Try some small snippets and see what happens
<discord> <Perry> It's clearly useful, so many people use it, but I've never quite understood. I hope someone does a screencast of their workflow someday.
<reynir> combined with #show and #doc (from my ocp-index-top)
<discord> <Perry> what are #show and #doc?
<Drup> Perry it's like ocp-browser, but less nice
<Drup> (but in the toplevel :p)
<reynir> Yes
<reynir> but in the toplevel indeed
<reynir> maybe it's not the best example, but some people like to test the regular expressions they're constructing. You can do that easily in the toplevel, for example.
<ZirconiumX> I use it to see what type the compiler is deducing my functions as. Helps to see if I've got a record with duplicate fields.
<discord> <Perry> I usually just ask merlin for the type.
<reynir> Drup: Yes, bad example because you wrote an awesome tool already! :P
wilfredh has quit [Ping timeout: 240 seconds]
jao has joined #ocaml
jack5638 has quit [Ping timeout: 256 seconds]
osa1 has joined #ocaml
yomimono has quit [Ping timeout: 264 seconds]
<osa1> is this how I init opam: `opam init --comp=ocaml-4.08.0` ? opam list doesn't work without init, but without list I can't see the list of compilers available...
<Drup> just `opam init"
<Drup> No need to give a compiler right now
<osa1> it says no compiler available in your path
halogena1dtoast has joined #ocaml
<osa1> it says "you should use opam init --comp=VERSION"
<Drup> Ah, opam 1.2 I suppose
<Drup> You'll have to look at the doc :x
<osa1> sigh
<osa1> which version works? I'm happy to downgrade
<Armael> how did you install opam?
<osa1> downloaded from the web page
<osa1> it's 1.2.2
<osa1> which version has working init?
jack5638 has joined #ocaml
halogena1dtoast has quit [Ping timeout: 268 seconds]
<Armael> its better if you can install opam 2
<Armael> https://opam.ocaml.org/blog/opam-2-0-0-rc3/ looks like there are binary packages
<Armael> also, I think you need to have some version of ocaml already on your system?
<Drup> Not for opam 2.0 :p
<Armael> ah ! nice
<Drup> Apparently, yes for opam 1.2
<Armael> so just grab the binary for opam 2 rc3 then
<osa1> great, that seems to work
<Armael> Drup: between that and the bundled solver, that's nice to see they made the install process much easier
osa1 has left #ocaml [#ocaml]
larhat has joined #ocaml
tarptaeya has quit [Quit: Konversation terminated!]
yomimono has joined #ocaml
nopf has joined #ocaml
malina has joined #ocaml
neatonk has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
freyr69 has quit [Remote host closed the connection]
cbot has joined #ocaml
orbifx has joined #ocaml
jnavila has quit [Ping timeout: 256 seconds]
r has joined #ocaml
r is now known as Guest22817
Guest22817 has quit [Client Quit]
larhat has quit [Quit: Leaving.]
pierpal has quit [Ping timeout: 260 seconds]
jao has quit [Ping timeout: 256 seconds]
wilfredh has joined #ocaml
<wilfredh> Printf.printf "%a" [1;2];;
<wilfredh> this is a type error, unsurprisingly
<wilfredh> however, the error is: Error: This expression has type 'a list
<wilfredh> why does OCaml think that [1;2] has a type of 'a list?
<mrvn> wilfredh: because it doesn't matter that it is an int list
<thizanne> 'a list means "a list of something, and I don't need to lookup which thing to know that's a type error"
<wilfredh> oh, so the type check is lazy in this regard?
<mrvn> The 'a type could ba rather complext and would just make the error message longer without having any needed information. Lazy is good there.
<mrvn> Imagine it being an object type covering 20 pages of output.
<thizanne> you could say it's lazy
<wilfredh> neat :)
* wilfredh wonders how often you get object types with 20 pages of output
<thizanne> 20 pages is quite a lot
Haudegen has quit [Remote host closed the connection]
<thizanne> but more than one page happens with, say, tyxml
<thizanne> where the typing is used to describe valid html
<thizanne> so it's quite verbose
<mrvn> An object type lists all the methods it has. Easily gets long
<mrvn> also depends on what you consider a page. On an 80x25 terminal a page isn't that much.
pierpal has joined #ocaml