Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/efoxepstein/stupid-machines
Experimentations with Abstract Machines
https://github.com/efoxepstein/stupid-machines
Last synced: 24 days ago
JSON representation
Experimentations with Abstract Machines
- Host: GitHub
- URL: https://github.com/efoxepstein/stupid-machines
- Owner: efoxepstein
- Created: 2010-06-08T07:18:44.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2022-12-04T19:20:09.000Z (over 1 year ago)
- Last Synced: 2024-02-18T16:31:31.017Z (4 months ago)
- Language: HTML
- Homepage:
- Size: 47.9 KB
- Stars: 297
- Watchers: 11
- Forks: 19
- Open Issues: 2
-
Metadata Files:
- Readme: README.markdown
Lists
- awesome-stars - efoxepstein/stupid-machines - Experimentations with Abstract Machines (HTML)
- awesome-stars - efoxepstein/stupid-machines - Experimentations with Abstract Machines (HTML)
- awesome-stars - stupid-machines
- awesome-starred - efoxepstein/stupid-machines - Experimentations with Abstract Machines (others)
README
# ⚙️ Stupid Machines🦾
### Is bunch of useless implementations of our favorite abstract machines, including Turing machines, the Rule 110 cellular automata, and cyclic tag systems.
# Live demo:
# [Github pages](https://efoxepstein.github.io/stupid-machines/rule110/)
[Raw file](./rule110/)
## rule110
Implements rule 110 in HTML and CSS3. This is a more correct "proof" that CSS is Turing-complete.## rule110-old/
Implements rule 110 in HTML and CSS3. This was the first "proof" that CSS is Turing-complete. It is not a valid proof.* `rule110-a.html` is a very simple demo of an individual cell
* `rule110-grid.html` and `rule110-full.html` are two different presentations of the cellular automaton.
## TuringMachineWithNoSemicolons.java
Implements a Turing machine in Java without using a single semicolon in the file. Languages like Ruby and Python don't use semicolons, so why should my Java?
```java
while(!args[1].equals(args[4]) && !args[1].equals(args[5])){
if((args[1] + args[0].charAt(Integer.parseInt(args[2]))).equals(args[3].substring(0,2))){// Write
if(( args[0] = args[0].substring(0, Integer.parseInt(args[2])) +
args[3].charAt(3) +
args[0].substring(Integer.parseInt(args[2])+1, args[0].length())
) == ""){}if(args[3].charAt(2) == 'L'){
if(( args[2] = (Integer.parseInt(args[2])-1) + "" ) != ""){}
}else{
if(( args[2] = (Integer.parseInt(args[2])+1) + "" ) != ""){}
}// Update current state
if(( args[1] = args[3].charAt(4) + "" ) != ""){}}else{
// Cycle transition table
if((args[3] = args[3].substring(5, args[3].length()) + args[3].substring(0,5)) != ""){}
}
}
if(args[1].equals(args[4])){
if(System.out.printf("REJECT: " + args[0]) == null){}
}else if(System.out.printf("ACCEPT: " + args[0]) == null){}```
## TuringMachineWithNoSyntax.java
Implements a Turing machine in Java without using control structures, variable declarations, method definitions, or anonymous classes. The `main2` method shows the code before I removed variables. Control structures are too controlling for this day and age. Us youth yearn for the unstructured hippie days of our parents' generations.## short\_cyclic\_tag\_system.rb
```ruby
a='11001';%w[010 000 1111].cycle{|x|(p a)>'09'&&a<