ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
AltGr has joined #ocaml
xificurC_ has joined #ocaml
n3ss3s has quit [Ping timeout: 240 seconds]
mcclurmc has joined #ocaml
xificurC has quit [Ping timeout: 256 seconds]
mcclurmc_ has quit [Ping timeout: 264 seconds]
kdef has quit [Quit: Leaving]
srcerer has quit [Quit: ChatZilla 0.9.91.1 [Firefox 37.0.2/20150415140819]]
sjrct has quit [Quit: WeeChat 1.1.1]
tsumetai has quit [Ping timeout: 250 seconds]
sjrct has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
<cmtptr> I don't understand what _tags does for me
<cmtptr> as far as I can tell, there's no comprehensive list of available tags and what they mean to ocamlbuild
Algebr has quit [Ping timeout: 244 seconds]
<Drup> cmtptr: "ocamlbuild -documentation"
<cmtptr> that's a whole lot of information that means nearly nothing to me
ncthom91_ has joined #ocaml
<Drup> welcome to ocamlbuild's "documentation"
<cmtptr> heh
ncthom91 has quit [Read error: Connection reset by peer]
srcerer has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<Drup> but you can grep it for a specific tag
<Drup> and it will show you witch flag it applies to the compiler, depending on the target being build
<cmtptr> the problem is that I don't know the tags
<cmtptr> if I wanted to add a rule, I don't know what tags to add to it
<Drup> add a *rule* ?
<Drup> what do you want to do exactly ?
xificurC has joined #ocaml
<cmtptr> I want ocamlbuild to know how to build c files
<cmtptr> sorry, by "rule" I meant "a line in _tags"
<Drup> yeah, except a line in tag is not a rule, in ocamlbuild's vocable
<Drup> and what you want can't be done in _tags
<cmtptr> well I'm not done reading the manual about ocamlbuild yet!
<cmtptr> I'm just at the part about _tags and wanted to understand it
<Drup> yeah, except _tags is not for build rules
xificurC_ has quit [Ping timeout: 256 seconds]
<Drup> or rather, it's not for *new* build rules
rand000 has quit [Quit: leaving]
<Drup> it's to change the behavior of build rules that have been designed for this purpose
<cmtptr> ah, okay
<Drup> basically: add a compilation option
javamonn has quit [Remote host closed the connection]
<rgrinberg> nullcat_: NP. Thanks for checking
<cmtptr> I like the way http://caml.inria.fr/pub/docs/manual-ocaml/ocamlbuild.html that makes only one mention of myocamlbuild.ml: "2. Have a _tags or myocamlbuild.ml file in your top directory."
ygrek_ has quit [Ping timeout: 250 seconds]
steshaw has left #ocaml [#ocaml]
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
badkins has quit []
osa1 has quit [Quit: Konversation terminated!]
osa1 has joined #ocaml
manizzle has quit [Ping timeout: 240 seconds]
cmtptr_ has joined #ocaml
cmtptr has quit [Disconnected by services]
cmtptr_ is now known as cmtptr
palomer has joined #ocaml
n3ss3s has joined #ocaml
darkf has joined #ocaml
ncthom91_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shinnya has quit [Ping timeout: 240 seconds]
javamonn has joined #ocaml
<Drup> rgrinberg: I managed to remove the need to finalize all urls
<Drup> It was not without significant GADT golfing x)
small-wolf has joined #ocaml
darkf_ has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
<small-wolf> yo. was anyone at the mirageos event in redwood city yesterday?
darkf has quit [Ping timeout: 256 seconds]
darkf_ is now known as darkf
javamonn has quit [Read error: Connection reset by peer]
javamonn has joined #ocaml
nullcat_ has joined #ocaml
wraithm has quit [Quit: leaving]
struktured has quit [Ping timeout: 265 seconds]
palomer has quit [Quit: palomer]
small-wolf has quit [Ping timeout: 246 seconds]
jeffmo has quit [Quit: jeffmo]
ncthom91 has joined #ocaml
ncthom91 has quit [Client Quit]
javamonn has quit [Ping timeout: 264 seconds]
<Drup> AltGr: I'm your ocp-index benchmark suite ? :D
<AltGr> hehe
<AltGr> it would need a regression test suite
<AltGr> but given the limited amount of time I spend on it, never got through writing one.
<Drup> well, as long as I'm plugged on master, you'll know if it get slow x)
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
javamonn has joined #ocaml
ncthom91 has joined #ocaml
rgrinberg has joined #ocaml
javamonn has quit [Remote host closed the connection]
javamonn has joined #ocaml
javamonn has quit [Remote host closed the connection]
idegen has quit [Quit: Leaving.]
palomer has joined #ocaml
palomer has quit [Client Quit]
palomer has joined #ocaml
ygrek has joined #ocaml
palomer has quit [Quit: palomer]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
swgillespie has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Denommus` has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
osa1 has quit [Ping timeout: 265 seconds]
ncthom91 has joined #ocaml
ncthom91 has quit [Client Quit]
ncthom91 has joined #ocaml
ncthom91 has quit [Client Quit]
Algebr has joined #ocaml
Denommus has quit [Ping timeout: 272 seconds]
Algebr has quit [Ping timeout: 240 seconds]
Denommus has joined #ocaml
systmkor has joined #ocaml
kushal has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
Denommus has quit [Ping timeout: 272 seconds]
mengu has joined #ocaml
_whitelogger has joined #ocaml
palomer has joined #ocaml
palomer has quit [Quit: palomer]
MercurialAlchemi has joined #ocaml
yaewa has joined #ocaml
moei has quit [Ping timeout: 255 seconds]
matason has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
palomer has joined #ocaml
javamonn has joined #ocaml
n3ss3s has quit [Ping timeout: 256 seconds]
c74d has quit [Remote host closed the connection]
tsumetai has joined #ocaml
javamonn has quit [Ping timeout: 272 seconds]
mengu has joined #ocaml
matason has quit []
tsumetai has quit [Ping timeout: 240 seconds]
ggole has joined #ocaml
tsumetai has joined #ocaml
<flux> I'm a bit disappointed how Toml doesn't allow preserving comments in the file :/
<flux> and the order of the fields changes as well
psy_ has quit [Ping timeout: 272 seconds]
<ilia> I have a question: supposed, there is a type type1 and there is another type type2 variable of which is referenced inside type1. How to create a variable of type1?
<ilia> in 2 steps?
<flux> two options: type type1 = T2 of type2 and type2 = T1 of type1
nopf has joined #ocaml
<flux> and then there's the "tying the knot" approach
<ilia> type t = {a:int;b:float};; type t2 = {x:t;y:string};;
<flux> type 'a type1' = T2 of 'a type type2 = T1 of type2 type1' type type1 = type2 type1'
<flux> ilia, well alright yes that's how you build types :)
<flux> I actually was reading deeper into the question than I should have ;)
<flux> and now I see that I completely missed the question
<ilia> how to do "let xyz = {my data goes here};;"
<flux> so how to create instances? { x = { a = 42; b = 42.0 }; y = "hello"; }
<ilia> of type type1
<ilia> thanks!!
<ilia> I put curly bracket in a wrong place
rgrinberg has quit [Ping timeout: 246 seconds]
kushal has quit [Ping timeout: 256 seconds]
MercurialAlchemi has quit [Ping timeout: 264 seconds]
MercurialAlchemi has joined #ocaml
nopf has quit [Quit: leaving]
palomer has quit [Quit: palomer]
palomer has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kushal has joined #ocaml
kushal has quit [Remote host closed the connection]
mort___ has joined #ocaml
kushal has joined #ocaml
wildsebastian has joined #ocaml
mort___ has quit [Ping timeout: 264 seconds]
Haudegen has quit [Ping timeout: 244 seconds]
nopf has joined #ocaml
<ilia> another question: if I there is a function, which has a list as one of its parameters and I want to create an instance of some type and append it to the list. How to do this? let f data list = if <cond> then begin let c = <instance> in c::list end
<dmbaturin> Append? xs @ [<some value>]
<ilia> add to a list, not append
<dmbaturin> What you wrote above won't typecheck by the way.
<dmbaturin> If the else branch is missing, the value is assumed to be of the type unit.
dav- has joined #ocaml
jonludlam has quit [Ping timeout: 255 seconds]
dav has quit [Ping timeout: 272 seconds]
<ggole> ilia: you want to cons it onto the list conditionally?
<dmbaturin> If when <cond> doesn't hold, you can proceed, you can raise an exception, as in "let f data xs = if ... then some_func d :: xs else raise (Failure "bad data")".
<ggole> if test then x::list else list
<dmbaturin> * you can't
<ilia> here is the code in question: let parse arr list1 list2 = if arr.(6) == "" then begin let c = {p={id=arr.(1);h=int_of_string(arr.(2));e=int_of_string(arr.(3));
<ilia> p=int_of_string(arr.(4));}; my_map=StringMap.empty;} c::list1 () end
<ilia> yes, conditionally to cons to the list
<ilia> it complains on the line with "end"
octachron has joined #ocaml
<dmbaturin> You don't need those begin/end by the way.
<ilia> wow
<ggole> The magic array accesses aren't very nice. I'd consider replacing this with a record.
<dmbaturin> And you missed an "in" before c :: list1
<ilia> array is a result of Re.get_all
Simn has joined #ocaml
Haudegen has joined #ocaml
<ilia> it returns an array
<ilia> and I have a conditional regular expression
<ggole> Ah, I see
dav- has quit [Ping timeout: 245 seconds]
<ilia> thanks, read Koans tomorrow
dav has joined #ocaml
matason has joined #ocaml
<dmbaturin> I wonder if it's feasible to make a syntax extension that would produce code for automatically populating records from regex matches.
<dmbaturin> It's going to be library-specific though.
matason has quit [Client Quit]
matason has joined #ocaml
kushal has quit [Ping timeout: 272 seconds]
<Leonidas> that sounds neat
manizzle has joined #ocaml
mort___ has joined #ocaml
kushal has joined #ocaml
rgrinberg has joined #ocaml
mort___ has quit [Client Quit]
<dmbaturin> Leonidas: Alternatively, it can take a value of a regex type and produce a regex string and match function for it.
<dmbaturin> Like "[OneOrMore Digit; Optional Whitespace; One Alnum]". Maybe verbosity is not really a bad thing. :)
rgrinberg has quit [Ping timeout: 240 seconds]
tsumetai has quit [Ping timeout: 276 seconds]
freling has joined #ocaml
tsumetai has joined #ocaml
palomer has quit [Quit: palomer]
<Leonidas> dmbaturin: well, that makes it even less readable IMHO
<Leonidas> since regex are mostly familiar syntax that is easy to grasp
<Leonidas> what makes it difficult to read is the lack of composability
<Leonidas> maybe I should take a look on SNOBOL, I heard they have an interesting alternative to regex
oskarth has left #ocaml [#ocaml]
jonludlam has joined #ocaml
AltGr has left #ocaml [#ocaml]
Kakadu has joined #ocaml
larhat has joined #ocaml
Anarchos has joined #ocaml
asQuirreL has joined #ocaml
larhat has quit [Quit: Leaving.]
mengu has quit [Remote host closed the connection]
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mengu has joined #ocaml
wildsebastian has quit [Quit: Konversation terminated!]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
ontologiae has joined #ocaml
tsumetai has quit [Ping timeout: 244 seconds]
sdothum has joined #ocaml
_andre has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Hetu has joined #ocaml
Haudegen has quit [Ping timeout: 246 seconds]
mengu has quit [Remote host closed the connection]
tsumetai has joined #ocaml
TheLemonMan has joined #ocaml
Haudegen has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
larhat has joined #ocaml
wildsebastian has joined #ocaml
Hetu has quit [Remote host closed the connection]
freling has quit [Quit: Leaving.]
larhat has quit [Client Quit]
theblatte has joined #ocaml
AlexRussia has quit [Ping timeout: 256 seconds]
freling has joined #ocaml
mengu has joined #ocaml
mengu has quit [Ping timeout: 252 seconds]
AlexRussia has joined #ocaml
asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
matason has quit []
javamonn has joined #ocaml
Gama11 has joined #ocaml
rgrinberg has joined #ocaml
larhat has joined #ocaml
Algebr has joined #ocaml
larhat has quit [Client Quit]
rgrinberg has quit [Ping timeout: 245 seconds]
javamonn has quit [Remote host closed the connection]
tsumetai has quit [Ping timeout: 240 seconds]
javamonn has joined #ocaml
tsumetai has joined #ocaml
yomimono has joined #ocaml
<Drup> dmbaturin: that's actually what I do in furl ...
javamonn has quit [Remote host closed the connection]
larhat has joined #ocaml
larhat has quit [Client Quit]
larhat has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
mengu has joined #ocaml
<ollehar> regexp can be _really_ cryptic, imho
<Drup> that's the type of "regexp"
<Drup> it looks more complicated than it is, because I forbid nested stars (by typing)
TheLemon1an has joined #ocaml
TheLemonMan has quit [Ping timeout: 264 seconds]
javamonn has joined #ocaml
c74d has joined #ocaml
Algebr has quit [Ping timeout: 256 seconds]
larhat has quit [Quit: Leaving.]
osa1 has joined #ocaml
zaquest has quit [Remote host closed the connection]
wildsebastian has quit [Remote host closed the connection]
<ollehar> what does that code do, really? :)
<ollehar> ah nm
<Drup> you figured it out ? :p
<ollehar> no!
<ollehar> but read README.md :)
<Drup> right :3
idegen has joined #ocaml
matason has joined #ocaml
shinnya has joined #ocaml
uris77 has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
jeffmo has joined #ocaml
seliopou has quit [Ping timeout: 264 seconds]
osa1 has quit [Ping timeout: 256 seconds]
seliopou has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
palomer has joined #ocaml
seliopou has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Ping timeout: 256 seconds]
seliopou has joined #ocaml
agarwal1975 has joined #ocaml
helix__ has joined #ocaml
mengu has quit [Remote host closed the connection]
badkins has joined #ocaml
seliopou has quit [Ping timeout: 264 seconds]
Haudegen has joined #ocaml
osa1 has joined #ocaml
mcclurmc_ has joined #ocaml
mcclurmc has quit [Read error: Connection reset by peer]
emias has quit [Ping timeout: 264 seconds]
nojb has joined #ocaml
mengu has joined #ocaml
mengu has joined #ocaml
TheLemon1an is now known as TheLemonMan
<Denommus`> I almost asked something that I immediately thought of the answer
<Denommus`> I was thinking about a functor that accepts a module that must implement two sigs, but it's just a matter of sig include Sig1 include Sig2 end
emias has joined #ocaml
seliopou has joined #ocaml
mengu has quit []
ontologiae has quit [Ping timeout: 256 seconds]
hilquias has joined #ocaml
<bernardofpc> companion> floats are evil -> I would bet most tech need floats to work ...
<bernardofpc> companion> you can't even test if NaN is inside -> ever heard of isnan(3) ?
ollehar has quit [Ping timeout: 240 seconds]
<ggole> Set membership doesn't use isnan
<ggole> You can iterate the whole thing and use classify_float, I suppose
rgrinberg has joined #ocaml
kushal has quit [Ping timeout: 240 seconds]
s1n4 has quit [Quit: leaving]
s1n4 has joined #ocaml
<bernardofpc> ggole: of course, since there are many NaN's possible, it's not sensible to use a hash and find it on the set bsaed on it
<bernardofpc> so the typing is preventing you from doing float-nonsense
<ggole> Uh, what?
tsumetai has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Ping timeout: 264 seconds]
<bernardofpc> I assume cc was trying to use Hashtbl.find fp_ht nan to test for membership
<bernardofpc> which is the wrong thing to do
<bernardofpc> (because many nan's)
tsumetai` has joined #ocaml
<bernardofpc> (but in this century the whole purpose of IEEE-754 has been subsumed either by arbitrary precision or I-don't-care-precision-I'm-doing-games)
rgrinberg has joined #ocaml
curiosity has joined #ocaml
<curiosity> has someone here used atdgen?
ollehar has joined #ocaml
darkf has quit [Quit: Leaving]
Submarine has quit [Ping timeout: 272 seconds]
emias has quit [Quit: Reboot.]
kushal has joined #ocaml
Submarine has joined #ocaml
<osa1> I can't use Unix module: http://lpaste.net/132228 any ideas why?
<nojb> you need to link with package unix
<nojb> -package unix if you are using ocamlfind/ocamlbuild
<osa1> if I'm not using ocamlfind/ocamlbuild?
<nojb> use ocamlfind :)
<osa1> the problem is I'm compiling my programs using metaocamlc and I'm not sure if ocamlfind/ocamlbuild supports that
<nojb> ah
<osa1> I have hand-rolled makefiles
<nojb> I think it does with a custom toolchain
<osa1> but it should be easily possible since this module is in the distribution
Denommus` has quit [Ping timeout: 252 seconds]
<Drup> osa1: ocamlfind supports metaocaml
<Drup> just use it
<nojb> anyway it should not be a problem , just add unix.cma to the list of arguments
<osa1> thanks, and how can I do same thing in toplevel?
<nojb> metaocaml unix.cma should work
emias has joined #ocaml
<osa1> awesome, thanks
uris77 has quit [Ping timeout: 264 seconds]
Algebr has joined #ocaml
Hannibal_Smith has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
mort___ has joined #ocaml
Algebr has quit [Remote host closed the connection]
Denommus has joined #ocaml
<Denommus> what is the most recommended library for parsing XML?
xificurC has quit [Read error: Connection reset by peer]
<Drup> xmlm
<Drup> or/and ezxmlm
xificurC has joined #ocaml
<Denommus> thanks
Haudegen has joined #ocaml
kdef has joined #ocaml
ollehar has quit [Remote host closed the connection]
palomer has quit [Quit: palomer]
slash^ has joined #ocaml
teiresias has quit [Quit: leaving]
teiresias has joined #ocaml
freling has quit [Quit: Leaving.]
rgrinberg has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
badkins has quit [Ping timeout: 256 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
axiles has joined #ocaml
sdothum has joined #ocaml
mort___ has quit [Quit: Leaving.]
octachron has quit [Quit: Leaving]
javamonn has quit [Read error: Connection reset by peer]
javamonn has joined #ocaml
ontologiae has joined #ocaml
nullcat has joined #ocaml
nojb has quit [Quit: nojb]
ontologiae has quit [Ping timeout: 255 seconds]
freling has joined #ocaml
hugomg has joined #ocaml
rgrinberg has quit [Ping timeout: 244 seconds]
jwatzman|work has joined #ocaml
MrScout has joined #ocaml
ncthom91 has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
<haesbaert> hmm there is no way to pass an extra argument to "main" in menhir right ?
<haesbaert> basically I'm building a record when I parse something, and this record now will depend on some extra data
tsumetai` has quit [Ping timeout: 245 seconds]
<Drup> No. Build an ast and walk it after
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
freling has quit [Quit: Leaving.]
Haudegen has quit [Ping timeout: 256 seconds]
badkins has joined #ocaml
ncthom91 has joined #ocaml
Algebr has joined #ocaml
rgrinberg has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pii4 has quit [Ping timeout: 256 seconds]
pii4 has joined #ocaml
Haudegen has joined #ocaml
MrScout has quit [Ping timeout: 256 seconds]
<haesbaert> Drup: ack
kushal has quit [Quit: Leaving]
jonludlam has quit [Ping timeout: 276 seconds]
<reynir> you *could* use %parameter to pass in a module with the values you need, but it's very ugly :)
alkoma has joined #ocaml
tane has joined #ocaml
AlexRussia has quit [Ping timeout: 245 seconds]
nullcat has quit [Remote host closed the connection]
nullcat has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
Kakadu has quit [Quit: Page closed]
ygrek has joined #ocaml
alkoma` has joined #ocaml
alkoma has quit [Remote host closed the connection]
alkoma` has quit [Remote host closed the connection]
alkoma has joined #ocaml
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 264 seconds]
Haudegen has joined #ocaml
hilquias has quit [Ping timeout: 240 seconds]
octachron has joined #ocaml
snikkers has joined #ocaml
Cyanure has joined #ocaml
AlexRussia has joined #ocaml
rgrinberg has quit [Ping timeout: 244 seconds]
MrScout has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
MrScout has quit [Ping timeout: 265 seconds]
<Algebr> I searched on opam but it doesn't look like there is anything for an ssh package in ocaml
small-wolf has joined #ocaml
dav has quit [Ping timeout: 256 seconds]
wraithm has joined #ocaml
<ilia> I am trying to debug my little program and when I do "g 0" and then "step" I get Time: 1 - pc: 7192 - module Pervasives 24 (Invalid_argument "index out of bounds")<|a|>, bt gives #0 Pervasives pervasives.ml:24:45. How to get to the line of my code where this exception happens
mort___ has joined #ocaml
dav has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
matason has quit []
mort___ has quit [Quit: Leaving.]
<sjrct> ilia: try compiling with -g, run with ocamldebug, and use the backtrace command
<ilia> that is what I am doing
<ilia> compiled with -g and run in debugger and then bt
<sjrct> bt should have given you what you want; do you have a code example?
MrScout has joined #ocaml
hilquias has joined #ocaml
snikkers has quit [Ping timeout: 240 seconds]
Submarine has quit [Ping timeout: 240 seconds]
swgillespie has joined #ocaml
Denommus` has joined #ocaml
Denommus has quit [Ping timeout: 246 seconds]
n3ss3s has joined #ocaml
<smondet> Algebr: nothing in opam but there are "started works" that I've been following https://github.com/williamleferrand/ocaml-ssh2 https://github.com/avsm/ocaml-ssh (and thisis tooo cool https://github.com/UCSD-PL/kraken). I'd need a good SSH lib at some point too.
matason has joined #ocaml
<ilia> sjrct: yes, I have code, but it looks like I found the cause of a problem
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<Algebr> smondet: ssh can be done in pure ocaml right, its just a short cut to do bindings to libssh right?
dhil has joined #ocaml
Denommus` is now known as Denommus
<smondet> Algebr: avsm's one is pure ocaml, ocaml-ssh2 is a binding
nullca___ has joined #ocaml
<Algebr> ugh, an ssh library is certainly non trivial work
Haudegen has joined #ocaml
nullcat has quit [Read error: Connection reset by peer]
nullca___ has quit [Read error: Connection reset by peer]
<apache2> people have done it in php
<apache2> so it can't be impossible
yaewa has quit [Quit: Leaving...]
moei has joined #ocaml
nullcat has joined #ocaml
zaquest has joined #ocaml
<Algebr> right
small-wolf has quit [Ping timeout: 264 seconds]
<apache2> but yeah, probably not a trivial undertaking.
brendan has quit [Excess Flood]
brendan has joined #ocaml
tsumetai` has joined #ocaml
<cmtptr> what's a good way to represent an empty body in a yacc grammar?
<cmtptr> like I would like to avoid "body: BEGIN expr END | BEGIN END"
<Drup> either that, or add the empty expression (probably a bad idea)
<cmtptr> hmmm'
<Denommus> cmtptr: why yacc over menhir?
<cmtptr> because ocamlyacc came with ocaml
<cmtptr> and I already have some level of familiarity with yacc
<cmtptr> and I'm just screwing around with some ideas, not really looking for the greatest parser generator of all time
<Drup> menhir is mainly an upgrade from ocamlyacc
<Denommus> cmtptr: yup, they're mostly compatible
<Drup> (for example, in menhir, you could have said "BEGIN option(expr) END"
<Denommus> but okay, if it works for you
<cmtptr> ah
<reynir> menhir has better errors, too
rgrinberg has joined #ocaml
pyon has quit [Quit: I have irrefutable proof that D < 0. It follows trivially from 2D > 3D, which is obviously true.]
nullcat has quit [Remote host closed the connection]
nullcat_ has joined #ocaml
nullcat_ has quit [Client Quit]
pyon has joined #ocaml
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
k1000 has quit [Ping timeout: 255 seconds]
small-wolf has joined #ocaml
nullcat has joined #ocaml
ygrek has quit [Remote host closed the connection]
jeffmo has quit [Quit: jeffmo]
ncthom91 has joined #ocaml
ygrek has joined #ocaml
seanmcl has joined #ocaml
robink has quit [Ping timeout: 248 seconds]
Kakadu has joined #ocaml
robink_ has joined #ocaml
nojb has joined #ocaml
small-wolf has quit [Remote host closed the connection]
jeffmo has joined #ocaml
jeffmo has quit [Client Quit]
matason has quit []
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
helix__ has quit []
jonludlam has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
robink_ is now known as robink
asQuirreL has joined #ocaml
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
asQuirreL has quit [Ping timeout: 250 seconds]
Plazma has joined #ocaml
jeffmo has joined #ocaml
yomimono has joined #ocaml
asQuirreL has joined #ocaml
jeffmo has quit [Quit: jeffmo]
<Leonidas> yes, we recently switched from ocamlyacc to menhir
ggole has quit []
ontologiae has joined #ocaml
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
Algebr has quit [Remote host closed the connection]
Hannibal_Smith has quit [Quit: Leaving]
tsumetai` has quit [Ping timeout: 256 seconds]
jwatzman|work has joined #ocaml
<cmtptr> guys I just realized something
struk|work has quit [Quit: Page closed]
<cmtptr> "let _ = <stuff>" doesn't magically work as a main function
<cmtptr> _ is not a function at all!
n3ss3s has quit [Ping timeout: 245 seconds]
brendan has quit [Excess Flood]
brendan has joined #ocaml
yomimono has quit [Ping timeout: 264 seconds]
systmkor has quit [Ping timeout: 245 seconds]
badkins has quit []
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
freling has joined #ocaml
<flux> indeed, it's just evaluated as part of the top-to-bottom-evaluation
<flux> there's really no main function in OCaml, but I like to use pattern: let main () = .. let _ = main ()
larhat has joined #ocaml
<flux> or, if I have arguments, then perhaps let main args = .. let _ = main (List.tl (Array.to_list Sys.argv))
_andre has quit [Quit: leaving]
<cmtptr> yeah, it just hit me that I haven't been typing "let _ () = ..."
<flux> or, if I'm fancy, .. let _ = if not !(Sys.interactive) then main ()
<cmtptr> so is the "let _ =" or "let () =" there solely to not have to need a ;;?
<dmbaturin> let () = expr will force the expr to be unit.
<cmtptr> ah, true
<flux> well, ocaml programs are composed of phrases
<flux> phrases are either a sequence of top-level statements, or an expression
<flux> and phrases are separated by ;;
<flux> I like to write my modules as a single phrase.
<cmtptr> dmbaturin, wait, is that true? in this case () is in the place of what would normally be an identifier, not a type
<flux> I feel like ;; is there only for the benefit of the interactive top-level
<flux> cmtptr, it's regular pattern matching
<flux> but in this case it's a pattern that always matches
<flux> so when you do let foo = 42, you are pattern matching foo with the value 42, and then it does binding
<dmbaturin> cmtptr: Well, since () is the value of the type unit, attempt to match it with an expression of different type will not typecheck.
<dmbaturin> let () = 3 + 4
<octachron> dmbaturin: more precisely () is the constructor of the type unit
<cmtptr> I don't understand pattern matching with let
<flux> match 42 with x -> (* code here*) <===> let x = 42 in (* code here *)
<flux> or: let 4 = 4
<flux> you will get a warning that it's a non-exhaustive pattern match
<flux> of course, in this case it will always succeed, and if I wrote let 4 = 3 it would always fail
<octachron> or more useful: let {x;y} = {x=4; y=5}
<flux> or more typical: let year, month = 2015, 5
<cmtptr> can you use the | thing with this?
<flux> sure
<flux> but it's likely not very useful..
<flux> because you can only have one pattern
<flux> I think rarely you want to pattern match with | and use only a single pattern
<dmbaturin> octachron: Yeah, that would be the most correct. :)
<cmtptr> sure, I'm just trying to understand this conceptually
<dmbaturin> cmtptr: The left-hand side of a let is always a pattern, even if trivial.
<flux> except when defining functions with the regular syntax..
<flux> though then the arguments are patterns
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
<dmbaturin> Drup: Interesting. Going to take a deeper look into it.
<cmtptr> ha
<cmtptr> type foo = Bar of int | Baz of int;; let Bar a | Baz a = Bar 7;;
<dmbaturin> As of verbose regex syntax, the XML flavour of RelaxNG is pretty much that, and no one complains (apart from XML haters, but for unrelated reason).
<cmtptr> wild stuff
osa1 has quit [Ping timeout: 265 seconds]
hugomg has quit [Quit: Leaving]
ygrek has quit [Ping timeout: 264 seconds]
sepp2k has joined #ocaml
<dmbaturin> SML has a bit more support for anonymous matching. "val from_option = fn (SOME x, _) => x | (NONE, default) => default"
lobo has joined #ocaml
javamonn has quit [Remote host closed the connection]
yomimono has joined #ocaml
yomimono has quit [Client Quit]
<smondet> dmbaturin: what's the difference with let from_option = funciton (Some x, _) -> x | (None, def) -> def ?
<smondet> s/funciton/function/
javamonn has joined #ocaml
ontologiae has quit [Ping timeout: 256 seconds]
k1000 has joined #ocaml
k1000 has quit [Client Quit]
k1000 has joined #ocaml
tane has quit [Quit: Verlassend]
larhat has quit [Quit: Leaving.]
<dmbaturin> smondet: Fewer keywords? Wait, the count is the same. :)
osa1 has joined #ocaml
mengu has joined #ocaml
hilquias has quit [Remote host closed the connection]
mengu has quit [Read error: Connection reset by peer]
agarwal1975 has quit [Quit: agarwal1975]
tsumetai has joined #ocaml
mengu has joined #ocaml
octachron has quit [Quit: Leaving]
asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Gama11 has quit [Read error: Connection reset by peer]
asQuirreL has joined #ocaml
freling has quit [Quit: Leaving.]
MercurialAlchemi has quit [Ping timeout: 264 seconds]
<jyc> I tried setting up a symlink following https://ocaml.org/learn/tutorials/ocamlbuild/Working_on_dependent_projects_with_ocamlbuild.html to have a subproject depend on the main project
<jyc> but ocamlbuild is still giving me unbound module errors.
<jyc> Has the behavior changed in the meantime, or is this a bug?
<jyc> It looks like this was supposedly fixed: http://caml.inria.fr/mantis/view.php?id=6498
<jyc> oh, but in 4.02.2.
Cyanure has quit [Remote host closed the connection]
MrScout has quit [Ping timeout: 265 seconds]
Simn has quit [Quit: Leaving]
seanmcl has quit [Ping timeout: 265 seconds]
tsumetai` has joined #ocaml
tsumetai has quit [Ping timeout: 265 seconds]
kdef has quit [Quit: Leaving]
Kakadu has quit [Remote host closed the connection]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has quit [Ping timeout: 272 seconds]
lobo has quit [Quit: leaving]
ncthom91 has joined #ocaml
Algebr has joined #ocaml
sepp2k has quit [Quit: Leaving.]
swgillespie has joined #ocaml
<Algebr> How does one explicity end an Async program?
<bitbckt> exit? :]
<Algebr> Right, but in the customarily program it like, let () = run () ; (Scheduler.go ()), where would the exit go?
<bitbckt> I was kidding.
dubosec has quit [Ping timeout: 276 seconds]
<jyc> is there any documentation on mllibs?
javamonn has quit [Remote host closed the connection]
<jyc> all I can find is this one file: https://github.com/ocaml/ocaml.org/blob/master/site/learn/tutorials/ocamlbuild/Mllib.md and the tiny notes in the output of ocamlbuild -documentation
ygrek has joined #ocaml
javamonn has joined #ocaml
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
javamonn has quit [Remote host closed the connection]
javamonn has joined #ocaml
jonludlam has quit [Ping timeout: 255 seconds]
javamonn has quit [Ping timeout: 256 seconds]
madroach has quit [Ping timeout: 264 seconds]
jonludlam has joined #ocaml
madroach has joined #ocaml
seanmcl has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jwatzman|work has quit [Quit: jwatzman|work]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
seanmcl has joined #ocaml
nojb has quit [Quit: nojb]