gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
hyperboreean has quit [Ping timeout: 246 seconds]
hyperboreean has joined #ocaml
<dooode> why is this a syntax error? let string name = name let class_name = string let variable = Vars of class_name
<thelema> class_name isn't a type
<thelema> and 'let' isn't appropriate for defining a new type
arubin has joined #ocaml
<dooode> how do i make class_name a type
<dooode> my function set looks like this: type symbol_table = (class_name * class_name * variable list * method_info list) list and method_info = (method_name * variable list) and variable = Field of class_name * exp_type * string | Argument of exp_type * string | MethodVar of exp_type * string and class_name = string and method_name = string
<dooode> man i have no clue what i am doig
lamawithonel has quit [Remote host closed the connection]
ski has quit [Ping timeout: 264 seconds]
ski has joined #ocaml
<thelema> type class_name = string -> string
<thelema> type variable = Vars of class_name
<thelema> but I don't know if that's what you want
<thelema> type class_name = string
* thelema rereads
<thelema> type symbol_table = (string * string * variable list * method_info list) list
<thelema> and method_info = string * variable list
<thelema> and variable =
<thelema> Field of string * exp_type * string
<thelema> | Argument of exp_type * string
<thelema> | MethodVar of exp_type * string
<thelema> and exp_type = int
cyanure has quit [Remote host closed the connection]
<dooode> nvm i got this
myu2 has joined #ocaml
<spicey> I've seen used an apostrophe construction, e.g `Something - what does it do? I can't seem to find it in the manual, and its signature doesn't help at all
<spicey> That is, `Something;; gives to me [> Something ] = `Something and I remain none the wiser
<dooode> why doesn' this work? # type class_name = string let returnClassName name = class_name(name);;
<dooode> nvm
zirhc has joined #ocaml
mfp has quit [Ping timeout: 276 seconds]
<thelema> dooode: polymorphic variants use `
mfp has joined #ocaml
elehack has joined #ocaml
zirhc has quit [Remote host closed the connection]
<dooode> type class_name = string i want a function to return type class_name given a string input
elehack has quit [Ping timeout: 245 seconds]
elehack has joined #ocaml
tautologico has joined #ocaml
pmangg has quit [Ping timeout: 240 seconds]
<thelema> dooode: let to_class_name : string -> class_name = fun x -> x
<thelema> dooode: but class_name is identical to string, so strings are accepted anywhere class_names are. If you want to keep them distinct types, you'll need more:
tautologico is now known as andreiformiga
<thelema> the best trick is: module type AbstractString = sig type t val to_string : t -> string val of_string : string -> t end
<thelema> module StrIdent = struct type t = string let to_string x = x let of_string x = x end
<thelema> these two definitions allow you to make as many string-identical types that aren't strings as you like
<thelema> module Class_Name : AbstractString = StrIdent
<thelema> module Method_Name : AbstractString = StrIdent
pmangg has joined #ocaml
elehack has quit [Ping timeout: 276 seconds]
Amorphous has quit [Ping timeout: 272 seconds]
Amorphous has joined #ocaml
Associat0r has quit [Quit: Associat0r]
Modius has quit [Quit: "Object-oriented design" is an oxymoron]
pmangg has quit [Ping timeout: 272 seconds]
ounit has quit [Ping timeout: 250 seconds]
pmangg has joined #ocaml
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
dgfitch has quit [Quit: Lost terminal]
dgfitch has joined #ocaml
<dooode> 1 hour to finish assignment
<dooode> fack
ski has quit [Ping timeout: 264 seconds]
ski has joined #ocaml
lamawithonel has joined #ocaml
<dooode> quick
<dooode> i only have 7 minutes
<dooode> if i have a function that returns a list
<dooode> how do i just get he last element of that list
<dooode> let fun a = otherfun a b where other fun returns a list
ulfdoz has joined #ocaml
pmangg has quit [Ping timeout: 255 seconds]
andreiformiga has quit [Quit: andreiformiga]
<dooode> damnit
<dooode> missed the deadline
<dooode> for 5 hours i would saying learning ocaml syntax and doing about 80% of the assignment is pretty good for only 5 hours of work
arubin has quit [Quit: arubin]
ttamttam has joined #ocaml
alpounet has quit [Quit: Bye.]
alpounet has joined #ocaml
ulfdoz has quit [Ping timeout: 255 seconds]
tnguyen has joined #ocaml
ski has quit [Ping timeout: 264 seconds]
ski has joined #ocaml
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
myu2 has quit [Remote host closed the connection]
Snark_ has joined #ocaml
ygrek has joined #ocaml
Yoric has joined #ocaml
ttamttam has quit [Remote host closed the connection]
eye-scuzzy has quit [Read error: Operation timed out]
ftrvxmtrx has quit [Ping timeout: 276 seconds]
eye-scuzzy has joined #ocaml
Yoric has quit [Quit: Yoric]
ygrek has quit [Remote host closed the connection]
eye-scuzzy has quit [Quit: leaving]
mike_mcclurg has joined #ocaml
eye-scuzzy has joined #ocaml
dooode has quit [Quit: Page closed]
ygrek has joined #ocaml
myu2 has joined #ocaml
ikaros has joined #ocaml
tnguyen has quit [Remote host closed the connection]
edwin has joined #ocaml
seafood has joined #ocaml
Yoric has joined #ocaml
pattern has joined #ocaml
ygrek has quit [Remote host closed the connection]
seafood has quit [Ping timeout: 240 seconds]
ski has quit [Ping timeout: 264 seconds]
ski_ has joined #ocaml
kaustuv_ has left #ocaml []
ikaros has quit [Quit: Leave the magic to Houdini]
ski_ has quit [Read error: Connection reset by peer]
ski has joined #ocaml
ski has quit [Ping timeout: 264 seconds]
ski has joined #ocaml
ski_ has joined #ocaml
ski has quit [Ping timeout: 264 seconds]
_andre has joined #ocaml
avsm has joined #ocaml
ski_ is now known as ski
<thomasga> gildor: is oasis-db ready to use ? :-)
ski__ has joined #ocaml
ski has quit [Ping timeout: 264 seconds]
ski__ is now known as ski
cyanure has joined #ocaml
ski has quit [Ping timeout: 264 seconds]
ski has joined #ocaml
oriba has joined #ocaml
ftrvxmtrx has joined #ocaml
cyanure has quit [Quit: Quitte]
myu2 has quit [Remote host closed the connection]
yezariaely has joined #ocaml
jm has joined #ocaml
myu2 has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
Yoric has joined #ocaml
ski has quit [Read error: Connection reset by peer]
ski has joined #ocaml
myu2 has quit [Remote host closed the connection]
ski has quit [Ping timeout: 264 seconds]
ski has joined #ocaml
<kaustuv> Is Batteries intended to be compatible with OCaml < 3.12?
ttamttam has joined #ocaml
Snark_ is now known as Snark
fraggle_ has quit [Quit: -ENOBRAIN]
ski has quit [Ping timeout: 264 seconds]
ski has joined #ocaml
hto_ has joined #ocaml
hto__ has joined #ocaml
hto__ has quit [Client Quit]
hto_ has quit [Client Quit]
Yoric has quit [Read error: Connection reset by peer]
Yoric has joined #ocaml
ski has quit [Ping timeout: 264 seconds]
ski has joined #ocaml
yezariaely has quit [Quit: Leaving.]
ikaros has joined #ocaml
fraggle_ has joined #ocaml
myu2 has joined #ocaml
ymasory has joined #ocaml
accel has joined #ocaml
<accel> not trolling -- just learning both ocaml & haskell: what is the ocaml solution to this problem: http://en.wikibooks.org/wiki/Haskell/GADT ?
<thelema> accel: objects or more code
<thelema> err... wrong answer
<accel> thelema: hmm, how do you detect the Bool + Int error
<accel> statically?
<thelema> many gadts can be encoded in ocaml
<thelema> something new in 3.12 allows this, iirc
pmangg has joined #ocaml
<accel> hmm
<accel> another dumb question: for similar in power as Haskell typeclasses,
<accel> should I go with (1) modules + functors or (2) objects ?
<thelema> ah yea, this was it: https://sites.google.com/site/ocamlgadt/
elehack has joined #ocaml
<thelema> although iirc, there was something else in 3.12 too...
<thelema> as for typeclasses, option (3) is brute force, which seems to work well enough
<accel> thelema: what do you mean by brute force?
* accel reads up on ocamlgadt
<thelema> hmm, how can I link to an ocaml mailing list post...
<thelema> google doesn't find it
<elehack> thelema: try gmane
<thelema> elehack: thanks, I'll try that next time
<thelema> accel: brute force is separate functions for each type and calling the right one manually. i.e. String.print, Int.print, Int32.print, Char.print, etc
<accel> thelema: that looks ugly
<accel> thelema: if I try to do typeclasses in ocaml with objects, are they dispatched statically or dynamically ?
<thelema> ocaml objects are always dispatched dynamically, although this isn't always too expensive
<thelema> it's optimized pretty well, but still isn't quite as cheap as a function call
<thelema> ah, that's what was in 3.12 - fully polymorphic functions. not quite gadts, but a necessary step to get there
elehack has quit [Ping timeout: 255 seconds]
elehack has joined #ocaml
mnabil has joined #ocaml
npouillard has quit [Ping timeout: 260 seconds]
gmarik has joined #ocaml
npouillard has joined #ocaml
elehack has quit [Quit: Farewell, programs.]
accel has quit [Quit: leaving]
ftrvxmtrx has quit [Read error: Connection reset by peer]
<thelema> s/fuly polymorphic functions/polymorphic recursion/
<flux> well, it was possible to work around those with recursive modules earlier
<flux> how about first class polymorphic functions without records?
<thelema> yes, that too. explicit polymorphic types
<flux> those work with 3.12?
<flux> next up, automatic inferring of such functions.. ;)
<thelema> yes, 3.12 has explicit polymorphic types. automatic inference of them seems... troublesome
lamawithonel has quit [Ping timeout: 255 seconds]
ikaros has quit [Ping timeout: 272 seconds]
ftrvxmtrx has joined #ocaml
<mrvn> I would like for the compiler to learn about poly-monomorphic functions. The compiler already has some hacks intern for Array.set/get for basic types. Would be nice to add that to the language in some way.
<thelema> poly-monomorphic functions?
<mrvn> Maybe something like let get a i = (a.[i] : 'a constraint 'a = int | char | 'b)
pmangg has quit [Ping timeout: 240 seconds]
<thelema> meaning that you'd compile three versions of get
<mrvn> thelema: A polymorphic function with special monomorphic optimized versions.
<thelema> got it.
<mrvn> yep.
<thelema> that would be convenient
ccasin has joined #ocaml
<mrvn> I hate having to specify get, get_int and get_char so the later two aren't dead slow.
ymasory has quit [Remote host closed the connection]
<mrvn> even better would be the same for types. For example a bit array could use actual bits.
<mrvn> bool array even
pattern has left #ocaml []
<flux> it seems doubtful to me that such an optimization would be worth the effort :)
<flux> (bool arrays at bitfields that is)
<mrvn> depends on the size.
<mrvn> And it is a factor 64 smaller on 64bit cpus.
mdmkolbe has joined #ocaml
<mrvn> Functors might want different representation and functions depending on their input types.
<flux> I mean, how often do people use bool arrays
<flux> so it only affects a small amount of applications
<flux> and even then, when is it performance critical
<flux> in addition it would affect memory representation and that way c libraries
<mrvn> flux: yes. majorly. But float arrays already do that too.
<flux> well, I've heard of float-intensive applications. but bool-intensive applications are quite a bit more rare!
<flux> ;)
* f[x] smells c++
<flux> std::vector<bool> was bad for many other reasons, not sure if any(?) of them apply for a similar ocaml optimization
* f[x] means complexity
<mrvn> flux: Think about Hashtbl. An int * 'a hash table could optimize for that.
<mrvn> or set
<flux> mrvn, could optimize for bool arrays, hm?
<npouillard> Was "module type of" the only 3.12 feature that was not supported by camlp4?
<mrvn> No, for having a int * 'b and 'a * 'b flavour.
<mrvn> Anyway, I can't think of a syntax to specify optimized repersentations of a polymorphic type. Lets wish for the function optimization first.
<mrvn> That would cover 99% of cases probably anyway.
ikaros has joined #ocaml
<gildor> thomasga: the prototype online works with some quirks but doesn't yet offer all the oasis-db stuff that should come
Associat0r has joined #ocaml
<gildor> thomasga: http://oasis.ocamlcore.org/dev/home AFAIR
<gildor> thomasga: I am working on the CLI interface right now
<gildor> (but nothing is published)
<mdmkolbe> I'm working with a co-author on a parser paper and we would like to use o'caml as an example langauge. (1) How accurate is the grammar given in the manual? (2) Is there a good subset of o'caml we should target if we don't go for the whole language?
<thomasga> thx gildor, I will wait for the CLI then :-)
<thomasga> mdmkolbe: I think the grammar in the manual is quite precise
<thomasga> if not, it's a bug
<mdmkolbe> thomasga: ok, my co-author lead me to believe there were traps there. I guess I'll have to see for myself.
<thelema> mdmkolbe: you're going to write a parser for ocaml? if so, the actual grammar is implemented in ocamllex and yac, it's not too hard to read
<mdmkolbe> thelema: yeah, the paper is on better error messages for parse errors
<thelema> mdmkolbe: if you're serious about this, there will be details not explained too fully in the manual grammar but implemented in the actual grammar
<mdmkolbe> thelema: this would be in the parsing/parser.mly file?
<thelema> yup, and the lexer as well
<mdmkolbe> thelema: parsing/lexer.mll?
mnabil has quit [Ping timeout: 255 seconds]
<thelema> yup
<thelema> there's been a number of fixes related to int parsing that I don't think have made it into the manual
<thelema> s/parsing/lexing/
<mdmkolbe> thelema: yeah, those details might be what kills the idea of using ocaml as an example/test-subject if they involve tricks that don't fit into standard grammar formalisms
<thelema> it's mostly related to what range of int literals are allowed
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
<thelema> apparently these details are... subtle
<thelema> but not getting that right didn't hamper ocaml for the long time it wasn't right. It's really an uncommon edge case, like the float parsing bugs found in other languages...
cyanure has joined #ocaml
<jm> I want to define an infix operator (/\). It works just fine in the toplevel but when I try compiling the file the compiler complains: "Illegal character (\\)". Is there a work-around or do I have to find a different name for my function?
<hcarty> npouillard: It is the only one I've seen missing
<npouillard> hcarty: xclerc implemented it!
* npouillard have to go
<hcarty> npouillard: I saw :-) It was quite a happy revelation
<hcarty> npouillard: Have good day/afternoon/evening
<hcarty> Have *a* good day/afternoon/evening
<adrien> gildor: gitweb says lablgtk.git is owned by root and fails reading it ( http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=lablgtk/lablgtk.git;a=tree "404 - Reading tree failed
<adrien> "), known thing?
<hcarty> adrien: Is this an official move to the forge for lablgtk, or a fork/mirror?
alexyk has joined #ocaml
<adrien> hcarty: Jacques Garrigues had told me he was planning a move and Maxence Guesdon is a long-time contributor to lablgtk, so I'm inclined to think it's a move
<thelema> kaustuv: yes, batteries is compatible with 3.10 on, I think. At least I've noticed some code that's marked unneeded for > 3.10
mnabil has joined #ocaml
<thelema> kaustuv: although if the readme says 3.11+, that's what's right, and we can clean some things up
<kaustuv> thelema: that's a pity, because some aspects of the library can become a lot cleaner with signature substitution...
<gildor> adrien: that is normal
<gildor> adrien: lablgtk tree is empty for now
<gildor> adrien: that is the reason why gitweb cannot read it
<gildor> adrien: it will change after the first push
<kaustuv> thelema: but it's not a big deal
<gildor> hcarty: Jacques told me he want to move back at ICFP 2010 (september), I think it is official
<adrien> gildor: ok, wasn't sure if it was that or the "root" part, thanks
<gildor> to move, back at (if it means something)
<gildor> thomasga: but you can use oasis as a build system to begin
<gildor> thomasga: oasis-db is only something that comes after having an _oasis in your source code
<kaustuv> thelema: any reason (besides historical reasons) the functions of type 'a t -> 'a BatEnum.t are called "enum" and not "to_enum"?
alexyk has quit [Read error: Connection reset by peer]
<f[x]> looking at batteries Makefile - why not use 'ocamlfind query -format %v camomile' instead of shell pipeline?
<hcarty> thelema, kaustuv: I'd like to see that change (enum becoming to_enum) as a consistency fix in 2.0
<hcarty> adrien, gildor: That's quite nice - the forge feels even more official with both X. Leroy and Jacques Garrigues have projects hosted there :-)
<thomasga> gildor: how do you handle pack with _oasis ?
<thomasga> should I create foo.mlpack and declare Foo as a module ?
eye-scuzzy has quit [Quit: leaving]
<gildor> thomasga: ok, you decide to start with the not implemented points of oasis
<thomasga> haha
<thomasga> sorry :-)
<gildor> thomasga: I have a patch for pack but it will be only in 0.3
<thomasga> ok, I will wait a little bit more then :-)
<gildor> (the patch is from Jane Street)
alexyk has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
Yoric has joined #ocaml
<thelema> f[x]: I've never tried that - I'm happy to get rid of the shell pipeline
<thelema> kaustuv: don't know why just 'enum' - I inherited it from yoric without explanation
<f[x]> because of extlib
<f[x]> I guess
<thelema> we can have both in 1.3 if it's useful
<thelema> kaustuv: as far as signature substitution, not a big deal, from what I can tell.
lamawithonel has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
<Yoric> thelema: kaustuv: I inherited it from ExtLib
<thelema> Yoric: that makes sense.
<kaustuv> thelema: Can you pull https://github.com/chaudhuri/batteries-included/commit/52db7e9f6 at your leisure?
<joko> Hello, is it possible to declare a value of true or false, but if it is true to attach an int as well? Like var is false or (true, 1)
<joko> But values like (false, 3) could not be accepted
<avsm2> let v = None
<avsm2> let v = Some 1
<avsm2> the type of v is 'int option'
alexyk has joined #ocaml
<flux> currect :)
ikaros has quit [Quit: Leave the magic to Houdini]
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
<f[x]> npouillard, camlp4 in 3.12 broke some previously working code - see PR#5080
alexyk has quit [Read error: Connection reset by peer]
Yoric has quit [Quit: Yoric]
ulfdoz has joined #ocaml
<npouillard> y
<npouillard> oops
eye-scuzzy has joined #ocaml
Modius has joined #ocaml
<npouillard> f[x]: noted
<f[x]> and btw how do you debug camlp4 without PR#5120? ;)
<hcarty> f[x]: It looks like xclerc is/was on a camlp4 fixing spree today. Perhaps a few of these will be caught in that.
<f[x]> yep
alexyk has joined #ocaml
alexyk has quit [Client Quit]
ttamttam has quit [Remote host closed the connection]
<npouillard> f[x]: I merely no longer spend time on camlp4 :)
<kaustuv> This is an interesting proposal. I wonder if it has a non-zero chance of being accepted. http://caml.inria.fr/mantis/view.php?id=5198
brendan has quit [Quit: leaving]
<f[x]> npouillard, thanks for all your work on it
brendan has joined #ocaml
<hcarty> kaustuv: I think BitC is doing something similar, though it may be one "let" and one "in" surrounding definitions
lamawithonel has quit [Ping timeout: 264 seconds]
ikaros has joined #ocaml
<f[x]> camomile failed to build on ocaml/mingw with some weird exception, will look at it tomorrow
mnabil has quit [Ping timeout: 250 seconds]
_habnabit has joined #ocaml
avsm has quit [Quit: Leaving.]
<thelema> kaustuv: Do you think it's worth building literal forms for things we print?
<thelema> since we can't change the language, this means Foo.read parsing functions for various types
<thelema> f[x]: how do I see the build log?
<thelema> grr, as soon as I ask, I find it. anyway, I see this as a problem: "sh: camlp4of: command not found"
kaustuv_ has joined #ocaml
<kaustuv_> thelema: not sure I understand your question. Do you mean that I shouldn't be using list syntax to print non list things like heaps and queues?
<hcarty> thelema: Would these read functions be in place of something like sexplib?
<thelema> kaustuv_: I'm thinking it might be good to have distinct literals for different data structures
<thelema> hcarty: yes, except it wouldn't be string -> 'a, it'd be like *.print: (input -> 'a) -> input -> 'a list
_andre has quit [Quit: leaving]
ymasory has joined #ocaml
Yoric has joined #ocaml
sepp2k has joined #ocaml
<kaustuv_> thelema: I was thinking of the print functions are more efficient versions of of (fun x -> BatList.print (to_list x)). Their reverse would of course be (fun x -> of_list (BatList.read x))
<hcarty> thelema: Are the print and read functions meant to be for serialization or viewing/debugging?
<thelema> hcarty: without de-serializers, they're only good for debugging
<hcarty> thelema: If it's viewing then using the Format module and simple representations would be ideal, as it makes it easier to see what's going on.
<hcarty> If it's for serialization then I'm not sure I see the benefit over sexplib
<kaustuv_> bittest benefit: no camlp4
<thelema> kaustuv_: that makes sense, and if that works as expected, I think there's no problem. Maybe only things loss-lessly convertable to+from list should be printed as lists
<kaustuv_> *biggest
<hcarty> kaustuv_: True
* thelema strongly approves of the no camlp4 part
<hcarty> kaustuv_: But that also opens lots of room for bugs as print/read fall out of sync
<thelema> but the other issue is that I plan to put toplevel printers for lots of these types, and would like it to be easy to take a value reported by the toplevel and put it back
<kaustuv_> hcarty: presumably thelema's quicktest harness would take care of things getting out of sync
lamawithonel has joined #ocaml
<hcarty> kaustuv_: Also (hopefully) true
<kaustuv_> We can do what Haskell does with Show instances for things like arrays. It shows "[| 1; 2; 3 |]" as "fromList [1, 2, 3]"
<kaustuv_> IOW, we print a deque containing [1; 2; 3] as "BatDeque.of_list [1; 2; 3]"
<kaustuv_> But this only takes care of the problem of printed forms being valid OCaml expressions. We would still need to do something sensible for parsing.
<thelema> kaustuv_: well, as long as the toplevel can turn the expression back to a value, that satusfies my main concern
<thelema> *satisfies
<thelema> that said, we only have to prefix the conversion function for the toplevel printer, not all values
arubin has joined #ocaml
<kaustuv_> oh, is that what the t_ in t_printer means?
boscop has joined #ocaml
<thelema> kaustuv_: I don't think so - the toplevel printers I created actually go through a string output
ymasory has quit [Remote host closed the connection]
<thelema> t_printer seems to be print with no optimal parameters
<thelema> *optional
<hcarty> kaustuv_: I believe the t_printers are for the Print module functions
<hcarty> kaustuv_: Print.printf p"%{Foo.t list}" list_of_foo_t_values -- This uses Foo.t_printer internally
<kaustuv_> What about adding a ?top:bool parameter to *.[s]print?
<thelema> toplevel needs a format printer
<thelema> "The printing function printer-name should have type Format.formatter -> t -> unit,"
<hcarty> kaustuv_: Print.printf p"%{Foo.bar list}" ... would use Foo.bar_printer
<thelema> it wouldn't hurt to have formatted printing functions in batteries too
<kaustuv_> So the proposal is to add *.[s]format in addition to *.[s]print?
<thelema> well, I consider sprint deprecated, since I added the function BatIO.to_string (which has a bad name, I admit)
<thelema> so just .print and .format, although I think an inefficient BatIO.to_format could be written that'd be good enough for 99% of cases
<thelema> meaning .print is enough
eye-scuzzy has quit [Quit: leaving]
<kaustuv_> Hmm, if .sprint is deprecated then I should probably stop adding them all over the place...
<thelema> kaustuv_: yup.
eye-scuzzy has joined #ocaml
* thelema should officially deprecate sprint in 1.3
Rickasaurus has joined #ocaml
<Rickasaurus> oh man, so this is where the ICFP guys hang out :)
<kaustuv_> Isn't ICFP in September?
ygrek has joined #ocaml
spicey has quit [Remote host closed the connection]
Derander has quit [Ping timeout: 240 seconds]
<Rickasaurus> I mean when not at ICFP :)
Derander has joined #ocaml
flx_ has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
hyperboreean has quit [Quit: leaving]
flux has quit [Remote host closed the connection]
flx_ is now known as flux
rwmjones has quit [Read error: Operation timed out]
jonathandav has quit [Ping timeout: 260 seconds]
jonathandav has joined #ocaml
ygrek has joined #ocaml
<kaustuv_> Wow, I just discovered that testsuite/test_hashcons.ml is incorrect!
lamawithonel has quit [Ping timeout: 264 seconds]
lamawithonel has joined #ocaml
<flux> bug in a test suite? inunconceiveable!
<thelema> kaustuv_: I don't think I'm too surprised - it's a very complex test. I'd have probably just gone with a much simpler test
Snark has quit [Quit: Ex-Chat]
<kaustuv_> To be fully honest, I am not sure Hashcons belongs in Batteries. It has very narrow uses.
<kaustuv_> But anyhow, I've updated my fork with some printer modifications and a fix to this test
<thelema> kaustuv_: I have plans to migrate to it instead of my own similar structures
<thelema> although my version is a bit more specific, also assigning a unique int to each value and putting them all in an array
<thelema> but I can likely implement that part on top of bathashcons
<kaustuv_> thelema: bathascons already assigns a unique int to each value. It's the .tag field
<kaustuv_> *batHashcons
<kaustuv_> and isn't putting them in an array likely to cause space leaks?
<thelema> kaustuv_: I'd missed that. is there a way to hook it up so it works on self-looping structures like graphs?
<kaustuv_> Sure, it should be easy to implement Maps and Sets of 'a hobjs that index on the tag.
<kaustuv_> In fact, these instances of Set and Map should probably be part of the BatHashcons module itself.
<thelema> well, when I'm building values, to finish building the value, I need to have pointers (or at least ids) of other values - I'm using mine to build a DFA
<kaustuv_> Incidentally, I just realized that my version of BatUref.print is rather stupid as it just prints the contents of the uref. I should probably also give some indication that it is actually in some data structure.
<thelema> I just have a function to make a node, and my id_map triggers all the recursion needed to build the whole graph, with each transition table initialized with ids of other nodes
<thelema> but that's for later
hyperboreean has joined #ocaml
hyperboreean has quit [Client Quit]
rwmjones has joined #ocaml
olauzon has joined #ocaml
rwmjones has quit [Ping timeout: 240 seconds]
rwmjones has joined #ocaml
gildor has quit [Ping timeout: 250 seconds]
tnguyen has joined #ocaml
edwin has quit [Remote host closed the connection]
vk0 has quit [Read error: Operation timed out]
vk0 has joined #ocaml
ulfdoz has quit [Ping timeout: 250 seconds]
lamawithonel_ has joined #ocaml
lamawithonel has quit [Remote host closed the connection]
lamawithonel_ has quit [Ping timeout: 255 seconds]
mnabil has joined #ocaml
kulakowski has joined #ocaml
lamawithonel_ has joined #ocaml
seafood has joined #ocaml
seafood has quit [Quit: seafood]
lamawithonel_ has quit [Ping timeout: 255 seconds]
lamawithonel_ has joined #ocaml
kaustuv_ has left #ocaml []
gildor has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
gmarik has quit [Quit: Leaving.]
Yoric has quit [Quit: Yoric]
__marius__ has quit [Ping timeout: 255 seconds]
thelema_ has joined #ocaml
thelema has quit [Remote host closed the connection]
__marius__ has joined #ocaml
avsm has joined #ocaml
alexyk has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
kulakowski has left #ocaml []
alexyk has quit [Read error: Connection reset by peer]
ccasin has quit [Quit: Leaving]
alexyk has joined #ocaml
mnabil has quit [Ping timeout: 260 seconds]
avsm has quit [Quit: Leaving.]
mnabil has joined #ocaml
jm has quit [Remote host closed the connection]
alexyk has quit [Read error: Connection reset by peer]
tnguyen has quit [Remote host closed the connection]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
tnguyen has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Quit: alexyk]
alexyk has joined #ocaml
tnguyen has quit [Remote host closed the connection]
olauzon has quit [Quit: olauzon]