rename and start work
This commit is contained in:
parent
ce64bd92cd
commit
4ff4ef826e
|
@ -0,0 +1,4 @@
|
|||
(undo-tree-save-format-version . 1)
|
||||
"adadb67a9875aeeac285309f1eab6e47d9ee08a7"
|
||||
[nil current nil nil (26037 22927 367937 279000) 0 nil]
|
||||
nil
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
43
README.md
43
README.md
|
@ -1,37 +1,28 @@
|
|||
# *Iglishmêk* Programming Language
|
||||
# *ghun* Programming Language
|
||||
|
||||
## What is *Iglishmêk*?
|
||||
## What is *ghun*?
|
||||
|
||||
*Iglishmêk* is the hand gesture language used by the dwarves in Tolkien's Legendarium
|
||||
*ghun* is an esoteric programming language that is trying way too hard to be a serious programming language.
|
||||
|
||||
## Ok sure, but what is the *Iglishmêk* programming language?
|
||||
'ghun' (pronounced like "hu-oon" with the hu being in the back of the throat like in 'chutzpa') is a verb in Klingon which means "program", in the context of "to program a computer".
|
||||
|
||||
*Iglishmêk* is an esoteric programming language that is trying really hard to be a serious programming language.
|
||||
It is inspired by both [esoteric programming languages](https://esolangs.org/wiki/Esoteric_programming_language), like [var'aq](https://web.archive.org/web/20091026213516/http://geocities.com/connorbd/varaq/), [uiua](https://www.uiua.org/), and [ZOMBIE](https://web.archive.org/web/20201125123312/https://www.dangermouse.net/esoteric/zombie.html) and serious programming languages like C, Perl, Common Lisp, Lua, Rust, Go, Odin, Zig, Elixir, and Haskell.
|
||||
|
||||
It is inspired by both serious programming languages like C, C#, Lisp, Lua, Rust, Go, Odin, Zig, Elixir, and Haskell; but also [esoteric programming languages](https://esolangs.org/wiki/Esoteric_programming_language), like [var'aq](https://web.archive.org/web/20091026213516/http://geocities.com/connorbd/varaq/) and [ZOMBIE](https://web.archive.org/web/20201125123312/https://www.dangermouse.net/esoteric/zombie.html).
|
||||
## What are the features in *ghun*?
|
||||
|
||||
## What are the features in *Iglishmêk*?
|
||||
|
||||
In general the paradigms are designed to be: Esoteric, C-like, Functional, Distributed, Concurrent, JIT
|
||||
|
||||
Most especially I wanted it to be written in C which is the lingua universalis of most hardware, architectures, operating systems, and so on. So that if anyone for any reason, even if it is for a joke, port Iglishmêk to any known system that has a C compiler for it without *too* much trouble.
|
||||
In general the paradigms are designed to be: var'aq-like, Interpreted, JIT, Distributed, Concurrent
|
||||
|
||||
See the [SPECIFICATION](./SPECIFICATION.MD) document for more info.
|
||||
|
||||
## What is the purpose of this language?
|
||||
|
||||
Its a pretty common question for people in computer science and programming related fields "what is your favorite programming language", and for me it has changed a lot over the years. I got to the point where I would say I don't really have one. I like elements of a lot of languages and don't like other elements from those same languages.
|
||||
|
||||
There are a lot of languages that have good functionality and implement good ideas, but also many bad things that creep in during the process of development.
|
||||
Examples of this could be through lack of resources, backwards compatibility, trading off one feature for another, and many others.
|
||||
|
||||
For the most part though, most modern languages are pretty much the same syntactically, they just differ for their paradigms and use case. This makes them a super dry and not very fun to program in.
|
||||
|
||||
Conversely we have esolangs which are fun, but usually useless (e.g. turing tarpits) or not implemented in a way that you are able to seriously program projects in it.
|
||||
|
||||
Most serious languages do not take the time to think outside the box, or add elements to make the language look good or be fun to program in.
|
||||
|
||||
There are of course some exceptions to this. Python has dynamic whitespace, which although I dislike personally, has a great esthetic and makes the code look cleaner. Or like in Odin you can use emoji as variables.
|
||||
There are of course some exceptions to this. like in Odin you can use emoji as variables, but that is uncommon.
|
||||
|
||||
All of the others were esoteric languages or languages designed to be used for games (e.g. golfing languages, video game specific languages such as TIS100, and the like).
|
||||
|
||||
|
@ -43,18 +34,12 @@ As far as my personal goals go they are:
|
|||
3. Combine these ideas into a language that would be both fun and able to be used for real projects; probably more along the lines of scripting, or small scale programs, but real projects nonetheless
|
||||
4. Take all the things I liked from some languages and throw them together to see what happens
|
||||
|
||||
|
||||
The language goals are:
|
||||
1. maximize code logic density, i.e. a small amount of code should represent a complex amount of logic
|
||||
2. portability/embedability, i.e. should be easy to port/embed into new hardware and implement with software
|
||||
3.
|
||||
1. make the language fun to program in.
|
||||
2. make it simple to learn (the english interpreter at least)
|
||||
3. maximize code logic density, i.e. a small amount of code should represent a complex amount of logic
|
||||
4. portability/embedability, i.e. should be easy to port/embed into new hardware and implement with software. I wanted it to be very Lua This is why I went with a Interpreted-JIT style over compiled.
|
||||
5. follow the design from var'aq, but in a more "c to zig" kind of way than a "c to c++" kind of way.
|
||||
|
||||
The idea is using an iterative process, that being as I find new programming projects to do; the language will inevitably fail to be able to handle that project and so I will have to add new functionality to *Iglishmêk* to handle it.
|
||||
The idea is using an iterative process, that being as I find new programming projects to do; the language will inevitably fail to be able to handle that project and so I will have to add new functionality to *ghun* to handle it.
|
||||
|
||||
I should say that I would not expect *Iglishmêk* to do much, but it will do something
|
||||
|
||||
## Thanks
|
||||
|
||||
[Crafting Interpreters](http://www.craftinginterpreters.com/) Inspiration for
|
||||
|
||||
Compilers Principles, Techniques, & Tools (The Dragon Book)
|
||||
|
|
107
SPECIFICATION.MD
107
SPECIFICATION.MD
|
@ -1,4 +1,4 @@
|
|||
# *Iglishmêk* Design parameters
|
||||
# *ghun* Design parameters
|
||||
|
||||
## Modern programming languages in the 21st century usually have need for the following requirements
|
||||
|
||||
|
@ -130,8 +130,14 @@
|
|||
- read
|
||||
- update
|
||||
- delete
|
||||
|
||||
|
||||
# *ghun* at a high level.
|
||||
|
||||
# *Iglishmêk* Grammar and Specification
|
||||
ghun should be thought of as more of a virtual machine more than a programming language.
|
||||
|
||||
|
||||
# *ghun* Grammar and Specification
|
||||
|
||||
## Form
|
||||
|
||||
|
@ -216,24 +222,24 @@ strings are always utf8, other formats will need to be done manually
|
|||
|
||||
`true` / `false`
|
||||
|
||||
Also follows the style boolean 'c' rules of nonzero / zero, but the compiler will make fun of you
|
||||
Also follows the style boolean 'c' rules of nonzero / zero, but the interpreter will make fun of you
|
||||
|
||||
## null values
|
||||
|
||||
### *iglishmek* does not have null, it stole some monads from Rust and Haskell, they never saw it coming
|
||||
### *ghun* does not have null, it stole some monads from Rust and Haskell, they never saw it coming
|
||||
|
||||
If you are coming from haskell, a 'Just' is `< some value >` and a 'None' is `<>`, note 'None' is also an error
|
||||
|
||||
Like in Rust you have `unwrap` and `unwrap_or` and the like, you use `?` and `??`
|
||||
|
||||
```
|
||||
a : <3>
|
||||
b : <>
|
||||
<3> ~ a set
|
||||
<> ~ b set
|
||||
|
||||
x : a?
|
||||
y : b ?? 1
|
||||
~ x a ? set
|
||||
~ y b 1 ?? set
|
||||
|
||||
stdout.write("%d%d\n", x, y) ! outputs 3, 1
|
||||
"%d%d\n" (x y) fmt print ! outputs 3, 1
|
||||
```
|
||||
|
||||
additionally, a None will be evaluated as "false" and Just as "true" in a boolean check
|
||||
|
@ -259,11 +265,7 @@ error is a form which describes an error that occurred, it is similar to the Go
|
|||
syntax
|
||||
|
||||
```
|
||||
let «atom_token» as «form»[]
|
||||
|
||||
!or
|
||||
|
||||
«atom_token» : [val1, val2, ...]
|
||||
(item1 item2 ...)
|
||||
```
|
||||
|
||||
### set
|
||||
|
@ -274,10 +276,6 @@ n is the starting size of the set
|
|||
|
||||
```
|
||||
let «atom_token» as «form»{}
|
||||
|
||||
!or
|
||||
|
||||
«atom_token» : {val1, val2, ...}
|
||||
```
|
||||
|
||||
sets also have the following transforms associated with them
|
||||
|
@ -287,27 +285,9 @@ sets also have the following transforms associated with them
|
|||
a simple form to form storage
|
||||
|
||||
```
|
||||
let «atom_token» as «form» ~> «form»
|
||||
|
||||
!or
|
||||
|
||||
«atom_token» : { "v1":1, "v2":2, ...}
|
||||
«form» «form» map «atom_token» set
|
||||
```
|
||||
|
||||
### sorted map
|
||||
|
||||
same as map except they shall be sorted by the key
|
||||
|
||||
```
|
||||
let «atom_token» as «form» -> «form»
|
||||
|
||||
! or
|
||||
|
||||
«atom_token» : { "v1":1, "v2":2, ...} as «form» -> «form»
|
||||
```
|
||||
|
||||
note that sorted map has to be coerced
|
||||
|
||||
### tunnel
|
||||
|
||||
described in "tunnel" section
|
||||
|
@ -409,30 +389,25 @@ expander
|
|||
|
||||
### keywords
|
||||
|
||||
`is`
|
||||
`is?`
|
||||
|
||||
checks if a atom is of that form
|
||||
checks if a atom is of that form, replacement for number? / null? and makes it more flexable
|
||||
```
|
||||
«token» is i32
|
||||
i32 «token» is?
|
||||
```
|
||||
|
||||
`as`
|
||||
`threaten (buQ)`
|
||||
|
||||
coerces a form as another form if possible
|
||||
```
|
||||
let «token» as i32
|
||||
```
|
||||
|
||||
also useful for setting the form for values which could be ambiguous
|
||||
```
|
||||
«token» : 0 as u32
|
||||
~ «token» i32 threaten set
|
||||
```
|
||||
|
||||
`impls`
|
||||
|
||||
checks if a atom's form, or a form impls another form
|
||||
```
|
||||
«token» impls Tunnel
|
||||
«token» Tunnel implements
|
||||
```
|
||||
|
||||
|
||||
|
@ -572,36 +547,6 @@ panic(-3 as err)
|
|||
panic(«some_error_token»)
|
||||
```
|
||||
|
||||
## Localization
|
||||
|
||||
will look up the text of «token» in the linked .igkz file
|
||||
|
||||
```
|
||||
&«token»
|
||||
```
|
||||
|
||||
.igkz files are json like:
|
||||
|
||||
```
|
||||
{
|
||||
some_token {
|
||||
localization_1 {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
some_other_token {
|
||||
localization_1 {
|
||||
|
||||
}
|
||||
|
||||
localization_2 {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Libraries and “includes”
|
||||
|
||||
In most languages the include or use statements get libraries which link to other files and so on. This quickly gets confusing and so requires package managers and installers, etc.
|
||||
|
@ -626,10 +571,10 @@ in kOS this actually *is* the kernel layer
|
|||
## GUI
|
||||
|
||||
The GUI is inspired by PicoLisp and Electron, using a web browser engine to render the GUI including 3D stuff like webgl.
|
||||
Most html elements have an analogous form in *Iglishmêk*: Tables, lists, links, buttons, input boxes, etc.
|
||||
Most html elements have an analogous form in *ghun*: Tables, lists, links, buttons, input boxes, etc.
|
||||
In kOS these are replaces by its own version of these forms.
|
||||
|
||||
These of course can be wrapped in your own implementations. The idea is that on *Iglishmêks* side all UI is unified by forms but also is interoperable with HTML, templating engines, or gui libraries
|
||||
These of course can be wrapped in your own implementations. The idea is that on *ghuns* side all UI is unified by forms but also is interoperable with HTML, templating engines, or gui libraries
|
||||
|
||||
```
|
||||
ui Table impl HTML {
|
||||
|
@ -652,7 +597,7 @@ ui TableColumn impl HTML {
|
|||
|
||||
As in elixir there are as many schedulers as there are cores for your cpu
|
||||
Like in CM and real time micro architecture systems like QNX tasks are scheduled based on priority and must stay within a time limit or it will be “punished” into a lower priority
|
||||
Threading in *Iglishmêk* are split up into tasks (which take input) and daemons (which take no input)
|
||||
Threading in *ghun* are split up into tasks (which take input) and daemons (which take no input)
|
||||
Tasks are spawned whereas daemons are summoned
|
||||
Message passing can be achieved by using tunnels.
|
||||
|
||||
|
|
Loading…
Reference in New Issue