Page 1 of 1

'share

Posted: Fri Oct 08, 2004 5:24 pm
by 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.

Posted: Sat Oct 09, 2004 1:35 am
by Lutz
Works fine on FreeBSD and Sun Solaris, cannot test on Linux until tomorrow, Saturday.

Code: Select all

~> 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

Posted: Sat Oct 09, 2004 8:28 am
by newdep
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.

Posted: Sat Oct 09, 2004 1:00 pm
by Lutz
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

Posted: Sat Oct 09, 2004 2:54 pm
by newdep
Up and running !

Thanks :-)