-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #276 from Morpho-lang/dev
v0.6.1 initial PR
- Loading branch information
Showing
158 changed files
with
4,660 additions
and
609 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: TestMultiThreaded | ||
|
||
on: | ||
push: | ||
branches: [ "main", "dev" ] | ||
pull_request: | ||
branches: [ "main", "dev" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: configure | ||
run: | | ||
sudo apt update | ||
sudo apt install libsuitesparse-dev | ||
sudo apt install liblapacke-dev | ||
sudo apt install libunistring-dev | ||
python -m pip install --upgrade pip | ||
python -m pip install regex colored | ||
- name: make | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake -DCMAKE_BUILD_TYPE=Release .. | ||
sudo make install | ||
sudo mkdir /usr/local/lib/morpho | ||
- name: getcli | ||
run: | | ||
git clone https://github.com/Morpho-lang/morpho-cli.git | ||
cd morpho-cli | ||
mkdir build | ||
cd build | ||
cmake .. | ||
sudo make install | ||
- name: test | ||
run: | | ||
cd test | ||
python3 test.py -c -m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Examples | ||
|
||
on: | ||
push: | ||
branches: [ "main", "dev" ] | ||
pull_request: | ||
branches: [ "main", "dev" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: configure | ||
run: | | ||
sudo apt update | ||
sudo apt install libglfw3-dev | ||
sudo apt install povray | ||
sudo apt install libfreetype6-dev | ||
sudo apt install fonts-freefont-ttf | ||
sudo apt install libsuitesparse-dev | ||
sudo apt install liblapacke-dev | ||
sudo apt install libunistring-dev | ||
python -m pip install --upgrade pip | ||
python -m pip install regex colored | ||
- name: make | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake -DCMAKE_BUILD_TYPE=Release .. | ||
sudo make install | ||
sudo mkdir /usr/local/lib/morpho | ||
- name: getcli | ||
run: | | ||
git clone https://github.com/Morpho-lang/morpho-cli.git | ||
cd morpho-cli | ||
mkdir build | ||
cd build | ||
cmake .. | ||
sudo make install | ||
- name: morphoview | ||
run: | | ||
git clone https://github.com/morpho-lang/morpho-morphoview.git | ||
cd morpho-morphoview | ||
mkdir build | ||
cd build | ||
cmake .. | ||
sudo make install | ||
- name: test | ||
run: | | ||
cd examples | ||
python3 examples.py -c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Call a meta function | ||
|
||
|
||
fn f(Int x) { return x } | ||
|
||
fn f(Float x) { return x } | ||
|
||
fn f(String x) { return x } | ||
|
||
fn g(x) { return x } | ||
|
||
var a = "Hello" | ||
|
||
var n = 10000000 | ||
|
||
var start = System.clock() | ||
for (i in 1..n) { | ||
g(1) | ||
g(2.0) | ||
g(a) | ||
} | ||
var end = System.clock() | ||
|
||
print "Regular function ${end-start}" | ||
|
||
var start = System.clock() | ||
for (i in 1..n) { | ||
f(1) | ||
f(2.0) | ||
f(a) | ||
} | ||
var end = System.clock() | ||
|
||
print "Metafunction ${end-start}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.