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

2016-10-20 Thread Jack Firth
There's also the Gregor package (https://docs.racket-lang.org/gregor/index.html?q=gregor), which gives a much more comprehensive interface to dates and times. In particular, Gregor allows you to specify an "offset resolver" for these sorts of time-holes. -- You received this message because

[racket-users] Error ("assignment disallowed") when deserializing class-based objects

2016-10-20 Thread Philip McGrath
I'm looking into whether Racket's class/object system might be useful for one of my projects, and I am stumped by an error when deserializing objects. I've managed to produce the error a few different ways, but here is a fairly minimal example: > (define-serializable-class ok% object%

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

2016-10-20 Thread Matthias Felleisen
BSL’s IA doesn’t even do definitions. That’s the whole point. > On Oct 20, 2016, at 5:13 PM, Sam Tobin-Hochstadt wrote: > > That seems to me to be an issue with navigation in the stepper (which > I'd also love to have improved). But I wouldn't want to fix that by >

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

2016-10-20 Thread Sam Tobin-Hochstadt
That seems to me to be an issue with navigation in the stepper (which I'd also love to have improved). But I wouldn't want to fix that by asking people to first copy-and-paste things to the interactions window. Sam On Thu, Oct 20, 2016 at 5:01 PM, Robby Findler

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

2016-10-20 Thread Matthias Felleisen
The old interface to the stepper could be preserved as a package. > On Oct 20, 2016, at 5:01 PM, Robby Findler > wrote: > > 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

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 Sam Tobin-Hochstadt
I wouldn't want to give up stepping the definitions window. When a student has a question about how something they've written works, it's usually written down in the definitions window, and I like being able to just start stepping that. More generally, I just don't use the interactions window that

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

2016-10-20 Thread Matthias Felleisen
The difference is that we can simplify the stepper if all we ever evaluate are expressions in the IA. For example, the check-syntax problem could go away. I suspect the simplified presentation would also become more accessible to most students than the current evaluation of many little

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

2016-10-20 Thread Sam Tobin-Hochstadt
I was thinking that the button at the top works the same as now, and that while it's open, everything goes to the stepper. That would work well for me in class. Sam On Thu, Oct 20, 2016 at 4:52 PM, Matthias Felleisen wrote: > > How do you open the stepper window in the

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

2016-10-20 Thread Matthias Felleisen
How do you open the stepper window in the first place? I think the stepper button for the DA could go away. That would simplify John’s life a bit. But if you are saying — the button in the IA opens the stepper window — and the stepper works until closed I am fine with that too. > On

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

2016-10-20 Thread Sam Tobin-Hochstadt
What if entering expressions at the interactions window _while the stepper window is open_ caused them to be stepped? Sam On Thu, Oct 20, 2016 at 4:48 PM, Matthias Felleisen wrote: > >> On Oct 20, 2016, at 4:44 PM, John Clements wrote: >> >>>

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

2016-10-20 Thread Matthias Felleisen
> On Oct 20, 2016, at 4:44 PM, John Clements wrote: > >> >> On Oct 20, 2016, at 12:32 PM, Matthias Felleisen >> wrote: >> >> >>> On Oct 20, 2016, at 3:20 PM, John Clements >>> wrote: >>> >>> I think you probably

[racket-users] Handin required file

2016-10-20 Thread mattsap
Hello, Thanks for all the help in the past! I'm still working on the handin-server and getting it up and ready. My students in their submission require an extra file called 'extra.rkt'. This extra.rkt is about 20MB so I wouldn't really wanted it to be submitted with each student in a

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

2016-10-20 Thread Dmitry Pavlov
That was more intended as a rant about things that drive me batty than actual instruction -- I hope it didn't come across as patronizing. No, not at all. One of the things that surprised me the most is that prior to 1925, astronomers kept timestamps of their observations where day started

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

2016-10-20 Thread Matthias Felleisen
> On Oct 20, 2016, at 3:20 PM, John Clements wrote: > > I think you probably want an interface that steps a single expression and > then reverts to the standard mode. Exactly. My preference would be to have a ‘button’ like feature at the top-right of the IA for

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

2016-10-20 Thread 'John Clements' via Racket Users
> On Oct 20, 2016, at 12:08 PM, Matthias Felleisen wrote: > > > p.s. The only reason we cope with this at all is only because we don’t launch > the stepper from the REPL. If we could set the Interactions Window to ‘RUN’ > or ‘STEP’ mode and then say > >> (f 10) > >

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

2016-10-20 Thread Matthias Felleisen
p.s. The only reason we cope with this at all is only because we don’t launch the stepper from the REPL. If we could set the Interactions Window to ‘RUN’ or ‘STEP’ mode and then say > (f 10) and the stepper would pop up to show this (in an appropriate, evaluated definition context) we

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

2016-10-20 Thread Matthias Felleisen
We need to differentiate between ‘semantics’ (calculations) and ‘rendering the result’ (printing at the repl). I suspect that the reduction from (check-expect 7 7) to #true might be overkill for students, though not something they will spend much time on. We could also say that (c-e 9 9)

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] proposed minor improvement to stepper semantics

2016-10-20 Thread Sam Tobin-Hochstadt
When teaching, I've personally found the reduction to #true confusing, and something that I can't explain to my students. So I'd prefer that it go away entirely, rather than happening more. Sam On Thu, Oct 20, 2016 at 2:35 PM, Vincent St-Amour wrote: > Reducing

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

2016-10-20 Thread 'John Clements' via Racket Users
> On Oct 20, 2016, at 11:35 AM, Vincent St-Amour > wrote: > > Reducing to something, rather than disappearing, does sound like a good > idea to me. > > On the other hand, one may expect something that reduces to `#true` to > print `#true` to the interactions

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

2016-10-20 Thread Vincent St-Amour
Reducing to something, rather than disappearing, does sound like a good idea to me. On the other hand, one may expect something that reduces to `#true` to print `#true` to the interactions window, which isn't what happens. Vincent On Thu, 20 Oct 2016 13:33:19 -0500, Racket Users wrote: > >

[racket-users] proposed minor improvement to stepper semantics

2016-10-20 Thread 'John Clements' via Racket Users
I’m trying to clean up some code near where Mike Sperber discovered a stepper bug, and I accidentally made a change that I think actually improves the stepper. Specifically, in the past, the step from, e.g., (check-expect 13 13) to #true was silently omitted. So, for instance, if you wrote

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] date->seconds complaining about a supposedly non-existent date

2016-10-20 Thread David Storrs
That was more intended as a rant about things that drive me batty than actual instruction -- I hope it didn't come across as patronizing. On Thu, Oct 20, 2016 at 12:32 PM, Dmitry Pavlov wrote: > David, > > Yes, I deal with most of this at work, except daylight savings. >

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

2016-10-20 Thread Dmitry Pavlov
David, Yes, I deal with most of this at work, except daylight savings. (Timestamps in astronomical observations are predominantly in UTC or rarely TT/TDB, I never saw local time.) Best regards, Dmitry On 10/20/2016 07:26 PM, David Storrs wrote: Also be aware that once you start getting

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

2016-10-20 Thread David Storrs
Also be aware that once you start getting into date math you need to deal with: *) Minutes that might have 61 seconds in them. Yes, hh:mm:60 is a real time. *) Hours that don't exist. *) Hours that happen twice in the same day. *) Februaries that have 28 or 29 days on a weird schedule. (If

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

2016-10-20 Thread Dmitry Pavlov
Matthew, Did you timezone use daylight saving in 1996? Oh, right. I need UTC date and time; I assumed it is UTC since I passed #f for dst? and 0 for time-zone-offset in (date). I missed the local-time? flag in date->seconds, which is true by default. So the corrected version of my code

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

2016-10-20 Thread Matthew Flatt
Did you timezone use daylight saving in 1996? In U.S. timezones, March (it used to be April) has a 1-hour hole due to the switch to daylight saving time, where the clock skips forward from 1:59am to 3:00am. For example, 2:47:59am on March 13, 2016 really did not exist in my timezone. At Thu, 20

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

2016-10-20 Thread Dmitry Pavlov
Hello, The surprise of the day for me is date->seconds rejecting a particular time on a particular date. (date->seconds (date 59 47 2 31 3 1996 0 0 #f 0)) This should be 1996, March 31, 02:47:59 am, correct? It reports the following error: find-seconds: non-existent date wanted: (59 47 2

Re: [racket-users] web-server response/output contract errors

2016-10-20 Thread Craig Allen
Gah, I knew it'd be something simple. Thanks for that, I assumed it'd return void. Craig -- 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 email to

[racket-users] web-server response/output contract errors

2016-10-20 Thread Craig Allen
Hi guys, I'm trying to serve a file using a restful API via dispatcher. The file is being served but I'm also getting some funky contract errors that I don't really understand. The function is (define (generate-zip-response zip-path) (let* ([size-bs (string->bytes/utf-8