Reflecting on it as an issue of detecting bound identifiers, I've come up with
a possible approach — could it be this simple, or am I overlooking some
complication?
bound.rkt:
#lang racket
(provide bound/c (rename-out (top~ #%top)))
(define-syntax-rule (top~ . id)
(λ x `(id ,@x)))
(defin
I'm trying to figure out how to make #%top change behavior based on different
kinds of function names, though my experiments keep leading to infinite loops
that blow up DrRacket. Oops.
In my #lang project based on Scribble, I've been using this simple redefinition
of #%top for convenience:
(de
Jon,
You're right, that's the way to do it. I realized that a bit earlier
today and wrote the code for it. Sorry, dumb mistake. I was thinking that I
should do everything in the extension, but instead I create two separate
extensions and just pass a pointer to the objects in scheme. So in shor
> I noticed I could make a copy if I use "array" function provided there. Here
> is its format:
>
> (array shape obj ...)
>
> I mean, in order to make a copy of an array, the idea must be
>
> (array (array-shape the-original) obj ...)
>
> ;however, I wondered how I should express "obj ..." part. Th
Okay. If you want one module to include code from the other, you can
simply include it. If you're worried about multiple definitions of
scheme_initialize, scheme_reload, and scheme_module_name, why wouldn't
you just pull all of the rest of the code -- the common code -- into a
separate file and hav
Hmmm, I haven't had to wrap anything using extern C because all the
function prototypes are in C already I believe (the three I mentioned
above). The main idea here is that I want to reuse my extensions in the
same way that my classes are constructed. I want to write extensions
separately for each
Hello. I have a problem around how to use syntax-case.
Here's a situation.
I'm using SRFI-25, the array library. It is useful; however, it doesn't
provide something like "copy-array". I would not like to use something
"destructive", therefor I would like to make a copy of an array I defined.
I n
For me, I didn't fully appreciate the Y combinator until I had had an
opportunity to play with and explore other combinators.
The book that made this fun for me was "To Mock a Mockingbird", a puzzle
book by Raymond Smullyan.
Chapters 9 and 10 give you all the building blocks you need to appreciat
I'm not entirely sure that I follow, but if you're writing these
extension functions in C++, I believe you'll need to wrap their
prototypes in an extern(C) { ... } block so that they'll be given
un-mangled names for the linker to use.
On Thu, Feb 6, 2014 at 4:56 PM, Cody Eilar wrote:
> I understa
I understand that, the issue is that I have to provide three functions that
are not static so that I can make my c++ code known to scheme. Those
functions are:
scheme_reload(Scheme_Env *env)
scheme_initialize(Scheme_Env *env)
scheme_module_name()
Each one of these functions are known to the linke
We need more animations for this kind of stuff:
http://yinwang0.wordpress.com/2012/04/09/reinvent-y
-- Yin
On Thu, Feb 6, 2014 at 7:24 AM, Matthew Johnson wrote:
> Hi scheme experts,
>
> My question is really a plea for someone to fill in the gaps in a
> derivation of the Y combinator.
>
Right, that's exactly what I've done so far. It's just strange that this
doesn't match up with the usual intuition for ellipses in Racket.
Enhancement for the next release, perhaps?
On Thu, Feb 6, 2014 at 2:52 PM, Robby Findler
wrote:
> Not really.
>
> You can do it like this, tho.
>
> #lang rac
Is there a reason that judgments in Redex don't allow multiple ellipses
after a premise? I have a case where I have a list of lists of items, and I
want to check that a certain property holds on each item. Here's a very
simplified example:
(define-language L)
(define-judgment-form L
#:mode (is-
Two hours ago, Matthias Felleisen wrote:
>
> 2. when you have an expression e and you know it will evaluate to a
Missing at this point: "unary" (which leads to some nice homework to
understand it better).
>function if the evaluation terminates but it may not terminate,
>you can write (la
On Feb 6, 2014, at 10:21 AM, Matthias Felleisen wrote:
>
> On Feb 6, 2014, at 1:05 PM, Prabhakar Ragde wrote:
>
>> Matthew Johnson wrote:
>>
>>> My question is really a plea for someone to fill in the gaps in a
>>> derivation of the Y combinator.
>>
>> This is the source I use as a basis fo
Matthew Johnson wrote:
My question is really a plea for someone to fill in the gaps in a
derivation of the Y combinator.
This is the source I use as a basis for my classroom presentations, with
a few more details thrown in.
http://www.dreamsongs.com/Files/WhyOfY.pdf
--PR
__
On Feb 6, 2014, at 1:05 PM, Prabhakar Ragde wrote:
> Matthew Johnson wrote:
>
>> My question is really a plea for someone to fill in the gaps in a
>> derivation of the Y combinator.
>
> This is the source I use as a basis for my classroom presentations, with a
> few more details thrown in.
>
Matthew, you may wish to read the corresponding chapter in the Little
Schemer/Lisper. It is a available as a sample chapter from my web page. Or go
to a local library and get the book.
Two hints:
1. a lambda-bound name is arbitrary. Just because we use 'length' does not mean
it has anything
Hi scheme experts,
My question is really a plea for someone to fill in the gaps in a
derivation of the Y combinator.
With some effort i've (mostly) understood the explanation of how an
anonymous function might call itself in the following post:
http://www.catonmat.net/blog/derivation-of-ycombina
All,
Please find below the call for papers for the 3rd International Workshop
on Trends In Functional Programming in Education, TFPIE 2014.
Apologies in advance for multiple copies you may receive.
Best regards,
James Caldwell
Call for Papers
__
CALL FOR PAPERS
13th International Conference on
Generative Programming: Concepts & Experiences
(GPCE 2014)
September 15-16, 2014
Västerås, Sweden
(collocated with ASE 2014 and SLE 2014)
http://www.gpce.org
http://www.fac
On Wed, Feb 05, 2014 at 02:16:54PM -1000, Cody Eilar wrote:
> > But what I really want is:
> >
> > Foo_ext.h:
> >
> > func1_racket_ext() { /*... do racket stuff and run func1() */}
> >
> > /* Scheme initializes etc... */
> >
> >
> > Bar_ext.cpp:
> > #include "Foo_ext.h"
> >
> > func2_racket_ext() {
Good morning mister,
I m a student and i have a project withe racket. it s Using DrRacket for
Android App Development to localization some site with map, like a
geolocalisation.
Please help me and please send me an example if you have I'm a newbie in
programming with racket so please make a sim
23 matches
Mail list logo