Git Product home page Git Product logo

sph-sc's People

Contributors

sph-mn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sph-sc's Issues

1+ and 1-

echo '(* 10 (1+ 2))' | sc returns (10*1+(2)); As you can see, this is a bug. There's a similar problem with 1- as well. I understand that the 1+ and 1- functions don't exist in sph-sc. But, it would be good to raise an error if they are used. The error checking can be based on the fact that C function names can only start with an alphabetic character.

Another way, and I think the better way, is to simply implement 1+ and 1- as macros. 1+ and 1- are not supported by C, but they are so common in scheme and are handy to have.

Cheers!

Some thoughts on sph-sc

Hi,
SC finally runs on my machine, but the whole installation process was pretty annoying, which I make Guile responsible for. I received great support from the creator of 'sc, but still, the process took time and during this time I had the opportunity to reflect why I so desperately want to install that exotic software.

Especially when I consider the fact, that I already installed 'sc' earlier some month ago, maybe even years. When I remember correctly I was not convinced of the sc compiler because of its weak macro support. Now that I see multiple references on that in project, I'd like to make a new try. And in addition to that I find it encouraging that sc is still in active development, because I think it is the only compiler that I know of that is happy with just providing some thin layer of syntactic sugar for the target language. Because that's it what I'm looking for a start. And then I hope for a capable macro system.
Sorry for misusing the 'issues' section as message board.
Ben

exe/install not working

I report (again) a problem with the installer script which I try to run on macos.

If in case macos is even supported I give you the error:

exe/install --dry-run
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling .../sph-sc.git/exe/install
;;; WARNING: compilation of ../sph-sc.git/exe/install failed:
;;; no code for module (sph install)
Backtrace:
           6 (primitive-load "…")
In ice-9/eval.scm:
   721:20  5 (primitive-eval (import (sph install)))
In ice-9/psyntax.scm:
  1229:36  4 (expand-top-sequence (#<syntax:install:4:0 (import #<…>) …)
  1221:19  3 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)
   259:10  2 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) …)
In ice-9/eval.scm:
   293:34  1 (_ #<directory (guile-user) 10c132c80>)
In ice-9/boot-9.scm:
   3330:6  0 (resolve-interface (sph install) #:select _ #:hide _ # _ …)

ice-9/boot-9.scm:3330:6: In procedure resolve-interface:
no code for module (sph install)

Initialize int variable in declaration

Hi,

I would like to initialize an int variable in its declaration, like int n = 1. Currently, I can only do this with two forms---a declare and a set---like so

(declare n int)
(set n 1)

Is there some way to do this with just a declare form---something like (declare n (int 1))?

Thanks!

Problems on macos: failed to create path for auto-compiled file

Hi,
I try (again) to install or at least run sph-sc on mac. It doesn't work. For one I could no install sph-lib with the script, so copied sph-lib manually into a load path. I'm not sure if I did it successfully, but what seems to work it importing sph-libs on the repl.
Now with sph-sc the "problems" begin with the exe/install script. My mac doesnt like some of the 'cp' commands options, and then the install script tried to install the modules in read only directory.
So in the end, I manually copied the sph/lang into the load path. But still exe/sc is still not running, and while try to debug the problem, I comment out almost all of the 'sc' comment, so it looks like this

#!/usr/bin/env guile
!#
(use-modules (sph) (sph lang indent-syntax))
;  (sph lang scheme) (sph string)

this happens when I run it


/sc.bin
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /Users/ben/[...]/sph-lib/sph-sc/exe/./sc.bin
;;; WARNING: compilation of /Users/ben/[...]/sph-lib/sph-sc/exe/./sc.bin failed:
;;; failed to create path for auto-compiled file "/Users/ben/[...]sph-lib/sph-sc/exe/./sc

Negation bug

Hi,

Negation doesn't seem to work correctly. (- (+ x y)) gets translated to ((x+y));. Notice the missing negation.

Cheers!

Problem with ./exe/install on macos

Hi there,
Sadly the install script fails run on my machine, due an error with the cp command.

sudo exe/install
Password:
cp: illegal option -- -
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory

This is comming from Guile I guess, but still maybe there is a workaround for sph-sc ...

Ben

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.