Re: [racket-users] [OT] Cities and GPS

2019-09-06 Thread Alex Harsanyi
In fact, I updated the data frame package to be able to read the CSV file directly, without having to process it, so the example now becomes: #lang racket (require data-frame) (define df (df-read/csv "worldcities.csv" #:quoted-numbers? #t)) (define ((is-city? name) v) (equal? (vector-ref v

Re: [racket-users] Ability to unload an ffi-lib?

2019-09-06 Thread Matthew Flatt
The next snapshot build (available in 18 hours or so at pre.racket-lang.org) includes a `#:custodian` optional argument to `ffi-lib`. Probably you want `#:custodian (current-custodian)`, which will unload the foreign library for a program run in DrRacket in reaction to "Kill" or "Run". Beware

Re: [racket-users] [OT] Cities and GPS

2019-09-06 Thread Alex Harsanyi
That database is simple enough to use directly, not sure if it needs a separate package: #lang racket (require data-frame) ;; The worldcities.csv file has all values quoted, so df-read/csv reads them ;; all as strings. Convert a series to numbers. (define (->numeric df series)

Re: [racket-users] Ability to unload an ffi-lib?

2019-09-06 Thread Chris Pettitt
That sounds great! I would love to take advantage of it when it becomes available. Thanks, Chris On Fri, Sep 6, 2019 at 7:09 AM Matthew Flatt wrote: > There's still no mechanism to unload a DLL. > > For a long time, it wasn't practical to try to unload a DLL, because > the finalization

Re: [racket-users] minor infelicities in style guide

2019-09-06 Thread Neil Van Dyke
Regarding the discussion of tests expected to fail, and moving expected-fail tests to different directories, I wonder whether you'd prefer using an expected-fail annotation per test case. An annotation seems useful for my own work, and lightweight, but I don't know about core Racket

[racket-users] minor infelicities in style guide

2019-09-06 Thread Hendrik Boom
Section 1.1 mentions PLT. Is this obsolete? It is at least confusing or someone who does not know Racket history. Section 2.2 Always Test It should mention that when you formulate a test you should test the test *before* you modify the code. At present the warning about an inadequate test

[racket-users] transparency of structs?

2019-09-06 Thread jos.koot
Hi Has something changed with transparency of structs? I find the following: #lang racket/base (module a racket/base (define inspector (make-inspector)) (define-values (descr constr pred acc mut) (make-struct-type 's #f 2 0 #f '() inspector #f '(0))) (define an-s (constr 'monkey

Re: [racket-users] general mapping tools?

2019-09-06 Thread Neil Van Dyke
Josh Rubin wrote on 9/6/19 1:36 PM: Google Earth (still available as a desktop application) uses *Keyhole Markup Language* (KML) is an XML-based *markup language* designed to annotate and overlay visualizations on various two-dimensional, Web-based online maps or three-dimensional Earth

[racket-users] general mapping tools?

2019-09-06 Thread Josh Rubin
The recent talk about maps made me interested in thematic maps - for example   hiking maps   A map of the counties in Ohio, distorted so the area of each county is proportional to population. Google Earth (still available as a desktop application) uses *Keyhole Markup Language* (KML) is an

[racket-users] no TR support for streams?

2019-09-06 Thread 'John Clements' via Racket Users
Perhaps I just don’t know how to search the racket docs correctly, but IIUC there’s no support for Streams in the current TR implementation? I just want to use stream-cons, empty-stream, stream-first, and stream-rest. I guess the easy workaround is just to use thunks to roll my own stream, but

Re: [racket-users] [OT] Nostalgia

2019-09-06 Thread Neil Van Dyke
Last week on HN, a non-student was complaining about having to increase DrRacket's memory limit 3 times while they were playing with it, so I pointed out that DrRacket was designed for new students, and suggested that maybe that memory limit was a good thing for new students. One of frequent

Re: [racket-users] [OT] Nostalgia

2019-09-06 Thread Hendrik Boom
On Fri, Sep 06, 2019 at 02:49:45PM +0100, Stephen De Gabrielle wrote: > LOL > 128k ! I remember dreaming I had 128K when I was on a 16 K machine. Well, that 128K was a big omprovement on the machine I *first* tried implementing Lisp on -- an IBM 1620 with 40,000 decimal digits of memory.

Re: [racket-users] [OT] Nostalgia

2019-09-06 Thread Stephen De Gabrielle
LOL 128k ! I remember dreaming I had 128K when I was on a 16 K machine. Recently had to change my limit to 1024 MB... S. On Fri, 6 Sep 2019 at 14:41, Hendrik Boom wrote: > I just noticed DrRacket telling me > Language: racket, with debugging ; memory limit: 128 MB > immediatey reminding

[racket-users] [OT] Nostalgia

2019-09-06 Thread Hendrik Boom
I just noticed DrRacket telling me Language: racket, with debugging ; memory limit: 128 MB immediatey reminding me of the 128 K that was available on the first Lisp system I got any actual use from -- one I implemented myself on an IBM 360/65. Back then there were rumours that some IBM

Re: [racket-users] Ability to unload an ffi-lib?

2019-09-06 Thread Matthew Flatt
There's still no mechanism to unload a DLL. For a long time, it wasn't practical to try to unload a DLL, because the finalization mechanisms were too asynchronous --- making it difficult to detect the point where the DLL would no longer be referenced and could be unloaded safely. But support for

Re: [racket-users] [OT] Cities and GPS

2019-09-06 Thread Laurent
There's a small free database here too: https://simplemaps.com/data/world-cities I started writing a simple query system for it this morning (csv->rktd, then just list of assoc operations). On Fri, Sep 6, 2019 at 1:35 PM Sage Gerard wrote: > Would geonames help? > http://www.geonames.org/ > >

Re: [racket-users] [OT] Cities and GPS

2019-09-06 Thread Sage Gerard
Would geonames help? http://www.geonames.org/ Original Message On Sep 6, 2019, 8:28 AM, Hendrik Boom wrote: > On Thu, Sep 05, 2019 at 10:42:01PM -0700, Alex Harsanyi wrote: > ... >> >> > >> > A package containing a database of the positions of the major cities and >> >

[racket-users] [OT] Cities and GPS

2019-09-06 Thread Hendrik Boom
On Thu, Sep 05, 2019 at 10:42:01PM -0700, Alex Harsanyi wrote: ... > > > > > A package containing a database of the positions of the major cities and > > countries would be nice too :) > > > > > A general facility able to resolve location names to GPS coordinates would > be a lot of work, and

Re: [racket-users] Embedding a map widget in the DrRacket REPL

2019-09-06 Thread Robby Findler
Wow, thank you! Robby On Thu, Sep 5, 2019 at 11:00 PM Alex Harsanyi wrote: > > > On Wednesday, September 4, 2019 at 7:50:19 PM UTC+8, Stephen De Gabrielle > wrote: >> >> Dr Racket is amazing. Need to a demo of this and plot side by side. >> > > I can do better than just put a plot and a map

[off-topic] Re: [racket-users] Embedding a map widget in the DrRacket REPL

2019-09-06 Thread Stephen De Gabrielle
That is awesome - How you make your videos? - I like the annotations. Kind regards Stephen On Friday, September 6, 2019 at 4:59:56 AM UTC+1, Alex Harsanyi wrote: > > > > On Wednesday, September 4, 2019 at 7:50:19 PM UTC+8, Stephen De Gabrielle > wrote: >> >> Dr Racket is amazing. Need to a