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
rgrinberg has quit [Ping timeout: 272 seconds]
Haudegen has joined #ocaml
nojb has quit [Quit: nojb]
dav has quit [Ping timeout: 248 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ontologiae_ has joined #ocaml
asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dav has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
rgrinberg has joined #ocaml
ontologiae_ has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Quit: WeeChat 1.1.1]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
swgillespie has quit [Client Quit]
swgillespie has joined #ocaml
dinosaure1 is now known as dinosaure
Nijikokun has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Nijikokun has quit [Ping timeout: 265 seconds]
swgillespie has joined #ocaml
cdidd_ has joined #ocaml
cdidd_ has quit [Remote host closed the connection]
cdidd_ has joined #ocaml
cdidd has quit [Ping timeout: 265 seconds]
MrScout has quit [Remote host closed the connection]
tokik_ has joined #ocaml
n_v has joined #ocaml
kerneis__ has joined #ocaml
jpdeplaix1 has joined #ocaml
gustav__1 has quit [Ping timeout: 255 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tokik has quit [Ping timeout: 264 seconds]
n0v has quit [Ping timeout: 264 seconds]
jpdeplaix has quit [Ping timeout: 264 seconds]
kerneis has quit [Ping timeout: 264 seconds]
n_v is now known as n0v
gustav___ has joined #ocaml
swgillespie has joined #ocaml
n3ss3s has joined #ocaml
cdidd_ is now known as cdidd
uris77 has joined #ocaml
<dubosec> hi everyone. I am trying to do some ocaml exercises with the exercism site. I have all the files on my computer, but I am trying to get to the part where I actually solve the problems. there is a file with something called "test.ml." I tried running it in utop, but it tells me an error saying "unbound module Bob"
<dubosec> So I tried creating a file named "Bob.ml" with the following text in it: open Core.Std let response_for input = failwith "TODO"
<dubosec> but I am still getting the unbound module Bob error. I'm not sure what I am doing wrong
<Drup> do #mod_use bob.ml ;;
<Drup> you will need to do #require "core" before too
psy_ has quit [Ping timeout: 255 seconds]
<dubosec> do I write that in core or the file Bob.ml?
<dubosec> not core, I meant utop. sorry
<Drup> in utop
<Drup> before trying to load the other module
<dubosec> okay... I'll try it and report what happens
darkf has joined #ocaml
<dubosec> well, something worked because it returned a value "val ae : bytes -> bytes -> 'a -> unit = <fun> " but it also raised an exception: (Failture TODO)
<dubosec> *Failure
ygrek has joined #ocaml
<Drup> well, obviously, it tried to execute response_for input :D
<dubosec> oh. I guess I need to open it with something then
<dubosec> If I am interpreting this all correctly, my input needs to be a solution to the problem, then?
<Drup> I don't know, I don't know your exercises.
<dubosec> thanks for helping me get the module up and running though.
nullcat has joined #ocaml
uris77 has quit [Remote host closed the connection]
psy_ has joined #ocaml
freling has joined #ocaml
freling has quit [Client Quit]
ericwa has quit [Quit: Leaving...]
freling has joined #ocaml
freling has quit [Client Quit]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
* n3ss3s uses a bunch of |>'s to handle what his noob imperative brain wanted to use lets for
<Drup> what's wrong with |> ?
<Drup> it's not very imperative.
manizzle has joined #ocaml
badkins has quit []
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Nijikokun has joined #ocaml
Nijikokun_ has joined #ocaml
Nijikokun has quit [Read error: Connection reset by peer]
osa1 has quit [Ping timeout: 265 seconds]
robink_ has quit [Ping timeout: 255 seconds]
dav has quit [Ping timeout: 255 seconds]
robink_ has joined #ocaml
dav has joined #ocaml
tg has quit [Ping timeout: 264 seconds]
shinnya has quit [Ping timeout: 250 seconds]
<dubosec> how do I create a type of int ref
<dubosec> I am trying to use the decr function
<Drup> a type of int ref or a value of type int ref ?
<dubosec> value of the type
<Drup> let x = ref 0 in ...
<Drup> ref is a function of type 'a -> 'a ref
<dubosec> so I cannot decr or incr a straight int; every value passed to incr and decr have to be variables of type int ref?
<Drup> yes
<dubosec> good to know; thanks
<Drup> values are immutable unless specified
psy_ has quit [Ping timeout: 244 seconds]
psy_ has joined #ocaml
<n3ss3s> Anyone familiar with yojson?
<Drup> ask away
<n3ss3s> So, I have this rather simple function, https://gist.github.com/n3ss3s/50292f6fdf63e7b45fc0
<n3ss3s> if I uncomment line 2 and remove line 3, calling this function from elsewhere has a strange effect
<n3ss3s> specifically, it makes the return value of that function 0, although the call is not even the last statement
<n3ss3s> if I have the code as it is in the paste, everything works as expected in the calling code
<Drup> That's very fishy
<n3ss3s> and to clarify, Util and from_string are from Yojson.Basic,
<Drup> I don't know, sorry, but it's not normal.
<n3ss3s> np thanks for looking
<n3ss3s> I'll try and see how it behaves in utop
<n3ss3s> aha, i got a clue!
jeffmo has quit [Quit: jeffmo]
<n3ss3s> the phenomenon was caused by an exception (Yojson.Json_error) just being magically swallowed
<Drup> that's weird.
<Drup> do you have a catch all somewhere ?
<n3ss3s> I suspect the curl code that calls the writer callback has a catch that'll just absorb any exceptions and return zero
<Drup> oh, that's possible
<Drup> terrible, but possible
<n3ss3s> Ok, I checked and the documentation mentions this, so I don't even get to be mad at them
<n3ss3s> "All callback functions shouldn't raise exceptions. Any exception raised in callback function will be silently caught and discared, and transfer will be aborted."
<n3ss3s> atleast they could've used some designated error value like -1 rather than 0 which is a valid length (sort of)
<Drup> or just return an actual error type
<Drup> instead of behaving like a C function
ygrek has quit [Ping timeout: 255 seconds]
dubosec has quit [Read error: Connection reset by peer]
slash^ has joined #ocaml
dubosec has joined #ocaml
MercurialAlchemi has joined #ocaml
ggole has joined #ocaml
wwilly has joined #ocaml
ohama has quit [Ping timeout: 248 seconds]
ohama has joined #ocaml
ohama has quit [Disconnected by services]
ohama has joined #ocaml
ohama has quit [Ping timeout: 245 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
ohama has joined #ocaml
ohama has quit [Disconnected by services]
ohama has joined #ocaml
A19774941 has joined #ocaml
A19774941 has quit [Client Quit]
n3ss3s has quit [Ping timeout: 256 seconds]
AlexRussia has joined #ocaml
ohama has quit [Ping timeout: 276 seconds]
matason has joined #ocaml
manizzle has quit [Ping timeout: 250 seconds]
matason has quit []
manizzle has joined #ocaml
<dmbaturin> How do I access the data dir value from an ounit2 test suite rather than individual tests?
olibjerd has joined #ocaml
kakadu has joined #ocaml
ygrek has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
dav has quit [Ping timeout: 264 seconds]
oscar_toro has quit [Ping timeout: 264 seconds]
lordkryss has joined #ocaml
dav has joined #ocaml
matason has joined #ocaml
oscar_toro has joined #ocaml
dav has quit [Ping timeout: 248 seconds]
dav has joined #ocaml
contempt has quit [Disconnected by services]
contempt has joined #ocaml
rand000 has joined #ocaml
avsm has quit [Quit: Leaving.]
larhat has joined #ocaml
asQuirreL has joined #ocaml
ohama has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
milosn has quit [Ping timeout: 256 seconds]
avsm has joined #ocaml
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
Haudegen has quit [Ping timeout: 245 seconds]
Haudegen has joined #ocaml
<haesbaert> can someone give me a hand with menhir ? http://codepad.org/bnhlGejH
<haesbaert> I'm just trying to build a list of statements
larhat has quit [Quit: Leaving.]
<lyxia> haesbaert: What's the problem?
<reynir> What is the problem? (I haven't used mehir in a while)
<haesbaert> arghh didn't paste the wanirng, 1s
<haesbaert> Warning: 5 states have an end-of-stream conflict.
<haesbaert> File "parser.mly", line 14, characters 4-20:
<haesbaert> Warning: production main -> statements is never reduced.
<haesbaert> Warning: in total, 1 productions are never reduced.
<haesbaert> when I run I actually see the productions:
<haesbaert> DOMAIN=midearth
<haesbaert> IP=192.168.8.1
<haesbaert> Fatal error: exception Parser.Error
<haesbaert> why is main -> statements never reached ?
<dora-molly> main: ss = statements EOF {...}
<haesbaert> OHHHHH
<haesbaert> dora-molly: that fixed it all
<haesbaert> dora-molly: could you explain me that ? I don't see it.
matason has quit [Max SendQ exceeded]
<dora-molly> without EOF, you had no way to end the statements
Hannibal_Smith has joined #ocaml
<haesbaert> ahhhh I see, that would match a statements followed by EOF
<dora-molly> exactly
<haesbaert> awesome, thank you :D
matason has joined #ocaml
<dora-molly> the top level rule always need some explicit end to know when parsing is done (as opposed to waiting for more tokens, since lexing is done in a streaming fashion)
<haesbaert> ack
matason has quit [Max SendQ exceeded]
matason has joined #ocaml
milosn has joined #ocaml
matason has quit [Max SendQ exceeded]
matason has joined #ocaml
matason has quit [Max SendQ exceeded]
matason has joined #ocaml
sdothum has joined #ocaml
faser-pyon-del is now known as faserbuendel
<haesbaert> anyway to define a type insinde the .mly ?
<haesbaert> the confst doesn't get exported into the parser.mli generated by menhir, so it doesn't compile
<haesbaert> this is the generated .mli
<flux> define it in another module and just 'open' is in the .mly
<haesbaert> that would solve indeed
<haesbaert> but I wondered if there wasn't a way without taking that route
<flux> looks like there is no way to add code that is written to both the .mli and .ml
avsm has quit [Quit: Leaving.]
matason has quit [Max SendQ exceeded]
<haesbaert> ack, I'll just put in another module then
matason has joined #ocaml
<dora-molly> yeo no way (I would like a ppx_menhir one day :')
Hannibal_Smith has quit [Quit: Leaving]
Guest14917 has quit [Remote host closed the connection]
kushal has joined #ocaml
shinnya has joined #ocaml
milosn has quit [Read error: Connection reset by peer]
araujo has joined #ocaml
araujo has quit [Read error: Connection reset by peer]
araujo has joined #ocaml
larhat has joined #ocaml
ontologiae_ has joined #ocaml
Leonidas has quit [Quit: An ideal world is left as an exercise to the reader]
larhat has quit [Quit: Leaving.]
jeffmo has joined #ocaml
Submarine has quit [Ping timeout: 255 seconds]
Nijikokun_ has quit [Ping timeout: 265 seconds]
cmtptr has quit [Quit: leaving]
freling has joined #ocaml
Submarine has joined #ocaml
pdewacht has quit [Read error: Connection reset by peer]
dav has quit [Ping timeout: 264 seconds]
dav has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
testcocoon has quit [Ping timeout: 264 seconds]
ygrek has quit [Ping timeout: 252 seconds]
gargaml has joined #ocaml
ygrek has joined #ocaml
dav is now known as obadz
tane has joined #ocaml
shinnya has quit [Ping timeout: 255 seconds]
milosn has joined #ocaml
obadz has quit [Quit: leaving]
obadz has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
ygrek has joined #ocaml
<flux> what was that opam way to query which (say) debian packages a package depends on?
<flux> opam show --help nor opam install --help don't really tell me :-o
<Drup> opam depext
<flux> opam: unknown command `depext'
<Drup> which is a script that you can install with "opam install opam-depext"
<flux> on opam 1.2.0
<flux> ah, right!
<flux> [ERROR] No package named opam-depext found.
<flux> :-)
<flux> plain depext it is
<Drup> possible :D
osa1 has joined #ocaml
MercurialAlchemi has joined #ocaml
testcocoon has joined #ocaml
araujo has quit [Quit: Leaving]
`eeks has joined #ocaml
`eeks has quit [Client Quit]
ohama has quit [Remote host closed the connection]
obadz has quit [Quit: leaving]
dav has joined #ocaml
ohama has joined #ocaml
jeffmo has quit [Quit: jeffmo]
Denommus has joined #ocaml
struktured has joined #ocaml
dav has quit [Quit: leaving]
dav has joined #ocaml
dav has quit [Client Quit]
A1977494 has joined #ocaml
A1977494 has quit [Client Quit]
tg has joined #ocaml
larhat has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
darkf has quit [Quit: Leaving]
ontologiae_ has quit [Ping timeout: 250 seconds]
ontologiae_ has joined #ocaml
matason has quit []
Denommus has quit [Quit: Bye]
ygrek has joined #ocaml
Denommus has joined #ocaml
tg has quit [Remote host closed the connection]
freling has quit [Quit: Leaving.]
tg has joined #ocaml
octachron has joined #ocaml
ollehar has joined #ocaml
ontologiae_ has quit [Ping timeout: 256 seconds]
willy_ has joined #ocaml
wwilly has quit [Ping timeout: 250 seconds]
ygrek has quit [Ping timeout: 272 seconds]
willy_ has left #ocaml ["Leaving"]
osa1 has quit [Ping timeout: 265 seconds]
Nijikokun has joined #ocaml
Nijikokun has quit [Ping timeout: 256 seconds]
pdewacht has joined #ocaml
osa1 has joined #ocaml
osa1 has quit [Client Quit]
osa1 has joined #ocaml
olibjerd has left #ocaml [#ocaml]
swgillespie has joined #ocaml
avsm has joined #ocaml
companion_square is now known as companion_cube
ollehar has quit [Ping timeout: 244 seconds]
thomasga has joined #ocaml
jeffmo has joined #ocaml
manizzle has quit [Ping timeout: 256 seconds]
BitPuffin has joined #ocaml
ldopa has joined #ocaml
wraithm has joined #ocaml
freling has joined #ocaml
freling has quit [Client Quit]
freling has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freling has quit [Client Quit]
ontologiae_ has joined #ocaml
ontologiae_ has quit [Ping timeout: 240 seconds]
oscar_toro has quit [Quit: Lost terminal]
guto has joined #ocaml
<guto> Hello
swgillespie has joined #ocaml
<guto> I have a little stress with opam
<guto> can somebody help me?
shinnya has joined #ocaml
<octachron> Well, what is your problem?
<companion_cube> o/ dsheets
<companion_cube> do you plan to release yorick? :p
<guto> I'm trying to install async_graphics, but it gives me a wieird bug saying unbound graphics module
<avsm> guto: this means that you compiled your OCaml compiler without X11. How did you install OCaml?
<dsheets> companion_cube, maybe at some point. are you champing at the bit to use it? it's a little weird
<avsm> dsheets: it's part of real world ocaml
<guto> yum binaries
<dsheets> avsm, what?
<avsm> dsheets: np, ignore
<guto> and then used opam to downgrade to 4.01.
<companion_cube> dsheets: I don't know, I have my own small set of utils to write scripts
<avsm> guto: you need to get the yum x11 devel packages I suspect
<guto> yes
<guto> ok
<guto> will try, grazie
<avsm> if you find out, be good to know so that we can update the FAQ
<guto> sure
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<guto> now installing the whole bunch, let us see what it says now
<guto> the problem persists , unfortunately, still haven't found a solution, I guess I'll probably compile all from source, when I finally need it
<avsm> guto: i dont have an rpm distro to hand unfortunately. Try creating an issue on https://github.com/ocaml/opam-repository/issues with the `opam switch 4.01.0 -v` output — that will show the configure options being passed to ocaml
<guto> ok, thx
guto has left #ocaml [#ocaml]
slash^ has quit [Read error: Connection reset by peer]
michael_lee has joined #ocaml
kdef has joined #ocaml
kdef has quit [Client Quit]
nullcat has joined #ocaml
vpm has quit [Quit: COIN !]
vpm has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
Submarine has quit [Quit: Leaving]
ollehar has joined #ocaml
Hannibal_Smith has joined #ocaml
wraithm has quit [Quit: leaving]
lordkryss has quit [Quit: Connection closed for inactivity]
Haudegen has joined #ocaml
struktured has quit [Quit: Konversation terminated!]
Denommus has quit [Remote host closed the connection]
TheLemonMan has joined #ocaml
freling has joined #ocaml
AlexRussia has quit [Ping timeout: 272 seconds]
rwmjones has quit [Read error: Network is unreachable]
rwmjones has joined #ocaml
jeffmo has quit [Quit: jeffmo]
Hannibal_Smith has quit [Quit: Leaving]
AlexRussia has joined #ocaml
badon has joined #ocaml
ontologiae_ has joined #ocaml
AlexRussia has quit [Ping timeout: 245 seconds]
ontologiae_ has quit [Ping timeout: 252 seconds]
freling has quit [Quit: Leaving.]
jeffmo has joined #ocaml
jeffmo has quit [Client Quit]
struktured has joined #ocaml
moei has quit [Quit: Leaving...]
<ollehar> still problems with stacktraces...
<ollehar> all I get is
<ollehar> Called from file "lib/core_list.ml", line 395, characters 13-17
<ollehar> Called from file "lib/core_list.ml", line 414, characters 15-31
moei has joined #ocaml
ggole has quit []
tane has quit [Quit: Verlassend]
osa1 has left #ocaml ["Konversation terminated!"]
avsm has quit [Quit: Leaving.]
octachron has quit [Quit: Leaving]
freling has joined #ocaml
psy_ has quit [Ping timeout: 250 seconds]
Nijikokun has joined #ocaml
ontologiae_ has joined #ocaml
freling has quit [Quit: Leaving.]
nojb has joined #ocaml
larhat has quit [Quit: Leaving.]
n3ss3s has joined #ocaml
<ollehar> gah, forgot -g in Makefile ><
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
n3ss3s has quit [Ping timeout: 245 seconds]
hellome has joined #ocaml
oscar_toro has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 264 seconds]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Nijikokun has quit [Ping timeout: 265 seconds]
jonludlam has joined #ocaml
Nijikokun has joined #ocaml
systmkor has joined #ocaml
struk|pr has joined #ocaml
struktured has quit [Ping timeout: 256 seconds]
manizzle has joined #ocaml
jave has quit [Ping timeout: 255 seconds]
struktured has joined #ocaml
struk|pr has quit [Ping timeout: 264 seconds]
jave has joined #ocaml
n3ss3s has joined #ocaml
kakadu has quit [Remote host closed the connection]
robink_ has quit [Quit: No Ping reply in 180 seconds.]
dav has joined #ocaml
robink_ has joined #ocaml
gargaml has quit [Quit: WeeChat 1.1.1]
nojb has quit [Quit: nojb]
nojb has joined #ocaml
ollehar has quit [Quit: ollehar]
nojb has quit [Ping timeout: 250 seconds]
Tekilla has joined #ocaml
nojb has joined #ocaml
nojb has quit [Ping timeout: 265 seconds]
michael_lee has quit [Ping timeout: 276 seconds]
hellome has quit [Read error: Connection reset by peer]
nojb has joined #ocaml
michael_lee has joined #ocaml
ontologiae_ has quit [Ping timeout: 252 seconds]
struktured has quit [Ping timeout: 250 seconds]
<n3ss3s> Gah
<n3ss3s> I feel like I keep running into some too-nebulous-for-a-beginner bugs
<n3ss3s> As it is, the match gets executed as you'd expect. If I remove the print_string, nothing is printed.
<nojb> which print_string ?
<n3ss3s> line 1, sorry
<nojb> try flushing stdout
<n3ss3s> Well, that did it
<n3ss3s> How'd you come up with that, is it just a kind of a 1st check when a channel is acting up?
<nojb> it is a common mistake :)
<nojb> ocaml channels are buffered
<n3ss3s> oh, right. I wasn't ending a line or anything with my prints
<n3ss3s> I see.
<nojb> if you use printf you can do the flushing by using the %! format, as in Printf.printf "notweet%!"
<n3ss3s> is this any better / more idiomatic than print_string "blah\n"?
<n3ss3s> ugh I suppose \n may not flush either
<nojb> yep, it may not
<nojb> you can use print_endline for that
<n3ss3s> yup
rand000 has quit [Quit: leaving]
jonludlam has quit [Ping timeout: 250 seconds]
Nijikokun has quit [Read error: Connection reset by peer]
Nijikokun has joined #ocaml
thomasga has quit [Quit: Leaving.]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml