the script of the the GUI program HardwareSimulator.sh will just pop up a white window, and nothing more.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

the script of the the GUI program HardwareSimulator.sh will just pop up a white window, and nothing more.

xieyuheng
  the following command shows the machine I am using :
  $ uname --all
  Linux CICADA 3.15.7-1-ARCH #1 SMP PREEMPT Mon Jul 28 20:06:17 CEST 2014 x86_64 GNU/Linux


  the script of the CLI program JackCompiler.sh works fine.

  but scripts of the the GUI programs Assembler.sh  CPUEmulator.sh  HardwareSimulator.sh  VMEmulator.sh,
  will just pop up a white window, and nothing more.
 
  the same bug also occurs in the AUR version :: https://aur.archlinux.org/packages/nand2tetris/

  and I do not think the linux support is good enough,
  there is NOT even a Makefile in the root directory of the source code (nand2tetris-open-source-2.5.7.zip).


  and as an emacs user, I am very upset to see that
  most of the tools you guys implemented only have a GUI version.
 
  and sorry to see that you guys implemented your tools in java,
  but not in  Scheme or Lisp or Forth or Haskell or Ocaml or Coq or Mini-Kanren
  or A new language which is really designed by you.
the world is so often too complicated for the rules we make to keep it orderly.
cicada is a simple functional programming language.
https://github.com/cicada-language/
Reply | Threaded
Open this post in threaded view
|

Re: the script of the the GUI program HardwareSimulator.sh will just pop up a white window, and nothing more.

cadet1620
Administrator
Please try the scripts in this post.

I wrote and tested them on Ubuntu and Yong tested them om a Mac. I welcome comments and improvements for them. E-mail directly to me. (Warning, there's a bit of oddness in their implementation due to incompatibilities between Linux and OSX.)

If you can come up with a Makefile, I can post it in the new files section and suggest that it go into the official source archive.

I also wish there was better command line support in the tools.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: the script of the the GUI program HardwareSimulator.sh will just pop up a white window, and nothing more.

xieyuheng
This post was updated on .
I apologize for the tone I used above,
I just feel so upset when I meet the problem.

the new scripts still do not work properly.

I am asking my friends who use Archlinux to test it for me now.
If they fail, I will install other linux distributions to test it.

I am NOT familiar with java, my knowledge is very limited.
actually I design my own functional programming language
  :: https://github.com/cicada-language

when I fully understanded what the java code do,
I may reimplement these simulators in my language.
I am not sure this would be counted as a contribution,
and the developer of this project maybe even angry about this.

but I think with careful design,
my language maybe could make this project selfhosted.

-- xyh
the world is so often too complicated for the rules we make to keep it orderly.
cicada is a simple functional programming language.
https://github.com/cicada-language/
Reply | Threaded
Open this post in threaded view
|

Re: the script of the the GUI program HardwareSimulator.sh will just pop up a white window, and nothing more.

xieyuheng
In reply to this post by cadet1620
  I think there are some missing dependencies of some GUI lib,
  do you know what GUI lib the java code use?
the world is so often too complicated for the rules we make to keep it orderly.
cicada is a simple functional programming language.
https://github.com/cicada-language/
Reply | Threaded
Open this post in threaded view
|

Re: the script of the the GUI program HardwareSimulator.sh will just pop up a white window, and nothing more.

cadet1620
Administrator
In reply to this post by xieyuheng
xieyuheng wrote
actually I design my own functional programming language
  :: https://bitbucket.org/cicada-language/cicada

when I fully understanded what the java code do,
I may reimplement these simulators in my language.
I am not sure this would be counted as a contribution,
and the developer of this project maybe even angry about this.

but I think with careful design,
my language maybe could make this project selfhosted.

-- xyh
Cicada looks interesting, but I don't have a 64-bit Linux system to play with it. My work PC runs 64-bit win7 and 32-bit Ubuntu Linux, but seems to hate 64-bit Ubuntu 8-(

I haven't played with functional languages since Lisp and Forth back in the 1980s.

If you get a version of the hardware simulator running in Cicada, post about it here. We're always interested in useful tools.

For example, one tool that doesn't interoperate at all with the n2t tools but is very useful for learning logic is Logisim, and I highly recommend it.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: the script of the the GUI program HardwareSimulator.sh will just pop up a white window, and nothing more.

xieyuheng
This post was updated on .
  I can use these simulators (in an awkward way) now,
  the following is my report to you
  and other people (maybe only me ...)
  who meet the same problem.

  one of my friend can use these simulators on Archlinux,
  but I still can not.
 
  I installed a new 64-bits ubuntu
  (ubuntu-14.04.1-desktop-amd64.iso)
  and I meet the following error when I try to run a simulator :
     Exception in thread "main" java.awt.HeadlessException
          at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
          ...

  then
  (thx to justin_smith on #java on irc.freenode.net for his help)
  I do the following :
     sudo apt-get install openjdk-6-jdk
     sudo apt-get install openjdk-6-jre
  and
     sudo update-alternatives --config java
  set it to version 6  
  then I can run the simulators.

  back to Archlinux,
  I found Archlinux is using
     jdk7-openjdk
     jre7-openjdk
     jre7-openjdk-headless

  so maybe the java code of these programs
  are not well tested under the version 7 of openjdk on linux.
  (or maybe other unknow reasons from my Archlinux.)
 
  for it is not convenient to use a old version in Archlinux,
  I just (awkwardly) chroot to the ubuntu to run these simulators ...
 

  BTW, thank you for you are interested in cicada :)
  and I will try Logisim :)
  and I recommend Archlinux to you ::
  https://wiki.archlinux.org/index.php/Arch_Linux
  https://wiki.archlinux.org/index.php/The_Arch_Way
  IMO, it is more simple then ubuntu


  the following is how to use chroot
  for new linux users ::
 
  cd /mnt
  sudo mount -t proc none proc
  sudo mount --bind /sys sys
  sudo mount --bind /dev dev
  sudo mount --bind /home home
 
  # sudo chroot . bash -l

  # Use env before chroot to ensure that
  # no environment variables from the installation media
  # are used by your new system:
  sudo env -i HOME=$HOME DISPLAY=$DISPLAY TERM=$TERM chroot . bash -l
 
  # ...

  exit

  sudo umount  proc
  sudo umount  sys
  sudo umount  dev
  sudo umount  home

  -- xyh
the world is so often too complicated for the rules we make to keep it orderly.
cicada is a simple functional programming language.
https://github.com/cicada-language/