adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
damason has joined #ocaml
Kakadu has quit [Remote host closed the connection]
chindy has quit [Quit: Leaving]
hcarty has joined #ocaml
hcarty has quit [Ping timeout: 276 seconds]
Haudegen has joined #ocaml
darkf has joined #ocaml
sh0t has quit [Remote host closed the connection]
sz0 has joined #ocaml
algoriddle has quit [Quit: Connection closed for inactivity]
antkong has quit [Quit: antkong]
Maxdaman1us has joined #ocaml
rwmjones has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
badon has joined #ocaml
damason has quit [Ping timeout: 248 seconds]
antkong has joined #ocaml
hxegon has joined #ocaml
damason has joined #ocaml
hcarty has joined #ocaml
maverous has quit [Quit: WeeChat 1.3]
mcc has joined #ocaml
hcarty has quit [Ping timeout: 276 seconds]
teknozulu has quit [Ping timeout: 252 seconds]
tennix has joined #ocaml
hxegon has quit [Ping timeout: 246 seconds]
yunxing has quit [Remote host closed the connection]
teknozulu has joined #ocaml
yunxing has joined #ocaml
mietek has joined #ocaml
yunxing has quit [Remote host closed the connection]
yunxing has joined #ocaml
nicoo has joined #ocaml
damason has quit [Ping timeout: 276 seconds]
teknozulu has quit [Ping timeout: 252 seconds]
yunxing has quit [Ping timeout: 250 seconds]
teknozulu has joined #ocaml
<pierpa> Silent night. All busy testing the new beta?
damason has joined #ocaml
teknozulu has quit [Ping timeout: 252 seconds]
keep_learning has joined #ocaml
teknozulu has joined #ocaml
keep_learning has quit [Quit: This computer has gone to sleep]
damason has quit [Ping timeout: 248 seconds]
damason has joined #ocaml
Algebr has joined #ocaml
Algebr is now known as Guest25370
keep_learning has joined #ocaml
kansi has joined #ocaml
Guest25370 has quit [Remote host closed the connection]
axiles has quit [Ping timeout: 250 seconds]
teknozulu has quit [Ping timeout: 252 seconds]
Maxdaman1us is now known as Maxdamantus
MercurialAlchemi has joined #ocaml
Algebr` has joined #ocaml
seangrove has quit [Ping timeout: 260 seconds]
seangrove has joined #ocaml
slicefd has joined #ocaml
seangrove has quit [Ping timeout: 246 seconds]
Haudegen has quit [Ping timeout: 248 seconds]
MercurialAlchemi has quit [Ping timeout: 252 seconds]
kushal has joined #ocaml
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 248 seconds]
seangrove has joined #ocaml
Haudegen has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 276 seconds]
yunxing has joined #ocaml
seangrove has quit [Remote host closed the connection]
seangrove has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBird_ has quit [Ping timeout: 276 seconds]
seangrove has quit [Ping timeout: 276 seconds]
yunxing has quit [Ping timeout: 250 seconds]
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
malc_ has joined #ocaml
ygrek has joined #ocaml
julien_t has joined #ocaml
seangrov` has joined #ocaml
butts_butts has joined #ocaml
<zozozo> or sleeping, some people do that sometime
<adrien> waste of precious time
freehck has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
julien_t has quit [Ping timeout: 260 seconds]
butts_butts has quit [Ping timeout: 252 seconds]
Simn has joined #ocaml
mcc has quit [Quit: Connection closed for inactivity]
antkong has quit [Quit: antkong]
kushal has quit [Read error: Connection reset by peer]
silver has joined #ocaml
Algebr` has quit [Ping timeout: 248 seconds]
octachron has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
ontologiae has joined #ocaml
seangrov` has quit [Ping timeout: 252 seconds]
keep_learning has quit [Read error: Connection reset by peer]
keep_learning has joined #ocaml
larhat has joined #ocaml
saurabhnanda has joined #ocaml
<saurabhnanda> is this a good place to ask random newbie questions?
<companion_cube> sure, go on
<saurabhnanda> what're the go-to libraries in OCaml for SQL/ORM and web-app programming?
<saurabhnanda> libraries or frameworks.
<companion_cube> there are libraries for various databases, but I don't known any ORM
<companion_cube> for web programming: ocsigen (large, comprehensive) or opium (small) or webmachine (for APIs?)
<companion_cube> I don't know all this very well, sadly; the only DB I use is sqlite
<saurabhnanda> wrt web-programming, which one would you recommend for someone coming from a Rails world?
<saurabhnanda> DB = Postgres, if that helps
<asdf12z_> opium, its based off rack from ruby
<companion_cube> I know there are postgres bindings, but can't help you further
<companion_cube> https://github.com/rizo/awesome-ocaml/ lists some DB libraries
<saurabhnanda> thanks
<keep_learning> Hello everyone
<keep_learning> I am trying to merge two Int Map
<keep_learning> but I am not able to under the function signature
<keep_learning> Could some one please tell me how to write the function.
saurabhnanda has left #ocaml [#ocaml]
<companion_cube> I don't know Core, but I suspect it's like the standard merge
<companion_cube> the idea is that your function `f` takes the key and the pair of values for this key in both maps
<companion_cube> if the key is present in both maps, you will get `Some v1, Some v2`
<keep_learning> The condition for merging is if there are two keys are same then their value should be merge (concatenate in my case)
<companion_cube> looks like you already did it
<keep_learning> companion_cube, Yes
<keep_learning> but I am getting error
cdidd has joined #ocaml
<companion_cube> if the key is only in one of the maps, you will get `Some v1, None` or `None, Some v2`
<companion_cube> what is the error?
julien_t has joined #ocaml
<rks`> keep_learning: you're not handling the cases where the key is only in one of the maps
<keep_learning> ~f:(fun k `Both:(x, y) ->
<keep_learning> Error: Syntax error: operator expected.
<keep_learning> rks`, Yes
<rks`> also if `Both:(...) is valid ocaml, you can paint me yellow
<rks`> (and call me dumbo)
<rks`> what you want is
Haudegen has quit [Ping timeout: 246 seconds]
<rks`> « fun k -> function `Both (x, y) -> ... | `Left x -> ... | `Right y -> ... »
<keep_learning> rks`, Thank you
<companion_cube> ah, interesting, they did change the signature
<keep_learning> I was not able to under `Both
MercurialAlchemi has joined #ocaml
<keep_learning> companion_cube, rks` Thank you
sepp2k has joined #ocaml
Mercuria1Alchemi has joined #ocaml
jwatzman|work has joined #ocaml
Algebr` has joined #ocaml
lobo has joined #ocaml
Haudegen has joined #ocaml
Kakadu has joined #ocaml
antkong has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 246 seconds]
darkf has quit [Ping timeout: 276 seconds]
darkf has joined #ocaml
kushal has joined #ocaml
kushal has quit [Read error: Connection reset by peer]
kushal has joined #ocaml
mmin has joined #ocaml
Algebr` has quit [Ping timeout: 246 seconds]
<mmin> I'm working on an implementation of finite maps using the format of the stdlib implementation as a reference. For some reason, ocaml thinks that there is a syntax error in the functor definition 'module Make (Ord : OrderedType) : RBT with type k = Ord.t', but I'm not sure what's wrong. The toplevel just complains about a 'syntax error' at the end of the line. Any thoughts?
darkf_ has joined #ocaml
<companion_cube> if it's in the .ml file, you need to actually define the function, with = struct .... end
darkf has quit [Ping timeout: 276 seconds]
<companion_cube> if it's in the .mli, I guess you must have some unfinished declaration earlier in the file
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
darkf_ has quit [Remote host closed the connection]
darkf_ has joined #ocaml
<mmin> That must be true. I was just checking that something wasn't wrong with the syntax. Thanks.
rand__ has joined #ocaml
darkf_ is now known as darkf
darkf has quit [Ping timeout: 276 seconds]
<keep_learning> When I am trying to evaluate the buffer I am getting Reference to undefined global `Core'
<keep_learning> When I am first evaluation the buffer then it says Error: Unbound module Core
<keep_learning> Then I am loading # #use "topfind";; and # #require "core";;
<keep_learning> when executing #require core, it loads couple of libraries but in the end Error: Reference to undefined global `Thread'
<keep_learning> Any idea how to solve this.
<companion_cube> #require "threads";; maybe?
<keep_learning> companion_cube, I am still getting Error: Reference to undefined global `Core'
<companion_cube> I'm not sure, but you might have t orequire threads, then require core
slicefd has quit [Ping timeout: 250 seconds]
<keep_learning> companion_cube, When I am first executing #require "threads";; and then #require "core";;
<keep_learning> Characters -1--1:
<keep_learning> #require "core";;
<keep_learning>
<keep_learning> Error: Reference to undefined global `Thread'
<keep_learning> Because of this, I am not able to use buffer to evaluate the function.
darkf has joined #ocaml
<companion_cube> erf, strange
<companion_cube> I don't know then :(
<keep_learning> companion_cube, No problem. Thank you for your help
<keep_learning> companion_cube, Should I go for utop in emacs ?
<companion_cube> I'm not a emacs user!
<companion_cube> but I do use utop, yes
_andre has joined #ocaml
julien_t has quit [Ping timeout: 260 seconds]
Algebr` has joined #ocaml
julien_t has joined #ocaml
dhil has joined #ocaml
lmaury has joined #ocaml
<larhat> keep_learning: #use "topfind";; #thread;;
<octachron> keep_learning, you need to enable threads with #thread;; before requiring core
<keep_learning> larhat, octachron Thank you.
Algebr` has quit [Ping timeout: 276 seconds]
<Nazral> with yojson, to check if a field is null or another json list is it fine to do let myfield = json |> member "myfield" in let is_null = function | null -> "nothing" | _ -> "something" ?
troydm has joined #ocaml
<Nazral> nevermind I solved my problem
ggole has joined #ocaml
julien_t has quit [Ping timeout: 248 seconds]
Algebr` has joined #ocaml
snhmib has joined #ocaml
Kakadu has quit [Quit: Page closed]
dhil has quit [Ping timeout: 260 seconds]
artart78 has joined #ocaml
dhil has joined #ocaml
pierpa has quit [Read error: Connection reset by peer]
Sorella has joined #ocaml
pierpa has joined #ocaml
orbifx has joined #ocaml
<orbifx> Is there a function for both min and max?
<ggole> Of a sequence?
Algebr` has quit [Ping timeout: 268 seconds]
<orbifx> Of an int
<orbifx> Or float
<ggole> Er, you want something like int -> int -> int * int?
Kakadu has joined #ocaml
pierpa has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
pierpa has joined #ocaml
Janni has joined #ocaml
freehck has quit [Remote host closed the connection]
malc_ has quit [Ping timeout: 248 seconds]
<Janni> Hello! I have a weird question: is there an easy way to "serialise" an object into a tuple? (I don't even want to start to explain why I'd need tihs)
<Drup> Please explain, it sounds very entertaining :D
<pierpa> sounds lascivious
<Drup> (you have something like {< foo : t ; bar : t >} and you want a (t * t) ? No easy wat
<Janni> OK, not even that hard... I'm using a web framework (Ocsigen, Eliom, etc) that can serialise tuples, but not handle objects.
<Drup> way*
<Drup> You will have to write the function yourself :/
<ggole> How do you know to reconstruct an object and not a tuple on the other end?
<Kakadu> .о нщсещ
<Kakadu> ooups
<Janni> ggole: Didn't think that far ahead :-)
<Janni> (I was just wondering whether an object and a tuple aren't essentially the same in OCaml)
<Janni> (for some definition of "essentially")
<ggole> They are very different, both in terms of typing and representation
<Drup> objects are full of closures
<Drup> that's why you can't serialize them
<ggole> Tuples have no hidden parts
<Janni> Alright. That answers my question. Thanks.
<ggole> So yeah, write it by hand or change to a record or something.
<Janni> I wanted to, but the framework can't handle records either.
<Drup> Hum ? It can
<Janni> Hmm. Well, yes. But the record would contain functions with RPC and stuff and the signatures are functional and... I didn't get it to work.
mmin has quit [Ping timeout: 276 seconds]
<Drup> Ok
<Drup> (tuples and record are mostly the same)
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
FreeBird_ has quit [Ping timeout: 244 seconds]
darkf_ has joined #ocaml
<orbifx> ggole: int -> int -> int
<orbifx> Where the resulting unt is a value within the two ints
<orbifx> I can write that but I like to resuse :-D
<lyxia> max?
* ggole tries to reconcile that with "both min and max" and fails
darkf has quit [Ping timeout: 276 seconds]
<Kakadu> orbifx: I was asked yesterday how far are my QtQuick bindings? what do you think ?
<orbifx> Kakadu: didn't get the message. Not timed them but a few hundred events a second?!
<orbifx> ggole: i want to cap my integer between a range.
<ggole> I see. That's usually called "clamp".
<companion_cube> fun a b -> a + Random.int (b-a) ?
<companion_cube> :D
<Kakadu> orbifx: I think it was about how powerful is current approach
<ggole> orbifx: eg, clamp 10 ~low:4 ~high:6 => 6, clamp 0 ~low:4 ~high:6 => 4?
tennix has quit [Ping timeout: 276 seconds]
rand__ has quit [Quit: leaving]
<orbifx> Thanks ggole :-D
<orbifx> Doesn't seem to be in prelude
<orbifx> So ill write it my self.
<orbifx> Any thoughts on using an if-else versus min-max approach?
darkf_ is now known as darkf
<mrvn> ggole: shouldn't 10 be last?
<ggole> Eh, you could write it that way
<ggole> I had in mind "clamp N to the range..."
<mrvn> none of the parameters are optional?
<ggole> No, why would they be?
<mrvn> maybe you only want to clamp to the top?
<ggole> That's just min
<mrvn> true
<mrvn> ggole: Maybe have a CLAMP functor that takes a module with low/high and outputs a module with all the arithmetic operators clamped?
<ggole> Interesting idea
Algebr` has joined #ocaml
<mrvn> orbifx: have you compared the asm output for both cases? Does it generate cmov for both or does it jump?
<mrvn> ggole: some days ago someone asked for overflow save arithmetic and this would be a more general form of it.
<ggole> Operations like clamp are usually in graphics code where you wouldn't need such general approaches
<mrvn> but you would often clamp to 0-255.
<ggole> If you are clamping to the unit interval, that's usually called saturate
<ggole> So you would use that specific operation
<ggole> (Which GPUs tend to support directly, iirc)
<orbifx> mrvn: i was asking about overflow handling.
hxegon has joined #ocaml
<octachron> clamped arithmetics sounds quite ill-defined: what is max_value - 1?
Haudegen has quit [Ping timeout: 250 seconds]
<mrvn> one less
mehdib has joined #ocaml
<octachron> so addition is not associative: i.e (max_value + k) - k = max_value - k ≠ max_value = max_value + ( k - k ) ?
malc_ has joined #ocaml
<mrvn> octachron: with saturating + it wouldn't.
<ggole> That's saturation for you.
malc_ has quit [Read error: Connection reset by peer]
malc_` has joined #ocaml
<octachron> does'nt that imply that for any arithmetic expression x → f(x) , you have an x-dependant optimal ordering of operations leading to a least saturated output?
<mrvn> that would be f(a,b,c,d,e,f,g,h) where every single value matters potentially.
lmaury has left #ocaml ["Leaving"]
<mrvn> you can also not saturate temporaries.
<mrvn> e.g. in c++ you would define ( + ) : sat_int -> sat_int -> tmp_int and ( = ) : tmp_int -> sat_int
hxegon is now known as hxegon_AFK
<octachron> mrvn, using temporaries is more or less equivalent to doing all computation in linear space and then projecting to your non-linear space, isn'it?
<mrvn> if you want to go all theoreticall on me
Algebr` has quit [Ping timeout: 240 seconds]
hxegon has joined #ocaml
Janni has quit [Quit: Leaving]
hxegon_AFK has quit [Ping timeout: 240 seconds]
<theblatte> do people here have opinions on which unit test framework is The Best? eg ounit vs ppx_inline_test? (vs alcotest?)
Haudegen has joined #ocaml
<Drup> ounit ⊂ alcotest
<Drup> so, there is that
octachron has quit [Ping timeout: 250 seconds]
<theblatte> Drup: so do you write your tests in the same style in both ounit and alcotest?
<malc_`> i just did a résümȩ̊́́́̆ thing for real (cf. http://www.xkcd.com/1647/) but ⊂ is stretching it
<theblatte> also, is ppx_inline_test tied to jenga, as it seems to be?
hxegon has quit [Quit: BRB]
<theblatte> ⊂++
<Drup> There are other equivalent inline testing framework, and companion_cube will be happy to tell you everything about them
sh0t has joined #ocaml
<malc_`> theblatte: sneaky
<Drup> malc_`: ಠ_ಠ
<malc_`> ﷽
<theblatte> ok now it's just squares :|
<malc_`> theblatte: your IRC client and/or terminal emulator is not up to snuff that's all
<theblatte> Drup: thx ^^
<Drup> Do you even utf8 ؟
<malc_`> or maybe your font selection is lacking
<theblatte> malc_`: more likely to be my font
<theblatte> I see some of these, but not all
<Drup> For linux people, deja vu combines good lisibility and large utf8 support
<Drup> (and open sourceness)
<theblatte> XTerm*faceName: xft:DejaVu Sans Mono for Powerline-10:antialias=true:hinting=true
<theblatte> yes but no it seems
<Drup> The issue might be xterm itself
<malc_`> Drup: there's no proper shaping in xterm
<malc_`> so basically one gets a half arsed support for CJK and that's the end of unicode in xterm
octachron has joined #ocaml
antkong has quit [Quit: antkong]
tennix has joined #ocaml
hxegon has joined #ocaml
malc_` has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
julien_t has joined #ocaml
kushal has quit [Quit: Leaving]
hxegon is now known as hxegon_AFK
scrabcakes has joined #ocaml
octachron has quit [Ping timeout: 264 seconds]
hxegon_AFK is now known as hxegon
<scrabcakes> are there any more detailed compiling debuggers available other than the ocaml default?
copy` has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 248 seconds]
<companion_cube> theblatte: about testing, I use qtest, for it allows to write {unit,random} tests near to the code
MercurialAlchemi has joined #ocaml
Algebr` has joined #ocaml
Algebr` has quit [Ping timeout: 264 seconds]
hcarty has joined #ocaml
sh0t has quit [Ping timeout: 268 seconds]
jeffmo has joined #ocaml
shinnya has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 276 seconds]
seangrove has joined #ocaml
lobo has quit [Quit: WeeChat 1.4]
tane has joined #ocaml
_whitelogger has quit [Ping timeout: 264 seconds]
igitoor has quit [Ping timeout: 264 seconds]
_whitelogger_ has joined #ocaml
mattg has joined #ocaml
yminsky_ is now known as yminsky
mal`` has joined #ocaml
Leonidas_ is now known as Leonidas
sfri has joined #ocaml
igitoor_ has quit [Changing host]
igitoor_ has joined #ocaml
orbifx has quit [Quit: AtomicIRC: The nuclear option.]
igitoor_ is now known as igitoor
emmanueloga has joined #ocaml
parataxis has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
scrabcakes has quit [Quit: leaving]
rom1504_ is now known as rom1504
hcarty1 has joined #ocaml
kushal has joined #ocaml
MercurialAlchemi has joined #ocaml
hcarty has quit [Ping timeout: 276 seconds]
sh0t has joined #ocaml
Algebr` has joined #ocaml
pierpa has quit [Ping timeout: 276 seconds]
Kakadu has quit [Quit: Page closed]
Algebr` has quit [Ping timeout: 260 seconds]
<theblatte> companion_cube: thanks!
_whitelogger_ has quit [Excess Flood]
_whitelogger has joined #ocaml
slash^ has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
yunxing has joined #ocaml
darkf has quit [Quit: Leaving]
malc_ has joined #ocaml
kdas_ has joined #ocaml
regnat_ has quit [Ping timeout: 276 seconds]
kushal has quit [Disconnected by services]
kdas_ is now known as kushal
kushal has quit [Changing host]
kushal has joined #ocaml
mmin has joined #ocaml
Algebr` has joined #ocaml
axiles has joined #ocaml
ggole has quit []
yunxing has quit [Ping timeout: 250 seconds]
octachron has joined #ocaml
julien_t has quit [Ping timeout: 260 seconds]
pflanze has quit [Remote host closed the connection]
yunxing has joined #ocaml
Algebr` has quit [Remote host closed the connection]
mmin has quit [Ping timeout: 264 seconds]
Sorella has quit [Ping timeout: 260 seconds]
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ocaml
Sorella has joined #ocaml
douglascorrea has joined #ocaml
yunxing has quit [Remote host closed the connection]
kamog has joined #ocaml
thebinary has joined #ocaml
AlexRussia has quit [Ping timeout: 260 seconds]
Kakadu has joined #ocaml
AlexRussia has joined #ocaml
Haudegen has quit [Ping timeout: 248 seconds]
douglascorrea has quit [Remote host closed the connection]
douglascorrea has joined #ocaml
dhil has quit [Ping timeout: 264 seconds]
yunxing_ has joined #ocaml
kushal has quit [Quit: Leaving]
kansi has quit [Read error: Connection reset by peer]
hxegon has quit [Ping timeout: 244 seconds]
sepp2k has quit [Quit: Leaving.]
hxegon has joined #ocaml
ygrek has joined #ocaml
butts_butts has joined #ocaml
Haudegen has joined #ocaml
kushal has joined #ocaml
thebinary has quit [Read error: Connection reset by peer]
kamog has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<keep_learning> Hello everyone
<keep_learning> I am trying to use utop in emacs
<keep_learning> I am launching utop using M-x utop
<keep_learning> but when I am trying to evaluate my buffer (C-c C-b) then it is asking me start
octachron has quit [Quit: Leaving]
<keep_learning> /usr/local/bin/opam config exec -- ocaml
kushal has quit [Quit: Leaving]
<keep_learning> is there any way to send the buffer content to already running utop
<keep_learning> every time I change the buffer
<keep_learning> I am running #use "filename.ml";; in utop buffer
<keep_learning> is there any key binding for this or how to create one ?
<flux> hmm, where does M-x utop come from?
<flux> oh, probably comes with utop :)
<flux> keep_learning, I guess you may need to do your own bindings
<flux> keep_learning, there seems to be a bunch of utop-* functions available
<flux> utop.el doesn't mention the word 'bind' and only defines one keymap for the utop buffer, so it seems that's the way to go
<keep_learning> flux, even when I am changing the command from "opam config exec -- ocaml" to "opam config exec -- utop -emacs"
<keep_learning> then I am getting Process ocaml-toplevel exited abnormally with code 1
<flux> keep_learning, I don't think that's a good idea, because it runs tuareg-eval-buffer
<flux> and tuareg-eval-buffer probably doesn't know anything about how to deal with utop
<flux> so instead you should bind ^X ^B to utop-eval-buffer
<keep_learning> flux, Thank you
butts_butts_ has joined #ocaml
butts_butts has quit [Ping timeout: 268 seconds]
chindy has joined #ocaml
<chindy> why doesn't that worklet maybe_rect = function Circle _ -> None | Rect r -> Some r
<flux> because the value 'r' cannot be referred to
<flux> or, perhaps more precisely, its type cannot be
<flux> I think the technical reason is that Rect of { .. } is represented in the memory differently from Rect of record. in the former case, the record is inline in the sum type.
<flux> and let's say you could return the "r" from the function, I mean why not, the compiler knows its type?
<flux> then the problem becomes that happens when you have uniform representation for values and this value doesn't follow it. I think :).
<flux> I understand it's sort of a special case how the code under Rect r -> xxx can access the fields of r that are actually in the sum type
struk|work has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
julien_t has joined #ocaml
<j0sh> how does one invoke ppx_core? my (ocamlbuild) command is failing at link time, says 'no implementations provided for the following modules: Ppx_core ...'
<j0sh> Drup: arr, okay
<j0sh> Drup: which tags file do i need to edit? the one for ppx_core, or my own?
nuuit has quit [Ping timeout: 276 seconds]
<j0sh> (and are we supposed to edit ocamlbuild generated tags?)
<Drup> your own
<Drup> It's fine to edit the oasis generated _tags, just edit before/after the generated stuff (there is a comment)
<j0sh> ah okay, cool
mxv has joined #ocaml
Algebr has joined #ocaml
julien_t has quit [Ping timeout: 250 seconds]
<j0sh> Drup: still getting the same error after editing _tags with the right incantation. also ran oasis setup, make clean, rm setup.data, etc
<j0sh> Warning: tag "predicate" does not expect a parameter, but is used with parameter "ppx_driver"
julien_t has joined #ocaml
<Drup> Which version of ocaml are you supporting ?
<Drup> Well, it must be >= 4.0
<Drup> 4.02*
<Drup> Add the constraint in your oasis file
<j0sh> i'm on 4.02.3, but let me try that
Anarchos has joined #ocaml
<Anarchos> I try to compile a 4.03.0+dev12-2015-11-20 version of the compiler, but it complains about caml_runtime_parameters not available
jgjl has joined #ocaml
<adrien> Anarchos: try the RC maybe
<adrien> and
<adrien> STOP TRYING TO BUILD RANDOM DEV SNAPSHOTS ALL THE TIME!
<Drup> ^ this
<flux> git has bisect for finding versions that compile :)
<j0sh> Drup: still no luck, sigh... the error with tags is gone, but the Ppx_core error is still there. giving up for now
<Drup> I would have to look
<Drup> (at the whole project, I mean)
<Anarchos> adrien i know this version already compiled fine for me
<Anarchos> adrien it is really difficult to find the good combination of ocaml/merlin and all the dependences that compile fine
<Drup> No it isn't, don't use dev version.
<Drup> (And use opam)
<Anarchos> opam did'nt compile at me
<Drup> <*/*.{native,byte}>: predicate(ppx_driver)
<Drup> that's the correct thing
<Drup> Oh, it's wrong in diml's answer
<Drup> :/
nuuit has joined #ocaml
<j0sh> Drup: ah, yeah that did the trick. and yeah damn, this is a lot of "moving parts"
<Drup> Yeah, ppx_core is far too complicated for its own good
<j0sh> is there an easier (or more straightforward) way to fold over the ast?
<flux> wow, so many packages have dependency < 4.03
groovy2shoes has joined #ocaml
<Drup> j0sh: I meant the setup part
<Drup> the rest is fine
chindy has quit [Remote host closed the connection]
iosys has quit [Ping timeout: 260 seconds]
_andre has quit [Quit: leaving]
jgjl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iosys has joined #ocaml
<struk|work> is there a 4.03 version of https://try.ocamlpro.com/ yet?
<Drup> if you want a webtoplevel, jsoo_mktop
* Anarchos needs to add LC_CTYPE=C to compile a 4.02.2
copy` has quit [Quit: Connection closed for inactivity]
<asdf12z_> 4.03 is released??
<Drup> No
<flux> 4.03.0+beta1 is released
DanielRichman has quit [Remote host closed the connection]
DanielRichman has joined #ocaml
foolishmonkey has joined #ocaml
yunxing_ has quit [Remote host closed the connection]
yunxing has joined #ocaml
yunxing has quit [Ping timeout: 244 seconds]
douglasc_ has joined #ocaml
yunxing has joined #ocaml
douglascorrea has quit [Ping timeout: 252 seconds]
douglasc_ is now known as douglascorrea
Algebr` has joined #ocaml
Algebr has quit [Remote host closed the connection]
copy` has joined #ocaml
<struk|work> Drup: I just wanted to play around with inline records w/o having to opam switch
keep_learning has quit [Quit: This computer has gone to sleep]
julien_t has quit [Ping timeout: 244 seconds]
larhat has quit [Ping timeout: 248 seconds]
butts_butts_ has quit [Ping timeout: 268 seconds]
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
jeffmo has quit [Quit: jeffmo]
butts_butts has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 264 seconds]
<yunxing> Noob questoin: when I type ocamlopt -c test.ml, does it look at both test.mli and test.cmi?
tane has quit [Ping timeout: 244 seconds]
aantron has joined #ocaml
hcarty1 has quit [Ping timeout: 248 seconds]
tane has joined #ocaml
hcarty1 has joined #ocaml
larhat has joined #ocaml
lobo has joined #ocaml
bbc has quit [Read error: Connection reset by peer]
bbc_ has joined #ocaml
bbc_ is now known as bbc
hcarty1 has quit [Ping timeout: 240 seconds]
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
lobo has quit [Quit: leaving]
xaimus_ is now known as xaimus
jeffmo has joined #ocaml
butts_butts has quit [Ping timeout: 240 seconds]
hxegon has quit [Ping timeout: 244 seconds]
ousado has quit [Ping timeout: 260 seconds]
sh0t has quit [Ping timeout: 250 seconds]
ousado has joined #ocaml
Sim_n has joined #ocaml
mxv has quit [Ping timeout: 240 seconds]
aantron has quit [Remote host closed the connection]
Simn has quit [Ping timeout: 246 seconds]
tane has quit [Quit: Verlassend]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
sh0t has joined #ocaml
pierpa has joined #ocaml