code logs -> 2010 -> Sat, 27 Mar 2010< code.20100326.log - code.20100328.log >
--- Log opened Sat Mar 27 00:00:47 2010
00:25 AnnoDomini [annodomini@Nightstar-4a48ec6d.adsl.tpnet.pl] has quit [[NS] Quit: DEATH.]
01:07 You're now known as TheWatcher[T-2]
01:11 You're now known as TheWatcher[zZzZ]
01:45 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
02:06
< Orthia>
hm.
02:07 * Orthia continues to battle against the evils of file IO.
02:07
<@Vornicus>
FileInputStream, FileOutputStream
02:07
<@Vornicus>
They're byte streams.
02:07
<@Vornicus>
You should be able to just open one and use it.
02:22
<@Vornicus>
If that's hard there's something wrong.
02:24
< Orthia>
Oh, cool.
02:28 Attilla [Attilla@FBC920.482E2D.82B33A.EBFF0B] has quit [[NS] Quit: ]
02:35
< Orthia>
hmmm
02:35
< Orthia>
Every example of InputStreams has them read the stuff in, Do Something With It, then move on
02:36
< Orthia>
I am actually iterating through the input stream via the LZW class itself?
02:38
<@Vornicus>
Yes.
02:39
<@Vornicus>
(btw your "pipe" ability will be to, if no input file is specified, use system.in instead)
02:40
< Orthia>
(hm, that would sit in the main, I presume, not the FileLoader)
02:41
<@Vornicus>
FileLoader? what the hell are you doing?
02:42
< Orthia>
making a class to handle file IO.
02:42 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
02:44
< celticminstrel>
Are you sure it's not System.stdin?
02:44
< celticminstrel>
And what's wrong with the InputStream class(es) for handling file IO?
02:45
< Orthia>
I have no idea? >_>
02:45
< celticminstrel>
If you do want to make file IO class(es), though, the logical route would be to create InLZWStream extends InputStream and OutLZWStream extends OutputStream.
02:46
< celticminstrel>
(or some such thing)
02:46
< celticminstrel>
What does your FileLoader class actually do?
02:48
< Orthia>
Er. Well, it's actually called FileHandler
02:48
< Orthia>
And it reads and writes files.
02:48
< celticminstrel>
Is it big?
02:49
< celticminstrel>
What's the interface (public methods)?
02:49
< celticminstrel>
(By the way, is there such a thing as InputOutputStream?)
02:50
< celticminstrel>
(Or something like that?)
02:50
<@Vornicus>
celmin: not that I'm aware of.
02:50
<@Vornicus>
Orthia: the LZW encoder and decoder we built are designed to take files directly.
02:50
< celticminstrel>
That's silly. C++ has it. Python has it...
02:50
<@Vornicus>
You pass a file object in, and it will do the reading and writing.
02:51
< celticminstrel>
A file object? Is that the same as a stream object?
02:51
<@Vornicus>
celmin: yeah, same thing.
02:52
<@Vornicus>
oh, there is RandomAccessFile
03:20 * Orthia considers. This ... probably didn't need a whole class, did it.
03:20
< Orthia>
public FileInputStream loadRaw() throws FileNotFoundException {
03:20
< Orthia>
FileInputStream in = new FileInputStream(filename);
03:20
< Orthia>
return in;
03:20
< Orthia>
}
03:20
< Orthia>
(Most times in Java, this ends up Leeging Huge as it includes all the parsing and stuff.
03:30
<@Vornicus>
Yeah, no, don't need that.
03:30
<@Vornicus>
Just do it in main.
03:30
<@Vornicus>
and catch the FNF and whatever
03:35
< Orthia>
OK
03:37
< Orthia>
So, am I able to have two Main?
03:37
< Orthia>
One for packing, one for unpacking?
03:37
< celticminstrel>
Um. What?
03:37
< celticminstrel>
You mean two main functions?
03:37
< Orthia>
No, but I'm supposed to have the pack and unpack routines able to be called seperately.
03:38
< celticminstrel>
Any class can have a main function.
03:38
< celticminstrel>
So, if you were to put a main in the packing class and a main in the unpacking class, you could run either class from the command-line...
03:39
< celticminstrel>
...but I've no idea if that's what you mean.
03:39
<@McMartin>
That's true
03:39
<@McMartin>
a .jar file, however, still TMK requires a unique "main class" which you specify as metadata
03:40
<@McMartin>
(It's actually traditional to have your data/support classes have main methods that run unit tests or demos in some disciplines)
03:40
<@Vornicus>
Orthia: I'd make it so you have two classes with main in them, both of which talk to your LZW class. If you need two programs.
03:40
<@Vornicus>
Honestly I'd make it one program with a flag.
03:40
< jerith>
-c and -x or whatever.
03:43
< Orthia>
Vorn: OK, we will see how I go
03:44
< Orthia>
Wasn't sure how the static main method interfered between classes.
03:44
< celticminstrel>
It doesn't.
03:44
< celticminstrel>
It's just an ordinary method, really.
03:45
< celticminstrel>
Except that in the ... um ... initially-loaded class? ... it becomes the main entry point.
03:49
<@Vornicus>
What celmin said.
03:50
<@Vornicus>
If you do java foo.class you'll end up running the main for that class.
03:50
<@Vornicus>
jars have a manifest which tells it which class to run.
03:51
<@McMartin>
And you can override that on the command line if you awnt.
03:51
<@McMartin>
*want
03:52
<@Vornicus>
Indeed
03:57
< Orthia>
OK, that's handy. Cheers.
04:05 GeekSoldier [Rob@Nightstar-e86e3e0d.ip.cablemo.net] has joined #code
04:14 * Orthia haaaate try/catch
04:15
< Orthia>
http://pastebin.starforge.co.uk/198
04:17
< Orthia>
Error in the comment line.
04:17 * celticminstrel clicks...
04:21
< celticminstrel>
Line 29?
04:22
< Orthia>
29-32 all come up as invalid, but I think it's line 29 doing it, yeah
04:22
< celticminstrel>
Well, that "return in" statement should not be there.
04:23
<@Vornicus>
FileInputStream
04:23
<@Vornicus>
InputStream is abstract.
04:23
< celticminstrel>
Ah yes. That too.
04:23
<@Vornicus>
FileInputStream is a concrete subclass.
04:24
< celticminstrel>
I forgot about that. It's been a while since I used Java...
04:24
< celticminstrel>
You don't need that throws clause either.
04:25
< celticminstrel>
As for try...catch...finally...
04:26
< celticminstrel>
http://pastebin.starforge.co.uk/199
04:27
< celticminstrel>
Though that might be problematic actually...
04:28
< celticminstrel>
I guess it depends how Java handles an attempt to close a stream that is already closed. If it just ignores it, then that change I made should be fine.
04:29
< Namegduf>
I believe it forces you to catch IOException on close()
04:29
< celticminstrel>
If not, the close should go both in the main try block (and possibly the catch block if the exception is something other than file not found) and omit the finally block.
04:29
< celticminstrel>
^scratch the "both"
04:36
< Orthia>
GOTCHA
04:36
< Orthia>
} catch (FileNotFoundException e) {
04:36
< Orthia>
Silly syntax error.
04:36
< celticminstrel>
What did you have?
04:36
< Orthia>
I lacked the brackets.
04:37
< Orthia>
Vorn: Would closing the input stream break my code?
04:37
< celticminstrel>
Oh! Wow.
04:37
< celticminstrel>
Only if you close it before you do whatever you're doing with it.
04:41
<@Vornicus>
shouldn't, but make sure you're done with the file.
04:41
<@Vornicus>
http://java.sun.com/j2se/1.5.0/docs/api/java/io/Closeable.html#close() "if the stream is already closed then invoking this method has no effect."
04:42
< celticminstrel>
Then it is best invoked in the finally clause.
04:42
< Orthia>
nein
04:42
< celticminstrel>
(As far as I'm aware, the "finally" clause is roughly equivalent to C++ destructors in terms of what to use it for.)
04:43
< celticminstrel>
No what?
04:43
< Orthia>
Finally is a bad place for it.
04:43
< celticminstrel>
Why?
04:43
< Orthia>
Demands it be surrounded ... by a try/catch for FileNotFound. :)
04:43
< celticminstrel>
Um, what?
04:43
< Orthia>
The exception we just caught?
04:44
< Orthia>
http://pastebin.starforge.co.uk/201 - VICTOLY
04:44
< Orthia>
I think.
04:44
< celticminstrel>
What about the exception we caught?
04:44 * Orthia laughs.
04:44
<@Vornicus>
IOExceptions can happen with close but damned if I know why.
04:44
< celticminstrel>
The close() call should really go in the finally clause.
04:45
< Orthia>
OK: in.close(); is a command that requires it be surrounded by a try/catch block for FileNotFoundException. Which was the try/catch block we've added the 'finally' to.
04:45
< celticminstrel>
If that causes an error, put it in the throws clause.
04:45
<@Vornicus>
not FNF, IOException
04:45
< Orthia>
Aha, okay. Still.
04:45
< celticminstrel>
int main( ... ) throws IOException
04:45
< Orthia>
I already have a catch block for that one too.
04:45
< celticminstrel>
Then you won't need the try-catch block around close().
04:45
<@Vornicus>
works
04:46
< Orthia>
Anyway: Code above. Vorn: Is it terrible?
04:46
< celticminstrel>
But the thing with close is that you want it to run if an exception was caught.
04:46
< celticminstrel>
(Except if the exception was an IOException, it doesn't matter.)
04:47
< celticminstrel>
You don't really need to initialize in to null, though I guess it doesn't hurt.
04:47
< celticminstrel>
But apart from close(), I can't see anything to change.
04:48
< Orthia>
I can, kinda. Would be nice if my encoder actually wrote any damn thing out the other end, eh?
04:48 * Orthia ponders how best to do that. Apparently he's meant to make this thing able to pipe as well.
04:48
< celticminstrel>
Huh?
04:48
< celticminstrel>
Making it able to pipe is easy.
04:48
< celticminstrel>
First, declare "in" as an InputStream instead of a FileInputStream.
04:49
< celticminstrel>
Then, if no file is specified, set "in = System.stdin" or whatever Java calls the standard input.
04:49
< celticminstrel>
Otherwise, do exactly what you're doing now.
04:50
< celticminstrel>
...does that make sense?
04:51
< Orthia>
Sure does!
04:51
< celticminstrel>
As long as it reads from stdin and writes to stdout, you can pipe to and from it.
04:52
< celticminstrel>
In fact, it would probably be sufficient to always read from stdin and write to stdout, since you can use redirections if you need to read or write from a file...
04:53
< Orthia>
so, uh
04:53
< Orthia>
hm
04:54
< Orthia>
Which Input model would I want to be doing that with?
04:54
< celticminstrel>
Doing what which where now?
04:54
< Orthia>
Well, I clearly don't want FileInputStream, do I.
04:54
< celticminstrel>
Just declare in as an InputStream, and you can assign any type of input stream to it.
04:55
< celticminstrel>
I'm not really sure what the type of System.stdin (or is it System.in?) is, but it doesn't really matter.
04:59
< Orthia>
OK, so
04:59
< Orthia>
How do I get my program to tell if it is being fed standard input instead of a filename? Is there a trick for my commandline reader?
05:02
<@Vornicus>
system.in and system.out
05:02
<@Vornicus>
That's a trick for your command line reader.
05:02
<@Vornicus>
If you don't get a filename, get system.in (or system.out) instead.
05:04
< celticminstrel>
System, not system.
05:05
< celticminstrel>
And your program doesn't particularly care whether it is being fed standard input or a file, as long as all relevant functions take InputStream as a parameter.
05:05
<@Vornicus>
indeed.
05:05
< Orthia>
So the commandline thing will be "lzwencoder system.in -b 14" ?
05:06
< celticminstrel>
No.
05:06
< celticminstrel>
It won't receive a file parameter at all.
05:06
< celticminstrel>
When it doesn't receive a file parameter, it should default to System.in.
05:06
< Orthia>
ahh, so if filename == null, proceed with system input?
05:06
< Orthia>
hm
05:06
< Orthia>
In that case, I could easily enough set in to /default/ to system input, and only change when told to?
05:07
< celticminstrel>
Not quite, more like "if args.length < 2" or something similar.
05:07
< celticminstrel>
Yes, you could do that.
05:09
< Orthia>
hm
05:10
< Orthia>
So how do I write to standard output?
05:10
<@McMartin>
System.out.println("lolpwnt");
05:10
< celticminstrel>
Much the same way; instead of opening a new FileInputStream, set your out variable (declared as an OutputStream) to System.out.
05:10
< Orthia>
aha
05:11
< Orthia>
... aha, I think I see how one does this then.
05:11
< celticminstrel>
You might not want println though; there's also printf and write at your disposal if I recall correctly.
05:11
< Orthia>
I come to think that perhaps I should have had a read/writer class afterall; this function is going to be pretty standardised. OTOH, that could just mean I want an extra arguement. Hmm. Will fiddle with that once it Works.
05:16
< Orthia>
http://pastebin.starforge.co.uk/202 - 1) So far so good? 2) Do I want to put the file /output/ in 48 or 56?
05:17
< Orthia>
48 has the convinience of a million catch blocks to begin with. But I'm not sure that's actually an advantage. >_>
05:19
< celticminstrel>
I feel like you'll get an out of bounds exception if you try to run that with no input file.
05:24 * Orthia wonders why?
05:28
< celticminstrel>
Oh wait.
05:28
< celticminstrel>
I'm wrong.
05:29
< celticminstrel>
Though, your maxTrieSize bit could, if they passed the -b flag but didn't actually specify a number after it.
05:30
< Orthia>
A point.
05:31
< Orthia>
I don't think I care enough about that bit though, sloppy as it may be~
05:31
< celticminstrel>
Always assume your users are morons. ;)
05:37 DBot [Reiver@Nightstar-019bfb55.xnet.co.nz] has joined #code
05:38
< Orthia>
I will worry about the users being morons once the programmer is not being one himself~
05:38
< Orthia>
Which line should I be putting the output? In the middle of the try/catch, or creating a new one?
05:40 DiceBot [Reiver@Nightstar-019bfb55.xnet.co.nz] has quit [Ping timeout: 121 seconds]
05:40 DBot is now known as DiceBot
05:41
< celticminstrel>
I think I'd put it in the same try block.
05:42
< Alek>
augh.
05:42
< Alek>
this is annoying.
05:42
< Alek>
half the web is erratic. sometimes available sometimes not.
05:43
< Alek>
especially google.
05:43
< celticminstrel>
Bleh. Bedtime.
05:43 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: *hums* Can't stay now!]
05:45 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
05:45 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: *hums* Can't stay now!]
05:50
< Orthia>
How do I get the integers back out of the ArrayList<Integer> structure? Does this specifically demand a for loop or is there a cheaters way?
05:52
<@Vornicus>
All of them?
05:52
<@Vornicus>
use a for loop on it; it's iterable.
05:52
< Orthia>
OK.
05:52
<@Vornicus>
foreach, etc
05:54
< Orthia>
foreach?
05:54
<@Vornicus>
see the for loop in the decoder.
05:54
< Namegduf>
for (Integer i : yourList) { ... }
05:55
< Namegduf>
It's a quite nice construct.
05:55
< Orthia>
Got it. RIGHT, YER BITCHES
05:57
< Orthia>
... whut
05:57
<@Vornicus>
Have you figured out packing and unpacking?
05:58
< Orthia>
Haven't even looked at it yes
05:58
< Orthia>
yet
05:58
< Orthia>
I figured I would panic about that once I have tested encode and decode.
05:59
<@Vornicus>
ok.
06:00
<@Vornicus>
(pack and unpack are relatively simple, but I can't show it to you in python because most of the tricks are type stuff that Python nicely ignores.)
06:01
< Orthia>
http://pastebin.starforge.co.uk/204 - line 50, error in comment
06:01
< Orthia>
http://pastebin.starforge.co.uk/203 - the class it is calling.
06:01
< Orthia>
Pretty sure encode bloody well /does/ accept an InputStream, no?
06:02 Serah [Z@2C3C9C.B2A300.F245DE.859909] has quit [Ping timeout: 121 seconds]
06:02
<@Vornicus>
wtf
06:03 * Orthia ;_;
06:03
<@Vornicus>
I don't know, that should work.
06:04
< Orthia>
gnah
06:05
< Orthia>
Vorn: You doing much tomorrow? AKA 12-14 hours?
06:10
<@Vornicus>
well, I'm half-packing, but not really other than that.
06:10
< Orthia>
...packing?
06:10
<@Vornicus>
got a new apartment
06:10
< Orthia>
Woo!
06:10
< Orthia>
Crats, vorny!
06:11
< Orthia>
hrn. Am tempted to just get the decoder doing the same thing, bugs be damned, tonight. Then try and get pack/unpack and the trie size-limiter sorted.
06:15 * Alek also passes Vorn some crates.
06:15
<@Vornicus>
The size limiter is actually not all that hard; you do need to change all four of encode, decode, pack, and unpack, but that's not that big a deal.
06:20
<@Vornicus>
(encode and decode need to 1. limit and 2. start over when the clear code comes; pack and unpack need to start over when the clear code comes.)
06:25
< Orthia>
hrn
06:26
< Orthia>
so hey
06:26
< Orthia>
My decoder
06:27
< Orthia>
Is pretty much identical to my encoder, both in commandline arguements and in file IO?
06:27
<@Vornicus>
Pretty much.
06:27
< Orthia>
Should I just have a flag, or c+p the methods, or turn these into functions, or...?
06:29
<@Vornicus>
I'd do a CL flag.
06:29
<@Vornicus>
Did you get the thing to stop bitching?
06:31
<@Vornicus>
(the 204 problem, that is)
06:37
< Orthia>
nope
06:37
< Orthia>
wait, haha, got it
06:37
< Orthia>
The project hadn't updated the type for LZW.
06:52
<@Vornicus>
aha
06:58 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection reset by peer]
07:00
< Orthia>
OK, question
07:01
< Orthia>
I have an inputstream that is theoretically a series of, at the moment, bytes
07:01
< Orthia>
How do I change/typecast those to an Iterable<Integer>?
07:02 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
07:03 Syloqs_AFH is now known as Syloqs-AFH
07:03
<@Vornicus>
you pack or unpack them.
07:04
<@Vornicus>
er, unpack them, in this case.
07:07
< Orthia>
OK? I presume this uses a for loop of some variety?
07:08
<@Vornicus>
What's /in/ the input stream?
07:09 * Orthia coffs. Whatever the encoder output to a file. A series of integers? Not entirely sure how they get stored.
07:10
<@Vornicus>
I don't know how they got stored either!
07:10
<@Vornicus>
Looks like you need to define how to store these things.
07:11
< Orthia>
Yeah
07:11
<@Vornicus>
Time to write pack()
07:18
<@Vornicus>
In order to write pack() and unpack() the first thing you need is a way to tell, by the index of a thing, how many codes have been generated, and thus how many bits you need to distinguish them.
07:19
<@Vornicus>
At index 0, there's only 257 possible codes, and each additional index adds one. You will need to increase the number of bits each time you pass a power of two.
07:19
< Orthia>
hm, a point
07:20
< Orthia>
Oh, minor point of order - we want the encoder/decoder to work regardless of whether things were packed or not.
07:20
<@Vornicus>
If you /really/ want to test your encoder/decoder, though, you can round trip stuff.
07:21 Serah [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
07:22
<@Vornicus>
Find a largish text file - War and Peace - and stuff it through the encoder, then the results of that through the decoder, and then compare that result to your original.
07:22
< Orthia>
OK
07:22
< Orthia>
Hence why I am trying to get it to behave.
07:23
<@Vornicus>
Don't bother storing off the encode results.
07:24
< Orthia>
I'm trying to get it to encode a file at all; I think I have the 'telling it where to find the file' bit written wrong.
07:24 Zed [Zed@Nightstar-d7ade99d.or.comcast.net] has joined #code
07:24
<@Vornicus>
what's it doing?
07:25
< Orthia>
Giving me 'file not found' errors
07:25
< Orthia>
Even when I specify, eg, "C:\test.txt" and have a file placed there.
07:25
< Orthia>
It may be getting confused about relative vs absolutes, but damned if I know how to tell it to recognise one over the other.
07:26
<@Vornicus>
wtf
07:26
< Orthia>
Yeah
07:27
<@Vornicus>
wait
07:27
<@Vornicus>
you're specifying it with a single backslash?
07:28
< Orthia>
heh~
07:28
<@Vornicus>
\\
07:28
< Orthia>
Still nothing.
07:28
<@Vornicus>
what
07:28
< Orthia>
http://pastebin.starforge.co.uk/205
07:28
<@Vornicus>
arg, where's McM, I can't do the vagaries here.
07:29
< Orthia>
Arguments in question: C:\\Test.txt -c
07:29
<@Vornicus>
Oh, that's coming in from the outside world.
07:29
<@Vornicus>
...okay, what's going on there.
07:29
< Orthia>
Yeah, need to work out how to get it to parse right.
07:30
< Orthia>
And unfortunately I need to dissapear to sort out dinner, as I promised to do so "In an hour" an hour ago. Will have to BBL. >.<
07:30 * Orthia is very sorry, and also extremely appreciative of the help, Vorny
07:30 * Orthia must, however, depart.
07:31
<@Vornicus>
This is stuff I can't help with, unfortunately. You're going to need o poke McM and others, because I don't know how to deal with this.
07:31
< Orthia>
No problem, thank you Vorn
07:31
< Orthia>
I shall resume this stuff in the morning. Mucho appreciated.
07:31
< Orthia>
Also, if I can get the code cleaned up (comments, etc), and bugfixed tomorrow, it's 75% of the grade right there.
07:31
< Orthia>
All else failing, I am happy with that.
07:31
< Orthia>
So thank you!
07:32 * Orthia goes. Nini, Vorn (in all likelyhood anyway~)
07:32
<@Vornicus>
I'm headed to bed, yes
07:32
<@Vornicus>
nini
07:32
<@Vornicus>
If we can get this stupid shit working then the rest should not be hard.
07:36 Orthia [orthianz@Nightstar-ab97504e.xnet.co.nz] has quit [Ping timeout: 121 seconds]
07:41 Vornicus is now known as Vornicus-Latens
08:08 AnnoDomini [annodomini@Nightstar-4a48ec6d.adsl.tpnet.pl] has joined #code
08:08 mode/#code [+o AnnoDomini] by Reiver
08:23 AnnoDomini [annodomini@Nightstar-4a48ec6d.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
08:25 AnnoDomini [annodomini@Nightstar-956c8dc6.adsl.tpnet.pl] has joined #code
08:25 mode/#code [+o AnnoDomini] by Reiver
08:50 Rhamphoryncus [rhamph@Nightstar-8931f88f.abhsia.telus.net] has quit [Client exited]
09:08 You're now known as TheWatcher
10:49 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
10:56 Orthia [orthianz@Nightstar-ab97504e.xnet.co.nz] has joined #code
11:31 Attilla [Attilla@FBC920.482E2D.82B33A.EBFF0B] has joined #code
11:31 mode/#code [+o Attilla] by Reiver
12:40 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
13:01 Tarinaky [Tarinaky@Nightstar-b5c30d2f.adsl.virginmedia.net] has quit [Ping timeout: 121 seconds]
13:13 You're now known as TheWatcher[afk]
13:19 Tarinaky [Tarinaky@Nightstar-dc09c9a8.adsl.virginmedia.net] has joined #code
14:09 Vornicus-Latens is now known as Vornicus
14:09
<@Vornicus>
Orthia: stupid thought, I think possibly your first thing in the command line is the name of the command!
14:21
<@Vornicus>
So you'll want to skip the first item in the args.
14:21
<@Vornicus>
0th, rather
14:22
< celticminstrel>
Yes.
14:22
< celticminstrel>
Command line arguments start at index 1.
14:25
<@Vornicus>
So, correction from 205: line 32, "int i = 1"
14:25
<@Vornicus>
I completely forgot that bit till this morning.
14:28 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
16:40 Bobsentme [Bobsentme@Nightstar-bdfa14c4.try.wideopenwest.com] has joined #code
17:00 * AnnoDomini requires some sort of improved screenshot software for Linux.
17:01
<@AnnoDomini>
Something that'd let me make screenshots of the currently active window.
17:01
< Tarinaky>
AnnoDomini: Give me a second.
17:02
< Tarinaky>
AnnoDomini: 'import'.
17:02
< Tarinaky>
"import - saves any visible window on an X server and outputs it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen."
17:05
<@AnnoDomini>
How exactly do I use it?
17:08
<@AnnoDomini>
Seems to me that if I launch it from terminal, it'll capture the terminal.
17:08
<@AnnoDomini>
Or something.
17:08 You're now known as TheWatcher
17:10
< jerith>
When you launch it, it gives you a capture cursor or something.
17:10
< jerith>
Check the manpage.
17:12
< Tarinaky>
You get a cursor to select the window you want to screenshot.
17:12
<@AnnoDomini>
I've found that the manpages are fairly useless at teaching basic usage. They're more like a reference for someone who already knows how to use something, but needs exact details.
17:13
< Tarinaky>
AnnoDomini: Try using it?
17:13
<@AnnoDomini>
I did.
17:13
< Tarinaky>
And?
17:13
<@AnnoDomini>
It appears to be very slow.
17:13
< Tarinaky>
Did you select a target after running it?
17:13
<@AnnoDomini>
Yes.
17:13
< Tarinaky>
(Look at your cursor, is it a cursor or a crosshair?)
17:14
<@AnnoDomini>
Yes, it was a crosshair, I'm not stupid.
17:14
< Tarinaky>
It should run instantly.
17:14
<@AnnoDomini>
I ran it. The cursor turned into a crosshair. I selected stuff. It went to churn for several seconds.
17:19
<@AnnoDomini>
This isn't exactly what I'm looking for. I need to be able to just press a button and obtain an automatically generated image file at a preset location. Otherwise, my task will be rather tedious.
17:19
< Bobsentme>
I take it "alt" vs "ctrl" and print screen does not do what you want?
17:20
< Bobsentme>
I'm not sure which capture software CAINE (Forensic version of Ubuntu) uses, but it was awfully easy, and captured things quite nicely.
17:21
<@AnnoDomini>
What is alt/ctrl plus printscreen supposed to be doing?
17:21
< Tarinaky>
AnnoDomini: There're switches available for Import.
17:21
< Tarinaky>
Personally I use the following shell script:
17:21
< Tarinaky>
import /tmp/screenshot.png;
17:21
< Tarinaky>
gimp /tmp/screenshot.png
17:21
<@AnnoDomini>
But that's not what I want.
17:23
< Tarinaky>
Then you need to experiment with import's switches.
17:23
< Bobsentme>
AnnoDomini: Alt+PrintScreen grabs a screen capture of entire screen. Ctrl+Alt+PrintScreen grabs only the current window.
17:24
< Bobsentme>
(course, that's windows and CAINE, other flavors of linux results may vary)
17:24
<@AnnoDomini>
Bobsentme: To the clipboard?
17:24
< Bobsentme>
Usually.
17:24
<@AnnoDomini>
That's not acceptable, I'm afraid. I really need this to be as toil-free as possible.
17:47
<@AnnoDomini>
Ah. I was using the wrong Alt. It's LAlt+Printscreen to save a window image to disk. It retains the destination folder and manages filenames automagically.
17:47
<@AnnoDomini>
This is good.
17:49
<@AnnoDomini>
God damn it. It won't work with Virtual Box.
17:54
<@AnnoDomini>
Okay, it works, but I have to first press the host key.
18:03
<@Vornicus>
in Windows, printscreen is whole screen, alt-printscreen is window only, both to clipboard.
18:08
< Zed>
Oh, you want something that can grab to a folder?
18:08
< Zed>
What's your video card?
18:08 Serah [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
18:09 * Zed found that EVGA's Precision tool allows for fullscreen captures to a folder with a hotkey, and was very pleased
18:10
< Zed>
Also... what's that framerate... FRAPS. FRAPS does stuff like that. Unfortunately, I've found it seems to be more application-oriented, and as such gets tetchy about just wanting to grab the desktop/applications/whatever outside of a render environment.
18:19 Rhamphoryncus [rhamph@Nightstar-8931f88f.abhsia.telus.net] has joined #code
18:37 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
18:38 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
18:38 * gnolam points Zed to the fact that Anno is using Linux.
18:39 * Zed points to his lack of proper relevance and embarassment
18:39
< Zed>
thanks, tho
18:39
< Zed>
I wasn't paying attention. No wonder everyone was like "just script it!"
18:39
<@AnnoDomini>
Alt+Printscreen fits my criteria.
18:48 Serah [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
18:57
< gnolam>
IIRC though, grabbing the current desktop is a single WinAPI call. So making your own hotkeyed, autosaving printscreen program should be trivial.
19:52 Tarinaky [Tarinaky@Nightstar-dc09c9a8.adsl.virginmedia.net] has quit [Client closed the connection]
20:03 Zed [Zed@Nightstar-d7ade99d.or.comcast.net] has quit [Client closed the connection]
20:04 Zed [Zed@Nightstar-d7ade99d.or.comcast.net] has joined #code
20:37
< gnolam>
http://aturingmachine.com/
20:37
< gnolam>
Awesome.
20:41
<@McMartin>
Nice!
20:42
<@Vornicus>
seeet.
20:43
<@Vornicus>
with a w in there somewhere.
20:47 Taki^ [Meh@Nightstar-9b459f81.consolidated.net] has quit [Ping timeout: 121 seconds]
20:51 Taki^ [Meh@Nightstar-9b459f81.consolidated.net] has joined #code
21:14 Serah [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
21:29 DBot [Reiver@Nightstar-019bfb55.xnet.co.nz] has joined #code
21:31 DiceBot [Reiver@Nightstar-019bfb55.xnet.co.nz] has quit [Ping timeout: 121 seconds]
21:31 DBot is now known as DiceBot
21:45 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection reset by peer]
21:49 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
21:50 Syloqs_AFH is now known as Syloqs-AFH
22:01 Serah [Z@2C3C9C.B2A300.F245DE.859909] has joined #code
22:02 Taki^ [Meh@Nightstar-9b459f81.consolidated.net] has quit [Ping timeout: 121 seconds]
22:06 Taki^ [Meh@Nightstar-9b459f81.consolidated.net] has joined #code
22:27 Rhamphoryncus [rhamph@Nightstar-8931f88f.abhsia.telus.net] has quit [Client exited]
23:31 Attilla [Attilla@FBC920.482E2D.82B33A.EBFF0B] has quit [Ping timeout: 121 seconds]
23:36 Attilla [Attilla@FBC920.482E2D.4224C9.452BFB] has joined #code
23:37 mode/#code [+o Attilla] by Reiver
23:37 Derakon [Derakon@Nightstar-5abd3ac9.ca.comcast.net] has joined #code
23:37 mode/#code [+o Derakon] by Reiver
23:37 GeekSoldier [Rob@Nightstar-e86e3e0d.ip.cablemo.net] has quit [Ping timeout: 121 seconds]
23:38 * Derakon eyes his computer, wonders how he could possibly get a "permission denied" when trying to delete a file that he owns and that is world-writable (r-xr-xrwx).
23:38
< Namegduf>
Because it isn't quite world writable.
23:38
< Namegduf>
For some reason, you have user and group set to not writable
23:38
< Namegduf>
But other set to writable
23:39
<@Derakon>
I didn't set the permissions on this file originally, I note.
23:39
<@Derakon>
(Anyway, nothing a chmod -R can't fix...still, weird)
23:42 GeekSoldier_ [Rob@Nightstar-e86e3e0d.ip.cablemo.net] has joined #code
23:49 * Derakon realizes he hasn't seen Friday's QC yet, goes to look. "...yep, that's Joch all right."
23:49
<@Derakon>
Mischan.
23:50
< celticminstrel>
Questionable Content?
23:51
<@Derakon>
Aye.
23:51
<@Derakon>
And it's Jeph, not Joch, as I have been reminded elsewhere.
23:52
< celticminstrel>
I actually have no idea who/what this Jeph/Joch is...
23:52
<@Derakon>
Creator of QC.
23:52
< celticminstrel>
Oh, alright then.
--- Log closed Sun Mar 28 00:00:48 2010
code logs -> 2010 -> Sat, 27 Mar 2010< code.20100326.log - code.20100328.log >