Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spoonify Spacehammer #183

Draft
wants to merge 25 commits into
base: master
Choose a base branch
from
Draft

Spoonify Spacehammer #183

wants to merge 25 commits into from

Conversation

jaidetree
Copy link
Collaborator

Restructure Spacehammer to operate as a spoon within Hammerspoon

Copy link
Collaborator

@Grazfather Grazfather left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I think we'll want to bump the version
  2. Did we bump the version of fennel? That would be nice as well.
  3. We can modernize how we import macros.
  4. Will this work with any old configs? Could we maybe find a way to nicely deprecate so that people who update don't have their configs broken, or write a migration guide?

(local slack (require :slack))
(local vim (require :vim))
(require-macros :spacehammer.lib.macros)
(require-macros :spacehammer.lib.advice.macros)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these used at all? They'd have to be used through the fully name, and anyway we should use import-macros.

@ambirdsall
Copy link

Will this work with any old configs? Could we maybe find a way to nicely deprecate so that people who update don't have their configs broken, or write a migration guide?

I reckon it's possible, but reconciling the two might require Spacehammer to be a very badly behaved Spoon: the current "clone to ~/.hammerspoon" installation method and the spoon API both use init.lua as the entry point and have completely different conventions about triggering side effects. Is there a way to make a conditional so certain code only runs if it's not being loaded as a spoon?

Probably fine regardless, particularly for a transitional release.

@jaidetree
Copy link
Collaborator Author

Will this work with any old configs? Could we maybe find a way to nicely deprecate so that people who update don't have their configs broken, or write a migration guide?

I reckon it's possible, but reconciling the two might require Spacehammer to be a very badly behaved Spoon: the current "clone to ~/.hammerspoon" installation method and the spoon API both use init.lua as the entry point and have completely different conventions about triggering side effects. Is there a way to make a conditional so certain code only runs if it's not being loaded as a spoon?

Probably fine regardless, particularly for a transitional release.

I've been thinking about this. My instinct is to have @agzam create a spacehammer2 repo if he and you are on board that runs exclusively as a spoon and would give us the freedom to re-think the config and apis for customizing it as I do see some merit in changing the shape of the config to make the shape of things like application items and hotkeys more consistent with other bindings. We could even consider supporting a version number in v2 of the config for people who don't want to use the APIs. I'm guessing the people using the current version are not going to be happy if it just breaks on an update and requires a separate installation process.

If we don't want to create a new repo, it could exist as a separate branch people can opt-into and we can provide a grace period with some warnings about eventually cutting over.

Either way, I'm not sure it's worth trying to maintain both versions. While we could check for differences and prompt an automated migration process, I'm not sure it's really worth it or sustainable.

Thoughts?

@jaidetree
Copy link
Collaborator Author

@agzam To summarize the above, I think it would make more sense to create a spacehammer2 repo to avoid breaking changes or burdening ourselves with some kind of migration system given the shift to distributing it as a spoon. Would you like to own that repo and invite Graz and I as contributors again or would you prefer I fork it and maintain it? If it's ok for me to fork and maintain it I'll update the docs to make it clear the idea originated from you but either option works for me

@agzam
Copy link
Owner

agzam commented Dec 7, 2023

I have no means or reasons to stop you from forking the project. I have no attachment to it; as a programmer who's been writing code for some time, I have learned the fundamental truth about our work - at the end of the day, we're just building sand castles. All code is ephemeral by its nature. Besides, you probably have more ownership of this work than I do at this point, so even if I wanted to act as a BDL, I couldn't.

I've been contemplating designing the next Spacehammer. As you know well, this one started as a way to solve my personal problems and I never expected it to become popular. I am proud of what it has become (at some point I think it was the 3rd or 2nd most starred Fennel project), but I'm even more surprised that people are actually using it and finding it useful.

If you decide to fork the project and start designing everything anew, you, my friend, have my full blessing to do so and my deepest gratitude from the bottom of my heart for everything you have done and taught me.

However, I don't want this to be the end of our journey. If I can ask you one thing, it's to implore you not to rush. Be patient and considerate and design it to be extensible. I promise you, as soon as you get something that works just as good (preferably better) than Spacehammer, I would switch to it in a heartbeat.

That being said, you sure you don't want to experiment in a brach?
I don't remember If I ever told you, I once wanted to register a "Spacehammer" GH Org, but someone squatting it and it's not available. Maybe we should actually consider a new name, register an Org and start designing Spacehammer.next or whatever we decide to name it.

@jaidetree
Copy link
Collaborator Author

I have no means or reasons to stop you from forking the project. I have no attachment to it; as a programmer who's been writing code for some time, I have learned the fundamental truth about our work - at the end of the day, we're just building sand castles. All code is ephemeral by its nature. Besides, you probably have more ownership of this work than I do at this point, so even if I wanted to act as a BDL, I couldn't.

I've been contemplating designing the next Spacehammer. As you know well, this one started as a way to solve my personal problems and I never expected it to become popular. I am proud of what it has become (at some point I think it was the 3rd or 2nd most starred Fennel project), but I'm even more surprised that people are actually using it and finding it useful.

If you decide to fork the project and start designing everything anew, you, my friend, have my full blessing to do so and my deepest gratitude from the bottom of my heart for everything you have done and taught me.

However, I don't want this to be the end of our journey. If I can ask you one thing, it's to implore you not to rush. Be patient and considerate and design it to be extensible. I promise you, as soon as you get something that works just as good (preferably better) than Spacehammer, I would switch to it in a heartbeat.

That being said, you sure you don't want to experiment in a brach? I don't remember If I ever told you, I once wanted to register a "Spacehammer" GH Org, but someone squatting it and it's not available. Maybe we should actually consider a new name, register an Org and start designing Spacehammer.next or whatever we decide to name it.

Thanks for your insight and kind words! My concern here is I just don't want users to pull and update then everything breaks before they have to come back and reinstall it as a spoon. One of the major breaking changes with the Spoon version is we need to replace import paths from (require :advice) to something like (require :spacehammer.advice) so it won't conflict with other spoons, which can be a big wrench if anyone wrote custom modules depending on spacehammer modules. If you're aware of the next version and get to migrate at your leisure, I think that's preferable.

It's unfortunate that someone parked the org SpaceHammer, while we can't contact them directly could we try filing an issue with Github and request they release the account? They've had ~8 years to do something with it and haven't seemingly contributed a single commit or repo. Wouldn't bank on them intervening but sometimes it can work out.

I agree that an organization would probably be the best option. Would it be possible to create an org with a slightly different name like SpaceHammerTeam or SpaceHammerGroup or SpaceHammerMac or SpaceHammerSpoon or anything along those lines? Not opposed to a full rename but I do like the name. It's fun, references the platform it's built upon, and has a lot of possibilities for visual themes and logo forms.

A branch could be used for now, but I wouldn't want to officially release it like that. Worst case, we could have a countdown but I think an org would probably be ideal here.

@agzam
Copy link
Owner

agzam commented Dec 8, 2023

I have opened a GH Support ticket. I will let you guys know as soon as I receive any response about the org. If we fail to obtain the org, we can always come up with a different name. It would be nice to find something that sounds relatable. I thought about it, but I can't come up with anything as catchy and cool-sounding as "Spacehammer". It would be nice if we could keep the name.

@jaidetree
Copy link
Collaborator Author

Awesome, let's hope that works out as spacehammer/spacehammer would be great 🤞 Alternatively, got some ideas:

  • spacehammerforge/spacehammer
  • spaceforge/spacehammer
  • starforge/spacehammer
  • astroforge/spacehammer
  • spacealliance/spacehammer
  • spacesmith/spacehammer
  • starsmith/spacehammer
  • astrosmith/spacehammer
  • spacecraft/spacehammer
  • spacehammergroup/spacehammer

Could probably come up with more if none of those do it 🤷‍♂️

@Grazfather
Copy link
Collaborator

astroforge/spacehammer is my favourite.

@agzam
Copy link
Owner

agzam commented Dec 13, 2023

@jaidetree @Grazfather

GitHub has replied:

GitHub’s Username Policy has recently been updated and we are no longer accepting requests to release dormant usernames. We are not able to accommodate this request.

Sadly, "astroforge" org name is taken as many others suggested. I created "craftinghammers/spacehammer" and have invited both of you as admins. Let me know if you find any other limitations, I will make sure that we all have equal rights to change things. Would be nice if we can find a medium where we can discuss long-term and short-term plans and vision.

@jaidetree
Copy link
Collaborator Author

jaidetree commented Dec 13, 2023

@jaidetree @Grazfather

GitHub has replied:

GitHub’s Username Policy has recently been updated and we are no longer accepting requests to release dormant usernames. We are not able to accommodate this request.

Sadly, "astroforge" org name is taken as many others suggested. I created "craftinghammers/spacehammer" and have invited both of you as admins. Let me know if you find any other limitations, I will make sure that we all have equal rights to change things. Would be nice if we can find a medium where we can discuss long-term and short-term plans and vision.

I expected some of those to be taken verbatim but found some reasonable variations to make it work

image image image image image image image

CraftingHammers is ok if it comes down to it but I think there's more I can do visually with the space theme theme.

@agzam
Copy link
Owner

agzam commented Dec 13, 2023

@jaidetree okay, what about "spacecraftics/spacehammer"? I'm too simple, I can only think either of "space" or "hammer" stuff.

@jaidetree
Copy link
Collaborator Author

@jaidetree okay, what about "spacecraftics/spacehammer"? I'm too simple, I can only think either of "space" or "hammer" stuff.

It's kinda funny, this is like the one place where my ADD helps. I can close my eyes and too many ideas just kinda happen, most of them are terrible, but there they are 😆

I pasted a bunch of images with available names. I'm hesitant to put them into text just in case they get sniped but not sure if you're seeing those. Here's a few more:

image image image image image image image

Any of this or the last batch of images stand out to you?

@agzam
Copy link
Owner

agzam commented Dec 13, 2023

Okay, here it is. I've exceeded the rate limit while checking for name availability. Twice. I hope this one works.
https://github.com/cosmicspoon/spacehammer

I meant to migrate the repo with the "Numero uno" issue I posted and @jaidetree commented on it, but I acted foolish and deleted the whole org (while I meant deleting the other one). Should I re-create the issue?

Anyway, @jaidetree you know where to find me on Clojurians Slack. Let's maybe chat at some point?

@jaidetree
Copy link
Collaborator Author

Okay, here it is. I've exceeded the rate limit while checking for name availability. Twice. I hope this one works.

https://github.com/cosmicspoon/spacehammer

I meant to migrate the repo with the "Numero uno" issue I posted and @jaidetree commented on it, but I acted foolish and deleted the whole org (while I meant deleting the other one). Should I re-create the issue?

Anyway, @jaidetree you know where to find me on Clojurians Slack. Let's maybe chat at some point?

Nice find! That's playful but has a cohesive theme to explore. Feel free to recreate the issue

@agzam
Copy link
Owner

agzam commented Dec 13, 2023

Nice find! That's playful but has a cohesive theme to explore. Feel free to recreate the issue

Cosmic Spoon is actually a black hole classification:

In astronomy, a cosmic spoon is an intermediate-mass black hole (IMBH) that acts like a spoon stirring a pot.

@jaidetree
Copy link
Collaborator Author

Nice find! That's playful but has a cohesive theme to explore. Feel free to recreate the issue

Cosmic Spoon is actually a black hole classification:

In astronomy, a cosmic spoon is an intermediate-mass black hole (IMBH) that acts like a spoon stirring a pot.

That's really cool! Learned something and it adds even more expressive options when we get to focusing on the visual identity

jaidetree and others added 11 commits December 14, 2023 14:09
Helps keep core.fnl focused and readable.
The remaining exception is `get-config`: the post-module-init
`defadvice` is more confusing without it in the same file, and (call it
an omen), I hit a runtime error when I reloaded hammerspoon after moving
it.
I was a little bothered by how its being in core.fnl meant it was not configurable
…dd-init.example.fnl

Extract helpers from `core.fnl` and add `init.example.fnl`
@AjayShanker-geek
Copy link

If you all need help with testing it. Would glad to help👍🏽

@msingh15-tufts
Copy link

Hi, has there been any progress on this recently?

@agzam
Copy link
Owner

agzam commented Jun 16, 2024

Hi, has there been any progress on this recently?

I haven't been using a Mac for the past few months due to losing my job, which led me to switch my primary machine to a Linux workstation. I suspect that @jaidetree has also been occupied with other priorities. As a result, I'm afraid this PR is currently on hold until further notice.

@jaidetree
Copy link
Collaborator Author

I've been using this branch myself to run spacehammer as a Spoon. The problem is we would have to introduce some breaking changes to fully convert. We have made some progress towards another version of this project that shifts from a config based config to an api based config more similar to emacs but that is slow going.

When it does land, it will likely be in a separate repo so that it doesn't break for users between pulls.

However, this branch is functional. If you run into any issues when trying it out, feel free to post it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants