* [Caml-list] hash objectified
@ 2003-08-12 19:31 KONTRA Gergely
2003-08-18 12:50 ` Xavier Leroy
0 siblings, 1 reply; 11+ messages in thread
From: KONTRA Gergely @ 2003-08-12 19:31 UTC (permalink / raw)
To: caml-list
Hi!
If my memory serves me well, there is a classified version of hashes,
and other modules. But I cannot find them. Can anyone tell me the URL?
thx, Gergo
--
+-[ Kontra, Gergely<kgergely@mcl.hu> PhD student Room IB113 ]---------+
| http://www.mcl.hu/~kgergely "Olyan langesz vagyok, hogy |
| Mobil:(+36 20) 356 9656 ICQ: 175564914 poroltoval kellene jarnom" |
+-- Magyar php mirror es magyar php dokumentacio: http://hu.php.net --+
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] hash objectified
2003-08-12 19:31 [Caml-list] hash objectified KONTRA Gergely
@ 2003-08-18 12:50 ` Xavier Leroy
2003-08-18 14:40 ` William Lovas
0 siblings, 1 reply; 11+ messages in thread
From: Xavier Leroy @ 2003-08-18 12:50 UTC (permalink / raw)
To: KONTRA Gergely; +Cc: caml-list
> If my memory serves me well, there is a classified version of hashes,
> and other modules. But I cannot find them. Can anyone tell me the URL?
I'm not sure I understand your question correctly, but maybe you're
looking for the Cryptokit library:
http://pauillac.inria.fr/~xleroy/software.html
- Xavier Leroy
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] hash objectified
2003-08-18 12:50 ` Xavier Leroy
@ 2003-08-18 14:40 ` William Lovas
2003-08-18 15:09 ` Xavier Leroy
2003-08-21 10:24 ` KONTRA Gergely
0 siblings, 2 replies; 11+ messages in thread
From: William Lovas @ 2003-08-18 14:40 UTC (permalink / raw)
To: caml-list
On Mon, Aug 18, 2003 at 02:50:56PM +0200, Xavier Leroy wrote:
> > If my memory serves me well, there is a classified version of hashes,
> > and other modules. But I cannot find them. Can anyone tell me the URL?
>
> I'm not sure I understand your question correctly, but maybe you're
> looking for the Cryptokit library:
> http://pauillac.inria.fr/~xleroy/software.html
Hmm. My guess is he was looking for Jacques Garrigue's O'Caml class
library, which a moment on Google found for me:
http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/classes/
`Classified' as in `made into a class', not `withheld from circulation' :)
cheers,
William
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] hash objectified
2003-08-18 14:40 ` William Lovas
@ 2003-08-18 15:09 ` Xavier Leroy
2003-08-18 15:57 ` William Lovas
2003-08-21 10:24 ` KONTRA Gergely
1 sibling, 1 reply; 11+ messages in thread
From: Xavier Leroy @ 2003-08-18 15:09 UTC (permalink / raw)
To: caml-list
> > > If my memory serves me well, there is a classified version of hashes,
> > > and other modules. But I cannot find them. Can anyone tell me the URL?
>
> `Classified' as in `made into a class', not `withheld from circulation' :)
Agreed, but with 'hashes' as in 'cryptographic hash functions', we get
'cryptographic hash functions made into a class', and that fits Cryptokit :-)
- Xavier "code-breaker" Leroy
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] hash objectified
2003-08-18 15:09 ` Xavier Leroy
@ 2003-08-18 15:57 ` William Lovas
0 siblings, 0 replies; 11+ messages in thread
From: William Lovas @ 2003-08-18 15:57 UTC (permalink / raw)
To: caml-list
On Mon, Aug 18, 2003 at 05:09:06PM +0200, Xavier Leroy wrote:
> > > > If my memory serves me well, there is a classified version of hashes,
> > > > and other modules. But I cannot find them. Can anyone tell me the URL?
> >
> > `Classified' as in `made into a class', not `withheld from circulation' :)
>
> Agreed, but with 'hashes' as in 'cryptographic hash functions', we get
> 'cryptographic hash functions made into a class', and that fits Cryptokit :-)
Fair enough :) I didn't know Cryptokit was `classified' in that sense.
> - Xavier "code-breaker" Leroy
*grin*
William
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] hash objectified
2003-08-18 14:40 ` William Lovas
2003-08-18 15:09 ` Xavier Leroy
@ 2003-08-21 10:24 ` KONTRA Gergely
2003-08-21 16:58 ` William Lovas
1 sibling, 1 reply; 11+ messages in thread
From: KONTRA Gergely @ 2003-08-21 10:24 UTC (permalink / raw)
To: caml-list
On 0818, William Lovas wrote:
> Hmm. My guess is he was looking for Jacques Garrigue's O'Caml class
> library, which a moment on Google found for me:
>
> http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/classes/
Yes, you're right, thank you. Will ocaml have this in the standard
library?
Or even better: is that possible to automagically convert eg.
(h=Hashtbl.new 32;;)
h#push "key" "value";;
to
Hashtbl.push h "key" "value";;
If caml is objective, it has to support object-oriented programming...
--
+-[ Kontra, Gergely<kgergely@mcl.hu> PhD student Room IB113 ]---------+
| http://www.mcl.hu/~kgergely "Olyan langesz vagyok, hogy |
| Mobil:(+36 20) 356 9656 ICQ: 175564914 poroltoval kellene jarnom" |
+-- Magyar php mirror es magyar php dokumentacio: http://hu.php.net --+
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] hash objectified
2003-08-21 10:24 ` KONTRA Gergely
@ 2003-08-21 16:58 ` William Lovas
2003-08-25 15:46 ` KONTRA Gergely
0 siblings, 1 reply; 11+ messages in thread
From: William Lovas @ 2003-08-21 16:58 UTC (permalink / raw)
To: caml-list
On Thu, Aug 21, 2003 at 12:24:58PM +0200, KONTRA Gergely wrote:
> Yes, you're right, thank you. Will ocaml have this in the standard
> library?
>
> [...]
>
> If caml is objective, it has to support object-oriented programming...
Well, O'Caml supports the use of objects and classes in those instances
where subtyping or multiple implementations are necessary. For O'Caml to
"support object-oriented programming", it is not necessary that every data
structure and module also be encapsulated in some class.
There's no need for everything to be an object, and i don't really see
what that would buy you in the long run, since O'Caml doesn't have any
"top" or "top-like" type, like Java's Object. Why do you want the standard
library's functionality replicated in object form?
William
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] hash objectified
2003-08-21 16:58 ` William Lovas
@ 2003-08-25 15:46 ` KONTRA Gergely
2003-08-25 17:32 ` Manos Renieris
0 siblings, 1 reply; 11+ messages in thread
From: KONTRA Gergely @ 2003-08-25 15:46 UTC (permalink / raw)
To: caml-list
On 0821, William Lovas wrote:
[...]
> There's no need for everything to be an object, and i don't really see
> what that would buy you in the long run, since O'Caml doesn't have any
> "top" or "top-like" type, like Java's Object. Why do you want the standard
> library's functionality replicated in object form?
>
> William
Hashtbl.add h "foo" "bar" <--> h#add "foo" "bar"
Because it is shorter to type -> less errors, quicker programming
OO can be cool. (see ruby)
I'm not OO fan, but lazy :)
Gergo
--
+-[ Kontra, Gergely<kgergely@mcl.hu> PhD student Room IB113 ]---------+
| http://www.mcl.hu/~kgergely "Olyan langesz vagyok, hogy |
| Mobil:(+36 20) 356 9656 ICQ: 175564914 poroltoval kellene jarnom" |
+-- Magyar php mirror es magyar php dokumentacio: http://hu.php.net --+
----- End forwarded message -----
--
+-[ Kontra, Gergely<kgergely@mcl.hu> PhD student Room IB113 ]---------+
| http://www.mcl.hu/~kgergely "Olyan langesz vagyok, hogy |
| Mobil:(+36 20) 356 9656 ICQ: 175564914 poroltoval kellene jarnom" |
+-- Magyar php mirror es magyar php dokumentacio: http://hu.php.net --+
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] hash objectified
2003-08-25 15:46 ` KONTRA Gergely
@ 2003-08-25 17:32 ` Manos Renieris
2003-08-25 18:13 ` henridf
2003-08-26 1:40 ` Yaron M. Minsky
0 siblings, 2 replies; 11+ messages in thread
From: Manos Renieris @ 2003-08-25 17:32 UTC (permalink / raw)
To: KONTRA Gergely; +Cc: caml-list
On Mon, Aug 25, 2003 at 05:46:39PM +0200, KONTRA Gergely wrote:
>
> Hashtbl.add h "foo" "bar" <--> h#add "foo" "bar"
>
> Because it is shorter to type -> less errors, quicker programming
> OO can be cool. (see ruby)
> I'm not OO fan, but lazy :)
If that's the reason, once you do
module H = Hashtbl
then
H.add h "foo" "bar"
is only two characters longer, and one shift shorter :-)
And the compiler ensures the exact type of h, and you know statically
what function you call -> less to keep in your head -> less errors,
quicker programming.
-- Manos
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] hash objectified
2003-08-25 17:32 ` Manos Renieris
@ 2003-08-25 18:13 ` henridf
2003-08-26 1:40 ` Yaron M. Minsky
1 sibling, 0 replies; 11+ messages in thread
From: henridf @ 2003-08-25 18:13 UTC (permalink / raw)
To: Manos Renieris; +Cc: KONTRA Gergely, caml-list
> > Hashtbl.add h "foo" "bar" <--> h#add "foo" "bar"
> >
> > Because it is shorter to type -> less errors, quicker programming
> > OO can be cool. (see ruby)
> > I'm not OO fan, but lazy :)
>
> If that's the reason, once you do
> module H = Hashtbl
> then
> H.add h "foo" "bar"
> is only two characters longer, and one shift shorter :-)
> And the compiler ensures the exact type of h, and you know statically
> what function you call -> less to keep in your head -> less errors,
> quicker programming.
>
and quicker at runtime too i would assume.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] hash objectified
2003-08-25 17:32 ` Manos Renieris
2003-08-25 18:13 ` henridf
@ 2003-08-26 1:40 ` Yaron M. Minsky
1 sibling, 0 replies; 11+ messages in thread
From: Yaron M. Minsky @ 2003-08-26 1:40 UTC (permalink / raw)
To: Caml List
My take on the same problem was to define infix notation for a few
oft-used operations, including some hash table operations. To that end
I defined
h |> k
to lookup key k in hashtable h, and
h |< (k,d)
to add the key,data pair (k,d) to h. It has the downside of obscurity
to the uninitiated, but I find it a lot easier to read code that uses
these operators than the rather overlong Hashtbl.* equivalents.
y
On Mon, 2003-08-25 at 13:32, Manos Renieris wrote:
> On Mon, Aug 25, 2003 at 05:46:39PM +0200, KONTRA Gergely wrote:
> >
> > Hashtbl.add h "foo" "bar" <--> h#add "foo" "bar"
> >
> > Because it is shorter to type -> less errors, quicker programming
> > OO can be cool. (see ruby)
> > I'm not OO fan, but lazy :)
>
> If that's the reason, once you do
> module H = Hashtbl
> then
> H.add h "foo" "bar"
> is only two characters longer, and one shift shorter :-)
> And the compiler ensures the exact type of h, and you know statically
> what function you call -> less to keep in your head -> less errors,
> quicker programming.
>
> -- Manos
>
> -------------------
> To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
> Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
--
|--------/ Yaron M. Minsky \--------|
|--------\ http://www.cs.cornell.edu/home/yminsky/ /--------|
Open PGP --- KeyID B1FFD916 (new key as of Dec 4th)
Fingerprint: 5BF6 83E1 0CE3 1043 95D8 F8D5 9F12 B3A9 B1FF D916
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2003-08-26 1:41 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-12 19:31 [Caml-list] hash objectified KONTRA Gergely
2003-08-18 12:50 ` Xavier Leroy
2003-08-18 14:40 ` William Lovas
2003-08-18 15:09 ` Xavier Leroy
2003-08-18 15:57 ` William Lovas
2003-08-21 10:24 ` KONTRA Gergely
2003-08-21 16:58 ` William Lovas
2003-08-25 15:46 ` KONTRA Gergely
2003-08-25 17:32 ` Manos Renieris
2003-08-25 18:13 ` henridf
2003-08-26 1:40 ` Yaron M. Minsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox