vaguery / klapaucius Goto Github PK
View Code? Open in Web Editor NEWA clean, tested, maintainable Push interpreter written in Clojure.
License: MIT License
A clean, tested, maintainable Push interpreter written in Clojure.
License: MIT License
"crop" integer and floats to fall in ranges indicated, if needed
:visible
, :equatable
, :comparable
and :movable
(so far) should all have a simplified test generator so that
:arithmetic
) doesn't entail a bunch of rewritescaught exception: running [:input!5 "ɂࠧࢱ෯तऽေʄൈॊɂՅຸ௯" :input!6 :exec-shove 227.53125 \য false :input!2 376.59765625 :input!1 "ୁሥಭϠ఼ӵԺЀॲୋ" \ເ 161.8203125 :code-flush 437774903 (:char-asciifromfloat 906725359 :code-frominteger :boolean-fromintsign :input!3) 432777899 ("ჺȢӵᅕ˘ಘ" :string-butlast :char-notequal? :exec-if :string-rest) false \ǟ true true \ൌ 28.890625 39120521 348.55859375 \Џ :exec-do*while 171.90234375 "ۦعԱॊଝ჻നಏ႗୰ቢŤآૌ։ྠಋऔႄ࿘" 269.17578125 229.546875 \ᄰ 167310909 318.85546875 :char≥? :code-extract 98692151 149.57421875 :float-signfromboolean (:integer≥? :char-stackdepth :code-fromstring \༽ \༵) "ِ¼ऺशያ۩ڊ̳კ" (20.79296875 "༪" :string-frominteger \ଏ "शᇦʏ൮ڦ྾౷ɫሱ") \ߊ (95.546875 true :integer-pop "ଛຊᄰ࣒ߛরЛႈشᆋǺ" :integer-add) "ăೆрڤಛࢀĩઙၻگն̵టݶͅœ" :code-null? :input!3 807854196 :string-rotate 360101471 :string-length :exec-equal? true 790255528 :float-mod \Ⴆ 978305640 :exec-pop "£֥ᆏ[ۓགڴࢠཡᅣٕჽżສ" 138.1875 \Ƥ :float<? :float-min 758649457 :boolean-fromfloat \Ţ (\ඇ "જභӟטሺ" :char-stackdepth 766258870 :exec-if) 236.9296875 \ท (284.3125 :boolean-yank "ࣟࣞ໎ຜ፡ྙᇃාඅໄࡵዤƧୱԦ˭Ĉ" :code-rest :exec-do*times) :float-sine (69.90234375 :input!2 374.6328125 467134722 :input!2) "ጕࢳࢣ" \N (false :exec-yank :input!1 :string-conjchar :float-min) 594721168 19.78515625 \¸ :code-shove 35.11328125 :code-nth :code-empty? :exec-shove :boolean-flush :string-spacey? 51.0859375 ((:exec-stackdepth \ओ "ମֻೲ" "ɯۭཌ·ڋધް࿐ӱ੫ܙĞ၁Ȭ" 206.94140625) :string-flush :string-equal? :boolean-pop (\ť :exec-shove 277.9453125 :input!7 \)) :input!4 "" :input!1 390246587 :char-stackdepth (70449447 952079143 95.5 911032565 311.10546875) (false true \֠ 191808789 :char-shove) true :exec-do*range :char-fromfloat 376185039 false :code-nth ("้ᄁംԣȐإƢཤ๚ጫ܋ݿᇼงު" \ȃ true (:integer-divide \ພ 190.359375 \ԇ "ӅԖ�ϥ") \ཫ) :code-append 290170817 :code-equal? true :string-yankdup \Ⴀ 335645019 \ሜ :char-swap 344526517 :input!9 :input!1 :exec-noop :input!4 227.0703125 470848185 239634830 (true :code-do*times "ဝᆉწગኲፃ" :string-rest "ቚ") false true :char>? "ЬႳࡹ�ขᄈˉታЃસࡴճᇂฑ" 68.59765625 "�ɢԱ༴༎දЫϗ�ਰƃ௮ု" 245759382 true (:float-inc false :input!8 648724135 \) :code-do*range :char≤? :integer-max :float-max :code-append " «࢙ሺ࿈༒Ŭ" :code-quote \ౖ (290.3046875 \ཉ \ \સ 193.12109375) 730738353 :integer<? \ት "යཙ೬ᅬv۪ԥࡏ" :integer-rotate :string-frominteger 290240915 true :float-mod 228.8046875 "ဠֵչߴৄᄍ" 102.04296875 59.31640625 :input!7 :exec-noop :char-rotate \ኖ (565625813 \Ñ 313.015625 :float-sine 675941974) :string-length :integer-yank false false :exec-do*while "აܰډբ͌৫" :string-swap :input!7 :char>? :float-yank 231131887 :string<? (:exec-noop "գഅॎ" :boolean-pop 405922212 "ྐྵؙ፴ՈදØ̼խ") \è :float-notequal? "ჱၲĨᇥźğճಪĹ՞ᇧࢠŧՑݞ" :char-pop :integer-rotate 325.75 false \ဒ \ࡕ 74813081 224306963 (:string≤? \അ :input!9 :exec-y :integer-mod) :char-swap :input!1 :float-min "ָӾ༠ŗňཏࣧ×ডဇྲࠝͦ࠭Ƹ" 499412617 :boolean-or :string-substring (47.8984375 181.59765625 :input!4 false (496570233 \͛ :input!6 "๘ΞֳĖ�ݓɃݛܣझٹįைࠜ߁ڈጦ" true)) :string-replace 970924689 "̄ʃ˃ºݧሏ˩ƫႭؐڙ͔,ൌ" :float-subtract :input!7 85.8515625 \ڣ :string-reverse false \ᅗ true]
{:input!1 613158253, :input!2 "ໃࢪਥчዺԅဃ΅ɐ", :input!3 318.41015625, :input!4 :char≤?, :input!5 false, :input!6 :code-empty?, :input!7 257.8515625, :input!8 :exec-noop, :input!9 :integer-dup}
something about the concatenation of stacks on themselves, and the exponential growth
At the moment, it will replace chunks of vectors and maps and sets
like PushSwift's:
:x-fromstack
:x-fromexample
:x-build
Various combinatorial manipulations of collections, suitable for :code
, :vector
, :set
etc.
:foo-nth-partition
:foo-nth-permutation
:foo-next-permutation
:foo-nth-combination
:x-unique
:x-sort
:x-filter
takes two vectors of the same type, and removes all elements that appear in the first from the second:x-toset
:x-crossover
toggle to
:x-flip
reverse entire stack:x-cut
takes an integer, and splits the stack at that point, putting the top chunk below the other (cut like a deck of cards):x-flipat
takes an integer, splits the stack at that point, and reverses the top part"parent" type for :float
and :integer
(and :complex
and :rational
and :probability
)
I am unclear what the environment
stack is for and how it is used. It is core to the interpreter logic, having something to do with filling up the exec stack.
I think it would make sense to document the purpose of this stack and how it should be used.
construct an interpreter template clojush-like-interpreter
stress-testing throws some exceptions with some rare programs
:x-generalizeall
for types with "default" parent types: push all items to the parent stack:x-generalize
move item to :vector
from :vector-of-x
stack:x-refilterall
, for "parent" types: send all items through the router, in FIFO order:x-refilter
, send item to :exec
stack for re-routingTakes next item (including a block) from :exec
stack; determines its total needs; duplicates those items on all stacks where they appear. If there are not enough items to execute the item, it does nothing.
even worse than :exec-y
, but why not?
caught exception: Divide by zero running [(false true :string-yankdup (:code-do* false \ຼ 141.09375 :code-container) \ᅿ) 937308226 198.98046875 :code-notequal? 390945425 (322912683 738097505 (:string-flush :input!8 385.88671875 "߬ȣ྄ᆃ̂ᇌ" true) (\൝ \ဿ :code-extract 360.55078125 193932531) "ഈ̇ݾ൭ࡳഞ͕ТȊӢĚŎݻಇ") :code-contains? :code-position 122.52734375 :input!5 :input!8 (:char-dup false "βֿЙѫৄ൝ޞ" (715829625 "ԕܓݜָሽݮસ࿁ྕቮྦྷܬඛസࡾ" :integer-dup :code-yankdup :code-fromstring) \ͺ) 251.8515625 \ :input!3 (:float-multiply :code-drop "ӂ" :char-asciifromfloat :float-frominteger) 721023207 false 165780866 :char-frominteger :string-replace 32.3671875 :string>? :string-pop :code-atom? 217.69921875 :input!3 39.98828125 272189115 152.23046875 :input!6 "ӥࢽ࿚ਞב̪ሇӟ༣౨ཡ෧" :input!6 :integer<? false \ଉ :string-fromfloat 152.12109375 :string-fromboolean (:char≤? :boolean-shove :input!5 :input!8 \ֈ) :integer-dec :float-sign "ᅉᆔ্ְ͕ၯྱᇺՔؠ̆ӭዿ̒" (true :code-pop \ȹ \ໟ :char-rotate) ("ํ࢟෫ച�࣬༊യӓۖᎂЭେป¯ڤሪ" \ :integer-yank true :integer-dup) 310.65234375 116.62890625 :code-fromstring :code-list :integer-signfromboolean 242.39453125 (false \ࡠ (400373230 :float-sign false :string-replacefirstchar :integer-max) \ᄵ :input!7) 121.0234375 278682809 :char-rotate :integer-equal? \ǔ 309507057 :integer-sign 48275635 211.96484375 :char-digit? "܌ጰѕܷझऔ" 124.83984375 true 152055567 (766582246 4.4453125 263401824 :input!1 :input!3) :string-removechar (:boolean-and "Иೠʳ" "ఀዦٲᇦૈ˯ڙႱݼᄛভΔጊ" 45948478 false) "єଗΠዯĺˑ۵ɘƥൂ࿁ߵ်Ѥཾࠋ" :input!4 \υ false 96.6484375 \ך :string-occurrencesofchar true :string<? :input!7 377.00390625 :char-pop "ፑίຯᄁӴ±ථໍwႡᅴ" 14.25390625 133.96484375 878542857 :exec-dup :exec-yank 184093571 329.0078125 :code-null? :string-yank :char-asciifromfloat true :input!7 :string-swap :code-size :integer-add :float-tangent "ʯ༫ãŃ΄औн 145.2421875 "ߘ'ᅺȮ߱ݠఊ0щϬӴսϊଏᇫଳྐྵ" "ୟʌܦƄমঀ̕ۄۛݫ" :input!7 :code-fromfloat :float≤? :float>? 78572480 \̽ 475661973 :char-dup :integer-yank :string-setchar :input!8 :code-yank :char-empty? 375739856 "ƨጢŧࡁཙࡗܨü" :integer-fromstring (((:code-append 15770516 :string-removechar :input!5 \ϴ) \ਜ਼ \྾ :input!7 (:exec-pop :code-position \ཿ :string-contains? 260.078125)) "ထ" :input!1 \য true) :boolean-frominteger 310.875 (315332747 false false true :input!8) :string-dup "წޜ܊ׇ܆ǿጊࢾޙƛ͆ᄺไѻѢ" \ऴ 463950386 \ວ :string-emptystring? "9ՙຎ" \հ :float-min \͏ :input!2 (:integer-add :float-fromstring :string-equal? 512396593 :boolean-not) :input!7 (203.703125 (100.70703125 :float-subtract :string-containschar? 527665859 (619079498 264.15234375 :code-drop (:char-yankdup 213482732 :input!5 :float-fromchar \ᄔ) :string-fromfloat)) "נႮ͂ࢿઢᇎ" 381.84765625 :input!4) :char-yank 837264188 "rৠȵū෯־ຌႶੱӲ" true "ɓҢ߶͢ƥზžԊӷᄌثؒފӿ" \ኩ 799193448 false :boolean-and 132525320 :input!5 :code-subst 192.234375 (:char-frominteger \ࢁ :input!2 692218546 \ඉ) "፬؋Ǫ" (20.37890625 :float>? 140644129 ("ߛ·" :input!2 :integer-dec :input!2 :char-asciifrominteger) :code-contains?) :input!5 \ս :char-shove \ு :code-extract 152856636 295.90234375 (((:string-take :input!4 "ᇷ�֛݊ܞΎჀؠਗӶǽྩ܅ᇭ" \թ \) 805524966 :integer-yank "܄ᄜዑືضܶƛѢȉȵේQ࿎ߺ" 61.69921875) \ྼ :code-notequal? :code-nth :char-min) 372402485 true :input!1 "႔কāҁጧႝႬҷ࡞" (262.71484375 "ኵऒÄ͏ÐᅦɃɤণٿೀ" (:input!2 357.73046875 :input!4 \ɻ \ǁ) "ᎁڼቾ" 185.01953125) (:code-points :input!1 :code-position \ :exec-while) \ִ true (\ҽ (\ط :integer-notequal? (\๒ 742093497 false :boolean-rotate 127.8203125) :char≥? 131926277) 128.62890625 true (:boolean-yankdup "ุਆࣚࡿ" "ࠏ࣭Ɯೲᇯ" false :code-yank)) (:char-dup 376810668 false :input!8 "ႲǪધޠഠʔඌ௭႗Ⴗ൮ဠ") false "҈ղᄷࣷ࿀ӣࣝಪଁİྏ" 616553636 \ܦ :integer-dup 9.14453125 false true "ࣸบಡවҨዶЧˋ็˓ʃˣ" :float-flush \Ͱ "Ⴄഩ໒ѭ֕ഊႏ̷ஒӱႬ" :string-butlast true \٥ 333.765625 268638496 :code-pop :float-inc :integer-mod 293.68359375 :input!4 \ѥ :float-fromstring :input!8 728358484 \བ 32.23046875 "Ⴅ±દࡨǯෟᇼ഼ࡉລѬࢎ&ཚɍǗߞò" :input!5]
{:input!1 \Қ, :input!2 "́जٍ", :input!3 :exec-when, :input!4 :exec-if, :input!5 :code-rest, :input!6 199.03515625, :input!7 ((98.296875 :integer<? :code-rotate) :integer-fromchar :string-take "̽ܮࡁࠬۆುѠ̘҉ટձਢ"), :input!8 :exec-notequal?}
develop a general-purpose scheme for various types, so the random instructions can be developed as an aspect
Currently the :instructions
argument overwrites the instruction list present in the template if set. It should act as :extra-instructions
merged into the template's defaults.
Some are redundant, surely
executing :code-first
with a :push-circle
on the :code
stack results in the keyword :origin
Use the DSL to parse :code
blocks
per @thelmuth
It automatically gives it a :code-fromX
instruction.
Noticed when writing demos with @NicMcPhee today.
(throws a Push routing error)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.