Re: [racket-users] Getting JSON to work with the DB module

2019-04-23 Thread Ryan Culpepper
It is not possible, unfortunately. You must do the conversion to and from strings yourself. I've thought about adding a hook for additional conversions based on declared types, but there's no declared type information at all for parameters, and the declared type for results is fragile: a

Re: [racket-users] how do I clear this FFI-related build error?

2019-04-23 Thread Matthew Flatt
At Tue, 23 Apr 2019 23:39:04 +0200, Ryan Culpepper wrote: > It looks like natipkg Racket includes libharfbuzz.so.0, not > libharfbuzz.so.1 (see [1]). So try changing the unix line to > > [(unix) (ffi-lib "libharfbuzz" '("0" ""))] > > instead. Right. Just to elaborate a little, there is

Re: [racket-users] how do I clear this FFI-related build error?

2019-04-23 Thread Ryan Culpepper
On 4/23/19 23:14, Matthew Butterick wrote: Some code relies on the `harfbuzz` library, like so: (define-runtime-lib harfbuzz-lib   [(unix) (ffi-lib "libharfbuzz" '("1" ""))]   [(macosx) (ffi-lib "libharfbuzz.0.dylib")]   [(windows) (ffi-lib "libharfbuzz-0.dll")]) Though this works on my

[racket-users] how do I clear this FFI-related build error?

2019-04-23 Thread Matthew Butterick
Some code relies on the `harfbuzz` library, like so: (define-runtime-lib harfbuzz-lib [(unix) (ffi-lib "libharfbuzz" '("1" ""))] [(macosx) (ffi-lib "libharfbuzz.0.dylib")] [(windows) (ffi-lib "libharfbuzz-0.dll")]) Though this works on my Mac machines, the doc server throws an error: [1]

Re: [racket-users] How would you implement autoquoted atoms?

2019-04-23 Thread zeRusski
On Tuesday, 23 April 2019 15:57:52 UTC+1, Matthew Flatt wrote: > > This response will be rambling, too. :) And here I thought I asked an embarrassingly silly question :) While implementing a "naive" version I ran into two issues that I kind of predicted upfront, but just wanted to make sure

Re: [racket-users] Question regarding the function printBoard board

2019-04-23 Thread Stefan Schmiedl
"orenpa11" , 23.04.2019, 20:53: > Hi > I am using the functionprintBoard board (DrRacket Pretty Big) > > (printBoard '((0 0 2 0) (0 0 0 0) (0 0 8 0) (0 0 0 0))) > and the result is > > (0 0 2 0) > (0 0 0 0) > (0 0 8 0) > (0 0 0 0) > "" No, it is not. The *print output* is (0 0 2 0)

Re: [racket-users] Question regarding the function printBoard board

2019-04-23 Thread orenpa11
Thanks On Tuesday, April 23, 2019 at 9:59:35 PM UTC+3, Dexter Lagan wrote: > > Hi there! > > You can suppress à function’s output with (void (func ...)) like so: > > (void (printBoard '((0 0 2 0) (0 0 0 0) (0 0 8 0) (0 0 0 0 > > Or you can modify your original function and replace the “”

Re: [racket-users] Question regarding the function printBoard board

2019-04-23 Thread Dexter Lagan
Hi there! You can suppress à function’s output with (void (func ...)) like so: (void (printBoard '((0 0 2 0) (0 0 0 0) (0 0 8 0) (0 0 0 0 Or you can modify your original function and replace the “” by (void) like so: ... (cond ((empty? board) (void) ) ... Dexter > On Apr 23, 2019, at

[racket-users] Question regarding the function printBoard board

2019-04-23 Thread orenpa11
Hi I am using the functionprintBoard board (DrRacket Pretty Big) (printBoard '((0 0 2 0) (0 0 0 0) (0 0 8 0) (0 0 0 0))) and the result is (0 0 2 0) (0 0 0 0) (0 0 8 0) (0 0 0 0) "" How do I delete the "" ? I would like the output to be (0 0 2 0) (0 0 0 0) (0 0 8 0) (0 0 0 0)

[racket-users] Getting JSON to work with the DB module

2019-04-23 Thread David Storrs
tl;dr I'm having trouble getting JSON support working in the db module when using SQLite and would really appreciate some direction, or confirmation that it's impossible. I suspect that it's impossible, since the docs list the accepted Racket types as exact-integer?, real?, string?, and bytes?.

Re: [racket-users] How would you implement autoquoted atoms?

2019-04-23 Thread Alexis King
I find this email fascinating, as about three weeks ago, Spencer Florence and I discussed something almost identical, from the module path + symbol protocol all the way down to the trouble with `quote`. I had been intending to experiment with implementing the idea at some point, but I already

Re: [racket-users] make extensions or replacements

2019-04-23 Thread William G Hatch
On Tue, Apr 16, 2019 at 04:55:49PM -0400, Hendrik Boom wrote: On Tue, Apr 16, 2019 at 10:13:47PM +0200, Jens Axel Søgaard wrote: Hav you tried the make library? https://docs.racket-lang.org/make/index.html?q=make If you like Racket's make library but want something a little more shell-like,

Re: [racket-users] How would you implement autoquoted atoms?

2019-04-23 Thread Matthew Flatt
This response will be rambling, too. :) Especially with your follow-up message, I think you're getting to a problem that we've wrestled with for a while. Sometimes we've called it the "graphical syntax" problem, because it's related to having non-text syntax, such as images in DrRacket (which are

Re: [racket-users] db module 'query' does not return insert-id

2019-04-23 Thread David Storrs
On Tue, Apr 23, 2019 at 4:33 AM Ryan Culpepper wrote: > On 4/22/19 20:36, David Storrs wrote: > > > (require db) > > > (define db (postgresql-connect ...args...)) > > > (simple-result-info (query db "insert into collaborations (name) > > values ('foojalskdsfls')")) > > '((insert-id . #f)

Re: [racket-users] db module 'query' does not return insert-id

2019-04-23 Thread George Neuner
On 4/23/2019 4:32 AM, Ryan Culpepper wrote: On PostgreSQL, my guess is that your table was created without the "WITH OIDS" clause. For example:   > (define c (dsn-connect 'pg))   > (query c "create table words (t text)")   (simple-result '())   > (query c "insert into words (t) values

Re: [racket-users] Re: How would you implement autoquoted atoms?

2019-04-23 Thread Jens Axel Søgaard
Yes, a global table of all existing keywords are needed. I would do something along the lines of: #lang racket (struct Keyword (string)) (define global-keyword-hash (make-hash)) ; keyword : string -> keyword (define (keyword s) (define k (hash-ref global-keyword-hash s #f)) (or k (let

[racket-users] Re: How would you implement autoquoted atoms?

2019-04-23 Thread zeRusski
One thought that only just occurred to me is that we certainly want to allow creating kws dynamically, so a piece of code may generate some. IIUC this means it can no longer be a purely reader-based feature. Either reader and runtime have to communicate the global table somehow or the entire

[racket-users] How would you implement autoquoted atoms?

2019-04-23 Thread zeRusski
I must apologies for what follows will be more of a rambling than an exercise in clear thinking. That is because I am a bit stuck and thought I'd seek help. I have been thinking some about languages and how it isn't always easy to clearly separate language being implemented from the language

[racket-users] How would you implement autoquoted atoms?

2019-04-23 Thread zeRusski
I must apologies for what follows will be more of a rambling than an exercise in clear thinking. That is because I am a bit stuck and thought I'd seek help. I have been thinking some about languages and how it isn't always easy to clearly separate language being implemented from the language

Re: [racket-users] Are syntax transformations tree automata?

2019-04-23 Thread Matthias Felleisen
The coimputational power of Racket’s syntax transformation system is equivalent to that of Turing machines. [[ The expressive power is a bit limited and we’re working on expanding it, but I don’r think you’re asking about this. ]] — Matthias > On Apr 23, 2019, at 7:29 AM, Ilnar

[racket-users] Online IDE’s for Racket ?

2019-04-23 Thread Stephen De Gabrielle
Hi I found that you can run DrRacket on rollApp virtualisation platform[1]. Are there any other online IDE’s for Racket? I’m interested in both in-browser repl/editor combinations or virtualised DrRacket. Stephen [1] rollApp DrRacket free version does not permit saving. Signup required.

[racket-users] Are syntax transformations tree automata?

2019-04-23 Thread Ilnar Salimzianov
Hi all! I was glancing over these books [1] and [2] on tree automata. I assume that Racket's macro system / syntax transformations fall under the category of tree transducers. Can anybody please point me to a paper which describes its expressive power in formal terms, if any? The reason I

[racket-users] Re: Defeating Racket’s separate compilation guarantee

2019-04-23 Thread rocketnia
Thanks for exploring this! I was tempted down this path earlier this year because I was trying to future-proof my structure type definitions by making them cross-phase persistent. I see no innate reason for them not to be, so I figured I'd put in the effort early and avoid having to make a

Re: [racket-users] db module 'query' does not return insert-id

2019-04-23 Thread Ryan Culpepper
On 4/22/19 20:36, David Storrs wrote: > (require db) > (define db (postgresql-connect  ...args...)) > (simple-result-info (query db "insert into collaborations (name) values ('foojalskdsfls')")) '((insert-id . #f) (affected-rows . 1)) From the docs on the 'simple-result' struct: