From: Hyunchul  Jay Kim
Subject: re: question - how to get rid of # in print outcome
Date: 
Message-ID: <Pine.SOL.3.96L.990527010249.9055A-100000@titania.phil.cmu.edu>
Help would be greatly appreciated.


How can I get rid of # signs in print outcomes. Because of this, my
pattern matching keeps failing.

I have tried in the following way but no luck.


--------------
[2] USER(27): (setq *print-level* 100)
100
[2] USER(30):  (setq *print-length* 1000)
1000
[2] USER(31): (permute-left-right  '(  v  (~ (& (v  (~ (& p q)) (~ (& s
t)))   q))  (~ (& s t)))      '(v  (v  (~  (v  (~ (& p q)) (~ (& s t)))
)  (~ q) )    (v  (~ s) (~ t))) ))

((((~ (& # q)) (v (~ #) (~ q))) ((~ (& s t)) (v (~ s) (~ t)))) (((~ (& #
q)) (v (~ s) (~ t))) ((~ (& s t)) (v (~ #) (~ q)))))    



Thanks
  =================================
  Hyunchul Jay Kim	           		
  Carnegie-Mellon University     
  ········@cyrus.andrew.cmu.edu  

From: Kent M Pitman
Subject: Re: question - how to get rid of # in print outcome
Date: 
Message-ID: <sfwzp2rm4qn.fsf@world.std.com>
Hyunchul  Jay Kim <········@andrew.cmu.edu> writes:

> Help would be greatly appreciated.
> 
> 
> How can I get rid of # signs in print outcomes. Because of this, my
> pattern matching keeps failing.
> 
> I have tried in the following way but no luck.

> 
> --------------
> [2] USER(27): (setq *print-level* 100)
> 100
> [2] USER(30):  (setq *print-length* 1000)
> 1000

Setting these to NIL would assure that you are not hitting the limit.

> [2] USER(31): (permute-left-right  '(  v  (~ (& (v  (~ (& p q)) (~ (& s
> t)))   q))  (~ (& s t)))      '(v  (v  (~  (v  (~ (& p q)) (~ (& s t)))
> )  (~ q) )    (v  (~ s) (~ t))) ))
> 
> ((((~ (& # q)) (v (~ #) (~ q))) ((~ (& s t)) (v (~ s) (~ t)))) (((~ (& #
> q)) (v (~ s) (~ t))) ((~ (& s t)) (v (~ #) (~ q)))))    

I'm guessing that since these are occurring at a depth less than 100,
you're not setting the right variable.  Now, the variable you set *should*
be the right variable, but I am suspicious of that "[2]" over there and
wondering if you're in a break loop of some kind.  Some systems have
debuggers and other utilities use special secret variables like:

 (let ((result (multiple-value-list (eval user-input))))
   (let ((*print-level* *debug-print-level*)
         (*print-length* *debug-print-length*))
     (print result)))

You can see here that if this is what your system is doing, assigning
*print-level* is not going to help you because the binding you set in the
EVAL won't affect the binding used in the PRINT.  I'd do 
 (apropos "PRINT-LEVEL")
and see if your implementation doesn't have some other magic variable
like this.  Harlequin is riddled with
*debug-print-level*, *trace-print-level*, *eating-breakfast-print-level*,...
pretty much anything you can think of has its own print-level variable
and if you don't set the right one, you get no effect.  This does allow
a lot of precise effect when you want to control just one of these, but
at the cost that it's baffling if you set the wrong one.  I don't know
if you're using their implementation or someone else's but either way,
this is at least one avenue to try.

Another possibility is to set *print-readably* to t and see if you can
force entry to the debugger when the # prints so you can use the stack
debugger to see what you're in the middle of that's causing the # to
be printed.  Using *print-readably* might work since the # won't be
rereadable and if someone has written their printer properly, it should
go into the debugger rather than print the item badly... unless it
has a *debug-print-readably* that it controls in similar fashion.

Good luck.
From: Erik Naggum
Subject: Re: question - how to get rid of # in print outcome
Date: 
Message-ID: <3136793480436417@naggum.no>
* Hyunchul  Jay Kim <········@andrew.cmu.edu>
| How can I get rid of # signs in print outcomes.

  you can print the objects yourself, instead of using the default
  top-level printer.

| Because of this, my pattern matching keeps failing.

  why?  are you cutting and pasting the output somewhere else?

| I have tried in the following way but no luck.

  from the looks of this, I assume Allegro CL.  in which case you should
  have read the manual, too.

  first of all, the normal printer variables control the output of PRINT
  called from your programs.  the top-level frequently has different needs,
  and it would be annoying to have to switch settings between program
  output and top-level output all the time.

  this means your printer variables will take affect only when you call
  PRINT yourself.  the easy way to do this is to do (pprint *) if you don't
  get all of the returned expression printed by the top-level.  PPRINT does
  not return any values (unlike PRINT), so you get what you expect and no
  noise.

  if you do want to change the printer variables that affect the top-level,
  the easiest way to do that is with the :PRINTER-VARIABLES command to the
  top-level loop.

#:Erik
-- 
@1999-07-22T00:37:33Z -- pi billion seconds since the turn of the century