Re: [racket-users] Chez Scheme history

2019-05-23 Thread wanderley.guimar...@gmail.com
Thanks for sharing this.

On Thu, May 23, 2019 at 10:09 AM Josh Rubin  wrote:

> I am just starting to learn Racket. Thank you, all Racket developers.
> I read about the concept of using the Chez Scheme runtime system to
> "host" Racket, so I looked into Chez, and found an interesting paper.
>
> The Development of Chez Scheme by R. Kent Dybvig
> https://www.cs.indiana.edu/%7Edyb/pubs/hocs.pdf
>
> I like its discussion of Scheme implementation issues. I also enjoyed
> reading about the author's evolution as a designer.
>
>
> --
> Josh Rubin
> jlru...@gmail.com
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/e2af79aa-d9a4-5960-4402-58f0c51f6757%40gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Abraço,
Wanderley Guimarães

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAAmHZodEN6Hp%2BsUEg%2BiqD7Ko0mdpNVMZbDdHtfJNgxFYtmVFmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Macro help

2019-05-23 Thread Michael Murdock MacLeod
Does this work? It uses a helper function, `prune`, to parse the var-val 
clauses.

#lang racket

(define-for-syntax (prune stx)
  (syntax-case stx ()
[()
 #'()]
[((var val) others ...)
 (cons #'(var val)
   (prune #'(others ...)))]
[(var others ...)
 (cons #'(var #f)
   (prune #'(others ...)))]))

(define-syntax (aux stx)
  (syntax-case stx ()
[(_ terms ...)
 (with-syntax ([((var val) ...) (prune #'(terms ...))])
   #'(define-values (var ...) (values val ...)))]))

(aux a (b (* 2 pi)) c (d pi))
a
b
c
d

;; output shown below

#f
6.283185307179586
#f
3.141592653589793

On Thursday, May 23, 2019 9:41:17 PM PDT Kevin Forchione wrote:
> Hi guys,
> I’ve been wracking my brains all day trying to come up with a macro that
> would convert this syntax:
> 
> ;; (aux a (b (* 2 pi)) c (d pi))
> ;; => (define-values (a b c d) (values #f 6.28318530717958 #f
> 3.141592653589793)
> 
> 
> I’m missing some part of the picture. The closest I’ve come is to create a
> list of the pairs:
> 
> #lang racket
> 
> (define-syntax (aux stx)
>   (syntax-case stx ()
> [(_ (var val)) #'`((var ,val))]
> [(_ var) #''((var #f))]
> [(_ (var0 val0) var1 ...) #'(append `((var0 ,val0)) (aux var1 ...))]
> [(_ var0 var1 ...) #'(append '((var0 #f)) (aux var1 ...))]))
> 
> (aux a (b (* 2 pi)) c (d pi)) ;=> '((a #f) (b 6.283185307179586) (c #f) (d
> 3.141592653589793))
> 
> 
> Any help is greatly appreciated!
> 
> Kevin


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/2893163.LJ05K77S5N%40alphtsr.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Macro help

2019-05-23 Thread Kevin Forchione
Hi guys,
I’ve been wracking my brains all day trying to come up with a macro that would 
convert this syntax:

;; (aux a (b (* 2 pi)) c (d pi))
;; => (define-values (a b c d) (values #f 6.28318530717958 #f 3.141592653589793)


I’m missing some part of the picture. The closest I’ve come is to create a list 
of the pairs:

#lang racket

(define-syntax (aux stx)
  (syntax-case stx ()
[(_ (var val)) #'`((var ,val))]
[(_ var) #''((var #f))]
[(_ (var0 val0) var1 ...) #'(append `((var0 ,val0)) (aux var1 ...))]
[(_ var0 var1 ...) #'(append '((var0 #f)) (aux var1 ...))]))

(aux a (b (* 2 pi)) c (d pi)) ;=> '((a #f) (b 6.283185307179586) (c #f) (d 
3.141592653589793))


Any help is greatly appreciated!

Kevin

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/AC605DEF-0AC6-4590-B53F-700C6AE14D4D%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Racket Mode documentation

2019-05-23 Thread Greg Hendershott
Recently I consolidated and updated Racket Mode documentation.

It is generated in two formats:

- Info: Installed locally. View in Emacs with `C-h i`.

- HTML: View at .


If you're curious how it's prepared:
.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/87sgt48q9r.fsf%40greghendershott.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Chez Scheme history

2019-05-23 Thread francesco bennardo
Hi Josh, do as done myself: learn both, Chez Scheme and Racket, you will 
not regret it.
For Chez Scheme there is the book of Dybvig online, along with other 
documentation, and for racket I suggest you "Realm of Racket".
One thing want to tell you: with chez scheme I calculate with recursion 
1,000,000! (one million factorial).
Try this with chez scheme:

(define fact
  (lambda (n)
(cond ((= n 0) 1)
  (else (* n (fact (- n 1)))

Then give 100.

Racket will do too, but chez scheme is more fast.
A nice day for you
Francesco

Il giorno giovedì 23 maggio 2019 19:09:55 UTC+2, Josh Rubin ha scritto:

> I am just starting to learn Racket. Thank you, all Racket developers. 
> I read about the concept of using the Chez Scheme runtime system to 
> "host" Racket, so I looked into Chez, and found an interesting paper. 
>
> The Development of Chez Scheme by R. Kent Dybvig 
> https://www.cs.indiana.edu/%7Edyb/pubs/hocs.pdf 
>
> I like its discussion of Scheme implementation issues. I also enjoyed 
> reading about the author's evolution as a designer. 
>
>
> -- 
> Josh Rubin 
> jlr...@gmail.com  
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/362d8c02-86da-4285-ad47-ac83f024e6a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Chez Scheme history

2019-05-23 Thread Josh Rubin

I am just starting to learn Racket. Thank you, all Racket developers.
I read about the concept of using the Chez Scheme runtime system to 
"host" Racket, so I looked into Chez, and found an interesting paper.


The Development of Chez Scheme by R. Kent Dybvig
https://www.cs.indiana.edu/%7Edyb/pubs/hocs.pdf

I like its discussion of Scheme implementation issues. I also enjoyed 
reading about the author's evolution as a designer.



--
Josh Rubin
jlru...@gmail.com


--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/e2af79aa-d9a4-5960-4402-58f0c51f6757%40gmail.com.
For more options, visit https://groups.google.com/d/optout.