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: 902
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
 
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.
 
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
 
It worked for me. No crashes at all first run without saving it. All messages were displayed.
 
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.
 
Windows XP

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

> JAPI or Grimoire.
Crashed even without.
 
>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?
 
Crashed on mine, with Windows XP and latest version of WC3.
 
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
 
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 ...
 
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.
 
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...
 
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.
 
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: 446
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    And since almost all of my programming experience is with defunct shit now, I figure my best place is helping preserve legacy stuff. Which I don't know how to do necessarily, but I need some kind of a hobby and figuring out how older things worked is the only shit that really interests me. Well soldering and restoration is fun too, but no one is bringing me new stuff to fix and restore, so it's mostly old shit, and I LOVE OG Xbox so much. I want to make sure it can function as long as possible, until someone can effectively emulate it at least. I have like 15 I was going to fix over the winter and didn't get to.
    +1
  • Varine Varine:
    I also have a couple OG gameboys, but idk if I can do that without like, manufacturing new parts that no one makes anymore and I can't do that right now
  • tom_mai78101 tom_mai78101:
    Currently in the middle of getting the probate process going. We're doing the informal probate process.
    +3
  • Varine Varine:
    A probate is usually done with a will, yes? If so I am sorry for your loss
    +1
  • The Helper The Helper:
    Yeah Tom, me too sorry for your loss buddy my mom told me she finds out her olds friend died from Google searching them. She had not talked to one of her old friends in a year and found out she died from Google. Also another one in the same session. RIP all of them my sincere condolences Tom
    +1
  • Varine Varine:
    We have some elderly guests that regularly come hang out at the bar at the end of the night, and every once in a while we don't see someone for a few weeks and then someone shows up with their obituary.
  • Varine Varine:
    We usually let them do their memorials there in the morning if they want to and I'll make them some snacks and drinks. There was one guy named Tom that came in like every night and would sit by himself and get a bunch of soup and a glass of wine. idk why but he LOVED our fucking soup, like he would order a fucking quart of it at a time and would always get so sad when we stop doing it for the summer.
    +1
  • Varine Varine:
    But he also loved our calamari, which is another thing I hate but it sells super well so I can't change it. There was one day he came in and was asking me how to make it, because he tried to at home once in the off season when we stop running it and he really wanted it lol
  • Varine Varine:
    I think he's one of the only people I've made recipes for for free because he really wanted a broccoli cheddar, and it was like dude I don't have a recipe, it's just whatever I have, but here, this is how you do it
  • Varine Varine:
    I don't think he ever figured out how to do the calamari in a pan though, like idk how to do that either. He was afraid of the at home deep fryers though and it's like yeah, that's fair, I am too
  • Varine Varine:
    He was just such a sweet old man, we had two servers pregnant and they held a baby shower together, he was soooooo fucking excited to get to see a baby. Unfortunately he died a month or so before they were born
  • The Helper The Helper:
    So I decided to Google some people that I had not seen or heard from in a while and sure enough one of my old best friends, we had a falling out years ago but whatever, find out he died of Pancreatic Cancer in January. I have also lost a few of my closer acquaintances from growing up the last year. Getting old - people die - I kinda thought it was going to be this way a few years ago....
    +2
  • The Helper The Helper:
    Forum running super slow again
  • Ghan Ghan:
    Not really clear from the stats as to what is causing the slowness.
  • Ghan Ghan:
    We get a lot of guest traffic so it may just be the load is getting too high and not from any particular source.
  • Ghan Ghan:
    Looks like the server is maxed out on CPU.
  • Ghan Ghan:
    Oh it looks like a lot of the traffic is Silkroad Forums. That domain isn't protected by Cloudflare.
  • Ghan Ghan:
    But the old Silkroad site is still on its own server. I just had a test site set up on this server for it.
  • Ghan Ghan:
    I just disabled that test site. Let's see if that helps the load.
  • Ghan Ghan:
    Looks much better already.
  • The Helper The Helper:
    I had actually forgot about the Silkroad site. I had asked
  • The Helper The Helper:
    SD Ryoko about it and he said the couple of people left on there really like it, that was a few years ago, maybe I should check back
  • jonas jonas:
    I guess when you're getting old, and the last day of soup season draws near, you start wondering
  • jonas jonas:
    will I make it to the start of the next season? or was this the last time I'll ever have my favorite dish?
  • The Helper The Helper:
    I am doing my first Vibe Coding project. In installed the environment and tools according to instructions but it is all chat doing this for me at my direction. It is fun really and holy shit I might finish in 2 hours what it would have taken a day to in my Access and this would be an electron app complete new

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top