code logs -> 2017 -> Sat, 10 Jun 2017< code.20170609.log - code.20170611.log >
--- Log opened Sat Jun 10 00:00:52 2017
00:22 Turaiel[Offline] is now known as Turaiel
00:25
<&McMartin>
Oh dear
00:25
<&McMartin>
The work slack just discovered the cult of the party parrot
00:26 * McMartin reacted with :parrot:
00:54 * Vornicus returns to shenzhen i/o, tries to remember how it works, also is apparently dealing with meat
00:55
<&McMartin>
MEAT PRINTER
00:59
< Vornicus>
never quite enough instructions to do it right
01:03
< ToxicFrog>
aka :parrotdrugs:
01:06 * ToxicFrog pokes minicom with a stick
01:09
< Vornicus>
Three short. :(
01:11
< ToxicFrog>
Boooo it looks like minicom doesn't support local line buffering
01:12 * celmin|sleep wonders if there's a logical answer to "min element of an empty list".
01:12 celmin|sleep is now known as celticminstrel
01:15
<&McMartin>
I do not believe so.
01:16
<&McMartin>
If it's typed, and there's a maximum or positive infinity value, then that will work.
01:16
<&McMartin>
(By analogy with the way the sum of an empty list is 0 and the product is 1; it's the initial argument to the implied fold operation)
01:17
<&McMartin>
I guess more generally, you would want it to be the value V such that min(x, V) = x for all valid x.
01:18
<@celticminstrel>
I guess that means it's impossible if the type is string.
01:18
<&McMartin>
Yes.
01:18
<&McMartin>
But "" will work for max!
01:18
<@celticminstrel>
True.
01:19
<&McMartin>
Is the string known to be ASCII or UTF-8?
01:19
<&McMartin>
If so, the string "\xff\xff
01:19
<&McMartin>
"
01:19
<&McMartin>
is lexicographically later than all validly encoded sttrings.
01:20
<&McMartin>
That won't work for any encoding that can freely use every octet, though.
01:20
<&McMartin>
And it's sneaky hacky bullshit anyway.
01:21
<@celticminstrel>
o.o
01:21
< ToxicFrog>
Argh. minicom can't do line buffering. Neither can kermit. Arduino IDE can, but its serial terminal is garbage.
01:22
< ToxicFrog>
Cutecom can, but it randomly inserts newlines into the output.
01:22
<&McMartin>
(ASCII only permits byte values of 0x7f or less, so 0xff alone is enough to be later than all valid ASCII strings.)
01:23
<&McMartin>
(UTF-8 encodes a multibyte code point with one byte larger than 0xBF and then one or more bytes in the 0x80-0xBF range, so two FF bytes in a row is illegal.)
01:24
< Vornicus>
hooray it worked
01:26
<&McMartin>
If you can restrict it to "only includes valid unicode code points", then code point FFFF is a noncharacter and thus two FF bytes is also larger than any UTF-16 string in either encoding order.
01:27
<&McMartin>
For UCS-4 you'd need four FF bytes to handle all endianness/comparison cases.
01:32 * Vornicus now works on the keycode lock.
02:24 * Vornicus runs out of instructions *again*
02:49 RchrdB [RchrdB@Nightstar-qe9.aug.187.81.IP] has quit [Operation timed out]
03:08
< Vornicus>
oop, it *does* test that edge case :(
03:18
< Vornicus>
and my reader has one instruction of slack space. Not that I have a plan.
03:59 * ToxicFrog bonks head against desk
03:59
< ToxicFrog>
Just spent twenty minutes trying to figure out why the compiler was emitting OP_CALLWORD,NULL rather than OP_PUSHLITERAL,2
04:00
< ToxicFrog>
(intptr_t)OP_CALLWORD is 2.
04:00
< ToxicFrog>
The *actual* problem is that the OP_PUSHLITERAL opcode never got emitted.
04:00
<&McMartin>
man, valid zeropage addresses.
04:00
< ToxicFrog>
McMartin: not in this case!
04:00
< ToxicFrog>
That's why it was blowing up.
04:01
<&McMartin>
Oh, that's an enum, right
04:01
<&McMartin>
I misunderstood the significance of intptr_t there
04:27
< ToxicFrog>
So here's a fun one
04:27
< ToxicFrog>
This is valid:
04:28
< ToxicFrog>
:two 2 const
04:28
< ToxicFrog>
:double { two * } defn
04:28
< ToxicFrog>
This is not valid
04:28
< ToxicFrog>
:two 2 const :double { two * } defn
04:29
< ToxicFrog>
...because the definition of `double` tries to resolve `two` at compile time, and if `:two 2 const` hasn't been executed yet, resolution fails.
04:29
<&McMartin>
ouch
04:31
< ToxicFrog>
I noticed this because of a separate bug in the lexer that was causing it to eat newlines under some circumstances, effectively concatenating adjacent lines in the test script.
05:48
<&McMartin>
himi: It occurs to me that based on your discussion earlier about your issues with the RPi...
05:49
<&McMartin>
... that what you're really looking for is an updated version of the Iyonix PC.
05:49
<&McMartin>
(Which was too underpowered on its own to meet your needs, but was built around Intel's XScale ARM chip and the PCI bus)
05:50
<@himi>
McMartin: yeah, there are better options for what I use it for, but the big advantage of the RPi is that it's really easy to get hold of
05:51
<&McMartin>
Well, it sounds like what you want is a cheap ARM system that works like a small desktop
05:51
<&McMartin>
As opposed to media player/control system where the filesystem is read-occasionally, write-even-more-rarely
05:52 * himi nods
05:52
<@himi>
Or more specifically, a small server
05:52
<&McMartin>
Ouch, yeah.
05:52 * McMartin went with an Intel NUC for that.
05:53
<&McMartin>
Handed it a celeron
05:53
<@himi>
The RPi works surprisingly well, but the lack of SATA means that I get fairly shitty disk I/O
05:53
<&McMartin>
It's the one running IRC right now, actually, and I'm SSHed into it from the Pi~
06:15 Turaiel is now known as Turaiel[Offline]
06:25
<@himi>
ugh
06:26
<@himi>
TKinter is not masses of fun to work with
06:33
<&McMartin>
no
06:36 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has quit [[NS] Quit: Kernel upgrade]
06:42 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code
06:42 mode/#code [+ao McMartin McMartin] by ChanServ
06:42
<@himi>
Sadly I don't know of any other Python GUI toolkit that's basically universally available without requiring additional packages to be installed
06:43
<&McMartin>
That's quite correct, alas.
06:43
<&McMartin>
Also, all GUI programming is full of spiders
06:46
<@himi>
eh, it's not so much that it's full of spiders, it's that it's full of grind
06:48
<@ErikMesoy>
I have a range(x-1,-1,-1) in my GUI programming, that feels like a spider
06:48
<@ErikMesoy>
Is there a less spidery way to traverse elements by index last to first?
06:49
<@himi>
Hunk after hunk of boilerplate with the barest minimum of differences, and then the same again to actually /do/ anything with it
06:49
<@himi>
ErikMesoy what language?
06:49
<@ErikMesoy>
Python.
06:49
<@ErikMesoy>
I'm using wxPython for my toolkit
06:49
<@himi>
Well, you can do a list.reverse() first
06:49
<@himi>
That modifies the list in place, though
06:51
<@ErikMesoy>
Reversing the list won't help as I can't access the elements by name, only by index. And I'm deleting them in this case, which is why I have to iterate backwards: deleting from a list while iterating forwards through it is a great way to foul up.
06:52
<@himi>
Then reverse and use pop() to pull elements off the list
06:52
<@himi>
Or rather, just use pop() to pull the last element off the list
06:54
< Vornicus>
for item in reversed(list)
06:54
< Vornicus>
oh, you need to deal with indexes
06:54
< Vornicus>
...use filter
06:55
<@himi>
Oh, you need the index while you're iterating?
06:55
<@himi>
Hm
06:57
< Vornicus>
and enumerate
06:58
<@himi>
I'm a little confused as to what the actual data structure you're operating with looks like - if it's just a list of objects then getting access to the objects via pop() or similar should work, but if it's not a list then what is it?
06:59
< Vornicus>
new_list = filter(function_that_decides_whether_to_keep_it, enumerate(old_list)); ftdwtki accepts index, item and returns True if you want to keep it
07:05 Kindamoody[zZz] is now known as Kindamoody
07:06
<@ErikMesoy>
http://pastebin.starforge.co.uk/121
07:08
<@himi>
Oh
07:10
< Vornicus>
Oh oh, this isn't even that bad
07:10
< Vornicus>
wait, it is. blah!
07:10
<@himi>
for i in reversed(list(range(0, x))):
07:11
< Vornicus>
Ewk, jsut use the negative thing
07:11
< Vornicus>
But: I'm surprised there's no way to just say "get rid of all the children"
07:11
<@himi>
Nothing is any more elegant
07:12
<@himi>
Yeah - I'd check the docs again, because this is the kind of shit that normally has a sensible built in solution
07:12
< Vornicus>
or, you know: while(..getChildren()): gameobject.contextualbuttons.Hide(0)
07:13
<@ErikMesoy>
Ooh!
07:13
<@ErikMesoy>
Thanks.
07:14
< Vornicus>
But yeah, look for a thing that gets rid of all children instead, I'd say
07:15
<@ErikMesoy>
I will do that too
07:21
<@himi>
I'm a little surprised that the output of getChildren() implement __len__() but not __iter__()
07:21
<@himi>
eh, who knows what's going on in the minds of the wxWidgets devs
07:25
<@ErikMesoy>
So what is your boilerplate like?
07:33
<@himi>
http://pastebin.starforge.co.uk/122
07:33
<@himi>
Also, you have to pack things in reverse order, or there's some trick I have yet to find that makes it not be so stupid
07:37
<@himi>
On the plus side, it looks like almost all the widgets and the like can be set up with temporary variables unless you need to do something with it later, so I could probably wrap a good chunk of this stuff without any pain
07:37 celticminstrel is now known as celmin|sleep
11:34 Kindamoody [Kindamoody@Nightstar-0lgkcs.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
11:36 Kindamoody|autojoin [Kindamoody@Nightstar-80id9c.mobileonline.telia.com] has joined #code
11:36 mode/#code [+o Kindamoody|autojoin] by ChanServ
12:46 mode/#code [+qo Vornicus Vornicus] by ChanServ
16:38
<@ErikMesoy>
Okay, that's enough improvised similar names, I need a convention for naming Buttons and associated Methods. Any thoughts on the value of naming the former with foo_B, or the latter foo_M, or both? Prefix or postfix?
17:05 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed]
17:12 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
17:12 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
17:52 celmin|sleep is now known as celticminstrel
17:57 Turaiel[Offline] is now known as Turaiel
19:35
<&[R]>
ErikMesoy: they share a namespace?
19:36
<&[R]>
I'd just prefix the name of the form/page/screen the buttons are on if that were the case. Leave the methods alone. Unless you're using proper prefix-notation throughout then prefix both appropriately.
20:04 Jessikat [Jessikat@Nightstar-cnb095.dab.02.net] has joined #code
20:31
<@ErikMesoy>
Yes, same namespace, since I'm creating them at the same time and place in GUI (and I feel I'm missing an integrated function that would set them both up as a unit). After fiddling I have wound up postfixing the buttons and letting the methods use master name.
21:19 Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Ping timeout: 121 seconds]
21:37 Kindamoody|autojoin [Kindamoody@Nightstar-80id9c.mobileonline.telia.com] has quit [Ping timeout: 121 seconds]
21:53 * TheWatcher ponders Unity, hrms
21:53
<@TheWatcher>
As near as I can tell, it doesn't really expect you to do runtime scene generation
21:54
<@TheWatcher>
I wonder if this is going to end up with me fighting the engine to do what I want.
21:57 Kindamoody|autojoin [Kindamoody@Nightstar-0lgkcs.tbcn.telia.com] has joined #code
21:57 mode/#code [+o Kindamoody|autojoin] by ChanServ
22:06 Kindamoody|autojoin is now known as Kindamoody
22:30 Jessikat [Jessikat@Nightstar-cnb095.dab.02.net] has quit [[NS] Quit: Bye]
23:19 Kindamoody is now known as Kindamoody[zZz]
--- Log closed Sun Jun 11 00:00:53 2017
code logs -> 2017 -> Sat, 10 Jun 2017< code.20170609.log - code.20170611.log >

[ Latest log file ]