Re: [Chicken-users] chicken 4.8.0.5 on cygwin - stty ECHOPRT
On Sun, 30 Mar 2014, Claude Marinier wrote: I just built chicken 4.8.0.5 on MS Windows Vista with a somewhat recent cygwin. The installation process went well but csi could not find parley. Turns out parley needs stty which did not compile because it cannot find the symbol ECHOPRT. I removed the offending code from stty.scm, compiled, and installed it. After that, parley installed without complaint. I neglected to mention that removing references to ECHOPRT in stty is not a proper solution; it just allowed me to use Chicken on MS Windows. Note that csi command editing does not work properly; this is likely due the changes I made. I appologize for previously posting an omnibus message. I will try to remember to have one topic per posting. -- Claude Marinier ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] chicken 4.8.0.5 on cygwin - stty ECHOPRT
Claude Marinier scripsit: I neglected to mention that removing references to ECHOPRT in stty is not a proper solution; it just allowed me to use Chicken on MS Windows. In fact, ECHOPRT should simply be flushed. It is not part of Posix, and is in fact useful only on long-obsolete printing terminals. The Linux tty driver doesn't even seem to implement it. -- John Cowan http://www.ccil.org/~cowanco...@ccil.org If I have seen farther than others, it is because I am surrounded by dwarves. --Murray Gell-Mann ___ 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
Re: [Chicken-users] chicken 4.8.0.5 on Cygwin - static build
On Sun, Mar 30, 2014 at 04:20:19PM -0400, Claude Marinier wrote: On Sat, 29 Mar 2014, Claude Marinier wrote: Does anyone know how to compile a static program under Cygwin? It cannot find a library; the name may be cygchicken0.a (I switched back to debian and cannot remember exactly). Here is better information. The command and error are $ csc -deploy -static-libs -o sJoy sJoy.scm -L -lcygwin gcc: error: /usr/local/lib/cygchicken-0.a: No such file or directory The file /usr/local/lib/cygchicken-0.dll exists. There is no Makefile rule to build cygchicken-0.a, so it can't be installed. It simply isn't available. To make this work, you would have to try and write a rule based on the cychicken-0.dll rule. I don't understand any of the plethora of flags it passes to the linker, so you'd have to figure that out first. Regarding the parley problem, have you tried CHICKEN from git master? Cheers, Peter -- http://www.more-magic.net ___ 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