Re: [racket-users] DrRacket Background Expansion Memory Usage

2017-01-18 Thread Robby Findler
It sounds like there might be a leak somewhere. Is the program you were editing easy to share? Robby On Wed, Jan 18, 2017 at 1:56 AM Lehi Toskin wrote: > In DrRacket I had background expansion on for the longest time until I > started to notice that whenever I would work

Re: [racket-users] Copying a namespace?

2017-01-11 Thread Robby Findler
On Wed, Jan 11, 2017 at 7:59 PM, Alex Knauth <alexan...@knauth.org> wrote: > >> On Jan 11, 2017, at 8:53 PM, Robby Findler <ro...@eecs.northwestern.edu> >> wrote: >> >> That might work. It might be easier to just stick in some `let`s, tho. >> I'm not s

Re: [racket-users] Copying a namespace?

2017-01-11 Thread Robby Findler
Change how local variables compile at the prompt that's inside the debug repl? You should have the complete set of them, I think. Compile them into looking into a table other than the namespace. Robby On Wed, Jan 11, 2017 at 5:41 PM, Alex Knauth wrote: > Hello, > > I want

Re: [racket-users] Narrow radix of string->number.

2017-01-11 Thread Robby Findler
For the app that you're using, can you provide a histogram of the inputs that you supply to number->string or, if it isn't too much trouble, point me at the app so I can grab that? Robby On Wed, Jan 11, 2017 at 12:31 PM, JCG wrote: > On Thursday, December 29, 2016 at

Re: [racket-users] Link to racket doc in scribble?

2017-01-11 Thread Robby Findler
Also, if you have something like this: #lang scribble/manual @(require (for-label racket)) @racket[future] you should see the word `future` linked to the docs. (And, if you had a larger program in there, all the identifiers that come from the `racket` module would be linked.) Robby On

Re: [racket-users] Narrow radix of string->number.

2017-01-04 Thread Robby Findler
gt; (define-syntax-rule (time-it id ...) >> (begin >> (define numbers (for/list ([i (in-range 1000)]) >> (sample/drr))) >> (begin >> (collect-garbage) >> (time >>(for* ([x (in-range iterations)] >>

Re: [racket-users] contracts: the blame name game

2017-01-03 Thread Robby Findler
There may be a way to do this without it, but I've just pushed a change to define-module-boundary-contract that lets you specify the name that you want in the error message. Also, if you can use a `let`, that's probably better than procedure-rename, eg: (define make-bar (let ([bar (λ (x [y 1]

Re: [racket-users] Narrow radix of string->number.

2017-01-01 Thread Robby Findler
I'm skeptical of an unbounded cache. If we go by the sample from DrRacket's start up, then we don't really need a cache to do better than the built-in number->string. Below is some code that takes the version I had earlier with what I understood to be Gustavo's suggestions and then just does

Re: [racket-users] Errors in (Dr)Racket

2017-01-01 Thread Robby Findler
I mostly agree with Matthias, but wanted to add two things: 1) I've certainly experienced, many times, (both as the producer and consumer (and sometimes simultaneously)) contracts that were added because of runtime errors. But I do agree it is not as common as we had hoped it would be. And

Re: [racket-users] Narrow radix of string->number.

2016-12-31 Thread Robby Findler
(PS: those are the calls only in the special case that a fixnum was supplied and it was base 10 or base 16.) On Sat, Dec 31, 2016 at 2:05 PM, Robby Findler <ro...@eecs.northwestern.edu> wrote: > As one data point, here's a histogram of the 20k or so calls to > number->string tha

Re: [racket-users] Narrow radix of string->number.

2016-12-31 Thread Robby Findler
number->string is fast, too.) Robby On Sat, Dec 31, 2016 at 1:57 PM, Robby Findler <ro...@eecs.northwestern.edu> wrote: > On Sat, Dec 31, 2016 at 12:57 PM, Matthew Butterick <m...@mbtype.com> wrote: >> Is it cheating to avoid divisions by using table lookups? >

Re: [racket-users] Narrow radix of string->number.

2016-12-31 Thread Robby Findler
On Sat, Dec 31, 2016 at 12:57 PM, Matthew Butterick wrote: > Is it cheating to avoid divisions by using table lookups? Everything is fair in love, war, and benchmarking. :) But this introduces an additional cost that's a little bit more troublesome to measure. Specifically,

Re: [racket-users] Narrow radix of string->number.

2016-12-28 Thread Robby Findler
I started with Ryan's code from `~r` and tried to emulate some special cases I see the C code (and didn't worry about negative numbers) and ended up with something 4-5x slower than the C code version. :( Code follows. Robby #lang racket (define (number->string* N) (cond [(zero? N)

Re: [racket-users] Narrow radix of string->number.

2016-12-28 Thread Robby Findler
On Wed, Dec 28, 2016 at 12:08 AM, Matthew Butterick wrote: > FWIW Racket's own `~r` function already accepts radixes (radices? radishes?) > up to 36. Ah, good point! I think it makes a lot of sense to do exactly what it does (or, if people find useful things, something more

Re: [racket-users] Narrow radix of string->number.

2016-12-27 Thread Robby Findler
The main thing I worry about is that there are standard conventions that we're missing from other language families. Would someone mind investigating a few other, popular languages to see what they do so that can be taken into account? And perhaps pointing to the docs or showing some example code?

Re: [racket-users] mirror.racket-lang.org seems down, and, 301 or 302?

2016-12-26 Thread Robby Findler
Yes, things are down because of some routine maintenance that went awry. The redirect is because the maintenance was planned and I think the plan is to go back to the way things were when the machines come back. A little more info: https://groups.google.com/forum/#!topic/racket-users/3DtEvLTZxGo

Re: [racket-users] Problems connecting to mirror.racket-lang.org

2016-12-23 Thread Robby Findler
There is some maintenance downtime. The goal is to be back up by noon today. (Fingers crossed.) The URL change is temporary during the downtime. Sorry about this. Robby On Thu, Dec 22, 2016 at 11:59 PM Eric Dobson wrote: > I have been downloading racket in my

Re: [racket-users] Re: REPL output editor speed

2016-12-21 Thread Robby Findler
On Tue, Dec 20, 2016 at 1:58 PM, JCG wrote: > One thing that I have found is that an Ubuntu 16.04 > on a slighter slower iMac scrolls noticeably (feels 2x) > faster than OSX on a faster iMac (Yes, I have multiple > old iMacs). Yes, I think that's a common experience, sadly.

Re: [racket-users] Futures Mandelbrot Example

2016-12-21 Thread Robby Findler
Nothing has changed, but the future's implementation is currently defeated by the errortrace annotation (via the "Debugging" option in the "Show Details" part of the dialog you get after choosing the "Language | Choose Language ..." menu item). More generally, the section 19.1 applies to futures:

Re: [racket-users] REPL output editor speed

2016-12-19 Thread Robby Findler
I'm not sure, but if this is the issue, it's happening somewhere in the implementation of text%, I believe. In particular, it seems to be the case that the `insert` method is being called once every 1,000 bytes (with a single string each time). Adding this printf: (printf "str/snp: ~s\n" (and

Re: [racket-users]

2016-12-19 Thread Robby Findler
I think probably that sentence should be deleted. It does what I guess you expect, namely it doesn't add any properties and calls to the result on impersonate-procedure are just like calls to its argument (in that case, anyway) Robby On Mon, Dec 19, 2016 at 10:18 AM, Shu-Hung You

Re: [racket-users] REPL output editor speed

2016-12-19 Thread Robby Findler
There is probably some performance improvements that could be made to this code: https://github.com/racket/gui/blob/master/gui-lib/framework/private/text.rkt#L2492-L3240 I've spent some time on this, but your comment about `insert` suggests that maybe there is another special case in there

Re: [racket-users] ->i applies contract projections multiple times?

2016-12-16 Thread Robby Findler
On Fri, Dec 16, 2016 at 12:20 PM, Alexis King <lexi.lam...@gmail.com> wrote: >> On Dec 16, 2016, at 9:53 AM, Robby Findler <ro...@eecs.northwestern.edu> >> wrote: >> >> Picky would never assign blame to m1. The places where m1 would be >> blamed would in

Re: [racket-users] ->i applies contract projections multiple times?

2016-12-16 Thread Robby Findler
On Fri, Dec 16, 2016 at 11:49 AM, Alexis King <lexi.lam...@gmail.com> wrote: >> On Dec 15, 2016, at 3:16 PM, Robby Findler <ro...@eecs.northwestern.edu> >> wrote: >> >> But if you want to know more about how they could be different, you >> might wa

Re: [racket-users] ->i applies contract projections multiple times?

2016-12-15 Thread Robby Findler
Perhaps the contract implementation could notice that the indy blame parties and the normal blame parties are the same and thus avoid the second contract. Given today's experience I'm not sure it is worth bothering, at least until other things improve in the contract implementation. But if you

Re: [racket-users] ->i applies contract projections multiple times?

2016-12-15 Thread Robby Findler
I've pushed a fix for this and the related bug that I mentioned in this thread. No important performance improvements, however (I believe most of the time in ->i microbenchmarks is spent in just piping things around, not doing the actual contract checking). Robby On Wed, Dec 14, 2016 at 5:33

Re: [racket-users] ->i applies contract projections multiple times?

2016-12-14 Thread Robby Findler
I think it could be possible to avoid those printfs but only because the contracts used here are flat, but the implementation of ->i doesn't do that specialization. In the general case, the contract on each of the depended on arguments (x and y in this case) have to be applied twice, once to catch

[racket-users] Re: adding pref for rsound package

2016-12-13 Thread Robby Findler
The phase1/phase2 stuff isn't really for preference initialization. You should be able to just do it when the module require'd (ie at its toplevl) or when the tool@ unit is invoked. Either phase would also be fine. Also, you might want to use the preference directly in the part of the library

Re: [racket-users] parameterize working across dynamic-require and phase change

2016-12-07 Thread Robby Findler
0800 (PST), Dan Liebgold wrote: >> On Tuesday, December 6, 2016 at 5:00:47 PM UTC-8, Robby Findler wrote: >> > >> > Perhaps there is another way to achieve the effect you want in a way >> > that is more friendly to creating .zo files? >> > >> >>

Re: [racket-users] parameterize working across dynamic-require and phase change

2016-12-06 Thread Robby Findler
My initial reaction is that that's a bad idea because it means that you're not cooperating separate compilation when you do things like that. That is, if module.rkt's compilation were affected by the parameter `a`, then if there were a .zo file (because someone did 'raco setup' or 'raco make' or

Re: [racket-users] errortrace requires 10x time and memory for the program to compile

2016-12-06 Thread Robby Findler
I'm not sure if it helps, but errortrace fully expands your program and then traverses that and adds continuation marks (this is called "annotation" in the errortrace docs). There may be a bug in this process that causes information to be lost, I suppose, but the problem with the dynamically

Re: [racket-users] Re: Language-provided bindings and arrows in DrRacket

2016-12-03 Thread Robby Findler
The fully expanded form of the original program doesn't have a require that brings in displayln? So I'm not sure how Check Syntax could know to draw an arrow. Robby On Sat, Dec 3, 2016 at 9:11 PM, Dupéron Georges wrote: > I made a copy-paste mistake, the

Re: [racket-users] DrRacket Crashes on New MacBook Pro

2016-11-26 Thread Robby Findler
Thanks. I believe the 32 bit version works, so you can use that as a workaround for now. Robby On Sat, Nov 26, 2016 at 11:34 AM, 'Scott Brown' via Racket Users wrote: > I recently bought a new MacBook Pro and installed Racket. Unfortunately, > DrRacket crashes

Re: [racket-users] Contract on a parameter’s value as a function precondition?

2016-11-23 Thread Robby Findler
I think that Scott investigated adding support to chaperones that would make something like this work. Robby On Tue, Nov 22, 2016 at 10:16 PM, Alexis King wrote: > I have a function that requires a parameter be set to a value satisfying > a particular contract, but I

Re: [racket-users] find-seconds daylight saving

2016-11-08 Thread Robby Findler
find-seconds returns a number, not a date? Maybe seconds->date is the culprit here? Robby On Tue, Nov 8, 2016 at 12:32 PM, George Neuner wrote: > > Racket 6.6 on Windows 7. > > find-seconds is getting the time zone wrong when local-time? is #t. > Somehow it is in daylight

Re: [racket-users] Extending DrRacket's LaTeX Shortcuts

2016-11-05 Thread Robby Findler
I think it would be great to adjust the one that DrRacket uses to use this one. Is that in a pkg somewhere? Or would it be better to just drop it into the existing one? Robby On Sat, Nov 5, 2016 at 7:31 AM, Laurent wrote: > This may be of interest: >

Re: [racket-users] How "expensive" are regular expression in Racket in general?

2016-11-04 Thread Robby Findler
There really isn't a better way. Robby On Friday, November 4, 2016, wrote: > > Hi David, > > thanks for your reply! :) > > ...unfortunatelu this wpuld imply to implement both solution > correctly and compare them. > I asked here on the mailinglist fpr the better solution

Re: [racket-users] Contracts for functions that take only a rest arg

2016-11-01 Thread Robby Findler
On Tue, Nov 1, 2016 at 2:06 PM, David Storrs wrote: >> It is a syntax error. > > > Absolutely, but that's not what the message says. :> Yes, syntax errors in "#lang racket" and its variants don't come with the word "syntax" in them, but you can tell because they happen

Re: [racket-users] Contracts for functions that take only a rest arg

2016-11-01 Thread Robby Findler
On Tuesday, November 1, 2016, David Storrs <david.sto...@gmail.com> wrote: > > > On Tue, Nov 1, 2016 at 12:58 PM, Robby Findler < > ro...@eecs.northwestern.edu > <javascript:_e(%7B%7D,'cvml','ro...@eecs.northwestern.edu');>> wrote: > >> I wish I co

Re: [racket-users] Contracts for functions that take only a rest arg

2016-11-01 Thread Robby Findler
I wish I could see how to make a better error message for this input, but I'm not seeing it. Do you? Robby On Tue, Nov 1, 2016 at 11:50 AM, David Storrs wrote: > Aha. It's always the simple things that get you. Thanks, Alexis. > > On Tue, Nov 1, 2016 at 12:30 PM,

Re: [racket-users] Creating a list of random things

2016-10-25 Thread Robby Findler
I would probably write that function like this: #lang racket (provide (contract-out [make-a-string (-> non-empty-string? string?)])) (define (make-a-string candidates) (apply string (for/list ([i (in-range (random 100))]) (string-ref candidates (random (string-length

Re: [racket-users] Redex: macro expanding to a side-condition clause

2016-10-24 Thread Robby Findler
with failed matches not being first-class in Redex, but I'm a little > disappointed if I can't create my own shorthand. > > Thanks, > Sam Caldwell > > On Mon, Oct 24, 2016 at 6:31 PM, Robby Findler <ro...@eecs.northwestern.edu> > wrote: >> >> Unfortunately, R

Re: [racket-users] Redex: macro expanding to a side-condition clause

2016-10-24 Thread Robby Findler
Unfortunately, Redex's pattern language does not currently support `not`. It might be easy to add it, or maybe hard, or maybe impossible. Offhand, it seems probably possible to support in the unifier and impossible in the enumerator and not hard in the matcher. In the meantime, consider using a

Re: [racket-users] flat-contract-with-reason (should be flat-contract-with-explanation ?)

2016-10-23 Thread Robby Findler
Thanks. I've pushed a fix (to the docs). Robby On Sun, Oct 23, 2016 at 9:32 PM, Philip McGrath wrote: > The Racket Reference documents a function "flat-contract-with-reason"; > however, in #lang racket, I get an unbound identifier error for >

Re: [racket-users] Funtional programming and the maximum of something

2016-10-22 Thread Robby Findler
On Sat, Oct 22, 2016 at 3:05 PM, <meino.cra...@gmx.de> wrote: > Robby Findler <ro...@eecs.northwestern.edu> [16-10-22 21:28]: >> You need to follow the design recipe to solve a problem like this. You >> data is clear: [Listof [Listof Real]] and [Listof Real]. Next u

Re: [racket-users] Funtional programming and the maximum of something

2016-10-22 Thread Robby Findler
You need to follow the design recipe to solve a problem like this. You data is clear: [Listof [Listof Real]] and [Listof Real]. Next up: examples. Do you have examples of the inputs and outputs you want for this function? Robby On Sat, Oct 22, 2016 at 2:03 PM, wrote: > Hi,

Re: [racket-users] Better? or less good?

2016-10-21 Thread Robby Findler
Hi Jean-Michel: the determination that "Gor" is a free variable happens as part of the compilation of the program, much in the same way that this expression: (or #t (lambda x)) is rejected. Robby On Fri, Oct 21, 2016 at 9:12 AM, Jean-Michel HUFFLEN wrote: >Dear

Re: [racket-users] opinions on YAML as communication tool

2016-10-21 Thread Robby Findler
Wh? You're not going to design your own language and implement a syntax colorer in DrRacket for it so they can tell immediately when something goes wrong? ;) Robby On Fri, Oct 21, 2016 at 12:21 AM, 'John Clements' via Racket Users wrote: > Yet another

Re: [racket-users] proposed minor improvement to stepper semantics

2016-10-20 Thread Robby Findler
I don't agree with this at all. Being forced to step through N check-expressions to get to the one you care about it is not a feature to be preserved. Robby On Thu, Oct 20, 2016 at 4:00 PM, Sam Tobin-Hochstadt wrote: > I wouldn't want to give up stepping the definitions

Re: [racket-users] proposed minor improvement to stepper semantics

2016-10-20 Thread Robby Findler
I think that the reduction is good, but the #true appearing is bad. Right? Robby On Thu, Oct 20, 2016 at 1:44 PM, Sam Tobin-Hochstadt wrote: > When teaching, I've personally found the reduction to #true confusing, > and something that I can't explain to my students. So I'd

Re: [racket-users] date->seconds complaining about a supposedly non-existent date

2016-10-20 Thread Robby Findler
Date rants are the best :) http://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time Robby On Thu, Oct 20, 2016 at 1:06 PM, David Storrs wrote: > That was more intended as a rant about things that drive me batty than > actual instruction -- I

Re: [racket-users] Drawing arbitrary binding arrows with Check Syntax

2016-10-19 Thread Robby Findler
That's the best approach we currently have. Of course, we could support a new property that was "connect srclocs" or something. One thing to keep in mind is renaming too tho. I would welcome patches. :) Robby On Wednesday, October 19, 2016, Alexis King wrote: > I have

Re: [racket-users] Any information on whether/when Sixth RacketCon videos will be available?

2016-10-17 Thread Robby Findler
https://xkcd.com/1319/ ;) Also, check out this handy chart! https://xkcd.com/1205/ Robby On Mon, Oct 17, 2016 at 10:49 AM, Leif Andersen wrote: > Yes, the videos are coming along and will be out soon. > > It is taking a bit longer to get them out this time because I

Re: [racket-users] Re: Plot ticks with arbitrary strings - breaks DrRacket

2016-10-14 Thread Robby Findler
Is there a contract we could add somewhere? Robby On Fri, Oct 14, 2016 at 6:31 PM, Alex Harsanyi wrote: > Your tick format function returns less labels than the number of items in the > pre-ticks. It should return one label for each pre-tick object (I just > printed

Re: [racket-users] How to insert @ character into scribble-generated output?

2016-10-13 Thread Robby Findler
You can do @"@" (i.e. escape to Racket with the first @ and then make a string that has an @ in it as the result of the escape). Or you can change the @ character to another one, perhaps using pollen (it uses a diamond lozenge thingy). Robby On Thu, Oct 13, 2016 at 8:20 AM, Kathi Fisler

Re: [racket-users] Re: FUSE filesystem package

2016-10-12 Thread Robby Findler
Looks like the code has a race-condition. You could either define it away (using thread-cells (ie once per thread)) or add some syncronization. Robby On Wed, Oct 12, 2016 at 4:53 PM, Scott Moore wrote: > On October 12, 2016 at 2:35:37 PM, Vincent St-Amour >

Re: [racket-users] how to attach lexer to a color:text% in DrRacket

2016-10-07 Thread Robby Findler
For testing your lexer, I think you probably want to write a helper function that takes in a lexer and a port and returns a list of tokens and then go from there. There is one such here (the lex function):

Re: [racket-users] Contract violation where number expected - can't understand why

2016-10-01 Thread Robby Findler
I guess you're familiar with the dot operator (object.field) in C and Java? In Racket, we don't provide access to that directly, but instead put such operations in "selector functions". So when you see (interval-guesses w) that's something more like w.guesses In other words, you can think

Re: [racket-users] TR issue with the type of expt

2016-09-27 Thread Robby Findler
Everyone knows to open a TR reply and do: > (:print-type expt) right? It's fun :) Robby On Tue, Sep 27, 2016 at 3:40 PM, Vincent St-Amour wrote: > You are correct, the implementation of `expt` is not aware of that fact. > > However, TR assigns `expt` a type

Re: [racket-users] How to add undo functionality to text% editor?

2016-09-20 Thread Robby Findler
It is a performance issue and the default saves memory when one creates a lot of little text% objects. Maybe we should add something to the docs. Where did you look? Robby On Wednesday, September 21, 2016, Alex Harsanyi wrote: > Thanks for that, it worked. > > Is there

Re: [racket-users] Thanks for slideshow, racket/gui, and the rest!

2016-09-20 Thread Robby Findler
I saw the talk and thought it was great! Robby On Tue, Sep 20, 2016 at 9:22 AM, David Christiansen wrote: > Today I delivered a talk at ICFP with slides written in slideshow, > with an embedded Idris interactive editor and REPL. The slides got > good feedback from

Re: [racket-users] Re: Why is 3d3 a number?

2016-09-20 Thread Robby Findler
Patches to the reader for a more sane number syntax to be used in the teaching languages are welcome. Note that we already have some of these in place, as 1.2 reads as a rational in the teaching languages. Robby On Tue, Sep 20, 2016 at 10:39 AM, Ben Greenman wrote:

Re: [racket-users] Re: Trying to understand racket/gui and racket/draw

2016-09-16 Thread Robby Findler
You could draw into a bitmap and then have on-paint draw that bitmap, too. Robby On Fri, Sep 16, 2016 at 2:53 AM, Jens Axel Søgaard wrote: > As Alex writes the operating system (the system GUI) might erase parts of a > window at > any time. Therefore you need to do all

Re: [racket-users] Urgent Need--Cloud Engineer---EAD or GC or Citizens only

2016-09-14 Thread Robby Findler
See, if you'd set up a new CommandTemplateProxyVisitor() before writing that message, you could probably have fixed that with changes in only 17 files! Robby On Wed, Sep 14, 2016 at 9:06 PM, Greg Hendershott wrote: >> I hope you meant Sunday. > > Oops, yes. :) > > --

Re: [racket-users] Controlling DPI when saving a png image

2016-09-14 Thread Robby Findler
2htdp/image uses the save-file method of a bitmap% to do the actual saving and it appears to not support different DPIs. http://docs.racket-lang.org/draw/bitmap_.html#%28meth._%28%28%28lib._racket%2Fdraw..rkt%29._bitmap~25%29._save-file%29%29 If it were extended somehow, then I imagine it would

Re: [racket-users] equal? and recursive data structures

2016-09-13 Thread Robby Findler
I am not sure, but I believe this is the algorithm used. Perhaps that will help you understand? http://www.cs.indiana.edu/~dyb/pubs/equal.pdf Also, check out the tortoise and hare algorithm, described here: https://en.wikipedia.org/wiki/Cycle_detection Robby On Tue, Sep 13, 2016 at 9:25 AM,

Re: [racket-users] TR + Hash tables -> chaperone errors ?

2016-09-08 Thread Robby Findler
(oh, and removing the require line also has that property) Robby On Thu, Sep 8, 2016 at 4:42 PM, Robby Findler <ro...@eecs.northwestern.edu> wrote: > Here's a program that, when run prints #t or #f depending on whether > or not there is a .zo file. > > #lang racket/base

Re: [racket-users] TR + Hash tables -> chaperone errors ?

2016-09-08 Thread Robby Findler
Here's a program that, when run prints #t or #f depending on whether or not there is a .zo file. #lang racket/base (require racket/contract) (define h '#hash(("mail-server" . "smtp.sendgrid.net"))) (define h2 (for/fold ([h h]) ([(k v) (in-hash h)]) (hash-set h k v))) (chaperone-of? h2 h)

Re: [racket-users] TR + Hash tables -> chaperone errors ?

2016-09-08 Thread Robby Findler
What are the steps? I put the code below in a file named tmp.rkt, ran "raco make tmp.rkt ; racket tmp.rkt" and see no output. Robby On Thu, Sep 8, 2016 at 1:17 PM, Sam Tobin-Hochstadt wrote: > This looks like a contract system bug (or a compiler bug). If I change >

Re: [racket-users] Positioning GUI controls in contact with one another

2016-09-05 Thread Robby Findler
I haven't seen buttons in spreadsheet cells in excel, but maybe I'm taking your words too literally? Have you considered using canvas% objects instead of buttons? They should give you the flexibility you're after. Robby On Mon, Sep 5, 2016 at 4:23 PM, David Storrs

Re: [racket-users] SVG as pict

2016-09-03 Thread Robby Findler
wrote: > Are you suggesting translating the SVG representation to pict drawing > commands? I was thinking, instead, of handing the SVG information off to > the platform drawing libraries, which I didn’t see as requiring XML parsing. > > Or is there another option? > > > On

Re: [racket-users] SVG as pict

2016-09-03 Thread Robby Findler
I think that would be fantastic. The drawing models are compatible, iiuc, so I think the main part is dealing with parsing the svg file. Robby On Sat, Sep 3, 2016 at 2:36 AM, Byron Davies wrote: > svg images have a second-class status in Racket. If you want to use an

Re: [racket-users] Do I need a critical section here ... and if so, how to?

2016-09-01 Thread Robby Findler
If you use thread cells you can avoid global state and synchronization entirely to solve this problem. Just put a list in the thread cell and add elements for children threads and increment the head element when new threads are created. Robby On Thursday, September 1, 2016, Erich Rast

Re: [racket-users] Typed racket and continuations

2016-08-30 Thread Robby Findler
The reason the first one doesn't work is that the type checker has figured out that the variable is mutable and HASN"T figured out that there are no other threads around that could mutate it. In the second case, it knows there are no other threads around to mutate it because even if there were

Re: [racket-users] DrRacket's auto-indentation outside DrRacket?

2016-08-26 Thread Robby Findler
Here are the docs for the preferences system: http://docs.racket-lang.org/framework/Preferences__Textual.html You will want to look at the code in the framework for the specifics of the preference you're after. It's name is 'framework:tabify and these are the two files you want, I believe:

Re: [racket-users] DrRacket's auto-indentation outside DrRacket?

2016-08-25 Thread Robby Findler
The code I sent would be influenced by the preferences I believe. But you could test that? Robby On Thursday, August 25, 2016, David Christiansen wrote: > Hi Robby, > > Thank you very much for a fast and useful answer! > > > I'm not sure about the suitable

Re: [racket-users] DrRacket's auto-indentation outside DrRacket?

2016-08-25 Thread Robby Findler
Oh, actually comparing characters is just fine, since tabify changes only characters, not snips. Robby On Thu, Aug 25, 2016 at 4:24 PM, Robby Findler <ro...@eecs.northwestern.edu> wrote: > I'm not sure about the suitable configuration: that should probably > happen via th

Re: [racket-users] DrRacket's auto-indentation outside DrRacket?

2016-08-25 Thread Robby Findler
I'm not sure about the suitable configuration: that should probably happen via the #lang line and shouldn't be configured "from the outside" (we're not quite there yet, but that's where we should be heading, IMO). But for point 2, here's a script. It depends on the GUI library. Removing that

Re: [racket-users] fivethirtyeight indexes reddit

2016-08-25 Thread Robby Findler
Not just Haskell, apparently? http://projects.fivethirtyeight.com/reddit-ngram/?keyword=c++.python.ruby.javascript.java.programming=20071015=20150831=22 On Thu, Aug 25, 2016 at 11:10 AM, 'John Clements' via Racket Users wrote: > Apologies to everyone that’s seen

Re: [racket-users] DrRacket 6.5 + OS X El Capitan = slow execution

2016-08-16 Thread Robby Findler
On Tue, Aug 16, 2016 at 3:16 AM, Ivan Kuzmin wrote: > P.S. May be it is just some strange cognitive effect. Is there a way to > measure time from run button pressing to printing execution results precisely > and objectively somehow? Probably it is real, but you're right that

Re: [racket-users] DrRacket 6.5 + OS X El Capitan = slow execution

2016-08-15 Thread Robby Findler
Hi Ivan: here is another experiment to try. What happens if you follow these steps: - start DrRacket - open "Language" menu's "Choose Language..." menu item - select "The Racket Language" (click ok to close the dialog) - select the "File" menu's "Open Require Path..." menu item - type

Re: [racket-users] Mixin questions

2016-08-11 Thread Robby Findler
Although, with these two particular interfaces, there is no single class that implements both. You would instead have two separate mixins that would communicate by calling each others methods. Robby On Thu, Aug 11, 2016 at 12:09 PM, Daniel Feltey wrote: > If you want to

Re: [racket-users] racket command-line REPL: Constructor style printing mode?

2016-08-10 Thread Robby Findler
On Wed, Aug 10, 2016 at 8:10 AM, Alex Knauth wrote: >> I believe this fixes a bug in DrRacket but the way these handlers are >> set up is pretty complicated. Here's an example program that behaves >> differently in 6.6 and the version with those commits. I think the 6.6 >>

Re: [racket-users] racket command-line REPL: Constructor style printing mode?

2016-08-10 Thread Robby Findler
This is the change to DrRacket: https://github.com/racket/drracket/commit/edfea2c649d4d1cfdc2c9facf4dbdb4663be0a07 (you'll want the subsequent commit too, tho). I believe this fixes a bug in DrRacket but the way these handlers are set up is pretty complicated. Here's an example program that

Re: [racket-users] racket command-line REPL: Constructor style printing mode?

2016-08-10 Thread Robby Findler
The lack of newlines is probably because of a bug that I pushed a fix for. Maybe try a shapshot build? https://pre.racket-lang.org/installers/ Robby On Wed, Aug 10, 2016 at 7:34 AM, Delphine Demange wrote: > >> Yes, DrRacket's "constructor" mode does this. This code

Re: [racket-users] Expansion differences between (provide (contract-out ...)) and provide/contract

2016-08-09 Thread Robby Findler
Thanks: I've pushed a fix. Robby On Tue, Aug 9, 2016 at 2:38 PM, Brian LaChance wrote: > I'm trying to identify the transformer definitions that > provide/contract and contract-out generate for the provided bindings. > The last paragraph of the docs for contract-out says

Re: [racket-users] parenthesis shading in DrRacket 6.6

2016-08-08 Thread Robby Findler
5:56:28 AM UTC-4, Robby Findler wrote: >> > Okay, that wasn't it. I'm not sure what to try next. I see it working >> > correctly on my Ubuntu 14 installation, FWIW. >> > >> > Robby >> >> Now I'm really puzzled. On my 14.04 machine, both gnome

Re: [racket-users] parenthesis shading in DrRacket 6.6

2016-08-08 Thread Robby Findler
Okay, that wasn't it. I'm not sure what to try next. I see it working correctly on my Ubuntu 14 installation, FWIW. Robby -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: [racket-users] parenthesis shading in DrRacket 6.6

2016-08-07 Thread Robby Findler
On Sunday, August 7, 2016, Danny Heap wrote: > On Saturday, August 6, 2016 at 6:35:08 PM UTC-4, Danny Heap wrote: > > I recently upgraded to 6.6 on a few machines. I think the > shades-of-blue doesn't work as it did: I see one uniform shade of blue > across an entire nested

Re: [racket-users] parenthesis shading in DrRacket 6.6

2016-08-06 Thread Robby Findler
I don't suppose you are using GTK machines? Robby On Sat, Aug 6, 2016 at 5:35 PM, Danny Heap wrote: > I recently upgraded to 6.6 on a few machines. I think the shades-of-blue > doesn't work as it did: I see one uniform shade of blue across an entire > nested expression,

Re: [racket-users] Macro expanding to #'(begin) lacks arrows in DrRacket

2016-08-05 Thread Robby Findler
Possibly the problem here is that the origin tracking doesn't interact well with begin splicing. That could be changed, I suppose, but using void seems more natural. Maybe best to cooperate with the language you're using to ask them offer you a value that doesn't print out? Robby On Wed, Aug 3,

Re: [racket-users] Run Button interaction

2016-08-04 Thread Robby Findler
Did you try (define/override ... ? Robby On Thu, Aug 4, 2016 at 9:41 AM, Normal Loone wrote: > I tried > > (define/augment (execute-callback) > ...) > > So I'd just use another additional function of mine when the run button is > used, but execute-callback is

Re: [racket-users] Re: Error message from GUI

2016-08-02 Thread Robby Findler
2htdp/images can be 0xN or Nx0 just fine. If you wish to render them to a bitmap, does the file/convertible library not work for you? Robby On Tue, Aug 2, 2016 at 11:01 AM, Matthias Felleisen wrote: > > A 0-sized bitmap in 2htdp is the neutral element for many operations.

Re: [racket-users] DrRacket 6.5 + OS X El Capitan = slow execution

2016-07-28 Thread Robby Findler
I just use #lang >> racket, it is instantaneous. >> >> Best Regards, >> Alex. >> >> >> On Thursday, July 28, 2016 at 10:52:10 AM UTC+8, Robby Findler wrote: >> > Okay, thanks. (For the record, I use Mac OS X 10.11 routinely and do >> &

Re: [racket-users] DrRacket 6.5 + OS X El Capitan = slow execution

2016-07-28 Thread Robby Findler
Thanks. I'm not seeing anything out of the ordinary there. Rats. Robby On Thu, Jul 28, 2016 at 1:40 AM, Ivan Kuzmin wrote: > Here are the results! > > https://gist.github.com/inkuzmin/d5ae6b1287171ae3823fd715fa2e8e0e > > -- > You received this message because you are

Re: [racket-users] DrRacket 6.5 + OS X El Capitan = slow execution

2016-07-27 Thread Robby Findler
Okay, thanks. (For the record, I use Mac OS X 10.11 routinely and do not experience this issue, so there must be something something else going on. I'm not sure what guess to make next, but it is interesting that 6.2.1 didn't have this issue.) On Wed, Jul 27, 2016 at 9:45 PM, Ivan Kuzmin

Re: [racket-users] DrRacket 6.5 + OS X El Capitan = slow execution

2016-07-27 Thread Robby Findler
It may be that something went wrong with the date stamps. Can you try opening a Terminal window and Running the command: (quit DrRacket first and you should be able to just paste that command into the Terminal window and hit return) /Applications/Racket\ v6.5/bin/raco setup This should print

Re: [racket-users] identifier-out-of-context when trying to make a debug-repl

2016-07-13 Thread Robby Findler
<alexan...@knauth.org> wrote: > >> On Jul 13, 2016, at 7:25 PM, Robby Findler <ro...@eecs.northwestern.edu> >> wrote: >> >> You could define a language. Or you could do what DrRacket's debugger is >> doing? >> >> Robby > > That would

Re: [racket-users] identifier-out-of-context when trying to make a debug-repl

2016-07-13 Thread Robby Findler
You could define a language. Or you could do what DrRacket's debugger is doing? Robby On Wed, Jul 13, 2016 at 2:33 PM, Alex Knauth wrote: > >> On Jul 13, 2016, at 3:28 PM, Matthew Flatt wrote: >> >> At Wed, 13 Jul 2016 14:16:11 -0400, Alex Knauth

Re: [racket-users] TR could be even more spectacularly awesome:

2016-07-12 Thread Robby Findler
> > I think that the type checker should use these colors only when type > checking succeeds, and in that case, I’d consider the colors highly > useful. > > > > > > >> On Jul 12, 2016, at 5:46 PM, Robby Findler <ro...@eecs.northwestern.edu> >> wrote:

<    1   2   3   4   5   6   7   8   9   >