« first day (1319 days earlier)      last day (3659 days later) » 

2:29 AM
 
 
3 hours later…
5:26 AM
@derobert Boy the online reviews are hating on the new Amazon fire.... now I am wondering if I made a mistake orderfing one, but... only $99. And there are always haters.
 
@SAJ14SAJ Hah, well, I guess if it sucks, you can always return it
 
My primary use case is streaming.... I am sure it will do that okay.
I guess neither of us is sleeping tonight.
 
I plan to at some point... Once I finish with github.com/derobert/Westerley-Pool
 
What is it?
 
Web app for managing the community pool. Issuing passes, checking them when people show up, etc.
 
5:31 AM
Ah.
I guess my guess of thread pooling was way off.
I hope you are getting payed.
 
@SAJ14SAJ Hah! That'd be nice. It's my local HOA.
 
You are working for your evil overlords?
 
Not quite, I'm the president of said HOA, so...
I'm working hard not to be an evil overlord. Not easy :-(
 
You ARE the evil overlord?
I loath my former HOA.
But now that I am a lowly renter I have different problems. ;-|
 
Hah.
It seems that pretty much everything built in the region has an HOA... Unfortunate, as a lot of people would seem to prefer not to have one.
No idea why builders keep setting them up for everything.
 
5:37 AM
Certainly anything built in the last 20 or 30 years.
They must think that they are a selling point.
Or it must give them some legal advantages of control during the sales and transition period, but assuming it is self serving is just because I am a cynical old bastard.
 
@SAJ14SAJ They probably are, possibly to the county.
 
Sure, it lets them enforce through contract htings that they cannot enforce through law.
My favorite rust stains on the porch.
 
Well, it also offloads expenses from the county/state. E.g., we pay to maintain some of our roads—which would otherwise be a state expense.
We pay to yell at people to mow their foot-tall grass, which otherwise the county would be doing.
 
Your roads are small, so unless VA is different, a county expense. But yes, I can surely see that.
No county snow plowing either.
 
VA is different, all roads are state, at least outside towns.
Same with snow plowing, that'd be state.
 
5:40 AM
Interesting, is that what your car tax buys you?
 
Not sure if it comes out of the general fund or where.
 
I was just being snarky.
 
VA is also weird w/r/t cities: they're not in counties.
 
So, evil overlord, why are you laboring on a pool management system for free?
 
E.g., Fairfax City is not part of Fairfax County. It isn't part of any county.
I hear this has given people's databases fits...
 
5:41 AM
That must really screw up the census which is based on counties, except in alaska :-)
 
@SAJ14SAJ I was silly enough to volunteer to do it :-(
 
You are strugglying with the evil overlord concept, I can see. And you an anime fan.
 
Taking much more work than I would have guessed.
 
Is .pl perl? I think more work is the starting assumption.
 
@SAJ14SAJ yeah, it's in Perl. Using the Catalyst MVC framework, and DBIx::Class ORM
 
5:44 AM
I am gorging on house episodes, which are now free with Netflix. I never saw it. I expected to hate it. And darn it if I am not up to season 3.
@derobert I am sure that is all akin to torture for programmers.
 
I'm sure you've at least heard of ORM.
But of course, that's never compared to torture, but rather to the Vietnam war.
And possibly you've heard of MVC (Model-View-Controller)
 
I have heard of ORMs as a concept, but they almost always seem to be more work than they save, unless they are really trivilally simple, which is how I like them.
And I know MVC is a pattern, not a particular product.
And I still think calling things "patterns' is new hi falutin programmer talk for old stuff.
 
yeah, Catalyst is a Perl implementation of the MVC pattern
 
I don't understand what a framework for such a thing does. MVC is just a way of structuring program interactions.
 
DBIx::Class isn't really lightweight. Midweight, maybe. Though you can break out of it if you need to, I think.
 
5:47 AM
I am a microsoft fanboy these days. Everything I do is in .NET and C#.
Half of the reason I don't want to even look at Android dev is XML, and the other half is I don't want to go back to Java.
 
@SAJ14SAJ Catalyst is pretty lightweight. It handles interaction with the web server & basic web "API" stuff (e.g., decoding query parameters, POST parameters, character set conversions). Then it handles determining which controller to pass a request to.
It also provides various things (e.g., a per-request variable store) and has plugins to give all kinds of things (e.g., sessions, easy access to memcache, authentication & access control)
 
I am not a big adherent of MVC. I have always found view very helpful, but the distinction between model and controller becomes hopelessly complex in the real world.
@derobert I don't know what any of that has to do with the MVC paradigm.
 
Well, in my case, the models are all pretty lightweight... well, at least the code I'm writing is. The model is basically just the ORM.
@SAJ14SAJ It doesn't have anything to do with MVC, its just useful things for a web framework to provide
 
Yeah, most of those things exist in my own stack..... I get a lot from Service Stack which is a .NET open source (or used to be, I hope someone forks and maintains the free version). The rest I wrote myself.
But I have so, far, been able to maintain absolutely no server side state other than an authentication token.
 
My main complaint is how much HTML insists on knowing everything about the rest of the app. In particular forms are #!(#@ annoying.
 
5:52 AM
At least state that doesn't get committed to the db, anyway.
The trick there, and it is not easy, you must adopt it 100% for it to really work, is to not have any JavaScript in the HTML. It all has to be separate. But yes, I agree.
 
@SAJ14SAJ I have written apps like that. A nice pattern, it makes things so much less likely to break if, say, the user hits back or opens a new tag
 
@derobert It also will make it trivial to allow the load balancers to provide redundancy when I need it.
 
@SAJ14SAJ yeah, but you can do session pinning on load balancers. That's a fairly solved problem. Or store your session data in memcache.
@SAJ14SAJ Well, it annoys me that the knowledge of what a field is called winds up in two, if not three, places. The controller needs to know it, the HTML needs to know it, if you have JavaScript, it needs to know it. And it often matches the model's name too.
And sometimes the CSS...
Same applies to the type of data. Or the validation.
 
It may be a solved problem, but you have never met the disfunction of having Dell manage the technical services. So anything I can do without them is preferred.
 
Ah, yeah...
 
5:56 AM
@derobert The way I wrote my stack makes that go away.
I have componts I wrote that become the UI when they render into HTML, and also handle all the data mangling between client and server in the same code.
 
@SAJ14SAJ Ah, you wrote yourself a form manager? I used one on the last big Catalyst app I did (at work). I was going to try a new one for this, but decided it'd take a while to learn it...
 
so I write something like new Html.TextBpx { Name = "Fred", Value="Wilma" } Fred.Init(this)
and everything is done
 
And I've promised myself I will not write the next Perl form manager (there are already several) until I at least look at the ones people have already done...
 
O dpm
I don't know if I would be so fancy as to call it a form manager.
I think of it as an HTML rendererer.
That is smart enough to receive back the post with the exact same code, so the code object that sends the form and the one that receives it back are the same, usually.
 
The existing Perl ones range from ones that just help generating HTML elements; through ones that add a validation framework on top of that; through ones that integrate with the ORM to fully build the form, load the values, and save new ones; and even ones that abstract away the fact that a web app is made of individual HTTP requests...
 
6:01 AM
Mine, if you want to call it that, is much less ambitious.
 
It sounds like yours is around "help generating HTML elements"
 
It just renders HTML and receives back the values and puts them in POCOs.
YEs, but some of my HTML elements are..... more widget like. Like one that takes a sequence of data, and a line renderer, and then renders paged navigation.
Very useful for master - detail pages.
Another will render any sequence into a pretty HTML table.
 
Ah. So you've already gone beyond HTML elements. The next step is to add declarative validation ("this field must be an integer", "this field must be alphanumeric, length greater than 6").
 
That is a much more complex problem.
 
Then you have it generate JavaScript to also do the checks client-side for better UI :-P
 
6:04 AM
And I could.
But the effort to do that is not significantly less than doing it the old fashioned way.
 
and you'd have FormBuilder...
 
And I have the extreme, extreme advantage of writing in a closed ecosystem on a private network, in an application where no one will die.
 
@SAJ14SAJ Nah, declarative validation is nice. Also great that it makes it harder to forget to do.
 
So I do all the validation client side, and say screw it. I accept the risk for the reduced development cost.
 
@SAJ14SAJ That is nice. My previous one lives on the Internet.
 
6:05 AM
On the other hand, I always encode stuff because SQL injection is not a habit you want to have.
 
And had to run on IE6. Or was it 5.5...
 
You are write, I could certainly enhance the HTML renders to do send the validation code, and raise errors server side.
The hardest problem is when you get into non trivial stuff that requries regex.
 
@SAJ14SAJ Yeah—or better yet, use prepared statements. The ORM basically forces prepared statements.
 
And then you are beyond what can be done easily.
So its only easy dfor the easy stuff.
The way I write SQL is LINQ or paramaterized so it is also not susceptiable.
 
@SAJ14SAJ Well, doing simple regex isn't that bad. As long as your regex engine and JavaScript's are close enough.
 
6:07 AM
But I am always conscious of encoding.
@derobert I agree, and if this was an open source project anyone else would ever see or use. BUt it has ONE developer, and he is curmudgeonly. I don't have the time to research the common subset and validate it.
 
Hah. Yeah. That's a reason.
I guess you probably have the DB set up to reject any completely invalid junk anyway
 
Only in the most critical cases.
My users have no motivation to hack this stuff, so I don't really have to worry about malice, just stupidity.
The biggest problems would come from apostrophes in names and stuff.
 
I'm personally a fan of, if its reasonably possible to express a constraint in the DB, do so. I wish pgsql supported more CHECK constraints than it does.
 
I find that putting too many constraints in the db really inhibits agile evolution.
 
Hmmm, DB constraints are fairly easy to change...
 
6:11 AM
Not with prod data.
It is only easy to relax them.
And even then, it is not always easy.
 
Sure. But if you're going to enforce a heightened constraint, you have to fix the data, regardless of where you enforce it. Unless you only plan to enforce it for new data.
 
But mostly I know just enough SQL to get by.
In the kind of work I do, you almost always can only enforce for new data.
But the way I deal with the problem, and I am very aware this is not right for many or even most application environments, is that each of my business objects or modules has a Manager object (you would probably call it the Model) in C# that manages the busienss rules, and treats the SQL side as a persistence target only.
 
Ah. Yeah, then those can't go on the DB. Unless your DB can be told to only enforce it for new data (which, depending on the constraint, is possible)
Yeah, I'd call the the Model.
 
That is probably a result of where my expertise lies.
I can write C# code to implement business rules a lot., lot, lot faster than I can write T-SQL.
Even writing an insert or update stored proc in T-SQL is an exervise in serious pain.
And really, really, really painful to maintain.
 
I mostly avoid stored procedures in the database too. Except when I really need them in SQL.
 
6:15 AM
The reason for that code is that one of my most common use cases is data loading.
 
Thankfully, PostgreSQL lets you write them in the language of your choice. You can write them in Perl, for example. Or JavaScript.
 
So I just want to send the whole bloody file to the server once, and not round trip for load, compare, update, read next time.
@derobert I know that you are a #1 postgres fanboy :-) But my options are SQL server, SQL Server, SQL server, or, if I am feeling really, really wacky, SQL server.
Because that is what I have dev licences for in our EA, and what Dell will support.
Since I am not going to do ORacle, nor pay for it.
 
Hah. But you don't need PostgreSQL licenses. :-P
 
Support is an issue.
 
And you can supposedly write SQL Server stored procedures in any CLR language... Never done it, of course.
 
6:19 AM
I haven't either. T-SQL is a horrible, horrible language. Its even horrible for queries.
But most of that is because SQL is horrible for queries.
 
Of course, you probably still get to use SQL eventually
But yeah, I hate SQL's INSERT syntax.
 
And why is insert so radically different than update that you cannot copy/paste from one to the other?
 
INSERT INTO table (col1, col2, col3, col4) VALUES (1, 2, 3, 4)
 
Yes, that is horrible horrible.
 
... bloody you expect me to match those up?!
 
6:21 AM
Non local dependencies.
Yes, and I have tables with 40 columns.
 
Some databases allow a much nicer syntax.
INSERT INTO table SET col1=1, col2=2, col3=3, col4=4;
... which of course is the UPDATE syntax.
 
And don't get me started on how nested queries where you have subselects are bloody difficult to write and impossible to debug.
 
#1 benefit of the ORM, never having to deal with that crap.
 
Yeah, but then you get into the difficulties of ORMs themselves ;-)
 
	# FIXME: This winds up pulling the jpeg...
	my $row = $c->model('Pool::Pass')->find($pass_no, {
		prefetch => {
			passholder => { family => { unit => 'street' } ,
			                age_group => undef },
		},
	});
that would be a scary join, if done in SQL. It's joining 5 tables.
But the ORM insists on pulling in one of the columns which happens to be a blob
 
6:24 AM
YEah, I usually do that sort of thing in my manager objects too.
What is the => operator?
 
It's a perl operator, it's the same as comma, except that it quotes the value before it
 
I don't know what that means.
 
basically that's building up a nested key-value stores
$var = { key1 => 'value1', key2 => 'value2' }
and you can nest them:
 
So it creates a key-value pair?
Or more properly, expresses one.
 
$var = {
    key 1 => 'value1',
    key2 => {
       subkey1 => 1,
       subkey2 => 2,
   },
};
 
6:28 AM
I am assuming that { } is perl for a tuple of some sort then?
 
@SAJ14SAJ well, it's actually the { that is making the key-value thing
 
Okay, so it isn't an operator, so much as part of the syntax for maps.
 
$var = { key => 1 } and $var = { 'key', '1' } do the same thing
=> is an operator, you can use it in other places, it really is just a comma which implicitly quotes the thing before it
 
I am sure that makes sense if you know all of perl's semantics.
 
so, e.g., if you have a function f, f('a', '1') is the same as f(a => 1)
the key thing being if you don't quote that a, it could wind up being evaluated. Say, if you had a function or constant called a.
 
6:31 AM
Well.... this old dog isn't going to learn a lot of perl tricks :-)
Wouldn't you want it to be evaluated in many circumstnaces. The equivilent of Java
doing x.get("literal") versus x.get(value)
 
They do different things (the two Java examples)—but since Perl has very easy to build maps, they're used for all kinds of things.
 
Sure, maps are probably one of the most important fundamental data structures.
Its just we didn't have them in the early days, because they are very espensive to do in the arbitrary case.
Give me a list, and a map, and I can solve almost any data problem.,
 
Perl uses maps all over the place. For example, you might call a function like:
f({ color => 'red', type => 'circle'})
that way, you get to name the parameters going into the function, instead of just using positional ones
Perl also doesn't have C-like structs, and uses maps instead.
Perl objects are typically maps as well.
so, e.g., your member variables are actually map keys.
 
Yeah, one of the features I really like in C# is that you can at the calling site choose to name the parameters, and then the positional order is no longer important.
 
Yes, it's much nicer, and much more self-documenting than positional parameters, for a function of any complexity.
 
6:38 AM
Yeah, really key for intenral DSLs.
 
But anyway, since Perl uses hash keys all over the place, and typically they're strings, it has special syntax (the => operator) to make it easier.
 
There must be something else in the perl semantics to make that make sense, but I will take it as read.
 
@SAJ14SAJ does C# make you quote all strings? I'd guess so. (Most languages do)
 
Pretty much.
 
Perl folks got tired of typing all those quote marks.
 
6:41 AM
Yeah, quote marks are a bitch. They have to deal with all those $ signs, so their typing fingers are tired :-)
 
Hah.
 
I imagine perl that generates jQuery javascrip is nearly impenetrable. :-)
 
At least we get something for all those $ marks, unlike some other dynamic languages...
@SAJ14SAJ Well, you can turn off $ being special inside a string. But yeah, could get confusing!
 
The only dynamic languages I know are lisp (eeew), python (bleh), and Javascript (my feelings are too complex for one word).
Yeah, one of hte nice features of C# is strings can be "" or "" or "". Except you can do @"" which turns off all of the internal escaping.
Really nice for building regedxes and javascript and stuff.
 
Perl strings are "string" (interpolates $var, \n, etc.); 'string' (does not). Then there are the q and qq strings, which allow any delimiter (q does not interpolate, qq does). E.g., you can use braces: q{string}. There are /string/ (regex) strings as well, and qx which is like qq but marks a regex.
when you use braces or parentheses for your q/qq/qr delimiter, it even makes them pair right. E.g., q{string{inside}still string} works
 
6:47 AM
Is interpolate a perl term of art?
 
@SAJ14SAJ possibly.
 
Why did you choose perl? A language you know well?
 
Yeah.
 
I thought all the cool kids had moved on to Ruby on Rails for this sort of ting.
 
I've tried Rails before, didn't much care for it. With what I was trying it on before, it was a problem because it insisted that the DB shall be layed out like X: the fields named so-and-so, and the tables this-and-that, etc. That wasn't going to happen, because the database already existed and other apps use it.
Was a constant fight to try and override all of that.
In this case, I suppose it would have been fine—the db is only for this one app
 
6:50 AM
You didn't want to create new views jsut to relabel everything to fit the framework? Seems lazy!! ;-)
I know nothing about Ruby except it is like perl, only red. Or Rails.
I agree, sometimes using the rock you know is better than trying to learn a fancy new hammer.
 
Its been too long since I used Ruby to try and do this thing in Rails.
Would have added a nice delay while I relearned Ruby.
brb
back
 
And here we are, still both awake :-)
 
and I haven't had a commit in the last 2h :-(
 
Save early, safe often?
 
7:10 AM
Hah, haven't done anything except chat.SE :-(
 
I know that I am not that amusing.
 
7:25 AM
One of the next things I need to figure out is generating PDF.
I wonder if PDF::API2 will be easier, or PDF::Create, or (oh noes) Apache FOP.
Wikipedia tells me XSL-FO can't do layout driven design, which is what I need, so I guess that rules out FOP.
I guess LaTeX would be a possibility too. But I was sort of hoping there is a chance of this app running on Windows.
And there won't be if I'm doing a bunch of calls to external formatting programs.
PDF::Report seems to be another.
@SAJ14SAJ of course, bed is calling. Bed is sounding more interesting than PDF generation, and growing more interesting by the minute!
 
@derobert In almost every circumstance I have needed to make PDFs, I just send it through a PDF printer, then pick up the file. Ugly horrible cheat, but there you have it.
Good night.
 
@SAJ14SAJ Hah. In this case, my goal is to immediately feed the generated PDF to the printer!
 
Then why PDF?
HTML > PDF Printer > Printer :-)
 
Printers don't speak HTML...
 
Mostly they speak PCL or HCL or PostScript.
 
7:33 AM
They speak PDF, or PostScript, or PCL, or weird proprietary things
 
You realize that PDF is essentially wrapped PostScript :-)
 
Wrapped and limited, yes
 
Its also nearly identical to AI files :-)
 
I could generate PostScript I suppose. But I don't think that's a win...
 
Eeeeeww.
I say generate HTML, and let some external process worry about formatting and printing.
 
7:35 AM
I have a copy of the Postscript book on the shelf behind me. I think I'll do my best to avoid generating Postscript.
 
That is the only sane approach.
Or go old school, and generate troff files ;-)
 
Hah.
 
Thank you for getting that joke
 
You think its obsolete, but, no, I've written them before. Manpages are still written in it.
 
Wow.
 
7:38 AM
run man on a Unix or Linux system, and you're using troff & friends
 
I haven 't run man in decades. Google is easier.
You could go truly old school, and write 80 column 7-bit ASCII. Most printers can still handle that.
 
But anyway, the advantage of generating PDF files is that CUPS (print server commonly used on Linux, and also I believe Mac OS X) speaks PDF.
You can feed it other things, but it just converts them to PDF
 
What the bleep does it matter what a print server speaks? Why would it even care what is in the payload?
Unless is is more than a print server.
 
It takes documents in any number of formats, and converts them to whatever format the printer actually needs. You can give it a blob in the right format for the printer and ask it to pass it through, but normally you don't.
For the most part, you give it PostScript or PDF.
 
I don't know what you call that service, but it is a lot more than what I would call a print server.
 
7:43 AM
Yeah. Unix print servers do more than Windows ones.
Windows insists on each client having knowledge of printer details, Unix doesn't.
Of course, I got a new $100 printer recently. It speaks PDF (and other things too)
 
Remember, I am older than you. Unix print servers didn't used to. THey just passed through like any others. Like lpr.
We do live in a golden age.
 
@SAJ14SAJ yeah, lpr used to. When the only printer you'd ever connect was guaranteed to speak PostScript
 
I have been doing this longer than PostScript. I have been doing this longer than LaserPrinters.
 
then the second people wanted to start connecting cheaper printers, well, it had to gain the ability to translate PostScript to whatever the printer spoke
 
You know what lpr stands for, yes? :-)
 
7:46 AM
Yeah. It does predate common use of laser printers, I suppose.
I've never seen a true line printer. Only laser printers that'd emulate them if you spewed ASCII to them.
 
:-)
Okay, now I really think you are young
I used to want an Epson-MX80 so badly. Along with the HP LaserJet III probably one of the two all-best for the era printers of all time in the PC universe.
 
I think the oldest one I've used was a LaserJet 4.
 
They could print a page in only several minutes.
You could even set the print head to only print in one direction for higher quality for graphics.
Or print in both directions for higher speed.
 
I did use ImageWriter II's.
So I've seen dot-matrix printers.
 
:-)
Did you ever see a band printer?
 
7:54 AM
Nope.
 
They had the letters formed on a big metal band, maybe a yard across.
Multiple copies of each letter.
They were a very fast impact printer.
Usually for big batch jobs from mainframes or at dispatch centers that didn't get the giant equipment.
 
8:09 AM
Wow, it's 4am. I'm going to bed.
 
Good night
 
 
9 hours later…
5:15 PM
Interesting. The "wet messy dough" question is now on the hot list. Weird, so far the question has 2 answers with one upvote apiece and 2 upvotes for the question itself. Is it that "wet and messy" sounds sexy? That seems to be one of the qualities that gets questions on to the hot list.
 
5:38 PM
You are a strange puppy, Josie.
 
5:52 PM
Yeah, I've heard that before. :)
 
Just use white wine, screw the recipe.
 
I've done that, and it's turned out ok, but it can look a bit funny.
 
Who cares?
 
I tend to keep Vermouth and Sherry in the pantry. 90% of the time, one of those will satisfy my cooking wine needs.
 
I like the little 4-packs of chardonnay.
 
6:13 PM
When I do buy wine, I tend to get the 4-packs too, since I won't drink the rest of the bottle. I could give the rest of the bottle to my neighbor, but that's problematic itself.
Today's Easter, isn't it? No wonder it's so dead around here.
 
Yes, the Christians are having their high holy days.
I find the little bottles hold just enough for one recipe, and if there is a touch left over, the sink handles the problem.
But this is not so slow for a Sunday, they typically are not jumpin' days.
 
7:00 PM
I am having delivery Chinese on Easter. Some traditions are important!
 
I'll buy Cadbury cream eggs next week! That's my big Easter tradition.
 
It is one I just cannot join you in.
Want a fortune cookie? I am only about 4k miles away.
 
The cookie would probably break in transit. I think that's bad luck.
 
I wasn't going to send it to you.
Plus it was probably made in San Fransisco anyway, so it has already travelled about 3k miles.
 
I removed the sutures in my thumb yesterday. It looks like I am going to live!
 
7:09 PM
I am sure your ultimate demise will be to a predatory giant cabbage.
 
Seems likely.
 
Does your neighbor ever deny talking to someone and look shifty?
Its probably the cabbage.
 
I meant to tell you. I made that Chicken Adobo, it turned out great. Super easy, very tasty.
 
Excellent.
 
 
1 hour later…
8:34 PM
Should be illegal!
 

« first day (1319 days earlier)      last day (3659 days later) »