Alex Charlton | 17 Apr 21:16 2014
Picon

[ANN] New egg: markdown-svnwiki

markdown-svnwiki converts Markdown into the svnwiki syntax used in the Chicken wiki. It includes pre and
post-processing phases for customizing the final output. Some transformations, meant for making
working with the Chicken wiki more convenient, are included.

Source:
https://github.com/AlexCharlton/markdown-svnwiki

Documentation:
https://wiki.call-cc.org/eggref/4/markdown-svnwiki

Much credit has to be given to Moritz Heidkamp for his lowdown library, which markdown-svnwiki is based
heavily upon.

Mario, if you could please add this to the index:
https://raw.githubusercontent.com/AlexCharlton/markdown-svnwiki/master/markdown-svnwiki.release-info

Thanks!

--

-- 
Alex
Maurizio Proietti | 17 Apr 12:31 2014
Picon

LOPSTR 2014: Second Call for Papers

================== SECOND CALL FOR PAPERS ==================

                24th International Symposium on
       Logic-Based Program Synthesis and Transformation
                         LOPSTR 2014

           http://www.iasi.cnr.it/events/lopstr14/
  University of Kent, Canterbury, UK, September 10-11, 2014

DEADLINES
Abstract submission:                     May 30, 2014
Paper/Extended abstract submission:      June 6, 2014

============================================================

The aim of the LOPSTR series is to stimulate and promote international
research and collaboration on logic-based program development. LOPSTR
is open to contributions in logic-based program development in any
language paradigm. LOPSTR has a reputation for being a lively,
friendly forum for presenting and discussing work in progress. Formal
proceedings are produced only after the symposium so that authors can
incorporate this feedback in the published papers.

The 24th International Symposium on Logic-based Program Synthesis and
Transformation (LOPSTR 2014) will be held at the University of Kent,
Canterbury, United Kingdom; previous symposia were held in Madrid,
Leuven, Odense, Hagenberg, Coimbra, Valencia, Lyngby, Venice, London,
Verona, Uppsala, Madrid, Paphos, London, Venice, Manchester, Leuven,
Stockholm, Arnhem, Pisa, Louvain-la-Neuve, and Manchester.
LOPSTR 2014 will be co-located with PPDP 2014 (International ACM SIGPLAN
(Continue reading)

Alex Stuart | 14 Apr 00:38 2014
Picon

C_callback_adjust_stack

The manual is unclear on how I should use the C_callback_adjust_stack
function. Can anybody explain it to me more clearly?

From the manual:

"Callbacks defined with define-external will perform appropriate
adjustments automatically, but if you invoke C_callback manually, you
should perform a C_callback_adjust_stack to make sure the internal
limits are set properly. ptr should point to some data object on the
stack and size is the number of words contained in the data object (or
some estimate). The call will make sure the limits are adjusted so that
the value pointed to by ptr is located in the stack."

If I already know that "ptr" is on the stack, why would I need to make
sure of it? If I don't already know that, where do I get "ptr" from?
Alex Charlton | 13 Apr 22:12 2014
Picon

[ANN] New egg: opengl-glew

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

Thanks!

--

-- 
Alex

_______________________________________________
Chicken-users mailing list
Chicken-users <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users
Claude Marinier | 10 Apr 19:43 2014
Picon

command line editing in my application

Bonjour,

I am writing an interpreter. Under Linux, I use rlwrap to provide command line editing; without rlwrap, arrow keys display mangled escape sequences (as expected). Under MS Windows, I get command line editing for free.

Is that a feature of cmd.exe ?  I suspect it is but have not found anything to confirm this with Google.

Just curious. Ultimately, the application should do its own command line editing.

P.S. The development has gone so well, it feels like cheating. I really like Scheme.

Merci.

-- 
Claude Marinier

_______________________________________________
Chicken-users mailing list
Chicken-users <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users
Alexej Magura | 6 Apr 19:57 2014
Picon

Fw: Re: Reading from STDIN with the hang

At the present, my current plan is to try rolling my own (read-char) in C, since the one that comes with
Chicken Scheme hangs until it sees a carriage return.  I’m surprised, however, that we don’t
already have constructs or what-have-you in place to allow for buffered IO.  Is this implemented
by-design or just a coincidence, or is it (as I fear) part of the Scheme standard, since Guile Scheme
exhibits the same before?

--  
Alexej Magura
Sent with Airmail

On April 1, 2014 at 8:56:17 AM, Alexej Magura (sickhadas <at> gmail.com) wrote:
> Compiled. Oh, and even if was interpreted, I have my shebang set to #!/usr/bin/env csi  
> -qn.
> --
> Alexej Magura
> Sent with Airmail
>  
> On April 1, 2014 at 2:17:37 AM, Christian Kellermann (ckeen <at> pestilenz.org) wrote:  
>  
> Hi Alexej,
>  
> * Alexej Magura [140331 23:24]:
> > K, so I???m currently working on an application that, if the user doesn???t provide  
> any options/operands, reads from STDIN, like GNU cat. I just finished adding signal-handling  
> for SIGINT (Ctrl-c), however, now whenever I press Ctrl-c nothing happens because (read-char)  
> hangs until I press enter. Is there a way to use (read-char) that won???t make it hang?  
> Maybe something like: (if (not-null? (peek-char)) (read-char))? I saw that (char-ready?)  
> is supposed to prevent the next call to (read-char) from hanging, but (while I???m sure  
> that (char-ready?) in fact works) I can???t seem to get it to work.
> >
> > Anyone have any experience with this kind of issue; would using (read-line) instead  
> of (read-char) make a positive difference? (I doubt it would)
>  
> Is this compiled code or interpreted code? If it is run in the
> interpreter it might be that some module you load snatches sigint
> from you. Parley is one of the candidates and maybe I should change
> that behaviour. You can instantly try this by running your csi with
> the (-n) switch which will prevent loading anything from .csirc.
>  
> Kind regards,
>  
> Christian
>  
> --
> May you be peaceful, may you live in safety, may you be free from
> suffering, and may you live with ease.
>  

_______________________________________________
Chicken-users mailing list
Chicken-users <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users
Alexej Magura | 6 Apr 18:41 2014
Picon

lazy-ffi doesn't build on Mac OS X

Lazy-ffi doesn’t build for Mac OS X, at least for 64bit.  Problem originates in the *lazy-ffi-support.scm* file.  Either the *libffi* header file moved or this egg wasn’t tested against Mac OS X using homebrew.  Either way, the included patch fixes the egg.

-- 
Alexej Magura
Sent with Airmail
Attachment (lazy-ffi.patch): application/octet-stream, 337 bytes
_______________________________________________
Chicken-users mailing list
Chicken-users <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users
Daniel Leslie | 6 Apr 17:55 2014
Picon

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 <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users
Claude Marinier | 5 Apr 19:45 2014
Picon

Re: lambda's in a hash table


On Sat, 5 Apr 2014, Thomas Chust wrote:
> On 2014-04-05 01:54, Claude Marinier wrote:
>> [...]
>> I would like to have the compiler do some of this for me. I probably
>> cannot write a literal hash table but I expected to be able to write a
>> literal association list. I have tried this but it does not work.
>> [...]
>> (define a-list
>>  `(
>>     (dot  . ,(lambda () (display "dot\n")))
>>     (dash . ,(lambda () (display "dash\n")))
>>   ))
>> [...]
>
> Hello,
>
> what you have written down here is not a literal list, but a
> quasiquotation, which is just syntactic sugar that expands to an
> expression dynamically constructing a list.
>
> Nevertheless, the program you posted works just fine as it is. The only
> problem I can see with it is that nothing visible happens because
>
>> [...]
>> (let ((func-dot (hash-table-ref dict 'dot))
>>       (func-dash (hash-table-ref dict 'dash)))
>>   func-dot
>>   func-dash)
>> [...]
>
> doesn't call the two procedures. To actually run the procedures, you
> would have to write something like
>
> (let ((func-dot (hash-table-ref dict 'dot))
>       (func-dash (hash-table-ref dict 'dash)))
>  (func-dot)
>  (func-dash))

That works. Thank you.

I was so close. I think I lost track of the many variations I tried. :-(

--

-- 
Claude Marinier
Daniel Leslie | 5 Apr 17:23 2014
Picon

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 <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users
Claude Marinier | 5 Apr 01:54 2014
Picon

lambda's in a hash table

Bonjour,

I can add lambdas to a hash table at run time, retrieve them, and execute 
them. This is very useful.

I would like to have the compiler do some of this for me. I probably 
cannot write a literal hash table but I expected to be able to write a 
literal association list. I have tried this but it does not work.

(declare (uses srfi-69))

(define a-list
  `(
     (dot  . ,(lambda () (display "dot\n")))
     (dash . ,(lambda () (display "dash\n")))
   ))

(define dict
   (alist->hash-table a-list))

(let ((func-dot (hash-table-ref dict 'dot))
       (func-dash (hash-table-ref dict 'dash)))
   func-dot
   func-dash)

I have tried various ways of quoting but have not yet found something 
which works.

Can this be done or do I have to create it when the program starts?

Merci.

--

-- 
Claude Marinier

Gmane