code logs -> 2013 -> Fri, 13 Sep 2013< code.20130912.log - code.20130914.log >
--- Log opened Fri Sep 13 00:00:48 2013
00:01 Reiver [quassel@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
00:03 Reiver [quassel@Nightstar-3762b576.co.uk] has joined #code
00:04 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
00:04 mode/#code [+qo Vornicus Vornicus] by ChanServ
--- Log closed Fri Sep 13 00:16:27 2013
--- Log opened Fri Sep 13 00:19:30 2013
00:19 TheWatcher [chris@Nightstar-3762b576.co.uk] has joined #code
00:19 Irssi: #code: Total of 39 nicks [16 ops, 0 halfops, 0 voices, 23 normal]
00:19 mode/#code [+o TheWatcher] by ChanServ
00:20 Irssi: Join to #code was synced in 38 secs
00:20 Reiver [quassel@Nightstar-3762b576.co.uk] has joined #code
00:22
<&ToxicFrog>
Alek: as for phonebloks: concur with Syka. The problem is wants to solve is real, but it's a shit idea.
00:24
< Syka>
people agreeing with me
00:24
< Syka>
this is new
00:30 Derakon[AFK] is now known as Derakon
00:35 * Alek nods.
00:35
<@Alek>
thanks.
00:36
<&ToxicFrog>
(a conventional phone will give you more power and battery life and weigh less, cost less, and be smaller - sufficiently so that you'll probably come out ahead even though you do have to replace it wholesale once part of it breaks)
00:37
<@Alek>
but a phoneblok may have a blok battery that's extra-thick and covers the back of the other bloks, more power for more thickness.
00:37
<@Alek>
as well as leaving more room for other bloks.
00:38 * Alek shrugs.
00:38
<&ToxicFrog>
All of which will be larger and draw more power and have worse performance.
00:38
<@Alek>
perhaps so.
00:38
<@Alek>
I'm not the only one who'd be happy with a thicker phone if more of it was battery.
00:39
<&ToxicFrog>
Right, but it's not just "thicker phone with more battery", it's "thickery phone with more battery and worse performance at 2-3x the price"
00:39
<&ToxicFrog>
At which point just get an external battery pack or something
00:39
<@Alek>
well, the phoneblok, sure.
00:39
<@Alek>
and an external pack is unwieldy.
00:39
<@Alek>
I'm talking about smartphones in general.
00:40
<@Alek>
why not add an optional replacement battery pack that has more power but makes the phone thicker?
00:40
<@Alek>
so far, I've heard of ONE model that does so.
00:40
<@Alek>
and they're not a very appealing option otherwise.
00:41
<&Derakon>
So you'd rather phonebloks, which would be universally "not a very appealing option otherwise"? :)
00:41
<&Derakon>
Regardless of what the "otherwise" is.
00:41
<&Derakon>
I mean, yeah, I sympathize about the battery pack thing.
00:41
<&Derakon>
The problem being that phone makers apparently have decided that thickness is a metric they can sell phones with.
00:42
<@Alek>
phonebloks would be a step in the right direction, IF they could be made to work right. big if.
00:42
<@Alek>
it's a concept that has some promise, even though it needs lots of work.
00:42
<@Alek>
yes. exactly. selling points. D:
00:42
<&Derakon>
Keep in mind that every time you add a block, you're adding the thickness of the wall of the block in every direction.
00:43
<@Reiv>
You realise you can buy battery cases, right?
00:43
<&Derakon>
You're also mucking with airflow.
00:43
<@Reiv>
Where the case of the phone has extra battery?
00:43
<@Alek>
Reiv: haven't really heard of those, actually.
00:43
<@Alek>
and definitely not for idildos. *trollface*
00:43
<&Derakon>
Far, far more plausible would be a phone that you could crack open and swap parts around if you were willing to rewire things yourself, like a modern PC.
00:43
<@Reiv>
Samsungs and Apples get them all the time, and even the odd HTC.
00:44
<&Derakon>
You'd need some electronics smarts but it'd be a lot more feasible.
00:44
<@Alek>
what I'm drawn to, actually, are the newer samsungs.
00:44
<&Derakon>
Still never gonna happen.
00:44
<@Reiv>
Oh, Nexuses do too, whatever brand they are this week.
00:44
<&Derakon>
Phones have been commoditized.
00:44
<@Alek>
the s4, the note3.
00:44
<@Reiv>
S4 is nice.
00:44
<@Alek>
note3 should be commercially available in the first few days of october.
00:45
<@Alek>
and we're getting a family plan with tmobile soon after.
00:45
<@Alek>
bro's definitely getting the note 3, I'm torn between that and the s4.
00:45
<@Alek>
but probably going for the note 3 too.
00:45
<@Alek>
definitely getting a toughsuit case. -_-
01:00 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Client closed the connection]
01:02
<@Reiv>
Alek: What's the timeframe till the new Nexus 10?
01:02
<@Reiv>
Given you're paying attention to it all.
01:06 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
01:13
<@Tarinaky>
ToxicFrog: Aurora.
01:13
<&ToxicFrog>
Tabletop or computer?
01:14
<@Tarinaky>
Computer.
01:14
<@Reiv>
Dwarf Fortress In Spaaaaace
01:14
<@Tarinaky>
It's more of a sandbox than a game though.
01:14
<@Reiv>
(Aaaand there goes TF down the rabbit hole for another week~)
01:14
<@Tarinaky>
Dwarf Fortress is easier :/
01:15
<@Tarinaky>
'Aurora 4X' is the recommended google search term.
01:16
<&ToxicFrog>
gameplay easier or UI easier?
01:16
<@Tarinaky>
UI.
01:16
<&ToxicFrog>
Because if it's the latter this may be a nonstarter
01:16 * AnnoDomini tries to determine why his application now crashes when the player name becomes a null-string, due to backspace-based deletion.
01:16
<@Tarinaky>
It's an abomination written in some horrible proto-VB.
01:17
<@Tarinaky>
The game's only system requirements is a screen resolution as the windows cannot be resized.
01:18
< AnnoDomini>
Are the horribly complex simulationist games like Aurora and DF coded in fairly ancient languages because they started coding them way back, or because the newer ones have too much overhead to run the simulations in reasonable time?
01:18
<@Tarinaky>
Aurora was written way back.
01:18
<&McMartin>
AnnoDomini: Some of it is also because the developers have varying degrees of insanity~
01:19
<@Tarinaky>
Originally, under a different name (Stevefire) it was a calculator for a tabletop game called Starfire.
01:19
< AnnoDomini>
I mean, trying to code something of the complexity of DF in Java might require future hardware for current needs.
01:19
<&McMartin>
Also, what proto-VBs are there that are not QBASIC
01:19
<@Tarinaky>
I think it's an early version of VB.
01:19
<&McMartin>
AnnoDomini: I doubt that, honestly
01:19
<@Tarinaky>
It was more to emphasise how awful it is.
01:19
<&McMartin>
Ah
01:19
<&ToxicFrog>
AnnoDomini: most of the problems with DF come from terrible algorithms.
01:19
<&McMartin>
AnnoDomini: DF-like things are one of the problem domains where Java and the JVM actually are very well-suited.
01:20
<@Tarinaky>
To make it worse, the original program was written as a learning exercise.
01:20
<@Tarinaky>
So I'm sure it's even worse.
01:20
<&McMartin>
JVM can do "large numbers of agents that don't interact much" at the vm-assembly level
01:20
<@Tarinaky>
That said. DF isn't written in an ancient language. C has never become obsolete.
01:20
< AnnoDomini>
DF is C++, IIRC.
01:20
<&McMartin>
But he shouldn't be writing it in C, nevertheless~
01:20
<&McMartin>
C++ makes more sense
01:21
<&ToxicFrog>
Despite the fact that C is still in active use, I am comfortable calling it ancient.
01:21
<@Tarinaky>
C++ has issues that deter many people.
01:21 * AnnoDomini finds C more approachable than C++.
01:21
<@Tarinaky>
C++ is a bit of a mess.
01:21
<&McMartin>
"a bit" >_>
01:21
<&ToxicFrog>
AnnoDomini: C++ is, in fact, made entirely of razor blades and hate
01:21
<&ToxicFrog>
So this is not surprising
01:22
<@Tarinaky>
C++ is easy if you approach it as writing C with classes that are really structs with some implicit pointers...
01:23
<@Tarinaky>
The STL and everything else is magic. Just learn the incantations~
01:23
<&McMartin>
Yeah, but if you do that you're missing half the reason to bother with C++ in the first place.
01:23
<&McMartin>
Er, to the first line
01:23
<&McMartin>
Yeah
01:23
<@Reiv>
Why *do* you bother with C++ instead of C?
01:23
<&McMartin>
"Access to Boost and the STL" are the two primary reasons to use C++
01:24
<&McMartin>
Compiles to native code, has an actual standard library that's worth anything
01:24
<@Tarinaky>
Classes... and the convenience of some STL invocations... plus Templates are good when you aren't being a spaz-monkey.
01:24
<@Tarinaky>
Never got into Boost though.
01:24
<@Tarinaky>
Boost was STL on drugs :/
01:24
<&ToxicFrog>
Reiv: because you need to emit machine code for some reason, but also want container types
01:24
<&McMartin>
I consider boost::shared_ptr<> to be a mandatory thing to use, and it is indeed in the language as of TR1~
01:24
<&McMartin>
boost::filesystem is also really nice for single-source multi-platform code
01:24
<@Tarinaky>
The standard library is a bit out of date now.
01:24
<&McMartin>
it is an unbelievable pain in the ass to portably flip through directories in C
01:25
<&ToxicFrog>
Tarinaky: without the need to emit native code, you get all of that only better in modern languages
01:25
<@Tarinaky>
ToxicFrog: I know. It's why I use Python almost exclusively.
01:26
<&McMartin>
C++ also has somewhat stronger typechecking than C
01:26
<&McMartin>
Though most C compilers have adapted to use C++ levels of checking with warnings instead of errors.
01:27
<@Tarinaky>
One of these days I need to actually look into learning D.
01:27
<&McMartin>
I need to sit down with a book on Scala at some point.
01:28
<@Tarinaky>
People, by which I mean beardy weirdies, are actually using it now.
01:28
<&ToxicFrog>
Tarinaky: not really, no. D is a nice idea crippled by a terrible toolchain and library.
01:28
<&ToxicFrog>
AFAIK, Go and Rust are seeing actual use in the space that D was meant to occupy.
01:29
<&McMartin>
Does Go see use outside of Google now?
01:29
<&McMartin>
I prodded some of the early alphas where the toolchain was a clear clone of Plan 9's, but
01:29
<@Tarinaky>
ToxicFrog: That /might/ change in the future though.
01:30
<@Tarinaky>
I only said I should learn it, not actually use it. :p
01:31
<&ToxicFrog>
McMartin: yes; there's an obsolete list at http://golang.cat-v.org/organizations-using-go
01:32
<&ToxicFrog>
Tarinaky: it might, but personally I would want to learn a language that's actually pleasant to use.
01:33
<@Reiv>
D? Go? Rust?
01:34
<&McMartin>
Go is a language Google developed to (if my external speculation is right) deal with performance issues Python has when you run it at Google-level scales.
01:34
<&McMartin>
But it's also closer to C++ than it is to Python, in terms of how it interacts with the system.
01:34
<&ToxicFrog>
McMartin: other way around. It was developed to deal with the programming issues C++ has.
01:34
<&ToxicFrog>
Which was already in heavy use for the stuff Python isn't fast enough for.
01:34 * McMartin nods
01:34
<&McMartin>
I based this on some of Pike's guest lectures at Stanford
01:35
<&McMartin>
Which were mostly about how the GIL ruins Fucking Everything, and here's a thing I can't name but our experiments show Vast Improvements
01:35
<&McMartin>
(And then a year later Go came out with Pike's name prominently attached nearby)
01:35 * ToxicFrog nods
01:36
<&ToxicFrog>
Reiv: D is/was a language designed to replace C++ for high performance systems programming with an actual modern language.
01:36
<&ToxicFrog>
With modern language features and stuff.
01:36
<&ToxicFrog>
And multiple, incomplete, mutually incompatible implementations of both the compiler and the standard library.
01:36
<&ToxicFrog>
Although I don't think that was meant to be part of the design.
01:36
<&McMartin>
Some sample ancient Go code I wrote to destructure Ultima 4 savegames:
01:36
<&McMartin>
https://hkn.eecs.berkeley.edu/~mcmartin/go/u4scan.go
01:37
<&McMartin>
No idea if it's even still valid.
01:37 ktemkin[awol] is now known as ktemkin
01:37
<&ToxicFrog>
Rust, AFAIK, is "Go, as developed by the Mozilla guys", but I haven't actually used it.
01:38
<@Reiv>
So they're attempts at "C++, only without the razorblades and hate"?
01:38
<&McMartin>
Sounds like.
01:39
<&McMartin>
Though Go has a few aspects that mean it doesn't directly compete with C++ everywhere
01:39
<&McMartin>
Most of the places it doesn't though are places where the problem is "look at these things uncut by razor blades"
01:40 * [R] wonders if Google killed Go! yet.
01:41
< [R]>
They at least made it hard to search for that language though.
01:42
<&ToxicFrog>
Use "golang"
01:42
<&ToxicFrog>
And no, it's still in use and supported internally.
01:42
< [R]>
ToxicFrog: that'll get me Go stuff. I'm talking about Go! here.
01:43
< [R]>
http://en.wikipedia.org/wiki/Go!_(programming_language)
01:44
< [R]>
Looks ugly a sin
01:47 Turaiel[Offline] is now known as Turaiel
01:50
< [R]>
Looks like Go! is dead anyways, download page doesn't work
01:51
<@Reiv>
If it wasn't dead, it would die swiftly when the name is stolen. >_>
01:55
<@Alek>
Reiv: no clue, I'm not paying attention to everything. XD
01:57
<@Reiv>
Alek: Do so!
01:57
<@Reiv>
I'm quite curious about it.
01:57
<@Alek>
GIYF
01:58
<@Reiv>
No, no.
01:58
<@Reiv>
I mean you should pay attention to it.
01:58
<@Reiv>
And my own stance is that I'm quite intrigued.
01:59
<@Alek>
har
01:59
<@Alek>
ok, a few looks say it's due around the same time, pretty much, as the Nexus 5 and android 4.4
01:59
<@Alek>
whenever that is.
02:04
<@Reiv>
Right.
02:04
<@Reiv>
The Nexus 5 is going to be interesting.
02:04
<@Reiv>
The gold standard for smartphones now is the S3/4 size/shape
02:04
<@Reiv>
So good odds it should end up similar, lest it lose the curve.
02:13 Turaiel is now known as Turaiel[Offline]
02:14 Turaiel[Offline] is now known as Turaiel
02:44 Vorntastic [Vorn@Nightstar-6af3b964.sub-70-211-2.myvzw.com] has joined #code
02:45 himi [fow035@Nightstar-36db723c.ffp.csiro.au] has joined #code
02:45 mode/#code [+o himi] by ChanServ
03:50 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
03:50 mode/#code [+qo Vornicus Vornicus] by ChanServ
03:56 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
04:01
<&ToxicFrog>
http://i.imgur.com/b9T8bz9.jpg
04:01
<&ToxicFrog>
WHAT
04:02
<&ToxicFrog>
Note: this is not, as far as I have been able to determine, a photoshop. It's legit.
04:02
< Turaiel>
That's depressing
04:02 Vorntastic [Vorn@Nightstar-6af3b964.sub-70-211-2.myvzw.com] has quit [[NS] Quit: Bye]
04:03
<~Vornicus>
That is depressing
04:04
<&McMartin>
And when you say "take this pull request and jam it back up the ass you clearly pulled it out of", we call that a github suppository.
04:06
<&McMartin>
That said, why is it coming up at all? Is Obama perhaps socialismizing your precious computer machines?
04:06 * Vornicus pokes at the commodore 64 basic terp to discover things, determines that this would be a lot easier with a map.
04:07
<&McMartin>
There's a website with PDFs of COMPUTE!'s old C64 books, including the superb "Mapping the Commodore 64"
04:07
<&McMartin>
I can dig up the link in a few hours after I eat and wrap up work.
04:07
<&McMartin>
That is the map you want though~
04:08
<~Vornicus>
http://unusedino.de/ec64/technical/project64/mapping_c64.html this it?
04:09
<&McMartin>
That's not the site, but that is the text.
04:09
<~Vornicus>
http://www.bombjack.org/commodore/books.htm is this the site?
04:09
<&McMartin>
No
04:09
<&McMartin>
I have it bookmarked at home, I'll call it up there.
04:09
<~Vornicus>
ok
04:09
<&McMartin>
It had c128 in the URL and was IIRC a .co.uk domain
04:10
<~Vornicus>
(we were having a discussion on freenode/##math about how early computers implemented arctan)
04:11
<~Vornicus>
(I found myself wondering how the c64 did it)
04:12
<&McMartin>
Routine address: $E30E
04:13
<&McMartin>
Likes like "by evaluating a twelve-term polynomial"
04:15
<~Vornicus>
That's actually considerably higher quality than I expected.
04:21 * McMartin eyes other parts of that, becuase it contradicts some experiments being done elsenet
04:22
<&McMartin>
Nick Montfort has been trying to code-golf in C64 BASIC, which has led to a number of wacky excursions
04:22
<&McMartin>
But this version of Mapping says that the screen color RAM is cleared to background color whenever the screen is cleared, and it's very clearly being cleared to foreground color in the version we're using.
04:22
<~Vornicus>
actually I now wonder the values of those coefficients; arctan being an odd function has zeros for the coefficients of its even polynomial terms
04:23
<&McMartin>
Those constants have their locations identified in your link
04:23
<&McMartin>
But they're the weird 5-byte floating point format that nobody else uses anywhere
04:23
<&McMartin>
The format for that should be somewhere else in the document.
04:23
<~Vornicus>
Right, I was about to ask a question regarding that, namely can I get the c64 to tell me the value of the fp thing at a pointer
04:24
<&McMartin>
Probably not without hand-copying it to FAC1 and then SYSing to "print this fp number"
04:25
<~Vornicus>
Or possibly hand-copying to a named variable location, but
04:25
<~Vornicus>
Another thing I wonder is if, for large numbers, it takes the reciprocal first.
04:27
<~Vornicus>
So now I have to go looking at that stuff to see what I can find out.
04:29
<&McMartin>
Meanwhile, I'm marking these for future reference: $BBA2, $BDDD
04:30
<&McMartin>
Also $BDCD
04:31
<&McMartin>
The first two I think will let me write a program that dumps these tables
04:31
<&McMartin>
The latter will let me improve some of the code in the Ophis samples.
04:36
<~Vornicus>
Man I haven't done real c64 stuff in so long.
04:36 Kindamoody[zZz] is now known as Kindamoody
04:37
< Xon>
gah at this coworker. Lets do a massive change on a code-path used by everything and take a week todo it and then bitch when people need to check in breaking changes to fix business logic
04:37
< Xon>
and now they have conflicts
04:54
<&McMartin>
OK, this is completely, wildly untested, but
04:54
<&McMartin>
10 for i=0 to 13:read a:poke 49152+i,a:next
04:54
<&McMartin>
20 input "address (0 to quit)";x
04:54
<&McMartin>
30 if x=0 then 90
04:54
<&McMartin>
40 xh=int(x/256):xl=x-xh*256:poke 49153,xl:poke 49155,xh
04:54
<&McMartin>
50 sys 49152:goto 20
04:54
<&McMartin>
90 print "ok, bye!":end
04:54
<&McMartin>
100 data 169,0,160,0,32,162,187,32,221,189,32,30,171,96
04:56
<~Vornicus>
So that should dump an individual 5-byte float?
04:56 Turaiel [Brandon@Nightstar-949d7402.resnet.mtu.edu] has quit [Operation timed out]
04:56
<&McMartin>
Yeah
04:56
<&McMartin>
I don't know about newlines.
04:57
<&McMartin>
But passing it 58085 ought to dump 2pi.
04:57
<~Vornicus>
holy shit man
04:58
<&McMartin>
Wait, have you already tried it, or are you just boggling that I'd draft that fast
04:58
<~Vornicus>
The fast draft. In particular the machine language there
04:59
<~Vornicus>
um. apparently my emulator uses the c64 keyboard and I don't know where things are on it.
05:00
<&McMartin>
That involved drafting it in Ophis, dumping it to stdout, piping that through hexdump, and then using a python string comprehension to give me a c&p-able data statement.
05:00
<&McMartin>
Alt-Insert is paste if you're using VICE on Windows.
05:01
<&McMartin>
(the machine language is "LDA immediate, LDY immediate" and then three JSRs to "copy floating point from .AY to FAC1", "Convert FAC1 to ASCII String", and "Print ASCII string"
05:01
<&McMartin>
It's not clear to me that steps 2 and 3 there actually link the way it looks like they'd link.)
05:04 Turaiel [Brandon@Nightstar-949d7402.resnet.mtu.edu] has joined #code
05:07
<~Vornicus>
Worky.
05:07
<~Vornicus>
But yeah, no newline
05:08
<&McMartin>
Change 50 to 50 sys 49152:print:goto 20
05:08
<&McMartin>
Anyway, there you go
05:09
<&McMartin>
Heading home now.
05:09
<&McMartin>
That mapping the c64 link you gave before gives the addresses of the series coefficients
05:09
<&McMartin>
Search for ATN
05:09
<&McMartin>
May take several times
05:09
<~Vornicus>
Thank you very much, this is awesome
05:10
<&McMartin>
Also holy shit I just wrote an ML program that uses the BASIC ROM like libc
05:10
<&McMartin>
A *self-modifying* BASIC/ML combo program, no less
05:10
<~Vornicus>
Yeah, I have the constant locations but it seems to be, um... something. I haven't quite gotten it under control yet
05:11
<&McMartin>
Note that you have to bump up a byte because the first byte is "here's how big the thing is"
05:11
<&McMartin>
Er, how big the series is, rather
05:11
<&McMartin>
Heading home now, will play more with this later
05:11
<&McMartin>
I still need to get my CHAIN program working.
05:11
<~Vornicus>
I got that part, sort of, but the number I got surprises and dismays me.
05:12
<&McMartin>
Mlergh.
05:13
<~Vornicus>
Ah, okay, under control.
05:13
<~Vornicus>
Sort of.
05:13
<~Vornicus>
Looks like it's got the higher order terms first, though the numbers are still surprising down there.
05:15
<~Vornicus>
but like 58025, the last one, is clearly -1/3, and 58020 is +1/5, and that looks to stay the way it should be down to 1/11, but from there it's starting to look a smidge strange.
05:20 Derakon is now known as Derakon[AFK]
05:23
<~Vornicus>
okay. Now that I've got those numbers -- surprising as the higher order terms are (I was expecting -1/23 ~= -0.0434 and getting -1/1460) -- I can see about how atan does its stuff there.
05:31
<&McMartin>
And back
05:32
<~Vornicus>
Wiblets
05:32
<&McMartin>
OK, now to get this program into a petcattable mode.
05:40
<&McMartin>
http://pastebin.ubuntu.com/6100109/
05:40 ErikMesoy|sleep is now known as ErikMesoy
05:40
<&McMartin>
This can be both petcatted and copy-pasted
05:42
<~Vornicus>
petcat is, what, a thing that loads a basic program from a text file?
05:42
<&McMartin>
Or vice versa
05:42
<&McMartin>
It's a BASIC tokenizer/detokenizer
05:43
<~Vornicus>
aha
05:43
<&McMartin>
And will do things like convert ASCII strings like {clr} into PETSCII 147
05:43
<&McMartin>
I decided to use chr$(147) for this so that you could copy-paste it as well as petcat it.
05:44
<~Vornicus>
Nice.
05:44
<&McMartin>
PETSCII<->ASCII conversions (most of which involve {}, which PETSCII lacks) are the main draw, though
05:44
<&McMartin>
And you also thus get the finest stream converter ever
05:44
<&McMartin>
"petcat"
05:46
<~Vornicus>
It is a fine name.
05:51 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.]
05:52
<&McMartin>
While we're at it, any surprises in the SIN/COS tables?
05:53
<~Vornicus>
let me check.
05:54 ktemkin is now known as ktemkin[awol]
05:54 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code
06:00
<~Vornicus>
...All of them are surprising.
06:01
<~Vornicus>
I mean I recognize one of them - SINCON[5] is 2pi; the others are beyond my knowledge.
06:02 * McMartin has a thought
06:02
<~Vornicus>
for one thing they're all between 14 and 82; I was expecting (if it were the taylor series) numbers like 1/2, 1/6, 1/24.
06:05
<&McMartin>
Mmm, and it does specify radians, yeah
06:06 Turaiel is now known as Turaiel[Offline]
06:06
<~Vornicus>
If it were degrees the taylor numbers would be even smaller.
06:17
<~Vornicus>
So basically I look at the data listed and have to wonder what's in the actual code for these things, because the numbers, they do not make sense.
06:21
<~Vornicus>
Which means I get to do some disassembling! yay!
06:34
<&McMartin>
Oh wait, this is doable in pure BASIC
06:35
<~Vornicus>
I suspected you could, like, move the thing over to a named variable with some peeks & pokes but I'm not sure how that would work.
06:42
<&McMartin>
I forgot that the FP accumulator gets trashed
06:42
<&McMartin>
But you can do it in six bytes and make it a straight FP PEEK called with USR() instead of SYS, I think.
07:01
<&McMartin>
Yeah, OK, here we go.
07:01
<&McMartin>
10 for i=0 to 9:read a:poke 49152+i,a:next:poke 785,0:poke 786,192
07:01
<&McMartin>
20 data 32,247,183,165,20,164,21,76,162,187
07:01
<&McMartin>
Run that and then you can say PRINT USR(58085) and get back 6.28318531.
07:04
<&McMartin>
Then there is this madness, which directly hacks the BASIC variable store: http://pastebin.com/WXYjC5wp
07:04
<~Vornicus>
Which is what I thought a BASIC version would have to do.
07:08
<&McMartin>
That guy made a mk2 that was what I would have normally preferred instead of going self-modifying: http://pastebin.com/Rrv5Lfjj
07:08
<&McMartin>
I've learned a few new tricks tonight.
07:10
<&McMartin>
Also, I'd forgotten in my version that you can turn JSR X; RTS into JMP X and this is pure improvement
07:10
<~Vornicus>
what's RTS?
07:11
<~Vornicus>
oh, return
07:11
<~Vornicus>
Right, so jmp x would simply let the subroutine's rts do the task.
07:35
< Xires>
happy programmer's day
07:35
<&McMartin>
Vornicus: It's tail call elimination!
07:44
<~Vornicus>
Exactly
07:44
<~Vornicus>
Why is it programmer's day now?
07:47
< Xires>
Vornicus; http://en.wikipedia.org/wiki/Programmers%27_Day
07:47
< Xires>
not a leap-year
07:48
< Xires>
Fri Sep 13 01:47:59 CDT 2013
07:49
<~Vornicus>
ah so
07:49
<~Vornicus>
wait
07:50
<~Vornicus>
I find this kind of odd actually but it's using 1-indexing :P
07:52
< Xires>
I think it was meant to be based simply on Julian date
08:20 cpux|2 [cpux@Nightstar-98762b0f.dyn.optonline.net] has quit [Client closed the connection]
08:32 celticminstrel is now known as celmin|Zzzzzz
08:48 Azash [ap@Nightstar-339920e6.net] has quit [Operation timed out]
09:01 himi [fow035@Nightstar-36db723c.ffp.csiro.au] has quit [Operation timed out]
09:03 Kindamoody is now known as Kindamoody|out
09:09 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
11:39 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
11:39 mode/#code [+o himi] by ChanServ
12:50 Vornicus is now known as Vash
13:49
<@gnolam>
https://twitter.com/Huth/status/378306063520374784/photo/1
14:16 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
14:23 Turaiel[Offline] is now known as Turaiel
14:51 Vash [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ]
15:27
<@TheWatcher>
gnolam: ...
15:28
<@TheWatcher>
Great
15:30
<@TheWatcher>
Now I'm going to have to resist the urge to tell people in work that I'm giving this codebase a good forking.
15:39 thalass [thalass@C2A270.1179B7.313116.B35A21] has joined #code
15:44
< thalass>
Man, the company i work for has been trialling various tablets in an effort to provide us with portable manuals (since the dead tree format books have been made obsolete), and they've all been crap.
15:45
< Syka>
nexus 7 bro
15:46
< thalass>
And i keep thinking: "Man, if you took a nexux 10, with a heavily customised version of AOSP Android (no gapps, nfc login with different user account types, etc) you could replace all the paper with a system for manuals, task cards, defect logs, and everything, and with NFC we could sign things with our ID cards - just like we buzz through doors.
15:46
< thalass>
And i wish i had the code-fu to actually do it. :P
15:48
< thalass>
Nexus 10 would work better, i think, for the wiring manuals and the fact that most of the people here are old. :P Also: Since they're all old they'll need a simple user interface that has contrasting colours and obvious labelling. Like a LCARS interface.
15:48
< thalass>
I always wanted to be like Geordie LaForge.
15:49 Turaiel is now known as Turaiel[Offline]
15:49
< thalass>
augh back to work.
15:53 thalass [thalass@C2A270.1179B7.313116.B35A21] has quit [Ping timeout: 121 seconds]
16:00 celmin|Zzzzzz [celticminst@Nightstar-ae361035.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
16:15
< ErikMesoy>
My mother just got a call from someone claiming to be affiliated with "the technical department of computers".
16:16
< ErikMesoy>
She asked WTF, and got "We are calling about your windows computer." She told them not to call again and put the phone down.
16:16
< ErikMesoy>
Now, it's true that my mother has a computer running Windows 8, but would any serious organization ever call itself Technical Department of Computers?
16:23 Azash [ap@Nightstar-339920e6.net] has joined #code
16:24 mode/#code [+o Azash] by ChanServ
16:24 * Azash returns from the realm of HEEETZZZNEEERRRRR
16:25 Turaiel[Offline] is now known as Turaiel
16:30
<&ToxicFrog>
ErikMesoy: and yet, that works frequently enough that it's profitable for them to continue doing this
16:31
< Syka>
ErikMesoy: yes
16:31
< Syka>
ErikMesoy: possibly the germans
17:12 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code
17:12 mode/#code [+ao Derakon Derakon] by ChanServ
17:12 * Derakon eyes MicroManager.
17:12
<&Derakon>
MM is a microscope framework.
17:13
<&Derakon>
You're supposed to be able to plug in all kinds of hardware devices and control them through a generic interface.
17:13
<&Derakon>
Mostly this involves getting and setting property values on those bits of hardware.
17:13
<&Derakon>
Thus...
17:13
<&Derakon>
>>> MMCore.getProperty('evolveCamera', 'FTCapable')
17:13
<&Derakon>
'Yes'
17:14
<&Derakon>
Couldn't even be "True"; it had to be the string "Yes". >.<
17:17 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
17:17 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
17:17 mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ
17:31
<&Derakon>
Man, what the hell; MicroManager appears to be hard-coded to use only one camera at a time. You have to use special plugins if you want multiple cameras. O_o
17:39 Turaiel is now known as Turaiel[Offline]
18:01 AnnoDomini is now known as Wires
18:05 Kindamoody|out is now known as Kindamoody
18:08 thalass [thalass@C2A270.CAA584.F46356.2B2C1C] has joined #code
18:12 * ErikMesoy glares at RPG Maker. Event commands: "Erase Event" looks like the thing I want to do for a single-use event, right?
18:12
< ErikMesoy>
Wrong. "Erase Event" actually means "Temporarily remove event until player leaves area and returns".
18:14 thalass [thalass@C2A270.CAA584.F46356.2B2C1C] has quit [[NS] Quit: laters folks. ]
18:20
<@Tarinaky>
You want to use Switches and Variables.
18:20
<@Tarinaky>
You always want to use Switches and Variables.
18:20
<@Tarinaky>
For everything.
18:21
<@Tarinaky>
If it's anything like older versions those're the code features every project's sphegetti is made from.
18:22
< ErikMesoy>
Yep. I want to make the event end in "Set Self Switch A" and then have a page with "If Self Switch A is set, do nothing".
18:45 celticminstrel [celticminst@Nightstar-ae361035.dsl.bell.ca] has joined #code
18:45 mode/#code [+o celticminstrel] by ChanServ
18:56
<&ToxicFrog>
This sounds like a good argument to write something that compiles to RPGM.
18:56
<&ToxicFrog>
Or just not use RPGM~
19:21 Kindamoody is now known as Kindamoody[zZz]
19:34
< ErikMesoy>
ToxicFrog: I have tried writing my own game engine and user interface, you may recall me asking about what interface to use here a while ago and then settling on wxPython after screwing around with tkinter and whatnot.
19:35
< ErikMesoy>
I do not have enough customization I want to do yet to prefer that engine over RPG Maker.
19:48
<@Tarinaky>
The main thing RPG maker lacked was decent Namespacing.
19:48
<@Tarinaky>
So you'd do things like have 'spacer' entries in the database that made it an absolute nightmare if you wanted to add more entries than you planned for.
20:01
< ErikMesoy>
Yeah. Something like 100 global booleans, 100 global variables, and every NPC/event/interactable has its own 4 internal booleans.
20:02
<@Tarinaky>
Ah, they didn't used to have that.
20:02 * Tarinaky hasn;t touched RPG Maker since RPGM 2000
20:03
<&Derakon>
Bleh, MicroManager does not provide the kind of low-level control over devices that I want. >.<
20:03
< ErikMesoy>
Still, 100 global variables (that can be string or number) is pretty good for most purposes, and you can kludge some extra quasi-storage in the form of giving the player an item and checking if the player has that item.
20:03
<&Derakon>
I already have a perfectly good hardware abstraction layer! It makes fewer assumptions than yours does, even!
20:04
<&Derakon>
It just doesn't have the same level of hardware support in terms of specific devices.
20:04
<@Tarinaky>
ErikMesoy: http://www.vgcats.com/comics/?strip_id=47
20:05
< ErikMesoy>
And this is abusable with poorly programmed pickpocketing?
20:11
<@Namegduf>
I think it was a suggestion.
20:13
< ErikMesoy>
If you want to be silly, there is a third way in RPG Maker. (And probably more that I have yet to discover.) As an alternative to both variable and item, create a party member like "Tommy's Undead Corpse", and check for that.
20:14
< ErikMesoy>
This is the sort of thing you get when you can't write generic conditionals, only check for specific things. :P
20:28 celticminstrel [celticminst@Nightstar-ae361035.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
20:28 celticminstrel [celticminst@Nightstar-ae361035.dsl.bell.ca] has joined #code
20:28 mode/#code [+o celticminstrel] by ChanServ
20:39 Turaiel[Offline] is now known as Turaiel
21:58
<&Derakon>
Bleh, just because a device is a StageDevice does not mean it has the Position attribute, apparently.
22:19
<@Tarinaky>
ErikMesoy: iirc, in NWN you cna mark stuff as being un-pick-pocket-able... I think.
22:22
<&McMartin>
I worked out how to do relocatable BASIC programs on the C64, so you can run one program that copies a BASIC program into place and machine language support routines somewhere else and then transfer control to the BASIC program as if you loaded it in the first place.
22:22
<&McMartin>
This involves stuffing the keybord buffer with "RUN<enter>" and then simulating a RUN-STOP/RESTORE.
22:27 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
22:27 mode/#code [+qo Vornicus Vornicus] by ChanServ
22:27
<&Derakon>
;_;
22:28
<&Derakon>
Is there some reason why the code that RUN/STOP/RESTORE normally invoke had to be accessed by way of the keyboard?
22:28
<&McMartin>
Oh.
22:28
<&McMartin>
It's the other way around.
22:28
<&McMartin>
the RESTORE key was actually wired directly to the NMI interrupt pin.
22:28
<&McMartin>
I just jumped to BASIC Warm Start.
22:29 * TheWatcher is writing support documentation for students, has just done 'if($result = $mysqli -> query("SELECT * FROM Things")) {'
22:29
<&McMartin>
(The NMI checked to see if RUN-STOP was also pressed and if it was jumped to that vector)
22:29
<@TheWatcher>
Previous line?
22:29
<@TheWatcher>
"// SELECT ALL THE THINGS"
22:30
<&McMartin>
As for "why do that instead of, like, beginning to to run the program", it's because you got to this relocation routine from a BASIC program that has just been trashed by the link, so I need to clear out its stack and execution state.
22:30
<&Derakon>
I think I lack the necessary low-level brain for this at the moment, alas.
22:30
<&Derakon>
I'm just sitting here going "buh?"
22:30
< ErikMesoy>
Things?
22:31
<&Derakon>
And it's not because you're explaining poorly; I'm just nearing the end of a day without glasses, and it turns out a lot of extra brainpower has to be devoted to interpreting images when they're unaccountably blurry.
22:31
<&McMartin>
Derakon: Well, OK, then, the short answer is "simulate a RUN-STOP/RESTORE is one assembler instruction"
22:32 * Vornicus has completed his second blogthing post on Klotski solving. Now, with actual solving! But it doesn't actually print the solution yet.
22:33
<~Vornicus>
McM: re: stuffing the keyboard buffer: Crazy evil.
22:34
<&Derakon>
Vorn: it turns out that many interesting problems in CS require you to do things normally considered quite evil.
22:34
<&Derakon>
See also the gobs of introspection used to [de]serialize Pyrel game state.
22:34 * McMartin stole that particular technique from an old implementation of what GW-BASIC called CHAIN.
22:35
<&McMartin>
But that one was transferring control from machine language to BASIC without already being in the middle of a BASIC program.
22:36
<@TheWatcher>
Yes, Things.
22:36
<&McMartin>
So that meant that it was actually able to just relinquish control with RTS
22:36 Wires is now known as AnnoDomini
22:36
<&McMartin>
If I did that it would still remember that it was supposed to be on line 20 now and wtf what has happened to my RAM
22:37 * Derakon is idly reminded that, when he was a kid, he used to wonder how many floppy disks you'd have to go through before, by simply scrambling the data on them at random, you came up with a disk that had a program on it that was the World's Most Awesome Game.
22:38
<&Derakon>
I think I dimly understood that it was way more than enough to make trying to do so unrealistic.
22:38
<~Vornicus>
well, at 360 kB a side, that's 256 ^ 360,000
22:39
<&McMartin>
This assumes you can fit the World's Most Awesome Game into 360KB
22:39
<&Derakon>
Well, that was my experience with videogames at the time, so I think that's a safe assumption~
22:39
<&Derakon>
I wasn't asking for 3D or mouse control or any of that stuff because I had no idea what those were.
22:40
< Syka>
i would guess you knew what 3D was
22:40
< Syka>
...unless you lived in chalkzone
22:40
< Syka>
:P
22:40
<&Derakon>
As a videogame concept? No.
22:40
<&Derakon>
I was under 10 years old at the time.
22:49 ErikMesoy is now known as ErikMesoy|sleep
22:52 * Derakon eyes the TASVideos forums.
22:53
<&Derakon>
A poster has been complaining about wanting to be able to control FCEUX (an NES emulator) through his language of choice, rather than the builting Lua scripting.
22:53
<&Derakon>
We've managed to convince him that this isn't likely to change, fortunately.
22:53
<&Derakon>
He just made a post to the effects of "Has anyone thought of using A* pathfinding to solve games?!!1"
22:54
<&Derakon>
If that's what he wanted emulator control for...ehhh, sorry kid.
22:54
<~Vornicus>
Heh
22:54
<&Derakon>
(An NES has 8 inputs, not counting reset or the second controller. In 60 frames that means about 1.5 * 10^54 possible states, and they aren't going to be anywhere near as many options for pruning redundant elements as you'd like there to be...)
22:55
<&McMartin>
Derakon: Isn't the actual answer to this "yes, see basically every single TAS here that has 'luck manipulation' as a component"
22:55
<&Derakon>
That's not really the same thing.
22:56
<&McMartin>
Well, it's not A*, no.
22:56
<&Derakon>
For one thing, he's talking about solving entire levels of 2D platforming games.
22:56
<&Derakon>
For another, a lot of luck manipulation is done manually.
22:56
<&Derakon>
Identify the RNG state you need, figure out how many RNG invocations in the future that is, then determine a way to use up the right number of RNs in the right amount of time.
22:57
<&Derakon>
It's only for the runs that are nothing but luck manipulation (c.f. Monopoly, King's Bounty) that the bots start becoming necessary.
22:57
<&Derakon>
IIRC King's Bounty had something like 10-20 frames that were entirely botted.
22:59
<&Derakon>
Anyway, I'ma vanish now.
22:59 Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [[NS] Quit: leaving]
--- Log closed Sat Sep 14 00:00:38 2013
code logs -> 2013 -> Fri, 13 Sep 2013< code.20130912.log - code.20130914.log >

[ Latest log file ]