Re: [Chicken-users] (hostinfo-addresses (hostname->hostinfo (get-host-name)))))) => returns only one address

2019-07-22 Thread Vasilij Schneidermann
One more time, with a patch for Jim.
From 8db9d5d79e63e3a552e5ab2a8571d9deeb7fa8f3 Mon Sep 17 00:00:00 2001
From: Vasilij Schneidermann 
Date: Mon, 22 Jul 2019 22:49:30 +0200
Subject: [PATCH] C5 compatibility

---
 build-hostinfo |  2 ++
 build-hostinfo.bat |  2 ++
 hostinfo.egg   |  7 +++
 hostinfo.scm   | 22 --
 4 files changed, 27 insertions(+), 6 deletions(-)
 create mode 100755 build-hostinfo
 create mode 100644 build-hostinfo.bat
 create mode 100644 hostinfo.egg

diff --git a/build-hostinfo b/build-hostinfo
new file mode 100755
index 000..56c69a4
--- /dev/null
+++ b/build-hostinfo
@@ -0,0 +1,2 @@
+#!/bin/sh
+"$CHICKEN_CSC" -O2 -d2 -C "$CFLAGS" -L "$LDFLAGS" "$@"
diff --git a/build-hostinfo.bat b/build-hostinfo.bat
new file mode 100644
index 000..c882ab5
--- /dev/null
+++ b/build-hostinfo.bat
@@ -0,0 +1,2 @@
+@echo off
+%CHICKEN_CSC% -O2 -d2 -C %CFLAGS% -L -lws2_32 -L %LDFLAGS% %*
diff --git a/hostinfo.egg b/hostinfo.egg
new file mode 100644
index 000..f6fb52b
--- /dev/null
+++ b/hostinfo.egg
@@ -0,0 +1,7 @@
+;;; hostinfo.meta -*- Hen -*-
+((synopsis "Look up host, protocol, and service information")
+ (author "Jim Ursetto")
+ (dependencies foreigners system-information)
+ (license "BSD")
+ (category net)
+ (components (extension hostinfo (custom-build "build-hostinfo"
diff --git a/hostinfo.scm b/hostinfo.scm
index 7dfd0fc..7ede91a 100644
--- a/hostinfo.scm
+++ b/hostinfo.scm
@@ -60,8 +60,6 @@
 
 #> #include "hostinfo.h" <#
 
-(require-extension srfi-4 lolevel posix)
-
 (module hostinfo
 ;;; Short and sweet lookups
   (current-hostname
@@ -82,10 +80,22 @@
 ;;; Utilities
string->ip ip->string)
 
-  (import scheme chicken
-  extras srfi-4 lolevel posix foreign
- data-structures
-  foreigners)
+  (import scheme)
+
+  (cond-expand
+   (chicken-4
+(import chicken foreign)
+(require extras srfi-4 lolevel posix data-structures foreigners))
+   (chicken-5
+(import (chicken base))
+(import (chicken blob))
+(import (chicken fixnum))
+(import (chicken foreign))
+(import (chicken format))
+(import (chicken string))
+(import (srfi 4))
+(import foreigners)
+(import system-information)))
 
   (define (vector-map p v0)   ; to avoid linking in vector-lib
 (let* ((len (vector-length v0))
-- 
2.22.0



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


Re: [Chicken-users] pdf: chicken 5 port

2019-07-22 Thread Mario Domenech Goulart
Hi Robert,

On Mon, 22 Jul 2019 11:59:52 -0400 Robert Jensen  
wrote:

> Following up - can this be added to the coop?

Sure.  Thanks for your egg.  There's a small issue though: it tries to
import srfi-69, but srfi-69 (an egg in C5) is not specified as a
dependency in pdf.egg's `dependencies' form.  Could you please fix that
before we add pdf to the coop?

All the best.
Mario
-- 
http://parenteses.org/mario

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


Re: [Chicken-users] (hostinfo-addresses (hostname->hostinfo (get-host-name)))))) => returns only one address

2019-07-22 Thread Vasilij Schneidermann
For some reason putting Jim into Cc didn't work, so I'm trying it the
other way.  Once again, a patch for porting hostinfo to C5.

Vasilij
From 8db9d5d79e63e3a552e5ab2a8571d9deeb7fa8f3 Mon Sep 17 00:00:00 2001
From: Vasilij Schneidermann 
Date: Mon, 22 Jul 2019 22:49:30 +0200
Subject: [PATCH] C5 compatibility

---
 build-hostinfo |  2 ++
 build-hostinfo.bat |  2 ++
 hostinfo.egg   |  7 +++
 hostinfo.scm   | 22 --
 4 files changed, 27 insertions(+), 6 deletions(-)
 create mode 100755 build-hostinfo
 create mode 100644 build-hostinfo.bat
 create mode 100644 hostinfo.egg

diff --git a/build-hostinfo b/build-hostinfo
new file mode 100755
index 000..56c69a4
--- /dev/null
+++ b/build-hostinfo
@@ -0,0 +1,2 @@
+#!/bin/sh
+"$CHICKEN_CSC" -O2 -d2 -C "$CFLAGS" -L "$LDFLAGS" "$@"
diff --git a/build-hostinfo.bat b/build-hostinfo.bat
new file mode 100644
index 000..c882ab5
--- /dev/null
+++ b/build-hostinfo.bat
@@ -0,0 +1,2 @@
+@echo off
+%CHICKEN_CSC% -O2 -d2 -C %CFLAGS% -L -lws2_32 -L %LDFLAGS% %*
diff --git a/hostinfo.egg b/hostinfo.egg
new file mode 100644
index 000..f6fb52b
--- /dev/null
+++ b/hostinfo.egg
@@ -0,0 +1,7 @@
+;;; hostinfo.meta -*- Hen -*-
+((synopsis "Look up host, protocol, and service information")
+ (author "Jim Ursetto")
+ (dependencies foreigners system-information)
+ (license "BSD")
+ (category net)
+ (components (extension hostinfo (custom-build "build-hostinfo"
diff --git a/hostinfo.scm b/hostinfo.scm
index 7dfd0fc..7ede91a 100644
--- a/hostinfo.scm
+++ b/hostinfo.scm
@@ -60,8 +60,6 @@
 
 #> #include "hostinfo.h" <#
 
-(require-extension srfi-4 lolevel posix)
-
 (module hostinfo
 ;;; Short and sweet lookups
   (current-hostname
@@ -82,10 +80,22 @@
 ;;; Utilities
string->ip ip->string)
 
-  (import scheme chicken
-  extras srfi-4 lolevel posix foreign
- data-structures
-  foreigners)
+  (import scheme)
+
+  (cond-expand
+   (chicken-4
+(import chicken foreign)
+(require extras srfi-4 lolevel posix data-structures foreigners))
+   (chicken-5
+(import (chicken base))
+(import (chicken blob))
+(import (chicken fixnum))
+(import (chicken foreign))
+(import (chicken format))
+(import (chicken string))
+(import (srfi 4))
+(import foreigners)
+(import system-information)))
 
   (define (vector-map p v0)   ; to avoid linking in vector-lib
 (let* ((len (vector-length v0))
-- 
2.22.0



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


Re: [Chicken-users] (hostinfo-addresses (hostname->hostinfo (get-host-name)))))) => returns only one address

2019-07-22 Thread Vasilij Schneidermann
Hello Matt,

Turns out this wasn't that hard to port.  I've added Jim to Cc so that
he can take a look at the patch.

Unfortunately I don't know much about this networking thing, so I can't
help you with the bug, other than giving you debugging ideas.  Take a
look at how exactly the egg performs its lookups and compare it with
your own solution.  Maybe there's a crucial thing missing in the egg or
something.  Another thing that would help would be having a publicly
reachable host at hand that always returns multiple addresses.

Vasilij
From 8db9d5d79e63e3a552e5ab2a8571d9deeb7fa8f3 Mon Sep 17 00:00:00 2001
From: Vasilij Schneidermann 
Date: Mon, 22 Jul 2019 22:49:30 +0200
Subject: [PATCH] C5 compatibility

---
 build-hostinfo |  2 ++
 build-hostinfo.bat |  2 ++
 hostinfo.egg   |  7 +++
 hostinfo.scm   | 22 --
 4 files changed, 27 insertions(+), 6 deletions(-)
 create mode 100755 build-hostinfo
 create mode 100644 build-hostinfo.bat
 create mode 100644 hostinfo.egg

diff --git a/build-hostinfo b/build-hostinfo
new file mode 100755
index 000..56c69a4
--- /dev/null
+++ b/build-hostinfo
@@ -0,0 +1,2 @@
+#!/bin/sh
+"$CHICKEN_CSC" -O2 -d2 -C "$CFLAGS" -L "$LDFLAGS" "$@"
diff --git a/build-hostinfo.bat b/build-hostinfo.bat
new file mode 100644
index 000..c882ab5
--- /dev/null
+++ b/build-hostinfo.bat
@@ -0,0 +1,2 @@
+@echo off
+%CHICKEN_CSC% -O2 -d2 -C %CFLAGS% -L -lws2_32 -L %LDFLAGS% %*
diff --git a/hostinfo.egg b/hostinfo.egg
new file mode 100644
index 000..f6fb52b
--- /dev/null
+++ b/hostinfo.egg
@@ -0,0 +1,7 @@
+;;; hostinfo.meta -*- Hen -*-
+((synopsis "Look up host, protocol, and service information")
+ (author "Jim Ursetto")
+ (dependencies foreigners system-information)
+ (license "BSD")
+ (category net)
+ (components (extension hostinfo (custom-build "build-hostinfo"
diff --git a/hostinfo.scm b/hostinfo.scm
index 7dfd0fc..7ede91a 100644
--- a/hostinfo.scm
+++ b/hostinfo.scm
@@ -60,8 +60,6 @@
 
 #> #include "hostinfo.h" <#
 
-(require-extension srfi-4 lolevel posix)
-
 (module hostinfo
 ;;; Short and sweet lookups
   (current-hostname
@@ -82,10 +80,22 @@
 ;;; Utilities
string->ip ip->string)
 
-  (import scheme chicken
-  extras srfi-4 lolevel posix foreign
- data-structures
-  foreigners)
+  (import scheme)
+
+  (cond-expand
+   (chicken-4
+(import chicken foreign)
+(require extras srfi-4 lolevel posix data-structures foreigners))
+   (chicken-5
+(import (chicken base))
+(import (chicken blob))
+(import (chicken fixnum))
+(import (chicken foreign))
+(import (chicken format))
+(import (chicken string))
+(import (srfi 4))
+(import foreigners)
+(import system-information)))
 
   (define (vector-map p v0)   ; to avoid linking in vector-lib
 (let* ((len (vector-length v0))
-- 
2.22.0



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


Re: [Chicken-users] pdf: chicken 5 port

2019-07-22 Thread Robert Jensen
Hello,

Following up - can this be added to the coop?

On Thu, Jul 18, 2019 at 5:11 PM  wrote:

> > I got in touch with m...@gushee.net who indicated that he is no longer
> > working on scheme. He was the last node in a chain of authors porting
> this
> > code from CL -> Racket -> Chicken. He did mention that Felix had been
> > working on another pdf extension that was to be merged with this one. So
> it
> > seems like there is no maintainer but I am curious if there is another
> > implementation that is preferred?
>
> Sorry, I can't recall. I may have helped in porting or given genberal
> advice, but I can not remember doing any work on a specific pdf extension.
>
>
> felix
>
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users