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: 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?
<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]
<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
<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
<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 ?