code logs -> 2014 -> Sun, 11 May 2014< code.20140510.log - code.20140512.log >
--- Log opened Sun May 11 00:00:02 2014
00:08
<@AnnoDomini>
Hmm. 2D arithmetic. I want to adjust the length of a vector by adjusting its two parameters, but I want it still pointed in the same direction. How?
00:08
<~Vornicus>
In component form, multiply each component by new_length / old_length
00:09
<~Vornicus>
in direction-length form it's a little more obvious, but you usually don't keep vectors in that form.
00:09
<~Vornicus>
(current length is sqrt(sum(x^2 for x in components))
00:09
<&McMartin>
... make sure old-length isn't 0
00:09
<~Vornicus>
(of course a vector of length 0 has no direction)
00:12
<&McMartin>
Yeah, but your argument to scale-magnitude will be length 0 organically the first time you try it for real~
00:13 * McMartin dials up his INT and dials down his SAN.
00:13
<&McMartin>
It's time for project libc64basic.
00:13
<&McMartin>
All the prerequisites have been met.
00:14
<@TheWatcher>
MADNESS
00:15
<&Derakon>
Oh dear.
00:15
<&McMartin>
Last night I managed to hook the system clock into BASIC's subsystem and use it to seed its randomizer.
00:15
<&McMartin>
I think I now have from Mapping all the addresses to properly hijack the floating point routines from the BASIC ROM
00:16
<&McMartin>
... and as long as you are doing that you might as well *also* lift out all the trig functions &c.
00:16
<&Derakon>
...BASIC has floating point routines?
00:16
<&McMartin>
Yeah, pretty much every BASIC ever is floating point everywhere by default.
00:16
<&Derakon>
...and trig?
00:16
<&Derakon>
Weird.
00:16
<&Derakon>
I wouldn't have thought the C64 would have an FPU.
00:16
<&McMartin>
It doesn't.
00:16
<&Derakon>
So it's all done in software?
00:16
<&McMartin>
That's why it's all in the BASIC ROM.
00:16
<&McMartin>
Yeah.
00:16
<&Derakon>
...right, okay.
00:16
<&Derakon>
Still, that can't be cheap cycles-wise.
00:17
<&McMartin>
The prereqs were "find the addresses that do the FP stuff"
00:17
<&McMartin>
Yeah.
00:17 BossMan [Sarge@Nightstar-htt.c9j.196.74.IP] has joined #code
00:17 BossMan [Sarge@Nightstar-htt.c9j.196.74.IP] has left #code ["http://quassel-irc.org - Chat comfortably. Anywhere."]
00:17
<&McMartin>
The difference between BASIC and ML in C64 stuff for "ordinary" things you do in ML is on the order of tens of thousands of times
00:17
<&Derakon>
Parse error.
00:17
<&Derakon>
What?
00:17
<&McMartin>
Write a program in ML
00:18
<&McMartin>
Write a logically similar program in BASIC
00:18
<@celticminstrel>
10000 times faster?
00:18
<&McMartin>
The BASIC program is tens of thousands of times slower.
00:18
<@celticminstrel>
The ML one.
00:18
<&Derakon>
Righto.
00:18
<@celticminstrel>
That's what I thought he said.
00:18
<&McMartin>
As in "copy 2K of RAM from one place to another" is 30 seconds in basic and less than a frame in ML.
00:19
<&McMartin>
But it doesn't keep an AST either, so it's reparsing each statement each time, too
00:19
<&McMartin>
And running a garbage collector, and keeping all variables in dynamic storage
00:19
<&McMartin>
There's a lot going on in these 6K.
00:19
<&McMartin>
One of the things I'm curious about is if it's the FP that slows it down or the interpretation.
00:20
<&McMartin>
Yeah, FP is work, but it should only be like factor-of-ten work, and even there
00:20
<&McMartin>
The C64 CPU not only doesn't have an FPU
00:20
<&McMartin>
It doesn't have a multiplier.
00:21
<&McMartin>
Step 1 is basically "compile addresses and maybe write a few support routines into a library that lets you link the BASIC ROM as a useful run-time library"
00:21
<&McMartin>
Step 2 is probably going to be "repurpose one of the seven or eight expression parsers I've collected over the years into a proper formula translator for when you need to Math in an ML program"
00:23
<&McMartin>
Unless that's step 3. Which ever of the three steps that isn't, the *other* step is probably "turn Hammurabi into machine code as a proof-of-concept of whichever step was the previous one"
00:36
<@AnnoDomini>
Whee! https://www.youtube.com/watch?v=BTK0_HCdowU&feature=youtu.be
00:37
<&Derakon>
Anno: in Escape Velocity, that's what ships looked like when they were fighting.
00:37
<&Derakon>
Since the AI was "point at other ship, fire engines, fire weapons when in range".
00:38
<@Tarinaky>
Argh. I fucking hate it when this happens.
00:38
<&Derakon>
So they'd just do passes back and forth until the one with a worse shields/weaponry setup fell over.
00:45
<@AnnoDomini>
I'm pretty happy with getting that much. It's only been a couple hours work on spacecraft and their movings about.
00:50 JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
00:53
<@AnnoDomini>
Speed restriction! https://www.youtube.com/watch?v=tPahktXZlnU&feature=youtu.be
00:55 Orthia [orthianz@Nightstar-3tp.juj.184.203.IP] has quit [Ping timeout: 121 seconds]
00:56 Orthia [orthianz@Nightstar-3tp.juj.184.203.IP] has joined #code
00:56 mode/#code [+o Orthia] by ChanServ
01:19
<@AnnoDomini>
Now it sorta follows orders sequentially! https://www.youtube.com/watch?v=-T-RVT2GEN0&feature=youtu.be
01:24 * McMartin thinks he's got these functions all compiled, in the non-computer sense of compiled.
01:54 You're now known as TheWatcher[T-2]
02:01 You're now known as TheWatcher[zZzZ]
02:03
<&McMartin>
Man. Hammurabi has a lot of text.
02:07
<&McMartin>
Well. I guess 1.5KB is "a lot".
02:08
<~Vornicus>
600 more of those and you've got Crime & Punishment
02:09
<&McMartin>
Hee
02:18 Orthia [orthianz@Nightstar-3tp.juj.184.203.IP] has quit [[NS] Quit: Going dooooown...]
02:44 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has quit [Ping timeout: 121 seconds]
02:46 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has joined #code
02:58 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has quit [Ping timeout: 121 seconds]
03:00 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has joined #code
03:08 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has quit [Ping timeout: 121 seconds]
03:17 Ghozer [fake@Nightstar-n14bla.sfldmi.ameritech.net] has joined #code
03:18 HotShot [fake@Nightstar-gai09u.sfldmi.sbcglobal.net] has quit [Ping timeout: 121 seconds]
03:22 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has joined #code
03:35 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has quit [Ping timeout: 121 seconds]
03:37 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has joined #code
03:43 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has quit [Ping timeout: 121 seconds]
03:44 Orthia [orthianz@Nightstar-3tp.juj.184.203.IP] has joined #code
03:44 mode/#code [+o Orthia] by ChanServ
03:45 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has joined #code
03:54 Orthia [orthianz@Nightstar-3tp.juj.184.203.IP] has quit [Ping timeout: 121 seconds]
03:56 Orthia [orthianz@Nightstar-3tp.juj.184.203.IP] has joined #code
03:56 mode/#code [+o Orthia] by ChanServ
04:07 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has quit [Ping timeout: 121 seconds]
04:08 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has joined #code
04:15 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has quit [Ping timeout: 121 seconds]
04:16 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has joined #code
04:22 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has quit [Operation timed out]
04:25 Turaiel[Offline] [Brandon@Nightstar-5st1eu.mi.comcast.net] has joined #code
04:26 macdjord [macdjord@Nightstar-7rac1r.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
04:32 macdjord [macdjord@Nightstar-7rac1r.mc.videotron.ca] has joined #code
04:32 mode/#code [+o macdjord] by ChanServ
04:44
< luke>
So, I need to convert latitude/longitude pairs to the name of the country they fall in. Only catch is, every library out there seems to connect to a remote server, and I need this to work locally. Does anyone know of a (preferably Python) library, and a data set to go with it?
04:46
<~Vornicus>
I went hunting once for such a dataset.
04:47
<~Vornicus>
It was amazingly hard.
04:53
< luke>
http://stackoverflow.com/questions/3643929/lookup-country-for-gps-coordinates-wi thout-internet-access This looks promising,
04:59 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
05:03 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
05:12 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
05:12 mode/#code [+o himi] by ChanServ
05:16 Derakon is now known as Derakon[AFK]
05:24 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
05:36 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
05:36 mode/#code [+o himi] by ChanServ
05:44 Ghozer is now known as HotShot
06:06 RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has quit [[NS] Quit: Gone.]
06:08 Typherix [Typherix@Nightstar-n91qrf.lnngmi.sbcglobal.net] has joined #code
06:09 Typherix [Typherix@Nightstar-n91qrf.lnngmi.sbcglobal.net] has quit [Connection closed]
06:09 Typherix [Typherix@Nightstar-n91qrf.lnngmi.sbcglobal.net] has joined #code
06:09 RchrdB [RichardB@Nightstar-c6u.vd5.170.83.IP] has joined #code
06:24 ErikMesoy [Erik@Nightstar-6v0.mal.203.80.IP] has quit [Ping timeout: 121 seconds]
06:24 ErikMesoy [Erik@Nightstar-t5i7tl.80-203-18.nextgentel.com] has joined #code
06:29
<&McMartin>
Things that are hard to reimplement: the INPUT statement.
06:29
<&McMartin>
Fortunately, I don't need to let the user input fractions or negative numbers.
06:30
< luke>
INPUT? Is this for your BASIC you were talking about before?
06:30
<&McMartin>
Yeah. It turns out some of my conjecture was wrong, and I don't have an easy way to go string->floating point while bypassing the BASIC's string libraries.
06:31
<&McMartin>
(Which I don't want to deal with because that will also involve tying in its variable and garbage collection systems, which I explicitly want to keep out of this mess)
06:31
<&McMartin>
But my floating point macros are working great
06:32
<~Vornicus>
Is it just me or does it seem like BASIC is not only slow, but a lot slower than it should be?
06:32
<@macdjord>
It's BASIC~
06:32
< luke>
If you do it right, it can be reasonably fast.
06:32
<&McMartin>
I am coming to the conclusion that the 8-bit MS Basic was written for the express purpose of being implemented in as small a space as possible.
06:33
<&McMartin>
In particular, they wanted to fit the whole thing - including the dynamic variable heap and the garbage collector &c &c - into 4K.
06:33
<&McMartin>
They didn't *quite* make it, but all the spillover is stuff like trig functions.
06:33
< luke>
I think I'll stick with my QuickBasic.
06:33 * macdjord idly notes that McM is the only person he knows to use the '&c' contruction.
06:33
<&McMartin>
Yeah, by the time you get to QBASIC you're in the realm of Totally Fine.
06:34
<&McMartin>
QB64 is AIUI an Actually Pretty Great Code Generator.
06:34
<&McMartin>
Vornicus: Anyway, the flip side of this is lots of "unnecessary" recomputation because they didn't want to spend the RAM to cache stuff
06:34
< luke>
Funny you should mention QB64. I'm wrestling with it right now.
06:34
<&McMartin>
Nothing is ever transformed except as a temp value
06:35
<&McMartin>
luke: I will admit to never getting it working myself, just seeing the end results
06:35
<&McMartin>
And basically going "yep, looks legit"
06:35
<&McMartin>
By which I also *really* mean "replaying GORILLAS.BAS"
06:38
<&McMartin>
Anyway, I'm not writing in BASIC. I'm writing in a macro assembler, and using the BASIC ROM as some kind of demented libc.
06:40
< luke>
That is indeed twisted.
07:04
<&McMartin>
I'm up to a full kilobyte of code
07:08
<@macdjord>
...
07:09
<@macdjord>
A /whole kilobyte/.
07:10
< luke>
https://xkcd.com/394/ But which kilobyte is it?
07:16
<&McMartin>
macdjord: With the data in, it's pushing 3!
07:16
<&McMartin>
This is kind of a big deal; the largest retroprogram I've ever written was 6.
07:16
<&McMartin>
And it was extremely wasteful with data storage.
07:28 mode/#code [+o ErikMesoy] by ChanServ
07:29
<&McMartin>
1253 code, 1734 data
07:32 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
07:40
<&McMartin>
(At 1,238 bytes of code and 1,627 bytes of data)
07:42
<&McMartin>
If I keep this up, this thing will be larger than the VIC-20's entire memory.
07:45 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
07:45 mode/#code [+o himi] by ChanServ
08:02 celticminstrel [celticminst@Nightstar-g3ttc7.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:06 macdjord is now known as macdjord|slep
08:22 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
08:34 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
08:34 mode/#code [+o himi] by ChanServ
09:20 AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has joined #code
09:59 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
10:13 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
10:13 mode/#code [+o himi] by ChanServ
10:19 AverageJoe [evil1@Nightstar-fb1kt4.ph.cox.net] has quit [[NS] Quit: Leaving]
10:26 You're now known as TheWatcher
10:33
<@froztbyte>
<McMartin> Anyway, I'm not writing in BASIC. I'm writing in a macro assembler, and using the BASIC ROM as some kind of demented libc.
10:33
<@froztbyte>
if only what you did was usable as some kind of youtube channel
10:38 JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
10:38 mode/#code [+o JackKnife] by ChanServ
11:01 luke [flukiluke@Nightstar-u5v.s2o.246.46.IP] has quit [Connection closed]
11:11 luke [flukiluke@Nightstar-q2b7ep.blinkenshell.org] has joined #code
11:21 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
11:34 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
11:34 mode/#code [+o himi] by ChanServ
11:55 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
12:06 luke [flukiluke@Nightstar-q2b7ep.blinkenshell.org] has quit [Ping timeout: 121 seconds]
12:12 luke [flukiluke@Nightstar-q2b7ep.blinkenshell.org] has joined #code
12:25 luke [flukiluke@Nightstar-q2b7ep.blinkenshell.org] has quit [Ping timeout: 121 seconds]
12:31 luke [flukiluke@Nightstar-q2b7ep.blinkenshell.org] has joined #code
12:55 thalass [thalass@Nightstar-1i3669.bigpond.net.au] has joined #code
12:55 mode/#code [+o thalass] by ChanServ
13:01 JackKnife [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
13:34 mode/#code [+o RchrdB] by ChanServ
13:37 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
14:08
<@AnnoDomini>
C++. "if (foo && bar)" - will bar be checked if foo is false?
14:09
< luke>
I would *think* C++ does short-circuit evaluation, but best to check.
14:09
< luke>
(I know C definitely does)
14:10
< luke>
Just setup a NULL pointer x, and watch the behaviour of "if (!x && x[0])"
14:16
< [R]>
C didn't last I checked.
14:18
<@AnnoDomini>
luke: The program finishes unexpectedly.
14:20 JackKnife [Z@Nightstar-ro94ms.balk.dk] has joined #code
14:20 mode/#code [+o JackKnife] by ChanServ
14:24 gnolam [lenin@Nightstar-o44c9a.cust.bredbandsbolaget.se] has joined #code
14:24 mode/#code [+o gnolam] by ChanServ
14:28
< luke>
AnnoDomini: Er, that would be because I made a terrible mistake.
14:28
< luke>
The idiom is (x && x[0])
14:30
< luke>
But either way, http://stackoverflow.com/questions/628526/is-short-circuiting-boolean-operators- mandated-in-c-c-and-evaluation-order
14:32
<&ToxicFrog>
[R]: C does; if yours didn't it is either nonconformant (some terrible embedded systems compiler) or ancient (since I don't think the original K&R spec strictly required it)
14:33
< [R]>
Could also be I was doing it outside an if/loop clause.
14:37
< [R]>
IE: check() && return
14:37
<&ToxicFrog>
No, it short circuits everywhere, not just in ifs.
14:37
<&ToxicFrog>
(but I'm pretty sure "check() && return" won't compile, because return is not an expression)
14:38
<@AnnoDomini>
(Huh? Can't you "return" out of a function that has void for a return type?)
14:39
< luke>
You can, but you can't return anything.
14:41
<&ToxicFrog>
AnnoDomini: yes, but the return is not an expression, it is a statement.
14:41
<&ToxicFrog>
And && only operates on expressions.
14:42 thalass is now known as Thalass|KSP
14:44
<@RchrdB>
ToxicFrog, arguably, K&R wasn't really a spec, it was an implementation.
14:44
< [R]>
A reference implementation?
14:44
<@RchrdB>
I think? It was the 1989 ANSI working group that made it a spec.
14:45
<@RchrdB>
K&R C was just the language that K&R's C compiler implemented and their book documented.
14:45
<&ToxicFrog>
RchrdB: by "the spec" I mean the book.
14:46
<@RchrdB>
According to the stackoverflow post, the words "
14:46
<@RchrdB>
C guarantees that &&' and ||' are evaluated left to right -- we shall soon see cases where this matters." appear in the book.
14:48
< simon_>
even if &&, || do not short-circuit, there is a semantic difference between left and right hre.
14:48
< simon_>
here*
14:49
< simon_>
I'm looking at a box of matches. the same logo as always, the same brand. but they're called "safety matches" rather than just "matches". I wonder what changed in the world for regular matches to become safe.
14:51
< [R]>
Probably stronger shafts
14:51
<@Tamber>
Not igniting if you abused them by, say, dropping the box; I think
14:51
< [R]>
http://en.wikipedia.org/wiki/Match#The_safety_match
14:53
< luke>
You can still buy non-safety matches that can be struck on any surface, like a boot.
14:54
<@RchrdB>
So the answer is that a safety match won't ignite just from friction, but needs to be struck *specifically* on the sandpaper on the side of the box, which is impregnated with something that reacts with the match head to set it off.
14:55
< [R]>
It ignite from fire too usually :p
14:56
<@RchrdB>
I find safety matches such a pain in the arse to light that, if there's anything else within walking distance that is already on fire, I'll just light them off that instead.
14:57
< luke>
The last time I used a match was at least 3 years ago.
14:57
< [R]>
I use them about 5 times a year
14:58
< [R]>
For decorative candles and such
14:59
<@RchrdB>
I went and stayed in a little cottage in France for a week recently. Everything was running on bottled gas, so we had to use matches.
14:59
<@RchrdB>
I cheated at least once by using a lighter to set off a match. :)
15:00
< [R]>
Heh
15:03 Orthia [orthianz@Nightstar-3tp.juj.184.203.IP] has quit [Ping timeout: 121 seconds]
15:05
<@froztbyte>
RchrdB: are safety matches in your part of the world really terrible, or something?
15:06
<@AnnoDomini>
Safety matches are the only kind of matches in this part of the world.
15:06
<@RchrdB>
froztbyte, I'm really shitty at pyromania.
15:07
<@froztbyte>
RchrdB: ah.
15:08
< luke>
Were you that one kid in the science class who could never manage to get his bunsen burner lit?
15:10
<@RchrdB>
I was also that one kid in chemistry class who couldn't get a beaker full of hot acid to cool down from 60°C to 20°C in a room that was at roughly 15°C.
15:42
< simon_>
RchrdB, I noticed that you were on #haskell-web. do you know by any chance which haskell database library is the most popular? I've tried mysql-simple in combination with snap (using the snaplet), but Hdbc looks more 'engineered'.
15:45
< simon_>
luke, you can also buy "storm matches" that won't go out in wind and rain.
16:17
<@RchrdB>
simon_, sorry, no idea.
16:17
<@RchrdB>
simon_, I havn't done any useful HS stuff for a while now.
16:26
<@AnnoDomini>
Pathfinding is getting better! https://www.youtube.com/watch?v=74xo-qd_5fY&feature=youtu.be
16:28
<@Azash>
15:52 < [R]> http://en.wikipedia.org/wiki/Match#The_safety_match
16:28 * Azash eyes that sub-header
16:28
<@Azash>
You can light a match if you want to?
16:29
< [R]>
... we /jsut/ discussed WTF that was
16:29
<@Azash>
I know what they are
16:29
<@Azash>
I use them whenever I go for a smoke
16:29
<@Azash>
But I was wondering whether "the" was added to the sub-header as a conscious allusion
16:30
< [R]>
NFC
16:38
<@AnnoDomini>
Hmmm. I should test speeds and accelerations that are a bit closer to plausible.
16:38
<@AnnoDomini>
As it is, this lil bugger covers an astronomical unit in 10 days.
16:58 Turaiel[Offline] is now known as Turaiel
16:58
< simon_>
I'd like to treat PHP array()s like a list, but it seems that unset() will simply set the entry to null but leave it there.
17:03
< [R]>
simon_: null is PHP's undefined.
17:06
< [R]>
http://xiennith.com/tmp.txt
17:06
< [R]>
Also read your log for notices in PHP code
17:07
< [R]>
Since you've got the WSoD configuration
17:22 celticminstrel [celticminst@Nightstar-g3ttc7.dsl.bell.ca] has joined #code
17:22 mode/#code [+o celticminstrel] by ChanServ
17:25
< simon_>
array_rand() did the trick for me.
17:25
< simon_>
thanks, [R].
17:26
< [R]>
... wut
17:26
< simon_>
well, I just wanted a random entry that existed in the array.
17:26 Thalass|KSP is now known as Thalass
17:26
< simon_>
or rather, the index for that entry, since I also wanted to remove it.
17:27 Thalass [thalass@Nightstar-1i3669.bigpond.net.au] has quit [[NS] Quit: omg sleep]
17:27 Harlow [harlow@Nightstar-hvs7l5.chi.megapath.net] has joined #code
17:27
< [R]>
So you're doing array_pop($a = array_rand($a)); // ?
17:30
< simon_>
I was wasting time on StackOverflow :P http://stackoverflow.com/questions/23592483/get-4-random-numbers/23592578#235925 78
17:30
< Harlow>
looks like php :d
17:32
< [R]>
Hush
17:32
< simon_>
someone should invent a new programming language that starts with "<?php" just so one can answer "No!" to that :P
17:33
< [R]>
WTF was your X problem anyways?
17:33
< simon_>
X problem?
17:33
< [R]>
http://www.perlmonks.org/?node=XY+Problem
17:35
< simon_>
well, viewing it as an XYZ problem where Z is treating PHP associative arrays as lists, Y is finding random numbers given some constraints, X is really procrastination from working on Sundays.
17:36
< [R]>
I'll rephrase since you're confused: What were you trying to /do/?
17:36 luke [flukiluke@Nightstar-q2b7ep.blinkenshell.org] has quit [Operation timed out]
17:36 luke [flukiluke@Nightstar-u5v.s2o.246.46.IP] has joined #code
17:37
< simon_>
I thought the StackOverflow reply stated that. "[find] four random numbers within the same interval but with a minimum distance to each other" :)
17:37
< simon_>
I have no practical application for finding them.
17:37
< [R]>
Oh, that was your question, not something you used for information.
17:39
<@celticminstrel>
...Firefox seems to randomly rearrange my toolbars sometimes. Or my status bar, at least.
17:39
<@celticminstrel>
Unless that's sync getting confused, but I thought it didn't even sync toolbars yet.
17:43
< Harlow>
[R]: This link is great, hahahahaha
17:44 HotShot[ipad] [HotShot@Nightstar-v7se27.try.wideopenwest.com] has joined #code
17:45 luke [flukiluke@Nightstar-u5v.s2o.246.46.IP] has quit [Ping timeout: 121 seconds]
17:46
< [R]>
The XY problem one?
17:47
< Harlow>
yeah
17:56 luke [flukiluke@Nightstar-u5v.s2o.246.46.IP] has joined #code
17:57
< simon_>
there's some good XY problems here: http://mywiki.wooledge.org/XyProblem
17:59
< Harlow>
I bet you guys have seen this one, but its fun to re-visit http://www.facepalm.com/img5/essays-written-in-programming-languages-24817_f.jpg
17:59 [R] is now known as Blaze
18:02 luke [flukiluke@Nightstar-u5v.s2o.246.46.IP] has quit [Ping timeout: 121 seconds]
18:02
< simon_>
Harlow, heh.
18:10 luke [flukiluke@Nightstar-u5v.s2o.246.46.IP] has joined #code
18:20 Harlow [harlow@Nightstar-hvs7l5.chi.megapath.net] has quit [[NS] Quit: BED]
18:42 HotShot[ipad] [HotShot@Nightstar-v7se27.try.wideopenwest.com] has quit [Connection closed]
19:03 celticminstrel [celticminst@Nightstar-g3ttc7.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
19:03 celticminstrel [celticminst@Nightstar-g3ttc7.dsl.bell.ca] has joined #code
19:03 mode/#code [+o celticminstrel] by ChanServ
19:11 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
19:11 mode/#code [+qo Vornicus Vornicus] by ChanServ
19:22 HotShot[ipad] [HotShot@Nightstar-v7se27.try.wideopenwest.com] has joined #code
19:25 LazySmurf [NSwebIRC@Nightstar-oa5.pc1.3.185.IP] has joined #code
19:25 LazySmurf [NSwebIRC@Nightstar-oa5.pc1.3.185.IP] has left #code [""]
19:27 Derakon[AFK] is now known as Derakon
20:05
<@Alek>
I think the problem with local-lookup of country gps coordinates is that they do change. The recent invasion of Ukraine, for example.
20:07
< Blaze>
Asshole Rusians, trying to undermine the American GPS network.
20:11
<@Alek>
You can light a fire if you want to
20:11
<@Alek>
You can leave your firewood behind
20:11
<@Alek>
Cause your firewood don't burn, and if your firewood won't burn, then it's no firewood of mine
20:45 HotShot[ipad] [HotShot@Nightstar-v7se27.try.wideopenwest.com] has quit [Connection closed]
20:46 Blaze is now known as [R]
20:59 JackKnife [Z@Nightstar-ro94ms.balk.dk] has quit [Ping timeout: 121 seconds]
21:23 macdjord|slep is now known as macdjord
22:30 Derakon [Derakon@Nightstar-5fqf0m.ca.comcast.net] has quit [Client exited]
22:46 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
22:59 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
22:59 mode/#code [+o himi] by ChanServ
23:06 Derakon [Derakon@Nightstar-5fqf0m.ca.comcast.net] has joined #code
23:06 mode/#code [+ao Derakon Derakon] by ChanServ
23:13 Derakon [Derakon@Nightstar-5fqf0m.ca.comcast.net] has quit [[NS] Quit: Leaving]
23:15 Derakon [Derakon@Nightstar-5fqf0m.ca.comcast.net] has joined #code
23:15 mode/#code [+ao Derakon Derakon] by ChanServ
23:27 Derakon is now known as Derakon[AFK]
--- Log closed Mon May 12 00:00:18 2014
code logs -> 2014 -> Sun, 11 May 2014< code.20140510.log - code.20140512.log >

[ Latest log file ]