GithubHelp home page GithubHelp logo

cs61a_fa07's Introduction

CS 61A (Fall 2007)

Taken with Prof. Brian Harvey.

Works with UCB Scheme.

Course is about LISt Processing and survey of many ideas in computer science regularized to use one syntactic-structure-less language, taking advantage of the language's bias towards transparency and modularity. Course is said to be about structure (nested and enlarged lists) and interpretation (reacting to nested and enlarged lists).

How to use with Ubuntu 64-bit 16.04 LTS

  1. If you don't mind not building from source, prepare the STk binary.

  2. Get the RPM from UC Berkeley or from the folder "setup".

       wget http://inst.eecs.berkeley.edu/~scheme/precompiled/Linux/STk-4.0.1-ucb1.3.6.i386.rpm
    
  3. Get alien, which will help with turning a .rpm into a .deb.

       sudo apt-get install alien
    
  4. Install 32-bit-related libraries.

       sudo apt-get install libsm6:i386
       sudo apt-get install libx11-6:i386
       sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1
    
  5. Change the .rpm into a .deb, specifying that we wish to have the .deb addable for a 64-bit machine.

       fakeroot alien --target=amd64 STk-4.0.1-ucb1.3.6.i386.rpm
    
  6. Install the package.

       sudo dpkg -i --force-architecture stk_4.0.1-1_amd64.deb
    
  7. If you want to build STk as a 32-bit program using a 64-bit machine, create the binary.

  8. Get the source from UC Berkeley or from the folder "setup".

       wget http://inst.eecs.berkeley.edu/~scheme/source/stk-1.3.6.tgz
    
  9. Unpack the source.

       tar zxvf stk-1.3.6.tgz -C stk-1.3.6
    
  10. Change into the folder "stk-1.3.6".

  11. Fix a typo in stk/Tcl/configure at line 3222; instead of:

       system=MP-RAS-`awk '{print $3}' /etc/.relid'`
    

    We have:

       system=MP-RAS-`awk '{print $3}' /etc/.relid`
    
  12. Run "cd stk", then "make clean".

  13. Make sure you are using gcc version less than 5 - say, 4.8.

       sudo apt-get install g++-4.8   
    
  14. Make sure you are ready to build 32-bit on a 64-bit machine using compile and link flag "-m32".

       sudo apt-get install g++-4.8-multilib
    
  15. Install 32-bit-related libraries.

       sudo apt-get install libsm6:i386
       sudo apt-get install libx11-6:i386
       sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1
    
  16. Change two settings in stk/Lib/STk.init; change at line 34:

       /usr/local/lib/slib/
    

    To:

       /usr/local/lib/stk/slib/
    

    And change at line 29:

       (define (implementation-vicinity) "/3.99.3/")
    

    To:

       (define (implementation-vicinity) "/usr/local/lib/stk/1.3.6/")
    
  17. In stk/configure, change references to "gcc"; change at line 1388:

       ac_cv_prog_ac_ct_CC="gcc"
    

    To:

       ac_cv_prog_ac_ct_CC="gcc -m32"
    

    And change at line 6265:

       if test "$CC" = "gcc" -a "$SH_CCFLAGS" != "" ; then
    

    To:

       if test "$CC" = "gcc -m32" -a "$SH_CCFLAGS" != "" ; then
    
  18. Run "/bash/sh configure --prefix=/usr/local".

  19. In stk/Makefile, change at line 57 "gcc" to "gcc -m32".

  20. Use "make" and "sudo make install".

  21. Follow the following steps for UCB Scheme extensions.

  22. Get the source from UC Berkeley or from the folder "setup" and unpack the source, if you haven't already.

       wget http://inst.eecs.berkeley.edu/~scheme/source/stk-1.3.6.tgz
       tar zxvf stk-1.3.6.tgz -C stk-1.3.6
    
  23. Change into the folder "stk-1.3.6".

  24. Make sure you have gcc version less than 5 - say, 4.8.

       sudo apt-get install gcc-4.8
    
  25. Run "cd ucb".

  26. Run "/bash/sh configure --prefix=/usr/local".

  27. In ucb/stkdb/Makefile, change at line 12:

       MKDIR		= @MKDIR@
    

    To:

       MKDIR		= /bin/mkdir
    
  28. To deal with documentation tex files, we need to downgrade texinfo to version 4.13. We will build it from source, which requires libncurses5-dev. Get the source and extract it in a suitable directory:

       sudo apt-get install libncurses5-dev
       wget http://ftp.gnu.org/gnu/texinfo/texinfo-4.13.tar.gz
       gzip -dc < texinfo-4.13.tar.gz | tar -xf -
       cd texinfo-4.13
       /bash/sh configure
    
  29. Modify texinfo-4.13 Makefile to change at line 307:

       LDFLAGS = @LDFLAGS@
    

    To:

       LDFLAGS = "-L${PREFIX}/lib -lncurses"
    
  30. Run the following in texinfo-4.13/ to finish installing texinfo 4.13:

       make
       sudo make install
    
  31. Run the following in ucb/stkdb/ to install stkdb:

      make
      sudo make install
    
  32. Run "sudo mkdir /usr/local/lib/stk/slib/stkdb".

  33. Run "sudo cp stkdb/*.scm stkdb/stkdb.el /usr/local/lib/stk/slib/stkdb".

  34. Run the following in ucb/slib/ to install a Scheme library slib:

      sudo make install
    
  35. Run the following once (using sudo) to build slib catalog once:

      sudo stk-simply
    
  36. Prepare proper Emacs integration.

  37. Add to .emacs in home directory:

       (add-to-list 'load-path "/usr/local/lib/stk/slib/stkdb")
       (autoload 'scheme-mode "stkdb" "Debugger for STk." t)
       (autoload 'scheme-mode "cmuscheme" "Major mode for Scheme." t)
       (autoload 'run-scheme "cmuscheme" "Switch to interactive Scheme buffer." t)
       (setq auto-mode-alist (cons '("\\.scm" . scheme-mode) auto-mode-alist))
    
  38. In Emacs, set scheme-program-name to stk by adding line to .emacs:

       (custom-set-variables '(scheme-program-name "stk-simply"))
    
  39. For /usr/local/lib/stk/slib/stkdb/stkdb.el, replace at line 275:

       (mapc '(lambda (x)
    

    With:

       (mapc #'(lambda (x)
    

Note: STk Scheme must be used with 32-bit source on a 64-bit Linux; 64-bit STk does not work.

Screenshot

emacs with ucb scheme

cs61a_fa07's People

Contributors

bzliu94 avatar

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.