• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

A categorical programming language


Commit MetaInfo

修订版2b132b67f2e94b2187dcdf9faee0984d78489843 (tree)
时间2022-06-14 12:35:41
作者Corbin <cds@corb...>
CommiterCorbin

Log Message

Make sifting slightly more useful.

更改概述

差异

--- a/cammy-rpy/sift.py
+++ b/cammy-rpy/sift.py
@@ -34,6 +34,9 @@ def doSift(hivepath, number):
3434 # Build the popular list.
3535 popular = []
3636 for expr, count in counter.iteritems():
37+ # Skip atoms into the hive.
38+ if isinstance(expr, Atom):
39+ continue
3740 popular.append((count, expr))
3841 SortPopular(popular).sort()
3942 popular.reverse()
--- a/hive/f/0.7.cammy
+++ b/hive/f/0.7.cammy
@@ -1 +1,3 @@
1-(comp (pair (comp (comp (pair (comp zero (comp succ succ)) (comp (comp (comp (comp (comp zero succ) succ) succ) succ) succ)) (uncurry (pr (curry (comp snd id)) (curry (comp (uncurry id) succ))))) (comp (pr nil (comp (fold (pair t nil) (comp (comp (pair (pair fst sndfst) sndsnd) (pair (comp fst (comp (pair (comp (pair disj (comp conj not)) conj) conj) (pair snd fst))) snd)) (comp (pair fstfst (pair fstsnd snd)) (pair fst (comp snd cons))))) (uncurry (comp either (case (curry (comp snd (comp (pair (comp ignore t) id) cons))) (curry (comp snd id))))))) (comp (comp (pair id (comp ignore nil)) (uncurry (fold (curry (comp snd id)) (curry (comp (pair fstsnd (comp (pair fstfst snd) cons)) (uncurry id)))))) (fold f-zero (comp (pair fst (comp snd (comp (pair id (comp ignore (comp (pair f-one f-one) f-add))) f-mul))) (uncurry (comp either (case (curry (comp snd (comp (pair id (comp ignore f-one)) f-add))) (curry (comp snd id)))))))))) (comp (comp (comp (comp (comp (comp (comp zero succ) succ) succ) succ) succ) (comp (pair id id) (uncurry (pr (curry (comp snd id)) (curry (comp (uncurry id) succ)))))) (comp (pr nil (comp (fold (pair t nil) (comp (comp (pair (pair fst sndfst) sndsnd) (pair (comp fst (comp (pair (comp (pair disj (comp conj not)) conj) conj) (pair snd fst))) snd)) (comp (pair fstfst (pair fstsnd snd)) (pair fst (comp snd cons))))) (uncurry (comp either (case (curry (comp snd (comp (pair (comp ignore t) id) cons))) (curry (comp snd id))))))) (comp (comp (pair id (comp ignore nil)) (uncurry (fold (curry (comp snd id)) (curry (comp (pair fstsnd (comp (pair fstfst snd) cons)) (uncurry id)))))) (fold f-zero (comp (pair fst (comp snd (comp (pair id (comp ignore (comp (pair f-one f-one) f-add))) f-mul))) (uncurry (comp either (case (curry (comp snd (comp (pair id (comp ignore f-one)) f-add))) (curry (comp snd id))))))))))) (comp (pair fst (comp snd f-recip)) f-mul))
\ No newline at end of file
1+(comp
2+ (pair (comp nat/7 nat/to-f) (comp nat/10 nat/to-f))
3+ f/div)
--- a/hive/nat/7.cammy
+++ b/hive/nat/7.cammy
@@ -1 +1 @@
1-(comp (pair (comp zero (comp succ succ)) (comp (comp (comp (comp (comp zero succ) succ) succ) succ) succ)) (uncurry (pr (curry (comp snd id)) (curry (comp (uncurry id) succ)))))
\ No newline at end of file
1+(comp (pair nat/2 nat/5) nat/add)
--- a/hive/weekend/sky.cammy
+++ b/hive/weekend/sky.cammy
@@ -1 +1,3 @@
1-(pair (comp ignore (comp (comp (pair f-one f-one) f-add) f-recip)) (pair (comp ignore (comp (pair (comp (comp (pair (comp zero (comp succ succ)) (comp (comp (comp (comp (comp zero succ) succ) succ) succ) succ)) (uncurry (pr (curry (comp snd id)) (curry (comp (uncurry id) succ))))) (comp (pr nil (comp (fold (pair t nil) (comp (comp (pair (pair fst sndfst) sndsnd) (pair (comp fst (comp (pair (comp (pair disj (comp conj not)) conj) conj) (pair snd fst))) snd)) (comp (pair fstfst (pair fstsnd snd)) (pair fst (comp snd cons))))) (uncurry (comp either (case (curry (comp snd (comp (pair (comp ignore t) id) cons))) (curry (comp snd id))))))) (comp (comp (pair id (comp ignore nil)) (uncurry (fold (curry (comp snd id)) (curry (comp (pair fstsnd (comp (pair fstfst snd) cons)) (uncurry id)))))) (fold f-zero (comp (pair fst (comp snd (comp (pair id (comp ignore (comp (pair f-one f-one) f-add))) f-mul))) (uncurry (comp either (case (curry (comp snd (comp (pair id (comp ignore f-one)) f-add))) (curry (comp snd id)))))))))) (comp (comp (comp (comp (comp (comp (comp zero succ) succ) succ) succ) succ) (comp (pair id id) (uncurry (pr (curry (comp snd id)) (curry (comp (uncurry id) succ)))))) (comp (pr nil (comp (fold (pair t nil) (comp (comp (pair (pair fst sndfst) sndsnd) (pair (comp fst (comp (pair (comp (pair disj (comp conj not)) conj) conj) (pair snd fst))) snd)) (comp (pair fstfst (pair fstsnd snd)) (pair fst (comp snd cons))))) (uncurry (comp either (case (curry (comp snd (comp (pair (comp ignore t) id) cons))) (curry (comp snd id))))))) (comp (comp (pair id (comp ignore nil)) (uncurry (fold (curry (comp snd id)) (curry (comp (pair fstsnd (comp (pair fstfst snd) cons)) (uncurry id)))))) (fold f-zero (comp (pair fst (comp snd (comp (pair id (comp ignore (comp (pair f-one f-one) f-add))) f-mul))) (uncurry (comp either (case (curry (comp snd (comp (pair id (comp ignore f-one)) f-add))) (curry (comp snd id))))))))))) (comp (pair fst (comp snd f-recip)) f-mul))) (comp ignore f-one)))
\ No newline at end of file
1+(pair
2+ (comp ignore f/half)
3+ (pair (comp ignore f/0.7) (comp ignore f-one)))