[racket-users] Re: Code critique request: data/fetch, proc for walking hashes/lists

2016-01-19 Thread David K. Storrs
I apologize for the long ping time on this -- for whatever reason I didn't get any of the replies sent to my email and I thought no one had responded. JCG, Jack, thank you very much for taking the time. Jack: I had to stare at your code for a while before I got it, but thank you for it. That

Re: [racket-users] backwards-incompatible change to in-vector

2016-01-19 Thread Gustavo Massaccesi
I couldn't write an example that is not obvious, but this programs looks ok to me: ;--- #lang racket (define (display-vector v) (for ([x (in-vector v 0 (vector-length v))]) (display x))) (display-vector (vector 1 2 3)) (newline) (display-vector (vector)) (newline) ;--- And I also like (in-

Re: [racket-users] Using the web server without continuations?

2016-01-19 Thread Alexis King
Perfect! That was my hope. One more question: if I did want to opt-in to continuations for just a single portion of my application, could I? The way I’ve been structuring my application is to have a module that serves as an entry point that calls serve/servlet and passes a dispatch function defined

Re: [racket-users] Using the web server without continuations?

2016-01-19 Thread Jay McCarthy
If you do not use send/suspend or send/suspend/dispatch, no continuations are ever saved. You do not need to "opt out". You "opt in" to continuations. Jay On Tue, Jan 19, 2016 at 7:07 PM, Alexis King wrote: > I’ve been using the Racket web server, and I’m very pleased with how > easy it’s been

[racket-users] Using the web server without continuations?

2016-01-19 Thread Alexis King
I’ve been using the Racket web server, and I’m very pleased with how easy it’s been to get a simple working application. However, so far, I haven’t been using send/suspend or any of the other features that leverage continuations. I’ve been wondering: since I’m not using send/back (just returning r

Re: [racket-users] backwards-incompatible change to in-vector

2016-01-19 Thread Robby Findler
On Tuesday, January 19, 2016, Stephen Chang wrote: > > I think you should not change this backwards compatibility unless you > > really know it isn't used (and even then it is hard to know such > > things). > > Well I still think these programs would be relying on a bug, since > they are referenc

Re: [racket-users] backwards-incompatible change to in-vector

2016-01-19 Thread Stephen Chang
> I think you should not change this backwards compatibility unless you > really know it isn't used (and even then it is hard to know such > things). Well I still think these programs would be relying on a bug, since they are referencing a non-existent vector element. But since there's no agreeme

[racket-users] 1st Call for Contributions for SPLASH'16: OOPSLA, Onward!, Workshops, DLS, SLE, GPCE

2016-01-19 Thread Tijs van der Storm
// ACM Conference on Systems, Programming, Languages, and Applications: Software for Humanity (SPLASH'16) Amsterdam, The Netherlands Sun 30th October - Fri 4th November , 2016 http://2016.splashcon.org Sponsored

Re: [racket-users] Top Level Variables or List of Shared Libraries

2016-01-19 Thread 'John Clements' via Racket Users
> On Jan 19, 2016, at 11:14 AM, Leif Andersen wrote: > > Is it possible to either create a variable that persists until the > Racket VM shuts down or get a list of all of the libraries that are > shared libraries that are currently being linked against the racket > vm? I can’t help you. But! Th

Re: [racket-users] backwards-incompatible change to in-vector

2016-01-19 Thread Robby Findler
I think you should not change this backwards compatibility unless you really know it isn't used (and even then it is hard to know such things). Robby On Tue, Jan 19, 2016 at 1:16 PM, Stephen Chang wrote: > Yes, or course it's possible, at the expense of more unreadable code. > > But the zero spe

Re: [racket-users] backwards-incompatible change to in-vector

2016-01-19 Thread Stephen Chang
Yes, or course it's possible, at the expense of more unreadable code. But the zero special case doesnt make sense. And is inconsistent with other out-of-range cases, eg (in-vector (vector) 1 1) errors To be clear, empty traversals with valid indices would still be legal, eg (in-vector (vector 1 2

[racket-users] Top Level Variables or List of Shared Libraries

2016-01-19 Thread Leif Andersen
Is it possible to either create a variable that persists until the Racket VM shuts down or get a list of all of the libraries that are shared libraries that are currently being linked against the racket vm? The reason why I ask is because I created a `from-c` require form[1], which takes in a C im

Re: [racket-users] backwards-incompatible change to in-vector

2016-01-19 Thread Vincent St-Amour
Would it be possible to special-case `(in-vector (vector) 0 0)` directly, and fix the bug while keeping backwards compatibility? Vincent On Tue, 19 Jan 2016 12:19:12 -0600, Stephen Chang wrote: > > I'm fixing pr 15227 but I would like to do so in a backwards-incompatible way. > > Right now an

[racket-users] backwards-incompatible change to in-vector

2016-01-19 Thread Stephen Chang
I'm fixing pr 15227 but I would like to do so in a backwards-incompatible way. Right now an out-of-range index is sometimes allowed as an argument to in-vector, leading to the bug: $ racket Welcome to Racket v6.4.0.4. -> (for/sum ([x (in-vector (vector 10 20) 2 -1 -1)]) x) SIGSEGV MAPERR si_code

Re: [racket-users] Store value with unsupported type in Postgres?

2016-01-19 Thread Ryan Culpepper
On 01/17/2016 06:35 PM, Alexis King wrote: The DB docs for SQL type conversions[1] note that not all Postgres types are supported by Racket, and it recommends using a cast to work around this. It even uses the inet type as an example right at the start of the page. However, I want to store an ine

[racket-users] Implement Topological sorting in HtDP-y way?

2016-01-19 Thread pvt
I just read the chapter of graph traversing from HtDP's website: http://www.ccs.neu.edu/home/matthias/HtDP2e/part_five.html#%28part._fsm._sec~3atraverse-graph1%29 The implementation of graph traversing is the calling sequence of: `find-path` -> `find-path/list` -> `find-path` -> ... I must say