[racket-users] System Scheme (RnRS): Shared Secret Generator

2015-06-10 Thread Michael Titke
I changed from one OS to another and I was missing a simple feature: automatic password generation. To fill the gap with a Scheme I implemented such a generator as a command line tool respectively /crypto sweet/. After having read /SRFI 27: Sources of Random Bits/ I decided to implement my

Re: [racket-users] Fast way to map over a list many times, changing ONE element each time?

2015-06-19 Thread Michael Titke
On 19/06/2015 21:24, Luke Miles wrote: Say I have a list ls and I want to produce a list of lists where the i'th list has the i'th element of ls tripled, but all other elements are the same. e.g. '(3 5 7) = '((9 5 7) (3 15 7) (3 5 21)) What is a fast way to do this? I could do a loop with

Re: [racket-users] db: nested transactions

2015-06-22 Thread Michael Titke
On 22/06/2015 11:05, George Neuner wrote: 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 () :

Re: [racket-users] System Scheme (RnRS): Shared Secret Generator

2015-06-10 Thread Michael Titke
On 10/06/2015 12:33, Michael Titke wrote: I changed from one OS to another and I was missing a simple feature: automatic password generation. To fill the gap with a Scheme I implemented such a generator as a command line tool respectively /crypto sweet/. After having read /SRFI 27: Sources

Re: [racket-users] System Scheme (RnRS): Shared Secret Generator

2015-06-12 Thread Michael Titke
On 12/06/2015 13:21, Konrad Hinsen wrote: On 12/06/15 09:15, Michael Titke wrote: In my understanding the pseudo random number generator is deterministic. That means for the same input seed /random/ will always return the same value. This is why one usually has to set a new state for each

Re: [racket-users] garbage collection

2015-07-04 Thread Michael Titke
On 05/07/2015 01:00, Neil Van Dyke wrote: Matthew Flatt wrote on 07/04/2015 06:40 PM: That is, unlike so many other things in our infrastructure, the GC is not so tangled with everything else that it would be difficult to change by itself. Granted, Good about GC not so tangled. I don't know

Re: [racket-users] garbage collection

2015-07-05 Thread Michael Titke
Some high water mark on the stack might be another improvement - it would only need to scan above it for changes - but on a second thought: that wouldn't work or change wouldn't mean anything anymore because of the Lazy Sweep. Have you ever seen such a thing segfault after exactly 9000 cells

Re: [racket-users] Emacs Lisp as a Racket Language?

2015-07-03 Thread Michael Titke
On 02/07/2015 21:36, Greg Davidson wrote: Is there interest in creating a Gnu Emacs Lisp Racket Language, along with the underlying APIs (perhaps tied to DrRacket) sufficient to compile and run Gnu Emacs Lisp extension packages? Is there prior or ongoing work for such a project? For some

Re: [racket-users] Sending Closures to Places

2015-08-02 Thread Michael Titke
On 02/08/2015 19:12, Konstantin Weitz wrote: I'm trying to write a distributed racket program using [places][0]. From my current understanding, this means that I have to send data to each place over a channel using the `place-channel-put` function, which can send any value accepted by

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

2015-06-30 Thread Michael Titke
As the mentioned SRFI states it: This is a proposal to allow procedure calls that evaluate to the value of a location to be used to /set/ the value of the location, when used as the first operand of |set!|. The term location is only used in the introductory part but for those who know the

Re: [racket-users] Re: is this a bug?

2015-07-29 Thread Michael Titke
In the forgotten theory /fold/ should reduce its arguments like in the following examples: (define (apply-or well-formed-list) (foldl {lambda (a b) (or a b)} #f well-formed-list)) (define (apply-and well-formed-list) (foldl {lambda (a b) (and a b)} #t

Re: [racket-users] Re: is this a bug?

2015-08-02 Thread Michael Titke
On 01/08/2015 18:29, Ian Tegebo wrote: On Wednesday, July 29, 2015 at 8:17:06 AM UTC-7, Michael Titke wrote: (define (apply-or well-formed-list) (foldl {lambda (a b) (or a b)} #f well-formed-list)) (define (apply-and well-formed-list

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-04 Thread Michael Titke
I don't know why but at some point in the 20th century people really became afraid of viewing programs as pure data (which they are) and started to call it metacircular (which of course also refers to other properties of a list processor treating each and every start of list, i.e. opening

Re: [racket-users] eval PSA (was Sending Closures to Places)

2015-08-05 Thread Michael Titke
On 04/08/2015 16:34, Alexis King wrote: And that, I think, is the problem: eval seems a lot like a “one size fits all” approach to problem solving. ... We write in high-level languages for a reason. There’s no reason to stunt their ability to abstract by directly calling eval. I do

Re: [racket-users] Sending Closures to Places

2015-08-03 Thread Michael Titke
On 03/08/2015 07:22, Neil Van Dyke wrote: Michael Titke wrote on 08/03/2015 12:50 AM: Perhaps /quote/ and /eval/ would do the job? That is the usual way to treat Scheme code as data and data as Scheme code. Eval might indeed be the perfect solution this time, iff every other conceivable

Re: [racket-users] is this a bug?

2015-08-07 Thread Michael Titke
I always suspected this to be a logical joke of forcing people to write their own quantifiers and to not let them fall for predicate logic. The best thing about a logic scheme declaring everything but really everything to be true when it is not false are expressions like the following: (when

Re: [racket-users] FrTime basics

2015-08-13 Thread Michael Titke
Last time I checked FrTime (and Reactive Programming in general) it seemed to me like a specialized application of constrained based programming. There is a run-time part and while some applications of the concept in other programming languages (such as C#) offer only some syntactic forms to

Re: [racket-users] is this a bug?

2015-08-08 Thread Michael Titke
On 07/08/2015 22:43, Alexander D. Knauth wrote: On Aug 7, 2015, at 12:27 PM, Michael Titke michael.tied...@o2online.de wrote: I always suspected this to be a logical joke of forcing people to write their own quantifiers and to not let them fall for predicate logic. The best thing about

Re: [racket-users] Re: is this a bug?

2015-08-08 Thread Michael Titke
These procedure were necessary to represent questions like IS THERE ANY stack on the table onto which I could put this card?, Is the top card of ALL foundations a king?. If so then you have won! :-) I think they call these quantifiers and these tend to be used as descriptive ones,

Re: [racket-users] Correction: Half-life was *not* written in a Lisp after all.

2015-07-25 Thread Michael Titke
On 25/07/2015 14:02, Hendrik Boom wrote: On Sat, Jul 25, 2015 at 12:04:07AM +, John Carmack wrote: Half-life was written in C on my Quake 1 codebase. Thank you for the correction. Now I get to wonder what the truth behind the rumour was. Evidently not half-life. -- hendrik There is

Re: [racket-users] help on coding finite state automata

2015-09-03 Thread Michael Titke
On 03/09/2015 16:29, Linh Chi Nguyen wrote: Dear All, I'm a complete newbie in racket and need help in coding finite state machine/automata. Please pardon any of my ignorance. Thanks to this post of Tim Thornton, I see a very good way to code FSM:

Re: [racket-users] high memory usage of gui app

2015-09-07 Thread Michael Titke
I have written a little card game Open Flowers which needed about the same amount of memory. My guess is that amount of memory is just the "fuel memory" the engine needs from one garbage collection cycle to the next. Traditional mark stop-the-world garbage collection seems to come to an end