I am able to define a generative function for tabulate the divisors of 20, so
hopefully tomorrow I can figure out how to abstract it, Im sure I might have a
bit more trouble with the final step I need to figure out for abstraction. I
just wanted to say thanks to wooks and anyone else, I felt ver
Yes, I have completed all the previous challenges, I have completed most 3
times, and some 2 times. For the most part with all the previous challenges I
never had too much trouble. The only other problems that gave me a decent
amount of trouble were the permutation function, and computing natura
Is there a way to make scribble render the result of evaluating examples
as if the examples were run in a student language in DrRacket?
Eg., I'd like to see:
> (define-struct s (f))
> (make-s 1)
(make-s 1)
But when I do:
#lang scribble/doc
@(require scribble/eval
(for-label la
About a minute ago, Mark Engelberg wrote:
> On Sat, Nov 6, 2010 at 10:22 PM, Eli Barzilay wrote:
> > * The `when', `unless', `cond', `case', and `match' forms (in
> > `racket/base' and derived languages) now allow immediate
> > internal definitions.
>
> Can you point me to some examples of th
On Sat, Nov 6, 2010 at 10:22 PM, Eli Barzilay wrote:
> * The `when', `unless', `cond', `case', and `match' forms (in
> `racket/base' and derived languages) now allow immediate internal
> definitions.
Can you point me to some examples of this? I can't find any in the
documentation.
Thanks,
Ma
Racket version 5.0.2 is now available from
http://racket-lang.org/
* Typed Racket's optimizer is now turned on by default; error
messages have been simplified and clarified.
* Contracts: contracts on mutable containers allow functions or
other higher order values, and contracts are checked
I have seen this error occur when you are using DrRacket compilation
and something is out-dated. Restarting DrRacket and/or running from
the command-line doesn't result in the same error for me.
Jay
On Sat, Nov 6, 2010 at 7:39 PM, Danny Yoo wrote:
> I'm trying to reuse the definitions of ASL for
Hi Ken --
Just a quick question to make sure we are all on the "same page," as it
were: have you completed all exercises in prior sections?
Dave
On Sat, Nov 6, 2010 at 2:24 PM, Ken Hegeland wrote:
> Something that looks like this:
>
> (define(tabulate1 n i)
> (cond
> [(> i n)empty]
> [(=(remai
I'm trying to reuse the definitions of ASL for Moby/js-vm, and ran
across a strange macro error. I've reduced a test case to show the
bug:
;; when.rkt
#lang racket
(define-syntax -when
((lambda (dont-care)
(lambda (stx)
(syntax-c
On Sat, Nov 6, 2010 at 11:22 PM, wooks . wrote:
> Of course there are exceptions but as an HTDP grad you are in a minority,
> most of your peers do not code nor think like you. Unless you are fortunate
> to work in an organisation where they do your best chance of being allowed
> to be a good prog
On Sat, Nov 6, 2010 at 6:52 PM, Eric Dobson wrote:
> I don't think that define-predicate will give me a constant time
> branch? because it returns something of type (Any -> Boolean : t), and
> so can't use the fact that the car and cdr are num-trees without
> checking it.
`define-predicate' shoul
>
> I guess I could spend time on rent-a-coder or something but
> practically speaking, it seems to me like everyone cares about a CS
> *degree*, even if they then summarily ignore what was ostensibly
> taught for the degree.
>
> Deren
>
Paul is absolutely right, the key is getting a chance
That's not enough of the program for me to figure out exactly what is
going on. One possibility is that there's a struct embedded in the
scribble zo that is incompatible, although I doubt that since I'm
pretty sure only prefabs can be in zos.
Jay
On Sat, Nov 6, 2010 at 2:03 PM, Carlos Scheidegger
I am working with typed/racket and running into a problem on how to
construct a type predicate. I know about define-predicate, but I don't
think that works in my case.
My code is as follows (Which does not type check):
#lang typed/racket
(define-type num-tree (Rec it (U Number (Pair it it
;(de
Something that looks like this:
(define(tabulate1 n i)
(cond
[(> i n)empty]
[(=(remainder n i)0)(cons i(tabulate1 n(add1 i)))]
[else(tabulat1 n(add1 i))]))
(define(tabulate n)
(tabulate1 n 1))
I
feel like I understand how it works recursively, just the generative
recursion method makes me stru
Four minutes ago, David Van Horn wrote:
> Is it possible to have scribble render these examples in the notation
> they're written down in?
>
> #lang scribble/doc
> @(require scribble/eval)
>
> @examples[5+0i 3/6 #b10101]
Not yet.
http://lists.racket-lang.org/dev/archive/2010-October/004804.htm
An alternative approach.
1. Write a program called tabulate-20 that returns all the factors of 20
starting from 1.
2. Abstract tabulate-20 so that it works for numbers other than 20.
_
For list-related
Is it possible to have scribble render these examples in the notation
they're written down in?
#lang scribble/doc
@(require scribble/eval)
@examples[5+0i 3/6 #b10101]
David
_
For list-related administrative tasks:
http://lists.racket-lang.org/l
Hi Jay,
thank you for your quick response. As you suggested, adding
'#:servlet-namespace (list "posts.rkt")' makes the problem go away -
thank you!
What I still don't understand, though, is how posts.rkt is loading
twice, since all calls to posts.rkt come from the servlet. The full
code is this:
On Sat, Nov 6, 2010 at 12:06 PM, Carlos Scheidegger
wrote:
> Hi,
>
> This must be a simple question, but I'm having some trouble convincing
> Racket that one of my procedure calls respects the required contract,
> and I'm not quite sure how to solve it. I only experience the problem
> when running
For whatever's worth, here's a simple reproduction case with 2 files
of ~25 lines each
http://dl.dropbox.com/u/2785146/repro.tar.gz
To reproduce:
untar that file anywhere, then
$ cd repro; racket
Welcome to Racket v5.0.1.
> (require "posts.rkt")
> (define posts (load-posts "posts"))
> (part->x
Hi,
This must be a simple question, but I'm having some trouble convincing
Racket that one of my procedure calls respects the required contract,
and I'm not quite sure how to solve it. I only experience the problem
when running the code with serve/servlet, so I have a hunch that some
interaction w
I tried to get you to approach this as though nobody had told you about
generative recursion.
In which case you would/should have tried the tried and tested formula you
know, which should have led you to
(tabulate-div 20) and the simple recursion that follows is (tabulate-div 19).
You have
On Sat, Nov 6, 2010 at 8:39 AM, Matthias Felleisen wrote:
> Look up Stalin and port all the libraries for image processing to Racket.
That might be sort of fun.
_
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
On Sat, Nov 6, 2010 at 9:32 AM, 김태윤 wrote:
> is there anyway I can use "VFW (Video For Window)" or "DirectShow camera" in
> racket?
> what I try to do is that get the image from camera in real time
> if I can't use them, then are there any similar way to do it?
If you can find a library to do tha
I have been trying to take a break for the weekend and I am going to try to go
back at it with a fresh perspective Monday.
One
thought I did have though, you said tabulate-div means we want all the
divisors of 20, so the next step would be tab-div(sub1 n), or 19, Im
thinking that would mean a
hello
is there anyway I can use "VFW (Video For Window)" or "DirectShow camera" in
racket?
what I try to do is that get the image from camera in real time
if I can't use them, then are there any similar way to do it?
_
For list-related administrativ
On Nov 6, 2010, at 5:33 AM, 김태윤 wrote:
> hello
> yesterday one of my friend show me his image processing program.
>
> I was so suprised that I am finding about digital image processing.
> (since I heard that lisp and its dialect is good for artificial intelligence)
>
> I think first thing I ha
I have some students who have done all their homework for a grad image
processing class in Racket. I think they've made some efforts to build
libraries that might be able to put on PLaneT, but I'm not sure.
Jay
On Sat, Nov 6, 2010 at 3:33 AM, 김태윤 wrote:
> hello
> yesterday one of my friend show
On Sat, Nov 6, 2010 at 9:52 AM, Neil Van Dyke wrote:
> 김태윤 wrote at 11/06/2010 05:33 AM:
>>
>> I was so suprised that I am finding about digital image processing.
>> (since I heard that lisp and its dialect is good for artificial
>> intelligence)
>
> I do not know whether anyone is yet doing image
김태윤 wrote at 11/06/2010 05:33 AM:
I was so suprised that I am finding about digital image processing.
(since I heard that lisp and its dialect is good for artificial
intelligence)
I do not know whether anyone is yet doing image/video processing in Racket.
If no one else speaks up, I would sug
hello
yesterday one of my friend show me his image processing program.
I was so suprised that I am finding about digital image processing.
(since I heard that lisp and its dialect is good for artificial
intelligence)
I think first thing I have to do is transfer the image from camera to
computer i
32 matches
Mail list logo