<cg>
could anyone direct towards some resources for using menhir w/ oasis?
hcarty has quit [Ping timeout: 250 seconds]
<cg>
specifically I've run `opam install menhir`, and declared "BuildDepends: Menhir" in _oasis, but I'm getting this error message: "ocamlfind: Package `Menhir' not found"
<cg>
ah, it's MenhirLib, not Menhir
mort___ has quit [Quit: Leaving.]
kakadu has quit [Remote host closed the connection]
lokien_ has quit [Quit: Connection closed for inactivity]
copy` has quit [Quit: Connection closed for inactivity]
cg has joined #ocaml
cg has quit [Client Quit]
<pierpa>
'compare' functions are expected to return -1, 0, 1, OR negative, 0, positive?
ygrek_ has joined #ocaml
f[x] has quit [Ping timeout: 240 seconds]
psy has quit [Read error: No route to host]
<def`>
negative, 0, positive
ygrek_ has quit [Ping timeout: 240 seconds]
<pierpa>
ok. Thank you!
hunteriam has joined #ocaml
neferty has quit [Read error: Connection reset by peer]
lokien_ has joined #ocaml
antkong_ has quit [Quit: antkong_]
pierpa has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
lostman_ has quit [Quit: Connection closed for inactivity]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
ggole has joined #ocaml
struk|desk|away is now known as struk|desk2
JacobEdelman has quit [Quit: Connection closed for inactivity]
Algebr` has joined #ocaml
kansi has joined #ocaml
darkf has joined #ocaml
ggole has quit [Ping timeout: 264 seconds]
ggole has joined #ocaml
<Algebr`>
How can I control the logging level with add_rule? right now just using add_rule "*" but not sure what else could be used as input string, not sure why its not a variant.
MercurialAlchemi has joined #ocaml
Mercuria1Alchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
<aantron>
you can add strings of the form "section -> level"
<aantron>
well i guess thats the environment variable. its been a while
<aantron>
add_rule does take the log level as a variant..
govg has quit [Ping timeout: 240 seconds]
govg has joined #ocaml
ygrek_ has joined #ocaml
Simn has joined #ocaml
lokien_ has quit [Quit: Connection closed for inactivity]
raphaelss has quit [Ping timeout: 256 seconds]
<Algebr`>
I mean what is the meaning of the string value for add_rule
<nullcatxxx_>
"Section levels are initialised using the contents of the LWT_LOG environment variable, which must contain one or more rules of the form pattern -> level separated by ";". Where pattern is a string that may contain *."
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 265 seconds]
<Algebr`>
so what is an example other than the one I'm using of just "*"
govg has quit [Ping timeout: 250 seconds]
darkf_ has quit [Ping timeout: 240 seconds]
darkf has joined #ocaml
struk|desk2 is now known as struk|desk|away
darkf has quit [Ping timeout: 260 seconds]
antkong has joined #ocaml
<Algebr`>
does opam support svn?
<Algebr`>
ah, still not apparently still no appare
<companion_cube>
type 'a foo = < x: bar; ..> as 'a
<companion_cube>
or you could use a class
<tobiasBora>
The "Question 2" works only if fibo contains only one argument
<tobiasBora>
And "Question 3" shows how I can break it if fibo has more than one method
<tobiasBora>
(/s/argument/method)
<tobiasBora>
companion_cube: I'm trying !
Haudegen has quit [Remote host closed the connection]
<tobiasBora>
companion_cube: I tried something like :
<tobiasBora>
module type T = sig
<tobiasBora>
val c : <compute : int -> int, ..>
<tobiasBora>
end
<tobiasBora>
And I got this error :
<tobiasBora>
Error: This 'sig' might be unmatched
dave23 has quit [Ping timeout: 256 seconds]
<companion_cube>
it's a ; not a ,
<tobiasBora>
How indeed thank you
<tobiasBora>
companion_cube: But now I cannot do :
<tobiasBora>
inherit M.c as poisson_rouge
<tobiasBora>
Because it doesn't see that c is a class
<companion_cube>
expose a class then
<tobiasBora>
companion_cube: The problem is that I don't know how to write a partial class
<ggole>
What do you mean, partial?
<mspo>
you mean like an interface?
<tobiasBora>
ggole: I mean something like :
<mspo>
(in java)
<tobiasBora>
class c : object
<tobiasBora>
method compute : int -> int
<tobiasBora>
<...>
<tobiasBora>
end
<ggole>
A class type?
<tobiasBora>
To say "I want this class has at least compute"
<companion_cube>
well isn't it just a class with compute?
<tobiasBora>
ggole: Maybe...
<ggole>
class type foo = object val compute : int -> int end
<tobiasBora>
companion_cube: The problem is that when the class I send to my functor has more functions that just compute, it just says "Sorry, You give me too many methods, I just want compute"
<ggole>
You might need to cast, since there is no implicit subtyping
<companion_cube>
^
<tobiasBora>
ggole: I first though that your solution would work, but in fact it doesnt. I'll try cast now !
manizzle has quit [Ping timeout: 260 seconds]
<def`>
tobiasBora: could you tell what you are tryoing to achieve?
tane has quit [Quit: Verlassend]
<def`>
the high-level view, so that we have some freedom to find an encoding
Algebr` has quit [Ping timeout: 240 seconds]
lokien_ has joined #ocaml
<tobiasBora>
def`: I have (like you can find it in the pastebin http://pastebin.com/1kt2R3Aq) several objects, that all contains a method compute. However, since this function may be stupid, and doesn't provide mnemoisation, (see the example with fibonacci above) I want to create a functor that modify the compute method, and change it into a clever method that provide mnemoisation (see Question 2, where it works)
<tobiasBora>
However my problem is that when an object doesn't have only one method (with name compute), but several (for example, see fibo_sushis), I have a runtime error saying :
<tobiasBora>
Class declarations do not match: class c : fibo_sushis does not match class c : object method compute : int -> int end
<tobiasBora>
The public method say cannot be hidden
<tobiasBora>
ggole: I tried the cast, but I doesn't see what I should cast, since here, it's not an object that I want to cast, but it's a class...
manizzle has joined #ocaml
manizzle has quit [Max SendQ exceeded]
manizzle has joined #ocaml
<def`>
tobiasBora: if you want the same object to compute and memoize you have to inherit
<def`>
either memoization in base class and compute in child
<def`>
or something more complete with (virtual) multiple inheritance
<def`>
complexe* if you want to keep each feature separate
<tobiasBora>
def`: Hum I see... I will try to implement it with only class/objects, but is it possible to do it with functor, as I tried to do before ?
orbifx has joined #ocaml
vladb has quit [Quit: Leaving]
jeffmo has joined #ocaml
<aantron>
Algebr: you use multiple log sections (categories) like "sql", "sql.write", "sql.read", "request", etc. then you use add_rule to, e.g., set "sql*" to level debug, or "request" to level warning
<def`>
tobiasBora: I am afraid not. with functor you can do a second object which could serve as a "memoizer" for the previous one
<def`>
the problem is that you can't freely extend classes
<sspi>
Drup: I've been looking into set_cookie, however it only seems to support Parsetree.expression as a value - I wonder why that is?
Haudegen has joined #ocaml
<sspi>
mostly because I'm working with Parsetree.structure
Haudegen has quit [Ping timeout: 250 seconds]
<Drup>
hum, actually, maybe the context is already unpacked for you, I don't remember
<octachron>
nullcatxxx_, nice to see your PR merged. One more PR and I might be able to send my ppx_listlike extensions to retirement.
<nullcatxxx_>
nice
<Drup>
octachron: Do you want me to try a simpler version of the custom operator PR ? :D
<Drup>
operator constructors*
ryanartecona has joined #ocaml
kakadu has joined #ocaml
<hcarty>
octachron: Which PR is required, out of curiosity?
<octachron>
hcarty, the local open in pattern one
<octachron>
Drup, I would wait a bit longer before trying again :D
kushal has quit [Ping timeout: 260 seconds]
<octachron>
hcarty, I like to have exotic list types from time to time, but having them appears unqualified by a module is a little too nasty; even for my taste
govg has quit [Ping timeout: 264 seconds]
<hcarty>
On the plus side, it sounds like 4.04 will come relatively quickly after 4.03
kushal has joined #ocaml
<octachron>
I agree that having more regular and shorter release cycle would be nice.
Haudegen has quit [Ping timeout: 240 seconds]
<octachron>
But implementing such plan is not necessarily easy
kushal has quit [Read error: Connection reset by peer]
kushal has joined #ocaml
<octachron>
nullcatxxx_, by the way, there was no change in the manual on your PR, have you checked that the manual description is fine?
govg has joined #ocaml
Algebr` has quit [Remote host closed the connection]
ygrek_ has joined #ocaml
<nullcatxxx_>
....
<nullcatxxx_>
i don't know which part I should change
<octachron>
since, it is a small update, I would say the language reference part rather than the exception part
<octachron>
exception → extension
<octachron>
so maybe the "constr-decl" gramar rule in manual/manual/typedecl.etex if you want to have a look