code logs -> 2017 -> Fri, 17 Feb 2017< code.20170216.log - code.20170218.log >
--- Log opened Fri Feb 17 00:00:28 2017
00:49 Derakon[AFK] is now known as Derakon
01:41 * Vornicus discovers that he missed several available symmetries because his program was a little too specific about certain things.
01:50
<&ToxicFrog>
My portal placement code isn't working
01:50
<&ToxicFrog>
-> add a bunch of debugging code
01:50
<&ToxicFrog>
-> restart game
01:50
<&ToxicFrog>
-> portal placement works perfectly
01:50
<~Vornicus>
now it ... yep
01:50
<&ToxicFrog>
-> realize I forgot to save before the first test
02:11 * Vornicus now gets 25 possibly-different things, checks them, gets indeed every single one he should have gotten in the first place, with 6 conjugate pairs like he expected.
02:11
<~Vornicus>
so, real number of symmetries on my square: 19.
02:37
<&ToxicFrog>
Ahahaha what the fuck
02:37
<&ToxicFrog>
MessageBox presents a message and up to ten buttons and waits for the user to select one
02:37
<&ToxicFrog>
The usage is:
02:37
<&ToxicFrog>
MessageBox <args>
02:38
<&[R]>
lolwut
02:38
<&ToxicFrog>
set selection to GetButtonPressed ; returns the index of the button they pressed
02:38
<&ToxicFrog>
; do stuff based on selection
02:38
<&ToxicFrog>
*except*
02:38
<&ToxicFrog>
It takes up to 15 frames from the player clicking the button to GetButtonPressed being aware of it, because ???!?!
02:38 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code
02:39 mode/#code [+ao McMartin McMartin] by ChanServ
02:39
<&ToxicFrog>
So you actually have to call MessageBox, and then loop (which is eqv to setting some state that prevents you from MessageBoxing again and then returning; the script will be called again next frame) until GetButtonPressed > -1
02:55
<&ToxicFrog>
There also doesn't appear to be any way to split a statement across multiple lines
02:55
<&ToxicFrog>
Which is just fucking delightful when you have functions like MessageBoxEX that can take 21 arguments including the complete text of the message
02:56
<&McMartin>
... I missed the beginning of this, what is all this then
02:57
<&ToxicFrog>
Oblivion scripting
02:57
<&ToxicFrog>
Which is a gigantic trash fire even with OBSE
02:57 * Vornicus gives McM 5 additional symmetries which his previous script couldn't find.
02:57
<&ToxicFrog>
...something has gone wrong here
02:58
<&ToxicFrog>
"Open which portal? Diamonds: 0 Emeralds: 0 Rubies: 1074790400"
02:58
<~Vornicus>
Whups
02:58
<&McMartin>
Okay
02:58
<&McMartin>
I was about to say "MessageBoxExW is a much simpler function than that"
02:59
<~Vornicus>
That's... somewhere in the neighborhood of 2^30
02:59
<&ToxicFrog>
The best part is that I have no rubies, but four diamonds
02:59
<~Vornicus>
Indeed, that's 0x40100000
03:02 LadyOfLight` [catalyst@Nightstar-hb5vcd.dab.02.net] has joined #code
03:04
<&ToxicFrog>
Sadly, the contract of GetItemCount is that it returns the number of items of that type being held, 0 if none are
03:04 LadyOfLight [catalyst@Nightstar-07ra9n.dab.02.net] has quit [Ping timeout: 121 seconds]
03:12
<&ToxicFrog>
holy shit
03:12
<&ToxicFrog>
This line:
03:12 * Azash encounters the AutoHotkey scripting interface
03:12
<&ToxicFrog>
printToConsole "diamonds: %d; rubies: %d"
03:12
<&ToxicFrog>
Produces a "mismatched quotes" parse error
03:12
<&ToxicFrog>
CAN YOU GUESS WHY
03:13
<@Azash>
Sleep function: Pass parameter X and sleep that many milliseconds
03:13
<@Azash>
Except if X is -1
03:13
<@Azash>
Then you instead force an event queue resolution
03:14
<~Vornicus>
TF: because it seeks ';' before figuring out string literal tokens
03:14
<&ToxicFrog>
Vornicus: bingo
03:14
<&McMartin>
Vorn beats me to it
03:14
<&ToxicFrog>
Also, found the problem with getItemCount!
03:14
<&ToxicFrog>
It returns a float.
03:15
<&ToxicFrog>
(uint16_t)0.0 is apparently 1074790400 sometimes.
03:15
<&ToxicFrog>
And (uint16_t)4.0 is 0.
03:15
<~Vornicus>
What.
03:15
<~Vornicus>
Okaythen.
03:16
<&McMartin>
That only raises further questions
03:16
<&McMartin>
Of which, I think, the most relevant would be "how do you fit 1074790400 into a uint16_t"
03:16
<~Vornicus>
^
03:16
<&ToxicFrog>
Oh, good point
03:16
<&ToxicFrog>
I guess 'short' is uint32_t here
03:17
<&McMartin>
(There are a great many bit representations of 0.0 in IEEE 754, and doing a reinterpret_cast to int32 or int64 could give pretty exciting results)
03:17
<~Vornicus>
wait, a great many?
03:17 * Vornicus checks.
03:17
<&ToxicFrog>
McMartin: this does however raise the question of why getItemCount returns a float in the first place
03:18
<&McMartin>
Secretly implemented in Perl and/or JavaScript?
03:18
<~Vornicus>
No, there's only two 0s. There's a lot of NaNs.
03:19
<&McMartin>
Whoops, right.
03:19
<&McMartin>
=~= WATMAN =~=
03:22
<&ToxicFrog>
McMartin: god knows what it's implemented in. It does however have distinct float, short, long, and ref types
03:26
<&McMartin>
0x40100000 is 2.25, for the record. Does that number hold any relevance to you?
03:26
<&ToxicFrog>
none whatsoever
03:33
<&ToxicFrog>
ADDED FUN: you can only edit the script inside TESCS. The built in script editor can only open one file at a time, uses a variable-width font, and has no syntax hilighting.
03:33
<&ToxicFrog>
And you have to close the script editing window before you can save the mod.
03:38
<&ToxicFrog>
...huh
03:38
<&ToxicFrog>
Calculated offsets for portal: (0, 75, 100)
03:38
<&ToxicFrog>
So it calls portal.moveTo player, 0, 75, 100
03:38
<&ToxicFrog>
The player is at (-500, -240, -250)
03:39
<&ToxicFrog>
So of course the portal ends up at (1800, 1915, 7881)
03:39
<@Azash>
Seems reasonable
03:40
<&ToxicFrog>
The best part is that the portal placement code was working earlier this evening ;.;
03:42
<&ToxicFrog>
Ok
03:43
<&ToxicFrog>
apparently there is some semantic difference between "let x := pt.fPortalDistance * cos theta" and "set x to pt.fPortalDistance * cos theta"
03:43
<&ToxicFrog>
That results in exactly the same output when `printC`ing x, but different behaviour when passing x to moveTo
03:44
<@Azash>
Reference vs. literal?
03:53
<&ToxicFrog>
"huh", sez I. "why am I crouching, walking forwards, and blocking as soon as I load the game?"
03:53 * ToxicFrog looks at the cat
03:53 * ToxicFrog unplugs the wireless gamepad receiver
03:54
<&ToxicFrog>
...and suddenly everything is normal again.
03:54 celticminstrel [celticminst@Nightstar-h4m24u.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
03:54 celticminstrel [celticminst@Nightstar-h4m24u.dsl.bell.ca] has joined #code
03:54 mode/#code [+o celticminstrel] by ChanServ
04:25 AverageJoe [evil1@Nightstar-lc3.hbj.189.210.IP] has joined #code
04:35
<&McMartin>
\o/
05:02 Derakon is now known as Derakon[AFK]
05:29 celticminstrel is now known as celmin|sleep
05:56 * McMartin writes a set of self-modifying routines that turn the entire upper half of BASIC's RAM into a giant ring queue.
05:58
<~Vornicus>
that's a small amount of queueueue.
05:58
<&McMartin>
Should be enough to let me do the lazy implementation of floodfill though.
05:59
<&McMartin>
I'm not completely sure it's enough for the fully general case, actually >_>
05:59
<~Vornicus>
http://imgur.com/QAulMny Hooray, <r^2, rfs> symmetry
06:06
<&McMartin>
Crypt of the Necrodancer OST makes *terrible* coding music
06:07
<~Vornicus>
'cause you type slower to match the beat?
06:08
<&McMartin>
Very little typing ends up happening
06:08
<~Vornicus>
too busy grooving then
06:13 * LadyOfLight` twirls
06:13
< LadyOfLight`>
I have an issue
06:13
< LadyOfLight`>
I can explain Reduct in half a page of text, but I can't actually write an evaluator for the language
06:13 * Vornicus gives LadyOfLight` the bug reporting link.
06:13
<~Vornicus>
ah
06:13 * LadyOfLight` hms
06:14
< LadyOfLight`>
Largely because I dislike taking the LISP cop-out of 'well, everything at the top level is /really/ just a statement'
06:14 LadyOfLight` is now known as LadyOfLight
06:15
< LadyOfLight>
Maybe a program definition is a map and the lookup is of argument in the map
06:15
< LadyOfLight>
Nevermind, problem solved.
06:15
< LadyOfLight>
That makes a lot of sense actually
06:16
< LadyOfLight>
Although the word 'map' feels inadequate to describe a data structure which is really an infinite map of all possible symbols as keys
07:08 Xon [Xon@Nightstar-j72.ku7.252.119.IP] has quit [A TLS packet with unexpected length was received.]
07:09 Xon [Xon@Nightstar-j72.ku7.252.119.IP] has joined #code
07:09 mode/#code [+o Xon] by ChanServ
07:15 * McMartin gets his floodfill routine working, after accidentally messing up the queue code such that it actually smashed the entire program including itself
07:22
<&McMartin>
I guess blitting over the entire program is *technically* an instance of self-modifying code
07:28
<~Vornicus>
:/
07:43
<&[R]>
Ugghhhhh
07:44
<&[R]>
s.split('asdf', 3) == s.split('asdf').slice(0, 3)
07:45
<~Vornicus>
wat
07:45
<&[R]>
I was kind of expecting it to do what PHP's explode did when given a number D:
07:47
<@macdjord|slep>
McMartin: Playing unintentional Core Wars, are we~?
08:03 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
08:09
<&McMartin>
macdjord|slep: fixed now~
08:20
<&[R]>
,keepalive = this.keepalive
08:20
<&[R]>
^
08:20
<&[R]>
TypeError: Cannot read property 'keepalive' of undefined
08:20
<&[R]>
WTF
08:22
<&[R]>
Ah, my error, derp
08:49 LadyOfLight [catalyst@Nightstar-hb5vcd.dab.02.net] has quit [The TLS connection was non-properly terminated.]
08:50 LadyOfLight [catalyst@Nightstar-hb5vcd.dab.02.net] has joined #code
08:51
<&McMartin>
Seriously, even in machine language, flood fill is just hella slow on a C64
08:51
<&McMartin>
It also uses Every Last Byte Of Memory.
08:51
<&McMartin>
This program uses every single byte from $0800 through $9FFF
08:52
<&McMartin>
And $A000 is where the BASIC ROM starts
08:52
<&McMartin>
Hum, wait, that's not true.
08:53
<&McMartin>
The range $1323-$1FFF is unused.
08:53
<&McMartin>
But other than that!
08:53
<&McMartin>
($0800-$1322 for the program and data, $2000-$3FFF for the bitmap display, $4000-$9FFF as scratch space for the flood fill algorithm)
09:02
<~Vornicus>
that is a not small number of pages of flood fill
09:03
<&McMartin>
3 bytes to store a screen coordinate, so that's 8,192 pixels worth
09:03
<&McMartin>
Turns out the largest shape on the Statue of Liberty pic is sliiiightly longer than that so filling it in will loop the ring buffer once.
09:03
<&McMartin>
I did not add instrumentation to determine the largest queue size at any given time.
09:03
<~Vornicus>
D:
09:04
<&McMartin>
(The whole screen is 64,000 pixels.)
09:05
<&McMartin>
Also the C64's palette for this is a bit uglier. The PC image is #0a0 on #aaa, which looks pretty nice
09:05
<&McMartin>
The C64 palette was almost literally selected at random
09:06
<&McMartin>
https://hkn.eecs.berkeley.edu/~mcmartin/retro/liberty.prg <-- here, have the C64 Best Combined Port
09:32 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
09:32 mode/#code [+o himi] by ChanServ
09:32 LadyOfLight` [catalyst@Nightstar-0brdhk.dab.02.net] has joined #code
09:33 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
09:35 LadyOfLight [catalyst@Nightstar-hb5vcd.dab.02.net] has quit [Ping timeout: 121 seconds]
09:47 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
09:48 LadyOfLight` is now known as LadyOfLight
09:54 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
09:54 mode/#code [+qo Vornicus Vornicus] by ChanServ
10:04 AverageJoe [evil1@Nightstar-lc3.hbj.189.210.IP] has quit [Connection closed]
10:04 AverageJoe [evil1@Nightstar-lc3.hbj.189.210.IP] has joined #code
10:11 * TheWatcher sighs
10:12
< LadyOfLight>
Hm?
10:13 AverageJoe [evil1@Nightstar-lc3.hbj.189.210.IP] has quit [[NS] Quit: Leaving]
10:15
<@TheWatcher>
I become daily more ocnvinced that the network in this building is actually implemented using hydrated multistrand twisted interlinks with cylindrical aluminium endpoints.
10:15
<@TheWatcher>
convinced, even.
10:17
< LadyOfLight>
So more wetwork
10:20
<@TheWatcher>
Yeah. Which is frustrating when it's just slow, but rather worse when systems fail because the network has vanished temporarily.
10:21
<@TheWatcher>
And I'm having to look at making something far more fault tolerant than I ever should have needed to
10:22
<@TheWatcher>
Heyho. Stops me getting bored, I guess....
10:22
<@TheWatcher>
(>.<)
10:50 AverageJoe [evil1@Nightstar-lc3.hbj.189.210.IP] has joined #code
11:01
< LadyOfLight>
Heh
11:02 AverageJoe [evil1@Nightstar-lc3.hbj.189.210.IP] has quit [[NS] Quit: Leaving]
12:47 Kindamoody[zZz] is now known as Kindamoody
12:48
< LadyOfLight>
...copy by default is a really weird behaviour unless you are actively modelling a cache based machine
12:53
< LadyOfLight>
Well, a machine based on memory/cache with a separate processor
12:53
< LadyOfLight>
And even then it's weird to have that at anything other than the lowest level
13:06 LadyOfLight` [catalyst@Nightstar-0brdhk.dab.02.net] has joined #code
13:06 LadyOfLight [catalyst@Nightstar-0brdhk.dab.02.net] has quit [The TLS connection was non-properly terminated.]
13:37 celmin|sleep is now known as celticminstrel
14:48
< LadyOfLight`>
Hurray, today I got to use std::enable_if
14:48
< LadyOfLight`>
In the template type parameter list
14:48 LadyOfLight` is now known as LadyOfLight
15:15
< LadyOfLight>
It was very exciting
15:19
<&jerith>
TheWatcher: Welcome to my world.
15:20
<&jerith>
At least the random reboots have stopped since we demanded that our VMs be moved to different hardware.
16:02 LadyOfLight` [catalyst@Nightstar-jmdrvt.dab.02.net] has joined #code
16:04 LadyOfLight [catalyst@Nightstar-0brdhk.dab.02.net] has quit [Ping timeout: 121 seconds]
16:22
<&ToxicFrog>
That was not my smartest move.
16:22
<&ToxicFrog>
<co-worker> I have an [RPC response] here that's 350MB, which seems large, and now I'm wondering if anyone has something larger.
16:23
<&ToxicFrog>
<me> Back of the envelope math says I can get 1.5GB from my team's health monitoring, hang on
16:23
<&ToxicFrog>
*one reboot later*
16:23
<&ToxicFrog>
<me> I was right, but actually inspecting the contents of the response requires several times more RAM than my workstation has installed
16:31
< LadyOfLight`>
Smooooooth
16:31 LadyOfLight` is now known as LadyOfLight
16:46
<&jerith>
:-D[6~[6~
16:46
<&jerith>
Err, :-D
16:47
<&jerith>
Thanks for the escape character garbage, ssh+nyetwork.
16:47
< LadyOfLight>
Huzzah!
16:57
<&McMartin>
:o at std::enable_if
17:02
< LadyOfLight>
If it helps any, I was correctly defining the default constructor of std::pair
17:12
<&McMartin>
I'm... I'm not sure
17:13
< LadyOfLight>
Because it was giving me a compiler error when I was attempting to use a non default constructible type in a range based for loop by const reference and needed to instantiate the pair type to work out the size of it for the pointer math in iterators
17:14
< LadyOfLight>
And the constructor was not dependent and thus did not participate in SFINAE
17:14
< LadyOfLight>
...if that helps any
17:17
< LadyOfLight>
(that moment when you wonder if you are hirable based entirely on your response to seeing that kind of error)
17:19
<&McMartin>
Yeah, my TMP knowledge is too shallow to even understand that response, sorry >_>
17:19
<&McMartin>
I think I can be the solution validator in that case but can't explain the solution or come up with it >_>
17:28
< LadyOfLight>
I was well aware that I was likely to be one of maybe three people at the company who could come close to figuring that out
17:28
< LadyOfLight>
So I rubber ducked at someone for a while
17:29
<&jerith>
I think I know what some of those words mean.
17:37
<&ToxicFrog>
What is std::enable_if?
17:39
<&McMartin>
To quote the reference manual I use: "This metafunction is a convenient way to leverage SFINAE to conditionally remove functions from overload resolution based on type traits and to provide separate function overloads and specializations for different type traits."
17:40
<&McMartin>
"SFINAE" is "Substitution Failure Is Not An Error" and is part of the rule for working out what overloads actually exist in the presence of templated functions.
17:42
<&McMartin>
From looking at it in use it looks like you're throwing a guard on whether a templated method exists given the values of its other type arguments, but I've never actually commanded the knowledge of how to do this or why it works.
17:48 LadyOfLight` [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
18:15 Alek [Alek@Nightstar-cltq0r.il.comcast.net] has quit [Ping timeout: 121 seconds]
18:18 Alek [Alek@Nightstar-cltq0r.il.comcast.net] has joined #code
18:18 mode/#code [+o Alek] by ChanServ
18:32
<~Vornicus>
that is a not small rpc response
18:54
<&ToxicFrog>
No it is not!
18:55
<&ToxicFrog>
We have a lot of experiments, and health data for one experiment is (depending on what you ask for) somewhere between 1B and 300KB in size.
18:56
<&ToxicFrog>
(I mentioned this at standup and one of my teammates looked at me and said "you always find the most interesting corner cases")
19:21 LadyOfLight [catalyst@Nightstar-jmdrvt.dab.02.net] has quit [[NS] Quit: Bye]
19:32 LadyOfLight` is now known as LadyOfLight
21:11 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
21:11 mode/#code [+o himi] by ChanServ
--- Log closed Sat Feb 18 00:00:29 2017
code logs -> 2017 -> Fri, 17 Feb 2017< code.20170216.log - code.20170218.log >

[ Latest log file ]