Thanks for reminding me of Racket's native comprehensions.
I totally forgot. Thanks!
Scott
On 10/8/2010 1:32 AM, Noel Welsh wrote:
You know Typed Racket supports Racket's native comprehensions, right?
N.
On Fri, Oct 8, 2010 at 3:21 AM, Scott McLoughlin wrote:
I'm wondering if SRFI 42 (e
On Fri, Oct 8, 2010 at 6:56 AM, wrote:
> could somebody please let me know what I have to do?
>
> server source:
> #lang racket
> (require racket/tcp)
> (define listener (tcp-listen 12345))
> (let echo-server ()
> (define-values (in out) (tcp-accept listener))
> (display "received")
Right here,
hello~
I finally made it,sending string to localhost and receive it
but when I try to send to other computer, it doesn't work
does my code has problem?
the source is looks like this
server
#lang racket
(define server (tcp-listen 12345))
(define-values (s-in s-out) (tcp-accept server))
(read-line s-
On Fri, Oct 8, 2010 at 12:39 PM, 김태윤 wrote:
> tcp-connect: connection to 59.4.64.153, port 12345 failed (at step 6: No
> connection could be made because the target machine actively refused it.;
> errno=10061)
> this error is appear as well as when I try to send something while server is
> not run
Please email your responses to the list not (just) me. You'll get more
responses.
On Fri, Oct 8, 2010 at 3:10 PM, 김태윤 wrote:
> there is a router on server computer
> is there any way I can use computer as server with router?
Probably you just need to open a port, which you can do via your
router
hello.
there is a problem when I make an executable file
source is located at c:\
and run.bmp is located at c:\
so in c:\ there are
c:\traffic.rkt
c:\run.bmp
and
in the source file there is a line such as
(define hero (bitmap "run.bmp"))
and I make as an executable file
and execute it.
so far s
define-runtime-path is your friend. Put the images in the same
directory as your code, then
(define-runtime-path here ".")
(define hero (build-path here "run.bmp"))
HTH,
N.
On Fri, Oct 8, 2010 at 4:45 PM, 김태윤 wrote:
> hello.
> there is a problem when I make an executable file
> source is locat
hello
after I define as
(define-runtime-path hero ".")
(define hero (build-path hero "run.bmp"))
and then
when I try to use it with place-image,
place-image: expected as first argument, given: #
appears
what's wrong with me?
thanks in advanced.
2010/10/9 Noel Welsh
> define-runtime-path is
I made an error.
This
> (define hero (build-path hero "run.bmp"))
should be
(define hero
(bitmap
(path->string (build-path hero "run.bmp"
HTH,
N.
_
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
Hi all -
I have a rather curious question - is it possible to write a garbage
collector in a pointerless language such as racket/scheme?
This is not about whether one should do such a thing, but rather trying to
see whether it is possible at all, and if possible what steps/approaches it
will look
On Fri, Oct 8, 2010 at 11:49 AM, YC wrote:
> Hi all -
> I have a rather curious question - is it possible to write a garbage
> collector in a pointerless language such as racket/scheme?
It is possible if the system provides a good API to the underlying
memory architecture. The Scheme standard do
If you are after an eduction, you can just make yourself a big array
and write a compiler / runtime system that uses that array instead of
calling 'cons'.
Shriram's PLAI has a module on garbage collectors that does this
extremely well (by taking away some of the annoying work and letting
you focus
Thanks Robby & Joe - this gives me the sketch I needed to see how it will
work. Thanks again.
On Fri, Oct 8, 2010 at 12:46 PM, Robby Findler
wrote:
> If you are after an eduction, you can just make yourself a big array
> and write a compiler / runtime system that uses that array instead of
> cal
Hi All,
I understand using call-with-exception-handler/with-handlers/etc. to
catch exceptions in a block of code, but I'm at a loss to what the best
way to do a "finally" or cleanup action after a block of code. My
intuition is to use dynamic-wind, but I figure there may be a better way
that I ju
I use dynamic-wind for this. If there is something better, I don't
know what it is. dynamic-wind is a little bit funny though because if
you capture continuations then the in/out handlers can run multiple
times which might defy your expectations. You could set up a
continuation barrier on the insid
Should "racket/base" include something like "unwind-protect"?
The documentation could warn about what this restricts.
I feel bad every time I use "dynamic-wind" to approximate
"unwind-protect", pretending that I don't have first-order
continuations. But often I'm cleaning up one-shot external
Probably you wanted a prompt in that case.
Robby
On Friday, October 8, 2010, Neil Van Dyke wrote:
> Should "racket/base" include something like "unwind-protect"?
>
> The documentation could warn about what this restricts.
>
> I feel bad every time I use "dynamic-wind" to approximate "unwind-prot
OK, thanks. I will take a look at these continuation prompts. Don't
recall seeing them before.
Robby Findler wrote at 10/08/2010 08:25 PM:
Probably you wanted a prompt in that case.
Robby
On Friday, October 8, 2010, Neil Van Dyke wrote:
Should "racket/base" include something like "unwi
One of my students recently sent me this needless email message:
> Well, how would you do switch fall-through in Scheme? Could you
> write a version of the case statement that does that?
Since the honor of Racket was at stake (yes, we can have all the same
stupid features the scripting languages
On Fri, Oct 08, 2010 at 11:49:27AM -0700, YC wrote:
> Hi all -
>
> I have a rather curious question - is it possible to write a garbage
> collector in a pointerless language such as racket/scheme?
It is necessary to limit the amount of dynamic storage the garbage
collector churns through by its
hello
I stuck at defining an image with relative path
when I define as (define image (bitmap "run.bmp")), it works only in my
computer
because there is no run.bmp in other people's computer with exactly same
path
and the compiler does not seems to include the image in the distribution
file
but ju
Oh, and you should make sure your solution generates code that is
linear in the size of the input. Someone just sent me a solution that
works, but I'm pretty sure is quadratic.
Shriram
_
For list-related administrative tasks:
http://lists.racket
Shriram Krishnamurthi wrote at 10/08/2010 09:04 PM:
http://github.com/shriram/cas-cad-e
And using "syntax-rules":
http://www.neilvandyke.org/weblog/2010/10/#2010-10-08
Note that it was unclear to me where the "break" form could appear, so I
restricted it to being at the end of the clau
> Note that it was unclear to me where the "break" form could appear,
> so I restricted it to being at the end of the clause, like how
> people typically use "break" in C-like "switch" forms.
"it was unclear ... so I restricted" = the refuge of rogues.
Here's a test that my version passes:
(defi
Here's a much shorter version that doesn't require goto emulation, and
is also almost syntax-rules-kosher, modulo a syntax parameter for
breaking:
---
#lang racket
(provide cas-cad-e)
(require racket/stxparam)
(define-s
Shriram Krishnamurthi wrote at 10/08/2010 10:42 PM:
"it was unclear ... so I restricted" = the refuge of rogues.
Pirates of the Ambiguous Specification
--
http://www.neilvandyke.org/
_
For list-related administrative tasks:
http://lists.racket
Eli Barzilay wrote at 10/08/2010 10:57 PM:
Here's a much shorter version that doesn't require goto emulation,
Nice. On principle, I was going to trouble to avoid redundant tests, as
well as give the compiler a single optimization-friendly "case" form,
followed by tail calls. In practice, I
On Fri, Oct 8, 2010 at 4:40 PM, Jay McCarthy wrote:
> I use dynamic-wind for this. If there is something better, I don't
> know what it is. dynamic-wind is a little bit funny though because if
> you capture continuations then the in/out handlers can run multiple
> times which might defy your expec
15 minutes ago, Neil Van Dyke wrote:
> Eli Barzilay wrote at 10/08/2010 10:57 PM:
> > Here's a much shorter version that doesn't require goto emulation,
>
> Nice. On principle, I was going to trouble to avoid redundant
> tests, as well as give the compiler a single optimization-friendly
> "case"
I wrote mine without looking at Elis. I like his and mine better than
the others. And obvs I like mine more. =P
#lang racket
(require racket/stxparam)
(define-syntax-parameter break
(λ (stx) (raise-syntax-error 'break "Used outside cas-cad-e" stx)))
(define-syntax-rule (cas-cad-e e [(n ...) code
20 minutes ago, Jay McCarthy wrote:
> I wrote mine without looking at Elis. I like his and mine better than
> the others. And obvs I like mine more. =P
Heh -- I almost did something very close to that, but then got tempted
to do something without the mutations.
--
((lambda (x) (x x)) (
Jay McCarthy wrote at 10/08/2010 11:41 PM:
I wrote mine without looking at Elis. I like his and mine better than the
others. And obvs I like mine more. =P
Mutation?! :)
I suppose that these different solutions might hint at some of our
varying styles or priorities.
My use of "syntax-rul
Mutation that is invisible to the user is fine by me.
Jay
Sent from my iPhone
On Oct 8, 2010, at 10:04 PM, Neil Van Dyke wrote:
> Jay McCarthy wrote at 10/08/2010 11:41 PM:
>> I wrote mine without looking at Elis. I like his and mine better than the
>> others. And obvs I like mine more. =P
>>
Alright, here's the version with no mutation:
(define-syntax-rule (cas-cad-e e [(n ...) code ...] ...)
(let/ec esc
(syntax-parameterize
([break (make-rename-transformer #'esc)])
(let*-values
([(tmp) e]
[(earlier? ret) (values #f (void))]
[(earlier? ret)
8 minutes ago, Jay McCarthy wrote:
> Alright, here's the version with no mutation:
(cas-cad-e 1 [(1) (values 1 2 3)])
In other words:
(define-syntax-rule (cas-cad-e e [(n ...) code ...] ...)
(let/ec esc
(syntax-parameterize ([break (make-rename-transformer #'esc)])
(let*-values ([(tm
You got me
Sent from my iPhone
On Oct 8, 2010, at 10:33 PM, Eli Barzilay wrote:
> 8 minutes ago, Jay McCarthy wrote:
>> Alright, here's the version with no mutation:
>
> (cas-cad-e 1 [(1) (values 1 2 3)])
>
> In other words:
>
> (define-syntax-rule (cas-cad-e e [(n ...) code ...] ...)
> (le
36 matches
Mail list logo