Re: Interesting Behavior of 'append!' In Local Context

2009-10-17 Thread Stephen Compall
On Sat, 2009-10-17 at 20:36 -0400, Eric McDonald wrote: > Thanks, Stephen. I never really looked at quote as declaring a literal. > I primarily saw its use for suppressing evaluation inside the quoted > entity, and as a convenient shorthand for making lists. I guess it's a > convenient shorthand fo

Re: Interesting Behavior of 'append!' In Local Context

2009-10-17 Thread Eric McDonald
Stephen Compall wrote: > Literals are literally literal. That is to say: > > (define (itsaliteral) '(42 42)) Thanks, Stephen. I never really looked at quote as declaring a literal. I primarily saw its use for suppressing evaluation inside the quoted entity, and as a convenient shorthand for mak

Re: Interesting Behavior of 'append!' In Local Context

2009-10-17 Thread Stephen Compall
On Oct 17, 2009, at 5:28 PM, Eric McDonald wrote: Notice that 'v1' does not seem to be re-initialized in the second invocation of 'foo'. Interestingly, if I run 'bar' with the same data, the problem does not manifest itself: Literals are literally literal. That is to say: (define (itsalitera

Interesting Behavior of 'append!' In Local Context

2009-10-17 Thread Eric McDonald
Hi, Earlier today I ran into an interesting problem, involving the 'append!' statement modifying a local variable in Guile. I'm tempted to call it a bug, but I'm definitely not a Scheme expert and so am hoping someone can provide some enlightenment Suppose that I have two function definitions

Re: scm_shell in C-Thread - Quit vs. Terminal Corruption

2009-10-17 Thread kai . selgrad
Hej linas, thanks for your reply. > > application and guile). When I enter > >        (quit) > > in the terminal scm_shell calls exit(), which does not care much for my > > application cleanup. > wouldn't atexit() solve this problem? Yes, you're right. atexit() would solve this problem. Didn't re

Re: scm_shell in C-Thread - Quit vs. Terminal Corruption

2009-10-17 Thread vimml
Hej again :) On 21:49 Fri 16 Oct , Linas Vepstas wrote: > so you should use atexit, and have the atexit routine do the > tcsetattr -- right? Didn't know about this function. I think I will give it a try. Do you have any idea why this is actually happening? I would expect guile to properly re

Re: scm_shell in C-Thread - Quit vs. Terminal Corruption

2009-10-17 Thread vimml
Hej, thank you both :) > >> shellprompt ~ $ shellprompt ~ $ shellprompt ~ $ > > > > I didn't quite understand everything, Ok, that was a little cryptic, just to clarify myself, I meant: shellprompt ~ $ echo "hello" hello shellprompt ~ $ guile myscript.scm shellprompt ~ $ At this point hittig r

Re: scm_shell in C-Thread - Quit vs. Terminal Corruption

2009-10-17 Thread Ludovic Courtès
Hi, vi...@selgrad.org writes: > - Is there a better way to tell the scheme-thread to terminate? You could use a condition variable (info "(guile) Mutexes and Condition Variables"). > - Why does the code given above mess with my terminal? I don’t know. This happens sometimes with ncurses appli

Re: scm_shell in C-Thread - Quit vs. Terminal Corruption

2009-10-17 Thread Ludovic Courtès
Hi, Linas Vepstas writes: > 2009/10/16 : >> >> Hitting return three times yields: >> shellprompt ~ $ shellprompt ~ $ shellprompt ~ $ > > I didn't quite understand everything, but -- saying > "stty sane" should fix this problem. Alternatively, reset(1) will return the terminal in a normal state