Il giorno 20/mag/2015, alle ore 16.44, Matthew Flatt ha scritto:
> It's been a few years since I last looked at this. If I remember
> correctly, the problem is a mismatch between the `racket/gui` model of
> eventspaces and the way that shutdown notifications and responses work
> in Cocoa. The mis
Here’s one way to do something like that with a macro:
https://github.com/AlexKnauth/define-match-spread-out/blob/master/define-match-spread-out/main.rkt
And using it:
https://github.com/AlexKnauth/define-match-spread-out/blob/master/define-match-spread-out/tests/test.rkt
On May 18, 2015, at 9:39
Would an append/c combinator be a good generalization of this?
I’ve already made an append/c combinator that works with just flat-contracts,
but is there a good way to make it work for chaperone contracts?
https://github.com/AlexKnauth/match-string/blob/master/match-string/main.rkt#L205
http://p
On Tuesday, May 19, 2015 at 12:23:34 AM UTC-4, Alexis King wrote:
> I've recently wanted a contract that lets me check the last element of a
> (potentially improper) list, ignoring the other elements. To do this in a
> general sense, I came up with this.
>
> (define (listof* init/c last/c)
> (
Thank you very much!!
Returning "NSTerminateNow" in the handler works fine me ...
Il giorno 20/mag/2015, alle ore 16.44, Matthew Flatt ha scritto:
> It's been a few years since I last looked at this. If I remember
> correctly, the problem is a mismatch between the `racket/gui` model of
> events
Suppose module foo provides `bar`, and module zam requires foo and also
provides `bar` from foo. Further suppose that foo contains the main
documentation for `bar`.
When writing Scribble docs, I've noticed that `(require (for-label ...))` seems
to resolve exported-name conflicts in favor of the
2htdp/image doesn't support that now, but the "color" argument of
various functions there could be generalized to support a new "brush"
struct (in the way that pen structs work for outline images) that had
a bitmap field to do what you want. The internal helper function
mode-color->brush would have
On Wed, May 20, 2015 at 7:09 PM, Jay McCarthy
wrote:
> The Racket feature of a 'security guard' is not what you want, I
> think. It prevents a block of Racket code from doing things like
> accessing the file system or the network. It is used, for example, by
> evaluation sandboxes to protect agai
2htdp/image makes it easy to draw all sorts of solid shapes (triangles,
squares, stars, etc.) and fill them with a solid color.
But say I want to fill with a texture (say from a bitmap loaded from a
file). I could brute-force it by creating a separate stencil image,
converting both to pixels and c
Hello Jay, and Racketeers.
What the original problem is:
I want my pure Racket Web Server listens on port 80, and this server allows
per-user dynamic content.
As a security problem, no comprehensive solutions exists, it is a big topic
of system administration. In real world, the racket web serv
It's been a few years since I last looked at this. If I remember
correctly, the problem is a mismatch between the `racket/gui` model of
eventspaces and the way that shutdown notifications and responses work
in Cocoa. The mismatch makes it difficult for `racket/gui` to defer its
answer to the OS whi
the way osv.io works : the system doesn't have a userspace. there's a
single memory address space in which the system boots, and at the end of
the init, the only OS process makes a call to the "main" function of the
shared library that has been added to the system. it's not able to spawn
any new pr
As you say, you can build the Racket executable using shared libraries
by configuring with `--enable-shared`. Then, when you create an
executable with `raco exe`, you end up with a smaller executable that
refers to the shared libraries.
I'm not sure how much that will save, since an executable cre
At Tue, 19 May 2015 20:33:57 -0700, Alexis King wrote:
> As I've continued to experiment with this, I've run into something that I
> don't
> really understand. I've managed to come up with this snippet of code.
>
> (define (do prompt-tag)
> (define (loop element continue)
> (if continue
>
j b, hello.
Depending on what this is a cut-down version of, I think you may have slightly
over-engineered it.
> On 2015 May 20, at 13:41, j b wrote:
>
> ; function definition helper
> (define-syntax-rule (define-hash-function f p ...)
> (define (f) (lambda () p ...)))
This defines f to be
Yes, this is over-engineered. What do you not like about
(define h1
(hash
'foo (lambda () (random 100))
'bar (lambda () (random 500
(displayln h1)
(displayln ((hash-ref h1 'foo)))
(displayln ((hash-ref h1 'foo)))
(displayln ((hash-ref h1 'bar)))
(displayln ((hash-ref h1 'bar)))
Onc
I'm new to Racket/Scheme/Lisp. In addition to learning how to use the
language, I also want to do it the "Racket way".
I am trying to put functions into a hash so I could call them using a hash key
lookup (I just use 'random' as a filler in this example for what I really want.
I have it worki
The Racket feature of a 'security guard' is not what you want, I
think. It prevents a block of Racket code from doing things like
accessing the file system or the network. It is used, for example, by
evaluation sandboxes to protect against un-trusted user code. I don't
think you want to run your co
Gregor Kiczales is offering a course on Systematic Program Design
(https://www.edx.org/course/systematic-program-design-part-1-core-ubcx-spd1x)
starting June 2. It promises to be an extended and improved reincarnation
(three! parts) of the coursera offering.
Racket (with various Student Languag
I've never particularly loved racket/generator's interface, but you're right
that it could be a useful base for this sort of abstraction. I do explicitly
want a stream, but I could use in-generator in tandem with sequence->stream to
get that.
That said, I would still be interested in figuring o
20 matches
Mail list logo