Re: [racket-users] raco test: 0 tests run, 1 test passed

2017-03-02 Thread Jonathan Schuster
The problem is that a test-case expression runs a test immediately; it does not return a test object to be run later. In your case, the test runs while my-test-case is being defined, then no test at all actually runs (my-test-case is just #). A test-suite expression, however, *does* construct a te

Re: [racket-users] Persisting large values for debugging long-running programs

2016-09-14 Thread Jonathan Schuster
rote: > > I think reading and writing fasl should be faster, but don't expect the > format to be compatible across Racket versions. > > Or, if you know some super-efficient encoding for your data, wrap it in a > new struct type and implement your own serialization. > >

[racket-users] Persisting large values for debugging long-running programs

2016-09-14 Thread Jonathan Schuster
I have some large (several GB worth) sets of values I'd like to persist across debugging runs of a program, rather than recomputing them each time. I'm currently doing this with the built-in "read" and "write", but is there a more efficient method, especially for reading the data back in? I could

[racket-users] User/installation scope issues for --skip-installed

2016-04-19 Thread Jonathan Schuster
Currently, "raco pkg install -u --skip-installed foobar" will error if foobar is already installed at the installation scope. I can understand why that might be good, but in my case I'm perfectly happy to use that version of the package. Is there an option that would allow packages from different s

Re: [racket-users] Package installation scopes to avoid reinstalls

2015-11-09 Thread Jonathan Schuster
: "snapshot" or "development", respectively. In >the latter case, though, the default package scope is set to > "installation", so package installations are not shared by default; >you can change the default scope to "user". > > At

[racket-users] Package installation scopes to avoid reinstalls

2015-11-05 Thread Jonathan Schuster
Is there such a thing as a user-specific but non-version-specific installation scope for packages? The docs [1] appear to indicate that you can have user+version-specific or non-user+non-version-specific installs, but neither of the other two combinations. The main problem is that it's a (minor) p

Fwd: [racket-users] Using Redex

2015-03-31 Thread Jonathan Schuster
Forgot to reply to the list, so I'm forwarding here. -- Forwarded message -- From: Paul van der Walt Date: Tue, Mar 31, 2015 at 12:06 PM Subject: Re: [racket-users] Using Redex To: Jonathan Schuster Hi Jonathan, Thanks for your response! I'm not sure if it'd b

Re: [racket] Better discoverability for errortrace

2014-09-29 Thread Jonathan Schuster
s is something to add to xrepl? > > Robby > > On Mon, Sep 29, 2014 at 1:06 PM, Jonathan Schuster > wrote: > > We were having a discussion today in the Northeastern lab about how the > > Racket stack traces sometimes don't give enough information, and the > >

[racket] Better discoverability for errortrace

2014-09-29 Thread Jonathan Schuster
We were having a discussion today in the Northeastern lab about how the Racket stack traces sometimes don't give enough information, and the solution to the problem (errrortrace) is not very discoverable if you're not using DrRacket. Here's an example of the kind of case I mean: $ racket -t jpg.r

[racket] Why does sync require at least one event?

2014-07-17 Thread Jonathan Schuster
I'm writing a macro that expands into a use of sync on a number of async-channels. In the context of the macro, it makes sense to have it wait on zero channels - it means effectively the same thing as "go to sleep forever", or (sync never-evt). However, sync requires it be passed at least one even

[racket] Documenting Redex forms with Scribble

2014-02-25 Thread Jonathan Schuster
Are there any Scribble forms for documenting Redex metafunctions and judgments? I'm putting together a redex-extras package that has several generic utilities I've found useful throughout my model, but I'm not sure how to document them. Racket Users list: http://lists.racke

Re: [racket] Abstract datum literal out of syntax class

2014-02-17 Thread Jonathan Schuster
t of reflection on syntax patterns, which may be available, but I'm not going to spend time to look into it right now. On Mon, Feb 17, 2014 at 4:24 PM, Jonathan Schuster wrote: > Is there a way to abstract datum literals out of a (splicing) syntax > class? I have a number of pa

[racket] Abstract datum literal out of syntax class

2014-02-17 Thread Jonathan Schuster
Is there a way to abstract datum literals out of a (splicing) syntax class? I have a number of patterns that look something like this: (~optional (clause-name: element ...)) and I'd like to factor that out into a common syntax class, but be able to specialize it according to the specific clause n

Re: [racket] Multiple ellipses after judgment form premises?

2014-02-06 Thread Jonathan Schuster
y)]) > > (define-judgment-form L > #:mode (nested-number-list I) > #:contract (nested-number-list any) > [(where (any_2 ...) (any_1 ... ...)) >(is-number any_2) ... > >(nested-number-list ((any_1 ...) ...))]) > > (judgment-holds

[racket] Multiple ellipses after judgment form premises?

2014-02-06 Thread Jonathan Schuster
Is there a reason that judgments in Redex don't allow multiple ellipses after a premise? I have a case where I have a list of lists of items, and I want to check that a certain property holds on each item. Here's a very simplified example: (define-language L) (define-judgment-form L #:mode (is-

Re: [racket] Custodian behavior on normal exit

2013-10-30 Thread Jonathan Schuster
On Wed, Oct 30, 2013 at 10:16 AM, Tobias Hammer wrote: > Custodians can have entries that are cleaned up on program exit and > entries that are only cleaned up whenever a custodian is (regularly) shut > down. > > See > http://docs.racket-lang.org/**inside/Custodians.html

[racket] Custodian behavior on normal exit

2013-10-28 Thread Jonathan Schuster
I think I have a misunderstanding on the behavior of custodians. I'm trying to write a Racket program that shuts down any subprocesses it may have created when the program exits, regardless of whether the exit was graceful. I would have thought that the root custodian would have taken care of this

[racket] IRC library

2013-10-15 Thread Jonathan Schuster
For anyone interested, I'd like to announce the release of my IRC client library for Racket. It packages up the client side of the IRC protocol and does most of the hard processing for you, wrapping everything into a simple API. It's available as a package: raco pkg install irc Connecting and sen

[racket] Expect library?

2013-09-24 Thread Jonathan Schuster
Does Racket have a library/language similar to the Expect [1] tool? I need a tool for testing input/output from other processes, including timing. I'm considering rolling my own, but wanted to check that nothing else exists yet. I considered using Expect itself, but its timeout mechanism can only

Re: [racket] [redex] side-condition matching upon errors

2013-09-04 Thread Jonathan Schuster
> > > As for backwards compatibility issues, I don't know how much people rely >> on side-condition taking something not-#f/#t... Probably too much :) >> (also, there could be a `side-condition-soft' variant that is not strict >> in the boolean-ness, or vice-versa) >> >> > Well, if we're willing to

Re: [racket] Peekable asynchronous channel?

2013-08-13 Thread Jonathan Schuster
Thanks for the feedback, all. Wrapping the channel with my own custom logic was definitely the approach I was thinking about if I wrote it on my own, so I'm going forward with that. Having thought about it more, even without getting the peeked value this wrapper wouldn't be thread-safe: one thread

Re: [racket] Peekable asynchronous channel?

2013-08-12 Thread Jonathan Schuster
there be interest in providing that functionality as a package? On Sun, Aug 11, 2013 at 2:12 PM, Jonathan Schuster wrote: > I'd like to have an asynchronous channel that does not remove a value from > its buffer on sync, so that I can separate the code that waits for a > message f

[racket] Peekable asynchronous channel?

2013-08-11 Thread Jonathan Schuster
I'd like to have an asynchronous channel that does not remove a value from its buffer on sync, so that I can separate the code that waits for a message from the code that removes everything currently in the channel. In some sense, I want sync to do a "peek", not a "get". Does anything like this exi

[racket] Extending definitions window as part of #lang

2013-07-23 Thread Jonathan Schuster
I'm currently trying to write a #lang with a built-in analysis visualization in DrRacket. The idea is that when I open a program written in this #lang, a "Run Analysis" button should appear. When the button is clicked, it should run the analysis and draw syntax-check-like arrows in the definitions

[racket] Package name resolver is down

2013-03-14 Thread Jonathan Schuster
The official package name resolver at https://pkg.racket-lang.org/ has been down for at least a couple of days. Is it going to come back up? Jonathan Racket Users list: http://lists.racket-lang.org/users

[racket] Browser module for OAuth use?

2012-01-23 Thread Jonathan Schuster
I'm starting to write some Racket bindings for the Facebook API, and I'm trying to get the authentication up and running. They use an OAuth system that, for desktop clients, requires that your app open a browser window to allow the user to login. Once they've done that, your app is supposed to dete