scene.org File Archive

File download

<root>­/­parties­/­2024­/­vccc24­/­christmas_challenge/zombieprozess_tic-80_fennel_197b_vc3-2024.zip

File size:
41 385 bytes (40.42K)
File date:
2024-12-29 14:13:04
Download count:
all-time: 0

Preview

  • vccc24/ dir
  • vccc24/code.png 43.86K
  • vccc24/file_id.diz 1.08K
  • vccc24/result.png 13.13K
  • vccc24/vccc24.fnl 216B
  • vccc24/vccc24.tic 287B

file_id.diz

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. :)