code logs -> 2013 -> Tue, 11 Jun 2013< code.20130610.log - code.20130612.log >
--- Log opened Tue Jun 11 00:00:37 2013
00:03
< Turaiel>
McMartin, so should I not actually have a Controller class?
00:03
<@McMartin>
Turaiel: Are you under any external constraints here?
00:03
<@McMartin>
I've actually never used WPF
00:03
< Turaiel>
What sort of constraints?
00:03
<@McMartin>
But in Windows Forms, I've found multicast delegates to be abstract enough that I saw no need for an explicit controller class
00:04
<@McMartin>
"Is this for a class where you are instructed to make a Controller as part of the assignment"
00:04
< Turaiel>
Oh, no
00:04
< Turaiel>
This is software for myself
00:04
<@McMartin>
Ah, OK
00:04
<@McMartin>
Yeah, I'd use events (which are syntactic sugar for the multicast delegates)
00:04
< Turaiel>
http://i.imgur.com/D4yOFL9.png :P
00:04
< Turaiel>
It's a little... empty
00:04
<@McMartin>
The event handler inside the .NET runtime is your "controller" here.
00:05
< Turaiel>
I'll have to figure out how events work
00:05
< Turaiel>
This program is getting more and more complicated, and I have 10 days to finish it xD
00:05
<@McMartin>
Let's see if there's a good one-page summary
00:05
<@McMartin>
Syntactically they're super easy
00:06
<@McMartin>
They're a field of delegate type (think function pointer) and you can assign to it with +=
00:06
<@McMartin>
Then when you "call that method" everything you've assigned to it with += gets called
00:06
<@McMartin>
So all the bits where I had Model or View shouting something in my answer is written down in the code as a call to one of "your own" methods
00:07
<@McMartin>
And the setup is having the model and the view register with each other by hooking their own listener methods into the other guy's events
00:07
< Turaiel>
..I should be making the view my list of controls rather than the controls themselves, shouldn't I?
00:07
< Turaiel>
Well, I guess it's a little of both
00:08
< Turaiel>
Since the play functions are in the controls
00:08
<@McMartin>
I'd give the view a list of UI widgets that it manages, and the model a list of data objects that do the work
00:08
<@McMartin>
Since that will presumably be similar but maybe not identical, and thus a good candidate for the interface-with-a-bunch-of-implementations thing.
00:09
< Turaiel>
When I click a particular one of those sources, it should raise a play event, which the model should catch, right?
00:10
< Turaiel>
So how does the model know which source raised the event?
00:11
<@McMartin>
Events can have arguments
00:11
<@McMartin>
You can specify arbitrary function signatures
00:11
<@McMartin>
So it can be "source X says Play"
00:11
< Turaiel>
Where would the events be defined?
00:12
<@McMartin>
Delegates (not sure about events) are also first-class things, so when registering, the model can also say "hey, call this function when you want me to play" and the view would then tuck that away
00:12
<@McMartin>
The entity that *sends* the event lists the event and the signature of the functions called by the event in itself as a public member.
00:12
<@McMartin>
The entity that receives the event subscribes with a line like target.eventmembername += myfunctionname
00:13
<@McMartin>
Where myfunctionname is a method in the receiver with a signature that matches the event's method signature, but
00:13
<@McMartin>
-but
00:14
< Turaiel>
Can you repeat the last couple lines abouve "The entity"?
00:14
< Turaiel>
I switched machines
00:14 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
00:14 mode/#code [+qo Vornicus Vornicus] by ChanServ
00:14
<@McMartin>
16:08 < Turaiel> Where would the events be defined?
00:14
<@McMartin>
16:08 <@McMartin> Delegates (not sure about events) are also first-class things, so when registering, the model can also say "hey, call this function when
00:14
<@McMartin>
you want me to play" and the view would then tuck that away
00:14
<@McMartin>
16:09 <@McMartin> The entity that *sends* the event lists the event and the signature of the functions called by the event in itself as a public member.
00:14
<@McMartin>
16:09 <@McMartin> The entity that receives the event subscribes with a line like target.eventmembername += myfunctionname
00:14
<@McMartin>
16:09 <@McMartin> Where myfunctionname is a method in the receiver with a signature that matches the event's method signature
00:14
< Turaiel>
Thanks
00:15
<@McMartin>
http://msdn.microsoft.com/en-us/library/awbftdfh.aspx is the official guide to their use.
00:15
<@McMartin>
This gets like a page in the O'Reilly book, which is where I picked them up
00:16
< Turaiel>
So... the entity that would be sending the event is a source control, correct?
00:16
<~Vornicus>
That is the shittiest page name
00:19 You're now known as TheWatcher[T-2]
00:20
< Turaiel>
For example, say that the user changed the preview image of the source... would the model have the "PreviewChanged" event and send it to the view?
00:20
< Turaiel>
Then the view would handle it by updating its image
00:21
< Turaiel>
That was a bad example. The image should change by itself when it's modified...
00:21
< Turaiel>
Replace "preview image" with "title" then
00:22
<@McMartin>
Turaiel: Hmm. Again, I only have experience with WinForms
00:22
<@McMartin>
But in WinForms the form designer has a tab for "events" - it's a lightning-bolt-y thing
00:23
< Turaiel>
Yes, there is that
00:23
< Turaiel>
But those are all predefined events
00:23
<@McMartin>
With a big list of events that the controls can fire, and then you can link those up to functions.
00:23
<@McMartin>
Right
00:23
<@McMartin>
You can make a custom event that behaves identically with a line like:
00:23
<@McMartin>
"public event void MyEvent(string);"
00:23
<@McMartin>
And that's an event that takes a string and returns void
00:24
< Turaiel>
Hmm
00:24
< Turaiel>
Where would that be stored?
00:24
<@McMartin>
Or rather
00:24
< Turaiel>
Main class?
00:24
<@McMartin>
Traditionally, in the class that sends the event.
00:24
<@McMartin>
Which might be your Source widget, or it might be the whole window.
00:24
<@McMartin>
If it's the whole window, you'd probably want an argument that says which source.
00:25
<@McMartin>
You might want that even if you didn't, so that you can more easily have one receiver subscribe to multiple sources and distinguish who it's from based on argument
00:25
< Turaiel>
Hm...
00:25 You're now known as TheWatcher[zZzZ]
00:25
< Turaiel>
This is confusing. :P
00:26
<@McMartin>
This is one of those places where it's so much easier to explain with a language that does lambda expressions >_>
00:26
< Turaiel>
But C# does lambdas
00:26
< Turaiel>
Brb... have to burn the garbage
00:26
<@McMartin>
A lambda is an anonymous delegate.
00:27
<@McMartin>
delegates are basically super-closures.
00:27
<@McMartin>
And events are those with some of the most common use cases made syntactically easier.
00:27
<@McMartin>
They're lists of lambdas under the hood.
00:27
<@McMartin>
And calling them calls each lambda in the list
00:27
< Turaiel>
You can write something like var += (s,e) => { function definitions here }
00:27
< Turaiel>
Which from what I've been told is a lambda
00:28
<@McMartin>
Yup
00:28
<@McMartin>
That's "add this lambda to my list of lambdas"
00:28
<@McMartin>
The thing that makes a lambda isn't that it's basically a function, though it is
00:28
<@McMartin>
It's that it's basically a function *and it has no name*
00:28
<@McMartin>
You can also do void foo(s, e) {....} in the same class and then have "var += foo;" and it's the same effect, more or less
00:37 Thalass|slep is now known as Thalass
00:49
< Turaiel>
Right. I'm aware of lambdas' anonymity :P
00:50
<@McMartin>
Right; I'm saying that's the part that makes them "special", as it were; you can use them define functions inline, and anywhere you can use a lambda you can use a named function or method of compatible signature
00:50
< Turaiel>
Mhm
00:50
< Turaiel>
Now I've gotta try and figure out the structure of this
00:54
< Turaiel>
Must go for a bit
00:54
< Turaiel>
Thanks
00:55
<@McMartin>
gl
00:55 Turaiel is now known as Turaiel[Offline]
00:55 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
00:56 mode/#code [+o himi] by ChanServ
01:17 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
01:28 Thalass is now known as Thalass|walkingbus
01:31 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
01:31 mode/#code [+o himi] by ChanServ
01:33 Turaiel[Offline] is now known as Turaiel
01:36 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
01:49 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
01:49 mode/#code [+o himi] by ChanServ
01:57 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.]
02:00 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code
02:07 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
02:10 Typherix is now known as Typh[Offline]
--- Log closed Tue Jun 11 02:16:04 2013
--- Log opened Tue Jun 11 03:16:08 2013
03:16 TheWatcher[zZzZ] [chris@Nightstar-3762b576.co.uk] has joined #code
03:16 Irssi: #code: Total of 37 nicks [17 ops, 0 halfops, 0 voices, 20 normal]
03:16 mode/#code [+o TheWatcher[zZzZ]] by ChanServ
03:16 Irssi: Join to #code was synced in 35 secs
03:18 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
03:27 Thalass|walkingbus is now known as Thalass|chores
03:31 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
03:31 mode/#code [+o himi] by ChanServ
03:35 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Connection closed]
03:55 Typherix is now known as Typh[Offline]
03:59 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
03:59 mode/#code [+o himi] by ChanServ
04:04 Kindamoody[zZz] is now known as Kindamoody
04:07 VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
04:14 Typh[Offline] is now known as Typherix
05:36 ErikMesoy|sleep is now known as ErikMesoy
05:56 Typherix is now known as Typh[Offline]
06:00 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
06:14 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
06:14 mode/#code [+o himi] by ChanServ
06:20 Kindamoody is now known as Kindamoody|out
06:26 Thalass|chores is now known as Thalass
06:38 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:32 Turaiel is now known as Turaiel[Offline]
07:41 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
08:14 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
08:14 mode/#code [+o himi] by ChanServ
08:35 You're now known as TheWatcher
09:31 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
09:44 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
09:45 mode/#code [+o himi] by ChanServ
10:46 Syka_ [the@Nightstar-2b84c472.iinet.net.au] has joined #code
10:46 Syka_ [the@Nightstar-2b84c472.iinet.net.au] has quit [[NS] Quit: leaving]
10:47 Syka_ [the@Nightstar-2b84c472.iinet.net.au] has joined #code
10:49 Syka [the@Nightstar-5ed21491.iinet.net.au] has quit [Ping timeout: 121 seconds]
10:51
<@McMartin>
Why am I hacking stuff for work at ten 'til three, seriously
10:51
<@McMartin>
wtf, brain
10:53
<@froztbyte>
when else would you do it? ;p
10:53
<@froztbyte>
I've often found a lot of my good brainwork happens when I'm pretty tired
10:54
<@froztbyte>
somehow it just gets better at cutting through irrelevant bullshit at that time
11:08 * TheWatcher ughs, bashes his brainmeats against this problem to try and find the cracks in it
11:08
<~Vornicus>
those are 'wrinkles', not cracks
11:11 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
11:25 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
11:25 mode/#code [+o himi] by ChanServ
11:38
< AnnoDomini>
Why the fuck every site with downloads makes their files into downloaders?
11:39 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
11:43
< RichyB>
Because they're too silly to just use bittorrent.
11:46
<@gnolam>
So they can infect you with malware.
11:48
< RichyB>
I buy that proposition for most sites, gnolam.
11:48
< RichyB>
It's a little odd when, say, GoG does it, though.
11:48
<@gnolam>
True. Or Microsoft.
11:49
< RichyB>
GOG don't need to malware my PC to extract money out of me; they already have a mechanism whereby they wave videogames in my face and then I authorise blobs off money on my credit card.
11:57
<@McMartin>
GOG does it because people asked for batch downloads when they buy what turns out to by 97 separate files.
11:59
<@TheWatcher>
Which, frankly, is up the on the bollocksometer with things like "allows us to ensure they are downloading the latest version" and "means that users don't need to wait for the browser to download a large file"
11:59
<@McMartin>
As for "why does GOG have 8-10 separate files for each actual game", I'm not totally sure.
11:59
<@McMartin>
TheWatcher: The 97-file thing isn't an exaggeration
11:59
<@TheWatcher>
Oh, I know
12:00
<@McMartin>
I've made three clicks to make one bundle purchase and then faced what would have been 343 clicks to download all the components
12:00
<@TheWatcher>
It's still utterly bollocks that they can't stick it into one file on the server
12:00
<@TheWatcher>
They don't even need a real physical version of it there, a script could zip and send on the fly
12:01
<@McMartin>
That of course then leads to "hey, we got updated scans of the box feelies! Enjoy redownloading 2 gigs of game you already had to get it"
12:01
<@McMartin>
That said
12:01
<@McMartin>
GOG will let you do browser downloads if you want, last I checked
12:03
<@McMartin>
Oh right
12:03
<@TheWatcher>
Besides, I wouldn't mind downloaders /quite/ so much if they didn't appear to have been developed by people who have a psychotic aversion to things like telling you how fast it is downloading, how much it has got, how much is left, how long it estimates it'll take... you know, actually useful shit rather than "I'm going to sit here and perhaps fill this progress bar if you're lucky"
12:03
<@McMartin>
Also browsers still don't reliably handle resumed downloads or serialized downloads.
12:04
<@McMartin>
My primary irritation with GOG is actually that DOSBOX-based games do not have raw archives, requiring me to install first on a Windows machine and then abstract it to all my others.
12:06
< RichyB>
FWIW, Bittorrent supports multiple-files-in-one-torrent quite happily.
12:06
<@McMartin>
... while, admittedly, I have only used Amazon's, Steam's, GOG's, and Origin's, all of them had speed and time estimates as well as progress bars.
12:07
< RichyB>
e.g. there's a torrent that's just OCRemix 0001 through 1000 inclusive. Aim a copy of Transmission at it and you end up with a directory containing one thousand mp3 files.
12:07
<@McMartin>
Yup
12:07
< RichyB>
Not even zipped up.
12:07
<@McMartin>
This is also what Humble does.
12:07
<@McMartin>
As long as your ISP permits it, of course~
12:07
< RichyB>
IMHO it's borderline inexcusable not to use Bittorrent the way that Humble do because it's so ridiculously well-designed for the use-case already.
12:08
<@TheWatcher>
RichyB: except, as McM notes, some ISPs simply block or throttle bittorrent
12:08
<@McMartin>
You can't make it the *only* option ever. Humble doesn't.
12:08
< RichyB>
Yeah. The only things I'd like to add to Bittorrent at this point are a) some kind of delta mechanism (like bsdiff) and b) some kind of "allowable leeching" mechanism so that ISPs won't kill it.
12:08
<@McMartin>
(Though it does yell at you if you try to direct-download anything over about a gig)
12:09
< RichyB>
e.g. I have a seedbox, BT allows me to make myself be a mirror for the original 1GB file by just joining my server to the stream.
12:10
< RichyB>
If there are more than enough people doing what I am then there's no need for any of the people who're participating on tiny cable modems to blow their bandwidth limits trying to upload to a swarm that already has enough peers.
12:10
<@TheWatcher>
See, the problem is that the entire structure of bittorrent is abhorrent to the business models of some ISPs
12:10
<@McMartin>
That's the problem RichyB purports to solve there.
12:11
<@McMartin>
Have people with Actual upstream run seedboxes, and then everyone else can use the equivalent of BitThief.
12:12
<@McMartin>
Speaking of Transmission, I should get back to seeding the old ModArchive's instrument archive.
12:47 * Pandemic awakens
12:47 * Pandemic spreads to McMartin from TheWatcher
12:55 Reiver [quassel@Nightstar-3762b576.co.uk] has joined #code
12:55 Reiver [quassel@Nightstar-3762b576.co.uk] has quit [[NS] Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
12:55 Reiver [quassel@Nightstar-3762b576.co.uk] has joined #code
12:57
<~Vornicus>
On the other hand BT was built specifically so that it would be harder to make BitThief.
12:57
<~Vornicus>
Or rather, to avoid the problems that BitThief would have: people not contributing to the upload.
12:58
<@McMartin>
Yes, the general idea here is that in practice, people contributing to the upload *is the problem* for a lot of users
12:59
<@McMartin>
This is why basically nobody uses BT
12:59
<@TheWatcher>
#code, I require your aid with that Greatest of Programming Problems
12:59
<@TheWatcher>
Yes, I need to work out what to call something.
12:59
<@McMartin>
Black tea is better than green
13:00
<@McMartin>
oh
13:00
<@McMartin>
what does it do
13:00
<@McMartin>
or represent
13:03
<@TheWatcher>
This system contains articles (basically, short news posts that get published in @ways).
13:04
<@TheWatcher>
Articles can either be published "normally", in which case they can either be pushed out onto the feeds immediately, or held until a user-configurable time and then pushed out
13:05
<@McMartin>
That sounds like publishing "with a delay" for the action, or articles "pending release" for the adjectival phrase.
13:05
<@TheWatcher>
Or they can be collected together into one 'digest' of articles (with various forms of formatting applied), and pushed out as a single digest article on the feed, or over email
13:05
<@TheWatcher>
This latter thing is the problem
13:06
<@TheWatcher>
Or, more specifically, what to call the table that defines when these things happen. They are things like newsletters or announcements, go out regularly (once a week, once a month)
13:07
<@McMartin>
A publishing schedule?
13:08
<@TheWatcher>
Yes, along with information about which templates to use to create the digest, and where it should be sent to
13:08
<@TheWatcher>
'digest_settings' works I suppose
13:08
<@McMartin>
Sure
13:09
<@McMartin>
I'd be OK calling the whole thing the schedule, too
13:10 * TheWatcher fingertappity
13:11
<@TheWatcher>
Yeah, that may work better, as there may only be a single article go out in it, so 'digest' may be something of a misnomer.
13:12
<@TheWatcher>
I'll try various 'schedule_' names for now, and see how it works out
13:12
<@TheWatcher>
Thanks.
13:14
<@McMartin>
Meanwhile, I have had an Insight, but as it is 5 AM and I've slept spottily at best tonight, it may just be fatigue madness
13:14
<@McMartin>
As-you-know-Bob I am working on Project Monocle, a game engine API that has as a major goal to be super-easy to tie to FFIs.
13:15
<@McMartin>
It occurs to me that one way to ensure this is to make sure that all functionality in the library may be acquired via function calls, such that no parameter or return value is anything other than (a) a primitive type or (b) an opaque pointer that the client need not dissect.
13:15
<@McMartin>
It may be more efficient to dissect it, and where this is true that will be allowed (MNCL_RAW * isn't opaque, for instance), but everything you can get by field access you can also get via accessor functions.
13:17
<@McMartin>
Also, it looks like most of my linker problems go away if I make it an .so instead of an .a, replacing it with the traditional *other* linker problem~
13:17
<@McMartin>
(Needing to manually add -Wl,-rpath,. to the demo programs so that they actually run out of the build directory)
13:18 Scorp- [ruling@37647E.81352A.3753B9.329ED6] has joined #code
13:19 Scorp- [ruling@37647E.81352A.3753B9.329ED6] has quit [[NS] Quit: ]
13:23
<@McMartin>
On the awesome side, I think the input dispatch mechanism I had at like layer 3 can actually be shoved down to layer 0 if I do this.
13:23
< RichyB>
By "super-easy to tie to FFIs" you mean "the API is C, and makes minimal use of things like structs-with-complicated-layouts"?
13:24
< RichyB>
oh yes you said that
13:24
<@McMartin>
No, I mean "super-easy to tie to FFIs". That's the goal.
13:24
<@McMartin>
"The API is C" is the means, and I have realized I should extend that to what you said, but with s/minimal/zero mandatory/
13:24
< RichyB>
All functionality exposed entirely by function calls, everything's either a primitive that the client already knows about or an opaque pointer.
13:24
<@McMartin>
Yup, that is the plan now
13:24
< RichyB>
I like that.
13:25
<@McMartin>
The *original* plan required throwing callbacks around, which is possible in many FFIs but seems like it's asking for trouble.
13:25
< RichyB>
You should be able to just bind ctypes to it without ever having to use any of the tools that parse .h files and spit out the struct definitions into peek&poke calls.
13:25
< RichyB>
s/You/I, or any other API consumer/
13:25
<@McMartin>
I'm kinda new at this. What's "ctypes"? An application?
13:26
< RichyB>
Python library.
13:26 * McMartin nods
13:26
<@McMartin>
I'm interested in binding to at minimum Python, Lua, Scheme, Haskell, OCaml, and C#, so~
13:26
<@McMartin>
Java would be a nice bonus~
13:26
<@McMartin>
C# has super-awesome marshalling though.
13:28
<@TheWatcher>
I could write you perl bindings!~
13:28
<@McMartin>
Once I get the API settled down, I would be entirely OK with that~
13:28
<@McMartin>
Do the restrictions I've placed sound reasonable, overkill, or "that's not necessary but it makes life way easier", for those of you who *have* contended with this stuff
13:29
<@McMartin>
(Lua and Scheme bindings are basically automatic)
13:29
<@McMartin>
(... and come to think of it, so is Haskell's, the way I'm rolling here)
13:29
<@McMartin>
(Everything's Packed With Monads but that's generally all right)
13:30
< RichyB>
import ctypes; write = ctypes.CDLL("libc.so.6").write; write.restype = ctypes.c_ssize_t; write.argtypes = (ctypes.c_int, ctypes.c_char_p, ctypes.c_size_t); s = "Hello, Python!\n"; write(1, s, len(s))
13:30
< RichyB>
Replace ";" with "\n" and it gets less ugly :)
13:30 * McMartin nods
13:30
<@McMartin>
Yeah, that's pretty sharp, and only slightly messier than C#'s P/Invoke syntax
13:30
<@McMartin>
Which is nicer mainly by virtue of being purely declarative
13:31
<@TheWatcher>
I think the restriction sounds reasonable - it's in line with other APIs I've used
13:31 * TheWatcher blinks
13:32
<@TheWatcher>
pluralisation fail
13:32
<@McMartin>
Also due to my M$ corruption I'm going to have to mess around with my build/link options to make symbol exports work properly
13:32
<@McMartin>
By which I mean "default visibility is hidden unless I say otherwise"
13:32
<@McMartin>
This also lets me have declare functions to be MONOCULAR
13:33
<@TheWatcher>
....
13:33
<@TheWatcher>
Heee
13:33
<@McMartin>
(The traditional name for this export is MNCLCALL, MNCL_EXPORT, or MNCLAPI, but MONOCULAR it is)
13:34
<@TheWatcher>
Win :)
13:34
<@TheWatcher>
... aha, DateTime::Event::Cron does exactly what I need, excellent.
13:34
<@McMartin>
The thing that Visual Studio does that produces/requires this behavior is horrendously brain-damaged, but the cleanliness of the objdump -T output makes it the correct behavior
13:35
<@McMartin>
BY CRON, THERE WILL BE BLOOD SPILLED THIS EVE
13:36
<@TheWatcher>
(OR AT LEAST AT 0 0 * * *)
13:36
<@McMartin>
Oh god, somewhere out there is a config file format where the default line is "0_0;;;"
13:48 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
13:49 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Client closed the connection]
13:57 gnolam [lenin@Nightstar-b2aa51c5.cust.bredbandsbolaget.se] has quit [[NS] Quit: Reboot]
14:00 gnolam [lenin@Nightstar-b2aa51c5.cust.bredbandsbolaget.se] has joined #code
14:00 mode/#code [+o gnolam] by ChanServ
14:01 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
14:01 mode/#code [+o himi] by ChanServ
14:41 Thalass is now known as Thalass|KSP
14:43
< ErikMesoy>
Well, today was full of WTFs. At some point I may start submitting to The Daily WTF.
14:44
< ErikMesoy>
The software I'm testing does silly things like default-fill a field with text, then spew an error about how "Entity.Name is not in the correct format", the required format being strictly numeric content.
14:45
< ErikMesoy>
This is poorly documented and misleading, but not actually *buggy* if I'm strict about that.
14:45
< ErikMesoy>
The testing suite, however, is buggy, and definitely feels like worse software than the thing to be tested.
14:46
< ErikMesoy>
For example, I went to look up item 1234 in a test where it had turned up, searched, got too many results, searched with quotes for "item 1234", and got a single test result. Said test did not contain either "item" or "1234" even separately.
14:48
< ErikMesoy>
The test writeups are also mostly by Asok from India and Muhammed from Pakistan, resulting in stuff like "Create a manuel item" (manually create an item).
14:49
< ErikMesoy>
Then there's the test which says "To the left of the Customer Code field, click the lolcat icon to open a window where you select the appropriate customer code." (There are no actual lolcats; this is an anonymized story, but there is a reference to an icon.)
14:49
< Syka_>
MANUEL
14:49
< ErikMesoy>
Yeah, must be something to do with anti-colonial rage being directed at Spain instead of England. :p
14:49 Syka_ is now known as Basil_Fawlty
14:49
< Basil_Fawlty>
MANUEL!
14:49
< Basil_Fawlty>
GET IN HERE YOU IMBECILE
14:49
< Basil_Fawlty>
THIS ITEM NEEDS TO BE CREATED
14:50 Basil_Fawlty is now known as Syk
14:50
< ErikMesoy>
Anyway. So I open the software I'm testing, and there's no lolcat icon to the left of the Customer Code field. That is apparently a reference to an ages-old version of the software.
14:50
< ErikMesoy>
There's now a dropdown menu to the right of the Customer ID field.
14:53
< ErikMesoy>
The testing suite thingy also has the Confirm Test Step As Carried Out button sandwiched between the Skip To Next Test Step button on one side and the Delete Test Step button on the other side. These are all 16px icons. So I frequently come across tests which have steps 1,2,3,5.
14:53
< ErikMesoy>
(There's also a button for Renumber Test Steps.)
14:56
< ErikMesoy>
Oh, and there's also a test which tells me to open the user database, find a user entry matching specific criteria, do things to its data and add events to its history, and click OK. This test terminates in "Expected result: Back at user database overview."
14:57
< ErikMesoy>
So if the data I just entered vanishes into the ether, the test is considered passed.
15:08
< RichyB>
*luminiferous aether
15:08
< ErikMesoy>
*aether, if you want to be that way about it.
15:08
< RichyB>
Not actually correcting you, I just love the word "luminiferous" and have a soft spot for spelling ether with an "a".
15:08
< RichyB>
OooOOOH
15:08
< RichyB>
even better
15:08
< RichyB>
yessssss.
15:08
< ErikMesoy>
I live in Norway; the ae key is native to this keyboard. :D
15:09
< RichyB>
I run X11. ae is typed as "<compose> <a> <e>"
15:11
< RichyB>
BTW
15:11
< RichyB>
Is anyone here in the UK and looking for a job?
15:12
< RichyB>
We're a Python shop in Bristol and one of the divisions here has some money and much work that needs doing.
15:12
< Syk>
too bad i'm not in the UK
15:12
< Syk>
or any good at programming
15:12
< Syk>
:P
15:14
< RichyB>
The thing is this thing. http://www.viraladnetwork.net/blog/2013/van-is-hiring-developers/
15:14
< Syk>
also, I indent with tabs, which means I should physically stay away from python devs
15:14
< Syk>
let alone I get staked
15:15
< RichyB>
They want to hire someone for web development (the company is largely run by a collection of web apps) and they want to hire someone for backend databases-and-stuff work.
15:15
< RichyB>
Eh, there's an Emacs mode for that. For making your tab key work properly I mean, not for staking you.
15:16
< Syk>
id not be surprised if emacs did both
15:16
< Syk>
and my tab key does work properly ;3
15:17
< RichyB>
>:3
15:17
<&ToxicFrog>
M-x stake-user
15:18
<@Tamber>
Indent with tabs; align with spaces. Tabs can be "However many spaces your bloody IDE/editor wants to show them as". </heretic>
15:18
< Syk>
exactly~
15:18
< Syk>
wait Tamber is agreeing with me
15:18 * Syk pinches self
15:18 * Syk then pinches Tamber
15:18
<@Tamber>
Check the date.
15:18 * Tamber bursts.
15:18
< Syk>
june 11
15:19
< RichyB>
Tamber: I do that in C. I stick with 4-spaces in Python because it's the official standard there.
15:19
< RichyB>
Complying with the BDD's layout standard > complying with a slightly better but subtly different standard that you've made up yourself.
15:19
<@Tamber>
yup
15:20
<@Tamber>
But everything I work on is mine, so ha. =)
15:20
<@Tamber>
(It is also awful, but it's mine.)
15:20
< Syk>
I have my own subtly modified PEP8
15:20
< Syk>
and by subtly modified, I mean, I disregard it because PEP8 hates code readability on anything bigger than a VT100
15:20
< RichyB>
I don't think that that's a good idea; I don't write anything except for stuff for work that I don't stick on github.
15:20
< RichyB>
YMMV though
15:21
< RichyB>
Like you might have actual aspirations w.r.t. selling code later.
15:21 Thalass|KSP is now known as Thalass
15:21
< Syk>
i have 2560 delicious horizontal pixels :>
15:21
< Syk>
RichyB: eh, I can fuck my code in the handover :P
15:22
< Syk>
convert to spaces, pep8 everything, etc
15:22
< Syk>
it's easier than dealing with 80 char limits
15:23
< RichyB>
I just prefer to show my work off earlier.
15:23
< RichyB>
(even when it sucks)
15:23
< Syk>
until it's done, output is the only thing that matters
15:25
< RichyB>
"Done" is not a meaningful status when talking about code except for that which goes onto rockets. :)
15:25
<@Tamber>
"XXX: Fix overflow in velocity calculations"
15:25 Thalass is now known as Thalass|RedEclipse
15:26
< Syk>
RichyB: implying that's not how i deploy code
15:26 * Syk puts it on a floppy disk, and onto a model rocket, aims it at the Linode server in japan
15:26
< RichyB>
But you'll always have a second go at building an even better rocket
15:27
<@Tamber>
Not always.
15:29
<@Tamber>
Black Arrow.
15:33
<@froztbyte>
RichyB: not even then
15:33
<@froztbyte>
RichyB: since those things also have firmware patches available
15:34
< RichyB>
It's not normal to patch them literally in-flight.
15:34
< RichyB>
I wouldn't want to bet that it's unprecedented, though. ;)
15:38
<&ToxicFrog>
I have to deal with 80char limits despite everyone here having giant goddamn monitors :(
15:40
<@Tamber>
Wouldn't want to be incompatible with punchcards, eh?
15:44
< RichyB>
Eh
15:45
< RichyB>
You people with your wide screen can all *wave* bugger off.
15:45
< RichyB>
I have a wide screen, yes. The utility of this is that it can be split into two narrower ones to examine code side-by-side.
15:45
< RichyB>
Not that you can spunk text horizontally from here to Amsterdam and back.
15:46
<@gnolam>
Even then, 80 characters is way too narrow.
15:46
<&ToxicFrog>
RichyB: conservatively I can fit two 120col editors side by side with enough room left over for various other widgets down the side of both editors.
15:46
< RichyB>
That's not even good for reading speed; read up on ideal text column widths and saccades.
15:46
<&ToxicFrog>
Also, remember that this is code.
15:46
< RichyB>
If monitors that size are standard where you work then 120col should be.
15:47
<&ToxicFrog>
The utility in wide lines isn't that you can widen your paragraphs, it's that you can fit lengthy package names and suchlike on a single line rather than needing to wrap them to the next line in ugly ways.
15:48
< Syk>
also you need to be able to have at least some nested code
15:48
< Syk>
because sometimes you need to nest code
15:48
<&ToxicFrog>
A 120-char function call is harder to read than an 80-char one, but a lot easier than a 120-char one split across two or three lines.
15:48
< Syk>
if you have code in a method in a class, you already have 8 characters you can't use
15:49
<&ToxicFrog>
4.
15:49
< Syk>
i said method in a class
15:49
< Syk>
class whatever:
15:49
< Syk>
def function():
15:49
< Syk>
<code>
15:50
<&ToxicFrog>
Yes. And one indent level is two columns.
15:51
<&ToxicFrog>
What's python for (exists)?
15:51
< Syk>
um
15:51
< Syk>
python indents are 4 characters
15:51
<&ToxicFrog>
Standard here is 2 cols in all languages, including python.
15:52
< Syk>
pep8 says 4-character
15:52
< Syk>
pep8 has a 80-col limit too
15:53
< RichyB>
pep8 is only relevant because of the entire Python ecosystem.
15:53
< RichyB>
pep8 doesn't have to be relevant inside Google, since it's large enough to have its own independent ecosystem.
15:53
<&ToxicFrog>
Yes, but we don't follow pep8, as you may have figured from the fact that we don't use 4-col indents.
15:54
< Syk>
well i was mainly complaining about pep8 80-col
15:54
< Syk>
unless the topic switched to google in the middle
15:55
<&ToxicFrog>
I missed the pep8-specificity and was just complaining about 80col limits in general.
15:55
< Syk>
80 col in general is stupid, yeah
15:55
< Syk>
really, i'd think that code formatting should be the job of the editors
15:56
< Syk>
for some languages it might be complex, but for things like python... i don't imagine it would be too incredibly hard to have a pep8-formatting module
16:03
<&ToxicFrog>
Yeah, it wouldn't actually be that hard to edit in whatever your preferred format is and then have the editor canonicalize it before commit.
16:03
<&ToxicFrog>
Gnargle
16:03
<&ToxicFrog>
python really needs map/reduce/filter as methods on List
16:03
<&ToxicFrog>
Either that or it needs ->
16:36
<&jerith>
ToxicFrog: Listcomps are the idiomatic way to do those things.
16:37
<&ToxicFrog>
listcomps gets really ugly once you have a few maps/filters nested, and I don't think you can reduce with them, can you?
16:39 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
16:52 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
16:52 mode/#code [+o himi] by ChanServ
16:53 ErikMesoy is now known as Harrower
17:14 * ToxicFrog discovers that he's been getting nonsensical results from his tests because he mistyped 0.39 as 0.039
17:14
<@TheWatcher>
Wups
17:20
<@iospace>
:V
17:27
< RichyB>
Is there a way in PCRE to, inside a group, assert and consume some text without adding it to the group?
17:30 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
17:30 mode/#code [+o celticminstrel] by ChanServ
17:31
<@TheWatcher>
RichyB: (?>...) maybe?
17:31
<@TheWatcher>
That' is the possessive grouping incantation, it should consume but doesn't capture
17:31
<@TheWatcher>
-'
17:32
< RichyB>
I'm matching a regular language, a stream of tokens A | B | C | D, I want to discard the D tokens.
17:33
< RichyB>
I think that I want to do it with by matching against "((A|B|C|(?dontcapture)D)+)"
17:33
< RichyB>
A B C D are all complicated patterns, any of them could appear as a substring of any of the other, so just s/D// is not going to get me far.
17:35
< RichyB>
Is there an equivalent to \K that just discards from the current capturing group, perhaps?
17:40 Thalass|RedEclipse is now known as Thalass|sleeeep
17:45
<@Pandemic>
RichyB could you not simple do A|B|C|else and have else handle both D and errors that fall ourside of A,B, and C?
17:46
<@Pandemic>
granted under this condition D would become an error state
17:46 d4de [olorin@687AAB.418D22.4820DA.37B7E8] has joined #code
17:56
< RichyB>
I'm working in a not-Turing-complete language called "VCL" (the Varnish Configuration Language) here and I think that the only string manipulations available are PCRE substitution and concatenation.
17:57
< RichyB>
Concepts like "arrays" or "loops" are absent.
18:02 Typh[Offline] is now known as Typherix
18:51 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
19:04 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
19:04 mode/#code [+o himi] by ChanServ
19:26 Kindamoody|out is now known as Kindamoody
19:50 d4de [olorin@687AAB.418D22.4820DA.37B7E8] has quit [NickServ (GHOST command used by d4de_)]
19:50 d4de [olorin@687AAB.418D22.0FE7A6.AD32C2] has joined #code
19:58 Chutzpah [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code
20:34 Kindamoody is now known as Kindamoody[zZz]
21:36 Turaiel[Offline] is now known as Turaiel
21:52 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
22:06 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
22:06 mode/#code [+o himi] by ChanServ
22:24
< RichyB>
It's shocking how much more pleasant to use Haskell gets just by adding -XOverloadedStrings.
22:27
<@celticminstrel>
?
22:27
<@celticminstrel>
What does that do?
22:32 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
22:46 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
22:46 mode/#code [+o himi] by ChanServ
22:50 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
22:50 mode/#code [+qo Vornicus Vornicus] by ChanServ
22:50 Harrower is now known as ErikMesoy|sleep
22:50 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Client closed the connection]
22:51 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
23:34 Typherix is now known as Typh[Offline]
23:56 VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
23:59 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds]
--- Log closed Wed Jun 12 00:00:52 2013
code logs -> 2013 -> Tue, 11 Jun 2013< code.20130610.log - code.20130612.log >

[ Latest log file ]