Tim Bradshaw | 1 Sep 2010 13:46
Gravatar

Re: Isolated: Sym gets 2 identities in a delivered app.


On 29 Aug 2010, at 23:49, Matt Lamari wrote:

> I'd like to understand if this is, by definition of how FASLs are
> created and combined, expected behavior, or if something else is afoot.

I think it's fairly clear that if you dump an uninterned symbol into a FASL file (or really anywhere that is
outside the memory of the running Lisp) then when you load it back in you will get a new symbol, and further
you'll get a new symbol each time you load it, even if you load the same FASL multiple times.

That's pretty much a defining property of uninterned symbols in fact: the only way you can get at them is if
you already have a handle onto them.

Try something like the below: save it to a file, compile it, and then load it repeatedly and call (maybe-add)
and (display-symbols) each time.  You will see it stashing distinct gensyms with the same name in the table
as it is loaded each time.

--tim

--cut--
;;;;
;;;

(in-package :cl-user)

(defvar *symbols* (make-hash-table))

(defun display-symbols ()
  (maphash #'(lambda (k v)
               (format t "~&~S -> ~S~%" k v))
(Continue reading)

Martin Simmons | 1 Sep 2010 16:06
Favicon

Re: gc tuning


>>>>> On Thu, 26 Aug 2010 06:00:51 -0700 (PDT), Art Obrezan said:
> 
> Hello -
> 
> In short: do I need to worry about tunning GC (garbage collector) for server
> applications?
> 
> I have a web application server that seats behind a web server and is
> connected with it via the scgi protocol. The application server serves, that
> obvious, dynamic content. There are logic part, mysql interaction, templates
> output; everything, including the mysql driver, is written in CL. The
> application server is multi-threaded and for each incoming request there is
> a thread (and there is a cap of requests that the app can processes in order
> not to stress things out).
> 
> I use LW Prof 6, 32 bits, Linux. There is a dedicated 32bit small web server
> with 1.7Gb of memory (actually, I use Amazon Cloud services) that runs
> primary lighttpd + this lisp application server.
> 
> Are there tricks, advises on how to tune LW GC for server apps? Or GC is
> smart enough to adapt to every situation so I need not to worry (even
> hypothetically) about it? Does anyone have any experience with GC tuning?

Here is some draft documentation for control of the storage management system,
which we will add to the manual:

General
-------
The storage management is designed with the intention that the programmer will
(Continue reading)

Art Obrezan | 1 Sep 2010 17:01
Picon
Favicon

Re: gc tuning


Many thanks for this draft!

As I got it:

1. I constantly monitor my app with (ROOM).
2. I do (GC-GENERATION T) if the generation 2 grows with time.

And I got that users of 32 bits LW are underpowered in comparison with 64 bits users of LW. :-)

Best,
 Art

> Here is some draft documentation for control of the storage
> management system,
> which we will add to the manual:

Teemu Liikala | 1 Sep 2010 19:52
Picon

CLIM and line-style-thickness

Hi,

 

We are using CLIM for implementing the graphical user interface of our software product. Every once in a while we come across an error:

 

“No applicable methods for #<STANDARD-GENERIC-FUNCTION LINE-STYLE-THICKNESS 217688AA> with args (NIL)”.

 

I guess that that basically means that the defgeneric LINE-STYLE-THICKNESS received NIL (when it was expecting a line-style object).

 

The error seems to cause the application frame in question to become corrupt meaning that the window contents are no longer updated making the GUI quite unusable. Yet, the software still works; it’s just the application frame that is not functioning correctly.

 

It would be interesting to know if somebody else has encountered this kind of a problem, and have you found out any such solutions that would help in preventing this error from taking place? One of the problems is that the error happens only every once in a while when updating the window contents, not always. It also seems to take place more frequently on some machines than on others. We are using LispWorks 6.0 Professional (32-bit) for Windows.

 

With Best Regards,

Teemu Liikala

Erik Huelsmann | 1 Sep 2010 22:58
Picon
Gravatar

Re: Same (uninterned) symbol, two different identities in delivered app?

Hi Matt,

On Sun, Aug 29, 2010 at 2:37 PM, Matt Lamari <matt.lamari <at> gmail.com> wrote:



Thanks, I tested for 2 gensym calls but that is not what's happening.

At the point of "gensym" call it actually uses this (name being a string)

(registered-symbol (gensym (format nil "Symbol_~A_~S_" (if name name "G") (get-internal-real-time))))

This encodes the current time in, AND uses the gensym's counter.  Note - "registered-symbol" is what puts it in the hashtable and returns it.

At point of search (all values displayed as (cons key (object-address key)))

At failure point:
(#:|Symbol_CREATE-RESULT-CONTINUATION_56824_1447894| . 557240340)
not found, in hash table containing (amongst others):

(#:|Symbol_CREATE-RESULT-CONTINUATION_56824_1447894| . 557262316)


I want to find out what makes such a thing possible so that I either isolate some activity or desist.  Is there a case across FASLs that would cause a symbol to be cloned?

 
You're running into the issue that two symbols with the same name don't need to be the same symbol:

 (eq #:x #:x)
--> NIL

but:

 (eq #1=#:x #1#)
--> T

Now, if you have two fasls, both of which cointain an uninterned symbol #:x, how should the reader know it's the same symbol? After all, *all* uninterned symbols are unique?

The problem here is probably in your attempt to store the same (uninterned) symbol in different places and accross sessions.


Bye,

Erik.

Clinton Hyde | 2 Sep 2010 00:35
Picon

Re: CLIM and line-style-thickness

Surely a simple :before or :around wrapper could solve this?


Sent from my iPad

On Sep 1, 2010, at 1:52 PM, "Teemu Liikala" <tliikala <at> gmail.com> wrote:

Hi,

 

We are using CLIM for implementing the graphical user interface of our software product. Every once in a while we come across an error:

 

“No applicable methods for #<STANDARD-GENERIC-FUNCTION LINE-STYLE-THICKNESS 217688AA> with args (NIL)”.

 

I guess that that basically means that the defgeneric LINE-STYLE-THICKNESS received NIL (when it was expecting a line-style object).

 

The error seems to cause the application frame in question to become corrupt meaning that the window contents are no longer updated making the GUI quite unusable. Yet, the software still works; it’s just the application frame that is not functioning correctly.

 

It would be interesting to know if somebody else has encountered this kind of a problem, and have you found out any such solutions that would help in preventing this error from taking place? One of the problems is that the error happens only every once in a while when updating the window contents, not always. It also seems to take place more frequently on some machines than on others. We are using LispWorks 6.0 Professional (32-bit) for Windows.

 

With Best Regards,

Teemu Liikala

Teemu Liikala | 2 Sep 2010 13:56
Picon

Re: CLIM and line-style-thickness

Thanks for the tip! Well, actually it seems that even the following tidbit of code is adequate at least to prevent the error. 
 
(defmethod line-style-thickness (object) 1)
 

With Best Regards,

Teemu Liikala 
 

2010/9/2 Clinton Hyde <chyde <at> cox.net>
Surely a simple :before or :around wrapper could solve this?


Sent from my iPad

On Sep 1, 2010, at 1:52 PM, "Teemu Liikala" <tliikala <at> gmail.com> wrote:

Hi,

 

We are using CLIM for implementing the graphical user interface of our software product. Every once in a while we come across an error:

 

“No applicable methods for #<STANDARD-GENERIC-FUNCTION LINE-STYLE-THICKNESS 217688AA> with args (NIL)”.

 

I guess that that basically means that the defgeneric LINE-STYLE-THICKNESS received NIL (when it was expecting a line-style object).

 

The error seems to cause the application frame in question to become corrupt meaning that the window contents are no longer updated making the GUI quite unusable. Yet, the software still works; it’s just the application frame that is not functioning correctly.

 

It would be interesting to know if somebody else has encountered this kind of a problem, and have you found out any such solutions that would help in preventing this error from taking place? One of the problems is that the error happens only every once in a while when updating the window contents, not always. It also seems to take place more frequently on some machines than on others. We are using LispWorks 6.0 Professional (32-bit) for Windows.

 

With Best Regards,

Teemu Liikala




--
Teemu Liikala (tliikala <at> gmail.com)
Teemu Liikala | 3 Sep 2010 14:20
Picon

Re: CLIM and line-style-thickness

Hi,

Thanks for asking. The software is not web-based, it is local. Well, there are many communications capabilities but at the moment e.g. you cannot use the software with a web browser but you need the "local application". The software product is a simulator where the simulation models are modified and accessed via a CAD-like graphical user interface. The software's GUI is implemented with CLIM and LispWorks. The link below gives some more information.

Teemu
 
2010/9/2 Sheldon Ball <sheldon.ball <at> gmail.com>
Hi Teemu,
 
Nice to see that someone else uses CLIM.
Is your application local or web-based?
 
Thanks,
Sheldon

On Thu, Sep 2, 2010 at 4:56 AM, Teemu Liikala <tliikala <at> gmail.com> wrote:
Thanks for the tip! Well, actually it seems that even the following tidbit of code is adequate at least to prevent the error. 
 
(defmethod line-style-thickness (object) 1)
 

With Best Regards,

Teemu Liikala 
 

2010/9/2 Clinton Hyde <chyde <at> cox.net>

Surely a simple :before or :around wrapper could solve this?


Sent from my iPad

On Sep 1, 2010, at 1:52 PM, "Teemu Liikala" <tliikala <at> gmail.com> wrote:

Hi,

 

We are using CLIM for implementing the graphical user interface of our software product. Every once in a while we come across an error:

 

“No applicable methods for #<STANDARD-GENERIC-FUNCTION LINE-STYLE-THICKNESS 217688AA> with args (NIL)”.

 

I guess that that basically means that the defgeneric LINE-STYLE-THICKNESS received NIL (when it was expecting a line-style object).

 

The error seems to cause the application frame in question to become corrupt meaning that the window contents are no longer updated making the GUI quite unusable. Yet, the software still works; it’s just the application frame that is not functioning correctly.

 

It would be interesting to know if somebody else has encountered this kind of a problem, and have you found out any such solutions that would help in preventing this error from taking place? One of the problems is that the error happens only every once in a while when updating the window contents, not always. It also seems to take place more frequently on some machines than on others. We are using LispWorks 6.0 Professional (32-bit) for Windows.

 

With Best Regards,

Teemu Liikala




--
Teemu Liikala (tliikala <at> gmail.com)




--
Teemu Liikala (tliikala <at> gmail.com)
Haris Bogdanović | 8 Sep 2010 20:15
Picon

toggle breakpoint errors

Hi.

When I try to set a breakpoint
I get errors like
    No definition found - or
    No code at that point
and I cannot set the breakpoint.
What are those errors and how to get rid of them ?

Thanks
Paul Tarvydas | 8 Sep 2010 21:46

Re: toggle breakpoint errors


> Hi.
> 
> When I try to set a breakpoint
> I get errors like
>     No definition found - or
>     No code at that point
> and I cannot set the breakpoint.
> What are those errors and how to get rid of them ?

These "errors" might be due to the optimizer, which is pretty good at rearranging things.  This is a Good
Thing, except, when you want to debug.

Look at the output from the compiler and see what level of optimization you're getting.  Below is the output
from the compiler when I compile for debug rather than production:

;;; Safety = 3, Speed = 0, Space = 0, Float = 1, Interruptible = 1
;;; Compilation speed = 1, Debug = 3, Fixnum safety = 3
;;; Source level debugging is on
;;; Source file recording is  on
;;; Cross referencing is on

(3 means most important)

I use a defsys.sys file and set up the optimization there with something like:

(defsystem rbp (:optimize ((speed 0) (space 0) (safety 3) (debug 3) (float 1)))
...

You can set these options manually at the command line - look in the user guide / hyperspec (declaim,
proclaim, I don't remember) or ask here again, letting us know how you are doing the compilation.

pt


Gmane