code logs -> 2013 -> Mon, 10 Jun 2013< code.20130609.log - code.20130611.log >
--- Log opened Mon Jun 10 00:00:19 2013
01:43 Typherix is now known as Typh[Offline]
01:48 Typh[Offline] is now known as Typherix
02:01 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.]
02:04 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code
02:20 Chutzpah [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [Ping timeout: 121 seconds]
02:22 Chutzpah [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code
02:37 Typherix is now known as Typh[Offline]
02:38 Kindamoody[zZz] is now known as Kindamoody
02:39 Typh[Offline] is now known as Typherix
02:44 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
02:45 Vorntastic [Vorn@Nightstar-d38ffd77.sub-70-211-8.myvzw.com] has joined #code
02:57 ToxicFro- is now known as ToxicFrog
02:57 mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ
03:12 Vornlicious [Vorn@Nightstar-76d3e9bd.sub-70-211-9.myvzw.com] has joined #code
03:15 Vorntastic [Vorn@Nightstar-d38ffd77.sub-70-211-8.myvzw.com] has quit [Ping timeout: 121 seconds]
03:19 Harlow [Harlow@Nightstar-fe8a1f12.il.comcast.net] has joined #code
03:20
< Harlow>
quick question whats the fastest backend web programming language (execution time) Specifically is .net faster than php?
03:21
< Turaiel>
I have no idea
03:21
< Turaiel>
I hate .NET (ASP) for web uses
03:21
< Turaiel>
I'm sure it's incredibly useful, but meh
03:21
< Turaiel>
I don't want to have to run a Windows server
03:21
< Vornlicious>
Don't use php anyway.
03:21
< Turaiel>
I totally didn't notice this was #code and wondered why Vorn was here.
03:21 * Turaiel slips away now.
03:22
< Vornlicious>
Technically you can write your web backend in c if you're that worried about speed. (You're not)
03:23
< Vornlicious>
My personal thing - and this is becoming more true - is to build a simple page
03:24
< Vornlicious>
Er, static page for sending that requests and jses up the true data.
03:25
< Vornlicious>
Where the true data is in a tiny, simple format.
03:28
<@Reiv>
And it gets CSS'd to hell and back?
03:29
< Vornlicious>
turned itno html first but yes.
03:34
< Vornlicious>
The fastest code is that which never runs, the fastest download is that which is already on the user's computer.
03:35
< Turaiel>
I don't like doing things on the client side unless absolutely necessary
03:36
<@Reiv>
There is truth to this. Clientside processing means they've already got the data.
03:36
<@Reiv>
Worse yet, they've got the code.
03:37
< Vornlicious>
They have the view code and that's it.
03:38
< Vornlicious>
Which is the trivial part.
03:39
< Vornlicious>
And the data used to build the page. Which is already in the page...
03:41 Typherix is now known as Typh[Offline]
03:44 Vornlicious [Vorn@Nightstar-76d3e9bd.sub-70-211-9.myvzw.com] has quit [[NS] Quit: Bye]
03:46
<~Vornicus>
I don't like doing things on teh server side unless absolutely necessary. Clients have computers, they can turn data into pretty pages all they want. And if you're honestly worried about data you put on your page getting out, well, ask TF about GHDL.
03:48 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
03:52
<&ToxicFrog>
Reiv: and? If you want to show them the data, it has to be on their computer at some point.
03:58
<~Vornicus>
And given a page, it's very easy to determine the data that went in and some close approximation to the code that generated it.
04:04
<@Azash>
04:22 < Vornlicious> Technically you can write your web backend in c if you're that worried about speed. (You're not) < Or Erlang
04:50 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
04:50 mode/#code [+o himi] by ChanServ
06:06 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has joined #code
06:46 Harlow [Harlow@Nightstar-fe8a1f12.il.comcast.net] has left #code ["Leaving"]
06:58 thalass [thalass@Nightstar-e6e7c88d.bigpond.net.au] has joined #code
07:49 Turaiel is now known as Turaiel[Offline]
08:04 Kindamoody is now known as Kindamoody|out
08:08 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has quit [[NS] Quit: Leaving]
08:16 You're now known as TheWatcher[afk]
08:22 thalass is now known as Thalass|KSP
08:41 Chutzpah [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [[NS] Quit: ]
08:52 Thalass|KSP is now known as Thalass|redeclipse
09:33 VirusJTG [VirusJTG@2B12AA.572255.206A2A.901581] has joined #code
10:06 VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
10:06 Netsplit *.net <-> *.split quits: jerith, Syka, Reivles, @sshine, @Azash, @Reiv, jeroud, VirusJTG, @PinkFreud
10:07 Netsplit over, joins: @PinkFreud, @Reiv
10:10 Syka [the@Nightstar-5ed21491.iinet.net.au] has joined #code
10:10 Reiver [quassel@Nightstar-3762b576.co.uk] has joined #code
10:11 jerith [jerith@Nightstar-bf52129d.slipgate.za.net] has joined #code
10:11 sshine [simon@Nightstar-2aa33f9d.pronoia.dk] has joined #code
10:11 mode/#code [+ao jerith jerith] by ChanServ
10:17 Azash [ap@Nightstar-339920e6.net] has joined #code
10:17 mode/#code [+o Azash] by ChanServ
10:32 You're now known as TheWatcher
11:43 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has quit [Ping timeout: 121 seconds]
11:47 Alek [omegaboot@Nightstar-56dbba0f.in.comcast.net] has joined #code
11:47 mode/#code [+o Alek] by ChanServ
12:07 VirusHome is now known as Pandemic
12:08 mode/#code [+o Pandemic] by ChanServ
12:16 jeroud [uid10043@Nightstar-7fd75919.irccloud.com] has joined #code
12:33 VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Client closed the connection]
12:34 VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
12:45 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Operation timed out]
12:49 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
12:49 mode/#code [+ao Derakon Derakon] by ChanServ
13:08 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
13:10 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
13:10 mode/#code [+ao Derakon Derakon] by ChanServ
13:22 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ]
--- Log closed Mon Jun 10 13:30:31 2013
--- Log opened Mon Jun 10 13:30:36 2013
13:30 TheWatcher [chris@Nightstar-3762b576.co.uk] has joined #code
13:30 Irssi: #code: Total of 37 nicks [16 ops, 0 halfops, 0 voices, 21 normal]
13:30 mode/#code [+o TheWatcher] by ChanServ
13:31 Irssi: Join to #code was synced in 38 secs
13:42 VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Connection reset by peer]
13:42 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
13:43 Thalass|redeclipse is now known as Thalass|KSP
14:27 You're now known as TheWatcher[afk]
14:32 Typh[Offline] is now known as Typherix
15:26 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
15:26 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
15:26 mode/#code [+ao Derakon Derakon] by ChanServ
15:32 Typherix is now known as Typh[Offline]
15:32
<@Azash>
Aw yeah
15:33
<@Azash>
I am genuinely pleased, I apparently was worth a 3/5 in the AI exam \o/
15:42
< RichyB>
bzzzzzt MAKING A NOTE HERE bzzzzclnnnnnCLUNKtrundletrundle GREAT SUCCESS neeeet
15:43
<@Azash>
Pretty much :b
15:50 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Operation timed out]
15:52 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
15:52 mode/#code [+ao Derakon Derakon] by ChanServ
15:57 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
16:13 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
16:13 mode/#code [+o himi] by ChanServ
16:33 Turaiel[Offline] is now known as Turaiel
16:35 Typh[Offline] is now known as Typherix
16:50 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
16:50 mode/#code [+o celticminstrel] by ChanServ
17:00 Thalass|KSP is now known as Thalass|slep
17:24 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
17:38 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
17:38 mode/#code [+o himi] by ChanServ
17:46 VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
17:47 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds]
17:49 Typherix is now known as Typh[Offline]
19:20 Kindamoody|out is now known as Kindamoody
19:23 Turaiel is now known as Turaiel[Offline]
19:41 Derakon_ [chriswei@Nightstar-06e9d92f.east.verizon.net] has joined #code
19:41
< Derakon_>
Argle bargle fargle.
19:41
< Derakon_>
Why did I bother writing a style guide, if none of the contributors are ever going to read it?
19:42
< Derakon_>
Third time now I've had to remind this guy to put three spaces around class definitions, and I'm pretty sure this isn't the first time I've told him to avoid "from foo import bar" wherever reasonable.
19:42
<@Azash>
Moral high ground
19:44
< jeroud>
Derakon_: Reject his patch.
19:44
< Derakon_>
Well, I'm not accepting it in the state it's in.
19:45
< Derakon_>
But I'm getting tired of doing a code review and having most of the comments be "in this file, you failed to follow the style guide at this point".
19:47
< Derakon_>
On the one hand, I want to encourage community involvement in the code. On the other hand, I want to maintain as clean a design as possible, and thus far the other devs haven't demonstrated that they can match my standards, which leaves me in the role of dictator and also means I have to personally review every change.
19:47
< Derakon_>
Bleh.
19:49
<@Azash>
Imagine that you're Linus
19:49
< jeroud>
Derakon_: Is there a tool that can check for style violations?
19:49
< Derakon_>
Linus has enough street cred to be able to cuss out developers without having them lose interest in contributing.
19:49
< jeroud>
We use pep8 and pyflakes.
19:50
< Derakon_>
There isn't one that would catch everything.
19:50
< Derakon_>
E.g. Pyrel requires boolean variables to have state-of-being names, e.g. "isComplete" not just "complete".
19:50
< jeroud>
Sure, but you can automate the simple stuff.
19:50
< Derakon_>
I don't recall exactly what PEP8's style is but it's fairly close to Pyrel in terms of layout, anyway.
19:51
< jeroud>
Sounds closer to the Twisted style guide, actually.
19:51
< jeroud>
And they've recently built a tool for that.
19:58 Kindamoody is now known as Kindamoody[zZz]
20:04 * Derakon_ makes a general-comments block at the top of his review saying "read the style guide, stupid; particularly, don't use "from foo import bar"; have more whitespace; leave spaces around arithmetic and after commas; have more comments."
20:04
< Derakon_>
Code review is now 374 words and I'm about halfway done.
20:06
< ErikMesoy>
What should he use? import foo.bar ?
20:07
< Derakon_>
Yes.
20:07
< Derakon_>
And then use "foo.bar" elsewhere in the code.
20:07
< Derakon_>
Namespaces, motherfucker, do you speak them?
20:11
< Derakon_>
Oh wait, no, I'm nowhere near half done. The website diff cut off after awhile because it was too big.
20:13
< jeroud>
Derakon_: I generally prefer "from foo import bar" for most things that have usefully named "bar".
20:13
< Derakon_>
Jeroud: I generally prefer knowing exactly where any given entity came from without having to search the file for where it was created.
20:14
< Derakon_>
I'll grant that my stance is not objectively correct in every situation, but it's the Pyrel style guide, so it ought to be followed when making changes to Pyrel.
20:14
< jeroud>
It tells me which subset of foo is actually being used and avoids very.long.dotted.names.
20:14
< Derakon_>
very.long.dotted.names are fantastic.
20:14
< Derakon_>
I mean, yeah, their vebosity can get excessive sometimes.
20:15
< Derakon_>
But the vast majority of the time (IME) they're just a bit annoying to type.
20:15
< Derakon_>
But typing code is easy.
20:15
< Derakon_>
Reading code is hard.
20:15
< Derakon_>
Make reading code easier whenever you can.
20:15
< jeroud>
It assumes all imports are nicely arranged at the top.
20:15
< Derakon_>
As they should be.
20:15
< Derakon_>
It's still easier to read a namespaced symbol.
20:16
< jeroud>
I find "SomeClass(blah)" easier to read than "module.SomeClass(blah)".
20:16
< Derakon_>
And I don't.
20:16
< Derakon_>
As I said, it's not objectively correct.
20:16
< Derakon_>
But it's the Pyrel style guide.
20:17
< Derakon_>
IOW you are free to have your opinion, and if I ever submit a change to your project then I'll try to follow your style, as distasteful as I may find it to be. :)
20:17
< jeroud>
I'm not saying you're wrong, and consistency definitely wins.
20:18
< jeroud>
If a project has a published and reasonably easy to find guide, I follow it.
20:21
< Derakon_>
(FWIW https://bitbucket.org/derakon/pyrel/wiki/StyleGuide )
20:24 Pants [kvirc@Nightstar-af81524b.sasknet.sk.ca] has quit [Client closed the connection]
20:35
< Derakon_>
Augh he named a variable "list_"!
20:37
<@McMartin>
Only acceptable for container classes~
20:38 Turaiel[Offline] is now known as Turaiel
20:40 * Derakon_ is rapidly adjusting his assessment of this developer's coding experience. ?.?
20:42
< Derakon_>
He just used "_" as a variable name.
20:42
< Derakon_>
I get that it indicates "You shouldn't care what this is" but it strikes me the wrong way.
20:43 * Derakon_ hits 570 words in the code review, is 33% done, decides to refuse to review further until the developer fixes style problems.
20:44 Turaiel is now known as Turaiel[Offline]
20:45 Turaiel[Offline] is now known as Turaiel
20:50
<@celticminstrel>
... "import module.name" works?
20:50
<@celticminstrel>
Where name is not a module?
20:51
< Derakon_>
No, "import module.submodule" works.
20:51
< Derakon_>
"import module.name" will confuse the parser because "module" hasn't been defined yet, so it can't access "name".
20:52
<@celticminstrel>
Oh, maybe I misunderstood what was being discussed. :/
20:52
< Derakon_>
No worries.
20:54 * ErikMesoy trollfaces. "from module import submodule as long.punctuated.name" :P
20:56
< Derakon_>
Oh Erik. Erik Erik Erik.
20:56
< Derakon_>
You have not begun to see the horrible things you can do with imports.
20:57
< Derakon_>
module1: "def view(?): ? def view2(?) ?"; module2: "from module1 import*; view = view2" ? module3: "from module2 import *; ? view()"
20:58
< Derakon_>
That's pretty much a verbatim transcript from some code I found at work that, fortunately, no production code I am responsible for relies on any longer.
20:58
< Derakon_>
Of course, all of the "?"s should be replaced by lots of spaghetti code and/or poorly-named and uncommented variables.
21:00
< Derakon_>
(Note in particular that if you grep for "def view()" you will find the wrong function)
21:24
< jeroud>
Derakon_: I can't remember if "_" remains unbound when used as an lvalue in Python or if that's just Erlang.
21:25
< jeroud>
I generally use "_foo, bar, _baz = somesequence" when unpacking stuff I only want bits of.
21:26 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
21:30 * Derakon_ nods.
21:30
< Derakon_>
That seems reasonable.
21:30
< Derakon_>
I just attach normal names to the unused components and then, well, never use them.
21:37
< jeroud>
Derakon_: pyflakes complains about unused variables if you do that.
21:37
< jeroud>
And it's also not clear that you're ignoring them.
21:39
< Derakon_>
Yeah.
21:39 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
21:39 mode/#code [+o himi] by ChanServ
21:40
< Derakon_>
Unused variables as a side-effect of multiple return values doesn't bug me especially, though.
21:41
< jeroud>
While I'm focusing on the bits of your style guide I disagree with, I still think it's a really good thing that you have one at all and that you follow it consistently.
21:42
< jeroud>
And agree with almost all of it.
21:42
< Derakon_>
\o/
22:03 Typh[Offline] is now known as Typherix
22:11 Derakon_ [chriswei@Nightstar-06e9d92f.east.verizon.net] has quit [[NS] Quit: This computer has gone to sleep]
22:11 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
22:13 chriswei_ [chriswei@Nightstar-06e9d92f.east.verizon.net] has joined #code
22:13 chriswei_ is now known as Derakon_
22:25 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
22:25 mode/#code [+o himi] by ChanServ
22:35 You're now known as TheWatcher
22:53 Derakon_ [chriswei@Nightstar-06e9d92f.east.verizon.net] has quit [[NS] Quit: Leaving]
23:10
< RichyB>
Derakon: I use "_" as a dummy name in pattern matching sometimes because it's a habit taken from Haskell, where "_" is not a valid identifier but is a valid placeholder in patterns.
23:11 ErikMesoy is now known as ErikMesoy|sleep
23:23
< Turaiel>
Question about MVC
23:24
< Turaiel>
How much is the view actually supposed to process/store?
23:24
< Turaiel>
I'm using WPF, and I want to use data bindings for a few things. Should the view just keep accessing the controller to get data, or should it store some data itself?
23:26 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
23:26
< RichyB>
Keep accessing the controller for data.
23:28
<@McMartin>
It might be possible to have the view subscribe to an event where the controller will push changes at you.
23:32
< Turaiel>
Hmm
23:33
< Turaiel>
So events triggered on the view side should also be forwarded to the controller?
23:33
<@McMartin>
If you're using C# here, multicast delegates are pretty boss
23:33
<@McMartin>
Yeah, I'd use those for the view telling the system "hey, the user just did X" and also for the system telling the view "hey, Y just happened and the user should be informed"
23:36
< Turaiel>
http://i.imgur.com/kbfvdZD.png This is the view. The part that confuses me is getting the controller to recognize which one needs to be updated or has been triggered
23:36
< Turaiel>
Since they should probably not even store their own ID
23:37
<@McMartin>
Mmm
23:37
<@McMartin>
I'd be OK with the view being able to map model-names for things to view locations.
23:38
< Turaiel>
I've never actually used MVC before, mostly because I could never understand it
23:38
<@McMartin>
The "C" part is kind of poorly explained and as best I can tell half the time the "C" is actually baked into the language runtime
23:38
< Turaiel>
So... should there be multiple model objects?
23:38
<@McMartin>
Like, I'm not sure that "C# has multicast delegates, so there you go" isn't the controller element *rigth there
23:39
< Turaiel>
Or one model with several objects contained within?
23:39
<@McMartin>
I lean towards the latter
23:39 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
23:39 mode/#code [+o himi] by ChanServ
23:39
<@McMartin>
The design patterns guys call that the "Facade" pattern
23:39
<@McMartin>
I call it "it's a module"
23:40
< Turaiel>
So, when a new source is created, the controller should add it to the model, and subsequently create a view for it, right?
23:40
< Turaiel>
In this case, the view is one of those media controls
23:41
<@McMartin>
Hmm
23:41
<@McMartin>
I'd go
23:41
<@McMartin>
(And I'm pretending the controller is invisible here)
23:41
<@McMartin>
View: "HEY, THE USER CLICKED NEW SOURCE"
23:41
<@McMartin>
Model: "Hey view, a new source is available"
23:42
<@McMartin>
View: *Silently adds that source to its pictures, keeps track of the name the model called it, so that...*
23:42
<@McMartin>
View: "HEY, THE USER CLICKED PLAY ON THE SOURCE NAMED 'greeble'"
23:43
< [R]>
That seems... inefficient and somewhat pointless.
23:43 * [R] never really liked MVC anyways though
23:44
<@McMartin>
R: The alternative is mixing your actual logic with the GUI code
23:44
<@McMartin>
This is A Right Pain In The Ass especially when it comes out a week after you're done that you'd really like to also be able to script the functionality
23:44
<@McMartin>
The great part about model/view split is that the model can be driven by any interface you want; GUI, CLI, webapp, whatever
23:45
<@McMartin>
Controller is how you effect the split, more or less.
23:45
<@McMartin>
In C#, you can make that look, syntactically, like a function call
23:45
<@McMartin>
But it's actually a publish/subscribe thing, so that can result in a series of calls to different components
23:46 * [R] just does shim stuff.
23:46
< [R]>
Where the UI gets callbacks to shims, which will call the appropriate objects and/or methods.
23:47
< [R]>
Then all the "bussiness" logic is in those objects and its methods.
23:47
<@McMartin>
Those objects and their methods are the "model"
23:47
<@McMartin>
The UI the "view"
23:47
<@McMartin>
The shims and the actual event loop that dispatches user input if you have to do it is the "controller"
23:47
<@McMartin>
I'm less clear on that last one than the first two
23:48
<@McMartin>
"Controller" is also where all of the dependency injection bullshit goes in frameworks built out of dependency injection
23:48
< [R]>
Heh
23:48 * [R] likes DI
23:48
<@McMartin>
It's great for quick deployment
23:49
<@McMartin>
It doesn't stop the code written using it from being full of bullshit that ought to be handled by a higher-level language~
23:49 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
--- Log closed Tue Jun 11 00:00:37 2013
code logs -> 2013 -> Mon, 10 Jun 2013< code.20130609.log - code.20130611.log >

[ Latest log file ]