Decker 1.44


Decker 1.44 is a maintenance release with a variety of useful new scripting features and performance enhancements.

Fixes (Native):

  • The "%e" parse format was not correctly incorporating months when calculating unix epochs.
  • Decker was always reporting decks as having "unsaved changes" as an unintentional consequence of volatiles, which is now corrected.

Fixes (Web):

  • In certain circumstances, web-decker could crash after saving a binary file with "write[]".

New Features:

  • The Image Interface now provides a ".pixels" attribute, which makes it possible to do efficient bulk reads or writes of all the pixels in an image.
  • The Prototype Interface now provides read-only ".font" and ".show" attributes, which will always return Decker's "body" font and the string "solid", respectively. These additions make the behavior of prototypes being "previewed" in the prototype editor more consistent with the behavior of corresponding Contraption instances on a card.
  • The new "app.render[]" function can be used to request a "screenshot" of a specified card or widget, in the same manner that using "Edit -> Copy Image" of a widget works manually. Previously it was possible to do something similar for cards by (ab)using custom transition functions. The main limitation to be aware of for this technique is that "app.render[]" is not available for Lilt, so it cannot be used to "headlessly" render images of Decks.
  • The "write[]" built-in function in Decker can now be given a second optional argument which is used to provide a "hint" for the appropriate file extension when saving a binary file. This addition makes saving fancy binary files significantly more user-friendly.
  • Lil's @ operator, with a left argument which is a string, list, or dictionary, and a right argument which is a list, is tremendously faster than it was previously. In the general case you can think of "@" as desugaring into an "each" loop and consuming many opcode "ticks", but when the arguments have appropriate types this special behavior will kick in, allowing for efficient indexing into lookup tables in a vector-oriented fashion.
  • Lil now provides syntax for declaring variadic functions. Decker's standard library already provided a number of functions which behaved this way: for example, "rtext.cat[]" or "bits.xor[]". This addition now permits user code to perform the same kinds of tricks.


Many of the above features are showcased in a new example deck, "pdf.deck", which provides a module for constructing and saving Adobe Portable Document Format (PDF) files. If you make Zines with Decker, you might find this useful for exporting printable versions of your decks. With a little extra scripting you could even have print-specific easter eggs!


In case you haven't seen it yet, be advised that this July we'll be holding another exciting installment of Decker Fantasy Camp. Tell your friends!

Files

Decker-1.44-mac.zip 2.3 MB
Jun 07, 2024
Decker-1.44-win.zip 2 MB
Jun 07, 2024
lilt-1.44.zip 440 kB
Jun 07, 2024

Get Decker

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

(+1)

thank you! making a patch to update the openbsd port. excited for the pdf module!

I'll be very interested to see how you make use of the module! This seemed like a much simpler and more flexible approach than trying to build printer support directly into Decker itself.