That was with mirrors and light beams though wasn’t it
Yes but they use a similar concept.
I kind of realised something later on:
A “classpath” would only be used when a class is actually expected, like:
public class SomeClass extends CLASS {
private CLASS field = (CLASS) new CLASS();
public CLASS method (CLASS idk) {
CLASS local;
}
}
Although, tbh, in Java, people can also do stuff like:
return some.package.SomeClass.someMethod();
Your post actually gave me an idea how to fix this.
The most left thing, like ‘some’, I could see what that references to.
If there’s a field / local variable with that name, that’ll get priority.
If there isn’t, then I can assume it’s the start of a package path.
Only “issue” I can think of is that it might “block” some packages:
public static String net = "0.0.0.0";
static {
// This wouldn't work as 'net' is resolved as the field 'net'
print(net.website.api.SomeClass.static_field);
// This still works, as the syntax only expects a class reference
net.stuff.Class var = (net.stuff.Class) new net.stuff.Class();
}
Which is fine I guess.
Like you said, I could see that “net.website” isn’t a valid field of String and go from there, but eh.
It might just be a typo while referencing a field, the wanted package doesn’t exist, … too much work
Heh, name collisions happen all the time, particularly on big projects. This is one of the things naming conventions were created to solve. If a developer names a variable the same thing as a package they are importing, that’s their problem.
When resolving a name things are commonly checked in this order
local scope → containing scope chain (inner to outer) → global scope → keywords
sometimes keywords are checked first to prevent overloading core functionality of the language, but some languages consider being able to do this a plus.
Built some silly spaceship for the RoVerse kids and ended up possibly making a bit too overkill to be used, lmao. Oh well, it turned out decent.
Update on my circuitry simulator. Adding binary numbers together. Funny I can code the logic gates real easy but the actual logic being used evades my grasp for now, so I could copy to make a calculator possible, but not be able to put it together myself and understand it.
GIF:
The lightbulb totals show the initial input total.
Very cool. With this someone could recreate Robot Odyssey, one of the coolest (and hardest) “games” I played in my teens.
next stop: make a computer with this, in roblox, and play roblox… in roblox
I skipped through a couple of his videos, I think it’s a different sort of game…
yes, and in this simulation the damn chatbox bug will be fixed.
Modified my JavaScript based visualizer a bit, and now it is suitable for any artist I want.
(GitHub version won’t have the songs, only the one on my computer)
Should come help with mine
In other news, @Dev_Anthony gave me a new design idea for the Ultimate Boxing logo.
I am not the best for idea generation, but I can do most ideas without issue once I have one.
It turned out great!
You mean...
When the logo turns out just right. ![|690x490](upload://iIPd73A7Xknw8H1XzbQjZNZN1ko.jpeg)Your work never ceases to amaze me.
So you become a space cowboy?