How many compulsary changes are people willing to tolerate? MZX is made of love and regret
#1
Posted 26 December 2008 - 05:38 AM
Anyway, as most of you are probably aware, there have been some pretty bad design decisions behind MZX. I would say that just about every person who was contributed to MZX has implemented something in a strange kind of way, and unfortunately these things and other technical issues have compounded resulting in a mess. I in particular have done some things in a way that I'm not happy with. Some of these things could eventually be covered up internally without disallowing anything to be done the way it is now, but that is far from elegant. Other things are flat out locking MZX back.
What I'm basically asking is if people would be okay if some established syntax/convention in MZX was outright removed. Just so this is clear, I'm not talking about breaking compatibility - the current way of doing things can be frozen and converted to the new way (possibly with some edge cases). The thing is, with the way I'd like to see progression go, I don't think that this is something that we can keep going. Robotic would have to turn into a cleaner language in one step.
Here are some of the things I'm referring to:
- rel counters is pretty much useless; supporting it in the current 1 to 1 source to bytecode format is costing us more as well, although it wouldn't get in the way if we moved away from it. I still think it's a clumsy way to do things that shouldn't be supported anymore.
- A lot of the new features have been implemented in strange ways since we couldn't do a lot to add to or change Robotic. Some of it is weird but sort of natural (like copying to/from MZMs, inbetween layers, sprite stuff) - others were done in a way that's totally backwards (file access). Again, this can be hidden by the language compilation later but it'd be best if we changed it and didn't support the old stuff anymore.
- The symbols for AND, OR, and XOR in expressions.. I really dropped the ball on this one. Because they use such common letters they're basically preventing us from having unquoted expression names, which is a huge pain. I'd like to change them to something else.
- Expressions don't follow standard order of operations either. Quite frankly, I don't really mind it like this, but it's pretty improper. I think this would probably take actual adjusting and I'm okay with it staying as it is.
- The reason why I used the letters for those in the first place is because & was reserved for counter name interpolation. Now that expressions can do the same thing (and are more general) I think we should stick with that only. Of course, something will need to be done to make expressions capable of evaluating strings to really replace it...
- Message boxes are implemented as multiple commands - internally they could be merged into one with proper language compilation, but it'd prevent the ability to interrupt them. I don't think this is something that's really used a whole lot, so it should be okay if it isn't supported anymore. Making backwards compatibility for it would be kinda a kludge though.
I'm sure there are lots more. Let me know how you feel about this sort of thing.
"The fact that I say I've one of the best, is called honesty." -Akwende
"Megazeux is not ment to be just ASCII, it is ANSI!" - T-bone6
"I hate it when you get all exo on me." - emalkay
Exophase can what Rubi-cant.
exoware is ware ur ware is exoware
ps. not loking 4 new membrs kthx
#2
Posted 26 December 2008 - 07:41 AM
(I voted Yes.)
#3
Posted 26 December 2008 - 09:23 AM

Why-Fi: but I'M MATURE ENOUGH TO BE A MODERATOR!!!!!!!!!!
#4
Posted 26 December 2008 - 09:46 AM
<Cybersilver> "All my sugestions are for FUTER VERSIONS. Say it with me Fu-ter futer. Yep..."
9-21-2009, SFMZX game play video: HERE
Risu2112
#5
Posted 26 December 2008 - 03:22 PM
<img src="http://img223.imageshack.us/img223/2655/quakemarinepz1.gif" border="0" class="linked-sig-image" />
--------------------
"There is only one basic human right, the right to do as you damn well please. And with it comes the only basic human duty, the duty to take the consequences."
- P.J. O'Rourke
--------------------
"Of all tyrannies, a tyranny sincerely exercised for the good of its victims may be the most oppressive. It would be better to live under robber barons than under omnipotent moral busybodies. The robber baron's cruelty may sometimes sleep, his cupidity may at some point be satiated; but those who torment us for our own good torment us without end, for they do so with the approval of their own conscience."
- C.S. Lewis
--------------------
This week, on LANCER PONDERS:
<lolilover> I notice alot of Japanese fiction involving kemono-mimi characters always has the main character saving an innocent animal and then the animal returns as a girl to reward him for his kindness.
<lolilover> Well there's a cat that is always wandering around in my backyard. Should I feed it in the hopes that one day a catgirl will show up at my door?
#6
Posted 26 December 2008 - 04:57 PM
as far as order of operations goes, i've always just used massive numbers of parentheses to ensure everything goes in proper order. the only problem with this is maximum line length. would there be any way to increase it?
and on a similar note, if you can't increase line length, would you still allow multiple commands for message boxes? i'm certain that i have message boxes somewhere in my game that exceed standard mzx line length.
one more question: set chars was used to adjust some global values and whatnot. are any of these still open and unused? could they be useful for anything programming-wise or would it just make more sense to use counters?
<pyro1588> "welcome to australia, can i help you find what you're looking for?"
<Tox> pyro1588, I'm giving you the most reproachful of glares right now.
--------
Go show those nutty Koreans what us crazy Europeans are made of pirate.gif pirate.gif pirate.gif - Saike
<exophase> The old Commodore strategy of, "Go friggin' bankrupt!"
<wervyn> Go away! I'm writing the same engine I always do!
#7
Posted 26 December 2008 - 04:58 PM
Then again the new spacebar toggle behavior on robot pisses me off terribly.
#8
Posted 26 December 2008 - 05:51 PM
Pyro1588, on Dec 26 2008, 12:57 PM, said:
as far as order of operations goes, i've always just used massive numbers of parentheses to ensure everything goes in proper order. the only problem with this is maximum line length. would there be any way to increase it?
and on a similar note, if you can't increase line length, would you still allow multiple commands for message boxes? i'm certain that i have message boxes somewhere in my game that exceed standard mzx line length.
one more question: set chars was used to adjust some global values and whatnot. are any of these still open and unused? could they be useful for anything programming-wise or would it just make more sense to use counters?
Good questions, pyro.
If rel counters is kept it'd probably still be removed as a command in the bytecode (instead replaced by expression expansion). This is just kind of a painful thing to have to code in to the compiler, IMO. However, I wouldn't really worry about optimizing the number of command slots. It could probably be moved to 2 bytes for the command number instead of 1. There are various other places where bytes could be removed anyway (like forward and backward length), and it isn't that critical anyway.
The line length shouldn't end up being an issue because it should be possible to break up commands over multiple lines. Furthermore, in the "revised" basic language, expressions wouldn't have to be enclosed in quotes (but would have to be in parens still). If it's necessary to break up a string over multiple lines, what I was thinking of doing was adding a delimiting character to merge two strings, ie:
set $str to "This is one"+ "complete sentence"
Then you could break it up over one line. Since all the commands use a fixed number of arguments, and so long as there are concrete rules for what an argument can be (what we have now is pretty restricted, which is that arguments have to be separated by spaces - the exception is if they're surrounded by quotes or, in the future, by parens). Actually, they could take a variable number so long as the first argument says how many can be expected to come.
I'm not really decided on how to do message boxes yet. I'd like for them to be one command per box, but that requires encoding something into them to say how the different lines work. I guess we could keep it like it is and have it internally be represented as pushing a bunch of text into a box then having some kind of ending command for it, I don't know.
Just so everyone's clear, when I say backwards compatibility I mean that the robots will be converted to whatever is the compatible format in the newer version. If you load it and save it then you'll end up with a different world file. The old format will then not work in anything newly created.
"The fact that I say I've one of the best, is called honesty." -Akwende
"Megazeux is not ment to be just ASCII, it is ANSI!" - T-bone6
"I hate it when you get all exo on me." - emalkay
Exophase can what Rubi-cant.
exoware is ware ur ware is exoware
ps. not loking 4 new membrs kthx
#9
Posted 26 December 2008 - 07:49 PM
<Cybersilver> "All my sugestions are for FUTER VERSIONS. Say it with me Fu-ter futer. Yep..."
9-21-2009, SFMZX game play video: HERE
Risu2112
#10
Posted 26 December 2008 - 09:26 PM
But as for the language changes, I'm in complete agreement:
- Anyone who still uses the rel commands should be hit in the head with like a sword but a hammer. These are seriously even more useless and redundant now than the avalanche command.
- The use of 'a', 'o', and 'x' in expressions was always an eyebrow raiser for me, even considering the issues with & which I understood. Of course, keep in mind that if you do switch these to something more conventional like &, |, and ^, that ^ is currently the exponentiation operator. You might consider, as long as you're changing things up like this, turning ** into an exponent, since I know I'd prefer to use conventional bitwise operators instead of something custom.
- On operator precedence, someone recently commented to me that the concept of precedence is a loan from mathematics, where in a programming setting what you're really concerned with is the computer doing what you thought you told it to do. The only reason to use precedence is to avoid confusing people who are used to things being that way, from math class. And when combining expressions with comparison operators and bitwise operators there isn't a well known convention on exactly what should happen, so people use parentheses anyway. My advice is to leave everything the way it is now, with strictly left-to-right order of operations except for unary operators like - and ~, which take overriding precedence. It's deterministic in a way that's simpler to understand than trying to remember if multiplication trumps a bitwise AND or not.
- On strings and incorporating them into expressions, I think the best way to do this is to evaluate them as integers only when the operator calls for it. For instance, ($astring) should return the value as a string, while ($astring+50) would attempt to numerically evaluate the string and add it to the literal integer. ($astring+$bstring) would attempt to concatenate the strings and return the result. This is particularly important when it comes to interpolation of strings, as can be done now with ampersands. In these cases it's probably necessary to use single quotes as an explicit "evaluate this counter or string" operator, so that ('$anobject'.'$aproperty') could be understood as a makeshift object reference, and then implanted as a normal value (which, who knows, could be a string itself) in a larger expression.
- Message boxes are a giant hack and could certainly benefit from some refactoring. Keep in mind all of the features they incorporate though, and that as much as we advanced coders may recommend the code-your-own option, people still use them and probably still will. This includes things like the & command for centering the line, and the ? command for providing a link. You want to keep the ability to do all of these things, and yet I'm not sure HOW to do them outside of the multi-command format currently employed.
Also, for the road, things I would like. Eventually.
- Code blocks.
- Control flow (if, while, for)
- Functions
- Unified layer to layer, layer to string to layer, layer to MZM to layer handling.
- The support for importing extended character set information onto the vlayer, like we discussed before, Exo.
- This is too much like a general MZX wishlist now.
"And now I'm going to escape on my jetpack."
..Ignorance is to be unaware of the truth.
....Incompetence is to be unable to grasp the truth.
......And escape is to run away from the truth.
It is useless to run, since the truth is right next to you.
-Wervyn
#11
Posted 26 December 2008 - 10:40 PM
So, perhaps contrary to common software engineering principles, I'd suggest that these changes all be made at once. They're done, merged in, and not touched again. Alternatively, it might be a good idea to support both language variants side by side. People don't want to have their projects converted by upgrading to 2.85 and then find that they can't go back, or the variant of the language they were using is revised in such a way that the source converter doesn't support it. (Just to clarify, I'm talking about source editing here. People might start making a game in 2.82 and then continue making it in 2.85 and then finally people would play it on 2.90.)
I think if we're going to revise the language it'd be better to not make it the same progressive garbage the previous (admittedly different) revisions were.
--ajs.
#12
Posted 26 December 2008 - 10:58 PM
#13
Posted 27 December 2008 - 02:46 AM
Wervyn, on Dec 26 2008, 05:26 PM, said:
Should work fine. Without going into too much detail at this point, the basic change is that robots in world files (not save files) and loaded externally will be expected to be source code. load_bc would still be supported for legacy purposes, but it'll no longer be possible to export bytecode from a robot. This means that all bytecode will be frozen at the 2.82 compatible level, so the disassembler will also be frozen to this. The conversions will be done at the bytecode level, not at the source level, and will also be part of the disassembler. This is why it's important to get these things all done in one version so they can be kept here and not placed in the source code. So we need to figure out everything that should be changed.
The big reason why it's important to get this done in one stage is that it keeps the conversions to bytecode, not source code. What this means is that it's less legacy syntax that we have to keep checking.
Wervyn, on Dec 26 2008, 05:26 PM, said:
- Anyone who still uses the rel commands should be hit in the head with like a sword but a hammer. These are seriously even more useless and redundant now than the avalanche command.
Yes.
Wervyn, on Dec 26 2008, 05:26 PM, said:
At the time, I basically never thought it'd make sense to not quote counter names, and these felt like something natural to use (I wish I had used OR, XOR, and AND - I probably didn't want to swallow the extra parsing load). I did intend to change exponentiation to something else like ** as well, like you said.
Wervyn, on Dec 26 2008, 05:26 PM, said:
Bad precedence assumptions are actually a serious problem in programming languages like C that have a lot of operators beyond the basic four arithmetic ones. Simple left to right evaluation is just easier to remember. I tend to coat parens on just about everything anyway (although I sometimes let things like == slip), so my apathy might be because of this. But yeah, I think we're in agreement, and I don't think anyone else has really cared so far either.
Wervyn, on Dec 26 2008, 05:26 PM, said:
We'll need to have a casting procedure if anyone does use them in expressions to convert to ints, though. Of course, this would probably still be okay:
set counter $string
But we'd have to have temporaries created for this if they're used in strings. I doubt that this has been done a lot so it isn't a huge deal. I'd prefer not to do it with function counters because I'm nervous about implementing those with string args (for now)
Wervyn, on Dec 26 2008, 05:26 PM, said:
Yeah, I'm trying to think of a good way too. I thought about encoding some kind of control structures for it, but that would be less intuitive to program. There's also the problem that all 256 chars can and are used in the boxes, so they'd have to be escaped too - and for graphical things this will make them unpleasant to look at.
Actually, variadic commands CAN be used, so long as it's clear when the next one's starting (command names can't be used as args right now anyway, although we might want to change that and just have priority - it's really annoying not being able to use an unquoted "loop" counter name for instance). So basically, the command would stay pretty similar, maybe something like this:
[ "This is the first line of my message box."
"This is the second line."
center "This line is centered."
link "Click this" it_goes_here
option "Maybe this will be here" if_this_is_true and_it_goes_here
(actually, & was overloaded to be variadic anyway. I wonder if that ever gave me problems...)
Wervyn, on Dec 26 2008, 05:26 PM, said:
- Code blocks.
- Control flow (if, while, for)
- Functions
- Unified layer to layer, layer to string to layer, layer to MZM to layer handling.
- The support for importing extended character set information onto the vlayer, like we discussed before, Exo.
- This is too much like a general MZX wishlist now.
Let me address these a little bit.
Code blocks and control flow - consider this model for macros: a macro starts with #, may appear anywhere a term can appear in Robotic, and can consist of multiple arguments. A macro argument is parsed like a command argument (so there are limited syntax rules, and it eats up a bunch of them), plus perhaps some more, such as code blocks. So you could really easily write loop macros that look like this:
#for i 1 to 10 in
{
* "~f(i)"
}
That matches a macro something like this - take the syntax tentatively because I made it up on the spot and I don't even remember what I used for extended macros:
macro for
loop_var:var start:var_or_constant _to end:var_or_constant _in code:code_block
set \var start
: _\random_sym(loop_name)
body
inc \loop_var 1
if \loop_var < end \loop_name
It'd take a few minutes to write all of these. What we'd need is a good way to incorporate these into the world files, though. I think the "include" directive would be a really good start - the robot compiler could even be smart enough to cache compilations of these, or something like that. It's not quite real OOP inheritance, but we can go from here.
Functions - once compiled expressions are in this won't be that big of a deal, at least to do in some fashion (might not be the most efficient). But I wouldn't want to compile expressions until the robot VM was made more efficient.
Layer to layer etc copying - they pretty much already are. Just need some tweaking to the syntax, I think.
Ext char set stuff - pretty much as planned before, but first I'd want to introduce a good plan for extending the world format while still making it easy to retain compatibility with the old stuff. I want to make more things that we already have editable in the worlds and not just creatable at run time.
One other thing that I'd like to change, that has bothered me for a long time now: I don't like how quotes (") are used to delimit counter names, because they're already used for strings. Expressions use single quotes ('), but unfortunately this can't be used for counters in general because they're already used for characters, so there'd be an ambiguity. What I'd like to do is use the backtick (`) character for both of these and no longer allow either. This isn't as big of a change as it sounds because I think that most counters won't need to be delimited, and this will encourage people to stop using ones that need to be if it means less overall typing work.
'Risu2112' said:
Yes and no. The old games store robots in bytecode, which has to be converted to source code (via the disassembler we already have, but will be extended to handle conversions) and then this will be compiled once the robot is actually executed (or copied; I won't explain all the methodology here). But this conversion will only happen internally; the world file itself won't ever change behind your back. However, it will happen if you load it in the editor then save it. In fact, I strongly suggest we add a warning before it lets you save up to a newer version because I think people won't always realize this. It's already a minor problem for compatibility purposes. While on that note, I think it'd be great if the converter also changes some of these compatibility traps so that they can work naturally while being newer version, so that this is less of a problem. These things we actually can add incrementally since they're no longer supported for new games anyway, and would just be restoring something that is being lost right now.
"The fact that I say I've one of the best, is called honesty." -Akwende
"Megazeux is not ment to be just ASCII, it is ANSI!" - T-bone6
"I hate it when you get all exo on me." - emalkay
Exophase can what Rubi-cant.
exoware is ware ur ware is exoware
ps. not loking 4 new membrs kthx
#14
Posted 27 December 2008 - 05:58 PM
second, i have a request as long as we're discussing compression options. after having ajs explain what exactly tar, gz, and bzip2 are and how they work together, i'd like it if we had a way to download and play games as single-file archives. i'm not sure exactly how we'd do it and what format we'd use (zip was also discussed,) but i think it would add another level of user-friendliness if newbies didn't have to download and then extract the archive.
one problem with this would be games that modify files. ajs mentioned the difficulties and resource cost of extracting, modifying and recompressing whatever file is modified. ajs also mentioned the issue of when the game decides to update files in the archive. again, i'm not exactly sure how one would handle this, but ajs brought it up and i'm sure it's something that will need to be planned out.
another lesser issue would be the old method of splitting music and other unnecessary files into alternate archives. if we decide to implement single-archive games, old ones (a la cans 3) need to be extracted along with music and recompressed into a single archive.
sorry if i covered any points already addressed. overall, i really like the idea of having an entire game in one archive.
<pyro1588> "welcome to australia, can i help you find what you're looking for?"
<Tox> pyro1588, I'm giving you the most reproachful of glares right now.
--------
Go show those nutty Koreans what us crazy Europeans are made of pirate.gif pirate.gif pirate.gif - Saike
<exophase> The old Commodore strategy of, "Go friggin' bankrupt!"
<wervyn> Go away! I'm writing the same engine I always do!
#15
Posted 27 December 2008 - 07:27 PM
--ajs.
#16
Posted 27 December 2008 - 11:52 PM
Everyone else is right; we need to protect backwards compatibility for our large, elaborate games that would be difficult to convert. Who knows when we'll get another Drelick or Lancer? These games are like golden eggs here.
Though I haven't given up on the idea of adding to the pile myself; someday we'll see Maxim MZX epic game..
#17
Posted 28 December 2008 - 02:54 AM
#18
Posted 28 December 2008 - 03:08 AM
"The fact that I say I've one of the best, is called honesty." -Akwende
"Megazeux is not ment to be just ASCII, it is ANSI!" - T-bone6
"I hate it when you get all exo on me." - emalkay
Exophase can what Rubi-cant.
exoware is ware ur ware is exoware
ps. not loking 4 new membrs kthx
#19
Posted 17 July 2009 - 02:08 AM
#20
Posted 17 July 2009 - 02:43 AM

<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#21
Posted 18 July 2009 - 12:04 PM
- Bertrand Potato
#22
Posted 18 July 2009 - 01:49 PM

<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#23
Posted 18 July 2009 - 03:20 PM
<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
#24
Posted 01 December 2009 - 08:30 PM
<phthalocyanine> they make experiences.
<Nadir> demos, more like
<Nadir> a glimpse into what could have been if mzx wasn't such a bore to work with
<Nadir> actually, i'm being unfair
<Nadir> i would have made mzx games if it was capable of running on more than 20 computers worldwide in 1998
<Nadir> >:D
<%Alice> functor
<%nooodl> i hear C++ has a thing called functors and they're completely different from Haskell functors...
<rorirover> the result is the most horrid thing in C++, it's basically black magic and it transforms any code you're writing into some eldritch monstrosity
#25
Posted 02 December 2009 - 12:15 AM
#26
Posted 02 December 2009 - 06:15 AM
Frobozz, on Dec 2 2009, 01:15 AM, said:

Help




















