nedoPC.org

Electronics hobbyists community established in 2002
Atom Feed | View unanswered posts | View active topics It is currently 28 Mar 2024 03:56



Reply to topic  [ 273 posts ]  Go to page Previous  1 ... 15, 16, 17, 18, 19  Next
Tunguska the ternary emulator 
Author Message
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22409
Location: Silicon Valley
Reply with quote
Shaos wrote:
Shaos wrote:

OK, and I'll check current code under MacOS X 10.4 on my PowerBook G4

I checked - bad news :(
MacOS X 10.4 has older bison version 1.28 that doesn't create cpp/hpp, instead it creates c/h files and I can't compile it even after renaming...


After installation from sources m4-1.4.13 (with symlink /usr/local/bin/gm4 to m4) and bison-2.4.1 Tunguska was compiled:

Quote:
make
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall -c -o trit.o trit.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall -c -o tryte.o tryte.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall -c -o machine.o machine.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall -c -o tunguska.o tunguska.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall -c -o display.o display.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall -c -o keyboard.o keyboard.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall -c -o interrupt.o interrupt.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall -c -o disk.o disk.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall -c -o agdp.o agdp.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall -c -o memory.o memory.cc
g++ trit.o tryte.o machine.o tunguska.o interrupt.o display.o keyboard.o disk.o agdp.o memory.o -o tunguska `pkg-config sdl --libs` -lfl -lz
bison -d parser.ypp
mv parser.tab.hpp parser.h
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall -c -o parser.tab.o parser.tab.cpp
In file included from /usr/include/gcc/darwin/4.0/c++/backward/iostream.h:31,
from /usr/include/FlexLexer.h:50,
from parser.ypp:25:
/usr/include/gcc/darwin/4.0/c++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
flex -+ scanner.l
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall -c -o lex.yy.o lex.yy.cc
In file included from /usr/include/gcc/darwin/4.0/c++/backward/iostream.h:31,
from /usr/include/FlexLexer.h:50,
from lex.yy.cc:241:
/usr/include/gcc/darwin/4.0/c++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
lex.yy.cc: In member function `virtual int yyFlexLexer::yylex()':
lex.yy.cc:633: warning: label 'find_rule' defined but not used
lex.yy.cc: At global scope:
lex.yy.cc:1613: warning: 'void* yy_flex_realloc(void*, yy_size_t)' defined but not used
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall -c -o assembler.o assembler.cc
In file included from /usr/include/gcc/darwin/4.0/c++/backward/iostream.h:31,
from /usr/include/FlexLexer.h:50,
from assembler.cc:28:
/usr/include/gcc/darwin/4.0/c++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
g++ trit.o tryte.o machine.o interrupt.o assembler.o parser.tab.o lex.yy.o memory.o agdp.o -o tg_assembler `pkg-config sdl --libs` -lfl -lz


it's working, but very slow (in the beginning 10-15 seconds per frame, then about 5 seconds per frame).
Speed of virtual machine on 1.67 GHz PowerPC G4 under MacOS X 10.4:
Code:
Initial benchmark: 886.832 thousand operations per second
        Spread: 136.945


05 Sep 2009 02:04
Profile WWW
Maniac

Joined: 17 Sep 2012 13:36
Posts: 277
Location: 81.170.128.52
Reply with quote
As you have no doubt noticed, not a lot has happened with this project for ages (well, in fact, nothing at all has happened). I've been quite busy with other projects and my physics studies, and now on top of that I'm working on my master's thesis, which is eating a lot of time, so things will likely remain slow at least until my thesis is finished (in January).

Just figured I'd make some sort of official statement, so you guys don't think I've been run over by a bus or something.


08 Nov 2010 02:11
Profile
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22409
Location: Silicon Valley
Reply with quote
Good news! ;)
By the way, any ideas as to do Tunguska faster on Mac? :)


08 Nov 2010 16:57
Profile WWW
Retired

Joined: 03 Aug 2003 22:37
Posts: 1474
Location: Moscow
Reply with quote
I am happy to know you're not dropped the project :) Will wait for new Tunguska releases.


09 Nov 2010 01:36
Profile
Retired

Joined: 03 Aug 2003 22:37
Posts: 1474
Location: Moscow
Reply with quote
Quote:
By the way, any ideas as to do Tunguska faster on Mac? :)


It is fairly easy - take a faster Mac ;)


09 Nov 2010 01:39
Profile
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22409
Location: Silicon Valley
Reply with quote
Mac Buster wrote:
Quote:
By the way, any ideas as to do Tunguska faster on Mac? :)


It is fairly easy - take a faster Mac ;)


My Mac is relatively fast - it's PowerPC G4 1.67 GHz...


09 Nov 2010 06:21
Profile WWW
Maniac

Joined: 17 Sep 2012 13:36
Posts: 277
Location: 81.170.128.52
Reply with quote
The work on my thesis sort took longer than I had planned. It's now mostly done, and the classes I'm taking now have been quite demanding, but hopefully I'll be able to put real work into Tunguska towards the end of this month.

It's very frustrating to be away from programming for this long. I have so many ideas, and my programming fingers are itching to get to work.

I'm doing some small performance testing work on various algorithms at the moment, to get hard figures on which method of doing ternary logic in host-native integers is the best.

As for mac performance, I honestly have no idea.


04 Mar 2011 11:57
Profile
Maniac

Joined: 17 Sep 2012 13:36
Posts: 277
Location: 81.170.128.52
Reply with quote
The people that were hosting the tunguska website has had a disk crash, so it's down for the time being. Apparently they're working on restoring stuff from the backups now.

Just figured I'd let you guys know I haven't disowned the page or anything.


12 Apr 2011 05:39
Profile
Maniac

Joined: 17 Sep 2012 13:36
Posts: 277
Location: 81.170.128.52
Reply with quote
I've moved the tunguska website to sourceforge hosting, as my acc.umu.se account will soon expire, as well as updated the freshmeat page to reflect this change.

I also patched some bit rot on the CVS so that it compiles with newer GCC versions.


24 Jun 2011 16:43
Profile
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22409
Location: Silicon Valley
Reply with quote
eudoxie wrote:
I've moved the tunguska website to sourceforge hosting, as my acc.umu.se account will soon expire, as well as updated the freshmeat page to reflect this change.

I also patched some bit rot on the CVS so that it compiles with newer GCC versions.


Code:
bash-4.1$ make
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall    -c -o trit.o trit.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall    -c -o tryte.o tryte.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall    -c -o machine.o machine.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall    -c -o tunguska.o tunguska.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall    -c -o display.o display.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall    -c -o keyboard.o keyboard.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall    -c -o interrupt.o interrupt.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall    -c -o disk.o disk.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall    -c -o agdp.o agdp.cc
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall    -c -o memory.o memory.cc
g++ trit.o tryte.o machine.o tunguska.o interrupt.o display.o keyboard.o disk.o agdp.o memory.o -o tunguska `pkg-config sdl --libs` -lfl -lz
bison -d parser.ypp
mv parser.tab.hpp parser.h
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall    -c -o parser.tab.o parser.tab.cpp
flex -+ scanner.l
g++ `pkg-config sdl --cflags` -O3 -funroll-loops -Wall    -c -o lex.yy.o lex.yy.cc
lex.yy.cc: In member function 'int yyFlexLexer::yyinput()':
lex.yy.cc:1402:14: error: 'EOF' was not declared in this scope
make: *** [lex.yy.o] Error 1


I have Slackware 13.37:

Code:
bash-4.1$ uname -a
Linux monster 2.6.37.6-smp #2 SMP Sat Apr 9 23:39:07 CDT 2011 i686 Intel(R) Core(TM)2 Duo CPU     E4700  @ 2.60GHz GenuineIntel GNU/Linux
bash-4.1$ gcc --version
gcc (GCC) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


24 Jun 2011 22:56
Profile WWW
Maniac

Joined: 17 Sep 2012 13:36
Posts: 277
Location: 81.170.128.52
Reply with quote
Hm, I'm not quite sure what to do about that one, as it's code that has been generated by flex and not by me. Could be that slackware is using versions of gcc and flex that don't play nice together.

My flex version defines EOF as -1, I suppose you could compile with -DEOF=-1 as a temporary fix.


24 Jun 2011 23:28
Profile
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22409
Location: Silicon Valley
Reply with quote
Code:
bash-4.1$ flex --version
flex 2.5.35

bash-4.1$ bison --version
bison (GNU Bison) 2.4.3
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


25 Jun 2011 09:30
Profile WWW
Maniac

Joined: 17 Sep 2012 13:36
Posts: 277
Location: 81.170.128.52
Reply with quote
I have the same flex version, bison 2.4.1 and gcc 4.5.2.

What's your GCC version?

Also, try adding
Code:
#ifndef EOF
# define EOF -1
#endif


just above "extern YYSTYPE yylval" in scanner.l, see if that works (it's a bit of an ugly fix, but my version doesn't complain about it and builds a working assembler)


26 Jun 2011 04:33
Profile
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22409
Location: Silicon Valley
Reply with quote
yes, it's working

P.S. my gcc is 4.5.2


26 Jun 2011 16:54
Profile WWW
Maniac

Joined: 17 Sep 2012 13:36
Posts: 277
Location: 81.170.128.52
Reply with quote
I pushed some minor changes to the CVS. Mostly moving a bunch of small objects off the heap to the stack, where good programming practice dictates they belong. Shouldn't affect performance or functionality.


18 Aug 2011 11:54
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 273 posts ]  Go to page Previous  1 ... 15, 16, 17, 18, 19  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.