Skip to content

JIK STEM navigation

Build · trade · test · learn

A social marketplace for software projects.

Find software, services, subscriptions, and specialists; evaluate deliveries, claim source, and learn in the Python-powered Lisp lab.

A little Jik, one idea at a time

Read the code. Follow the idea.

The falling code is a small language tour. Choose an example, explore its result, then try it in Lisp Lab.

native-scope.jik
(define (+ a b) 999)
[(+ 20 22) (#+ 20 22)]
Expected result[999 42]
01 / 10

Reach the native function

An ordinary name can be shadowed. A leading # looks in the native scope first, so #+ still adds these numbers.

In this runtime, #name falls back to the global scope when no native exists; it skips lexical bindings. The # is a lookup qualifier, not part of the symbol's name.

Try in Lisp Lab
basic-values.jik
[#nil #f #t 42 3.5
 "hello" .name 'answer]
Expected result[() #f #t 42 3.5d "hello" .name answer]
02 / 10

Meet the basic values

Nil, booleans, integers, decimals, strings, keywords and quoted symbols are values you can place in a vector.

The bundled printer writes nil as () and adds d to decimal output. A quote keeps answer as a symbol instead of looking up a binding.

Try in Lisp Lab
collections.jik
['(1 2 3) '(1 : 2)
 [1 2 3] {.answer: 42}]
Expected result[(1 2 3) (1 : 2) [1 2 3] {.answer 42}]
03 / 10

Give your data a shape

A quoted list, an improper pair, a vector and a hashmap each preserve a different shape. The colon separates a pair's head from its tail.

A leading dot makes .answer a keyword. The hashmap printer omits the optional colon between a key and its value.

Try in Lisp Lab
lambda.jik
((lambda [x] (#* x x))
 (#+ 2 3))
Expected result25
04 / 10

Evaluate, then call

A lambda receives evaluated arguments. Here addition produces 5 before the function squares x.

The parameter vector [x] names one argument. #([x] (#* x x)) is the compact form of this lambda.

Try in Lisp Lab
closure.jik
(define make-adder
  (lambda [n] (lambda [x] (#+ n x))))
(define add-five (funcall make-adder 5))
(funcall add-five 37)
Expected result42
05 / 10

Remember a lexical binding

The inner lambda captures n. The returned function still remembers 5 after make-adder has returned.

These functions are stored as values. funcall invokes them explicitly in Jik's separate value and function namespaces.

Try in Lisp Lab
rest-arguments.jik
((lambda [first : rest] [first rest])
 10 20 30)
Expected result[10 [20 30]]
06 / 10

Collect the remaining arguments

A parameter after : receives all remaining arguments. first gets 10, while rest collects 20 and 30.

This website's runtime represents rest arguments as a vector. An empty rest sequence is [].

Try in Lisp Lab
vau-raw.jik
((vau E [form] form)
 (#+ 20 22))
Expected result(#+ 20 22)
07 / 10

Receive the expression itself

A vau receives raw operands instead of evaluated values. Returning form gives us the addition expression, without running it.

E is the caller's environment. #[E [form] form] is the compact form of this operative.

Try in Lisp Lab
vau-eval.jik
((lambda [x]
   ((vau E [form] (eval E form))
    (#+ x 2)))
 40)
Expected result42
08 / 10

Choose when to evaluate

The operative explicitly evaluates its operand in the caller's environment E, where x is bound to 40.

In this runtime, eval takes the environment first, then the expression. An operative controls which operands it evaluates.

Try in Lisp Lab
macro.jik
(define-macro unless
  (vau E [test : body]
    `(if ~test #nil (begin ~@body))))
(unless #f (#+ 20 22))
Expected result42
09 / 10

Build a new expression

unless builds an if expression from raw operands. Backquote supplies the template; ~ inserts the test and ~@ splices the body forms.

The returned expression is evaluated at the call site. This example introduces no temporary bindings; it does not claim automatic macro hygiene.

Try in Lisp Lab
range-map.jik
(map (lambda [n] (#* n n))
     (range 1 5))
Expected result[1 4 9 16]
10 / 10

Transform a range

range includes its start and excludes its end. map applies the lambda to each element, producing the first four positive squares.

(range 5) starts at zero; (range 0) produces [].

Try in Lisp Lab

Marketplace

Available projects

View all
Requested solutionUnsolved

Continuation Course Workbench

An unsolved, community-preordered project request for visual continuation tracing and exercises.

JIK / Fusion Lisp

JIK language and register VM 315+

by Miroslav Bezděk0.01 EUR

Network

People to know

View all

Miroslav Bezděk

JIK language designer and register-VM knowledge provider

JIK language, compiler, VM, and assessed curriculum author.

◉ English · ◉ Čeština
✎ English · ✎ Čeština

Available2 projects

Repository

Knowledge patterns

View all
Growth Free

aegwenia/jik/native-global-lookup

Symbols, namespaces, and # lookup

Keep # outside symbol identity; resolve #name native first and then global, with @ selecting the function namespace.

Unavailable Unlock 0
Initiate0/525
Growth Free

aegwenia/jik/reader-literals

Reader and literal values

Read nil, booleans, integers, decimals, strings, characters, bytes, keywords, symbols, lists, vectors, and maps. Bare t/f are Boolean fallbacks only when ordinary bindings do not shadow them; #t/#f are explicit literals.

Unavailable Unlock 0
Initiate0/525
Frontier Free

aegwenia/jik/definitions-bindings

Definitions and mutable bindings

Create value cells, update an existing cell, and distinguish declaration from definition.

Unavailable Unlock 15
Initiate0/525
Frontier Free

aegwenia/jik/lexical-binding

let, let*, letrec, and named let

Choose parallel, sequential, recursive, or loop-shaped lexical binding without exposing host state.

Unavailable Unlock 30
Initiate0/525
Frontier Free

aegwenia/jik/conditions-logic

Conditions and short-circuit logic

Branch and compose predicates while preserving the value of the selected form.

Unavailable Unlock 45
Initiate0/525
Frontier Free

aegwenia/jik/functions-lambda

Functions, parameters, and rest views

Create closures with fixed/rest parameters; parameters are lexical cells and rest arguments are bounded views.

Unavailable Unlock 60
Initiate0/525