brainstorming lists: gist.github.com/203173 paste.lisp.org/display/88288 IRC logs: irclog.perlgeek.de/perl6book/today
Set by moderator on 8 October 2009.
03:05 last_ joined, colomon_ joined 04:20 colomon joined, last joined 04:46 FOAD_ joined 06:27 FOAD_ joined
dalek ok: 5b820d8 | moritz++ | authors.pod:
[authors.pod] description for Moritz (erm, me)
06:46
09:53 Infinoid left 10:04 FOAD_ joined
moritz_ folks, we really need a plan 13:10
I wanted to write a chapter about grammars, using JSON::Tiny as the leading example 13:11
and I found that I have no idea what to explain and what not
because we don't have a plan yet which chapter should explain what
13:22 masak joined
masak \\o/ 13:22
moritz_ just commited an initial outline. Feel free to critcize, hack, bikeshed, and improve! 13:23
masak looks
dalek ok: 3567eef | moritz++ | (2 files):
move preface.pod to src/
13:24
ok: 80a7d80 | moritz++ | outline.pod:
added a basic, rough outline
masak general comment: I believe it is good to have a plan for what to bring up, and in which chapter. I also believe we should be ready to totally re-arrange that plan if needed.
moritz_ agreed 13:25
so maybe we should declare dependencies among the chapters?
13:25 carlin joined
masak I also have a feeling that two things stand in approximate opposite proportion: the clearness of the subdivisions between the chapters, and the naturalness of the examples. 13:26
in my mind, the examples take center stage, and the necessary topics fall out from that. YMMV.
jnthn oh hai 13:27
=head2 Chapter 3 - Subs and signatures, multis
=head2 Chapter 4 - Object orientation
Hmm. I only wonder about this ordering because while subs and sigs early is nice... 13:28
moritz_ it's hard to properly understand them without knowing about types
jnthn ...it's probably going to be harder to talk about multis without forward references and make good examples.
moritz_ ok
feel free to turn around
jnthn Since we want to show how people can use it with their own types.
13:29 masak` joined
jnthn Well no, I think subs and sigs early is nice. 13:29
As you can build upon that for methods.
masak` argh.
jnthn But multi stuff...I mean, you can't give nice things like the paper / scissor / stone without people people able to introduce their own types.
moritz_ so, what's the way out? forward references (or creating classes without much explanation)? 13:31
masak it's probably hopeless to have a totally linear order of exposition.
introducing things several times with increasing levels of detail might help. 13:32
jnthn moritz_: Actually, my leaning was more, talk about subs and signatures, but not dive into multiple dispatch until after we talk about OO.
masak "remember X? well, an X is really an Y on steroids, like this:"
jnthn So
Subroutines and Signatures - covers subs, sigs, can mention types but it ain't a huge deal here yet 13:33
13:33 [particle]1 joined
masak aye. 13:33
jnthn OO - deals with classes and the stuff that goes in them, and probably non-parametric roles
masak nod. 13:34
jnthn oh no, parametrics are OK
well, debatable
And then after that a chapter like
Types and Multiple Dispatch
[particle]1 a link to the book source should be in /title
masak it all depends on the examples. talking about it before we have the examples is like trying to determine what ingredients to have in our food before deciding on the dish. 13:35
it's possible, but kinda abstract.
moderator brainstorming lists: gist.github.com/203173 paste.lisp.org/display/88288 IRC logs: irclog.perlgeek.de/perl6book/today source: github.com/perl6/book/ 13:35
jnthn Well, if the shops are closed and my fridge only has a few things in, that model is good too. ;-) 13:35
Trouble is, my fridge only tends to have beer and salsa when I hit that situation. :-/ 13:36
masak :)
well, we're not in that situation.
we're starting early. we can go shopping several times if we wish.
five times, to be exact. 13:37
jnthn Aye.
carlin likes the roleplaying game idea 13:38
jnthn My more serious point though is that while we want to somewhat drive it by examples, six examples that all use masses of features that we can't explain without loads of forward references is also an issue.
moritz_ well
jnthn Not to mention that I suspect a big, complex example in the first few chapters will be perhaps intimidating, which we also don't want. 13:39
moritz_ for the JSON::Tiny thing we just need *very* basic OO, *very* basic MMD, *very* basic operators, and very basic control flow
jnthn moritz_: How important is the MMD there?
moritz_ and the grammar features aren't all that intimidating either
masak I have a another example proposal (quite apart from the zany SHRDLU idea): I'm thinking of a dependency tracker. gist.github.com/206033
moritz_ jnthn: not at all - it's for generating the JSON (which is 20% of the code)
jnthn moritz_: oh, not quite what I wanted to ask
I meant, how does the new protoregexes influence it? 13:40
moritz_ it makes two places easier
masak moritz_: might be nice to linger for a while on that, and show both variants. 13:41
moritz_ masak: yes
masak did chromatic ever push his build tools?
moritz_ not yet 13:42
masak then I'll nudge him on that when I see him.
moritz_ I'm not sure we asked him to do that, just that he offered it
masak oh.
I think I said I was interested in them.
last I keep looking at norvig.com/sudoku.html as a potential example. 13:43
moritz_ just ask him, then :-)
masak aye.
last Norvig's Python is beatiful, but at least half of the helper functions he writes are built-ins in p6.
masak PerlJam++ asked chromatic to put the build tools in the repo. so yes, we've asked him. 13:44
moritz_ last: aye. But we should come up with examples ourselves :-) 13:45
masak curse those convenient built-ins! they take all the good examples from us. :)
moritz_ also looked at nonograms, but thinks they are too complicated to put in a short example
last fair enough! blog post, then....
masak moritz_: does your JSON::Tiny have tests? 13:46
oh, I see it does. 13:47
colomon The problem with a lot of potential examples is they have to do things people understand, so you can spend your time explaining how it works rather than what it is trying to do.
masak moritz_: what's the coverage, in your estimation?
colomon: excellent point. 13:48
that's why I don't think esoteric games are a good example.
Poker, on the other hand, would be excellent.
PerlJam good morning
[particle] whatever the example, it should make the code proto-aware
colomon masak: agreed. poker is the only card game that makes sense, I think.
PerlJam I notice there's an outline in the repo now. Are we really trying to stick with 6 chapters? 13:49
[particle] if you're making card games, you could start with blackjack
masak [particle]: "proto-aware"? as in, almost self-aware?
[particle] i think there should be as many chapters as necessary
masak: yes, like shrdlu, but internationalized :)
PerlJam [particle]: me too, but should 6 be a target minimum?
masak man, I hope I can make a case for SHRDLU. it's such a cool example. :) 13:50
colomon masak: with the graphics? 13:51
masak colomon: possibly.
but I'll get back to you on that after I implemented it. :) 13:52
[particle] i'd rather see a practical example than a game
but it should be something engaging and impressively cool
so games do have appeal
how about writing a c compiler :)
colomon aaaaagh! I think I just went blind looking at the SHRDLU source code. Lisp + all uppercase is ugly... 13:53
masak [particle]: have a go. we're waiting. :)
carlin Port Mini-C to Perl6?
colomon That's actually maybe not a bad idea.
masak colomon: aye. I looked ar it too. I don't udnerstand half of it.
colomon certainly would give the regexes a workout...
[particle] perl 6 has great power in its regex engine, and is vastly different from perl 5 there 13:54
we all know how easy it is to build compilers using perl 6 regex syntax
but maybe that is better saved for a pct book
colomon BTW, I liked the original suggestion of a symbolic algebra example.
PerlJam Maybe a game would be a good example of putting all of the techniques from earlier chapters. Kind of like a wrapup example. 13:55
colomon [particle]: It wouldn't have to be a full C compiler to show off the regexes -- some sort of C source code analyzer would be shorter
masak colomon: the challenge with that one is knowing how to delimit it.
[particle] actually, a perl source code analyzer would be cool
masak colomon: (the symbol algebra example)
colomon masak: I believe that's the challenge with all of these... 13:56
masak [particle]: Perl 5 or Perl 6?
colomon: quite possibly.
moritz_ masak: yes, JSON::Tiny has tests. Coverage is very good.
[particle] p6
masak moritz_: I've looked at the tests now. I agree.
[particle] we have ppi already
for pelr 5 13:57
masak [particle]: I dare you to show me how to parse Perl 6 in Perl 6 today. I've been trying for ages.
PerlJam masak: see STD.pm :)
masak [particle]: (it might be possible by April, though)
PerlJam: in Perl 6. :)
STD.pm is written in a complicated source filter to Perl 5.
[particle] being able to show that a particular block uses 5 lexicals, one state var, and two contextuals 13:58
PerlJam It's written in Perl 6 mostly; it's just that currently the implementation takes you through Perl 5 to do anything
masak and Perl 6 cannot yet read the output from STD.pm.
[particle]: remind me to hire you when my static analyzer becomes feasible. 13:59
PerlJam: I know, I know. but we're limited to Rakudo in the book...
[particle] i will :)
masak: rakudo should be using something STD-like by april
colomon masak: looking at the Lisp code a bit, my feeling is SHRDLU is probably too big for this purpose...
[particle] in fact, pmichaud has said he hopes to convince larry to change STD.pm to do it the rakudo way 14:00
masak colomon: aye, it's very ambitious. it parses arbitrary English.
PerlJam Sounds like a Big, Hairy, Audacious Goal to me.
masak [particle]: I don't know what that means. but Rakudo doesn't parse Perl 6 at present, in any conceivable way. 14:01
PerlJam: that's why it was released in '71 and then Nothing Happened.
pmichaud actually, what I said was that I hope that STD ends up adopting NQP's Cursor model. 14:02
masak I'm reading up on the Winograd academic paper now, to follow his trajectory of disillusionment.
pmichaud: how is STD.pm's Cursor model currently different from NQP's?
pmichaud STD.pm creates a new Cursor object for every backtracking point
masak oh. 14:03
costly.
pmichaud NQP's backtracking points are an array of integers
(that are held in a Cursor object)
moritz_ anyway, I don't think a "Parsing Perl 6" example is feasible for the book, because it's still rather complex to explain the AST structure, and we don't have much time left when we can actually use STD.pm
masak nod. 14:04
pmichaud there's always abc
moritz_ I've used that too often already ;-)
masak I think symbolic algebra sits on the appropriate level of complexity.
[particle] yeah, it does. 14:05
pmichaud that's essentially what abc is/does :)
or could do :)
masak :)
then we agree. :)
pmichaud abc is likely to be the first nqp-based example I write 14:06
so it may happen soonish
colomon abc like the music format? 14:07
pmichaud oh, sorry
abc as in "another basic calculator" 14:08
it implements a unix "bc" equivalent
colomon ah.
moritz_ or just "a bc", if you know what bc(1) does
colomon actually, the music format might not be a bad example.
pmichaud that also
masak having at least one example which draws things might not be a bad idea. 14:09
pmichaud I always like examples using graphics
colomon abc.sourceforge.net/standard/abc2-draft.html 14:10
PerlJam logo :)
masak PerlJam: yes, something in that direction. though preferably something more meaningful. 14:11
PerlJam meaningful to whom?
jnthn Graphical - you could combine it with OO and introspection stuff.
colomon always wanted a Perl module for hacking on ABC files...
masak jnthn: indeed.
jnthn And generate class diagram.
Or something
:-)
masak PerlJam: meaningful to the reader. LOGO is more meaningful to a user than to a reader. 14:12
LOGO has some kind of second-degree meaningfulness to it. it's the things you can do using LOGO that are meaningful.
colomon do we have a way to do a decent interactive LOGO at the moment?
PerlJam colomon: not that I know of. 14:13
colomon Or would this take LOGO programs and convert them to SVG?
[particle] <3 LOGO
PerlJam Does someone have SDL working on Rakudo?
[particle] i've been wanting, for a long time, something to introduce children to perl
LOGO is a great way to do that 14:14
colomon masak and moritz_ have proto modules for SVG... 14:16
masak if it were possible to run Rakudo in the browser, I'd be more positive towards a LOGO example. that'd give an easy way to combine command input and graphics. as it stands now, it's difficult. 14:17
colomon whoops, tried to answer PerlJam's SDL question with SVG info.
moritz_ SVG is bad for the book, because then you'd have to explain not only Perl 6, but also SVG 14:18
masak nod. 14:19
colomon good point. 14:20
PerlJam colomon: you should write something that parses and otherwise manipulates ABC. Even if it doesn't make it into the book, it would make a good article elsewhere 14:26
colomon PerlJam: believe me, now that it has occurred to me, I'm probably not going to forget that one. :) 14:27
I actually meant to do it a year ago or so, but quickly got bogged down because I didn't understand the new regexes, and Rakudo was too buggy to easily learn them.
masak maybe another too-ambitious idea for a book example, but someone should really implement a Lisp in Perl 6. :) 14:28
colomon masak: doesn't that only take 20 lines of code, or something like that? ;)
masak colomon: I don't know, I haven't tried.
[particle] it seems it's a slang 14:29
PerlJam IMHO, we don't want to fill the book with too many computer-sciencey examples since, for practicality, most people aren't modeling CS problems. They're modeling more "real world" things. 14:32
[particle] perljam: i agree 14:33
masak nod.
parsing a file and summarizing it would be right up Perl's alley.
colomon Going back to the poker example -- maybe something that combines pmichaud's card code with code to deal and rank poker hands?
masak and Perl 6 can shine there, too.
especially if we get the -p and -n flags into Rakudo. :)
[particle] *cough* 14:34
maybe i'll dust off the old S19 work next week on vacation
masak yes, please, please. :)
[particle] or maybe i'll just enjoy disneyworld...
oh, the choices! 14:35
PerlJam [particle]: S19 implemented by April would be *really* nice :)
[particle] yes, it sure would.
masak [particle]: if you get back to S19, I promise to give a helping hand.
[particle] hugme: hug masak
hugme hugs masak
16:23 pmurias joined
[particle] welcome! 16:24
japhb (from backlog): The objection re: Norvig's Sudoku solver, that he has to write helper functions that we get as builtins, is not a bad thing in my mind. Y'all have been talking a lot about explain the Big Important Concepts. But I think sometimes it's nice to just see how easy common operations are. That's why all of your slide decks about Perl 6 tend to have a few slides about coolness like zip and cross .... 16:29
In fact, it might not be a bad idea to have an early chapter that doesn't focus on one medium-sized example, but a bunch of small ones that can serve as simple "forward references", so that when they reach the medium-sized examples, they can focus on the real point of the chapter, rather than little confusing details. 16:31
Need to work people up from zero a little gently, I think.
masak aye. 16:32
japhb And also, those forward references can help the reader go "Hey, this is kinda cool, can't wait for the full chapter on this!"
masak kind of a "smorgasboard chapter"... 16:33
japhb yeah, exactly.
Kinda like a prose version of one of those Perl 6 intro slide decks.
[particle] damian has a great slide deck on why perl 6 is so cool 16:38
has a wonderful list of gems
japhb As long as he isn't aiming for brain warp ... 16:40
That would be the last chapter, not the first. ;-)
pmurias the intent of the book is to be a tutorial style on or a reference one? 16:46
s/on/one/
carlin Learning by example, I think 16:47
jnthn Not reference, for sure.
pmurias so the next Programming Perl will be the reference one? 16:48
masak it's a gentle introduction to Perl 6 through a few well-chosen examples.
jnthn Also using features in Rakudo *, which the book is aimed to be published to conincide with. 16:49
masak sure, but most people don't know Perl 6 at all, so picking any features up until April will serve as an eye-opener for people. 16:52
jnthn Indeed. 16:53
The point was more than it slightly constrains some of the examples.
Though the Rakudo subset is a pretty large subset. :-)
masak oh, I hardly see the constraints any more. 16:55
remember, I wrote my first mid-sized application in the Rakudo of summer 2008. :) 16:56
anything after that is liberty.
jnthn ;-) 16:59
Wow. Did we have any features then? ;-)
moritz_ basic OO 17:00
masak no.
moritz_ without constructors
masak we had no features then.
jnthn lol
moritz_ no real lexicals
pattern matching was broken inside the body of an if-clause
masak ouch, it's all coming back. :/
[particle] ...and have things improved? ;) 17:07
how will we look back on this time, next year?
jnthn No, we still have no features. ;-)
19:10 japhb joined, masak joined 19:12 masak` joined