Re: [Chicken-users] Chicken and Cocos2Dx on Google Play!
Thanks a bunch for the encouraging feedback! I wonder where this project might end up. Shawn: The bottom-left numbers read (from top to bottom): number of drawn primitives, seconds per frame, frames per second. For example, if you evaluate ;; Add a gentle but slippery slope (space-add space `(body ((static 1)) (segment (friction 0.1) (endpoints ((250 500) (800 550)) You should see the primitives go up from 48 to 49. K. On Sat, Nov 3, 2012 at 10:18 PM, Shawn Rutledge shawn.t.rutle...@gmail.comwrote: That's cool! I tried it on my Galaxy Note (1st gen) and FPS is jumping around a lot, even when nothing is moving, usually between 50 and 60fps, and sometimes hitting peaks of more than 60 and sometimes really low values. What is the top of those 3 numbers in the lower-left? Mine says 48 and stays the same. On 2 November 2012 15:20, Kristian Lein-Mathisen kristianl...@gmail.comwrote: Dear Chickeners, I have been playing around with Chicken, Chipmunk and Cocos2Dx for a while, and I've finally got a demo up and running on Android. I've published it on Google Play in the Libraries and Demos category so you guys can test it! Check it out: Scheme REPL with Cocos2Dxhttps://play.google.com/store/apps/details?id=com.adellica.cocoscheme The demo features a truck which you can drive back and forth, clumb up hills and fall down. Not very exciting, but I do actually catch myself playing it when I don't know what I should be coding on! The cool part is that there's a Chicken REPL behind the scenes. You can connect to the REPL directly from your laptop if your phone is on the same WiFi, or use USB. Try Settings-Wireless Networks-Wifi Settings- [Menu]-Advanced when looking for you phone's IP. With netcat (or Emacs, with nc [ip] [port] as your Scheme interpreter), you could try: $ nc [phone ip] [port] Alternatively, you could use USB with adb and forward: $ adb forward tcp:1234 tcp:1234 $ nc localhost 1234 Once you see the REPL prompt @, you can play around: ;; 'import' chipmunk https://github.com/kristianlm/chickmunk bindings (use chickmunk https://github.com/kristianlm/chickmunk) ;; where is the player? (body-get-pos truck) ;; redefine game-loop to pause game unless you're touching the screen (define (*update*) (if *touch-down* (space-step space (/ 1 120 ;; now let's give the truck a gentle push (body-set-ang-vel wf -20) ;; now touch the screen to watch it drift off ;; restart the app to revert your changes (exit) ;; You can also manipulate the physics-world: ;; Drop a ball from the sky (space-add space `(body ((pos (320 700))) (circle (density 0.001) (friction 1) (radius 10 ;; Add a gentle but slippery slope (space-add space `(body ((static 1)) (segment (friction 0.1) (endpoints ((250 500) (800 550)) ;; type this to see the touch-down state: *touch-down* ;; it should be #f when your finger is off the screen, and touch-coordinates otherwise. evaluate it while holding the screen to try it out! If you have an Android phone, it'd appreciate if you took the time to check it out. I am particularly interested if the app won't start at all, and perhaps what framerate you're getting (very bottom-left). I know there is a memory leak somewhere (thanks Alaric!), but otherwise I hope things should be running fairly smoothly. Cheers! Kris ___ 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] New OAuth Egg
Hi everyone, I've written an OAuth 1 client. It should work with 1.0, 1.0a and RFC 5849 with PLAINTEXT signing. However, I've only tested it with Dropbox's 1.0 implementation. 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
Re: [Chicken-users] [ANN] New OAuth Egg
Hi everyone, I've written an OAuth 1 client. It should work with 1.0, 1.0a and RFC 5849 with PLAINTEXT signing. However, I've only tested it with Dropbox's 1.0 implementation. http://wiki.call-cc.org/eggref/4/oauth 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] [ANN] New rest-bind Egg
Hi everyone, I've written an egg that generates scheme wrappers to REST-like HTTP APIs. The functionality is not complete yet but I thought I'd put it out there in case it's useful to anyone else. It currently handles building requets as well as writing and reading request and response bodies but doesn't handle custom headers in responses. Comments on the API are welcome! http://wiki.call-cc.org/eggref/4/rest-bind 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
Re: [Chicken-users] [ANN] New rest-bind Egg
Thanks, Andy; you've simultaneously scratched two of my itches with REST + OAuth. Good work! Hi everyone, I've written an egg that generates scheme wrappers to REST-like HTTP APIs. The functionality is not complete yet but I thought I'd put it out there in case it's useful to anyone else. It currently handles building requets as well as writing and reading request and response bodies but doesn't handle custom headers in responses. Comments on the API are welcome! http://wiki.call-cc.org/eggref/4/rest-bind 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] New rest-bind Egg
Hi, Thanks, Andy; you've simultaneously scratched two of my itches with REST + OAuth. Good work! No worries: OAuth is currently only version 1 tho'. ;-) Let me know how you get on with the eggs: good or bad. 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] A poor man's continuous integration server with awful+spiffy
Hi all, I recently had the need to automatically produce native binaries for nemo, one of my applications written in Scheme. So I decided to try using awful to construct a simple server script that can fetch the latest version of nemo from svn, compile nemo and its dependencies, make a release tarball, and allow clients to download the latest tarball. With Mario's help, it all worked quite well, so I am attaching the resulting script for posterity. The only difficulty I had was creating a download page that can return one of two types of content: 1) .tar.gz file with correct MIME type and disposition or 2) an HTML page informing the client that a build is currently in progress. The download page specification in awful ended up as follows: (define-page /nemo-download (lambda () (let ((version.path (update-nemo-build))) ;; check if the build lock file exists, meaning a build is currently ;; in progress (if (file-exists? (build-lock-path (car version.path))) `(html (body (p Build in progress, try again later.))) ;; otherwise return the .tar.gz file (lambda () (let ((rel-path (release-file-path (car version.path (parameterize ((root-path (pathname-directory rel-path))) (send-file (pathname-strip-directory rel-path no-template: #t) The send-file procedure is based on send-static-file from spiffy, and its implementation can be seen in the attached file. I hope this is useful for some. -Ivan nemo-ci.scm Description: Binary data ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users