at the very least, he may use a fac-simile
(define (for/list from to f)
(if (> from to) '()
(cons (f from)
(for/list (+ 1 from) to f
(define (id x) x)
(define (double n) (+ n n))
(define (fact n) (apply + (for/list 1 n id)))
(for/list 1 10 double)
(for/list 1 10 fact)
(fo
-- Forwarded message --
From: namekuseijin
Date: Thu, Apr 19, 2012 at 1:54 PM
Subject: Re: [racket-dev] `string-split'
To: Sam Tobin-Hochstadt
On Thu, Apr 19, 2012 at 9:28 AM, Sam Tobin-Hochstadt wrote:
> Note that (string-split str ";") works given t
truly, racket seems to do anything string-related by means of regular
expressions, like the usual string-replace one would expect being
available as simply regexp-replace.
You should learn regexes. They're not the one-and-only solution like
in Perl, but they are truly handy in string processing.
On Sun, Apr 8, 2012 at 7:42 AM, Rüdiger Asche wrote:
> I regret that the discussion has taken this strange turn and the ridiculing
> aspects, and I apologize for in parts being responsible for this
> development.
>
> This is not about me (or anybody else) having spare money to spend and
> wanting
hello, Mr. Asche! Please, don't be so harsh.
On Sat, Apr 7, 2012 at 6:40 AM, Rüdiger Asche wrote:
> This just reaffirms my former conviction that nothing is really free, and
> I'd much rather spend my money on a good commercial product (and therebye
> support the people who deserve to have their
sadly enough, I guess I'll miss most of these, as I now rarely restart
the laptop, if ever... :p
On Mon, Apr 2, 2012 at 2:53 PM, Robby Findler
wrote:
> On Mon, Apr 2, 2012 at 12:41 PM, Danny Yoo wrote:
>>> In order to avoid problems similar to the failure that caused
>>> DrRacket to fail to star
so, no named let yet? any inherent javascript shortcoming?
Racket Users list:
http://lists.racket-lang.org/users
BTW, pure racket and gracket are working fine.
On Mon, Mar 26, 2012 at 1:26 PM, namekuseijin wrote:
> Holy Baloney! It's the same here on Windows Vista at work!
>
> the console:
>
> read-bitmap: expects type as 1st argument, given:
> '#
> (# 270 270); other ar
Holy Baloney! It's the same here on Windows Vista at work!
the console:
read-bitmap: expects type as 1st argument, given: '#
(# 270 270); other arguments were: 'unknown/alpha #f #t
=== context ===
C:\Program Files\Racket\collects\racket\draw\private\bitmap.rkt:841:0: read-bitm
ap
C:\Program F
See, great fun indeed. :)
Em 16/02/2012 18:49, "Eli Barzilay" escreveu:
> A few minutes ago, namekuseijin wrote:
> > certainly useless, but much fun. ;)
>
> Not even that.
>
> --
> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
>
certainly useless, but much fun. ;)
Racket Users list:
http://lists.racket-lang.org/users
Looking at:
http://shootout.alioth.debian.org/u64q/program.php?test=spectralnorm&lang=racket&id=3
I stumbled upon this:
;; the big let improves performance by about 20%
(let* ()
... various defs...)
bizarre... why? And is it still true?
BTW, this:
http://shootout.alioth.debian.org/u64q/prog
thanks. Very subtle difference... definitely not a good idea to try
to double an existing variable as an accumulator too...
I reworked it to:
(define (pi4 accuracy)
(let helper ((k 0) (r 0))
(let ((this (* (/ (expt -1 k) (expt 4 k))
(+ (/ 2 (+ (* 4 k) 1))
Hello, this is not really racket-related, for I get same issue with
larceny, for instance. I saw a function at reddit and tried reworking
it into tail-recursion, but it baffles me why last version shouldn't
work.
; original function: works
(define pi
(lambda (accuracy)
(letrec ((helper
suffering emacs veteran detected!
BTW, yeah, R6RS should be in the language menu, if not for anything
other than most developers of Racket voted for it. ;)
_
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
not boring at all.
On Tue, Feb 22, 2011 at 1:43 PM, Robby Findler
wrote:
> And from my perspective, thanks to Matthias for keeping track of all
> this (boring?) history stuff and reminding of the important stuff when
> it matters.
>
> Robby
> _
> F
whoa, a racketeer who gives a shit about haskell! ;)
On Thu, Dec 2, 2010 at 6:58 PM, Robby Findler
wrote:
> http://steve-yegge.blogspot.com/2010/12/haskell-researchers-announce-discovery.html
>
> Robby
> _
> For list-related administrative tasks:
>
safe thing is always the present. future is too uncertain.
On Wed, Nov 17, 2010 at 6:21 PM, Jon Rafkind wrote:
> Is there a known list of either safe or unsafe futures operations? A
> user wanted to know if a certain operation was ok to use in a future
> (without having to test it) and I couldn'
On Wed, Nov 17, 2010 at 4:00 PM, Matthias Felleisen
wrote:
> (define (alist->string.v5 alist)
> (string-join (map (lambda (x) (string-append (symbol->string (car x)) "="
> (number->string (cdr x alist) " "))
don't you guys think it would be slightly more readable if string-join
accepted the
On Wed, Nov 17, 2010 at 5:34 AM, Richard Lawrence
wrote:
> Dear Racketeers:
> For example, suppose I want to consume an association list like
> '((k1 . v1) (k2 . v2) ...)
> and produce a string that looks like:
> "k1=v1 k2=v2 ..."
(join " "
(map (lambda (kv)
(string-append
On Wed, Nov 10, 2010 at 6:00 AM, Taylor R Campbell
wrote:
> I am completely lost in the documentation and implementation of ports.
> Is there a document giving a high-level overview of the design of the
> port abstraction in Racket
http://docs.racket-lang.org/guide/i_o.html
the guide is easier o
On Tue, Nov 9, 2010 at 6:50 PM, Peter Breitsprecher
wrote:
> Ok, here is the exact assignment.
>
> Tiny Scheme Details: The Scheme or LISP that you are going to implement
> should include the following primitives:
hey, it's you lucky day! Tiny Scheme is implemented already and is an
open-source
On Tue, Oct 26, 2010 at 5:11 AM, wrote:
> there must be function right after parenthesis?
no:
'(1 2 3)
'("foo" "bar")
only if list is to be evaluated by not quoting them first element
should evaluate to a function.
> hello~
> while I am learning GUI programming in DrRacket,
> I don't get how s
On Wed, Oct 20, 2010 at 4:50 PM, wrote:
> Are you all also considering some way to conveniently update more than one
> at a time? Functional style is still much more cumbersome than mutation
> style.
>
> (set (set a-world ufo wings right 'damaged) ufo wings left 'broken)
> starts to get cumberso
holy crab! why would someone in his own mind prefer Emacs over a
modern and slick DrRacket environment?
Let the old OS RIP before it gets sentient and wreaks (even more)
havoc onto the world!
On Thu, Oct 14, 2010 at 2:28 AM, Scott McLoughlin wrote:
> I tried (require typed/scheme) in the schem
On Fri, Oct 15, 2010 at 10:05 AM, Phil Bewig wrote:
> Not quite.
> Random numbers are uniformly distributed, so the first digits of a set of
> random numbers should all appear equally.
> Benford's Law most often applies to sets of naturally-occurring numbers that
> are scale-invariant. Consider t
PM, Richard Cleis wrote:
> Ok. But... Carrions de Dwimmerlaik provide funding; they want answers to
> these questions.
>
> RAC
>
> On Oct 14, 2010, at 2:16 PM, Robby Findler
> wrote:
>
>> 'Begone foul dwimmerlaik, lord of carrion! Leave the dead in peace!
? Is Racket interpreted or compiled?"
>
> rac
>
> On Oct 14, 2010, at 12:51 PM, namekuseijin wrote:
>
>> On Thu, Oct 14, 2010 at 3:14 PM, Richard Cleis wrote:
>>> As someone who doesn't know better, I like your post. Can you explain
>>> 'script' ?
On Thu, Oct 14, 2010 at 3:14 PM, Richard Cleis wrote:
> As someone who doesn't know better, I like your post. Can you explain
> 'script' ?
as Larry Wall put it:
"Suppose you went back to Ada Lovelace and asked her the difference
between a script and a program. She'd probably look at you funny,
On Thu, Oct 14, 2010 at 2:10 PM, Vincent St-Amour wrote:
> At Thu, 14 Oct 2010 13:56:16 -0300,
> namekuseijin wrote:
>> (all-d (filter ns (lambda (n) (char=? n d
>> (all-but-d (filter ns (lambda (n) (not (char=? n d))
>
> Sounds like a job for partitio
On Thu, Oct 14, 2010 at 1:10 AM, Shriram Krishnamurthi
wrote:
> Given: A list of numbers. Assume integers (though it isn't necessary
> for the underlying issue).
>
> Task: To determine how often the first digit is 1, the first digit is
> 2, ..., the first digit is 9, and present as a table. You
On Fri, Oct 8, 2010 at 10:04 PM, Shriram Krishnamurthi
wrote:
> 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
On Sat, Sep 18, 2010 at 10:08 PM, Shriram Krishnamurthi
wrote:
> Moby this year is a total rewrite. It implements the Racket VM in
> JavaScript (except, of course, it doesn't have all the gazillion
> primitive operations) -- and is getting control primitives, much of
> the module system, etc.
m
On Tue, Sep 14, 2010 at 5:04 PM, Shriram Krishnamurthi
wrote:
> Can't they already run WeScheme (www.wescheme.org)? Soon with #lang modules,
> etc. Save to the Web, access anywhere, etc. What am I missing?
curious...
well, for once, you're missing named lets... ;)
I wonder what's the deal with
34 matches
Mail list logo