-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deforest All the Things #179
Conversation
52e6923
to
ca711e5
Compare
FYI: I'm rebasing this branch to |
9c4bff6
to
2bf25de
Compare
Deforest all variants of cad*r: - car - cadr - caddr - cadddr - caddddr - cadddddr Deforest (using the same underlying implementation) list-ref as well.
- split syntax matching from syntax production - improve naming of syntax classes - remove unused template variables
- preliminary splitting of the compiler into separate modules for separate passes - update tests to reflect new paths
- rename compiler "passes" subdirectory to "compiler" - strip the passes modules file name pass- prefix
…s fixes and tests for them.
…ntax and do not provide them.
- scribblings for qi/list module - scribble the new literals for matching in deforestation pass - ensure for-label bindings in the generated documentation - new bindings.rkt module
…ler meeting on 2024-06-21. - add detailed explanation for inline-consing syntax - use Racket's conventions for parentheses - add description of fsp-, fst-, and fsc- prefixes - move define-and-register-deforest-pass and related to separate module, add comments
Hey all, @spdegabrielle suggested having a release party on Jan 17 to make an event out of it and give people time to plan to attend. We could discuss things like future plans and projects (continuations? generalized deforestation? category theory? experimenting with different backends? language experiments???), the possible (super fun!) optimization-themed community event (in summer '25?), and anything else. That would also give us more time to do some of these "polish" items (i.e. mostly benchmarks and charts!) and add the finishing touches to the amazing work we've done over the last year. What do we think about this possibility? If that sounds good to you, let me know if you'd like to be there but Jan 17 does not work for you, and we can pick another day. If we're comfortable moving forward with the merge without the above items, we could still do that tomorrow and then continue on the main branch as we prepare for the release event. Lmk, or, if you'll be joining tomorrow, then talk to you then :) |
It still shows `macro-debugger`, `cover` and `cover-coveralls` as unused. There doesn't seem to be a good way around this for the moment. (done in today's meeting)
Dominik and I addressed a few outstanding issues today and we also reviewed others and decided they are nontrivial - best to do after the release. I've updated the PR description and created/commented on relevant issues. And sounds like we're on for the release party on Jan 17! I will send out an email soon. |
Excellent! For the todos, anything that gets deferred will hopefully still get tracked ;) |
Favor left threading, and note a commonly-encountered error in this connection.
8672a23
to
1753277
Compare
This satisfies the basic requirements for a public domain dedication as discussed in, e.g., https://cr.yp.to/publicdomain.html. Use of a COPYING file is a convention advocated by GNU and the FSF, and is recognized by most tools. Closes #8
@@ -28,6 +28,21 @@ | |||
;;;; Core language forms ;;;; | |||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |||
|
|||
;; A note regarding symbolic aliases like ~>, ⏚ and △: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least, git log -S <alias> upstream/deforest-all-the-things
finds that commit for both AND and OR; for NOT, I haven't managed to find the removal yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, guess they've been gone quite a while 😬 Actually, they might have slipped out as early as the addition of Syntax Spec (was that 3.0?), as it's quite possible we just neglected to add the aliases to the provide
form in the expander at the time. Prior to that, just having the datum matching of the symbolic variants in the original flow
macro was sufficient for them to be part of the "core"/flat language. While the rules of that original macro carried over to qi0->racket
, the ground truth for the core language switched to being the syntax spec in the expander, and it just might have slipped through the cracks then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That explains why the "pair with MB" commit came up a few times in my search. I definitely wasted too much time looking though: I probably should have tried git bisect
.
Summary of Changes
Further deforestation of list operations within Qi (integration branch).
This introduces a
qi/list
collection that includes functional list operations resembling the ones inracket/list
, but which exhibit Qi syntax even in higher order positions, and are deforested (i.e. they avoid building intermediate collections on the way to constructing the result).There is already basic deforestation on the main branch as of Qi 4. This PR improves the architecture of deforestation so that it is:
racket/list
as a representative goal)racket/list
is deforested, that will give us an idea of what the core operations really are which can express all of the others, and what a good interface to these core operations would look like that could be exposed to users for deforesting custom list operations.As we continue on this work, it will hopefully also give us some idea of whether and how deforestation could be extended to datatypes more general than lists (for instance, vectors and even Qi's core values).
Remaining Work
WIP
zip
(nice-to-have) (zip
core form #190 ) [Sid/Ben]Won't Do
take
-- should we also havedrop
? [this is not trivial]qi/list
additions [benchmarks take time to run, and these would not show anything the existing benchmarks don't already show]list-ref
length
empty?
filter-map
datum->syntax
inreport-syntax-error
should pass asrcloc
for better error reporting #172 ) [not trivial]Done
(wasn't tracked here from the beginning)
take
, taking fractions of the input size instead of a constant number [Dominik]See commits and meeting notes since Jan 2024.
After release:
Public Domain Dedication
(Why: The freely released, copyright-free work in this repository represents an investment in a better way of doing things called attribution-based economics. Attribution-based economics is based on the simple idea that we gain more by giving more, not by holding on to things that, truly, we could only create because we, in our turn, received from others. As it turns out, an economic system based on attribution -- where those who give more are more empowered -- is significantly more efficient than capitalism while also being stable and fair (unlike capitalism, on both counts), giving it transformative power to elevate the human condition and address the problems that face us today along with a host of others that have been intractable since the beginning. You can help make this a reality by releasing your work in the same way -- freely into the public domain in the simple hope of providing value. Learn more about attribution-based economics at drym.org, tell your friends, do your part.)