flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.03.0 announced http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
ril is now known as ril[away]
ril[away] is now known as ril
silver has quit [Quit: rakede]
ril is now known as ril[away]
sh0t has joined #ocaml
walter|r has quit [Remote host closed the connection]
yunxing_ has quit [Remote host closed the connection]
ril[away] has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zRecursive has joined #ocaml
nicholasf has quit [Remote host closed the connection]
connorjacobsen has quit [Remote host closed the connection]
nicholasf has joined #ocaml
connorjacobsen has joined #ocaml
connorjacobsen has quit [Remote host closed the connection]
connorja_ has joined #ocaml
connorja_ has quit [Remote host closed the connection]
walter|r has joined #ocaml
ril has joined #ocaml
dsheets has joined #ocaml
nicholasf has quit [Ping timeout: 240 seconds]
dsheets has quit [Ping timeout: 250 seconds]
LACampbell has joined #ocaml
<LACampbell> hi. I'm really enjoying ocaml, but it's a bit annoying to load projects in the repl and play around with them. I have to do #mod_use "./A.ml", #mod_use "./B.ml", etc etc, in a specific order each time. is there a way to automate this?
nicholasf has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sh0t has quit [Ping timeout: 258 seconds]
connorjacobsen has joined #ocaml
<zRecursive> `ocamlfind query thread` => ocamlfind: Config file not found - neither D:\develop\msys64\mingw32\etc\findlib.conf nor the directory D:\develop\msys64\mingw32\etc\findlib.conf.d ?
<zRecursive> There is c:/msys32/mingw32/etc/findlib.conf
unbalancedparen has quit [Quit: WeeChat 1.5]
sh0t has joined #ocaml
zRecursive has quit [Remote host closed the connection]
mcc has quit [Quit: Connection closed for inactivity]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sdothum has joined #ocaml
<jun__> where is your ocamlfind (binary) installed ?
ril has joined #ocaml
<struk|desk> LACampbell: you can #require "foo" to load an entire library. #use is for loading dirty little scripts and such ,and #load is a bit more manual
<LACampbell> struk|desk, right, so I can define my project as a library, and then easily load the whole thing in the repl to play with? right now it's 3 #mod_use and one #load to get it all up and running, but it will only get worse
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<struk|desk> LACampbell: correct, as a library, you can let ocamlfind and friends load it correctly. otherwise you need to manually stitch together the proper linking
<LACampbell> struk|desk, is this described in the manual?
<struk|desk> LACampbell: there are docs on how to use the various build systems you could pick for ocaml, but this doc breaks down whats 100% required fairly nicely: http://pleac.sourceforge.net/pleac_ocaml/packagesetc.html
<struk|desk> LACampbell: in particular, "preparing a module for distribution" section
<struk|desk> opam is used typically these days for the package management side of it
<LACampbell> struk|desk, thanks, that looks like what I want. not worried about package managment yet, just want to work on my own code interactively
<struk|desk> LACampbell: cool, good luck
seangrove has quit [Ping timeout: 258 seconds]
sh0t has quit [Ping timeout: 272 seconds]
pierpa has quit [Ping timeout: 276 seconds]
connorjacobsen has quit [Remote host closed the connection]
walter|r has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
zRecursive has joined #ocaml
sh0t has joined #ocaml
connorjacobsen has quit [Ping timeout: 260 seconds]
connorjacobsen has joined #ocaml
connorjacobsen has quit [Ping timeout: 258 seconds]
|meta has quit [Quit: Connection closed for inactivity]
<zRecursive> (+ 1/2 1/3) => 5/6, how to do it in ocaml ?
Sorella has joined #ocaml
connorjacobsen has joined #ocaml
ril is now known as ril[away]
nicholasf has quit [Read error: Connection reset by peer]
<jun__> zRecursive: use package zarith
r_rios has joined #ocaml
connorjacobsen has quit [Ping timeout: 272 seconds]
dsheets has joined #ocaml
zRecursive has quit [Ping timeout: 246 seconds]
dsheets has quit [Ping timeout: 250 seconds]
connorjacobsen has joined #ocaml
<LACampbell> my functional programming is very rusty. what do you do if your algorithm that does "elem :: list" over and over again returns the result you want backwards? do you just pass it to List.reverse at the end, to avoid doing "List.append list elem" over and over again?
nicholasf has joined #ocaml
zRecursive has joined #ocaml
<zRecursive> jun__: thanks
<LACampbell> an analogue of input_line, for anything seperated by whitespace
connorjacobsen has quit [Ping timeout: 250 seconds]
zRecursive has quit [Remote host closed the connection]
kushal has joined #ocaml
nicholasf has quit []
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<struk|desk> LACampbell: the |> chainining pattern is popular and I guess one would call idiomatic. Using lists by default is also idiomatic but sometimes not so practical
<LACampbell> struk|desk, yeah other languages I'd just declare an empty dynamic array and push to that again and again. anyway i am sure this won't be a bottle neck, I am just rusty with recursion
scarygelatin has quit [Quit: Leaving]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
mcc has joined #ocaml
kushal has quit [Quit: Leaving]
r_rios has quit [Quit: Konversation terminated!]
sh0t has quit [Remote host closed the connection]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
yunxing has joined #ocaml
<yunxing> Hi, anyone familiar with Menhir here? I'm trying to figure out why it somehow generated the following state without any warning: https://gist.github.com/yunxing/4d0abb4ecfd1dd2c690ff36cfded8360
<yunxing> In my understanding, the 'context' of a 'configuration' will become the condition of the reduce action of a state. In this case, for the configuration of `mod_ext_longident -> UIDENT . [ LPAREN DOT ]` should generate two reduce actions, one is for LPAREN, one is for DOT. But I didn't see the reduce action for 'LPAREN' generated.
zRecursive has joined #ocaml
slash^ has joined #ocaml
MercurialAlchemi has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
octachron_ has joined #ocaml
octachron_ has quit [Client Quit]
octachron has quit [Ping timeout: 272 seconds]
LACampbell_ has joined #ocaml
LACampbell has quit [Ping timeout: 272 seconds]
copy` has quit [Quit: Connection closed for inactivity]
Simn has joined #ocaml
tane has joined #ocaml
jonasen has joined #ocaml
Algebr` has joined #ocaml
LACampbell_ has left #ocaml ["Ex-Chat"]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ril[away] is now known as ril
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
A1977494 has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
myst|fon has joined #ocaml
mcc has quit [Quit: Connection closed for inactivity]
orbifx-m has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
orbifx-m2 has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
orbifx-m2 has joined #ocaml
orbifx-m has quit [Read error: Connection reset by peer]
orbifx-m3 has joined #ocaml
A1977494 has quit [Quit: Leaving.]
jonasen has joined #ocaml
orbifx-m2 has quit [Ping timeout: 276 seconds]
orbifx-m has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
orbifx-m2 has joined #ocaml
orbifx-m3 has quit [Read error: Connection reset by peer]
orbifx-m has quit [Ping timeout: 240 seconds]
orbifx-m has joined #ocaml
orbifx-m2 has quit [Ping timeout: 240 seconds]
orbifx-m2 has joined #ocaml
wolfcore has quit [Ping timeout: 246 seconds]
MercurialAlchemi has joined #ocaml
orbifx-m has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
wolfcore has joined #ocaml
FreeBirdLjj has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
silver has joined #ocaml
d0nn1e has quit [Ping timeout: 258 seconds]
d0nn1e has joined #ocaml
Algebr` has quit [Ping timeout: 258 seconds]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LACampbell has joined #ocaml
<LACampbell> is it an ocaml code smell when you have deeply nested variants?
<zRecursive> e.g. ?
<LACampbell> eg, my parser literally returns things like "Some (Executable [IR.Literal (Data.Int 3)])"
<LACampbell> as it passes through layers, you eventually get to the 3
<mrvn> LACampbell: childs play.
<LACampbell> LOL
<mrvn> Try (((((1 + 2) * 3 + 4) * 5 + 6) * 7 + 8) * 9
<LACampbell> right, it's even worse
<LACampbell> but in general - this is normal in Ocaml?
<LACampbell> I pattern match, unwrap a bit, pattern match, unwrap a bit.. .until I am adding ints
<mrvn> FYI: I'm using: type _ literal = IntLit : int -> int literal | FloatLit : float -> float litertal
<mrvn> you can pattern match nested structures.
<mrvn> but yeah, delving into syntax trees by matching bit by bit is normal.
<LACampbell> the scary thing is this is a stack language
<LACampbell> so no AST :/
<LACampbell> or do you mean ocaml syntax trees?
<mrvn> LACampbell: generally parsed stuff
<mrvn> are you using polish or reverse polish notation?
ygrek has joined #ocaml
<mrvn> (without ())?
<LACampbell> mrvn, RPN
<LACampbell> it's kind of a "high level forth" attempt
<mrvn> then why return varaints? You can just return a Data.t list
<mrvn> or do you want to first parse and then separately evaluate?
<LACampbell> mrvn, are you familiar with Forth?
<mrvn> some
<LACampbell> well, first I have to decide if the word is executable, or a meta (Parsing/Immediate) word
<LACampbell> if it's executable, then it can get passed to the inner interpreter
<LACampbell> Data.t is what the inner interpreter stores in its data stacks
zRecursive has quit [Remote host closed the connection]
orbifx-m has joined #ocaml
<LACampbell> why can I use (+) as a function, but not (|>) ?
orbifx-m2 has quit [Ping timeout: 252 seconds]
<flux> you're use jane street core syntax extensions where |> is a language extension?
<flux> the |> from standard ocaml works with (|>) as well
<LACampbell> flux, yes, I am
<LACampbell> strange, why would they make it a syntax extension if it's part of the language
<flux> they made it before it was part of the language
<flux> and I guess why it's a language extension is because of performance (which I think is obsolete as well)
<flux> maybe its semantics are somehow different?
<LACampbell> maybe I should do an update of the compiler and libraries
<flux> a good idea.
<flux> it's been part of ocaml since 4.0
<LACampbell> I think I installed all of this last year
<flux> I guess you are then using 4.02
<LACampbell> yes
<LACampbell> just checked
<flux> but I imagine core has made many releases since
<flux> it also sounds like you're not using opam, I highly recommend it :)
<LACampbell> I think I installed all of this with opam
<LACampbell> I just did the "Real world ocaml" thing
<flux> in that case it should be easy to run opam update and opam upgrade :)
<flux> (though that won't upgrade your compiler)
<LACampbell> yeap, doing it at the minute. we'll see what |> does afterwards
<flux> language-wise 4.03 and 4.02 aren't all that different, so you might just keep using it..
<LACampbell> this "modular implicit" thing looks interesting, wonder when it will come out
<flux> might still take a while
<flux> we'll probably see an alpha release of ocaml-multicore before that
<LACampbell> the lack of ad-hoc polymorphism is something I notice, but can live with
<flux> polymorphic printing/stringification would be nice in particular to newcomers (not to say it doesn't have other applications, but that's what people bump into first)
darkf has quit [Quit: Leaving]
<LACampbell> yeah
<LACampbell> but it's a price i am willing to pay
<LACampbell> there aren't many statically typed FP languages that let you do imperative programming
darxun has joined #ocaml
kolko has joined #ocaml
<flux> liquid haskell seems interesting, I wonder how feasible it is to write actual applications with it: https://www.youtube.com/watch?v=LEsEME7JwEE
<flux> seems like wayyy easier to provide concrete proofs for some functions than ie. coq..
orbifx-m has quit [Read error: Connection reset by peer]
orbifx-m2 has joined #ocaml
<flux> wish though the slides were more readable :)
<flux> I guess a 4k camera would have done it.
<flux> also whatever she's using for the slides is pretty nifty
<flux> I hope they'll redo the videos with the computer screen shown more often..
<LACampbell> I get "Unbound value String_id.pp." when I start utop, after upgrading.
<flux> I guess you have something in your ~/.ocamlinit that makes that happen
<flux> did you upgrade only packages or also the compiler?
<LACampbell> just packages
<LACampbell> I'll check
<flux> maybe that thing is somehow obsolete then
|meta has joined #ocaml
sdothum has joined #ocaml
shinnya has quit [Quit: ZNC - http://znc.in]
<LACampbell> "
<LACampbell> Can close this issue since it appears to be fixed in the latest Core."
<LACampbell> ... from october
<LACampbell> hmm
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<LACampbell> "Cannot update the package core because it is not pinned." oh
FreeBirdLjj has joined #ocaml
shinnya has joined #ocaml
<LACampbell> ah.. need to update ocaml to 4.03
shinnya has quit [Client Quit]
shinnya has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
<flux> "not pinned", how does that prevent an update.. I would understand it if it's pinned and cannot be updated for that reason.. ?
<flux> lacampbell, when you do the opam switch to the 4.03, it's easier to install opam packages as-you-need than trying to opam export/import the list.. at least that was my experience, it might have improved since.
tane has quit [Quit: Verlassend]
<LACampbell> flux, yeah I am compiling 4.0.3 now
pierpa has joined #ocaml
<Drup> 4.03
<Drup> not 4.0.3
<LACampbell> a bit annoying, I wanted to be coding, not compiling compilrs but oh well
<LACampbell> Drup, 4.03.0 apparently
dakk has quit [Ping timeout: 244 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
dakk has joined #ocaml
jonasen has joined #ocaml
jonasen has quit [Client Quit]
Reventlov has quit [Read error: Connection reset by peer]
Reventlov has joined #ocaml
Reventlov has quit [Changing host]
Reventlov has joined #ocaml
orbifx-m has joined #ocaml
orbifx-m2 has quit [Ping timeout: 244 seconds]
dsheets has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
LACampbell has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Ping timeout: 276 seconds]
FreeBird_ has quit [Ping timeout: 250 seconds]
TheLemonMan has joined #ocaml
orbifx-m2 has joined #ocaml
orbifx-m has quit [Ping timeout: 240 seconds]
walter|r has joined #ocaml
sh0t has joined #ocaml
sh0t has quit [Client Quit]
mcc has joined #ocaml
sh0t has joined #ocaml
dakk has quit [Ping timeout: 244 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
orbifx-m2 has quit [Read error: Connection reset by peer]
orbifx-m has joined #ocaml
kolko has quit [Ping timeout: 276 seconds]
mettekou has joined #ocaml
unbalancedparen has joined #ocaml
|meta has quit [Quit: Connection closed for inactivity]
mettekou has quit [Read error: Connection reset by peer]
Sorella has joined #ocaml
orbifx-m2 has joined #ocaml
orbifx-m has quit [Ping timeout: 264 seconds]
jonasen has joined #ocaml
haesbaer1 has quit [Remote host closed the connection]
slash_ has joined #ocaml
orbifx-m3 has joined #ocaml
orbifx-m2 has quit [Read error: Connection reset by peer]
walter|r has quit [Remote host closed the connection]
sh0t has quit [Quit: Leaving]
Fleurety has joined #ocaml
orbifx-m has joined #ocaml
orbifx-m3 has quit [Ping timeout: 240 seconds]
Fleurety has quit [K-Lined]
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
silver has quit [Quit: rakede]
sh0t has joined #ocaml
<sh0t> hi guys: i have a problem with this grammar http://pastebin.com/XR7bRrq0 i don't understand why ti doesnt parse the expression: function(x) x
Algebr` has joined #ocaml
<Drup> sh0t: you should fix your eof conflicts before even going further
<Drup> (I'm not sure if that causes your issue, but it's going to cause issues anyway)
<sh0t> ok Drup, what issue? ocamlyacc doesn't say anything
<sh0t> it's proably that though
<Drup> use menhir
<Drup> it gives much better error and debug messages
<Drup> (and always call with -v)
<Drup> (and --strict)
<sh0t> ohh
<sh0t> ok
<sh0t> oh god this grammr is very bad
<Drup> No, it's fine
<Drup> just add something like "topexpr : expr EOF { $1 }" at the top, and use that as your entry point
<sh0t> ok yes i did it.. but now it seems it doesn't work on some other expression
<sh0t> mmm
jonasen has joined #ocaml
<sh0t> now i have:
<Drup> could you give me the lexer and all that so that I can test ?
<sh0t> sure
<sh0t> a sec
<Drup> what doesn't work ?
<sh0t> like: {{z<-1;z[[0]]<-2};z[[1]]<-9} it's not parsed
mettekou has joined #ocaml
<sh0t> Drup do u know what it can be?
<sh0t> it should parse also "1" but now it doesnt :/
A1977494 has joined #ocaml
<Drup> ok, I should have been clearer
<Drup> Could you give me the whole project, with a build system, so that I can actually build it ... ?
jc_ has joined #ocaml
<sh0t> ok
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
two_wheels has joined #ocaml
two_wheels has quit [Client Quit]
jc_ has quit [Ping timeout: 244 seconds]
kolko has joined #ocaml
jonasen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xitrium has joined #ocaml
xitrium has quit [Remote host closed the connection]
two_wheels has joined #ocaml
The_Mad_Pirate has joined #ocaml
tane has joined #ocaml
xitrium has joined #ocaml
unbalancedparen has quit [Quit: WeeChat 1.5]
ygrek has quit [Ping timeout: 276 seconds]
kushal has joined #ocaml
struk|desk has quit [Read error: Connection reset by peer]
saruta has quit [Ping timeout: 272 seconds]
anvi_ has joined #ocaml
<anvi_> hello
sh0t has quit [Remote host closed the connection]
saruta has joined #ocaml
silver has joined #ocaml
struktured has joined #ocaml
sh0t has joined #ocaml
Algebr` has quit [Ping timeout: 264 seconds]
|meta has joined #ocaml
xitrium has quit []
pyx has joined #ocaml
pyx has quit [Client Quit]
pyon has quit [Quit: restart]
pyon has joined #ocaml
ril has joined #ocaml
darkf has joined #ocaml
struktured has quit [Quit: Konversation terminated!]
kushal has quit [Quit: Leaving]
copy` has joined #ocaml
ollehar has joined #ocaml
kushal has joined #ocaml
Algebr` has joined #ocaml
walter|r has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
anvi_ has quit [Ping timeout: 250 seconds]
dsheets_ has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
dsheets_ has quit [Ping timeout: 244 seconds]
walter|r has quit [Remote host closed the connection]
slash^ has quit [Read error: Connection reset by peer]
slash_ has quit [Read error: Connection reset by peer]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
dd has joined #ocaml
dd has left #ocaml [#ocaml]
kushal has quit [Read error: Connection reset by peer]
dsheets has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
dsheets has quit [Ping timeout: 250 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
dsheets has joined #ocaml
LACampbell has joined #ocaml
dsheets has quit [Ping timeout: 272 seconds]
ollehar has quit [Quit: ollehar]
rgrinberg has joined #ocaml
connorjacobsen has joined #ocaml
saruta has quit [Ping timeout: 276 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Algebr` has quit [Ping timeout: 252 seconds]
sdothum has joined #ocaml
saruta has joined #ocaml
sh0t has quit [Remote host closed the connection]
silver has quit [Quit: rakede]
LACampbell has quit [Ping timeout: 244 seconds]
|meta has quit [Quit: Connection closed for inactivity]
A19774941 has joined #ocaml
A1977494 has quit [Ping timeout: 260 seconds]
LACampbell has joined #ocaml
tane has quit [Quit: Verlassend]
kushal has joined #ocaml
LACampbell_ has joined #ocaml
LACampbell has quit [Ping timeout: 244 seconds]
LACampbell has joined #ocaml
LACampbell_ has quit [Ping timeout: 240 seconds]
LACampbell has quit [Ping timeout: 260 seconds]
gabrielmc has joined #ocaml
sh0t has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
connorjacobsen has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
connorjacobsen has quit [Remote host closed the connection]
fabregas88 has joined #ocaml
Simn has quit [Quit: Leaving]
fabregas88 has quit [Remote host closed the connection]
connorjacobsen has joined #ocaml
fabregas88 has joined #ocaml
fabregas88 has quit [Client Quit]
connorjacobsen has quit [Remote host closed the connection]
fabregas88 has joined #ocaml
fabregas88 has quit [Client Quit]
ril has joined #ocaml
d0nn1e has quit [Ping timeout: 258 seconds]
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
sh0t has quit [Ping timeout: 258 seconds]
sh0t has joined #ocaml
ril is now known as ril[away]
clockish has quit [Ping timeout: 260 seconds]
ril[away] is now known as ril
ril is now known as ril[away]
clockish has joined #ocaml
ril[away] has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
connorjacobsen has joined #ocaml