Jump to content

Photo

I love how easy it is to find good documentation on zscript! :DDDD

strings rant

  • Please log in to reply
3 replies to this topic

Poll: -

go to bed luna

You cannot see the results of the poll until you have voted. Please login and cast your vote to see the results of this poll.
Vote Guests cannot vote

#1 Mani Kanina

Mani Kanina

    Rabbits!

  • Members

Posted 08 February 2016 - 07:52 PM

full title: "I love how easy it is to find good documentation on zscript! :DDDDD"

I have no clue how to set a bloody string in this language. I have been told that apparently, they are declared/set as ints (for some reason), rather than a dedicated string command. (But apparently we DO have char as chr!) :D


Great right, I'll just look up some documentation on the language..., oh wait, that's right, there is nearly none. And what does exist out there is seldom good enough. The wiki on shardstorm, while has some good articles, has terrible searching functionality. (For an example of that, even though I know the page existed, I searched for "error" or "compile" and neither would have a result for the page that lists error codes and troubleshooting compiling issues. (which can be found here: ZScript Technical FAQ)). Also, on an unrelated note, the shardstorm wiki is REALLY slow for me. There is no reason these wiki pages should take 10 seconds to load when you have 100 up/down fiberwire. That's not to mention the, uh, times when it's just down entirely. Maybe that's just me?

This thing is pretty good, and I certainly prefer it in web format over the text file. Sadly it does not cover everything, and some of the references are..., well, let's just say I'd have to ask someone else about it anyway.

std is great..., if you already know exactly what you're looking for. The entire documentation is fairly bloated, so you'd have to search the file. But due to names and stuff, the thing you might be looking for may not even be called closed to what you think. There are many times where I have searched the file for X thing, not found it, asked someone else about it, and the info was in std all along, except, named something I didn't expect it to.


Like, I'm not sure where I was going with this. By the time I wrote all of that, I got the help on how to format a string here from someone via IRC.


I guess I just needed to vent this frustration. I just wish I could actually look things up in relation to these things, rather than having to bothers others about simple formatting questions.

#Latenightscripting

#2 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 08 February 2016 - 08:10 PM

As for Shardstom, no it's not just you. I noticed downtimes and lag too.

 

The way I do it, is I don't look for documentations, I look at scripts that have been posted all over the scripting forum.



#3 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 08 February 2016 - 08:11 PM

Bitmaps are pretty fun. You should try playing around with those. They're fun, like walking on a sea of legos. Uphill both ways. And nobody taught you how to walk.


  • Mani Kanina likes this

#4 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 08 February 2016 - 08:37 PM

http://www.shardstor...C_String_Arrays

That's a direct link to explain ZScript strings.

I suspect that DD hosts Shardstorm personally, and possibly on a his (home) network. That would explain the latency, as it's always a bit slow when fetching requests (even general hypertext).


(Quoted text hidden to make this easier / cleaner to read.)



I should probably admit here, that documenting ZScript is, well, sort of my job, and I've been behind in it for various reasons. It's actually all supposed to go on the Wiki, as well as .txt and .pdf versions, according to my plan; but it's a slow process.

That link to the Wiki is my work, if you're curious. Its one of my earliest submissions to the Wiki, which is a bit coincidental, in that it also fills this request. Going over it again, I find a few typos that somehow escaped me, in the previous edits; else they were incorporated in those edits, but I think I merely missed them.

I also wrote up some documents explaining how to use arrays, and to a lesser extent, strings; but they are also incomplete. They also cover making accessors, using constants with indices and accessors, and methodology for constructing pseudo-2D-arrays. You are welcome to them as-is, if you want. Just ask.

I was simultaneously documenting ZASM, and other lexer things, but I can only do so much at any one time, without needing to visit a facility with padded walls.

That said, there will eventually be better system docs for ZScript. It takes time to make them; you know?

If there are any other suckers that want to make parts of the system docs, and submit them, please raise your hands.

 

--

 

On another note, I didn't think that char ( or chr ) was a legal ZScript datatype. I know it's used internally, but I don't recall it having a ZScript interface component. Have you successfully used the chr datatype in ZScript, where the compiler permitted it?

 

All functions that I;ve seen use 'int chr', which isn't actually the char datatype: It's merely the variable name given to the int declaration as a function argument. It could just as well be int bananas, and still work, as all ZScript string characters are raw integers based on their ASCII values.

 

I suppose it'd be possible to add char and string datatypes to the lexer, but I'd consider both of those extremely low priority, as the way we do things now works perfectly well. It would mean doing a lot of extra work, with n real added benefit, unless someone knows a perfectly valid reason to require a string declaration.


Edited by ZoriaRPG, 09 February 2016 - 06:36 AM.




Also tagged with one or more of these keywords: strings, rant

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users