Releases: electrikmilk/cherri
v0.2.4 Beta
Smaller release than normal while decompilation is being worked on to get some fixes and improvements in the meantime to the main branch out. Right now decomp is the top priority other than major bugs in the compiler preventing features from functioning properly.
What's Changed?
- Updated to the latest version numbers for new Apple platform updates (Sequoia, iOS 18, etc.)
- Adds action
getApps()
. - Bugfix #67: Add check for empty dictionary value.
- Some general improvements to the codebase.
- Updates
setValue()
action value argument valid type to variable to allow for any value, not just a string. - Expressions can now be used for number type values, as they evaluate to a number.
- Optimizes collecting references.
- Fixes an issue with parsing array values.
Full Changelog: v0.2.3-beta...v0.2.4-beta
v0.2.3 Beta
What's changed?
Highlights
Compiler glyph search
You can now use --glyph=
to search for glyphs in the compiler. This will happen automatically if an invalid glyph identifier is used. The compiler will then compare the term you entered to the glyphs list and give you the closest glyphs to help you get to the glyph you meant to type.
Playground icon editor
You can now click on the rendered Shortcut icon in the playground to open a popover containing a mini version of the Shortcut glyphs search site. From there, you can visually pick the color and search for a glyph for your Shortcut icon. Switching the glyph or color will replace the identifier for the definition you're changing in your code in real-time.
Playground definition parsing
The playground also now recognizes the name definition to display in the preview and what file to look for when compiling. This is now done before compilation to display the name in the preview.
It also now grabs the color and glyph defined to render the Shortcut icon rather than the preview rendering it. It will re-render in real-time the Shortcut icon if you change the color or glyph definition and the name under it.
- Breaking changes
- Corrected
getFolderContents()
to not be recursive by default. - Reactors matching groups actions.
-a=
is no longer a shorthand for--action=
.
- Corrected
- bugfix #55: Track bracket depth in object collection by @NoelTautges in #56.
- bugfix #58: Check custom action usage inside other custom actions by using a queue by @NoelTautges in #61.
- bugfix #62: Pass array variables to custom actions through their dictionary equivalent by @NoelTautges in #63.
- bugfix #64: Compare the size of custom action params and collected arguments by @electrikmilk in #65.
- Add optional album parameter to Save to Photo Album action by @NoelTautges in #66.
- Fixed and added too many actions to list. (Document, Podcasts Improves and adds Media, and more).
- Implements
matchText()
. - Now writes an additional file to the list using the
--debug
option that contains the file after pre-processing (includes, etc.). - String searching is also added to other places where an enumerable value is expected to show you the closest match to what you entered.
- Improved the formatting of the actions list.
- Shortened CLI argument descriptions - Honestly sorry about this, these were waaayyy too long for a while.
New Contributors
- @NoelTautges made their first contribution in #56
Full Changelog: v0.2.2-beta...v0.2.3-beta
v0.2.2 Beta
What's Changed
Highlights
Dictionary access by key syntax
An easier syntax than using getValue(dictionary, key)
is now available. There may be more places where we need to fix this, but as far as I can tell this has been working, and dictionary key values can now be accessed using the following syntax:
@dictionary = {"test": 5}
@number = dictionary['test'] // 5
// this also works
@text = "{dictionary['test']}"
Glyphs Search Site!
We have gotten permission from RoutineHub to sync glyphs with Jelly. This site allows you to search Shortcut glyphs. This may move to a new domain, but for now, this is at https://glyphs.cherrilang.org/.
- π
WHAT THE HELL. WHERE'S THE EXE!?! #50.
- This issue was made as a joke during a dev chat I did with the folks over at RoutineHub and it was a lot of fun! We built a demo quiz Shortcut which demoed many of Cherri's features to a bunch of people in the RoutineHub discord. Many thanks to RoutineHub for sharing the project and giving me this opportunity!
- New Alarm and Timer actions.
- New Date and Calendar actions.
- New Reminders actions.
- Renamed
open()
->openShortcut()
. - Unsigned Shortcut is no longer removed if signing fails.
- Implement better back-off with HubSign service.
- Adds
--skip-sign
for skipping signing manually. - bugfix #51: Add
selectFolder()
action by @electrikmilk in #52. - Translate to system language should now be possible with
translate(text, to)
argumentto
now being optional. This value should automatically be the set system language. - Fixes HTTP actions request body. You can now input a dictionary and it will work properly.
- Fixes Ask being typechecked against.
- Fixes inconsistent darker colors. Apologies, colors now line up to their names and documentation.
- Fixes an issue with variable references.
Full Changelog: v0.2.1-beta...v0.2.2-beta
What's Next?
- Playground features in progress: Multiple files, name definition support, set icon using UI that shows available colors and glyphs, inspired by the glyph search site.
- I wanna do more actions, but there may only be a few in the next release just like this one, I'd like to try to do that at least between releases. Someone has also expressed their interest in contributing to actions.
- Wrap up decompilation. This has made a lot of progress and mainly just needs polished. It will never be 100% perfect, but I'm excited to hook it up to the playground, etc.
v0.2.1 Beta
Highlights
- Fixes raw actions.
- Fixes repeat item variables.
- Fixes issue with the
count()
action. - Refactors the signing process.
- Fixes URL encoding and decoding actions.
- Adds a check for the
Ask
global, to not do a type check against it.
Apologies for the small release, a lot of work is going on in decomp to achieve a full Shortcut to Cherri decompilation. It has been going better than I expected. The output is even formatted.
Full Changelog: v0.2.0-beta...v0.2.1-beta
Standard Library
In the last release, arguments for custom actions were implemented.
In a previous release, the implementation of embedding a standard library file stdlib.cherri
in the compiler and pasting it in when an include statement containing 'stdlib' is used.
The first 2 standard library custom actions have been added with this release.
runJS(text script)
The first is an implementation of running JavaScript code and getting the output.
const _ios17bug = replaceText("#", "\u0023", _script)
const _uri = url("data:text/html;charset=utf-8,<body/><script>{_ios17bug}</script>")
@richURI = _uri.richtext
const _decoded = urlDecode(richURI)
output("{_decoded}")
chooseFromVCard(array items, text prompt)
The second is an implementation of taking an array of vCards and formatting them to be displayed in a chooseFromList()
action and returns the chosen item.
const _menuItems = "{_items}"
const _vcf = setName(_menuItems, "cherri_chooseFromVCard.vcf")
@contact = _vcf.contact
const _chosenItem = chooseFromList(contact, _prompt)
output("{_chosenItem}")
What's next?
- I plan to improve the playground as work on this has started. Fix some long-standing issues and add some quality-of-life features.
- Decompilation
- Hoping to add more actions, and glyphs, and correct the icon colors.
HubSign
There was recently an issue with Shortcut signing in macOS (#49). Many users using Cherri have likely upgraded to the latest version of macOS and may have had problems downgrading or it wasn't worth it for their situation.
HubSign is a Shortcut signing service provided graciously by the folks over at RoutineHub that the compiler will now fall back on if signing using the shortcuts
binary on macOS fails.
They maintain the service and will keep an eye out for issues with versions of macOS as they relate to Shortcut signing.
You can override any conditional use of HubSign by adding the flag --hubsign
. Windows and Linux users can technically use this to create valid signed Shortcuts on their platform, it will just be a bit slower and they'll then need to move that file to an Apple device, but that's better than only being able to use the playground and not your favorite text editor.
External
- Shortcut Preview improved by a lot recently. It can now render dictionaries, and a bunch of stuff got fixed.
- I did a dev chat with the RoutineHub folks!
v0.2.0 Beta
Highlights
- Adds arguments to custom actions in #48.
- Refactors old custom actions into Copy & Paste macros.
- Fixes an issue with action constants and variables.
- Adds a test to ensure we support very smol updater (we do!). There is no affiliation, I think this is a neat updater that makes implementing self-updating very simple in Shortcuts and Cherri.
- Removes deadcode.
- Refactors the way actions are defined.
- Updates to Go 1.22 and updates UUID dependency.
- Prevents possible infinite loops when collecting objects (generally text between curly braces).
- Adds skipping whitespace to the parser to allow for extra whitespace.
- Fixes issues generally with parsing.
- Fixes commented
#include
not being ignored. - Ignores comments generally when pre-parsing.
- Refactors
#include
to use raw strings to improve compilation speed. - Improves
#include
generally. - Reduces the complexity of collecting values and definitions.
- Reduces the complexity of generating the property list output.
- Stop redefining references to variables to prevent the definition of a variable from changing.
- Fixes repeat item index
- Fixes action search
Full Changelog: v0.1.12-beta...v0.2.0-beta
What's Next?
- Decompilation: The plan is to be able to import a Shortcut from a Shortcut iCloud URL or file path to a local unsigned Shortcut and the compiler will "decompile" it to Cherri code. This will be integrated into the playground and the macOS app once it reaches maturity. This will help a lot more people use Cherri if they can get a starting point by importing one of their existing Shortcuts. This has been progressing a lot lately and works for the most part. It is not just yet ready to merge into
main
. - Implementing a lot more actions as this has been a sore thumb in the compiler while I've had tunnel vision on other stuff. π Not that many remain, there are only 3 categories of actions, and one of those categories is mostly finished.
- Improving the preview-shortcut npm package I maintain for Shortcut previews on the web. It is used by the Cherri website and Playground.
Future
- Fixing issues with syntax highlighting in the playground and trying to improve it by adding more helpful features now that it has more interest, throwing some love to Windows, Linux, etc. users.
- macOS app: Implement proper syntax highlighting for Cherri and hopefully add some kind of autocomplete or search for actions you can use without having to always refer to the documentation.
- Possibly focus on the compiler being more self-documenting so we can generate documentation or more rich autocomplete/intellisense data for the IDEs.
External
- Cherri playground now says the version of the compiler it is using.
RoutineHub
The project is being featured on their homepage! On a carousel on their homepage, RoutineHub users will now be able to find out about Cherri. That's super cool!
I was also interviewed by them, which you can watch here! https://youtu.be/x0hwrQ51Sbs
v0.1.12 Beta
What's Changed
- Adds built-in base64File() action.
- General improvements to vCards, removes
PHOTO
from generated vCards if not using an image. - Adds explicit comment() action.
- Improves automatic nothing actions after if/else, menu, etc.
- Fixes and improves the
for
andrepeat
statements. - Chore: added speak and dictate actions by @mikeogezi in #30.
- chore: allow
newContact
action to handle variables forphoneNumber
andemailAddress
by @mikeogezi in #43. - Implements raw text by @electrikmilk in #46.
- Throws error when translation language is not supported.
- Reduces general complexity.
- Improves speed of collecting values when parsing.
- Move inline string reference checking to when we are parsing the file so that if a reference does not exist, the parser error will be at the correct position.
- Simplifies some parsing using Regex.
- Removes auto-incrementing action arguments asking for an index of a list, so that counting can start at
0
. However, we can only do this when it's an integer literal. So, this accepts the fact that Shortcuts starts counting at1
. - Fixed setting
WFWorkflowHasShortcutInputVariables
. - Refactors list actions to
getFirstItem()
,getLastItem()
,getRandomItem()
. - bugfix #22 & #41: Do not increment index if variable
- bugfix #31: Skip enum check for non string values
- bugfix #32: Add string type check to measurement enum checks
- bugfix #33: Ignore includes in a single-line comment
- bugfix #34: Fix client version number values in plist
- bugfix #35: Fix using variable references for magnitude values
- bugfix #36: Fix handling variables in infinite argument actions
- bugfix #37 & #38: Fix variables in app actions
- bugfix #40: advance past double quote for
stopwith
- bugfix #42: Correct repeat index variable value type to integer
Full Changelog: v0.1.11-beta...v0.1.12-beta
External stuff
RoutineHub
I'm excited to talk about the fact that RoutineHub (a Shortcuts distribution platform), has taken an interest in the project and their support is greatly appreciated.
When I first got into Shortcuts like many people I found RoutineHub and their community very welcoming. It's a super cool and easy way to share your Shortcuts for others to use.
The RoutineHub team has been instrumental in creating the final piece of the playground: Signing.
This was a huge issue for a long time as only those with a Mac could use the compiler to produce Shortcuts they could import and run using the latest version of Shortcuts.
I had a path forward to accomplish this but not much experience in cloud deployment. Their team took this path forward and delivered a signing server the playground could use that signs Shortcuts.
Their discord, site, courses, etc. provide a lot of support to Shortcut development, and now they've helped this language to be accessible to A LOT more people.
They also wrote up an article about Cherri on their blog! This is huge for the project and I'm so excited to see where this relationship with them can go in the future.
macOS IDE
I made a Cherri IDE for macOS. I was thinking about if a macOS app would work over an iOS app, turns out it was super easy to bundle the compiler with the app and call it from within the Swift code as a resource. This is not meant to replace the playground, as it will always have a purpose for those who only have Apple mobile devices and not a Mac.
It is for people who use macOS as their daily driver. It is a step further to make using Cherri even more accessible. I am hoping to someday release it on the Mac App Store, I think it would be a cool way for people to get into the language in a similar way to an iOS app on its App Store.
What's Next?
- Fixing issues with syntax highlighting in the playground and trying to improve it by adding more helpful features now that it has more interest, throwing some love to Windows, Linux, etc. users.
- Finish refactoring custom actions to work more like functions by allowing users to define arguments and use them in their custom actions. This will also give them scope so you don't need to worry about overwriting outside variables. I still wanna keep the macro style copy-paste way that it works right now but that will likely have a separate keyword or will be reworked, as I think only giving custom actions their own scope if they have defined arguments is confusing.
v0.1.11 Beta
What's Changed
- #23 bugfix: handle cases where a backslash is being escaped by @mikeogezi in #24
- bugfix: populate the (boolean) limit enabled argument when the (integer) limit is set by @mikeogezi in #28
- Other fixes and improvements to various actions.
- General improvements, fixes, refactoring, and reduction of complexity
- CPU and memory usage optimizations
- Removes auto-include
- Reduces memory usage of output Shortcut by adding the 'Nothing' action before an ending statement action.
- Fixed, improved and added more detail to debug output
- Adds type declaration
- Explicit program panics and link to issues page.
- Fixes issues with empty string values
- Refactors type names:
string
->text
,integer
->number
. - Fixes type checking infinite arguments
- Validates app identifiers if not using shorthands
- Inline variable type casting syntax is now the same as type casting a variable reference
- Removes
WatchKit
workflow type - Adds closest matching to
--action
argument - Adds new scripting actions:
sleep()
,displaySleep()
,shutdown()
,reboot()
andlogout()
- Adds
removeBackground()
andtranscribeText()
actions - Implements concept of maximum iOS version for actions
- Renames
showNote()
->openNote()
- Remove
setCellularVoice()
action
and more...
New Contributors
- @mikeogezi made their first contribution in #24
Full Changelog: v0.1.10-beta...v0.1.11-beta
v0.1.10 Beta
What's Changed
- fixes #20 by @erenyenigul in #21 (Thanks! π€).
- Implements more contacts and media actions.
- Performance improvements, reduces complexity and memory usage.
- Refactors, improves and fixes actions.
- Reduced size of Shortcut output.
- Fixes and improves
for
andrepeat
statements. - Implemented
nil
Read more. - Refactors action argument checking. Implements checking infinite arguments
- Implements 'Magic Variables' as constants Read more.
- Adds
--action=
argument for printing action definitions. - Fixes CLI flags parsing.
- Properly formats the outputted property list file with indentation.
- Improves debug output.
- Only attempt to sign Shortcut if compiled on Darwin (macOS kernel).
- Update the default iOS version.
- Improves and fixes expressions.
- Implements
runSelf()
action. - Labels JSON parsing errors.
- Only includes comments in the compiled Shortcut if the
--comments
flag is used. - Fixes issues with nesting statements.
- Updates version of Go and dependencies.
- Adds
robot
glyph. - Adds
\n
,\t
and\r
to string parsing. - Fixes default value for number prompt.
- Stops trimming spaces from parsed strings.
- Name definition is now used to set output filename if no
--output=
argument is given.
New Contributors
- @erenyenigul made their first contribution in #21
External stuff
- VS Code Syntax Highlighting by @erenyenigul (Thanks! π€).
- Playground received some updates and improvements.
- Let's implement nil video where I implement the
nil
value type.
Full Changelog: v0.1.9-beta...v0.1.10-beta
v0.1.9 Beta
Refactor, Optimize, Polish Update
Highlights
- New action: Combine Images
- General refactoring and optimization.
- Reduced the cyclomatic complexity of many functions.
- Fixes and improvements to existing actions: Save File, Crop Image, Ask for Input, List actions, Copy to Clipboard, Output actions and more.
- New warning when the statement is directly after a "stopper" (
output()
,stop()
, etc.) that it is unreachable or does not loop. - Keeps track of usage of references to import questions as they can only be used once, throws an error when they are referenced more than once.
- Improves setting import question usage position.
- Improves determining the "delinquent file" when searching for if an error occurs on an included file.
- Improves and fixes file path logic.
- New colored ASCII art logo.
- New help (
-h
or--help
) flag. Prints usage information. Differs from running with no arguments in that it only prints usage information. - New version (
-v
or--version
) flag. Prints version information. - Improved debug output.
- Fixed import statement parsing.
- Fixed multiline comment parsing.
- Fixed inline variable parsing.
- Added more documentation comments for contributors.
- Added raw actions. Raw actions take an action identifier and an array containing a dictionary containing parameters for the action. It converts the parameters you provide into property list data and changes its own identifier to the identifier you provide. It's like manually entering an action into the resulting Shortcut.
- Added the foundation for a standard library.
- Refactored warnings.
- Arguments can be in any order, detects where the file argument is instead of assuming it will be the first argument.
Notes
We now track the version in the compiler by a variable on a generated file that gets the latest tag which is pretty neat. go generate
is not what I thought it was :P.
I got pretty distracted trying to add arguments to custom actions, so this release is kinda late and doesn't have as much as should match the amount of time since the last release, but still a lot of optimizations and improvements.
Full Changelog: v0.1.8-beta...v0.1.9-beta
v0.1.8 Beta
Highlights
- Tons of optimizations and fixes to compiler and actions
- New media actions
- Better debug output
- Better error reporting for included files
- Fixes to array and dictionary parsing
- Improved Property List generation
- Refactors
menu
case
->item
- First implementation of custom actions
- Auto include option (
--auto-inc
or-a
) to automatically include all Cherri files in the same directory.
Full Changelog: v0.1.7-beta...v0.1.8-beta