Re: [racket-users] Execution ends before log message is displayed

2019-01-17 Thread Brian Adkins
Aha! Thanks for the quick reply. I'll have to rethink how I'm handling logging. On Thursday, January 17, 2019 at 9:03:39 PM UTC-5, Matthew Flatt wrote: > > Yes, the default logger cheats. When you log a relevant message, it's > written immediately to stdout/stderr/syslog instead of being posted

Re: [racket-users] Execution ends before log message is displayed

2019-01-17 Thread Matthew Flatt
Yes, the default logger cheats. When you log a relevant message, it's written immediately to stdout/stderr/syslog instead of being posted to a receiver that is later polled. At Thu, 17 Jan 2019 17:59:30 -0800 (PST), Brian Adkins wrote: > I've created my own logger via make-logger, and I started a

[racket-users] Execution ends before log message is displayed

2019-01-17 Thread Brian Adkins
I've created my own logger via make-logger, and I started a thread with a loop that sync's on the log receiver I created via make-log-receiver. I'm logging some messages in a test, and it appears that the test completes (and presumably kills the log receiver thread) before the log message is

Re: [racket-users] [help?] Using match-define to generate lists of fields from a struct

2019-01-17 Thread David Storrs
On Thu, Jan 17, 2019 at 5:54 PM Matthew Butterick wrote: > > > On Jan 17, 2019, at 2:39 PM, David Storrs wrote: > > it would be nice to be able to do some slicing and dicing in the > parsing pattern as opposed to doing it manually afterwards. Is there > a way to do it? > > > > > #lang racket >

Re: [racket-users] [help?] Using match-define to generate lists of fields from a struct

2019-01-17 Thread Matthew Butterick
> On Jan 17, 2019, at 2:39 PM, David Storrs wrote: > > it would be nice to be able to do some slicing and dicing in the > parsing pattern as opposed to doing it manually afterwards. Is there > a way to do it? #lang racket (struct spec (type mode) #:transparent) ; cf 'cipher-spec' in crypto

Re: [racket-users] [help?] Using match-define to generate lists of fields from a struct

2019-01-17 Thread David Storrs
On Thu, Jan 17, 2019 at 3:32 PM Neil Van Dyke wrote: > > Just one off-the-cuff alternative representation, with some properties > that might be useful to you... > [...much good stuff about string encoding...] Thanks, those are all good thoughts. We get to control how much data is sent so yes,

Re: [racket-users] Is there a way to fully expand and evaluate a syntax object at compile-time? (Redex compile-time typechecks)

2019-01-17 Thread William J. Bowman
(Responded to Joey offlist, but for others interested, here's a more detailed reply) The "(#%expression (let-values () (let-values (((ws1) (#%expression ..." wrapper is a bunch of internal Racket stuff. For simple #lang's, I've been able to just ignore it, although I'm sure it's got some

Re: [racket-users] [help?] Using match-define to generate lists of fields from a struct

2019-01-17 Thread Neil Van Dyke
Just one off-the-cuff alternative representation, with some properties that might be useful to you... If this representation is internal to your system, the encrypted data is small enough that you'll fit it in RAM, and you only have a small number of different encryption methods, and your

[racket-users] Is there a way to fully expand and evaluate a syntax object at compile-time? (Redex compile-time typechecks)

2019-01-17 Thread Joey Eremondi
As part of my ongoing attempt to turn my Redex model into a #lang, I'm wondering, is there a way to fully expand and evaluate a syntax object at compile-time? I'm trying to get compile-time typechecking working. Here's what I have: * My Redex model uses names like TermLam, TermApp etc. *

[racket-users] [help?] Using match-define to generate lists of fields from a struct

2019-01-17 Thread David Storrs
I'm shipping encrypted data between RAM, DB, and network and wondering if there's an efficient way to the parsing. (struct spec (type mode) #:transparent) ; cf 'cipher-spec' in crypto module (define s (spec "aes" "cbc")) (match-define (struct* spec ([type (app string->symbol type)]

Re: [racket-users] Are the terms "function" and "procedure" synonymous in Racket?

2019-01-17 Thread Anthony Carrico
Weird! A procedure is a (branching) sequence of instructions. Non-programmers have an accurate notion of the word from outside of computer programming in recipes and instruction manuals. A function maps inputs to outputs. Non-programmers often use the word to denote a relationship between

Re: [racket-users] Racket ‘topic’(tag) on github

2019-01-17 Thread 'Paulo Matos' via users-redirect
Thanks, I think this is really useful... I went to look at what gitlab does but unfortunately they don't have topics... yet! Paulo Matos On 16/01/2019 16:45, Stephen De Gabrielle wrote: > Hi, > > https://github.com/topics/racket  > > I recently noticed the github topic for Racket wasn’t as