Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Which Scheme?

Name: Anonymous 2014-08-18 7:11

I need a Scheme compiler and/or interpreter that is:

- Portable to at least Windows, Linux, and Mac OS X.
- Has support for file I/O in UTF-8 encoding.
- Has support for parsing command line arguments.
- Has support for running shell commands on Unix systems and basic host platform detection (am I running on Windows/Linux/OS X)?
- Implements SRFIs for at least hash tables and regular expressions.
- If any of the above features are missing, then an easy to use foreign function interface will be necessary so I can roll my own.
- Bonus points for being light-weight, easy to compile/install and get up and running quickly, and/or more modern syntax (I'm familiar with R6RS and R7RS syntax as I've written C++ lexer/parsers for both, for custom Scheme-like DSLs).

Project idea is to write a program to generate ninja build files for C/C++/assembly projects from a custom sexpr data representation describing a given project. On Unix-like systems, I'll be replacing the functionality of autoconf, so I'll be checking for library feature availability, running the installed C++ compiler, invoking pkg-config, etc. Later, I'd like to add the ability to spit out MSVS/MSBuild and Xcode project files as alternative targets.

Name: Anonymous 2014-08-18 7:16

Also, I need good library procedures for manipulating file paths for at least POSIX file systems. If it doesn't support Windows file system paths, I can live with that.

Please /prog/, I don't want to be forced to write this in FIOC.

Name: Anonymous 2014-08-18 7:49

Guile seems like a good match, but I think it needs MinGW on Windows.

Name: Anonymous 2014-08-18 8:37

i recommend gay-lisp.org

Name: Anonymous 2014-08-18 8:54

>>4
But that's for the goyim.

Name: Anonymous 2014-08-18 11:00

y not racket?

Name: Anonymous 2014-08-18 14:37

GNU/Linux or Java/Linux?

Name: Anonymous 2014-08-18 19:07

lol winblows
muc os
and loonix

Be a real hacker and use OpenBSD!!!

A ;
| ,--,-/ \---,-/| ,
_|\,'. /| /| `/|-.
\`.' /| , `;.
,'\ A A A A _ /| `.;
,/ _ A _ / _ /| ;
/\ / \ , , A / / `/|
/_| | _ \ , , ,/ \
// | |/ `.\ ,- , , ,/ ,/ \/
/ @| |@ / /' \ \ , > /| ,--.
|\_/ \_/ / | | , ,/ \ ./' __:..
| __ __ | | | .--. , > > |-' / `
,/| / ' \ | | | \ , | /
/ |<--.__,->| | | . `. > > / (
/_,' \\ ^ / \ / / `. >-- /^\ |
\\___/ \ / / \__' \ \ \/ \ |
`. |/ , , /`\ \ )
\ ' |/ , V \ / `-\
`|/ ' V V \ \.' \_
'`-. V V \./'\
`|/-. \ / \ /,---`\
/ `._____V_____V'
' '

Name: Anonymous 2014-08-18 19:35

>>6
it's too trendy for me

Name: Anonymous 2014-08-19 0:41

>>6
It's the heavy weight scheme.

Name: Anonymous 2014-08-19 0:51

I'm going to give Gauche Scheme a try. It seems to have been written for utility/script creation in mind. It already has library with autoconf like syntax, and meets all of the other requirements. If it fails, I'll try something else.

Name: Anonymous 2014-08-19 20:00

>>11
kindly report back if it works for your needs.

Name: Anonymous 2014-08-20 8:36

>>12
Seems to be working pretty decently so far, I'm impressed. I've had to write some extensions for Gauche's Autoconf-like module.

Here's the m4 version of the PKG_PROG_PKG_CONFIG macro used by Autoconf, for pkg-config detection:

# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi

fi[]dnl
])# PKG_PROG_PKG_CONFIG


Here's the version I just wrote for Gauche:

; cf-check-pkg-config works like PKG_PROG_PKG_CONFIG
(define (cf-check-pkg-config :optional (min-version "0.9.0"))
(cf-path-prog 'PKG_CONFIG "pkg-config")
(if (cf-have-subst? 'PKG_CONFIG)
(let ([proc (run-process `(,(cf-ref 'PKG_CONFIG) --version) :redirects '((>& 2 1) (> 1 out)))])
(let ([version (read-line (process-output proc 'out))])
(cf-msg-checking "pkg-config is at least version: ~a " min-version)
(if (version<=? min-version version)
(cf-msg-result "yes")
(begin (cf-msg-result "no") (cf-subst 'PKG_CONFIG #f))))
(process-wait proc))))


If this works out, I think I'm done with GNU Autoconf forever. It even works on Windows without MinGW's MSYS or Cygwin. Of course, instead of using pkg-config, I'll be examining the registry to figure out the install locations of MSVS.

Name: Anonymous 2014-08-20 9:35

S. Seven. SCHEME!!!!!!!!!

Why aren't you already using it? WHY???

https://ccrma.stanford.edu/software/snd/snd/s7.html
ftp://ccrma-ftp.stanford.edu/pub/Lisp/s7.tar.gz

Use it now, verdammt!

Name: Anonymous 2014-08-20 9:37

>>14
Because I am sure it does not respect fully the standard just like every program in the world not made by me, I also don't use it because it is not made by me

Name: Anonymous 2014-08-22 14:36

I am not sure about the other requirements, but Chibi Scheme does use R7RS as the default now, and includes the regexp SFRI as well.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List