Lang-by-example
Lang-by-example
I will store basic examples from the cool languages I find. it's something like learnXinYminutes, but the list of examples are the same for every lang.
I prefer less well-known languages.
If you want to add your language, feel free to do PR ^^
Basic
- create and run project with cli if possible
- type declaration person
- tagged union declaration if possible
- hello world
- creating type instance
- call function
- change instance field
- create function for type
- loop
- if
- switch/pm (on tagged union if possible)
- some collections
Ready "basics" langs
From ML to imperative or smth :) ML
- Gleam - BEAM VM, ML-like lang with HM type system, focus on simplicity site
- Rescript - ML with C-like syntax transpiles to JS, sould type system. site
- Grain - Wasm nativ ML-like lang site
- F# - ML by M$ site
ML/Imperative
- Rust - System lang with ML like type system and borrow checker. site
- Niva - Typed Smalltalk where I replaced OOP with tagged unions. JVM interopable. Errors as effects, nullability. site
Effects
Imperative
- Nim - Transpiles to C, C++, JS, simply best native lang, Lisp's macros, but static typed. site
- [Nelua] - Lua with types and powerful macro system. site
Lisp
OOP
In progress
Effects
- Unison - Smalltalk + Haskell, Image based, native distributed programming, algebraic effects site
- Roc - Elm like lang but works on backend, fast compilation, effects in type system site
OOP
Real OOP
- Smalltalk - Father of high-level languages, everything we have now was invented by these people Pharo Cuis Squeak
Imperative
- Go - simple, scalable systems, fast compilation, native, no function coloring site
- Teal - typed dialect of Lua https://github.com/teal-language/tl (site)[https://github.com/teal-language/tl]
Lisp Fennel - lua, but lisp with macros site
Simple HTTP server
PRs are welcome
Ready langs
- Kotlin
- Gleam
- Clojure
???
Some other simple project idea... maybe json\ini parser
Repository
Lang-by-example
Owner
Statistic
- 7
- 0
- 5
- 0
- 0
- 19 days ago
- November 10, 2021
License
Links
Synced at
Fri, 21 Feb 2025 01:05:36 GMT
Languages