One of the first things that attracted me to Racket was the possibility of
programming OS X or maybe even iOS applications in a Lisp-like language. That,
and the promise of being able to build more robust (maybe provably correct is
too strong?) applications for healthcare applications.
Sent fr
Windows does save names in mixed case, but file name comparisons are case
insensitive. I'm not sure normalizing case before saving is actually correct.
Sent from my iPhone
On Mar 2, 2013, at 12:10 PM, "David T. Pierson" wrote:
> On Fri, Mar 01, 2013 at 10:59:06PM -0700, Danny Yoo wrote:
>> In
Love the video! I used to say I wished I could recommend Racket for enterprise
development. But no more. Recent developments, such as the math and db
libraries make it an excellent choice.
Sent from my iPhone
On Feb 8, 2013, at 8:10 AM, Matthias Felleisen wrote:
>
>
> NoStarch and O'Reilly
Very cool. It's available for iOS, too.
Gambit v4.6.4
> (+ 5 2)
7
> (define (f x) (+ x 1))
> (f 4)
5
>
Sent from my iPhone
On Dec 12, 2012, at 8:56 AM, Hendrik Boom wrote:
> Not Racket, but still Scheme. There'a a Gambit app on Android.
Racket Users list:
http://l
Why not important the SRFI library with a prefix?
Sent from my iPhone
On Nov 1, 2012, at 11:43 AM, Mark Engelberg wrote:
> Thanks. Is there a simple way to do it without itemizing the specific
> function names?
>
> I was caught off guard because I was using the new string-trim function.
>
One potential issue is that the Racket and SRFI functions may take different
arguments or have different semantics.
Sent from my iPhone
On Nov 1, 2012, at 11:43 AM, Mark Engelberg wrote:
> Thanks. Is there a simple way to do it without itemizing the specific
> function names?
__
I've been thinking about whether how to implement matrices in Racket. One
obvious option is just to use a vector
;;a matrix with data stored in the vector data
(struct matrix (rows cols [data #:mutable]))
and then entries can be retrieved simply enough
;;return the (i, j)th element of m
;;row
It's funny how working out the probabilities doesn't seem to help. The paradox
is truly stubborn. I can explain why changing doors is the right thing to do,
but it still doesn't " feel" right.
Sent from my iPhone
On Oct 20, 2012, at 8:49 PM, Neil Toronto wrote:
> On 10/20/2012 05:15 PM, Dann
write down every result my dad
> got and then see how random they really were."
>
> On Sat, Oct 20, 2012 at 6:43 PM, Gregory Woodhouse
> wrote:
>> You could have some fun with this. For example, what is the entropy of a
>> sequence of 1000 (or 1) rolls of the dic
You could have some fun with this. For example, what is the entropy of a
sequence of 1000 (or 1) rolls of the dice?
Sent from my iPhone
On Oct 20, 2012, at 4:15 PM, Danny Yoo wrote:
> http://hashcollision.org/vegas-blues/
>
> The tone ended up being a bit bluer than I expected, hence the
Indeed it does! These plots are very nice.
On Oct 16, 2012, at 1:35 PM, Neil Toronto wrote:
> On 10/16/2012 12:02 PM, Michael Wilber wrote:
>> Does surface3d and isosurface3d from racket/plot do what you want?
>>
>> file:///usr/share/racket/doc/plot/renderer3d.html?q=isosurface#(def._((lib._plo
I'm intrigued. I suppose pattern based macros could be used to implement
operations like + and *, and passing to the field of quotients should formally
be no different from rational arithmetic. Are you interested in Chebyshev
polynomials for a particular reason (e.g, applications to differential
I suppose I'm just stating the obvious here, but R[x, y] is naturally
isomorphic to R[x][y]. That is, polynomials in x and y over the ring R have a
natural interpretation as polynomials in y over the ring R[x] of polynomials
over R. So, if you had a good library for working with polynomials (of
Uh... never mind. I should have looked for the obvious
> (define (f x) (+ x 1))
> (define (g x) (* x x))
> ((compose f g) 1)
2
> ((compose f g) 2)
5
>
On Oct 14, 2012, at 4:00 PM, Gregory Woodhouse wrote:
> Now, my question is: is there a notation in Racket for represent
I wrote a small recursive function to convert a list (a0 a1 ... an)
coefficients into a polynomial function
;;Given a list (a0 a1 ... an) return a function that computes
;;p(x) = a0 + a1*x + ... + an*x^n
(define (polynomial coeffs)
(lambda (x)
(cond
[(= (length coeffs) 0) 0]
[
I'm not sure what's going on, but the HTTP protocol specifies that the header
and message body be separated by \r\n\r\n.
Sent from my iPhone
On Oct 6, 2012, at 3:50 AM, Mikko Tiihonen wrote:
> Hi, again!
>
> I'm continuing to build a small HTTP-client. The problem is now that the POST
> par
You may have shown in a mathematics class that
1 + 2 + ... + n = n(n + 1)/2
Do you recall how you did it? What was the induction step?
Sent from my iPhone
On Sep 25, 2012, at 8:04 AM, Ashley Fowler wrote:
> I am trying to do a recursive analysis on the Sum of even numbers function.
> So far
In writing contracts for classes I always use the ->m constructor for methods,
so this example of section 5.1 of the Reference surprises me
(define file-interface<%>
(interface () open close read-byte write-byte))
(define directory-interface<%>
(interface (file-interface<%>)
[file-list (
I am trying to understand how augmentable methods (as described in section 13.5
of The Guide) work.
Between the extremes of allowing arbitrary overriding and disallowing
overriding entirely, the class system also supports Beta-style augmentable
methods [Goldberg04]. A method declared with pubme
52 -0700, Gregory Woodhouse wrote:
>> Now, here's my question. provide grid% with its own contract-out
>> clause. It seems rather redundant (and presumably unnecessary) to
>> repeat the methods from base-grid% in the contract for grid%.
>
> You don't need t
I have a contract
(define base-grid/c
(class/c
(given? (->m coord? coord? boolean?))
(get-cell (->m coord? coord? digit?))
(get-cell/given (->m coord? coord? (values digit? boolean?)))
(set-cell! (->m coord? coord? digit? void?))
(set-given! (->m coord? coord? digit? void?))
(c
Is there a similar function for characters? I.e., one that will map #\1 to 1?
Sent from my iPhone
On Sep 10, 2012, at 9:44 AM, Carl Eastlund wrote:
> The following expression should do what you want:
>
> (+ (string->number "1.2") 1)
>
> If you're starting from a symbol, use symbol->string bef
My eyes were deceiving me. Sorry about that.
Sent from my iPhone
On Sep 4, 2012, at 10:53 AM, Tobias Hammer wrote:
>
>>> (sudoku)
>> Cannot open file /Users/gregwoodhouse/sudoku/puzzles/puzzle-4a.sdk
>> #(struct:exn:fail:filesystem call-with-input-file: cannot open input file
>> path: /Users
This is strange (to me, anyway). I have two modules: grid.rkt which implements
a Sudoku grid but provides no graphical representation, and sudoku.rkt which is
responsible for handling the GUI. All updates to the board are sent to the grid
object (called grid-model here). Now, in my rudimentary u
(if (cdr x) (srcloc-source (cdr x)) "")
> (if (cdr x) (srcloc-line (cdr x)) "")))
>(continuation-mark-set->context (exn-continuation-marks exn)))
> "\n"))
>
> ;; Example usage:
> (with-handlers ([exn:fail? (comp
Dumb question: If an exception is handled by (lambda (e) ... ) is it possible
to recover exception details such as any message that may have been used in a
raise or related statement?
Racket Users list:
http://lists.racket-lang.org/users
I apologize in advance for the elementary nature of this question, and for the
amount of code included below. I'm having a tough time following the
documentation for racket/gui and racket/draw. My first attempt to create a
Sudoku grid follows the example in the documentation rather slavishly and
>
>
> On Jul 29, 2012, at 6:00 PM, Eli Barzilay wrote:
>
>> Yesterday, Gregory Woodhouse wrote:
>>> (define b(make-vector 9 (make-vector 9 0)))
>>
>> BTW, this is wrong -- it builds a vector of 9 zeros, then uses that
>> same vector 9 times:
>
Thanks.
On Jul 30, 2012, at 12:16 PM, David Van Horn wrote:
> check-exn should take a thunk as the second argument. I think you want:
>
> (test-begin
> (define x (new grid%))
> (check-exn exn:fail?
>(lambda ()
> (send x set-cell! 1 1 1)
> (send x set-cell!
Okay, here's another question related to my little Sudoku project. Before I
decided to switch to using rackunit for runit tests, I had a unit test that
looked like this
(define (test3)
(let
([val 'fail]
[g (new grid%)])
(with-handlers ([exn:fail? (lambda (exn) (set! val 'pass))
Perfect. That's just what I was looking for.
Sent from my iPhone
On Jul 28, 2012, at 7:42 PM, Vincent St-Amour wrote:
> You could have `simple-grid%' implement the `equal<%>' interface.
>
> http://docs.racket-lang.org/reference/objectequality.html?q=equal%3C%25%3E#%28def._%28%28lib._racket/pr
Okay, this is really a newbie question, but here goes. I have a class that
represents a Sudoku grid. Internally, the grid is stored as a vector of vectors
of integers:
(define simple-grid%
(class object%
(super-new)
;b is an internal representation of the grid and is initiali
A good linear algebra package is a foundation for a surprising amount of
numerical mathematics.
Sent from my iPhone
On Jul 1, 2012, at 6:45 AM, Patrick King wrote:
> Stats and linear algebra will be welcome, gamma function, too. I also find
> myself rolling my own integration functions.
>
>
I want to write a rule that will recognize strings in a language (MUMPS) that
doubles double quotes as a means of escaping them. For example "The double
quote symbol is \"." would be "The double quote symbol is ""." and "\"" would
be . That seems simple enough except that I need to write reg
I suppose it could prevent certain optimizations in parameter passing, forcing
space for arguments to be allocated on the heap.
Sent from my iPad
On Jan 8, 2012, at 12:42 PM, Danny Yoo wrote:
> On Sun, Jan 8, 2012 at 3:23 PM, Jordan Schatz wrote:
>> This code runs, but I'm guessing that its
I find it very convenient to load documentation on an e-reader. PDF isn't the
only format to consider, either. EPUB and MOBI (for the Kindle) often work
better.
On Jan 4, 2012, at 7:57 AM, Matthias Felleisen wrote:
> Pardon my lack of knowledge. I haven't gotten interested in e-readers yet.
>
Same here. As I said in a previous message, I give DrRacket high marks for
usability.
On Nov 13, 2011, at 6:27 AM, Harry Spier wrote:
> Robby Findler wrote:
>
> I have spent a fair amount of time trying to keep the clutter out of
> the UI --- . . . But it is a battle that I figh
I'm not sure if this is really a matter of either/or - from a usability
standpoint, I find DrRacket excellent, but it does seem a bit old-fashioned in
some ways. I frankly find it a bit difficult to say just how. I know it doesn't
look like Eclipse (and, yes, it wasn't hard to guess that the per
Think about arithmetic mod 2. Multiplication is AND and addition is XOR. So the
multiplicative identity 1 corresponds to TRUE. It just happens that the
additive identity 0 works for OR, but that's not a perfect analog since 1 + 1 =
0 (2).
On Oct 28, 2011, at 9:55 AM, Carl Eastlund wrote:
> No.
It seems to me that Racket would be more widely used if there were database
drivers for major DBMSs (e.g., PostgreSQL, SQLite, MySQL. maybe even Oracle) as
part of the standard distribution. I know there are PLaneT packages available,
but it would sure be easier for potential adopters if they ca
Could this be a path issue? There's no need to find the racket executable in
the case of ls.
Sent from my iPad
On Jul 26, 2011, at 9:54 AM, Niitsuma Hirotaka
wrote:
> The following code works on linux.
> But on MacOSX, no response
> --
> #lang racket
> (require racket/system)
> (display (
Now, that's quite a find!
On Apr 23, 2011, at 7:34 AM, Hendrik Boom wrote:
> You can also find similar stuff in Manning's book, The Geometry of Four
> Dimensions. I have it as a Dover paperback that I bought in the
> fifties or sixties, but nowadays it seems to be available as a free
> downlo
Clifford algebras (which are non-associative) are higher dimensional
generalizations of H (the quaternions), so in the case of SU(2), you don't
really need the machinery of Clifford algebras. That being said, I'm not
entirely sure what you are looking for. Ordinary rotations (the circle group)
I meant to get back to this earlier. You might want to look at
Geometry of Representation Spaces in SU(2) - advanced, but with some real gems
http://arxiv.org/pdf/1001.2408
The Quaternions and the Spaces S3, SU(2), SO(3), and RP3
http://www.cis.upenn.edu/~cis610/cis610sl7.pdf
The first of these
me off-line.
On Apr 18, 2011, at 1:17 AM, Paul Ellis wrote:
> Dear Gregory Woodhouse
>
> Unrelated to Racket – I’m interested in the Geometry of 2 Complex Dimensions
> (“G2CDs”) and came across your 2006 post:
>
> [plt-scheme] 3rd-8th Grade
>
> Gregory Woodhouse gr
The relevant section is 14.38:
14.38 Server
The Server response-header field contains information about the
software used by the origin server to handle the request. The field
can contain multiple product tokens (section 3.8) and comments
identifying the server and any significant sub
Could it be that the issue is not argv[0] at all, but the way the program is
launched by xinetd? I'm guessing that this is a daemon process.
Sent from my iPad
On Mar 26, 2011, at 2:28 PM, Hugh Myers wrote:
> Don't know about 'do by default', but since command line switches are
> already being
On Mar 26, 2011, at 9:14 AM, Greg Hendershott wrote:
> I'm not sure if this is a Linux or Racket question or both.
>
> $ raco exe -o foo foo.rkt
> $ ./foo &
> $ ps #shows it as "racket" not as "foo".
> $ top #shows it as "racket" not as "foo".
>
> Is there way I can make it show up as "foo"?
Ah... I must have made some other error (typo?) because I thought that syntax
was giving me an error. I works fine.
On Mar 25, 2011, at 2:05 PM, Jay McCarthy wrote:
> (struct m-value (raw interp flag))
> (provide (struct-out m-value))
>
> just like before.
>
> Jay
smime.p7s
Description: S/M
I'm accustomed to using the following syntax to define structure types in a
module
(define-struct m-value (raw interp flag))
(provide (struct-out m-value))
but I see that the documentation (Reference, sec. 4.1) says that the form
define-struct is provided for backward compatibility, and struct
This may sound overly simplistic, but have tried profiling your application?
Where does it spend the majority of its time?
Sent from my iPhone
On Mar 21, 2011, at 9:42 AM, Patrick Li wrote:
> Hello everyone,
>
> For educational purposes, I've implemented a simple Scheme interpreter in C,
> b
If I write a trivial loop using call/cc
(call/cc
(lambda (k)
(define (loop)
(let ([x (read)])
(if (eq? x '())
(k x)
(loop
(loop)))
It does exactly what I expect. If I type anything but () it reads again, but if
I type () it prints out '() and quits
W
The same is true of 64-bit OS X. I was a little surprised that there were no
pre-built 64-bit binaries for OS X.
On Mar 9, 2011, at 2:37 PM, Greg Hendershott wrote:
> Oh I didn't realize that, I thought it still experimental-ish. That's great.
>
> Building Racket on Windows has seemed daunting.
Mar 9, 2011, at 9:27 AM, Gregory Woodhouse wrote:
>
>> I'm trying to locate this page. What is the URL?
>
> Which page? The Wikipedia page on Macros? it's here:
>
> http://en.wikipedia.org/wiki/Macro_%28computer_science%29
>
> The posting I referred to is
Thanks. I've updated the Wikipedia article accordingly.
On Mar 9, 2011, at 9:40 AM, Robby Findler wrote:
> This is the paper that first introduced the idea:
>
> Contracts for Higher-Order Functions
> Findler, Felleisen
> International Conference on Functional Programming (ICFP) 48-59 2002
>
I notice that the Wikipedia article for Racket (a little sparse in my opinion)
http://en.wikipedia.org/wiki/Racket_(programming_language)
asserts that Racket was the first higher order language to use a contract
system, but that statement has been flagged as needing a citation to back it
up. W
I'm trying to locate this page. What is the URL?
On Mar 9, 2011, at 9:04 AM, John Clements wrote:
> I just added some text to Wikipedia page for Macros, citing the "3 uses of
> macros" posting to the ll1 mailing list. Is there a better reference for
> this?
>
> John
_
My first thought was that it was a bit like MUMPS with its global variables
(where global means global among processes and users, not just global in
scope). It seems to me that persistence is the right way to do that. The
versioning reminds me a bit of WebDAV, or even VMS.
Sent from my iPad
O
It's a puzzle
> (define (mymin a b) (if (< a b) a b))
> (mymin 0 1e100)
0
> (mymin 1e100 0)
0
>
On Feb 14, 2011, at 12:47 PM, David Van Horn wrote:
> Then what is the correct definition?
_
For list-related administrat
I see your point.
On Feb 14, 2011, at 12:14 PM, Sam Tobin-Hochstadt wrote:
> No, it's not a bug. Since 1e100 is an inexact number, there's
> uncertainty about the minimum of those two numbers, and the result is
> therefore inexact.
>
> On Mon, Feb 14, 2011 at 3
Oops... Now that has to qualify as a bug.
On Feb 14, 2011, at 11:58 AM, Joe Marshall wrote:
> 2011/2/13 José Lopes :
>> I understand. However, not only that disregards type promotion but also is
>> incoherent since (+ 0 0.0) evaluates to 0.0.
>
> Worse:
> (min 0 1e100) => 0.0
>
> --
> ~jrm
__
You just wrote down the permutations of the set {1, 2, 3}. What was your
thought process in producing this list?
Sent from my iPad
On Feb 13, 2011, at 4:42 PM, Xiaojian Wang wrote:
> I want to make a permutation of a word, for example 1 2 3
>
> it should return
> 1 2 3
> 1 3 2
> 2 1 3
> 2 3
This is a good example of why I'd like to see interfaces to SQLite, PostgreSQL
and MySQL included in the main racket distribution. Not including them seems
like a rather odd omission.
On Feb 13, 2011, at 12:37 PM, gabor papp wrote:
> 'm trying to require jaz's mysql package like this:
> (requir
Thanks, everyone. This is just what I was looking for.
Sent from my iPad
On Feb 12, 2011, at 4:53 PM, Robby Findler wrote:
> Oh, yes, that looks right to me.
>
> Robby
>
> On Sat, Feb 12, 2011 at 2:54 PM, Neil Van Dyke wrote:
>> Won't "reencode-output-port" let you write Racket strings as U
Is it possible to ensure that data written to a socket or file is encoded as
UTF-16? I ask because Health Level 7 (HL7) 2.5.1 allows messages to use UTF-16
as opposed to US-ASCII, but it has to be a fixed width encoding.
_
For list-related adminis
I remember using a Lisp as an undergraduate (Franz Lisp?) that used the right
angle bracket as a kind of super right parenthesis that could close multiple
right parentheses. It was really ugly.
On Feb 12, 2011, at 4:43 AM, Todd O'Bryan wrote:
> And now I have unresolved tension...
66 matches
Mail list logo