Re: Chicken git egg: bug & patch

2021-06-14 Thread megane
Kristian Lein-Mathisen writes: > Hi, > > Indeed. We could malloc and set-finalizer! and that should work and be > safe. However, as far as I understand, this approach has some disadvantages: > > - malloc is relatively slow compared to chicken's internal allocation (eg > make-string) that uses

Re: Chicken git egg: bug & patch

2021-06-13 Thread megane
Kristian Lein-Mathisen writes: > From what I gather, there is no way to allocate memory and return a pointer > to it, safely, in CHICKEN. > Won't the garbage collector potentially overwrite whatever region was > allocated since it has no way of knowing it? There's allocate from chicken.memory

Re: Help porting someone else's macro from 4 to 5.

2020-01-20 Thread megane
Andrew Mack writes: > Hello all, I'm attempting to port the sdl-mixer egg (originally by > Christian Kellermann) from 4 to 5. I think I've made most of the > necessary changes, but I'm running into a bit of an issue and would > greatly appreciate some help troubleshooting. Hi, Andrew! > >

Re: register-compiled-module performance

2020-01-11 Thread megane
Matt Welland writes: > With Chicken 4 I'm seeing a pretty high impact on startup time from > (declare (uses foo.import)). I think that will be less of a problem when I > switch from using * for my export lists to only the procedures that need to > be exported. However I was very surprised to

Re: [Chicken-users] continuation example: different behavior from other Scheme implementations

2019-10-19 Thread megane
Ricardo Gabriel Herdt writes: > Am 19.10.2019 14:18 schrieb felix.winkelm...@bevuta.com: >> The exact behaviour of re- >> entering a continuation captured during execution of "map" is, I think, >> dependent on implementation details (there may be a note about this in >> the >> SRFI-1 document

Re: [Chicken-users] Obscure bug with srfi-18, mailbox and coops

2019-08-28 Thread megane
Théo Cavignac writes: > Erratum: I think it did fix the bug, I just misunderstood a different > error. Is this modification of coops config viable for upstream or should I > find a way to grant thread safety in my own code ? > Great! I see Felix is going to add the -disable-interrupts flag to

Re: [Chicken-users] on generating types files for compound libraries of multiple modules

2019-08-14 Thread megane
Marco Maggi writes: > Peter Bex wrote: > >> On Wed, Aug 14, 2019 at 08:23:51AM +0200, Marco Maggi wrote: > > 1. Is there a way to print to stderr the list of consulted ".types" > files? I do not see such an option in: > >http://wiki.call-cc.org/man/5/Using%20the%20compiler Giving

Re: [Chicken-users] how to debug a segfault?

2019-08-12 Thread megane
Marco Maggi writes: > Ciao, > > I am getting a segmentation fault when I compile with "-O5" a shared > library andits test programs with"-O5" (CHICKEN 5.1, > x86_64-pc-linux-gnu). I need some directions on how to debug this > problem. I am compiling with: > >

Re: [Chicken-users] how the second argument to ERROR is handled

2019-07-21 Thread megane
Peter Bex writes: > On Sun, Jul 21, 2019 at 09:03:33AM +0200, Marco Maggi wrote: >> Ciao, >> >> with CHICKEN 5.1.0, is the following correct: >> >> (import (scheme) (chicken base) (chicken condition)) >> >> (call/cc >> (lambda (escape) >>

Re: [Chicken-users] Comparse recursive parser

2019-02-16 Thread megane
Joe Anonimist writes: > Hello, > > > I am trying to build a simple arithmetic expression evaluator using > Comparse. I have got to the part of the grammar that looks like this > > > > > ::= '*' > | '/' > | > > > ie it is recursive. Here is my code so far: > Hi, Yes, it's recursive,

Re: [Chicken-users] CHICKEN 5.0.0 release candidate 4 available

2018-10-29 Thread megane
Hello, Everything looks OK here. Operating system: Linux 4.15.0-34-generic #37~16.04.1-Ubuntu SMP Tue Aug 28 10:44:06 UTC 2018 x86_64 GNU/Linux Hardware platform: x86-64 C Compiler: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609 Installation works?: yes Tests work?: yes Installation of

Re: [Chicken-users] srfi-128 - almost

2018-08-18 Thread megane
Hi Jörg, Jörg F. Wittenberger writes: [...] > Brings back the question: how would I tell chicken to temporarily consult > other locations for egg distributions? E.g. I'd like to use chicken-install > in a fresh location outside the source directory of the egg to check that > the whole

Re: [Chicken-users] types - compiler too optimistic?

2018-07-10 Thread megane
Martin Schneeweis writes: > Hi, > > back at playing with types - my current impression is that the compiler > is a little too optimistic (goal: get as much warnings as > possible - optimizations are no concern here). > [snip] Hi Martin, There are known limitations in the type checker

Re: [Chicken-users] A question about keywords and symbol->string

2017-03-21 Thread megane
Evan Hanson writes: > Anyway, to get a string that *looks* like a keyword, the easiest option > is probably to go via the written representation with something like: > >(format "~s" foo:) > > However note that this is sensitive to the keyword-style parameter, as > hinted

[Chicken-users] A question about keywords and symbol->string

2017-03-16 Thread megane
Hello, Currently symbol->string strips any keyword prefixes when applied to keywords (e.g. (symbol->string 'foo:) returns "foo"). Is this correct behavior? Is there a way to get the full symbol name (i.e. #:foo -> "#:foo", and foo: -> "foo:")? Little background follows.. I was trying to define

Re: [Chicken-users] Question about procedure type annotations

2012-10-27 Thread megane
Felix writes: From: megane megan...@gmail.com Subject: [Chicken-users] Question about procedure type annotations Date: Wed, 24 Oct 2012 18:54:09 +0300 Hi! Below is an example that fails. Is this expected behavior? It feels a bit redundant to use 'assume' for the parameter

[Chicken-users] #!rest in type declarations

2012-10-27 Thread megane
Hello. Consider this example: (: apply1 (forall (a b) (procedure ((procedure (#!rest a) b) (list-of a)) b))) (define (apply1 f args) (apply f args)) (cond-expand (compiling (compiler-typecase (list 'a 2 3) ((list-of (or symbol fixnum)) #t (cond-expand (compiling

[Chicken-users] Question about procedure type annotations

2012-10-24 Thread megane
Hi! Below is an example that fails. Is this expected behavior? It feels a bit redundant to use 'assume' for the parameter 'a' as the type for the procedure has already been declared. (: foo (fixnum - undefined)) (define (foo a) (cond-expand (compiling (compiler-typecase a (fixnum

[Chicken-users] Receiving from multiple mailboxes

2012-10-18 Thread megane
Hi. I've been toying with the mailbox egg. AFAIK there's currently no way to wait messages from multiple mailboxes at the same time. Is there a reason this is not supported? I made a quick hack that seems to not break immediately. There's a new procedure `mailbox-receive-many!' that takes a

[Chicken-users] Fwd: Re: Continuation finalization and delimited continuations

2012-10-06 Thread megane
Hi all. Here's a short discussion I had with Kon Lovett. I'm forwarding it here for anyone interested. With Kon's kind permission, of course. --- megane writes: Kon Lovett writes: On Oct 4, 2012, at 12:50 PM, megane wrote: Kon Lovett writes: On Oct 4, 2012, at 11:45 AM, megane wrote

[Chicken-users] Continuation finalization and delimited continuations

2012-10-04 Thread megane
Hi there, I've been playing with the F-operator egg a bit. Specifically, I've made some simple tests using the %shift/%reset construction. These are the ones that avoid calling any dynamic wind thunks when calling a continuation that's not the current one or sth. Now, does anybody have any idea

[Chicken-users] Problems with compilation units and modules

2012-05-21 Thread megane
Hello, I'm trying to define a module in a separate compilation. Here's a simple example that I can't get to compile: File: src/myutil.scm - (module myutil * (import chicken scheme) (define (foo) (print myutil foo))) (define (bar) (print myutil bar)) File: src/main.scm - ;;