chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re : Re : [Chicken-users] hacking the mailbox egg


From: Kon Lovett
Subject: Re: Re : Re : [Chicken-users] hacking the mailbox egg
Date: Sun, 7 Jan 2007 12:25:17 -0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


<snip>
As you said, the first lines of queue.scm define some %car,... to
1/ be inlined
2/ use ##sys#slot
Is it mandatory to do this to be included in the disabling- interrupts file ?
Both of 1/ and 2/ ?

No. Is it not mandatory to ever use a sys namespace routine (there are a few exceptions) & one should try not to use such routines. Do not be confused by the use of ##sys#slot, etc. by mailbox. As I said earlier it is the style of the original author & historical to boot.


If the above is true, what are the real primitives of chicken (that
can thus be used without 'getting out' of the file) ?

I do not understand "... without 'getting out' of the file".

Stay away from the "true" primitives of Chicken. These are inlined C code. Chicken is primarily a compiler. You can see these things by looking in the .scm source for Chicken units, like library.scm.

Whenever possible do not stray from R5RS or a SRFI. Your situation is a little special since you are hacking an existing egg that does stray (mostly for no good reason except history). You can freely intermix '(##sys#slot p 1)' & '(cdr p)', they are the same thing. The compiler will even recognize 'cdr' & inline it.

Again, the use of ##sys# stuff in mailbox is historical & not an example for preferred style. Except for '##sys#thread-unblock!' & '##sys#delq' which are unavailable in the global namespace. '##sys#current-thread', '##sys#structure?', & '##sys#make-structure' are available in other forms, & ##sys#check-structure can be done differently.


Thanks, and sorry for those lengthy questions,
mt

No problem. Thanks for making look inside the mailbox code. I spotted a bug. (Fixed.)

Best Wishes,
Kon

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iEYEARECAAYFAkWhVy0ACgkQJJNoeGe+5O5hnACeOBsy64j76fKy89gb3+fza2kt
zOUAniH7x6L1/jvI7i9+rxnXqX5AlUHk
=Uruj
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]