[racket-users] Re: lambda and the equivalent define / "defun"

2016-09-06 Thread George Neuner
On Sun, 4 Sep 2016 10:36:21 -0700 (PDT), Sanjeev Sharma wrote: >two "x" 's also work > >(define list (lambda x x)) (lambda x x x) works because the evaluation of the middle x is a side effect which is ignored. It still will work if you change it to, e.g., (lambda x 'q x) or (lambda x 42 x) ...

[racket-users] Re: Sending a file via HTML request.

2016-08-26 Thread George Neuner
On Tue, 23 Aug 2016 02:09:24 -0700 (PDT), Normal Loone wrote: >Yeah, my main problem is how do I pack the file into a JSON Object >and then send it? Just FYI: JSON is a printable coding, so any non-printable characters in a binary file must be escaped - making the transfer larger. The read-json

Re: [racket-users] Re: Sending a file via HTML request.

2016-08-24 Thread George Neuner
I posted to this thread yesterday through Gmane, but I see it hasn't yet appeared. Posting through Gmane has been flaky lately - I'm sending this updated version via email.Not sure what's happening with Gmane. Apologies if you see things multiple times. George

Re: [racket-users] racket/db, creating queries from fetched values

2016-08-17 Thread George Neuner
On 8/16/2016 3:57 PM, Kristjan Siimson wrote: Basically when I said "query" I meant the SQL-language strings, which can be copy-pasted and executed independently. Some utilities (Percona tools) call it "dry run"; the queries are printed as strings for end user verification, and they never reac

Re: [racket-users] racket/db, creating queries from fetched values

2016-08-16 Thread George Neuner
On 8/16/2016 12:33 PM, Kristjan Siimson wrote: Ah, yes. I should of have clarified that I'm trying to build queries, but I don't want them to be executed. I guess, alternatively, I could solve it by creating a blackhole database and viewing the executed queries from the general log. If Im go

Re: [racket-users] racket/db, creating queries from fetched values

2016-08-16 Thread George Neuner
On 8/16/2016 10:04 AM, ksiimson wrote: Hi! I'm a new user of Racket and I am trying to make a simple application which interfaces a MySQL database. Fetching the data is quite straightforward, but I am having trouble coming up with a reasonable way to insert the data back into database. Basica

Re: [racket-users] Live Racked IDE code participating in live web service?

2016-08-09 Thread George Neuner
On 8/9/2016 3:13 AM, Guyren Howe wrote: Is there any way to separate the running Racket code from the IDE that is authoring it? What I'd like is something like a Smalltalk image, that packages code and state, but it runs whether or not I'm connected to it; when I'm connected, I can edit, debu

[racket-users] Re: Error message from GUI

2016-08-02 Thread George Neuner
Just following this conversation. On Fri, 29 Jul 2016 08:25:35 -0600, Matthew Flatt wrote: >It may be that a guard against a 0-sized drawing dimension is needed. >The right place for the guard might be in the `get-cr` method of > > gui-lib/mred/private/wx/common/backing-dc.rkt > >after `get-bac

Re: [racket-users] error when intalling racket 6.5 in solaris (a sparc machine)

2016-06-29 Thread George Neuner
On 6/29/2016 6:00 PM, hpwe...@gmail.com wrote: I downloaded racket 6.5 sources to a Sun's Sparc machine running Solaris (SunOS 5.11) gcc version = 4.8.1 in the build directory, I did these two steps: ../configure --prefix=/a/path --enable-shared make --> It exited with the following error mess

[racket-users] Re: WurstfagottCon

2016-06-23 Thread George Neuner
On Wed, 22 Jun 2016 15:32:14 -0400, "'John Clements' via Racket Users" wrote: >Can we rename our conference to WurstfagottCon? Cute! I have no doubt that there would be hoardes of ignoramuses making accusations of prejudice and/or insensitivity without having a clue as to the meaning (or pronu

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-09 Thread George Neuner
On 6/8/2016 10:26 PM, David Christiansen wrote: What I mean is that I'm using draw-pict to cause the contents of a pict to be drawn on a dc<%> that I get from a bitmap%. The bitmap is initialized empty and transparent, and then the pict is drawn to it. I can tell which pixels are affected by the

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-07 Thread George Neuner
On 6/7/2016 3:40 PM, David Christiansen wrote: > Understood. Is it possible to define a region to represent the > clickable areas? This is the way I would do it if possible. > > I haven't done much GUI programming in Racket, so I don't know exactly > what it can do, but in, e.g., Windows GDI y

Re: [racket-users] smtp-send-message to gmail

2016-06-07 Thread George Neuner
On 6/7/2016 5:18 AM, Лера Гранкина wrote: I'm trying to send message using the code below, but I always get error "No reply from computer". (require net/smtp net/dns openssl/mzssl net/head) (smtp-send-message (dns-get-address "192.168.5.254" "smtp.gmail.com") "m...@gmail.com" '("m...@g

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-06 Thread George Neuner
On 6/6/2016 8:36 PM, David Christiansen wrote: > That seems overly complicated. Can you not just compare the mouse's > coordinates to the picture's location in the canvas? I don't have a good way to know where the picture itself is - only its bounding box. So if the picture consists of a doughn

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-06 Thread George Neuner
On 6/6/2016 4:45 PM, David Raymond Christiansen wrote: I'm looking for a way to check whether a mouse pointer is on top of a particular pict that has been drawn to a canvas%. Right now, the best I've been able to do is to render the pict to two off-screen bitmaps with different background col

[racket-users] Re: I can't open my previous file

2016-06-06 Thread George Neuner
On Mon, 6 Jun 2016 13:34:41 +0100, Laurent wrote: >Ah, so you meant MrEd Designer (MED) then, I wasn't sure :) >(mred was the previous GUI lib, part of DrScheme, whereas MED is an >external package) Sorry for the confusion - I wasn't aware that the design editor went by a different acronym. I a

Re: [racket-users] I can't open my previous file

2016-06-06 Thread George Neuner
I just realized that you are the author (or at least maintainer) of MrEd-Designer ... so you would know if that file was created by it. :-) George -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiv

Re: [racket-users] I can't open my previous file

2016-06-06 Thread George Neuner
On Mon, Jun 6, 2016 at 9:00 AM, George Neuner <mailto:gneun...@comcast.net>> wrote: On 6/6/2016 3:27 AM, 张可星 wrote: I don't have MrEd installed, too.I think it is vim Did you have MrEd installed previously in another version of Racket? I think you

Re: [racket-users] I can't open my previous file

2016-06-06 Thread George Neuner
On 6/6/2016 3:27 AM, 张可星 wrote: I don't have MrEd installed, too.I think it is vim Did you have MrEd installed previously in another version of Racket? I think you mentioned that this was an old file you were trying to open. Your file is in a custom format defined by (lib"read.ss""wxme").

Re: [racket-users] I can't open my previous file

2016-06-06 Thread George Neuner
On 6/6/2016 2:51 AM, 张可星 wrote: 在 2016年6月6日星期一 UTC+8下午2:45:34,gneuner2写道: > On 6/6/2016 2:32 AM, 张可星 wrote: > > > Open the file with a text editor and insert a blank line at the > > > beginning. Then DrRacket will open it. I haven't seen this particular > > > issue previously, but obviously DrR

Re: [racket-users] I can't open my previous file

2016-06-05 Thread George Neuner
On 6/6/2016 2:32 AM, 张可星 wrote: > Open the file with a text editor and insert a blank line at the > beginning. Then DrRacket will open it. I haven't seen this particular > issue previously, but obviously DrRacket is failing to parse the first line. > > George obviously DrRacket is failing to

Re: [racket-users] I can't open my previous file

2016-06-05 Thread George Neuner
On 6/6/2016 2:05 AM, 张可星 wrote: 在 2016年6月6日星期一 UTC+8下午1:44:39,gneuner2写道: > On 6/5/2016 11:18 PM, 张可星 wrote: > > When I open my file ,Dr racket told me as below > > > > `在读取/home/richard/桌面/TheGame.rkt时出现错误. > > insert-file in text%: error loading the file (read-from-file-failed)` > > > > all my

Re: [racket-users] I can't open my previous file

2016-06-05 Thread George Neuner
On 6/5/2016 11:18 PM, 张可星 wrote: When I open my file ,Dr racket told me as below `在读取/home/richard/桌面/TheGame.rkt时出现错误. insert-file in text%: error loading the file (read-from-file-failed)` all my code are lost ,what can I do now? I use Drracket 6.5 on ubuntu 16.04lts I find the same issue her

[racket-users] Re: Cloud not launch DrRacket

2016-05-13 Thread George Neuner
On Thu, 12 May 2016 18:20:04 -0700 (PDT), James Brown wrote: >If click on the icon of DrRacket, nothing happens. If I type "drracket" in >Terminal, i get the following messages, then it stays like that. > >Version 6.5-1 You may have the wrong version of GTK, or you many need to set the environm

[racket-users] Re: Racket v6.5

2016-05-03 Thread George Neuner
On Thu, 28 Apr 2016 15:57:28 -0400, Ryan Culpepper wrote: >Racket version 6.5 is now available from > > http://racket-lang.org/ > Thanks to whoever created the generic Linux install. AFAICT it runs fine on CentOS 6.7 (command line). Saved me the minor inconvenience of building from source.

[racket-users] Re: What do you use macros for?

2016-04-12 Thread George Neuner
On Wed, 13 Apr 2016 06:45:01 +1000, Daniel Prager wrote: >Thanks George > >Of interest to me is that you eschew the use of syntax-parse / -case / >-rules in favour of a straight syntax->datum -> straight racket -> >datum->syntax solution. I suppose this approach trades away hygiene and >error-che

Re: [racket-users] Re: What do you use macros for?

2016-04-12 Thread George Neuner
Hi Dan, On 4/11/2016 6:51 PM, Daniel Prager wrote: On Apr 12, 2016 7:53 AM, "George Neuner" wrote: > > My most common uses are to handle database connections and > to embed free form SQL into Racket code. Care to post one of your examples, with a bit of commentary? O

[racket-users] Re: What do you use macros for?

2016-04-11 Thread George Neuner
On Mon, 11 Apr 2016 10:25:46 -0400, Matthias Felleisen wrote: >These days I define little macros inside of loops or methods all the time. Same here. My most common uses are to handle database connections and to embed free form SQL into Racket code. George -- You received this message becau

[racket-users] Re: What do you use macros for?

2016-04-08 Thread George Neuner
On Fri, 8 Apr 2016 15:49:32 +0200, Jerzy Karczmarczuk wrote: >Le 08/04/2016 15:40, George Neuner a écrit : > >> Macros (at least Lisp and Scheme style macros) can change the nature >> of the eventual runtime evaluation. > >What do you mean by the 'nature' o

[racket-users] Re: What do you use macros for?

2016-04-08 Thread George Neuner
On Fri, 08 Apr 2016 12:10:39 +0100, "Norman Gray" wrote: >Quoting Asumu quoting Matthias: > >>> I'd like to propose that there are three disciplined uses of macros: >>> >>> 1. data sublanguages: I can write simple looking expressions and >>> [...] >>> >>> 2. binding constructs: I can introduce

Re: [racket-users] racket not W^X?

2016-04-05 Thread George Neuner
On 4/5/2016 10:01 AM, George Neuner wrote: However, W^X isn't panacea - overrun attacks against the CPU still can result in remote code execution. Of course, that should have been "against the CPU *stack*". George -- You received this message because you are subscribed to th

Re: [racket-users] racket not W^X?

2016-04-05 Thread George Neuner
On 4/5/2016 9:50 AM, Matthew Flatt wrote: Pro tip for pirates: jump to scheme_eval(). Would that be possible if Racket implemented W^X? George -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving

Re: [racket-users] racket not W^X?

2016-04-05 Thread George Neuner
On 4/5/2016 9:32 AM, Philippe Meunier wrote: Suppose instead the racket web server uses W^X: it has a writable-not-executable page somewhere, the JIT writes code into that page, then uses the mprotect system call to flip the page's permissions from writable-not-executable to executable-not-writ

Re: [racket-users] racket not W^X?

2016-04-04 Thread George Neuner
On 4/4/2016 4:57 PM, 'John Clements' via users-redirect wrote: FWIW, it appears that the restriction here is much simpler; specifically, pages can’t be writable and executable *simultaneously.* Moreover, a comment by Matthew on the github bug suggests that this might … have a relatively straigh

Re: [racket-users] Re: Racket internal error when trying to create an executable

2016-04-01 Thread George Neuner
Hi Alex, On 4/1/2016 2:17 AM, Alex Harsanyi wrote: Hi George, The option to create an executable from DrRacket worked fine for me in Racket 6.4 and several prior versions. However, this particular problem also happens when I use `create-embedded-executable' (which ultimately raco exe uses),

[racket-users] Re: Racket internal error when trying to create an executable

2016-03-31 Thread George Neuner
On Thu, 31 Mar 2016 16:08:56 -0700 (PDT), Alex Harsanyi wrote: >Hi, > >I'm getting an error when trying to create an executable for a program that >uses the math/statistics module. The simplest example that reproduces the >issue is: > > #lang racket > (require math/statistics) > > (let* ([s

[racket-users] Re: IO in racket is painful

2016-03-23 Thread George Neuner
On Tue, 22 Mar 2016 21:06:14 -0700, Alexis King wrote: >Would anyone object to a scanf-like function in Racket itself? No. But the question is how to specify input patterns to make it really useful. Racket's native printf is pretty basic. Should scanf mirror the native printf? Or should i

Re: [racket-users] Setting return address in Racket's sendmail

2016-03-19 Thread George Neuner
On 3/16/2016 10:29 PM, Matthias Felleisen wrote: This has gotten me rejection replies: (smtp-send-message (dns-get-address (dns-find-nameserver) "smtp.gmail.com ") "matth...@ccs.neu.edu " actual-send-to-addresses addresses-put-

[racket-users] Re: How to shut down racket webserver without sudo kill?

2016-03-10 Thread George Neuner
On Thu, 10 Mar 2016 15:26:28 -0500, Marc Kaufmann wrote: >tl;dr : What is the 'best' way to start and stop a web server? Is there a >"racket-server die" or similar command which does not use 'kill'? > >Some background: > >I am finally deploying lists of spaghetti-code (aka my website) to a real >

[racket-users] Re: Web server tcp-read: error reading (errno=104), connection reset by peer

2016-03-01 Thread George Neuner
On Tue, 1 Mar 2016 09:45:03 -0500, Marc Kaufmann wrote: >I am running a live server now, rather than local, and it keeps logging >this error message: > >tcp-read: error reading > system error: Connection reset by peer; errno=104 > >I have no idea what this means other than finding out on StackOv

[racket-users] Re: long (16s) pauses in UI associated with OS X, possibly app nap?

2016-02-23 Thread George Neuner
On Tue, 23 Feb 2016 08:06:34 -0700, Matthew Flatt wrote: >At Mon, 22 Feb 2016 18:55:59 -0500, George Neuner wrote: >> If you suspect App Nap, have you tried disabling it for DrRacket? > >That's worth a try, but App Nap should be disabled automatically by the >`racket/gui

Re: [racket-users] long (16s) pauses in UI associated with OS X, possibly app nap?

2016-02-22 Thread George Neuner
On 2/22/2016 3:04 PM, 'John Clements' via Racket Users wrote: I have several students who are observing truly impressive UI delays in using DrRacket. Specifically, it often happens when they type a double-quote (“) with “automatic parentheses” enabled, and after typing the key, it will take mor

[racket-users] Re: (eqv? Racket-land Wonderland) -> #t

2016-02-16 Thread George Neuner
On Mon, 15 Feb 2016 02:40:28 -0800 (PST), Nota Poin wrote: >On Saturday, February 13, 2016 at 5:35:09 PM UTC, Saša Janiška wrote: >> So, at the end I just wonder how is it that such Wonderland is not >> discovered by much more people? > >Startup is slow. Intractable problem, JIT compiling just ta

[racket-users] Re: Racket Web Server Security Vulnerability

2016-02-08 Thread George Neuner
On Mon, 8 Feb 2016 11:16:03 -0500, Sam Tobin-Hochstadt wrote: >The vulnerability affects web servers that serve static files using >the `#:extra-static-files` option, including the default value of this >option. Um ... where is that keyword used? Or documented? I'm using 6.1.1 (yes, I know

[racket-users] Re: Expression-style printing and quotation: helpful or harmful?

2016-02-07 Thread George Neuner
On Sun, 7 Feb 2016 22:48:31 -0500, Jay McCarthy wrote: > Here's an idea... a programming language/library where >every question can answer in a few simple sentences with no need for >any long explanations, ever? I think that might already have been done. I vaguely remember something quite basi

[racket-users] Re: appending files

2016-01-29 Thread George Neuner
On Thu, 28 Jan 2016 20:32:08 -0800 (PST), Scotty C wrote: >> (current-memory-use) >yup, tried that a while back didn't like what i saw. check this out: > >> (current-memory-use) >581753864 >> (current-memory-use) >586242568 >> (current-memory-use) >591181736 >> (current-memory-use) >595527064 > >

[racket-users] Re: appending files

2016-01-29 Thread George Neuner
On Fri, 29 Jan 2016 16:45:40 -0800 (PST), Scotty C wrote: >i have a new issue. i wrote my data as char and end records with 'return. i >use (read-line x 'return) and the first record is 15 char. when i use > (read-line-bytes x 'return) i get 23 byte. i have to assume that my old >assumption tha

[racket-users] Re: appending files

2016-01-28 Thread George Neuner
On Thu, 28 Jan 2016 11:49:09 -0800 (PST), Scotty C wrote: >what's been bothering me was trying to get the data into 16 bytes in >a byte string of that length. i couldn't get that to work so gave up and >just shoved the data into 25 bytes. here's a bit of code. i think it's >faster than my bignum

[racket-users] Re: appending files

2016-01-28 Thread George Neuner
On Thu, 28 Jan 2016 07:56:05 -0800 (PST), Scotty C wrote: >you knew this was coming, right? put this into your data structure of choice: > >16 5 1 12 6 24 17 9 2 22 4 10 13 18 19 20 0 23 7 21 15 11 8 3 14 > >this is a particular 5x5 tile puzzle >(#6 in www.aaai.org/Papers/AAAI/1996/AAAI96-178.pd

[racket-users] Re: appending files

2016-01-28 Thread George Neuner
On Thu, 28 Jan 2016 07:56:05 -0800 (PST), Scotty C wrote: >> You claim you want filtering to be as fast as possible. If that were >> so, you would not pack multiple keys (or features thereof) into a >> bignum but rather would store the keys individually. > >chasing pointers? no, you're thinking

[racket-users] Re: appending files

2016-01-28 Thread George Neuner
On Wed, 27 Jan 2016 19:43:49 -0800 (PST), Scotty C wrote: >> Then you're not using the hash in a conventional manner ... else the >> filter entries would be unique > >using it conventionally? absolutely. it is a hash with separate chaining. You snipped the part I was responding to, which was:

[racket-users] Re: appending files

2016-01-27 Thread George Neuner
On Wed, 27 Jan 2016 11:17:04 -0800 (PST), Scotty C wrote: >On Wednesday, January 27, 2016 at 2:57:42 AM UTC-6, gneuner2 wrote: > >> What is this other field on which the file is sorted? >this field is the cost in operators to arrive at the key value Is it important to retain that sorting? Or is

Re: [racket-users] Re: appending files

2016-01-27 Thread George Neuner
On 1/27/2016 10:50 AM, Brandon Thomas wrote: On Wed, 2016-01-27 at 04:01 -0500, George Neuner wrote: > On Tue, 26 Jan 2016 23:00:01 -0500, Brandon Thomas > wrote: > > > Is there anything stopping you from restructuring > > the data on disk and using the hash directly fr

Re: [racket-users] Re: appending files

2016-01-27 Thread George Neuner
egroups.com on behalf of George Neuner Sent: Wednesday, January 27, 2016 4:28 AM To: racket-users@googlegroups.com Subject: Re: [racket-users] Re: appending files Sorry. I shouldn't do math at 4am. Ignore the numbers. However, it is still correct that the byte array will use less space th

Re: [racket-users] Re: appending files

2016-01-27 Thread George Neuner
Sorry. I shouldn't do math at 4am. Ignore the numbers. However, it is still correct that the byte array will use less space than an array of bignums. George On 1/27/2016 3:54 AM, George Neuner wrote: i run a custom built hash. i use separate chaining with a vector of bignums.

[racket-users] Re: appending files

2016-01-27 Thread George Neuner
On Tue, 26 Jan 2016 23:00:01 -0500, Brandon Thomas wrote: >Is there anything stopping you from restructuring >the data on disk and using the hash directly from there Scotty's hash table is much larger than he thinks it is and very likely is being paged to disk already. Deliberately implementing

[racket-users] Re: appending files

2016-01-27 Thread George Neuner
Hi Scotty, I rearranged your message a bit for (my own) clarity. On Tue, 26 Jan 2016 18:40:28 -0800 (PST), Scotty C wrote: >running 64 bit linux mint OS on a 2 core laptop with 2 gb of ram. >the generated keys are random but i use one of the associated >fields for sorting during the initia

Re: [racket-users] Re: appending files

2016-01-26 Thread George Neuner
On 1/26/2016 2:51 PM, Scotty C wrote: gneuner2 (george), you are over thinking this thing. my test data of 1 gb is but a small sample file. i can't even hash that small 1 gb at the time of data creation. the hashed data won't fit in ram. at the time i put the redundant data on the hard drive,

Re: [racket-users] appending files

2016-01-25 Thread George Neuner
On 1/26/2016 12:39 AM, Scotty C wrote: here's what i'm doing. i make a large, say 1 gb file with small records and there is some redundancy in the records. i will use a hash to identify duplicates by reading the file back in a record at a time but the file is too large to hash so i split it. t

[racket-users] Re: upload file with http post an Content-Type is multipart/form

2016-01-10 Thread George Neuner
On Sun, 10 Jan 2016 02:35:56 -0500, Neil Van Dyke wrote: >George Neuner wrote on 01/10/2016 02:22 AM: >> Why would they break anything? Section 5.1.1 of RFC-2046 says: > >By "boundary string" I meant what that RFC section calls "boundary >parameter value".

[racket-users] Re: upload file with http post an Content-Type is multipart/form

2016-01-09 Thread George Neuner
On Fri, 8 Jan 2016 21:32:19 -0500, Neil Van Dyke wrote: >Also, I would not put leading "-" characters in the part boundary >string, even if it doesn't break any servers you test against. I would >use only alphanumeric ASCII characters. Why would they break anything? Section 5.1.1 of RFC-20

[racket-users] Re: Racket in a web page (via Whalesong)

2016-01-03 Thread George Neuner
On Wed, 30 Dec 2015 12:33:17 -0800 (PST), Greg Trzeciak wrote: >I am actually more interested with long term viability of Whalesong >than being able to run it right now, hence my questions related to >bootstrapped version (and compiler + expander in Racket). My >current understanding is that out

[racket-users] Re: Typed Racket: Is (- 1 1) equivalent to (- 2 2)?

2015-12-10 Thread George Neuner
On Thu, 10 Dec 2015 12:35:34 -0500, Alex Knauth wrote: >In typed racket (- 1 1) and (- 2 2) are equal at runtime, but the type >checker doesn't necessarily know that at compile time. It knows that >(- 1 1) is zero because that's a special case in the type system. But it >doesn't have a special ca

Re: [racket-users] PSA: alexis/collection is dead, long live data/collection

2015-12-09 Thread George Neuner
On 12/9/2015 9:35 PM, brendan wrote: On Wednesday, December 9, 2015 at 6:22:54 PM UTC-5, gneuner2 wrote: > I *think* Brendan is referring to caching the dispatch path - i.e. once > you've determined the proper function to call for a set of arguments, > you cache the arguments (or their relevant c

Re: [racket-users] PSA: alexis/collection is dead, long live data/collection

2015-12-09 Thread George Neuner
On 12/9/2015 1:41 PM, Alexis King wrote: > On Dec 6, 2015, at 10:03 PM, George Neuner wrote: > > I would disagree that multiple dispatch isn't needed. The Visitor pattern is used fairly frequently in real programs and it is just a overly complex, error-prone way of doing d

Re: [racket-users] PSA: alexis/collection is dead, long live data/collection

2015-12-06 Thread George Neuner
On 12/6/2015 11:07 PM, Alexis King wrote: More generally, I’m not sure multiple dispatch is needed, though it can be a neat tool at times. I think part of the problem is that multiple dispatch is both hard to reason about and slow to implement in a dynamically-typed language. It’s unclear what

Re: [racket-users] Re: racket execution

2015-12-04 Thread George Neuner
On 12/4/2015 11:47 AM, Héctor Mc wrote: ... the project is in https://github.com/hmcab/anauj.git , and the server run from generacion-datos/codegen.rkt on the bottom the file. Read the readme file before the execution. At this time I have the application on amazon server to prove it, but every

Re: [racket-users] web-server dispatch and places

2015-12-02 Thread George Neuner
On 12/2/2015 7:47 AM, Jay McCarthy wrote: Hi George, The output port (and input port) that a response gets is the real port, meaning that it has a file-descriptor and can be shared across places. I suggest having one serve/servlet place that does the dispatching, forwards the port (perhaps us

Re: [racket-users] web-server dispatch and places

2015-12-01 Thread George Neuner
On 12/1/2015 9:51 PM, Robby Findler wrote: You probably thought of this, but could you hand the ports themselves over to the worker places after the dispatch but before any other processing happened? Or maybe just make each place run the entire server and then hand the ports over before dispatchi

[racket-users] web-server dispatch and places

2015-12-01 Thread George Neuner
Hi all, I'm not sure exactly how to phrase my questions, so let me give a bit of background. I have a fairly large (and growing) web middleware application that uses serve/servlet and currently exposes about 90 function URLs, all of the form "/api//". The application grew precipitously an

Re: [racket-users] DrRacket fights `racket` on print behavior in `#lang racket/base`

2015-11-27 Thread George Neuner
It's definitely due to printing the values. Notice that it also happens in DrRacket when "show sharing in values" is selected on the Choose Language dialog. I'm not aware of a way to prevent the reader from creating objects with shared structure. You can explicitly disallow use of the #0= sh

[racket-users] Re: racket users fight for their right to colon keywords

2015-11-21 Thread George Neuner
Coming late to this. On Wed, 14 Oct 2015 11:50:41 -0400, Neil Van Dyke wrote: >We are conducting a highly scientific poll. > >The question we want to answer is whether people would like for the >Racket standard languages to have symbols that begin with the colon >character (except for the sym

Re: [racket-users] Configuration Files

2015-11-18 Thread George Neuner
On 11/18/2015 5:19 PM, Christopher Walborn wrote: I'm looking for a way to read configuration files. The configuration file format can be anything provided it's easily human readable/writable. I found the ApacheConf solution on RosettaCode and may use that, but am wondering if there is a conf

[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

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 `

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 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-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-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

[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] 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

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 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] 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] 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
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
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

[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)

[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] 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

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] 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] 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 !")

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] 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] 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

[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] 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] 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] 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

<    1   2   3   4   5   6   >