Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #9560 > unrolled thread
| Started by | Jan Burse <janburse@fastmail.fm> |
|---|---|
| First post | 2011-11-05 04:03 +0100 |
| Last post | 2011-11-07 08:46 -0800 |
| Articles | 17 on this page of 97 — 19 participants |
Back to article view | Back to comp.lang.java.programmer
Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 04:03 +0100
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 12:42 +0100
Re: Immutable Datastructures with good Sharing markspace <-@.> - 2011-11-05 09:35 -0700
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 19:33 +0100
Re: Immutable Datastructures with good Sharing Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-05 14:42 -0400
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 19:52 +0100
Re: Immutable Datastructures with good Sharing Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-05 19:32 +0000
Re: Immutable Datastructures with good Sharing Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-05 15:31 -0400
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 20:50 +0100
Re: Immutable Datastructures with good Sharing Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-05 16:26 -0400
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 21:35 +0100
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 21:38 +0100
Re: Immutable Datastructures with good Sharing Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-05 16:59 -0400
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 22:06 +0100
Re: Immutable Datastructures with good Sharing Arne Vajhøj <arne@vajhoej.dk> - 2011-11-05 16:41 -0400
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 21:42 +0100
Re: Immutable Datastructures with good Sharing Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-05 17:11 -0400
Re: Immutable Datastructures with good Sharing Arne Vajhøj <arne@vajhoej.dk> - 2011-11-05 16:20 -0400
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 21:33 +0100
Re: Immutable Datastructures with good Sharing Arne Vajhøj <arne@vajhoej.dk> - 2011-11-05 16:38 -0400
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 21:41 +0100
Re: Immutable Datastructures with good Sharing markspace <-@.> - 2011-11-05 17:20 -0700
Re: Immutable Datastructures with good Sharing Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-05 22:13 -0300
Re: Immutable Datastructures with good Sharing markspace <-@.> - 2011-11-05 20:05 -0700
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-06 10:27 +0100
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-06 10:14 +0100
Re: Immutable Datastructures with good Sharing Lew <lewbloch@gmail.com> - 2011-11-05 10:06 -0700
Re: Immutable Datastructures with good Sharing Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-11-05 10:55 -0700
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 19:30 +0100
Re: Immutable Datastructures with good Sharing Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-05 18:16 -0400
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 23:20 +0100
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 23:38 +0100
Re: Immutable Datastructures with good Sharing Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-05 17:47 -0300
Re: Immutable Datastructures with good Sharing Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-11-05 14:26 -0700
Re: Immutable Datastructures with good Sharing Arne Vajhøj <arne@vajhoej.dk> - 2011-11-05 16:14 -0400
Re: Immutable Datastructures with good Sharing Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-11-05 14:35 -0700
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 22:42 +0100
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 22:50 +0100
Re: Immutable Datastructures with good Sharing Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-11-05 14:51 -0700
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 22:58 +0100
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 23:03 +0100
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-05 23:07 +0100
Re: Immutable Datastructures with good Sharing Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-11-06 09:44 +0200
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-06 10:22 +0100
Re: Immutable Datastructures with good Sharing Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-06 09:05 -0400
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-06 14:16 +0100
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-06 14:22 +0100
Re: Immutable Datastructures with good Sharing Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-06 14:30 +0000
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-06 16:02 +0100
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-06 16:08 +0100
Re: Immutable Datastructures with good Sharing Giovanni Azua <bravegag@hotmail.com> - 2011-11-06 16:18 +0100
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-06 16:54 +0100
Re: Immutable Datastructures with good Sharing Giovanni Azua <bravegag@hotmail.com> - 2011-11-06 17:31 +0100
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-06 22:33 +0100
Re: Immutable Datastructures with good Sharing Arne Vajhøj <arne@vajhoej.dk> - 2011-11-06 16:47 -0500
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-06 16:58 +0100
Re: Immutable Datastructures with good Sharing Tom Anderson <twic@urchin.earth.li> - 2011-11-07 01:01 +0000
Re: Immutable Datastructures with good Sharing Lew <lewbloch@gmail.com> - 2011-11-06 17:26 -0800
Re: Immutable Datastructures with good Sharing Tom Anderson <twic@urchin.earth.li> - 2011-11-07 23:45 +0000
Re: Immutable Datastructures with good Sharing Lew <lewbloch@gmail.com> - 2011-11-06 14:44 -0800
Re: Immutable Datastructures with good Sharing Arne Vajhøj <arne@vajhoej.dk> - 2011-11-06 17:51 -0500
Re: Immutable Datastructures with good Sharing Giovanni Azua <bravegag@hotmail.com> - 2011-11-07 01:28 +0100
Re: Immutable Datastructures with good Sharing Arne Vajhøj <arne@vajhoej.dk> - 2011-11-06 19:50 -0500
Re: Immutable Datastructures with good Sharing Giovanni Azua <bravegag@hotmail.com> - 2011-11-07 02:13 +0100
Re: Immutable Datastructures with good Sharing Arne Vajhøj <arne@vajhoej.dk> - 2011-11-06 20:20 -0500
Re: Immutable Datastructures with good Sharing Lew <lewbloch@gmail.com> - 2011-11-06 17:29 -0800
Re: Immutable Datastructures with good Sharing Giovanni Azua <bravegag@hotmail.com> - 2011-11-07 11:22 +0100
Re: Immutable Datastructures with good Sharing Tom Anderson <twic@urchin.earth.li> - 2011-11-06 23:02 +0000
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-07 00:32 +0100
Re: Immutable Datastructures with good Sharing Giovanni Azua <bravegag@hotmail.com> - 2011-11-07 01:10 +0100
Re: Immutable Datastructures with good Sharing Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-07 10:24 +0000
Re: Immutable Datastructures with good Sharing Giovanni Azua <bravegag@hotmail.com> - 2011-11-07 11:52 +0100
Re: Immutable Datastructures with good Sharing Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-07 11:12 +0000
Re: Immutable Datastructures with good Sharing Arne Vajhøj <arne@vajhoej.dk> - 2011-11-07 17:24 -0500
Re: Immutable Datastructures with good Sharing Giovanni Azua <bravegag@hotmail.com> - 2011-11-07 02:08 +0100
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-07 05:03 +0100
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-07 05:13 +0100
Re: Immutable Datastructures with good Sharing Tom Anderson <twic@urchin.earth.li> - 2011-11-07 23:38 +0000
Re: Immutable Datastructures with good Sharing Tom Anderson <twic@urchin.earth.li> - 2011-11-09 22:06 +0000
Re: Immutable Datastructures with good Sharing Gene Wirchenko <genew@ocis.net> - 2011-11-09 18:02 -0800
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-07 00:28 +0100
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-07 00:39 +0100
Re: Immutable Datastructures with good Sharing Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-06 20:57 -0400
Re: Immutable Datastructures with good Sharing Jan Burse <janburse@fastmail.fm> - 2011-11-07 04:58 +0100
Re: Immutable Datastructures with good Sharing Silvio Bierman <silvio@moc.com> - 2011-11-07 15:13 +0100
Re: Immutable Datastructures with good Sharing Cthun <cthun_202@qmail.net.au> - 2011-11-07 12:54 -0500
Re: Immutable Datastructures with good Sharing "B1ll Gat3s" <wm.g4t3s@m1cr0s0f7.c0m> - 2011-11-07 18:07 -0500
Re: Immutable Datastructures with good Sharing B1ll Gat3s <wm.g4t3s@m1cr0s0f7.c0m> - 2011-11-07 22:07 -0500
Re: Immutable Datastructures with good Sharing "B1ll Gat3s" <wm.g4t3s@m1cr0s0f7.c0m> - 2011-11-08 00:17 -0500
Re: Immutable Datastructures with good Sharing thoolen <th00len@th0lenbot.thorium> - 2011-11-08 16:03 -0500
Re: Immutable Datastructures with good Sharing Cthun <cthun_202@qmail.net.au> - 2011-11-08 15:49 -0500
Re: Immutable Datastructures with good Sharing "B1ll Gat3s" <wm.g4t3s@m1cr0s0f7.c0m> - 2011-11-08 18:01 -0500
Re: Immutable Datastructures with good Sharing thoolen <th00len@th0lenbot.thorium> - 2011-11-08 20:46 -0500
Re: Immutable Datastructures with good Sharing "Cthun" <cthun_202@qmail.net.au> - 2011-11-08 22:43 -0500
Re: Immutable Datastructures with good Sharing thoolen <th00len@th0lenbot.thorium> - 2011-11-09 08:28 -0500
Re: Immutable Datastructures with good Sharing thoolen <th00len@th0lenbot.thorium> - 2011-11-08 16:00 -0500
Re: Immutable Datastructures with good Sharing Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-11-07 08:46 -0800
Page 5 of 5 — ← Prev page 1 2 3 4 [5]
| From | Jan Burse <janburse@fastmail.fm> |
|---|---|
| Date | 2011-11-07 00:28 +0100 |
| Message-ID | <j9756g$t80$1@news.albasani.net> |
| In reply to | #9560 |
Jan Burse schrieb: > Dear All, > > Value objects are some well known immutable > datastructures, when an operation is applied, > typically simply a new object is created. So > for example doing: > > 3 = 1 + 2 > > With java.lang.Integer objects would involve > creating a new Integer with value left.intValue() > + right.intValue(). > > But instead of call the constructor, one can also call > Integer.valueOf(), and there you have some sharing. > Namely the class Integer caches the value objects for > small values (at least the last time I looked into > the Oracle source, it was there...). > > More elaborate sharing is seen in the String class > by the substring() operation. This operation does > reuse the original character array and only encapsulates > the offset and the length in a new object. I wouldnt > recomende that to get one character from a 1 MB > long string, since it will prevent the original > character array from GC. But in some situation this > is quite handy. > > I am now looking for immutable datastructures with > a similar sharing. In the String class example, the > operation was substring() that produced a new immutable > object. I am looking for: > > Some stack class, where: (Easy) > pop() creates a new immutable stack > push() creates a new immutable stack > With good sharing. > > Some queue class, where: (Hard?) > enqueue() creates a new immutable queue > dequeue() creates a new immutable queue > With good sharing. > > What is your favorite datastructure? > > Bye Here is some explanation how an immutable set would work, based on some tree where cloning is only performed along the insert or delete path: http://stackoverflow.com/questions/3233473/immutable-data-structures-performance Could I derive a queue from this? Bye
[toc] | [prev] | [next] | [standalone]
| From | Jan Burse <janburse@fastmail.fm> |
|---|---|
| Date | 2011-11-07 00:39 +0100 |
| Message-ID | <j975rn$ujh$1@news.albasani.net> |
| In reply to | #9700 |
Jan Burse schrieb: > Here is some explanation how an immutable set would work, > based on some tree where cloning is only performed along > the insert or delete path: > > http://stackoverflow.com/questions/3233473/immutable-data-structures-performance > > > Could I derive a queue from this? > > Bye > Ah, this is already better. Immutable Vectors with Sharing! (Seems that another terminology for Immutable+Sharing is persistent, but I would get a conflict with DB terminology) http://www.codecommit.com/blog/scala/more-persistent-vectors-performance-analysis I guess I will manage to go from a Vector to a Queue. Bye
[toc] | [prev] | [next] | [standalone]
| From | Arved Sandstrom <asandstrom3minus1@eastlink.ca> |
|---|---|
| Date | 2011-11-06 20:57 -0400 |
| Message-ID | <t1Gtq.16960$SW4.7574@newsfe08.iad> |
| In reply to | #9702 |
On 11-11-06 07:39 PM, Jan Burse wrote: > Jan Burse schrieb: >> Here is some explanation how an immutable set would work, >> based on some tree where cloning is only performed along >> the insert or delete path: >> >> http://stackoverflow.com/questions/3233473/immutable-data-structures-performance >> >> >> >> Could I derive a queue from this? >> >> Bye >> > > Ah, this is already better. Immutable Vectors with Sharing! > (Seems that another terminology for Immutable+Sharing is > persistent, but I would get a conflict with DB terminology) Well, a few of us have already mentioned "persistence" in this thread, meaning persistence in the data structure sense. The definition features right at the beginning of one of Okasaki's main initial sections. Don't take this the wrong way, but I find it disconcerting when a poster with questions confesses that they're not reading a bunch of the answers. And how could you possibly have gotten an impression of Okasaki's work if you missed this particular definition? Just sayin'. And, no, "persistence" != Immutable + Sharing. [ SNIP ] AHS
[toc] | [prev] | [next] | [standalone]
| From | Jan Burse <janburse@fastmail.fm> |
|---|---|
| Date | 2011-11-07 04:58 +0100 |
| Message-ID | <j97l1n$jr7$1@news.albasani.net> |
| In reply to | #9711 |
Arved Sandstrom schrieb: > answers. And how could you possibly have gotten an impression of > Okasaki's work if you missed this particular definition? > > Just sayin'. > > And, no, "persistence" != Immutable + Sharing. I missed it, what is persistence?
[toc] | [prev] | [next] | [standalone]
| From | Silvio Bierman <silvio@moc.com> |
|---|---|
| Date | 2011-11-07 15:13 +0100 |
| Message-ID | <4eb7e76f$0$6972$e4fe514c@news2.news.xs4all.nl> |
| In reply to | #9724 |
On 11/07/2011 04:58 AM, Jan Burse wrote: > Arved Sandstrom schrieb: >> answers. And how could you possibly have gotten an impression of >> Okasaki's work if you missed this particular definition? >> >> Just sayin'. >> >> And, no, "persistence" != Immutable + Sharing. > > I missed it, what is persistence? Basically a persistent data structure is one that somehow retains its previous value upon a modification. Although not necessarily so this is usually realized in the form of a data structure that implements modifications solely as operations that return the modified version leaving the current version unchanged, effectively resulting in an immutable data structure. For this to perform well, both space and time wise, sharing is often necessary. A singly linked list is probably the simplest example. As long as existing nodes in the list are never modified (both its value as its link to the next element) additions can only be done at the head of the list and common tails can always be shared. Perhaps looking into the standard libraries of Scala or Clojure would be a good idea. Both provide immutable lists, trees, vectors, hashmaps etc. Silvio
[toc] | [prev] | [next] | [standalone]
| From | Cthun <cthun_202@qmail.net.au> |
|---|---|
| Date | 2011-11-07 12:54 -0500 |
| Message-ID | <j9961f$nc2$1@speranza.aioe.org> |
| In reply to | #9740 |
On 07/11/2011 9:13 AM, Silvio Bierman wrote: > Perhaps looking into the standard libraries of Scala or Clojure would be > a good idea. Both provide immutable lists, trees, vectors, hashmaps etc. Clojure's can be used from in Java by importing clojure.lang classes and having the Clojure jar in the classpath. No generics, but they implement the unmodifiable-foo portions of the Map, Set, List, etc. interfaces from java.util and have their own return-a-modified-version methods. There's a persistent immutable stack class included. I'm not sure if clojure.lang has a persistent immutable queue, or if it does if it's a deque, but someone posted code for a queue on their mailing list a year or so ago. I'm not sure who or exactly when, but a search for "persistent queue" will probably turn it up. I think it was a full deque with pushes, peeks, and pops at both ends stated to be O(1). It used deftype/defprotocol which, if I understand them correctly, generates named Java classes and interfaces that can be imported into and used from Java if the Clojure code is AOT-compiled to generate .class files. I don't know what, if any, license the author specified though. I also recall seeing a priority queue implementation posted there at some point. Of course, you might want to take the larger step of actually using Clojure if persistence and immutability are things you crave. ;)
[toc] | [prev] | [next] | [standalone]
| From | "B1ll Gat3s" <wm.g4t3s@m1cr0s0f7.c0m> |
|---|---|
| Date | 2011-11-07 18:07 -0500 |
| Message-ID | <j9961f$nd2$1@speranza.aioe.org> |
| In reply to | #9749 |
On 07/11/2011 12:54 PM, Cthun <cthun_202@qmail.net.au> wrote: >On 07/11/2011 9:13 AM, Silvio Bierman wrote: >> Perhaps looking into the standard libraries of Scala or Clojure would be >> a good idea. Both provide immutable lists, trees, vectors, hashmaps etc. > >There's a persistent immutable stack class included. > Yes - identify the lines, genius. >I'm not sure > Yes - it's very clear. >I also recall > No - it's not. > >Of course, No - it's not. -- A fatal exception 0E has occurred at 0028:C0011E36 in VXD VMM(01) 00010E36. The current application will be terminated. * Press any key to terminate the current application.
[toc] | [prev] | [next] | [standalone]
| From | B1ll Gat3s <wm.g4t3s@m1cr0s0f7.c0m> |
|---|---|
| Date | 2011-11-07 22:07 -0500 |
| Message-ID | <j9a6e8$6e6$2@speranza.aioe.org> |
| In reply to | #9755 |
On 07/11/2011 6:07 PM, someone pretending to be me wrote: > Yes - it's very clear. > No - it's not. > No - it's not. Hey, coward, mind posting using your own name or whatever handle you're usually known as instead of using mine? -- A fatal exception 0E has occurred at 0028:C0011E36 in VXD VMM(01) 00010E36. The current application will be terminated. * Press any key to terminate the current application.
[toc] | [prev] | [next] | [standalone]
| From | "B1ll Gat3s" <wm.g4t3s@m1cr0s0f7.c0m> |
|---|---|
| Date | 2011-11-08 00:17 -0500 |
| Message-ID | <j9a6e8$6e3$2@speranza.aioe.org> |
| In reply to | #9767 |
From a idiot.extreme-one came the gem: >On 07/11/2011 6:07 PM, someone pretending to be me wrote: >> Yes - it's very clear. >> No - it's not. >> No - it's not. > >Hey, coward, mind posting using your own name or whatever handle you're >usually known as instead of using mine? --------------forgery alert... play nice, leave off with the multiple name use in CLJP Report sent - X-Complaints-To: abuse@aioe.org -- A fatal exception 0E has occurred at 0028:C0011E36 in VXD VMM(01) 00010E36. The current application will be terminated. * Press any key to terminate the current application.
[toc] | [prev] | [next] | [standalone]
| From | thoolen <th00len@th0lenbot.thorium> |
|---|---|
| Date | 2011-11-08 16:03 -0500 |
| Message-ID | <j9c5ed$45h$1@speranza.aioe.org> |
| In reply to | #9774 |
On 08/11/2011 12:17 AM, murphy wrote:
NaN> From a idiot.extreme-one came the gem:
Who is "a idiot.extreme-one", murphy? There is nobody in this newsgroup
using that alias.
NaN> --------------forgery alert...
What does your forgery have to do with Java, murphy? Forgeries are more
effective if you don't alert everyone to the fact of your forgery, murphy.
NaN> play nice, leave off with the multiple name use in CLJP
What does your ironic directive to B1ll Gat3s have to do with Java, murphy?
NaN> Report sent - X-Complaints-To: abuse@aioe.org
How ironic.
"I had 'volunteered (years back) to support those who do endeavor
to provide free Free Usenet access, support those who offered
subscription based Free Usenet access, nothing more than
cooperation expected in return for what has been many
thousands of hours of work. I note most of those I joined with
are either deceased, severely disabled, or plain ole' MIA..
now it is my Time. ...
You just read my last. ...
For those who think they see me in future times I can only wish
you severe Tinnitus in your dreams. For those who know me
well (eMail, whatever) and see me, know I will be smiling also.
It is to you I say "adieu mein frenz and adios .. grazie' [hugs]
for all the Good Times! May you and yours always bear well
with all Life brings you".
/0ut"
--murphy
http://www.uffnet.com/kookkamp/goodbye.htm
And some people wonder why I call them Famous Last Words.
P.S. You forgot to include a copy of your trademarked Lits o' Haet,
murphy. Still suffering from memory problems, murphy?
[toc] | [prev] | [next] | [standalone]
| From | Cthun <cthun_202@qmail.net.au> |
|---|---|
| Date | 2011-11-08 15:49 -0500 |
| Message-ID | <j9c4jt$1rk$1@speranza.aioe.org> |
| In reply to | #9755 |
On 07/11/2011 6:07 PM, B1ll Gat3s wrote: > On 07/11/2011 12:54 PM, Cthun <cthun_202@qmail.net.au> wrote: >> On 07/11/2011 9:13 AM, Silvio Bierman wrote: >>> Perhaps looking into the standard libraries of Scala or Clojure would be >>> a good idea. Both provide immutable lists, trees, vectors, hashmaps etc. >> >> There's a persistent immutable stack class included. > > Yes - identify the lines, genius. ? Download it yourself or browse the source file at github if for some reason you want to know what line numbers of what file contain the stack class. >> I'm not sure > Yes - it's very clear. ?? >> I also recall > No - it's not. ??? >> Of course, > No - it's not. ???? Are you on crack?
[toc] | [prev] | [next] | [standalone]
| From | "B1ll Gat3s" <wm.g4t3s@m1cr0s0f7.c0m> |
|---|---|
| Date | 2011-11-08 18:01 -0500 |
| Message-ID | <j9ccio$mqm$1@speranza.aioe.org> |
| In reply to | #9784 |
From Cthun <cthun_202@qmail.net.au> classic idiot.extreme-one came the gem: > >Download it yourself or browse the source file at github if for some >reason you want to know what line numbers of what file contain the stack >class. > classic fooktard presupposition >>> I'm not sure >> Yes - it's very clear. > >?? > is Derbyshireite for ? >>> I also recall >> No - it's not. > >??? > is Derbyshireite for ? >>> Of course, >> No - it's not. > >???? > is Derbyshireite for ? >Are you on crack? > your obsession with owning the crackpot th00len identity is related to Java how, Paul? How cute to see you two fooktards...tied at the ankle...bouncing into CJLP in perfect unison. Murphy would be most amused. Onto a technical issue, why is cthun_202@qmail.net.au not being recognized? -- A fatal exception 0E has occurred at 0028:C0011E36 in VXD VMM(01) 00010E36. The current application will be terminated. * Press any key to terminate the current application.
[toc] | [prev] | [next] | [standalone]
| From | thoolen <th00len@th0lenbot.thorium> |
|---|---|
| Date | 2011-11-08 20:46 -0500 |
| Message-ID | <j9cm2j$b9m$1@speranza.aioe.org> |
| In reply to | #9790 |
On 08/11/2011 6:01 PM, murphy wrote:
NaN> Newsgroups: comp.lang.java.programmer
NaN> From Cthun <cthun_202@qmail.net.au> classic idiot.extreme-one came the
NaN> gem:
What does your unsubstantiated allegation regarding Cthun's IQ have to
do with Java, murphy?
NaN> classic fooktard presupposition
What does your fooktard presupposition have to do with Java, murphy?
NaN> is Derbyshireite for ?
What it "Derbyshireite", murphy, and what does it have to do with Java?
NaN> is Derbyshireite for ?
What it "Derbyshireite", murphy, and what does it have to do with Java?
NaN> is Derbyshireite for ?
What it "Derbyshireite", murphy, and what does it have to do with Java?
NaN> your obsession with owning the crackpot th00len
NaN> identity is related to Java how, Paul?
Who is "Paul", murphy? There is nobody in this newsgroup using that alias.
NaN> How cute to see you two fooktards...tied at the ankle...bouncing into
NaN> CJLP in perfect unison.
What does your classic erroneous presupposition have to do with Java,
murphy?
NaN> Murphy would be most amused.
What does your amusement have to do with Java, murphy?
NaN> Onto a technical issue, why is cthun_202@qmail.net.au
NaN> not being recognized?
What does your ambiguous question of Cthun have to do with Java, murphy?
"I had 'volunteered (years back) to support those who do endeavor
to provide free Free Usenet access, support those who offered
subscription based Free Usenet access, nothing more than
cooperation expected in return for what has been many
thousands of hours of work. I note most of those I joined with
are either deceased, severely disabled, or plain ole' MIA..
now it is my Time. ...
You just read my last. ...
For those who think they see me in future times I can only wish
you severe Tinnitus in your dreams. For those who know me
well (eMail, whatever) and see me, know I will be smiling also.
It is to you I say "adieu mein frenz and adios .. grazie' [hugs]
for all the Good Times! May you and yours always bear well
with all Life brings you".
/0ut"
--murphy
http://www.uffnet.com/kookkamp/goodbye.htm
And some people wonder why I call them Famous Last Words.
P.S. You forgot to include a copy of your trademarked Lits o' Haet,
murphy. Still suffering from memory problems, murphy?
[toc] | [prev] | [next] | [standalone]
| From | "Cthun" <cthun_202@qmail.net.au> |
|---|---|
| Date | 2011-11-08 22:43 -0500 |
| Message-ID | <j9css9$pb3$1@speranza.aioe.org> |
| In reply to | #9791 |
On 08/11/2011 8:46 PM, thoolen wrote: >On 08/11/2011 6:01 PM, murphy wrote: >NaN> Newsgroups: comp.lang.java.programmer >NaN> From Cthun <cthun_202@qmail.net.au> classic idiot.extreme-one came the >NaN> gem: > >What does your unsubstantiated allegation regarding Cthun's IQ have to >do with Java, murphy? > No, no, a thousand times no! None of the nasty things that you have said or implied about me are at all true. Are you on crack? (noop)NaN>classic fooktard presupposition (noop) (noop)What does your fooktard presupposition have to do with Java, murphy? (noop) (noop)NaN>is Derbyshireite for ? (noop) (noop)What it "Derbyshireite", murphy, and what does it have to do with Java? (noop) (noop)NaN>is Derbyshireite for ? (noop) (noop)What it "Derbyshireite", murphy, and what does it have to do with Java? (noop) (noop)NaN>is Derbyshireite for ? (noop) (noop)What it "Derbyshireite", murphy, and what does it have to do with Java? (noop) (noop)NaN>your obsession with owning the crackpot th00len (noop)NaN>identity is related to Java how, Paul? (noop) (noop)Who is "Paul", murphy? There is nobody in this newsgroup using that alias. (noop) (noop)NaN>How cute to see you two fooktards...tied at the ankle...bouncing into (noop)NaN>CJLP in perfect unison. (noop) (noop)What does your classic erroneous presupposition have to do with Java, (noop)murphy? (noop) (noop)NaN>Murphy would be most amused. (noop) (noop)What does your amusement have to do with Java, murphy? (noop) (noop)NaN>Onto a technical issue, why is cthun_202@qmail.net.au (noop)NaN>not being recognized? (noop) (noop)What does your ambiguous question of Cthun have to do with Java, murphy? (noop) (noop) "I had 'volunteered (years back) to support those who do endeavor (noop) to provide free Free Usenet access, support those who offered (noop) subscription based Free Usenet access, nothing more than (noop) cooperation expected in return for what has been many (noop) thousands of hours of work. I note most of those I joined with (noop) are either deceased, severely disabled, or plain ole' MIA.. (noop) now it is my Time. ... (noop) (noop) You just read my last. ... (noop) (noop) For those who think they see me in future times I can only wish (noop) you severe Tinnitus in your dreams. For those who know me (noop) well (eMail, whatever) and see me, know I will be smiling also. (noop) It is to you I say "adieu mein frenz and adios .. grazie' [hugs] (noop) for all the Good Times! May you and yours always bear well (noop) with all Life brings you". (noop) (noop) /0ut" (noop) --murphy (noop) (noop)http://www.uffnet.com/kookkamp/goodbye.htm (noop) (noop)And some people wonder why I call them Famous Last Words. (noop) (noop)P.S. You forgot to include a copy of your trademarked Lits o' Haet, (noop)murphy. Still suffering from memory problems, murphy?
[toc] | [prev] | [next] | [standalone]
| From | thoolen <th00len@th0lenbot.thorium> |
|---|---|
| Date | 2011-11-09 08:28 -0500 |
| Message-ID | <j9dv5f$bdk$1@speranza.aioe.org> |
| In reply to | #9794 |
On 08/11/2011 10:43 PM, murphy wrote:
NaN> Newsgroups: comp.lang.java.programmer
NaN> No, no, a thousand times no!
What does your denial have to do with Java, murphy?
NaN> None of the nasty things that you have said or implied about me
NaN> are at all true.
What does your classic erroneous presupposition have to do with Java,
murphy?
NaN> Are you on crack?
What does your ridiculous question have to do with Java, murphy?
"I had 'volunteered (years back) to support those who do endeavor
to provide free Free Usenet access, support those who offered
subscription based Free Usenet access, nothing more than
cooperation expected in return for what has been many
thousands of hours of work. I note most of those I joined with
are either deceased, severely disabled, or plain ole' MIA..
now it is my Time. ...
You just read my last. ...
For those who think they see me in future times I can only wish
you severe Tinnitus in your dreams. For those who know me
well (eMail, whatever) and see me, know I will be smiling also.
It is to you I say "adieu mein frenz and adios .. grazie' [hugs]
for all the Good Times! May you and yours always bear well
with all Life brings you".
/0ut"
--murphy
http://www.uffnet.com/kookkamp/goodbye.htm
And some people wonder why I call them Famous Last Words.
P.S. You forgot to include a copy of your trademarked Lits o' Haet,
murphy. Still suffering from memory problems, murphy?
[toc] | [prev] | [next] | [standalone]
| From | thoolen <th00len@th0lenbot.thorium> |
|---|---|
| Date | 2011-11-08 16:00 -0500 |
| Message-ID | <j9c58n$3re$1@speranza.aioe.org> |
| In reply to | #9755 |
On 07/11/2011 6:07 PM, murphy wrote:
NaN> Newsgroups: comp.lang.java.programmer
NaN> Yes - identify the lines, genius.
What does your directive to Cthun have to do with Java, murphy?
NaN> Yes - it's very clear.
Classic ambiguity.
NaN> No - it's not.
Non sequitur.
NaN> No - it's not.
Non sequitur.
"I had 'volunteered (years back) to support those who do endeavor
to provide free Free Usenet access, support those who offered
subscription based Free Usenet access, nothing more than
cooperation expected in return for what has been many
thousands of hours of work. I note most of those I joined with
are either deceased, severely disabled, or plain ole' MIA..
now it is my Time. ...
You just read my last. ...
For those who think they see me in future times I can only wish
you severe Tinnitus in your dreams. For those who know me
well (eMail, whatever) and see me, know I will be smiling also.
It is to you I say "adieu mein frenz and adios .. grazie' [hugs]
for all the Good Times! May you and yours always bear well
with all Life brings you".
/0ut"
--murphy
http://www.uffnet.com/kookkamp/goodbye.htm
And some people wonder why I call them Famous Last Words.
P.S. You forgot to include a copy of your trademarked Lits o' Haet,
murphy. Still suffering from memory problems, murphy?
[toc] | [prev] | [next] | [standalone]
| From | Daniel Pitts <newsgroup.nospam@virtualinfinity.net> |
|---|---|
| Date | 2011-11-07 08:46 -0800 |
| Message-ID | <UXTtq.21434$Pm3.19955@newsfe12.iad> |
| In reply to | #9560 |
On 11/4/11 8:03 PM, Jan Burse wrote: > Dear All, > > Value objects are some well known immutable > datastructures, when an operation is applied, > typically simply a new object is created. So > for example doing: > > 3 = 1 + 2 > > With java.lang.Integer objects would involve > creating a new Integer with value left.intValue() > + right.intValue(). > > But instead of call the constructor, one can also call > Integer.valueOf(), and there you have some sharing. > Namely the class Integer caches the value objects for > small values (at least the last time I looked into > the Oracle source, it was there...). > > More elaborate sharing is seen in the String class > by the substring() operation. This operation does > reuse the original character array and only encapsulates > the offset and the length in a new object. I wouldnt > recomende that to get one character from a 1 MB > long string, since it will prevent the original > character array from GC. But in some situation this > is quite handy. > > I am now looking for immutable datastructures with > a similar sharing. In the String class example, the > operation was substring() that produced a new immutable > object. I am looking for: > > Some stack class, where: (Easy) > pop() creates a new immutable stack > push() creates a new immutable stack > With good sharing. > > Some queue class, where: (Hard?) > enqueue() creates a new immutable queue > dequeue() creates a new immutable queue > With good sharing. > > What is your favorite datastructure? > > Bye Linked list will definitely work well as a "shared" stack object, because the "tail" of any given stack doesn't change with the operations. As far as the queue goes, you run the risk of packratting if you share the underlying data structure. AFAIK, there are three common ways to implement a straight (as opposed to priority) queue. 1. Linked lists with a head and tail reference 2. Array list with a tail reference, and dequeue shifts all data. 3. Array list with a head and tail reference. Known as a ring deque. With the array approaches, you need to clear release the head reference on dequeue to avoid packratting. This happens automatically with the linked list. This means they can't be "immutable" as dequeue must be mutative. For the linked list approach, enqueue is the problematic operation. A new tail must be appended and the old tail pointer made to point to it. That operation changes the "next" value in the old tail. So, you can decide "share on enqueue, copy on dequeue" or "copy on enqueue, share on dequeue". Based on requirements of your use-case, you can choose the appropriate alternative. You can't have both, but if you can get halfway there.
[toc] | [prev] | [standalone]
Page 5 of 5 — ← Prev page 1 2 3 4 [5]
Back to top | Article view | comp.lang.java.programmer
csiph-web