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
<Drup> which part are you looking at ? everything ?
<Algebr> just going to through it. its actually nice with tig, tig log --reverse
<Drup> do you understand french well enough ? :p
<Algebr> I took 3 semesters...
<Drup> that should be enough for compsci frenglish.
<Algebr> haha, frenglish
<Drup> (it is the technical term :D)
<Algebr> funny enough I can't find any objects in the compiler code
<Algebr> oh wait nvm, selectgen.ml has it
Denommus has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
struktured has quit [Ping timeout: 265 seconds]
AltGr has joined #ocaml
ghostpl_ has joined #ocaml
<Drup> iirc, objects are troublesome when bootstraping, so they are avoided
<Drup> pprintast is using object (for no good reasons, in fact)
reem has quit [Remote host closed the connection]
yomimono has quit [Quit: Leaving]
<Algebr> Drup: Have you seen this Meteor code for JS? reminded of Ocsigen when I looked at it
reem has joined #ocaml
<Drup> yes
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
<Drup> meteor is basically trying to do the eliom client/server sections but with js on both side
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup> they don't have the client values and injections stuff yet
<Drup> and communication is synchronous, last time I looked
<Drup> but yes, it's interesting
MrScout__ has quit [Remote host closed the connection]
madroach has quit [Ping timeout: 264 seconds]
<Drup> (it's still crappy js, though, so no typechecking whatsoever, in particular on the client/server interface)
<Algebr> What do you mean by injections?
<Drup> let x = 3
<Drup> {client{ let y = %x + 1 }}
<Drup> the technical term for %x is "injection"
madroach has joined #ocaml
rand000 has quit [Quit: leaving]
<ollehar> yo, compiler geniuses
<ollehar> I need to make a small boolean parser/lexer for stuff like "(x AND y) OR z"
<ollehar> in OCaml
<ollehar> any tips, links?
<ollehar> this is within another program.
<Drup> menhir's manual
<Drup> maybe ocamlyacc's one before
mxv has quit [Remote host closed the connection]
<Drup> but use menhir regardless
MrScout_ has joined #ocaml
<ollehar> will check, thanks
jwatzman|work has quit [Quit: jwatzman|work]
<Algebr> Why do projects that use oasis still have Makefiles? I thought that oasis was supposed to replace the need for all other build tools
<Drup> because "make" is shorter than "ocaml setup.ml" :D
ygrek has joined #ocaml
<whitequark> because oasis is awful
<whitequark> if you're doing anything with ppx, or ctypes, or generally anything more advanced than "build a bunch of ml files", oasis can't do it
<whitequark> also it puts loads of crap into your tree
<Algebr> whitequark: do you stick with plain makefiles?
<whitequark> also it tries to replicate some of the newer ocaml features, on new ocaml, badly
<Drup> ocamlbuild*
<whitequark> like .mldylib generation, or ocamlfind invocation, or...
<whitequark> Algebr: no, I do everything via ocamlbuild
pgomes has quit [Ping timeout: 264 seconds]
<Drup> which is a badly documented mess and with a rather doubtful semantic. :p
<whitequark> it doesn't put shit into my tree though, or try to outsmart me
<whitequark> oasis can go burn
<Drup> oasis doesn't put shit into your trees if you use the dynamic stuff
<whitequark> then it shits into my VCS, or I have to depend on it, or no one can install my stuff
<whitequark> and if I depend on it, I pull in camlp4
<whitequark> camlp4 can go fucking burn so hard
<Drup> (but I agree, it's much easier to rant and tell beginners to use a badly documented complicated tool like ocamlbuild, duh !)
<Algebr> Okay, makefiles it is.
tianon has quit [Read error: Connection reset by peer]
<Drup> Algebr: use OCamlMakefile
<Drup> please don't write your own
tianon has joined #ocaml
<whitequark> Drup: easier than what? trying to improve an ecosystem that consists of basically jane street and people who consider utf-8 optional? right.
whitequark has left #ocaml [#ocaml]
ghostpl_ has quit [Remote host closed the connection]
oriba has quit [Quit: oriba]
<Drup> so bitter :(
<ollehar> ---> rant.stackoverflow.com
jonludlam has quit [Ping timeout: 244 seconds]
<Algebr> at least with plain makefiles you have a skill that isn't just limited to ocamlland
tnguyen has joined #ocaml
<bernardofpc> a badly documented complicated tool like ocamlbuild -> I have mostly used ocamlbuild, why is it "badly documented" ?
<Drup> did you tried to write a plugin ?
<bernardofpc> no
<bernardofpc> should I ?
<bernardofpc> (and why should I if that's a relevant question)
<Drup> probably not, but you will need, if you do complicated things
<Drup> like optional dependencies
<bernardofpc> complicated being like linking to external .so ?
<bernardofpc> does ocaml have #ifdef to make sense of optional deps ?
<Drup> bernardofpc: cppo
<Drup> linking to external .so shouldn't be in the complicated category
MrScout_ has quit [Read error: Connection reset by peer]
<bernardofpc> right
cesar_ has joined #ocaml
MrScout_ has joined #ocaml
<bernardofpc> well, I imagine there's some ./configure - like exponential hell
<bernardofpc> anywhere in opt deps
cesar_ is now known as Guest89397
tnguyen has quit [Quit: tnguyen]
tnguyen has joined #ocaml
Guest89397 has quit [Ping timeout: 265 seconds]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
MrScout_ has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 272 seconds]
ollehar has quit [Quit: ollehar]
q66[lap] has joined #ocaml
ygrek has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
tnguyen has quit [Quit: tnguyen]
tnguyen has joined #ocaml
darkf has joined #ocaml
kdef has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 255 seconds]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
badkins has quit []
cesar_ has joined #ocaml
cesar_ is now known as Guest44627
reem has quit [Remote host closed the connection]
Guest44627 has quit [Ping timeout: 265 seconds]
reem has joined #ocaml
WraithM has joined #ocaml
ghostpl_ has joined #ocaml
Bhavya has quit [Quit: Quit the channel]
ghostpl_ has quit [Ping timeout: 256 seconds]
siddharthv_away is now known as siddharthv
tnguyen has quit [Quit: tnguyen]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
mcc has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
kushal has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest57337
Guest57337 has quit [Ping timeout: 256 seconds]
rwmjones has quit [Read error: Network is unreachable]
rwmjones has joined #ocaml
reem has quit [Read error: Connection reset by peer]
reem has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
AlexRussia has joined #ocaml
reem has quit [Remote host closed the connection]
keen__________25 has quit [Read error: Connection reset by peer]
keen__________25 has joined #ocaml
ggole has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
cesar_ has joined #ocaml
cesar_ is now known as Guest58394
q66[lap]_ has joined #ocaml
tianon has joined #ocaml
q66[lap] has quit [Read error: Connection reset by peer]
reem has joined #ocaml
MercurialAlchemi has joined #ocaml
Guest58394 has quit [Ping timeout: 265 seconds]
reem has quit [Remote host closed the connection]
Submarine has joined #ocaml
reem has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
ygrek has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
mcc has quit [Quit: This computer has gone to sleep]
oscar_toro has quit [Ping timeout: 264 seconds]
AlexRussia has quit [Ping timeout: 250 seconds]
psy_ has quit [Quit: Leaving]
oscar_toro has joined #ocaml
bjorkintosh has joined #ocaml
tane has joined #ocaml
dinosaure has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
ollehar has joined #ocaml
dinosaure has joined #ocaml
jonludlam has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
Haudegen has joined #ocaml
pgomes has joined #ocaml
reem has quit [Remote host closed the connection]
Simn has joined #ocaml
reem has joined #ocaml
pgomes has quit [Ping timeout: 264 seconds]
AlexRussia has joined #ocaml
lordkryss has joined #ocaml
reem has quit [Remote host closed the connection]
Guest7419 has quit [Quit: leaving]
kushal has quit [Ping timeout: 264 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest67248
reem has joined #ocaml
Guest67248 has quit [Ping timeout: 265 seconds]
pgomes has joined #ocaml
kushal has joined #ocaml
kushal has quit [Remote host closed the connection]
kushal has joined #ocaml
reem has quit [Remote host closed the connection]
dant3 has joined #ocaml
reem has joined #ocaml
ollehar has quit [Quit: ollehar]
pgomes has quit [Ping timeout: 252 seconds]
jonludlam has quit [Ping timeout: 244 seconds]
reem has quit [Remote host closed the connection]
AlexRussia has quit [Ping timeout: 256 seconds]
reem has joined #ocaml
dav has joined #ocaml
larhat has joined #ocaml
larhat has quit [Client Quit]
freling has joined #ocaml
larhat has joined #ocaml
kakadu has joined #ocaml
matason has joined #ocaml
_5kg has quit [Ping timeout: 244 seconds]
_5kg has joined #ocaml
matason has quit [Ping timeout: 272 seconds]
tianon has quit [Read error: Connection reset by peer]
dav has quit [Remote host closed the connection]
tianon has joined #ocaml
mort___ has joined #ocaml
matason has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 265 seconds]
Submarine has quit [Quit: Leaving]
axiles has joined #ocaml
reem has quit [Remote host closed the connection]
ghostpl_ has joined #ocaml
jonludlam has joined #ocaml
freling has quit [Quit: Leaving.]
siddharthv is now known as siddharthv_away
fedjo has quit [Quit: Leaving.]
cesar_ has joined #ocaml
cesar_ is now known as Guest81374
fedjo has joined #ocaml
Guest81374 has quit [Ping timeout: 248 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
AltGr has left #ocaml [#ocaml]
govg has joined #ocaml
govg_ has joined #ocaml
govg has quit [Ping timeout: 256 seconds]
keen__________26 has joined #ocaml
sdothum has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
oscar_toro has quit [Ping timeout: 248 seconds]
keen__________25 has quit [Ping timeout: 256 seconds]
_andre has joined #ocaml
kushal has quit [Quit: Leaving]
kushal has joined #ocaml
tnguyen has joined #ocaml
iZsh_ has quit [Ping timeout: 256 seconds]
iZsh has joined #ocaml
ousado_ has joined #ocaml
wagle_ has joined #ocaml
hcarty_ has joined #ocaml
badon has quit [Ping timeout: 272 seconds]
Mercuria1Alchemi has joined #ocaml
asmanur has joined #ocaml
mfp_ has joined #ocaml
nopf_ has joined #ocaml
johnelse_ has joined #ocaml
tokenrov1 has joined #ocaml
tnguyen has quit [Client Quit]
kerneis__ has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
thorsten1 has joined #ocaml
n_v has joined #ocaml
ski_ has joined #ocaml
MercurialAlchemi has quit [*.net *.split]
mfp has quit [*.net *.split]
w0rp has quit [*.net *.split]
haesbaert has quit [*.net *.split]
ousado has quit [*.net *.split]
meteo has quit [*.net *.split]
maurer has quit [*.net *.split]
ski has quit [*.net *.split]
johnelse has quit [*.net *.split]
ghostpl has quit [*.net *.split]
frawgie has quit [*.net *.split]
gperetin has quit [*.net *.split]
abbe has quit [*.net *.split]
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
maurer has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
w0rp has joined #ocaml
tianon has joined #ocaml
_5kg has quit [Ping timeout: 245 seconds]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
johnelse_ is now known as johnelse
kushal has quit [Ping timeout: 244 seconds]
_5kg has joined #ocaml
ghostpl has joined #ocaml
frawgie has joined #ocaml
gperetin has joined #ocaml
abbe has joined #ocaml
kushal has joined #ocaml
ghostpl has quit [Max SendQ exceeded]
ghostpl has joined #ocaml
pyon has quit [*.net *.split]
martintrojer has quit [*.net *.split]
destrius has quit [*.net *.split]
thorsten` has quit [*.net *.split]
wagle has quit [*.net *.split]
micrypt has quit [*.net *.split]
nopf has quit [*.net *.split]
n0v has quit [*.net *.split]
tokenrove has quit [*.net *.split]
asmanur_ has quit [*.net *.split]
kerneis_ has quit [*.net *.split]
hcarty has quit [*.net *.split]
fedjo has quit [*.net *.split]
tane has quit [*.net *.split]
bjorkintosh has quit [*.net *.split]
testcocoon has quit [*.net *.split]
ohama has quit [*.net *.split]
manizzle has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
flxx has quit [*.net *.split]
pdewacht has quit [*.net *.split]
nicoo has quit [*.net *.split]
xiaolin has quit [*.net *.split]
patronus has quit [*.net *.split]
ivan\ has quit [*.net *.split]
Khady has quit [*.net *.split]
fyolnish has quit [*.net *.split]
dbrumley has quit [*.net *.split]
companion_cube has quit [*.net *.split]
stomp has quit [*.net *.split]
relrod has quit [*.net *.split]
gargawel has quit [*.net *.split]
gustav___ has quit [*.net *.split]
CissWit has quit [*.net *.split]
deavid has quit [*.net *.split]
n_v is now known as n0v
micrypt has joined #ocaml
haesbaert has joined #ocaml
martintrojer has joined #ocaml
meteo has joined #ocaml
srcerer has quit [Ping timeout: 265 seconds]
nicoo has joined #ocaml
fedjo has joined #ocaml
fyolnish has joined #ocaml
pdewacht has joined #ocaml
patronus has joined #ocaml
destrius_ has joined #ocaml
companion_cube has joined #ocaml
gustav___ has joined #ocaml
gargawel has joined #ocaml
relrod has joined #ocaml
Asmadeus has joined #ocaml
CissWit has joined #ocaml
deavid has joined #ocaml
ohama has joined #ocaml
xiaolin has joined #ocaml
Khady has joined #ocaml
flxx has joined #ocaml
stomp has joined #ocaml
ivan\ has joined #ocaml
dbrumley has joined #ocaml
bjorkintosh has joined #ocaml
manizzle has joined #ocaml
testcocoon has joined #ocaml
tane has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
rgrinberg has joined #ocaml
Haudegen has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
Algebr has quit [Ping timeout: 255 seconds]
oscar_toro has joined #ocaml
pyon has joined #ocaml
govg_ has quit [Ping timeout: 246 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest90628
govg has joined #ocaml
Guest90628 has quit [Ping timeout: 256 seconds]
TheLemonMan has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
struktured has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
olibjerd has joined #ocaml
olibjerd has left #ocaml [#ocaml]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
Algebr has joined #ocaml
struktured has quit [Ping timeout: 244 seconds]
yegortimoschenko has joined #ocaml
reem has joined #ocaml
tnguyen has joined #ocaml
reem has quit [Ping timeout: 248 seconds]
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
yegortimoschenko has quit [Ping timeout: 244 seconds]
yegortimoschenko has joined #ocaml
<_andre> does anyone know what is needed in myocamlbuild.ml/_tags to pass --external-tokens and --only-tokens to menhir?
_pakchoi_ops has joined #ocaml
idegen has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 272 seconds]
ollehar has joined #ocaml
zoetus has joined #ocaml
<zoetus> hi all!
<zoetus> is there any particular reason the compiler complains to me about "implicit elimination of optional argument"s?
<zoetus> i thought the point of optional arguments was that they are optional
<tane> could you show a minimal example?
<adrien_znc> zoetus: it's not possible to make the difference between an optional argument in the last position and partial application
<adrien_znc> you need at least one non-optional argument
<adrien_znc> typically if you have nothing required, that'd be unit/()
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
<ollehar> neep help compiling small menhir demo together with my own code
<ollehar> *need
<ollehar> I have file main.ml in /
<ollehar> and /boolean-lang dir for menhir demo
<ollehar> in boolean-lang, I want to use variable from main.ml
<ollehar> the makefile for the menhir demo have line
<ollehar> MODULES := parser lexer calc
<ollehar> I change it to
<ollehar> MODULES := ../main parser lexer calc
<ollehar> but still get error "Unknown module Main" in calc code.
<ollehar> I want to use Main module in lexer.mll
dant3 has left #ocaml [#ocaml]
Algebr has quit [Remote host closed the connection]
Algebr has joined #ocaml
yegortimoschenko has quit [Read error: Connection reset by peer]
<ollehar> OK, needed to move main.* to boolean-lang/
yegortimoschenko has joined #ocaml
<_andre> got it: flag ["ocaml"; "menhir"; "only_tokens"] & S[A"--only-tokens"];; flag ["ocaml"; "menhir_ocamldep"; "only_tokens"] & S[A"--only-tokens"];;
<ollehar> talking to me?
<_andre> no, answering my own question :P
<ollehar> ok :)
oscar_toro has quit [Ping timeout: 255 seconds]
<ollehar> Other problem: How to tell menhir makefiles to use libs? like xml-light?
yegortimoschenko has quit [Quit: (null)]
<ollehar> Solved with INCLUDE := -package xml-light etc
<zoetus> why does List.map have a labeled argument for `f`?
<ollehar> zoetus: does it? You mean ListLabels? so you can order arguments the way you want.
yegortimoschenko has joined #ocaml
<zoetus> oh, that makes sense!
kakadu has quit [Quit: Page closed]
<ggole> That's probably Core's List.map
<ollehar> aha
cesar_ has joined #ocaml
cesar_ is now known as Guest7381
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
paradoja has joined #ocaml
Guest7381 has quit [Ping timeout: 265 seconds]
yegortimoschenko has quit [Quit: (null)]
yegortimoschenko has joined #ocaml
shinnya has joined #ocaml
ollehar has quit [Ping timeout: 256 seconds]
_pakchoi_ops has quit [Read error: Connection reset by peer]
kushal has quit [Ping timeout: 252 seconds]
kushal has joined #ocaml
ollehar has joined #ocaml
ollehar has quit [Quit: ollehar]
ski_ is now known as ski
zoetus has quit [Quit: Page closed]
contempt has quit [Read error: Connection reset by peer]
xificurC has joined #ocaml
q66[lap]_ has quit [Quit: Textual IRC Client: www.textualapp.com]
contempt has joined #ocaml
tianon has quit [Read error: Connection reset by peer]
tianon has joined #ocaml
yegortimoschenko has quit [Quit: (null)]
sepp2k has joined #ocaml
yegortimoschenko has joined #ocaml
rgrinberg has joined #ocaml
yegortimoschenko has quit [Ping timeout: 250 seconds]
yegortimoschenko has joined #ocaml
q66[lap] has joined #ocaml
rgrinberg has quit [Ping timeout: 245 seconds]
AlexRussia has joined #ocaml
paradoja has quit [Read error: Connection reset by peer]
q66[lap] has quit [Quit: Textual IRC Client: www.textualapp.com]
oscar_toro has joined #ocaml
rgrinberg has joined #ocaml
freling has joined #ocaml
darkf has quit [Quit: Leaving]
yegortimoschenko has quit [Quit: (null)]
kakadu has joined #ocaml
AlexRussia has quit [Ping timeout: 256 seconds]
AlexRussia has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest5344
TheLemonMan has quit [Quit: leaving]
shinnya has quit [Ping timeout: 244 seconds]
matason has quit [Ping timeout: 265 seconds]
tane has quit [Quit: Verlassend]
Guest5344 has quit [Remote host closed the connection]
matason has joined #ocaml
slash^ has joined #ocaml
BitPuffin has joined #ocaml
matason has quit [Ping timeout: 252 seconds]
<companion_cube> the new opam is nice on the eyes
<Drup> yes it is
jwatzman|work has joined #ocaml
thomasga has joined #ocaml
mort___ has quit [Ping timeout: 265 seconds]
matason has joined #ocaml
tane has joined #ocaml
akegalj has joined #ocaml
mort___ has joined #ocaml
ggole has quit []
<cmtptr> "Netgear R6300v2 Smart WiFi Router supports windows 8."
<cmtptr> whoops, wrong channel
<cmtptr> but since I'm here I'll make my joke anyway: So, the router runs windows 8 or what?
<adrien_znc> it has a touch interface :)
ghostpl_ has quit [Remote host closed the connection]
<Algebr> What's the ocaml way to do logging?
<companion_cube> if you use Lwt, Lwt_log, otherwise you can try one of the libraries (e.g. dolog)
boogie has joined #ocaml
BitPuffin has quit [Ping timeout: 265 seconds]
kdef has joined #ocaml
WraithM has quit [Quit: leaving]
boogie has quit [Quit: Leaving...]
akegalj_ has joined #ocaml
akegalj has quit [Ping timeout: 272 seconds]
badkins has joined #ocaml
Pepe_ has quit [Ping timeout: 264 seconds]
ghostpl_ has joined #ocaml
MrScout has joined #ocaml
manizzle has quit [Ping timeout: 246 seconds]
Denommus has joined #ocaml
mcclurmc has quit [Ping timeout: 244 seconds]
jonludlam has quit [Ping timeout: 264 seconds]
t4nk795 has joined #ocaml
<t4nk795> let split : 'a list -> 'a list * 'a list = let rec aux = fun acc1 acc2 -> function | [] -> [], [] | hd :: tl -> let l1, l2 = aux ...
<t4nk795> can anyone suggest to me how I should use l1 and l2 to store both sections ofthe list?
<t4nk795> I'm unsure at this point how to use them
<companion_cube> well, you need to split the tail "tl"
wagle_ is now known as wagle
<companion_cube> it returns a pair, taht you destruct: let l1, l2 = split tl in .....
<mrvn> what is split supposed to do?
<companion_cube> then, you destruct hd: let x, y = hd in x :: l1, y :: l2
<t4nk795> I would like to seperate a list into two complete seperate lists of equal size. [1;2;3;4;5;6;] - [1;3;5] [2;4;6]
<companion_cube> mrvn: List.split I guess
<companion_cube> oh, my bad
<mrvn> t4nk795: then you need to consume two items at a time
<companion_cube> you need to take two elements
akegalj_ is now known as akegalj
<companion_cube> also, the length of the resulting lists might differ by 1
<mrvn> | x::y::tl -> let (xs, ys) = split tl in (x::xs, y::ys)
<mrvn> nah, if it doesn't fit you raise an exceptions
thorsten1 has quit [Quit: WeeChat 1.1-dev]
<companion_cube> I guess this might be in the context of merge sort
<companion_cube> so you'd rather not fail on the split operation
thorsten` has joined #ocaml
<mrvn> For merge sort I wouldn't split.
<t4nk795> ah I didn't think to pattern match in that way
<companion_cube> mrvn: what do you mean? on list you kind of need to
<companion_cube> on arrays that's probably different
<mrvn> For merge sort List.map (fun x -> [x]) and then merge the list repeadetly till there is only one
<companion_cube> I'm not sure it's better
<companion_cube> you're suppose to divide the size of the problem by 2 at every recursive step
<companion_cube> (or 3, or...)
<companion_cube> supposed*
matason has quit [Ping timeout: 246 seconds]
<t4nk795> | x :: y :: tl -> let xs, ys = split tl in ( (x :: xs), (y :: ys))
<t4nk795> I feel I'm not far off here
kakadu has quit [Ping timeout: 246 seconds]
<t4nk795> I'm right in thinking it shouldn't be (xs, ys) ?
<t4nk795> since what I want to return are two separate things
<t4nk795> thought I'm most likely wrong about that ;)
<mrvn> the () are just for readability
<t4nk795> ah my knowledge on that is limited. I figured it was doing something
<mrvn> my bottom up solution
<t4nk795> That's interesting, thank you
oscar_toro has quit [Ping timeout: 264 seconds]
kushal has quit [Quit: Leaving]
manizzle has joined #ocaml
oscar_toro has joined #ocaml
eatonphil has joined #ocaml
AlexRussia has quit [Ping timeout: 250 seconds]
mcclurmc has joined #ocaml
<eatonphil> I have a micro lisp I'm working on. It didn't end up going well so I just ended up releasing it as it is (a lispy calculator). I listed what I think needs to change in the README. Are my thoughts correct? I'd appreciate any verification. Mainly, I need to hold off on descent until the application stage and also I need to have a good ADT to minimize stupid match ... with.
eatonphil has quit [Client Quit]
Haudegen has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Remote host closed the connection]
eatonphil has joined #ocaml
mcclurmc has joined #ocaml
psy_ has joined #ocaml
pgomes has joined #ocaml
tokenrov1 is now known as tokenrove
<tokenrove> hi eatonphil. nice work on the calculator; thanks for trying my Num suggestion. i will try to dig up a tiny lisp interpreter i wrote ages ago that might be some help.
<mrvn> updated with a top_down way as well: https://gist.github.com/mrvn/82577b32b83574048ce8 bottom up is shorter
<eatonphil> @tokenrove, yeah Num was a good idea. I'd be happy for any examples too!
swgillespie has joined #ocaml
Haudegen has joined #ocaml
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
mfp_ is now known as mfp
Submarine has joined #ocaml
<mrvn> optimized it some more. bottom up is still a bit shorter
mcclurmc has quit [Remote host closed the connection]
<mrvn> bottom up needs O(1) stack while top down needs O(log n)
mcclurmc has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mort___ has quit [Quit: Leaving.]
WraithM has joined #ocaml
ericwa has joined #ocaml
kakadu has joined #ocaml
Hannibal_Smith has joined #ocaml
ghostpl_ has quit [Remote host closed the connection]
TheLemonMan has joined #ocaml
mort___ has joined #ocaml
Algebr has quit [Remote host closed the connection]
matason has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
slash^ has quit [Read error: Connection reset by peer]
struk|work has quit [Quit: Page closed]
eatonphil has quit [Quit: Page closed]
larhat has quit [Quit: Leaving.]
Algebr has joined #ocaml
<Algebr> Can I compile an arbitrary number of .cmo into one .cmo?
<Algebr> And what is the difference between ocamlopt and ocamlopt.opt?
<mrvn> Algebr: ocamlopt.opt is the ocamopt compiled to native code. plain ocamlopt is bytecode
<cmtptr> what's the point of distributing both?
<mrvn> not every arch has native code
<Algebr> um, isn't the ocamlc the byte code compiler?
<cmtptr> no
<cmtptr> er, yes
<cmtptr> ocamlopt is the native machine language compiler, but the executable itself is ocaml bytecode
freling has quit [Quit: Leaving.]
<nicoo> cmtptr: It can be a symlink to ocamlopt.opt, technically
<cmtptr> oh
<cmtptr> on arch it isn't
claudiuc has joined #ocaml
_andre has quit [Quit: leaving]
badkins has quit [Read error: Connection reset by peer]
ghostpl_ has joined #ocaml
swgillespie has joined #ocaml
matason has quit [Ping timeout: 264 seconds]
ghostpl_ has quit [Ping timeout: 245 seconds]
Anarchos has joined #ocaml
<Algebr> compiling ocaml is truly an arcane.
<Drup> Algebr: you tried to define your own makefile ?
<Algebr> maybe
<Drup> I told you to use OCamlMakefile, didn't I ? :D
<Algebr> That makefile is a beast
<Drup> why do you care ? It does the job ?
<kakadu> plain Makefile then
<Drup> If you think "but I'm sure I can do it simpler!"
<Drup> let me tell you one thing
<Algebr> here it comes
<Drup> your version is going to be broken.
<Drup> :D
<Algebr> lol, okay, now I'm going to try the ocamlmakefile
<Drup> (this affirmation is based on a long list of real world example :D)
matason has joined #ocaml
ericwa has quit [Read error: Connection reset by peer]
ollehar has joined #ocaml
<ollehar> D:
<ollehar> Parser.main exists without error message
<Drup> it exists, so it parses! :D
<companion_cube> I, too, exist without error message
<companion_cube> should I worry?
<Drup> (or is it the other way around ? :D)
<t4nk795> Hi if I have a type like so "type cint = MinusInfinity | PlusInfinity | Finite of int " and I want to create a function as : let add : cint -> cint -> cint = function n1 n2 -> match n1 n2 with .. how do I pattern match to access the respective values of cint?
<ollehar> exits
<ollehar> ?
<ollehar> :(
<ollehar> Cogito...
<Drup> ollehar: show your parser :)
<companion_cube> t4nk795: match n1, n2 with MinusInfinity, MinusInfinity -> MinusInfinity | Finite i, Finite j ->....
<mrvn> match (n1, n2) with
<ollehar> drup: all of it?
<ollehar> using menhir
<Drup> ollehar: yes, pastebin.
<ollehar> I got it to work interactively
<t4nk795> thank you both.
<tokenrove> would it be possible to build a better opam solver on top of z3, especially now that it's open source?
<companion_cube> do you have problems with apud ?
<companion_cube> aspcud*
<Drup> tokenrove: 1) Z3 is rather badly packaged in distrib, not better than aspcud
<Drup> 2) aspcud is more suited to the task, it's designed on purpose for package constraints
<ollehar> lexer and parser: http://pastebin.com/Zb6rjDzc
<tokenrove> companion_cube: not at all; i was just curious, and i figured people here would know much more about it than I do.
<Drup> ollehar: line 45, on eof, you should emit EFO
<Drup> EOF*
<Drup> not exiting
Algebr has quit [Remote host closed the connection]
<Drup> same for line 65
<ollehar> jeezes
<ollehar> thanks!
<companion_cube> tokenrove: that was a legit question; the issue, I think, is z3 is not built for optimization but "only" for solving constraints
badkins has joined #ocaml
<t4nk795> If a part of my type is 'Finite of int'
<t4nk795> how may I add two of those types together?
<Drup> tokenrove: if you are interested, you can watch https://www.youtube.com/watch?v=E-gtFnbHcv0
larhat has joined #ocaml
<t4nk795> | Finite i, Finite j ->
<Drup> also, as companion_cube, I didn't pay attention, but last release of Z3 can't do optimisation
<Drup> and checking is easy (the solver bundle in opam does it fine). The hard part is providing an optimal set of packages.
<tokenrove> Drup: cool, thanks
<Drup> ollehar: also, I'm not sure you need the "%prec NOT"
<Drup> (actually, quite convinced you don't)
<ollehar> OK
<ollehar> Just don't make me learn it.
<Drup> learn what ? :p
<ollehar> menhir
<tokenrove> i know that Z3 has some functions to maximize objective functions, so i had assumed that could be used for optimization.
<ollehar> or whatever grammer menhir uses
<companion_cube> I'm not sure it's in the release
<ollehar> *grammar
<tokenrove> companion_cube: yeah, it isn't. it's only on the opt branch.
<Drup> tokenrove: in dev
<Drup> and unstable
<Drup> also, has issues with local maximas :p
<Drup> and if you are thinking of the stuff I used, it's a huge hack.
<companion_cube> well, now you can merge it and propose a patch :p
<t4nk795> Hi folks, how many I add two types together that have SomeName of int ?
<t4nk795> if I declare two variables n1 and n2 which both have that type
<Drup> companion_cube: they are developing their own better version.
<companion_cube> so I think the idea is z3 authors are going to focus more on lean now
<Drup> not so sure about that
<t4nk795> I'm pattern matching n1 and n2 with | SomeName i, SomeName j ->
<Drup> the original author, yes
<ollehar> drup: now I get "empty token" at end of string :P
<Drup> ollehar: considering you don't have any parsing rule to handle the empty string, is that really surprising ? :)
mcclurmc has joined #ocaml
<Drup> hum, except if I misunderstood the issue
<ollehar> no
<ollehar> but what's the solution?
<Drup> add a rule to handle the empty string
<Drup> like "| EOF { ... }" in main
<Drup> and return a bool option.
<ollehar> hm
ollehar has quit [Remote host closed the connection]
ollehar has joined #ocaml
freling has joined #ocaml
<ollehar> | eof { EOL |
<ollehar> oops
<ollehar> | eof { EOL }
<ollehar> ah whatever
<ollehar> the error is gone
<ollehar> Cool, I've got a mini-language in my XML parser :)
<ollehar> "Jesus wept, as there were no more worlds to conquer!"
s1n4 has joined #ocaml
ghostpl_ has joined #ocaml
ghostpl_ has quit [Ping timeout: 256 seconds]
t4nk795 has quit [Ping timeout: 246 seconds]
Anarchos has quit [Quit: returned to code]
struktured has joined #ocaml
xificurC has quit [Ping timeout: 256 seconds]
larhat has quit [Quit: Leaving.]
ollehar has quit [Ping timeout: 244 seconds]
reem has joined #ocaml
matason has quit [Ping timeout: 265 seconds]
mort___ has quit [Read error: Connection reset by peer]
mort___1 has joined #ocaml
ghostpl_ has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
badon has joined #ocaml
Anarchos has joined #ocaml
ghostpl_ has quit [Ping timeout: 272 seconds]
avsm has joined #ocaml
reem has quit [Remote host closed the connection]
reem has joined #ocaml
avsm has quit [Quit: Leaving.]
reem has quit [Remote host closed the connection]
ollehar has joined #ocaml
kakadu has quit [Remote host closed the connection]
Hannibal_Smith has quit [Quit: Leaving]
freling has quit [Quit: Leaving.]
TheLemonMan has quit [Quit: leaving]
reem has joined #ocaml
avsm has joined #ocaml
WraithM has quit [Ping timeout: 244 seconds]
badon has quit [Quit: Leaving]
Mercuria1Alchemi has quit [Ping timeout: 245 seconds]
cdidd has quit [Ping timeout: 255 seconds]
Pepe_ has joined #ocaml
sepp2k has quit [Quit: Konversation terminated!]
tane has quit [Quit: Verlassend]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
swgillespie has joined #ocaml
ollehar has quit [Quit: ollehar]
WraithM has joined #ocaml
ghostpl_ has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
AltGr has joined #ocaml
akegalj has quit [Quit: Lost terminal]
ghostpl_ has quit [Ping timeout: 248 seconds]
pgomes has quit [Ping timeout: 252 seconds]
Denommus has quit [Quit: going home]
jwatzman|work has quit [Quit: jwatzman|work]
Algebr has joined #ocaml
idegen has quit [Quit: Leaving.]
idegen has joined #ocaml
idegen has quit [Read error: Connection reset by peer]