bug#13077: guile: add repl-option for customized print

2012-12-11 Thread Nala Ginrut
hi Daniel! Custom color-scheme is done now! ;-D But we have a problem... :-( It's OK to test this code in the REPL: cut--- (use-modules (ice-9 colorized)) (add-color-scheme! `((,(lambda (data) (and (number? data) (> data 1))) MY-LONG-NUM ,color-it (RED

bug#13188: par-map causes VM stack overflow

2012-12-15 Thread Nala Ginrut
Here is the error message. Anyway, par-map shouldn't cause stack overflow. ---err msg-- scheme@(guile-user)> (par-map 1+ (iota 1)) While executing meta-command: ERROR: Throw to key `vm-error' with args `(vm-run "VM: Stack overflow" ())'.

bug#13188: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow)

2013-03-27 Thread Nala Ginrut
On Wed, 2013-03-27 at 18:12 +0100, Ludovic Courtès wrote: > Hi, > > Nala Ginrut skribis: > > > scheme@(guile-user)> (par-map 1+ (iota 1)) > > While executing meta-command: > > ERROR: Throw to key `vm-error' with args `(vm-run "VM: Stack > > o

bug#13188: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow)

2013-03-28 Thread Nala Ginrut
On Thu, 2013-03-28 at 01:05 -0400, Mark H Weaver wrote: > Nala Ginrut writes: > > > But I'm still puzzled with the performance of par-map: > > cut--- > > scheme@(guile-user)> ,time (define a (map (lambda (x) (expt x 5)) (iota &g

bug#16890: current-thread need to be re-exported in srfi-18

2014-02-27 Thread Nala Ginrut
You don't have to import current-thread from srfi-18, it's already in top-level. But if you really need it, you have to use @@ for this un-exported symbol. On Thu, 2014-02-27 at 09:14 +0800, Xin Wang wrote: > When try to import current-thread from srfi-18, guile fails with: > > ERROR: no binding

bug#18223: Duplicate of issue 14792

2014-08-09 Thread Nala Ginrut
I can't reproduce it, but I'm using the latest mater. Could you provide your version? 2014年8月9日 下午5:47于 "David Kastrup" 写道: > > This is actually a duplicate of issue 14792 which has been ignored for > over a year by now. > > Please see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14792#35> > for

bug#18245: [master branch] Useless imported module cause strange problem

2014-08-11 Thread Nala Ginrut
Note this bug is under Master branch, it's fine in stable-2.0. I've imported srfi-1, but after some modifications, the program happens not to use any srfi-1 symbols, then there's the problem that one of the rule in syntax-rules can't be found and threw error. It works when I removed useless srfi-

bug#18245: [master branch] Useless imported module cause strange problem

2014-08-11 Thread Nala Ginrut
2014年8月11日 下午11:31于 "Mark H Weaver" 写道: > > tags 18245 notabug > close 18245 > thanks > > The problem is that srfi-1 exports a 'drop' procedure, and 'drop' is > also used as a syntax-rules literal in your macros. Literals are > matched as follows: if the literal identifier has the same name and t

bug#18680: [PATCH] Check if argv[0] is NULL in scm_boot_guile to avoid segfault

2014-10-10 Thread Nala Ginrut
ed patch fixed this. [1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf From b6938156fe1ca2ba8a7db167604618eea31282f1 Mon Sep 17 00:00:00 2001 From: Nala Ginrut Date: Fri, 10 Oct 2014 23:54:24 +0800 Subject: [PATCH] Check argv[0] if it's NULL in scm_boot_guile According to C11, a

bug#18356: Should partial continuations capture the dynamic environment?

2014-10-14 Thread Nala Ginrut
Thanks for researching and explaining this issue! It's helpful for me to think about how to deal with my async server design based on delimited-continuation. I think it's fine if it doesn't capture dynamic environment, even cooler, so that the dynamic state could be well understood and traced by us

bug#20546: Syntax bug in master branch (till d99fedc5fd38c0)

2015-05-11 Thread Nala Ginrut
I'm using master branch (till d99fedc5fd38c0), and I found this code can't run in 2.1, but works in 2.0: -code--- (define-syntax define-art (lambda (x) (syntax-case x () ((_ name) (identifier? #'name) #`(begin (defin

bug#18592: FFI should have portable access to ‘errno’

2015-12-31 Thread Nala Ginrut
>procedure return_type func_ptr arg_types #:return-errno > I agree #1 is now the best option so far. > > Ludo’. >From 88a99af4b5db9096c3cde51c72eb371b6be76754 Mon Sep 17 00:00:00 2001 From: Nala Ginrut Date: Thu, 31 Dec 2015 20:27:59 +0800 Subject: [PATCH 1/2] Add option to point

bug#18592: FFI should have portable access to ‘errno’

2016-01-04 Thread Nala Ginrut
Resubmit since errno should be stored after ffi_call. >From 88a99af4b5db9096c3cde51c72eb371b6be76754 Mon Sep 17 00:00:00 2001 From: Nala Ginrut Date: Thu, 31 Dec 2015 20:27:59 +0800 Subject: [PATCH 1/2] Add option to pointer->procedure to return errno if necessary --- libguile/for

bug#18592: FFI should have portable access to ‘errno’

2016-01-04 Thread Nala Ginrut
17 00:00:00 2001 From: Nala Ginrut Date: Tue, 5 Jan 2016 03:04:47 +0800 Subject: [PATCH] Added new function pointer->procedure-with-errno to return errno properly * doc/ref/api-foreign.texi (Dynamic FFI): Update documentation. * libguile/foreign.c (scm_pointer_to_procedure_with_errno):

bug#18592: FFI should have portable access to ‘errno’

2016-01-05 Thread Nala Ginrut
On Tue, 2016-01-05 at 08:49 +0100, to...@tuxteam.de wrote: > Sorry for intervening from the peanut gallery, but if I understood Mark > correctly, he only was proposing to introduce a second function for the > C API (to keep backward compatibility at the linking-to-C level). At the > Guile source le

bug#18592: FFI should have portable access to ‘errno’

2016-01-05 Thread Nala Ginrut
#x27;return_errno' set to SCM_BOOL_T. > > The only change to foreign.h would be to add a prototype for > 'scm_pointer_to_procedure_with_errno'. > > What do you think? > > Regards, > Mark >From faa6371c3251a488e4245bf4835529009a1a7b88 Mon Sep

bug#18592: FFI should have portable access to ‘errno’

2016-02-18 Thread Nala Ginrut
Hi folks! Is there still any problem with the previous patch? Could it be applied now? If anyone think there's problem in it, I'm glad to work for it. Please don't hesitate to tell, since I need this feature very much. Thanks!

bug#18592: FFI should have portable access to ‘errno’

2016-02-18 Thread Nala Ginrut
I think it's OK to try this: (pointer->procedure int (dynamic-func "epoll_create" (dynamic-link)) '() #:return-errno? #t) And I'm fine with the patch, could you push it please? Thank you very much! On Thu, 2016-02-18 at 08:30 -0500, Mark H Weaver wrote: > Nala Gin

bug#18592: FFI should have portable access to ‘errno’

2016-02-26 Thread Nala Ginrut
Is there still problem? I'm fine with the patch, and I'm expecting to merge it ASAP. Anyway, please don't hesitate to tell me if there's still any problem, I'm glad to help to do it better. I really need it. Thanks! On Fri, 2016-02-19 at 13:02 +0800, Nala Ginrut wrote:

bug#18592: FFI should have portable access to ‘errno’

2016-03-13 Thread Nala Ginrut
have your reason for that? Best regards. On Thu, 2016-03-03 at 12:36 -0500, Mark H Weaver wrote: > Nala Ginrut writes: > > > Is there still problem? I'm fine with the patch, and I'm expecting to > > merge it ASAP. Anyway, please don't hesitate to tell me if ther

bug#24061: While loop can't call continue in master branch

2016-07-24 Thread Nala Ginrut
In 2.1.3.59-516f7, the 'continue' in 'while loop' throw exception. It's OK in stable-2.0. code (define i 0) (while (< i 20)        (display i)(newline)        (when (= i 11) (continue)) (set! i (1+ i))) end

bug#27782: mmap for guile

2017-11-24 Thread Nala Ginrut
Thanks for the work! Could you please add MAP_POPULATE too? 2017年11月24日 下午11:55,"Matt Wette" 写道: > > > > > > I did a little more on this. Here is the latest. > It provides mmap (not searched) and mmap/search (searched for pointers to > GC). > > > --- libguile/filesys.c.orig 2017-03-01 10:54:

bug#27782: mmap for guile

2017-11-25 Thread Nala Ginrut
Actually I've been using a FFI version of mmap in my working code, with my previous patch to Guile it's very easy to handle errno. Just few lines code is enough to bind mmap. I am not sure if C version binding is still the best option to maintain. 2017年11月25日 22:42,"Matt Wette" 写道: > here is a st

bug#30066: 'get-bytevector-some' returns only 1 byte from unbuffered ports

2018-01-10 Thread Nala Ginrut
hi Andy and Ludo! What if developers enabled suspendable-ports and set the port to non-blocking? For example, in the non-blocking asynchronous server, I registered read/write waiter for suspendable-ports. And save delimited-continuations then yield the current task. In this situation, get-bytevect

bug#30066: 'get-bytevector-some' returns only 1 byte from unbuffered ports

2018-01-10 Thread Nala Ginrut
Ah, thanks for that work! On Thu, Jan 11, 2018 at 1:26 AM, Andy Wingo wrote: > On Wed 10 Jan 2018 17:58, Nala Ginrut writes: > >> hi Andy and Ludo! >> >> What if developers enabled suspendable-ports and set the port to >> non-blocking? >> For example, in the

bug#73334: [critical bug] The set! doesn't work in indirect reference

2024-09-18 Thread Nala Ginrut
Thanks for the reply! I've taken a look at https://www.gnu.org/software/guile/manual/html_node/Declarative-Modules.html It's related to #:declarative? Thanks again! Best regards. On Wed, Sep 18, 2024 at 11:50 PM Thompson, David wrote: > On Wed, Sep 18, 2024 at 10:38 AM Nala

bug#73334: [critical bug] The set! doesn't work in indirect reference

2024-09-18 Thread Nala Ginrut
Hi folks! Recently I was bothered by a strange bug when debugging Artanis, here's how to reproduce. You need three files, say aaa.scm, bbb.scm, and entry -aaa.scm (define-module (aaa) #:export (global)) (define global #f) --aaa.scm end-