Re: [racket-users] How to get information about where an error occurs, in a stack trace context?

2015-11-21 Thread David T. Pierson
On Thu, Nov 19, 2015 at 09:04:49PM -0800, thomas.lynch wrote: > I have a related question. I turned on error trace using the command line > Robby > suggested, but it doesn't give me a trace, but rather just the call point and > error function. Here is an example, the trace should be f -> gg ->

Re: [racket-users] setting default font face and size for a text%

2015-10-13 Thread David T. Pierson
On Mon, Oct 12, 2015 at 09:08:45AM -0500, Robby Findler wrote: > That will work for newly typed text. Other code might changed the style and > copying and pasting styled text may change it. You can use after-insert to > change the style for those cases. Or maybe you want to allow that. OK thanks.

[racket-users] setting default font face and size for a text%

2015-10-12 Thread David T. Pierson
I have a text% instance for which I want to optionally set the default style (font face and size). I want it to persist even if all text within the editor is erased. (My first attempt using the change-style method failed this requirement.) I've come up with the following, but is this the simples

Re: [racket-users] Sync on Distributed Place Channels

2015-08-30 Thread David T. Pierson
On Sun, Aug 30, 2015 at 06:28:24AM -0600, Matthew Flatt wrote: > At Sun, 30 Aug 2015 08:19:22 -0400, "David T. Pierson" wrote: > > I can duplicate the behavior. It seems like a bug. > > A place doubles as a pace channel, but `sync` on a place is like > `place-wait`,

Re: [racket-users] Sync on Distributed Place Channels

2015-08-30 Thread David T. Pierson
On Mon, Aug 24, 2015 at 10:45:11AM -0700, Konstantin Weitz wrote: > I'm trying to receive messages from a place. Receiving the messages > with `place-channel-get` works fine, but using `sync` blocks > indefinitely. I want to use `sync` instead of `place-channel-get` to > check multiple channels sim

Re: [racket-users] About redrawing buttons on-demand in gui framework

2015-07-22 Thread David T. Pierson
On Tue, Jul 21, 2015 at 10:15:40PM +0300, Rickard Andersson wrote: > Initially, I assumed that a set-label call for a button, for example, would > redraw that button automatically, with the new dimensions and everything in > mind. > > When that wasn't the case, I looked for ways to force a redraw

Re: [racket-users] Directory not accessible

2015-07-06 Thread David T. Pierson
On Mon, Jul 06, 2015 at 11:53:38PM -0400, Neil Van Dyke wrote: > David T. Pierson wrote on 07/06/2015 11:27 PM: > >As a side note, I tried using file-or-directory-permissions [3] to avoid > >recursing into directories with no read or execute permission, but it > > BTW, bef

Re: [racket-users] Directory not accessible

2015-07-06 Thread David T. Pierson
On Mon, Jul 06, 2015 at 02:50:36PM -0700, Russ Abbott wrote: > I installed Racket in a directory for which I have access. Yet when I > attempted to run the example code on the Racket Home page: > > (for ([path (in-directory)] > #:when (regexp-match? #rx"[.]rkt$" path)) > (printf "source f

Re: [racket-users] Handling concurrent requests in the web server

2015-04-28 Thread David T. Pierson
On Tue, Apr 28, 2015 at 12:38:54PM +0100, Tim Brown wrote: > Tinkering with network.pipelining settings has done me no good... so > going off-topic slightly -- how do I use Firefox to test web server > concurrency? [Choose to answer this or not, I'm about to JFGI] Rather than expect a single brows

Re: [racket-users] receiving a copy of my own mails to racket-users@googlegroups.com

2015-04-19 Thread David T. Pierson
On Thu, Apr 16, 2015 at 04:39:39PM +0200, Jos Koot wrote: > I receive e-mails from racket-users@googlegroups.com. > However, when I send an e-mail to racket-users@googlegroups.com I don't > receive my own e-mail. I'm not using gmail, but I recall hearing about this problem previously. I was able t

Re: [racket] ranking items by their appearance in sets

2014-09-24 Thread David T. Pierson
On Wed, Sep 24, 2014 at 10:44:45AM -0400, Matthias Felleisen wrote: > Style: Here is my rewrite with style suggestions. I liked to have a > single point that tests all versions of a function when I conduct such > design experiments. I also want to have all my test code in the test > submodule so th

[racket] ranking items by their appearance in sets

2014-09-23 Thread David T. Pierson
Hi all, Given a list of sets of symbols, I want to rank the symbols based on how many sets they appear in. I prefer to be completely functional. Below are 2 different implementations I came up with, with tests. I'm looking for criticism in any aspect, but most importantly I'm wondering whether

Re: [racket] struct constructors

2014-05-27 Thread David T. Pierson
On Tue, May 27, 2014 at 07:25:34PM +1200, Aidan Gauland wrote: > What's the nearest equivalent for a struct to constructors for class > instances? Say I have a struct with a field that should be initialised > to a three-element vector. Right now, I'm just defining a wrapper > make-blah. > > (str

Re: [racket] Regexp question

2014-04-15 Thread David T. Pierson
On Tue, Apr 15, 2014 at 09:09:00PM +0200, Manfred Lotz wrote: > -> (count-substring "[\\[]" "a[rts[a3]") > 2 > -> (count-substring "[a-z\\[]" "a[rts[a3]") > 7 > -> (count-substring "[\\]]" "a[rts[a3]") > 0 > > The first two seem to work fine, the last one doesn't. Those backslashes are not escapi

Re: [racket] Fwd: Re[2]: Racket/class, inherit-field all

2014-04-03 Thread David T. Pierson
On Tue, Apr 01, 2014 at 09:07:01PM +0400, Roman Klochkov wrote: > But may I at least look in compile time what fields the class have? I'm not particularly knowledgable about classes, but... I think the answer is "no". That is what Matthias was showing with his answer. One thing that I didn't se

Re: [racket] create executable on linux

2014-03-08 Thread David T. Pierson
On Sat, Mar 08, 2014 at 10:28:31AM -0700, Jon Stenerson wrote: > If anyone has linux available can you try this out and see if it is > an actual bug, and not just my installation? I did reinstall Racket > 6 to no avail. I also checked that this does not happen on Windows. > Thanks. > > If I enter

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread David T. Pierson
On Sat, Mar 08, 2014 at 11:10:20AM -0700, Matthew Flatt wrote: > At Sat, 08 Mar 2014 12:33:42 -0500, "David T. Pierson" wrote: > > cpu time: 220 real time: 220 gc time: 0 > > cpu time: 112 real time: 112 gc time: 0 > > cpu time: 60 real time: 58 gc time: 0 >

Re: [racket] first vs car ; last vs cdr ; empty? vs null?

2014-03-08 Thread David T. Pierson
On Fri, Mar 07, 2014 at 11:03:57PM -0500, Carl Eastlund wrote: > The first/rest operations do not use a memoization table. They test using > the list? primitive, which is built in and actually has a couple of tag > bits reserved on every cons object for memoizing its results. So the > operation r

Re: [racket] Question about path/param-path function

2014-02-16 Thread David T. Pierson
On Sun, Feb 16, 2014 at 08:19:48PM -0600, David Novogrodsky wrote: > All, > > First here is the code I entered in the interaction window. The question I > have are about these lines: > > (require xml net/url) > > (define u (string->url "http://localhost:8080/foo/testing";)) > > (url-path u) > '(

Re: [racket] C++ Extensions and Classes

2014-02-06 Thread David T. Pierson
On Wed, Feb 05, 2014 at 02:16:54PM -1000, Cody Eilar wrote: > > But what I really want is: > > > > Foo_ext.h: > > > > func1_racket_ext() { /*... do racket stuff and run func1() */} > > > > /* Scheme initializes etc... */ > > > > > > Bar_ext.cpp: > > #include "Foo_ext.h" > > > > func2_racket_ext() {

Re: [racket] Test for async-channel being full

2013-12-02 Thread David T. Pierson
On Fri, Nov 29, 2013 at 12:23:42PM -0800, Eric Dobson wrote: > I'm trying to make a custom output port that is backed by a > async-channel. One of the operations that ports need to provide is an > event that is ready when progress on the event can be made. But since > I cannot tell if the async-cha

Re: [racket] Best way to propose changes to Scribble CSS files

2013-11-13 Thread David T. Pierson
On Wed, Nov 13, 2013 at 06:55:10PM -0800, Matthew Butterick wrote: > I've made a number of updates to the Scribble CSS, and posted more sample > docs, if you care to revisit: > > http://mbutterick.github.io/racket-doc-redo/doc/ I notice an improvement in the styles used with definitions and most

Re: [racket] turning input-port into file-stream port

2013-11-12 Thread David T. Pierson
On Tue, Nov 12, 2013 at 11:55:22PM -0500, David T. Pierson wrote: > On Nov 12, 2013, at 4:04 PM, Vlad Kozin wrote: > > Can somebody pls have a look at this code. I can't figure out why it > > doesn't work. Input is certainly seen inside the background thread > > tha

Re: [racket] turning input-port into file-stream port

2013-11-12 Thread David T. Pierson
On Nov 12, 2013, at 4:04 PM, Vlad Kozin wrote: > Can somebody pls have a look at this code. I can't figure out why it > doesn't work. Input is certainly seen inside the background thread > that I spawn to pump data from one port to another. But the main > thread seems to receive an empty port. Hi

Re: [racket] dynamically auto-initialized private struct fields

2013-11-12 Thread David T. Pierson
On Sun, Nov 10, 2013 at 12:36:13PM -0500, Matthias Felleisen wrote: > > Have you considered classes instead of structs? -- Matthias Matthias, Thanks for the response. Classes did cross my mind, but in the particular use case I'm working on now, they feel a little too heavy. Perhaps that is a r

Re: [racket] Best way to propose changes to Scribble CSS files

2013-11-09 Thread David T. Pierson
On Sat, Nov 09, 2013 at 02:22:30PM -0500, David T. Pierson wrote: > The light gray (?) background of definitions is so light that it doesn't > show up for me if I'm not looking at it straight on. That is partially > an indictment of my laptop's screen, but I don't

Re: [racket] Best way to propose changes to Scribble CSS files

2013-11-09 Thread David T. Pierson
On Sat, Nov 09, 2013 at 02:12:55AM -0500, Matthew Butterick wrote: > To preview the pages in a web browser, start here: > > http://mbutterick.github.io/racket-doc-redo/doc/index.html Matthew, I imagine a significant amount of work was put into this, which I appreciate, and which makes me relucta

[racket] dynamically auto-initialized private struct fields

2013-11-09 Thread David T. Pierson
Hi all, Sometimes when defining struct types it is useful to have fields which are essentially "private" to the module (fields whose accessors/mutators are not exported from the module.) I want these fields to be initialized automatically with arbitrary values generated at construction time. Here

Re: [racket] many permissions & other problems using packages in 5.3.6... workarounds?

2013-10-13 Thread David T. Pierson
On Sun, Oct 13, 2013 at 08:00:11AM -0600, Matthew Flatt wrote: > At Sat, 12 Oct 2013 18:01:27 -0600, Jay McCarthy wrote: > > On Sat, Oct 12, 2013 at 3:02 PM, John Clements > > wrote: > > > My students are using 5.3.6 with packages... in particular, with the > > > rsound > > > package, that depend

Re: [racket] struct constructor pitfalls

2013-05-29 Thread David T. Pierson
On Wed, May 29, 2013 at 03:12:45PM -0400, Anthony Carrico wrote: > It seems like the purpose of #:constructor-name is to get the default > contsructor out of the way, so you can customize it: > > #lang racket > > (struct hello (a b c) > #:constructor-name hello-rep > ) > > (define (hello) (h

Re: [racket] File name case when saving in Win 7

2013-03-02 Thread David T. Pierson
On Fri, Mar 01, 2013 at 10:59:06PM -0700, Danny Yoo wrote: > In "framework", the implementation does use normal-case-path in its > implementation for put-file: > > > http://git.racket-lang.org/plt/blob/HEAD:/collects/framework/private/finder.rkt#l50 So that explains the cause, but what is th

Re: [racket] Symlinking Racket programs

2013-02-27 Thread David T. Pierson
On Tue, Feb 26, 2013 at 06:40:23PM -0600, Brian Mastenbrook wrote: > What is the expected behavior of module resolution when symlinking a > Racket program, particularly one executed as a script using a shebang I think Racket is doing the right thing here. If it did what you seem to be expecting

Re: [racket] Places, Channels as Events. Labeling Places.

2012-12-14 Thread David T. Pierson
Tobias and Matthew, Thank you, both your answers were informative. David Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Places, Channels as Events. Labeling Places.

2012-12-13 Thread David T. Pierson
On Fri, Dec 14, 2012 at 01:25:36AM -0500, David T. Pierson wrote: > I've wondered about this. What is the rational behind these > differences? Wrapping events is cumbersome. > > For instance, my first intuition is that the synchronization result of a > place channel would

Re: [racket] Places, Channels as Events. Labeling Places.

2012-12-13 Thread David T. Pierson
On Thu, Dec 13, 2012 at 03:34:36PM -0700, Jay McCarthy wrote: > You want handle-evt > > On Thu, Dec 13, 2012 at 3:27 PM, Ray Racine wrote: > > Using a Place or a Place-Channel as a sync event returns the value of a > > place-channel-get and not the Place itself. > > > > Most events return the act

Re: [racket] Case with strings: normal behavior?

2012-11-19 Thread David T. Pierson
On Mon, Nov 19, 2012 at 06:13:09AM -0700, Matthew Flatt wrote: > Should we change `case' to use `equal?' instead of `eqv?'? I can't > think of a good reason to stick with `eqv?'. My first reaction to this was that such a change would eliminate one of the motivations for using `case': getting the (

[racket] RacketCon carpooling from Providence area?

2012-10-12 Thread David T. Pierson
If anyone attending RacketCon on Saturday from the Providence (RI) area wants to carpool, please let me know. (I'm in Cranston.) David Racket Users list: http://lists.racket-lang.org/users

Re: [racket] submitting bug reports

2012-04-06 Thread David T. Pierson
On Thu, Apr 05, 2012 at 10:58:05PM -0700, Scott Markwell wrote: > Like this? http://bugs.racket-lang.org/ Yes, thanks. And now that I see that, I think I've used it before. But I couldn't find it last night. My first inclination was to look at the Community page: http://racket-lang.org/commun

[racket] submitting bug reports

2012-04-05 Thread David T. Pierson
It'd be nice if there was a way to submit bug reports via racket-lang.org. Or perhaps there is and I don't see it? Or perhaps there was and it attracted too much spam. Regardless, it would also be nice if there was a blurb in the documentation and/or the community section of the site explaining

Re: [racket] plist limitations

2012-04-05 Thread David T. Pierson
On Wed, Apr 04, 2012 at 04:06:54PM -0600, Matias Eyzaguirre wrote: > however I'm unsure what the process is for reporting bugs in racket. You can submit bug reports from DrRacket. In the OS X version, go to Help -> Submit Bug Report... David Racket Users list: http://lis

[racket] "private" modules to make an opaque struct type

2012-02-28 Thread David T. Pierson
Hi all, Many racket collections define some modules in a subdirectory named "private". Presumably these modules are for definitions that are used by other modules in the same collection but are not meant to be used from outside the collection. As far as I can tell, this is just a convention and

[racket] pthreads, futures, and building racket 5.0.1 from source

2010-09-01 Thread David T. Pierson
Hello all, I am compiling racket 5.0.1 for a Debian GNU/Linux system on an x86_64 machine. I ran configure with no arguments, but noticed during the subsequent make that files were being compiled with -pthread. This concerned me because the src/README contains a warning about pthreads: > Unfort