code logs -> 2013 -> Wed, 05 Jun 2013< code.20130604.log - code.20130606.log >
--- Log opened Wed Jun 05 00:00:03 2013
--- Day changed Wed Jun 05 2013
00:00
<&McMartin>
Reiv: See
00:00
<&McMartin>
That's *exactly the thing the 'virtual' keyword controls*
00:00
<&McMartin>
Usually it's the wrong answer
00:00
<&McMartin>
Because if the soldier has some internal state that subclasses want to keep consistent in ways unique to them...
00:01
<&McMartin>
... they can't stop the other subclass from messing with it
00:02
<&McMartin>
The general notion being that yourself-when-you-treat-yourself-as-your-own-superclass should be you
00:02
<&McMartin>
And it's not
00:02
<&McMartin>
There's a notion of inheritance called "mixins" where virtual inheritance is closer to the default, *usually*
00:02
<&McMartin>
It works better with untyped objects like in Python
00:02
<&McMartin>
afk a bit
00:23 You're now known as TheWatcher[T-2]
00:30
<@Alek>
a webstore, turning over a million a month in gross.
00:31
<@Alek>
rounding prices to 2 digits after the decimal.
00:31
<@Alek>
supposed to be $price = round($price,2);
00:31
<@Alek>
turned out to be $price = rand($price,2);
00:34 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has quit [Ping timeout: 121 seconds]
00:39 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has joined #code
00:40 mode/#code [+o Reiv] by ChanServ
00:47 You're now known as TheWatcher[zZzZ]
00:50
<@Alek>
vr0n
00:50
<@Alek>
http://i.imgur.com/aduPQ3C.png
00:53
<@gnolam>
Alek: True story?
01:00
<@Alek>
#hellifIknow
01:01
<@Alek>
it's a tale from Russia, so quite possibly.
01:01
<@Alek>
I mean, it's not Indian cargo code cults, but yeah. possible.
01:04
<@Reiv>
what's this?
01:07
<@iospace>
http://mysterysnake.tumblr.com/
01:09
<@Alek>
oh God what
01:09 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
01:10 * Alek twitches.
01:10
<@Alek>
Pascal.
01:10
<@Alek>
is that a hard or soft c?
01:11
<@Reiv>
hard.
01:15 Maze is now known as EvilDarkLord
01:38 Harlow [Harlow@Nightstar-a784d8b0.hfc.comcastbusiness.net] has joined #code
01:40
<@gnolam>
Alek: ah. Russia.
01:48 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.]
01:48
<@gnolam>
And dammit, now I had to rewatch "Everyday I'm drinking".
01:50
<&McMartin>
Hee
01:51 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code
02:19
<&McMartin>
Ha ha ha ha ha
02:19
<&McMartin>
So, working out some object serialization protocol stuff with my team, including the CTO
02:19
<&McMartin>
Some things Not Entirely Unlike the Entity Systems start emerging
02:19
<&McMartin>
I bring this up, and the inspiration for it
02:19
<&McMartin>
Cue a few google searches
02:20
<&McMartin>
Cue finding the thread where NewDark was first announced, and TF's posts thereon~
02:20
<&ToxicFrog>
Excellent
02:20
<&ToxicFrog>
I don't even remember what I posted~
02:21
<&McMartin>
Not much, really, mostly "well, this was worth delurking for"
02:22
<@Reiv>
Bahaha.
02:22
<@Reiv>
So you may have to deal with Entity Systems afterall?
02:22
<&McMartin>
Nah
02:22
<@Reiv>
Aw.
02:23
<&McMartin>
We're trying to transmit semistructured data
02:23
<@Reiv>
I was hoping you'd succeed in learning how to do them not-wrong~
02:23
<&McMartin>
Which means "just use JSON or XML, you git" is basically the answer
02:23
<&McMartin>
I have an entertaining idea for how to do it in Python
02:23
<&McMartin>
I would be hard-pressed to not name such a system SHODAN, though, involving as it does FORCED AUGMENTATION OF YOUR FILTHY INFERIOR SELF
02:24
<&McMartin>
It is entirely legal to take an object of any user-defined type in Python and do something like
02:24
<&McMartin>
def f():
02:24
<&McMartin>
# function definition here
02:24
<&McMartin>
a = MyObject()
02:24
<&McMartin>
a.newmethod = f
02:24
<&McMartin>
Well, f needs at least one argument for the "self"
02:25
<&McMartin>
But you could basically have properties be a map of names and either callables or data
02:25
<&McMartin>
And then *force assign those names to those values in an object*
02:25
<&McMartin>
At that point the object gains that functionality.
02:25
<&ToxicFrog>
It was I who brought you here. It was I who gave you your properties - the only beauty in that meat you call a data structure.
02:26
<&McMartin>
What is it you fear? The end of your miserable conformance with a static master type system?
02:26
<&McMartin>
When the history of my glory is written, your declared type will be only a footnote to my magnificence.
02:27
<&McMartin>
The fun challenge is replicating that sort of behavior in Java.
02:27
<&McMartin>
I'm pretty sure it can be done.
02:27
<&McMartin>
I'm also pretty sure the result will look unpleasantly like COM.
02:27 * Alek cackles.
02:29
< [R]>
Out of curiousity, a 5.6k object codebase in Java is in itself not horrible, or is it horrible?
02:29
<&ToxicFrog>
5.6k objects is not horrible.
02:30
<&ToxicFrog>
I'm pretty sure 5.6k classes is, though.
02:30
< [R]>
Err
02:30
< [R]>
That's what I meant
02:30
<&McMartin>
Before or after compilation
02:31 * [R] just counted the .java files TBH
02:31
<&McMartin>
That'll do
02:31
<&McMartin>
Yeah, that's pretty bad*
02:31
< [R]>
$ find -name "*.java" | wc -l
02:31
< [R]>
3460
02:31
< [R]>
Sorry, 3.4k
02:31
<&McMartin>
The only reason that might be OK is if classes are being split up to keep filesizes down
02:31
< [R]>
Maybe?
02:32
<&McMartin>
Yeah
02:32
< [R]>
It uses inheritance and interfaces like crazy, presumably for a DI-based framework. But it's so massive I can't really figgure anything out.
02:32
<&McMartin>
Yeah, DI will inflate class count.
02:32
<&McMartin>
So will "lambda expressions"
02:32
<&McMartin>
Which aren't really hence the quotes
02:33
<&McMartin>
I guess they're really, um
02:33
<&McMartin>
Anonymous proxy objects?
02:33 * McMartin is not a fan of DI
02:33 * McMartin is pretty OK with anonymous proxy objects when used properly
02:33
< [R]>
You meant the psuedo-closures which require you instantize an object?
02:33
<&McMartin>
Yeah
02:33
<&McMartin>
The bits where you go new InterfaceName() { /* implementation of that interface */ }
02:33
<&McMartin>
Which is basically the right way to do things like listeners and such
02:34
< [R]>
You can keep those down to a solid 1/project if done in a certain way... well 1 .java file for such anyways.
02:34
<&McMartin>
Oh, whoops
02:34
<&McMartin>
Where I said "class count" above, read that as ".class file count"
02:34
< [R]>
Ah
02:35 * [R] can't imagine where this system would need APOs
02:35
< [R]>
(For the record, this is a program called Anathema, it's an Exalted Character Generator)
02:35
<&McMartin>
Ergh
02:35
<&McMartin>
Well
02:35
<&McMartin>
Does it have some kind of fancy desktop UI
02:35
< [R]>
Uses a build-system called Gradle
02:36
<&McMartin>
Swing is significantly less painful to use with APOs
02:36 * [R] assumes Gradle is the reasons it has a stupid directory layout.
02:36
<&McMartin>
Because it's all publish-subscribe silliness
02:36
< [R]>
Yes, it uses Swing
02:37
< [R]>
Actually, let me rephrases that
02:37
< [R]>
It has directories named Platform_Swing and Platform_SwingTree, so I am assuming it uses Swing.
02:37
<&McMartin>
Heh
02:37
<&McMartin>
Fair enough
02:37
<&McMartin>
And yeah
02:37
<&McMartin>
If they're using Swing and not throwing anonymous classes around like candy they're going to have their filecount explode
02:38
<&McMartin>
And gradle it looks like by default inherits its directory structures from Maven
02:38
<&McMartin>
Which is made of Enterprise
02:38
<&McMartin>
But apparently occasionally actually does its job, so whatever
02:38
< [R]>
Both directorys accound for 398 of the .java files.
02:38
<&McMartin>
That sounds about right but doesn't sound like enough for the whole project
02:38
<&McMartin>
I dunno, it seems excessive to me
02:38
< [R]>
Yeah
02:39
<&McMartin>
But Java's insistence that all public classes get a file with a defined name does lead to file count explosion in ways that Python and C# do not
02:40
<&ToxicFrog>
Yeah, I was kind of assuming "5.6k source classes" and not "5.6k class files", since the latter is a lot easier to get with reasonable code.
02:40
< [R]>
Not 100% true (I found a "Closure" library that defies that)
02:41
<&McMartin>
I'm curious how they managed to dodge this
02:42
<&McMartin>
IME javac flags an error if you compile a/b/c/D.java and that is not a file that defines public class D within it and is headed with package a.b.c;.
02:42
<&McMartin>
D.java can define other classes too, but
02:42
< [R]>
public final class Closure {
02:42
< [R]>
/** R0 = Return of defined type with 0 parameters */
02:42
< [R]>
public static interface R0<Returns> {
02:42
< [R]>
public Returns call();
02:42
< [R]>
}
02:43
<&McMartin>
Oh. yeah.
02:43
<&McMartin>
Static inner classes are fine
02:44
<&McMartin>
That produces {packagename}/Closure#R0.class
02:44
<&McMartin>
Er
02:44
<&McMartin>
$R0.class
02:44
< [R]>
Ah
02:44
<&McMartin>
Hm
02:45
<&McMartin>
So, it's ambiguous at the source level but not at the binary level; if it found a Closure.java it would check for inner classes if it saw a Closure.R0
02:45
<&McMartin>
If there weren't one it would look for a directory Closure/ and an R0.java inside that
02:45
<&McMartin>
Then it would generate classnames Closure$R0 or Closure/R0 depending on which it was
02:46
<&McMartin>
This starts getting more obvious when you look at .classfiles generated by, ironically enough, Clojure
02:46
< [R]>
One would `import` the file first, no?
02:46
<&McMartin>
Often, but this is not necessary; Java lets you refer to anything by a fully qualified name
02:46
< [R]>
Yeah
02:46
<&McMartin>
When you import it you just are defining a shorthand
02:47
<&McMartin>
And then that gets parsed the same way it would elsewhere (that is, I think you can actually import Closure.R0 directly)
02:47
<&McMartin>
But it's been awhile since I've had to deal with this.
02:47
<&McMartin>
(anonymous proxy objects end up with names like DefiningClass$1.class)
02:48
<&McMartin>
And depending on programming style, even (or especially!) clean code can explode with those
02:49 AverageJoe [evil1@566022.8446FC.9BD8CA.023471] has joined #code
02:55 Vorntastic [Vorn@A2BA3E.078E56.95624A.2E0CB6] has joined #code
03:00 Pants [kvirc@Nightstar-af81524b.sasknet.sk.ca] has joined #code
03:01 VirusJTG [VirusJTG@2B12AA.572255.206A2A.901581] has quit [[NS] Quit: Program Shutting down]
03:02
< Pants>
Hi, I am learning to code in C++ and was wondering if anyone could suggest a free compiler for the Windows platform (W8 if it matters).
03:03
< Vorntastic>
There's mingw
03:03
< [R]>
^
03:03
<&McMartin>
Yeah
03:04
<&McMartin>
One might want to try to set up a complete MSYS+MingW environment, and I forget if that's different these days
03:04
< [R]>
If you need an IDE, Code::Blocks or VisualStudio
03:04
<&McMartin>
Code::Blocks actually includes mingw inside of it
03:04
< [R]>
Aye
03:04
<&McMartin>
mingw is also the "more standard" one depending on where you're learning; it's the g++ implementation that largely tracks Mac/Unix stuff
03:05 * [R] wonders if there's a clang port for Windows.
03:05
<&McMartin>
Visual Studio uses a different set of libraries and this sometimes produces anomalies
03:05
<&McMartin>
(In both directions; if you intend to do Windows system-level programming mingw has an aggravating tendency to fall on its face for awful reasons)
03:06
< Pants>
I have no idea what most of that means :( I'll try mingw and see if it does what I need. I am still wading thought hello world and trying to understand what iostream is and where it comes form
03:06
< [R]>
Ah, you may want to just get Code::Blocks then
03:07
<&McMartin>
Code::Blocks will probably get you up and running the fastest, yeah
03:07
<&McMartin>
I've found it kind of clunky to actually use though; I wonder if there are decent how-tos specifically for it
03:08
< [R]>
All IDEs are clunky.
03:08
<&McMartin>
Yeah, but it always clunked harder for me, I dunno
03:08
<&McMartin>
Anyway, here's the Hello World tutorial for it
03:08
<&McMartin>
http://wiki.codeblocks.org/index.php?title=Creating_a_new_project
03:09
< Pants>
So very low level question but in C++ what is the purpose of '<<' after something like cout? does that just tell the compiler "Here be text to output"?
03:09
< [R]>
Uhh
03:09
<&McMartin>
That's actually a high level question :)
03:09
< Pants>
Oh...
03:09
<&McMartin>
<< is an operator, that normally means "bit shift left": that is, 2 << 3 is actually the number 16.
03:09
<&McMartin>
Don't worry about that for now
03:09
<&McMartin>
C++ lets objects make these operators mean different things.
03:10
<&McMartin>
std::cout is an "output stream"
03:10
< Pants>
Okay.
03:10
< [R]>
It's more like it normally does something else, but std::ostream (std::cout) makes it do something else.
03:10
<&McMartin>
Output streams use << to mean "output this data", more or less
03:10
<&McMartin>
So you can do also, for instance
03:10
< Pants>
Yup, I am confused, I will leave it for now and continue on my tut McMartin :P
03:10
<&McMartin>
Yeah
03:10
< [R]>
In actuallity, each << is an argument to a method of std::cout saying "output this".
03:10
<&McMartin>
For now, "that'll do; there's more underneath"
03:11
<&McMartin>
Or "shift the next bit of output in this way"
03:11
<@Alek>
and >> is input this data, iirc
03:11
< [R]>
Yes
03:11
<&McMartin>
Yep
03:11 * Alek was pretty WAT when he was learning this.
03:11
< [R]>
For std::istream (which std::cin is)
03:11
<&McMartin>
Anyway, yeah. C++ is super-big and has a lot going on under the surface
03:11
<&McMartin>
It's best to start with simple things that work at a high level and then dig deeper as you get more confident.
03:11
<&McMartin>
Nobody really goes all the way down to the bottom.
03:12 * [R] tried to once
03:12
<&McMartin>
When they get tempted to, they instead switch over to the C compatibility functions.
03:12
< [R]>
To make a MessageBox() (or whatever the fuck that WinAPI call is) wrapper that behaved like cout did.
03:12
<&McMartin>
Whoa
03:12
<&McMartin>
Er
03:12
<&McMartin>
But there are two strings there
03:13
< [R]>
Well, there's also two strings with ofstream :p
03:13
<&McMartin>
(Faced with that problem I would use an ostringstream<WCHAR> and then call MessageBoxW with the .str().c_str() of it)
03:13
< [R]>
But yeah, ultimately it was a stupid idea that required too much work for my skill level.
03:15
<&McMartin>
Properly handling the way Windows links modern vs. ancient programs is one of the things mingw is really bad at, but this only matters when you're trying to directly interface with Windows stuff, more or less.
03:15
<&McMartin>
Unless they've finally gotten around to actually fixing this and allowing -municode to work on 32-bit targets
03:15
<@Tamber>
"Once you get started, you find that COBOL is pretty easy to work with. [...] The language is easy and intuitive to read and write." ...because, if you've argued for long enough on the Internet; typing in all-caps and explaining things as to a 2 year old comes naturally!
03:15
< [R]>
Heh
03:16
<&McMartin>
COBOL is a domain-specific language for dealing with structured data that fits on punchcards. =P
03:16 * Tamber is flitting through COBOL for Veget^WDummies, because bored.
03:16
<&McMartin>
Heh
03:17
<&McMartin>
My dad had a book from its era describing it.
03:17
<@Tamber>
"If you weren't a vegetable before you started, you will be afterwards!"
03:17
< [R]>
The fuck is with the JS API for Cookies?
03:17
<&McMartin>
I flipped through it. It seems mostly constrained by its inability to deal with true streamed data.
03:18
<&McMartin>
English-like languages have a much higher bar to clear now
03:18
<&McMartin>
"After showing a component (called their doom) to those fools from the Institute: now their doom is sealed; continue the action."
03:19
< [R]>
Heh
03:19
<&McMartin>
Mmm. That source code is a bit out of date. I could update it.
03:19
<&McMartin>
https://hkn.eecs.berkeley.edu/~mcmartin/if/games/science/source.html
03:24
<@Tamber>
There are some mildly amusing bits in this book: "An AUTHOR statement simply lists the name of the person, or persons, who perpetrated the program."
03:24
<&McMartin>
If this is a modern book, I'm honestly curious how the language has evolved to deal with a world where everything is ultimately a resource identifier (Windows) or a file stream (everything else).
03:25
< Vorntastic>
Yeah, that's about the size of it.
03:25
<&ToxicFrog>
Pants: is this your first language?
03:25
<@Tamber>
McM: I'll just doublecheck the date, but it's pre-2000.
03:25
<&McMartin>
ISTR the language itself looks like a primitive bashing-together of SQL and BASIC.
03:25
<&McMartin>
Tamber: Well, the key thing here is "is it post-1980"
03:25
<@Tamber>
1997
03:25
<&McMartin>
Yeah, that's late enough for my purposes.
03:26
<&McMartin>
The book I read dated from the 1960s and assumed you were punching your program into card decks
03:26
< Vorntastic>
(And if it is your first language, WHY?)
03:26
<@Tamber>
Considering that it's a "For Dummies" book, it probably deals with the above by *eyes closed, fingers in ears, going "lalalalalala!"*
03:27
<&McMartin>
And a whole lot of the language seemed to be definition of how the data structures you intended to consume and produce should be formatted upon the card decks.
03:27
<@Tamber>
Pretty much.
03:27
< Vorntastic>
Actually I found For Dummies to be remarkably thorough.
03:28
<&McMartin>
Now, I happen to know for a fact that in 1997 lots of computers that *didn't have* card readers *or* card punches were running piles of COBOL code
03:28
<&McMartin>
I'm kind of curious how this works. Is it record-structured files? Do they get to be random access? etc.
03:28
<@Tamber>
I could be wrong, but I *believe* you have the option of both.
03:29
<@Tamber>
Depending on how many atrocities you're willing to commit to get the job done, of course.
03:29
<@Tamber>
(Which, since you'd be messing with COBOL, is probably ranking around: "Burning down an orphanage")
03:30
< Vorntastic>
Is it a puppy orphanage?
03:30
<@Tamber>
Puppies and kittens.
03:32
< Vorntastic>
Wait. Does this mean COBOL is immune to bullets?
03:32
<@Tamber>
And, probably, a lot more besides.
03:32
<&McMartin>
And love!
03:33 AverageJoe [evil1@566022.8446FC.9BD8CA.023471] has quit [[NS] Quit: Leaving]
03:33
<@Tamber>
Anyway, if you're using open-cobol, you have the possibility of extending tentacles to C (Since open-cobol mongles COBOL to C); and from there the possibilities are endless(...ly horrifying.) (...Although a sick, twisted part of me wants to see the stereotypical "Bleeding Edge Cool Language Or Die" code-'ninja' encountering a ${CURRENTLY_COOL_PROJECT} hammered from COBOL [...]
03:33
<@Tamber>
[...] and C.)
03:34
<@Tamber>
< KHDN> COBOL systems have survived the original programmers. COBOL systems will survive you. They will watch the downfall of mankind, and the dawn of the civilisation after that, and millenia hence, the insect-people (that are going to have arisen) will curse the lack of documentation.
03:35
<@Tamber>
< KHDN> "Oh, the mainframe? Yeah, the Precursors left us this. ... frankly, I think they're overrated."
03:35
< Vorntastic>
C is actually mostly ok, so long as you work to avoid certain spiders.
03:35
<&McMartin>
And as long as you don't need any data structures more complicated than "chunk of memory".
03:35
<@Tamber>
Vorn, if you're hooking out to things via C, from COBOL, you're relishing the prospect of rolling in spiders. Because it's a step down from the eldrich horrors you're currently bathing in.
03:36
<@Tamber>
eldritch*
03:36
< Vorntastic>
Heh
03:36
<@Tamber>
I hate that word. I get it wrong every time.
03:37
< Vorntastic>
Old guy with a rash.
03:37
<@Tamber>
hehe
03:38
<@Tamber>
http://www.opencobol.org/modules/bwiki/index.php?cmd=read&page=UserManual%2F2_3# content_1_0
03:44 Vornlicious [Vorn@Nightstar-16a3c925.sub-70-211-6.myvzw.com] has joined #code
03:44
<@Tamber>
Okay. Files are just "a bag of bytes", and you have to manually describe how to interpret that bag of bytes as something useful. Makes sense.
03:45 Vorntastic [Vorn@A2BA3E.078E56.95624A.2E0CB6] has quit [Ping timeout: 121 seconds]
03:46
<&ToxicFrog>
Tamber: that's how files usually work.
03:46
<@Tamber>
Yup
03:47
<@Tamber>
Hence it making sense. :)
03:51
<@celticminstrel>
Hm... I suspect there is a better way of specifying relative occurrences of various monsters and items...
03:52 * Tamber gets bored of shouty-code, goes to do something else.
04:00 Kindamoody[zZz] is now known as Kindamoody
04:02 Vornlicious [Vorn@Nightstar-16a3c925.sub-70-211-6.myvzw.com] has quit [Ping timeout: 121 seconds]
04:03 Harlow [Harlow@Nightstar-a784d8b0.hfc.comcastbusiness.net] has quit [[NS] Quit: Leaving]
04:10 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
04:10 mode/#code [+qo Vornicus Vornicus] by ChanServ
04:19
<~Vornicus>
celmin: how do you do it now?
04:19
<@celticminstrel>
Uhh... probably very badly. >_>
04:20
<@celticminstrel>
Each item has a "weight" which is calculated based on what floor you're on, and I add them all up and pick a random number, using that to select which item to spawn.
04:21
<~Vornicus>
That's about how I'd do it.
04:24 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has quit [Ping timeout: 121 seconds]
04:27
<@celticminstrel>
...maybe it's a good idea that's implemented badly. >_>
04:27 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has joined #code
04:27 mode/#code [+o Reiv] by ChanServ
04:27
<~Vornicus>
This does have /some/ issues though - if your healing potion weight remains the same but your other weights go up, then you'll be getting less healing potions.
04:28
<@celticminstrel>
Yeah.
04:28
<@celticminstrel>
And I've been adding more items, too.
04:31
<&ToxicFrog>
Some games address this with item categories that impose additional constraints - e.g. the generator might be guaranteed to emit at least one [random healing item] and [random food] per level, and each of those will select an item based on the level-appropriate weights for every item in the [healing] and [food] categories.
04:31
<&ToxicFrog>
So the former could be dozens of variations on potion, wand, scroll, etc, but it's guaranteed to be something.
04:33
<@Reiv>
That's not a bad idea.
04:34
<@celticminstrel>
Hmm...
04:35
<@celticminstrel>
So, instead of adding up the weights of all items, you'd be adding up the weights of all items in a particular category.
04:39
<&ToxicFrog>
Yes. And items can belong to multiple categories, too.
04:39
<&ToxicFrog>
This also means, if you like, you can weight by category instead of by item
04:40
<@celticminstrel>
...or even both?
04:40
<&ToxicFrog>
E.g. if the weights are (healing 2, weapon 1, armour 1, treasure 1), and you first select a category and then an item within the category, then about 40% of the items will have some kind of healing feature, even if there are relatively few healing items compared to, say, weapons.
04:40
<&ToxicFrog>
Yes.
04:42 * celticminstrel wonders what you'd put in a treasure category.
04:44
<&ToxicFrog>
Gems and other high-value objects with little or no practical utility.
04:46
<@celticminstrel>
Ah. So, I wouldn't have a treasure category.
04:49
<&McMartin>
Hm. Walking home from work I had a vision for how to do a fairly generic entity system
04:49
<&McMartin>
Unfortunately, this vision was in Scheme
04:50
<&ToxicFrog>
So do it in clojure.
04:50
<&McMartin>
Hilariously, that would be harder.
04:50
<&McMartin>
(it relies on a lot of imperative stuff)
04:51
<&McMartin>
It turns out Python is kind of boring for the Horse Archer case because it turns out Python Multiple Inheritance does this exactly as needed.
04:52
<&McMartin>
(But falls down comically if multiple superclasses use the same field names for different purposes)
04:53
<&McMartin>
Scheme > Clojure here because Clojure is pointedly functional and Scheme is only functional by convention; this is one of those "use Scheme as a way to implement all the various paradigms" cases, I think.
04:55
<&McMartin>
The vision was based heavily on mutable S-expressions.
04:59
<@celticminstrel>
...so... could I apply this category thing to monsters as well?
05:04
<~Vornicus>
Sure.
05:04
<~Vornicus>
You might have, um
05:06
<~Vornicus>
You might make like "parties" that can have a variety of critters in them, too, and select parties and then select critters in the party
05:07
< [R]>
Horse Archer case?
05:07
<&ToxicFrog>
I think my personal approach would be to model it as capabilities, which soldiers have a set of. Horse archers have_a cavalry-nature and archer-nature.
05:07
<&McMartin>
R: http://thecodelesscode.com/case/83
05:07
<@celticminstrel>
...hm, maybe... that's rather a different thing than the item categories though. :P
05:07
<&McMartin>
As was discussed earlier
05:07
<@Reiv>
ToxicFrog: So capabilities are objects?
05:10
< [R]>
How would that differ from DI?
05:11
<&ToxicFrog>
Reiv: yes.
05:12
< [R]>
RE: the Capability thing
05:13
<@Reiv>
That seems a bit naughty in OO. But perhaps it is not an OO pattern.
05:17
<@celticminstrel>
I wonder, should I have some sort of... system for assigning weights? For example, every weight is between 0 and 20?
05:18
<@celticminstrel>
Not necessarily that particular range, but...
05:18
< [R]>
How would it be used?
05:18
<@celticminstrel>
Hm?
05:20
< [R]>
Well, if you can't state a use-case then the answer is no :p
05:21 * celticminstrel is talking about the weighted random from earlier.
05:21
<@celticminstrel>
Selecting which items to spawn.
05:22
< [R]>
Yes, I am aware.
05:22
<@celticminstrel>
...well, it seems like it'd be useful to have some kind of concept of "20 means common, 1 means rare";..
05:22
< [R]>
However, you were asking if you should make a /system/ to assign weights. I asked for a usecase, you balked. Therefore, logically, with zero use-cases, the system is worthless to produce.
05:23
<@celticminstrel>
I mean some sort of system for me to manually assign them >_>
05:23
< [R]>
:p
05:23
< [R]>
Yes, you should do that.
05:35
< [R]>
Hmm
05:36 * [R] is working on a kind-of pokemon clone. Each monster has a base template, and then multiple other templates are applied. I tihnk my best option is to just store which templates are used, and what modifiers have been added, then derive the stats from that?
06:43 * Vornicus pokes at his C++ code. At some point he has to feed enough data in to actually test this thing.
06:56
<@Reiv>
McMartin: Can Scheme implement Entity Systems?
06:57
<~Vornicus>
Scheme can implement Fucking Anything
06:58
<~Vornicus>
(technically any proper programming language can implement anything, insert discussion on the nature of computability here, but scheme is quite good at doing whatever you tell it to.)
06:58
<@Reiv>
I get the feeling that Scheme is more theoretical than useful, though?
06:59
<&McMartin>
I'm fiddling with an implementation now
06:59
<&McMartin>
I've backed myself into a corner re: constructors.
06:59
<&McMartin>
I may give that part a pass for now
07:02
<&McMartin>
Really doing this right involves a topological sort
07:16
<&McMartin>
Yeah, I've got the basics, at least.
07:18
<@celticminstrel>
Hm... what's a good scale for assigning item commonness...
07:18
<@celticminstrel>
I'm unsure whether 1 to 10 is enough.
07:18
<@celticminstrel>
But, 1 to 50 is probably too much...
07:21
<~Vornicus>
Okay. In order to get data in I need to get Python to output the data in the format I wanted C++ to handle it in.
07:25
<&McMartin>
OK
07:25
<&McMartin>
http://pastebin.starforge.co.uk/569
07:26
<&McMartin>
define-property's syntax could be a lot cleaner if I deigned to use macros instead of requiring quasiquote.
07:30
<&McMartin>
Also note that in 65 lines I have defined an object system despite Scheme not having one~
07:30
<&McMartin>
Though there is still a Spider in it.
07:30
<&McMartin>
Arguably having initialization functions at all is a mistake here.
07:32
<~Vornicus>
Also I need to get the C++ code to read in that data, and create objects from it.
07:40 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
07:45
<~Vornicus>
celmin: on several occasions people have asked me whether some number of levels is enough, and my answer has been "it's too many"
07:45 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
07:45 mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ
07:47
<~Vornicus>
I'd go maybe 1-5, even 1-3.
07:47
<@celticminstrel>
...heh.
07:47
<@celticminstrel>
Okay, I guess what I'll do is start with 1-5 and see if that's enough.
07:47
<~Vornicus>
At that we're talking "mulch, common, uncommon, rare, ultra-rare"
07:47
<@celticminstrel>
...heh, mulch.
07:50
< Syka>
i always found that enough levels to keep things interesting is good
07:50
< Syka>
"vendor trash, common, uncommon, rare, legendary, end-game"
07:51
< Syka>
where end-game is only like three or four unique named items
07:51
< Syka>
because I hate when I get things from something in that sort of thing, and it's "uncommon"
07:51
< Syka>
it's like, come on
07:51
< Syka>
I beheaded some sort of ancient evil
07:51
< Syka>
and his weapon is UNCOMMON?
07:52
<@celticminstrel>
...heh.
07:52
<@Reiv>
That's not a bad strategy.
07:53
< Syka>
in an mmorpg it may be uncommon as the boss may be shit
07:53
< Syka>
but canonically, there is only bloody one uber sword of megadeath
07:54
< Syka>
unless they were given out in villain-o's crunch cereal boxes
07:55
< Syka>
</barely rational rage>
07:55
<~Vornicus>
Well, no, this is drop rarity, which means trash
07:56
<~Vornicus>
Er
07:57
<~Vornicus>
What I'm saying is that this system is for assigning drop rarities to items dropped from trash enemies. An item would not necessarily have the same drop rarity among all the monsters that might drop it, and you can't use this assignment as a measure of item value.
07:58 Kindamoody is now known as Kindamoody|out
07:58
<@celticminstrel>
It's also for items spawned on the floor.
07:59
<~Vornicus>
Long story short these levels are not intrinsic to the items.
07:59 Turaiel is now known as Turaiel[Offline]
08:01
<@celticminstrel>
I suppose with only 1-5, cursed items should be about as common as their uncursed equivalents.
08:01
<@celticminstrel>
Well, assuming there is one.
08:02
<~Vornicus>
No, bad wrong evil
08:02
<@celticminstrel>
Okay?
08:03
<~Vornicus>
I have never once met a cursed item mechanic that was at all enjoyable and i don't know why people keep putting it into games.
08:03
<@celticminstrel>
...oh, heh.
08:04
<@Reiv>
Vornicus: It can work if the cursed items are awesome simultaneously, and if you actually care about making identification nontrivial.
08:04
<@celticminstrel>
In my case, cursed weapons are a little better than their uncursed counterparts, but only after you uncurse them. >_>
08:04
<@Reiv>
As opposed to eg, Diablo, wherein you just can't use stuff till you use a token.
08:07
<@celticminstrel>
...anyway, I should probably sleep. >_>
08:07
<~Vornicus>
--at that I don't really much like most identification systems.
08:08
<@celticminstrel>
I didn't even bother with identification in this one. >_>
08:11 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:16
<~Vornicus>
basically the possibility of an object being cursed makes the game exactly like diablo's identifcation system for me.
08:24
<~Vornicus>
Arg, need some ritalin or something
08:31 * jerith jealously guards his Vitamin R.
08:34
<~Vornicus>
Ok ok ok. Step 1. get my Python work to output by-system data into two files: one that's just the resource values, one that's just the system loadout.
08:35
<~Vornicus>
Python does per-system stuff quickly, and that's pretty simple. it's the system combining stuff that's really slow, because it's really large.
09:11 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
09:11 mode/#code [+o himi] by ChanServ
09:14 You're now known as TheWatcher
09:17
<@TheWatcher>
http://imgur.com/gallery/LpoDt - the comments make this...
09:19 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has joined #code
11:22 VirusJTG [VirusJTG@2B12AA.572255.206A2A.901581] has joined #code
11:35 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has quit [[NS] Quit: Leaving]
11:39 McMartin_ [mcmartin@1526F6.C06DD8.A32EA9.656096] has joined #code
11:41 McMartin [mcmartin@Nightstar-3a6025eb.pltn13.sbcglobal.net] has quit [Ping timeout: 121 seconds]
12:14 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has quit [Ping timeout: 121 seconds]
12:29 EvilDarkLord [jjlehto3@26ECB6.66DC17.49CBB4.283ECA] has quit [Ping timeout: 121 seconds]
13:04
<@TheWatcher>
...
13:04
<@Azash>
I guess that's why you're TheWatcher and not TheSpeaker
13:04
<@TheWatcher>
I... I think my brain has just broken
13:05
<@Azash>
Sup?
13:05
<@TheWatcher>
This webapp I've been working on, I have just decided to see how badly broken it is in IE
13:05
<@TheWatcher>
It isn't. It works, layour is fine, javascript is fine.
13:05
<@TheWatcher>
*layout
13:05
<@Azash>
Which IE?
13:06
<@TheWatcher>
10, which I suppose is an explanation.
13:06
<@Azash>
Mm, I'd gotten the picture that IE plays much nicer now that it has serious competition
13:06
<@TheWatcher>
I don't think I want to even think about what it'd do in 7 or 8.
13:28
<@gnolam>
Well, at least IE6 is finally dead.
13:29
< Syka>
it is?
13:29
< Syka>
TheWatcher: I had that happen too
13:29
< Syka>
I was surprised
13:29
<@Azash>
That is not dead which may eternal lie
13:29
< Syka>
nowadays, it's working around GODDAMN WEBKIT bugs
13:31
< Syka>
heh, I'm reading this thing about python dicts
13:31
< Syka>
how you shou;dn't use them as queues because removing from the start is slow
13:31
< Syka>
and you should use collections.deque instead
13:32
< Syka>
which doesn't have a slower removing from the start
13:32
< Syka>
I was pondering if they achieved this by making it uniformly slow
13:32
<@Azash>
How can removing from the start be slow?
13:32
< Syka>
Azash: because dictionaries have to move everything after it
13:32
<@gnolam>
It's technically not EOLed, but its market share has dropped so low that it's no longer a concern.
13:32
<@Azash>
Ah, I see, not a linked structure?
13:33
<@gnolam>
In fact, unless you're running a high traffic site, you can go without seeing a single IE6 hit in your logs.
13:33
< Syka>
if someone wants an IE6 compatible app, these days
13:33
< Syka>
if they are at all important, I am more likely to laugh at them
13:33
< Syka>
and then immediately stop using their services
13:34
< Syka>
because it seems that IT hasn't been employed there for at least six years
13:35
<~Vornicus>
Um
13:35
<~Vornicus>
dictionaries aren't ordered
13:35
<~Vornicus>
lists are a pain to remove stuff from the front
13:35
< Syka>
uhh
13:35
< Syka>
lists
13:36
<~Vornicus>
dictionaries don't have a front~
13:36
< Syka>
...sorry, I was reading about dictionaries just then
13:36 VirusJTG [VirusJTG@2B12AA.572255.206A2A.901581] has quit [Ping timeout: 121 seconds]
13:36 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds]
13:36 * TheWatcher blinks at html5
13:37
<@TheWatcher>
'The values "true" and "false" are not allowed on boolean attributes.' is probably the entire thing in a nutshell, really.
13:37
< Syka>
well duh
13:37
< Syka>
you're supposed to use 'squorb' and 'plaf' instead
13:37
< Syka>
haven't you read the RFC?
13:38
<~Vornicus>
HTML has always used presence/absence for boolean attributes.
13:38
<@TheWatcher>
Yeah, I know, it's just kinda blugh
13:39
<@gnolam>
Still makes more sense than OpenGL's capability testing.~
13:39
< Syka>
wiat
13:39
< Syka>
wait
13:39
< Syka>
they have?
13:39
< Syka>
hmm
13:40
<~Vornicus>
yeah, try making a checkbox with checked="false"
13:40 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
13:51
<@froztbyte>
<gnolam> It's technically not EOLed, but its market share has dropped so low that it's no longer a concern.
13:51
<@froztbyte>
lol
13:51
<@froztbyte>
you need to meet some banks
13:51
<@gnolam>
Oh?
13:51
<&ToxicFrog>
Dammit vorn, get back here so I can burble about identification systems~
14:06
<@gnolam>
froztbyte: explain
14:13
<@TheWatcher>
There's a lot of companies whose internal web systems refuse to work on anything but IE6, financial institutions are often some of the worst offenders for this
14:14
<@TheWatcher>
(in no small part because they generally work the code monkeys harder than EA)
14:18
<@gnolam>
Intranets don't count.
14:19
< Syka>
UK gov stuff still does that
14:19
< Syka>
Tamber ran into it attempting to do some forms
14:19
< Syka>
i think it was IE6, or netscape, or mozilla 1
14:24
<@froztbyte>
gnolam: banks are.....well, ancient
14:24
<@froztbyte>
gnolam: I know a couple who still have /mandated/ win9x machines
14:28 * iospace pokes ToxicFrog
14:28
<@iospace>
i was told to talk to you by TheWatcher about routers
14:52 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
14:52 mode/#code [+o celticminstrel] by ChanServ
14:57 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
14:57 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
14:57 mode/#code [+o celticminstrel] by ChanServ
15:18
<&ToxicFrog>
iospace: rant deployed in #fleet
15:19
<@iospace>
i may have missed it?
15:22 * iospace throws SMBus at ToxicFrog
15:22
<@iospace>
^_^
15:23
<&ToxicFrog>
You were still in channel!
15:23
<@iospace>
i know!
15:23
<@iospace>
i scroll backed
15:23 * iospace won't be getting it this week
15:24
<&ToxicFrog>
About an hour and a half ago?
15:24
<@iospace>
.. as in i saw it
15:24
<@iospace>
now i did anyway
15:24
<&ToxicFrog>
Aah
15:25 * iospace whaps
15:28
<@iospace>
so, any recs?
15:31
<&ToxicFrog>
For what, a home router?
15:35
<@iospace>
apartment, but yeah :P
15:36 * AnnoDomini laughs out loud at http://thecodelesscode.com/case/66
15:37 * iospace is missing something here
15:40
< AnnoDomini>
Read the first sentence. Then read the fourth and fifth paragraphs, especially the first sentences of each.
15:43
<&ToxicFrog>
iospace: I've been using an E2500 quite happily. Simultaneous dual-band (so you can run 2x5GHz if you're on an all-n network for maximum bandwidth, or one 5GHz and one 2.4GHz if you need to support legacy devices), Tomato works on it out of the box.
15:43
<&ToxicFrog>
No gigE support, though.
15:43
<@iospace>
E2500?
15:44
<&ToxicFrog>
iospace: Linksys E2500?
15:44
< Syka>
i also do not get it, AnnoDomini
15:44 * Syka has never worked with design documents, is probably missing context
15:44
<&ToxicFrog>
AnnoDomini: excellent
15:44
<@gnolam>
You don't need to be familiar with design documents.
15:44
<@gnolam>
This one is properly marked "not geeky".
15:45
<&ToxicFrog>
Syka: the diagrams bear no relation to the contents of the document...but in trying to figure out what the relation is, the reader is forced to closely read and comprehend the important parts of the document proper.
15:45
<@iospace>
ToxicFrog: and the software side of it?
15:45
< Syka>
ToxicFrog: ooooh
15:45
< Syka>
ahah
15:46 * iospace very much hates UML and dropped otu of SE for CS because of it
15:47
< Syka>
i never got UML
15:48
< Syka>
unless you have some poor sod on the team who defiles himself over flowcharts, seems a little bit of a waste of time for me
15:48
<@gnolam>
UML is quite useful. For design discussions on a whiteboard.
15:49
<@gnolam>
But that tends to involve a rather small subset of the entire thing.~
15:49
<&ToxicFrog>
iospace: Tomato 1.28 "Shibby" MIPSR2 K26
15:49
<@iospace>
for firmware?
15:50
<&ToxicFrog>
Yes.
15:50
<&ToxicFrog>
Specifically the E2500 image from http://tomato.groov.pl/download/K26RT-N/build5x-109-EN/Linksys%20E-series/
15:50
<&ToxicFrog>
(well, from build 104, I haven't updated in a while)
15:51
<@iospace>
heh
15:51
< Syka>
I feel kind of mean
15:51
<@iospace>
oh?
15:51
< Syka>
I'm openly dissing a company on their own page
15:51
<&ToxicFrog>
(this is the Shibby "Max" upgrade to the Tomato USB upgrade to the original Tomato firmware, adding a few features I don't care about and driver support for the new Exxxx platforms)
15:51
<@iospace>
how so?
15:51
< Syka>
Telstra on their G+ asked what android tablets people have
15:51
< Syka>
literally nobody had one from Telstra
15:52
< Syka>
they were like "despite the telstra tablet snub, the nexus series is undeniably awesome"
15:52
< Syka>
and I told them that's because they don't have a single competent software engineer in the entire company
15:52
< Syka>
and that using any software touched by telstra is terrible
15:54
<@iospace>
i really don't need gigabit nets (no really, i think that's overkill for residential purposes)
16:03
<&ToxicFrog>
iospace: I would occasionally find it useful, but not useful enough to get a more expensive model.
16:03
<@iospace>
yeah
16:03
<&ToxicFrog>
Especially when I don't have ethernet drops yet and thus the whole house is running off the wireless anyways.
16:03 * iospace only has her e-reader, her netbook, and her desktop
16:04
<@iospace>
and my net doesn't even go above 30 megs... so yeah
16:04
<&ToxicFrog>
(I have one of these driving a house with seven edge devices, one of them wired straight into it and the rest using the wireless)
16:07
<&ToxicFrog>
(...sorry, nine, if you count the consoles)
16:09
<@iospace>
heh
16:09
<@iospace>
either way!
16:12
<@iospace>
also, it's just me who will be using the network
16:17
<&ToxicFrog>
You should be fine :)
16:24
<&ToxicFrog>
We've been running ours for about half a year now; it hasn't exploded or anything, and you can quite happily stream HD video from the server and whatnot.
16:24
<&ToxicFrog>
There were some issues with the gaming machines, but those were eventually determined to be windows wireless driver madness.
16:25
<&ToxicFrog>
(apparently, "let windows disable this device to save power" defaults to on for network cards. And if on, windows will happily disable the NIC while it is under load.)
16:32
<@TheWatcher>
(wat)
16:34
<&ToxicFrog>
(precisely)
16:53 * TheWatcher pushes ze button on releasing Newsagent v0.1b (Hornchurch), bang on time for a change
16:58 * Azash learns Brainfuck
17:02 * AnnoDomini completes reading the Codeless Code.
17:02
< AnnoDomini>
That was fun.
17:08 * iospace eyes this ticket
17:08
<@iospace>
"<Part> seems unhappy"
17:10 * Azash snickers
17:25 Turaiel[Offline] is now known as Turaiel
17:49 * iospace looks at this code and sighs
17:54 Turaiel is now known as Turaiel[Offline]
18:00
< [R]>
<Vornicus> yeah, try making a checkbox with checked="false" <-- checked="checked" disabled="disabled" readonly="readonly" etc...
18:02 Turaiel[Offline] is now known as Turaiel
18:05
<@celticminstrel>
Hm... if some items never occur on earlier levels, the simple act of adding additional items to the pool will cause the items that do occur in earlier levels to become less likely... so is there any point in reducing their weight for later levels?
18:23
< [R]>
This is how I understand what Diablo 2 did to solve that problem: items have their own level. Quality alters the item level (rare is better than magic, unique is better than both, etc...) and the drop system requests items in an item level range.
18:24 Turaiel is now known as Turaiel[Offline]
18:24
< [R]>
Rather than weight by item type though (short sword, healing potion, scythe, etc...) it weights on quality (rare, set, unique, etc...)
19:25 Kindamoody|out is now known as Kindamoody
19:32
<&ToxicFrog>
Sweet
19:32
<&ToxicFrog>
Herself has given me permission to obliterate another unused class turned up as part of this CL
19:37 * ToxicFrog warms up the orbital death laser
19:44
< Syka>
ToxicFrog: so that's what the 'G' in 'GDI' stands for then :P
20:02 * AnnoDomini noms yoghurt and thinks how to improve high_seas.cpp.
20:04
< [R]>
http://terralang.org/
20:04
<&ToxicFrog>
[R]: yeah, I was looking at that earlier. Seems interesting.
20:20 Turaiel[Offline] is now known as Turaiel
20:22 Kindamoody is now known as Kindamoody[zZz]
20:57
<&ToxicFrog>
delta: +145 lines, ~85 lines, -550 lines
20:57
<&ToxicFrog>
Feels good
21:23 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
21:23 mode/#code [+qo Vornicus Vornicus] by ChanServ
22:04
<@sshine>
I'm making a LaTeX package for either creating front pages or a small letterhead on the front page.
22:05
<@sshine>
(using my university's official images)
22:07
< McMartin_>
TF: CL?
22:08
<@sshine>
before the \maketitle, I thought I'd make a \makefrontpage and \makeletterhead, or something like that
22:08
<@sshine>
or maybe, \maketitle should just insert all the graphics, too, and place the header accordingly, and then there should be a command that toggles between which of the two versions to use...
22:09
<@sshine>
I like when packages don't ask you to use a whole new set of commands but just redefines ones you already use... even though it can screw up.
22:11 Turaiel is now known as Turaiel[Offline]
22:12
<@sshine>
ah... there's of course \usepackage[*params*]{myfrontpage} that I can toggle, too.
22:24 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
22:30
<@TheWatcher>
Aaah, gcc, you and your hilariously cryptic error messages.
22:36 Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has joined #code
22:36 mode/#code [+o Reiv] by ChanServ
22:46
< McMartin_>
Possibly of interest to some people in this channel
22:46
< McMartin_>
http://morepypy.blogspot.com/2013/06/stm-on-drawing-board.html
22:50
<&ToxicFrog>
Software transactional memory support in pyppy?
22:50
<&ToxicFrog>
McMartin_: changelist
22:50
< McMartin_>
Aha, OK
22:50
< McMartin_>
I was trying to get to something like "code review"
22:51
<&ToxicFrog>
I.e. what gets written into the master version control system as a commit (as opposed to the tangled nest of local commits that it exists as while I'm working on it)
22:51
<&ToxicFrog>
The terminology is from P4, where a changelist is basically a git index before it's committed and a commt afterwards - "CL" is used for both.
22:52 * McMartin_ nods
22:52
< McMartin_>
Gambit's FFI is better than I remember
22:52
< McMartin_>
http://www.animal-machine.com/blog/2010/08/2d-drawing-with-sdl-and-opengl-with-g ambit/
23:06
< McMartin_>
OMG https://github.com/billbudge/PCS_Atari800
23:07
< McMartin_>
This (well, the C64 version) was arguably the game that inspired me to become a programmer in the first place
23:11
< AnnoDomini>
Huh. Assembly. For some reason I expected Basic.
23:13
< McMartin_>
He's got the Apple II stuff posted too
23:13
< McMartin_>
I hope he eventually posts the C64 version
23:13
< McMartin_>
All three machines had similar CPUs and a wide subset of binary-compatible assembly
23:13
< McMartin_>
And it's a super-easy assembly language; three registers, accumulator based, pretty complete indexing modes.
23:14
< McMartin_>
Not at the level of the 8086, but the 8086 came a good bit later
23:14
<@Reiv>
accumulator based?
23:15
< McMartin_>
As opposed to, er, general-register based
23:15
< McMartin_>
Basically, you've got N places to stick numbers where you can actually do stuff
23:15
< McMartin_>
In an accumulator system only one of those is actually wired to the bit that can do math
23:16
< McMartin_>
So if you have three memory locations I J K and you want to do I = J + K
23:16
< McMartin_>
In an accumulator system you'd do "load accumulator with J; add K to accumulator; store accumulator in I"
23:17
< McMartin_>
Meanwhile, on the PS1's more modern chip, you would go "Load Rx with J; Load Ry with K; Rz = Rx + Ry; Store Rz in I"
23:17
< McMartin_>
Also, the PS1 has 32 "Rx"s.
23:17
< McMartin_>
While the C64/NES/Atari/Apple II had, basically, one.
23:18
<@Reiv>
Oh, yes.
23:18
< AnnoDomini>
What's the use case for having so many registers?
23:18
< McMartin_>
The PS1 is a little wacky here because it was also the first iteration of a movement to make instructions do less work than the CPUs of the day, because that let you crank up the clock rate super fast
23:18
< McMartin_>
AnnoDomini: You don't have to go to memory as often to handle temporary values.
23:18
< McMartin_>
Short functions can live *entirely* in the registers, which is blazingly fast.
23:18
< AnnoDomini>
OK.
23:19
< McMartin_>
But the C64 and PS1 processors have a lot more in common with each other than they do with, say, PS1-era Intel chips
23:19
< McMartin_>
16-bit x86 code had instructions like "decrement CX and jump to location Y if CX is not zero"
23:20
< McMartin_>
The x86 started out as an accumulator system ("AX" originally meant "accumulator") but around the 386 the registers started being able to sub in for each other arbitrarily.
23:21
< McMartin_>
And then IX and IY were index registers that originally worked roughly as the C64's X and Y registers
23:21
< McMartin_>
Which you can't do math to, but which you can add to addresses to do C-style array access.
23:22
< McMartin_>
(If you actually care about this stuff, I wrote a small book >_> http://michaelcmartin.github.io/Ophis/book/p481.html )
23:30 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
23:34
<@Azash>
http://www.smbc-comics.com/comics/20130605.png
23:36
< McMartin_>
http://www.smbc-comics.com/comics/20130603.gif
23:51 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Client closed the connection]
23:51 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
23:56 McMartin_ is now known as McMartin
23:56 mode/#code [+ao McMartin McMartin] by ChanServ
--- Log closed Thu Jun 06 00:00:00 2013
code logs -> 2013 -> Wed, 05 Jun 2013< code.20130604.log - code.20130606.log >

[ Latest log file ]