[Chicken-users] file-separator, path-separator

2014-10-26 Thread Sascha Ziemann
Hi,

what is the Chicken equivalent of Java's File.separator

  http://docs.oracle.com/javase/8/docs/api/java/io/File.html#separator

and File.pathSeparator:

  http://docs.oracle.com/javase/8/docs/api/java/io/File.html#pathSeparator

Something like this maybe:

(use posix)

(define file-separator #f)
(define path-separator #f)

(let ((sysname (let ((si (system-information)))
 (if (pair? si)
 (car si)
 #f
  (cond
   ((equal? sysname windows)
(set! file-separator \\)
(set! path-separator ;))
   (else
(set! file-separator /)
(set! path-separator :

Is it already defined anywhere? I could not find it.

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


Re: [Chicken-users] file-separator, path-separator

2014-10-26 Thread Thomas Chust

On Sun, 26 Oct 2014, Sascha Ziemann wrote:


[...]
what is the Chicken equivalent of Java's File.separator [...] and 
File.pathSeparator:

[...]


Hello Sascha,

as far as I know, the CHICKEN core library doesn't provide equivalent 
definitions and the code you included in your mail to define those 
variables looks fine to me.


However, there is an egg for file path manipulations which defines the 
parameters you are looking for as well as several procedures for the 
analysis and synthesis of path strings:


  http://wiki.call-cc.org/eggref/4/filepath

Ciao,
Thomas


--
When C++ is your hammer, every problem looks like your thumb.


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


Re: [Chicken-users] OpenSSL egg option defaults poll

2014-10-26 Thread Thomas Chust

On Thu, 16 Oct 2014, Thomas Chust wrote:


[...]
So I would like to poll for opinions from people on this list concerning this 
situation. Do you think the default options in the OpenSSL egg should be 
hardened? Do you think more options should be introduced? Is compatibility 
with the rest of the internet a concern at all? ;-)

[...]


Hello,

judging by the responses you wrote, there seems to be an interest in more 
secure defaults indeed.


I looked over the OpenSSL egg API again to see how it could be improved 
with better default options and figured that some additional constructor 
parameters would be useful but there were already too many optional 
parameters in my opinion.


Therefore I took another route: The existing procedures keep their current 
defaults, but there is a new set of object constructors that uses only 
keyword arguments and configures things in a more secure way by default.


The latest SVN trunk of the OpenSSL egg includes the following additions:

  [parameter] ssl-default-certificate-authority-directory

Holds the default directory with acceptable certificate authorities.

  [procedure] (ssl-make-client-context* #!key
((protocol symbol) 'tls) ((cipher-list string|list) HIGH)
((certificate-authorities string) #f)
((certificate-authority-directory string) #f)
((verify? boolean) #t))

Creates a new client context. Defaults to TLS protocol using only
ciphers marked as strong. Loads the certificate authorities from the
default directory unless other sources are specified and switches
server certificate verification on by default.

  [procedure] (ssl-connect* #!key
(hostname string) (port exact)
((protocol symbol) 'tls) ((cipher-list string|list) HIGH)
((certificate-authorities string) #f)
((certificate-authority-directory string) #f)
((verify? boolean) #t))

Connects to a server using the same defaults as
ssl-make-client-context*

  [procedure] (ssl-listen* #!key
(hostname string) ((port exact) #f) ((backlog exact) 4)
((protocol symbol) 'tls) ((cipher-list string|list) HIGH)
(certificate string) (private-key string)
((private-key-rsa? boolean) #t)
((private-key-asn1? boolean) #f))
((certificate-authorities string) #f)
((certificate-authority-directory string) #f)
((verify? boolean) #t))

Creates a listener. Defaults to TLS protocol using only ciphers marked
as strong. Loads the certificate authorities from the default
directory unless other sources are specified but doesn't switch client
certificate verification on by default. Advertises the certificates
loaded via the certificate-authorities argument to the client.

I'd be glad if some of you could test this out and tell me what you think 
about it :-)


Ciao,
Thomas


--
When C++ is your hammer, every problem looks like your thumb.


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


[Chicken-users] Interest in SLIME?

2014-10-26 Thread Daniel Leslie
I spent some time today looking into what amount of effort it would
take to add swank-trace-dialog support to the existing SLIME egg; it
turns out that it's quite doable, but as I have a slew of projects on
the go I thought I'd gauge if there's any interest outside of my own
inquisitiveness for such an enhancement?

Relatedly, I've been submitting patches to fix errors in the SLIME egg
that have resulted from code rot; so if you're like me and you use the
bleeding edge of Emacs, it should be known that the SLIME egg is sorta
usable once again.

Does anyone know if eldoc support ever functioned with the SLIME egg?

Thanks,
-Dan

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


[Chicken-users] Compile time modules query

2014-10-26 Thread James Baker
Hey Folks,

Have been toying around with Chicken lately and just started learning
the module system which seems really nice to use so far.  Just have
one question which is probably obvious but I'm not seeing how to do
it.

I've got a trivial example below which works fine from the interpreter
but is there a way to make it work in compiled code?

 module-test.scm
(define-interface things
  (one two))

(module first-module ((interface: things))
  (import scheme)

  (define one 1)
  (define two 2)
)

(functor (first-functor (M things)) things
  (import scheme (except M one))
  (define one 1.5)
  (define three 3)
)

;; these work in csi but fail in csc
(module fi = (first-functor first-module))
(eval 'one (module-environment 'fi))

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