code logs -> 2019 -> Sun, 18 Aug 2019< code.20190817.log - code.20190819.log >
--- Log opened Sun Aug 18 00:00:50 2019
00:09 * Derakon stares at Unity, and this code: https://pastebin.com/7vVZx0fM
00:09
<&Derakon>
The function InstantiateWithCallback creates an object that contains a PlayerShipSelector instance. It sets the `callback` property of that PlayerShipSelector, and verifies that it is set.
00:09
<&Derakon>
However, in the Update function of that instance, `callback` is null.
00:10
<&McMartin>
Is it the same top-level object?
00:11
<&Derakon>
As best I can tell, yes.
00:11
<&Derakon>
Here's a screenshot of the console: Screenshot of my console: https://i.imgur.com/oodauac.png
00:12
<&Derakon>
Er, errant copy/paste there.
00:12
<&Derakon>
Or redundant, anyway.
00:13
<&Derakon>
Huh, but if I call GetInstanceID() from the static and non-static methods they give different values.
00:14
<&Derakon>
Aha! From #unity3d on freenode: " you're getting the PlayerShipSelector on the prefab, not the instantiated object"
00:14
<&McMartin>
static won't *have* an instance...
00:14
<&McMartin>
Oh, ick, Unity-specific stuff
00:14
<&Derakon>
The static method creates an instance.
00:14
<&McMartin>
OK, I'm going to be useless there~
00:14
<&Derakon>
That's what I was referring to.
00:14
<&Derakon>
But yeah, the line "prefab.GetComponentInChildren" should have been "dialog.GetComponentInChildren".
00:15
<&Derakon>
Your instincts were right, anyway. I did have multiple objects in play. I'd forgotten the prefab could be interacted with that way.
00:15
<&Derakon>
And then got sloppy with variable names during a refactor.
00:17
<&Derakon>
Woo, you can now choose a ship to use when entering a mission.
00:19
<&Derakon>
I feel like I've been progressing really slowly lately, but I am making progress...next step: adding a complete-mission workflow. Then you'll be able to start the game at the main menu, go to the ship designer, create a new ship or load an existing one, edit it, save it, go back to the main menu, choose a mission, choose a ship to use, complete the mission, and return to the main menu.
00:54
<&[R]>
So... with LLVM and clang is there actually a way to compile to something you can run directly on LLVM, or is it purely meant as an intermediary?
00:58 Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
01:00
<&[R]>
I was looking at Limbo+dis and was sort of wondering if LLVM could be used to do the same thing
01:27
<&McMartin>
[R]: I think you're looking for the output format they call "LLVM Bitcode", which can be directly executed with `lli`?
01:29
<&[R]>
Cool, thanks
01:30
<&McMartin>
That question mark isn't just for show; if you get some progress on this, do let me know
01:30
<&McMartin>
My confidence level here is p. low :)
01:30
<&[R]>
Heh
01:30
<&[R]>
FUUUUUUCK
01:30
<&[R]>
FUCKING PUREE CAT BUTTON
01:30
<&McMartin>
no
01:30
<&McMartin>
all kitties get 10s
01:30
<&[R]>
I was going to give you some links but I hit the puree cat button
01:31
<&McMartin>
:( poor kitty
01:31
<&McMartin>
Anyway, I mostly know of bitcode as the thing that would make my app bundles at work way smaller, but I'm not allowed to use it becuase we depend on libraries that want inline asm~
01:31
<&[R]>
D:
01:32
<&McMartin>
Things may have improved since we made those decisions, though
01:32
<&[R]>
Anyways, I'll get you those links when FF starts back up in 5-10 minutes
01:33 * McMartin notes that at this point it probably also matters way less because, like, every device he targets professionally these days is AArch64 exclusively
01:34
<&[R]>
https://stackoverflow.com/questions/9148890/how-to-make-clang-compile-to-llvm-ir
01:34
<&[R]>
http://llvm.org/docs/CommandGuide/lli.html
01:35
<&McMartin>
Hm. That makes me think bitcode may be a level one or two below where you're aiming.
01:35
<&[R]>
Potentially
01:38
<&McMartin>
I see two statements in my journeys that don't add up
01:38
<&McMartin>
From https://en.wikipedia.org/wiki/LLVM#Intermediate_representation
01:38
<&McMartin>
"LLVM supports three isomorphic (i.e., functionally equivalent) forms of IR: a human-readable assembly format, an in-memory format suitable for frontends, and a dense bitcode format for serializing."
01:39
<&McMartin>
From the lli docs:
01:39
<&McMartin>
"lli is not an emulator. It will not execute IR of different architectures and it can only interpret (or JIT-compile) for the host architecture."
01:39
<&[R]>
Ah
01:39
<&[R]>
Yeah, that's not useful
01:39
<&McMartin>
Maybe armv7-ios and arm64-ios are "the same host architecture"
01:39
<&McMartin>
But the whole point of shipping iOS apps as bitcode was "this way you do not need to send three copies"
01:40
<&McMartin>
... um, yeah, from later in the lli docs, you can ovveride -march and -mcpu
01:40
<&McMartin>
So idkwtf
01:41
<&[R]>
But it references llc throughout all the command examples
01:41
<&McMartin>
This calls for adventures, imo
01:44
<&[R]>
.ll isn't even bytecode
01:45
<&[R]>
It's "human readable LLVM assembly language"
01:46
<&[R]>
Okay, so llvm-as produces bytecode
01:47
<&[R]>
clang -S -emit-llvm printf.c; llvm-as printf.ll
01:48
<&[R]>
Produces printf.bc
01:48
<&[R]>
Which lli can read and use
01:48
<&[R]>
00000c00: 696e 7072 696e 7466 382e 302e 3178 3836 inprintf8.0.1x86
01:48
<&[R]>
00000c10: 5f36 342d 7063 2d6c 696e 7578 2d67 6e75 _64-pc-linux-gnu
01:48
<&[R]>
00000c20: 7072 696e 7466 2e63 2e4c 2e73 7472 2e4c printf.c.L.str.L
01:49
<&[R]>
Hmm
01:49
<&[R]>
(select output of xxd printf.bc)
01:52
<&[R]>
Wish I had some ready to go alternative arch installs, since the want of this was to make building stuff for them easier
01:52
<&McMartin>
Sounds like a job for an RPi, imo
01:52
<&[R]>
I ahve one, just not immediately setup
01:52
<&[R]>
Hmm
01:53
<&[R]>
I have FreeBSD running on one though, that might be a good test
03:06
<&[R]>
Wait, what's the difference between "bitcode" and "bytecode"
03:06
<&[R]>
?
03:07
<&McMartin>
Sarcastic answer: "bytecode" has Java cooties
03:08
<&McMartin>
More serious answer unrelated to what LLVM may or may not be doing: I would assert that a "bitcode" doesn't care about 8-bit alignment when it's doing its thing.
03:08
<&McMartin>
This would comport with the use of 'bitstream' in video and audio codecs.
03:09
<&McMartin>
And by this standard, ARM instructions are bitcoded, 6502 instructions are bytecoded, and Z80 depends on how you squint at it.
03:17 Kindamoody is now known as Kindamoody[zZz]
04:21 NuClEuS` [Muhammad@Nightstar-9tc.16g.64.196.IP] has quit [Ping timeout: 121 seconds]
04:45 Vorntastic [uid293981@Nightstar-2dc.p8m.184.192.IP] has joined #code
04:45 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
06:55 celticminstrel [celticminst@Nightstar-6an2qt.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:35 Degi [Degi@Nightstar-0snccr.dyn.telefonica.de] has joined #code
08:53 Kindamoody[zZz] is now known as Kindamoody
09:27 * McMartin !
09:28 * McMartin has had an insight
09:28
<&McMartin>
Alternately, I just saw Solid Snake, and had better sound the alarm before he notic
09:31
<~Vorntastic>
??
09:34
<&McMartin>
Some of the Atari madness
09:35
<&McMartin>
When I tried to write Lights Out for the Atari 800, I couldn't get the hardware to do a display I liked, and once I got close, I ended up realizing I'd designed it not for the 800, but rather the 2600
09:35
<&McMartin>
I think I've just found a way to make a Very Good Display for the 800.
09:36
<&McMartin>
It involves, in part, lumping the missiles together to make them pretend to be displaying letters in a text mode.
09:37
<&McMartin>
(The big problem I've been having here is that in order to write letters in the cells at a size I actually am OK with, I have to use a strictly monochrome graphics mode.)
09:37
<&McMartin>
But I can mix sprites and bitmaps to get a much more workable result.
09:37
<&McMartin>
I'll just have to do hella rasters.
09:38
<&McMartin>
Fortunately, Hella Rasters is what the Atari is all about, and that will give me an excuse to play with parts of the 800 that the 2600 did not have, and that even the C64 works hard to match.
09:40
<~Vorntastic>
Oh I was wondering: what makes BBC BASIC so good?
09:40
<&McMartin>
What I don't know is whether or not I can do it without running into its (hugely chaotic and intractable) badlines.
09:40
<&McMartin>
BBC BASIC had three things going for it
09:41
<&McMartin>
(a) incredible longevity and official support, like the BBC says
09:41
<&McMartin>
(b) About as good support for structured programming as it is possible for BASIC to have until QBASIC restructured the language to look like Pascal
09:42
<&McMartin>
(b.1) This includes proper procedures and functions, with local variables, and the invocation of which were significantly faster than GOSUB
09:42
<&McMartin>
(b.2) This also meant that once BASIC environments got more graphical line numbers became an afterthought that your editor would often hide
09:43
<&McMartin>
(c) BBC BASIC included a full-featured symbolic assembler, and BASIC-side support for pointers and byte buffers to back it up
09:43
<&McMartin>
So you could have assembly language routines, in proper assembly language, with labels, in the middle of your BASIC code as part of the listing
09:44
<&McMartin>
This in turn meant that while in the US we got pushed to Pascal and C very early on just to get decent speed out of our programs or to get more reliable access to the underlying hardware, the only reason a lot of home computing enthusiasts would bother leaving BBC BASIC is because they'd like access to proper nested data structures
09:44
<&McMartin>
Because, like, that was pretty much all you were missing
09:45
<&McMartin>
It is nevertheless true that once you get some C in you you can't go back
09:46
<~Vorntastic>
Ok that's pretty impressive
09:46
<&McMartin>
*As a language* I'd say QuickBasic is better.
09:47
<&McMartin>
But QuickBasic also came, like, ten years later.
09:47
<&McMartin>
And it doesn't have pointers or inline asm~
09:47
<&McMartin>
(Strictly speaking the BBC BASIC stuff isn't *inline* asm; when you "ran" the lines of assembly language code you were filling up a bytebuffer to be invoked with USR at a later time)
09:48
<&McMartin>
(And depending on the code you might have to put it in a loop, one iteration for each pass the assembler needed, which is hilarious but also appropriate)
09:49
<~Vorntastic>
(pffff)
09:52 * Vorntastic has a thought, wonders why he's prefetching kickout exclusions in the first place he can just examine the grid live
09:55
<~Vorntastic>
Would need to make the grid respond appropriately to out-of-bounds selections
09:56 Kindamoody is now known as Kindamoody|afk
09:57
<~Vorntastic>
But I kind of need that anyway
10:11 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
10:11
<&McMartin>
?
10:13
<~Vorntastic>
Making collision, grid vs aabb. Question is which way do you move the aabb to kick it out of solid block collisions. Typically the answer is "whichever direction you are colliding less in", but
10:14
<~Vorntastic>
In some situations you can crash into a wall in such a way that you collide a lot with the wall but not much with one of the grid tiles vertically
10:14
<&McMartin>
oh this isn't crossroads
10:15 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Connection closed]
10:15
<~Vorntastic>
This kicks you vertically, and may incorrectly count you as hitting a floor or ceiling, activating other mechanics, which is bad.
10:16
<~Vorntastic>
So to prevent that, one must exclude kickouts that push towards other full tiles
10:16 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
10:16 mode/#code [+o himi] by ChanServ
10:18 NuClEuS` [Muhammad@Nightstar-8eu.eog.179.160.IP] has joined #code
10:22 NuClEuS` [Muhammad@Nightstar-8eu.eog.179.160.IP] has quit [Ping timeout: 121 seconds]
10:26
<~Vorntastic>
(this is the thing that gets done in smb1 speedruns - hit the wall the right way and you get kicked upward, grounding you so you can jump)
12:31 * ToxicFrog gnaws on ttymor
12:31
<&ToxicFrog>
Multi-tile entities suuuuuuuuuck
12:32
<&ToxicFrog>
The current implementation-in-progress uses multiple single-tile entities linked together, so that when something happens to one it sends messages to the others
12:32
<&ToxicFrog>
This means a lot of bookkeeping
12:33
<&ToxicFrog>
An alternate implementation would be support for true multi-tile entities, with a width and height, that exist in multiple map tiles at once
12:33 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
12:33
<&ToxicFrog>
This makes the map/render code more complicated, but makes it impossible for different parts of the entity to get out of sync
12:34
<&ToxicFrog>
A third possibility would be to have a MultiTile component that handles all the linkage and message-passing, but I'm not sure if this can actually work in a general way
12:34
<&ToxicFrog>
E.g. when you <verbs> a door, if it's open, it returns #{"Close"} iff all tiles of the door are unobstructed
12:35
<&ToxicFrog>
And the MultiTile would somehow have to know that
13:24 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
13:24 mode/#code [+o Reiv] by ChanServ
13:29 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
13:46 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
13:46 mode/#code [+o Reiv] by ChanServ
14:02 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
14:03 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
14:03 mode/#code [+o Reiv] by ChanServ
14:08 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
14:08 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
14:08 mode/#code [+o Reiv] by ChanServ
15:06 celticminstrel [celticminst@Nightstar-6an2qt.dsl.bell.ca] has joined #code
15:06 mode/#code [+o celticminstrel] by ChanServ
15:20 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
15:20 mode/#code [+qo Vornicus Vornicus] by ChanServ
15:34 Degi [Degi@Nightstar-0snccr.dyn.telefonica.de] has quit [[NS] Quit: Leaving]
15:34 Degi [Degi@Nightstar-0snccr.dyn.telefonica.de] has joined #code
17:24 Vorntastic [uid293981@Nightstar-2dc.p8m.184.192.IP] has quit [[NS] Quit: Connection closed for inactivity]
17:30 ErikMesoy [Bruker@Nightstar-r88323.bb.online.no] has left #code []
17:39 ErikMesoy [Bruker@Nightstar-r88323.bb.online.no] has joined #code
17:39 mode/#code [+o ErikMesoy] by ChanServ
19:00
<~Vornicus>
Okay. load up two bytes with random numbers... that have to be different from the previous random numbers that occupied those spaces. one of them is random between 0x6b and 0x3e inclusive, the other is picked from a list. ...hm. Well this is ...simultaneously surprising and a hunch that panned out. It turns out that all 8 entries in this list are... codes for colors that work well on a white background?
19:01
<~Vornicus>
(the list is 2 4 5 6 8 9 11 14; there are three other colors that are quoted as working well on white: 0 12 and 15)
19:01
<~Vornicus>
I'm mostly surprised it's *white*
19:25
<~Vornicus>
ok. cpx #$05 bcc (blah) . we skip if... x < 5
19:30
<~Vornicus>
wait no, it's accumulator - target, so if x >= 5.
19:32
<~Vornicus>
this is the part of 6510 assembly I don't like; these different ways of doing comparisons are subtle in ways I keep getting backwards
19:48
< Degi>
Oh crap, smh ATMega328 -> C# over serial reads a different number of bytes each time despite the same number being sent and always reads less than being sent
19:54
< Degi>
Heh oops
20:09 Kindamoody|afk is now known as Kindamoody
20:20
< Degi>
Hmh now I thought I read all bytes but it still doesnt work... Maybe the UART misses a few bytes
20:20
< Degi>
Though it did finish once.
21:37 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
21:37 Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code
21:37 mode/#code [+o Reiv] by ChanServ
21:56
<&McMartin>
Vornicus: Worse, Carry has opposite meanings on 6502 and Z80 :(
21:56
<~Vornicus>
srs
21:56
<&McMartin>
C is a True Carry Bit on Z80, and it's a Borrow bit on 6502.
21:56
<&McMartin>
You borrow from the carry
21:57
<~Vornicus>
I still don't get that at all
21:57
<~Vornicus>
Most proper subtractions it's done it's set C first
21:57
<&McMartin>
The 6502 one is the one that, to me, makes sense
21:57
<&McMartin>
Yeah
21:58
<&McMartin>
That's the rule
21:58
<&McMartin>
So, like, with Carry set it you go in with something that looks like, (three bit example here) 1001 - 010 = 0111
21:58
<~Vornicus>
and the only way that makes sense is if having C set means the subtraction turns out the way I expect it to if there's nothing affecting it
21:58
<&McMartin>
Carry clear, there's a borrow
21:59
<&McMartin>
If carry is clear, SBC subtracts an additional 1 from the result.
21:59
<&McMartin>
Er, if carry is clear *going in*
21:59
<&McMartin>
That's how it ripples.
22:00
<&McMartin>
This parallels addition, where 010 + 111 = 1001
22:01
<~Vornicus>
This so far has made zero sense by the way
22:01
<&McMartin>
Um, hm, OK, let's step back a bit
22:01
<&McMartin>
Though it's 2PM and I haven't had lunch yet so this will be brief
22:02
<&McMartin>
You get how carries work in *addition*, right, so as to do 16-bit adds?
22:02
<~Vornicus>
Yeah, you've got numbers big enough they add up to somewhere from 256 to 510, and the 2^8 bit shows up in C
22:03
<~Vornicus>
then you can use C (and your high bytes) to get the correct high byte in the result
22:03
<&McMartin>
And then that sets C the same way
22:03
<~Vornicus>
yes, etc etc
22:03
<&McMartin>
So think of that as a secret ninth bit in the arguments, where both are zero.
22:04
<&McMartin>
For subtraction, think of the secret ninth bit as being one in the first operand and zero in the second, and then C holds the ninth bit of the result
22:04
<&McMartin>
With an extra step of "if C is zero going in, that means that the previous step had to borrow from you, so decrement an additional amount".
22:05
<&McMartin>
http://michaelcmartin.github.io/Ophis/book/x641.html
22:06
<&McMartin>
Now foods
22:08
<&McMartin>
Well, first
22:08
<&McMartin>
The easy answer is "have an index card somewhere that says BCC = Unsigned <; BCS = Unsigned >="
22:08
<~Vornicus>
which side does the thing in the accumulator go
22:25 NuClEuS` [Muhammad@Nightstar-9o0.qp0.154.105.IP] has joined #code
22:46 Kindamoody is now known as Kindamoody[zZz]
22:50 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
23:12 mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has joined #code
23:12 mode/#code [+o mac] by ChanServ
23:14 macdjord [macdjord@Nightstar-rslo4b.mc.videotron.ca] has quit [Operation timed out]
23:23
<&McMartin>
Left side
23:23
<&McMartin>
Same as the SBC instruction.
23:23 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds]
23:23
<~Vornicus>
ok perfect *writes this down somewhere*
23:51 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
--- Log closed Mon Aug 19 00:00:52 2019
code logs -> 2019 -> Sun, 18 Aug 2019< code.20190817.log - code.20190819.log >

[ Latest log file ]