Arc Forumnew | comments | leaders | submit | SteveGraham's commentslogin
2 points by SteveGraham 3467 days ago | link | parent | on: The Plain English Compiler

I remember running into a language in the mid to late 80's called Plain English. Funny how things repeat.

Have downloaded the package and need to try it.

Thanks.

-----

2 points by SteveGraham 3472 days ago | link | parent | on: Another Arc implementation in C

Error in make:

  sh-3.1$ pwd

  /c/Users/Steve/arc-master

  sh-3.1$ make

  cc -o arc *.c

  builtins.c: In function 'builtin_load':

  builtins.c:369:13: warning: assignment makes pointer from integer without a cast [enabled by default]

  read.c: In function 'load_file':

  read.c:268:47: warning: initialization makes pointer from integer without a cast [enabled by default]

  C:\Users\Steve\AppData\Local\Temp\ccTbSwOD.o:builtins.c:(.text+0x1276): undefined reference to `_realpath'

  C:\Users\Steve\AppData\Local\Temp\ccr5oXek.o:read.c:(.text+0xd45): undefined reference to `_realpath'\

  collect2.exe: error: ld returned 1 exit status

  make: *** [all] Error 1

  sh-3.1$

-----

2 points by SteveGraham 3471 days ago | link

I'm on a Win7-64 system running under MinGW.

-----

3 points by c-a-smallwood 3471 days ago | link

Strange... It can't find realpath. Seems to be a MinGW issue according to google. I've developed the whole on Android w/ C4droid, and I'm not too experienced with MinGW, but I'll see about finding a fix!

-----

2 points by c-a-smallwood 3470 days ago | link

Should be fixed in the latest commit.

-----

2 points by SteveGraham 3468 days ago | link

Went to the page, selected Download Zip, downloaded the file, extracted it and ran 'make && ./' and got:

  cc -o arc *.c
  read.c: In function 'load_file':
  read.c:308:47: warning: initialization makes pointer from integer without a cast [enabled by default]
  C:\Users\Steve\AppData\Local\Temp\cctkjQZb.o:read.c:(.text+0xeb4): undefined reference to `_realpath'
  collect2.exe: error: ld returned 1 exit status
  make: *** [all] Error 1

-----

2 points by c-a-smallwood 3468 days ago | link

Sorry, for some reason I didn't send the commit for that file before, but it is finally updated this time.

-----

2 points by SteveGraham 3467 days ago | link

Downloaded and tried again. It did make. However, I then got an alert box stating that 'arc.exe has stopped working'.

-----

2 points by c-a-smallwood 3467 days ago | link

Hmmm. Guess I'm gonna have to make a Windows VM and do some digging.

-----

1 point by SteveGraham 3520 days ago | link | parent | on: Sorry

Okay.

To what do you object and what do you want to see and when will you be submitting the changes?

-----

2 points by SteveGraham 3530 days ago | link | parent | on: A very fast Scheme compiler

So, Stalin would produce faster executables than Gambit or Chicken? Otherwise, what would be the draw?

-----

1 point by akkartik 3530 days ago | link

I'm not sure anybody has characterized its performance to be faster or slower. But it's a small codebase and might be easier to understand than the alternative compilers.

Then again, at first glance I was unable to orient myself and figure out the global organization of the compiler. Is each scheme file a pass or a new version of the compiler with more optimizations?

-----

2 points by SteveGraham 3530 days ago | link

From Wikipedia:

Stalin (STAtic Language ImplementatioN) is an aggressive optimizing batch whole-program Scheme compiler written by Jeffrey Mark Siskind. It uses advanced flow analysis and type inference and a variety of other optimization techniques to produce code that is very fast, particularly for numerical code.[citation needed] In a number of tests it has outperformed hand-written C, sometimes by a considerable margin.[citation needed] Stalin is intended for production use in generating an optimized executable.

The compiler itself runs slowly, and there is little or no support for debugging or other niceties. Full R4RS Scheme is supported, with a few minor and rarely encountered omissions. Interfacing to external C libraries is straightforward. The compiler itself does lifetime analysis and hence does not generate as much garbage as might be expected, but global reclamation of storage is done using the Boehm garbage collector.

The name is a joke: "Stalin brutally optimizes."

-----


Thanks for this. I also found the discussion of Forth interesting.

Steve

-----