Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

More Memory Questions

Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
10-08-2008 16:38
From: Shifting Dreamscape
Which is more efficient or is there a difference:

.......
if (llListFindList (...) != -1)
or
if (llListFindList(...) + 1)
These two expressions generate the same parse tree, with only a couple of constants (1 vs -1, and different operands) different. The LSL compiler does not optimize them, it executes code corresponding to:

Push -1
[code generating the args to llListFindList]
Call llListFindList
Subtract top stack elements
Pop top of stack and branch if non-zero

Or:

Push 1
[code generating the args to llListFindList]
Call llListFindList
Add top stack elements
Pop top of stack and branch if non-zero
Alicia Sautereau
if (!social) hide;
Join date: 20 Feb 2007
Posts: 3,125
10-08-2008 16:54
From: Talarus Luan
I don't personally see that as a reason not to try. I realize that other people don't agree with that stance, though.

personally, i try when i can anderstand it and i guess most people do but with the arguing, tbh, i still don`t have a clue what the "^" precisely does due to it (trying to learn)

From: someone
No, but no one should be afraid (or be told to shut up) over making suggestions for improvement, either.

true, but some simple examples or short description why * is better then * is better to understand for people such as me who trying to figure out the advanced stuff you all talk about

same as the LSO list memory trick, it works but beats me why, sure not the only one saying "what ever..." while using it in almost every script :p

From: someone
This actually happens a lot with the LibraryWarpPos script. I get IMs all the time with people asking how it works, IF it works, or WHAT it does. It is HEAVILY optimized, and few people can make heads or tails of it. It was INTENTIONALLY optimized to be used as a "black box", keeping the memory footprint down as low as possible for the maximum teleport distance. I would NEVER EVER recommend it for learning, unless someone specifically wanted to learn code optimization techniques. However, I have spent time in IM explaining how it works to folks who are so inclined. I probably need to upload the version I use to reabsorb it every time I come back after 6 months and decipher it.

seen the code and fit in that catagory, glad i`m not doing any mevement stuff yet :D

From: someone
The whole point of the forum is to help and give advice. The better the advice, the more someone can learn and apply. In the case of this thread, giving "when to optimize" tips is a valid and positive addition to offering optimization tips.

not saying anything about that and the reason this forum is great with all the people skilled people helping us nubs out with our simple problems wich encurrages(sp) to help back if/when we see a problem we can help with :o

the way the discussion is heading into how ever...

From: someone
As such, I don't find it pointless at all (well, the ad hominem we could have done without). I would point out something that Jesse has also said in the past which is very relevant (paraphrased, because I can't find the original post): "There are a lot of talented people here giving help, and I think that all the different points of view help everyone immensely".

having options and different views is better, would be quite a boring place if every one did everything the same :)

From: someone
Oh, definitely. I don't think this is so much a style argument, though, as there is a significant "best practices" element, which is taught in many beginning computer science classes, and for good reason.

don`t forget that (i think atleast) most people who use this forum for general help with their scripts just learned coding in SL

had abit of php coding (simple apps) befor coming to SL and give scripting a try so knew how to navigate trough it but that`s it

From: someone
Sharing this info and the reasons behind it is a positive thing, I think. Not everyone agrees, though, and that's fine, but last I checked, we're entitled to express our opinions and supporting arguments here.

true, normally i`d be in for a good heated discussion, but this isn`t RA ;)

ever since joining, the amount of help given here is suprisingly great, personally, hope to be able to contribute as mush as some of you do right now after getting alot more expirience
Alicia Sautereau
if (!social) hide;
Join date: 20 Feb 2007
Posts: 3,125
10-08-2008 16:55
From: Argent Stonecutter
These two expressions generate the same parse tree, with only a couple of constants (1 vs -1, and different operands) different. The LSL compiler does not optimize them, it executes code corresponding to:

Push -1
[code generating the args to llListFindList]
Call llListFindList
Subtract top stack elements
Pop top of stack and branch if non-zero

Or:

Push 1
[code generating the args to llListFindList]
Call llListFindList
Add top stack elements
Pop top of stack and branch if non-zero

o.O so that`s how it works! :o
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
10-08-2008 16:57
From: Talarus Luan
This actually happens a lot with the LibraryWarpPos script. I get IMs all the time with people asking how it works, IF it works, or WHAT it does. It is HEAVILY optimized, and few people can make heads or tails of it.
Heh. It's not that complicated. I wouldn't have bothered optimizing that last list concatenation myself, though it does save on average 1/4 of the total list length. I've optimized a few scripts for people that were using it wrong, though... it never seems to occur to people to generate the list ahead of time, and use the same list twice if they're warping to the same position more than once.

But I still think they need to implement llTeleportAgent and have done with it.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
10-08-2008 17:00
From: Alicia Sautereau
o.O so that`s how it works! :o
Yeh, it's a pure stack machine. The CIL code it generates for Mono is functionally the same, right down to the backwards stacking order... there's occasional swaps thrown in where they're generating plain CIL opcodes... to avoid breaking Strife's list optimization hack.
Alicia Sautereau
if (!social) hide;
Join date: 20 Feb 2007
Posts: 3,125
10-08-2008 17:07
From: Argent Stonecutter
Yeh, it's a pure stack machine. The CIL code it generates for Mono is functionally the same, right down to the backwards stacking order... there's occasional swaps thrown in where they're generating plain CIL opcodes... to avoid breaking Strife's list optimization hack.

hocuspocus but what ever works, still thanks for trying ;)

glad i haven`t touched the lsl scripts for rewrite, this will find it`s way into several heavy list dependent scripts :)
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-08-2008 17:14
From: Talarus Luan
Yes, and the converse of that assumption is also true. Just because you can read something doesn't mean it is readable for anyone else. Can you at least stipulate to that truism? No one here is saying that they shouldn't do something for themselves, only if they care about doing it for others. If they don't (and I am aware that you don't), then fine, do whatever you want. No one here is saying otherwise.

"No one here is saying otherwise" It is sugar coated but look closely at this paragraph because it directly translates to "Code however you want but if you post code here in the forums it has to be to my specifications and if it isn't then you are not a nice person".

And my history here shows very clearly just how much I do care about other people. I just do not like people saying, once again, that they have to write code a certain way.

Now do we really want to start this all over again. Do you intend to continue throwing out little barbs?
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
10-08-2008 17:43
From: Jesse Barnett
"No one here is saying otherwise" It is sugar coated but look closely at this paragraph because it directly translates to "Code however you want but if you post code here in the forums it has to be to my specifications and if it isn't then you are not a nice person".


First of all, no one here can dictate how ANYone does ANYthing. Maybe in your mind that is possible, but in MY mind, it isn't, and that is the basis from which I operate.

As such, your take on that paragraph is your take, and you can read it and call it whatever you want.

How many times do I have to say "opinion" and "suggestion" and "tip" before it sinks in? I admit I am hard-headed at times, but jeeze. :rolleyes:

From: someone
And my history here shows very clearly just how much I do care about other people. I just do not like people saying, once again, that they have to write code a certain way.


..and I have never challenged your history. The so-called "barb" is referring in how you treat people who have differing opinions from your own. I don't think anything anyone said here deserves what amounts to "shut up, you're saying BS". You don't agree, fine. You want to present a differing point of view, fine. You don't have ANY right to tell others not to contribute theirs. Period.

There's these little things called "respect" and "tolerance". I would SUGGEST you have a gander at them sometime.

From: someone
Now do we really want to start this all over again. Do you intend to continue throwing out little barbs?


Too late. :rolleyes: Don't start what you don't want to finish, k?
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-08-2008 18:07
"No one here is saying that they shouldn't do something for themselves, ONLY if they care about doing it for others."

Are you and others not saying "This is not readable to me so you should not post code with it here in the forums"? And in fact you shouldn't use it yourself, because if I can not read it with 30 years expireince then you poor mortals will surely forget what it means a year from now? How have I misread anything? Anyone can look back and see where it was stated in one form or another, several times here. This is what I am saying is flat out wrong.

Then if we expand that quotation it says: "No one here is saying that they shouldn't do something for themselves, only if they care about doing it for others. If they don't (and I am aware that you don't), then fine, do whatever you want." Then what exactly was the ";(and I am aware that you don't)" referring to?
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
bobbyb30 Swashbuckler
Registered User
Join date: 8 Sep 2008
Posts: 46
10-08-2008 18:25
From: Talarus Luan
A) Yes, it was intended as an example, probably a poor one, but some folks have actually done things like that, sometimes to be cute, but once in a while, that is what a serious programmer did, thinking it was the best and most efficient way to do it.
B) Like I said, it was an example, but you make my point, even in your optimized version, because my first impression is "Is there something missing in this code?" and I have to start deconstructing it my mind, wasting my valuable time. Usually, once I have gone to that kind of trouble, I replace the offending code with what I consider is its proper equivalent so I don't (or someone else doesn't) have to waste time in the future, and continue on.
C) Exactly, so if you expect to publish the code for anyone else to read and/or support, why not make their task easier? It probably won't ever matter to you if you are the only one whose eyes ever grace it but, I can tell you from experience that It Just Ain't So.
D) Which, unless there was a significant and/or necessary savings in memory or speed, is not better than the savings in time for anyone else having to understand/maintain it later. In my mind, anyway, human time >>> memory/computer time.



That's true. :) You like code puzzles. You do well at them. However, I daresay most people who are in the mainstream don't have time for them, and when that deadline looms large, cute obfuscated code puzzles are expensive for the time required, if not downright hated by your coworkers.

I think you've done a lot of cool stuff with your optimizations in LSL; this isn't meant to be an indictment of them in the least. However, if I have to comprehend and support your code, I generally do de-obfuscate it and put it into a more readable format, unless the optimizations are of the kind required for proper operation or necessary efficiency. Then, I just leave them alone and treat them as black boxes (though that is very rare; my mind hates black boxes :P ).

At the end of the day, that's what it boils down to for me: necessary efficiency at the cost of readability, or readability at the cost of unnecessary efficiency.



I don't agree with that. Certainly, to master any language, you must also master all of its quirks and nuances. However, I would say that better computer languages allow you to express the more abstract concepts of algorithms without having to resort to quirks and nuances. Not just better languages, but also better implementations of certain languages. In any language, colloquialisms are an impediment to understanding and timely communication; they are no less so in a computer language, either. This concept is especially true in terms of the "learning curve" of a language, and if you are writing code which is, in any way, intended to be instructive or helpful to neophytes, you are not doing them any favors by choosing obfuscation over readability.

I mean, what is the point of a computer language anyway? It simply just isn't for providing a method of telling the computer what to do, it is what any language, natural or artificial, is primarily for... communication. In fact, I daresay that computer languages have to pull double duty, not only to communicate to the computer what you want it to do, but to also communicate to other people what you are trying to do. To take this to the most absurd level, why use a human readable computer language at all? If the goal is to make the most efficient, speediest program possible, hand-tuned machine code is the way to go. There are no intervening assumptions or high-level abstractions to get in the way of you telling the computer EXACTLY what you want it to do. It is the ultimate puzzle (and, yes, I have done it, from flipping Address/Data/Step/Load/Store/Run/Stop/Reset switches on the front of Altair and IMSAI 8080A-based systems, to hand-optimizing COMPASS output for CDC Cyber series mainframes), and can be quite entertaining, but the amount of time expended for the benefit, at least nowadays, just doesn't scale.



Correct, within the language model, Booleans are interpreted and handled separately from all other data types. In Pascal, for example, Booleans are their own separate data type, and the language syntax enforces Boolean usage in conditionals. IE, this won't work:

If X - 7 Then Do_Blah;

Because the language expects, as the final result of the conditional expression, a value of Boolean type. Conditional operations result in Boolean values, you can specify Boolean-typed variables or functions, and string together multiple Boolean expressions with the logical AND / OR / NOT operators. It is only really in C and similar languages where non-Boolean expressions can be treated as Booleans by virtue of a value-equivalence quirk which can be non-portable, not only to other implementations of the language, but to other languages in general.

Non-portability when it comes to high-level language constructs is another form of that "quirkiness" or colloquial aspect of the language, which is not something to be cherished, but to be avoided, because it simply acts as an impediment to understanding and, ultimately, wastes human time. In some cases, it is important for it to exist, and in those cases, it can at least be accepted as a necessary evil. However, in the balance of cases, it is just problematic.

Just as a parting analogy, I don't think anyone can argue with the concept of using the right tool for the job. While you can use a screwdriver as a chisel, and it will be serviceable in some cases, if you hand someone a screwdriver and a block of wood, and tell them to carve a duck, they will invariably spend time figuring out how to properly apply the tool to the job, whereas if you had handed them a wood chisel instead, they would be done already.




Beyond this...the thread is going OT(off topic)
_____________________
Large supporter and contributer of LSL Editor available at lsleditor.org
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
10-08-2008 18:52
From: Jesse Barnett
"No one here is saying that they shouldn't do something for themselves, ONLY if they care about doing it for others."

Are you and others not saying "This is not readable to me so you should not post code with it here in the forums"? And in fact you shouldn't use it yourself, because if I can not read it with 30 years expireince then you poor mortals will surely forget what it means a year from now? How have I misread anything? Anyone can look back and see where it was stated in one form or another, several times here. This is what I am saying is flat out wrong.


Nope. Not even remotely close. Actually, given your actual words, you keep reiterating that everyone is saying "you can't do this!", when the only person who ever used any words remotely like that is you. I have SUGGESTED that people NOT sacrifice readability for unnecessary optimization. That's the extent of my argument. The rest is exemplification, rationale, and debate with those who dispute the veracity or substance of the suggestion (or, in your case, the integrity of the of the suggester or the right to make suggestions).

If you were learning to weld, and I told you that a welding torch can hurt you if you don't use it right, when you challenge me for that knowledge, and I say "how do I know? I've been hurt by them before I learned myself!", PLUS explain how and why, is that not a valid way of expressing knowledge and experience? How else am I supposed to do it?

I'm not making stuff up; these are lessons I learned in classes, on the job, in my own projects, and working on other people's stuff. I'm not alone in saying these things. You want someone MORE authorative? I am sure I can dig up some juicy Knuth, or Tanenbaum for you, if you like. They are about as authoritative as it gets on the subject.

Regardless. The point wasn't to "pull credentials", it was to explain how I know and why these things are also good suggestions. I've been burnt by not adhering to them, and I am suggesting that others avoid my folly. Experience is less about what someone has done right, and more about what someone has done wrong, but improved themselves as a result. So, if you really feel like deprecating me some more, go ahead and make fun of me by saying "so you're saying you've spent 30 years screwing up". Please. You know what I will say? "Yup, still do, but I do it around 30 years' less than I did 30 years ago. ;)"

From: someone
Then if we expand that quotation it says: "No one here is saying that they shouldn't do something for themselves, only if they care about doing it for others. If they don't (and I am aware that you don't), then fine, do whatever you want." Then what exactly was the ";(and I am aware that you don't)" referring to?


From your point of view, it reads to me like you are telling people that you only worry about whether it is readable to you; everyone else should have to come to your way of thinking to figure out your code. You are vehement about the point, so I deduced that you don't care about readability of your code for others in this sense.

MY point is that people SHOULD care about the readability of their code, not only for themselves, but for others, because, more often than not, someone will most likely look at something you wrote at some point, and the LESS time they have to spend dealing with your colloquialisms and personal idioms, the better. I don't know about you, but I think that is a net positive overall.

It is like every other kind of good habit out there. Eating right, exercising, practicing patience and tolerance, helping the old lady across the street. Some habits help ourselves, helping us, in turn, to help others. We all probably don't practice good habits near as much as we should and, inevitably, someone pays the price.
Alicia Sautereau
if (!social) hide;
Join date: 20 Feb 2007
Posts: 3,125
10-08-2008 19:02
/attempt to defuse...

discoverd phpDesigner 2008 last night, must say it is a great tool to help reduce cluttering scripts and at the same time help optimize code with the ability to include libraries so you can access functions in different classes (woohoo not loosing stuff anymore (sort of...) :p )

wished we had classes in lsl and such tools, think it would do wonders to be able to access "unreadable" optimized code with a single call unlike now with using entire scripts to get lost in, what i was expecting with the implementation of mono (atleast kept hoping :) )

but the 2 of you argueing is anything but efficient and unreadable debacle(sp) for the rest as we miss the underlying history ;) :p



btw, using ^ in an if statement, so:
nm, allready screwed that 1 up lol
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
10-08-2008 19:13
From: Alicia Sautereau
wished we had classes in lsl and such tools, think it would do wonders to be able to access "unreadable" optimized code with a single call unlike now with using entire scripts to get lost in, what i was expecting with the implementation of mono (atleast kept hoping :) )


Then it wouldn't be LSL anymore. :p

No, seriously, the eventual hope is that they get full language support with Mono so that we can actually build things like classes and put them in libraries, but I think that is another 2 years out right now.

From: someone
but the 2 of you argueing is anything but efficient and unreadable debacle(sp) for the rest as we miss the underlying history


Ehh.. it's not worth worrying over. We'll get over it and kiss and make up eventually. :p Jesse is cool, and has done a lot for a lot of people. We just sometimes let our pet peeves get in the way of remembering those things. ;)

From: someone
btw, using ^ in an if statement, so:

integer DEBUG = TRUE;
if (^DEBUG) bla;

is more efficient then:
if (DEBUG) bla;

?


^ is a bitwise (integer) operator which requires two params, like & or |. So I think you might be looking for !.

You're using DEBUG as a Boolean, so I would recommend sticking with only Boolean operators with it: ! (not), && (and), || (or)
Alicia Sautereau
if (!social) hide;
Join date: 20 Feb 2007
Posts: 3,125
10-08-2008 19:18
From: Talarus Luan
Then it wouldn't be LSL anymore. :p

No, seriously, the eventual hope is that they get full language support with Mono so that we can actually build things like classes and put them in libraries, but I think that is another 2 years out right now.

atleast with that time span i`ll learn how to code decently to be able to take full advantage of it lmao

From: someone
Ehh.. it's not worth worrying over. We'll get over it and kiss and make up eventually. :p Jesse is cool, and has done a lot for a lot of people. We just sometimes let our pet peeves get in the way of remembering those things. ;)

i`m not, just had to say it, all that talk about efficiency and throwing it away in the same thread so couldn`t resist ;)

From: someone

^ is a bitwise (integer) operator which requires two params, like & or |. So I think you might be looking for !.

You're using DEBUG as a Boolean, so I would recommend sticking with only Boolean operators with it: ! (not), && (and), || (or)

figured that, reason i`ve edited that post in the hope no one was allready replying :)
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-08-2008 19:44
And also please understand this; Lear, Cale, Talarus, Heewee, Tyken, Strife and everyone else in this thread are respected. They have all sacrificed a great deal of their personal time to this very forum. And without Talarus and Strife, we would not have much of a wiki. But it is this very same passion for the community that can of course cause a few problems every now and then. We are all extremely protective of lsl and the scripters, especially new scripters. There would probably be less respect if we each, individually didn't stand up for what we believe.

Believe me that these fireworks pale in comparison to some other societies. I have always been on the fringes of some of the higher math groups. If some of those people were in the same room together there would be bloodshed. I would imagine that physics would have to be the worst. Screaming, yelling, stamping feet but there is always still respect.

I do understand the importance of readability. Strife mentioned that we both use Scite and just some of the things that it can do. It is extremely rare that you will see comments in my scripts, but that is in my finished scripts. ESL allows me to comment as much as I want, to do includes as you mentioned in the php program and most importantly for me, I can get a script from the forums and strip out the comments and indent it using my preferred style. This is what you were talking about earlier, it allows you to compress the code and for at least me, improves the flow. BTW that particular style is called K&R.

EDIT: You also have to remember that I am a 50 yr old female (who just so happens to also be a Taurus ;) ) that has worked in male dominated environments all of my life and succeeded. I was never the type to bat my eyes and try to use my charms (I don't have much charm) so I had to learn to stand up for myself, against overwhelming pressure sometimes, because no one else would. Look in the dictionary and you will see my name beside the definition for feisty.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Alicia Sautereau
if (!social) hide;
Join date: 20 Feb 2007
Posts: 3,125
10-08-2008 20:28
From: Jesse Barnett
And also please understand this; Lear, Cale, Talarus, Heewee, Tyken, Strife and everyone else in this thread are respected.

and so are you ;)

sl would be a completely different world if it wasn`t for all of you and on that note, i hope i will never take it for granted (or how ever that saying goes) about the help we recieve here and hopefully no one else aswell

it is ,understated, highly appriciated :o


now can we return to the flaming? no posts is making me actually do something and hardly did anything allready today (j/k) :)
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
10-08-2008 21:03
From: Jesse Barnett
And also please understand this; Lear, Cale, Talarus, Heewee, Tyken, Strife and everyone else in this thread are respected. They have all sacrificed a great deal of their personal time to this very forum. And without Talarus and Strife, we would not have much of a wiki.


The Wiki wasn't my fault! :p (/me looks around for Malachi pointing and scowling)

No, seriously, Strife and MANY other folks made the LSL Portal what it is today. I was happy to help spearhead the effort to kick it off, and contributed here and there, but the bulk of the effort was Strife and SignpostMarv, and a whole host of names who rarely step foot in here any more. It still always needs more examples, expansion, and updates, and I encourage anyone and everyone who is interested in helping out to jump right in. A Wiki is at its best when its most ardent users contribute back to it.

From: someone
EDIT: You also have to remember that I am a 50 yr old female (who just so happens to also be a Taurus ;) ) that has worked in male dominated environments all of my life and succeeded. I was never the type to bat my eyes and try to use my charms (I don't have much charm) so I had to learn to stand up for myself, against overwhelming pressure sometimes, because no one else would. Look in the dictionary and you will see my name beside the definition for feisty.


..and you're one hot tamale! 500k Scovilles... That's my kind of pepper! :D
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-08-2008 21:21
From: Very Keynes
HP, TI, or Casio/Sharp (the later used basic IIRC) ?


Early TI-83, I think it had 64 KB of memory (I don't really remember anymore). It ran Basic, I think it was bytecode. You had to access all the built in commands by menu, you couldn't write in the names.

From: Talarus Luan

I mean, what is the point of a computer language anyway? It simply just isn't for providing a method of telling the computer what to do, it is what any language, natural or artificial, is primarily for... communication. In fact, I daresay that computer languages have to pull double duty, not only to communicate to the computer what you want it to do, but to also communicate to other people what you are trying to do.


The goal of any tool is to enable expression, and this is bared out in the steady advancement of computer languages. As the hardware becomes further abstracted and the structures more complex the ease of expression increases. In this light if we look at C (and C++), it is an old language and it's a low level language. They have tried to keep it up to date, slapping on new features but it still shows it's age. LSL was designed to be like C++ so we got a bunch of not so good stuff.

A good example of a new language feature is LINQ (you can find it in C#), the syntax is decent and with it you can write code that is easier to read without sacrificing functionality or speed. It turns ugly loops into fluid, beautiful code.
From: someone

Just as a parting analogy, I don't think anyone can argue with the concept of using the right tool for the job. While you can use a screwdriver as a chisel, and it will be serviceable in some cases, if you hand someone a screwdriver and a block of wood, and tell them to carve a duck, they will invariably spend time figuring out how to properly apply the tool to the job, whereas if you had handed them a wood chisel instead, they would be done already.


It does assume they know how to use the tool be it the right tool.

Personally I would prefer a pen knife over a chisel, more control. But then I may also just stab the screwdriver into the block of wood and declare it a duck (there is (was?) a glass of water on a shelf in the Tate Modern, it's label proclaims it to be an oak tree). Or maybe just leave the block of wood alone and label it as "Duck in hiding" or "Duck in potentia". Then again using a screwdriver to form the duck will likely result in an interesting surface condition for the duck. I think I may just have to try carving a duck with a screw driver, you have captivated my imagination.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-09-2008 03:34
From: Strife Onizuka
Early TI-83, I think it had 64 KB of memory (I don't really remember anymore). It ran Basic, I think it was bytecode. You had to access all the built in commands by menu, you couldn't write in the names.

I had a TI-95. It was more then a decade before there were other calculators that could do half of what it could. This was the only pre-lsl programming I ever did outside of troubleshooting a bit of ladder logic. It had the magnetic strips that you could put code on and with it I made a very cool trig func. Input any 3 variables and it gave all sides and angles. Didn't matter if it was obtuse, acute or right.

From: Strife Onizuka

A good example of a new language feature is LINQ (you can find it in C#), the syntax is decent and with it you can write code that is easier to read without sacrificing functionality or speed. It turns ugly loops into fluid, beautiful code.

The latest incarnation of C#, NET 3.5 and LINQ are the only reason I will be building a Vista machine in the next few months. The language is clean and the backend does most of the heavy lifting even with graphics.

BTW. Since the last rebuild I did on my computer, I had not had Scite up and running all the way. Had it working with the builtin functions like Indent, lslint etc but no compiler. Finally broke down last night after seeing some code that I needed to strip the comments from and spent 5 minutes copying the files around that cl.exe uses. It is a thing of beauty again, hit a button and you have beautiful code that comes out the other end. Guess one of these days I need to get a domain and put up an updated modern version of Scite with all of the plugins included.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-09-2008 03:50
haha. Just found a code snippet of what was used in the TI products back then. After 3 decades I had forgotten what it even looked like:
CODE

000 'Incomplete Gamma'
016 DFN F1:GMA@AA
023 HLT
024 LBL AA
027 STO 002
030 x~t
031 STO 001
034 y^x
035 RCL 002
038 /
039 RCL 001
042 INV
043 LN
044 /
045 RCL 002
048 =
049 STO 003
052 LBL QQ
055 STO 000
058 RCL 003
061 *
062 RCL 001
065 /
066 (
067 RCL 002
070 +
071 1
072 )
073 STO 002
076 +
077 STO 003
080 RCL 000
083 =
084 IF> 000
087 GTO QQ
090 RTN

For the new ones, this was unbelievably powerful at the time. Especially when you consider that in the decade or so before, we made it to the moon and back using sliderules! Yep, I was a geek even then, was in the math & chess clubs and had a speed draw holster for my sliderule :o . I could have made that sliderule pluck that duck of Strife's, throw it in the oven and stir up the orange glaze sauce.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
10-09-2008 04:24
From: Jesse Barnett
haha. Just found a code snippet of what was used in the TI products back then. After 3 decades I had forgotten what it even looked like:
CODE

000 'Incomplete Gamma'
016 DFN F1:GMA@AA
023 HLT
024 LBL AA
027 STO 002
030 x~t
031 STO 001
034 y^x
035 RCL 002
038 /
039 RCL 001
042 INV
043 LN
044 /
045 RCL 002
048 =
049 STO 003
052 LBL QQ
055 STO 000
058 RCL 003
061 *
062 RCL 001
065 /
066 (
067 RCL 002
070 +
071 1
072 )
073 STO 002
076 +
077 STO 003
080 RCL 000
083 =
084 IF> 000
087 GTO QQ
090 RTN

For the new ones, this was unbelievably powerful at the time. Especially when you consider that in the decade or so before, we made it to the moon and back using sliderules! Yep, I was a geek even then, was in the math & chess clubs and had a speed draw holster for my sliderule :o . I could have made that sliderule pluck that duck of Strife's, throw it in the oven and stir up the orange glaze sauce.


Now believe it or not, I found that far easyer to read than any LSL Script :)
I still prefer HP code to TI but it had a lot of similarities. I was tempted to say that they had HP Calculators on the moon landing, but fortunately decided to check my facts befor posting and I see you are correct, they still used slide rules. But I did find this quote on the HP web site:

1972 – The HP-35, HP-65 and HP-41 are the first calculators in space for the historic linkup mission of the U.S. Apollo and Soviet Soyuz spacecrafts.

My personal favorite was the HP-25 and I have a version written in LSL, fully programmable and even takes and runs original HP sample programs, if any one is interested in a copy.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-10-2008 02:26
From: Jesse Barnett
I had a TI-95. It was more then a decade before there were other calculators that could do half of what it could. This was the only pre-lsl programming I ever did outside of troubleshooting a bit of ladder logic. It had the magnetic strips that you could put code on and with it I made a very cool trig func. Input any 3 variables and it gave all sides and angles. Didn't matter if it was obtuse, acute or right.


^_^ I wrote an almost identical program for my TI-83. It did a lot of other stuff too though I don't remember exactly what now. Geometry and trig related stuff. Wrote a few games too. Hmmm now I really think about it, maybe it (the 83) suffered from memory fragmentation...
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
1 2 3