code logs -> 2006 -> Mon, 16 Oct 2006< code.20061015.log - code.20061017.log >
--- Log opened Mon Oct 16 00:00:03 2006
00:13 Janus is now known as Jan[dinnerable]
00:27 Jan[dinnerable] is now known as Janus
02:48
<@Vornicus-Latens>
Okay. Pair programming?
02:48
<@Vornicus-Latens>
The Bomb.
02:48
< Janus>
Sounds romantic.
02:49 * Vornicus-Latens spend four hours pair programming a small math library with somebody from Switzerland, and got about ten times as much done as he usually does.
02:50
<@McMartin>
It's also handy because you have someone to talk at when you run off for donuts
02:51
<@Vornicus-Latens>
At one point I said "I'll just watch you code for a bit, I have fries."
02:51 * Reiver snickers.
02:52 * Reiver stabs his assignment. Tries to engage his brain into handling Swing.
02:52
<@Reiver>
Incidentally.
02:52
<@Reiver>
Is having a class called Gui a good idea?
02:52
<@Vornicus-Latens>
which was convenient, because then I could eat and code-review at the same time.
02:52
<@McMartin>
Vornicus-Latens: Indeed
02:52
<@McMartin>
Reiver: Is that what's extending the top-level JFrame?
02:52
<@Reiver>
Probably!
02:53
<@McMartin>
It's probably acceptable
02:53
<@Reiver>
I want to make pretty boxes.
02:53
<@Reiver>
>.>
02:53
<@McMartin>
I usually would call it AppFrame or MainFrame or something and put all the swing stuff in a package called "gui", but.
02:53
<@McMartin>
That's a matter of taste
02:53 * Reiver nods.
02:53
<@Reiver>
Also need to work out if it is physically feasible to get a 30-day-calendar type arrangement going without breaking my brain.
02:53
<@Reiver>
(You know, with S M T W T F S and the days neatly arranged beneath it.)
02:54
<@Reiver>
(If so, it is yay! If not, I shall, um, not bother and hack something else.)
02:54
<@McMartin>
That might be possible with a GridLayout.
02:54
<@Reiver>
(Aesthetics are only applicable if easy, at the moment. I lack time for them otherwise. >.>)
02:54
<@Reiver>
Hrm.
02:54
<@Reiver>
How would one rig the offsets?
02:55
<@ToxicFrog>
Vorn: explain in more detail "pair programming"
02:56
<@McMartin>
Reiver: ...offsets? A Gridlayout say "I have a grid with (say) seven columns and five rows, each with one widget in it"
02:56
< Janus>
I must say, that sounds a bit like fun.
02:56
<@Vornicus-Latens>
Pair programming: two people, one text editor.
02:56
<@McMartin>
Those widgets being most likely labels
02:56
<@McMartin>
The back-seat coder's job is to shout "Objection!" when necessary
02:57
<@Vornicus-Latens>
...I need to play Phoenix Wright /so bad/
02:57
< Janus>
Now, no one likes a backseat coder.
02:57
<@McMartin>
Janus: As Vorn noted, they do tend to increase productivity.
02:57 * McMartin has a sneaky theory about why, though~
02:57
<@McMartin>
To wit, one spends less time on IRC etc when doing the coding
02:58
<@McMartin>
Vornicus-Latens: Really, the third case is pure awesome, but the further you get from case 3, the less good it is.
02:58
< Janus>
True, you guys totally waste my time~
02:58
<@ToxicFrog>
Vorn: hotseat? Or using some kind of networked editor deal? Or is that irrelevant implementation details?
02:58
<@Vornicus-Latens>
Both work.
02:58
<@Reiver>
McM: "offsets" so that the 1st of the month can show up on a wedensday or whatever, as required.
02:58
<@ToxicFrog>
Right.
02:58
<@McMartin>
Hotseat is the traditional way, though.
02:58
<@ToxicFrog>
And now, zomg teh dinner.
02:58
<@McMartin>
Soundproofing is also usually necessary because you're supposed to be explaining what you're doing.
02:58
<@Vornicus-Latens>
At the office they usually use hotseat; I was using Hydra (now SubEthaEdit, but Hydra is a cooler name).
02:59
<@McMartin>
Reiver: I think that's just a matter of what you put in the labels...
03:00
<@Vornicus-Latens>
which is only for Mac, sadly, but
03:01
<@Reiver>
McM: I'm mostly trying to get my head around using all the constants in the GregorianCalendar class to get the labels to line up right, yes.
03:01 * Reiver is thinking a nice pretty JFrame is going to require several classes, or something.
03:01 * McMartin eyes his Swing book, which has a page count in the four digits.
03:01
<@McMartin>
This is really not something they should be having you pick up randomly.
03:01 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: bathitime, and I've got absolutely nothing done; here's to procrastination!]
03:02
<@Reiver>
Well... they gave us a basic rundown...
03:02
<@Reiver>
We're not supposed to be achieving magic with it. Just buttons and layouts, really.
03:02 * Reiver is probably biting off more than he can chew, but.
03:03
<@McMartin>
You'll probably need layouts, too.
03:03
<@McMartin>
Lining stuff up will be done automatically by the GridLayout.
03:03
<@Reiver>
What I'm hoping to get is a classic 'monthly calendar' JPanel, and have all the days on it as buttons.
03:03 * Reiver nods.
03:03
<@McMartin>
You give rows and columns and put one thing in each cell.
03:04
<@McMartin>
This can include... I think it's JPanel... which you can stick More GridLayouts In.
03:04
<@McMartin>
JFrame, however, is a full window.
03:04
<@Reiver>
This JPanel will sit in a corner, and have seven other 'Day' JPanels off to one side, with buttons signifying all the appointments on it with simple time/date stuff on the button.
03:04
<@Reiver>
And then a 'year' view where you just have twelve 'month' JPanels, and clicking on one of the days switches you to the 'week' layout.
03:05
<@Reiver>
(Bonus points if I can bold the numbers on the 'month' calendar to show there are appointments scheduled on that day.)
03:06
<@McMartin>
JLabels and JButtons can, IIRC, be labeled with HTML.
03:06
<@McMartin>
Or there's some switch or subclass that permits this.
03:07
<@Vornicus-Latens>
Java's HTML support is horrid though
03:08
<@McMartin>
It'll do <b> though.
03:11 ChalcyOut is now known as ChalcyCat
03:12
<@Reiver>
Hrm. Ok.
03:12
<@Reiver>
So I need to work out if a day has an appointment, and bold it. Hm.
03:12
<@McMartin>
First Rule Of Bonus Points:
03:12
<@McMartin>
Do the core assignment first.
03:12
<@Reiver>
Right, right.
03:13
<@Reiver>
So I need to be able to show... ah. Whups, ok den.
03:13
<@Reiver>
Year, month, week, and day views.
03:13
<@Reiver>
Month, week, and day views should show appointments.
03:15
<@Reiver>
Hrm.
03:20 * Reiver has a thought, flicks through his textbook to remember how one defines an Exception.
03:20
<@McMartin>
public class Whatever extends Exception {}
03:20
<@Vornicus-Latens>
to define your own class of exceptions, extend Exception.
03:20
<@Reiver>
Oh, right.
03:20
<@Vornicus-Latens>
Usually you don't need to do that though.
03:21 * Reiver just wants to have his setEndTime() method be able to check that the endTime > startTime.
03:21
<@McMartin>
That's more likely just a plain old IllegalArgumentException.
03:21
<@Reiver>
And complain at you in a non-program-breaking-way if it is not the case.
03:25
<@Reiver>
Hrm.
03:25
<@Reiver>
If I set Appointment to Throw IllegalArguementException, I then need to have every call to Appointment wrapping in catches? Or just catches for the setEndTime command?
03:27
<@McMartin>
Uh
03:27
<@McMartin>
Classes don't throw exceptions, methods do
03:27
<@Reiver>
Right.
03:27 * Reiver hates exceptions. >.>
03:27
<@McMartin>
setEndTime() presumably is throwing the exception
03:27
<@McMartin>
So, uh, don't use them, then?
03:29
<@McMartin>
You could just check before you call setEndTime.
03:29
<@Reiver>
I suppose. >.>
03:29
<@Reiver>
Just seemed vaugely cheating/sloppy to do it that way.
03:31 ChalcyCat is now known as Chalcedon
03:31 * Reiver pokes at the code fragment he and jerith worked out last night, realises that it is probably actually not ideal, as it would be best to seperate appts that start on a day, and appts that haven't ended yet.
03:31 * Reiver thus fiddles.
03:36 * Chalcedon hug Reiver
03:37
<@Reiver>
...Agh. I have no idea what I am doing.
03:37 * Chalcedon hug Reiver
03:37 * Reiver needs to focus. >.>
03:38
<@Chalcedon>
what is preventing your from focusing, and can you fix it?
03:38
<@Reiver>
Just life, stress, and that I need to go visit my little bro at ~7pm this evening.
03:38
<@Reiver>
As he's still waiting on the CT scan.
03:39
<@Reiver>
It is making me forget basic things that I should know how to use on the basis that I've /used them before/ (on a regular basis!), but am apparently failing to remember how to use now!
03:39
<@Reiver>
</angst>
03:39
<@Reiver>
Anyway.
03:39
<@Chalcedon>
extension
03:39
<@Chalcedon>
*?
03:39
<@McMartin>
... CT?
03:39
<@McMartin>
And, uh, yeah, family emergency?
03:39
<@Chalcedon>
I mean, having your bro land in hospital is not exactly your fault
03:39
<@Reiver>
Chalcedon: Not having finished my assignment two weeks ago is, however.
03:40
<@Chalcedon>
it was due two weeks ago?
03:40
<@Reiver>
No.
03:40
<@Chalcedon>
then how is this relevant?
03:40
<@Reiver>
But the theory is that something coming up in the last few days is not much of an excuse.
03:40
<@Chalcedon>
so?
03:41
<@Reiver>
So the compsci department looks poorly on such things?
03:41
<@Chalcedon>
your best working time is evenings and you've had two lost because of this
03:41
<@Chalcedon>
let me put it a little plainer
03:42
<@Chalcedon>
students cram. This is normal. It may irritate lecturers but they understand and are usually sympathetic when something comes up to prevent you from using time you had planned to use.
03:42
<@Reiver>
So...
03:42
<@Chalcedon>
I think you should ask for an extra couple of days because you've been stressed about your brothers condition
03:42
<@Reiver>
You suggesting I ask people anyway?
03:42
<@Chalcedon>
go and see a counsellor, any idiot can see you're stressed
03:42
<@Chalcedon>
Marg will probably back you up.
03:43
<@Chalcedon>
if you're to proud to do any of that, don't whine about it
03:43 * Reiver will phone Marg to see what she thinks, at least?
03:43
<@Chalcedon>
that is a good idea
03:44
<@Chalcedon>
(note, if you somehow arrive at a good reason /not/ to ask for an extension eg Marg, whining is allowed)
03:44
<@Chalcedon>
also, you have an organisational disability, does this strike you as an applicable situation where that might cause issues?
03:45
<@Chalcedon>
you did try to start early, it just didn't work out the way you thought it would. This is not your fault.
03:47
<@ToxicFrog>
McMartin: Computed Axial Tomography, I think.
03:47
<@McMartin>
Er. That would be CAT.
03:47
<@McMartin>
Or is "CAT scan" an Americanism?
03:48
<@Chalcedon>
we have CAT scans
03:48
<@Chalcedon>
I think CT is different
03:48
<@Chalcedon>
no, same thing, sorry.
03:49
<@ToxicFrog>
ISTR that CT is the same thing, they just dropped the "Axial" because they hate cats. Or something.
03:49 * McMartin sets up KITTEN scans.
03:50
<@Vornicus-Latens>
http://www.ssiworld.com/watch/shred_of_the_month-december_2005.htm <--- now, see. THIS is top quality marketing.
04:03
<@Reiver>
CAT scan, yeah.
04:03
<@jerith>
Good bloodyhellit'swaytooearly.
04:03
<@Reiver>
Minor with a head injury, and confirmed concussion, and having lost conciousness on the roadside.
04:03
<@Reiver>
Er.
04:03
<@Reiver>
Yeah.
04:03
<@Reiver>
They'd really like to doublecheck everything is intact before they send him home. >.>
04:03
<@Reiver>
JERITH
04:03 * Reiver pounce, hug.
04:03
<@jerith>
Umm, you may not want to do that...
04:04
<@Reiver>
Uhoh?
04:04
<@jerith>
I'm in bed, almost entirely unclothed and holding a laptop...
04:04
<@jerith>
Anyways, to code?
04:05 You're now known as TheWatcher
04:05
<@Reiver>
...You guys put me to shame.
04:05 * Reiver is mostly stabbing at horrible stupid mistakes on his part, and trying to contact lecturers to arrange the possibility of an extension.
04:06 * TheWatcher needs to make tea before he can attempt cogitation, one moment
04:06
<@Reiver>
Apparently the usual answer is "No extensions, unless your lecturer accepts your case plea. And then we require the paperwork." She did not sound overly sympathetic. >.>
04:07 * jerith decides not to make tea on the basis that he would have to get out of bed first.
04:07
<@Chalcedon>
Reiver: was that Marg?
04:11
<@Reiver>
Chalcedon: No, the person in charge of CompSci.
04:11
<@Reiver>
Anyhoo.
04:11
<@jerith>
To code?
04:11
<@Reiver>
Yus.
04:11 * Chalcedon leave you to it
04:12 * Chalcedon hugs everyone and supplies cookies
04:12
<@Reiver>
ArrayLists! I am doing something very stupid!
04:12
<@jerith>
Yaycookies!
04:13
<@Reiver>
ArrayList<Appointment> getApptCurrent(Date startTime, Date endTime) {
04:13
<@Reiver>
ArrayList<Appointment> apps = new ArrayList<Appointment>();
04:13
<@Reiver>
for (Appointment app : apptList.getAppointment()) {
04:13
<@Reiver>
apptList.getAppointment() is breaking. Er.
04:14
<@Reiver>
apptList is an ArrayList<Appointment>.
04:14
<@Reiver>
getAppointment is a method on Appointment objects that simply has "return this;" as the code.
04:14
<@McMartin>
Uh, so, that syntax is just (Appointment apps : apptList) {, isn't it?
04:15
<@McMartin>
I mean, ArrayLists don't have a getAppointment() method.
04:15
<@jerith>
Nonononono, the second bit needs to be a collection or iterator.
04:15
<@jerith>
I think.
04:15
<@Reiver>
So I don't need the .getAppointment method?
04:15
<@jerith>
Not there.
04:15
<@Reiver>
Oh. Yes.
04:17 * Reiver eyes.
04:17
<@Reiver>
if (app.getStartTime() > endTime) {break;}
04:17
<@Reiver>
"The operator > is undefined for the argument type(s) java.util.Date, java.util.Date"
04:17
<@McMartin>
Indeed it is.
04:18
<@Reiver>
You can't check if one date is smaller than another?
04:18
<@TheWatcher>
you'll need to makea isLaterThan method
04:18
<@Reiver>
It's just a long int, isn't it?
04:18
<@McMartin>
Java doesn't allow +-*/^<<>>&| on anything but prime data types
04:18
<@McMartin>
No, a Date is a Date.
04:18
<@McMartin>
Anything that isn't "int" "long" "boolean" etc. is an Object.
04:18
<@Reiver>
Mrf.
04:18
<@McMartin>
Which is to say, a 32-bit value representing a memory location.
04:19
<@McMartin>
Date or Calendar has to have comparators in it.
04:19 * Reiver will check.
04:19 * jerith stabs operator overloading and the lack thereof.
04:19
<@TheWatcher>
And in the absence of operator overloading in Java, no using operators like that on objects.
04:19 * McMartin stabs iostream.h
04:19 * McMartin outputs stuff by bitshifting!
04:20
<@jerith>
Now why is this box suddenly not responding?
04:20
<@jerith>
It was about half an hour from the end of the last mpeg...
04:22
<@Reiver>
Calendar supports CompareTo.
04:23
<@Reiver>
Roight.
04:23
<@McMartin>
If Date has a method that returns a long, you can do > on those results too.
04:23 * Reiver now pokes at Calendar, wonders if he should have been using GregorianCalendar objects instead of Date objects everywhere?
04:27
<@jerith>
What's the difference?
04:28
<@Reiver>
Um
04:28
<@McMartin>
Date is time_t, basically
04:28
<@Reiver>
GregorianCalendar is an extention on Calendar is an extention on Date.
04:28
<@McMartin>
I assume GC is YYYYMMDD
04:29
<@Reiver>
With Calendar in between being an internationalised one with just more function thingies.
04:29
<@Reiver>
Methods, sorry.
04:29
<@Reiver>
Ah
04:31
<@Reiver>
Gregorian is the Gregorian-specific, while Calendar is the generic.
04:35
<@jerith>
If you want to change, sooner might be better than later...
04:37
<@Reiver>
Probably for the best.
04:37 * Reiver tries to think.
04:37
<@Reiver>
This means all my getters and setters have to declare type GregorianCalendar instead of type Date, yes/no?
04:37
<@McMartin>
Yes
04:37
<@McMartin>
Since there won't be any Date objects around
04:37
<@Reiver>
Right, and polymorphism doesn't work like that.
04:37
<@McMartin>
Well, they don't have to, since a GC is a kind of Date
04:37
<@Reiver>
Only the other way?
04:38
<@jerith>
Your IDE may have a refactoring tool.
04:38
<@McMartin>
But you'd have to cast it every time you did something GC specific
04:38 * Reiver nods.
04:38
<@McMartin>
Eclipse has more refactoring tools than you can shake a stick at
04:38 * Reiver is using Eclipse.
04:39 * Reiver pokes at "Generalize declared type"?
04:39
<@McMartin>
You need the reverse of that, I believe.
04:39 * TheWatcher cannot alas aid with eclipse - only ever uses emacs
04:40
<@Reiver>
"Infer generic type arguements"?
04:40
<@McMartin>
The problem is that you need a more specific type
04:40
<@McMartin>
It may not do that automatically, since it changes the semantics
04:41
<@jerith>
Global search/replace?
04:41
<@TheWatcher>
Unless there's a lot of code or anything complicated, I'd go with jerith's suggestion
04:43
<@Reiver>
Global replace did it!
04:43
<@Reiver>
Hrm.
04:43
<@Reiver>
So... CompareTo returns -1 if it is >, +1 if it is < ?
04:43
<@McMartin>
"it" being "the argument", not "this", I take it?
04:44
<@Reiver>
Right.
04:45 * TheWatcher eyes the api docs
04:45
<@TheWatcher>
yes
04:45
<@Reiver>
"startTime.compareTo(endTime) == 1" being equivalent to "startTime < endTime" (If not syntactically correct, but you get my meaning)?
04:45
<@TheWatcher>
no
04:45
<@Reiver>
...No, the other way around, yes?
04:45
<@TheWatcher>
you can't assume the output is 1 or -1
04:46
<@TheWatcher>
only < 0, 0 ot > 0
04:46
<@jerith>
Rather check >0, etc.
04:46
<@TheWatcher>
*or
04:46
<@Reiver>
Mrf. Ok.
04:46
<@McMartin>
Java may provide stronger guarantees; I've forgotten
04:46
<@jerith>
Yes, what he said.
04:46
<@McMartin>
But nevertheless, < 0 makes it easier to read =P
04:46
<@TheWatcher>
McMartin: if so, the method docs do not say so
04:47
<@Reiver>
"starTime.compareTo(endTime) < 0" equivalent (logically) to "startTime < endTime"?
04:47
<@McMartin>
Yeah
04:47 * Reiver nods.
04:47 * Reiver ponders.
04:48 * Reiver wonders if he should be allowing for cases where start and end are simultaneous.
04:48 * Reiver decides yes, he really really should.
04:48
<@Reiver>
Given the end time defaults to the start time if not stated. >.>
04:49
<@jerith>
Where does it make a difference?
04:50
<@Reiver>
Whether or not I used "< 0" vs "<= 0" on the break statement.
04:50
<@jerith>
What're you breaking?
04:50
<@jerith>
That loop I gave you?
04:50
<@Reiver>
Yah.
04:51
<@jerith>
Because if you look at that carefully you're comparing n appointment to a time period, not itself...
04:52
<@Reiver>
I realise this.
04:53
<@Reiver>
But I was trying to check to see if having the start time and end times the same in either the request, or in the appointments specified, would want to make a difference. And it doesn't. Which is good.
04:54 * jerith nods.
04:58 * Reiver now tries to work out the GUI, and whether or not he can be bothered with anything fancier than a Serialisable interface for saving objects. Decides, not really.
04:58
<@TheWatcher>
Just do the simplest route for now
04:59
<@Reiver>
I'm actually trying to think what that involves.
05:00
<@Reiver>
I have a few 'stock' views I intend to utilise - a 'large' day layout, and a 'small' day layout that is then used to construct a month-sized calendar.
05:01
<@Reiver>
The thing is, I need to have a GUI that is non-static, and I'm tryin to think whether I should be making each bit of the layout a class of its own, or a method for creating appropriate buttons/JPanels as desired. I am thinking a Method, but I am kinda wobbly on the GUI stuff, it wasn't covered in that much depth for anything other than simple, draw-on-screen-then-type-into-it stuff.
05:02 * Reiver wonders vaugely if any of that made sense. >.>
05:04 * TheWatcher hrms
05:04 * jerith does not do GUI.
05:05
<@TheWatcher>
At this point I tend to be very not-nicely-oo and say that you should have classes for building the static parts, include methods inside the calendar and appointment objects for building dynamic bits
05:06
<@TheWatcher>
(so the appointment class contains methods for making bits of UI related to it, for example)
05:07 * Reiver nods.
05:17
<@Reiver>
This is doing all the GUI-stuff in one class.
05:17
<@Reiver>
Or at least, in a seperate class with possible subclasses.
05:17
<@Reiver>
Though I'm fairly sure that's not strictly needed.
05:21
<@McMartin>
You may end up needing some ancillary classes
05:22
<@McMartin>
Like the Panel that shows dates and stuff
05:29
<@Reiver>
?
05:31
<@jerith>
You'll need something to put the appointments on...
05:31
<@Reiver>
Oh. Yes.
05:31 * Reiver was thinking that it seems tempting to have a "Monthview" object, so that one can draw multiple such objects on one frame.
05:43 * Reiver tries to get his head around how you implement actionListeners for multiple buttons, again.
05:43
<@Reiver>
It uses inner classes, right?
05:44
<@jerith>
No idea, sorry.
05:44
<@Reiver>
Hrm.
05:44
<@Reiver>
Ok.
05:44
<@Reiver>
What do you know about serialisation?
05:44
<@Reiver>
And/or file writing.
05:44
<@Reiver>
As I need to be able to save, uh, calendars, IIRC.
05:45 MahalEarning is now known as Mahal
05:46
<@McMartin>
Look at ObjectInputStream and ObjectOutputStream.
05:46
<@TheWatcher>
Make the objects you want to save/load implement the Serializable interface (just add the implements Serializable to the declaration, no other work necesary ussually) then you can use ObjectOutputStream and ObjectInputStream
05:47
<@Reiver>
I was more wondering, do I want to save each apptCalendar in its own file, or just have one big one?
05:47
<@Reiver>
You need to be able to "Save and load calendars".
05:47
<@TheWatcher>
do you have more than one calendar open at once?
05:48
<@Reiver>
I believe so, yes.
05:48
<@Reiver>
As you need to be able to shift appointments between calendars.
05:48 Syloqs-AFH [Syloq@NetAdmin.Nightstar.Net] has quit [Connection reset by peer]
05:49
<@TheWatcher>
Hm. i'd recommend saving each calendar in its own file
05:50 * Reiver nods.
05:50 Mahal is now known as MahalAFK
05:50
<@Reiver>
So do I call each calendar the calendar's title and then don't let a user change that once it's made, use an arbitary name, or is there a built-in open/save file dialogue in Java that I can shamelessly steal?
05:51
<@McMartin>
The latter, somewhere in Swing, I don't know where.
05:51 * Reiver search!
05:53
<@Reiver>
Hrm. Okay, so that's no problem. This leaves us with... the alarm scheduler class, and how the heck I will perform searches on the appointments.
05:53
<@Reiver>
Well, and the Chutuluian horror of a GUI to keep writing, but that's just going to be pain and suffering whilst bugfixing, so I shan't bother you lot with that while I have you~
05:54
<@TheWatcher>
Have a look at the Timer class?
05:58
<@TheWatcher>
actually, that or maybe SwingWorker perhaps..
05:58 * Reiver finds the FileChooser class, happies.
05:58 * Reiver then goes to investimagate this Timer class.
05:59 * Reiver pokes at MBean, wonders if this is vaugely along the right lines.
06:00
<@Vornicus-Latens>
don't touch beans.
06:00
<@Reiver>
...
06:01
<@Reiver>
Is that a non-seq, or advice, Vorn?
06:01
<@TheWatcher>
Probably closer to a dire warning
06:01
<@Vornicus-Latens>
What TW said.
06:02
<@Reiver>
...Right.
06:02
<@Reiver>
Do you have any better ideas for setting an alarm timer?
06:06 * TheWatcher ponders some way of doing it that doesn't involve threads
06:09
<@TheWatcher>
The "easy" way is to have a thread running that wait(1000)s, then checks the calendars for events happening within the current second, triggers any notifications needed and then goes back to sleep.
06:09
<@jerith>
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Timer.html <-- perchance?
06:09
<@jerith>
It would be safer to give the timer a copy of the data.
06:10
<@jerith>
But then you'd need to reschedule if anything changed.
06:12
<@jerith>
Every time something changes you could do a purge() and reschedule everything.
06:13
<@jerith>
But now, to shower.
06:13 * Reiver frowns.
06:13
<@TheWatcher>
Hrm?
06:13
<@jerith>
You don't want me to shower?
06:14
<@Reiver>
Why would you need to reschedule if anything changed?
06:14
<@jerith>
In fact, you'd only need to to purge() and reschedule if you changed anything with a timer.
06:14
<@jerith>
To make it threadsafe, you pass copies of your data to the timer.
06:15
<@jerith>
So if stuff changes, the timer's copy is out of date.
06:15
<@Reiver>
Hrm.
06:15
<@TheWatcher>
Reiver: do you actually /need/ to do alarms?
06:15
<@Reiver>
TW: Yes.
06:15
<@jerith>
Yes.
06:15
<@TheWatcher>
Arse
06:15
<@jerith>
It's in the project spec.
06:15
<@Reiver>
http://www.cs.waikato.ac.nz/Teaching/COMP209B/assignments/Assignment2.pdf
06:16 * Reiver tries to think.
06:16
<@Reiver>
Each appointment can be fully restricted to only have one alarm set to it.
06:16
<@Reiver>
Is this a bad thing?
06:16
<@jerith>
The only way to make it work /without/ threads is if you could schedule stuff on the GUI's main event loop.
06:17
<@jerith>
No, not a bad thing.
06:17
<@jerith>
But if you change the alarm time, you'd need to unschedule and reschedule that alarm.
06:17
<@TheWatcher>
jerith: yeah, and AFAIK there isn't a way to do that in swing. But I could be wrong.
06:17
<@jerith>
I know nothing of swing. :-/
06:17
<@Reiver>
Ah, I see.
06:17 * Reiver ponders.
06:18
<@jerith>
And the simplest way to do that is to have one processAlarms() method that purges and refills the timer.
06:18
<@TheWatcher>
I'm pretty sure you can't atually /get/ at the event loop directly.
06:18
<@jerith>
Make sure you don't fill it with anything that has already passed...
06:18 * Reiver tries to read Timer quickly, and work out just how hard it would be to unschedule and reschedule a Timer.
06:20
<@Reiver>
Ah. You'd cancel and purge, and just recreate a new one. I think.
06:20
<@TheWatcher>
correct
06:20
<@Reiver>
And Timers create their own threads and such automagically?
06:22
<@Reiver>
No, I'm mixing myself up. I think.
06:22 * Reiver frowns.
06:23
<@TheWatcher>
A timer can have multiple scheduled events inside it
06:23
<@Reiver>
Is it a good idea or a bad idea to have each Appointment with it's own Timer?
06:23
<@TheWatcher>
Bad
06:23
<@Reiver>
Right.
06:23
<@Reiver>
So this is why changing the timer once it's started requires 'restarting' all the current timers?
06:24
<@TheWatcher>
Yes
06:24
<@TheWatcher>
Really, you want one Timer object for th ewhole application
06:25
<@Reiver>
So we'd have all the current timers storing their time in an ArrayList or something, and this would be stored in, say, an ApptScheduler object which would run a timer, and handle purging and restarting a timer should data ever need editing after a timer had already been created.
06:27
<@TheWatcher>
You don't really want or need to care how Timer does its stuff internally, you just need toknow that you have a Timer, and some method that will cancel, purge and repopulate it from the global calendars as needed
06:33 * Reiver nods.
06:33 * Reiver considers this.
06:34
<@Reiver>
So it's a for loop through an ArrayList which maintains the global array of appointments - and/or loop that searches through all loaded Calendars and repopulates the timer that way.
06:34
<@TheWatcher>
Yup
06:35
<@Reiver>
So... Right. I think I follow.
06:35
<@Reiver>
(I also happen to have an Object that holds an arraylist of Calendars, yes? Would it be naughty to use the main class for this instead of having a dedicated one?)
06:36
<@TheWatcher>
hmm
06:37
<@TheWatcher>
I'm probably not the best person to advise on that - I tend to have something of a... pragmatic approach to OO which doesn't often sit too well with Java ¬¬
06:37 Pi [~sysop@Nightstar-6915.hsd1.or.comcast.net] has quit [Ping Timeout]
06:38 * Reiver giggles, nods.
06:39
<@Reiver>
Fair enough, lad. It gets that way a bit.
06:39
<@Reiver>
...And I need to start getting ready to visit my little brother. Hrm.
06:40
<@TheWatcher>
(AKA, I use OO when it feels natural, rather than trying to bend the problem into it...)
06:40 * jerith returns, scrubbed and sanitised.
06:41
<@jerith>
Reiver: You probably want the Timer in your main app Class or something.
06:41 * Reiver nods.
06:42
<@jerith>
Only one Timer. It can schedule multiple events.
06:42
<@Reiver>
So... manage it in a method just off of Main?
06:42
<@jerith>
Something like that.
06:42
<@jerith>
Just make sure you can get to it from wherever you modify Appointments.
06:43 Chalcedon is now known as ChalcyCook
06:44 * Reiver nods.
06:44 * jerith starts finding clothings.
06:45 * TheWatcher should probably start getting ready himself soon
06:46 * ChalcyCook hugs jerith and TW, supplies cookies
06:46 * TheWatcher nroms
06:46
<@jerith>
Yay cookies for breakfast!
06:47 * ChalcyCook flee to kitchen
06:48 * Reiver huggles both coderfolk.
06:48
<@Reiver>
Has been much helpful. Thank you.
06:48 * Reiver actually got some working code!
06:49 * Reiver admits, part of this is the sudden stress relief of /probably/ getting an extention on the blasted thing.
06:49
<@TheWatcher>
Yay
06:49
<@jerith>
Yay!
06:49
<@TheWatcher>
Well, I can probably do the same again tomorrow if needed
06:49 * Reiver hugs.
06:50
<@Reiver>
Can I tell you later either way?
06:50
<@TheWatcher>
sure
06:50
<@jerith>
Sounds good.
06:50 * Reiver needs to fiddle code for a few more mins, then go visit his brother. Depending on how long /that/ takes...
06:50 * Reiver shrug.
06:50 * TheWatcher nods
06:50
<@jerith>
You may want to jabber me or something.
06:50
<@jerith>
Since I don't IRC from work.
06:50
<@Reiver>
Is that via GTalk, jerith?
06:50
<@jerith>
firxen (at) gmail.com for jabber/gtalk.
06:50
<@Reiver>
Right.
06:51
<@Reiver>
I'll do what I can there.
06:51
<@Reiver>
:)
06:51
<@TheWatcher>
I need to go shower and start sorting out things for me to make the utterly pointless trudge into the office now anyway
06:51 * Reiver patpat TW.
06:51
<@Reiver>
Thanks for the help, guys.
06:51
<@TheWatcher>
But i'll be around in work
06:51
<@jerith>
Why pointless?
06:51
<@jerith>
Geen probleem nie.
06:51
<@Reiver>
It's heled a lot. >.>
06:51
<@Reiver>
+p
06:52
<@TheWatcher>
jerith: because ATM I can do everything I need to right here. The only thing that going into the office gains me is more interruptions, people trying to rope me into meetings and less comfortable workign conditions
06:52
<@jerith>
I've learned not to say "any time" to Reiver anymore, since he'll take me up on it... ;-)
06:52
<@jerith>
Ah.
06:52 * jerith huggles.
06:52
<@TheWatcher>
(not to mention, I'll leave here at 8:15am and get into the office at 9:30, the return journey is the same)
06:53
<@Reiver>
(The timers had me stumped. So did some of the Very Basic Code, which is where I /really/ trip up on when stressed - I can do complicated bits, but then I forget basic syntax... This GUI still has me a bit hesitant, and wondering if I shouldn't be using seperate classes for some of this, but...)
06:53
<@Reiver>
And jerith: When I say 'any time', I mean it. :p
06:53
<@TheWatcher>
(there are times where I /really really/ wish I a) could drive and b) have a car)
06:53
<@Reiver>
Some folks have permission to seek me out at Any Time(tm), but I don't make that promise lightly. ;)
06:54 * Reiver eyes TW. No liscence by practical, medical/legal, or choice?
06:54
<@TheWatcher>
A bit from A, a bit from C.
06:54
<@jerith>
"can drive" != "have license"
06:55
<@jerith>
Either is possible without the other.
06:55
<@TheWatcher>
Okay, I wish I had a license then :p
06:55
<@TheWatcher>
Th point being somewhat moot considering that I have no car anyway
06:56 You're now known as TheWatcher[afk]
07:05 * Reiver hugs.
07:05
<@Reiver>
Bye!
07:05 * Reiver defrags the mp3 player. >.>
07:08
<@jerith>
Cheers Reiver.
07:08
<@Reiver>
Thanks, jerith.
07:08 * Reiver huggles.
07:08
<@jerith>
Send general "strange internet peoples wish you well" regards to $brother.
07:09 You're now known as TheWatcher
07:09
<@jerith>
Internet has just fallen off my priority queue in favour of shoes->tea->work.
07:09
<@jerith>
Cheers all.
07:11
<@Reiver>
Bye, lad!
07:12 * Reiver hug.
07:12 * Reiver grin, will do so.
07:12 Reiver is now known as ReivHospital
07:12
<@TheWatcher>
Bye Reiv
08:15 You're now known as TheWatcher[afk]
08:34 Pi [~sysop@Nightstar-6915.hsd1.or.comcast.net] has joined #Code
08:34 mode/#code [+o Pi] by ChanServ
08:53 Vornicus-Latens [~vorn@67.50.40.ns-3674] has quit [Quit: Leaving]
08:55 Vornicus [~vorn@67.50.40.ns-3674] has joined #code
08:55 mode/#code [+o Vornicus] by ChanServ
08:56 Vornicus is now known as Vornicus-Latens
09:38 ReivHospital is now known as Reiver
09:51 You're now known as TheWatcher[wr0k]
09:52 ChalcyCook is now known as Chalcedon
10:32 Chalcedon is now known as ChalcyZzz
11:19 Pi [~sysop@Nightstar-6915.hsd1.or.comcast.net] has quit [Ping Timeout]
11:25 Pi [~sysop@Nightstar-6915.hsd1.or.comcast.net] has joined #Code
11:25 mode/#code [+o Pi] by ChanServ
12:17 Reiver [~reaverta@IRCop.Nightstar.Net] has quit [Ping Timeout]
12:19 Reiver [~reaverta@IRCop.Nightstar.Net] has joined #Code
12:19 mode/#code [+o Reiver] by ChanServ
12:42
<@Reiver>
...Is it possible to get a stack trace without using an Exception object?
12:46
<@TheWatcher[wr0k]>
Um, not without a debugger AFAIK
12:47
<@Reiver>
Darn.
12:47 EvilSLEPLord is now known as EvilDarkLord
12:48
<@TheWatcher[wr0k]>
What's up?
12:48
<@Reiver>
Eh, just a thought I had for debugging.
12:49 * Reiver is creating a little Popup error box.
12:49 * Reiver was vaugely thinking that being able to dump a stack trace into it might be slightly cleaner method than most. >.>
12:50 * TheWatcher[wr0k] would recommend getting the rest of the thing working before adding eye candy ;)
12:50
<@EvilDarkLord>
How are you for time, Reiv?
12:50
<@Reiver>
Well... yes and no.
12:51
<@Reiver>
The 'eye candy' is a very simple way of negating things like people putting an end time sooner than the start time. >.>
12:51
<@Reiver>
Instead of breaking the program or doing nothing, just have a little popup. *shrug*
12:51
<@Reiver>
Is like, 10 minutes work.
12:51
<@Reiver>
And for time, um...
12:51
<@TheWatcher[wr0k]>
Well, your code can check for that and just throw up a simpel popup
12:52
<@Reiver>
I is!
12:52
<@TheWatcher[wr0k]>
the stack trace is Not Needed
12:52
<@Reiver>
...Wait, does Java have a built in popup class?
12:52 * Reiver really, really needs to remember to check for that kind of thing. >.<
12:54
<@TheWatcher[wr0k]>
http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html
12:54 * Reiver eyes this 'Popup factory', brainsplode.
12:54
<@Reiver>
Oh. That is a tad more useful, I suspect.
12:54
<@TheWatcher[wr0k]>
Yes
12:55
<@TheWatcher[wr0k]>
If you have not done so, read the java tutorial swing stuff, it tends to be somewhat useful for the more simple "how do I do X" kind of thing
12:56
<@TheWatcher[wr0k]>
Usually with far less junk around it than most courses I've encountered
12:57 * Reiver nods.
12:57
<@Reiver>
You haven't dealt with much GUI stuff, correct?
13:01
<@TheWatcher[wr0k]>
Most of the stuff I've done since Java 1.2 was released has been lower-level stuff, yes.
13:02
<@Reiver>
Bummer.
13:02 * Reiver murderates Swing, for it is not co-operating. He has no doubt missed a line somewhere or some such.
13:03
<@TheWatcher[wr0k]>
What's the problem?
13:03
<@TheWatcher[wr0k]>
(remember that, while I haven't done any for a while, that doesn't mean I can't work it out fast)
13:03
<@TheWatcher[wr0k]>
(as the actress said the bishop)
13:05
<@Reiver>
(...Do I wanna know?)
13:05 * Reiver hrm.
13:05
<@Reiver>
At the risk of sounding like a starfish, "It's not working".
13:05
<@Reiver>
I am supposed to have a few buttons show up in the main screen.
13:05
<@Reiver>
They are not.
13:05
<@Reiver>
This does not, I think, bode well.
13:07
<@TheWatcher[wr0k]>
Hm. Send me the code for the gui class(es)?
13:11
<@Reiver>
Sent
13:11 * Reiver hopes it work, but.
13:14
<@TheWatcher[wr0k]>
got it, one sec
13:18
<@TheWatcher[wr0k]>
hm
13:21
<@TheWatcher[wr0k]>
give me a sec, dealing with a student
13:23
<@TheWatcher[wr0k]>
Hm, I'm getting a gui. hm
13:24
<@Reiver>
It should have another row of buttons.
13:24
<@TheWatcher[wr0k]>
Yeah, I'm getting that
13:24
<@Reiver>
I am not entirely sure why I am not...
13:24
<@Reiver>
>.>
13:25 * TheWatcher[wr0k] digs
13:29
<@TheWatcher[wr0k]>
how're you invoking this?
13:29
<@TheWatcher[wr0k]>
I can't escape th efeeling you've be better off extending JPanel for a start
13:29 * TheWatcher[wr0k] fiddles
13:31
<@TheWatcher[wr0k]>
actually, how you're invoking ti does make a big difference. Hrm
13:34
<@TheWatcher[wr0k]>
hold on
13:34
<@TheWatcher[wr0k]>
um
13:34
<@Reiver>
I've done something Stupid(tm), haven't I?
13:35
<@TheWatcher[wr0k]>
you're not actually add()ing or setContentPane()in the mainView panel anywhere
13:35
<@TheWatcher[wr0k]>
but that shouldn't matter as far as seeing the buttons go
13:35
<@TheWatcher[wr0k]>
hrm
13:37
<@TheWatcher[wr0k]>
How and where is go() being called?
13:39
<@Reiver>
Um
13:39
<@Reiver>
Well.
13:39
<@Reiver>
Ah, in the main method.
13:39
<@Reiver>
ApptGui.go();
13:39
<@Reiver>
After creating it.
13:39
<@Reiver>
But, um
13:39
<@Reiver>
That shouldn't be a problem. I think.
13:39
<@Reiver>
Because you wouldn't get /any/ Gui if it wasn't working, right?
13:40
<@TheWatcher[wr0k]>
Yeah
13:40 * Reiver is pretty sure he's missed something really obvious that is screwing up his monthly calendar.
13:40 * Reiver wanted to check it was showing up, before trying to get Clever with the GridLayout.
13:40
<@TheWatcher[wr0k]>
I get the window, four buttons (the dayButton through yearButton) and nothing else.
13:40
<@TheWatcher[wr0k]>
Largely because, as I say, you aren't doing anything with mainView
13:41
<@TheWatcher[wr0k]>
but.. hrm
13:41
<@TheWatcher[wr0k]>
I'm running SDK1.4.2
13:41 * TheWatcher[wr0k] fingertappity
13:42
<@Reiver>
...I'm not doing anything with mainView? I thought mainView was what had the buttons attached /to/ it?
13:43 * Reiver er. Used a mainView JPanel because JFrames are clumsy and evil to work on.
13:43
<@TheWatcher[wr0k]>
no, you're attaching them stright to the contentpane of the frame
13:43
<@TheWatcher[wr0k]>
you're adding them to menuPanel, which you added straight to the contentpane
13:44
<@Reiver>
...So I did.
13:44 * Reiver checks.
13:44
<@Reiver>
So I'm not adding mainView anywhere...
13:44
<@TheWatcher[wr0k]>
No
13:44
<@Reiver>
That might do it. >.>
13:44
<@TheWatcher[wr0k]>
you should still be getting the 1Day through Year buttons
13:45
<@Reiver>
Ach!
13:45
<@Reiver>
I gots it.
13:45
<@Reiver>
frame.getContentPane().add(BorderLayout.NORTH, menuPanel);
13:45
<@Reiver>
frame.getContentPane().add(BorderLayout.CENTER, mainView);
13:45 * Reiver grin.
13:45 * Reiver then tries to tidy gizmo thingy up.
13:45
<@TheWatcher[wr0k]>
That'll work
13:48
<@Reiver>
Right.
13:48
<@Reiver>
Hm.
13:48
<@Reiver>
Now.
14:15 EvilDarkLord is now known as EvilNromLord
14:20 Thaqui is now known as ThaquiSleep
14:31
<@Reiver>
Hrm.
14:31
<@Reiver>
It dun work.
14:31 * Reiver stabs.
14:38
<@TheWatcher[wr0k]>
Hmm?
14:43
<@Reiver>
Eh.
14:43
<@TheWatcher[wr0k]>
Define 'dun work'
14:44
<@Reiver>
Gmailed.
14:44
<@Reiver>
I've been poking at the TableLayout buttons to try and get the days to line up in a nice row, beneath the arrows.
14:45 EvilNromLord is now known as EvilDarkLord
14:45
<@Reiver>
They're all set to North/South at the moment, but it did naught.
14:45
<@Reiver>
I have thus done something Dumb, I am sure.
14:45
<@EvilDarkLord>
What I suggested didn't work?
14:46
<@TheWatcher[wr0k]>
Ah
14:46 * TheWatcher[wr0k] ponders how to explain this
14:48
<@TheWatcher[wr0k]>
Each panel and the layout therein can be considered an independant entity - the buttons and layout in one will not do anything to the others, so lining up across different panels is.. difficult
14:49
<@Reiver>
Um
14:49
<@Reiver>
Er?
14:49
<@Reiver>
I don't want them lined up neatly.
14:49
<@Reiver>
I want them lined up, horizontally, beneath the arrows.
14:50
<@Reiver>
I had thought having a TableLayout with the arrows in a northern bit, and the gridlayout in a CENTER bit would do that.
14:51
<@TheWatcher[wr0k]>
Cept that you don't actually have a TableLayout anywhere, which was kinda throwing me
14:51
<@Reiver>
...
14:51
<@Reiver>
I tohught I did.
14:51 * Reiver pokes at it.
14:52
<@TheWatcher[wr0k]>
no, border,box,grid. No table
14:52
<@Reiver>
Oh.
14:52
<@Reiver>
Right, sorry, I meant borderlayout.
14:52
<@Reiver>
Not tablelayout.
14:53 * Reiver is going to try and fix this quirk, an then go to bed, he thinks...
14:54 * TheWatcher[wr0k] hms
14:55
<@TheWatcher[wr0k]>
(idly, you're currently adding to north and south, not north and center
14:55
<@Reiver>
(I know. I wanted to see if it would make a difference. It didn't. >.>)
14:56
<@TheWatcher[wr0k]>
Hm
14:57
<@TheWatcher[wr0k]>
Let me see if I can compile this, one sec
14:58
<@TheWatcher[wr0k]>
Right
15:01
<@TheWatcher[wr0k]>
The problem you're having is that the default layout manager for jpanel is FlowLayout, not BorderLayout
15:02
<@TheWatcher[wr0k]>
//Set the top menu
15:02
<@TheWatcher[wr0k]>
monthMainPanel.setLayout(new BorderLayout()); // add this
15:02
<@TheWatcher[wr0k]>
monthMainPanel.add(BorderLayout.NORTH, monthTopPanel);
15:02
<@TheWatcher[wr0k]>
you need to specify borderlayout. That'll get the days underneath the arros
15:03
<@TheWatcher[wr0k]>
the next problem you'll run into is that the names are all in a column rather than rows - that's down to the way gridlayout works
15:03
<@Reiver>
Ach!
15:03
<@Reiver>
...Woe.
15:03
<@Reiver>
Hrm.
15:04
<@Reiver>
Gridlayout goes Y, then X?
15:04
<@TheWatcher[wr0k]>
Yup
15:04
<@TheWatcher[wr0k]>
It fills columns, then rows
15:04
<@Reiver>
Y then X.
15:04
<@Reiver>
No way around it, I suspect?
15:04
<@TheWatcher[wr0k]>
.. that came out wrong. Yeah, it fills all the items in column 1 in, then in column 2, then in column 3 and so on
15:05
<@Reiver>
Like a boxlayout's X_AXIS and Y_AXIS button?
15:06 * TheWatcher[wr0k] fiddles
15:09 * TheWatcher[wr0k] Hrrrms
15:10
<@TheWatcher[wr0k]>
actually, ignore what I just said
15:11
<@TheWatcher[wr0k]>
It seems to be trying to create the minimum number of full columns it can
15:12
<@TheWatcher[wr0k]>
so if yu have sunday through saturday, then sunday1 through saturday1 you get
15:12
<@TheWatcher[wr0k]>
sunday monday
15:12
<@TheWatcher[wr0k]>
tuesday wednesday
15:12
<@TheWatcher[wr0k]>
...
15:12
<@TheWatcher[wr0k]>
saturday sunday1
15:12
<@TheWatcher[wr0k]>
etc
15:12
<@Reiver>
...
15:13
<@TheWatcher[wr0k]>
so the only way it'll have the days horizontally is if you fill the entire grid
15:13
<@Reiver>
Hrm.
15:13
<@Reiver>
So we need to rig the for loop to correctly spit out the days in the appropriate spots.
15:13
<@TheWatcher[wr0k]>
Yep
15:13
<@Reiver>
Whilst filling in the rest of the grid with blanks.
15:13
<@TheWatcher[wr0k]>
Indeed
15:13
<@Reiver>
Is this going to be hard, or am I going to explode with tears?
15:14
<@TheWatcher[wr0k]>
Hrm
15:14
<@TheWatcher[wr0k]>
I should have some code somewhere to do it. In C or perl at least
15:14
<@TheWatcher[wr0k]>
It comes down to determining the day that the 1st of the month falls on really
15:15
<@TheWatcher[wr0k]>
In fact, I'm pretty sure I've got some somewhere, unfortunately if I do the chances are it's on helios, which I can't get to from work :/
15:16
<@Reiver>
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Calendar.html#DAY_OF_MONTH
15:16
<@Reiver>
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Calendar.html#DAY_OF_WEEK_IN_M ONTH
15:17
<@Reiver>
I am not entirely sure if that is useful.
15:17
<@Reiver>
But they also have constants for Mon, Tues, Wed, etc.
15:18 * TheWatcher[wr0k] must afk for a while alas
15:19
<@TheWatcher[wr0k]>
will be back as soon as I can, but I'll be leaving in 20 or so anyway :/
15:19 You're now known as TheWatcher[afk[
15:19
<@Reiver>
NP.
15:19
<@Reiver>
I need sleep.
15:20
<@Reiver>
I'm able to ask questions, and type code, but I can't actually parse manuals or bugfix any more, so...
15:20 * Reiver huggles.
15:20
<@Reiver>
Cheers, lad.
15:20
<@Reiver>
Nini.
15:20
<@Reiver>
See you tomorrow at some point. Um. Don't bother with the early rise, I'll go to the uni in the afternoon anyway.
15:20
<@Reiver>
(And if I don't get the extension I'm screwed anyway, so what the hell)
15:23 You're now known as TheWatcher[wr0k]
15:23
<@TheWatcher[wr0k]>
Well, goodnight
15:23 * Reiver huggles.
15:23
<@Reiver>
Cheers, lad.
15:23
<@TheWatcher[wr0k]>
I'll dig up that code when I get home and sent it to you
15:23
<@Reiver>
Not running off, but if you've only got 20 mins, I...
15:23
<@Reiver>
...I have 20 mins before 4AM.
15:23
<@Reiver>
Right.
15:23
<@Reiver>
Yes.
15:23
<@TheWatcher[wr0k]>
should save you some effort if nothing else
15:24
<@Reiver>
SLEP
15:24 * Reiver hug, thanks muchly!
15:24 Reiver is now known as ReivZzz
15:24
<@TheWatcher[wr0k]>
Night
15:24
<@ReivZzz>
ni!
15:35
<@Ev3>
Any of you who have hacked messenger to only play a sound when it's not active and can help me do it too? :p
15:38 You're now known as TheWatcher[afk]
15:59 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
15:59 mode/#code [+o Chalcy] by ChanServ
16:01 ChalcyZzz [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
16:19 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #code
16:39 EvilDarkLord is now known as EvilNROMLord
17:08 You're now known as TheWatcher
17:37 Vornicus [~vorn@Nightstar-18307.slkc.qwest.net] has joined #code
17:37 mode/#code [+o Vornicus] by ChanServ
17:37
<@Vornicus>
okay obviously i missed something about cron.
17:37
<@Vornicus>
how do I get it to read my crontab?
17:38 You're now known as TheWatcher[afk]
17:39
<@TheWatcher[afk]>
what does crontab -l show when logged in as th euser the dron job should run as?
17:39
<@Vornicus>
0 0 * * 1,2,3,4,5 $HOME/wre_dump.sh
17:40
<@Vornicus>
Which is what it's supposed to be.
17:40
<@TheWatcher[afk]>
Hm
17:42
<@TheWatcher[afk]>
that should work O.o
17:42 * TheWatcher[afk] must go, if you haven't solved it when he returns, he'll help poke
17:59 EvilNROMLord is now known as EvilDarkLord
18:05 Vornicus-Latens [~vorn@67.50.40.ns-3674] has quit [Ping Timeout]
18:26 ^M|sSyZ_AW^ [~mssyz_a@Nightstar-16701.adsl196-7.iam.net.ma] has joined #Code
18:27
<@ToxicFrog>
...
18:30 * Vornicus applies thwompings to cron.
18:30 ^M|sSyZ_AW^ [~mssyz_a@Nightstar-16701.adsl196-7.iam.net.ma] has quit [Connection reset by peer]
18:46
<@Vornicus>
...is cron runnign at all?
18:48
<@TheWatcher[afk]>
you should have /usr/sbin/cron running, certainly
18:48 You're now known as TheWatcher
18:49
<@Vornicus>
crond is running.
18:53
<@TheWatcher>
Hrm, is your user in /etc/cron.allow or is /etc/cron.deny empty?
18:54
<@TheWatcher>
(although I don't think it'll even let you set up a crontab if the deny is set or neither file exists)
19:03
<@Vornicus>
THey both exist.
19:03 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
19:03
<@Vornicus>
The logs say stuff about /etc/cron.hourly running, and stuff about me futzing with cron files.
19:05
<@TheWatcher>
Hmm
19:05
<@Vornicus>
But my once every five minutes script: */5 * * * * echo "running cron 5minutes" >> /home/dan/crontest.txt
19:05
<@Vornicus>
isn't running.
19:06 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
19:06 mode/#code [+o Chalcedon] by ChanServ
19:06
<@TheWatcher>
humour me and try adding yourself to the cron.allow, restart cron and see if it helps?
19:08
<@Vornicus>
...hm, there it goes.
19:08
<@Vornicus>
that was totally random.
19:38
<@jerith>
Good morrow.
19:39 EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has quit [Ping Timeout]
19:40
<@TheWatcher>
Hi jerith
19:41 MahalAFK is now known as Mahal
19:46 EvilDarkLord [althalas@Nightstar-17046.a80-186-184-83.elisa-laajakaista.fi] has joined #code
20:06 * Vornicus beats it.
20:07 * jerith beats it too. With a bigger stick.
20:10
<@Vornicus>
...hey look, cron sends me mail.
20:11
<@Vornicus>
...I need a less craptacular mail client than "mail"
20:11
<@jerith>
mutt?
20:11
<@jerith>
pine?
20:11
<@jerith>
emacs?
20:12
<@Vornicus>
heh
20:15
<@Vornicus>
I wonder if I can get it to send to my actual email.
20:16
<@jerith>
You could yet up a procmail rule.
20:18
<@Vornicus>
however, the email did explain what the heck was wrong.
20:19
<@Vornicus>
(stupid PATH tricks. bah)
20:19
<@jerith>
:-)
20:20
<@jerith>
Yes, stupid PATH tricks.
20:20 * Vornicus has types :wq enough this afternoon, too.
20:21
<@jerith>
Yay emacs!
20:21
<@jerith>
C-x C-c
20:22
<@Vornicus>
yay nano!
20:22
<@ToxicFrog>
Yaye dammit vorn that's my line
20:22
<@TheWatcher>
Vornicus: yes, you can -
20:22
<@TheWatcher>
MAILTO=your@addres.com
20:22
<@TheWatcher>
at the start of the crontab will doit
20:22
<@Vornicus>
...that's it?
20:22
<@TheWatcher>
yup
20:22
<@Vornicus>
SWEET
20:24
<@Vornicus>
...okay I have too many ssh connections open.
20:25
<@jerith>
You can NEVER have too many ssh connections open!
20:25
<@Vornicus>
I think five - one of which bounces - is too many.
20:25
<@jerith>
Nope.
20:26
<@jerith>
I typically have six or seven open at a time.
20:30
<@Vornicus>
there. Down to just one.
20:31
<@ToxicFrog>
I rarely have fewer than ten.
20:31 aoanla [~sam@Nightstar-24717.range81-156.btcentralplus.com] has joined #code
20:31
<@Vornicus>
you're all mad.
20:31
<@Vornicus>
WEll, TF I knew - he's the guy with 50 browser windows open regularly.
20:32 * Vornicus has, uh. 7 windows.
20:32
<@Vornicus>
total.
20:32
<@ToxicFrog>
One /window/, 50+ /tabs/
20:32
<@Vornicus>
same thing.
20:32
<@ToxicFrog>
And part of this is the whole "Durandal acts as an X terminal for Orias" think.
20:32
<@jerith>
Only 50?
20:32
<@ToxicFrog>
One xterm == one SSH session.
20:32
<@ToxicFrog>
jerith: minimum.
20:32
<@ToxicFrog>
I think my record is 283.
20:32
<@jerith>
Ah.
20:32
<@ToxicFrog>
At the moment it's hovering around 100.
20:33
<@Vornicus>
Is this correct? $HOME/wre_dump.sh >> dump_diag.txt 2> &1
20:33
<@jerith>
I tend to have about 20-30 per window, one window per screen.
20:33
<@jerith>
2>&1
20:34
<@Vornicus>
so no spaces.
20:34
<@Vornicus>
ok
20:34
< aoanla>
...does it actually matter?
20:34
< aoanla>
I thought spaces were edited out by the shell.
20:34 * Vornicus needs to make sure his rubber chicken is waved properly.
20:37
<@jerith>
I don't know. I've never seen it with the space in there, though.
20:38
< aoanla>
Fair enough, and, now that I think of it, neither have I.
20:38
< aoanla>
On the other hand, I don't think spaces matter in principle.
20:40
<@jerith>
[jerith@jerith-lap0 tmp]$ python foo.py 2>&1 | less
20:40
<@jerith>
[jerith@jerith-lap0 tmp]$ python foo.py 2> &1 | less
20:40
<@jerith>
-bash: syntax error near unexpected token `&'
20:40
<@ToxicFrog>
The "2>" can't contain spaces.
20:40
<@ToxicFrog>
Aah.
20:40
<@ToxicFrog>
And neither can the >&1, apparently.
20:41
< aoanla>
Aha.
20:41
< aoanla>
I bow to the empirical evidence.
20:41
<@jerith>
import sys
20:41
<@jerith>
print "stdout"
20:41
<@jerith>
print >>sys.stderr, "stderr"
20:41
<@jerith>
(foo.py)
20:41
<@jerith>
Yay! I'm an empire!
20:42
<@Vornicus>
*snrk*
20:42 * jerith runs around repressing the populace and decimating the barbarian tribes!
20:42
<@Vornicus>
bwaaahaahaa
20:43
< aoanla>
...
20:45
<@jerith>
... isn't that what empires do?
20:45
< Janus>
Don't they officiate baseball games as well?
20:46
<@jerith>
No, that's *UN*pires.
20:47
<@McMartin>
Um
20:47
< aoanla>
I thought they were the un-undead.
20:47
<@McMartin>
Umpires.
20:47
<@Chalcedon>
vimpires?
20:47
< aoanla>
Better than emacspires.
20:48 * jerith builds minarets in his editor.
20:48
<@jerith>
But the emacspires are pretty!
20:56
<@Vornicus>
nanopires?
20:56
<@Vornicus>
no no
20:56
<@Vornicus>
edpires!
20:58 * jerith recalls giving his friend Edrich a T-shirt that says "the standard text editor".
21:00 Vornicus [~vorn@Nightstar-18307.slkc.qwest.net] has quit [Connection reset by peer]
21:14 ThaquiSleep is now known as Thaqui
21:53 Vornicus [~vorn@Nightstar-18307.slkc.qwest.net] has joined #code
21:53 mode/#code [+o Vornicus] by ChanServ
21:55
<@Vornicus>
So there's ed and joe.
21:56
<@jerith>
Yes.
21:56
<@jerith>
And elvis.
21:56
<@Vornicus>
and elvis.
22:01 * Vornicus wonders what other utilities out there have names like that.
22:02
<@Vornicus>
names you reasonably see given to someone in an english-speaking country that is.
22:06
<@jerith>
Hmm...
22:10 * aoanla is fairly sure he's seen a "bob".
22:12
<@jerith>
Nope.
22:12
<@jerith>
But there is a cat.
22:13
<@jerith>
At least, not on my system.
22:17
<@jerith>
Apparently I need to plug my laptop in on occasion.
22:39 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
22:39 mode/#code [+o Chalcy] by ChanServ
22:39 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Killed (NickServ (GHOST command used by Chalcy))]
22:39 Chalcy is now known as Chalcedon
22:43 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: ~]
22:44 Syloq [Syloq@NetAdmin.Nightstar.Net] has joined #code
22:47 You're now known as Thewatcher[T-2]
22:58 You're now known as TheWatcher[zZzZ]
23:11 aoanla is now known as caps[t-2]
23:13 caps[t-2] [~sam@Nightstar-24717.range81-156.btcentralplus.com] has quit [Quit: Leaving]
23:20 Syloq is now known as Syloqs-AFH
23:56 Thaqui [~Thaqui@Nightstar-8486.adsl.xtra.co.nz] has quit [Connection reset by peer]
--- Log closed Tue Oct 17 00:00:03 2006
code logs -> 2006 -> Mon, 16 Oct 2006< code.20061015.log - code.20061017.log >