Re: Emacs, Geiser and MIT Scheme?

2023-05-31 Thread Nicholas Papadonis
I needed:

(setq geiser-active-implementation '(mit))

and M-x geiser

to get t.scm modeline to show (Scheme Mit/A) and allow evaluation with C-x
C-e.

Questions:

1. I note the evaluated expression from the scheme buffer appears under the
modeline.  When I use MIT Scheme Edwin this appears the same behavior.
When Edwin uses the *scheme* buffer and I evaluate an expression using C-x
C-e the result is printed below the evaluated expression.  How does Geiser
accomplish this?  So far it only appears this functionality is similar
using the *Geiser Mit REPL* buffer.

2. Does Geiser provide the same debugging capabilities of MIT Scheme
Edwin?  Just trying to get a comparison.

Thanks

On Wed, May 31, 2023 at 9:48 PM Nicholas Papadonis <
nick.papadonis...@gmail.com> wrote:

> Does anyone have this combination working?
>
> So far I've been using Edwin which works well, however I am interested in
> trying some of the newer Emacs modes.  I have the following use case which
> appears to fail:
>
> 1. Open latest Emacs
> 2. C-x C-f t.scm
> 3. Modeline reports '(Scheme Gauche/A)'.  I have no idea what Gauche means
> 4. Type in '(+ 1 1)' then evaluate C-x C-e
> 5. Emacs reports 'No Geiser REPL for this buffer (try M-x geiser)
> 6. M-x geiser, then MIT Scheme comes up in *Geiser Mit REPL*
> 7. Try to evaluate '(+ 1 1) again, however the same error reported in Step
> 5 is returned.
>
> Also, general question: What advantages does Geiser provide over Edwin?  I
> think maybe auto-completion suggestions?
>


Emacs, Geiser and MIT Scheme?

2023-05-31 Thread Nicholas Papadonis
Does anyone have this combination working?

So far I've been using Edwin which works well, however I am interested in
trying some of the newer Emacs modes.  I have the following use case which
appears to fail:

1. Open latest Emacs
2. C-x C-f t.scm
3. Modeline reports '(Scheme Gauche/A)'.  I have no idea what Gauche means
4. Type in '(+ 1 1)' then evaluate C-x C-e
5. Emacs reports 'No Geiser REPL for this buffer (try M-x geiser)
6. M-x geiser, then MIT Scheme comes up in *Geiser Mit REPL*
7. Try to evaluate '(+ 1 1) again, however the same error reported in Step
5 is returned.

Also, general question: What advantages does Geiser provide over Edwin?  I
think maybe auto-completion suggestions?


using open-i/o-file function

2021-04-03 Thread Nicholas Papadonis
I'm using MIT Scheme 10.1.5 and am curious why the following code using
open-i/o-file is not working as I expected. Does anyone know what the issue
is?

(define l "~/tmp0")
(define x ''(a b (c d) e f))

(let ((p (open-i/o-file l)))
  (begin (write x p)
 (flush-output p)
 (let ((r (read p)))
   (close-port p)
   r)));Value: #!eof

when I was expecting:

;Value: (quote (a b (c d) e f))

When using open-input-file or open-output-file the results are expected:

(let ((p (open-output-file l)))

  (write x p)

  (close-port p))

(let ((p (open-input-file l)))
  (let ((r (read p)))
(close-port p)
r));Value: (quote (a b (c d) e f))


Currying and binding question

2020-12-02 Thread Nicholas Papadonis
Does function application and variable binding not appear in (pp <>)
output?  I'm trying to understand why (lambda (c))'s variables are not
bound.  Thanks

(define-syntax curry
  (syntax-rules ()
((_ (a) body ...)
 (lambda (a) body ...))
((_ (a b ...) body ...)
 (lambda (a) (curry (b ...) body ...)

curry (a b c) (+ a b c)) 1) 1) 1)
;Value: 3

(pp (((curry (a b c) (+ a b c)) 1) 1))
(lambda (c)
  (+ a b c))
;Unspecified return value


Re: Using the MIT Scheme Stepper (debugging), success

2020-04-03 Thread Nicholas Papadonis
I had some success with the Stepper.

(define (test x)
(car x)
(cdr x))
(test ‘(a b c))

Place cursor at the beginning of (test ‘(a b c))

Then:
M-x step-defun

Then:
press space to step

Seems like a useful feature!

Nick

> On Apr 3, 2020, at 8:18 AM, Nicholas Papadonis  
> wrote:
> 
> I opened runtime/ystep.scm and edwin/eystep.scm and used eval-current-buffer. 
>  There are many unbound variables and the debugger is opened.  Also, what 
> function should be applied to start stepping.
> 
> I’m in the middle of SICP so any guidance on using this interface is 
> appreciated.
> 
> Thanks
> 
>> On Mar 27, 2020, at 3:56 AM, Chris Hanson > <mailto:c...@chris-hanson.org>> wrote:
>> 
>> 
>> The debugger can’t examine what will happen in the future, because that 
>> hasn’t happened yet.
>> 
>> If you want to move forward, you have several options:
>> Resume the program using one of the restarts that are shown when you stop.
>> Evaluate subexpressions in the debugger to see what they do.
>> Run the stepper to evaluate expressions one step at a time.
>> The stepper isn’t documented but the source files are runtime/ystep.scm for 
>> the basic stepper and edwin/eystep.scm for the Edwin stepper interface.  
>> Caveats: the stepper works only for interpreted code, not compiled code, so 
>> you can’t step into compiled code to see what it’s doing.
>> On Mar 26, 2020, 5:20 PM -0700, Nicholas Papadonis 
>> mailto:nick.papadonis...@gmail.com>>, wrote:
>>> When I insert (bkpt) in the code it launches the debugger, it appears the 
>>> debugger can move backwards in subproblems/reductions, however cannot move 
>>> forward past the (bkpt).
>>> 
>>> Is there a way to evaluate expressions forward past the break point?
>>> 
>>> I did not see an option in the debugger help. 
>>> 
>>> Thanks
> 



Using the MIT Scheme Stepper (debugging)

2020-04-03 Thread Nicholas Papadonis
I opened runtime/ystep.scm and edwin/eystep.scm and used eval-current-buffer.  
There are many unbound variables and the debugger is opened.  Also, what 
function should be applied to start stepping.

I’m in the middle of SICP so any guidance on using this interface is 
appreciated.

Thanks

> On Mar 27, 2020, at 3:56 AM, Chris Hanson  wrote:
> 
> 
> The debugger can’t examine what will happen in the future, because that 
> hasn’t happened yet.
> 
> If you want to move forward, you have several options:
> Resume the program using one of the restarts that are shown when you stop.
> Evaluate subexpressions in the debugger to see what they do.
> Run the stepper to evaluate expressions one step at a time.
> The stepper isn’t documented but the source files are runtime/ystep.scm for 
> the basic stepper and edwin/eystep.scm for the Edwin stepper interface.  
> Caveats: the stepper works only for interpreted code, not compiled code, so 
> you can’t step into compiled code to see what it’s doing.
> On Mar 26, 2020, 5:20 PM -0700, Nicholas Papadonis 
> , wrote:
>> When I insert (bkpt) in the code it launches the debugger, it appears the 
>> debugger can move backwards in subproblems/reductions, however cannot move 
>> forward past the (bkpt).
>> 
>> Is there a way to evaluate expressions forward past the break point?
>> 
>> I did not see an option in the debugger help. 
>> 
>> Thanks



Scheme Mode: preventing evaluation of *.pkg when opening?

2020-04-03 Thread Nicholas Papadonis
I downloaded the mit-scheme source and encounter the following behavior when 
opening a file named “runtime.pkg”.

<— snip —>
“The local variables list in runtime.pkg contains values that may not be safe 
(*)”
“Do you want to apply it?”
“Please type y, n, or ! or C-v to scroll”

Then I answer “n” and the same screen is presented again.

Finally the mode line indicates “Scheme Gambit/A”
<— snip —>

Does anyone know what is causing this behavior vs just simply loading the 
buffer?  How do I disable this behavior?

I’m not sure why Emacs is trying to evaluate a buffer when I have not 
instructed it to do so.

Thank you,
Nick




Syntactic keywords, where to find the implementation?

2020-04-02 Thread Nicholas Papadonis
I’m searching to see how (cond) is implemented.  Where would one look for this?

(pp cond)
; Syntactic keyword may not be used as an expression

Thanks


.edwin for X-session available here

2020-04-01 Thread Nicholas Papadonis
Here are the dot files to get some X aesthetics for your Edwin session and 
still allow Edwin to run in non-X as well.

https://github.com/nickpapadonis/home-dot/blob/master/.edwin 

https://github.com/nickpapadonis/home-dot/blob/master/.edwin-x 


I still need to figure out how to get the new frame (C-x 5 2) with similar 
aesthetics.

Hope this helps.

Re: Edwin: Check if in X windows at startup

2020-03-30 Thread Nicholas Papadonis

> On Mar 29, 2020, at 3:12 PM, Matt Birkholz  wrote:
> 
> On Sun, 2020-03-29 at 13:05 -0400, Nicholas Papadonis wrote:
>> Does anyone know how to accomplish this?  Is there a function which returns 
>> whether Edwin is started in X or not?
> 
> (display-type/name (current-display-type))

unbound-variable error when evaluating.

Using MIT Scheme v10

Thanks

Edwin: Check if in X windows at startup

2020-03-29 Thread Nicholas Papadonis
I'm trying to conditionally chose which code to run in the .edwin file at
startup.  This is because some commands like (ref-command
set-foreground-color) cause problems if 'scheme -edit' is started outside
of X windows.

Does anyone know how to accomplish this?  Is there a function which returns
whether Edwin is started in X or not?

Thanks


Re: Breakpoints, stepping forwards?

2020-03-27 Thread Nicholas Papadonis
This was helpful and you answered my question.  Does anyone have an example on 
how to use the stepper?

src/edwin/eystep.scm

shows the interface, however there is no documentation.   The keys do not work 
inside the debugger after a breakpoint, so I’m assuming the stepper is used 
differently than the (bkpt) system.  If anyone can provide a small use case 
that is appreciated.

> On Mar 27, 2020, at 3:56 AM, Chris Hanson  wrote:
> 
> I’m not sure exactly what you’re asking about.
> 
> The debugger can’t examine what will happen in the future, because that 
> hasn’t happened yet.
> 
> If you want to move forward, you have several options:
> Resume the program using one of the restarts that are shown when you stop.
> Evaluate subexpressions in the debugger to see what they do.
> Run the stepper to evaluate expressions one step at a time.
> The stepper isn’t documented but the source files are runtime/ystep.scm for 
> the basic stepper and edwin/eystep.scm for the Edwin stepper interface.  
> Caveats: the stepper works only for interpreted code, not compiled code, so 
> you can’t step into compiled code to see what it’s doing.
> On Mar 26, 2020, 5:20 PM -0700, Nicholas Papadonis 
> , wrote:
>> When I insert (bkpt) in the code it launches the debugger, it appears the 
>> debugger can move backwards in subproblems/reductions, however cannot move 
>> forward past the (bkpt).
>> 
>> Is there a way to evaluate expressions forward past the break point?
>> 
>> I did not see an option in the debugger help. 
>> 
>> Thanks



Breakpoints, stepping forwards?

2020-03-26 Thread Nicholas Papadonis
When I insert (bkpt) in the code it launches the debugger, it appears the
debugger can move backwards in subproblems/reductions, however cannot move
forward past the (bkpt).

Is there a way to evaluate expressions forward past the break point?

I did not see an option in the debugger help.

Thanks


Tracing a procedure defined in a closure?

2020-03-19 Thread Nicholas Papadonis
Does anyone know how to trace functions defined in a closure, without
having to add (trace proc) into the closure?

For instance, this does not trace:
(define (hanoi n)
  (define (pmd from to)
(display "Move ")
(display from)
(display " to ")
(display to)
(newline)
'())
  (define (hanoi-move n from to spare)
(cond ((= n 0) '())
 ((= n 1) (pmd from to))
 (else
  (hanoi-move (- n 1) from spare to)
  (hanoi-move 1 from to spare)
  (hanoi-move (- n 1) spare to from
  (hanoi-move n "A" "B" "C"))
;Value: hanoi

(trace hanoi-move)
;Unspecified return value

(hanoi 2)
Move A to C
Move A to B
Move C to B
;Value: ()

Inserting (trace hanoi-move) to (define (hanoi) ... ) and the trace works.

Thanks


Stack Sampling and uses

2020-03-19 Thread Nicholas Papadonis
I'm learning the profiler in MIT Scheme.  It's my understanding
(with-stack-sampling interval_ms proc) allows sampling, which interrupts
the program and records the return address on the stack.  The two counts
returned # times return address was at the top of the stack, called sampled
count and that the return address was somewhere else on the stack waiting
count.

I decided to run it on the Fibonacci sequence function, however could use
better understanding of interpreting the results.  I'm trying to find the
impact of the factorial function in the output, however could use
guidance.  Does the compiled code have any impact on spotting f's profile
data?

Thanks

(define (f n)
  (if (= n 0)
  1
  (* n (f (- n 1)


(with-stack-sampling 1 (lambda () (f 2) '()))
;  Stack-sampling... done
;  34 samples
;
;  *** Waiting
;
;  31 samples in (runtime user-interface), with-notification, (let),
(lambda):
;   evaluating
;  (let ((.*notification-depth*.1-0 ...))
;(define (swap!) (set! *notification-depth* ...) #!unspecific)
;(shallow-fluid-bind swap! (lambda () ...) swap!))
;   for ### in
;  (let ((v ###)) (set! done? #t) v)
;
;  31 samples in (runtime rep), %repl-eval/write:
;   evaluating
;  (%repl-eval s-expression environment repl)
;   for ### in
;  (hook/repl-write ### s-expression environment repl)
;
;  31 samples in (runtime rep), cmdl/start, (let), (lambda), (let),
(lambda), (let), loop:
;   evaluating
;  (bind-abort-restart
;   cmdl
;   (lambda ()
; (deregister-all-events)
; (with-interrupt-mask interrupt-mask/all ...)))
;   for ### in
;  (loop ###)
;
;  31 samples in (runtime microcode-errors), define-error-handler,
(let), (lambda), (lambda):
;   evaluating
;  (handler continuation)
;   for ### in
;  (begin ### (default-error-handler continuation error-code))
;
;  31 samples in (runtime stack-sampler), with-stack-sampling:
;   evaluating
;  (with-notification
;   (lambda (output-port) (write-string "Stack-sampling" output-port))
;   (lambda () (run-with-stack-sampling sample-interval thunk)))
;   for ### in
;  (### (lambda (value profile) (write-notification-line ...) value))
;
;  31 samples in #[compiled-return-address 14 () #x28 #x110028]:
;   evaluating undefined expression
;
;  31 samples in (runtime stack-sampler), run-with-stack-sampling,
(let):
;   evaluating
;  (with-simple-restart
;   'abort
;   "Abort stack sampling."
;   (lambda () (dynamic-wind register-event ... deregister-event)))
;   for ### in
;  (let ((value-0 ###) (value-1 profile))
;(lambda (receiver) (receiver value-0 value-1)))
;
;  31 samples in (runtime rep), %repl-eval:
;   evaluating
;  (hook/repl-eval s-expression environment repl)
;   for ### in
;  (let ((value ###))
;(repl-history/record! (%record-ref ... 5) value)
;value)
;
;  31 samples in (runtime rep), repl-driver, (let), do-loop:
;   evaluating
;  (if (queue-empty? queue)
;  (let (...) (%repl-eval/write ... environment repl))
;  ((dequeue! queue) repl))
;   for ### in
;  (begin ### (do-loop))
;
;
;  *** Sampled
;
;   3 samples in (runtime interrupt-handler),
after-gc-interrupt-handler:
;   evaluating
;  (begin (trigger-gc-daemons!)
; (clear-interrupts! interrupt-bit/after-gc))
;
;  31 samples in (runtime stack-sampler),
with-stack-sampling-continuation:
;   evaluating
;  (call-with-current-continuation (lambda (continuation) (let ...
...)))
;   for ### in
;  (identity-procedure ###)
;
;
;Value: ()


Are there multiple debugging interfaces in MIT Scheme?

2020-03-19 Thread Nicholas Papadonis
I'm noticing that when setting (bkpt 'a) in a function, the debugger that
is invoked via (debug) is different then when typing a syntactical error
(i.e. undefined function).  In the case of the syntactical error a new
debugger window with Ctrl-P and Ctrl-N is made available and updated in
place.  In the case of the (bkpt) the debugger comes up in the same window
with different set of functions, scrolling the screen.  Is the typical
behavior?

Thanks


Re: Is Scheme pure applicative order evaluation strategy?

2020-03-18 Thread Nicholas Papadonis
So far I found this page:
http://community.schemewiki.org/?sicp-ex-1.6

"The act of re-defining a special form using generic arguments effectively
"De-Special Forms" it. It then becomes subject to applicative-order
evaluation, such that any expressions within the consequent or alternate
portions are evaluated regardless of the predicate."

Therefore it appears Scheme is applicative order except for special forms
like "if"?

Thanks

On Wed, Mar 18, 2020 at 4:23 PM Nicholas Papadonis <
nick.papadonis...@gmail.com> wrote:

> It seems that if the second argument to if is not evaluated.  Thanks!
>
> (define (try a b)
>   (if (= a 0) 1 b))
> ;Value: try
>
> ; Looks like applicative order evaluation:
> (try 0 (/ 1 0))
> ;Division by zero signalled by /.
>
> ; Looks like normal order evaluation from the left
> (if (= 1 1) 1 (/ 1 0))
> ;Value: 1
>
> ; How is it implemented?
> (pp if)
> ;Syntactic keyword may not be used as an expression: #[keyword-value-item
> 16]
>


Is Scheme pure applicative order evaluation strategy?

2020-03-18 Thread Nicholas Papadonis
It seems that if the second argument to if is not evaluated.  Thanks!

(define (try a b)
  (if (= a 0) 1 b))
;Value: try

; Looks like applicative order evaluation:
(try 0 (/ 1 0))
;Division by zero signalled by /.

; Looks like normal order evaluation from the left
(if (= 1 1) 1 (/ 1 0))
;Value: 1

; How is it implemented?
(pp if)
;Syntactic keyword may not be used as an expression: #[keyword-value-item
16]


Using the MIT Scheme debugger, a few questions

2020-03-17 Thread Nicholas Papadonis
I'm transitioning from an imperative development environment and could use
some guidance.  I understand in MIT Scheme how to place a break points,
trace entry/exits and examine the environment.

Is it possible to single step through the evaluation of subproblems?

So far, I've discovered placing a break point on function entry and exit
can be accomplished.  (debug) entered.  However using u/d b/f I'm already
at the newest subproblem and this is the function where I set the break.
Can it be evaluated further?  Is it possible to watch certain arguments and
break on a condition?

Thanks!

(pp f)
(named-lambda (f l c)
  (let ((a 1))
(if (null? l)
c
(f (cdr l) (+ c 1)

(f '(1 2 3) 0)
[Entering #[compound-procedure 19 f]
Args: (1 2 3)
  0]
;Breakpoint on entry
;To continue, call RESTART with an option number:
; (RESTART 4) => Continue from breakpoint.
; (RESTART 3) => Continue with advised procedure.
; (RESTART 2) => Return a value from the advised procedure.
; (RESTART 1) => Return to read-eval-print level 1.

(debug)
There are 14 subproblems on the stack.

Subproblem level: 0 (this is the lowest subproblem level)
Compiled code expression (from stack):
(let ((value ###))
  (repl-history/record! (%record-ref (cmdl/state repl) 5) value)
  value)
 subproblem being executed (marked by ###):
(hook/repl-eval s-expression environment repl)
Environment created by the procedure: %REPL-EVAL

 applied to: ((f (quote (1 2 3)) 0) #[environment 17] #[cmdl 18])
There is no execution history for this subproblem.


Edwin: detecting X session during startup?

2020-03-17 Thread Nicholas Papadonis
I'm using a few commands to change my X session aesthetics:

((ref-command set-foreground-color) "green")
...

Edwin complains during loading if the session is not an X session.  Is
there a variable to check if Edwin is being loaded as an X session, so I
may skip over these functions?

Thank you


Handling errors and RESTART efficiently

2020-03-17 Thread Nicholas Papadonis
In Edwin when MIT Scheme encounters and error, I get an output "...
(RESTART 5)  Start debugger (y or n)".

After using "n" as input, the RESTART list continues to grow with more
errors.

How do folks efficiently handle recovering from error?  Do you type
"RESTART X" every time or is there some function used to make this more
efficient?

Thank you


Autocomplete with R5RS in Edwin?

2020-03-16 Thread Nicholas Papadonis
Is there a way to autocomplete keywords like Geiser does?   Thanks!


Changing Edwin font, problem

2020-03-15 Thread Nicholas Papadonis
Does anyone have pointers on changing the font of an Edwin session?

I'm trying to use a bigger font with an Edwin session under Mac XQuartz
xsession.  I read that M-x set-font RET then hit TAB, shows the fonts,
however when I invoke this command I only see -adobe-courier*.  xfontsel
lists many more fonts than this.  I also read that these functions are
supposed to change the font:

((ref-command set-font) "9x15")
((ref-command set-frame-size) 163 90)

however results in "unbound variable: set-font" output.

I'm using MIT Scheme 9.1.1.

Thank you,


LISP Machines: Keyboards and Keybindings

2019-10-28 Thread Nicholas Papadonis
I'm researching human input devices to these machine and their mapping to
Zmacs and Emacs.  Circulating to Emacs list as well.

Does anyone have insight into the Zmacs keybindings for the Symbolics Space
Cadet and/or Knight SAIL keyboards?  Also any historical input on early
Emacs keybindings?

I am suspicious of where the Emacs mapping of Meta and Control initially
appeared.  For instance on the Knight SAIL (see link below), Meta is much
too far for either hand to rotate to without lifting off the keyboard.  I
have been told that the CTRL key on this keyboard is optimally place so the
hand rotates 30 degrees, exposing a row of diagonal keys which the other
hand can access.  Also, the RUB OUT key is more optimally placed and much
easier than performing M-x delete on modern Emacs.  I am also suspicious
that the Emacs Meta key is really the ALT key above rubout on the Knight
keyboard.  This would make the Knight keyboard much more efficient in Emacs.

I'm less certain for the Symbolics Space Cadet which seems less ergonomic
and less minimalistic.

I tried sa...@symbolics-dks.com and have yet to receive a response.

Appreciated any guidance folks may have.  Also any pointers to patents that
include these machines, software or keyboards.  I'm not even sure what
companies or grantees to search under.

Images:
http://nickpapadonis.com/images-share/keyb/imac-knight.png
http://nickpapadonis.com/images-share/keyb/imac-symbolics-lmi.png

Thanks!


[MIT-Scheme-users] Emacs / Edwin keybinding history, Symbolics and other keyboards?

2019-10-24 Thread Nicholas Papadonis
Hi Folks,

There is a list of early LISP keyboards here with images:
http://xahlee.info/kbd/sail_keyboard.html

Does anyone know the key to function map for these early keyboards?  Also
the intended home and other positions of fingers for the keyboard.

I'm trying to configure my Mac Bluetooth keyboard with similar Emacs
keybindings, however have questions on the above.  I over-layed these
keyboards on my iMac Bluetooth keyboard and found that Command should
really be space or no key.  Option and Control on the left should be
Control.  Option and Left Arrow on the right should be control.  Fn on the
left should be Meta.  Up / down on the right should be Meta.  Caps lock
should be rub out (delete character under cursor?).  I question if the same
physical keys on these keyboards mapped to the same Emacs functions or idea
of a function (before Emacs was created).

Appreciate any guidance you can provide.
___
MIT-Scheme-users mailing list
MIT-Scheme-users@gnu.org
https://lists.gnu.org/mailman/listinfo/mit-scheme-users


Re: [MIT-Scheme-users] Emacs / Edwin keybindings for iMac Bluetooth Keyboard, LSI or Knight?

2019-10-24 Thread Nicholas Papadonis
Additional item: I tried M-x describe-key οn fn, option and control and it
does not work.  I also tried showy -a on the same without a response.
Appreciate any guidance on configuring this.

On Thu, Oct 24, 2019 at 12:26 PM Nicholas Papadonis <
nick.papadonis...@gmail.com> wrote:

> I apologize if this is slightly off topic, however I'm not sure where else
> to ask devoted Schemers this question.
>
> Does anyone have a guidance or solution to create efficient keybindings
> and invocation of Emacs for the iMac Bluetooth keyboard?
>
> Specifically one or more of the following use cases:
>
>- Invocation of Emacs in ssh terminal session to VM with VT100
>emulation within Terminal.app.
>- Invocation of Emacs with X-mode in terminal session to VM within
>Terminal.app.
>- Invocation of Emacs in Mac OS within Terminal.app
>- Invocation of XEmacs in Mac OS
>
> As you can see from above, I'm trying to invoke Emacs from within a VM for
> security reasons.
>
> I'm seeking similar meta and control keybindings as the LMI or Knight
> keyboard and a way to switch back and forth without impact OSX keybindings.
> For instance Meta should be Fn, Control or Option on the iMac Bluetooth
> keyboard. Command should be Control on the iMac Bluetooth keyboard.
>
> I'm hoping some hard core Emacs LISP / Scheme users have such a
> configuration already.
>
> Thank you
>
___
MIT-Scheme-users mailing list
MIT-Scheme-users@gnu.org
https://lists.gnu.org/mailman/listinfo/mit-scheme-users


[MIT-Scheme-users] Emacs / Edwin keybindings for iMac Bluetooth Keyboard, LSI or Knight?

2019-10-24 Thread Nicholas Papadonis
I apologize if this is slightly off topic, however I'm not sure where else
to ask devoted Schemers this question.

Does anyone have a guidance or solution to create efficient keybindings and
invocation of Emacs for the iMac Bluetooth keyboard?

Specifically one or more of the following use cases:

   - Invocation of Emacs in ssh terminal session to VM with VT100 emulation
   within Terminal.app.
   - Invocation of Emacs with X-mode in terminal session to VM within
   Terminal.app.
   - Invocation of Emacs in Mac OS within Terminal.app
   - Invocation of XEmacs in Mac OS

As you can see from above, I'm trying to invoke Emacs from within a VM for
security reasons.

I'm seeking similar meta and control keybindings as the LMI or Knight
keyboard and a way to switch back and forth without impact OSX keybindings.
For instance Meta should be Fn, Control or Option on the iMac Bluetooth
keyboard. Command should be Control on the iMac Bluetooth keyboard.

I'm hoping some hard core Emacs LISP / Scheme users have such a
configuration already.

Thank you
___
MIT-Scheme-users mailing list
MIT-Scheme-users@gnu.org
https://lists.gnu.org/mailman/listinfo/mit-scheme-users


Re: [MIT-Scheme-users] Y-combinator in Scheme, using promise? Error.

2019-05-10 Thread Nicholas Papadonis
This worked!  Thanks

On Fri, May 10, 2019 at 10:12 AM Taylor R Campbell 
wrote:

> > Date: Fri, 10 May 2019 01:28:15 -0400
> > From: Nicholas Papadonis 
> >
> > Does anyone know the proper code for a Y-combinator in Scheme that takes
> an
> > additional argument?  I tried the following solutions.  The non-tail
> > recursive implementation works, however the tail recursive implementaiton
> > fails.  Appreciate any guidance here.  Thanks
> >
> > ;; Y-combinator
> > (define Y
> >   (lambda (f)
> >   ((lambda (x) (f (delay (x x
> >(lambda (x) (f (delay (x x)))
> > ;Value: y
> > ;; end Y-combinator
> >
> > ;; non-tail recursive, works
> > ((Y (lambda (r)
> >   (lambda (x)
> > (if (< x 2)
> > 1
> > (* x ((force r) (- x 1)))
> >5)
> > ;Value: 120
> >
> > ;; Tail reclusive implication, fails.
> > ((Y (lambda (r)
> >   (lambda (x acc)
> > (if (< x 2)
> > acc
> > (r (- x 1) (* x acc))
> >5 1)
> > ;The object #[promise 18] is not applicable.
>
> Try (force r) instead of r.
>
___
MIT-Scheme-users mailing list
MIT-Scheme-users@gnu.org
https://lists.gnu.org/mailman/listinfo/mit-scheme-users


[MIT-Scheme-users] Y-combinator in Scheme, using promise? Error.

2019-05-09 Thread Nicholas Papadonis
Does anyone know the proper code for a Y-combinator in Scheme that takes an
additional argument?  I tried the following solutions.  The non-tail
recursive implementation works, however the tail recursive implementaiton
fails.  Appreciate any guidance here.  Thanks

;; Y-combinator
(define Y
  (lambda (f)
  ((lambda (x) (f (delay (x x
   (lambda (x) (f (delay (x x)))
;Value: y
;; end Y-combinator

;; non-tail recursive, works
((Y (lambda (r)
  (lambda (x)
(if (< x 2)
1
(* x ((force r) (- x 1)))
   5)
;Value: 120

;; Tail reclusive implication, fails.
((Y (lambda (r)
  (lambda (x acc)
(if (< x 2)
acc
(r (- x 1) (* x acc))
   5 1)
;The object #[promise 18] is not applicable.

;; Z-combinator. works.
(define Z
  (lambda (f)
((lambda (g) (f (g g)))
 (lambda (g) (f (lambda args (apply (g g)
args)))
;Value: z

((Z (lambda (r)
  (lambda (x)
(if (< x 2)
1
(* x (r (- x 1))) 5)
;Value: 120
;; end Z-combinator

Nick
___
MIT-Scheme-users mailing list
MIT-Scheme-users@gnu.org
https://lists.gnu.org/mailman/listinfo/mit-scheme-users