'share

Started by newdep, October 08, 2004, 10:24:44 AM

Previous topic - Next topic

newdep

Hi Lutz,



Is this behaviour or a mismatch ? See below ->





> (set 'mem (share))

1073836032



> (string '(hello))

"(hello)"



> (share mem (string '(hello)))



number or string expected : "(hello)"



>





Norman.
-- (define? (Cornflakes))

Lutz

#1
Works fine on FreeBSD and Sun Solaris, cannot test on Linux until tomorrow, Saturday.

~> newlisp
newLISP v.8.2.1 Copyright (c) 2004 Lutz Mueller. All rights reserved.

> (set 'mem (share))
672792576
> (share mem "(hello)")
"(hello)"
> (share mem (string '(hello)))
"(hello)"
>


How to numbers work? And can you run examples/prodcons.lsp ? you run it with a parameter i.e.:



./prodcons.lsp 100



You are running Linux right?



Lutz



ps: also works without doing (share mem "(hello)") first

newdep

#2
HI lutz...



Im running slackware 9.0 and 10.0..



On the 9.0 ->



bash-2.05b$ ./prodcons.lsp 100

-> 1

1 <-

-> 2

2 <-

-> 3

3 <-

-> 4

4 <-

-> 5

5 <-

-> 6

6 <-

-> 7

7 <-

-> 8

8 <-

-> 9

9 <-

-> 10

10 <-

bash-2.05b$ newlisp

newLISP v.8.2.1 Copyright (c) 2004 Lutz Mueller. All rights reserved.



> (set 'mem (share))

1073831936



> (share mem (string '(hello)))



number or string expected : "(hello)"



> (sys-info)

(338 268435456 281 1 0 1024 8201 1)

>





on the 10.0 ->



Exactly the same, BUT the error message is intresting ->



number or string expected : "("hello")"



see the extra... "





Norman.
-- (define? (Cornflakes))

Lutz

#3
After recompiling the released 8.2.1 it turned out that 'share' of strings was broken in all versions. This was a release problem posting a previous to the final 8.2.1.



A 8.2.2 fixing this will be released shortly.



Lutz

newdep

#4
Up and running !



Thanks :-)
-- (define? (Cornflakes))