Domo arigato Mrs. Roboto
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #31   Spotlight this post!  
Unread 15-06-2002, 17:22
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
For now, I agree, and this is the quick-and-dirty implementation I have right now. If I become un-lazy in the next few weeks, I may implement something a little more elegant. Probably not, though. Anyway, VAR, CON, and DATA are all working now, and I'm putting the finishing touches on my expression and comparison evaluators. From there, the rest is just details.

BTW, parenthesis suck.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #32   Spotlight this post!  
Unread 17-06-2002, 02:19
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Well, I finished the expression evaluator tonight. Currently it supports +,-,*,/,MAX, MIN, (). It even gives the correctly incorrect answers! The parenthesis implementation aint pretty, but it seems to work, so I'm not going to mess with it. To be added whenever I have a spare minute: <<, >>, &, |, ^, ~. I gave these a slightly lower priority because I don't see them as being as common. Anyway, it should be smooth sailing from here as the only other big concept I need to implement is goto.

Oh yeah, I decided not to take my laptop to England, so I'll be taking a two-week break from this project, so don't expect anything usable until mid-July.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #33   Spotlight this post!  
Unread 17-06-2002, 08:38
VanWEric VanWEric is offline
Registered User
#0250 (Dynamos)
 
Join Date: Feb 2002
Location: NY
Posts: 86
VanWEric is an unknown quantity at this point
Well, if you are going, i am sure the good people of the forums would love to give it a good alpha testing... If you post the code i would appreciate it greatly, and you might just come back and have those opperators done for you...
Have fun in England
  #34   Spotlight this post!  
Unread 17-06-2002, 12:58
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Quote:
Originally posted by VanWEric
Well, if you are going, i am sure the good people of the forums would love to give it a good alpha testing... If you post the code i would appreciate it greatly, and you might just come back and have those opperators done for you...
Have fun in England
Good idea. It's up at http://FIRSTprograms.tripod.com. Check out the readme for some of the little quircks and caveats as well as a quick overview of some of the more complex and obfuscated sections. I'll be checking my email (and therefore these forums) every few days or whenever I find an internet cafe, so post back with and questions or comments, and I'll do my best to answer them. Remeber that after tomorrow I won't have the code with me, so post the actual code of any sections you have ?'s about.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #35   Spotlight this post!  
Unread 18-06-2002, 16:32
DanL DanL is offline
Crusty Mentor
FRC #0097
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Somerville, MA
Posts: 682
DanL is just really niceDanL is just really niceDanL is just really niceDanL is just really niceDanL is just really nice
Send a message via AIM to DanL
ahh, what do you get for not reading the boards in a long time? Bringing topics back from the dead

Quote:
Originally posted by rbayer
A 2k element array wouldn't be that bad (I've done multi-million-element), but its the principle of wasting RAM unnecesarily. I gave up on conserving disk space long ago, but I'd like to try (for the sake of good software engineering) to find a balance for RAM and speed.
This is definately an important consideration. Kudos to you. Everyone here should read this article from today's Slashdot: http://msnbc.com/news/768401.asp.
Quote:
The issue, in the view of Dan Wallach, a computer scientist at Rice University, is not the pointless churning of the processor — after all, he notes, “processing power is cheap.” Nor is Microsoft software especially flawed; critics often employ the company’s products as examples more because they are familiar than because they are unusually bad. Instead, in Wallach’s view, the blooming, buzzing confusion in Visual Studio and so many other programs betrays how the techniques for writing software have failed to keep up with the explosive increase in its complexity.
Quote:
But as computers became widespread, attitudes changed. Instead of meticulously planning code, programmers stayed up in caffeinated all-night hacking sessions, constantly bouncing results off the compiler. Again and again, the compiler would spit back error messages; the programmers would fix the mistakes one by one until the software compiled properly. “The attitude today is that you can write any sloppy piece of code and the compiler will run diagnostics,” says SRI’s Neumann. “If it doesn’t spit out an error message, it must be done correctly, right?”
As programs grew in size and complexity, however, the limits of this “code and fix” approach became evident. On average, professional coders make 100 to 150 errors in every thousand lines of code they write, according to a multiyear study of 13,000 programs by Humphrey of Carnegie Mellon. Using Humphrey’s figures, the business operating system Windows NT 4, with its 16 million lines of code, would thus have been written with about two million mistakes. Most would have been too small to have any effect, but some — many thousands — would have caused serious problems.
It basically describes the problem of bad/rushed programming, its effects, and why in terms of the long run, more time should be spent concentrating on efficiency and structure rather than the "it's quick and dirty, but it works" method. As the quote from the article says, it's not really about processing power or memory... rather it's about the fact that because programs have become so complex, more time is needed think about how the program will work and design it to work. Otherwise, well we've all seen the Blue Screen.

As for the actual emulator dilemma, since an array is the better way to go in terms of usability, but a linked list is better in terms of efficient memory management, how about you reach a compromise? How about you make an array of pointers, making them only point to information as needed?
__________________
Dan L
Team 97 Mentor
Software Engineer, Vecna Technologies

Last edited by DanL : 18-06-2002 at 16:38.
  #36   Spotlight this post!  
Unread 18-06-2002, 17:22
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
um, dan, i believe that an array is actually just a long thing of pointers, each pointing to a specific location in the memory, in which data of a certain type can be found. so making an array of pointers would really be completely pointless (yes, we all laugh at my clever little joke ).
__________________
AIM --> Woloi
Email --> ian@woloschin.com
  #37   Spotlight this post!  
Unread 18-06-2002, 17:54
Unsung FIRST Hero
Matt Leese Matt Leese is offline
Been-In-FIRST-Too-Long
FRC #1438 (The Aztechs)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1998
Location: Long Beach, CA
Posts: 937
Matt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond repute
Send a message via AIM to Matt Leese
Assuming you're talking about the C programming language (and probably several others actually), an array isn't just a list of pointers. Instead an array is simply a single pointer. When you combine a pointer with an offset (ie the array index), you can point to any specific value in the array. Now as to, arrays of pointers, they do have a use. Unfortunately in this case, using an array of pointers wouldn't help. On most systems, integers and pointers are the same size (in bits). Therefore an array of 2000 integers takes up the same amount of space as 2000 pointers. Given that there needs to be space to allocate what the pointers are pointing too, it's less efficient to do the array.

As far as whether an array of 2000 integers takes up a lot of space, I'd have to say it doesn't as it's merely 8 kilobytes of space which is not much at all compared to what computers support.
  #38   Spotlight this post!  
Unread 20-06-2002, 16:17
Unsung FIRST Hero
Matt Leese Matt Leese is offline
Been-In-FIRST-Too-Long
FRC #1438 (The Aztechs)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1998
Location: Long Beach, CA
Posts: 937
Matt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond repute
Send a message via AIM to Matt Leese
For those interested in an emulator, look here:
http://www.chiefdelphi.com/forums/sh...&threadid=4720

Matt
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wheres the list, whats the secret? archiver 2001 3 24-06-2002 01:31
Full list of teams & competitions archiver 2001 14 24-06-2002 00:52
does anyone know where to obtain a regional team list archiver 2001 1 24-06-2002 00:44
Team list & Events archiver 2000 2 23-06-2002 22:39
Suggested list of things to bring to the regionals Andrew Wyatt Technical Discussion 1 06-03-2002 14:41


All times are GMT -5. The time now is 16:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi