Whalesong do not interpret the bytecodes directly, so I didn't
look for hints there.
(Note: there was a preliminary simulator used for test cases in
2bc4b2a224fe7a485a1060c69ebde925cecdeb05)
Racket Users list:
http://lists.racket-lang.org/users
On Thu, Jul 31, 2014 at 12:30 AM, Jack Firth jackhfi...@gmail.com wrote:
When I use #lang scribble/manual I have the issue of @racket{text} rendering
as a string
Do you mean to write @racket[list]? Braces mean something different
than brackets in Scribble.
Racket Users
Hi Jens and Jay,
My apologies! I have not been following with recent Racket
development at all. I don't know what the current state of the Racket
packaging system is. I don't know what I should be doing to fix this,
and I don't have time unfortunately to really start learning the new
packaging
What's latest thinking on Racket To the World? Could a Racket-based on-line
curriculum be set up a-la Udacity or OCW?
Have you seen the following?
https://www.coursera.org/course/programdesign
Racket Users list:
http://lists.racket-lang.org/users
On Mon, Jun 2, 2014 at 10:45 AM, Tim vis.314...@gmail.com wrote:
Hi, I am using DrRacket 6.0.1 with language R5RS when I try to evaluate the
statement:
(eval '(+ 1 2) user-initial-environment)
I get the error:
user-initial-environment: undefined;
Am I doing something wrong? Thank you.
Hi
, let me know.
By the way, the px language is used to introduce Lisp to students who are
scared of parentheses. We discovered that after learning the px language,
the students start accepting the full parenthesized Lisp.
2014-05-05 14:22 GMT-03:00 Danny Yoo d...@hashcollision.org:
Hi Eduardo
On Mon, May 12, 2014 at 4:11 PM, Sean Kanaley skana...@gmail.com wrote:
Hello all,
I can't figure this out as I have no function called degrees-complex and it
occurs only sometimes. It's always when rotating stuff through the positive
x axis, as in it's probably related to floating point
Hi Danny: The contracts are checked at the boundary based on the
define/chk macro. This is an internal error somewhere -- angles are not
restricted to being between 0 and 360. I don't suppose you noticed how to
make this error happen?
Apologies; I didn't have time to investigate a good test
Wow. Floating point really is nasty. I see how it might have happened now.
;;;
-0.0001
-1e-16
(+ 360 -1e-16)
360.0
;;;
Racket Users list:
http://lists.racket-lang.org/users
All the way down to Advanced Control Flow part, my confusion accumulated to
a point that I thought I was not ready for the tutorial. Then I decided to
give up.
Ok, that was useful feedback! I'll try to think about how the points
may be addressed.
For one of the comments you made about
On Mon, Apr 28, 2014 at 5:27 AM, Ben yfe...@gmail.com wrote:
After gaining some basic understanding of web applications, I wanted to
develop one in Racket. So I went to the tutorial Continue: Web Applications
in Racket. When I reached 6 Advanced Control Flow, I saw
`send/suspend/dispatch`. I
Hi Eduardo,
Just to check, have you seen Greg Hendershott's Fear of Macros
tutorial already?
http://www.greghendershott.com/fear-of-macros/
Racket Users list:
http://lists.racket-lang.org/users
Good, glad to hear it works.
If you can avoid dealing with raw sockets and use a standard protocol
for communication, that might allow you to write your network code at
a nicer level of abstraction. What kind of network application are
you trying to write?
In retrospect, perhaps that should
XML is harder for almost everyone to deal with than JSON is. Sometimes it
seems like almost no one designing XML schemas (mainly ad-hoc) uses XML in a
way more sophisticated than they'd use JSON. And XML has a bunch of
overbearing baggage. I only use XML when it's required by legacy
The reason is because certain Strings can't be represented in the Text
node of XML documents. We ran across this problem in practice when
students started writing programs and copying and pasting content from
the web, which introduced characters like vertical tabs and other
characters that
On Wed, Apr 23, 2014 at 6:50 AM, Alejandro Zamora Fonseca
ter...@ltu.sld.cu wrote:
Thanks for the help!
It works for me.
Only one question:
Its obligatory use threads?
Cause my problems come when I use print or display.
greetings
Alejandro
Please use your email clent's Reply to All
read-line will block if it does not see the end of the line. Your python
client has not yet sent an end-line character.
Racket Users list:
http://lists.racket-lang.org/users
This should just work.
Can you show what code you're doing?
For example, given the following echo-server written in Racket,
#lang racket
(define listener (tcp-listen 12345))
(let echo-server ()
(define-values (in out) (tcp-accept listener))
(thread (λ () (copy-port in
One thing you might need to think about is buffering. Here's another
example of a Racket server that doubles up the bytes it reads:
#lang racket
(define listener (tcp-listen 12346 4 #t))
(let doubler-server ()
(define-values (in out) (tcp-accept listener))
Hi Zee,
What's the shape of the world?
Racket Users list:
http://lists.racket-lang.org/users
On Thu, Apr 17, 2014 at 1:15 PM, Zee Ken udaybhasker552...@gmail.com wrote:
Its a 600x600 square. The images are 100x100. The pinhole is default =
50x50.
So, I placed myself at 550x550 that will make it appear at the right bottom.
I am not sure if this answered your question.
Hi Zee,
Oh, by
On Thu, Apr 17, 2014 at 1:39 PM, Zee Ken udaybhasker552...@gmail.com wrote:
Hi,
I am a beginner in racket and I am just getting a hang of playing with
WORLD. So, I am attaching my file in this mail.
Sorry for this but, I am not sure how to answer your question. You do not
need to reply
My apologies: I can't help with this right now.
Racket Users list:
http://lists.racket-lang.org/users
racket/bin/racket: /lib64/libc.so.6: version `GLIBC_2.14' not found (required
by racket/bin/racket)
Note: this error has been seen in other contexts. A Google search for
this term comes up with several hits:
Hi Harry,
Potential platform-specific behavior? Appears to have expected
behavior on an Ubuntu Linux-based machine.
Racket Users list:
http://lists.racket-lang.org/users
Make sure that if you're using Picturing Programs, don't skip Section 0.3
in:
http://picturingprograms.com/download/chap00.pdf
It talks about how to set up the software for the rest of the book. You'll
need to do it in order for things like circle to work.
Racket
-- Forwarded message --
From: Steve Lett steve.lett...@gmail.com
Date: Sat, Jun 8, 2013 at 8:25 PM
Subject: Re: [racket] Beginner problem
To: Danny Yoo d...@hashcollision.org
Thanks, but how do I install a library when my only internet connection is
on Android, Galaxy Tab? I have
Some of the involved numbers are bigger than can be represented in 32 bits.
Therefore, the computation on 32 bit platforms will need to use more
software-emulated bigintegers to perform the computation successfully, and
that's where the performance difference is coming from.
I played with this
Yes, makes perfect sense, hmmm... there's probably a way to avoid so many
sqrt calls.
This probably won't help. No individual iteration in that inner loop is
beyond 32 bits. The accumulated sum itself is what grows beyond the bounds
of a 32-bit representation. Reducing the number of sqrt
Given that, here is an example implementation of code that defines a
function to map between the codes and their names:
https://gist.github.com/dyoo/5586470
This implementation may be trying to be a little too clever: it does
the work of parsing the UnicodeData.txt file at
It should not be difficult to do this by hand, by taking the contents
of the Unicode database:
http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
to help define the function that takes unicode characters and returns
the descriptive name.
It appears to be a semicolon-separated list of
On Tue, May 7, 2013 at 3:14 PM, Don Green infodeveloper...@gmail.comwrote:
Can you apply the verbage that must be represented by the symbols in
Racket regexp documentation shown below:
;;= means what?
| means what?
pces means what?
Hi Don,
You are seeing instances of Backus-Naur Form
On Tue, May 7, 2013 at 3:08 PM, Don Green infodeveloper...@gmail.com wrote:
Trying to use regexp-match to return a line containing a specified string...
;Create fn: find-string.ss.
;Given a file and a find-string.
;Returns a line-string with first find.
;The input file has a lot of
Strings and lists are both sequences, so you can write functions that
work on sequences. For example:
;
#lang racket
(define (peel seq)
(define n (sequence-length seq))
(define seq-without-head
(sequence-tail seq 1))
(define seq-without-ends
(for/list
Hi Matthew,
Jens's minipascal might be a good example to look at:
https://github.com/soegaard/minipascal
Racket Users list:
http://lists.racket-lang.org/users
I have found that regexp functions are too slow for large data files but
maybe newer versions have made a change that would speed things up. (I read
something about some solution from github but I am not sure that is
something I should look into.) I'd rather just install a new version of
Hi Tomas,
For this particular case, you might not even need to use readtables.
Since you're already dealing with making your own Clojure-style
language, you might be able to override the literal datum macro,
#%datum, to rewrite uses of byte strings to regexps.
Here's what this might look like:
Often, you can use the 'prefix-in' feature of require to put a
namespace prefix around the exports of a module. See:
http://docs.racket-lang.org/guide/module-require.html
for some details and examples.
A module such as parser-tools/lex-sre provides definitions for *,
+, and other
On Mon, Apr 29, 2013 at 2:12 PM, Tomás Coiro tomco...@hotmail.com wrote:
Thanks for that Danny :)
I'll try to do that.
Although I think that readtables documentations aren't understandable.
I mean, searching on Google I can find 3 or 4 questions about them and no
one seems to understand
On Mon, Apr 29, 2013 at 7:16 PM, Sanjeev K Sharma throw...@gmail.com wrote:
On Mon, Apr 29, 2013 at 01:36:26PM -0600, Danny Yoo wrote:
For your other two questions: I'm not quite sure what you mean by
dump a module. Can you say more? Also, it looked like your second
question got cut off
Probably a crab would be filled with a sense of personal outrage
if it could hear us class it without ado or apology as a crustacean,
and thus dispose of it. I am no such thing, it would say: I am
MYSELF, MYSELF alone.
- William James, The Varieties of Religious
DrRacket supports a kind of folding on an s-expression basis, rather
than on a line basis. If you right click on an expression, you should
see an option: Collapse S-expression.
Racket Users list:
http://lists.racket-lang.org/users
Test case:
###
#lang racket
(define ip (open-input-string hello world))
(define evt (peek-bytes-evt 1 0 #f ip))
(let loop ()
(sync (handle-evt evt
(lambda (res)
(loop)
###
If I'm
Ok. The issue may be isolated to peek-bytes-evt. If I sync just on
the port, then I don't see the memory leak.
Racket Users list:
http://lists.racket-lang.org/users
Tracked it. There's something funky going on with poll-or-spawn, right here:
https://github.com/plt/racket/blob/master/collects/racket/port.rkt#L1122-L1125
I don't quite understand what's going on here yet, but the highlighted
thread is always blocking on nack, and never gets killed. It's
Ok, good! Matthew Flatt is investigating.
It looks like something like:
https://github.com/dyoo/racket/commit/6547d18c006e7390c3cbce84a93dd9d9c926341b
can clear the memory leak, but mflatt says that we shouldn't have to
do this, that the VM should automatically kill the monitoring thread
Just to make sure, all the evaluation is happening all on the
server-side, right? I just want to make sure this isn't work that
overlaps with wescheme.org. For example:
http://www.wescheme.org/view?publicId=dWc6le6woN
Racket Users list:
I think we need a little more information. What would be the meaning
of merging modules together? Is there a possibility of modules
overlapping? Can you say how you'd do it manually? Maybe there's
already functionality in Racket's module system to do what you want.
Usually, if we need a
On Mon, Apr 22, 2013 at 7:17 PM, Jay McCarthy jay.mccar...@gmail.com wrote:
And I've verified that the memory leak goes away in the Web server use case
Yup, same here; my test suite can run under the sandbox for at least a
good hour, and then I got tired of watching 'top'.
Will the fix get into
Let me post code and see if anyone agrees:
https://github.com/dyoo/web-server-under-sandbox
I create a trivial web server with a servlet that immediately errors
out. I have it also serve static JavaScript that's essentially a
torture test: it keeps sending requests to the web server,
Ok, I'm waiting for Racket to rebuild with --enable-backtrace.
In the meantime, I added a call to dump-memory-stats in the
connection-handling loop, and I'm seeing something that looks weird to
me. What does it mean something if the number of installed finalizers
keeps going up?
Here's an
Here's a small section of the dumps I'm seeing now:
https://gist.github.com/dyoo/5428058
I see that this unknown,252 thing continues to increase. What can I
do to help identify what this chunk of thing is?
Racket Users list:
http://lists.racket-lang.org/users
On Saturday, April 20, 2013, Harry Spier wrote:
Can someone recommend a good book on type systems? Is The Little MLer a
good place to start and can you do this book with typed Racket rather than
ML.
Types and Programming Languages (TAPL) is a good one.
Can you use the escaping syntax that Scribble provides? Here's an example:
#lang scribble/base
@list|{ this is an example with @ signs in it. I can still
use @ by using it like this: |@tt{Hello world}, right?}|
Slightly larger example:
https://gist.github.com/dyoo/5423623
Hope this helps!
Racket Users list:
http://lists.racket-lang.org/users
Let's try not to guess. Can you check your web server's error log. The
web server's error log is usually a lot more specific than the Internal
error that it sends to the browser. Apache often keeps it in the same
location as the regular server logs.
Racket Users list:
On Fri, Apr 19, 2013 at 5:44 PM, Kejia柯嘉 w.ke...@gmail.com wrote:
Hi all,
In DrRacket, why is there an extra empty string (`[]`between 0s) in
the list:`'( 0 0)`. This generates `([]0[][]0)`, instead of
`([]0[]0)`.
Unfortunately, the question here is ambiguous. What are you trying to
do?
But you can move the defines outside the @list| form, as seen in
https://gist.github.com/dyoo/5423623.; True, but in that case, I can no
longer programmatically parse my source files, since they may have defines
within them. (This is, as I understand it, the major benefit of using
are you using display to look at the content of lists? Usually,
write or print is more appropriate:
http://docs.racket-lang.org/guide/read-write.html
在 2013年4月19日星期五,Danny Yoo 写道:
On Fri, Apr 19, 2013 at 5:44 PM, Kejia柯嘉 w.ke...@gmail.com wrote:
Hi all,
In DrRacket, why is there an extra
Followup on the sandbox issue: Eli suggested that I push move of the
evaluation stuff into the sandbox. I had assumed that there was some
parameterization that controlled values coming out of eval, but
perhaps not!
So I made the following change:
It might be that I've found an issue with web-server. But I hate being
Peter calling wolf.
Let me post code and see if anyone agrees:
https://github.com/dyoo/web-server-under-sandbox
I create a trivial web server with a servlet that immediately errors
out. I have it also serve static
On Thursday, April 18, 2013, deepak verma wrote:
how can we send any kind of file using tcp..
can someone illustrate using a simple code.
What difficulty are you having? From the questions you've asked so far,
I'm getting no sense of where you're getting stuck. Can you say more?
What have
Hi everyone,
My hosting provider has been telling me that my compiler server for
Whalesong has been using about 1.4GB memory, but I'm _really_ confused
because I've got the whole thing under a racket/sandbox constrained at
256MB. Perhaps I'm doing something wrong?
Here's what the sysadmins are
Let's say that we're given something like:
(my-macro [(name:first-name type:string required:#t)
(name:last-name type:string)
(hash 'id middle-name 'type 'string)
(lambda () (do-something-arbitrary))])
Without thinking too much
When you say the term encrypt, you are using a term in an unconventional way.
Traditionally, programmers use the word serialize when talking about
translating values to a byte stream.
It's unclear from your email what you precisely mean by image. For
the moment, I will assume that you mean
On Tue, Apr 16, 2013 at 12:32 AM, deepak verma
deepakverma14021...@gmail.com wrote:
how will i extract the image from tcp-connect ?
actually i was talking about objects of image-snip class
[Aside: Please use your email client's Reply to All feature.]
Ok, good, that's much more specific.
Racket provides a generic order predicate: see data/order:
http://docs.racket-lang.org/data/Orders_and_Ordered_Dictionaries.html
For example,
https://gist.github.com/dyoo/5398549#file-pretty-print-json-rkt-L5
https://gist.github.com/dyoo/5398549#file-pretty-print-json-rkt-L12
Followup: no, raising the listen backlog unfortunately didn't help either.
But the good news is that I've finally found the true cause of the
problem. It's not Racket's fault wescheme.org's compiler servers
fail on load spikes: rather, it's Amazon EC2. Specifically,
Amazon's Elastic Load
-- Forwarded message --
From: deepak verma deepakverma14021...@gmail.com
Date: Wed, Apr 10, 2013 at 4:53 AM
Subject: Re: What is racket/cmdline?
To: Danny Yoo d...@hashcollision.org
next time i will remember to write the subject
and actually i only know about graphical interface
I wanted to check with other folks to see if anyone else has been
having problems with long-running instances of PLT web server. I'm
not using continuations, but just the standard request/response style
of webapp.
It's the compiler server for wescheme: I'm running into severe
problems where the
The asymmetry between what your client is reading and what your server
is writing looks very suspicious. Your client is using the read
function, but your server is using display.
Those two functions are not designed to be paired. There's no
guarantee that what you're displaying as a server is
Hi Jay,
Followup: for now, it looks like we're just that we're being hammered
hard enough that the web server has no choice but to starts sending
503 responses. Memory usage appears bounded, despite what I had
thought earlier. I'll add additional server instances to host
wescheme.org's
Ok. I think 40 is much too small as the default backlog size though.
I look at what the defaults are for other web servers like apache, and
the defaults are a bit larger there. (It's about 500 in Apache's
case):
http://httpd.apache.org/docs/current/mod/mpm_common.html#listenbacklog
Would you be amendable to adding a #:max-waiting keyword argument to
serve/servlet to override the default backlog of 40 waiters?
Definitely. I won't be able to add it until tomorrow though afternoon
though... if you want to push before then.
The
other calls into the web server provide a
Deepak, please place a useful subject line on your emails. Right now,
your emails have no subject line, which makes it difficult for people
to judge whether or not the question is interesting to them. I'm
changing the subject line to What is cmdline?.
---
It's a bit hard to answer this
I thought the following example might tickle people:
;;
#lang racket/base
(require net/url
net/uri-codec
json)
;; Experiments with module-name-resolvers.
(define old-module-name-resolver
Are you sure you're not looking for the racket/stream library instead?
For example:
#lang racket
(require racket/stream)
(define ones (stream-cons 1 ones))
Racket Users list:
http://lists.racket-lang.org/users
An interesting example might be an echo-style server, where the server
reads input and writes output forever. Here's what it can look like:
---
#lang racket/base
(provide start-server)
(require racket/tcp)
;; start-server: #:port
I've run into this problem. What's most likely happening is mistyping
your password, which for whatever reason causes the bug tracker to
log you in, but as someone with _negative_ privileges. It's an
antisocial bug tracker.
Racket Users list:
Here is a self-contained example that shows how one might do
communication; I believe something like this would work in the context
of the DrRacket evaluator as well, though I haven't tried it yet.
#lang racket
;; Experiment: interaction
[I am changing the subject line so that it may be easier to track the
conversation.]
You can see examples of port usage (including an example of tcp) here
on this page:
http://docs.racket-lang.org/guide/ports.html
You'll want to look into getting familiar with the general input and
output
#:in-original-place? should do the trick, as it's what the pango
bindings do as well:
https://github.com/plt/racket/blob/master/collects/racket/draw/unsafe/pango.rkt#L121-L128
You probably don't need #:atomic?. #:atomic? has to do with callbacks
from foreign code back into Racket.
Side comment: you are missing the #lang line and requires, so
technically the code you have above is ambiguous. Don't omit those
next time.
tcp-connect from another machine opens up a port, like the other
port-opening functions for files. What issue are you encountering
with tcp-connect? I
Hmmm. Thinking... can you parameterize the sha1-hash constructor
instead, since that's probably under your control?
Racket Users list:
http://lists.racket-lang.org/users
I mean, if you have a function f that's currently calling into the
sha1 hash function, passing it the current time and secret key, can
you adjust f so that it consults a parameterization that you own?
Racket Users list:
http://lists.racket-lang.org/users
On Sunday, March 31, 2013, deepak verma wrote:
sir,
i have read the documentation
but the interface is not clear
let me tell u what i have done
1. i have created a tcp-listen with port-name and port-no, on my laptop
2. then i created a tcp-connect on another laptop
3.then i made
Have you read some of the documentation yet? It sounds like you'd
like to use network functions. In that case, the Systems Programming
documentation may be helpful to you:
http://docs.racket-lang.org/more/
The functions used in the documentation there are all hyperlinked to
the reference,
Also, if you don't have to work in raw TCP, and can rather use the
HTTP protocol, you might also find the web server frameworks useful.
http://docs.racket-lang.org/continue/
Racket Users list:
http://lists.racket-lang.org/users
I find that seeing someone else explaining how to program is much better
than reading a book, although I like to spend time reading someone
else's code.
Have you looked at these yet?
https://github.com/plt/racket/wiki/Videos
For example, Danny Heap's videos, such as:
- Can someone provide insight as to the pros and cons of compilation (to
executable)? Do we lose a significant amount of performance by not
compiling
(to executable)?
There should be zero performance difference if I'm not mistaken. raco
exe just bundles a copy of the Racket
Also, my main question, is there anyway i can make a page like
http://www.hellofriends.com and if someone typed that in a browser they'd be
redirected to my page from my computer? or for that i need to pay for a
server?
Services for Dynamic DNS may be relevant to your question:
On Wed, Mar 20, 2013 at 7:34 AM, Boshra Nabaei b.nab...@gmail.com wrote:
Thanks a lot Danny!
Now after inputting string(the name if he test-case file) I want to require
that. It finds it, but still doesn't recognize my list defined in there.
When I use (provide), racket doesn't know (provide).
I think it should be possible. The Inside Racket docs have hyperlinks
to the C functions, so there must be a mechanism for talking about
foreign bindings. How does it do it?
Reading...
... It looks like the Inside Racket documentation has a set of
scribble functions for C code:
On Wed, Mar 20, 2013 at 1:30 PM, J. Ian Johnson i...@ccs.neu.edu wrote:
You'll want to look at dynamic-require for this. Require forms do not accept
arbitrary Racket expressions because they are used at compile time.
Hi Boshra,
See the very bottom of:
I need to pass a file name as a parameter to my program (e.g. test-
case1.rkt). in that file I just have a list variable.
I want to do it via terminal in this way:
---
racket ./Desktop/a3/1/a3-FC.rkt ./Desktop/a3/1/test-case1.rkt
The point of rounding is coming up with the best possible integer
approximation for a decimal and this nearest even number rule does not
qualify. This logic was used by my grandparents' generation because odd
numbers were seen as less pure than even ones.
This is a strawman argument. That
Since when is round 0.5 not giving 1?!
According to the documentation:
http://docs.racket-lang.org/reference/generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._round%29%29
Returns the integer closest to x, resolving ties in favor of an
even number...
And zero is an even
Hi everyone,
I coded up a quick-and-dirty implementation of an LRU cache with Typed
Racket to make sure I understood the concept. I was wondering if
anyone can take a look and see if it looks ok?
https://github.com/dyoo/typed-lru
The implemetation is in 'lru.rkt', and test cases are in
One thing I'm noticing is that it seems difficult to use my typed code
in untyped code, because the container is polymorphic.
'untyped-client.rkt' shows what I mean: I'm hitting a Type Checker
error at runtime and I don't know what to do to avoid it yet. What
can I do here?
Side comment:
On Mon, Mar 11, 2013 at 12:56 AM, Laurent laurent.ors...@gmail.com wrote:
When run from the command line, the following program does not wait for the
frame to be closed, but closes it immediately and ends the program:
Hi Laurent,
You want to synchronize on the frame's eventspace: this will
1 - 100 of 620 matches
Mail list logo