Quote: Originally posted by kestrellyn
Code:
PRINT CreateSurname Anderson PRINT CreateMaleChristianName George PRINT CreateFemaleChristianName Madeleine (I might actually just use these names for the next CAS Sims that I make!) As I understand, in some programming languages all procedures are functions as they all return a value (possibly just binary true if the procedure succeeds and binary false if it fails). Now I don't fully understand what you mean by "stack frame" and "call stack", but these terms seem to refer to a specific computer architecture, or family of architectures, whereas the words algorithm and function as I understand them are much more general than that. Indeed you can use an algorithm without having a computer at all. I think what you have posted is probably true in some programming languages, but it is not always true. |
I discovered yet again that you have to keep an eye on what you put into your game even now as a mod.
My game has been so far flawless and working well. Then I put a mod about traits that I thought would be a good addition to the game. Then I found out it was not. Pixels started doing 'the spin' continuously-which of course, indicates that something is wrong. (it's the other version of the 'jump bug') and when I remembered it, to take out the mod, it stopped. It'd been so long since I'd had any bad actions that I'd forgotten to be careful. Complacency has a price. The game can be tough as nails with throwing things into it, but it's still 20 years old. |
2 Attachment(s)
Quote: Originally posted by kestrellyn
Alright, I hate to do this but I'm going to have to. You are talking about computer programming, I am talking about computer science. They are not the same. For example, if you look at what I provided previously you can see python was only used as a means to show how it looks in code, the point was never the language - in fact that part you saw comes from a course where knowing python among other languages is a prerequisite - they are not teaching you the language. It's clear you haven't studied computer science, because if you had you wouldn't be making this argument. I can't legally provide the study books in whole (copyright). But I can show you this, which sums it up nicely what I am talking about, this comes from a university level computer science book at level 1 (year 1, the previous book was year 2 - so this one is simpler). This is not about algorithms as you are thinking of them. Hopefully, you can see now by looking at my original post about algorithms and this text as to how they relate. A BHAV, while a function still has an algorithm in the sense of instructions to what it needs to do, it takes a step, performs it, then moves onto the next step as I demonstrated here. Now, can we please cease this unnecessary and pointless argument? |
Quote: Originally posted by AndrewGloria
Whether all functions return a value or not is language-dependent, which is why I said that they could return one. For example, in C and C++ you can define functions that don't return a value explicitly using "void", whereas in Python, every function returns a value and will just return the special value None if you don't specify something else. However, every language has at least some functions that return a value. Stack frames and the call stack are not language-specific, they are a general feature of all computer architectures, as far as I'm aware. You can see what a call stack is by looking at a Sims 2 error log, actually:
Code:
Object id: 197 name: N001_User00011 - Don Stack size: 13 Error: Reference to tree tree parameter when no parameter exists. Iterations: 188 Frame 12: Stack Object id: 14 Node: 13 Tree: id 4110 name 'Phone - Invite Sim Over' version -32736 from PhoneCall_Sim2Sim Prim state: 0 Params: 24 Locals: 0 25 0 0 0 Frame 11: Stack Object id: 14 Node: 50 Tree: id 4099 name 'Phone - Outgoing Call' version -32703 from PhoneCall_Sim2Sim Prim state: 0 Params: 0 24 0 Locals: 14 0 -14569 29094 Frame 10: Stack Object id: 24 Stack Object name: Phone Call - Sim2Sim - Sim Calls Node: 2 Tree: id 4098 name 'CT - Handle Call' version -32735 from PhoneCall_Sim2Sim Prim state: 0 Params: 0 0 Locals: Frame 9: Stack Object id: 24 Stack Object name: Phone Call - Sim2Sim - Sim Calls Node: 6 Tree: id 8279 name 'Calls - Handle Call (Sub-Type Known)' version -32754 from PhoneCallGlobals Prim state: 1 Params: 142 0 0 160 Locals: 24 Frame 8: Stack Object id: 23 Stack Object name: Phone Call - Sim2Sim Node: 1 Tree: id 4098 name 'CT - Handle Call' version -32735 from PhoneCall_Sim2SimManager Prim state: 0 Params: 0 0 160 Locals: 0 Frame 7: Stack Object id: 23 Stack Object name: Phone Call - Sim2Sim Node: 3 Tree: id 8270 name 'Call - Handle Call' version -32756 from PhoneGlobals Prim state: 1 Params: 142 0 0 160 Locals: 0 0 Frame 6: Stack Object id: 160 Stack Object name: Phone - Base - Wall Node: 10 Tree: id 8271 name 'Phone - Call' version -32755 from PhoneGlobals Prim state: 0 Params: 160 142 0 0 Locals: 0 Frame 5: Stack Object id: 160 Stack Object name: Phone - Base - Wall Node: 32 Tree: id 8240 name 'Interaction - Call' version -32735 from PhoneGlobals Prim state: 0 Params: 142 0 0 0 Locals: 0 160 Frame 4: Stack Object id: 197 Stack Object name: N001_User00011 - Don Node: 5 Tree: id 281 name 'Wait For Notify' version 8 from global Prim state: 1 Params: 0 1 Locals: Frame 3: Stack Object id: 197 Stack Object name: N001_User00011 - Don Node: 1 Tree: id 8282 name 'Function - Main - Check Queue' version 50 from PersonGlobals Prim state: 0 Params: Locals: 160 Frame 2: Stack Object id: 197 Stack Object name: N001_User00011 - Don Node: 3 Tree: id 8283 name 'Function - Main - Loop' version 96 from PersonGlobals Prim state: 0 Params: 3 20 1 Locals: 0 Frame 1: Stack Object id: 197 Stack Object name: N001_User00011 - Don Node: 6 Tree: id 8193 name 'Function - Main' version 118 from PersonGlobals Prim state: 0 Params: Locals: 3 20 0 Frame 0: Stack Object id: 197 Stack Object name: N001_User00011 - Don Node: 1 Tree: id 4096 name 'Function - Main' version 2 from TemplatePerson Prim state: 0 Params: Locals: Here you can see a call stack with 12 stack frames, which are labeled starting with "Frame 12:" at the top to "Frame 0:" at the bottom. Each stack frame represents a function call: "Tree" identifies the name of the function, "Node" identifies the line the function is currently on, "Params" and "Locals" indicate the current values of the function's parameters and local variables. Whenever a new function is called, another stack frame is added to the top of the list to represent that function; whenever one finishes, it gets removed, also off the top of the call stack, since only the top function is currently actively executing. So in this case, with this stack frame, if we look at this starting from Frame 5, we see that: The "Interaction - Call" function was executing, when it reached line 32: It called the "Phone - Call" function, when that function reached line 10: It called the "Call - Handle Call" function, when that function reached line 3: It called the "CT - Handle Call" function, when that function reached line 1: It called "Calls - Handle Call (Sub-Type Known)" function, when that function reached line 6: It called the "CT - Handle Call" function, when that function reached line 2: It called the "Phone - Outgoing Call" function, when that function reached line 50: It called the "Phone - Invite Sim Over" function", and when that function reached line 13, it threw an error and generated this log, which it was able to do because the game keeps track of all this in the call stack. When you write code in any other language that uses any kind of functions, the computer also builds this kind of call stack and will generally output it when errors are encountered, as in this case. |
Quote: Originally posted by iforgot
Your book does not say anything I haven't said here. I'm saying that an algorithm is not the same thing as a function, which is true, and is not in any way contradicted by anything in your book, the book is literally just describing what an algorithm is. I have multiple degrees in computer science, by the way. |
Quote: Originally posted by kestrellyn
.... I give up. You are intentionally missing my points. Have a good day. Topp if you have further questions or need further information, please direct them to kestrellyn. |
Now that the semi and former professional programmers are done with discussing computer functions, I'll relate what I found in the game today-that I discovered that Monique's computer has an function of 'buy clothes' which actually works (which I didn't realize because I've never used it before) and that it's just like shopping on Amazon, without all the algorithms that the site and Google uses!
And for the record, here is a definition of an algorithm from this site: Tech Target https://www.techtarget.com/whatis/definition/algorithm
Quote:
If this doesn't satisfy everyone's quibbles, take it up with them! |
I mean, I am a professional software engineer, have been for the last nine years. Nothing "semi" or "former" about it. BHAVs are functions, what's important for understanding them is understanding what a function is, not what an algorithm is. I can write an algorithm on a napkin, but that algorithm isn't going to do anything or run or change how your sims game works, because it's just a napkin with some writing on it. Similarly, BHAVs and other functions don't have to involve an algorithm at all, some BHAVs are just no-ops and don't do anything.
|
1 Attachment(s)
...........................................................
|
Quote: Originally posted by iforgot
(I'm still math. Only now, I'm taking on more Psychology and Didactics classes, so that I could be a math teacher too, if need be, with where the IT sector is going these days... As a mathematician, though, I like indulging in some philosophy every now and then and I find this discussion fascinating, but I see others are bored. But thanks for all the explanations, guys! Once I find time, I'll first find inspiration on what to try to make, and then I'll return with some more questions.) |
Quote: Originally posted by simsample
Well, at least you haven't started swinging your baseball bat yet.
Quote: Originally posted by topp
No worries. Anyhow, I think it's time it all moved on. |
Quote: Originally posted by topp
I'm not really bored, I just like teasing @kestrellyn because she is a fiend for accuracy (which is not a bad thing). I hope she takes it with the joky intent I have, and doesn't hate me too much! I find these conversations fascinating too... |
Quote: Originally posted by kestrellyn
Quote: Originally posted by topp
Quote: Originally posted by simsample
|
Quote: Originally posted by Charity
It's Adrian Edmondson, playing the character Vyvyan in a TV series "The Young Ones" (Who are not so young anymore, I might add. ) |
Quote: Originally posted by iforgot
Of course it is! Thanks! |
Quote: Originally posted by jonasn
I would not like to see the urinals of a toilet with no cubicles for number 2! Do bathrooms on an owned lot not even allow female employees in to clean? Also, the talk about algorithms got me thinking. What is the 'algorithm' that they talk about for places like YouTube? |
I'm not entirely sure because I've not played unmodded for many years. I think they can't pass through those doors. I made it so that employees or owner can enter if the store is closed. You could of course solve it in different ways like building a locked service door. But I find it wrong when NPCs can enter any time they please.
I think the word algorithm on random content selectors are used with a new meaning. If I were to make a dictionary, that is how I would put it. Most people can't understand the program because it is held private and far too complex, so they assign a mathematics-sounding word to it to describe it. It probably incorporates multiple traditional algirithms. |
Quote: Originally posted by Charity
Quote: Originally posted by jonasn
The lot owner can't enter an opposite-gender door. I usually stick to unisex bathrooms these days, but in the past I've used moveobjects to move the Sim into the room or swapped the doors. |
Quote: Originally posted by Bulbizarre
I think jonasn meant that they modified the door to add that functionality, not that it's the default behaviour, at least that's how I read it with the "I made it so" part. |
Yes, Iforgot. I usually try to build single occupancy bathrooms. They take a bit more space but sidestep a few problems that would need mods, such as selecting the right one by hand or people blocking the stall. They also feel more natural like at home. I got a bit annoyed with needing to remember which gender I was at the time, that I created a push to go to another bathroom if can't reach mod.
|
All times are GMT +1. The time now is 1:51 PM. |
Powered by: vBulletin Version 3.0.14 · Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.