<d_bot>
<Jektrix> > Oleg built his house out of Prolog relations
waleee has joined #ocaml
Haudegen has joined #ocaml
gravicappa has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tuplanolla has joined #ocaml
oriba has joined #ocaml
olle has joined #ocaml
namkeleser has joined #ocaml
Serpent7776 has joined #ocaml
waleee has quit [Ping timeout: 240 seconds]
bobo_ has joined #ocaml
spip has quit [Ping timeout: 256 seconds]
<hackinghorn>
I'm trying to solve some programming problems. Read an int n, and for n times, read some ints, x, y, and do things, is there a functional way to for n times?
salkin has joined #ocaml
bartholin has joined #ocaml
<d_bot>
<undu> A recursive function with a parameter that actes as a counter, on every recursive call, add 1 to the parameter
<hackinghorn>
ah thanks, I can do that
<hackinghorn>
let me know alternatives, too
perrierjouet has quit [Ping timeout: 240 seconds]
<d_bot>
<orbitz> you can count up, or down
<d_bot>
<orbitz> left or right
unmatched-paren has joined #ocaml
<unmatched-paren>
hi! is there an equivalent in ocamllex to the caret (^) in regex, to match a character/sequence only if it's the first in a rule?
<unmatched-paren>
i can't find anything on the internet, so i'm guessing no
<d_bot>
<darrenldl> (seems like a weird requirement
<d_bot>
<Et7f3> It can be handled in the parser step (ie follow \n
Anarchos has joined #ocaml
<d_bot>
<darrenldl> does ^ in presumably regex demand no preceeding whitespace?
<unmatched-paren>
well, i'm writing a toy pascal compiler, and most pascal compilers have a compiler directive thing similar to c's #preprocessor, except it's specified in comments
<unmatched-paren>
so, for example: {$ifdef some_def}
<unmatched-paren>
or (*$define foo*)
<unmatched-paren>
that $ needs to be at the beginning
<unmatched-paren>
otherwise it's just a regular character
<unmatched-paren>
i was trying to integrate them both in one rule (1) to make the code smaller and (2) because most pascal compilers ignore any text beyond the fields that a control comment accepts, so {$ifdef foo bar} is equivalent to {$ifdef foo}, but i realized that i could just invoke the comment rule once that point is reached
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<d_bot>
<darrenldl> i uh, i have no clue if it's to do with my tzdb data collecting code, but i'm just gonna add the changes so the new tests are happy
<d_bot>
<darrenldl> qcheck always trips all the edge cases
<d_bot>
<darrenldl> (and crowbar/afl
perrierjouet has joined #ocaml
salkin has joined #ocaml
unmatched-paren has quit [Ping timeout: 250 seconds]
Haudegen has quit [Quit: Bin weg.]
gravicappa has joined #ocaml
shawnw has joined #ocaml
Anarchos has quit [Ping timeout: 256 seconds]
shawnw has quit [Ping timeout: 256 seconds]
shawnw has joined #ocaml
shawnw has quit [Ping timeout: 256 seconds]
<d_bot>
<darrenldl> might be time to bump timedesc to 1.0.0 hmm
<d_bot>
<darrenldl> unmatched-paren: yeah just do it in a pass after parsing etc
<d_bot>
<darrenldl> unless you want to be very precise, accepting a more lenient syntax seems fine
Everything has quit [Quit: leaving]
emad has joined #ocaml
zebrag has joined #ocaml
salkin-mada has quit [Quit: salkin-mada]
olle has quit [Ping timeout: 256 seconds]
oriba has joined #ocaml
salkin-mada has joined #ocaml
bartholin has joined #ocaml
hackinghorn has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
vicfred has joined #ocaml
bartholin has quit [Ping timeout: 250 seconds]
bartholin has joined #ocaml
bartholin has quit [Ping timeout: 250 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
bartholin has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
salkin has quit [Quit: salkin]
gravicappa has quit [Ping timeout: 245 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 256 seconds]
olle has joined #ocaml
Serpent7776 has quit [Quit: leaving]
Anarchos has joined #ocaml
perrierjouet has quit [Quit: WeeChat 3.4]
Anarchos has quit [Quit: Vision[]: i've been blurred!]