-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some flailing towards starting a physics section
- Loading branch information
Showing
10 changed files
with
136 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env node | ||
|
||
const cos = require('./cosmic'); | ||
|
||
cos.intro("."); | ||
|
||
cos.add(`define dotify:1 | ? pre | ? act | ? rem | | ||
if (= 0 | list-length $rem) (append $act $pre) | | ||
assign next (head $rem) | | ||
if (not | = . $next) (dotify:1 (append $act $pre) $next (tail $rem)) | | ||
dotify:1 $pre (vector $act | head | tail $rem) (tail | tail $rem)`); | ||
|
||
cos.add(`define dotify | ? lst | | ||
dotify:1 (vector) (head $lst) (tail $lst)`); | ||
|
||
cos.add(`list= (dotify | vector 1 2 . 3 4) (vector 1 (vector 2 3) 4)`); | ||
cos.add(`list= (dotify | vector 1 2 . 3 . 4 5) (vector 1 (vector (vector 2 3) 4) 5)`); | ||
|
||
cos.add(`define translate | assign prev $translate | ? x | | ||
if (not | function? $x) (prev $x) | | ||
if (<= (list-length $x) 1) (prev $x) | | ||
prev | dotify $x`); | ||
|
||
cos.add(`= + . 5 . 5 10`); | ||
cos.add(`= + . (- + . 4 . 4 3) . 5 * . 5 . 2`); |
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,13 @@ | ||
#!/usr/bin/env node | ||
|
||
const cos = require('./cosmic'); | ||
|
||
cos.intro("proton:electron:mass:ratio"); | ||
cos.intro("proton:mass"); | ||
cos.intro("neutron:mass"); | ||
cos.intro("electron:mass"); | ||
|
||
cos.add("define float:= | ? x | ? y | within (frac (+ $x $y) 200000) $x $y"); | ||
cos.add("float:= $proton:mass | * $electron:mass | decimal 1836 | vector 1 5 2 6 7 3"); | ||
cos.add("float:= $electron:mass | * $proton:mass | decimal 0 | vector 0 0 0 5 4 4 6 1 7"); | ||
cos.add("float:= $neutron:mass | * $proton:mass | decimal 1 | vector 0 0 1 3 7 8 4 2"); |
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,2 @@ | ||
# PHYSICS introduce the elements | ||
|
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,47 @@ | ||
|
||
# set(req_COS_Intro COS_License) | ||
set(req_COS_AndLogic COS_TrueFalse) | ||
set(req_COS_OrLogic COS_TrueFalse) | ||
set(req_COS_ListPre COS_Cons COS_TrueFalse) | ||
set(req_COS_Map COS_ListPre) | ||
set(req_COS_Series COS_Map COS_OrLogic COS_If) | ||
set(req_COS_Translate COS_ListPre) | ||
set(req_COS_List COS_ListPre COS_Translate COS_OrLogic) | ||
set(req_COS_Dot COS_List) | ||
set(req_COS_Element COS_List COS_Series) | ||
set(req_COS_Let COS_List) | ||
set(req_COS_MultipleParameter COS_Let) | ||
set(req_COS_Implication COS_TrueFalse) | ||
set(req_COS_Set COS_List COS_Implication) | ||
set(req_COS_Graph COS_MultipleParameter) | ||
set(req_COS_Begin COS_Let COS_Mutable) | ||
set(req_COS_Hash COS_MultipleParameter) | ||
set(req_COS_MutableStructure COS_List COS_Let COS_Map) | ||
set(req_COS_Turing COS_MultipleParameter COS_Hash) | ||
set(req_COS_Quote COS_List COS_Map) | ||
set(req_COS_NewType COS_MultipleParameter COS_Set COS_Quote COS_Begin) | ||
set(req_COS_Unless COS_TrueFalse COS_Hash COS_Begin COS_Map COS_Series) | ||
set(req_COS_NOT COS_Unless) | ||
set(req_COS_AND COS_Unless) | ||
set(req_COS_OR COS_Unless) | ||
set(req_COS_NOR COS_Unless) | ||
set(req_COS_OSC COS_Unless) | ||
set(req_COS_SR COS_Unless) | ||
set(req_COS_D COS_Unless) | ||
set(req_COS_UnlessProbe COS_NOT COS_AND) | ||
set(req_COS_Message COS_Intro COS_List COS_Quote) | ||
set(req_COS_JavaPrep COS_NewType COS_Series COS_Hash) | ||
set(req_COS_JavaTest COS_JavaPrep) | ||
set(req_COS_JavaValidate COS_JavaTest) | ||
set(req_COS_Geo COS_NewType COS_Hash) | ||
set(req_COS_JList_impl COS_JavaPrep) | ||
set(req_COS_JList_test COS_JList_impl) | ||
set(req_COS_JListIterator_impl COS_JList_impl) | ||
set(req_COS_JDoor COS_JavaPrep) | ||
set(req_COS_JThing COS_JavaPrep) | ||
set(req_COS_JRoom COS_JavaPrep) | ||
set(req_COS_JNamed COS_JavaPrep) | ||
set(req_COS_JWorld COS_JavaPrep) | ||
set(req_COS_JRobo COS_JavaPrep) | ||
set(req_COS_JRoom_test COS_JRoom COS_JWorld COS_JDoor COS_JRobo COS_JThing COS_JNamed | ||
COS_JList_impl COS_JListIterator_impl) |
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