[Chicken-users] New egg: hardwood

2014-10-01 Thread Kooda
Hello fellow CHICKEN users,

I’d like to announce my first egg contribution: the Hardwood egg.

This egg is an attempt at reviving a Termite-like API.
This first release provides the basic constructs for creating processes
and pass messages between them.

I’d like to thanks the #chicken community for providing my some very
useful advices.

You can find the release-info file here for integration in the egg
index:
http://hg.upyum.com/hardwood/raw-file/tip/hardwood.release-info

If you have any comment please feel free to drop me a message, any
contribution is welcome.

-- 
Envoyé depuis ma GameBoy.

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


Re: [Chicken-users] New egg: hardwood

2014-10-01 Thread Peter Bex
On Wed, Oct 01, 2014 at 10:18:18AM +0200, Kooda wrote:
 Hello fellow CHICKEN users,
 
 I’d like to announce my first egg contribution: the Hardwood egg.
 
 This egg is an attempt at reviving a Termite-like API.
 This first release provides the basic constructs for creating processes
 and pass messages between them.

Hey, this is pretty cool!

 I’d like to thanks the #chicken community for providing my some very
 useful advices.

We're always there :)

 You can find the release-info file here for integration in the egg
 index:
 http://hg.upyum.com/hardwood/raw-file/tip/hardwood.release-info

I've added it to the egg-locations.  It should automatically appear
in the index within the hour.

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] irregex and callbacks

2014-10-01 Thread Andy Bennett
Hi,

I am trying to use the browscap.org database to do HTTP User Agent
Classification.

This database consists of a (large) number of regexes and data about the
browser should the user agent string match that regex.

What I want to do is compile all the regexes together and be able to add
annotations such that I can match a UA string against this regex and get
back an idea of which pattern matched so that I can look up the
appropriate data.

i.e. I have a data structure keyed by pattern and I want to my input
to be something that matches that pattern rather than the pattern itself.

It seems that for this I need Callbacks but I don't really need full
callback support: I don't necessarily need to call an actual procedure
and I don't need to replace anything: I'm not doing a search/replace,
just a match. All I really need is to be able to annotate the FSM node
that matched with a little bit of data that I can get back.


Is this something that would be easy to add to irregex or can anyone
suggest any other alternative implementations that I might consider?


The PHP library that uses this browscap database (apparently) just does
a linear search by trying to match each regex in turn but I'd rather
keep that approach as a last resort.



Thanks for your help and any tips you can offer.



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] [Chicken-hackers] CHICKEN in production

2014-10-01 Thread Mario Domenech Goulart
Hi,

On Tue, 30 Sep 2014 01:07:43 +0400 r d...@bk.ru wrote:

 happy to announce that we are in production with CHICKEN!

 Professional karaoke system AST-50 with CHICKEN driven firmware.

 http://www.art-system.ru/professionalnoe-karaoke/ast-50.html

 Feel free to ask Oleg Kolosov, Yaroslav Tsarko and me about wonderful
 and dangerous trip to the parentheses land.

Congratulations to everyone involved in that project.  Thanks for
sharing your achievements.  Very nice to see CHICKEN used in a real
product.

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] irregex and callbacks

2014-10-01 Thread Alex Shinn
On Thu, Oct 2, 2014 at 8:22 AM, Andy Bennett andy...@ashurst.eu.org wrote:

 Hi,

 I am trying to use the browscap.org database to do HTTP User Agent
 Classification.

 This database consists of a (large) number of regexes and data about the
 browser should the user agent string match that regex.

 What I want to do is compile all the regexes together and be able to add
 annotations such that I can match a UA string against this regex and get
 back an idea of which pattern matched so that I can look up the
 appropriate data.

 i.e. I have a data structure keyed by pattern and I want to my input
 to be something that matches that pattern rather than the pattern itself.

 It seems that for this I need Callbacks but I don't really need full
 callback support: I don't necessarily need to call an actual procedure
 and I don't need to replace anything: I'm not doing a search/replace,
 just a match. All I really need is to be able to annotate the FSM node
 that matched with a little bit of data that I can get back.



You could use submatch info and check which submatch matched.
This would keep the matching as a single regexp, but you'd then
need a linear scan to see which submatch succeeded.

(define (irregex-merge-vector vec)
  (irregex `(or ,@(map (lambda (x) `(= alt ,x)) (vector-list vec)

(define ua-vec ...)
(define all-ua-rx (irregex-merge-vector ua-vec))

(define (maybe-match-ua ua)
  (cond
((irregex-match all-ua-rx ua)
 = (lambda (m)
 (vector-reg ua-vec (irregex-match-numeric-index 'match-ua m
'(alt)
(else
  #f)))

although I believe irregex-match-numeric-index is not exported.
It's worth having a utility for this idiom.

-- 
Alex



 Is this something that would be easy to add to irregex or can anyone
 suggest any other alternative implementations that I might consider?


 The PHP library that uses this browscap database (apparently) just does
 a linear search by trying to match each regex in turn but I'd rather
 keep that approach as a last resort.



 Thanks for your help and any tips you can offer.



 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] New egg: hardwood

2014-10-01 Thread Erik Falor
On Wed, Oct 01, 2014 at 10:18:18AM +0200, Kooda wrote:
 Hello fellow CHICKEN users,
 
 I???d like to announce my first egg contribution: the Hardwood egg.
 
 This egg is an attempt at reviving a Termite-like API.
 This first release provides the basic constructs for creating processes
 and pass messages between them.

This looks really cool!  I hope I get the time to play with it soon,
because I think this is exactly the sort of thing I need to build a
pet project I've been dreaming of for some time.

-- 
Erik Falor
Registered Linux User #445632  http://linuxcounter.net


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