Skip to content

Commit c50435c

Browse files
authored
Merge branch 'master' into golang-graham
2 parents 8e9a447 + 8b50c0a commit c50435c

File tree

79 files changed

+2860
-311
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+2860
-311
lines changed

.editorconfig

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ indent_size = 2
8080
indent_style = space
8181
indent_size = 2
8282

83+
# LOLCODE
84+
[*.lol]
85+
indent_style = space
86+
indent_size = 4
87+
8388
# Matlab
8489
[*.m]
8590
indent_style = space
@@ -109,3 +114,31 @@ indent_size = 2
109114
[*.rs]
110115
indent_style = space
111116
indent_size = 4
117+
118+
# Whitespace
119+
[*.ws]
120+
indent_style = space
121+
indent_size = 0
122+
trim_trailing_whitespace = false
123+
insert_final_newline = false
124+
end_of_line = lf
125+
126+
# Emojicode
127+
[*.emojic]
128+
indent_style = space
129+
indent_size = 2
130+
131+
# PHP
132+
[*.php]
133+
indent_style = space
134+
indent_size = 4
135+
136+
# Factor
137+
[*.factor]
138+
intent_style = space
139+
indent_size = 2
140+
141+
#Lua
142+
[*.lua]
143+
indent_style = space
144+
indent_size = 2

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,3 +498,11 @@ __pycache__/
498498

499499
-# Other
500500
-*.xcf
501+
502+
# Cache files for sublime text
503+
*.sublime-workspace
504+
*.sublime-project
505+
506+
# Settings directory for visual studio code
507+
vscode/
508+

.travis.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ language: node_js
55
node_js:
66
- "4"
77

8-
# cache:
9-
# directories:
10-
# - node_modules
11-
128
install:
139
- npm install gitbook-cli -g
1410
- gitbook install
@@ -17,12 +13,14 @@ before_script:
1713
- mkdir -p "${TRAVIS_BUILD_DIR}"/build
1814

1915
script:
20-
- gitbook build . "${TRAVIS_BUILD_DIR}"/build
2116
- env | sort
22-
- |
23-
if [[ "${TRAVIS_BRANCH}" == master && "${TRAVIS_PULL_REQUEST}" == false ]]; then
24-
# Commits to master that are not pull requests, that is, only
25-
# actual addition of code to master, should deploy the book to
26-
# the site.
27-
bash "${TRAVIS_BUILD_DIR}"/tools/deploy/update_site_travis.bash
28-
fi
17+
- gitbook build . "${TRAVIS_BUILD_DIR}"/build
18+
19+
after_success:
20+
- |
21+
if [[ "${TRAVIS_BRANCH}" == master && "${TRAVIS_PULL_REQUEST}" == false ]]; then
22+
# Commits to master that are not pull requests, that is, only
23+
# actual addition of code to master, should deploy the book to
24+
# the site.
25+
bash "${TRAVIS_BUILD_DIR}"/tools/deploy/update_site_travis.bash
26+
fi

CONTRIBUTING.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# Contributing
22

3-
A contribution guide on how to contribute to the Arcane Algorithm Archive (AAA) can be found on this Wiki page:
4-
https://github.com/algorithm-archivists/algorithm-archive/wiki/How-to-Contribute
3+
A contribution guide on how to contribute to the Arcane Algorithm Archive (AAA) can be found on this Wiki page: https://github.com/algorithm-archivists/algorithm-archive/wiki/How-to-Contribute
54

6-
The community member Buttercak3 also created a video series, explaining the contribution process of the AAA.
7-
You can find a playlist with all videos here:
8-
https://www.youtube.com/playlist?list=PL5NSPcN6fRq2vwgdb9noJacF945CeBk8x
5+
The community member Buttercak3 also created a video series, explaining the contribution process of the AAA. You can find a playlist with all videos here: https://www.youtube.com/playlist?list=PL5NSPcN6fRq2vwgdb9noJacF945CeBk8x

CONTRIBUTORS.md

Lines changed: 35 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,67 +2,38 @@ This file lists everyone, who contributed to this repo and wanted to show up her
22

33
# Contributors
44

5-
James Schloss
6-
<br>
7-
Nicole Mazzuca
8-
<br>
9-
Marius Becker
10-
<br>
11-
Gathros
12-
<br>
13-
Jeremie Gillet (- Jie -)
14-
<br>
15-
Salim Khatib
16-
<br>
17-
Hitesh C
18-
<br>
19-
Shaurya
20-
<br>
21-
Maxime Dherbécourt
22-
<br>
23-
Jess 3Jane
24-
<br>
25-
Pen Pal
26-
<br>
27-
Chinmaya Mahesh
28-
<br>
29-
Unlambder
30-
<br>
31-
Kjetil Johannessen
32-
<br>
33-
CDsigma
34-
<br>
35-
Gammison
36-
<br>
37-
hsjoihs
38-
<br>
39-
DominikRafacz
40-
<br>
41-
lulucca12
42-
<br>
43-
GuyPozner
44-
<br>
45-
William Boyles
46-
<br>
47-
Max Weinstein
48-
<br>
49-
Gibus Wearing Brony
50-
<br>
51-
Gorzoid
52-
<br>
53-
Arun Sahadeo
54-
<br>
55-
NIFR91
56-
<br>
57-
Michal Hanajik
58-
<br>
59-
Bendik Samseth
60-
<br>
61-
mukundan314
62-
<br>
63-
Trashtalk
64-
<br>
65-
Cyrus Burt
66-
<br>
67-
Patrik Tesarik
68-
<br>
5+
- James Schloss
6+
- Nicole Mazzuca
7+
- Marius Becker
8+
- Gathros
9+
- Jeremie Gillet (- Jie -)
10+
- Salim Khatib
11+
- Hitesh C
12+
- Shaurya
13+
- Maxime Dherbécourt
14+
- Jess 3Jane
15+
- Pen Pal
16+
- Chinmaya Mahesh
17+
- Unlambder
18+
- Kjetil Johannessen
19+
- CDsigma
20+
- Gammison
21+
- hsjoihs
22+
- DominikRafacz
23+
- lulucca12
24+
- GuyPozner
25+
- William Boyles
26+
- Max Weinstein
27+
- Gibus Wearing Brony
28+
- Gorzoid
29+
- Arun Sahadeo
30+
- NIFR91
31+
- Michal Hanajik
32+
- Bendik Samseth
33+
- mukundan314
34+
- Trashtalk
35+
- Cyrus Burt
36+
- Patrik Tesarik
37+
- Ken Power
38+
- PaddyKe
39+
- nic-hartley

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2017 James Schloss et. al
1+
Copyright 2018 James Schloss et. al
22

33
Permission is hereby granted, free of charge, to any person
44
obtaining a copy of this software and associated documentation

book.json

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"maxIndexSize": 1000000000
1616
},
1717
"pluginsConfig": {
18-
"mathjax":{
18+
"mathjax": {
1919
"version": "2.6.1"
2020
},
2121
"include-codeblock": {
@@ -136,9 +136,33 @@
136136
"lang": "nim",
137137
"name": "Nim"
138138
},
139+
{
140+
"lang": "asm-x64",
141+
"name": "X86-64 Assembly"
142+
},
139143
{
140144
"lang": "f90",
141145
"name": "Fortran90"
146+
},
147+
{
148+
"lang": "factor",
149+
"name": "Factor"
150+
},
151+
{
152+
"lang": "ws",
153+
"name": "Whitespace"
154+
},
155+
{
156+
"lang": "scala",
157+
"name": "Scala"
158+
},
159+
{
160+
"lang": "emojic",
161+
"name": "Emojicode"
162+
},
163+
{
164+
"lang": "lolcode",
165+
"name": "LOLCODE"
142166
}
143167
]
144168
}

contents/bitlogic/res/not.jpg

-5.02 KB
Loading

contents/bogo_sort/bogo_sort.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ In code, it looks something like this:
3131
[import:17-20, lang:"haskell"](code/haskell/bogoSort.hs)
3232
{% sample lang="m" %}
3333
[import:21-28, lang:"matlab"](code/matlab/bogosort.m)
34+
{% sample lang="lua" %}
35+
[import:1-22, lang="lua"](code/lua/bogosort.lua)
3436
{% sample lang="cpp" %}
3537
[import:33-38, lang:"c_cpp"](code/c++/bogosort.cpp)
3638
{% sample lang="rs" %}
@@ -43,6 +45,14 @@ In code, it looks something like this:
4345
[import:16-18, lang:"nim"](code/nim/bogo_sort.nim)
4446
{% sample lang="ruby" %}
4547
[import:12-16, lang:"ruby"](code/ruby/bogo.rb)
48+
{% sample lang="emojic" %}
49+
[import:2-6, lang:"emojicode"](code/emojicode/bogo_sort.emojic)
50+
{% sample lang="factor" %}
51+
[import:10-12, lang:"factor"](code/factor/bogo_sort.factor)
52+
{% sample lang="f90" %}
53+
[import:24-32, lang:"fortran"](code/fortran/bogo.f90)
54+
{% sample lang="st" %}
55+
[import:2-6, lang:"st"](code/smalltalk/bogosort.st)
4656
{% endmethod %}
4757

4858
That's it.
@@ -73,6 +83,8 @@ We are done here!
7383
[import, lang:"haskell"](code/haskell/bogoSort.hs)
7484
{% sample lang="m" %}
7585
[import, lang:"matlab"](code/matlab/bogosort.m)
86+
{% sample lang="lua" %}
87+
[import, lang="lua"](code/lua/bogosort.lua)
7688
{% sample lang="cpp" %}
7789
[import, lang:"c_cpp"](code/c++/bogosort.cpp)
7890
{% sample lang="rs" %}
@@ -85,6 +97,14 @@ We are done here!
8597
[import, lang:"nim"](code/nim/bogo_sort.nim)
8698
{% sample lang="ruby" %}
8799
[import, lang:"ruby"](code/ruby/bogo.rb)
100+
{% sample lang="emojic" %}
101+
[import, lang:"emojicode"](code/emojicode/bogo_sort.emojic)
102+
{% sample lang="factor" %}
103+
[import, lang:"factor"](code/factor/bogo_sort.factor)
104+
{% sample lang="f90" %}
105+
[import, lang:"fortran"](code/fortran/bogo.f90)
106+
{% sample lang="st" %}
107+
[import, lang:"st"](code/smalltalk/bogosort.st)
88108
{% endmethod %}
89109

90110

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
🐇 🥇 🍇
2+
🐇 ❗️ 🔀 numbers 🍨🐚💯🍆 🍇
3+
🔁 ❎ 📶🐇🥇 numbers❗️❗️ 🍇
4+
🐹 numbers❗️
5+
🍉
6+
🍉
7+
8+
🐇 ❗️ 📶 numbers 🍨🐚💯🍆 ➡️ 👌 🍇
9+
🔂 i 🆕⏩⏩️ 1 🐔 numbers❗️❗️ 🍇
10+
↪️ 🐽 numbers i ➖ 1❗️ ▶️ 🐽 numbers i❗️ 🍇
11+
↩️ 👎
12+
🍉
13+
🍉
14+
↩️ 👍
15+
🍉
16+
🍉
17+
18+
🏁 🍇
19+
🍨 1.7 -3.0 2.5 2.0 7.0 1.5 -4.3 0.3 🍆 ➡️ numbers
20+
21+
😀 🔤unordered:🔤❗️
22+
🔂 number numbers 🍇
23+
😀 🔡 number 10❗️❗️
24+
🍉
25+
26+
🔀🐇🥇 numbers❗️
27+
28+
😀 🔤ordered:🔤❗️
29+
🔂 number numbers 🍇
30+
😀 🔡 number 10❗️❗️
31+
🍉
32+
🍉
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
! There's no built-in "is sorted" function, so let's make one:
2+
USING: locals ;
3+
: sorted? ( seq -- ? )
4+
2 clump ! split it up into overlapping pairs
5+
! so now, for example, { 1 2 3 } has turned into { { 1 2 } { 2 3 } }
6+
! and now we make sure that for every pair, the latter is >= the former
7+
[| pair | pair first pair last <= ] all?
8+
;
9+
10+
USING: random ;
11+
: bogosort ( seq -- seq' )
12+
! `dup` duplicates the array, because `sorted?` pops its reference to it
13+
! randomize works in-place
14+
! so we `randomize` `until` it's `sorted?`
15+
[ dup sorted? ] [ randomize ] until
16+
;
17+
18+
! WARNING: Increasing this number beyond 5 or so will make this take a very long time.
19+
! That said, if you have an afternoon to kill...
20+
5 <iota> >array randomize ! generate a random array to demo
21+
dup . ! show the array
22+
bogosort ! bogosort it
23+
. ! show it again
24+
25+

0 commit comments

Comments
 (0)