Re: How to read integers from file faster?

2013-08-30 Thread Mike Gran
> From: Darren Hoo >It is way too slow to read numbers from a file simply by using `read' The problem mostly lies in dealing with the locale or doing utf-8 conversion.  Also, your code creates and destroys a lot of strings. You could push data through much more quickly if it were binary and

How to read integers from file faster?

2013-08-30 Thread Darren Hoo
It is way too slow to read numbers from a file simply by using `read' for example a txt file contains 10,000,000 line of numbers: (define (gen-sample max k file) (with-output-to-file file (lambda () (let lp ((k k)) (when (> k 0) (display

Re: Emacsy: Context Sensitive Commands Design Question

2013-08-30 Thread Ludovic Courtès
Mark H Weaver skribis: > Shane Celis writes: > >> 6. Tag commands as special procedures perhaps by adding something to >> their procedure properties. Implement a "command?" procedure. Export >> commands and procedures to the same module. Then just pluck the >> commands out of all the procedure

Re: Emacsy: Context Sensitive Commands Design Question

2013-08-30 Thread Thien-Thi Nguyen
() Shane Celis () Thu, 29 Aug 2013 16:57:00 -0400 6. Tag commands as special procedures [...] Implement "command?" CON: Adding something to the procedure makes wrapping commands in other lambdas awkward. Might necessitate a define-command, lambda-command, method-command, which I'd p

guile-dbi cores in mark_db_handle

2013-08-30 Thread Andrew Gaylard
Hi guile people, I'm experiencing cores in guile-dbi. This is on Solaris-10u10 on SPARC, with guile and guile-dbi compiled with -O2. When compiled with -O0, the problem disappears. I've also been unable to replicate the problem on Linux x86_64. This suggests to me that the underlying cause co