[racket] Engineering Tradeoffs of ANF transforms and the Stateless Server

2011-12-27 Thread Galler
I'm nearing completion of a web application with stateful server continuations, and am thinking about future scalability. If we limit the discussion to the specific problem of retention of server-side continuations in gc'd memory (and not to whether server-side continuations are of value) I

Re: [racket] MysterX poll

2011-12-30 Thread Galler
Matthew, I use the MysterX COM layer of sections 2.1-2.2 for working with Microsoft's ADO library I have no intentions/ability to use the other sections I would be happy to share all my ADO related code if it would be of benefit. Racket Users list: http://lists.r

Re: [racket] Engineering Tradeoffs of ANF transforms and the Stateless Server

2011-12-30 Thread Galler
Jay, ->dynamic-wind issue -- The short answer is the code I'm working on is an implementation of Harel's hierarchical state machine formalism. I hesitate to provide a long answer as I fear it would be an imposition on your time and goodwill. Though I'm happy to provid

Re: [racket] Engineering Tradeoffs of ANF transforms and the Stateless Server

2011-12-30 Thread Galler
FYI, C-level implementation appears to be in src\fun.c, line 7722 as *scheme_dynamic_wind Jay, ->dynamic-wind issue -- The short answer is the code I'm working on is an implementation of Harel's hierarchical state machine formalism. I hesitate to provide a long ans

Re: [racket] Engineering Tradeoffs of ANF transforms and the Stateless Server

2011-12-30 Thread Galler
Jay, Thanks very much for the answer. My current thinking is that the dynamic-wind described on page 17 of Friedman's Constraining Control may provide enough of dynamic-wind's functionality for my needs. It doesn't appear to have any of the forbidden constructs* of the web-server language. and

Re: [racket] Engineering Tradeoffs of ANF transforms and the Stateless Server

2011-12-31 Thread Galler
Shiri, While AJAX and client-side continuations enable significant client-side computational complexity, I think they complement vs. eliminate the need for server-side complexity. I'm in pursuit of both (1) server complexity and (2) server-side statelessness I could achieve (1) by giving

Re: [racket] Engineering Tradeoffs of ANF transforms and the Stateless Server

2011-12-31 Thread Galler
Sorry, should have included a brief example. Here's an example of what I've implemented, which is just Harel's hierarchical state machines You can create a Hierarchical State Machine by defining individual nodes in a flat file, as below. each node has 6 keyword parameters , state, parent, e

Re: [racket] Engineering Tradeoffs of ANF transforms and the Stateless Server

2011-12-31 Thread Galler
know if that is too opaque ...) Robby On Sat, Dec 31, 2011 at 7:56 PM, Galler wrote: Sorry, should have included a brief example. Here's an example of what I've implemented, which is just Harel's hierarchical state machines You can create a Hierarchical State Machine by def

Re: [racket] Engineering Tradeoffs of ANF transforms and the Stateless Server

2011-12-31 Thread Galler
ful to sort out some of the subtleties: http://www.cs.utah.edu/plt/delim-cont/ hth, Robby On Sat, Dec 31, 2011 at 8:18 PM, Galler wrote: Robby, Thanks Not at all opaque. I was experimenting with that earlier this afternoon, as below. Actuallly, the way you phrased it helps clarify someth

Re: [racket] Engineering Tradeoffs of ANF transforms and the Stateless Server

2011-12-31 Thread Galler
u may need to use some kind of unique values in the marks to be able to tell if the shared tails _really_ are shared or if they simply have the same structure. You might find this paper useful to sort out some of the subtleties: http://www.cs.utah.edu/plt/delim-cont/ hth, Robby On Sat, Dec 3

Re: [racket] Engineering Tradeoffs of ANF transforms and the Stateless Server

2012-01-03 Thread Galler
On the subject of porting #lang racket to #lang web-server code I provide a few lessons learned for the archives for the next person to attempt this. 1) Bindings, Serializability , and anonymous functions 1A) the predicate serializable? from racket/serializable is invaluable #lang web-se

[racket] Redirecting inbound HTTP-schemed urls to HTTPS-schemed urls in #lang web-server with SSL

2012-04-19 Thread Galler
When using stateless web servlets in #lang webserver with serve/servlet: Q: Is there a method for identifying the uri-scheme of the inbound request and redirecting HTTP schemed uris to HTTPS scheme for SSL? Issue 1) Examining the (url-scheme (request-uri request)) of the request start pas

[racket] Stateless Web Server: Generating a response on a stuffer error

2012-04-23 Thread Galler
Description: the stateless webserver allows a user to generate a stuffer to manipulate the encoding of the ANF sent to the client in the URL For example (stuffer-chain serialize-stuffer (stuffer-compose base64-stuffer (HMAC-SHA1-stuffer #"mysupersecretkey"))) will prepend a digest to the b

[racket] Example of using OpenSSL instead of mzcrypto

2012-04-24 Thread Galler
Neil V. mentioned his preference for directly calling the OpenSSL libraries vs. using mzcrypto (planet vyzo/crypto) I wanted to provide a small example using this technique for generating and retrieving a 1024 bit unencrypted private key in PEM format. (define res (process "openssl genrsa 10

Re: [racket] Example of using OpenSSL instead of mzcrypto

2012-04-24 Thread Galler
, Robby Findler wrote: One comment here: you really want to be sure that you close all three of the ports that process returns, or else you'll run into problems if you use this in a larger context. Robby On Tue, Apr 24, 2012 at 12:14 PM, Galler wrote: Neil V. mentioned his preferenc

Re: [racket] Stateless Web Server: Generating a response on a stuffer error

2012-04-24 Thread Galler
(body "Some other message" allows you to inspect the exception and return a different thing. (The push will happen shortly.) Jay On Mon, Apr 23, 2012 at 3:35 PM, Galler wrote: Description: the stateless webserver allows a user to generate a stuffer to manipulate the encoding

[racket] What about an Racket Artifacts thread?

2012-04-24 Thread Galler
Eli, Neil This thread raises an interesting point. An Artifact is herein defined as some piece of Racket code that does a useful piece of work. Some of the lesser lights in the community, (such as myself) will, over the course of a working day, come up with a useful Artifact or two. Three conc

Re: [racket] What about an Racket Artifacts thread?

2012-04-24 Thread Galler
Sam, I love it and added a few more. Thanks Zack On Tue, Apr 24, 2012 at 7:35 PM, Sam Tobin-Hochstadt wrote: On Tue, Apr 24, 2012 at 7:17 PM, Galler wrote: My Suggestion: Is there room, either on the blog, or in the user group, for a Racket Artifacts thread i.e. subj: How to call

Re: [racket] What about an Racket Artifacts thread?

2012-04-24 Thread Galler
Neil, Let me respond to your argument with a specific question. Below is some code that sets up fluid-like dynamic variable bindings using Jay's web-cells. I haven't put this code up on GitHub (or elsewhere) (define/contract (make-dyno-bindings ids) (-> (listof symbol?) (listof (cons/c symbo

Re: [racket] What about an Racket Artifacts thread?

2012-04-25 Thread Galler
Matthias Felleisen writes: > > I don't think Neil is questioning the need for sharing. I think he's arguing that we should organize the huge > wealth of sharing that already exists. > You're right. I was probably attacking a strawman argument. Sorry, Neil. The search and retrieval question i

[racket] New Artifacts

2012-04-27 Thread Galler
New Artifacts posted: Improved! Low-Fat! Exciting! https://github.com/plt/racket/wiki/Artifacts 1. Specifying a HMAC-SHA1 stuffer for the stateless web-server 2. Split a string into lines 3. Fetch the contents of a URL 4. Generate a n-byte key for use in MAC authentication (like HMAC-SHA1)

Re: [racket] idiomatic and fast

2012-04-28 Thread Galler
(build-list 22 (λ (x) (/ (* x (- x 1)) 2))) Discard the first two values from the list. R./ Zack Racket Users list: http://lists.racket-lang.org/users

Re: [racket] idiomatic and fast

2012-04-28 Thread Galler
;and without having to discard first two elements-> (build-list 21 (compose (λ (x) (/ (* x (+ x 1)) 2)) add1)) Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Constructors for sequences

2012-04-29 Thread Galler
> (sequence-constructor (list 1 2 3)) = list > (sequence-constructor (vector 1 2 3)) = vector > etc > > I'd like to use it for a declare-mappable macro that extends functions > of one argument > to map over sequences. As in (sin (list 1 2 3)) = (list (sin 1) (sin > 2) (sin 3)). > I think you a

Re: [racket] Constructors for sequences

2012-04-29 Thread Galler
ok. then it is a type problem, I was wrong. On Sun, Apr 29, 2012 at 3:56 PM, Jens Axel Søgaard wrote: 2012/4/29 Galler : (distribute sin list 1 2 3) (0.8414709848078965 0.9092974268256817 0.1411200080598672) This makes the constructor explicit. That's what I want to avoid. The pr

[racket] Behavior of continuation-mark-set->list and continuation-mark-set-first with respect to key values

2012-05-06 Thread Galler
BACKGROUND: Per the documentation: with-continuation-mark causes a key to be associated with a binding within a continuation frame continuation-mark-set->list returns the binding(s) associated with that particular key, for any given continuation-mark-set while continuation-mark-set-first

Re: [racket] Behavior of continuation-mark-set->list and continuation-mark-set-first with respect to key values

2012-05-06 Thread Galler
)) 'id1) '(1))) On Sun, May 6, 2012 at 8:10 PM, Galler wrote: Thanks Robby. I'm attempting to implement the behavior described in Section 3.2 of your 2007 paper, specifically "each continuation frame can have any number of marks with distinct keys" by de

Re: [racket] Behavior of continuation-mark-set->list and continuation-mark-set-first with respect to key values

2012-05-07 Thread Galler
at's why you see only one binding. continuation-mark-set-first can be more efficient than continuation-mark-set->list and it is more likely to work in futures. That's the only reason it exists. Robby On Sat, May 5, 2012 at 11:02 PM, Galler wrote: BACKGROUND: Per the document

Re: [racket] Behavior of continuation-mark-set-≥list and continuation-mark-set-first with respect to key values

2012-05-07 Thread Galler
> but continuation marks are carefully designed to avoid breaking tail > recursion (they let you understand the tail behavior of your program, > more accurately) so that's why you see only one binding. Robby, Yes. That is exactly what happened. On further inspection, I was using with-continuatio

[racket] Finite State Machines of Arbitrary Size using Racket's composable control

2012-05-15 Thread Galler
This code was generated in response to the user who sought to implement run-length encoding of a bit-vector on Sunday night. I didn't post this to the board b/c there's a much easier way to solve problem using regular expressions, which Eli B. demonstrated. But, the (infinite-k-pump) function st

Re: [racket] Finite State Machines of Arbitrary Size using Racket's composable control

2012-05-21 Thread Galler
ijn wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Zack, On 15-05-12 18:56, Galler wrote: This code was generated in response to the user who sought to implement run-length encoding of a bit-vector on Sunday night. I didn't post this to the board b/c there's a much easier w

Re: [racket] Finite State Machines of Arbitrary Size using Racket's composable control

2012-05-24 Thread Galler
lers 3) moving to the next signal in the signal stream 4) transitioning between states Let me sit down tonight and figure out if those are possible purely with functional composition. R./ Zack On Thu, May 24, 2012 at 11:59 AM, Eli Barzilay wrote: More than a week ago, Galler wrote:

Re: [racket] Finite State Machines of Arbitrary Size using Racket's composable control

2012-05-24 Thread Galler
Y, that's closer to what I had in mind. On Thu, May 24, 2012 at 1:18 PM, Eli Barzilay wrote: Just now, Galler wrote: Eli, I fully agree with you that any FSM is equivalent to functional composition and can be implemented in the manner you show. However , in the way you've imple

Re: [racket] Finite State Machines of Arbitrary Size using Racket's composable control

2012-05-24 Thread Galler
ago, Galler wrote: Y, that's closer to what I had in mind. On Thu, May 24, 2012 at 1:18 PM, Eli Barzilay wrote: Just now, Galler wrote: Eli, I fully agree with you that any FSM is equivalent to functional composition and can be implemented in the manner you show. However , in th

[racket] obtaining name of module-level binding

2012-08-07 Thread Galler
Is there a function or syntax to obtain the module-level binding of a function? For example: (define (my-function) (display (some-useful-function-which-captures-name-of-module-level-binding))) ;-> 'my-function Thanks very much. R./ Zack Racket Users list: http://l

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Galler
ad its own define that cooperated with some-useful-... to do that. You would probably want to do this with a macro, tho, so that you get the lexical property. I guess. Robby On Tue, Aug 7, 2012 at 1:15 PM, Galler wrote: Is there a function or syntax to obtain the module-level binding of a func

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Galler
Thanks Danny On Tue, Aug 7, 2012 at 4:58 PM, Danny Yoo wrote: ;; Question to others: how can this be simplified? (splicing-let-syntax ([get-literal-metadata (lambda (stx) #`(#%datum . #,(format "~s" I did a slight s

Re: [racket] obtaining name of module-level binding

2012-08-07 Thread Galler
7, 2012, at 3:36 PM, Galler wrote: > Is 'Semantics Engineering with PLT Redex' where I should get started on language-engineering? No, this book is about engineering the mathematical semantics of a language (existing or to be designed) so that you can test properties (such as well-def

[racket] R5.3 and #lang web-server compilation

2012-08-18 Thread Galler
Eli, Matt, and Jay Under 5.3, there's been a near order-of-magnitude improvement in compilation time for the web-server language. I didn't notice prior discussion of this, although Jay has mentioned compilation time as a potential drawback in implementing stateless code. Its a very meaningf

[racket] Debugger and Barrier-protected REPL?

2012-08-22 Thread Galler
This may have been asked and answered. Apologies if redundant. The improvement in stateless compilation time in 5.3 has made the debugger a practical tool for me. (thanks again) Is it technically feasible to evaluate simple expressions in the dynamic extent of the point at which code is pause

[racket] slideshow/pict and HTTP

2012-08-25 Thread Galler
Robby and Matt, I found one could very easily use the pict library to create bitmaps and disseminate over HTTP as png-encoded binary streams Which is really quite nice. Thanks much for your work. The 2006 paper is very clear. Recursively defined picts structures are powerful abstractions ;

Re: [racket] Fun with flomap: old folksy CRT televisions!

2012-08-28 Thread Galler
Neil, This library is enormously useful. Thanks very much for the work required to implement. R./ Zack Racket Users list: http://lists.racket-lang.org/users

Re: [racket] call-with-composable-continuation and DrRacket

2012-08-30 Thread Galler
call-with-continuation-prompt is your friend in the definitions window (call-with-continuation-prompt (λ _ (+ 100 (call-with-composable-continuation (λ (k) (+ 1000 (k 1

Re: [racket] Considering taking the plunge

2012-10-11 Thread Galler
Greg Graham writes: >>do you think this is a crazy idea or not? I won't call it crazy. Can I call it overengineered? I would write the following in T-SQL to achieve what you want: sp_configure 'Ad Hoc Distributed Queries', 1 reconfigure USE [your-database] GO insert into OPENROWSET('Micros

[racket] Error running whalesong: wrong number of fields for structure mod: expected 16 but got 15

2013-11-25 Thread Galler
Good evening, I'm using Racket 5.3.6 under windows XP When I obtain the whalesong package as follows: #lang racket/base (require (planet dyoo/whalesong:1:21/make-launcher)) then attempt to run whalesong at the command prompt as follows C:\Documents and Settings\Galler>whalesong I rec

Re: [racket] Error running whalesong: wrong number of fields for structure mod: expected 16 but got 15

2013-11-26 Thread Galler
Joe, I've been pulling and building directly Thanks very much for this, but I'm not at all competent on racket internals Could you please sketch out where to place the files and how to build them? I won't need help after that. Sorry to bother. Thanks again. R./ Zack

Re: [racket] Error running whalesong solved

2013-11-26 Thread Galler
Joe: building from github worked. Thanks. If anyone from the future interested: Navigate to https://github.com/dyoo/whalesong and download the master branch (choose 'download ZIP' if unfamiliar) Extract zipped archive and move the entire whalesong directory into the Racket/collects directory

[racket] link: namespace mismatch error involving flomap-stats.rkt and flomap-struct.rkt

2013-12-05 Thread Galler
Nathaniel Rudavsky-Brody writes: > Hi Zack and everyone, > I'm going back to this old thread (http://lists.racket-lang.org/users/archive/2013-January/056176.html), since I have a similar problem with raco and flomap, and can't tell if anyone found a solution. Are there any new ideas? Nathaniel

Re: [racket] link: namespace mismatch error involving flomap-stats.rkt and flomap-struct.rkt

2013-12-05 Thread Galler
... > 3. comment out flomap-struct.rkt's provide form ... For clarity, that should be in the pasted version of flowmap-struct, not the original. Racket Users list: http://lists.racket-lang.org/users

[racket] Whalesong: define-resource generates error after compilation

2013-12-06 Thread Galler
Danny, define-resource is generating a unexpected specialize! error when compiled. Here's the minimal setup: Please note that I'm using the latest github version of your source, not the Planet package. Thanks for taking a look R./ Zack Program resource-error.rkt

Re: [racket] Whalesong: define-resource generates error after compilation

2013-12-06 Thread Galler
Galler writes: > > Danny,define-resource is generating a unexpected specialize! error when compiled. Clarification: the error is occuring at run time, not at compile time. I believe its originating in file whalesong/resource/compile-time.rkt The following very-naive patch eliminat

Re: [racket] Use of map and eval to evaluate symbol in namespace

2014-07-30 Thread Galler
Henri Is this what you're after? #lang racket/base (require (for-syntax syntax/parse racket/base )) (provide make-script) (begin-for-syntax (define-syntax-class unit-dictionary #:attributes (str) (pattern (~literal p) #:wit

Re: [racket] Passing information between syntax classes

2015-02-12 Thread Galler
Konrad, Adding the super-bar syntax-class below and the following #with directive to the foo syntax class #:with sb:super-bar #'((foo-symbol ...) (bar.symbol ...)) should accomplish what you want without recourse to explicit parameters Let me know if you need/want further discussion. Thank

[racket] Happy Birthday , Matthias

2012-10-29 Thread Galler
Happy birthday, Thanks for all your contributions and intellectual generosity. R./ Zack Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Losing decimal in SQL Server query result

2012-11-01 Thread Galler
> > Another possible workaround for now would be to cast the field to a > varchar and call string->number on the result. > numeric is an exact datatype in SQL Server; you'd also want to compose inexact->exact with string->number to preserve exactness (if that's a concern) i.e (inexact->exact

Re: [racket] Why this contract violation behaviour?

2012-11-16 Thread Galler
Use (define/contract... to enforce a contract within a module (define/contract (amount) (-> positive?) -7) #| amount: broke its contract promised: positive?, produced: -7 in: the range of (-> positive?) contract from: (function amount) blaming: (function amount) at: unsav

Re: [racket] Why this contract violation behaviour?

2012-11-16 Thread Galler
> > Even if you use define/contract, you may violate the contract on recursive calls. This is intentional. > Thanks. I hadn't run into that behavior before and wasn't aware. Could you possibly elaborate on the thinking wrt this design choice? (define/contract (my-natural-number n) (-> exa

[racket] A primitive more fundamental than a continuation?

2012-12-01 Thread Galler
I've been thinking about a reified continuation: The documentation (See Guide s10.3) says "A continuation is a value that encapsulates a piece of an expression context" I'm coming to the belief that the continuation is actually "an ordered collection of computation-branches, with facilities prov

Re: [racket] A primitive more fundamental than a continuation?

2012-12-01 Thread Galler
>>What you can NOT do even in this world is visit the past and perform a different computation than (+ 1 2). Yes. I agree that Racket's eval order combined with which branch the continuation is reified on uniquely determines which branches are in the past and which are in the future. I acknowled

Re: [racket] A primitive more fundamental than a continuation?

2012-12-01 Thread Galler
>>Now imagine that we lied. We don't really reify evaluation contexts as [continuation] procedures but as [continuation] objects with additional operations for inspecting and possibly mutating them. One could imagine that continuations are organized as a [abstract] sequence of [abstract] frames: N

Re: [racket] A primitive more fundamental than a continuation?

2012-12-02 Thread Galler
> The phrase 'evaluation context' has been in the literature since 1986 for just this purpose. I know, I coined it. > I wonder if there's been terminology drift in the reference For example: In the documentation, 'expression context' appears and is defined (Ref. 1.2.3.3) 'continuation frame'

[racket] Destructuring-bind for Regex

2013-01-04 Thread Galler
Hello, Is there a destructuring-bind for regular expressions? Something along the lines of the purely fictional function "with-destructuring-regex", below: (with-destructuring-regex ([(list #px"[\\D]*" #px"[\\d]+\\.[\\d]+" #px"[\\D]*") "This is a 40.2 Song about Japan" (x y z)])

Re: [racket] Destructuring-bind for Regex

2013-01-04 Thread Galler
bout Japan" [(regexp #px"([\\D]*)([\\d]+\\.[\\d]+)([\\D]*)" (list _ x y z)) (list x y z)]) ;; produces '("This is a " "40.2" " Song about Japan") The `_` is ignoring the first result of `regexp-match`, which is the full match. Sam On Fri

Re: [racket] Destructuring-bind for Regex

2013-01-04 Thread Galler
how () in regular expressions work Thanks much. On Fri, Jan 4, 2013 at 3:44 PM, Sam Tobin-Hochstadt wrote: On Fri, Jan 4, 2013 at 3:37 PM, Galler wrote: Could you possibly briefly elaborate on how the parentheses in the regular expression make the destructuring work? The () in the

[racket] raco exe difficutly with Release 5.3.1 & stateless web server

2013-01-26 Thread Galler
Hello, I encountered difficulty compiling a #lang web server application after upgrading to v.5.3.1 from v5.3 last night. O/S is WinXP service pack 3 The executable would compile into an .exe file. But when run, a console window would briefly open then close. The program did not execute. I

Re: [racket] raco exe difficutly with Release 5.3.1 & stateless webserver

2013-01-28 Thread Galler
no longer occurred. Based on this, I would assert the issue is specific to 5.3.1 vs 5.3 compilation behavior. R./ Zack - Original Message - From: Haiwei Zhou To: Galler Cc: users Sent: Sunday, January 27, 2013 6:58 AM Subject: Re: [racket] raco exe difficutly with

Re: [racket] raco exe difficutly with Release 5.3.1 & stateless web server

2013-01-28 Thread Galler
or, and then closes. If you ran from the shell, you'd be able read the error. My guess is that the error will say that some file can't be opened that is part of the configuration of the Web server and I haven't properly communicated its need to the exe builder. Jay On Sat, Jan 26, 20

Re: [racket] raco exe difficutly with Release 5.3.1 & stateless web server

2013-01-28 Thread Galler
is in the next release. Jay On Mon, Jan 28, 2013 at 7:46 AM, Galler wrote: Jay, Thanks. Here's the result run under Racket 5.3.1 with windows XP SP3 I wasn't aware of the windows command line trick. Thanks for suggestion. C:\SOURCE\Simplest RACO FAILURE>simplest-raco-failu

Re: [racket] raco exe difficutly with Release 5.3.1 & stateless web server

2013-01-28 Thread Galler
The (require (for-syntax racket/match/parse)) solved the executable problem. Thanks. I have a second raco exe issue-- and I don't think this is related to 5.3.1 b/c I believe I encountered similar problem earlier today using raco with 5.3 This is also using different underlying source code

Re: [racket] raco exe difficutly with Release 5.3.1 & stateless web server

2013-01-28 Thread Galler
s. I can't find the thread though. Jay On Mon, Jan 28, 2013 at 8:25 AM, Galler < lzgal...@optonline.net > wrote: The (require (for-syntax racket/match/parse)) solved the executable problem. Thanks. I have a second raco exe issue--  and I don't think this is related to 5.3.1 b/

Re: [racket] raco exe difficutly with Release 5.3.1 & stateless web server

2013-01-28 Thread Galler
flomaps. I can't find the thread though. Jay On Mon, Jan 28, 2013 at 8:25 AM, Galler < lzgal...@optonline.net > wrote: The (require (for-syntax racket/match/parse)) solved the executable problem. Thanks. I have a second raco exe issue--  and I don't think this is related

Re: [racket] raco exe difficutly with Release 5.3.1 & stateless web server

2013-01-28 Thread Galler
I wasn't able to isolate out the code that was causing the exception. Below is the stack trace. This problem does not occur when running the app in DrRacket (the app works fine there), but appears after having compiled the application via raco exe, when the server is handling a response.

Re: [racket] raco exe difficutly with Release 5.3.1 & stateless web server

2013-01-29 Thread Galler
flomap and #lang web server above might be dispositive towards identifying the problem On Tue, Jan 29, 2013 at 7:44 AM, Jay McCarthy wrote: [Adding Neil] Do you know what commit fixed the missing require for-syntax in flomap? Jay On Mon, Jan 28, 2013 at 12:09 PM, Galler wrote: I wasn&#

Re: [racket] raco exe difficutly with Release 5.3.1 & stateless web server

2013-01-29 Thread Galler
traversal of the require hierarchy cannot "see". hth, Robby On Tue, Jan 29, 2013 at 10:31 AM, Galler mailto:lzgal...@optonline.net>> wrote: Some additional detail: 1) the flomap exception below shows up when attempting to run compiled code in both releases 5.3 and 5.3

Re: [racket] raco exe difficutly with Release 5.3.1 & stateless web server

2013-01-29 Thread Galler
Robby On Tue, Jan 29, 2013 at 11:14 AM, Galler < lzgal...@optonline.net > wrote: Neil, I was surprised that flomap showed up at all. I'm not calling it explicitly (or to my knowledge implicitly) Is there a technique to figure out what part of my code is dependent upon it? On T

Re: [racket] raco exe difficutly with Release 5.3.1 & stateless web server

2013-01-29 Thread Galler
Preliminary Solution: I will send more info in more detail when I've got a test case, also I need to test against 5.3.1 (works on 5.3) but: 1) The cause of the flomap exception was a user-code dependency on the racket library stepper.rkt in a #lang web server module, complied under raco e

[racket] 5.3.1 Performance

2013-01-29 Thread Galler
Racket 5.3.1 is amazing. Compiled, it runs 20 update queries per second on a local SQL Server data store, whereas 5.3 ran, at best 5 queries per second. Both figures inclusive of garbage-collection. Also it is stable (5.2 and earlier had memory leaks, probably from mysterx library) I don't h

Re: [racket] Racket v5.3.2

2013-02-01 Thread Galler
>> DrRacket's GUI is more responsive. Eli, Matt and Robby, Qualitative comments: I don't know if change occurred in v5.3.1 or v5.3.2 but DrRacket GUI is now materially more responsive when editing large racket source code files (~2500 lines). I thank you very much for the improvement. I recomp

Re: [racket] Racket v5.3.2

2013-02-01 Thread Galler
So, more details would be welcome. I was wrong. Minor cycles are consuming ~110ms and recovering ~25MB, major cycles are consuming ~400ms and recovering 40-60MB. All is as it should be. Apologies. R./ Zack Racket Users list: http://lists.racket-lang.org/users

[racket] Web-cells, anonymous functions, and garbage collection

2013-02-13 Thread Galler
Good evening, I've been investigating lang web-server, performance and garbage collection I have a question regarding anonymous functions and web cells Examples below require: #lang web-server (require racket/serialize web-server/lang/web-cells) Constants appear serializable by th

Re: [racket] Web-cells, anonymous functions, and garbage collection

2013-02-14 Thread Galler
Also, on further reflection, I'm happy to concede that my placing anonymous functions in a web-cell may not have been a great idea. If the ultimate answer is 'don't do that', that would be ok. Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Web-cells, anonymous functions, and garbage collection

2013-02-14 Thread Galler
Jay and Robby, Thanks much. I found that discussion very helpful. R./ Zack Racket Users list: http://lists.racket-lang.org/users

[racket] Yet another garbage collection question: major GC cycles

2013-02-15 Thread Galler
Dear Racketeers, *SMALL PREAMBLE* I'm trying to understand the observed GC behavior so I can create better application performance, and I'm focusing on the major GC-cycle. For usability, my desire would be to have a major-garbage-collection cycle last about the same time as a typical request

Re: [racket] Yet another garbage collection question: major GC cycles

2013-02-15 Thread Galler
Matt, Ryan Thanks very much for the answers, let me think about. I'm looking at the issue Ryan brings up with module references to lru.rkt, which surprised me. R./ Zack On Fri, Feb 15, 2013 at 2:39 PM, Matthew Flatt wrote: At Fri, 15 Feb 2013 14:16:38 -0500 (EST), Galler wrote: Wh

Re: [racket] Yet another garbage collection question: major GC cycles

2013-02-15 Thread Galler
Matthew, A major collection is triggered when current memory use is twice the use at the last major collection. I'm not following this sentence, as it implies logarithmic growth in memory, which is not observed. At some point in the executable's life, the major GC cycles consistently occur

Re: [racket] Yet another garbage collection question: major GC cycles

2013-02-15 Thread Galler
Matthew and Ryan and Robby, MAJOR COLLECTIONS WITHOUT ACTIVITY The issue regarding major collections occuring with no activity was due to the collect function executing in lru.rkt on a timer. Now no activity equals no collections. Thanks Ryan. BACKGROUND AND NEXT QUESTION Purpose of fo

[racket] Module name resolution and racket/place with a compiled executable

2013-07-04 Thread Galler
Dear all, I'm having difficulties compiling racket/place code using both raco exe and DrRacket menu item I've isolated the simplest example reproducing the behavior The parent and worker files are as below, taken from the racket reference  http://docs.racket-lang.org/reference/places.html Bot

Re: [racket] Module name resolution and racket/place with a compiled executable

2013-07-04 Thread Galler
Galler writes: Hello again. The problem seems to be headed towards resolution with some combination of using 1) (define-runtime-path ) in the parent file to reference the worker file and 2) using the ++lib parameter when compiling with raco exe for libraries called by the worker file I&#x

[racket] Rules For Compiling code that will use dynamic-places with RACO

2013-07-04 Thread Galler
Here's what I determined. RULES For Compiling code that will use dynamic-places with RACO Racket: 5.3.5 O/S Windows XP sp3 terminology: worker = module that will run in the new virtual machine parent = module calling the dynamic-place procedure 1. In the worker module explicitly use the (

Re: [racket] Help with exception raising and testing

2013-08-27 Thread Galler
Two issues: 1: wrap the function-under-test in a thunk 2. check for exception type, here exn:fail:contract? which is raised by raise-argument-error. the more general exn:fail? would also work. (require rackunit) (test-exn "negative coin" exn:fail:contract? (λ _ (sum-coins -1 3 5 7) )) __

Re: [racket] Help with exception raising and testing

2013-08-27 Thread Galler
Also, here's a small additional bit of code to demonstrate what test-exn is actually checking. (require rackunit) ;pass (test-exn "negative coin" exn:fail:contract? (λ _ (sum-coins -1 3 5 7) )) ;fail -- "Wrong exception raised" (test-exn "negative coin" exn:fail:filesystem? (λ _ (sum-coins -1 3

Re: [racket] Help with exception raising and testing

2013-08-27 Thread Galler
>>why a thunk? The inferential leap to be made is that Racket uses applicative order, meaning the arguments of a procedure are each evaluated from left-to-right before the procedure is itself evaluated for example: (+ 1 (+ 2 3)) is reduced to (+ 1 5) before being evaluated as 6 the procedur

[racket] Eval, namespaces redefinitions, and (maybe) code-inspectors

2013-10-09 Thread Galler
Racketeers, I'm working through eval, namespace, and syntactical macros My question concerns re-definition of identifiers. I've worked through three cases below, demonstrating Racket's default behavior. Case 1 shows that identifiers defined at module (or is it top?) level cannot be redefine

Re: [racket] Eval, namespaces redefinitions, and (maybe) code-inspectors

2013-10-14 Thread Galler
I don't see any obstacle to adding a more fine-grained reflective operation, such as `namespace-set-variable-constant!`. Would that be useful? Matt, I don't think the introduction of namespace-set-variable-constant! worth the effort, though I thank you for the solution. Let me explain my reason

[racket] finally via macro

2011-08-12 Thread Zack Galler
Sam Phillips writes: > > On Fri, Oct 8, 2010 at 4:40 PM, Jay McCarthy wrote: > > I use dynamic-wind for this. If there is something better, I don't > > know what it is. dynamic-wind is a little bit funny though because if > > you capture continuations then the in/out handlers can run multiple >

Re: [racket] try/catch/finally idiom in Racket

2011-08-12 Thread Zack Galler
Sam Phillips writes: > > Hi All, > > I understand using call-with-exception-handler/with-handlers/etc. to > catch exceptions in a block of code, but I'm at a loss to what the best > way to do a "finally" or cleanup action after a block of code. My > intuition is to use dynamic-wind, but I figu