[racket-users] racket-money email list - discussing commercial use of Racket

2018-03-16 Thread Neil Van Dyke
To encourage discussion among people who are using Racket commercially (or interested in that topic), who might speak more candidly in a forum that's less-public than "racket-users"... Some of us are trying out an unofficial "racket-money" email list that is not archived on the Web.  The idea

Re: [racket-users] Storing JSON into PostgreSQL 10

2018-03-16 Thread Ryan Culpepper
On 03/16/2018 11:28 PM, David Storrs wrote: I'm noticing that when I store jsexpr?s into PostgreSQL 10 I end up with them as strings, not as actual JSONB data.  I've read the docs and tried every combination of typecasting / methods of writing that I can think of but nothing ends up working. 

Re: [racket-users] Storing JSON into PostgreSQL 10

2018-03-16 Thread Philip McGrath
I suspect this may be an issue with your PostgreSQL schema. Racket uses the `jsexpr?` type for both the types "JSON" and "JSONB" at the PostgreSQL level.[1] Can you confirm that your column is defined with the "JSONB" type? [1]

[racket-users] Storing JSON into PostgreSQL 10

2018-03-16 Thread David Storrs
I'm noticing that when I store jsexpr?s into PostgreSQL 10 I end up with them as strings, not as actual JSONB data. I've read the docs and tried every combination of typecasting / methods of writing that I can think of but nothing ends up working. Can anyone point me to the right way? -- You

Re: [racket-users] struct-copy question

2018-03-16 Thread Kevin Forchione
> On Mar 16, 2018, at 2:38 PM, Kevin Forchione wrote: > > Hi guys, > I’ve noticed that struct-copy doesn’t appear to work when fields are defined > with #:auto. So this leads to my question, which may not be answerable since > it would presumably be used to fix

[racket-users] struct-copy question

2018-03-16 Thread Kevin Forchione
Hi guys, I’ve noticed that struct-copy doesn’t appear to work when fields are defined with #:auto. So this leads to my question, which may not be answerable since it would presumably be used to fix struct-copy, but is there a way to retrieve a list of struct fields for a struct? I have a

Re: [racket-users] Parameterized Redex models

2018-03-16 Thread 'Leandro Facchinetti' via Racket Users
As far as I understand, your ‘length-ok’ is implementing in Redex the ‘(<= (length ___) ___)’ I had in my ‘side-condition’. But I can’t see how it addresses two important features from my original code: (1) ‘k’ is parameterizable, and its value influences whether a list is valid or not; and

Re: [racket-users] places opens too many files

2018-03-16 Thread 'Paulo Matos' via Racket Users
On 16/03/18 13:52, Matthew Flatt wrote: >> But even more surprised that given I only open one >> open (the null) port for stdout and stderr I still get the system error. > > There's no avoiding an OS-level file descriptor for each of stdin, > stdout, and stderr. Even if you supply an existing

Re: [racket-users] Parameterized Redex models

2018-03-16 Thread Robby Findler
If you want to stay inside redex-land, you have to do something like the code below, where you use typesetting to turn uses of length-ok (in other relations) into something like "#(l) = k". hth, Robby #lang racket (require redex) (define-term k 3) (define-language L) (define-judgment-form L

Re: [racket-users] places opens too many files

2018-03-16 Thread Matthew Flatt
At Fri, 16 Mar 2018 13:30:07 +0100, "'Paulo Matos' via Racket Users" wrote: > I was playing around with places and decided to try to spawn 200 places. > [...] > Is there anything I can do to avoid this? Which files are actually being > created? And 200 is not a very large number... This is a

Re: [racket-users] Parameterized Redex models

2018-03-16 Thread 'Leandro Facchinetti' via Racket Users
> But I clearly don’t get what you really want so I will abandon this one. > > Good luck — Matthias > Thanks for trying, talking to you is always instructive  For people that hasn’t abandoned this one: I decided to bite the bullet and thread the ‘metaparameter’ in my definitions. This will

[racket-users] places opens too many files

2018-03-16 Thread 'Paulo Matos' via Racket Users
Hi, I was playing around with places and decided to try to spawn 200 places. #lang racket (define (kaboom) (define null-port (open-output-nowhere)) (define ps (for/list ([i (in-range 200)]) (define-values (p _1 _2 _3) (place* #:in #f #:out null-port