|
6macros: discussing the finer points of Perl 6 macros, Qtrees, and how to stay sane | irclog: irclog.perlgeek.de/6macros/today Set by moderator on 28 July 2015. |
|||
|
07:38
pdcawley joined
13:13
Ven_ joined
|
|||
| Ven_ | o/ | 13:13 | |
| masak | I love to be able to answer questions about 007 using 007 itself :) github.com/masak/007/issues/147#is...-225615657 | 15:27 | |
| that's a healthy form of dogfooding, IMO | |||
| ven: thanks for all the feedback in the issues today | |||
|
18:23
FROGGS joined,
vendethiel joined
19:13
cognominal joined
|
|||
| cognominal | A proposal about slangs. This is not macros. But I want feedback before submitting to a wider audience. gist.github.com/cognominal/d181082...af6d51a42d vendethiel masak ? | 19:37 | |
| vendethiel | i'll read that :) | ||
| FROGGS | one problem: <~my-slang.a-rule> would not capture | 19:39 | |
| the rule is: if there is a non-alpha char at the beginning, dont capture | |||
| cognominal | So that would be an exception | 19:41 | |
| FROGGS | and $~MAIN = (Perl6::Grammar, Perl6::Actions) is just too much magic for me I think | ||
| cognominal | yea, I don't mind dropping that one :) | 19:43 | |
| just a convenience | |||
| Also I forgot the dollar in many place | 19:44 | ||
| <$~slang.rule> | |||
| or to avoid the exception about capture, that should be <slang.capture> | 19:50 | ||
| I don't think this conflict with existing syntax | |||
| oops, I meant <slang.rule> | 19:51 | ||
| masak reads | 19:56 | ||
| cognominal | I am updating within 1 minute | 19:57 | |
| updated | 19:58 | ||
| masak | cognominal: s/utili<e/utilize/ | ||
| or even something avoiding the word "utilize", like "make use of", or "use" :P | 19:59 | ||
| oh, you found that typo already | |||
| cognominal: looks good. | |||
| interestingly, I keep thinking of slangs, but I feel my thoughts wander largely orthogonally to yours | 20:00 | ||
| (which is good, I think) | |||
| cognominal | nice | ||
| masak | cognominal: by the way, did you notice our recent 007 self-hosting effort? | ||
| it's terribly exciting :> | |||
| cognominal | One motivation is that am designing different slangs with the same grammar. | 20:02 | |
| yea, I will watch that | 20:03 | ||
| masak | cognominal: let me try to explain where I'm coming from with slangs | ||
| I see many things already defined in Perl 6 as being slangs | |||
| regexes | |||
| qq strings | |||
| object literals | |||
| basically, any time you're switching "parsing mode", you're switching slangs | |||
| heck, the expression parser could be seen as a slang | 20:04 | ||
| from my point of view, a good/rich slang is one that allows bi-directional communication with its host language | 20:05 | ||
| one diretion typically being simply returning values out to the host language | |||
| and the other direction typically being a form of interpolation | |||
| by pulling that off well, the slang manages to be "transparent", and largely symbiotic with the host | 20:06 | ||
| cognominal | yea literals. not necessarily objects, should definitvely exposed as slangs. One may want integer syntax without the whole of HLL::Grammar. | ||
| so protoregex are often just a degenerated slang | |||
| masak | in a sense, Perl 6 is a successful conglomeration of small slangs | 20:07 | |
| vendethiel | JSX! | 20:08 | |
| cognominal | but the compositionality is not sufficiently apparent | ||
| masak | getting the composability right is the holy grail, yes | 20:09 | |
| and it's a sliding scale too, in a way -- for example, many of the "special forms", like `if` and `loop` and `sub`, could be considered slangs... but I think it's more fruitful to consider them to be a special case, namely statement macros | 20:11 | ||
| if the goal is extensibility by the module author, then hanging things on the "statement macro" hook is going to be a winning move | 20:12 | ||
| cognominal | vendethiel, my project about generating QAST tree with grammar ia getting bigger. Now, besides the AST phaser, I will have an ATM phaser to pattern match on trees. An probably a QAST phaser because AST is writing a QAST tree to write a QAST tree. So better go with an intermediate step. | ||
| masak | vendethiel: JSX is an excellent example of a symbiotic slang, yes | ||
| vendethiel | O_o | ||
| sounds hug | |||
| sounds huge | |||
| masak | well -- sounds hug, too :D | ||
| cognominal | masak, are you making progress about macros? I have downloaded papers about scala macros but did not dare to read them. | 20:17 | |
| masak | cognominal: I feel I am making progress, yes | 20:18 | |
| cognominal | Have you seen that Apple has blatantly copied @worrydreams(Bret Victor) with their swift playground ? | 20:22 | |
| masak | yes, I like what they're doing there | ||
| I didn't take it as "blatantly copied", more like "hey, we should listen to this guy" and then forging ahead, doing what no-one else is doing yet | |||
| cognominal: if you haven't seen gist.github.com/masak/13210c51f034f931af0c yet, I heartily recommend skimming it | 20:23 | ||
| cognominal | appleinsider.com/articles/16/06/13/...playground | ||
| masak | oh, wow | ||
| coding on the iPad? sounds excellent! | |||
| cognominal | if it is a secret gist, I probably not have read it | 20:26 | |
| About the ipad. It is aaid that stenography is faster than typing. We have yet to invent a stenography of programming | 20:33 | ||
| clicking on existing names instead of typing them would already go a long wat | 20:34 | ||
| vendethiel | I'm not feeling awake enough to read your gist right now, cognominal | 20:47 | |
| will do tomorrow | |||
| masak | it is a secret gist. I again recommend it. | ||
|
22:18
cognominal joined
23:21
cognominal joined
|
|||