[racket] Adding a new native GUI component — is it possible?

2014-12-10 Thread Alexis King
The Racket GUI system is nice, but as with almost any GUI system, sometimes I yearn for the simplicity of HTML rendering. CSS and JavaScript let properly-styled HTML be easily inserted into almost any application without anyone realizing it isn’t native, so long as it’s fast and seamless. Basic

Re: [racket] in-query problems

2014-12-10 Thread George Neuner
Forgot to mention 2 other oddities. 1) If there is more than one column, in-query requires parentheses around the column list. None of the other row returning functions do. But putting parentheses around * doesn't work ... it doesn't produce an error but it returns nothing. 2) if you d

Re: [racket] Issue with require/typed and the json library

2014-12-10 Thread Neil Van Dyke
John Clements wrote on 12/10/2014 02:56 PM: Possibly related: the last time I checked, there was no widely adopted schema system for JSON, which is completely appalling. That is, it’s not possible to document an HTTP call as “returning a JSON object with field “timestamp” which is an integer an

Re: [racket] in-query problems

2014-12-10 Thread George Neuner
Hi Ryan, I'm confused by your response. What you're saying doesn't match what I see. On 12/10/2014 2:15 PM, Ryan Culpepper wrote: On Dec 10, 2014, at 12:22 PM, George Neuner wrote: > I'm using 6.0.1 and having problems trying to use in-query. > > First: in-query is the only function

Re: [racket] Issue with require/typed and the json library

2014-12-10 Thread John Clements
Possibly related: the last time I checked, there was no widely adopted schema system for JSON, which is completely appalling. That is, it’s not possible to document an HTTP call as “returning a JSON object with field “timestamp” which is an integer and “value” which is a string and no other fields

Re: [racket] in-query problems

2014-12-10 Thread Ryan Culpepper
On Dec 10, 2014, at 12:22 PM, George Neuner wrote: > Hi all, > > I'm using 6.0.1 and having problems trying to use in-query. > > First: in-query is the only function that can use cursors, but, unlike the > other row returning functions (query, query-rows, query-maybe-row), in-query > d

Re: [racket] Run-time record access

2014-12-10 Thread Sam Tobin-Hochstadt
You can generate a struct-accessor-procedure using struct-info, and use that with integer indexes. Sam On Wed Dec 10 2014 at 2:00:34 PM Benjamin Greenman wrote: > Ok, thank you. > > Is struct->vector the best way to access fields positionally? > > On Wed, Dec 10, 2014 at 7:30 AM, Matthew Flat

Re: [racket] Run-time record access

2014-12-10 Thread Benjamin Greenman
Ok, thank you. Is struct->vector the best way to access fields positionally? On Wed, Dec 10, 2014 at 7:30 AM, Matthew Flatt wrote: > Currently, the run-time representation of a struct doesn't include > field names. In that sense, field names don't exist at run time, and > all fields are accesse

[racket] in-query problems

2014-12-10 Thread George Neuner
Hi all, I'm using 6.0.1 and having problems trying to use in-query. First: in-query is the only function that can use cursors, but, unlike the other row returning functions (query, query-rows, query-maybe-row), in-query doesn't appear to understand Postgresql array fields - they are re

[racket] Awesome easter egg today guys - thanks!

2014-12-10 Thread Stephen De Gabrielle
Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Run-time record access

2014-12-10 Thread Matthew Flatt
Currently, the run-time representation of a struct doesn't include field names. In that sense, field names don't exist at run time, and all fields are accessed by position. We plan to change the structure-type core to add field names, but it hasn't happened, yet. At Wed, 10 Dec 2014 04:36:50 -050

[racket] Run-time record access

2014-12-10 Thread Benjamin Greenman
I'm hoping to implement the following function to access arbitrary struct fields. ;; Compute `[st]-field-name st`, where ;; [st] is the name of the struct type of `st` (define (runtime-get st field-name) (-> struct? string? any/c) (error "not implemented")) Is this possible? I fear I can't us