I Only Sound Confused Until I'm Positive
I Only Sound Confused Until I'm Positive
I didn't know I was going to be addressing this in Awesome Sauce Java. But apparently, being on the inside of a Lisp invites exploration and all that exploration leads to wonder and now I'm standing inside a region of software I never wanted or planned to be, with a possible approach to possibly simplify some complicated things related to packages, with no confidence anybody is going to care.I'm tilting at windmills.
Names are a vexing bane in software.
Names are confounding in software.
Just trying to get this article started has me confused. Maybe a little angry. Packages are great, but they're not, but it's not nice to complain just to complain. Best to point out the why they're great and why they're not, then show how to improve them.
Packages are the best. Maybe the best it can possibly be. Whatever packages are? They're a really, really, really, truly difficult hard problem. There may not be a more difficult problem in software than naming all the crap we have to name on top of keeping all the names meaningful and reasonably orderly. It's not easy. At all.
But it has to be fixed. Made better. Improved. A little. Even a little. If possible.
I didn't know I was going to be face-to-face with a possible way to do it differently. Maybe better. Definitely different. But, and it's weird, that's what it looks like I'm exploring. But it's super difficult.
The package system in Awesome Sauce Java was going to be, but now it looks like it isn't going to be, a standard package system. Why? Because standard package systems are inflexible. Yes, that means I'm trying to build a flexible package system. I'm building a flexible package system. It looks that way. For reals. I know. I sound totally confident...
Accentuate the Positive
Rather than sounding negative, I'm going to talk about where things will be when whatever it is I'm building gets finished.Here's what is going to be possible:
If I get this right, Awesome Sauce Java internals will have a system that allows the same name to be associated with as many of anything* as you want, in the right place, differentiated, differentiable, modifiable at runtime. [*package, class, method/function, variable]There's a lot wrapped up in how it works, that thing I'll refer to for now as the package system in Awesome Sauce Java. I didn't start out to build anything but a standard package system. If this package system works, it'll simply prove that not building something just to build it would have hatched a catastrophe, while waiting to understand what that totally familiar thing in this totally different context is and how it could work and why it's so interesting. So it can be built for the right reason or reasons, allowing some (possibly) interesting science to develop.
I hedge a lot, I know. Until something is totally done, I always worry something's going to trip it up and make it less, or different, than I had thought I understood it to be.
Transformers
Awesome Sauce Java has a feature built into it, a loader kind of thing, that allows for code to be modified/swapped at runtime. I've called the loader "Transformers", because it allows code to be swapped into a running system and run immediately. Sounds radically reckless, right? It's interesting. Transformers makes it possible to find and change a call and arguments within a Java call at runtime, without stopping an application. It seems like it could apply to server-side web scripting, to fix a bug without having to restart the server. It could also be used to update a desktop application while the app is running.
But Transformers is only one part of the system, and it's not the bigger part that's arguably more interesting. But Transformers is interesting, because it will allow for code to be upgraded within a running system. It will also allow programs to exploit hooks to install new modules while an application is running. It could make it possible for consumers to configure applications according to their needs at a given time, for a given purpose.
Packages
Of all the parts that I've been working on, it's the package system that I've been trying the hardest to understand. Packages get complicated and messy. Mostly, packages are rigid.Once you start passing functions around in Lisp, and once you start separating code from data in Lisp, it's natural to start wanting to find a way to turn everything into clearly code or clearly data, and then find ways to transform data with macros, and pass functions as arguments so you can change the arguments and change the behavior whenever it makes sense to. That's the kind of thinking that Lisp naturally encourages.
Lisp is a math. The fact that it's a math means it's possible to constantly reduce code to progressively smaller, more functional, compact, expressive parts. The desire to reduce is natural anyway as we're always trying to do more with less things, or find ways to pack more into smaller spaces.
And that's what the package system in Awesome Sauce Java is going to be - a way to pack things into space. A way to name things in your Locale that allows me to look at the same thing in my Locale. So 2, 5, 10 or a million people can look at and write code in their natural language and have it presented, live, to others in their natural language.
Plus it's a way to name things the same name and differentiate them in the same way we differentiate all of our friends who share the same name. It's horribly complex to make things easy. I'm glad I didn't start out to address the problem of packages. I was punting, just like everybody else. But I saw something in something that looks like it'll offer a lot of flexibility and functionality and make it possible to turn it into a flexible package system. It's coming together well, but until it's done, I feel like this is all just a big tease.
It would be a big tease, except I'm finding that when I write things, I remember things. And when I remember things, I work on things. And when I work on things, I get a little better at going a little faster, and getting a few more things done. I'm pretty sure that means at some point all this talk will turn into a product that I can demo along the way and you can maybe decide to get interested in, especially if it has features that are compelling to you. That's why I'm building it in the first place: so we can hopefully use it in some small way to get more done in less time and see what kind of tools we can build and share and use to help us take better care of our earth.
Have a great day!
Michael
2/27/18
Comments
Post a Comment