Re: [racket-users] Core Team: I need you decide what I should do about the spammer.

2021-12-19 Thread Nadeem Abdul Hamid
, 2021 at 5:24 PM Sage Gerard wrote: > Looks like I scoped invitation powers to group managers, not members. > Checking on this. > > > Sent from ProtonMail mobile > > > > Original Message > On Dec 19, 2021, 4:17 PM, Nadeem Abdul Hamid < nad...

Re: [racket-users] Core Team: I need you decide what I should do about the spammer.

2021-12-19 Thread Nadeem Abdul Hamid
I don't have any special privileges... when I view the Google group, I don't see a "Members" page at all and no where to invite anyone else. All I can access is a link "My membership settings". --- nadeem On Sun, Dec 19, 2021 at 3:49 PM Robby Findler wrote: > When I follow the link at the bott

[racket-users] How to get Scribble evaluator to print examples using alternate constructor name

2021-02-15 Thread Nadeem Abdul Hamid
The following Scribble source: #lang scribble/manual @(require scribble/example teachpack/2htdp/scribblings/img-eval) @(define guide-eval (make-img-eval)) ; from teachpack/2htdp/scribblings/img-eval @examples[#:eval guide-eval (make-posn (+ 1 1) (+ 2 2))] Produces this text for the (HTML) output

Re: [racket-users] [racket users] make-posn question

2019-08-06 Thread Nadeem Abdul Hamid
Probably (require lang/posn) --- nadeem On Tue, Aug 6, 2019 at 1:19 PM Kevin Forchione wrote: > Hi guys, > I love working with the 2htdp/universe and 2htdp/image packages. But > polygon requires posts (and some of the other functions do too). > 2htdp/image doesn’t include a definition. What’s t

Re: [racket-users] No scroll ability in DrRacket v6.12

2018-03-25 Thread Nadeem Abdul Hamid
I had a student in class the other day also complaining about sluggish scrolling in DrRacket (while all other applications work fine), but I think he was using 6.11 on Mac OS X. --- nadeem On Sun, Mar 25, 2018 at 1:20 PM, Stephen Smith wrote: > Hi All, > > I'm not sure if it just happened after

[racket-users] How to control display of objects in *SL

2017-11-06 Thread Nadeem Abdul Hamid
How do you control the way objects of a class are printed out in BSL/ISL/etc.? I tried implementing the 'printable' interface but all that shows up in BSL is (instantiate (class ...) ...) Here's what I tried: ;;; thingy.rkt === #lang racket (provide make-thingy) (d

[racket-users] Macro confusion with syntax-parse

2017-10-20 Thread Nadeem Abdul Hamid
I'm working on a macro that I'd like to work similar to the 'big-bang' macro of 2htdp/universe with its various clauses, but something's going on that I don't understand. At the bottom of this email is some code for a very simple macro, 'calc', that is not what I'm working on, but exhibits the puzz

Re: [racket-users] for/list with in-parallel lists

2017-07-10 Thread Nadeem Abdul Hamid
Nice, thank you! On Mon, Jul 10, 2017 at 10:56 PM, Alex Knauth wrote: > > On Jul 11, 2017, at 12:38 AM, Nadeem Abdul Hamid wrote: > > ... though a syntactic solution combining for and match would probably >> be better. >> > > Yes, please!... > Look, python can

Re: [racket-users] for/list with in-parallel lists

2017-07-10 Thread Nadeem Abdul Hamid
> > ... though a syntactic solution combining for and match would probably > be better. > Yes, please!... Look, python can do it: >>> [(x, z) for (x, y, z) in [(1, 2, 3), (4, 5, 6), (7, 8, 9), ('a', 'b', 'c')]] [(1, 3), (4, 6), (7, 9), ('a', 'c')] :-) -- You received this message because you a

Re: [racket-users] for/list with in-parallel lists

2017-07-10 Thread Nadeem Abdul Hamid
hold the values of each element; the sequence produced by a seq-expr must return as many values for each iteration as corresponding ids." On Mon, Jul 10, 2017 at 9:46 PM, Jon Zeppieri wrote: > On Mon, Jul 10, 2017 at 11:40 PM, Nadeem Abdul Hamid > wrote: > > Given a list o

Re: [racket-users] for/list with in-parallel lists

2017-07-10 Thread Nadeem Abdul Hamid
p://docs.racket-lang.org/guide/for.html?q=multiple-valued%20sequence#%28part._.Multiple-.Valued_.Sequences%29 [2] third paragraph in http://docs.racket-lang.org/reference/pairs.html On Mon, Jul 10, 2017 at 9:32 PM, Jon Zeppieri wrote: > On Mon, Jul 10, 2017 at 11:02 PM, Nadeem Abdul Hamid > wro

[racket-users] for/list with in-parallel lists

2017-07-10 Thread Nadeem Abdul Hamid
How come this: (for/list ([(x y) (in-parallel '(1 2) '(3 4))]) x) produces '(1 2) instead of '(1 3) ? Whereas, (sequence-ref (in-parallel '(1 2) '(3 4)) 0) produces 1 3 as I would expect, but am I doing something wrong with for/list? In general, how might one convert a list of tuples

Re: [racket-users] F1 question

2015-07-06 Thread Nadeem Abdul Hamid
There might be a "Fn" or "Func" key on your keyboard (maybe along the bottom row, near the "Ctrl", "Alt", etc. keys) that you need to hold down as you press the F1 key; otherwise it treats the key as some Windows shortcut. On Mon, Jul 6, 2015 at 7:22 PM, P J Moy wrote: > Hello. In DrRacket, when

Re: [racket-users] reading & writing the preamble of an XML file

2015-04-21 Thread Nadeem Abdul Hamid
Was there ever a resolution to this question? On Mon, Mar 30, 2015 at 2:12 PM, Matthew Butterick wrote: > I understand that the preamble of an XML file (e.g., a first line like > ) is not part of the X-expression > representing that file. > > That's why in `response/xexpr`, there's an option fo

Re: [racket] Using define-runtime-path from *SL

2015-03-18 Thread Nadeem Abdul Hamid
-2015-03-11(-/f) [3m]. > > Language: Intermediate Student with lambda. > > > (require racket/runtime-path) > > > (define-runtime-path y "hello world") > > > > > > > -- Matthias > > > > > On Mar 18, 2015, at 9:46 AM, Nadeem Abdul Hamid w

[racket] Using define-runtime-path from *SL

2015-03-18 Thread Nadeem Abdul Hamid
How can I use define-runtime-path from *SL? I have a little teachpack that exports the play-sound/play-background-sound functions so students can use that in a game, but when you create an executable the sound files are not packaged up. I figured that define-runtime-path needs to be used for that,

Re: [racket] number->string in the HtDP student languages

2015-02-18 Thread Nadeem Abdul Hamid
And you can use > (number->string (exact->inexact 0.75)) to get numbers printed in decimal notation. It's slightly distracting/annoying, but in class I can briefly explain that there is a distinction between exact and inexact numbers in BSL, and that the former print as rationals (fractions), and

[racket] Sandbox evaluation problem - files with comment boxes

2015-01-25 Thread Nadeem Abdul Hamid
I'm trying to create a simple sandbox evaluator (to load in programs in *SL). I have the following code: #lang racket (require racket/sandbox) (define E (parameterize ([sandbox-path-permissions '([write "/var/folders"] [exists "/"] [read

[racket] Hour of Code - Racket

2013-12-02 Thread Nadeem Abdul Hamid
I suppose it's too late this year, but in future years, it might be good outreach to include a Racket version of an "Hour of Code" ( http://hourofcode.org) activity. Maybe something based on WeScheme, because all the other activities and complete online-based… http://csedweek.org/learn --- nadeem

Re: [racket] Interpretation of font information

2013-11-15 Thread Nadeem Abdul Hamid
nts), but the end of the root sign > will stick out of the bounding box. It actually makes sense it stick out, > since this makes it easy to make roots over tall characters such as h. > > -- -- Nadeem Abdul Hamid Associate Professor, Computer Science Berry College, Mount Berry, GA 30149

Re: [racket] Parens/string quotes automatic behavior

2013-05-22 Thread Nadeem Abdul Hamid
instead of >> inserting a single string-quote, possibly unless the left symbol is a >> backslash? >> >> +1. I've developed a reflex to compensate for this, which is double-quote >> double-quote double-quote delete left-arrow… which is a bit painful. >> >> John >> >> > -- Sent from Gmail Mobile Nadeem Abdul Hamid http://cs.berry.edu/nhamid Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Rounding

2013-03-16 Thread Nadeem Abdul Hamid
> Since when is round 0.5 not giving 1?! http://en.wikipedia.org/wiki/Rounding#Round_half_to_even --- nadeem Racket Users list: http://lists.racket-lang.org/users

[racket] DrRacket automatic parentheses mode update

2012-12-03 Thread Nadeem Abdul Hamid
Some improvements to DrRacket's "automatic parentheses" mode are now available in the nightly build version and git repository. If you have previous tried auto-parens and abandoned it, or if you have never tried it, please do try it now! In auto-parens mode, typing a closing parenthesis will skip

Re: [racket] [racket-dev] Survey for DrRacket users related to automatic parentheses behavior\

2012-11-25 Thread Nadeem Abdul Hamid
> > > My experience is htat when you use a mode like Nadeem is developing it is > > impossible to write code with unbalanced parentheses unless specifically > > desire to do so. > > Yes, it gets difficult to do so. But you might start with a file whose > parenteses are unbalanced. > Or yank/cut/c

Re: [racket] [racket-dev] Survey for DrRacket users related to automatic parentheses behavior

2012-11-24 Thread Nadeem Abdul Hamid
On Sat, Nov 24, 2012 at 12:14 PM, Grant Rettke wrote: > On Sat, Nov 24, 2012 at 11:07 AM, Nick Shelley wrote: > >> I sort of like this behavior, and the visual difference gets rid of any >> potential confusion. >> > > Just an idea... you might duplicate Paredit's functionality: > > http://emacswi

Re: [racket] [racket-dev] Survey for DrRacket users related to automatic parentheses behavior

2012-11-24 Thread Nadeem Abdul Hamid
of the users' key and/or mouse interaction) and I don't think I'm going to go for this right now. > On Saturday, November 24, 2012, Robby Findler wrote: > >> On Sat, Nov 24, 2012 at 8:53 AM, Laurent >> wrote: >> > >> > >> > >>

Re: [racket] [racket-dev] Survey for DrRacket users related to automatic parentheses behavior

2012-11-24 Thread Nadeem Abdul Hamid
On Sat, Nov 24, 2012 at 4:03 AM, Laurent wrote: > If you can, I think it would be a good idea to remove the paren pair if > the user deletes the opening paren he just typed by mistake. Undo should do > the same (which apparently it does not currently; missing > 'begin/end-edit-sequence' ?). Yea

Re: [racket] [racket-dev] Survey for DrRacket users related to automatic parentheses behavior

2012-11-22 Thread Nadeem Abdul Hamid
> > A question: What happens when I type ) when I should type ]? E.g. > > (cond > [(foo x) "one"] > [(bar x) "two" |]) > > where | is the cursor position on the last line there, if I type a ) > on accident, will it jump to the outer paren of the (cond ...) block? > Will it interpret the keystro

[racket] Survey for DrRacket users related to automatic parentheses behavior

2012-11-22 Thread Nadeem Abdul Hamid
Hello all, I've been discussing with Robby a possible improvement of DrRacket's "automatic parentheses" behavior and would like to get a sense of others' general opinion about this. What follows is a description of my proposal and then some concrete questions. ;; The idea is to have DrRacket auto

Re: [racket] DrRacket for the Truly Impatient V02, need help, beta testers

2012-11-21 Thread Nadeem Abdul Hamid
> > Maybe this would help, I have only used Check Syntax two or three > times ever when I wanted to rename a variable because it was used in > more than 5 places. What other problems does it solve? > > It catches syntax errors (name typos, etc.) earlier. It allows jumping (via the arrows) to bindin

Re: [racket] DrRacket for the Truly Impatient V02, need help, beta testers

2012-11-21 Thread Nadeem Abdul Hamid
On Wed, Nov 21, 2012 at 7:21 PM, Grant Rettke wrote: > You are an accomplished programmer that got this far without online > compilation that was added this year? > Well, I don't know about others, but prior to that becoming available, I would often have to keep hitting the "Check syntax" button

Re: [racket] regexp with \"

2012-10-22 Thread Nadeem Abdul Hamid
> > When I insert \\" in the pattern, the double quote is interpreted as the > end of the pattern. > You have to escape the quote too... " ... \\\" ... " --- nadeem Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Is there a way to search across archives on a subject?

2012-06-15 Thread Nadeem Abdul Hamid
subject. > > Any way to search across all the archives in one go? > Thanks. > -- Nadeem Abdul Hamid Associate Professor, Computer Science Berry College, Mount Berry, GA 30149 http://cs.berry.edu/~nhamid/ Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Quick on-screen documentation

2012-04-27 Thread Nadeem Abdul Hamid
>> Using vanilla Dr Racket, I don't have a Script menu item until I >> install your plugin. But then I can't access the menu at all... > > What do you mean? The menu is here, but you can't click on it, or the menu > is empty? The menu is there, but trying to click *anywhere* on the menu bar, on an

Re: [racket] Pruning DrRacket 's "open recent" files list

2012-04-24 Thread Nadeem Abdul Hamid
In the "Preferences" dialog, there is a "General" tab with a slider control that allows you to set the number of recent items displayed. On Tue, Apr 24, 2012 at 9:20 PM, Harry Spier wrote: > Dear list members, > > Is it possible to prune  the DrRacket "open recent" files list. > > Thanks, > Harry

Re: [racket] release date for RacketCon videos?

2012-04-04 Thread Nadeem Abdul Hamid
On Wed, Apr 4, 2012 at 11:35 AM, Greg Hendershott wrote: > Sometimes I've wondered if it would help to have someone designated in > a "product marketing" role. Even if it would be only a part-time or > school-seasonal position. I was thinking exactly this too this past weekend, in the context of

Re: [racket] today's DrRacket problem

2012-03-26 Thread Nadeem Abdul Hamid
An alternate, quick fix is to use the Control Panel/System Preferences to change the date on your computer to yesterday's date. Then start DrRacket. Then, once DrRacket is running, change the date back to the correct one. --- nadeem On Mon, Mar 26, 2012 at 10:11 AM, Matthias Felleisen wrote: >

Re: [racket] What are sandboxes used for?

2012-02-11 Thread Nadeem Abdul Hamid
One context where they are useful: When students in my course submit their programs, I would like to use a program of my own to automatically load, run, and test their programs. So I need to be able to dynamically load their program files from my running program, and then I want to execute and inte

Re: [racket] image equality and evaluators

2012-02-11 Thread Nadeem Abdul Hamid
Nice - this is useful to me too, thanks very much. FWIW, instead of make-base-namespace I had to use make-gui-namespace to avoid a "cannot instantiate `racket/gui/base' a second time in the same process" error. On Thu, Feb 9, 2012 at 10:15 PM, Robby Findler wrote: > On Thu, Feb 9, 2012 at 9:

Re: [racket] Sandboxed evaluation with 2htdp/image requires

2012-02-05 Thread Nadeem Abdul Hamid
provide functionality to replace what I'm doing above.) On Sun, Feb 5, 2012 at 11:02 AM, Nadeem Abdul Hamid wrote: > I'm having a problem with the error "cannot instantiate > `racket/gui/base' a second time in the same process" in a script that > I have to perf

[racket] Sandboxed evaluation with 2htdp/image requires

2012-02-05 Thread Nadeem Abdul Hamid
I'm having a problem with the error "cannot instantiate `racket/gui/base' a second time in the same process" in a script that I have to perform automated testing of student BSL programs. My script requires 2htdp/image for its own purposes and uses make-module-evaluator to create an evaluator for a

[racket] Nightly build page not working

2012-01-07 Thread Nadeem Abdul Hamid
The nightly build download pages are not working - instead of controls to select and download installers, all that appears is {{{CONTENTS}}} and {{{VERSION}}} strings. Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Strange behaviour with in-range

2011-12-30 Thread Nadeem Abdul Hamid
The for form iterates by drawing an element from each sequence; if any sequence is empty, then the iteration stops. So this: (for ([i (in-range 2 4)] [j (in-range 1 2)]) (printf "i = ~s j = ~s\n" i j)) produces i = 2 j = 1 at which point, the j sequence is now empty, so the entire i

Re: [racket] Disable/Enable Tests

2011-11-27 Thread Nadeem Abdul Hamid
n, Nov 27, 2011 at 10:19 PM, Robby Findler wrote: > On Sun, Nov 27, 2011 at 8:36 PM, Nadeem Abdul Hamid wrote: >> This used to work approximately one year ago. It was very handy for >> students writing world/universe programs to be able to disable tests >> with their completed

Re: [racket] Disable/Enable Tests

2011-11-27 Thread Nadeem Abdul Hamid
>>  http://lists.racket-lang.org/listinfo/users >> > > > > -- > sam th > sa...@ccs.neu.edu > > _________ >  For list-related administrative tasks: >  http://lists.racket-lang.org/listinfo/users -- Nadeem Abdul Hamid Associate Professor, Computer Science Ber

Re: [racket] Beginner can't get some Macintosh command keys to work

2011-11-24 Thread Nadeem Abdul Hamid
italized when Caps Lock is on, instead of invoking a shortcut. > > I haven't reported it yet because I thought it might be an Ubuntu thing only > - it seemed to start happening when I got 11.04 - but none of my other > programs do it. > > Neil T > > > On 11/23/2011

Re: [racket] Beginner can't get some Macintosh command keys to work

2011-11-23 Thread Nadeem Abdul Hamid
Yes, this seems to happen to me sometimes too. I just tried Cmd+N to create a new file and it wasn't working; but it worked by selecting the "New" menu item. It seems to maybe have something to do with switching desktop "spaces" - because after doing that, the Cmd+N shortcut doesn't work, reliably.

[racket] Error generating scribble docs by PLaneT packager

2011-11-20 Thread Nadeem Abdul Hamid
I'm trying to create a planet archive and am getting the error below. Any ideas on what might be wrong? Thanks, --- nadeem $ raco planet create /...path.../racketui/ Building: scribblings/racketui.scrbl PLaneT packager: Error generating scribble documentation: declare-exporting: not a module pat

[racket] Color names in the-color-database

2011-11-20 Thread Nadeem Abdul Hamid
Is there a convenient way to get a list of the color names in the-color-database (in racket/draw)? I see the 'colors' hash table defined in collects/racket/draw/private/color.rkt but don't see any way to access it to extract the key values. Thanks, --- nadeem __

Re: [racket] DrRacket needs work

2011-11-14 Thread Nadeem Abdul Hamid
One other suggestion/request for the automatic parens feature: Can it be set up so that it skips over the closing paren if the user types ')' while the cursor is right in front of the automatically-inserted ')' ? I don't know about paredit but Eclipse does this with parens and various types of bra

Re: [racket] Why does this hang (reading subprocess stdout)?

2011-09-24 Thread Nadeem Abdul Hamid
at 9:25 PM, Carl Eastlund wrote: > On Sat, Sep 24, 2011 at 9:19 PM, Nadeem Abdul Hamid wrote: >> I'm not sure if there's something I'm missing, but I'm trying to write >> a script that writes to a subprocess' stdin and then reads its stdout. >> T

[racket] Why does this hang (reading subprocess stdout)?

2011-09-24 Thread Nadeem Abdul Hamid
I'm not sure if there's something I'm missing, but I'm trying to write a script that writes to a subprocess' stdin and then reads its stdout. The program being executed (via 'subprocess') is this C program: /* test.c */ #include int main() { int d; printf("Hello World!"); scanf("%d", &d);

Re: [racket] Getting test-engine to work with #lang racket

2011-09-18 Thread Nadeem Abdul Hamid
Try putting (test) at the very bottom of the file in which you have your check-expect's. On Sun, Sep 18, 2011 at 8:21 PM, Luke Vilnis wrote: > Hi everybody, > I was wondering how to get test-engine working with #lang, or non-student > languages in general. I tried something like this: > #lang rac

Re: [racket] I don't understand structural recursion.

2011-09-17 Thread Nadeem Abdul Hamid
Do you have some examples? Concrete examples of possible input values and what you expect the corresponding output to look like? And if the function expects integers as input, then what is the difference in the output between two successive input values like 2 and 3? 4 and 5? 0 and 1? On Sat, Sep

Re: [racket] External CSS w/ Templates?

2011-09-07 Thread Nadeem Abdul Hamid
On Wed, Sep 7, 2011 at 1:40 AM, Veer wrote: > If my link tag is > > Then browser does not find index.css , but when my link tag is > If it is : > > Then browser is able to apply the index.css . > > I am not too sure why is it so. > If you look at the URL that your servlet runs from, by default

Re: [racket] Planet error: docs failure: read: illegal use of "."

2011-07-20 Thread Nadeem Abdul Hamid
me. But I think it also happened on a binary version I downloaded yesterday for Windows. I'll try getting the latest and see if it makes a difference. The language is just 'racket'. Thanks, --- nadeem > At Wed, 20 Jul 2011 18:02:15 -0400, Nadeem Abdul Hamid wrote: > > I

Re: [racket] Sweet expressions error? WAS Re: Sweet expressions; or making it easier to introduce Racket to me and my coworkers :-)

2011-07-20 Thread Nadeem Abdul Hamid
Seems like you need at least one newline at the end of the file -- put an empty line or two after your printf("Hello") and then it should work. On Wed, Jul 20, 2011 at 6:30 PM, Grant Rettke wrote: > On Wed, Jul 20, 2011 at 4:10 PM, Greg Hendershott > wrote: > >> define factorial(n) > >> if {n

[racket] Planet error: docs failure: read: illegal use of "."

2011-07-20 Thread Nadeem Abdul Hamid
I've posted my first planet package, but I'm getting some weird error in building documentation when installing it from DrRacket, which doesn't occur at all when I install using 'planet install ...' at the command line. Any ideas what is going wrong? Is there something that I might be missing in my

Re: [racket] Planet dev links with student languages

2011-07-18 Thread Nadeem Abdul Hamid
OK, never mind the last two questions: I figured out (require (planet a/b/c)) is equivalent to the form (require (planet "c" ("a" "b" ...)), and the planet dev links do work with BSL, etc. On Mon, Jul 18, 2011 at 9:36 AM, Nadeem Abdul Hamid wrote: > > I

[racket] Planet dev links with student languages

2011-07-18 Thread Nadeem Abdul Hamid
Is it the case that '(require (planet ...))' in the student languages (BSL...) doesn't work with planet dev links? And is the equivalent of a normal racket statement: (require (planet a/b/c)) this in the student languages: (require (planet "a" ("b" "c" 1 0))) ? --- nadeem _

[racket] struct-copy parent fields with provide/contract'ed struct

2011-07-16 Thread Nadeem Abdul Hamid
Am I missing something, or is this a bug? The following works as expected: Welcome to DrRacket, version 5.1.2.3--2011-07-13(41b66d3/a) [3m]. Language: racket; memory limit: 128 MB. > (module yup racket (struct a (x y) #:transparent) (struct b a (z) #:transparent) (provide (struct-out a

Re: [racket] Advice: simulating stateful API in functional setting

2011-07-15 Thread Nadeem Abdul Hamid
On Sat, Jul 16, 2011 at 12:34 AM, Mark Engelberg wrote: > > Because the image is not only dependent upon the current location of > the sprite, but also the entire history of the sprite's movements when > its pen was down. So you either have to store a very long list of > line segments in the worl

Re: [racket] Advice: simulating stateful API in functional setting

2011-07-15 Thread Nadeem Abdul Hamid
On Fri, Jul 15, 2011 at 2:56 PM, Stephen Bloch wrote: > The problem is that some sprite actions (most obviously, "move" when you're > in pen-down mode) affect not only the sprite itself but the world's picture. > So far the least-bad solution I've come up with is to hide a mutation of > that pic

Re: [racket] Strange contracts in the tutorial

2011-06-13 Thread Nadeem Abdul Hamid
It means it "doesn't return". Note that the last thing the function does is call send/suspend/dispatch, which calls response-generator, and never "returns" back out of the original call to render-blog-page. --- nadeem On Mon, Jun 13, 2011 at 5:13 PM, Rodolfo Carvalho wrote: > > Hi, > I'm reading

[racket] syntax/parse ~or patterns

2011-06-09 Thread Nadeem Abdul Hamid
I'm struggling with figuring out how to work with ~or patterns and syntax/parse. Suppose, for example, I want to write a macro that takes any number of either single numbers or pairs of numbers. It should expand into a list of results where each single number is negated and each pair is summed toge

Re: [racket] Functional struct update with subtypes

2011-05-11 Thread Nadeem Abdul Hamid
On Wed, May 11, 2011 at 3:45 PM, David Van Horn wrote: > Is there a good way to do a functional struct updates with subtypes of a > structure? There was some discussion about it a while ago in reference to struct-copy. The documentation has been updated with some useful examples, including usage

Re: [racket] define-syntax-class

2011-04-27 Thread Nadeem Abdul Hamid
On Wed, Apr 27, 2011 at 11:25 PM, Carl Eastlund wrote: > Modules currently can't define syntax for syntax.  However, you can > use define-syntax-set from mzlib/etc to define multiple macros at once > that share local bindings, such as syntax classes.  Since they're > lexical bindings rather than m

Re: [racket] define-syntax-class

2011-04-27 Thread Nadeem Abdul Hamid
On Wed, Apr 27, 2011 at 10:47 PM, Sam Tobin-Hochstadt wrote: >> If I move the syntax class >> definition into the bodies of define-syntax, then it works, but that >> defeats the purpose of being able to define a reusable syntax class... > > You'll need to move the syntax class definition into a se

[racket] define-syntax-class

2011-04-27 Thread Nadeem Abdul Hamid
What am I missing in the code below (reproduced from the "Fortifying Macros" paper)? When run, this gives me an error: "syntax-parse: not defined as syntax class in: binding". If I move the syntax class definition into the bodies of define-syntax, then it works, but that defeats the purpose of bein

Re: [racket] xexpr to mark a radio button 'checked'

2011-04-27 Thread Nadeem Abdul Hamid
Try something like this, with a dummy value for the checked attribute: `(div (input [(type "radio") (name "n-4-answer") (value "2") (checked "yes")])) On Wed, Apr 27, 2011 at 6:11 PM, J G Cho wrote: > I am trying to print: > the egg > > The closest I can come up is: > value="2">checkedthe egg >

Re: [racket] Some newbie trouble on running Web Server on EC 2

2011-04-20 Thread Nadeem Abdul Hamid
On Wed, Apr 20, 2011 at 1:03 PM, J G Cho wrote: > 3. One more. This observation regards Dr Racket. > Sometimes I cannot type [ or ]. It becomes ( or ). > > First I thought my machine was acting up. But I noticed that I can > type 'cond(['  fine. So I am thinking its the Dr who is 'helping me > too

Re: [racket] Typeof

2011-04-04 Thread Nadeem Abdul Hamid
Store the functions go-1, go-2, etc. in whatever is produced by "e"? Such that you can do: ((func-of e) s) --- nadeem 2011/4/4 José Lopes : > I have a function which, at the moment, is performing manual dispatch: > > (cond ((something1? e) (go-1 s)) >        ((something2? e) (go-2 s

Re: [racket] struct-copy with sub-types

2011-03-25 Thread Nadeem Abdul Hamid
iate instance of id" is meant to suggest that it > doesn't have the extended fields. > > What would you have written? > > Robby > > On Fri, Mar 25, 2011 at 10:04 AM, Nadeem Abdul Hamid wrote: >> In that case, the documentation should probably be updated clearly t

Re: [racket] struct-copy with sub-types

2011-03-25 Thread Nadeem Abdul Hamid
Mar 25, 2011 at 7:52 AM, Pierpaolo Bernardi > wrote: >> On Wed, Mar 23, 2011 at 00:49, Nadeem Abdul Hamid wrote: >>> Is there anything like struct-copy that works to functionally update a >>> field value in a structure, where the field happens to be defined in >>

[racket] struct-copy with sub-types

2011-03-22 Thread Nadeem Abdul Hamid
Is there anything like struct-copy that works to functionally update a field value in a structure, where the field happens to be defined in the super-type? In the example below, I want to "functionally update" a field of the sub structure inherited from the base definition... (struct base (a b) #

Re: [racket] pop3 connection

2010-12-16 Thread Nadeem Abdul Hamid
; (define mp (connect-to-server "pop.gmail.com" 995)) > > And after thirty or so seconds, I receive the following error > > regexp-match: expects type as 2nd > argument, given: #; other arguments were: #rx"^\\+OK(.*)" > > Any ideas? > >

[racket] equal? with classes and contracts

2010-11-30 Thread Nadeem Abdul Hamid
I think something like this has come up before but I can't find the thread. Given: (define A% (class object% (inspect #f) (super-new))) (define/contract B% (class/c ) (class object% (inspect #f) (super-new))) How can I get around the problem that: (equal? (new A%) (new A%)) but (not

Re: [racket] member et al.

2010-11-11 Thread Nadeem Abdul Hamid
C 93 > > _ > For list-related administrative tasks: > http://... > > _ >  For list-related administrative tasks: >  http://lists.racket-lang.org/listinfo/users > > _

Re: [racket] [htdp] Can this be simplified?

2010-11-02 Thread Nadeem Abdul Hamid
Please don't post solutions to problems on the public mailing list. I just assigned this problem to my students this past week and it's rather annoying to have the solution easily available on the public group page! Thanks, --- nadeem On Tue, Nov 2, 2010 at 11:57 AM, Sam Griff wrote: > Here is my

Re: [racket] Servlets and forms

2010-10-19 Thread Nadeem Abdul Hamid
On Sat, Oct 9, 2010 at 6:12 PM, Jay McCarthy wrote: > The next release has support for almost all the form elements: > > http://github.com/plt/racket/blob/master/collects/web-server/formlets/input.rkt > The select-input and multiselect-input formlets don't seem to have an #:attributes parameter,

Re: [racket] testing student programs

2010-10-16 Thread Nadeem Abdul Hamid
I don't think it should be that difficult once you get an evaluator set up. I've done something like what you want, taking some ideas from the handin server code. What I came up with (no fancy macros) is you define a test specification for an assignment like this (in a #lang racket file):

Re: [racket] a small programming exercise

2010-10-14 Thread Nadeem Abdul Hamid
Oh yeah, duh. On Thu, Oct 14, 2010 at 12:48 PM, Matthias Felleisen wrote: > > Because (require racket) provides everything you'd ever want. > > > On Oct 14, 2010, at 12:39 PM, Nadeem Abdul Hamid wrote: > >>> Thanks for setting my head straight! >>

Re: [racket] a small programming exercise

2010-10-14 Thread Nadeem Abdul Hamid
other > with > hash tables and fancy algorithmics until you know you need it -- by measuring. > > I used to believe this but have temporarily forgotten this lesson due to > external influences. > > -- Matthias > > > > > On Oct 14, 2010, at 12:09 PM, Nadeem Abdu

Re: [racket] a small programming exercise

2010-10-14 Thread Nadeem Abdul Hamid
d))) > > (check-expect (collect '(123 124 125 126 23 24 31)) >              (list (cons 1 4) (cons 2 2) (cons 3 1))) > > > If actual I/O is required, I'd use batch-io to read CSV files and > display the list above in a batch action. > _________

Re: [racket] another error on run/save (was: "changed on disk" (was: Re: Buttons on the toolbar don't appear))

2010-10-05 Thread Nadeem Abdul Hamid
e code file, it doesn't happen. --- nadeem On Tue, Oct 5, 2010 at 1:35 PM, John Clements wrote: > > On Oct 2, 2010, at 7:20 AM, Matthias Felleisen wrote: > >> >> On Oct 2, 2010, at 8:23 AM, Robby Findler wrote: >> >>> On Fri, Oct 1, 2010 at 10:29 PM, Nadee

Re: [racket] Buttons on the toolbar don't appear

2010-10-02 Thread Nadeem Abdul Hamid
2, 2010 at 9:20 AM, Matthias Felleisen > wrote: >> >> On Oct 2, 2010, at 8:23 AM, Robby Findler wrote: >> >>> On Fri, Oct 1, 2010 at 10:29 PM, Nadeem Abdul Hamid wrote: >>>> Do other people experience these things?... >>>> >>>> Why i

[racket] Buttons on the toolbar don't appear

2010-10-01 Thread Nadeem Abdul Hamid
Do other people experience these things?... Why is it that sometimes when I open a *.rkt file with #lang racket at the top, the "check syntax" "debug" "macro stepper" buttons don't appear unless I go that top #lang line and edit it -- delete the "t" of "racket" and retype it, for instance? Anoth

Re: [racket] ... vs ...+

2010-09-27 Thread Nadeem Abdul Hamid
_ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/users > -- Nadeem Abdul Hamid Associate Professor, Computer Science Berry College PO Box 5014 2277 Martha Berry Hwy N

Re: [racket] Question regarding DrRacket x86

2010-09-19 Thread Nadeem Abdul Hamid
No, I don't think it will be a problem. I have it installed on my 64-bit laptop and it works fine. --- nadeem On Sun, Sep 19, 2010 at 11:21 AM, Ellis Lee wrote: > Hello, > >  I just wanted to ask if it's all right to download and install DrRacket > Windows x86 >  on my Windows 7 64-bit laptop des

[racket] struct->vector interaction with BSL structures

2010-09-13 Thread Nadeem Abdul Hamid
Suppose I have these definitions in a BSL file: (define-struct fighter (desig accel speed range)) (define fighter1 (make-fighter "F22" 75 200 350)) Now, in a separate 'teachpack' (written in #lang racket), I have an exported function that processes the 'fighter1' value. But why does struct->ve

Re: [racket] 2htdp/image question

2010-09-10 Thread Nadeem Abdul Hamid
Yes, it looks to me like it works fine now. I used yesterdays' nightly build: version 5.0.1.5--2010-09-09, on Windows XP. --- nadeem On Fri, Sep 10, 2010 at 6:22 PM, Robby Findler wrote: > I believe this has been fixed in the latest GIT version. If someone > has the opportunity and interest to ve

Re: [racket] struct in racket

2010-09-05 Thread Nadeem Abdul Hamid
By default, struct defines an "opaque" structure. You can do something like this: > (struct posn (x y) #:transparent) > (struct? (posn 3 4)) #t See the documentation for struct in the reference. HTH, --- nadeem On Sun, Sep 5, 2010 at 10:05 PM, 趙Frodo wrote: > I don't know if I did something

Re: [racket] Web input-string with pre-fllled value

2010-08-24 Thread Nadeem Abdul Hamid
> > I would like to pre-fill the VAT Rate input-string with a rate (set to 17.5 > as a > default). Is there a way I can do that? > You probably have to define your own formlet, e.g.: (define init-input-string (λ(val) (to-string

Re: [racket] get-uncovered-expressions

2010-07-22 Thread Nadeem Abdul Hamid
ize ([sandbox-coverage-enabled #t])         (make-evaluator 'racket                         (port->bytes inp)                         )  (get-uncovered-expressions Ev) Thanks for the help, --- nadeem On Wed, Jul 21, 2010 at 6:39 PM, Nadeem Abdul Hamid wrote: >> I can't pr

Re: [racket] get-uncovered-expressions

2010-07-21 Thread Nadeem Abdul Hamid
"(define (f x) (if (zero? x) \"zero\" \"non-zero\")) (f 4)") ))) (get-uncovered-expressions Ev) --- nadeem On Jul 21, 2010, at 6:19 PM, Eli Barzilay wrote: > On Jul 21, Nadeem Abdul Hamid wrote: &g

[racket] get-uncovered-expressions

2010-07-21 Thread Nadeem Abdul Hamid
Sorry if I am missing something obvious, by why does the following produce '() ? (define Ev (parameterize ([sandbox-coverage-enabled #t]) (make-evaluator 'lang/htdp-intermediate `(define (f x) (if (zero? x) "zero" "non-zero")) `(

Re: [racket] [plt-scheme] get-uncovered-expressions always returns () ?

2010-07-15 Thread Nadeem Abdul Hamid
gt; > (FWIW, this is 4.2.3.9svn4jan2010; perhaps an update would help?) > > John > > > _ >  For list-related administrative tasks: >  http://list.cs.brown.edu/mailman/listinfo/plt-scheme > > -- Nadeem Abdul Hamid Assistant Pr

[racket] Web-cells example in docs gives error

2010-07-03 Thread Nadeem Abdul Hamid
Running the extended example in this section: http://docs.racket-lang.org/web-server/servlet.html?q=box#(part._web-cells) gives me: exception: continuation application: attempt to cross a continuation barrier What is wrong? --- nadeem _ For l

Re: [racket] DrRacket, Emacs, REPL [was: Sending s-expr to repl]

2010-06-24 Thread Nadeem Abdul Hamid
> See > http://blog.racket-lang.org/2009/03/drscheme-repl-isnt-lisp.html > for a detailed answer. > I see what the blog post above is saying, but (I know, "no when no if no but"), has anyone ever used editors for some of the proof assistants, like CoqIDE or ProofGeneral mode in Emacs for Coq? T

[racket] Quitting web servlet apps

2010-06-23 Thread Nadeem Abdul Hamid
A couple of questions regarding quitting web apps, 1. I start up a servlet so: (serve/servlet my-dispatch #:quit? #t ...) Now, how come if I use a program like curl/wget to access the "/quit" URL, the server doesn't shut down, but accessing the same URL via a web browser does? Here's the t

  1   2   >