Re: [Chicken-users] New SDL2 eggs; help wanted
I feel like Alex Charlton might be interested in this Egg. https://github.com/AlexCharlton -Dan On Wed, Nov 4, 2015 at 1:41 PM, Koodawrote: > On Wed, Nov 04, 2015 at 01:35:13PM -0800, Dan Leslie wrote: > > As a potential user and implementor of similar eggs (Allegro, SOIL, .. > nanovg), I would provide fairly lean bindings first, then do any > simplification or hand-holding as an additional module. It will save you > time in the near term and provide flexibility to the users. > > > > -Dan > > It seems to already be the case. There is a sdl-internals module used by > the public sdl2 module. > > > ___ > Chicken-users mailing list > Chicken-users@nongnu.org > https://lists.nongnu.org/mailman/listinfo/chicken-users > ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] ANN: NanoVG egg
Since it's hot stuff to be announcing new eggs and eggs-in-development, let me throw my hat in! I've completed bindings to NanoVG, a wicked-fast vector graphics library for OpenGL 2, 3, ES2, and ES3; I consider it *unfinished* because I have yet to complete porting the demo. Those interested can see the in-progress egg at: https://github.com/dleslie/nanovg-egg Thanks! -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] x32 ABI fits Chicken very well
On Tue, Sep 1, 2015 at 12:53 AM, Peter Bexwrote: > This is the same limit that applies to i386, > which I think is one of the most important limitations of 32 bit CHICKEN. > Worth noting is that OpenBSD still supports i386, which is mentioned as a platform in the wiki: http://wiki.call-cc.org/platforms#openbsd http://www.openbsd.org/i386.html -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] unbound variable: or
'or' is a macro, and macros cannot be used as the first operand in apply. -Dan On Wed, May 27, 2015 at 1:25 PM, Jinsong Liang jinsongli...@gmail.com wrote: Hi, In Chicken, (apply + '(1 2)) returns 3, which is expected. However, if I try: (apply or '(#t #f)) Error: unbound variable: or Why (apply or '(#t #f)) does not work? Thank you! Jinsong ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] egg names
Definitely in favour of a rename. There was an issue recently where a user couldn't install a package that dependent on cock but was unable to due to the corporate firewall. -Dan Sent from my BlackBerry 10 smartphone. Original Message From: Peter Danenberg Sent: Sunday, May 3, 2015 12:59 PM To: Matt Welland Cc: chicken-users Subject: Re: [Chicken-users] egg names I accidentally replied direct to Peter in my reply to the call-with-environment-variables thread. That's ok, I CC'd the list; I'm talking to Peter, Moritz and Mario about a rebranding. Might do a deprecate, fork, rename kind of thing. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Some syntax help?
The incorrect code that CSC allows other things to work on: This should have stated CSI. -Dan On Sat, May 2, 2015 at 8:01 AM, Dan Leslie d...@ironoxide.ca wrote: Hi Chickeners! Around two weeks ago I received a bug report that the monad egg wasn't working in CSC. This turned out to be the result of a syntax error, and though I've greatly simplified the syntax and narrowed the issue considerably, I find myself stuck in a corner while surrounded by wet paint. Working branch is here: https://github.com/dleslie/monad-egg/tree/compiler-import-bug The issue is thus: the egg does some heavy lifting of syntax transforms, and there exists a utility such that a user might bind new symbols while within the quoted syntax of a stack of transformers. It looks like this: (do state (/m! put 99) (x - (/m get)) (return x)) Which would expand to something similar to: (state-bind (state-put 99) (state-bind (state-get) (lambda (x) (state-unit x I think; it's early. ;) Anyhow, notice that the /m and /m! transforms occur within the do syntax; the do syntax transforms through do-using, %unroll-do-using, and finally to using; where they're defined dynamically within a quoted syntax block. Here's the wierdness: this works magnificently in CSI, but fails in CSC. Moreover, if I replace /m! with a broken variant then /m works great in both CSI and CSC! I know, it doesn't make much sense to me either. My best guess is that /m! failing somehow short-circuits a code path in the compiler and so allows /m to function as I expect. The correct code that CSC breaks on: https://github.com/dleslie/monad-egg/blob/compiler-import-bug/monad.scm#L58-L61 And test output: https://gist.github.com/71cc934fbc9fc7fa2d86 The incorrect code that CSC allows other things to work on: https://github.com/dleslie/monad-egg/blob/compiler-import-bug/monad.scm#L63-L66 And test output: https://gist.github.com/d0c276f7ed243d79166b Any thoughts would be appreciated. :D Thanks! -- -Dan Leslie ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Updating the zmq egg
Just a thought; but does nanomsg interoperate nicely with protobuf?-DanSentfrommyBlackBerry10smartphone.From: Matt GusheeSent: Monday, March 9, 2015 11:35 AMTo: chicken-users@nongnu.orgSubject: Re: [Chicken-users] Updating the zmq eggFirst of all, thanks to all who responded - especially Thomas, for the extended code example.I think I may use nanomsg after all.On Mon, Mar 9, 2015 at 2:06 AM, Kristian Lein-Mathisen kristianl...@gmail.com wrote:The main reason I wanted to try nanomsg was that it offers Level-triggered Polling.This allows us to do thread-wait-for-i/oon a nanomsg-socket, waiting for a message while other Chicken threads are running. We couldn't solve this with zmq because the zmq_poll C call (just like all C calls) would block the Chicken world.So I discovered. And I'm not sure yet if this will affect my project - it's a great big experiment - but I think there's a significant chance of it.No final decision yet. But I did see that even though nanomsg doesn't appear to have a large community yet, it was created by one of the original 0MQ developers, and seems to have good reasons for existing.--Matt Gushee ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Geiser 0.7 Released (Chicken Support!)
Geiser 0.7 is out, which adds Chicken support! For those unaware, Geiser adds some slick features to Emacs when editing Scheme: - eldoc support for showing signatures and values of symbols - completion-at-point based on symbols bound in the active scheme - smart-indenting, module completion, documentation lookup, et cetera From the NEWS: * Version 0.7 Freija This release is dedicated to Dan's three-months-old daughter Freija, who shared her dad's lap with his laptop while he was hacking on the new Chicken scheme support for Geiser. New features: - Chicken support, by Dan Leslie. Improved features: - `company-mode' support completed with a method for `doc-buffer'. - Support for multiple image display in Racket, including image objects embedded in structured values (thanks to Greg Hendershott). To have Geiser work (mostly) as expected, you will need to follow the Chicken addendum: * Chicken Addendum These steps are necessary to fully support Chicken Scheme, but are not required for any other scheme. - Install the necessary support eggs: $ chicken-install -s apropos chicken-doc - Update the Chicken documentation database: $ cd `csi -p '(chicken-home)'` $ curl http://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | sudo tar zx Additionally, *be certain that Geiser knows to use Chicken*. You can check which Scheme is being used by looking at the modeline. You set the scheme by either: - Add a comment like the following at the top of the file: ;; chicken - Set the geiser active implementations appropriately: (setq geiser-active-implementations '(chicken)) The following caveats apply: - M-. is unavailable. There is no ability to jump to the definition of a symbol. - Multiple modules in a single file. I don't know how this would behave. - Macros lack proper eldoc information, because apropos is unable to provide the signature for macros. Geiser is available through MELPA, or on Github. https://github.com/jaor/geiser/ Enjoy! -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Status of Slime egg (aka alternatives to default Inferior Scheme mode)
The slime egg is basically abandoned. The original author bio longer has time to maintain it and is no longer writing chicken code. I put in some patches to prop it back up to a point it would execute, but... (Shameless plugs inbound). There's also alpha-quality support for chicken in development for geiser, as well as the chicken-scheme.el package. Chicken itself ships with chicken.el, as well. https://github.com/dleslie/chicken-scheme.el https://github.com/dleslie/geiser I would appreciate feedback for geiser, of you're interested. -Dan On 31 Jan 2015 06:12, Bahman Movaqar bah...@bahmanm.com wrote: The default Inferior Scheme mode in Emacs is really not the best REPL experience possible. I wonder if you people are using slime egg[1] and if yes, how do you find it? Or are there any other options besides them? [1] http://wiki.call-cc.org/eggref/4/slime -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com) ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Arch User Repository packages
I've never liked the duplication within the system package manager. Ensuring Eggs are available and installed could be done as part of the tools' install script. -Dan On 9 Jan 2015 14:40, Alexej Magura agm2...@gmail.com wrote: I'd forgotten about tools written in Chicken Scheme; it's a very valid point. On 01/09/2015 03:39 PM, Aaron Paden wrote: I don't think that's quite right. Python also offers similar tools, but every Linux distro I've seen also supplies Python packages in their repositories. While pip is great for development, when it comes to distribution, end-users on Linux still expect to be able to use their package manager to install applications, which necessarily requires using the package manager to handle dependencies. I don't know if there are any traditional Unix-style applications or utilities written in Chicken Scheme being distributed to end-users currently, but the reason why I'm even checking it out is because it does seem better suited to this task than a lot of other Lisp/Scheme implementations. On Fri, 2015-01-09 at 15:12 -0700, Alexej Magura wrote: Yeah, offering eggs via any other method, but chicken-install, is an overly complicated and unnecessary solution to a non-existent problem, and the solution tends to breed more problems of its own. Such as: how do I check if there's a more recent release for egg XYZ I'd send a request to AUR General, IIRC that's the appropriate mailing list, and ask them to delete the AUR packages in question. On 01/09/2015 03:05 PM, co...@ccil.org wrote: IMO, system-specific package libraries should be used only for Chicken itself, and eggs should be updated solely by chicken-install. -- Alexej Magura -- Alexej Magura ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] [Ann] New eggs: Hyperscene and Hypergiant
I love it! Than-you for the hard work. -Dan On 6 Jan 2015 12:47, Alex Charlton alex.n.charl...@gmail.com wrote: Hi Chickeneers, I'm happy to announce two new eggs: Hyperscene and Hypergiant. Hyperscene is a relatively low-level scene management library that is a set of bindings to a C library of the same name. Hypergiant uses Hyperscene, and many other eggs, to create a library aimed at making games in CHICKEN. Hypergiant itself is mainly a glue library which makes it possible to work with OpenGL at a relatively high level of abstraction. It *tries* to balance ease of use with extensibility, while maintaining an efficient implementation. Beyond working with OpenGL, Hypergiant attempts to provide all of the support needed in order to get things up and running quickly, while allowing enough flexibility to be extensible in any way that you might want. If this interests you, check out the docs for these eggs here: http://wiki.call-cc.org/eggref/4/hyperscene http://wiki.call-cc.org/eggref/4/hypergiant I also wrote a tutorial about working with Hypergiant which is probably a good starting point: http://alex-charlton.com/posts/Prototype_to_polish_Making_games_in_CHICKEN_Scheme_with_Hypergiant/ In sum, I'm fairly certain that Hypergiant is one of the more novel general-purpose game libraries available, and it wouldn’t have been the same without the delightful CHICKEN. So many thanks to everyone who's helped make this possible! Cheers, -- Alex ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Happy Christmas
Happy Holidays from Victoria, Canada! -Dan On Wed, Dec 24, 2014 at 4:48 AM, Tim van der Linden t...@shisaa.jp wrote: Hi all, Thanks Felix. Same here from the warm Okinawa, Japan. Have a blast this Christmas and best wishes for the next year, to all! Cheers, Tim On 24 Dec 2014, at 21:40, Felix Winkelmann felix.winkelm...@bevuta.com wrote: Hey! I wish all of you a very happy christmas and a blissful new year! felix ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] testing if a symbol has been interned
You could use the apropos egg to accomplish this. -Dan On Fri, Dec 19, 2014 at 10:38 PM, Alexej Magura agm2...@gmail.com wrote: In Common Lisp, clisp specifically, you can test whether a symbol has been bound, that is interned, or not using boundp; is there a way to do this in Chicken? (boundp 'a) ; nil (defvar a 1) (boundp 'a) ; t I wrote up a function once a while back that used exception handling to check if a symbol had been defined, but if there's already an egg that provides this support or if it's built-in, I wanted to know so that I wouldn't have to bother trying to rewrite said function. -- Alexej Magura ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] testing if a symbol has been interned
Relatedly, is there a tool that can describe *where* a symbol was bound? -Dan On Fri, Dec 19, 2014 at 10:45 PM, Kon Lovett konlov...@gmail.com wrote: On Dec 19, 2014, at 10:38 PM, Alexej Magura agm2...@gmail.com wrote: In Common Lisp, clisp specifically, you can test whether a symbol has been bound, that is interned, or not using boundp; is there a way to do this in Chicken? (boundp 'a) ; nil (defvar a 1) (boundp 'a) ; t I wrote up a function once a while back that used exception handling to check if a symbol had been defined, but if there's already an egg that provides this support or if it's built-in, I wanted to know so that I wouldn't have to bother trying to rewrite said function. Look at the symbol-utils egg unbound-value unbound-value? unbound? #;1 (use symbol-utils) #;2 (unbound? 'foo) #t #;3 (unbound? '+) #f -- Alexej Magura ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] [ANN] OAuth Egg v0.2 Released
Ooh, I rather like that talk. Thanks for the eggs! -Dan On 18 Dec 2014 09:24, Andy Bennett andy...@ashurst.eu.org wrote: Hi everyone, I've released v0.2 of the OAuth Egg: http://wiki.call-cc.org/eggref/4/oauth This release brings support for HMAC-SHA1 signing and a few bug fixes when using the 1.0a and RFC 5849 modes. This egg has now been verified with at least the APIs of Dropbox and Twitter. Thanks to Nick Van Horn for reporting some bugs and spurring me into action! For those of you binding HTTP APIs, you might also be interested in the rest-bind egg: http://wiki.call-cc.org/eggref/4/rest-bind ...and you can complement the documentation with my recent talk about the rationale behind it: https://www.youtube.com/watch?v=nzS48beMxwo Regards, @ndy -- andy...@ashurst.eu.org http://www.ashurst.eu.org/ 0x7EBA75FF ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] What does (let X ...) do?
It is a named let, details here: http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-1.html#node_toc_node_sec_6.2 -Dan On 16 Dec 2014 13:58, Bahman Movaqar bah...@bahmanm.com wrote: Reading on lazy-seq [1]; what exactly does the following piece of code do? (let foo ((x 10)) (* x x)) TIA, [1] http://wiki.call-cc.org/eggref/4/lazy-seq -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com) ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] SRFI-99 - What is a variant type?
I'll chime in that I also find it a little clumsily written, but that it reads to me like variant types are, in practice, little more than different ways of identifying the same data. Which seems like something you could do with an additional field, but perhaps you aren't interested in exposing any implementation details of your type to the user and so this sort of behaviour is desirable. That said, I've never seen it in use. -Dan On Sun, Dec 14, 2014 at 9:58 PM, Bahman Movaqar bah...@bahmanm.com wrote: On 12/15/2014 08:38 AM, Alex Shinn wrote: This appears to be a chicken-specific extension: http://www.chust.org/fossils/srfi-99/wiki?name=variant+types I'm not sure I understand that description, but appears to be something like a union type? Thanks for your answer Alex. I didn't understand it either :-) On Mon, Dec 15, 2014 at 12:12 PM, Bahman Movaqar bah...@bahmanm.com mailto:bah...@bahmanm.com wrote: Reading the docs on SRFI-99 [1], I need some help understanding what is a variant type. Would someone please pass me a relevant link to read? -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com) ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Replace an element in a list
There are setters for car and cdr, so let's say you're at a position where you want to replace the head of a list, you can then just do: (set! (car some-list) some-value) -Dan On Sat, Dec 13, 2014 at 3:59 PM, Bahman Movaqar bah...@bahmanm.com wrote: What is the idiomatic way of replacing the nth element in a list *without* mutating the list? Is the combination of take and take-right the right way to do it? TIA, -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com) ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Geiser support teaser
https://github.com/jaor/geiser/pull/48 ;) -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Working on Geiser integration
As a follow-up to my earlier inquiries regarding SLIME, I'd like to notify those who were interested that I've opted to instead work on Geiser support. The path to full support seems a little easier and, IMHO, the integration with Scheme is more natural. AFAICT, previous efforts to support Chicken in Geiser have been abandoned and never made it much farther than launching the interpreter. Please inform me if I am mistaken in this regard. My efforts are here: https://github.com/dleslie/geiser Currently, CAPF is working, so by extension I expect ac-geiser works as well, though I haven't tried yet. I expect to have the bulk of the remaining work done in the next few weeks, as I have a whole lot of free time. At the moment there's a three week old little girl wrapped to my chest, and I've been taking the long night shifts for bottle feeding which give me plenty of time to hack. Take care, -Dan PS- I cross-posted to chicken-hackers because I believe this is relevant to those who may be able to provide some advice in sussing out the internals. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Interest in SLIME?
I spent some time today looking into what amount of effort it would take to add swank-trace-dialog support to the existing SLIME egg; it turns out that it's quite doable, but as I have a slew of projects on the go I thought I'd gauge if there's any interest outside of my own inquisitiveness for such an enhancement? Relatedly, I've been submitting patches to fix errors in the SLIME egg that have resulted from code rot; so if you're like me and you use the bleeding edge of Emacs, it should be known that the SLIME egg is sorta usable once again. Does anyone know if eldoc support ever functioned with the SLIME egg? Thanks, -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Macros and loading compiled code
I think you need to define the import library when building both test.scm and test.import.scm. If I do so, your test works: dleslie@marvin:~$ csc -s test.scm -j test dleslie@marvin:~$ csc -s test.import.scm -j test dleslie@marvin:~$ csi CHICKEN (c) 2008-2014, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.9.0 (rev 3f195ba) linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ] compiled 2014-06-02 on yves (Linux) #;1 (import test) ; loading ./test.import.so ... ; loading /var/lib//chicken/7/chicken.import.so ... #;2 (a-macro 1 2) 3 #;3 -Dan On Wed, Sep 10, 2014 at 3:26 AM, Richard plui...@freeshell.de wrote: On Wed, 10 Sep 2014 00:01:54 -0700 alex a...@cs.utah.edu wrote: Hi, I defined a macro. I compiled it separately and built it into my main program. When my main program calls the load procedure on normal Scheme source files, the procedures in these files use the macro without complaint. However, when it loads the dynamic object code created from compiling those same source files, I get an error about an unbound value in a subexpression of a macro expression. This seems to be because the macro expressions are being evaluated as normal procedure applications. If I insert the macro definition verbatim into each source file before I compile it, the errors do not occur. I tried passing both the source file and the macro definition file as input to the compiler. The errors remain. What else can I do to ensure that the dynamic object code knows about the macro definition? --Alex ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users Try wrapping a module around the code to be compiled separately. Compile it using the '-j module-name' flag then compile the generated scheme file: module-name.import.scm $ cat test.scm (module test * (import chicken scheme) (define-syntax a-macro (syntax-rules () ((_ l r) (+ l r (define (a-function l r) (+ l r)) ) compile like so: $ csc -s test.scm -j test $ csc -s test.import.scm use it like so: $ csi #;1 (load test.so) #;2 (import test) #;3 (a-function 1 2) 3 #;4 (a-macro 1 2) 3 I hope this is useful to you, greetings, Richard ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Live programming with Chicken
Unless I missed a radical change in Chicken, its SRFI-18 threads are green threads and not real system threads. As a result, blocking operations will block all threads and no real gain is had from the hardware's support for multithreading. Because of those issues I suggest avoiding SRFI-18 threads altogether. They aren't worth the hassle. -Dan On 3 Jul 2014 04:13, Kristian Lein-Mathisen kristianl...@gmail.com wrote: That is strange, I've experienced alex's problem too - having to yield a little to give the REPL some room. Anyhow, for others who might come across this thread: alex's idea works great, but you need to be careful with blocking IO on your REPL. If you don't use parley http://api.call-cc.org/doc/parley or something similar, chances are that your REPL srfi-18-thread will block your srfi-18-game-thread while it's waiting for IO. K. On Wed, Jul 2, 2014 at 9:07 PM, John Cowan co...@mercury.ccil.org wrote: alex scripsit: I had some trouble with this last part at first: the original thread waited several seconds before evaluating my input. I think that the fix was nothing more than calling thread-yield! every loop iteration. If you are depending on thread-yield! for correctness rather than efficiency, you are doing something wrong (but I don't know what). SRFI 18 schedulers are not required to be fair in any way. -- John Cowan http://www.ccil.org/~cowanco...@ccil.org He that would foil me must use such weapons as I do, for I have not fed my readers with straw, neither will I be confuted with stubble. --Thomas Vaughan (1650) ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] [ANN] glls version 0.3.0
That is a thing of beauty. -Dan On 31 May 2014 07:52, Alex Charlton alex.n.charl...@gmail.com wrote: As promised, glls now supports the (optional) automatic generation of functions for rendering pipelines. This function generation manifests differently depending on whether your file is compiled or evaluated. When compiled, rendering functions are compiled to efficient C. When evaluated, a generic (not remotely efficient) rendering function is used. glls also now provides support for dynamic reevaluating of pipelines in such a way that the old program object ID is reused, so that your scene is instantly updated. Two new examples were added (texture.scm and interactive.scm) to illustrate these new features: https://github.com/AlexCharlton/glls/tree/master/examples And, of course, the documentation describes these changes in detail: https://wiki.call-cc.org/eggref/4/glls glls is now a rather unique library for shader creation. Not only does it provide far tighter integration into the host language than the usual method for working with shaders, but it also makes few to zero speed sacrifices (when compared to hand-written C) even when the automatically generated rendering functions are used. These features were very much born out of Chicken’s unique strengths – I really can’t imagine combining them in any other language or even Scheme implementation. A big thanks to the Chicken team for creating a language and environment where this sort of thing is possible! -- Alex ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] LevelDB bindings
set-finalizer! Is with considering for memory management as well. On 20 Apr 2014 16:54, Kristian Lein-Mathisen kristianl...@gmail.com wrote: Hey Caolan, And welcome to the Chicken community! Your leveldb eggs seems pretty well written, nice work! Not much to comment on, but I'll put down what I noted as I quickly browsed through the code. Have you looked at the bind egg? It may help you out with basic C++ bindings for things like class instantiation, methods and fields. In your leveldb.setup file, you can use capital -j and leave out the module name. In you call-with-db definition, you could probably do the same with less code using dynamic-wind. And a quick note on naming conventions. I noted you've got things like strings-slice, where the return value needs to be freed with delete-slice. Since that's just private api, I'm sure you'll get away with it. I wonder though, if there's a a way to indicate you need to be careful. Perhaps a % prefix or * postfix might be suitable. Or perhaps a call-with-slice convention that always deletes with dynamic-wind might be suitable? I don't know its performance properties, though. Same for check-status, which deletes its argument with delete-status. Perhaps a ! postfix, ie check-status!? I hope I can get to play around with leveldb and thus egg at some point! Thanks for your contribution! K. On Apr 20, 2014 3:00 PM, Caolan McMahon caolan.mcma...@gmail.com wrote: Hi all, I'm new to the list (and CHICKEN) *waves* I thought I'd have a go at writing an egg and put together some bindings to Google's LevelDB embedded key/value store. I've published it at https://github.com/caolan/chicken-leveldb Can someone please help me with getting it onto the egg index? I'd also appreciate any advice people have on coding style / egg layout etc. since I'm still getting the hang of this. Thanks, Caolan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] CHICKEN 4.9.0rc1 is available
Could we get the following C functions exposed to scheme? C_find_symbol_table C_enumerate_symbols Unless I'm mistaken, there's no way to access symbol table information from scheme at the moment; these two in particular would make tag completion in my emacs config far, far superior. -Dan On Fri, Apr 18, 2014 at 6:12 AM, Mario Domenech Goulart mario.goul...@gmail.com wrote: Hi, The first release candidate for CHICKEN 4.9.0 has been released. It's available at http://code.call-cc.org/dev-snapshots/2014/04/17/chicken-4.9.0rc1.tar.gz See http://code.call-cc.org/dev-snapshots/2014/04/17/NEWS for the list of changes. Please, give it a test and report back to the mailing list your findings. Here's a suggested test procedure: $ make PLATFORM=platform PREFIX=some dir install check $ some dir/bin/chicken-install pastiche If you want to build CHICKEN with a compiler other than the default one, just use C_COMPILER=the compiler (e.g., C_COMPILER=clang) on the make invocation. Of course, feel free to explore other supported build options (see the README file for more information) and actually use CHICKEN 4.9.0rc1 for your software. If you can, please let us know the following information about the environment you tested the RC tarball on: Operating system: (e.g., FreeBSD 10.0, Debian 7, Windows XP mingw-msys) Hardware platform: (e.g., x86, x86-64, PPC) C Compiler: (e.g., GCC 4.8.1, clang 3.0-6.2) Installation works?: yes or no Tests work?: yes or no Installation of eggs works?: yes or no Thanks in advance. The CHICKEN Team -- http://www.call-cc.org ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] CHICKEN 4.9.0rc1 is available
Hmm, I already use ##sys#current-environment and ##sys#macro-environment; but I wasn't aware of ##sys#module-table or ##sys#module-exports. However, wouldn't it be the case that they wouldn't be much help in a module-free environment; or are the base units considered in their search? What I'm thinking is the case of *call/cc*, a symbol missed by my current process. -Dan On 18 Apr 2014 08:13, Mario Domenech Goulart mario.goul...@gmail.com wrote: Hi Daniel, On Fri, 18 Apr 2014 08:08:57 -0700 Daniel Leslie d...@ironoxide.ca wrote: Could we get the following C functions exposed to scheme? C_find_symbol_table C_enumerate_symbols Unless I'm mistaken, there's no way to access symbol table information from scheme at the moment; these two in particular would make tag completion in my emacs config far, far superior. Wouldn't something like http://call-with-hopeless-continuation.blogspot.com.br/2009/12/introspeccao-de-modulos-em-chicken.html do the trick? (In portuguese, but I hope the code helps.) Best wishes. Mario -- http://parenteses.org/mario ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] CHICKEN 4.9.0rc1 is available
I'm specifically trying to avoid adding chicken module dependencies to the elisp. :) -Dan On Fri, Apr 18, 2014 at 8:21 AM, Kon Lovett konlov...@gmail.com wrote: On Apr 18, 2014, at 8:13 AM, Mario Domenech Goulart mario.goul...@gmail.com wrote: Hi Daniel, On Fri, 18 Apr 2014 08:08:57 -0700 Daniel Leslie d...@ironoxide.ca wrote: Could we get the following C functions exposed to scheme? C_find_symbol_table C_enumerate_symbols Unless I'm mistaken, there's no way to access symbol table information from scheme at the moment; these two in particular would make tag completion in my emacs config far, far superior. Wouldn't something like http://call-with-hopeless-continuation.blogspot.com.br/2009/12/introspeccao-de-modulos-em-chicken.html do the trick? The apropos egg also searches the environment. See search-system-environment-symbols the supporting code. (In portuguese, but I hope the code helps.) Best wishes. Mario -- http://parenteses.org/mario ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] [ANN] New egg: opengl-glew
FYI, those using the Allegro egg already gain access to most/all gl extensions: http://wiki.call-cc.org/eggref/4/allegro/gl Also, this portion of the Allegro egg was forked out as the glext egg, though it's poorly documented: http://wiki.call-cc.org/eggref/4/glext https://github.com/dleslie/glext -Dan On Mon, Apr 14, 2014 at 5:08 AM, Mario Domenech Goulart mario.goul...@gmail.com wrote: Hi Alex, On Sun, 13 Apr 2014 16:12:08 -0400 Alex Charlton alex.n.charl...@gmail.com wrote: opengl-glew provides bindings to OpenGL’s core profile while handling extension loading with GLEW: https://github.com/AlexCharlton/chicken-opengl-glew There are two existing eggs that have some degree of overlap with this one. The opengl egg provides only the older fixed function pipeline API. OpenGL has changed the majority of its API since then, so it’s not useful for writing modern graphics programs. The allegro egg provides some more recent OpenGL bindings (they seem to have been last updated in 2012), but relies on Allegro which not everyone wants as a dependency. opengl-glew uses the widely used GLEW to handle its extension loading, making this egg immediately useful to most programmers who work with modern OpenGL. Further, it is guaranteed to always be up-to-date with the latest OpenGL core profile, because it downloads the glcorearb header file from opengl.org and uses it to generate its bindings. Some high-level convenience functions are also provided. Mario, could you please add this to the egg list: https://raw.githubusercontent.com/AlexCharlton/chicken-opengl-glew/master/opengl-glew.release-info Cool. Thanks a lot. I've added your new egg to the coop. I have a few notes, though. I don't think downloading glcorearb.h at install time is a good idea. Here are some of the reasons: * it'll probably make the life for system packagers a bit difficult, since it'll be hard to have a predictable source code based only on opengl-glew egg's version. For example, glcorearb.h may change while opengl-glew is at the same version -- you'd have the same version for the package, but the source code may be different. * people that fetch eggs source code to install on systems with no Internet connection will probably have a hard time installing opengl-glew. * opengl-glew relies on wget. AFAIK, it's not available on Windows by default. I think this dependency should be mentioned on the documentation (probably in the Requirements section). Best wishes. Mario -- http://parenteses.org/mario ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] [ANN] New egg: opengl-glew
Sorry, I just woke up. That was rather terse of me. :) This is an awesome egg, and I think it's very much needed. The glext egg never really got off the ground, and Chicken's existing GL library is sorrowfully lacking in modern features. Anyhow, thanks for the Egg! -Dan On Mon, Apr 14, 2014 at 6:58 AM, Daniel Leslie d...@ironoxide.ca wrote: FYI, those using the Allegro egg already gain access to most/all gl extensions: http://wiki.call-cc.org/eggref/4/allegro/gl Also, this portion of the Allegro egg was forked out as the glext egg, though it's poorly documented: http://wiki.call-cc.org/eggref/4/glext https://github.com/dleslie/glext -Dan On Mon, Apr 14, 2014 at 5:08 AM, Mario Domenech Goulart mario.goul...@gmail.com wrote: Hi Alex, On Sun, 13 Apr 2014 16:12:08 -0400 Alex Charlton alex.n.charl...@gmail.com wrote: opengl-glew provides bindings to OpenGL’s core profile while handling extension loading with GLEW: https://github.com/AlexCharlton/chicken-opengl-glew There are two existing eggs that have some degree of overlap with this one. The opengl egg provides only the older fixed function pipeline API. OpenGL has changed the majority of its API since then, so it’s not useful for writing modern graphics programs. The allegro egg provides some more recent OpenGL bindings (they seem to have been last updated in 2012), but relies on Allegro which not everyone wants as a dependency. opengl-glew uses the widely used GLEW to handle its extension loading, making this egg immediately useful to most programmers who work with modern OpenGL. Further, it is guaranteed to always be up-to-date with the latest OpenGL core profile, because it downloads the glcorearb header file from opengl.org and uses it to generate its bindings. Some high-level convenience functions are also provided. Mario, could you please add this to the egg list: https://raw.githubusercontent.com/AlexCharlton/chicken-opengl-glew/master/opengl-glew.release-info Cool. Thanks a lot. I've added your new egg to the coop. I have a few notes, though. I don't think downloading glcorearb.h at install time is a good idea. Here are some of the reasons: * it'll probably make the life for system packagers a bit difficult, since it'll be hard to have a predictable source code based only on opengl-glew egg's version. For example, glcorearb.h may change while opengl-glew is at the same version -- you'd have the same version for the package, but the source code may be different. * people that fetch eggs source code to install on systems with no Internet connection will probably have a hard time installing opengl-glew. * opengl-glew relies on wget. AFAIK, it's not available on Windows by default. I think this dependency should be mentioned on the documentation (probably in the Requirements section). Best wishes. Mario -- http://parenteses.org/mario ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Portable installs broken?
I'm trying to create a 'portable' distribution of chicken and am running into a simple issue. Basically, the built-in library search path isn't always valid, and csc and csi don't appear to pay attention to LD_LIBRARY_PATH. Thus, the following: bin $ ./csi -n CHICKEN Error: (string-append) bad argument type - not a string: #f bin $ echo (display \Hello world\) | ./csc - -o foo Error: (string-append) bad argument type - not a string: #f Call history: syntax (##core#begin (display Hello world)) syntax (display Hello world)-- Error: shell command terminated with non-zero exit status 17920: bin/chicken - -output-file foo.c Alright, so with csi and csc we can get around this by explicitly providing a -include-path parameter at the command line. But what of installing eggs? Chicken-install takes no such parameter, and invocations of csc from setup scripts are not mutable to accept the parameter. It seems to me that the easy fix would be to import a path from some environment variable by default. Does such an environment variable exist already? -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Chicken 4.8.0.3 failing with Clang 3.2 and 3.4
I'm not able to build Chicken 4.8.0.3 with clang, either 3.2 or 3.4. GCC works well. The build fails with the following: ./libchicken.so: file not recognized: File truncated Invocation: make -j4 PLATFORM=linux C_COMPILER=clang System: uname -a Linux dleslie-Aspire-5250 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux Thanks, -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Bug fix for bind 1.5.2
The following should fix passing objects by reference in member functions: *** ./bind/bind-translator.scm2014-03-30 12:49:46.902558238 -0700 --- ../bind/bind-translator.scm2014-03-30 12:48:47.290262641 -0700 *** *** 1298,1303 --- 1298,1304 [('const t) (rec t)] [('function . _) 'pointer] [('instance _ c) c] + [('instance-ref _ c) c] [((or 'c-pointer 'ref) x) (if io (rec x) I can't take credit for this, I lifted it from here: https://github.com/kristianlm/chicken-bind/commit/0e093935560069321ff5ecf39382978166f3d28c#commitcomment-5846633 Example of failing code: echo class Foo {}; class Bar { public: void foo(Foo foo); }; | chicken-bind - -o - -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Another patch for bind 1.5.2
This adds support for public fields in C++ classes. *Woefully* untested. IE: echo class foo { public: float a, b; }; | chicken-bind - -o - Produces: ;;; GENERATED BY CHICKEN-BIND FROM - (begin (begin (declare (hide g0)) (define-class foo (c++-object) ())) (begin (define g0 (foreign-lambda void delete (c-pointer foo))) (define-method (destructor (this foo)) (g0 (slot-value this 'this (define foo-a (getter-with-setter (foreign-lambda* float (((c-pointer foo) s)) return(s-a);) (foreign-lambda* float (((c-pointer foo) s) (float x)) return(s-a = x);))) (define foo-b (getter-with-setter (foreign-lambda* float (((c-pointer foo) s)) return(s-b);) (foreign-lambda* float (((c-pointer foo) s) (float x)) return(s-b = x);))) (begin (declare (hide g1)) (define g1 (foreign-lambda (c-pointer foo) new foo)) (define-method (constructor (this foo) initargs) (set! (slot-value this 'this) (##sys#apply g1 initargs) ;;; END OF FILE Patch follows: diff bind-translator.scm ../t/bind/bind-translator.scm 720,729c720,721 [(('id str) . more) (process-member-field-def name rtype (string-symbol str) cb) (let field-loop ([more more]) (match more [(('id str) . more) (process-member-field-def name rtype (string-symbol str) cb) (field-loop more)] [('comma . more) (field-loop more)] [_ (parse-member-body more)]) )] --- [(('id str) . (or (('op =) . _) ())) #f]; member variables are ignored 732,744d723 (define (process-member-field-def name rtype sym cb) (let ([getter (fix-name (string-append (-string name) - (-string sym)))]) (let ((g (foreign-transformer `(,(rename (if cb 'foreign-safe-lambda* 'foreign-lambda*)) ,rtype (((c-pointer ,name) s)) (- s ,sym)) rename)) (s (foreign-transformer `(,(rename (if cb 'foreign-safe-lambda* 'foreign-lambda*)) ,rtype (((c-pointer ,name) s) (,rtype x)) (= (- s ,sym) x)) rename))) (emit `(,(rename 'define) ,getter (,(rename 'getter-with-setter) ,g ,s)) -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] More work on bind: nested structs, unions and enums in c++11 classes
The following now create meaningful output: echo class foo { public: union { float x, y; }; }; | ./chicken-bind - -o - echo class foo { public: enum { quo, qid }; }; | ./chicken-bind - -o - echo class foo { public: enum bar { quo, qid }; }; | ./chicken-bind - -o - I've started a branch on github, the relevant commit is here: https://github.com/dleslie/chicken-bind/commit/11ddfa36e9af85d31ef0fa32e6086608338e4185 It's also untested; I'm working on binding a (largish) C++ library to chicken and opted to fix bind rather than do it by hand. But, I figured some people might like to see the work-so-far. -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] go routines for chicken
That lays the type safety burden upon the developer at run time and not the compiler. On 28 Nov 2013 10:18, Moritz Heidkamp mor...@twoticketsplease.de wrote: Daniel Leslie d...@ironoxide.ca writes: Go also enjoys a rather robust Channels system, which is sort of like Scheme's ports, only it's type-safe by design. How are Scheme ports not type-safe? The main difference is that Scheme ports are limited to just a single type (i.e. characters) but that doesn't make them type-unsafe, no? :-) Moritz ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] go routines for chicken
Go Routines are much like Chicken's SRFI-18 threads, except that they can multiplex over multiple *real* threads if one should block. Go also enjoys a rather robust Channels system, which is sort of like Scheme's ports, only it's type-safe by design. Wiki actually has a nice and short break-down on this: https://en.wikipedia.org/wiki/Goroutine#Concurrency -Dan On Wed, Nov 27, 2013 at 1:22 PM, Jörg F. Wittenberger joerg.wittenber...@softeyes.net wrote: Am 27.11.2013 20:32, schrieb Hugo Arregui: On 27/11/13, m...@freeshell.de wrote: On a sidenote: It seems that there is an analgon to go routines on Erlang, which can be accessed the LFE (Lisp Flavoured Erlang). However, that would require to learn the entire Erlang VM ecosystem. A Lisp Flavoured Erlang, what nice!. Having implemented a language inspired by Erlang in LISP (Scheme that is) and in a byzantine fault tolerant way atop; I feel from skimming over the discussion that I more or less have seen those related problems in practice. However the code I wrote to cope with them is for sure not conforming to any pre-defined API. Without making any promises (((and having already droped the page titled walkthough from this go chan's docs, thus given that go is about as great a search term as scheme makes pretty sure that I will not really be able to find it back again))): could I you please send me pointers to what is considered the canonical documentation of features and requirements a go-channel has to solve? ((I have only so much screen-reading time left per day because of my health. I'd rather just use it to code ahead instead of digging through stuff from the net.)) However for the same health issues I have a little too much spare time :-/ And as indicated: chances are that all I have to do is adapt some already tested code to fit the API as per spec. let's try /Jörg ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] go routines for chicken
At present, and to the best of my knowledge, there exists no similar capacity in Chicken which uses *real* operating system-level *thread*concurrency. However, there are numerous eggs that will help with *process*-level concurrency: http://wiki.call-cc.org/man/4/Unit%20posix http://wiki.call-cc.org/eggref/4/scsh-process http://wiki.call-cc.org/eggref/4/posix-shm http://wiki.call-cc.org/eggref/4/termite There's a few more, but their names elude me at the moment. Try asking on #chicken on irc.freenode.net -Dan On Fri, Nov 22, 2013 at 7:22 PM, m...@freeshell.de wrote: Hi, I recently stumbled over a package for Python that allows to use the golang go routines concurrency model (https://github.com/stuglaser/pychan ). Is there anything comparable in Chicken Scheme? If not, how complicated would be to make such an implementation? I understand that Chicken only offers very limited threading capability. Regards, piotr ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Chicken for python
You'd likely just have to wrap the C functions that exist for embedding Chicken in other apps. http://wiki.call-cc.org/embedding http://wiki.call-cc.org/man/4/Embedding -Dan On Fri, Nov 8, 2013 at 3:54 PM, m...@freeshell.de wrote: Hello all, first time post here. I decided to give lisp et al. a go and started to dive into functional programming. Since I come from a Python background, I wonder if there is a chance that one could extend Python with the use of a library compiled by Chicken. CHICKEN produces portable and efficient C, so maybe there is a way to feed some chickens to the snake? For the record, I posted the question at stackoverflow: http://stackoverflow.com/questions/19849048/chicken-for-python-extending-python-with-the-use-of-a-shared-library Any opinions, ideas, comments? Cheers! ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] bind egg and strings
Thanks :) -Dan On Fri, Feb 15, 2013 at 2:54 AM, Felix fe...@call-with-current-continuation.org wrote: From: Daniel Leslie d...@ironoxide.ca Subject: Re: [Chicken-users] bind egg and strings Date: Tue, 12 Feb 2013 13:25:22 -0800 Can someone with a little more core knowledge please comment on this? I'm also curious as to whether this test case will eventually result in an OOB error due to foreign reliance on GC-controlled memory. It does. I will look into this. cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] bind egg and strings
Can someone with a little more core knowledge please comment on this? I'm also curious as to whether this test case will eventually result in an OOB error due to foreign reliance on GC-controlled memory. -Dan On Sun, Feb 10, 2013 at 11:04 PM, Andrei Barbu and...@0xab.com wrote: Attached is a trivial patch that does the strdup. Andrei On Sat, Feb 9, 2013 at 6:07 PM, Andrei Barbu and...@0xab.com wrote: Hi, I've been using the bind egg and encountered some strange behaviour. I have: struct a { char *b; }; Bind generates: (begin (define a-b (foreign-lambda* c-string (((c-pointer (struct a)) s)) return(s-b);)) (define make-a (foreign-lambda* (c-pointer (struct a)) ((c-string b)) struct a *tmp_ = (struct a *)C_malloc(sizeof(struct a));\ntmp_-b = b;\n\nC_return(tmp_);))) It seems to me that make-a is guaranteed to eventually lead to an out of bounds memory access because of: tmp_-b = b b is a c-string and will be GCed as soon a the foreign-lambda* returns. This is further exacerbated when using -mutable-fields making it impossible to set any char* member. Shouldn't the bind egg be doing an strdup here? Is there a way to get it do so? Or am I missing something? Thanks! Andrei ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] ANN: persistent-hash-map 0.0.1
Very much appreciated, thanks! On Sun, Feb 10, 2013 at 3:31 PM, Moritz Heidkamp mor...@twoticketsplease.de wrote: Fellow Chickeneers, I have finally gotten around to finishing my long standing plan of porting the useful persistent hash map data structure from Clojure to Chicken. Thankfully, ClojureScript grew its own implementation of it in the meantime which written (mostly) in ClojureScript itself so porting was way easier than with the original Java implementation. But first, let me explain why this data structure is so nice. In a nutshell it allows you to program in a functional style like you are used to with lists in Scheme. As you know, SRFI 69 style hash tables don't lend themselves very well to this style because they are mutable. Thus we Schemers often resort to alists when we need associative data structures which is fine in many cases but has (at least) two drawbacks: 1) Lookup, deletion, and insertion are fairly expensive operations of O(n) complexity. This can be circumvented by converting the alist into a hash table once it is finished but this requires a fair amount of copying. Also, from this point on you lose the (de facto) immutability of the alist which allowed you to program in a functional way. So now you have to deal with all the challenges of mutable state again. In conclusion you can't have your cake and eat it, too. 2) Alists are not of a distinct type so you can't for example dispatch or specialize on them. The closest approximation of a type predicate is of O(n) complexity, too, as it would require to walk the whole list to check whether all elements are indeed pairs. This is also an issue with serialization and deserialization as their external representation is indistinguishable from a list of pairs. In practice these drawbacks are usually not much of an issue but it strikes me as a kludgy work-aroundish state of affairs. I want to use a proper data structure when dealing with associative data without compromising programming convenience! And this is where persistent hash maps come into play. In essence they work like alists without the drawbacks mentioned above: 1) Lookup complexity is practically constant and contrived benchmarks show that performance is comparable to SRFI 69 hash tables. Insertion and deletion is around O(log(n)). As an optimization the implementation allows to turn a persistent map into a so called transient map which can be mutated. This allows for efficient batch modification. Later it can be turned back into a persistent map without any copying. 2) Maps are implemented as a distinct type. What's currently missing is an external representation but this can easily be added, e.g. by means of a SRFI 10 reader extension. In a way, persistent hash maps give you the best of alists and hash tables combined which is why I highly recommend you to check them out. The egg's documentation can be found at the usual place (http://wiki.call-cc.org/eggref/4/persistent-hash-map), the source code lives at https://bitbucket.org/DerGuteMoritz/persistent-hash-map. There are almost certainly still some bugs in the implementation, especially in edge cases. I'm happy to receive bug reports if you happen to run into those! With regards to the implementation I would like share a few tidbits. Since I wanted to achieve decently performing code I took this project as an opportunity to give Felix' programming for performance guide a try (http://wiki.call-cc.org/programming-for-performance). It was really helpful in reaching this goal, so thanks Felix for taking the time to write it up! My findings are as follows: The original ClojureScript (and Clojure) implementation uses types to represent different kinds of nodes. For those types several generic functions (protocol methods in Clojure lingo, see http://clojure.org/protocols) are defined. I wanted to keep this structure in my port so as to not diverge all too far from the original implementation. That way I hope to be able to integrate upstream patches in the future more swiftly. To that end I tried coops and fast-generic (as recommended in the guide) and found that coops yields slightly smaller compiled code (about 210K versus 244K with fast-generic) while fast-generic's dispatch is about an order of magnitude faster. The catch is that fast-generic types are only visible inside the compiled module but in this case this doesn't matter because the generic functions are completely internal to the implementation so I decided to go with fast-generic. The types themselves are represented as Scheme records. I tried both the typed-records and the record-variants extensions. It turned out that typed-records yielded slightly better performance than record-variants with all declarations enabled (unsafe, unchecked, inline). The typed-records may have additionally benefited from pervasive type
Re: [Chicken-users] ANN new eggs for Amazon S3, SendGrid, and Stripe
Very cool, thank-you! -Dan On Wed, Jan 30, 2013 at 3:40 PM, Thomas Hintz t...@thintz.com wrote: The Stripe card processing page can be found here: https://a.keeptherecords.com/sign-up/payment/basic. The homepage is http://keeptherecords.com, which is wordpress. The app, written in chicken scheme, is http://a.keeptherecords.com. (goto /demo if you want to check it out). On Wed, Jan 30, 2013 at 3:35 PM, Christian Kellermann ck...@pestilenz.org wrote: * Thomas Hintz t...@thintz.com [130131 00:26]: You're welcome. :) Also, I just noticed that Stripe is now available in Canada as well. If you are in Canada or the US and want to take credit card payments or handle recurring payments, I highly highly recommend Stripe. No need for a merchant account, gateway setup, or storing of any sensitive information. Once I built the api it only took a few minutes for me to sign up, integrate it into my site, and start processing cards. Now I am really curious: Can you tell me the URL of your site? This is an awesome amount of work, thank you! Cheers, Christian -- In the world, there is nothing more submissive and weak than water. Yet for attacking that which is hard and strong, nothing can surpass it. --- Lao Tzu ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Egg: redis bindings
Relatedly, has anyone updated the old memcached egg? Considering that MySQL 5.6 brought in a NoSQL memcached APIhttp://dev.mysql.com/tech-resources/articles/whats-new-in-mysql-5.6.html#nosqlthis may prove to be of some use. -Dan On Wed, Jan 23, 2013 at 7:27 PM, richo ri...@psych0tik.net wrote: On 23/01/13 20:59 -0500, Andrei Barbu wrote: Hi, I put up an egg that has high-performance redis bindings using hiredis. It's much faster (100x) than the current egg and it doesn't suffer from timeout issues. Provides a pretty bare-bones API. I've put up docs on the wiki: https://wiki.call-cc.org/**eggref/4/redishttps://wiki.call-cc.org/eggref/4/redis And the egg is available from: https://github.com/abarbu/**redis-chickenhttps://github.com/abarbu/redis-chicken Could someone make this accessible via chicken-install? Thanks! I'd also appreciate if someone had a look at the meta/release-info/setup files and let me know if I'm doing something inappropriate. Awesome, I wrote a small library that's current backed onto either flat files or redis at the deployers option, I'll have a play with this in the evening! Cheers Richo -- richo || Today's excuse: The monitor is plugged into the serial port http://blog.psych0tik.net ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Egg: redis bindings
Never mind, the qwiki search didn't show the /4/ egg when I searched for memcache, but it does appear to exist: https://wiki.call-cc.org/eggref/4/memcached -Dan On Thu, Jan 24, 2013 at 10:12 AM, Daniel Leslie d...@ironoxide.ca wrote: Relatedly, has anyone updated the old memcached egg? Considering that MySQL 5.6 brought in a NoSQL memcached APIhttp://dev.mysql.com/tech-resources/articles/whats-new-in-mysql-5.6.html#nosqlthis may prove to be of some use. -Dan On Wed, Jan 23, 2013 at 7:27 PM, richo ri...@psych0tik.net wrote: On 23/01/13 20:59 -0500, Andrei Barbu wrote: Hi, I put up an egg that has high-performance redis bindings using hiredis. It's much faster (100x) than the current egg and it doesn't suffer from timeout issues. Provides a pretty bare-bones API. I've put up docs on the wiki: https://wiki.call-cc.org/**eggref/4/redishttps://wiki.call-cc.org/eggref/4/redis And the egg is available from: https://github.com/abarbu/**redis-chickenhttps://github.com/abarbu/redis-chicken Could someone make this accessible via chicken-install? Thanks! I'd also appreciate if someone had a look at the meta/release-info/setup files and let me know if I'm doing something inappropriate. Awesome, I wrote a small library that's current backed onto either flat files or redis at the deployers option, I'll have a play with this in the evening! Cheers Richo -- richo || Today's excuse: The monitor is plugged into the serial port http://blog.psych0tik.net ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Askemos again; this time bad news. Needs some support/donation.
To fix the case I rather urgently need to find at least two locations, where I dare to replicate my notes wrt. to my personal privacy. One already secured; so one more whom I can trust not to embarrass me by leaking info taking as a remembrance to myself. Preferable outside Germany. Are you saying that you require access to a physical server outside of Germany, on which you may bootstrap instances of Askemos to act as replication peers? If so, I'm sorry to say that I'm stuck on a slow residential cable line and haven't the cash to spare for the continuous operation of a server. Between my wife's tuition and the mortgage, we're rather tight for cash. -Dan On Wed, Jan 23, 2013 at 1:32 PM, Jörg F. Wittenberger joerg.wittenber...@softeyes.net wrote: Hello $all, we've been recently in touch regarding Askemos. Now I might need some help, if you can. Until Wed, 23 Jan 2013 15:55:00 +0100 the Askemos cloud ran on a rather healthy mix of peers. Pardon me? }:-| ??? … On Jan 18 2013, Daniel Leslie wrote: A little off-topic for this list, but it comes up now and then so I'll dive into it. Every time Askemos comes up I get a deep curiousity that has me exclaiming What is this thing?! Especially after perusing pages like this one http://askemos.org/**Ad60e3fb123a79b2e5128915116b28** 8f7/index.html/?_v=footnote_**id=1223http://askemos.org/Ad60e3fb123a79b2e5128915116b288f7/index.html/?_v=footnote_id=1223 . … And, erm, what are the minimal steps for bootstrapping a server which can collaborate on this *ethical cloud*? …An almost healthy mix, that is. For historic reasons three of those eight peers of the development network, which originally where at different locations, ended up behind a single point of failure. Since the system promises fail-stop, I can't even add a note into my blog. Given the trouble I expect more. In case of trouble: all URL's given here would/could/should be served from several locations. *IF* the URL after the askemos.org part starts with an A[0-9a-f]{32} path step, just replace the prefix with any other replica and retry. Odds are 5:8. For hosts still visible see appendix. So find the reference cited above under http://login.softeyes.net/**Ad60e3fb123a79b2e5128915116b28** 8f7/index.html/http://login.softeyes.net/Ad60e3fb123a79b2e5128915116b288f7/index.html/ or it's alternatives while I'm fixing the DNS etc. @Ian Grigg and Allison Stellíng: the same applies to the not-so-private message I just sent out minutes before the disaster happend. Find the one-pager-message wrt. system theory under hash code: A5ae3c14013b6fe38b4aa66a2697e0**97f that would be e.g. http://login.softeyes.net/**A5ae3c14013b6fe38b4aa66a2697e0**97fhttp://login.softeyes.net/A5ae3c14013b6fe38b4aa66a2697e097for http://peanut.softeyes.net:**7080/**A5ae3c14013b6fe38b4aa66a2697e0**97fhttp://peanut.softeyes.net:7080/A5ae3c14013b6fe38b4aa66a2697e097f[the latter being a plug computer at home only]. I just wanted to add a forgotten note beneath the TC DISCLAIMER http://cl.softeyes.net:8080/**A5ae3c14013b6fe38b4aa66a2697e0** 97f/Systems%20in%20Genetic%**20Autopoesishttp://cl.softeyes.net:8080/A5ae3c14013b6fe38b4aa66a2697e097f/Systems%20in%20Genetic%20Autopoesis This: The hypothesis wrt. cancer would be that the strict rule *no communication along the diagonal* where shortcut. Leading into a 'thermodynamic chaos'. When those three peers disappeared. ## The Needs - Short Term To fix the case I rather urgently need to find at least two locations, where I dare to replicate my notes wrt. to my personal privacy. One already secured; so one more whom I can trust not to embarrass me by leaking info taking as a remembrance to myself. Preferable outside Germany. ## Minimum requirements BALL became a bit like the Swiss-army knife wrt. small scale ISP needs not having a solutions widely deployed for a reason. For operation it needs to bind to a port at the moment. Run as some isolated user it needs to be able to maintain the contents of one directory. ## Participate - Long Term The more parties joining the network, the better it should help with privacy, safety and autonomy. ### Regarding the Healthiness So far we had ♣: AMD64, i386, ARM ♠: Chicken, Rscheme ♡: FreeBSD, Linux ♢: GPL, BSD for symbols see A5ae3c14013b6fe38b4aa66a2697e0**97f , the not so private draft message. Thanks for your time. /JFW ## Hosts Still Visible http://login.softeyes.net http://isstvan.softeyes.net:**7080/ http://isstvan.softeyes.net:7080/ http://cl.softeyes.net:8080/ http://peanut.softeyes.net:**7080/ http://peanut.softeyes.net:7080/ . ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Some questions about loading libraries
A little off-topic for this list, but it comes up now and then so I'll dive into it. Every time Askemos comes up I get a deep curiousity that has me exclaiming What is this thing?! Especially after perusing pages like this one http://www.askemos.org/index.html/?_v=footnote_id=1223. What's the *goal* for Askemos? Is it a passion project or is there a bigger picture in mind? And, erm, what are the minimal steps for bootstrapping a server which can collaborate on this* *ethical cloud? Thanks Jörg! -Dan On Fri, Jan 18, 2013 at 2:52 AM, Jörg F. Wittenberger joerg.wittenber...@softeyes.net wrote: Hi Matt, I know you've been asking quite a different question. But judging from your aimsgoals, maybe it's worth to look at ball.askemos.org ; runs on chicken and rscheme. (see http://ball.askemos.org/**DevelopmentNetworkhttp://ball.askemos.org/DevelopmentNetwork) It might save you quite some work and bring in at least one more developer being with you. Beware: it took quite a while for a genious like Ian Grigg (see http://www.askemos.org/index.**html?_v=search_id=1275http://www.askemos.org/index.html?_v=search_id=1275) to understand that this would be a version of his Ricardo applicable to running processes instead of static documents. However I've been ask by a Chemist to provide her with an account on my network for her to organize her notes in the way askemos.org works. *After* she watched me adding content from the tablet. And both, her brother and ex-boyfriend are CS guys… she kinda knows what she needs and doesn't. Best Regards /Jerry PS: sorry for the shameless plug . __**_ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/**mailman/listinfo/chicken-usershttps://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] New Egg: Tween
Hi all, I've just finished up the first version of my Tween egg. It provides a (loose) port of Tween.js for Scheme. The functionality that tracked tween state is not present, as I felt that's better left to the client of the API and wasn't very much in the tradition of scheme, but otherwise it's functionally intact. For those unaware, tweening is the action of 'inbetweening' two values; of which the popular linear interpolation is a common action. This egg provides a whole suite of interesting tweens, including the classic lerp. It also provides linear, bezier, and catmull-rom interpolation functions. Anyhow, please see the wiki for more information: https://wiki.call-cc.org/eggref/4/tween If someone could prop this to the coup so it can be installed via chicken-install I would be grateful, thanks! -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Chicken-users Digest, Vol 122, Issue 5
http://mingw-w64.sourceforge.net/ Mingw-w64 is proclaimed to be stable, if you're interested in 64-bit builds. -Dan On Mon, Jan 7, 2013 at 10:23 AM, Răzvan Rotaru razvan.rot...@gmail.comwrote: Hi, It contains the latest stable chicken version (4.8.0). Currently this is visible only in the filename of the installer (chicken-4.8.0.exe). I will think of putting it also somewhere in the wizard steps. The chicken build is 32-bit, but it runs ok on Windows 7 64-bit. (The same applies to mingw). Razvan On 7 January 2013 19:00, chicken-users-requ...@nongnu.org wrote: On Mon, Jan 07, 2013 at 12:01:01PM +0200, R?zvan Rotaru wrote: Hi, Hi! I have made a windows installer for chicken. You can get it from https://bitbucket.org/roti/chicken-installer/downloads It includes the MinGW GCC compiler. I would appreciate any feedback if there are windows users out there who choose to use it. This is great, thanks for putting in the effort. It would help if you stated which version of Chicken it is exactly, since the 4.8.0 release is known not to build under Windows 64-bit AFAIK. Please note there's a 4.8.0.1 in the works which will fix a few of these issues. Cheers, Peter -- http://sjamaan.ath.cx ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Announcing chicken-announce
Will the content be duplicated to any of the other lists? On Fri, Jan 4, 2013 at 3:09 PM, Felix fe...@call-with-current-continuation.org wrote: Hello! A new mailing list for announcements related to CHICKEN has been created (cleverly named chicken-announce) and will receive from now on important news like new releases of the core system, extensions, applications, and everything we (and you!) like to scream out into the ether... To subscribe, please visit: https://lists.nongnu.org/mailman/listinfo/chicken-announce cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] happy christmas!
Happy Saturnalia! ;) Hope everyone is having a wonderful time with friends and family. -Dan On Mon, Dec 24, 2012 at 9:15 AM, Arthur Maciel arthurmac...@gmail.comwrote: Happy Christmas to all! -- Mensagem encaminhada -- From: Felix fe...@call-with-current-continuation.org To: chicken-users@nongnu.org Cc: Date: Mon, 24 Dec 2012 12:56:46 +0100 (CET) Subject: [Chicken-users] happy christmas! I wish everybody a very happy christmas ! cheers, felix -- Mensagem encaminhada -- From: Hugo Arregui hugo.arre...@gmail.com To: Felix fe...@call-with-current-continuation.org Cc: chicken-users@nongnu.org Date: Mon, 24 Dec 2012 11:37:52 -0300 Subject: Re: [Chicken-users] happy christmas! Happy Chrismas for everyone! ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] A mfeta-observation
I've noticed some folks have been pimping Chicken on Reddit whenever it's topical. Many of those targetted seem to be looking for a powerful lisp-like language with an acceptable license for commercial work and a friendly, active community; Chicken fits that niche rather nicely. Or perhaps it's because of the prominent Schemes that have been historically active; Chicken and Racket are really the only two that have substantial third-party module repositories? -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Much improved customized Emacs
Thanks! I appreciate the testing. WorksForMe usually doesn't cut the mustard, so your feedback is quite welcome. I fixed a few of the derps that was causing Marmalade to have issues; happy hacking! -Dan On Fri, Nov 23, 2012 at 2:26 AM, Kristian Lein-Mathisen kristianl...@gmail.com wrote: Hi Dan, This is great work! I too work in constrained environments, mostly on mobile phones, so I'm really looking forward to use your package. I had some problems installing it through marmelade so I added a couple github issues. K. On Fri, Nov 23, 2012 at 3:40 AM, Daniel Leslie d...@ironoxide.ca wrote: I've released an Emacs package that encompasses the customizations I've made to the base scheme-mode. This is a heavy iteration on the work previously present on the wiki. It provides: - Syntax support for all presently installed modules, both bound symbols and macros. - Chicken-doc support where documentation exists (including a C-? binding to lookup the word-at-point). - Support for font-locking of the above. - Automatic loading of a defvar'd etag file, if you wish. - Auto-Complete and Font Locking of *prefixed* *symbols*; IE, if you imported Allegro with the prefix al: *then al:draw-triangle will have the draw-triangle portion correctly coloured and auto-completed*! Most importantly, and the itch that drove this endeavour, *this is all provided independent of a running REPL*. For those of us who tend to work on more unstable/low-level code that is prone to killing the REPL the higher-level functionality of the various scheme modes are frustratingly inconsistent at best. Now without the need for an active REPL we can enjoy full syntax highlighting, auto-completion and documentation. Now, there is one outstanding annoyance that I'd like to field the mailing list for suggestions on. At present, all symbols found via * ##sys#macro-environment* and *##sys#environment-symbols# *are given the font-lock-builtin-face. I'd like to know what's best not to include at all, and hear some suggestions on how best to divide up the rest. Right now it feels like that font-locking is a little *too* aggressive. And perhaps the one negative: in order to provide these features without the REPL a cache is built when scheme-mode is first loaded. I *highly* recommend you run Emacs from a daemon if you use this extension, so as to avoid unnecessarily recaching. That, or you can customize the *chicken-ac-modules* variable to just load the 'chicken' module and there will be nary a hitch, though far less completions. Anyhow, further details are available on the wiki: https://wiki.call-cc.org/dans-custom-emacs Thanks, -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] using flymake with chicken
Oh excellent! You may be able to remove the need for the shell script by running something like: (shell-command-to-string (format csi -SAv \%s\ || true option-or-filename)) Thanks, -Dan On Fri, Nov 23, 2012 at 11:05 AM, Felix fe...@call-with-current-continuation.org wrote: Hello! Attached is a first go at flymake[1] support for Scheme code. It is derived from flymake-lua.el and very simple. Put chicken-flymake in your PATH, make it executable, load flymake-chicken.el into your emacs, open some .scm file and do M-x flymake-chicken-mode Now, lines containing scrutinizer warnings (and other errors that show a line number) are highlighted. I have not used this seriously yet, but it's sort of weirdly cool ... I have added the code to the git repository (see the scripts and misc subdirectories). Suggestions are welcome. cheers, felix [1] http://www.emacswiki.org/emacs/FlyMake flymake for CHICKEN ;; Taken from: ;; https://github.com/sroccaserra/emacs/blob/master/flymake-lua.el ;; ;; Flymake for Lua ;; ;; Usage: ;; (require 'flymake-lua) ;; (add-hook 'lua-mode-hook 'flymake-lua-load) ;; ;; Note: litterally stolen from Steve Purcell's Flymake Ruby. ;; See http://github.com/purcell/emacs.d/blob/master/site-lisp/flymake-ruby/flymake-ruby.el ;; (require 'flymake) (defgroup flymake-chicken nil Flymake Chicken Customizations) (defcustom flymake-chicken-program chicken-flymake How to invoke csc. :type 'file :group 'flymake-chicken) (defun flymake-create-temp-in-system-tempdir (filename prefix) (make-temp-file (or prefix flymake-chicken))) (defun flymake-chicken-init () (list flymake-chicken-program (list (flymake-init-create-temp-buffer-copy 'flymake-create-temp-in-system-tempdir (defvar flymake-chicken-allowed-file-name-masks '((\\.scm\\' flymake-chicken-init))) (defvar flymake-chicken-err-line-patterns '(( *(\\(.+\\):\\([0-9]+\\)) * 1 2) (\\(Error\\|Warning\\|Note\\): *(line \\([0-9.]*\\)) nil 2))) ;(defvar flymake-lua-err-line-patterns ; '((^.*luac[0-9.]*\\(.exe\\)?: *\\(.*\\):\\([0-9]+\\): \\(.*\\)$ ;2 3 nil 4))) ;;;###autoload (defun flymake-chicken-mode () (interactive) (when (and (not (null buffer-file-name)) (file-writable-p buffer-file-name)) (set (make-local-variable 'flymake-allowed-file-name-masks) flymake-chicken-allowed-file-name-masks) (set (make-local-variable 'flymake-err-line-patterns) flymake-chicken-err-line-patterns) (flymake-mode t))) (provide 'flymake-chicken) #!/bin/sh # # usage: chicken-flymake OPTION-OR-FILENAME ... csc -SAv $@ || true ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Much improved customized Emacs
I've released an Emacs package that encompasses the customizations I've made to the base scheme-mode. This is a heavy iteration on the work previously present on the wiki. It provides: - Syntax support for all presently installed modules, both bound symbols and macros. - Chicken-doc support where documentation exists (including a C-? binding to lookup the word-at-point). - Support for font-locking of the above. - Automatic loading of a defvar'd etag file, if you wish. - Auto-Complete and Font Locking of *prefixed* *symbols*; IE, if you imported Allegro with the prefix al: *then al:draw-triangle will have the draw-triangle portion correctly coloured and auto-completed*! Most importantly, and the itch that drove this endeavour, *this is all provided independent of a running REPL*. For those of us who tend to work on more unstable/low-level code that is prone to killing the REPL the higher-level functionality of the various scheme modes are frustratingly inconsistent at best. Now without the need for an active REPL we can enjoy full syntax highlighting, auto-completion and documentation. Now, there is one outstanding annoyance that I'd like to field the mailing list for suggestions on. At present, all symbols found via * ##sys#macro-environment* and *##sys#environment-symbols# *are given the font-lock-builtin-face. I'd like to know what's best not to include at all, and hear some suggestions on how best to divide up the rest. Right now it feels like that font-locking is a little *too* aggressive. And perhaps the one negative: in order to provide these features without the REPL a cache is built when scheme-mode is first loaded. I *highly* recommend you run Emacs from a daemon if you use this extension, so as to avoid unnecessarily recaching. That, or you can customize the *chicken-ac-modules* variable to just load the 'chicken' module and there will be nary a hitch, though far less completions. Anyhow, further details are available on the wiki: https://wiki.call-cc.org/dans-custom-emacs Thanks, -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] spock tests
Both are fairly swift for me. OSX, Chrome Version 21.0.1180.89 -Dan On Fri, Sep 7, 2012 at 3:01 PM, Felix fe...@call-with-current-continuation.org wrote: Hello! There has been a new version of Spock (0.9) (that Scheme-JS compiler thingy) that uses a slightly changed unwinding strategy (return instead of throw), which promises better compatibility with stupid browsers and flaky JS engines. If you have a minute, please point your browser to http://www.call-with-current-continuation.org/spock/test.html and http://www.call-with-current-continuation.org/spock/threads.html The former takes quite a while to run, the latter needs canvas support. I tested with Conkeror 0.9.1 and Firefox 3.6.3, which seem to run both tests OK. I would be very interested to see whether these work or fail for you, and on which browsers (IE in particular). cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] IUP
Getting IUP working outside of Windows was a bit of a headache for me, too. IIRC, along with ffcall you'll need to install: http://sourceforge.net/projects/imtoolkit/ http://www.tecgraf.puc-rio.br/cd/ http://www.tecgraf.puc-rio.br/iup/ This page is somewhat helpful in getting CD to build: http://www.tecgraf.puc-rio.br/cd/en/download_tips.html Good luck! -Dan On Fri, Jul 13, 2012 at 4:06 PM, Andy Bennett andy...@ashurst.eu.orgwrote: Hi, I'm trying to use the iup egg. I had some trouble with chicken-install because I didn't have ffcall, but that's resolved now. I persuaded iup itself to install into /usr/local/ rather than /usr/ and added -I/usr/local/include/iup/ to the compile calls in the iup.setup file. Now, when I try to (use iup) in csi I get this: - #;1 (use iup) ; loading /usr/local/chicken-4.7.0/lib/chicken/6/iup.import.so ... ; loading /usr/local/chicken-4.7.0/lib/chicken/6/iup-base.import.so ... ; loading /usr/local/chicken-4.7.0/lib/chicken/6/lolevel.import.so ... ; loading /usr/local/chicken-4.7.0/lib/chicken/6/srfi-42.import.so ... ; loading /usr/local/chicken-4.7.0/lib/chicken/6/irregex.import.so ... ; loading /usr/local/chicken-4.7.0/lib/chicken/6/iup-controls.import.so... ; loading /usr/local/chicken-4.7.0/lib/chicken/6/iup-dialogs.import.so ... ; loading /usr/local/chicken-4.7.0/lib/chicken/6/iup.so ... Error: (load) unable to load compiled module - libim.so: cannot open shared object file: No such file or directory: /usr/local/chicken-4.7.0/lib/chicken/6/iup.so Call history: syntax (quote iup) syntax (##core#quote iup) syntax (import iup) syntax (import scheme chicken (except iup-base ihandle-pointer pointer-ihandle ihandle-list-pointer-vect.. syntax (import scheme chicken foreign lolevel data-structures extras srfi-1 srfi-13 srfi-42 irregex (only p.. syntax (import scheme (except chicken :) srfi-1) syntax (##core#undefined) syntax (##core#undefined) syntax (import scheme chicken foreign iup-base) syntax (##core#undefined) syntax (import scheme chicken foreign iup-base) syntax (##core#undefined) syntax (##core#undefined) syntax (##core#undefined) syntax (##core#undefined) eval(##sys#require (quote iup)) -- #;1 - I don't seem to have libim.so anywhere on my system, and it doesn't seem to be part of the iup distribution that I installed (iup-3.6_Linux26g4_64_lib.tar.gz). Does anyone have any ideas where libim.so is supposed to come from? Regards, @ndy -- andy...@ashurst.eu.org http://www.ashurst.eu.org/ 0x7EBA75FF ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] ANN: simple-graphics, a basic turtle graphics library for educational purposes
Fantastic! I, for one, am happy to see more and more multimedia eggs for Scheme. Thanks! -Dan On Sun, Jul 8, 2012 at 2:42 PM, Alaric Snell-Pym ala...@snell-pym.org.ukwrote: Hello folks, As my six-year-old is interested in making computers do things, but showing her how to do sums in csi grew old after half an hour or so, I built on Christian's fine work in the doodle egg (which handles all the evil bits for me) and wrote a very simple turtle graphics library. The goal is simplicity and immediate gratification; all setup of graphical context is done on demand when the user starts drawing pictures. https://wiki.call-cc.org/**eggref/4/simple-graphicshttps://wiki.call-cc.org/eggref/4/simple-graphics It can be improved in many ways; mainly, I want to put a little turtle sprite that rotates to show the turtle direction, but I need C-Keen to finish his work on doodle sprites first! However, I'd also like to provide more upwards paths to more advanced work, like integration with the doodle event loop and so on. I'd also like to lay down better infrastructure for drawing charts from numerical data, perhaps with a draw-to alongside go-to, line thickness, etc. However, it'll do for now! Enjoy, ABS -- Alaric Snell-Pym http://www.snell-pym.org.uk/**alaric/http://www.snell-pym.org.uk/alaric/ __**_ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/**mailman/listinfo/chicken-usershttps://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Monad Egg updated, lots of docs added
Please see the Wiki for complete details: https://wiki.call-cc.org/eggref/4/monad In short: some time ago I fleshed out the available monads with various utility functions that are generally excepted as being available for them. In the process I wrote a slew of usage examples, which should help those trying to understand what they're for and how they're used. Have at it! -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Allegro Egg 1.3 available
The Allegro Egg version 1.3 is now available. The major noteworthy change is the addition of the Allegro OpenGL Extensions. This provides GLEW-like OpenGL extension support to all supported platforms. Developers will now be able to use the Allegro bindings to write non-fixed pipeline OpenGL applications entirely withing Scheme. Please see the Wiki page for more information: https://wiki.call-cc.org/eggref/4/allegro -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Gl Extentions?
And... I should be just about done the first pass. Bind is so awesome. -Dan On Thu, Jun 21, 2012 at 10:01 AM, Daniel Leslie d...@ironoxide.ca wrote: Hi all, I started working on an egg to supplement the existing OpenGL support with what can be found in glext.h, however, I thought I'd drop in here for a moment and see if anyone has already begun this work? I've made some head way personally, but before I proceed further I thought it to be best to see if I'm duplicating effort. Thanks! -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Gl Extentions?
Hi all, I started working on an egg to supplement the existing OpenGL support with what can be found in glext.h, however, I thought I'd drop in here for a moment and see if anyone has already begun this work? I've made some head way personally, but before I proceed further I thought it to be best to see if I'm duplicating effort. Thanks! -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Emacs and Chicken on Windows
FYI, I've updated this script. It's now far, far faster than it was. That is to say, there's no longer a completion delay on my netbook. -Dan On Tue, Apr 3, 2012 at 8:06 PM, Daniel Leslie d...@ironoxide.ca wrote: Perhaps of some interest is the work I've put into my Emacs scripts for Chicken. I've had consistent problems with SLIME and Chicken on Windows, which may or may not be the result of my (heavily) modified Emacs environment. Moreover, on my Ubuntu netbook SLIME is just a little too sluggish for my tastes; when all I really want is auto-complete completions as I type away on a shaky bus ride. As such, I wrote some scripts to use chicken-status and csi to produce a list of available bindings from your installed modules and the base chicken environment, and it in turn produces an auto-complete source. It also provides font-locking for these symbols. Anyhow, more info is on the wiki: http://wiki.call-cc.org/dans-custom-emacs Likewise, I occasionally do some work on Eggs which involves a lot of intermixed C and Scheme in the same source file. Here's my (ugly) multi-mode hack to do C and Scheme major modes in the same buffer: http://wiki.call-cc.org/emacs-multi-mode Thanks for Chicken! -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Unit ports documentation needs an example or two for non-gods
I'm personally not aware of any eggs that specifically match your request. But there are these eggs, which I tend to use more often than others: Misc Macros http://wiki.call-cc.org/eggref/4/miscmacros More Macros http://wiki.call-cc.org/eggref/4/moremacros lookup-table http://wiki.call-cc.org/eggref/4/lookup-table Sequences http://wiki.call-cc.org/eggref/4/sequences SRFI-99 http://wiki.call-cc.org/eggref/4/srfi-99 Less general, but still often useful: SRFI-45 http://wiki.call-cc.org/eggref/4/srfi-45 lazy-seq http://wiki.call-cc.org/eggref/4/lazy-seq -Dan On Wed, May 23, 2012 at 6:35 AM, Matt Welland estifo...@gmail.com wrote: (port-map FN THUNK) where does the port go? I was sort of hoping for something like this to work: csi (define inp (open-input-file ~/.bashrc)) csi (define a (port-map inp read-line)) csi (close-input-file inp) but it took guessing to figure out the intended usage. How about some trivial examples in the docs? By trial and error I figured this out: (define a (with-input-from-file ~/.bashrc (lambda ()(port-map (lambda (x) x) read-line That is ugly. I just want to get a file into a list: E.g. in Ruby: foo=`cat ~/.bashrc` port-fold doesn't improve it: (define b (with-input-from-file ~/.bashrc (lambda ()(reverse (port-fold cons '() read-line) Is there an egg or unit for down-n-dirty, get-the-job-done-yesterday, screw the right thing programming? (use ducttape) (define a (file-list ~/.bashrc)) Such a unit or egg deserves mention on the front page. I dug though the docs and never did find an easy way to do what I want. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] [ANN] Allegro Egg
I've finished up the bindings for the Allegro egg. Or, at least, I believe I have 99% API coverage and I've tested most of it. Native dialog hooks still remain to be implemented. Documentation is present here: http://wiki.call-cc.org/eggref/4/allegro It's BSD3 licensed, in a similar manner to the base library. *What is Allegro?* Allegro has been around since the days of the Amiga, and was one of the first open-source game development libraries widely available. Those of us who grew up with DOS machines in the 90s may remember using it with DJGPP. Recently Allegro underwent a *complete* rewrite, alowing the developers to switch from the original giftware license to one that allowed for commercial redistribution of derivative works without requiring the redistribution of code. Likewise, it allowed them to greatly streamline the API and focus on modernization and efficiency. I noticed that the new API lent itself fairly well to a scheme programming style, and a few months of bus-trip programming later this Egg was born. Anyhow, I welcome bug fixes, github pull requests, and documentation updates; provided contributors are willing to stick with the distribution license I have chosen. Thanks for Chicken! -Dan Leslie ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Emacs and Chicken on Windows
Perhaps of some interest is the work I've put into my Emacs scripts for Chicken. I've had consistent problems with SLIME and Chicken on Windows, which may or may not be the result of my (heavily) modified Emacs environment. Moreover, on my Ubuntu netbook SLIME is just a little too sluggish for my tastes; when all I really want is auto-complete completions as I type away on a shaky bus ride. As such, I wrote some scripts to use chicken-status and csi to produce a list of available bindings from your installed modules and the base chicken environment, and it in turn produces an auto-complete source. It also provides font-locking for these symbols. Anyhow, more info is on the wiki: http://wiki.call-cc.org/dans-custom-emacs Likewise, I occasionally do some work on Eggs which involves a lot of intermixed C and Scheme in the same source file. Here's my (ugly) multi-mode hack to do C and Scheme major modes in the same buffer: http://wiki.call-cc.org/emacs-multi-mode Thanks for Chicken! -Dan ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users