Category:Fe: Difference between revisions

From Rosetta Code
Content added Content deleted
(Created page with "{{language|exec=interpreted|checking=dynamic|gc=mark and sweep|site=https://github.com/rxi/fe}} == '''fe''' == A '''tiny''', embeddable language implemented in ANSI C (= reverse (fn (lst) (let res nil) (while lst (= res (cons (car lst) res)) (= lst (cdr lst)) ) res )) (= animals '("cat" "dog" "fox")) (print (reverse animals)) ; => ("fox" "dog" "cat") == Overview == * Supports numbers, symbols, strings, pairs, lambdas, macros * Lexically scoped v...")
 
(reorder first section)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{language|exec=interpreted|checking=dynamic|gc=mark and sweep|site=https://github.com/rxi/fe}}
{{language|exec=interpreted|checking=dynamic|gc=yes|site=https://github.com/rxi/fe}}
fe is a '''tiny''', embeddable language implemented in ANSI C.
== '''fe''' ==
<syntaxhighlight lang="clojure">
A '''tiny''', embeddable language implemented in ANSI C

(= reverse (fn (lst)
(= reverse (fn (lst)
(let res nil)
(let res nil)
Line 15: Line 14:
(print (reverse animals)) ; => ("fox" "dog" "cat")
(print (reverse animals)) ; => ("fox" "dog" "cat")
</syntaxhighlight>

== Overview ==
== Overview ==
* Supports numbers, symbols, strings, pairs, lambdas, macros
* Supports numbers, symbols, strings, pairs, lambdas, macros

Latest revision as of 14:41, 3 April 2024

Language
Fe
This programming language may be used to instruct a computer to perform a task.
Official website
Execution method: Interpreted
Garbage collected: Yes
Type checking: Dynamic
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using Fe.

fe is a tiny, embeddable language implemented in ANSI C.

 (= reverse (fn (lst)
  (let res nil)
  (while lst
    (= res (cons (car lst) res))
    (= lst (cdr lst))
  )
  res
 ))
 
 (= animals '("cat" "dog" "fox"))
 
 (print (reverse animals)) ; => ("fox" "dog" "cat")

Overview

  • Supports numbers, symbols, strings, pairs, lambdas, macros
  • Lexically scoped variables, closures
  • Small memory usage within a fixed-sized memory region — no mallocs
  • Simple mark and sweep garbage collector
  • Easy to use C API
  • Portable ANSI C — works on 32 and 64bit
  • Concise — less than 800 sloc

Documentation

Contributing

The library focuses on being lightweight and minimal; pull requests will likely not be merged. Bug reports and questions are welcome.

License

This library is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE for details.