More std migration #1475
No reviewers
Labels
No labels
UX
active development
backlog
blocker
bootstrap
bounty
bug
dependencies
discussion
documentation
duplicate
enhancement
flaky test
help wanted
invalid
javascript
question
release
tendentious
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mighty-gerbils/gerbil!1475
Loading…
Reference in a new issue
No description provided.
Delete branch "v0.19-std"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Definite progress, but some porting notes:
For iterators, implement Iterable in the objects, we don't need the in-blah constructs any more, just pass the object directly.
For ports in std/struct, for consistency we need to camelize names.
For all ports, make sure we have signatures.
@ -0,0 +5,4 @@(import :std/error:std/text/pregexp:std/encoding/hex(only-in :std/crypto/digest md5)i think it is not guaranteed to exist, let's remove it.
I don't think we should use a hash at all, the old uuid from name and hash is not a good idea, let's just remove it and only leave random uuid.
we can also add deterministic uuid from counter (there is a spec for that), but probably follow up.
@ -0,0 +112,4 @@(def (deque->list (dq : deque))=> :list(let lp ((n dq.back :- node) (r [] :- :list))we need to camelize the name of the struct.
@ -0,0 +178,4 @@(defstruct lru-cache-iterator (cursor (value :- :procedure))final: #t)(implement Iterator lru-cache-iteratorwe should also implement Iterable for the LRU. Let's also camelize names.
@ -0,0 +2,4 @@;;; (C) vyzo at hackzen.org;;; heap based priority queues(import :std/error)(export pqueue make-pqueue pqueue? pqueue-empty? pqueue-sizecamelcase
@ -0,0 +9,4 @@:std/interface:std/iter/interface:std/iter/iterators)(export rbtree rbtree? make-rbtreecamlize names.
@ -0,0 +180,4 @@(def rbtree-iter-key-e (lambda (k v) k))(def rbtree-iter-val-e (lambda (k v) v))(def (in-rbtree (rbt : rbtree))just make it iterable, no need for the in-blah's any more.
@ -0,0 +165,4 @@(defstruct rbtree-iterator (stack (value :- :procedure))final: #t)(implement Iterator rbtree-iteratorimplement Iterable as well.
@ -0,0 +36,4 @@(set! next.prev new)new)))(defstruct Deque ((front :- Node)let's make it iterable too
@ -0,0 +11,4 @@;; the module is statically type checked anyway.(declare (not safe))(defstruct PQueue ((e : :vector)let's make it iterable too
@ -0,0 +29,4 @@RBTree-cmp);; rbtree structure(defstruct RBTree (root (cmp :- :procedure))let's implement HashTable on rbtrees.
Addressed issues, pushed changes. Please review again.
@ -0,0 +13,4 @@push-back! pop-back! peek-backdeque->listDequeForwardIterator DequeForwardIterator?DequeReverseIterator DequeReverseIterator?maybe Front and Back?
@ -0,0 +157,4 @@(lambda (self)(Iterator (make-DequeForwardIterator self.front)))))(def (deque-reverse-iter (dq : Deque))in this case let's use the in- convention.
WIP More std migrationto More std migrationView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.