code logs -> 2012 -> Wed, 28 Mar 2012< code.20120327.log - code.20120329.log >
--- Log opened Wed Mar 28 00:00:26 2012
00:10
< Rhamphoryncus>
yeah
00:17
< Namegduf>
Rhamphoryncus: You know your own prefix, generally
00:17
< Namegduf>
Even if you don't add it
00:17
< Rhamphoryncus>
See what Vorn said
00:17
< Namegduf>
But I suppose it is less risky to servers deciding to do something weird to split sooner.
00:17
< Namegduf>
That's factored in.
00:17
< Namegduf>
You know your own *mangled* prefix.
00:17
< Namegduf>
And you add neither the mangled nor the clean prefix.
00:19
< Rhamphoryncus>
Seems you're more confident than xchat is
00:19
< Namegduf>
I seem to recall I wrote a sentence saying how XChat's decision made sense
00:19
< Namegduf>
I don't think it was overly long
00:19
< Namegduf>
I doubt it got clipped
00:20
< Namegduf>
I am saying both approaches are feasible and reasonable
00:20
< Rhamphoryncus>
ahh
00:20
< Namegduf>
It is much easier to just lazily clip at some static number and "guess" it probably won't get longer.
00:20
< Namegduf>
(Which is wonderfully not guaranteed)
00:20
<@rms>
The network gives you your effective hostmask in the connection messages.
00:21
< Rhamphoryncus>
Your hostmask can change
00:21
< Rhamphoryncus>
Such as on freenode..
00:21
< Namegduf>
I'm pretty sure the client gets some kind of notification when that happens
00:21
< Rhamphoryncus>
[17:20:55] --- [Rhamphoryncus] (~rhamph@unaffiliated/rhamphoryncus) : Adam Olsen
00:21
< Namegduf>
Yes, I am quite familiar
00:22 * Rhamphoryncus repeats 6 more times just in case you're only *mostly* familiar ;)
00:23
<~Vornicus>
Or if you're an admin
00:30
<&McMartin>
This is pretty fun: http://blog.0branch.com/implementing-functor-in-ocaml and its followup http://blog.0branch.com/from-functor-to-applicative
00:30
<&McMartin>
Of course, half the fun is How Much Uglier OCaml Is Than Haskell~
00:37 Derakon[AFK] is now known as Derakon
00:37 You're now known as TheWatcher[T-2]
00:39 You're now known as TheWatcher[zZzZ]
00:50 * Derakon sighs.
00:51
<&Derakon>
Yesterday I wrote up a basic and extremely generic object model design for a 2D tile-based game (implicitly Angband)
00:51
<&Derakon>
And now I'm writing it. This won't end well.
00:55
< celticminstrel>
Heh!
00:57
<&Derakon>
Right now I'm considering how to properly convert keystrokes into commands.
00:57
<&Derakon>
Under the assumption that we're going to want to be able to abstract out the command system (so e.g. you can remap commands).
00:58
<&Derakon>
But it seems silly to have a huge list of enums for e.g. MOVE_UP, MOVE_UPLEFT, TAKE_STAIRS_UP, etc.
00:58 Attilla [Obsolete@Nightstar-c6df5028.as43234.net] has quit [Ping timeout: 121 seconds]
00:58
<&McMartin>
Derakon: This is more or less how VControl did it; it's not that silly all told.
00:59
<&Derakon>
I guess I'm just balking because of the sheer number of commands in Angband.
00:59
<&Derakon>
Most of the keys do something in both unshifted and shifted modes.
01:01
<&McMartin>
That's something VControl doesn't match, because it's trying to simulate a gamepad
01:02
<&Derakon>
Which limits you to, what, 60 inputs in this day and age~?
01:02
<&McMartin>
IIRC there are 24 gestures, some mapped to the same key
01:02
<&Derakon>
(12 plus analogs is more plausible)
01:15
<~Vornicus>
your typical dual shock has 12 buttons, hat, and 4 axis
01:15
<~Vornicus>
the gamecube has 6 buttons, hat, and 6 axis
01:16
<~Vornicus>
oh right. McM I'm stealing vcontrol, hope you don't mind
01:16
<&Derakon>
Some buttons are analog on both of those.
01:16
<&McMartin>
It's BSD licensed
01:16
<~Vornicus>
Der: thast's where 2 of the axes come from on gamecube
01:16
<&McMartin>
Note: VControl digitalizes its input
01:16
<&Derakon>
Vorn: ahh.
01:16
<&Derakon>
Well, DualShock has two or four analog shoulder buttons.
01:17
<&Derakon>
They're just not very analog so practically nobody uses them like that.
01:17
<~Vornicus>
dual shock has no analog buttons; sixaxis (the ps3 controller) is different
01:18
<&Derakon>
I could swear the shoulders were analog.
01:18 * McMartin shakes fist at how DirectInput models the X360 controller
01:19
<&Derakon>
Maybe I was wrong.
01:19
<&McMartin>
Also note: UQM version of vcontrol has some bugfixes I still should probably backport
01:19
<&McMartin>
I can't remember if L2 and R2 were analog on a DualShock 2.
01:19
<&McMartin>
The original Dualshock was for PS1, though; no analog buttons there.
01:20 * McMartin should probably learn enough XInput to see if he can bind it into VControl, really
01:20
<&Derakon>
Oh yeah, I meant the PS2 controller.
01:26
<&Derakon>
Man, the problem I have with these generic systems is that I end up with module names that conflict with variable names.
01:26
<&Derakon>
Like, I have the "command" module and a function that accepts an instance of the class defined by that module as an argument...
01:29 Eri [Eri@Nightstar-3e5deec3.gv.shawcable.net] has quit [Ping timeout: 121 seconds]
01:34
<&Derakon>
Okay, so do I have a big if/else block for handling each of the movement directions, or do I assume that the enums for them will always be in order and use it to index into an array of movement deltas?
01:35
<&Derakon>
Like, [(-1, -1), (0, -1), ...][commandCode - command.MOVE_DOWNLEFT]
01:35
<&McMartin>
Ugh
01:35
<&McMartin>
I was able to handle that by treating each axis independently
01:35
<&McMartin>
And by having command.MOVE_SOUTHWEST basically be command.MOVE_SOUTH | command.MOVE_WEST
01:36
<&Derakon>
That would be a rather tremendous bitfield.
01:36
<~Vornicus>
Der: array works.
01:37
<&McMartin>
VControl is (conceptually, not actually) a bitfield system.
01:39
<&Derakon>
Woo, basic movement works, though I got the Y axis flipped.
01:41
< Tarinaky>
Email is like a dirty room.
01:41
< Tarinaky>
Once there's more than 30 mail in the inbox you refuse to look at it and hope it'll clean itself.
01:41
<&Derakon>
My email's had 350 unread messages in it for a year or so now.
02:18 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited]
02:48 Janus [NSwebIRC@Nightstar-27138e8c.res.rr.com] has joined #code
02:52
< Janus>
Um! Um! ummm... If you have numbers, and they represent things. Well, wait, the numbers are all a single number, but it can be any number it wants. You know! ... but that asside. ... hold on let me think of a way to phrase... what was I going to ask again?
02:53
<~Vornicus>
fuck if I know what the speace
02:54
<~Vornicus>
you're indexing into an array of functions or possibly constructors. Maybe?
02:55
< Janus>
Index, that's a good word for it! It's not functions or anything fancy though. The index is item id numbers!
02:57
< Janus>
But it's kind of hard to. um. sort them? Or maybe the right word, is address it out? So that items that belong in a certain category would be contagious with one another
02:58
< Janus>
Like... items 0000 through 00FF would be materials. And items 0100 through 01FF would be basic items. Iunno, maybe a big giant enum would work
03:05 * Janus is kind of confusing himself. The numbering them out isn't the part that's causing so much trouble. It's just, trying to keep track of said numbering. Or maybe that's the same thing.
03:08
<&Derakon>
If you aren't fussed about the numbers changing, you should generate them as a side-effect of loading your list of what all the items are.
03:09
<@ToxicFrog>
Why do items of the same type need contiguous IDs?
03:10
<@ToxicFrog>
...and why do the IDs need to be numeric?
03:10
<@ToxicFrog>
For that matter, what is your underlying goal?
03:10
< Janus>
... but oh! Oh! The thing that's probably complicating things, is that I'm putting a crafting thing in! It's kind of basic... you select the template of a complex item, and you stuff basic items into the slots it has. The template has certain rules that govern what you can put in each slot. But it would allow ranges of items. Like... for instance, the "string" part of a fishing rod would allow many types of string.
03:12
< Janus>
The range is controlled by a mask. For instance, the requirement might be for the id to be 0x1230, with the 0x0004 masked out. Which allows for up to four different items to qualify
03:12
<@ToxicFrog>
...why?
03:13
<@ToxicFrog>
That seems like a very awkward way of doing things compared to, say, just saying "any item with the tag 'string' qualifies in this slot" and then giving all string types the 'string' tag.
03:13
<&Derakon>
Yeah, you're really making things too complex for yourself.
03:13
<&Derakon>
Gone are the days when we need to track every byte of RAM.
03:13
<@ToxicFrog>
Or use a type heirarchy and isInstanceOf() or similar.
03:14
< Janus>
... tags? ... that's... aha, almost too easy! I don't know why I didn't think of that.
03:15
<@ToxicFrog>
Hell, if you use a language that supports Symbols then the tags compile down into bitmasks anyways, but this is hardly necessary; you can do it with a Set[String] or language-specific equivalent or whatever.
03:17
< Janus>
I suppose, I'd have the item index on the actual item instances. Then once crafting is presented, just look up the tags that are mapped to that specific item index, right?
03:18
<@ToxicFrog>
What?
03:19
<@ToxicFrog>
Where do indexes come into this?
03:20
<@ToxicFrog>
You have a template. The template has slots. Each slot has a set of tags it will accept. When you try putting an item into a slot, it checks to see if there exists a tag T st both slot.tags and item.tags contain T.
03:20
<@ToxicFrog>
If so the item is accepted.
03:22
< Janus>
The index id is just so each item wouldn't need to carry the specific tags. Since there might be a lot of items. Not item types, but just individual items, since like items won't be made to stack in this.
03:24
<@ToxicFrog>
How many are you talking?
03:24
< Janus>
It shouldn't be a big deal, I don't think. Just moves that information to another place, now that I think about it
03:24
<@ToxicFrog>
Several million?
03:25
<&Derakon>
Look, every item will need to know what kind of item is it. If you don't want to duplicate that information across each instance of the item, hand each instance a pointer to a character sheet, so to speak, when it's created.
03:25
<&Derakon>
That character sheet can be as detailed as you like for that specific item type.
03:25
<&Derakon>
So then when you try to stick an individual item into the recipe, you look up the character sheet and check if it's allowed from there.
03:25
<@ToxicFrog>
Or let your language handle that for you, if it has class static or a similar concept.
03:25
<&Derakon>
Yeah.
03:26
<&Derakon>
But honestly, to start out you should go with the easy solution even if it's memory wasteful, unless you know that the waste will be a problem.
03:26
<@ToxicFrog>
Yeah, this.
03:26
<&Derakon>
Which would require hundreds of thousands of items, I suspect.
03:26
<@ToxicFrog>
Optimize for code clarity first.
03:26
< Tarinaky>
Javadoc question: What should I document a @return with?
03:26
< Tarinaky>
The name of what it returns?
03:26
< Tarinaky>
A description of what it returns?
03:26
<@ToxicFrog>
Description.
03:26
<&McMartin>
Description of what it returns.
03:27
< Tarinaky>
Isn't that the description of the method itself?
03:27
<&Derakon>
The first time I tried to write a game I was fixated on being "tight" and efficient because I'd read about all those tricks programmers used to have to do to get their code to run on old hardware.
03:27
<&Derakon>
Thing is, you don't have to do that any more.
03:27
<&Derakon>
Tarinaky: not necessarily.
03:27
<&Derakon>
@returns An ordered list of booleans
03:27
<&Derakon>
For example.
03:27
<@ToxicFrog>
c exists p: @arg p a predicate each element of c is tested against; @returns true if c contains any element e st p(e) returns true; false otherwise
03:27
<&Derakon>
...well, okay, you don't generally order booleans. But you get the idea.
03:28
< Tarinaky>
So a description of what the data type is?
03:28
< Janus>
Okay! I'll just use a pointer to a character sheet thing then. I think that might've been what I meant though, except the pointer was an integer in my case. And there won't be that many items. Each is only 16 bytes plus any history. even with NPCs having their own stocks, that shouldn't be much
03:28
<&Derakon>
It varies, Tarinaky.
03:28
<@ToxicFrog>
No, a description of the meaning of what it returns
03:28
<@ToxicFrog>
Anyone can see what the data type is from the type signature.
03:28
< Tarinaky>
Then what's the description of the function itself?
03:29
<&Derakon>
Janus: yeah, see, if I were writing your program?
03:29
<@ToxicFrog>
Details.
03:29
<&Derakon>
I'd probably be using a few hundred bytes per item at least.
03:29
< celticminstrel>
@return not @returns, though. :P
03:29
<@ToxicFrog>
It might, for example, contain information about the time and space complexity of the function, the intended use, etc
03:29
<&Derakon>
Even if I used a kilobyte per item, that'd leave room for a million items before I'd used even a gigabyte of RAM.
03:29
<&Derakon>
It's just not an issue!
03:29
< celticminstrel>
Tarinaky: You put the description of the function above all the tags.
03:29
<@ToxicFrog>
Janus: performance is meaningless until you can prove you don't have it. Optimize for programmer time first, then optimize the code if you have to (you probably won't)
03:30
< celticminstrel>
It doesn't need a tag of it's own. It's like the "default" tag.
03:30
<@ToxicFrog>
What language are you doing this in, anyways?
03:31
< Janus>
C++. Aha, there's no optimization at all. It only uses 16 bytes on account of ... I can't think of much else to add to each item, is all, aha
03:31
< Tarinaky>
celticminstrel: I got that.
03:31
< Tarinaky>
celticminstrel: I meant what -is- the description of a function that returns something if not the very thing it returns.
03:31 * Tarinaky was always taught not to return and have side-effects except when you need to.
03:31
< Tarinaky>
>.<
03:31
<&Derakon>
Tarinaky: the description could also include methodology, any required external context, assumptions about inputs, etc.
03:32
< celticminstrel>
Oh. Yeah, sometimes you don't need more description than what it returns.
03:32
< Tarinaky>
Aren't assumptions about inputs @param?
03:32
<&Derakon>
Mm, point.
03:32
< celticminstrel>
Sometimes I leave out the description altogether.
03:32
< Janus>
It only keeps track of two pointers, one to indicate what item it is, one to a history list, and the rest describes wear, quality, mass, and material
03:32
<&Derakon>
I don't always bother to properly format my function comments though.
03:32
< Tarinaky>
I'm getting marked.
03:32
<@ToxicFrog>
Janus: ok, so make stuff that's type-specific rather than object-specific static. There, done.
03:32
< celticminstrel>
Well, some of the more complex input things I sometimes put in the main description.
03:32
<&Derakon>
Oh, grading.
03:32
< celticminstrel>
You can also put examples in the main description.
03:32
<@ToxicFrog>
No need for "pointers to character sheets", the compiler handles that for you.
03:32
< Tarinaky>
And I'm a show off when it comes to assignments >.>
03:33
<@ToxicFrog>
Tarinaky, Derakon: "assumptions about inputs" could also be preconditions, which don't go in @param as a rule
03:33
<@ToxicFrog>
Tarinaky: really, if you want some javadoc examples, go read the java standard library
03:33
<&Derakon>
Anyway, piano time.
03:54 Kindamoody[zZz] is now known as Kindamoody
03:56 * Tarinaky goes crawl into bed.
03:59 * Vornicus eyes Janus's thing from earlier
04:06
< Janus>
8O
04:08
<~Vornicus>
Madman.
04:12 * Janus put a thing on the rocks! But interior design is baffling, so it's just an empty house so far
04:12
<~Vornicus>
Anyway: unless you're targeting a physical super nintendo, you don't need to worry about performance and honestly why are you working in anything lower level than lua.
04:19
< Janus>
No reason! I really don't worry about performance anymore though, honest!
04:20
< Janus>
I tried adding lua in once so I could export event code and stuff. But as strange as it sounds, lua didn't come as naturally as I thought it would. It was the same deal with AS3 (though, AS3 is arguably more esoteric than C++ and Lua). Iunno, I guess I got stuck in one language
04:21
<~Vornicus>
Sadness.
04:21
< Janus>
I tried both out for a while. I made a made in lua for Cortex Command, and I did some flash stuff. But yeaah
04:21
< Janus>
*mod, not made
04:22
< Janus>
When I make classes in C++, I only use small 8 byte variables because they seem... cozy I suppose? 256 is a nice round number!
04:23
< Janus>
Outside of that, I never optimize. I don't even know when or how, aha. I mean, I know about loop unrolling, and such. But never made a loop that needed it.
04:24
<&McMartin>
Compilers are supposed to do that for you
04:24
<&McMartin>
Also, on most modern computers those 8 byte values are secretly 32 or 64 bit
04:25
< celticminstrel>
In contrast, I tend to use the larger variables "just in case". :P
04:28
< Janus>
(though, I'll admit. If I got three 8-bit variables lined back to back. I'll kinda get an OCD-twitch, and add a fourth for no reason to round it out.)
04:29
<~Vornicus>
Madman and a half
04:30
< celticminstrel>
Your compiler probably already does that automatically. :P
04:30
<~Vornicus>
Honestly, the only time you should be thinking in 8-bit chunks is when doing serialization
04:31 * Janus should describe the item system, so he can reach 2 madmen!
04:31
<~Vornicus>
And even then it's probably not that great an idea unless you're working with high-efficiency or legacy formats.
04:31
<~Vornicus>
(and for the former aren't able to use an existing codec)
04:41
< Janus>
Admittedly, the only two things I find appealing about 8-bit chunks, is the low limit, and maybe how easy they are to use with bitwise operations. I probably shouldn't like using those as much as I do though.
04:44
< Janus>
Granted, I could impose a low limit myself, but having a hard limitation there deters me from trying to go past 250. It's hard to imagine quantities past 200 without grouping them together in the abstract for me
04:49
< Janus>
The items are probably gonna be pretty expensive anyway, if I can get history workin' properly. I'm not coding it for this game, but the next one, it'll be cool to have! The idea is to allow each item to keep track of stuff like fingerprints, engravings, stains, and defects.
04:52
< Janus>
For right now though, I'm just pleased it'll allow for swords where the handle's made of soap, and the blade is made of cork. (aka, the pallette will be changed, it'll break after one swing, and it'll slip out of your hands during said swing)
04:53
< celticminstrel>
They're no easier to use with bitwise operations than any other size...
04:58
< Janus>
That's true... I guess then it's only one appealing thing then!
05:17 Eri [Eri@Nightstar-3e5deec3.gv.shawcable.net] has joined #code
05:24
<@ToxicFrog>
<Janus> Granted, I could impose a low limit myself, but having a hard limitation there deters me from trying to go past 250. <-- why is this a good thing
05:24
<@ToxicFrog>
Honestly this whole project sounds terrifying.
05:29
< Janus>
All of my projects sound terrifying. 8'(
05:29
<@ToxicFrog>
I mean, even if you must work in a low-level language like C++, there are easier and better ways to do this
05:29
<@ToxicFrog>
Like using auto-expanding STL collections to store stuff
05:31 eckse [eckse@Nightstar-d5f3fe8a.dsl.sentex.ca] has quit [Connection reset by peer]
05:33 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
05:34
< Janus>
... you mean like, vector and map? I use those! A lot, in fact. Map and me are like bros.
05:34
< Eri>
C++ is low-level? I guess the merchants look like garbage to the nobility, but the peasants think something else entirely
05:35
<@ToxicFrog>
Eri: compared to actual HLLs, yes.
05:36
< Janus>
C++ seems pretty high level when you're dealing with, like, an avg chip. Or at least it uses twice as much room as C
05:36
<@ToxicFrog>
Lexical scope, closures, anonymous and higher-order functions, type inference, and tail call optimization or GTFO.
05:36
<@ToxicFrog>
Janus: C++ is high-level in a systems programming ecosystem but not really anywhere else.
05:36
< Eri>
Yeah. Kind of disgusting. We're running simulink on a micro, now. I don't want to think of the space we're throwing away for the convenience
05:37
< Eri>
And the power :( That shit's precious in space.
05:37
< Eri>
Hmm. I guess I used space and space, making what I said ambiguous
05:38
< Eri>
By space: the first, I mean flash memory
05:38
< Eri>
The second is literally space.
05:38
< Janus>
I got it; you can't throw away space-space afterall
05:38
<@ToxicFrog>
The flash is too slow to use at runtime so as long as it's <100% who cares how much of it you're using?
05:40
< Eri>
Either way, we're wasting processing time, and therefore battery power, running Simulink, which then runs our program.
05:40 * Janus bows out of this one. Barely knows how to hook up an atmega to his parallel port to program it, let alone how or what to use it on.
05:41
< Eri>
But we don't have the time to make a proper program, so we have no choice, I guess
05:41
<@ToxicFrog>
What is Simulink, anyways?
05:41
< Eri>
It's a Matlab product. Kind of like NI Labview, but for signals, by my understanding.
05:42
< Eri>
So, you create a network of function blocks
05:43
< Eri>
I don't know too much about it, myself. Going to have to learn it, though, since I decided that GNU Radio wasn't going to work for the ground station.
05:50 Noah [noah@Nightstar-b9cba123.pools.spcsdns.net] has joined #code
05:51
< Noah>
Trying to remember why I don't like Pidgin as an IRC client
05:58 Noah [noah@Nightstar-b9cba123.pools.spcsdns.net] has quit [[NS] Quit: Leaving.]
05:59 Noah [noah@Nightstar-b9cba123.pools.spcsdns.net] has joined #code
06:31 Vash [Vash@Nightstar-cdeba41f.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
06:34 Derakon is now known as Derakon[AFK]
06:37 Janus [NSwebIRC@Nightstar-27138e8c.res.rr.com] has quit [[NS] Quit: Page closed]
06:41 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
06:55 Attilla [Obsolete@Nightstar-c6df5028.as43234.net] has joined #code
06:59 Attilla [Obsolete@Nightstar-c6df5028.as43234.net] has quit [Ping timeout: 121 seconds]
07:23 Attilla [Obsolete@Nightstar-c6df5028.as43234.net] has joined #code
07:29 Kindamoody is now known as Kindamoody|afk
08:07 Attilla [Obsolete@Nightstar-c6df5028.as43234.net] has quit [Ping timeout: 121 seconds]
08:08 Attilla [Obsolete@Nightstar-c6df5028.as43234.net] has joined #code
08:20 Attilla [Obsolete@Nightstar-c6df5028.as43234.net] has quit [Ping timeout: 121 seconds]
08:31 monodemono [monodemono@Nightstar-e45d92aa.res.rr.com] has joined #code
08:43 You're now known as TheWatcher
08:57 Kindamoody|afk is now known as Kindamoody
09:34 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code
10:17 monodemono [monodemono@Nightstar-e45d92aa.res.rr.com] has left #code ["*POOF!*"]
10:33 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
10:33 mode/#code [+o himi] by ChanServ
11:07 Kindamoody is now known as Kindamoody|out
12:15 Attilla [Obsolete@Nightstar-c6df5028.as43234.net] has joined #code
14:33 Reaper [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [[NS] Quit: If I had a world of my own, everything would be nonsense. Nothing would be what it is because everything would be what it isn't. And contrary-wise; what it is it wouldn't be, and what it wouldn't be, it would. You see?]
14:53 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code
15:26 cpux|2 [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code
15:29 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
15:39 Vash [Vash@Nightstar-cdeba41f.wlfrct.sbcglobal.net] has joined #code
15:39 mode/#code [+o Vash] by ChanServ
16:26 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
16:27 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code
16:27 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [Client closed the connection]
16:30 * ShellNinja is looking for something like AHK, but for Linux.
16:34
< ShellNinja>
Asking here is likely faster than googling, with my current internets.
16:39
< ShellNinja>
On a related note, does ^C send some kind of standarized kill signal, or is it its own thing?
16:43
<@jerith>
In UNIX, it generally sends SIGINT.
16:46
< ShellNinja>
How about Debian-likes?
16:47
<@jerith>
Linux is close enough to UNIX.
16:47
<@jerith>
But I'm not sure what actually captures the keypress and generates the signal.
16:47
<@jerith>
I think it's possible to override that.
16:49
< ShellNinja>
Welp, I need to actually send ^C in that case. In the console application I mean it for, it saves progress and quits upon ^C.
16:49
<@jerith>
I think it's the terminal that does it, actually.
16:49
<@jerith>
It might do that by installing a SIGINT handler.
16:50
<@jerith>
You can check, actually.
16:50
<@jerith>
Find the apps pid and "kill -SIGINT <pid>" from another terminal.
16:50 celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code
16:52
< ShellNinja>
Cool! -SIGINT saves the session, as with ^C.
16:52
<@jerith>
ShellNinja: So it's doing it by catching the SIGINT.
16:52
<@jerith>
Which is the right way to do that kind of thing, actually.
16:55
< ShellNinja>
jerith: I want to write http://pastie.org/3686193 as a shell script, but I am missing several key ingredients, like not locking up the terminal on 10, making it wait for a specified time and also looping.
16:55
< ShellNinja>
Can you help me?
16:56
<@jerith>
This might be a job for job management rather than pgrep.
16:57
< ShellNinja>
I know there's only one of reaver running at any one time.
16:58
<@jerith>
What if you start two of them in different terminals?
16:58
< ShellNinja>
They both die.
16:58
< ShellNinja>
Well, if I get this script running.
16:58
< ShellNinja>
I can run two of them, but it's impractical, since they interfere with one another.
16:58
<@jerith>
Ah.
16:58
< ShellNinja>
They both like to hog the interface.
16:59
<@jerith>
First thing to do is start it in the background.
17:00
<@jerith>
So "reaver <args> &".
17:00
< ShellNinja>
Can I pipe output to stdout anyway, or do I need to pipe to a file?
17:00
<@jerith>
If it detects whether it's attached to a terminal, that might be sad.
17:02
<@jerith>
If you background it, output will still go to stdout/stderr/whatever.
17:03
<@jerith>
(Although again, see above about detecting whether it's attached to a terminal.)
17:03
< ShellNinja>
Nift.
17:03
< ShellNinja>
How do I check?
17:04
<@jerith>
Just run it backgrounded and see what it does.
17:04
< ShellNinja>
It seems to carry on as usual.
17:04
<@jerith>
Then it doesn't care if it's attached to a terminal.
17:04
<@jerith>
Which is cool.
17:06
<@jerith>
So now your "wait 20 minutes" becomes "sleep 1200" and your "kill -SIGINT `pgrep reaver`" becomes "kill -SIGINT %1".
17:06
<@jerith>
"%1" refers to the first background job, "%2" to the second, etc.
17:07
< ShellNinja>
Neato.
17:07
<@jerith>
Background jobs are all per-shell, so you won't be interfering with anything happening outside of your terminal.
17:07
< ShellNinja>
Cool.
17:08
<@jerith>
Now you just put the whole lot into an infinite loop.
17:09
< ShellNinja>
What's the syntax?
17:09
<@jerith>
"while true; do thing1; thing2; thing3; done"
17:10
<@jerith>
I generally spread it out a bit:
17:10
<@jerith>
while true; do
17:10
<@jerith>
thing1
17:10
<@jerith>
thing2
17:10
<@jerith>
done
17:12
<@jerith>
Now, you might get some job management spam mixed into your output.
17:12
<@jerith>
I'm not really sure how to avoid that.
17:13
< ShellNinja>
It is inconsequential. Hmm. What's the syntax to use the first/second/nth argument the script is launched with? @1, @2 or something?
17:13
<@jerith>
$1, $2, etc.
17:13
<@jerith>
"$@" (with the quotes) for all the arguments.
17:14
<@jerith>
(The quotes preserve spacing between individual args or something. I forget the details.)
17:14
< ShellNinja>
http://pastie.org/3686294 <- Does this look good?
17:15
<@jerith>
Seems reasonable. Try it. :-)
17:15
<@jerith>
What does reaver actually do?
17:16
<@jerith>
And why do you want to run it in 20 minute stretches?
17:16
< ShellNinja>
Remember when I said my internet is very bad at the moment?
17:16
< ShellNinja>
Reaver is a brute-force router cracking software, via a recently discovered vulnerability.
17:17
< ShellNinja>
The protocol is so shoddy, the router I'm attacking seems to experience DoS.
17:17
<@jerith>
Ah.
17:17
< ShellNinja>
(It is not a countermeasure, I'm pretty certain, since I've seen a couple of routers with those, and those behave differently.)
17:18
< ShellNinja>
I want to keep it running overnight.
17:18
<@jerith>
Is this the pin-based "easy setup" vuln?
17:18
< ShellNinja>
Yes.
17:18 * jerith had some rude things to say about the people who "designed" that.
17:19
< ShellNinja>
Word.
17:19
<@jerith>
And I put "designed" in quotes, because they apparently did not even do cursory sanity checking.
17:20
<@jerith>
Also, pretend I've expressed the obligatory dismay that I've helped you steal internet access.
17:20
<@jerith>
Since I can't actually summon the energy to be properly dismayed right now. :-)
17:21
< ShellNinja>
:)
17:21
< ShellNinja>
I would really buy internet if the Norwegian Tax Office allowed me to become a fully permanent resident.
17:22
< ShellNinja>
But noooooo, having a job and income and an indefinite residence permit from the immigration office is NOT ENOUGH.
17:23
<@jerith>
What does the status difference mean?
17:23
<@jerith>
Are you not allowed to buy internet if you aren't a permanenet resident or something?
17:23
< ShellNinja>
Whether I have a temporary (6 month) or permanent national ID.
17:23
< ShellNinja>
Decent internet requires a contract for like a year.
17:24
<@jerith>
Ah.
17:24
<@jerith>
And you can't get one of those without a permanent ID?
17:24
<@jerith>
You can get prepaid internet access here. It's more expensive than a monthly contract, but also more flexible.
17:25
< ShellNinja>
I'm not sure it is technically disallowed, but if I do, I nevertheless risk paying for a year of internet while being deported.
17:25
< ShellNinja>
I didn't see any prepaid offers.
17:25
<@jerith>
And the month-to-month contracts differ from the long-term contracts only in price and such.
17:28 * ShellNinja likes prepaid stuff in general.
17:29
< ShellNinja>
http://pics.nase-bohren.de/software-terminology.png
17:30
< ShellNinja>
Anyways. Thank you for your help!
17:30
<@jerith>
ShellNinja: You're welcome.
17:32
< celticminstrel>
Ooh, I didn't know about pgrep.
17:35 * ShellNinja thinks. If I want to pipe output somewhere, where does the & go?
17:35
< ShellNinja>
At the end of the line, or before the >?
17:38 * gnolam Bings, feels dirty.
17:38
< gnolam>
Seriously what the fuck Google? When I search the web, I want to SEARCH THE FUCKING WEB
17:39
< ShellNinja>
(Good, good, give in to your hate!)
17:39
<@jerith>
ShellNinja: After the redirects, I think.
17:39
<@jerith>
gnolam: duckduckgo.com
17:39
<@jerith>
It's my default search engine these days.
17:39
< celticminstrel>
?
17:40
< celticminstrel>
What's wrong with Google now?
17:40
<@jerith>
celticminstrel: It "corrects" your searches.
17:40
< gnolam>
I. Do. Not. Care. If there might be a result in a book somewhere. THAT'S WHY I'M SEARCHING THE FUCKING WEB AND NOT A LIBRARY.
17:40
< celticminstrel>
Oh.
17:41
< gnolam>
And in this case, returning a gazillion fucking Google Books results. Actually, pretty much ONLY Google Books results.
17:41
<@jerith>
Silently changes spellings. Silently drops some of your terms. That kind of thing.
17:41
< celticminstrel>
I knew that.
17:41
<@jerith>
gnolam: What are you seaching for?
17:41
< celticminstrel>
I was more wondering specifically what gnolam's current issue with it was.
17:41
<@jerith>
celticminstrel: Also, it "personalises" your results.
17:42
< celticminstrel>
Which can be helpful sometimes, though.
17:42
<@jerith>
celticminstrel: I find it harmful.
17:42
< celticminstrel>
If you often search for similar things.
17:42
< gnolam>
And guess what? There is no way to exclude them.
17:42
< celticminstrel>
...until of course you suddenly want to search for something very different. :P
17:43
< celticminstrel>
Yeah, it can be helpful or harmful.
17:43
<@jerith>
I'm searching because I want to know things I don't already know.
17:43
< gnolam>
Seriously. There is no way to tell Google to stop returning only "ha ha this is in a book, now go fuck yourself".
17:43
< gnolam>
RARGH
17:43
< celticminstrel>
Sometimes I search to try to find things I remember seeing but can't remember the location of.
17:43
<@jerith>
gnolam: I don't recall ever seeing that.
17:44
<@jerith>
gnolam: Which is why I'm asking for your search terms, so I can see what happens here.
17:44
< gnolam>
Won't matter, because hey - personalization! Fucking people over in different irreproducible ways!
17:44
<@jerith>
(But it's more curiosity than anything. Feel free to ignore.)
17:45
< gnolam>
Various nitty gritty details on the simplex method.
17:45
< ShellNinja>
This is strange. "perl painbot.pl > pain.log &" does not seem to pipe output to pain.log. There's nothing in the file, and output is still printed to stdout.
17:46
< gnolam>
And unfortunately, DuckDuckGo's results are pretty poor. And it TOO "corrects" your search results.
17:46
<@Tamber>
Are you sure it's going to stout, and not stderr?
17:46
<@Tamber>
stdout, even. (But surely you meant what I knew~)
17:46
< ShellNinja>
Oh, it IS going to stderr.
17:46
< ShellNinja>
How do I capture stderr?
17:46
<@Tamber>
"perl painbot.pl 2> pain.log"
17:46
<@jerith>
ShellNinja: 2>
17:47
< ShellNinja>
Thank you.
17:47
< gnolam>
And ignores your shouts at it to exclude the fucking false positives it's therefore giving you.
17:48
< ShellNinja>
Victory!
17:48
<@jerith>
gnolam: ;_;
17:48
< ShellNinja>
I have now simplified the restarting of PainBot considerably.
17:48
< ShellNinja>
No more fucking around with a second screen session.
17:48
< gnolam>
Despite them saying that "no, we won''t autocorrect your searches".
17:48
< ShellNinja>
(Or screens within screens.)
17:50
< Noah>
I'm finding the merits of DDG very appealing lately, but Google Has Me.
17:51
< Noah>
To jerith, that is
17:52
<@jerith>
Noah: Out of interest, why the nick change?
17:52
< Noah>
Noah is my real name, and for years I used it after switching from "Ultrabane", a long disused handle of mine
17:53
< Noah>
On nightstar I should say
17:53
<@jerith>
So it's a "change back" rather than a "change to"?
17:53
< Noah>
Basically.
17:54
< Noah>
I started using maoranma later when I was self-studying Japanese, and it has became my default handle where I don't use my name
17:55
< Noah>
I like it, RA-N-MA fits on Japanese arcades and M-A-O fits on English arcades
17:56
< Noah>
And my old Bloodelf paladin gets his name from it, I took ma-o-ra-n-ma, dropped the duplicate ma and rearrange to O-ma-n-ra
17:56
< Noah>
Facinating, I'm sure.
17:57
< Noah>
I have a new gaming handle thanks to Esperanto, "LernuLudi" Or "Learn To Play"
17:58 * jerith got "jerith" by deciding that his initials weren't pronouncable enough and taking an extra letter from each name.
17:58
<@Vash>
O_o
17:59
< Noah>
Oh oh! Guessing name. Is your name Johnny Ricky Thornburg?
17:59
< Noah>
Er
17:59
< Noah>
Jerry rather
17:59 * Tamber chuckles
17:59
< Noah>
I got excited
17:59
< Noah>
Wait no! New game
17:59 Noah is now known as Nopaba
18:00
< Nopaba>
I jerith'd my name
18:00
<@Tamber>
Oh dear.
18:00
< Nopaba>
Join in Tamber!
18:00
<@Tamber>
It'd be 'Jarope' :p
18:01
<@Vash>
>_>
18:01
< Nopaba>
Haha, that's awesome
18:01
<@Vash>
... weird if I think about it
18:01
<@Vash>
I would probably be 'Nari' or 'Narica'
18:01
< Nopaba>
Interestingly, the rest of my jerith'd name would be Ahular.
18:01
<@Vash>
because I have no second name
18:02 Nopaba is now known as Noah
18:02
<@Vash>
... or by the end of next year probably? 'Nauz'
18:03 Kindamoody|out is now known as Kindamoody
18:03
< Noah>
If you have no second name, do three letters instead of 2
18:03 * Vash eyes outside, freaking rain and thunder
18:03
<@Vash>
'Nanriv' 'Nanuzn''
18:04
<@Vash>
sorry if I'm being confusing about the second part
18:05
<@Vash>
the first part is my first name and last name
18:05
< Noah>
We get it
18:05
<@Vash>
second is my first name and vorn's last name
18:05
< Noah>
Yarp.
18:05 * Vash blargh at portal! BLARGH!
18:06
<@Vash>
it feels weird that the achievements in portal 1 are harder than portal 2
18:07
< Noah>
Nah, makes since, they started making chievos easier now, like...
18:07
<@Vash>
eh, guess so
18:07
< Noah>
"Let's Play! - Started game for first time."
18:07
<@Vash>
I still think they shouldn't had made one for each part like that
18:07
<@Vash>
although, that way you know how far in a friend is into the game an stuff
18:08
< Noah>
I prefer chievos for unusual playing or other merits. I hate the ones that give you for being a level or boss, required to advance the story
18:08
<@Vash>
I don't mind the last boss one
18:09
<@Vash>
however... even though it was stupid I like the ones that were the obvious 'do not choose this path/thing to do'
18:09
<@Vash>
erm
18:09
<@Vash>
as in
18:09
<@Vash>
because they know it was a bad choice, they know people were not going to do it
18:09
<@Vash>
and hence they won't get it
18:10
<@Vash>
... if it makes sense
18:11
<@Vash>
there was an achievement I liked in portal that I think could be ignored/missed if you don't pay attention- well, ok, more than one
18:11
<@Vash>
portal 2*
18:12 * Vash suddenly remembers hard achievements... And so, remembers The Last Remnant
18:12
< Noah>
I think operating systems should have chievos. That way tech support can judge your apparent skill at using computers by it
18:13
<@Vash>
rofl
18:13
< Noah>
"Interwebz - Correctly configured static IP and got online by hand"
18:13
<@Vash>
that'd be awesome
18:13
< ShellNinja>
The End of the Eternal September...
18:14
<@Vash>
"Destroyer of worlds - ... singlehandedly, without the help of viruses or anything... broke the internet connection and BSOD a computer afterwards"
18:14
<@Vash>
?
18:14
<@Vash>
>.>
18:14
<@Vash>
oh wait....
18:14
< Noah>
"The Dungeon Crumbles Around You - Experience a system crash on first boot"
18:14
<@Tamber>
BTDT.
18:15
<@Vash>
vorn has BSOF a computer while using the webs- but it's because flash hates him
18:15
<@Vash>
BSOD*
18:15
<@Vash>
Anyone played The Last Remnant?
18:15
< Noah>
"Back in a Fl... - Experience a system crash due to flash"
18:16
<@Vash>
... actually, the question is: Has anyone who has played The Last Remnant ever FINISH the game?
18:16
<@Vash>
rofl, mao
18:16
< Noah>
I've never played it
18:16
<@Vash>
when I was in San Diego, a co-worker wanted to play the game, but I got it before him
18:16
<@Vash>
I complained a lot about the game diffculty and the start of it
18:17
<@Vash>
and was stuck at the end of disk one
18:17
<@Vash>
until somehow I managed (even after looking up what I was doing wrong- I didn't have more than one healer and needed a rezzor or two)
18:18
<@Vash>
and then I sort of gave up at the start of disk two because I had to do consecutive battles with bosses that had killing blows
18:18
<@Vash>
so, he finally gets it and tells me that he's going to ply that night
18:18
<@Vash>
play*
18:19
<@Vash>
after a week he finally asks how I got past 30 minutes in or so
18:19
<@Vash>
he kept trying and gave up. apparently at first he thought I was just being a normal girly and being crappy at gaming, which is sad
18:19
<@Vash>
... until he played it
18:20
<@Vash>
I should try at it again, except that my 's power cables are still in SD and my parents were supposed to have sent the box with that about 4 months ago
18:21
<@Vash>
360's*
18:21 * Vash grumble
18:21
< Noah>
Buy a new cable?
18:21
<@Vash>
... why the hell should I spend money when I don't have a job if I technically have them? =P
18:21
<@Vash>
even my PSP is dead
18:21
<@Vash>
need cables
18:22
<@Vash>
silly parents
18:22
<@Vash>
also, all my movies, anime and some game disks are in that box
18:22
<@Vash>
well, not all the anime. I have a few over here along with my 360 games- well, most of them I think
18:23
< Noah>
Make Vorn buy it then
18:23
<@Vash>
(crappy typos are due to both my lappy keyboard being broke... because vorn opened it up to fix problem with the fan. And to the fact that the replacement keyboard that he gave me is in fact also broken)
18:25
<@Vash>
he...sort of can't, mao.
18:26
< Noah>
Bah
18:43
< Noah>
So, it's kind of annoying that my virtual machine Fedora resides on a disk partitioned in NTFS
18:54 Kindamoody is now known as Kindamoody[zZz]
19:07
< Noah>
brb
19:08 Noah [noah@Nightstar-b9cba123.pools.spcsdns.net] has quit [[NS] Quit: Leaving.]
19:09 Noah [noah@Nightstar-b9cba123.pools.spcsdns.net] has joined #code
19:11 Vornucopia [NSwebIRC@C888DE.7F9621.4A1301.BBBE7B] has joined #code
19:28
< Noah>
I'm using gTile at the moment, but this looks really neat: http://gfxmonk.net/shellshape/
19:31
< ShellNinja>
jerith: kill -SIGINT %1 doesn't seem to kill the process very well. I get duplicates.
19:31 * ShellNinja resorts to a blanket kill -SIGINT `pgrep reaver` instead, which is guaranteed to work.
19:32
<@jerith>
ShellNinja: Interesting.
19:32
< ShellNinja>
Other than that, the script seems to work autonomously well enough.
19:33
<@jerith>
You can grab the pid from the backgrounding thing if you want.
19:33
< ShellNinja>
How?
19:39
<@jerith>
I'm not actually sure.
19:41
< Noah>
Magic, of course.
20:14 Noah [noah@Nightstar-b9cba123.pools.spcsdns.net] has quit [[NS] Quit: Leaving.]
20:15 Noah [noah@Nightstar-b9cba123.pools.spcsdns.net] has joined #code
20:20 Noah [noah@Nightstar-b9cba123.pools.spcsdns.net] has quit [[NS] Quit: Leaving.]
21:09 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
21:53 Vornucopia [NSwebIRC@C888DE.7F9621.4A1301.BBBE7B] has quit [[NS] Quit: Page closed]
22:02 Reaper [Z@Nightstar-5aa18eaf.balk.dk] has joined #code
22:51 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
22:51 mode/#code [+o himi] by ChanServ
23:25 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
23:41 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
23:41 mode/#code [+o ToxicFrog] by ChanServ
23:48
< Tarinaky>
"warning - Tag @see: reference not found: updateItemQuantity" :/
23:48
< Tarinaky>
I'm clearly missing something about javadoc.
23:49
< Tarinaky>
I don't understand this error. It's not able to find any of the items I'm linking to with see... But they're right their.
23:49
< Tarinaky>
It's the same class!
--- Log closed Thu Mar 29 00:00:47 2012
code logs -> 2012 -> Wed, 28 Mar 2012< code.20120327.log - code.20120329.log >

[ Latest log file ]