[racket-users] DrRacket indentation adds spaces to empty non-top-level lines?

2015-10-21 Thread Paolo Giarrusso
Hi all! Every time I reindent a file with DrRacket in a Git repository, DrRacket and Git fight over whitespace. Git assumes that spaces at the end of lines are whitespace errors, while DrRacket indentation will add spaces to empty lines (including existing ones), if they are inside parens

[racket-users] Opening .rktd files in DrRacket

2015-10-21 Thread Paolo Giarrusso
Every time I open a .rktd file in DrRacket 6.2.1, I get an error shown, because rktd files don't contain #lang. Googling found nothing, and I didn't find a #lang data. At best, I can add #lang s-exp syntax/module-reader, but those .rktd files won't work unless I change the reading applications.

Re: [racket-users] DrRacket indentation adds spaces to empty non-top-level lines?

2015-10-21 Thread Paolo Giarrusso
;> auto-indent-when-typing-a-character-on-a-whitespace-line. >>> >>> Also, Max made some improvements to how DrRacket treats newlines >>> whitespace at the end of lines (that I think are in a release by now, >>> but I'm not sure). So if you're seeing bad behavio

[racket-users] Re: Probabilities in log-space and rounding errors

2015-10-20 Thread Paolo Giarrusso
On Tuesday, October 20, 2015 at 12:15:21 PM UTC+2, Laurent Orseau wrote: > The built-in log-space arithmetic operations are wonderful. (Thanks so much > Neil!) > > > It sometimes happens that after some log-operations where the result is very > close to 0 that it actually goes slightly above 0

Re: [racket-users] 'clear' equivalent in DrRacket

2015-10-05 Thread Paolo Giarrusso
On Monday, October 5, 2015 at 10:56:50 AM UTC+2, Laurent Orseau wrote: > I don't think there is anything like this right now, but in case anyone wants > to do that, my first impression is,  that such a command should not > completely erase the previous content but only hide it (by scrolling down

Re: [racket-users] fail on http server response not actually a failure?

2015-10-05 Thread Paolo Giarrusso
On Monday, October 5, 2015 at 10:21:38 PM UTC+2, Neil Van Dyke wrote: > 'John Clements' via Racket Users wrote on 10/05/2015 03:26 PM: > > is this what I would expect to see if a client just gave up and closed > > the TCP connection before the response was written, > > I've seen similar errors

[racket-users] Re: [racket] developing tools

2015-10-06 Thread Paolo Giarrusso
For the record, a new solution has surfaced. I'm posting this here because this thread is highly ranked on Google, so I took it as a reference. Quoting Laurent from later: https://groups.google.com/d/msg/racket-users/_XWopH-iMNw/DEYMBxqqAQAJ > I'm using the script plugin [*] to test things

[racket-users] Separate compilation vs macros in signatures and compiler stacktraces (crashes?)

2015-10-06 Thread Paolo Giarrusso
I feel I've found (and minimized) a perfectly repeatable bug in separate compilation in Racket 6.2.1, or at least a situation which is a pain to debug for related reasons. The example code is available at http://pasterack.org/pastes/25050 (or at the end of this email) with all modules in one

Re: [racket-users] Separate compilation vs macros in signatures and compiler stacktraces (crashes?)

2015-10-06 Thread Paolo Giarrusso
-- they are part of the program that we expand > into, and thus need to be available at phase 0. > > Hopefully that helps explain what's going on here. > > Sam > > > > On Tue, Oct 6, 2015 at 7:18 PM, Paolo Giarrusso <p.giarru...@gmail.com> wrote: >> I feel I'

Re: [racket-users] Re: Case for net/url.rkt to read HTTP proxy servers from environment

2015-10-13 Thread Paolo Giarrusso
On Tuesday, October 13, 2015 at 9:21:08 PM UTC+2, William Hatch wrote: > I would like to see it fall back on HTTP_PROXY if PLT_HTTP_PROXY is not found. +1 > It is annoying that the cases vary (eg. wget uses http_proxy and https_proxy, > curl uses http_proxy and HTTPS_PROXY), but maybe we could

Re: [racket-users] 'clear' equivalent in DrRacket

2015-10-06 Thread Paolo Giarrusso
ne.comp.lang.racket.user/24630 I think the above would hold as soon as script-plugin was decent for you; in fact, I think it's already great. Cheers, Paolo > On Tue, Oct 6, 2015 at 4:11 AM, Paolo Giarrusso <p.gia...@gmail.com> wrote: > On 6 October 2015 at 01:45, Aman <amang...@gma

Re: [racket-users] [handin-client] `raco pkg install $URL` vs `raco setup -A $localPath`: getting lost with Racket packages

2015-09-06 Thread Paolo Giarrusso
kage, I can just push changes to the repo, > and students can get the new version using the same menu item in > DrRacket to update their installations. No further automation tools are > needed. > > Avoid `raco setup -A`. That approach has all the problems you describe > and m

[racket-users] [handin-client] `raco pkg install $URL` vs `raco setup -A $localPath`: getting lost with Racket packages

2015-09-06 Thread Paolo Giarrusso
Hi all, my research group is going to teach using How to Design Programs (2nd ed.), and I'm currently automating deployment of the handin-client with auto-update. Since the handin-client (and the auto-updater) was written for the old "package management system" (Planet), I'm having some trouble

[racket-users] Does sandboxing actually restrict module loading?

2015-09-12 Thread Paolo Giarrusso
Hi! I’m confused by the behavior of the Racket sandbox — it doesn’t seem to actually restrict module loading as its docs seem to promise. Alternatively, I'm misunderstanding the docs, and on my system (OS X) #:allow-for-require is unneeded altogether. But then, on what systems is it required?

[racket-users] Typed Racket: Does positive? have an invisible filter?

2015-10-03 Thread Paolo Giarrusso
Hi all! It seems to me that positive? is handled somehow specially by occurrence typing, and that this is not documented but should be. It appears to have a filter in practice, even the Typed Racket guide [1] claims so in passing, but this filter is not visible in its type annotation, compared

Re: [racket-users] Base Library Reference

2015-10-03 Thread Paolo Giarrusso
On Saturday, October 3, 2015 at 1:41:57 PM UTC+2, Neil Van Dyke wrote: > I always use `#lang racket/base`, since I'm almost always writing > reusable modules, and I'd like for a hypothetical someone reusing the > module in the future to not have to pull in all the `#lang racket` > dependencies.

[racket-users] Typed Racket: Byte-Larger-Than-One is half-hidden half-exported

2015-10-03 Thread Paolo Giarrusso
Hi all! While following Typed Racket's guide and learning about :type, I was confused by "private" types like Byte-Larger-Than-One showing up. This is especially confusing because it appears when learning about :type (http://docs.racket-lang.org/ts-reference/Exploring_Types.html).

Re: [racket-users] DrRacket plugins: getting language of current editor

2015-10-05 Thread Paolo Giarrusso
On Sunday, October 4, 2015 at 9:00:17 PM UTC+2, Robby Findler wrote: > Yes that is how you get it.  > > > But I think that maybe instead you should use the save-port method of the > editor. That's how you get what drr puts into the files it saves. You should > get the metadata and the "only

Re: [racket-users] Typed Racket: Does positive? have an invisible filter?

2015-10-03 Thread Paolo Giarrusso
On Saturday, October 3, 2015 at 4:49:52 PM UTC+2, Alex Knauth wrote: > On Oct 3, 2015, at 8:42 AM, Paolo Giarrusso <p.gia...@gmail.com> wrote: > > Hi all! > It seems to me that positive? is handled somehow specially by occurrence > typing, and that this is not

[racket-users] DrRacket plugins: getting language of current editor

2015-10-04 Thread Paolo Giarrusso
Hi all! I'm trying to figure out how to get the language-settings for the current DrRacket editor, for use in an existing plugin. My first attempt seemed to work for some time, but I've finally tracked down a bug with it; my new attempt seems to fix the bug, but I thought I'd try harder to get

[racket-users] Re: Writing text to a file with correct newlines

2015-10-05 Thread Paolo Giarrusso
On Monday, October 5, 2015 at 1:07:31 AM UTC+2, Josh English wrote: > I am trying to learn Racket by creating a Todo manager based on the Todo.txt > format by Gina Trapani (http://todotxt.com/) > > I also have an Android tablet that uses a todo.txt application. This > application uses "\n\r" at

[racket-users] Re: Writing text to a file with correct newlines

2015-10-05 Thread Paolo Giarrusso
On Monday, October 5, 2015 at 11:04:16 AM UTC+2, Paolo Giarrusso wrote: > On Monday, October 5, 2015 at 1:07:31 AM UTC+2, Josh English wrote: > > I am trying to learn Racket by creating a Todo manager based on the > > Todo.txt format by Gina Trapani (http://todotxt.com/) >

Re: [racket-users] 'clear' equivalent in DrRacket

2015-10-05 Thread Paolo Giarrusso
s as well as the rest. (OTOH, I'm scared that I'm writing code without understanding every single line around it. I usually never do that, but I'm new at Racket). Cheers, Paolo > On Monday, 5 October 2015 12:51:05 UTC-5, Paolo Giarrusso wrote: > > On Monday, October 5, 2015 at 10:56:50 AM

Re: [racket-users] fail on http server response not actually a failure?

2015-10-05 Thread Paolo Giarrusso
On 6 October 2015 at 03:42, George Neuner <gneun...@comcast.net> wrote: > On 10/5/2015 4:40 PM, Paolo Giarrusso wrote: >> >> On Monday, October 5, 2015 at 10:21:38 PM UTC+2, Neil Van Dyke wrote: >> > 'John Clements' via Racket Users wrote on 10/05/2015 03:26 PM:

Re: [racket-users] fail on http server response not actually a failure?

2015-10-06 Thread Paolo Giarrusso
On 6 October 2015 at 15:58, Jay McCarthy wrote: > I'm not sure if this answers the question... > > These errors are coming from the Web server response-outputing code > failing when the other side closed the connection early. The exception > would not be returned to your

Re: [racket-users] 'clear' equivalent in DrRacket

2015-10-06 Thread Paolo Giarrusso
ll-to-last #t) ;(scroll-with-bottom-base #f) (scroll-to 0 300 1 1 #t 'end)) str) On Tuesday, October 6, 2015 at 12:31:54 PM UTC+2, Paolo Giarrusso wrote: > So, a skeleton calling insert, relying on `script-plugin`, is the following. > It doesn't work yet, but it took like 1 minute, so i

Re: [racket-users] Typed Racket: Is (- 1 1) equivalent to (- 2 2)?

2015-12-11 Thread Paolo Giarrusso
On Friday, December 11, 2015 at 1:21:04 AM UTC+1, Matthias Felleisen wrote: > On Dec 10, 2015, at 3:04 PM, Klaus Ostermann wrote: > > > Thanks for the clarification, Sam. What you write makes sense. > > > > However, since the default case (without explicit annotations) is that I > > get these

Re: [racket-users] Typed Racket: Is (- 1 1) equivalent to (- 2 2)?

2015-12-10 Thread Paolo Giarrusso
On Thursday, December 10, 2015 at 8:26:02 PM UTC+1, Klaus Ostermann wrote: > > I don't think any typed language respects this. For example: > > > >(if (= 1 1) #f "not a boolean") > > > > is equal to #f, but many type systems do not let you replace #f with > > that expression. > > But in

Re: [racket-users] Re: Typed Racket: Is (- 1 1) equivalent to (- 2 2)?

2015-12-10 Thread Paolo Giarrusso
On Thursday, December 10, 2015 at 6:55:28 PM UTC+1, johnbclements wrote: > > On Dec 10, 2015, at 9:50 AM, George Neuner wrote: > > > > On Thu, 10 Dec 2015 12:35:34 -0500, Alex Knauth wrote: > > > >> In typed racket (- 1 1) and (- 2 2) are equal at runtime, but the type > >> checker doesn't

Re: [racket-users] Re: Typed Racket: Is (- 1 1) equivalent to (- 2 2)?

2015-12-10 Thread Paolo Giarrusso
On Thursday, December 10, 2015 at 9:11:00 PM UTC+1, Vincent St-Amour wrote: > Right. That's why we've built tools to get information about these types > more digestible: > > http://docs.racket-lang.org/ts-reference/Exploring_Types.html Thanks, I'd seen those but forgot the non-verbose

[racket-users] Re: [Racket] Bug with Abstraction Teachpack, posn and BSL with List Abbreviations

2015-12-10 Thread Paolo Giarrusso
On Thursday, December 10, 2015 at 7:15:07 PM UTC+1, Jonathan Brachthäuser wrote: > In DrRacket 6.2.1 when using the `match` construct as defined in the > abstraction teachpack together with posn a strange problem appears. > > When choosing BSL as language the following code just works as

Re: [racket-users] Re: [racket-dev] Re: Happy Module Day!

2015-12-21 Thread Paolo Giarrusso
On Friday, December 11, 2015 at 3:22:59 PM UTC+1, Brian Adkins wrote: > On Friday, December 11, 2015 at 9:06:16 AM UTC-5, Matthew Flatt wrote: > I think maybe an xargs limit is being reached or something - when I scroll > up, I see another total line is displayed for .rkt, so it's: Yes, that's

Re: [racket-users] "bad variable linkage" after restarting handin server under load

2015-11-26 Thread Paolo Giarrusso
On 25 November 2015 at 14:54, Robby Findler wrote: > I'm still not completely > sure, but since you seem to be able to provoke the error, that > emboldens me to suggest you apply the diff below and see if it goes > away. I'm doing this. Annoyingly, I can't force the

[racket-users] Value printing in REPL and for students

2015-11-26 Thread Paolo Giarrusso
Hi all! How does the REPL print values? In some circumstances I see graph printing markers, even though `(print-graph)` is disabled. Because these are error messages for students using teaching languages, cycle printing is not an option. messages.rkt> (print-graph) #f messages.rkt> (list

[racket-users] DrRacket fights `racket` on print behavior in `#lang racket/base`

2015-11-27 Thread Paolo Giarrusso
Here's an example showing that this test will not behave consistently in DrRacket and Racket, because `print` won't. Is that a bug, or is it a "bad practice (tm)" that I ever use `print` programmatically and expect specific output? Take the question as "me learning Racket, somewhat

Re: [racket-users] Value printing in REPL and for students

2015-11-27 Thread Paolo Giarrusso
t;use #lang htdp/bsl and all > will be fine" but I'm not there yet. That'd be... cool! At least Racket-generated errors would be better. Still, that doesn't help when implementing `!test` — unless I managed to do (!eval `(print ,v)). Should try that. Cheers, Paolo > On Thu, Nov 26,

[racket-users] Contracts vs Signatures for HtDP?

2015-11-28 Thread Paolo Giarrusso
While pointing students at teachpacks for HtDP/2e, one of our tutors correctly pointed out that they're not documented using HtDP signatures, but using standard Racket contracts. For instance, in big-bang's docs: > (to-draw render-expr) > render-expr: (-> WorldState scene?)

Re: [racket-users] "bad variable linkage" after restarting handin server under load

2015-11-29 Thread Paolo Giarrusso
> "pconvert-lib" > "sandbox-lib" > + "rackunit-lib" > "web-server-lib")) > (define build-deps '("gui-doc" > "racket-doc" > > > On Thu, N

[racket-users] "bad variable linkage" after restarting handin server under load

2015-11-25 Thread Paolo Giarrusso
Hi all, it's me, handin server guy again. Sorry to bother. Our handin server started "crashing" with "bad variable linkage" errors at deadline time (presumably under somewhat high load), and since it happened twice, I thought I'd report it. Any ideas on what's causing this? After this "crash",

Re: [racket-users] "bad variable linkage" after restarting handin server under load

2015-11-25 Thread Paolo Giarrusso
'm afraid I couldn't say much though). Cheers, Paolo > On Wed, Nov 25, 2015 at 6:35 AM, Paolo Giarrusso <p.giarru...@gmail.com> > wrote: >> Hi all, >> it's me, handin server guy again. Sorry to bother. >> >> Our handin server started "crashing" wit

Re: [racket-users] "bad variable linkage" after restarting handin server under load

2015-12-01 Thread Paolo Giarrusso
<ro...@eecs.northwestern.edu> wrote: > > > On Sunday, November 29, 2015, Paolo Giarrusso <p.giarru...@gmail.com> wrote: >> >> On Friday, November 27, 2015 at 3:44:20 AM UTC+1, Robby Findler wrote: >> > Yes, I think you're right. I originally wrote that bec

[racket-users] list? not in HtDP's BSL

2015-11-21 Thread Paolo Giarrusso
list? is not available [1] in either BSL or BSL with list abbreviations. Why? Lists are used everywhere even in BSL, and `list?` literally appears in half its documented contracts in beginner docs [2] — how should students understand them? I've looked for reasons, to no avail. I've only

[racket-users] [HtDP/2e & ISL+] Stepper and "seeming" accidental name capture

2016-01-28 Thread Paolo Giarrusso
Hi again everybody! My supervisor (Prof. Klaus Ostermann) noticed an issue with DrRacket's stepper in ISL+ (with Racket 6.2.1) and name capture. One could argue there's a straightforward name capture bug, but I think this is more confusing. For extra fun, as far as I can tell from quickly

[racket-users] Re: [HtDP/2e & ISL+] Stepper and "seeming" accidental name capture

2016-01-28 Thread Paolo Giarrusso
On Thursday, January 28, 2016 at 4:51:54 PM UTC+1, Paolo Giarrusso wrote: > My supervisor (Prof. Klaus Ostermann) noticed an issue with DrRacket's > stepper in ISL+ (with Racket 6.2.1) and name capture. Update: My supervisor also filed a ticket on this: http://bugs.racket-lang.org/quer