[00:36] Evening [00:37] ugh [00:38] THat good, eh? [00:38] yea, headache all day [00:38] Ugh [00:38] that's no fun [01:04] more coffee [12:51] heh, love the xkcd what if today [13:07] GOod morning [13:09] party [14:25] so [14:25] I did a pyramid setup tutorial [14:26] alchemy scaffold [14:26] "Pyramid is having a problem using your SQL database" [14:26] Is what I get [14:26] this is with unmodified code as pcreate command created it [14:27] so i found the initialize_foo_db script [14:27] but it doesn't help [14:28] I was hoping to see the screen as shown in the tutorial before I started looking at the code etc [14:33] nvm reposting to #pyramid [14:33] derekv: what's the SA url in the ini? [14:33] not sure, not done the tutorial in a while [14:34] sqlalchemy.url = sqlite:///%(here)s/project.sqlite [14:34] so that tutorial I found by navigating [14:34] but you you search google, there are mutiple tutorials that vary slightly [14:35] some i guees for different versions [14:35] yea, so not sure where you get this error at? [14:35] that's all you get? "Pyramid is having a problem using your SQL database" [14:35] when you do a pserve development.ini? [14:36] i wonder if that s is supposed to be there after the %(here) [14:36] rick_h_: yea [14:36] well the server runs [14:36] that is what I see on the localhost page [14:36] yes, $(here)s is a str replacement [14:36] ok [14:36] derekv: and no error output/traceback at the cli where you ran the server? [14:37] rick_h_: just some INFO statements about what select its running, no error [14:37] derekv: push the source up somewhere and I can look. Not sure what the scafoold does these days and hard to see what's up [14:37] ok [14:54] https://github.com/DerekV/pyramid-tutorial [14:56] derekv: k, sec [14:58] Change %(here) to an actual path [14:58] sqlite:///tmp/foo.db [14:59] ok [15:00] car done, have to run, will check back in a bit [15:04] ok thanks I'll play with it [15:54] derekv: sorry, that initializesql script is broken as fu [15:54] fixing, will have a diff shortly [15:57] derekv: http://paste.mitechie.com/show/879/ [15:57] make sure to run bin/python project/scripts/initializedb.py development.ini [15:57] from within your virtualenv or whatever [16:02] ok [16:09] rick_h_: that works! [16:22] rick_h_: do I just rerun that script if I update my models? [16:29] derekv: no, it's not a migrations solution [16:29] it's just meant to init a new install [16:30] derekv: you can rm your db and rerun it if you want [16:30] and get back an empty db with the table structure [16:30] derekv: alembic is a tool for true migrations [16:39] speaking of python... [16:40] what's that tool to create a standard project with rick_h_? [16:40] modern package template [16:40] like, it setups standard project layout and such [16:40] cool, thanks [18:09] rick_h_: clean database is ok for now [18:09] no data of importance =p [18:10] derekv: yea, then just rm db && bin/python scripts/... [18:29] type token occurance [18:30] huh? [18:30] so apprearently a "type" is the concept of a thing, and a "token" is an instance of it [18:30] http://plato.stanford.edu/entries/types-tokens/#WhaDis [18:31] Just trying to come up with table names [18:31] for my model [18:31] yea, I'd say type/instance [18:31] table names generally work best as plurals of the model name normalized a bit [18:31] ime [18:31] type and instance both have too much overlap with programming [18:32] type/token would be the correct words according to this article [18:33] basically I am going to have a little app where you can create some thing, then click ( or poke api ) to "count" occurances of it [18:33] then see by time or total count or graph or whatever [18:33] silly concept but wanting some simple project [18:33] to build a web app around [18:36] eventtypes and occurances is probably the most readable [18:36] users eventtypes occurances tables , thats about as simple of a model as you can get =] [19:17] rick_h_: I was so tired last night that I didn't even open the box with the spoon knives in it. No pictures yet, but I have them ;) [19:17] greg-g: awesome! [19:18] I need a deep ladle when you get time :P [19:18] :) me too, Rowan is breaking/chipping all of our wooden utensils [19:19] greg-g: Is everything a drum? [19:21] more that he REALLY, I mean ***REALLY*** wants to help stir anything that is on the stove [19:22] and by "stir" I mean "fling around a large utensil in the general direction of the skillet, thus getting food everywhere" [19:22] seriously, actually, he does pretty well now, just pushes stuff around, can still get messy though [19:22] greg-g: lol, when I cook I give the boy a pan, a spoon, and some uncooked noodles or such [19:23] uncooked noodles, beans, and cereal works best (kix and the like) [19:23] * greg-g nods [19:23] we try the pot with water on the floor trick, he loves that, but he *really* wants to see what we're doing "up there" [19:23] yea, I don't do water [19:23] I have enough to clean up [19:24] I don't let mine help. He can get on a chair and watch [19:24] we got him a Learning Tower that helps a bunch, he does stuff on the counter next to where we are doing food prep [19:24] I let him pull a kitchen chair up on the other side of the counter [19:24] so he stands on the chair and goes crazy on the counter with his cooking [19:24] wanting one of whatever dad has "I need some tongs, oven mitts, ..." [19:24] yeah, like the learning tower, just the learning tower is fenced off, basically [19:24] yep [19:25] * rick_h_ looks up learning tower [19:25] ah, that's pretty cool [19:26] I was going to look at making the boy a step stool, but maybe something a bit larger would be in order [19:27] ouch 35# [19:27] yeah, heavy/sturdy, and not cheap, we got ours used [19:27] cool [19:35] what should I use for time? TIMESTAMP? [19:36] http://taaviburns.ca/presentations/what_you_need_to_know_about_datetimes/ [19:37] *brain splodes [19:39] you asked [19:41] No. He asked what type to use, not everything [19:41] "what should I use for time" ... says nothing about type :P [19:42] lol [19:42] so [19:43] I want to store when the occurance happened. eg, same more or less as when the row is created [19:44] created_date = Column(DateTime, default=datetime.datetime.utcnow) [19:45] cool... hopefully that will work more or less transparently on postgres and sqlite? [19:45] rgr, just be ware that sqlite doesn't support a real datetime so it's actually a string [19:45] but SA will hide that fact from your as long as you use SA [19:45] rick_h_: I plan to only use SA [19:46] I saw that, is why I asked [19:46] you'll just get a datetime back then and it'll auto insert on Session.add()/commit [19:46] or .flush [19:47] cool [19:50] * derekv deletes some semicolons [20:12] https://github.com/DerekV/pyramid-tutorial/blob/master/project/models.py , on the right track ? =] [20:12] oops bad link [20:12] https://github.com/DerekV/pyramid-tutorial/blob/model-spike/project/models.py [20:13] think name being unique is a bit unreasonable? [20:14] and occurance/eventtype seem mixed up [20:14] what's an event type supposed to be? Seems like something that has a limited set of known events? [20:14] but it's tied to a creator? [20:14] should that be on the occurance, who was involved in it? [20:15] rick_h_: both good thoughts [20:17] re name being unique, i'm going to use the name as part of the rest path ... thought about doing a hash as the path for that reason and for basic privacy but decided to keep it simple [20:17] rest path on mutable data? [20:18] not to mention no true limit on the type of data in there. [20:18] I'd use username and validate it to not be allowed to be url escaped characters and the like perhaps? [20:18] right has to be validated anyays [20:18] but I guess that's mutable as well [20:18] the name wont' be mutable [20:18] future enhancement [20:19] I'm not even worried about api compatability or anything [20:20] Before long I'll have to think through all that I'm sure [20:20] http://r.bmark.us/u/bd80c81fa7fa80 cool, was looking at that for bookie as well [20:21] basically I could just use the id of the eventtype but I dislike using database id's outside of database access code [20:21] yea, but username seems more stable than name [20:21] but just my experience [20:21] right [20:25] what will get me to demo quickest? [20:26] probably just using the database id [20:26] and hold my nose [20:28] and name should be descriptions [20:28] -s [20:28] event type doesn't even need a creator atm [20:28] Man, factory resets on your phone are no fun [20:30] so for occurances... eventually you'd either decide that only the creator can post occurances or you'd need some sort of "observed by" [20:31] i guess i'll put in 'observed by' [20:31] makes sense [20:33] any my init on Occurance is jacked [20:33] sec, will have a MP coming your way in a second [20:34] for the init, you you want pass the _id's or the relationship? [20:34] Military Police? [20:35] acronym fail [20:35] merge prop [20:35] pull req [20:38] MP? really? Is that some launchpad lingo? [20:38] yea, MP is merge proposal [20:38] derekv: so there's amy first pass at what I would do :) [20:38] rick_h_: cool [20:38] * brousch beats rick_h_ about the head and neck. IT'S A PULL REQUEST AND DON'T YOU FORGET IT AGAIN [20:38] https://github.com/DerekV/pyramid-tutorial/pull/1 [20:39] brousch: sorry, MP came first and I use that a lot more in a day [20:43] well so much for squashing my wip commit [20:43] doh [20:43] =p [20:44] git co -b wtf_did_rick_do && git merge ... [20:44] and with that today has sucked and I'm running away... [20:44] rick_h_: That bad? [20:44] ITS NP [20:44] capslock die [20:48] i need sleep