Re: [racket-users] GUI button% string label keyboard mnemonics

2021-01-08 Thread George Neuner
On 1/6/2021 2:56 PM, Dominik Pantůček wrote: When a button is created like: (new button% (label "&Quit") ...) everything works as expected. The #\q key becomes a keyboard shortcut that triggers the callback correctly. But when the string label is given in the list of icon and label like: (n

Re: [racket-users] GUI button% string label keyboard mnemonics

2021-01-09 Thread George Neuner
On 1/9/2021 3:20 AM, Dominik Pantůček wrote: > Maybe a stupid question ... > > Is  "close-icon" the name of the bitmap or a function that creates a > bitmap? I am using images/icons/misc: https://docs.racket-lang.org/images/Icons.html?q=close-icon#%28def._%28%28lib._images%2Ficons%2Fmisc..r

Re: [racket-users] Unsafe structs

2021-01-21 Thread George Neuner
On 1/20/2021 1:53 AM, Sorawee Porncharoenwase wrote: However, ‘struct-field-info-list’ returns only fields defined by the actual type and does not include fields that were inherited. What I don’t see is any simple way to get at the struct’s inheritance hierarchy —- it seems

Re: [racket-users] "Unbound Identifier" (Lists)

2021-02-24 Thread George Neuner
Hi, Presumably you are using 'head' to get the first element of a list.   However, there is no function 'head' for lists. see:  https://docs.racket-lang.org/reference/pairs.html Try using 'first' and 'rest' instead of 'head' and 'tail'. George On 2/24/2021 3:55 PM, IF Karona wrote: Hi eve

Re: [racket-users] Running user-supplied code in a place

2021-04-07 Thread George Neuner
On 4/7/2021 5:34 PM, David Storrs wrote: I'm trying to expand a task manager to optionally use places and I'm having some trouble understanding the issue. ; test.rkt #lang racket (provide start) (define (start thnk) (sync (place ch (place-channel-put ch (thnk) ; x.rkt #lang racket (r

Re: [racket-users] copy-file does not preserve file attributes on linux version of Racket...

2021-05-10 Thread George Neuner
On 5/10/2021 8:16 PM, Don Green wrote: From Racket doc: "File permissions are transferred from src to dest; on Windows, the modification time of src is also transferred to dest." Is the above line meant to imply that a unix/linux version of Racket will NOT preserve file attributes using copy

Re: [racket-users] Sharing scope in setup/cleanup for dynamic-wind?

2021-05-19 Thread George Neuner
Coming late to this ... On 5/19/2021 11:31 AM, David Storrs wrote: On Tue, May 18, 2021 at 4:09 PM Philip McGrath mailto:phi...@philipmcgrath.com>> wrote: On Tue, May 18, 2021 at 3:52 PM Sam Tobin-Hochstadt mailto:sa...@cs.indiana.edu>> wrote: I think the key question is what

[racket-users] Re: Embedded Racket reimplementation for constrained hardware?

2021-06-05 Thread George Neuner
On Sat, 5 Jun 2021 06:45:44 -0700 (PDT), dbohdan wrote: >Has anyone tried making a small embedded implementation of Racket? I mean >"embedded" not in the sense of 8-bit microcontrollers but more powerful yet >still constrained devices, like routers with 64 MB RAM running Linux or the >PlaySta

[racket-users] Re: Embedded Racket reimplementation for constrained hardware?

2021-06-08 Thread George Neuner
On Sun, 6 Jun 2021 07:26:09 -0700 (PDT), "schle...@gmail.com" wrote: >I think in such an environment I would like to control memory usage myself, >or maybe have a #lang that allows very fine grained and low level control >over resources. (outputting lowerlevel code than racket/base). >If you n

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread George Neuner
On 6/16/2021 1:19 PM, David Storrs wrote: I'm getting bytes off the wire and attempting to write them to a port.  I have a check in place to verify that the pipe has free space but when I attempt to reports that yes, there is space, and then it writes and fails regardless and I'm not sure why.

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread George Neuner
On 6/16/2021 2:16 PM, David Storrs wrote: Damn.  Sorry, I posted out of sync versions of code and output.  This is correct: (define bstr (make-shared-bytes 509 5)) (define rx-pipe-size 16777216) (define-values (rx-in rx-out) (make-pipe rx-pipe-size)) (define (room-in-rx-pipe? bstr)   (define

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread George Neuner
On 6/16/2021 3:45 PM, Matthew Flatt wrote: At Wed, 16 Jun 2021 14:25:40 -0400, George Neuner wrote: > It looks like the problem > is that "flush" is not defined ... Yes, "returns without blocking after writing as many bytes as it can immediately flush"

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread George Neuner
On 6/16/2021 7:01 PM, Shu-Hung You wrote: Out of curiosity, I wrapped David's code in a loop and tried to write 509 bytes in each iteration. From the output, it looks like CS doesn't implement pipes using a fixed-size buffer. I'm also not sure how many different buffers there are. I think this ha

Re: [racket-users] Why would writing to a pipe fail?

2021-06-16 Thread George Neuner
Forgot to mention this is using  CS 8.1 -- 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. To view this discussion on t

Re: [racket-users] Why would writing to a pipe fail?

2021-06-18 Thread George Neuner
Hi Matthew, Sorry for the delay in replying. On 6/17/2021 7:08 PM, Matthew Flatt wrote: At Wed, 16 Jun 2021 17:33:56 -0400, George Neuner wrote: > > Dumb question ... why should non-blocking I/O worry about "flush" at > all.  Why not behave like native I/O where writes

Re: [racket-users] Moving a function into a different `place?`

2021-07-01 Thread George Neuner
On 7/1/2021 2:36 PM, David Storrs wrote: What is the best way to pass a function into a child `place`? 1.  just define the functions in a context the place can see 2.  send the name of a local file for the recipient to dynamic-require 3.  send the definition file for the recipient to save loc

Re: [racket-users] Question from a beginner. Why Racket Over Scheme?

2021-07-13 Thread George Neuner
On 7/13/2021 10:13 AM, joseph turco wrote: Hello, Im am looking at learning a programming language, and have been bouncing around with scheme/racket/dyalog APL/squeak. upon investigation of scheme and racket, i found that in regards to racket, there really isn't a "Beginners book" that teach

Re: [racket-users] Can I get the behavior of `overment` followed by `augride` with a single class?

2021-07-17 Thread George Neuner
On 7/17/2021 1:10 AM, Alexis King wrote:    :   a complex, possibly error-prone, way to front-end class method dispatch    : This brings me to my question: is there any simpler way to do this? And are there any hidden gotchas to my technique? I'm still trying to understand how it works.  8-)

Re: [racket-users] Equivalent of exec

2021-08-03 Thread George Neuner
On 8/3/2021 12:14 PM, Norman Gray wrote: Greetings. I can't find a way of doing something equivalent to exec in Racket.  Is this Hard, or am I just missing it? By 'exec', I mean the equivalent of replacing the process with a new image, as distinct from `system` (and friends) or `process` (a

Re: [racket-users] Equivalent of exec

2021-08-03 Thread George Neuner
On 8/3/2021 1:03 PM, Norman Gray wrote: On 3 Aug 2021, at 17:38, George Neuner wrote: Racket is multi-platform and tries to present a common API for dealing with underlying operating systems.  Windows is an important platform, but Windows does not have the concept of fork/exec ... so

Re: [racket-users] frame width and (get-display-size) ...

2021-08-06 Thread George Neuner
I have no idea what this code will do on MacOS, but it works on Windows ... at least for the limited window tilings I tried. YMMV. - #lang racket (require racket/gui) (define-values (w h) (get-display-size #:monitor 0)) (printf "screen: ~a ~a~n" w h) (set!

Re: [racket-users] problem of gui layout using side-by-side frames

2021-08-12 Thread George Neuner
On 8/11/2021 10:44 PM, Don Green wrote: When I specify 2 frames to be side-by-side using racket/gui, I believe I would have no problem if all my prospective client platform did not have a vertical Operating System taskbars. Since I do have such a taskbar I must use code that takes the width

Re: [racket-users] problem of gui layout using side-by-side frames

2021-08-12 Thread George Neuner
On 8/12/2021 1:39 PM, kamist...@gmail.com wrote: I think instead of fidgeting around with OS dependent stuff to align frames side by side, I would take another approach (inspired by other applications): 1. per default the application is just a big window with multiple sections divided with pan

Re: [racket-users] problem of gui layout using side-by-side frames

2021-08-12 Thread George Neuner
On 8/12/2021 2:52 PM, Jens Axel Søgaard wrote: Den tor. 12. aug. 2021 kl. 20.44 skrev George Neuner mailto:gneun...@comcast.net>>: If I understand correctly, Don seems to want menus in his side-by-side "panels". Are we talking menu bar menus or contextual menu

Re: [racket-users] Is there an easy way to disable a GUI element?

2021-09-02 Thread George Neuner
On 9/2/2021 5:39 PM, Ryan Kramer wrote: I see that button% has an `enabled` field, but I'm not seeing anything for slider%, text-field%, and choice%. If I want to disable these elements, do I have to roll my own enable/disable logic? Also, is there a way to change a button's `enabled` status

Re: [racket-users] Re: jest...@gmail.com Trouble installing DrRacket

2021-09-13 Thread George Neuner
On 9/13/2021 1:02 PM, Nathan Philippon wrote: It's a Samsung GalaxyBook On Monday, September 13, 2021 at 12:48:06 p.m. UTC-4 jest...@gmail.com wrote: Yeah, I don't think Racket supports windows on arm devices. I'm guessing this is a chromebook or something? HP? Dell? On Monday, S

Re: [racket-users] Re: jest...@gmail.com Trouble installing DrRacket

2021-09-13 Thread George Neuner
On 9/13/2021 10:34 PM, Matthew Flatt wrote: Just to clarify: Racket runs on a number of ARM variants when running Linux and other Unix-like operating systems, but we have not yet ported to Windows on ARM. Matthew Is there a list somewhere of which chips have successfully run Racket? Or a defi

Re: [racket-users] Looking to trigger the end of a loop by the creation of a file.

2021-10-02 Thread George Neuner
On 10/2/2021 7:25 PM, Don Green wrote: Looking to trigger the end of a loop by the creation of a file. Is this possible? Is this advisable? Currently using: a 'for' loop with a 'for' loop guard expression to test for the existence of a file. Tried file-exists? but that does not seem appropriate

Re: [racket-users] racket/gui/base in sandboxes in places

2021-10-03 Thread George Neuner
On 10/3/2021 4:04 PM, 'William J. Bowman' via Racket Users wrote: I'm trying to run sandboxes in places, but when the sandboxes need access to racket/gui (such as through 2htdp/universe), they get `cannot instantiate racket/gui/base' a second time`. I've tried initing racket/gui once in the

Re: [racket-users] hash->list with try-order? (like hash-map)

2021-10-13 Thread George Neuner
On 10/12/2021 7:01 PM, unlimitedscolobb wrote: I wrote myself this little function: (define (hash->ordered-list h)   (hash-map h cons #t)) which uses the try-order? argument of hash-map. Is there a reason for hash->list not have an optional argument try-order?  Or perhaps having such a stan

Re: [racket-users] hash->list with try-order? (like hash-map)

2021-10-13 Thread George Neuner
On 10/12/2021 7:01 PM, unlimitedscolobb wrote: I wrote myself this little function: (define (hash->ordered-list h)   (hash-map h cons #t)) which uses the try-order? argument of hash-map. Is there a reason for hash->list not have an optional argument try-order?  Or perhaps having such a stan

[racket-users] Re: Escape continuations for fussy code

2021-10-20 Thread George Neuner
On Wed, 20 Oct 2021 09:44:42 -0700 (PDT), Ryan Kramer wrote: > : >The other feature of let++ is that it also supports let-values. (Having to >nest "let, then let-values, then let again" was another reason my code >would get too indented for my taste.) > : Possibly a stupid question, but ... W

Re: [racket-users] hash->list with try-order? (like hash-map)

2021-10-21 Thread George Neuner
On 10/20/2021 5:53 PM, unlimitedscolobb wrote: I have two main use cases for producing an ordered list from a hash table: 1. A canonical way to pretty print a hash table: In my projects, I carry around and print out hash tables a lot, so I like the elements to appear in the same order all the

Re: the end of the [racket-users] mailing list and the migration to Discourse as a forum for Racket

2021-11-22 Thread George Neuner
On 11/22/2021 11:19 AM, Philip McGrath wrote: It appears that some Gmail spam filter has decided that racket-users@googlegroups.com is a suspicious email address. It seems like roughly half of the legitimate traffic on the list is never reaching me and being marked as spam (at one of two or

Re: [racket-users] Anyone successfully filtering Italian spam?

2021-11-29 Thread George Neuner
On 11/29/2021 6:45 PM, Nathaniel Griswold wrote: It’s getting through my filters, neither rspamd or my local client can catch on to it. Is there a good simple filter? Nate Something has changed very recently because until this last week I rarely saw it (even marked AS spam) ... maybe a fe

Re: [racket-users] Anyone successfully filtering Italian spam?

2021-11-30 Thread George Neuner
On 11/30/2021 6:57 AM, Stephen De Gabrielle wrote: I’m using gmail for racket-users, but the normally reliable spam filtering fails - despite numerous attempts to train - it still classifies real mail as spam and the spam as real. S. I'm convinced that Google does that on purpose ... I beli

Re: [racket-users] Anyone successfully filtering Italian spam?

2021-11-30 Thread George Neuner
On 11/30/2021 9:22 AM, Laurent wrote: The last 10 spams have all these words in common: https://pastebin.com/BB0arV63 and many more (which I won't copy here for obvious reasons). So you could create a dedicated spam filter that looks for *any* of (not: all of) these words. Unfortunately, th

Re: [racket-users] Anyone successfully filtering Italian spam?

2021-12-01 Thread George Neuner
On 12/1/2021 1:30 PM, Nathaniel W Griswold wrote: > On Nov 30, 2021, at 8:22 AM, Laurent wrote: > > The last 10 spams have all these words in common: > https://pastebin.com/BB0arV63 > and many more (which I won't copy here for obvious reasons). > > So you could create a dedicated spam filt

[racket-users] Re: Discourse - Mailing list mode

2021-12-08 Thread George Neuner
On Tue, 7 Dec 2021 17:56:38 -0500, James Platt wrote: > I notice that Discourse has a "mailing list mode" which you can set > in the preferences. I haven't had a chance to evaluate it much yet > but, what I'm hoping for is that this will allow me to use the forum > pretty much the same way as I

Re: [racket-users] Re: Discourse - Mailing list mode

2021-12-08 Thread George Neuner
On 12/8/2021 12:34 PM, James Platt wrote: On Dec 8, 2021, at 10:45 AM, George Neuner wrote: > It's a big deal if you are (or were) following multiple groups. I don't understand. Why is this an issue? I find it very convenient to filter each group into it's own folder

Re: [racket-users] Possible options for stopping spam

2021-12-15 Thread George Neuner
Is there a way to whitelist / trust posters.  One of the other groups I follow is moderated, but is set up so that messages from trusted posters go straight through.  The moderator(s) only have to look at posts coming from untrusted sources and decide whether new posters can be trusted. Cave

[racket-users] Re: Surprising but convenient

2021-12-19 Thread George Neuner
On Sun, 19 Dec 2021 17:50:11 +0100, Jacob Jozef wrote: >I start a thread printing a file. When the file will be very long (say >50 GB) the thread takes too much time and I kill it when it takes >more time than I want to permit. Outside the thread I clean up. >Closing the output-port before deleti

[racket-users] Re: Why does a module need an inside scope?

2022-06-08 Thread George Neuner
On Wed, 1 Jun 2022 01:14:46 -0700 (PDT), "sym...@gmail.com" wrote: >Hi, why does a module need an inside scope in addition to the outside >scope? What will break if the inside scope is removed? Hi, Most discussion of Racket has moved to the discourse group. https://racket.discourse.group/ T

Re: [racket-users] Re: Detecting broken inbound TCP connections

2022-07-01 Thread George Neuner
Hi Jeff, Note that most network problems result in an exception ... which your code is not catching and which you might have missed seeing in the output.  You need to catch *exn:fail:network* and examine the *errno* field to figure out what happened. * errno* is a cons: *( integer . symbol )

[racket] parser tools - defining tokens

2011-10-04 Thread George Neuner
Hi all, I am playing with the parser tools in Racket. I would like to be able pass a separately defined list of symbols to define-empty-tokens (which is a syntax macro defined in parser-tools/private-lex/token.rkt). Unfortunately passing a list to define-empty-tokens doesn't work because th

Re: [racket] Bug with equal? and bit-vectors

2015-02-25 Thread George Neuner
On Tue, 24 Feb 2015 23:13:48 +0100, Jens Axel Søgaard wrote: >2015-02-24 23:01 GMT+01:00 Eric Dong : >> It seems that bit-vectors have a really weird bug, where short bit-vectors >> that aren't equal will often return true when tested with equal?. >> >> Here's a trivial example: http://pasterack

Re: [racket] Bug with equal? and bit-vectors

2015-02-27 Thread George Neuner
On Thu, 26 Feb 2015 12:57:51 -0800, Ryan Davis wrote: >> >> On Feb 25, 2015, at 23:25, George Neuner wrote: > >> It's still in the 6.1.1 release. >> >> I played with it a little: if the two bit-vectors have equal length >> and the length is <=

Re: [racket] Error when pasting code

2015-03-17 Thread George Neuner
On Tue, 17 Mar 2015 19:06:50 + (UTC), Steve Graham wrote: >When running the following code, when manually typed in, there is no >error.  However, when the same is pasted from the keyboard buffer, >the error indicated appears. >Comments? >Thanks, Steve Likely there are hidden control characte

Re: [racket] Error when pasting code

2015-03-17 Thread George Neuner
t n) >   (if (< n 2) >   1 >   (* n (fact (- n 1) >> (fact 5) >120 >;; Copied from browser into repl> (define (factorial n) >  (if (= n 0) >  1 >  (* n (factorial (- n 1) >stdin::355: if: bad syntax; > has 4 parts after keyword >  i

Re: [racket-users] apply: pass keywords to function?

2015-03-25 Thread George Neuner
Hi Alexander, I think the immediate issue is solved. I need to look at the links you provided - they may be helpful in the future. Thanks for all your help. George On 3/24/2015 5:05 PM, Alexander D. Knauth wrote: On Mar 22, 2015, at 7:42 PM, George Neuner wrote: > I thought about c

Re: [racket-users] accumulators vs foldl? was: Fwd: Rsound question

2015-03-25 Thread George Neuner
On 3/25/2015 2:07 PM, 'John Clements' via users-redirect wrote: This is a pedagogic question. The discussion below (forwarded with permission) is basically about the best way to find the maximum value in a vector of length four million, a.k.a. a sound file. Non-tail recursion is problematic; I

Re: [racket-users] Why are SQLITE queries so slow?

2015-03-26 Thread George Neuner
On 3/25/2015 10:03 AM, Renaud wrote: I'm new to Racket, and i would like to know why sqlite queries are so slow in my test program. This program imports some data from a text file into a simple sqlite DB. It takes 35s with the INSERT queries and 5-6s without them. I've done the same thing wit

Re: [racket-users] Re: Why are SQLITE queries so slow?

2015-03-26 Thread George Neuner
On 3/26/2015 10:16 AM, Renaud wrote: Thanks a lot George, for this insightful reply. Your idea about FFI explaining 95% of the overhead looks good... but i wonder: in this case, shouldn't we also see a high cost in bind-prepared-statement alone? Hi Renaud, I'm not sure exactly what you are

Re: [racket-users] How to find most efficient constructs/instructions beside benchmarking?

2015-04-12 Thread George Neuner
On 4/12/2015 10:22 AM, Lux wrote: For future reference for who will read this topic: This announcement on sqlite mailinglist seems to at least partially prove my point for usefulness of "micro-optimization", something valuable to research from my point of view. """50% faster than 3.7.17""" "

Re: [racket-users] How to find most efficient constructs/instructions beside benchmarking?

2015-04-13 Thread George Neuner
Hi Josh, On 4/13/2015 5:37 AM, Josh Grams wrote: On 2015-04-13 12:29AM, George Neuner wrote: > Somebody doesn't understand fractions: the numbers show a 33% > improvement, not 50%. 3.7 is 50% slower, but 3.8 is only 33% faster. Are you sure? I thought that at first, but those numbe

Re: [racket-users] How to find most efficient constructs/instructions beside benchmarking?

2015-04-13 Thread George Neuner
On 4/6/2015 1:49 PM, Lux wrote: > You almost never have to worry about the efficiency of (second x) (cadr x) and (car (cdr x)). There are always bigger fish to fry than that. Sure enough, but what if this simple operation is repeated one billion times? Micro optimization is largely a waste of

Re: [racket-users] How to find most efficient constructs/instructions beside benchmarking?

2015-04-13 Thread George Neuner
On 4/13/2015 5:16 PM, Josh Grams wrote: That is helpful, but my basic objection still stands: you're computing with *times* while the claim in the article was about *speeds*, I think. He says "50% more work using the same amount of CPU cycles", which I read as work/time. So you need to take the

Re: [racket-users] How to find most efficient constructs/instructions beside benchmarking?

2015-04-14 Thread George Neuner
Hi Sean, On 4/14/2015 3:21 PM, Sean Kanaley wrote: I see you also made the same point about English! But I don't get the units. As far as I see it, the algorithm is doing X effective computation per cycle. A faster algorithm is computing more each cycle, And that's where we depart. A more

[racket-users] web server: database result paging

2015-04-18 Thread George Neuner
Hi all, I have an web server application in which I need to page results of a database query, but I also have to guarantee *exactly-once* statistical processing of each sent result row regardless of how many times it may be sent. Theresults are from a complex join, howeverthe join is separab

Re: [racket-users] web server: database result paging

2015-04-18 Thread George Neuner
l be freed. The default policy is discussed here: http://docs.racket-lang.org/web-server/servlet.html#%28def._%28%28lib._web-server%2Fmanagers%2Flru..rkt%29._make-threshold-.L.R.U-manager%29%29 Jay On Sat, Apr 18, 2015 at 12:34 PM, George Neuner wrote: > Hi all, > > I have an web ser

Re: [racket-users] web server: database result paging

2015-04-18 Thread George Neuner
Hi Jay, Thanks. One more question: is there a way to determine the size of the continuation cache so as to write a useful (should I) collect? function for create-LRU-manager?What statistic is the threshold-LRU-manager checking? George On 4/18/2015 4:28 PM, Jay McCarthy wrote: Unless y

Re: [racket-users] web server: database result paging

2015-04-18 Thread George Neuner
On 4/18/2015 5:09 PM, Jay McCarthy wrote: I think the code is pretty simple to read: https://github.com/racket/web-server/blob/master/web-server-lib/web-server/managers/lru.rkt#L42 :-)I just wouldn't know where to look for it. I don't have the Racket source generally available. Thanks

Re: [racket-users] web server: database result paging

2015-04-18 Thread George Neuner
On 4/18/2015 5:09 PM, Jay McCarthy wrote: It is conceivable to grab the servlet's custodian and look at just the cost of the servlet, but unless there are many servlets, that will basically be the same value. Does that work if there is just one instance of serve/servlet with a big dispatch-rul

Re: [racket-users] web server: database result paging

2015-04-20 Thread George Neuner
Hi David, On 4/19/2015 9:51 AM, David Vanderson wrote: On 04/18/2015 12:34 PM, George Neuner wrote: However, to do this, I have to keep the initial id listacross multiple requestsand thatis where I've run into trouble. Thus far, I haven't had to use web server continuations. It

[racket-users] http-sendrecv with Google geocode

2015-04-20 Thread George Neuner
Hi all, I'm having trouble accessing the Google geocode API using http-sendrecv. Code is: (define (lookup address) (let [ (form-data (alist->form-urlencoded (list (cons 'address address) ))) (response #f) (lat #f)

Re: [racket-users] http-sendrecv with Google geocode

2015-04-20 Thread George Neuner
#"1.1". #:method #"GET" vs #"POST". Everything produces the same error. But perversely the result of (string-append "http://maps.googleapis.com/maps/api/geocode/json?"; <http://maps.googleapis.com/maps/api/geocode/json> form-data) works if I pa

Re: [racket-users] http-sendrecv with Google geocode

2015-04-21 Thread George Neuner
Hi Sean, Even weirder when I tried this morning your string-append solution - which I had left in place - worked immediately with no changes from last night. The only thing different is I had closed DrRacket before going to bed and reopened it this morning. Maybe something was wonky in

Re: [racket-users] web server: database result paging

2015-04-22 Thread George Neuner
On 4/22/2015 8:12 PM, David Vanderson wrote: On 04/20/2015 05:54 AM, George Neuner wrote: I know I need a different response function. The question was whether embed/url is tied to HTML or can be used in a different context. The documentation (6.1.1) says: "When used inside

Re: [racket-users] web server: database result paging

2015-04-24 Thread George Neuner
On 4/23/2015 1:45 PM, Jay McCarthy wrote: On Thu, Apr 23, 2015 at 1:35 PM, David Vanderson wrote: > Jay - is there any connection between a saved continuation and the thread > that created it? The values of the parameters are saved in the continuation and inherited from the thread. That's go

Re: [racket-users] web server: database result paging

2015-04-24 Thread George Neuner
Hi David, On 4/23/2015 1:35 PM, David Vanderson wrote: What I want to do is: create a hash representing the return object - data to return - URL for next page function (if applicable) - URL for prev page function (if applicable) convert the hash to a jsexpr

Re: [racket-users] web server: database result paging

2015-04-24 Thread George Neuner
Hi Jay, On 4/24/2015 7:03 AM, Jay McCarthy wrote: On Fri, Apr 24, 2015 at 6:31 AM, George Neuner wrote: > On 4/23/2015 1:45 PM, Jay McCarthy wrote: > >> The values of the parameters are saved in the continuation and >> inherited from the thread. > > > That'

Re: [racket-users] web server: database result paging

2015-04-24 Thread George Neuner
On 4/24/2015 7:36 AM, Jay McCarthy wrote: My point is that ONLY the result of make-parameter and parameterize is saved from the thread. In Racket a "parameter" has nothing to do with a function "argument". I believe you are confused by the two when you say "There are 9 arguments...". If you follo

Re: [racket-users] web server: database result paging

2015-04-24 Thread George Neuner
On 4/24/2015 1:29 PM, David Vanderson wrote: It sounds like you are not happy with the continuation model. No. I am just trying to understand how it works and to figure out whether I can work with it. The documentation sometimes is not clear and getting enough information sometimes is like

Re: [racket-users] Strange behaviour of the eq? operator in racket repl

2015-05-17 Thread George Neuner
Hi, On 5/17/2015 5:32 PM, Atticus wrote: --- $ racket Welcome to Racket v6.1.1. > (eq? 'l 'l) #f > (eq? 'l 'l) #t > $ racket --no-jit Welcome to Racket v6.1.1. > (eq? 'l 'l) #f > (eq? 'l 'l) #t > (eq? 'l 'l) #f > (eq? 'l 'l) #t > (eq? 'l 'l) #t > (eq? 'l 'l) #t > (eq? 'l

[racket-users] Re: Keep getting call-with-file-lock/timeout

2015-05-28 Thread George Neuner
On Wed, 27 May 2015 08:34:11 -0700 (PDT), N N wrote: >I've been trying to set up Racket for evaluation purposes and due to being on >CentOS with no root privileges, I've chosen the Racket minimal distribution. > >I was able to compile it from source and run it and wanted to manually install >xr

Re: [racket-users] Keep getting call-with-file-lock/timeout

2015-05-29 Thread George Neuner
Hi John, On 5/29/2015 12:44 PM, 'John Clements' via Racket Users wrote: > On May 28, 2015, at 1:53 PM, George Neuner wrote: > I did see the message from John Clements. I'm not a Racket developer, > but superficially it appears to me that the negative delay value

[racket-users] db: nested transactions

2015-06-22 Thread George Neuner
Hi all, I have what I hope is a quick question. WIth appropriate care to pair start and commit/rollback, is it safe to use call-with-transaction and start-transaction together? e.g., (call-with-transaction dbc (lambda () : (start-transaction dbc #:isolation 'serializab

Re: [racket-users] db: nested transactions

2015-06-24 Thread George Neuner
Hi Ryan, On 6/23/2015 12:20 PM, Ryan Culpepper wrote: Yes, that should be fine. One note about your sample code: the isolation mode of inner transactions must be #f (the default); you can't change isolation levels once you've started an outer transaction. Also keep in mind that nested transact

Re: [racket-users] db: nested transactions

2015-06-24 Thread George Neuner
[ Email says sending to the group failed. Apologies if this appears multiple times. ] Hi Ryan, On 6/24/2015 10:06 AM, Ryan Culpepper wrote: On 06/24/2015 07:46 AM, George Neuner wrote: [He asks naively not having looked at the code:] Would it be hard to keep savepoint creation if

Re: [racket-users] generalised set! in Racket

2015-06-30 Thread George Neuner
On 6/30/2015 5:34 PM, 'John Clements' via Racket Users wrote: > On Jun 30, 2015, at 8:10 AM, Alexey Cherkaev wrote: > > ... wouldn't it be beneficial to have such a generalised 'set!' system-wide? I understand that Racket focusses more on immutable structures, but there are still vectors and

Re: [racket-users] set a timeout to tcp-connect

2015-07-17 Thread George Neuner
On 7/17/2015 10:16 AM, Matthias Felleisen wrote: On Jul 17, 2015, at 9:31 AM, mazert wrote: > #lang racket > > (define (foo) > (let* ([a (thread (λ () > (let-values ([(p-in p-out) (tcp-connect "google.com" 80)]) > (kill-thread b] > [b (thread (λ () > (sleep 2) > (printf "I'll kill you !")

[racket-users] db: postgresql current_date -> timestamptz

2015-07-20 Thread George Neuner
Hi all, I'm found something strange with Racket 6.1.1 and Postgresql (9.3.6): SQL that works differently in a Racket query than in the DB console. I have a table defined as create table blah ( a char(15), b char(15), created timestamp with time zone, expires

Re: [racket-users] db: postgresql current_date -> timestamptz

2015-07-20 Thread George Neuner
On 7/20/2015 6:08 PM, Jay Kominek wrote: You might be ending up with different timezones set on the different connections, as libpq clients can automatically set/change some session settings that the racket library does not. I'd try running "show timezone" via both connections, and see what you e

[racket-users] Re: Garbage Collection of Places

2015-08-18 Thread George Neuner
On Mon, 17 Aug 2015 10:07:11 -0600, Matthew Flatt wrote: >The problem is in the clean-up of OS-level locks. A lock is allocated >using a combination of malloc() and pthread_mutex_init(), for example. >The clean up was usually missing the free() to go along with >pthread_mutex_destroy(). > >That's

[racket-users] Re: Garbage Collection of Places

2015-08-19 Thread George Neuner
On Tue, 18 Aug 2015 14:42:03 +, Sam Tobin-Hochstadt wrote: >You can see the patch here: >https://github.com/plt/racket/commit/641c56b6e95b57881b6fef846fb758ed5cd6e5a8 > >Sam On Tue, 18 Aug 2015 12:08:17 -0600, Matthew Flatt wrote: >At Tue, 18 Aug 2015 10:40:14 -0400, Geor

[racket-users] problems with sql-timestamp and date*

2015-08-22 Thread George Neuner
Hi all, Got a wierd problem handling dates. I am retrieving a UTC timestamp from a Postgresql (9.3.9) database, converting it to a date* and then offsetting to a (variable) time zone. eliding a lot of unrelated code: : (require (only-in srfi/19 date->string)

Re: [racket-users] problems with sql-timestamp and date*

2015-08-22 Thread George Neuner
Ok, reading the docs more carefully, I realized that *seconds->date* takes a boolean and not a time zone offset, but that doesn't explain why *sql-timestamp->srfi-date* is not working properly. I'm now offsetting the time with (seconds->date (+ (date*->seconds ts #f) (* timezone

Re: [racket-users] problems with sql-timestamp and date*

2015-08-22 Thread George Neuner
A little more experimenting shows that changing *date*->seconds* to *date->seconds* (no asterisk) in (seconds->date (+ (date*->seconds ts #f) (* timezone 60 60)) #f)) guarantees the time offset always is correct wrt the original UTC time. So it seems that *(seconds->

Re: [racket-users] problems with sql-timestamp and date*

2015-08-22 Thread George Neuner
On 8/22/2015 4:02 PM, Jon Zeppieri wrote: Where exactly do you see sql-timestamp->srfi-date failing? In your examples, what I'm seeing is incorrect translation from UTC to UTC-4, but I don't see where the translation from sql-timestamp to date* is going wrong. Could you point to exactly where you

Re: [racket-users] problems with sql-timestamp and date*

2015-08-22 Thread George Neuner
On 8/22/2015 5:50 PM, Jon Zeppieri wrote: On Sat, Aug 22, 2015 at 4:36 PM, George Neuner wrote: > > The latter code using date works properly (modulo the time zone field) and > gives consistent results, but the former using date* gives inconsistent > results. > > E.g.,:

Re: [racket-users] web-server: generating HTML with styles

2015-08-24 Thread George Neuner
Hi John, On 8/24/2015 4:31 PM, John Clements wrote: > On Aug 24, 2015, at 12:35 PM, George Neuner wrote: > > I'm trying to generate some very simple web pages - basically success/failure status for URLs followed from an email. However, I can't seem to figure out how to a

Re: [racket-users] web-server: generating HTML with styles

2015-08-24 Thread George Neuner
On 8/24/2015 4:49 PM, Jay McCarthy wrote: And if you want to add style attributes on a single element, like the p: Yo! Then write `(html (body (p ([style "color: puce;"]) "Yo!"))) Thanks Jay! That's exactly what I needed. George -- You received this message because you are subscribed to t

Re: [racket-users] web-server: generating HTML with styles

2015-08-24 Thread George Neuner
Hi Matthew, Jay beat you to the answer 8-) [though the list apparently bounced my reply to him] I do appreciate your detailed explanation. I knew that I did not need the html module to use response/xexpr in the web-server, but I was looking for some syntax to add styling to the content

[racket-users] Re: Racket poster

2015-09-20 Thread George Neuner
>> http://www.eecs.northwestern.edu/~robby/logos/ On Sun, 20 Sep 2015 18:52:25 -0400, Neil Van Dyke wrote: > >I have a similar aversion to the Grateful Dead iconography: connotations >of substance abuse, intellectual impairment, countercultural friction, >societal detachment... :) What abou

Re: [racket-users] fail on http server response not actually a failure?

2015-10-05 Thread George Neuner
On 10/5/2015 4:40 PM, Paolo Giarrusso wrote: On Monday, October 5, 2015 at 10:21:38 PM UTC+2, Neil Van Dyke wrote: > 'John Clements' via Racket Users wrote on 10/05/2015 03:26 PM: > > is this what I would expect to see if a client just gave up and closed the TCP connection before the response

Re: [racket-users] fail on http server response not actually a failure?

2015-10-05 Thread George Neuner
On 10/5/2015 11:24 PM, Paolo Giarrusso wrote: It sounded confusing that you could close a connection "too early" after all data was sent. But it makes some sense for AJAX with some sort of persistent connections. Still, no reason for error output to appear — a server has to deal with this, as it

Re: [racket-users] fail on http server response not actually a failure?

2015-10-06 Thread George Neuner
On 10/6/2015 9:25 AM, Tony Garnock-Jones wrote: On 10/06/2015 12:43 AM, George Neuner wrote: > I don't know where to put an error handler to deal with reset conditions > at the end of a request. Maybe Jay has an idea? It feels like exceptions are something that response/full, res

Re: [racket-users] fail on http server response not actually a failure?

2015-10-06 Thread George Neuner
On 10/6/2015 9:58 AM, Jay McCarthy wrote: I'm not sure if this answers the question... These errors are coming from the Web server response-outputing code failing when the other side closed the connection early. The exception would not be returned to your code, because your code is a function fr

Re: [racket-users] fail on http server response not actually a failure?

2015-10-06 Thread George Neuner
On 10/6/2015 5:43 PM, Tony Garnock-Jones wrote: On 10/06/2015 03:12 PM, George Neuner wrote: > My (maybe wrong) understanding is that the response/* functions only > package the response data for the send/* functions to transmit. They construct a `response` struct which includes an `

[racket-users] Re: Formatting Function

2015-10-12 Thread George Neuner
On Mon, 12 Oct 2015 12:28:56 -0400, Deren Dohoda wrote: >Probably racket/format is what you need to look at. >http://docs.racket-lang.org/reference/strings.html#%28mod-path._racket%2Fformat%29 Or SRFI 48: http://docs.racket-lang.org/srfi/srfi-std/srfi-48.html racket/format is more capable, b

  1   2   3   4   5   6   >