caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] [ANN] Hmap 0.8.0
@ 2016-03-08  9:42 Daniel Bünzli
  2016-03-08 12:44 ` Yaron Minsky
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Bünzli @ 2016-03-08  9:42 UTC (permalink / raw)
  To: OCaml List

Hello, 

I'd like to announce the first release of Hmap: 

```
Hmap provides heterogeneous value maps for OCaml. These maps bind keys
to values with arbitrary types. Keys witness the type of the value
they are bound to which allows to add and lookup bindings in a type
safe manner.
```

Hmap has no dependency and is distributed under the ISC license.

Home page: http://erratique.ch/software/hmap/
API docs: http://erratique.ch/software/hmap/doc/Hmap

Best, 

Daniel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] [ANN] Hmap 0.8.0
  2016-03-08  9:42 [Caml-list] [ANN] Hmap 0.8.0 Daniel Bünzli
@ 2016-03-08 12:44 ` Yaron Minsky
  2016-03-08 14:24   ` Daniel Bünzli
  0 siblings, 1 reply; 3+ messages in thread
From: Yaron Minsky @ 2016-03-08 12:44 UTC (permalink / raw)
  To: Daniel Bünzli; +Cc: OCaml List

[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

Neat!

I'm curious if you've looked at Core_kernel's Univ_map?  I believe it's
very similar in spirit, and I'm curious if there are any interesting
differences there:

https://github.com/janestreet/core_kernel/blob/master/src/univ_map.mli

Our type witnesses are a little interesting in that you can derive new
witnesses from old ones (e.g., if a equals a', and b equals b', then a * b
equals a' * b').  That said, I'm not sure that this is relevant for the
heterogenous map use case.

y

On Tue, Mar 8, 2016 at 4:42 AM, Daniel Bünzli <daniel.buenzli@erratique.ch>
wrote:

> Hello,
>
> I'd like to announce the first release of Hmap:
>
> ```
> Hmap provides heterogeneous value maps for OCaml. These maps bind keys
> to values with arbitrary types. Keys witness the type of the value
> they are bound to which allows to add and lookup bindings in a type
> safe manner.
> ```
>
> Hmap has no dependency and is distributed under the ISC license.
>
> Home page: http://erratique.ch/software/hmap/
> API docs: http://erratique.ch/software/hmap/doc/Hmap
>
> Best,
>
> Daniel
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

[-- Attachment #2: Type: text/html, Size: 2417 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] [ANN] Hmap 0.8.0
  2016-03-08 12:44 ` Yaron Minsky
@ 2016-03-08 14:24   ` Daniel Bünzli
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Bünzli @ 2016-03-08 14:24 UTC (permalink / raw)
  To: Yaron Minsky; +Cc: OCaml List

Le mardi, 8 mars 2016 à 13:44, Yaron Minsky a écrit :
> I'm curious if you've looked at Core_kernel's Univ_map?
No, I just abstracted code I've been c&p around in a lot of projects.

> Our type witnesses are a little interesting in that you can derive new witnesses from old ones (e.g., if a equals a', and b equals b', then a * b equals a' * b'). That said, I'm not sure that this is relevant for the heterogenous map use case.
The type identifiers are an implementation detail. I used to implement this using a universal type, see e.g. [1], but the type identifier implementation allocates less and should be more efficient (but the latter I didn't measure).  

Best,  

Daniel

[1] http://alan.petitepomme.net/cwn/2010.02.09.html#1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-08 14:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-08  9:42 [Caml-list] [ANN] Hmap 0.8.0 Daniel Bünzli
2016-03-08 12:44 ` Yaron Minsky
2016-03-08 14:24   ` Daniel Bünzli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).