[Chicken-users] New Egg

2017-09-20 Thread David Ireland
Hi,

I've put together a new egg that consists of bindings to a  natural
language processing library.
Can I please request inclusion of its location in *egg-location*.

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


Re: [Chicken-users] Include path when compiling an Egg.

2017-10-13 Thread David Ireland
Thanks Peter. That solved my problem.


On Sat, Oct 14, 2017 at 8:11 AM, Peter Bex  wrote:

> On Sat, Oct 14, 2017 at 12:08:16AM +0200, Christian Kellermann wrote:
> > Yeah, sorry this is pretty inconsistent. There are a couple of eggs
> > that will add /usr/local as a prefix for the linker and preprocessor.
>
> As a rule, they shouldn't be doing that at all (unless as a side effect
> of calling pkg-configure); one might have several versions of a library
> installed, under different prefixes (a more recent or customized one
> might be installed under my homedir, for example).  You don't want an
> egg to go choosing the wrong one on its own accord.
>
> Cheers,
> Peter
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Include path when compiling an Egg.

2017-10-12 Thread David Ireland
Hi there,

This might be a trivial, but  several  Eggs (including mine) won't compile
on BSD based OS's. It seems include flags for external libraries aren't
being set when compiling the final C code.

Here's an example error message:

  '/usr/local/bin/csc' -feature compiling-extension -setup-mode-J -v -s
-O3 -d1 -llink-grammar -emit-type-file link-grammar.types link-grammar.scm
'/usr/local/bin/chicken' 'link-grammar.scm' -output-file 'link-grammar.c'
-dynamic -feature chicken-compile-shared -feature compiling-extension
-setup-mode -emit-all-import-libraries -verbose -optimize-level 3
-debug-level 1 -emit-type-file link-grammar.types
generating import library `link-grammar.import.scm' for module
`link-grammar' ...
'gcc' 'link-grammar.c' -o 'link-grammar.o' -c  -fno-strict-aliasing -fwrapv
-DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -fPIC
-DPIC -DC_SHARED -I/usr/local/include/chicken



*link-grammar.c:13:40: error: link-grammar/link-includes.h: No such file or
directorylink-grammar.c:14:40: error: link-grammar/link-features.h: No such
file or directory*
I'm not sure where to add the correct flags in the setup/meta files of the
Egg i.e. /usr/local/include/

I would appreciate any suggestions. Here is my compile procedure for the
above Egg:

(define (compile-module module #!optional (extra-flags-list
'("-I/usr/local/include/")))
  (newline)
  (printf "COMPILING MODULE: ~A~N~%" module)
  (compile -J -v -s -O3 -d1 ,@extra-flags-list
   ,@(if emit-types?
   `(-emit-type-file ,(module-file module ".types"))
   '())
   ,(module-file module ".scm"))
  (compile -v -s -O3 -d0 ,(module-file module ".import.scm")
"-I/usr/local/include/" ,@extra-flags-list)
  (newline))


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


[Chicken-users] New libxml2 wrapper egg.

2018-05-08 Thread David Ireland
Hi,

I've put together a new egg that is a a wrapper for the libxml2 library (
http://xmlsoft.org/)

The release info is at:

https://gitlab.com/maxwell79/chicken-libxml2/raw/master/libxml2.release-info

If deemed worthy, can I please request inclusion of its location in
*egg-location*.

Also, 'test-new-egg' seems to fail for all my previous eggs now with:

Could not fetch release-info file for egg archive.tar (CHICKEN release 4)
from  archive.tar.gz -- unexpected list terminator


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


[Chicken-users] New egg for natural language processing

2018-01-27 Thread David Ireland
Hi,

I've put together a new egg that is a port of a Perl module that extracts
sentences from a body of text. It's useful for natural language processing.

The release info is at:

https://gitlab.com/maxwell79/chicken-sentence-split/raw/master/sentence-split.release-info

It installs fine with *test-new-egg *

If deemed worthy, can I please request inclusion of its location in
*egg-location*.

Thanks

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


[Chicken-users] c-string-list gives segmentation violation

2018-01-03 Thread David Ireland
Hi,

I'm writing an egg for a C library. One C function returns a

*char ***
I thought the correct foreign type would be *c-string-list *however this
results in a segmentation violation when calling the function.

Here is a mock example code:







*(import foreign)(define return-c-string-list  (foreign-lambda*
c-string-list ()"const char** f = NULL;""C_return(f);"))*


*(return-c-string-list)*
Which gives me:






*Error: segmentation violationCall history:test.scm:8:
return-c-string-list  test.scm:4: ##sys#peek-c-string-list*
Any suggestions would be appreciated.

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


Re: [Chicken-users] Hahn documentation gives unbound variable

2018-03-11 Thread David Ireland
Hi again,

Please disregard my email regarding Hahn. It was loading a old library
which didn't include the particular procedure.

Thanks.
David



On Sun, Mar 11, 2018 at 8:05 PM, David Ireland <djirelan...@gmail.com>
wrote:

> Hi there,
>
> I am using the Hahn egg for auto documentation.
>
> My code stops compiling when I try to evaluate an example of the procedure
> I'm adding documentation to.
>
> For example (from semantics-core.scm):
>
>  (define (remove-brackets in)
>   @("Removes any characters between and including the
>   square brackets [..]."
> (in "The string to be filtered")
> (@to "string")
> (@example "Example using Thee[?].a"
>   *(remove-brackets "Thee[?].a"))*)
>   (string-substitute "\\[.*\\]" "" in))
>
> This results in a compile error:
>
> *  hahn -o semantics.wiki semantics.scm semantics-core.scm*
>
> *Error: unbound variable: remove-brackets*
>
> My module header looks like this:
>
> (module semantics
>   @("Semantics Module")
>   (remove-brackets
>test
>utterance->logic
>is-utterance-interrogative?)
>   (import data-structures chicken scheme)
>   (use
> s
> regex)
>   (include "semantics-core"))
>
> Am I doing anything wrong that is obivious?
>
> The example in the hahn docs works fine.
>
> Thanks.
> David
>
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Hahn documentation gives unbound variable

2018-03-11 Thread David Ireland
Hi there,

I am using the Hahn egg for auto documentation.

My code stops compiling when I try to evaluate an example of the procedure
I'm adding documentation to.

For example (from semantics-core.scm):

 (define (remove-brackets in)
  @("Removes any characters between and including the
  square brackets [..]."
(in "The string to be filtered")
(@to "string")
(@example "Example using Thee[?].a"
  *(remove-brackets "Thee[?].a"))*)
  (string-substitute "\\[.*\\]" "" in))

This results in a compile error:

*  hahn -o semantics.wiki semantics.scm semantics-core.scm*

*Error: unbound variable: remove-brackets*

My module header looks like this:

(module semantics
  @("Semantics Module")
  (remove-brackets
   test
   utterance->logic
   is-utterance-interrogative?)
  (import data-structures chicken scheme)
  (use
s
regex)
  (include "semantics-core"))

Am I doing anything wrong that is obivious?

The example in the hahn docs works fine.

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


[Chicken-users] Awful ($db ...)

2018-10-07 Thread David Ireland
Hi,

I'm using the database access in Awful and I'm having the troubles
recreating an example in the docs.  After setting up a dummy postgres
database I tried this example:

($db "insert into foo (bar, baz) values (?, ?)" values: '("bar-val" "baz-val"))

Which produced this error:

($db "insert into foo (bar, baz) values (?, ?)" values:
(quote ("bar-val" "baz-val")))  <--

Error: (get-last-result) ERROR:  syntax error at or near ","
LINE 1: insert into foo (bar, baz) values (?, ?)

If I manually add the values using:

($db "insert into company (bar, baz) values ('bar-val', 'baz-val')")

It works fine.  Am I missing something with the former?

Thanks.

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


[Chicken-users] Returning JSON in Awful

2018-09-25 Thread David Ireland
Hi,

I've started using Awful 1.0 and having trouble returning a JSON string.
The inverted commas are being replaced by  For example, using the
code below returns  {a : 1 }

Should this be normal behavior when returning JSON strings?

Thanks.
David

(use
awful)

(enable-sxml
#t)



(define my-json "{\"a\" : 1
}")


(define (define-json path
body)

  (define-page
path

(λ
()

  (awful-response-headers '((content-type
"text/json")))

(body))

no-template:
#t))



(define-json
(main-page-path)

  (λ ()
`(,my-json)))
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Geiser now has Chicken 5 Support

2018-11-16 Thread David Ireland
Hi,

Thanks for the update. I am however, getting "Symbol's function definition
is void: equalp" on a fresh install of Chicken 5 and emacs
for both Linux and OpenBSD. apropos,  srfi-1 & srfi-18 are all installed.

Does anyone have any suggestions?

Thank you.
Regards,
David


On Tue, Nov 13, 2018 at 5:12 PM Dan Leslie  wrote:

> Fresh on ELPA: Chicken 5 support in Geiser. Geiser is an enhanced Emacs
> mode for interacting with various Schemes.
>
> Completion suggestions, eldoc support, region and buffer evaluation, and
> symbol evaluation all appear to work well; most are considerably faster
> thanks to some reworking of their behaviour. Geiser's features with respect
> to switching modules and module namespaces are not available to Chicken 5,
> yet; I opted to withold porting those forward for now as that behaviour
> relied upon ## internal behaviour to operate under Chicken 4, and was
> rather brittle.
>
> If you use use-package installation is easy:
> (use-package geiser)
>
> You'll need a few additional packages for Chicken:
> chicken-install srfi-1 srfi-18 apropos
>
> I *strongly* recommend using Geiser in companion with dumb-jump; I added
> Scheme support to it some time ago, and so it now provides a reasonably
> good jump-to-definition and find-references for Scheme projects of most any
> size.
>
> Happy hacking!
>
> -Dan
>
>
> Sent with ProtonMail  Secure Email.
>
> ___
> 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] Break points for feathers

2019-01-23 Thread David Ireland
Hi,

Might be a silly question, but how do you set breakpoints when debugging in
feathers?

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


[Chicken-users] Fwd: Peeking N characters in string ports

2019-01-11 Thread David Ireland
Hi there,

I'm reading from a (string) port and have a need to peek 2 characters
inside without actually reading off the port (read-char).

I believe procedures such as unread-char seen in other Schemes would solve
my problem however, this isn't available in Chicken it seems.

Would anyone have any suggestions?

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


[Chicken-users] New Egg: Shen

2019-01-31 Thread David Ireland
Hi,

I've put together an Egg for the Shen programming language. It may interest
some people working on logic programming and natural language processing.

Shen is a hosted language with an inbuilt prolog and YACC. At the moment
the egg runs a little slow but it passes all the tests from the Shen group.

If it is worthy of the coop here is the release-info file.

https://code.sarnath.xyz/chicken-shen/raw/shen.release-info?name=dd3f89b4b

The repo location is https://code.sarnath.xyz/chicken-shen/

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