companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 is now known as Guest61205
infinity0 has joined #ocaml
Guest61205 has quit [Killed (card.freenode.net (Nickname regained by services))]
nomicflux has joined #ocaml
sepp2k has quit [Quit: Leaving.]
<dxtr> What does it mean if I do: foo ~x?
_whitelogger has joined #ocaml
ziyourenxiang has joined #ocaml
pierpa has quit [Quit: Page closed]
nomicflux has quit [Quit: nomicflux]
silver has quit [Read error: Connection reset by peer]
mfp__ has quit [Ping timeout: 248 seconds]
nomicflux has joined #ocaml
sh0t has quit [Remote host closed the connection]
kamog has joined #ocaml
dakk has quit [Ping timeout: 240 seconds]
dakk has joined #ocaml
dakk has quit [Ping timeout: 240 seconds]
iitalics has joined #ocaml
cranmax has quit [Quit: Connection closed for inactivity]
alexelcu has quit [Remote host closed the connection]
alexelcu has joined #ocaml
cranmax has joined #ocaml
shinnya has joined #ocaml
iitalics has quit [Remote host closed the connection]
jlam has joined #ocaml
spew has joined #ocaml
spew has quit [Client Quit]
nomicflux has quit [Quit: nomicflux]
mcint has quit [Quit: WeeChat 1.6]
sz0 has quit [Quit: Connection closed for inactivity]
<flux> dxtr, it's shorthand for foo ~x:x, and that means 'pass x as the labeled argument x to function foo'
samrat has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
cranmax has quit [Quit: Connection closed for inactivity]
jlam_ has joined #ocaml
jlam has quit [Ping timeout: 240 seconds]
enterprisey has joined #ocaml
sgronblo has joined #ocaml
vtomole has joined #ocaml
slash^ has joined #ocaml
enterprisey has quit [Quit: Leaving]
pyx has joined #ocaml
pyx has quit [Client Quit]
ygrek has quit [Ping timeout: 240 seconds]
<dxtr> Where do I start debugging if a module can't be found even though I've added it to my _oasis file?
<dxtr> I've added the package that is
vtomole has quit [Ping timeout: 260 seconds]
<Leonidas> dxtr: you can check the flags the compiler was called with
_whitelogger has joined #ocaml
jimmyrcom has quit [Ping timeout: 260 seconds]
sepp2k has joined #ocaml
dakk has joined #ocaml
shinnya has joined #ocaml
mfp__ has joined #ocaml
argent_smith has joined #ocaml
<dxtr> Leonidas: Yeah it includes '-package <package>'
<Leonidas> dxtr: does it work in the toplevel?
tane has joined #ocaml
<dxtr> Hmm, doesn't seem to do that actually
<dxtr> The package in question is re
<dxtr> #require "re";; works
<dxtr> At least it isn't complaining
<dxtr> But Re_pcre.re "";; gives me Error: Reference to undefined global `Re_pcre'
silver has joined #ocaml
<octachron> dxtr, you probably need a subpackage, maybe "re.pcre" ?
<octachron> dxtr, this should work: '#require "re.pcre";; '
<dxtr> octachron: Bloody hell, thanks!
<dxtr> I'm an idiot :)
<octachron> I disagree :), it is far too easy to hit this issue
andreas_ has joined #ocaml
cranmax has joined #ocaml
samrat has quit [Ping timeout: 240 seconds]
TheLemonMan has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ocaml
sepp2k has quit [Quit: Leaving.]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
spew has joined #ocaml
sepp2k has joined #ocaml
FreeBirdLjj has joined #ocaml
sepp2k has quit [Ping timeout: 276 seconds]
FreeBirdLjj has quit [Ping timeout: 255 seconds]
spew has quit [Ping timeout: 276 seconds]
sepp2k has joined #ocaml
sepp2k has quit [Client Quit]
samrat has joined #ocaml
MercurialAlchemi has joined #ocaml
jlam has joined #ocaml
argent_smith has quit [Quit: Leaving.]
jlam_ has quit [Ping timeout: 260 seconds]
sh0t has joined #ocaml
sepp2k has joined #ocaml
jlam_ has joined #ocaml
jlam has quit [Ping timeout: 246 seconds]
sepp2k has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #ocaml
sam__ has joined #ocaml
tane has quit [Quit: Leaving]
mengu has joined #ocaml
<sam__> Was there some way to map a constructor as if it was a function?
<octachron> sam__, only defining a corresponding function ("let name x y = Name(x,y)") (and note that the two are not completely equivalent)
<sam__> octachron: Ok, I see. Thanks. Is there some good reason for it?
samrat has quit [Ping timeout: 260 seconds]
nomicflux has joined #ocaml
<sam__> And is there some good source for OCaml naming conventions?
nomicflux has quit [Quit: nomicflux]
<octachron> sam__, part of the reason is that `Name("A","Nonymous")` is guaranteed to be side-effect free, contrarily to `name "A" "Nonymous"`
spew has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
sam__ has quit [Ping timeout: 248 seconds]
sam__ has joined #ocaml
<sam__> Also. Could someone explain this to me. I'm using VSCode + merlin for editing OCaml. However it seems that Merlin's error checking is not based on .ml files but based on something else. So it cannot always clearly point out where something is wrong and you have to run ocamlbuild in a terminal to figure out what's broken.
<sam__> Is there some way around this?
<octachron> sam__, you could be missing a "SRC /path/to/src \n B /path/to/build/artefacts" lines in your .merlin file
tane has joined #ocaml
jlam1 has joined #ocaml
sepp2k has joined #ocaml
jlam_ has quit [Ping timeout: 260 seconds]
axiles has joined #ocaml
jlam_ has joined #ocaml
jlam1 has quit [Ping timeout: 240 seconds]
<sam__> octachron: Can I do "SRC ." ?
<sam__> I already have "B _build"
<rgrinberg> Obligatory jbuilder pitch: it will generate correct merlin files for you
<sam__> hmm, maybe seems to work
<sam__> jbuilder? sounds like something from the Java world
<rgrinberg> There's something named jbuilder in the ruby world too
<rgrinberg> But, in ocaml its a new and highly useful build system. Check it out some time
<sam__> is there an elevator pitch?
<sam__> I'm not highly invested in any OCaml build system yet. I would like to have something like stack or npm.
<sam__> Something that is all-inclusive and sort of easy and clear to use.
<sam__> right now i have a terrible makefile that calls ocamlbuild with ocaml-find
<rgrinberg> I'd suggest you just read the intro of the jbuilder docs. It contains a few good reasons
<sam__> and I just had to install the dependencies by hand when checking out my project on my other laptop because i didnt know how to create a cabal/gem/package.json/whatever file
<sam__> jane street? I thought they were doing corebuild or something?
<rgrinberg> It's much faster than ocamlbuild, easy to use and generates lots of boilerplate like meta, merlin, install files, so you don't have to
sepp2k has quit [Quit: Leaving.]
<rgrinberg> A build system wont fetch dependencies for you. That is opams job in today's world
<sam__> hmm. i think stack both fetches dependencies and builds projects for you.
<rgrinberg> Corebuild is dead
<rgrinberg> I know. But it's not how it is in the OCaml world.
<Drup> well, corebuild was only a very thin script on top of ocamlbuild
<sam__> does jbuilder mean jane builder? :)
<rgrinberg> Likely :)
<sam__> oh well... at least it should be relatively easy to google for it.
<sam__> which forgives a stupid name in my book
<sam__> so i would use jbuilder to build the project and opam to fetch depdencies. does opam have something like a package.json file? and can it install dependencies into a sandbox?
<rgrinberg> And if that doesn't forgive it, the fact that its such a good build system compared to the alternatives will definitely do it
<rgrinberg> Yeah there's a project.opam file and local switches
<rgrinberg> Theres no reproducibility or snapshots like stack though
<sam__> is it 'The "opam" file' on this page: https://opam.ocaml.org/doc/Packaging.html ?
mengu_ has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
jlam1 has joined #ocaml
jlam_ has quit [Ping timeout: 248 seconds]
<sam__> and by "no reproducibility" do you mean that even if you use specific versions for all your dependencies, another user doing an install with the same opam file at another time might get a different set of packages if transitive depdencies are defined in terms of version >= something?
jlam_ has joined #ocaml
jlam1 has quit [Ping timeout: 240 seconds]
sepp2k has joined #ocaml
shinnya has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #ocaml
<dxtr> I wonder when cudf-solvers.irill.org will be up again
sepp2k has quit [Client Quit]
enterprisey has joined #ocaml
enterprisey has quit [Read error: Connection reset by peer]
andreas_ has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has quit [Ping timeout: 276 seconds]
mengu_ has quit [Read error: Connection reset by peer]
mengu has joined #ocaml
maarhart has joined #ocaml
artart78 has quit [Quit: leaving]
artart78 has joined #ocaml
maarhart has quit [Client Quit]
sh0t has quit [Remote host closed the connection]
<sam__> ok, this is confusing... so if I define type bleh = Bleh of int * int and let a = (4, 5) I can't do either Bleh 4 5 or Bleh a
<flux> sam__, yes, it's a subtle. You can defined Bleh of (int * int) and then it works.
<flux> sam__, your form has a more efficient memory representation, but has its downsides
<sam__> so there is no way to unpack a tuple automatically into the non-tuple based constructor?
<sam__> it seems like i would have to manually do let a = (3, 4) in let (b, c) = a in Bleh (b, c) right?
<flux> well, Bleh (fst a, snd a) would also work, but essentially yes
sepp2k has joined #ocaml
<flux> personally I just use the () form unless I have some particular performance reason for not doing it
<sam__> flux: hmm ok i see
<sam__> does that mean the way to call it is still Bleh (3, 4) or would it become Bleh ((3, 4))?
<flux> Bleh (3, 4) would work
<sam__> ok that is good, but it also sucks that its so inconsistent.
<octachron> sam__, it is quite consistent from a memory representation point of view
<sam__> hmm, dont understand what that means
<sam__> anyway, I'll just stick to the tuple constructor
malc_ has joined #ocaml
sepp2k has quit [Quit: Leaving.]
<sam__> Ok, so how do I get Merlin to pick up the changes to source files?
<sam__> I'm not sure this "SRC ." works the way I expect
<sam__> I actuall had "S *.ml" before too, tried changing it to "S ." but merlin doesn't seem to understand when I change files
<sam__> not sure if this is a merlin thing or ocaml/vscode thing
sepp2k has joined #ocaml
maarhart has joined #ocaml
<octachron> sam__, merlin reads cmi files to offer cross-file completion/typing, so you need to update the cmi files (generally by rebuilding the concerned files)
maarhart has quit [Remote host closed the connection]
sepp2k has quit [Client Quit]
mengu_ has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
ziyourenxiang has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
sam__ has quit [Ping timeout: 248 seconds]
malc_ has quit [Remote host closed the connection]
mengu_ has quit [Read error: Connection reset by peer]
mengu has joined #ocaml
shinnya has joined #ocaml
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
sam__ has joined #ocaml
ygrek has joined #ocaml
sgronblo has quit [Ping timeout: 260 seconds]
ygrek has quit [Ping timeout: 258 seconds]
sam__ has quit [Ping timeout: 240 seconds]
jimmyrcom has joined #ocaml
kakadu has joined #ocaml
handlex has joined #ocaml
handlex has quit [Quit: handlex]
shinnya has quit [Ping timeout: 258 seconds]
sgronblo has joined #ocaml
argent_smith has joined #ocaml
sgronblo has quit [Ping timeout: 260 seconds]
sam__ has joined #ocaml
sam__ has quit [Ping timeout: 260 seconds]
jlam1 has joined #ocaml
jlam_ has quit [Ping timeout: 240 seconds]
jlam1 has quit [Ping timeout: 248 seconds]
jlam_ has joined #ocaml
barcabuona has joined #ocaml
sgronblo has joined #ocaml
sgronblo has quit [Ping timeout: 260 seconds]
TheLemonMan has joined #ocaml
copy_ has joined #ocaml
dejanr has joined #ocaml
sam__ has joined #ocaml
sam__ has quit [Ping timeout: 276 seconds]
sgronblo has joined #ocaml
sgronblo has quit [Ping timeout: 240 seconds]
slash^ has quit [Read error: Connection reset by peer]
tane has quit [Quit: Leaving]
ryanartecona has joined #ocaml
lobo has quit [Quit: = ""]
enterprisey has joined #ocaml
sveit has quit [Quit: Bye]
sam__ has joined #ocaml
andreas_ has joined #ocaml
sam__ has quit [Ping timeout: 248 seconds]
sveit has joined #ocaml
sgronblo has joined #ocaml
vtomole has joined #ocaml
sgronblo has quit [Ping timeout: 240 seconds]
nightmared has quit [Ping timeout: 246 seconds]
sh0t has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
jlam1 has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 255 seconds]
jlam_ has quit [Ping timeout: 276 seconds]
sam__ has joined #ocaml
argent_smith has quit [Quit: Leaving.]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
sam__ has quit [Ping timeout: 248 seconds]
_whitelogger has joined #ocaml
lobo has joined #ocaml
fraggle_ has quit [Ping timeout: 255 seconds]
barcabuona has quit [Ping timeout: 258 seconds]
sgronblo has joined #ocaml
handlex has joined #ocaml
sgronblo has quit [Ping timeout: 248 seconds]
jlam_ has joined #ocaml
jlam1 has quit [Ping timeout: 260 seconds]
jlam1 has joined #ocaml
jlam_ has quit [Ping timeout: 260 seconds]
barcabuona has joined #ocaml
FreeBirdLjj has joined #ocaml
sam__ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 255 seconds]
sam__ has quit [Ping timeout: 260 seconds]
sz0 has joined #ocaml
tg has quit [Ping timeout: 255 seconds]
tg has joined #ocaml
ziyourenxiang has joined #ocaml
sgronblo has joined #ocaml
andreas_ has quit [Quit: Connection closed for inactivity]
sgronblo has quit [Ping timeout: 240 seconds]
handlex has quit [Quit: handlex]
enterprisey has quit [Remote host closed the connection]
kakadu has quit [Remote host closed the connection]
kamog has quit [Remote host closed the connection]
ziyourenxiang has quit [Ping timeout: 240 seconds]
ryanartecona has quit [Quit: ryanartecona]
kamog has joined #ocaml
FreeBirdLjj has joined #ocaml
sam__ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
sam__ has quit [Ping timeout: 240 seconds]
sgronblo has joined #ocaml
average has quit [Ping timeout: 258 seconds]
average has joined #ocaml
enterprisey has joined #ocaml
sgronblo has quit [Ping timeout: 240 seconds]
cranmax has quit [Quit: Connection closed for inactivity]