Re: [racket] users Digest, Vol 109, Issue 79

2014-09-29 Thread Nick Shelley
I did so privately as well, but he said he doesn't have his password I guess. I replied to that and pointed him to the users-request email option. Hopefully that will help. On Mon, Sep 29, 2014 at 3:34 PM, Neil Van Dyke wrote: > I had privately pointed him to the URL to unsubscribe himself, but

Re: [racket] users Digest, Vol 109, Issue 70

2014-09-29 Thread Nick Shelley
I'm not certain, but I'm pretty sure following the instructions at the top of the emails you are receiving would be a faster way to get what you want, rather than spamming the whole list for every email you receive. I'll quote them for your convenience (copied from the email you are replying to):

[racket] SWIFT IS AWESOOOOOME!!!!!

2014-06-07 Thread Nick Shelley
I've been trying to convince my Apple fanboy coworkers to learn a real programming language like Racket for a while, but they always dismissed everything I said because Apple can do no wrong. One of them posted his notes from WWDC that included the following bullet point. Very vindicating. (I don't

Re: [racket] off-topic -- Re: Live coding with Racket?

2014-05-30 Thread Nick Shelley
As someone who learned correct programming principles from HtDP (out of classroom but with help from a PL professor), I'm glad it exists and I think it hit the right balance for me, and probably works well in classroom settings as well. However, since I understand the value of HtDP from experience

Re: [racket] Suggested material for learning Racket and PL topics?

2013-09-03 Thread Nick Shelley
Thanks for the suggestions. I will add those to my list. Would it make sense to add any of these responses to the Learn page of the Racket web site? On Thu, Aug 29, 2013 at 12:17 PM, Asumu Takikawa wrote: > On 2013-08-29 14:08:30 -0400, Greg Hendershott wrote: > > 3. There are a few blogs that

[racket] Suggested material for learning Racket and PL topics?

2013-08-28 Thread Nick Shelley
I'm interested in learning more about Racket, macros, programming languages, and anything else that will make me a better programmer. The problem is, there is so much material out there that I'd appreciate help in prioritizing what to do first. As a background, I understand that using Racket is on

Re: [racket] Windows build problems on 5.90.0.7

2013-08-17 Thread Nick Shelley
I just ran into this very thing today because I didn't realize the packages were put into a submodule and I'm in the habit of not reading error messages. However, after trying some things and getting this error multiple times, I finally read it carefully. The answer is in your skimmed "something so

Re: [racket] Question about string conversion

2013-07-18 Thread Nick Shelley
I recently came across a site that made coming up with regular expressions much, much easier for me: http://www.debuggex.com/ Hopefully that will help with your "regex hell" problem. On Thursday, July 18, 2013, Greg Hendershott wrote: > To add to what Carl and Robby said: > > On Thu, Jul 18, 201

[racket] Definition of DSL?

2013-06-24 Thread Nick Shelley
The simplicity and DSL thread mentioned Java DSLs, and I came across an example of one at http://camel.apache.org/java-dsl.html. To me, this isn't really a DSL, it's more of a programming pattern. One of the usage patterns on the wiki page for DSL is embedded DSL that uses the syntax of the host l

Re: [racket] DSLs and complexity

2013-06-21 Thread Nick Shelley
I haven't heard of HtD Components or HtD Systems before. I can't seem to find it after some quick googling (the closest I got was a draft of HtD Classes). Can you point me to these resources? I really enjoyed HtDP. Ok, after a bit more searching I found a reference to components in the intro of H

Re: [racket] struct-copy with parent type

2013-05-24 Thread Nick Shelley
rough some of the struct docs, but couldn't find a way to introspect a struct type. On Fri, May 24, 2013 at 1:16 PM, Jay McCarthy wrote: > On Fri, May 24, 2013 at 11:18 AM, Nick Shelley > wrote: > > The struct-copy docs say "The result of struct-expr can be an instance &g

[racket] struct-copy with parent type

2013-05-24 Thread Nick Shelley
The struct-copy docs say "The result of struct-expr can be an instance of a sub-type of id, but the resulting copy is an immediate instance of id (not the sub-type)." Why is this? For instance, I would hope this would work: (struct posn (x y)) (struct 3d-posn posn (z)) (3d-posn-z (struct-copy pos

Re: [racket] Why functional?

2013-05-22 Thread Nick Shelley
I'm sure you'll get more sophisticated responses soon, but this blog post by John Carmack helped me understand the ideas and tradeoffs a bit. I'm not sure everything in there is 100% correct or that I agree with everything, but I think it provides a pretty good overview. http://www.altdevblogaday.

Re: [racket] Duplicating output from a system call

2013-05-17 Thread Nick Shelley
I went to do my "tee" workaround that I assumed would work, and I discovered that it suffers from the same issue. I then just ran the command without Racket but included the pipe to tee and none of the output is shown until the process finishes. The same thing happened when I pipe to less. There's

Re: [racket] Duplicating output from a system call

2013-05-16 Thread Nick Shelley
; > yourself. You'd do something like > > > > (system* "/usr/bin/instruments" "-t" (path->string instruments-path) > > (path->string app-path) "-e" "UIASCRIPT" (path->string script-path)) > > > > roughly. > &

Re: [racket] Duplicating output from a system call

2013-05-16 Thread Nick Shelley
I tried "file-stream-buffer-mode" on the stdout port and that didn't help. That seems to be the only port that will work with that method. I also realize I misled you when I put "" as a placeholder in the code. Really it is a command of the form (format "instruments -t ~a \"~a\" -e UIASCRIPT ~a" .

Re: [racket] Duplicating output from a system call

2013-05-16 Thread Nick Shelley
copies the data to the real port you want it to go to > and then stdout (or whatever) and when you do that, you have to be careful > to make sure ports get closed properly, or else you'll lose data, but it > doesn't take much code and works well. > > Robby > > > On

[racket] Duplicating output from a system call

2013-05-16 Thread Nick Shelley
I have a script that runs some automated tests and logs the results to the console. The tests can take 10+ minutes, so logging steps to the console is informative. I'm using Racket to run the script with (system ...) and parse the logs and report pass/failure, but to do that I have to capture the l

Re: [racket] Json pretty-print

2013-04-16 Thread Nick Shelley
First off, thanks Carl and Danny for the code. The thing is, the system call to python works for our needs and is easier than rolling my own. The reason I started this thread in the first place is because it seems like outputting human-readable json is common and often desired (see the upvotes in t

Re: [racket] Json pretty-print

2013-04-16 Thread Nick Shelley
#x27;ve had good luck porting simple Python examples to Racket. Perhaps you > could start with the Python code that works as you expect, port it to > Racket, then refactor it to more Rackety ways: > http://hg.python.org/cpython/file/cc0e72082e52/Lib/json > > > On Tue, Apr 16, 2013 at 1:

Re: [racket] Json pretty-print

2013-04-16 Thread Nick Shelley
ake sure I wasn't missing it somewhere (which happens often with me). On Tue, Apr 16, 2013 at 11:06 AM, Nick Shelley wrote: > I ended up just doing a system call to Python as suggested here: > http://stackoverflow.com/questions/352098/how-to-pretty-print-json-from-the-command-line &

Re: [racket] Json pretty-print

2013-04-16 Thread Nick Shelley
cause he's a Python guy. I guess he wins this round... On Sat, Apr 13, 2013 at 11:37 AM, Nick Shelley wrote: > Is there a way to get formatted json output to a file? I couldn't figure > out how to get pretty-print hooked in with write-json. I'm probably just

[racket] Json pretty-print

2013-04-13 Thread Nick Shelley
Is there a way to get formatted json output to a file? I couldn't figure out how to get pretty-print hooked in with write-json. I'm probably just missing something simple. Racket Users list: http://lists.racket-lang.org/users

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

2012-11-24 Thread Nick Shelley
ns change that state to permanent or deleted. I don't see a need to track history. But again, I have very little knowledge about this subject. On Sat, Nov 24, 2012 at 12:16 PM, Nadeem Abdul Hamid wrote: > On Sat, Nov 24, 2012 at 12:07 PM, Nick Shelley wrote: > >> For what it

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

2012-11-24 Thread Nick Shelley
For what it's worth, Xcode differentiates these cases by inserting a temporary closing paren that is gray instead of black. You can make it permanent by arrowing over it, typing it yourself, tabbing over it, or just moving the cursor outside the matching parens. When it becomes permanent it is blac

Re: [racket] Places acting differently in DrRacket and Racket

2012-10-18 Thread Nick Shelley
> > Add a print before the place start to see it. Seems to be broken since < > > 5.2.1. > > > > On Thu, 18 Oct 2012 06:39:56 +0200, Nick Shelley > > > wrote: > > > > > It looks like that was the problem. Thanks! > > > > > > Howeve

Re: [racket] Places acting differently in DrRacket and Racket

2012-10-17 Thread Nick Shelley
'm missing? On Wed, Oct 17, 2012 at 10:26 PM, Robby Findler wrote: > Does your racket program exit before the place runs? > > Robby > > On Wed, Oct 17, 2012 at 11:12 PM, Nick Shelley > wrote: > > It's usually the case that I'm just missing something obviou

[racket] Places acting differently in DrRacket and Racket

2012-10-17 Thread Nick Shelley
It's usually the case that I'm just missing something obvious, but when I have a file that just creates a place that prints something and I run it in DrRacket, I see the thing printed after a slight pause, but when I run the file with the racket executable from the command line, I don't see anythin

Re: [racket] Environment variables in paths

2012-09-28 Thread Nick Shelley
o' > program? > > On Fri, Sep 28, 2012 at 3:36 PM, Laurent wrote: > > Can't you write > > (build-path (getenv "WORKSPACE") ) > > ? > > > > Laurent > > > > On Fri, Sep 28, 2012 at 11:30 PM, Nick Shelley > > wrote: >

[racket] Environment variables in paths

2012-09-28 Thread Nick Shelley
I can't seem to find a path function that deals with environment variables. Is there some variant of cleanse-path that resolves environment variables first? Concretely, I have an environment variable $WORKSPACE that tells where I'm operating from. The result of (getenv "WORKSPACE") is the correct

Re: [racket] Dialog with parent frame

2012-05-16 Thread Nick Shelley
lled the most recent changes and, lo and behold, it was fixed and works great. Thanks again. On Wed, May 16, 2012 at 1:44 PM, Nick Shelley wrote: > Thanks for pointing out the 'no-sheet option. I guess I missed that in the > docs. > > I played with the work-around for a bit and could

Re: [racket] Strange time function results

2012-05-16 Thread Nick Shelley
I'm definitely not the expert on this, but I just quickly subtracted the gc time from the cpu time and the times look pretty consistent: > (- 7176 4537) 2639 > (- 5600 2949) 2651 > (- 4040 1388) 2652 Also, I would guess that cpu time adds the time of all cores or threads or whatever, so I assume

Re: [racket] Dialog with parent frame

2012-05-16 Thread Nick Shelley
he 'no-sheet fix to be pushed since what I'm working on isn't very urgent. Thanks again for responding. On Wed, May 16, 2012 at 7:38 AM, Matthew Flatt wrote: > At Wed, 9 May 2012 20:06:15 -0600, Nick Shelley wrote: > > When I assign a frame as a dialog's parent, the

Re: [racket] Custom Key Bindings - Post Your File

2012-05-11 Thread Nick Shelley
more convenient. On Fri, May 11, 2012 at 1:39 PM, Nick Shelley wrote: > Sorry to be imprecise. It lists all menu actions plus many standard text > actions. Here's a screenshot of the last menu actions followed by some > selection actions. > > On Fri, May 11, 2012 at 1:32 PM, Luke Vil

Re: [racket] Custom Key Bindings - Post Your File

2012-05-11 Thread Nick Shelley
On the topic of key bindings, is there a reason this can't be done in the preferences menu? Xcode has a key bindings section in the preferences menu that has all possible actions on the left and the current bindings on the right, and you can just click on the current binding and change it to whatev

[racket] Dialog with parent frame

2012-05-09 Thread Nick Shelley
When I assign a frame as a dialog's parent, the title of the dialog isn't shown, but when I leave the parent as #f, the dialog shows up in the middle of the screen even though the window may be in a totally different place. Is there a way to have a frame as the parent and still have the title displ

Re: [racket] The value of a language

2012-05-09 Thread Nick Shelley
Sending these responses to the group. On Wed, May 9, 2012 at 4:22 PM, Nick Shelley wrote: > Thanks for the link, I should definitely go through that. > > However, after quickly looking through the problem set, it seems like > these are problems made for features, not features

Re: [racket] The value of a language

2012-05-09 Thread Nick Shelley
This sounds a lot like Paul Graham's "Blub Paradox" from http://www.paulgraham.com/avg.html. My experience with Racket is that I initially hated it because I didn't understand it, but now that I'm past that pettiness I use Racket whenever I have a choice. However, I'm certain I don't use the full

Re: [racket] Indenting with class

2012-04-14 Thread Nick Shelley
st flow-spacer) > (list flow-spacer flow-spacer > flow-spacer flow-spacer))] > -[one-ok? (tagged+arg-width . < . 60)]) > + [one-ok? (and (not (eq? mode 'new)) (tagged+arg-width > . < . 60))])

Re: [racket] display problem

2012-04-12 Thread Nick Shelley
Only beside. But how can I then take care that the text are displayed into the empty-scene. I think you need overlay or something for that. Every image function returns an image, so you can use beside to create an image of your text with the cursor in the right spot, and then place that i

[racket] Interactive Canvas

2012-04-09 Thread Nick Shelley
I don't have much gui programming experience, so sorry if this is a dumb question. I want to draw a bunch of rectangles and sub-rectangles on a canvas and have something happen when each sub-rectangle is moused over. I was thinking about just making each sub-rectangle its own canvas so it can hand

[racket] Indenting with class

2012-04-08 Thread Nick Shelley
Punny, right? Anyway, I can't figure out how to get DrRacket to indent like this: (define<../reference/define.html#(form._((lib._racket/private/base..rkt)._define))> msg (new<../reference/objcreation.html#(form._((lib._racket/private/class-internal..rkt)._new))> message% [parent frame]

Re: [racket] Clarification on licensing of Racket code?...

2012-04-06 Thread Nick Shelley
Maybe someone should make a tool that strips the newlines out of macro definitions so they all meet the "10 lines or less" requirement. After all, isn't law mainly about finding loopholes? On Fri, Apr 6, 2012 at 1:22 PM, Brian Mastenbrook wrote: > On 04/06/2012 03:06 AM, Eli Barzilay wrote: > >>

Re: [racket] submitting bug reports

2012-04-06 Thread Nick Shelley
I guess I'm not the only one who was confused by this. To get to bugs page, you need to go to the documentation section of the site and then on the left there is a "report a bug" link. I personally would expect this link to be in the community section. Maybe it's purposefully hidden so people use

Re: [racket] display problem

2012-04-05 Thread Nick Shelley
You should look into the composing image functions available. The beside function should make it so you don't need to calculate exactly where the cursor should be displayed. On Thu, Apr 5, 2012 at 11:39 AM, Roelof Wobben wrote: > Op 5-4-2012 19:28, Danny Yoo schreef: > > http://www.ccs.neu.edu/

Re: [racket] Antw:Re: Is this a good design

2012-02-29 Thread Nick Shelley
One thing to consider: "if" takes a boolean value as the first part. The function "string?" evaluates to a boolean value, so you can just use this result directly instead of seeing if it is equal to "true." In other words, you could simplify the first part to (if (string? s) ...) In general, you