Dynamic JASS hardcoding: Need Testers.

Jesus4Lyf

Good Idea™
Reaction score
397
Don't get too excited, this is too fragile for general use.

This is a timer system that executes JASS code created dynamically as it runs. Currently it is similar to TT. It is theoretically the fastest timer system ever written, and I have it running on my computer successfully. However, even declaring globals or adding functions in some places can utterly break this timer system, replacing it by a fatal error.

What I'd like to know is... Does this even work on anyone elses computer except mine?

Please open the map, and WITHOUT OPENING THE CODE OR SAVING THE MAP, click test map and try it. It is critical that you don't recompile it for the first test. After that, you can check out the code and save it and see if it still works (if it ever did). Please report your findings here. Don't be suprised by fatal errors, they're very likely.

I'd like to hand out a big thankyou to TheDamien for finding that you can actually execute bytecode out of arrays. I've been studying bytecode ever since to see if this is actually at all feasible.

I'm happy to explain things further. This thread can become just as interesting as people are curious. :D
 

Attachments

  • Bytecode.w3x
    15.8 KB · Views: 805

Jesus4Lyf

Good Idea™
Reaction score
397
Bah. It doesn't work then, unless someone randomly finds it works for them. :(

So basically what I did there was, I made it attach this to a timer:
JASS:
function ? takes nothing returns nothing
endfunction

Then it actually EXPANDS that AFTER it's attached. Like quite literally... To:
JASS:
function ? takes nothing returns nothing
call SomeFunc(1)
endfunction

Then...
JASS:
function ? takes nothing returns nothing
call SomeFunc(1)
call SomeFunc(1337)
endfunction

Then...
JASS:
function ? takes nothing returns nothing
call SomeFunc(1)
call SomeFunc(1337)
call SomeOtherFunc(577)
endfunction

Yes, I created a JASS compiler within WC3 that runs during the map. But since it relies on real memory locations to actually call the code, this can vary from computer to computer. I tried to make it safe by making it relative to BJ stuff, but it seems it has all fallen through. :( Oh well.

I was probably taking things a bit too far anyway. :p
And that's probably the biggest understatement of the century.

PS. Thanks for testing.

I'd still like to hear from others to see if this actually works for anyone!! :D
 

Romek

Super Moderator
Reaction score
964
Fatal Error.
Also, don't you think the current systems are fast enough? :p
They execute extremely quickly, and have certainly evolved over the years.

Faster, and extremely unsafe (making a map only work on certain computers) is pretty useless.
 

Jesus4Lyf

Good Idea™
Reaction score
397
Mmm... well, that really wasn't the point.

I was doing something original and generic, if it worked this could've had all kinds of applications.

That Bytecode map you downloaded actually has a real-time JASS compiler written entirely in JASS. Doesn't that make you pause and go "wait, what?"... :p

Anyway, no more tests required now really. Thanks everyone. I suppose I'll abandon this. :)

But any discussion about the concept is welcome! :D
 

saw792

Is known to say things. That is all.
Reaction score
280
It worked for me. No crashes at all first run without saving it. All messages were displayed.
 

Jesus4Lyf

Good Idea™
Reaction score
397
Wow! This is amazing news!

Errm so. Which version of WC3 did everyone test it on? This may give some hints as to why it crashed. Also, what operating system, and any modifications to WC3... like Grimoire... or JAPI...

This is crazy! :eek:

Keep the tests coming, if we may. But please state operating system, use the latest version of WC3, and don't use any modifications to it like JAPI or Grimoire.

I use Windows XP.
 

Romek

Super Moderator
Reaction score
964
Windows XP

> use the latest version of WC3
No can do. ;)
1.21b.

> JAPI or Grimoire.
Crashed even without.
 

Jesus4Lyf

Good Idea™
Reaction score
397
>1.21b.
That's the culprit. If blizzard.j is changed AT ALL basically, then my JASS based JASS compiler needs values changed because the pointer will be offset. :thup:

So we know that this will only work on the latest version of WC3. :D

saw792, did you manage to still have it run after saving the map? And if not, what version of JassHelper do you use? ;)

This is soooooo cool. Lol.

Has anyone figured out what this does yet?
 

UndeadDragon

Super Moderator
Reaction score
447
Crashed on mine, with Windows XP and latest version of WC3.
 

Builder Bob

Live free or don't
Reaction score
249
SomeFunc
1
SomeFunc
1337
SomeOtherFunc
577

I get all that output and no fatal error when testing the map without saving.

After saving the map I stop getting the output and get a fatal error on:
Adding call SomeOtherFunc(577)


Windows XP
Warcraft 3 version 1.23
JassHelper 0.9.G.0
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Lol RoC? Not in a hurry to do that... Especially without it working on at least more than one person's computer on FT... So far it's still completely unfeasible.
Its just temporal, i will get back TFT in few days/weeks.
Anyway i think you simply use script, probably vJass so you can easily make it for ROC, or you use more than a script ?!
I just want to test it now, but will live with that if i can't now ...
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
Mine worked, latest New Gen and Windows Service Pack 3. Using what ever Jasshelper that came w/ latest NewGen.

Though I saved and it crashed.
 

Jesus4Lyf

Good Idea™
Reaction score
397
Right, that's the version of JassHelper adding different functions and such, changing the ID of the SomeFunc and SomeOtherFunc functions. I use 0.9.E.0 off memory.

So basically after saving you point to random functions because JassHelper compiles differently (as it is a different version).

>Anyway i think you simply use script, probably vJass so you can easily make it for ROC, or you use more than a script ?!
Erm. It's really not that simple. =X
Sorry, but you'll have to wait. :)

This is brilliant feedback. Thanks everyone so far. Lol, I've run out of ability to +rep for now...
 

Azlier

Old World Ghost
Reaction score
461
Huh. Worked fine for me. Displayed some calls, 1, 1337, and 577(?). No crash.

Windows XP SP2, latest Warcraft version

EDIT: Ooh... oops. I saved the map before testing, which apparently I wasn't supposed to do. It worked either way.

As for making it RoC, I think removing the Phoenix would do it. Hopefully.
 
Reaction score
333
Works for me (Windows XP SP 3). Displays "SomeFunc:" with numbers 1, 1337, 577, then it started displaying "SomeOtherFunc:" with a number as well, as far as I can remember.

After I saved the map with JassHelper 0.9.G.1, the numbers stopped working but multiple phoenixes started spawning at the position of the original. It eventually crashed. I attached the new map to this post.
 

Attachments

  • Bytecode(2).w3x
    15.7 KB · Views: 351
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top