Re: [Chicken-users] Chicken now available from OpenWRT official repositories

2019-03-26 Thread Peter Bex
On Tue, Mar 26, 2019 at 11:31:02AM -0300, Jeronimo Pellegrini wrote:
> On Tue, Mar 26, 2019 at 02:01:22PM +0100, Peter Bex wrote:
> > Cool!  Would you be so kind as to add it to our platforms page with
> > link and instructions on how to install?
> > 
> > This is the page: https://wiki.call-cc.org/platforms
> 
> Okay, done! :-)

Nice!

Cheers,
Peter


signature.asc
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Chicken now available from OpenWRT official repositories

2019-03-26 Thread Jeronimo Pellegrini
On Tue, Mar 26, 2019 at 02:01:22PM +0100, Peter Bex wrote:
> Cool!  Would you be so kind as to add it to our platforms page with
> link and instructions on how to install?
> 
> This is the page: https://wiki.call-cc.org/platforms

Okay, done! :-)

J.



___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Chicken now available from OpenWRT official repositories

2019-03-26 Thread Peter Bex
On Tue, Mar 26, 2019 at 09:37:54AM -0300, Jeronimo Pellegrini wrote:
> Hello,
> 
> I have preciously set up a repository with instructions
> on how to compile Chicken for OpenWRT.
> 
> As of today, Chicken is already available as an OpenWRT
> binary package (from their repository -- I have sent the
> package proposal and it was accepted), so there is no 
> need to compile from source:
> 
> # opkg install chicken-scheme-interpreter
> Installing chicken-scheme-interpreter (5.0.0-1) to root...
> Downloading 
> http://downloads.openwrt.org/snapshots/packages/mips_24kc/packages/chicken-scheme-interpreter_5.0.0-1_mips_24kc.ipk
> Configuring chicken-scheme-interpreter.
> 
> I hope this will be useful for those willing to program
> their routers! :-)

Cool!  Would you be so kind as to add it to our platforms page with
link and instructions on how to install?

This is the page: https://wiki.call-cc.org/platforms

Cheers,
Peter


signature.asc
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Chicken now available from OpenWRT official repositories

2019-03-26 Thread Jeronimo Pellegrini
Hello,

I have preciously set up a repository with instructions
on how to compile Chicken for OpenWRT.

As of today, Chicken is already available as an OpenWRT
binary package (from their repository -- I have sent the
package proposal and it was accepted), so there is no 
need to compile from source:

# opkg install chicken-scheme-interpreter
Installing chicken-scheme-interpreter (5.0.0-1) to root...
Downloading 
http://downloads.openwrt.org/snapshots/packages/mips_24kc/packages/chicken-scheme-interpreter_5.0.0-1_mips_24kc.ipk
Configuring chicken-scheme-interpreter.

I hope this will be useful for those willing to program
their routers! :-)

J.

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] how to compile files, modules, shared libraries, programs

2019-03-26 Thread Marco Maggi
Kristian Lein-Mathisen wrote:

> Hi Marco,

> So what is  it that you want?  Your Makefile looks ok to  me, though I
> think all of  it might have been  less complicated to do  with just an
> .egg-file.

I  have written  this Makefile  fully guessing  everything, because  the
available documentation is not enough for me.  Besides, it does not work
as it is:

$ make all
csc -I.  -c -o module-for-expand.o module-for-expand.scm
csc -library -shared -L.  -o library-for-expand.so module-for-expand.o
/usr/bin/ld: module-for-expand.o: relocation R_X86_64_32 against 
`.rodata.str1.1' can not be used when making a shared object; recompile with 
-fPIC
module-for-expand.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

Error: shell command terminated with non-zero exit status 256: 'gcc' 
'module-for-expand.o' -o 'library-for-expand.so' -shared -shared -L. 
-L/opt/chicken/5.0.0/lib64 -Wl,-R/opt/chicken/5.0.0/lib64 -lchicken -lm -ldl
Makefile:36: recipe for target 'library-for-expand.so' failed
make: *** [library-for-expand.so] Error 1

-- 
Marco Maggi

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] how to compile files, modules, shared libraries, programs

2019-03-26 Thread Kristian Lein-Mathisen
Hi Marco,

So what is it that you want? Your Makefile looks ok to me, though I think
all of it might have been less complicated to do with just an .egg-file.

K.

On Tue, Mar 26, 2019, 11:23 Marco Maggi  Peter Bex wrote:
>
> > On Tue, Mar 26, 2019 at 06:52:44AM +0100, Marco Maggi wrote:
> >> Ciao,
>
> >>   I was  not able to find  documentation about how to  compile libraries
> >> and programs with Chicken 5, using  a Makefile.  There are bits here and
> >> there but nothing complete enough for a newbie like me.
>
> >>   Is there a project somewhere that does this?
>
> > Hi Marco,
>
> > Perhaps git-fs by Evan, one of our core maintainers will be helpful:
> > http://git.foldling.org/git-fs.git/
>
> > Just git clone it (I think there's no code browser on the site).
>
> Thanks for  the suggestion, but  that project  only has a  single source
> file; not what I need.  I want to make the following package work:
>
> 
>
> Notice that I  am still in the  phase: I know what I  want, I understand
> nothing of what I need.
>
> TIA
> --
> Marco Maggi
>
> ___
> 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] how to compile files, modules, shared libraries, programs

2019-03-26 Thread Marco Maggi
Peter Bex wrote:

> On Tue, Mar 26, 2019 at 06:52:44AM +0100, Marco Maggi wrote:
>> Ciao,

>>   I was  not able to find  documentation about how to  compile libraries
>> and programs with Chicken 5, using  a Makefile.  There are bits here and
>> there but nothing complete enough for a newbie like me.

>>   Is there a project somewhere that does this?

> Hi Marco,

> Perhaps git-fs by Evan, one of our core maintainers will be helpful:
> http://git.foldling.org/git-fs.git/

> Just git clone it (I think there's no code browser on the site).

Thanks for  the suggestion, but  that project  only has a  single source
file; not what I need.  I want to make the following package work:



Notice that I  am still in the  phase: I know what I  want, I understand
nothing of what I need.

TIA
-- 
Marco Maggi

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] microhttpd bindings and FFI

2019-03-26 Thread Kristian Lein-Mathisen
Hi,

I thought I'd mention that Caolan did some experiments [1] with the parser
from node.js. The idea was to get all the parsing done fast in C. I don't
know the it's current status, and it looks like it's written for CHICKEN 4
only.

[1]: https://github.com/caolan/snowy

In my opinion, spiffy is quite fast. Can I ask why you want to use
microhttpd?

K.


On Mon, Mar 25, 2019, 18:17 Peter Bex  On Mon, Mar 25, 2019 at 03:56:30PM +0100, Massimo Nocentini wrote:
> > Dear list,
> >
> > this is my first message so I take the opportunity to greet everyone.
> >
> > I'm working on a minimal set of bindings [1] for the microhttpd library
> [2]
> > and I'm heading against the following error:
> >
> >[panic] callback invoked in non-safe context - execution terminated
> >
> > To set the context: the variadic function MHD_start_daemon starts the
> server
> > to accept connection and calls back a Scheme function that provides the
> > content to the client.
>
> Hello Massimo,
>
> From the microhttpd documentation, it seems that it will always start
> a new native thread.  The problem here is that CHICKEN can only run
> inside one native thread and requires complete control of the stack
> within that thread.
>
> When the Scheme callback you passed to MHD_Daemon is called, it is called
> from the thread which microhttpd starts.  It will try to read/write data
> from the nursery (stack) of a different thread, and on GC it will try to
> longjmp back to a stack state in a different thread, which is not going
> to work.  CHICKEN's garbage collector does not play well at all with
> native multithreading.
>
> There might be a way to get it to work but it would require some sort
> of communication between the native threads (all in C), and you'd need to
> set up a green thread in CHICKEN that handles the response somehow.  I
> don't think this is a good approach.  You're probably better off wrapping
> a different library (or just use Spiffy).
>
> Cheers,
> Peter
> ___
> 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] how to compile files, modules, shared libraries, programs

2019-03-26 Thread Peter Bex
On Tue, Mar 26, 2019 at 06:52:44AM +0100, Marco Maggi wrote:
> Ciao,
> 
>   I was  not able to find  documentation about how to  compile libraries
> and programs with Chicken 5, using  a Makefile.  There are bits here and
> there but nothing complete enough for a newbie like me.
>
>   Is there a project somewhere that does this?

Hi Marco,

Perhaps git-fs by Evan, one of our core maintainers will be helpful:
http://git.foldling.org/git-fs.git/

Just git clone it (I think there's no code browser on the site).

Cheers,
Peter


signature.asc
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users