[gambit-list] anyone get schelog working with gambit-c?

andrew cooke andrew at acooke.org
Thu Aug 23 23:02:48 EDT 2007


i'm just starting with scheme and, personally, i learn through making
mistakes.  so i, at least, would prefer a language that is consistent to
one that changes semantics for odd corner cases.

andrew

> I understand the importance of different implementations of the same
> language having the same semantics, but are there any reasons why it
> would be a bad thing to create a language , suspiciously similar to
> scheme, where () is self evaluating?
>
> On 8/21/07, Bradley Lucier <lucier at math.purdue.edu> wrote:
>>
>> On Aug 21, 2007, at 10:08 PM, naruto canada wrote:
>>
>> > (%which () %true)
>> >
>> > I get:
>> > *** ERROR -- Ill-formed expression
>> > ()
>>
>> You need a quote to denote the empty list: '()
>>
>> Just two parentheses by themselves is a syntax error in scheme; it's
>> a function call but without a function name.
>>
>> Unfortunately, several scheme implementations accept it as an
>> extension to mean the empty list and so it gets propagated to scheme
>> sources throughout the internets ...
>>
>> > Thanks, it works now, this is what I did.
>> > first, "makeport" couldn't detect my OS, so I modify it:
>> >
>> > ;(set! *operating-system*
>> > ;  (case *dialect*
>> > ;    ((bigloo gambit guile mzscheme petite scm stk)
>> > ;     (cond ((getenv "COMSPEC") 'windows)
>> > ;           (else 'unix)))
>> > ;    ((mitscheme)
>> > ;     (cond ((get-environment-variable "COMSPEC") 'windows)
>> > ;           (else 'unix)))
>> > ;    ((pscheme) 'windows)
>> > ;    (else
>> > ;      (display "What is your operating system? [unix windows]")
>> > ;      (newline)
>> > ;      (read))))
>> > (set! *operating-system* 'unix)
>>
>> I changed makeport.scm to do
>>
>> (set! *operating-system*
>>    (case *dialect*
>>      ((gambit)
>>       (if (getenv "COMSPEC" #f)
>>           'windows
>>           'unix))
>>      ((bigloo guile mzscheme petite scm stk)
>>       (cond ((getenv "COMSPEC") 'windows)
>>             (else 'unix)))
>>      ((mitscheme)
>>       (cond ((get-environment-variable "COMSPEC") 'windows)
>>             (else 'unix)))
>>      ((pscheme) 'windows)
>>      (else
>>        (display "What is your operating system? [unix windows]")
>>        (newline)
>>        (read))))
>>
>>
>> _______________________________________________
>> Gambit-list mailing list
>> Gambit-list at iro.umontreal.ca
>> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>>
>
>
> --
> |/|/ Bendick
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>
>





More information about the Gambit-list mailing list