Skip to content

Instantly share code, notes, and snippets.

@PirosB3
Created March 21, 2014 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PirosB3/9676907 to your computer and use it in GitHub Desktop.
Save PirosB3/9676907 to your computer and use it in GitHub Desktop.
[10:30pm] PirosB3: hello
[10:36pm] claudep left the chat room.
[10:37pm] jasonamyers joined the chat room.
[10:37pm] jasonamyers left the chat room.
[10:45pm] timograham joined the chat room.
[10:45pm] MarkusH: freakboy3742: may I bug you about swappable models again?
[10:47pm] PirosB3: ahah
[10:47pm] PirosB3: everybody want's freakboy3742 's attention
[10:47pm] PirosB3:
[10:49pm] freakboy3742: PirosB3: Oh, I'm just Mr Popular…
[10:49pm] PirosB3: good morning freakboy3742
[10:49pm] freakboy3742: Give me 15 - haven't had breakfast or coffee yet…. and trust me, you don't want to talk to me before coffee
[10:50pm] PirosB3: guess what?
[10:50pm] PirosB3: sure
[10:50pm] PirosB3: if breakfast and coffee means less comments, go ahead
[10:56pm] jarshwah: been wondering for awhile.. is there anything special/significant planned for django 2.0?
[10:56pm] jarshwah: The major version bump allows for some backwards incompatibility, I'm just wondering if anything specific may be targetted?
[10:58pm] MarkusH: jarshwah: afaik there is no intention to make a 2.0 or 1.10 be more backwards incompatible than previous versions
[10:58pm] MarkusH: and idk whether there is a decision about 2.0 or 1.10 at all
[10:58pm] jarshwah: it'd be a python 2 / python 3 disaster
[10:59pm] timograham: I think it's going to be 2.0
[10:59pm] timograham: it's possible we might drop Python2 support at that time, but only if the ecosystem is ready for the change
[11:00pm] jarshwah: django achieving py3 compliance has probably triggered lots of other projects to move
[11:00pm] jarshwah: but cool, good to know
[11:00pm] freakboy3742: MarkusH: No firm decisions, other than the fact that 1.10 isn't a number
[11:01pm] freakboy3742: But there almost certainly *wont* be any big backwards compatibilities.
[11:01pm] freakboy3742: Firstly, there aren't that many things that we want to change;
[11:01pm] freakboy3742: Secondly, the Py3 experience has shown that it's very risky, and I'm not sure Django would survive a transition like that.
[11:01pm] ambv left the chat room. (Read error: Connection reset by peer)
[11:02pm] jarshwah: hmm django 2.0.. swap DTL for Jinja, swap out the ORM for SQLAlchemy
[11:02pm] jarshwah: then rebrand as flask
[11:02pm] ambv joined the chat room.
[11:02pm] MarkusH: jarshwah: something like that
[11:02pm] freakboy3742: Well, ironically - PirosB3's GSoC project could make the ORM thing possible.
[11:03pm] PirosB3: hello
[11:03pm] freakboy3742: (or at least a whole lot easier)
[11:03pm] freakboy3742: Speaking of
[11:03pm] PirosB3: sorry I wasn't reading
[11:03pm] freakboy3742: I needed to guess something?
[11:03pm] apollo13: freakboy3742: why is 1.10 no number?
[11:03pm] jarshwah: having swappable major components like templating engines or orms makes things very difficult for project and library authors though
[11:03pm] freakboy3742: apollo13: It's a thing about decimals.
[11:03pm] freakboy3742: It's a tenuous argument, firmly held
[11:03pm] apollo13: freakboy3742: yeah, there is this thing about significant digits
[11:03pm] jarshwah: all of a sudden a library author needs to supply templates for various engines, models for different engines.. ugh
[11:04pm] apollo13: freakboy3742: hehe
[11:04pm] jarshwah: using Mako in django has caused me significant growing pains
[11:04pm] freakboy3742: jarshwah: Exactly.
[11:04pm] freakboy3742: Jinja makes is *marginally* easier, because there's a lot of compatibility in template format
[11:04pm] freakboy3742: but even then, there are headaches.
[11:04pm] freakboy3742: and differences.
[11:04pm] • FunkyBob decides not to bring up rattle now ...
[11:05pm] jarshwah: is that your templating engine?
[11:05pm] MarkusH: ah, FunkyBob perfect. Wanted to talk to you too
[11:05pm] freakboy3742: FunkyBob: Hey, if you've got a forwards compatible compiled template language, you'll get my vote
[11:05pm] FunkyBob: yes
[11:05pm] FunkyBob: freakboy3742: I could do that
[11:05pm] brts left the chat room. (Ping timeout: 240 seconds)
[11:05pm] FunkyBob: though right now it's more pythonic syntax
[11:06pm] FunkyBob: as in you can do {{ a.b[c].f(g)['a'] }}
[11:06pm] FunkyBob: but adding kwarg support has fucked the parse, so I need some help
[11:07pm] dlogs left the chat room. (Remote host closed the connection)
[11:07pm] FunkyBob: and I really need to move onto block tags
[11:07pm] dlogs joined the chat room.
[11:07pm] PirosB3: I don't think it will be immediately possible
[11:07pm] PirosB3: but it's a good start
[11:07pm] FunkyBob: btw -- someone on #django wants to know if anyone knows of an actual django bug leading to a site actually being exploited/compromised?
[11:07pm] freakboy3742: FunkyBob: Have you reached a point where you've got any sort of speed comparison (however preliminary it might be)?
[11:07pm] FunkyBob: freakboy3742: haven't tried yet
[11:07pm] PirosB3: I think that there is more complexity to swapping ORMs
[11:08pm] PirosB3: but Meta will greatly help the transition
[11:08pm] freakboy3742: FunkyBob: I'm aware of some DDOS atticks bringing sites down (when the email regex bug was found)
[11:08pm] FunkyBob: freakboy3742: would speed test templates tht only have var and text nodes
[11:08pm] freakboy3742: Djangoproject.com was one of them.
[11:08pm] PirosB3: a refactored meta, obviously
[11:08pm] freakboy3742: but as far as actual exploits/injections etc - can't say I do.
[11:08pm] freakboy3742: (not saying they don't exist - they just haven't hit common mythology)
[11:09pm] freakboy3742: PirosB3: Right - you wanted feedback on things, I presume?
[11:09pm] PirosB3: eheh
[11:09pm] PirosB3: yes
[11:09pm] PirosB3:
[11:09pm] PirosB3: please don't be mean
[11:09pm] FunkyBob: so, yeah, if anyone's got CFG / yacc skills... please help!
[11:09pm] freakboy3742: Same URL as before, I take it?
[11:09pm] PirosB3: yep
[11:09pm] PirosB3: freakboy3742: there is actually an interesting comment
[11:09pm] MarkusH: FunkyBob: you remember my mail about the urls in the test case classes? There is another similar nice thing out there: https://docs.djangoproject.com/en/1.6/topics/testing/advanced/#django.test.TransactionTestCase.available_apps
[11:09pm] PirosB3: by Chris Beaven
[11:10pm] PirosB3: I left it for discussion
[11:11pm] FunkyBob: MarkusH: umm... no?
[11:12pm] FunkyBob: freakboy3742: now, when you say "forward compatible" ...
[11:12pm] freakboy3742: I mean - all existing Django templates work as is.
[11:12pm] MarkusH: FunkyBob: scoop@djangoproject.com it is? I send a mail on Mon, 10 Mar 2014 09:58:38 +0100
[11:12pm] freakboy3742: but new features + faster if you use the new engine.
[11:13pm] FunkyBob: MarkusH: oh, right
[11:14pm] FunkyBob: freakboy3742: ah... man.. supporting that magic-dot-lookup ... *shudder*
[11:14pm] FunkyBob: though, I guess if I define a function for that in the globals... that'll be easier
[11:14pm] freakboy3742: Just floating it as an idea that would have almost no resistance to entry to core
[11:15pm] freakboy3742: Not necessarily defending any particular syntax decisions.
[11:15pm] FunkyBob: yeah
[11:15pm] freakboy3742: A "compatibility mode" would be another approach.
[11:15pm] FunkyBob: well, once I get rattle working, I'll look into it
[11:16pm] FunkyBob: right now I'm not going anywhere until I can find why the parser is b0rked
[11:16pm] FunkyBob: as soon as I add the production "kwarg : NAME EQUALS expr" then dot lookups don't work
[11:16pm] MarkusH: FunkyBob: any code to see?
[11:17pm] FunkyBob: github
[11:17pm] FunkyBob: check the rply branch
[11:17pm] FunkyBob: Alex has done a bang-up job on improving the api from ply (which relied on docstrings!!)
[11:27pm] MarkusH: FunkyBob: I suspect you have to define a precedence of EQUALS, DOT and COMMA
[11:28pm] MarkusH: Last time I used yacc is a while ago, but I remember that defining some operator orders often solved some issues
[11:30pm] edbaffei left the chat room. (Quit: edbaffei)
[11:33pm] EvilDMP left the chat room. (Quit: EvilDMP)
[11:34pm] sentinal8473 left the chat room. (Quit: Textual IRC Client: www.textualapp.com)
[11:35pm] FunkyBob: MarkusH: yeah, that's the path I'm trying now
[11:35pm] MarkusH: FunkyBob: I'm looking at the rply docs. What about lg.ignore(r"\s+") ?
[11:36pm] FunkyBob: yeah, I think I need that too
[11:37pm] FunkyBob: I don't quite have my head around the parser enuogh to understand quite the implicatiosn of precedence
[11:37pm] FunkyBob: am reading the ply docs
[11:39pm] FunkyBob: Which, as Alex said, are quite detailed
[11:40pm] stephenmcd joined the chat room.
[11:42pm] freakboy3742: PirosB3: Ok - review done
[11:43pm] freakboy3742: Looking good. I've got a couple of little nitpicks, but nothing too serious
[11:43pm] PirosB3: wow
[11:43pm] freakboy3742: Only found one "biggish" issue
[11:43pm] PirosB3: I am honored, everything is not a comment
[11:43pm] PirosB3: good
[11:43pm] PirosB3: ok
[11:43pm] PirosB3: most of them I understand
[11:43pm] PirosB3: which is the big issue?
[11:43pm] freakboy3742: and even that one is getting to the point of "You'll probably be selected; this is more for your own benefit"
[11:44pm] freakboy3742: The issue is that you say "5 API areas, avg 7 APIs each, which I can get down to 4"
[11:44pm] freakboy3742: This is true (it sounds about right)
[11:44pm] PirosB3: really?
[11:44pm] freakboy3742: However, saying "i found 5" is less compelling than saying "Here are the 5 I found".
[11:45pm] FunkyBob: MarkusH: hints on the left/right and precedence order?
[11:45pm] PirosB3: aha
[11:45pm] PirosB3: okay
[11:45pm] freakboy3742: PirosB3: I'm saying the math sounds about right. I haven't done a head count myself, but based on what i know, the numbers sound ballpark correct.
[11:45pm] MarkusH: FunkyBob: let me dig out some old code
[11:45pm] PirosB3: I actually counted them up
[11:45pm] PirosB3: but how can I demonstrate this? should I post a gist with a division?
[11:46pm] PirosB3: also, when you say "experiment into what could be done with Meta."
[11:46pm] freakboy3742: Well, it's a list of 35 API points. Put it in an appendix.
[11:46pm] freakboy3742: Just needs to be bullet points to show what you're actually talking bout here.
[11:46pm] Zifre_ joined the chat room.
[11:46pm] freakboy3742: you don't need to provide a demonstration of what you're reducing it to.
[11:46pm] PirosB3: didn't I already do this?
[11:46pm] freakboy3742: Not that I've seen...
[11:47pm] PirosB3: When I speak about all the things that could be done
[11:47pm] freakboy3742: You list a bunch of entry points that are candidates for cleanup
[11:47pm] PirosB3: Disqus, LDAP, ...
[11:47pm] PirosB3: lol
[11:47pm] PirosB3: okay, how should I elaborate further?
[11:47pm] freakboy3742: Oh - sorry - crossed the streams
[11:47pm] PirosB3: ahahaha
[11:48pm] freakboy3742: My comment is "can" vs "could".
[11:48pm] Zifre left the chat room. (Ping timeout: 246 seconds)
[11:48pm] freakboy3742: it's an English tense thing.
[11:48pm] PirosB3: oh okay, will change
[11:48pm] freakboy3742: You haven't build it yet, so it isn't demonstrating what *can* be done. Your intention is to prove what*could* be done.
[11:48pm] PirosB3: oooh! and an interesting one!
[11:48pm] PirosB3: It's a late-binding injection method
[11:49pm] PirosB3: isn't it a bad design?
[11:49pm] freakboy3742: Well, yes and no.
[11:49pm] PirosB3: like parent modifies child, child modifies parent
[11:49pm] freakboy3742: it's more like child notifies parent, parent modifies child.
[11:49pm] PirosB3: also, if the parent is removed (for any reason), it sill remains in memory
[11:49pm] freakboy3742: as a result of a registration.
[11:49pm] PirosB3: because there is a reference on the fields,
[11:49pm] freakboy3742: Oh - for sure. At one level it's monkey patching
[11:50pm] freakboy3742: but it's not a free-for-all
[11:50pm] PirosB3: but it's not notifying
[11:50pm] PirosB3: this is not notifier subscriber
[11:50pm] PirosB3: it's setting stuff
[11:50pm] MarkusH: FunkyBob: this is from a C compiler we had to write at the university http://pastebin.com/RxkV6C4V
[11:50pm] freakboy3742: Sure, I'll accept that.
[11:50pm] freakboy3742: My point - it's there for a reason.
[11:50pm] freakboy3742: If you're proposing that you're going to fix this - you'd better bring proof.
[11:51pm] PirosB3: I had a better look at it
[11:51pm] freakboy3742: Because the design that is there exists for a reason.
[11:51pm] PirosB3: it's really BIG to fix
[11:51pm] PirosB3: because everything is designed around it
[11:51pm] freakboy3742: Yeah - that's almost a GSoC in itself, and I'm not sure what we gain as a result.
[11:51pm] PirosB3: you'r right
[11:51pm] PirosB3: still, it would be an interesting area to explore
[11:51pm] PirosB3: like, finding an alternative way of communication
[11:52pm] PirosB3: without children having necessarily reference of the parent
[11:52pm] MarkusH: FunkyBob: So, make the COMMA left, next EQUAL right, next DOT left
[11:52pm] FunkyBob: lowest to highest?
[11:53pm] MarkusH: erm
[11:53pm] MarkusH: yes, I think so
[11:53pm] PirosB3: oh freakboy3742 did you see my comment on the doc?
[11:53pm] freakboy3742: Which one?
[11:53pm] PirosB3: about the PR
[11:53pm] PirosB3: arily convinced this is a good idea. The changes are all related, and while there may be....
[11:53pm] FunkyBob: rply.errors.ParserGeneratorError: Precedence already specified for M
[11:54pm] freakboy3742: Right...
[11:54pm] MarkusH: hu?
[11:54pm] freakboy3742: Hrm… ok - this sounds to me like something you don't want to commit to in your proposal
[11:54pm] PirosB3: ok
[11:54pm] PirosB3: I'll remove it then
[11:55pm] PirosB3: also.. This is experience you don't have yet, so it can't form the basis of an estimate
[11:55pm] freakboy3742: I mean, say that the intention is that the work will be presented for review, and that it will be in a committable form at the end of the 8 week window, but don't commit to a specific branch/PR strategy.
[11:55pm] MarkusH: FunkyBob: what is M ?
[11:55pm] MarkusH: ah, you missed a tuple
[11:55pm] PirosB3: yeah correct
[11:55pm] PirosB3: that makes sense
[11:55pm] FunkyBob: ?
[11:56pm] MarkusH: ('left', ['COMMA']), ('right', ['EQUAL']
[11:56pm] FunkyBob: ah
[11:56pm] MarkusH: your string is an iterable itself
[11:56pm] FunkyBob: difference in syntax between ply and rply
[11:56pm] FunkyBob: ValueError: Unexpected token: Token('DOT', '.')
[11:56pm] FunkyBob: nope... back to that
[11:57pm] PirosB3: Also, with regards to: This is experience you don't have yet, so it can't form the basis of an estimate. Do you think it's incorrect to assume that after having refactored Meta, I would be a bit more snappier?
[11:57pm] MarkusH: FunkyBob: \.
[11:57pm] MarkusH: as Token, not '.'
[11:57pm] freakboy3742: Sure - but you haven't got that experience *yet*, so you're not in a position to estimate the value of that extra knowledge.
[11:57pm] MarkusH: that matches everyhing
[11:58pm] PirosB3: it does make sense
[11:58pm] freakboy3742: PirosB3: I'd be inclined to say something to the effect that your experience building the Meta will make this easier
[11:58pm] FunkyBob: lg.add('DOT', '\.')
[11:58pm] PirosB3: ok, sure
[11:59pm] freakboy3742: but as far as the time estimate is concerned, it's "filling out the remainder of the GSoC". there's no critical "point of completion"; something that works (for some definition of work) will be sufficient.
[11:59pm] freakboy3742: because it's a proof of concept.
[11:59pm] PirosB3: I understand your point of view
[11:59pm] FunkyBob: MarkusH: if I remoev the kwarg productions, it all works
[11:59pm] freakboy3742: It's not something that needs to be polished for commit to trunk.
[11:59pm] PirosB3: yes tue
[11:59pm] freakboy3742: So this part of the estimate can be fluid as required to fit any over/under on the estimate of the first milestone.
[11:59pm] PirosB3: when I rewrote all milestone 1, without thinking about number of weeks etc, it was much easier
[12:00am] PirosB3: because I actually thought from bottom up
[12:00am] PirosB3: with milestone 2, I have 3 weeks left, so I had less freedom
[12:00am] PirosB3: sure
[12:00am] MarkusH: FunkyBob: what is the error if you have the kwarg production but w/o any precedence definitions?
[12:01am] FunkyBob: that one above
[12:03am] MarkusH: hrm, no idea
[12:04am] FunkyBob: me either
[12:05am] FunkyBob: which is why I was hoping to ping an expert...
[12:05am] FunkyBob: not to denigrate your abilities -- you clearly grok it better than I
[12:05am] FunkyBob: but I suspect Alex_Gaynor groks it better
[12:06am] FunkyBob: MarkusH: you know what? after freakboy3742's enthusiasm, I'm tempted to make it django compatible
[12:07am] dlogs left the chat room. (Remote host closed the connection)
[12:07am] dlogs joined the chat room.
[12:12am] FunkyBob: MarkusH: but at least the ignore has fixed one issue
[12:13am] PirosB3: all right guys, I'll call it a day
[12:13am] PirosB3: I am dead tired
[12:13am] PirosB3: freakboy3742: once I have corrected the last changes, is it good 2 go?
[12:13am] freakboy3742: I'd say so.
[12:13am] freakboy3742: Just in the nick of time, too
[12:13am] PirosB3: what does it mean?
[12:14am] freakboy3742: Sorry - "Just in time". Deadline is tomorrow. So you've finished just when you need to.
[12:14am] PirosB3: ahah
[12:14am] freakboy3742: AU english has lots of colourful phrases.
[12:14am] PirosB3: oh yeah, it's well nice
[12:15am] PirosB3: My cousin is in Sydney, maybe I should pay her a visit one day
[12:15am] PirosB3: anyways
[12:15am] PirosB3: okay
[12:15am] PirosB3: thanks for your help
[12:15am] PirosB3: hear you tomorrow guys
[12:15am] freakboy3742: No worries - I look forward to seeing the official "PirosB3 has submitted a proposal" email!
[12:15am] FunkyBob: we get to steal idioms from everyone
[12:15am] freakboy3742: Yup. Some of them we even make PM.
[12:16am] freakboy3742: Oh - wait - you said idiom.
[12:16am] freakboy3742:
[12:16am] FunkyBob:
[12:16am] FunkyBob: it's really sad how much they're aping the playbook of the American right-wing nutters from a few years ago
[12:17am] PirosB3: goodnight!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment