Vintage Computing Christmas Challenge 2024 - TIC80 fennel submission
Author: zombieprozess
Category: Christmas Challenge
System: TIC-80
Language: fennel
Len source code: 217 bytes
Len tic file: 287 bytes
Len code only: 197 bytes
Instructions:
start up tic-80, drag the .tic file into the tic80 window,
then type RUN.
Description:
This challenge is a fun thing to do in a functional programming language
like lisp. I'm using fennel, which is lisp that compiles to lua.
The pattern is created via string concatenation.
Two functions are defined. The function A repeats the given string 'a'
eight times.
A is for Acht, german for '8'. The function V concatenates two given
strings 'a' and 'b' into a pattern 'ababa'.
V is for "Variieren" or "vary".
Code:
;; script: fennel
(var e "\n")
(fn A [a] (.. a a a a a a a a))
(fn V [a b] (.. a b a b a))
(cls)
(print (.. (A " ") "\\O/" e (V (.. (V "+" (A "-")) e)
(A (.. (V "!" (A " ")) e)))) 1 1 12 true)
(fn _G.TIC [])
Comments:
See <https://fennel-lang.org> if you like to learn more about fennel.
Happy holidays. :)