ID:1996331
 
Christmas is two weeks away, my tree is up, and meanwhile I'm looking out my window to sunny skies and a green lawn, with record high temps. Where's all the snow?

I put out a maintenance release for 509 today. Users of 509.1315 may not need to upgrade, but it does fix some webclient issues and it's important for anyone who does profiling. And the nasty hang bug I intended to fix turns out not to be a bug at all, but Avast freaking out over something in the newer builds. Avast users who have this problem, make sure you add dreamseeker.exe as an exception and please report the false positive to Avast.

I've been taking a scattershot approach to 510's features, but focusing mostly at first on the text stuff. I've implemented, but not yet tested, eight new routines: findlasttext, findlasttextEx, spantext, nonspantext, splittext, jointext, json_encode, and json_decode. Testing on those will begin shortly. I'm kinda sorta thinking about a replacetext/replacetextEx routine, but that may be redundant and I may end up folding that into the regular expression stuff. We'll see.

The regular expression lib I'm going to work with has been coming along very well; all that I have left to test on it is multiline support. Now it has all the standard bells and whistles, plus a few goodies like lookahead and lookbehind assertions and non-capturing groups. Now the question is coming up of how I'll incorporate this into the DM language. I'm expecting to create a /regex datum--hilariously conflicting with my own soft-coded Regex library--that will contain the compiled regular expression info and have a few routines for handling matches and replacement. One of my goals with this is also to allow a proc reference to be used as a the replacement, so you could have something like this:

// spell out numbers (you're on your own for capitalization)
var/regex/R = new("\\d+", "g")
txt = R.Replace(txt, /proc/SpellNumber)

// commafy numbers
var/regex/R = new("\\d{1,3}(?=(?:\\d{3})+(?:\\D|$))", "g")
txt = R.Replace(txt, "$0,")

None of that syntax is set in stone, but that's where it's going I think. I'm pretty excited to be bringing that to the language after all this time.

Working out the logistics of the new display changes (atom groups, plane groups) is also on my to-do list, and I'll be getting that further along as well.

To give everyone a heads-up on how development will progress the rest of this month: I'll be working on 510 through to the 23rd. After that it's Christmas vacation, and work resumes January 4. (I'll still be around, just not spending a lot of time on development unless the mood takes me. Which it might, because I do get excited working on features.) I'd like to get 510 into beta as early as possible in January, so I'll be pushing toward that goal. There may or may not be another 509 maintenance release, if one is needed; I'm still hoping to get some info on a webclient bug that has plagued Eternia. In the meantime, those of you who have that time off may want to play around with 509's incredible new features to make a new game or spiff up an old one; I was amazed at how much of a difference matrices made in Scream of the Stickster Volume II by eliminating a lot of icon math.

December appears to be a pretty big time for fundraisers--just ask Wikipedia and the Kickstarter for MST3K that ends tonight--and it's a good time to remind everyone that BYOND continues to live with your support. Thanks to all the members and donors who've contributed so far. For those who haven't, this is a nice time to show your appreciation.
I'm assuming we can also do new regex("", "")?
In response to Xirre
Xirre wrote:
I'm assuming we can also do new regex("", "")?

You could, but why you'd want a blank regex is a mystery. I'm intending for compilation to happen at the time of creation. The second arg with the flags will be optional.
Are there plans to release any more webclient optimizations this month?
Nothing is on the table at this moment, but it hasn't been forgotten. Try out 1316, because I turned Timsort back off after finding it was broken based on what you and Doohl sent me; you may see another improvement without the broken Timsort.
In all honesty, since most text handling libraries do provide some form of replacetext() and replacetextEx() from my experience, I'd personally prefer they be added for the purpose of completion. If they don't make the cut though, soft-coding them with splittext() and jointext() could be done instead (similar to the way I believe Deadron's Text Handling Library did it):

proc/replacetext(text,original,replacement)
return jointext(splittext(text,original),replacement)


regexes would probably make more sense to do this with though, so whatever works, I'm happy with.
In response to Lummox JR
Lummox JR wrote:
You could, but why you'd want a blank regex is a mystery. I'm intending for compilation to happen at the time of creation. The second arg with the flags will be optional.

So no dynamically arranged regex strings, I gather?
In response to Hiead
I'm not sure what you mean.
In response to Lummox JR
I think perhaps a misunderstanding between compilation of the regex and compilation of the world. If not, I can understand wanting to re-compile the regex after the object's been instantiated. You may not want to necessarily instantiate another /regex if, for some reason, you want to change your expression for a slightly different circumstance.
Regexes are effectively constant objects. So if you wanted to change what you were searching for, for instance, it'd require creating a new regex.
In response to Audeuro
Audeuro wrote:
I think perhaps a misunderstanding between compilation of the regex and compilation of the world.

Got me. I was thinking he meant the compilation happened statically when the world was compiled, not that the regex string was compiled when the /regex object was created.
To clarify that point, the compilation of the regular expression is done when the /regex is created, not when the actual project is compiled.
Is there any ETA on when we'll see a 510 alpha/beta release?
In response to Tobba
I mentioned that in the post: as early as possible in January.