[racket-users] pict3d and pixel maps for textures

2019-09-21 Thread Hendrik Boom
Is there a way to paste a pixel map (such as a .png ?) to
a face of one of the objects in pict3d?  If so, I haven't found it.

I'd like to paint the objects with interesting textures.

-- hendrik

-- 
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/20190922025455.r6wbqdr5dv2blcvg%40topoi.pooq.com.


Re: [racket-users] syntax-parse and iterecursion

2019-09-21 Thread Hendrik Boom
On Sat, Sep 21, 2019 at 08:01:16PM -0400, Hendrik Boom wrote:
> On Sat, Sep 21, 2019 at 04:44:47PM -0400, Philip McGrath wrote:
> > I'm not sure if I understand your question; do you mean something like this?
> > #lang racket
> > (require syntax/parse/define)
> > (define-syntax-parser macro-list
> >   [(_)
> >#'null]
> >   [(_ x0 x ...)
> >#'(cons x0 (macro-list x ...))])
> > (macro-list 1 2 3 4 5)
> > 
> > -Philip
> 
> Yes.. That might do the trick!

In fact, I must have tried something like that, had it fail for irrelevant 
but misunderstood reasons, and figured it wouldn't work... 

-- hendrik

> 
> > 
> > 
> > On Sat, Sep 21, 2019 at 4:29 PM Hendrik Boom  wrote:
> > 
> > > I've read the syntax-parse and its documentation, and I'd like to know
> > > if there's a way for a macro to accept a varying number of parameters
> > > without them having to be handled in a uniform way, spliced into a list.
> > >
> > > I'd like to be able to expand
> > >   (foo a1 a2 a3 a4 a5)
> > > into something like
> > >   (bar a1 (bar a2 (bar a3 (bar a4 (bar a5 (barend))
> > > or even something fancier, something recursively instead of iteratively
> > > defined.
> > > -- hendrik
> > >
> > > --
> > > 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/20190921202908.s7mgnqoxvs4lphgk%40topoi.pooq.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/CAH3z3gZAGw7yoRyGg7_457UUrCfWdeeTLnYS5iCiahUnK%3DvgAQ%40mail.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/20190922000116.vvseni6f5aj3hl3o%40topoi.pooq.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/20190922000754.b6zh3yexfhraf3hm%40topoi.pooq.com.


Re: [racket-users] syntax-parse and iterecursion

2019-09-21 Thread Hendrik Boom
On Sat, Sep 21, 2019 at 04:44:47PM -0400, Philip McGrath wrote:
> I'm not sure if I understand your question; do you mean something like this?
> #lang racket
> (require syntax/parse/define)
> (define-syntax-parser macro-list
>   [(_)
>#'null]
>   [(_ x0 x ...)
>#'(cons x0 (macro-list x ...))])
> (macro-list 1 2 3 4 5)
> 
> -Philip

Yes.. That might do the trick!

-- hendrik

> 
> 
> On Sat, Sep 21, 2019 at 4:29 PM Hendrik Boom  wrote:
> 
> > I've read the syntax-parse and its documentation, and I'd like to know
> > if there's a way for a macro to accept a varying number of parameters
> > without them having to be handled in a uniform way, spliced into a list.
> >
> > I'd like to be able to expand
> >   (foo a1 a2 a3 a4 a5)
> > into something like
> >   (bar a1 (bar a2 (bar a3 (bar a4 (bar a5 (barend))
> > or even something fancier, something recursively instead of iteratively
> > defined.
> > -- hendrik
> >
> > --
> > 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/20190921202908.s7mgnqoxvs4lphgk%40topoi.pooq.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/CAH3z3gZAGw7yoRyGg7_457UUrCfWdeeTLnYS5iCiahUnK%3DvgAQ%40mail.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/20190922000116.vvseni6f5aj3hl3o%40topoi.pooq.com.


Re: [racket-users] schism - scheme to wasm compiler

2019-09-21 Thread Neil Van Dyke

Correction: "see which Scheme implementations come out with *Wasm* backends"


--
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/8670e595-75e3-145a-2b70-d966284175df%40neilvandyke.org.


Re: [racket-users] syntax-parse ellipsis question

2019-09-21 Thread Jonathan Simpson
Thanks. I'm currently running 6.12, so this may be what convinces me to go
ahead and upgrade.

-- Jonathan

On Sat, Sep 21, 2019 at 4:28 PM Philip McGrath 
wrote:

> Use `~@` (sine Racket 7.0):
> (syntax-parse #'(1 2 2 a 2 2 b 2 c)
>   [(1 (~seq n:nat ...+ x) ...)
>#'((~@ n ... x) ...)])
>
> -Philip
>
>
> On Sat, Sep 21, 2019 at 4:15 PM Jonathan Simpson 
> wrote:
>
>> Given this macro that I'm experimenting with:
>>
>> (syntax-parse #'(1 2 2 a 2 2 b 2 c) [(1 (~seq n:nat ...+ x) ...) #'((n
>> ... x) ...)])
>>
>> How would I change it so that it returns #'(2 2 a 2 2 b 2 c) instead of
>> #'((2 2 a) (2 2 b) (2 c)) ?
>>
>> I don't want the parens around the individual sequences that I'm
>> matching, but I haven't figured out a way to do this without using a
>> pattern that forces me to add them in the body of the syntax-parse clause.
>> How can I group the n and x pattern variables in the body without adding
>> parens around them?
>>
>> If could get a syntax class that replaces the (~seq n:nat ...+ x) that
>> might work but I haven't been able to get a syntax class that will do that
>> either.
>>
>> Thanks,
>> Jonathan
>>
>> --
>> 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/55b38c69-a789-4528-be79-0bf48c97f283%40googlegroups.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/CAAt9evnuhsy71%2B%2BcFDzjjJxoQh_Fo0gHbGXGEd%2BFW78Bz5sVAA%40mail.gmail.com.


Re: [racket-users] syntax-parse ellipsis question

2019-09-21 Thread Ryan Culpepper

On 9/21/19 10:15 PM, Jonathan Simpson wrote:

Given this macro that I'm experimenting with:

(syntax-parse #'(1 2 2 a 2 2 b 2 c) [(1 (~seq n:nat ...+ x) ...) #'((n 
... x) ...)])


How would I change it so that it returns #'(2 2 a 2 2 b 2 c) instead of 
#'((2 2 a) (2 2 b) (2 c)) ?


I don't want the parens around the individual sequences that I'm 
matching, but I haven't figured out a way to do this without using a 
pattern that forces me to add them in the body of the syntax-parse 
clause. How can I group the n and x pattern variables in the body 
without adding parens around them?


Use `~@` in the template:

  #'((~@ n ... x) ...)

Ryan

--
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/e0b92a23-9652-3059-b354-cdb50fee9f3b%40ccs.neu.edu.


Re: [racket-users] schism - scheme to wasm compiler

2019-09-21 Thread Neil Van Dyke

caleb wrote on 9/21/19 11:27 AM

I'm a bit of a Racket noob--how extensive of a project is it to get Racket 
running on x R6RS scheme?


I think there's a number of ways to do that, and to scope it, and I want 
to just put some initial thoughts out there, rather than propose 
requirements and particular approach...


I mentioned the Schism thing as proof-of-concept, and to point people at 
Wasm standards questions they might want to get involved in.


If you're asking out of the idea of using a Racket layer/transplant over 
Scism specifically, I'd guess that's a ton of work.  I think it would be 
a ton of work even atop an R6RS, and Schism is still missing a lot of 
work to get to R6RS.


More generally, there are a variety of ways that one could plausibly 
bring Racket and other Schemes back together.  The 
technically-attractive approaches that come to mind would probably need 
funding, or someone who could afford to volunteer a programmer-year or 
more.  (If you instead wanted to distribute the work among multiple 
volunteers, you might need a very lucky matching of volunteers, or a 
manager-year just to try to coordinate that.)


(Software/Internet open standards development seems to tend to be hugely 
difficult.  In Schemes, there's very little money complicating things, 
and there's a nice historical willingness by most Scheme implementations 
to conform to the eventual standard. But going through all the 
interaction, especially broad academic and hobbyist community input, and 
very little production input, to get to the standard, and have it be a 
great standard wrt some goals of the standard and/or of yourself, seems 
likely to be a ton of work.)


(In some standards and open source projects (e.g., Web, Linux, other), 
those with the most funding tend to have more influence than others, 
because they can invest the most work in standards questions, and/or 
they do the most open source development that becomes de facto 
standards.  That dynamic can be better than some alternatives, such as 
things people need never getting done, because people are deadlocked in 
debate or don't have the funding, though of course it has risks or 
downsides, too.  Usually, the best-funded party is moderated by a desire 
for buy-in from other participants, who have other options.)


I'm not discouraging work like the above -- and I would like to see 
Racket and other Scheme implementations/descendants reunited in a good 
way -- only saying I think it's probably a ton of work, so don't assume 
it's something you can do in a month of evenings and weekends.  Unless 
you find a way to scope it to a smaller problem that still satisfies 
your particular hard requirements.


For people preferring to write in Racket, but who have a hard 
requirement to target Wasm, adding a Wasm backend to Racket might be the 
quickest viable way.  Or give up on the Racket requirement, see which 
Scheme implementations come out with Racket backends (or make your own), 
and start porting/adapting Racket features you need/want atop those 
implementations (and/or atop RnRS, but RnRS alone might not be 
sufficient primitives for what you need, to do it well).


--
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/26edc829-d2dc-74ac-0444-e3cf8868a369%40neilvandyke.org.


Re: [racket-users] syntax-parse and iterecursion

2019-09-21 Thread Philip McGrath
I'm not sure if I understand your question; do you mean something like this?
#lang racket
(require syntax/parse/define)
(define-syntax-parser macro-list
  [(_)
   #'null]
  [(_ x0 x ...)
   #'(cons x0 (macro-list x ...))])
(macro-list 1 2 3 4 5)

-Philip


On Sat, Sep 21, 2019 at 4:29 PM Hendrik Boom  wrote:

> I've read the syntax-parse and its documentation, and I'd like to know
> if there's a way for a macro to accept a varying number of parameters
> without them having to be handled in a uniform way, spliced into a list.
>
> I'd like to be able to expand
>   (foo a1 a2 a3 a4 a5)
> into something like
>   (bar a1 (bar a2 (bar a3 (bar a4 (bar a5 (barend))
> or even something fancier, something recursively instead of iteratively
> defined.
> -- hendrik
>
> --
> 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/20190921202908.s7mgnqoxvs4lphgk%40topoi.pooq.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/CAH3z3gZAGw7yoRyGg7_457UUrCfWdeeTLnYS5iCiahUnK%3DvgAQ%40mail.gmail.com.


[racket-users] syntax-parse and iterecursion

2019-09-21 Thread Hendrik Boom
I've read the syntax-parse and its documentation, and I'd like to know
if there's a way for a macro to accept a varying number of parameters
without them having to be handled in a uniform way, spliced into a list.

I'd like to be able to expand
  (foo a1 a2 a3 a4 a5)
into something like
  (bar a1 (bar a2 (bar a3 (bar a4 (bar a5 (barend))
or even something fancier, something recursively instead of iteratively defined.
-- hendrik

-- 
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/20190921202908.s7mgnqoxvs4lphgk%40topoi.pooq.com.


Re: [racket-users] syntax-parse ellipsis question

2019-09-21 Thread Jens Axel Søgaard
Den lør. 21. sep. 2019 kl. 22.15 skrev Jonathan Simpson :

> Given this macro that I'm experimenting with:
>
> (syntax-parse #'(1 2 2 a 2 2 b 2 c) [(1 (~seq n:nat ...+ x) ...) #'((n ...
> x) ...)])
>
> How would I change it so that it returns #'(2 2 a 2 2 b 2 c) instead of
> #'((2 2 a) (2 2 b) (2 c)) ?
>
> I don't want the parens around the individual sequences that I'm matching,
> but I haven't figured out a way to do this without using a pattern that
> forces me to add them in the body of the syntax-parse clause. How can I
> group the n and x pattern variables in the body without adding parens
> around them?
>
> If could get a syntax class that replaces the (~seq n:nat ...+ x) that
> might work but I haven't been able to get a syntax class that will do that
> either.
>

Two options:

(syntax-parse #'(1 2 2 a 2 2 b 2 c)
  [(1 (~seq n:nat ...+) x ...) #'(n ... x ...)])

(syntax-parse #'(1 2 2 a 2 2 b 2 c)
  [(1 n:nat ...+ x ...) #'(n ... x ...)])

/Jens Axel

-- 
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/CABefVgxf-ORmDHZsSRv2G46FGbpUiFq7txnHK%2B2gdzEnb0RjYQ%40mail.gmail.com.


Re: [racket-users] syntax-parse ellipsis question

2019-09-21 Thread Philip McGrath
Use `~@` (sine Racket 7.0):
(syntax-parse #'(1 2 2 a 2 2 b 2 c)
  [(1 (~seq n:nat ...+ x) ...)
   #'((~@ n ... x) ...)])

-Philip


On Sat, Sep 21, 2019 at 4:15 PM Jonathan Simpson  wrote:

> Given this macro that I'm experimenting with:
>
> (syntax-parse #'(1 2 2 a 2 2 b 2 c) [(1 (~seq n:nat ...+ x) ...) #'((n ...
> x) ...)])
>
> How would I change it so that it returns #'(2 2 a 2 2 b 2 c) instead of
> #'((2 2 a) (2 2 b) (2 c)) ?
>
> I don't want the parens around the individual sequences that I'm matching,
> but I haven't figured out a way to do this without using a pattern that
> forces me to add them in the body of the syntax-parse clause. How can I
> group the n and x pattern variables in the body without adding parens
> around them?
>
> If could get a syntax class that replaces the (~seq n:nat ...+ x) that
> might work but I haven't been able to get a syntax class that will do that
> either.
>
> Thanks,
> Jonathan
>
> --
> 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/55b38c69-a789-4528-be79-0bf48c97f283%40googlegroups.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/CAH3z3gbJiV8usq3_cfWywdXzyLQPN6xvVTrcb5pJJVKZKpKe2g%40mail.gmail.com.


[racket-users] syntax-parse ellipsis question

2019-09-21 Thread Jonathan Simpson
Given this macro that I'm experimenting with:

(syntax-parse #'(1 2 2 a 2 2 b 2 c) [(1 (~seq n:nat ...+ x) ...) #'((n ... 
x) ...)])

How would I change it so that it returns #'(2 2 a 2 2 b 2 c) instead of 
#'((2 2 a) (2 2 b) (2 c)) ?

I don't want the parens around the individual sequences that I'm matching, 
but I haven't figured out a way to do this without using a pattern that 
forces me to add them in the body of the syntax-parse clause. How can I 
group the n and x pattern variables in the body without adding parens 
around them?

If could get a syntax class that replaces the (~seq n:nat ...+ x) that 
might work but I haven't been able to get a syntax class that will do that 
either.

Thanks,
Jonathan

-- 
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/55b38c69-a789-4528-be79-0bf48c97f283%40googlegroups.com.


RE: [racket-users] scribble defproc looses parenthesis

2019-09-21 Thread jos.koot
Thanks,

Your report shows even weirder things.

Best wishes, Jos

 

De: Gustavo Massaccesi  
Enviado el: 21 September 2019 13:33
Para: Jos Koot 
CC: Racket-Users List 
Asunto: Re: [racket-users] scribble defproc looses parenthesis

 

It looks like an error to me. I made a bug report in 
https://github.com/racket/scribble/issues/211 because it is easy to track the 
problem there. 

 

You can subscribe to the issue to get any update, or I can try to remember to 
post any (big) update here.

 

Gustavo

 

On Sat, Sep 14, 2019 at 2:05 PM Jos Koot mailto:jos.k...@gmail.com> > wrote:

Hi

 

File bug.rkt

 

#lang racket

(define (make-proc) (λ (x (y #f)) (void)))

(provide make-proc)

 

File bug.scrbl

 

#lang scribble/manual

 

@(require

  scribble/core

  scribble/eval

  racket

  "bug.rkt"

  (for-label racket "bug.rkt")

  (for-syntax racket))

@(defmodule "bug.rkt" #:packages ())

@defproc[((make-proc ) (x any/c) (y any/c #f)) any/c]{blah blah}

 

Renders: 

 


 (require "bug.rkt")


 

((make-proc x [y]) → any/c <==<==<==  here a parenthesis is missing.


  x : any/c


  y : any/c = #f

blah blah

 

I suppose this is a bug.

Best wishes, Jos

-- 
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/CAL6KNi3KZtRRBjp9%3D8NpvOqtQz-FBU4cw-_f9OkhsQW4K0owDQ%40mail.gmail.com
 

 .


This email has been scanned by BullGuard antivirus protection.
For more info visit www.bullguard.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/004601d570a2%24ddf68070%2499e38150%24%40gmail.com.


Re: [racket-users] schism - scheme to wasm compiler

2019-09-21 Thread Hendrik Boom
On Sat, Sep 21, 2019 at 09:27:04AM -0600, caleb wrote:
> This is awesome.
> 
> I'm a bit of a Racket noob--how extensive of a project is it to get
> Racket running on x R6RS scheme?

If you mean running R6RS scheme on Racket,
I suspect it's as simple as starting with
#lang r6rs
instead of
#lang racket

Anyone know better?

-- hendrik

> 
> Neil Van Dyke  writes:
> 
> > FYI, a proof-of-concept of compiling a good subset of Scheme to WebAssembly:
> >
> > https://github.com/google/schism
> >
> > It relies on two experimental(?) Wasm features, one of them for PITCH:
> >
> > https://github.com/google/schism#schism-uses-experimental-webassembly-features
> >
> > via https://news.ycombinator.com/item?id=20976927
> >
> > -- 
> > 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/2e5b2277-c9e5-9dd2-66b5-ecddb1368b3b%40neilvandyke.org.
> 
> -- 
> 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/877e61acvr.fsf%40caleb.dev.

-- 
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/20190921163742.p3zx47im6zyacqkt%40topoi.pooq.com.


Re: [racket-users] schism - scheme to wasm compiler

2019-09-21 Thread caleb
This is awesome.

I'm a bit of a Racket noob--how extensive of a project is it to get
Racket running on x R6RS scheme?

Neil Van Dyke  writes:

> FYI, a proof-of-concept of compiling a good subset of Scheme to WebAssembly:
>
> https://github.com/google/schism
>
> It relies on two experimental(?) Wasm features, one of them for PITCH:
>
> https://github.com/google/schism#schism-uses-experimental-webassembly-features
>
> via https://news.ycombinator.com/item?id=20976927
>
> -- 
> 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/2e5b2277-c9e5-9dd2-66b5-ecddb1368b3b%40neilvandyke.org.

-- 
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/877e61acvr.fsf%40caleb.dev.


Re: [racket-users] Re: drracket: disabling tools in edit -> preferences -> tools

2019-09-21 Thread 'Wayne Harris' via Racket Users
‐‐‐ Original Message ‐‐‐
On Friday, September 20, 2019 3:04 PM, gfb  wrote:

> Yes, the  How To Design Programs  (and possibly  DeinProgramm ) tool relies 
> on the  Test Engine  tool.
>
> If you have a moment to do so, I'd encourage filing this consequence as an 
> issue on GitHub.

Done.

  https://github.com/racket/drracket/issues/308

Thanks!

-- 
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/kle0TKvNdodiX54UoQ8ezgY0YTfrE-s39ddOtTkB_ZrTBYsyzEGzMXHILmJMy0rKJEA0jbpxQZauzH0kk6w7S3iOGpPDzaoLNbgQPalBVoM%3D%40protonmail.com.


Re: [racket-users] scribble defproc looses parenthesis

2019-09-21 Thread Gustavo Massaccesi
It looks like an error to me. I made a bug report in
https://github.com/racket/scribble/issues/211 because it is easy to track
the problem there.

You can subscribe to the issue to get any update, or I can try to remember
to post any (big) update here.

Gustavo

On Sat, Sep 14, 2019 at 2:05 PM Jos Koot  wrote:

> Hi
>
>
>
> File bug.rkt
>
>
>
> #lang racket
>
> (define (make-proc) (λ (x (y #f)) (void)))
>
> (provide make-proc)
>
>
>
> File bug.scrbl
>
>
>
> #lang scribble/manual
>
>
>
> @(require
>
>   scribble/core
>
>   scribble/eval
>
>   racket
>
>   "bug.rkt"
>
>   (for-label racket "bug.rkt")
>
>   (for-syntax racket))
>
> @(defmodule "bug.rkt" #:packages ())
>
> @defproc[((make-proc ) (x any/c) (y any/c #f)) any/c]{blah blah}
>
>
>
> Renders:
>
>
>
>  (require "bug.rkt")
>
>
>
> ((make-proc *x* [*y*]) → any/c ççç  here a parenthesis is missing.
>
>   *x* : any/c
>
>   *y* : any/c = #f
>
> blah blah
>
>
>
> I suppose this is a bug.
>
> Best wishes, Jos
>
> --
> 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/CAL6KNi3KZtRRBjp9%3D8NpvOqtQz-FBU4cw-_f9OkhsQW4K0owDQ%40mail.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/CAPaha9Mc73nR7Wyjfm8iuB9gvit-k3bve5KG0Sx6%2B9uv3tNiRg%40mail.gmail.com.


Re: [racket-users] How to disable back button in web application

2019-09-21 Thread Jens Axel Søgaard
Den lør. 21. sep. 2019 kl. 10.05 skrev Marc Kaufmann <
marc.kaufman...@gmail.com>:

> Could I use the send/forward to essentially disable forms if I use as the
> `action` attribute on the form an (embed-url ...), which will no longer
> work later on? This will probably through an error if people do the 'Go
> back, resubmit' cycle, but I don't mind throwing an error on that, rather
> than gracefully failing. I'm not going to win any design contests that way,
> but solve a problem without dealing with any database interactions.
>

To avoid using a database, you could use a hash table to store the keys.

/Jens Axel

-- 
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/CABefVgyCy2u84Axa09DpR8UDNMPvAH-30OjN1JhjF7%2BRAdSSpQ%40mail.gmail.com.


Re: [racket-users] How to disable back button in web application

2019-09-21 Thread Marc Kaufmann
I haven't had the time to test it, but I am wondering if  calling
(clear-continuations-table!) which send/forward does will delete all
continuations, even those of other users. So suddenly links that other
users want to use will also get wiped out. I probably won't have time to
test today, but will check later. (I actually don't know how
clear-continuations-table! could delete only continuations of the current
user, since it can't know about users - so my guess is that this will not
work.)

On Sat, Sep 21, 2019 at 10:05 AM Marc Kaufmann 
wrote:

> Could I use the send/forward to essentially disable forms if I use as the
> `action` attribute on the form an (embed-url ...), which will no longer
> work later on? This will probably through an error if people do the 'Go
> back, resubmit' cycle, but I don't mind throwing an error on that, rather
> than gracefully failing. I'm not going to win any design contests that way,
> but solve a problem without dealing with any database interactions.
>
> On Fri, Sep 20, 2019 at 2:03 PM Jens Axel Søgaard 
> wrote:
>
>> Den fre. 20. sep. 2019 kl. 13.51 skrev Marc Kaufmann <
>> marc.kaufman...@gmail.com>:
>>
>>> Thanks Jens, yes the send/forward seems to at least address a few of the
>>> cases that I have - not sure if it disallows the forms unless I use
>>> continuations in the forms (right now I am not, mostly just sending the
>>> request to the current URL. I'll have to see.
>>>
>>> Yes, I worked through and read the Continue tutorial a few times and use
>>> redirect/get to work around the double submit error. But -- I think -- the
>>> redirect/get only avoids something like refreshing the page from leading to
>>> a new submit, although I may be wrong. I thought I used it in some places
>>> where I was able to go back and resubmit. I should double check, since I am
>>> not using redirect/get everywhere, so that may be the issue.
>>>
>>
>> Yes, the redirect trick only prevents the same data (as the result of a
>> "submit" action) being sent twice.
>> If the user goes back to the form, fills in the form again and the click
>> submit again, a new set
>> of data is sent.
>>
>> If you need to prevent the same form being filled in twice, you could
>> associate a key as
>> a hidden form value (say the md5 of a counter) and keep track in a
>> database of which keys
>> have already been used.
>>
>> To prevent the key table from getting too large, you can flip it around:
>> keep the non-used keys in the
>> database, then on submission remove the key. If you also store the age of
>> the key, you can
>> from time to time delete old keys.
>>
>> /Jens Axel
>>
>>
>>
>

-- 
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/CAD7_NO5WnvJ3FKVofUohEW4hvY4TnOMFW4KuJaZ7CsA9S%2Bc27w%40mail.gmail.com.


[racket-users] Interactive Heat Maps

2019-09-21 Thread Alex Harsanyi
A few days ago I posted about adding maps to the DrRacket REPL -- while a 
nice demo, this is not why I implemented the `map-snip%` object.  The 
reason I implemented it is because I wanted to add maps to an interface 
which was designed for displaying plots produced by `plot-snip`.   While 
this is not technically a racket topic, the application itself is written 
in Racket and I think it is a nice showcase of Rackets' GUI capabilities, 
so here is a demo:

https://youtu.be/5Op6ywIqTRc

There is quite lot going  on "behind the scenes" here, and I covered some 
of the topics in this blog post, but if you have any questions I am happy 
to answer them: 
https://alex-hhh.github.io/2019/09/interactive-heat-maps.html

Alex.

-- 
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/ce9135a4-f317-4d6c-a3b7-eb2de88dc310%40googlegroups.com.


Re: [racket-users] How to disable back button in web application

2019-09-21 Thread Marc Kaufmann
Could I use the send/forward to essentially disable forms if I use as the
`action` attribute on the form an (embed-url ...), which will no longer
work later on? This will probably through an error if people do the 'Go
back, resubmit' cycle, but I don't mind throwing an error on that, rather
than gracefully failing. I'm not going to win any design contests that way,
but solve a problem without dealing with any database interactions.

On Fri, Sep 20, 2019 at 2:03 PM Jens Axel Søgaard 
wrote:

> Den fre. 20. sep. 2019 kl. 13.51 skrev Marc Kaufmann <
> marc.kaufman...@gmail.com>:
>
>> Thanks Jens, yes the send/forward seems to at least address a few of the
>> cases that I have - not sure if it disallows the forms unless I use
>> continuations in the forms (right now I am not, mostly just sending the
>> request to the current URL. I'll have to see.
>>
>> Yes, I worked through and read the Continue tutorial a few times and use
>> redirect/get to work around the double submit error. But -- I think -- the
>> redirect/get only avoids something like refreshing the page from leading to
>> a new submit, although I may be wrong. I thought I used it in some places
>> where I was able to go back and resubmit. I should double check, since I am
>> not using redirect/get everywhere, so that may be the issue.
>>
>
> Yes, the redirect trick only prevents the same data (as the result of a
> "submit" action) being sent twice.
> If the user goes back to the form, fills in the form again and the click
> submit again, a new set
> of data is sent.
>
> If you need to prevent the same form being filled in twice, you could
> associate a key as
> a hidden form value (say the md5 of a counter) and keep track in a
> database of which keys
> have already been used.
>
> To prevent the key table from getting too large, you can flip it around:
> keep the non-used keys in the
> database, then on submission remove the key. If you also store the age of
> the key, you can
> from time to time delete old keys.
>
> /Jens Axel
>
>
>

-- 
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/CAD7_NO5-Cz0HNMCa78rDRyRgRyNbW1C2GdFOEg-eSaSyX1XiKA%40mail.gmail.com.