Re: [racket-users] IEEE 754 single precision float support

2018-04-10 Thread George Neuner
On 4/10/2018 1:36 AM, d...@insomniacgames.com wrote: For the applications I work on, double precision floats are too costly to use; although the CPU cycle count to operate on doubles tend to be the same as single precision floats on modern hardware, the bandwidth cost is too prohibitive. We re

Re: [racket-users] IEEE 754 single precision float support

2018-04-09 Thread George Neuner
On 4/9/2018 7:11 PM, d...@insomniacgames.com wrote: I'm very interested in using Racket for the purposes of numerical analysis. Specifically, I am interested in using Racket as my test bed for implementing simple numerical algorithms which operate on IEEE 754 single precision floats and compar

[racket-users] Re: Symbolic links and filesystem-change-evt

2018-02-15 Thread George Neuner
On Wed, 14 Feb 2018 16:35:04 -0600, Philip McGrath wrote: >It appears that a `filesystem-change-evt` created with a path referring to >a symbolic link effectively watches the target of the link for changes, not >the link itself. For example, deleting the link and creating a new link >that points

Re: [racket-users] Reliably propagating received log messages to ports

2018-01-31 Thread George Neuner
On 1/31/2018 5:00 PM, Alexander McLin wrote: During the tool's start up period prior to calling the main function I set up a log receiver to receive messages at the desired level and place it inside a sync loop within its own thread. Each time a sync event is received, it is written out to th

Re: [racket-users] Apparent Datalog error?

2018-01-31 Thread George Neuner
On 1/31/2018 2:51 PM, Matthias Felleisen wrote: > On Jan 31, 2018, at 2:15 PM, George Neuner wrote: > > > On 1/31/2018 2:10 PM, Sam Caldwell wrote: >> Your definition of `ancestor` is one or two steps of parentage: >> >> > ancestor(A, B) :-

Re: [racket-users] Apparent Datalog error?

2018-01-31 Thread George Neuner
On 1/31/2018 2:10 PM, Sam Caldwell wrote: Your definition of `ancestor` is one or two steps of parentage: > ancestor(A, B) :- parent(A, B). > ancestor(A, B) :-   parent(A, C),   parent(C, B). I suspect you want one of those lines to appeal to the `ancestor` relation to allow longer ch

[racket-users] Re: Want to send email with net/smtp. An error to fix.

2018-01-19 Thread George Neuner
On Fri, 19 Jan 2018 08:45:22 -0600, Robby Findler wrote: >On Fri, Jan 19, 2018 at 8:30 AM, David Storrs wrote: >> #2: Please stop spamming the list with slightly divergent items on a given >> subject. Keep it confined to one subject line so that Gmail and the Google >> Group will thread the dis

Re: [racket-users] racket

2018-01-02 Thread George Neuner
On 1/2/2018 1:24 PM, Sanjeeb Sinkhada wrote: (define reduce-pair(λ(x)(cond       ((list? x)(append (first(first x))                        (last(second x))) thank you so much for the reply I got this but still not working You're getting there.  You have the 1st

Re: [racket-users] racket

2018-01-02 Thread George Neuner
On 1/2/2018 12:43 PM, Sanjeeb Sinkhada wrote: hi could anyone help me with this question? Write a function that will take a list of pairs and return just the pair comprising the first element of the first pair and the second element of the last pair.  Eg.  > (reduce-pairs ’()) NIL  > (reduce-p

[racket-users] Re: Alternatives to DrRacket

2017-12-25 Thread George Neuner
On Mon, 25 Dec 2017 12:31:21 -0800 (PST), Zelphir Kaltstahl wrote: >In practice [custodian-limit-memory] has often prevented stuff from filling >up all RAM + swap, but I thought it was actually the memory limit and >nothing can go over it. >Good to know that this is wrong! >So it is rather like

Re: [racket-users] Re: Alternatives to DrRacket

2017-11-27 Thread George Neuner
On 11/27/2017 3:30 PM, Zelphir Kaltstahl wrote: Memory limits can be easily added to a program as well with the following code: ~~~ (define (Mb-to-B n) (* n 1024 1024)) (define MAX-BYTES (Mb-to-B 128)) (custodian-limit-memory (current-custodian) MAX-BYTES) ~~~ The problem with  custodian-l

Re: [racket-users] DrRacket (6.11) issue on Windows 10

2017-11-13 Thread George Neuner
On 11/13/2017 5:01 PM, Jordan Johnson wrote: There’s also (Windows key)+(left/right arrow), which will move the window to the left/right half of the current display, and (Windows key)+Shift+(left/right arrow), which cycles it to the previous or next display (in case, e.g., the window is on a d

Re: [racket-users] DrRacket (6.11) issue on Windows 10

2017-11-13 Thread George Neuner
Hi David, On 11/13/2017 3:14 PM, David Van Horn wrote: I have a student who is has a strange problem that is preventing him from using DrRacket. When he opens DrRacket, it goes through the launch window, all the tools load, etc., but then when the main DrRacket window should appear, it doesn't.

[racket-users] Re: code reflection

2017-10-17 Thread George Neuner
On Mon, 16 Oct 2017 17:11:53 -0400, Matthias Felleisen wrote: >> On Oct 16, 2017, at 2:17 PM, George Neuner wrote: > >> Lisp's macros are ... I won't say easier to use correctly, because >> they aren't ... but IMO they are easier to understand and think about

[racket-users] Re: code reflection

2017-10-16 Thread George Neuner
Hi all, Thanks to everyone who replied. I apologize for posting and vanishing ... a family emergency on Saturday took me away for the weekend. David: Thank you for the exposition about your task scheduler. I have something similar, a (thread safe) priority queue based on data/heap, although i

Re: [racket-users] Re: code reflection

2017-10-14 Thread George Neuner
On 10/14/2017 3:00 AM, Jack Firth wrote: So is there a way ... from normal code ... to get at the locals of functions higher in the call chain?  Or at least the immediate caller? Some reflective capability that I haven't yet discovered? I'm not sure if there's a way to do that

[racket-users] code reflection

2017-10-13 Thread George Neuner
Hi all, This is a bit difficult to explain, so bear with me. I have a very simple macro which generates a runtime call to a normal function. The macro is so the arguments can be [more or less] free form expressions - the runtime function is because the computations are not simple and some of the

[racket-users] Re: racket/match a dictionary

2017-10-11 Thread George Neuner
On Wed, 11 Oct 2017 11:19:36 -0700, Alexis King wrote: >> On Oct 11, 2017, at 11:10 AM, George Neuner >> wrote: >> >> My (maybe wrong) reading of the docs suggests that to match a hash >> table, the table must be defined inline in the match clause. > >This i

[racket-users] racket/match a dictionary

2017-10-11 Thread George Neuner
Hi all, I trying to match a dictionary of terms against free form input. Many of the dictionary entries have aliases, so I'm using a custom hash table that matcheskeys by list membership. My (maybe wrong) reading of the docs suggests that to match a hash table, the table must be defined inline i

Re: [racket-users] Safely allocating memory in places enabled world

2017-10-02 Thread George Neuner
he best available solution following standard practices, and not actually that worried about the memory leak for my program. On Mon, Oct 2, 2017 at 1:48 PM, George Neuner <mailto:gneun...@comcast.net>> wrote: IIRC, the JVM executes finalizers in reverse order of registration

Re: [racket-users] Safely allocating memory in places enabled world

2017-10-02 Thread George Neuner
On 10/2/2017 2:52 PM, Matthew Flatt wrote: If we change `ffi/unsafe/alloc` so that a custodian shutdown runs all deallocators, that would work in many cases. It would create a problem, however, if there are objects to deallocate where the deallocation function references other objects that thems

[racket-users] Re: Benefits of Racket-on-Chez for laymen

2017-09-15 Thread George Neuner
On Fri, 15 Sep 2017 14:48:00 -0700, David King wrote: >... and places have much stronger restrictions than threaded >code in most languages does. ??? There are restrictions wrt shared data ... but AFAIK places have no execution restrictions vs a [normal] serial program. And place channels rea

[racket-users] Re: web-server - stream file uploads? [was ... servlet performance ...]

2017-09-04 Thread George Neuner
Hi Jay, On Mon, 4 Sep 2017 16:23:43 +0100, Jay McCarthy wrote: >On Fri, Sep 1, 2017 at 10:57 PM, George Neuner wrote: > >> Is there a way in the web-server to stream incoming data? Or maybe to >> get at the request before the (multipart) form data is read in? > >

Re: [racket-users] Re: Racket Web servlet performance benchmarked and compared

2017-09-02 Thread George Neuner
On 9/2/2017 1:46 PM, Piyush Katariya wrote: Does Racket app make use of all CPU cores by having multiple processes ? If it is written to use "places", which are parallel instances of the Racket VM that run on separate kernel threads. https://docs.racket-lang.org/guide/parallelism.html?q=plac

[racket-users] web-server - stream file uploads? [was ... servlet performance ...]

2017-09-01 Thread George Neuner
On Fri, 1 Sep 2017 14:38:21 -0400, Neil Van Dyke wrote: > ... *except when a GC cycle kicks in*. Speaking of web servers and GC ... I have a http web-server application that needs to be able to up/down load fairly large files. The application is somewhat memory constrained, and I'd like to ha

Re: [racket-users] How to introspect a function? (and/or other things)

2017-08-22 Thread George Neuner
On 8/22/2017 1:59 PM, David Storrs wrote: I've been thinking about various introspection possibilities     : What about functions?  Is there a way to answer the following questions?: - How many arguments do you require? - How many values do you return? - What is your contract?

Re: [racket-users] Re: Need help with parallelizing a procedure

2017-08-22 Thread George Neuner
On 8/22/2017 6:08 AM, Zelphir Kaltstahl wrote: Will "The Seasoned Schemer" be understandable for people who did not read the "The Little Schemer"? And is what is in there directly applicable in Racket (I guess it is, because of Racket's background, but I better ask beforehand!) Yes, and sor

[racket-users] Re: Need help with parallelizing a procedure

2017-08-19 Thread George Neuner
On Sat, 19 Aug 2017 10:36:37 -0400, Matthias Felleisen wrote: > >May I recommend The Seasoned Schemer? > You may certainly. Ironically, that is one book on Scheme that I have never read. My point to Zelphir was that continuations per se are not unique to Scheme ... only the ways in which th

[racket-users] Re: Need help with parallelizing a procedure

2017-08-19 Thread George Neuner
On Sat, 19 Aug 2017 09:28:49 -0400, George Neuner wrote: >When you say, (let/ec foo ... ) , all that's happening is the compiler >defines a pseudo-function named 'foo' that when called will exit from >the block of code in the scope of the let. (call/cc foo ...) does

Re: [racket-users] Re: Need help with parallelizing a procedure

2017-08-19 Thread George Neuner
On 8/19/2017 6:16 AM, Zelphir Kaltstahl wrote: I looked at the code for a while again and think I now begin to understand it a bit more: I did not know `(let/ec` so I had to read about it. It says, that it is equivalent to `(call/ec proc` or something, which is equivalent to `(call-with-escap

Re: [racket-users] Raising multiple nonfatal errors without stopping evaluation

2017-08-17 Thread George Neuner
On 8/17/2017 11:47 AM, David Storrs wrote: On Thu, Aug 17, 2017 at 2:44 AM, Sam Waxman > wrote: Hey all, One of the things that confuses me most in Racket is good error handling, and the continuations that are involved. Is it possible to raise an

Re: [racket-users] Re: Need help with parallelizing a procedure

2017-08-16 Thread George Neuner
On 8/16/2017 3:34 PM, Zelphir Kaltstahl wrote: Just a few quick questions regarding the places code: 1. Is `?` like `if`? For me it says that it is an undefined identifier. Um? ... I think that probably is a lambda glyph that didn't render for you. If you are looking at (let [ (

[racket-users] Re: Need help with parallelizing a procedure

2017-08-14 Thread George Neuner
On Mon, 14 Aug 2017 13:04:36 -0700 (PDT), Zelphir Kaltstahl wrote: >I tried with feature-visualizer, but did not save screenshots of >the result. Would it help showing them? I was not able to figure >out the problem, even when clicking the red dots to see what is >blocking. It made no sense to m

[racket-users] Re: Need help with parallelizing a procedure

2017-08-13 Thread George Neuner
On Sat, 12 Aug 2017 16:17:21 -0700 (PDT), Zelphir Kaltstahl wrote: >Is it in general not possible to use a place more than once? No problem. A very simple example is shown below. This example only demonstrates that places can remain running and responding to new requests. Real interaction

[racket-users] Re: Need help with parallelizing a procedure

2017-08-13 Thread George Neuner
On Sun, 13 Aug 2017 15:59:17 -0700 (PDT), Zelphir Kaltstahl wrote: >I tested using futures. While it is significantly faster than creating places, >it is still also significantly slower than the single threaded solution >without places and without futures: > >~~~ >(define (gini-index-futures su

Re: [racket-users] new to racket‎

2017-08-05 Thread George Neuner
Supplement to Deren's excellent response: On 8/6/2017 12:12 AM, arhrun.z...@gmail.com wrote: new to racket‎. > (foldr + 0 '(1 2 3)) 6 but > (foldr and #t '(#t #f)) and: bad syntax and The list iteration functions such as */foldr /*require a mapping/combining function. /*and*/ is

[racket-users] Re: How to store SQL query text outside Racket source code?

2017-08-01 Thread George Neuner
On Mon, 31 Jul 2017 22:00:37 -0700 (PDT), Alex Harsanyi wrote: >On Tuesday, August 1, 2017 at 12:11:24 PM UTC+8, gneuner2 wrote: > >> Hmm.  A change to a query often also means a change to its arguments >> and/or its result columns, so I don't see that there is much utility >> in keeping the

Re: [racket-users] How to store SQL query text outside Racket source code?

2017-07-31 Thread George Neuner
On 7/31/2017 10:46 PM, Alex Harsanyi wrote: I'm trying to write a function to keep the SQL query text outside of the Racket source code, as this would make it easier to write and test the SQL code. Instead of writing: (define query (virtual-statement (lambda (dbsys) "select ..."))) I wo

[racket-users] Re: Seeking expert opinion on how Racketeering tames web development chaos.

2017-07-31 Thread George Neuner
On Sun, 30 Jul 2017 20:02:56 -0700 (PDT), Sage Gerard wrote: >I see Racket can be used for web development, but is Racket >really what I need to meet the demands of multi-platform >development while competing in the market? Does Racket >(or similar) sit at the next stage of evolution for the >mul

[racket-users] Re: query-exec SQLite3 multiple statements

2017-07-26 Thread George Neuner
On Wed, 26 Jul 2017 11:45:25 -0700 (PDT), cmonbr...@gmail.com wrote: >First the create table is called and afterwards I execute each insert >statement. This is what displayln shows as output for sql-create: > >https://gist.githubusercontent.com/abramsba/54de32406917e5fb0c480d9c214c3b08/raw/e7c00

Re: [racket-users] Printing Quickly

2017-07-25 Thread George Neuner
On 7/25/2017 12:45 AM, Lehi Toskin wrote: I have noticed that printing in DrRacket is rather slow and I'm wondering if that's something I could speed up. If I have a loop that runs and prints a whole lot of information each loop, were I to become overwhelmed and click the Stop button, it woul

Re: [racket-users] How do db handles interact with threads and parameters

2017-07-24 Thread George Neuner
Hi David, On 7/24/2017 8:18 AM, David Storrs wrote: What happens in the following code? (define dbh (postgresql-connect ...)) ;; Use the DBH in a new thread (thread (thunk (while ...some long-running condition... (sleep 1) ; don't flood the DB (query-exec dbh "insert into users ...")

[racket-users] Re: Racket (or Scheme) macros for C

2017-07-06 Thread George Neuner
On Thu, 6 Jul 2017 11:06:17 -0700 (PDT), spearman wrote: >On Tuesday, July 4, 2017 at 4:00:14 PM UTC-7, Hendrik Boom wrote: > >> Not exactly what you're asking for, but Gambit is a Scheme >> implementation that compiles to C (or C++). You can define functions >> and specify what C ode should b

[racket-users] Re: beating java (speed)

2017-07-04 Thread George Neuner
On Tue, 4 Jul 2017 12:17:12 -0700 (PDT), "'Shakin Billy' via Racket Users" wrote: >i couldn't make the inlining via define-syntax-rule work in typed racket. in >normal racket define-inline did'nt speed things up much but changing the code >of "acht-teiler" to: >CODE-- >(define-syntax-rule (acht

[racket-users] Re: beating java (speed)

2017-07-03 Thread George Neuner
On Sat, 1 Jul 2017 17:14:01 +0200, Jens Axel Søgaard wrote: >Hi Billy > >Just curious. How long does the simple solution take: > >#lang racket/base >(require math/number-theory) > >(define (f n) > (for/sum ([x (in-range 1 (+ n 1))] >#:when (= (length (divisors x)) 8)) > 1))

[racket-users] Re: beating java (speed)

2017-07-03 Thread George Neuner
On Sat, 1 Jul 2017 07:05:43 -0700 (PDT), "'Shakin Billy' via Racket Users" wrote: >(compilation) >i'm not sure this will speed things up since i don't measure the >time using cli tools but built-in tools which run after the >jit-compilation took place, but i will give it a try. The JIT compiler

Re: [racket-users] beating java (speed)

2017-07-01 Thread George Neuner
On 7/1/2017 9:07 AM, 'Shakin Billy' via Racket Users wrote: java code runs in 4.5 seconds racket code takes 12.5 seconds to complete (in cli-mode) Just a thought ... did you compile the Racket code before you ran it? If not, it's likely quite a bit of the Racket time was for compilation. s

[racket-users] Re: Html to text, how to obtain a rough preview

2017-05-30 Thread George Neuner
On Tue, 30 May 2017 12:08:08 +0100, Erich Rast wrote: >If I was on Linux only I'd use "lynx -dump -nolist" in a subprocess, >but it needs to be cross-platform. As a last resort, if your definition of "cross-platform" is just Unix/Linux and Windows, then Lynx runs on all of those. George -- Yo

Re: [racket-users] Given any list, group n number of sublists into a single list

2017-05-17 Thread George Neuner
Doing people's homework are we? On 5/17/2017 8:08 PM, Matthew Butterick wrote: `slice-at` http://docs.racket-lang.org/sugar/index.html?q=slice-at#%28def._%28%28lib._sugar%2Flist..rkt%29._slice-at%29%29

[racket-users] Re: Racket 6.9

2017-05-02 Thread George Neuner
On Mon, 1 May 2017 15:37:49 -0400, James wrote: >I've been systematically looking at different Linux GUI environments, >on and off, for a while now. I currently use macOS on both my >desktop and laptop but have Linux and Windows virtual machines. >I might switch to Linux for the host OS at some

[racket-users] Re: Racket 6.9

2017-04-29 Thread George Neuner
On Sat, 29 Apr 2017 16:28:56 -0400, Neil Van Dyke wrote: >Stephen De Gabrielle wrote on 04/29/2017 03:18 PM: >> Ubuntu Linux is cheap, includes an alternative to ms word, gets >> regular updates and (most importantly) runs racket fine. > >Debian, RHEL/CentOS, Fedora, ArchLinux, and (maybe) Ubunt

[racket-users] Re: Racket 6.9

2017-04-29 Thread George Neuner
On Sat, 29 Apr 2017 21:05:10 +0200, "Jos Koot" wrote: >I have downloaded 6.9, but was warned that the file does not end >in correct way. Running the exe anyway gave a DrRacket that aborts >after opening it. I have Windows 7 with Bullguard protection. I would say try again with a new download.

Re: [racket-users] [racket][draw] some APIs should be more open

2017-04-12 Thread George Neuner
On 4/11/2017 10:41 PM, WarGrey Gyoudmon Ju wrote: This is a little awkward, there are lots of simple classes defined in racket/draw, font%, color%, pen%, brush% and so on. They just hold a group of plain data, hence opportunities to be inspected easily. However by default all classes are opaqu

[racket-users] Re: Algol

2017-04-09 Thread George Neuner
On Sun, 9 Apr 2017 06:23:27 -0700 (PDT), Dupéron Georges wrote: >As you say, it works with "#lang algol60", but I can't find >"Algol60" in the language selection dialog on DrRacket 6.9.0.1, >only R5RS, "Pretty big Scheme" and "ProfessorJ" (which I >installed manually). > >Which version are you

Re: [racket-users] Strange (to me) error in 'query-exec for io:read-le-intN

2017-04-05 Thread George Neuner
On 4/5/2017 2:56 PM, David Storrs wrote: On Wed, Apr 5, 2017 at 1:39 PM, Marc Kaufmann wrote: > Thanks David, that makes a little sense also because it often happens after > there has been no activity on the server for a while. If it is a stale > handle, is there something I can do about it? G

[racket-users] Re: Typing lag with DrRacket on Linux

2017-04-01 Thread George Neuner
On Fri, 31 Mar 2017 13:34:38 -0700 (PDT), Dave Musicant wrote: >I'm using DrRacket on a 64-bit Ubuntu 16.04 system with the >default Unity windowing system, and am finding that typing >in the definitions window is laggy. I've seen similar behavior on CentOS 6.5-6.8 under Gnome(2) - it has pers

Re: [racket-users] How to store a list (or struct...) in SQL and extract again as original Racket value

2017-03-21 Thread George Neuner
On 3/21/2017 8:36 PM, Marc Kaufmann wrote: Thanks. But I have to turn it into a string before storing it in the database; when I tried to store a serialized list in it (in a VARCHAR field), it complained that it expected a string. That's where all the trouble came from. The trouble I had was p

Re: [racket-users] How to store a list (or struct...) in SQL and extract again as original Racket value

2017-03-21 Thread George Neuner
ely I never did go back to verify the fix in later releases. George On 12/18/2014 09:03 PM, George Neuner wrote: Using 6.0.1. I just painfully discovered that (pg-array->list (list->pg-array (list))) => ERROR pg-array->list: expected argument of type 1>

[racket-users] Re: prepared queries

2017-03-14 Thread George Neuner
Hi Ryan, Hope you enjoyed the snow day. Lost power here for a while, but fortunately no damage. On 3/13/2017 11:09 PM, Ryan Culpepper wrote: On 03/13/2017 06:30 PM, George Neuner wrote: Then there is the issue that deliberately prepared queries are not optimized as heavily as normal

Re: [racket-users] Virtual connections, threads, and DSN extraction, oh my!

2017-03-13 Thread George Neuner
On 3/13/2017 5:16 PM, Ryan Culpepper wrote: When a thread uses a VC, it gets an underlying connection assigned exclusively to it for the lifetime of the thread[*]. When the thread dies, the VC releases the underlying connection; if it came from a pool, it returns to the pool and it can be ob

[racket-users] prepared queries

2017-03-13 Thread George Neuner
Hi Ryan, On 3/13/2017 5:43 PM, Ryan Culpepper wrote: Racket's db library always prepares a statement before executing it, even if there are no query parameters. When allowed, instead of closing the prepared statement immediately after executing it, the connection stores it in a (Racket-side,

Re: [racket-users] Virtual connections, threads, and DSN extraction, oh my!

2017-03-13 Thread George Neuner
On 3/13/2017 3:16 PM, David Storrs wrote: ... you talk about the "real connection", singular -- aren't there multiple real connections underlying the pool? Yes, a pool maintains some number of real connections to the DBMS. Note, however, that a pool can be configured to maintain just a sing

Re: [racket-users] Virtual connections, threads, and DSN extraction, oh my!

2017-03-13 Thread George Neuner
On 3/13/2017 3:41 PM, David Storrs wrote: On Mon, Mar 13, 2017 at 2:04 PM, Ryan Culpepper > wrote: If you are using `prepare` just for speed, it might help to know that most base connections have an internal statement cache that maps SQL strings to prepared statement o

Re: [racket-users] Virtual connections, threads, and DSN extraction, oh my!

2017-03-13 Thread George Neuner
Hi David, On 3/13/2017 12:49 PM, David Storrs wrote: I've got a centralized database connector: (define dbh (virtual-connection (connection-pool (thunk (postgresl-connect ...) This gets passed around from handle to handle and into various temporary or ongoing

Re: [racket-users] IMAP with racket

2017-02-11 Thread George Neuner
On 2/11/2017 7:04 AM, Tim Hanson wrote: I have successfully connected to two of the mail servers I use this way, but not yet to gmail. Has anyone successfully connected to gmail using either of the approaches tested here? Maybe someone can point out what I'm doing wrong? I haven't messed wit

[racket-users] Re: SEGV_ACCERR ??

2017-01-16 Thread George Neuner
Hi Matthew, Sorry for the delay in replying. On Sun, 15 Jan 2017 07:40:05 -0700, Matthew Flatt wrote: >Do you know how much memory the process was using when it crashed? Unfortunately I don't. As I said, I am not the administrator of this server ... I was informed about the crash a few days

[racket-users] SEGV_ACCERR ??

2017-01-14 Thread George Neuner
Hi all, re: Racket 6.5, prebuilt Linux x86_64 distribution on Centos 6.8 Had a crash in one of my headless webserver/database applications. The application itself is 100% Racket (no FFI libs), using the webserver and db modules heavily. The Racket install is default with no added packages.

[racket-users] Re: Distinguishing between a virtual connection and an actual one

2017-01-10 Thread George Neuner
On Tue, 10 Jan 2017 18:56:44 -0500, David Storrs wrote: >Assuming my function is given a database connection, is there a way to >distinguish an actual connection from a virtual one? More >specifically, is there a way to tell if it's safe to use this >connection as part of a (prepare) call? Prep

[racket-users] Re: Add fns or at least sample code for getting column names from table?

2016-12-29 Thread George Neuner
On Thu, 29 Dec 2016 17:23:48 -0500, "'John Clements' via Racket Users" wrote: > >> On Dec 28, 2016, at 12:51, David Storrs wrote: >> >> There's also this: >> >> (query-rows db >>" >>SELECT column_name >> FROM information_schema.columns >>

[racket-users] Re: Mobile Friendly HTML in Scribble?

2016-12-27 Thread George Neuner
On Tue, 27 Dec 2016 22:23:49 +, Philip McGrath wrote: >Has something changed recently in the CSS for the Racket documentation? I >thought that formerly the phone layout was equivalent to what happens if >you manually resize a desktop/laptop browser window to be quite narrow: the >sidebar / ta

[racket-users] Re: IMAP with racket

2016-12-27 Thread George Neuner
On Mon, 26 Dec 2016 23:32:48 -0800 (PST), Tim Hanson wrote: >Hi, I think I'd like to try using racket as a way to explore >relatively simple ways of getting a grip on some mail accounts >that have gotten out of hand. Specifically I'd like to be able >to >- compute some statistics, such as number

[racket-users] Re: New website design feedback

2016-12-24 Thread George Neuner
On Fri, 23 Dec 2016 06:55:13 -0800 (PST), Greg Trzeciak wrote: >2. Greyed out code snippets - I am not a fan of too much greyed out >text or code. It causes unnecessary eye strain. +1 Some additional comments: I am a bit uncomfortable with the heading "make languages" at the top. Although it

[racket-users] Re: Operations that create objects

2016-12-15 Thread George Neuner
On Thu, 15 Dec 2016 06:03:54 -0800 (PST), NeverTooOldToCode wrote: >Racket Reference section 1.1.5 states: "Operations that create >objects, such as vector, add to the set of objects" followed >by a nice and instructive step-by-step evaluation example. >Further on, lambda is used as another examp

Re: [racket-users] Racket backwards compatible to schemer books?

2016-11-22 Thread George Neuner
Hi Tim, On 11/18/2016 2:20 PM, Tim Johnson wrote: Hello racketeers : I retired as a coder. Now I can write in whatever programming language I wish to. I'd like to learn racket. I intend to start by working off of the Schemer books. I have the first three. Is racket fully compatible to the cod

Re: [racket-users] Re: What is the Racket equivalent to 'return' for early exit?

2016-11-21 Thread George Neuner
On 11/21/2016 12:41 PM, David Storrs wrote: Edit: I know I could also use call/cc and invoke the continuation to escape, but that still adds another layer of indentation for something that in the normal case won't be called. It's not a big deal, but I was wondering about it. On Mon, Nov 21,

[racket-users] Re: Testing - mails sent from desktop mail client not received

2016-11-18 Thread George Neuner
On Fri, 18 Nov 2016 21:20:24 -0500, George Neuner wrote: >You can send directly to racket-users@googlegroups.com Ok, that was interesting. I wrote: racket-users at googlegroups dot com and it appears that Gmane changed the address to its own relay. Stranger still, the copy that sho

[racket-users] Re: Testing - mails sent from desktop mail client not received

2016-11-18 Thread George Neuner
Hi Tim, On Fri, 18 Nov 2016 15:23:00 -0800 (PST), Tim Johnson wrote: >On Friday, November 18, 2016 at 1:02:20 PM UTC-9, Tim Johnson wrote: >> I am sending this from my browser, pointed at >> https://groups.google.com/forum/#!newtopic/racket-users as a test. >> >> Although I have been receiving

Re: [racket-users] find-seconds daylight saving

2016-11-10 Thread George Neuner
On 11/9/2016 2:18 AM, Ryan Culpepper wrote: Another option is to let PostgreSQL do it for you using AT TIME ZONE (or the timezone function): select ('2016-11-09 01:23:00Z'::timestamptz) at time zone 'us/eastern'; => 2016-11-08 20:23:00 But beware that PostgreSQL interprets numerical

Re: [racket-users] find-seconds daylight saving

2016-11-10 Thread George Neuner
Hi Ryan, On 11/9/2016 2:18 AM, Ryan Culpepper wrote: Does the following do what you want? (require srfi/19) ;; date-at-tz : Date Integer -> Date ;; Returns date of equivalent instant in given timezone. (define (date-at-tz d tz) (let ([t (date->time-utc d)]) (time-utc->date t

[racket-users] Re: Round-tripping binary data through the web server

2016-11-08 Thread George Neuner
Hi David, On 11/8/2016 9:17 PM, David Storrs wrote: Thanks, George, that's helpful. How is your data being transported, though? You're returning a response object instead of an xexpr, but I don't see where it's being encoded. It's just a raw byte string, out of a database. It gets uploaded t

Re: [racket-users] find-seconds daylight saving

2016-11-08 Thread George Neuner
Hi Jon, On 11/8/2016 6:28 PM, Jon Zeppieri wrote: George, these are not correct results. The UTC offset is correct, but the time fields are not -- under the assumption that you're trying to round-trip them unchanged. (But maybe that's not a correct assumption.) At any rate, I th

Re: [racket-users] find-seconds daylight saving

2016-11-08 Thread George Neuner
On 11/8/2016 2:29 PM, Robby Findler wrote: find-seconds returns a number, not a date? Maybe seconds->date is the culprit here? Robby Spoke too soon. 1 combination gets it right: (seconds->date (find-seconds ... #F) #T). Note that (for me) Nov 6 should be DST [until 2AM], but Nov 7 shoul

Re: [racket-users] Round-tripping binary data through the web server

2016-11-08 Thread George Neuner
Hi David, HTTP is printable characters only. In general you need to do something like base64 encode raw byte data to get it across in any kind JSON wrapping. I'm not messing with XML, but I use the following for binary imagery: (send/back (if success ; succeeded (

Re: [racket-users] find-seconds daylight saving

2016-11-08 Thread George Neuner
On 11/8/2016 2:29 PM, Robby Findler wrote: find-seconds returns a number, not a date? Maybe seconds->date is the culprit here? Robby Possibly. But both functions take an optional local-time? parameter. The various combinations don't seem to affect the time zone wrt daylight saving. Geor

[racket-users] find-seconds daylight saving

2016-11-08 Thread George Neuner
Racket 6.6 on Windows 7. find-seconds is getting the time zone wrong when local-time? is #t. Somehow it is in daylight saving all through November. When local-time? is #f (UTC) the time zone and hour offset are correct. [At least for "fall back", didn't check "spring ahead"] (for* [(m '(11

[racket-users] Re: postgresql sql-timestamp problem - test.rkt (0/1)

2016-11-06 Thread George Neuner
On Sun, 6 Nov 2016 22:59:27 -0500, Ryan Culpepper wrote: >See also the notes on PostgreSQL timestamptz here: >http://docs.racket-lang.org/db/notes.html#%28part._postgresql-timestamp-tz%29 >From that page: "This library receives timestamps in binary format, so the time zone adjustment is not ap

[racket-users] Re: postgresql sql-timestamp problem - test.rkt (0/1)

2016-11-06 Thread George Neuner
On Sun, 6 Nov 2016 22:59:27 -0500, Ryan Culpepper wrote: >I believe the db library is correct: "2016-05-01 05:00:00Z" and >"2016-05-01 00:00:00-05" refer to the same point in time. Oops! You're right. I was thinking backwards about how the difference would manifest. Thank you for the smack

[racket-users] Re: postgresql sql-timestamp problem - test.rkt (0/1)

2016-11-06 Thread George Neuner
Sorry. Don't know why the message was posted in parts. Sigh, George -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com.

[racket-users] postgresql sql-timestamp problem - test.rkt (0/1)

2016-11-06 Thread George Neuner
Hi all, Using Racket 6.6. I have a web app where the client provides a range of dates to match for a database search. The dates are provided in ISO8601 -MM-DD format, and there may be either: - a start and end date - a date and a span specified as a count [maybe negative] of interval

[racket-users] postgresql sql-timestamp problem - test.rkt (1/1)

2016-11-06 Thread George Neuner
begin 644 test.rkt M(VQA;F<@61B*0H@("AL970@(%L*("`@("`@("`@*&1B97)R;W(@(V8I"B`@("`@("`@ M("AR97-U;'0@("-F*0H@("`@("`@("`H2UE M>&5C(&1B("AS=')I;FBDB"B`@("`@("`@("`@("`@(")S96QE8W0@9#$L9#$Z M.G1E>'0B"B`@("`@("`@("`@("`@("(@("`@("`L9#(L9#(Z.G1E>'0B"B`@ M("`@("`@("`@("`@("(@(&9R;VT@9&%T97,B"B`@("`@("`

[racket-users] Re: Why would delete-file fail without throwing?

2016-11-06 Thread George Neuner
On Sat, 5 Nov 2016 18:05:02 -0400, David Storrs wrote: >I've got this little snip of code: > > >(define p "/tmp/foo/bar-28") >(file-exists? p) ; #t >(delete-file p) >(file-exists? p) ; still #t ?? > > >I've verified that: > >*) It's not throwing an exception >*) The code is running as me >*) T

[racket-users] Re: How "expensive" are regular expression in Racket in general?

2016-11-04 Thread George Neuner
On Fri, 4 Nov 2016 04:03:53 +0100, meino.cra...@gmx.de wrote: >I have to break down input from textfiles in lists. Due to >missing formatting symbols like ";" (csv) I have do it more >"analogous". ;) > >It can be done by regex and it can be done by line splitting, >procesing the results (removing

[racket-users] Re: [OT]: Receiving doubled mail and mutt (Linux/UNIX mailclient)

2016-11-01 Thread George Neuner
On Tue, 1 Nov 2016 09:24:54 -0400, David Storrs wrote: >I also have been getting [duplicate posts], and I use GMail. > >I suspect part of the problem is that when I hit "Reply All" to this >message, it was going to send to "Meino + list" and I had to >explicitly delete your name before sending.

[racket-users] Re: Recursive stepping down a list patially?

2016-11-01 Thread George Neuner
On Tue, 01 Nov 2016 06:47:24 +0100, Vincent St-Amour wrote: >FWIW, your `find-it` is a thin wrapper over `memf` from `racket/base`. > >Vincent Sort of. In a roundabout way, the OP also asked about how to return multiple values from a function. memf doesn't do that. My point was to illustrate

[racket-users] Re: Recursive stepping down a list patially?

2016-10-31 Thread George Neuner
On Tue, 1 Nov 2016 04:28:26 +0100, meino.cra...@gmx.de wrote: > >Hi Jon, > >thanks for reply! :) > >My plan was, to return only one element from that list and >possibly some extra informations and pass that to the processing >function so it could right jump onto that train... > >Is that possible?

[racket-users] Re: Searching in data the Racket way...

2016-10-30 Thread George Neuner
On Sun, 30 Oct 2016 11:02:38 +0100, meino.cra...@gmx.de wrote: >The data in question consists of 7400 lines of 16 fields each. Not all >fields are filled in eacht line. The already existing code reads the >data into lists of sublists of 16 fields/items. > >I want to prepare those data in a way, t

[racket-users] Re: Print...a newbies problem ;)

2016-10-30 Thread George Neuner
On Sat, 29 Oct 2016 13:45:43 +0200, meino.cra...@gmx.de wrote: >currently I am still doing old-school "printf()-debugging", knowing >that it's '(print arg)' rather than 'printf( fmt, val,...);". :) Just FYI: Racket does have printf, fprintf and eprintf. The format strings are a little differen

[racket-users] Re: Taking hash of really big files

2016-09-24 Thread George Neuner
On Sat, 24 Sep 2016 07:22:55 -0700, David Storrs wrote: >Aaaand, no sooner do I send this than I discover openssl/sha1. Sorry to >have wasted your time. > >On a separate topic, is it reasonable to assume that openssl/sha1 will work >on any platform that Racket will run on? I'm specifically thin

[racket-users] Re: difference between function returning a string and function returning a symbol

2016-09-24 Thread George Neuner
On Sat, 24 Sep 2016 08:45:28 -0700 (PDT), Angus wrote: >I am reading through Realm of Racket and saw this function in the conditions >chapter: > >(if (= (+ 1 2) 3) > 'yup > 'nope) > >So this function returns a symbol. Will be 'yup in above case. But 'yup >confuses me. I don't really

[racket-users] Re: Trying to understand racket/gui and racket/draw

2016-09-18 Thread George Neuner
On Fri, 16 Sep 2016 06:04:09 -0500, Robby Findler wrote: >You could draw into a bitmap and then have on-paint draw that bitmap, too. > >Robby Yes. "Double buffering" with an off-screen bitmap is the best way to minimize redrawing. However, it also should be pointed out that the DC has a clippin

<    1   2   3   4   5   6   >