> What have you used them for?
While it's certainly not the most impactful macro in the world, I was
pretty pleased with being able to do this:
https://github.com/GoNZooo/gonz/blob/master/gonz/define-test.rkt
It's a macro that allows me to bundle expected inputs with expected
outputs for those i
I suggest that people posting replies to posts on this email list try to
*minimize* quoting of the previous post(s).
A sufficiently good discussion of this is at:
https://en.wikipedia.org/wiki/Posting_style#Trimming_and_reformatting
Neil V.
--
You received this message because you are subscr
Nice. Thank you, Asumu. That helps.
On Wed, Apr 6, 2016 at 5:39 PM, Asumu Takikawa wrote:
> Hi David,
>
> On 2016-04-06 17:19:05 -0700, David Storrs wrote:
> >Macros are one of the biggest features that people list as the
> advantages
> >of LISP / Scheme, and I don't really understand
> On Apr 6, 2016, at 8:29 PM, Matthew Butterick wrote:
> So you can repair your macro by matching to `y-coord` as a pattern:
>
> ;;;
>
> #lang racket
> (require rackunit)
>
> (define-syntax y-coord
> (syntax-id-rules ()
> [y-coord point-y]))
>
> (struct point (x y))
> (defi
Hi David,
On 2016-04-06 17:19:05 -0700, David Storrs wrote:
>Macros are one of the biggest features that people list as the advantages
>of LISP / Scheme, and I don't really understand them. I get the basics --
>they can create new code structures -- but not the implications What have
> Expanding `y-coord` by itself leads to the error.
I've tripped over this, so just to elaborate slightly.
`syntax-id-rules` will work, but your current macro:
;;;
(define-syntax y-coord
(syntax-id-rules (map)
[(map y-coord lst) (map (lambda (p)
(
I’m trying to create a simple fixed animation with about 2k polygons moving on
a simple background. Not surprisingly, things start to slow down pretty badly
once I’m animating 2k polygons at a time, even when every one of these polygons
is (freeze (rectangle 5 5 ‘solid ‘blue)). My question is th
Hi folks,
Macros are one of the biggest features that people list as the advantages
of LISP / Scheme, and I don't really understand them. I get the basics --
they can create new code structures -- but not the implications What have
you used them for, and what do they do that a function couldn't?
> On Apr 6, 2016, at 2:43 AM, Jay McCarthy wrote:
>
> Hi John,
>
> I'd like to debug the glClear error with you. I'll have to look up the error
> to figure out where to go on it though, so I'll get back to you.
>
> However, the screen you see is expected. The demo has a few modes and the
> d
> On Apr 6, 2016, at 4:31 PM, Jordan Johnson wrote:
>
> On Apr 6, 2016, at 15:18, John Clements wrote:
>> 1) The “stop” procedure is a giant end-of-the-world hammer; I wouldn’t
>> expect it to be useful while a program is running.
>
> OK. It had that feel.
>
>> 2) I hesitate to suggest this,
On Apr 6, 2016, at 15:18, John Clements wrote:
> 1) The “stop” procedure is a giant end-of-the-world hammer; I wouldn’t expect
> it to be useful while a program is running.
OK. It had that feel.
> 2) I hesitate to suggest this, but there is a “pstream-set-volume!” function
> that can silence a
> On Apr 6, 2016, at 11:26 AM, Jordan Johnson wrote:
>
> Hey, so I’m now looking at how to set up background music in rsound with the
> ability to switch tracks. Below is the suggestion from John Clements that
> seems right:
>>> I’m guessing you’re looking for an imperative API that looks some
> On Apr 6, 2016, at 9:02 AM, Matthew Flatt wrote:
>
> If the problem happens after DrRacket has been running for a while,
> then that's good information and definitely a problem to investigate.
I can confirm that (after 3-5 hours of development work) the problem is back.
I also shortened the
Adding `(define y-coord points-y)` should make the original example work
as-is.
Vincent
On Wed, 06 Apr 2016 15:45:56 -0500,
Daniel Prager wrote:
>
> (map point-y points) gives the expected result without recourse to a
> macro.
>
> Or is y-coord intended as a simplified example of something els
This is "bad syntax" for the same reason that `(map or '())` is "bad
syntax".
When the macro expander sees `(map y-coord points)`, it recognizes `map` as
a variable binding and then tries expanding each argument to `map`.
Expanding `y-coord` by itself leads to the error.
You could instead define `
Oops, forgot to include the users list.
_
From: Jos Koot [mailto:jos.k...@gmail.com]
Sent: miércoles, 06 de abril de 2016 23:03
To: 'Richard Adler'
Subject: RE: [racket-users] macros within expressions.
You don't need a macro here. Why not simply:
(map point-y points)
May be your ex
(map point-y points) gives the expected result without recourse to a macro.
Or is y-coord intended as a simplified example of something else?
Dan
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving
I am trying to use a macro, y-coord, in the following way:
(struct point (x y))
(define points (list (point 25 25) (point 33 54) (point 10 120))
(map y-coord points)
I am expecting the result:
'(25 54 120)
and the error is "y-coord: bad syntax in: y-coord
Here is the macro:
(define-syntax y-c
Hey, so I’m now looking at how to set up background music in rsound with the
ability to switch tracks. Below is the suggestion from John Clements that seems
right:
>> I’m guessing you’re looking for an imperative API that looks something like
>> this:
>>
>> (start-playing! stream sound at-time
You would want (== eof), because 'eof' is just an identifier, so
you're binding x to eof.
Jay
On Wed, Apr 6, 2016 at 12:05 PM, rom cgb wrote:
> On Monday, April 4, 2016 at 10:44:46 PM UTC+2, Alex Knauth wrote:
>> I'm convinced that implicit quotes are the root of almost all evil in lisp
>> prog
On Monday, April 4, 2016 at 10:44:46 PM UTC+2, Alex Knauth wrote:
> I'm convinced that implicit quotes are the root of almost all evil in lisp
> programming languages. That's a big reason why I like the teaching languages
> better in terms of things making sense.
>
> It's also why I normally use
At Wed, 06 Apr 2016 11:56:51 -0400, "John Clements" wrote:
>
> > On Apr 6, 2016, at 7:35 AM, Matthew Flatt wrote:
> >
> > I haven't been able to replicate the problem, so far, even though my
> > machine and installation is similar to yours.
> >
> > Do you have a Racket installation on a differe
> On Apr 6, 2016, at 7:35 AM, Matthew Flatt wrote:
>
> I haven't been able to replicate the problem, so far, even though my
> machine and installation is similar to yours.
>
> Do you have a Racket installation on a different machine that you can
> check? Whatever the problem is, my guess is tha
I think `(system-type 'machine)` should use the root security guard
when trying to start "/bin/uname". I'll make that change unless someone
sees a problem with it.
At Wed, 6 Apr 2016 17:08:00 +0200, Sam Tobin-Hochstadt wrote:
> If you're getting the error in the status line, but not when you hit
>
Sensible.
Thanks all.
Tim
On 06/04/16 16:08, Sam Tobin-Hochstadt wrote:
> If you're getting the error in the status line, but not when you hit
> the Run button, then it's because background expansion in DrRacket is
> run in a sandbox that can't execute programs (among other things).
>
> Sam
>
If you're getting the error in the status line, but not when you hit
the Run button, then it's because background expansion in DrRacket is
run in a sandbox that can't execute programs (among other things).
Sam
On Wed, Apr 6, 2016 at 5:05 PM, Tim Brown wrote:
> Not so quick! :-)
>
> I’m allowed t
Not so quick! :-)
I’m allowed to run /bin/uname (-rwxr-xr-x permissions)
So why do I get a permissions error from racket?
Tim
On 06/04/16 14:43, Ryan Culpepper wrote:
> The problem was a use of (system-type 'machine) in racket/unix-socket.
> I've pushed a fix.
>
> Ryan
>
>
> On 04/06/2016 08
Thanks Ryan
On 06/04/16 14:43, Ryan Culpepper wrote:
> The problem was a use of (system-type 'machine) in racket/unix-socket.
> I've pushed a fix.
>
> Ryan
>
>
> On 04/06/2016 08:06 AM, WarGrey Gyoudmon Ju wrote:
>> I met this problem before.
>> (system-type 'machine) uses the output of `uname
I haven't been able to replicate the problem, so far, even though my
machine and installation is similar to yours.
Do you have a Racket installation on a different machine that you can
check? Whatever the problem is, my guess is that it's specific to OS X
(but that's just a guess).
Does it matter
The problem was a use of (system-type 'machine) in racket/unix-socket.
I've pushed a fix.
Ryan
On 04/06/2016 08:06 AM, WarGrey Gyoudmon Ju wrote:
I met this problem before.
(system-type 'machine) uses the output of `uname`.
On Wed, Apr 6, 2016 at 5:47 PM, Tim Brown mailto:tim.br...@cityc.co.
I met this problem before.
(system-type 'machine) uses the output of `uname`.
On Wed, Apr 6, 2016 at 5:47 PM, Tim Brown wrote:
> Folks,
>
> I’m experimenting with creating functions from a PostgreSQL database.
> [Frankly, I’m still getting my head around what I _actually_ want to do
> here, but.
Folks,
I’m experimenting with creating functions from a PostgreSQL database.
[Frankly, I’m still getting my head around what I _actually_ want to do
here, but...]
When I load the following into DrRacket:
;; -
#lang racket/base
(require (for-syntax db racket/ba
On 05/04/2016 21:12, Asumu Takikawa wrote:
I haven't built anything like that, but I was hoping that we could get a GSoC
student for it (that didn't pan out though obviously). The idea was to use
packages from Python/Julia/R as inspiration:
http://pandas.pydata.org/pandas-docs/stable/index.h
PPPJ '16
13th International Conference on Principles and Practices of Programming on the
Java Platform: Virtual Machines, Languages, and Tools
August 29 - September 2, 2016
Lugano, Switzerland
http://manlang16.inf.usi.ch/pppj
In-cooperation with ACM SIGPLAN, SIGSOFT, SIGAPP and SPEC RG
PPPJ '1
34 matches
Mail list logo