code logs -> 2017 -> Sun, 02 Jul 2017< code.20170701.log - code.20170703.log >
--- Log opened Sun Jul 02 00:00:06 2017
01:00 Kindamoody is now known as Kindamoody[zZz]
01:09 Jessikat [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving]
01:30 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
01:30 mode/#code [+o mac] by ChanServ
01:33 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
02:25 Alek [Alek@Nightstar-7or629.il.comcast.net] has quit [Connection closed]
02:30 Alek [Alek@Nightstar-7or629.il.comcast.net] has joined #code
02:30 mode/#code [+o Alek] by ChanServ
02:46 mac is now known as macdjord|slep
02:46 macdjord|slep is now known as macdjord|wurk
02:46 macdjord|wurk is now known as macdjord|slep
02:46 macdjord|slep is now known as macdjord|fude
02:46 macdjord|fude is now known as macdjord|slep
06:21 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
06:21 mode/#code [+o macdjord] by ChanServ
06:23 macdjord|slep [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
07:23 Kindamoody[zZz] is now known as Kindamoody
08:35 Jessikat [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
10:35 Kindamoody is now known as Kindamoody|out
11:34 Jessikat [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving]
11:46
<&ToxicFrog>
Haaaaaaaaaaaaaaaaah it's alive!
11:46
<&ToxicFrog>
I have just successfully turned on the LED on the arduino.
11:46
<&ToxicFrog>
...from notforth.
11:48
<~Vornicus>
\o/
12:04
<@TheWatcher>
Huzzah!
13:12 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
13:58 Jessikat [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
15:41 macdjord is now known as Internet
16:08 Internet is now known as macdjord
16:11 ErikMesoy1 [Bruker@Nightstar-hq72t5.customer.cdi.no] has joined #code
16:14 ErikMesoy [Bruker@Nightstar-hq72t5.customer.cdi.no] has quit [Ping timeout: 121 seconds]
16:27 mac [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has joined #code
16:27 mode/#code [+o mac] by ChanServ
16:30 macdjord [macdjord@Nightstar-a1fj2k.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
16:40
<@Azash>
Oh no, I missed the party last night
16:58
< ion>
Must have been a canada day thing =b
17:16 mac is now known as macdjord
17:59 Kindamoody|out [Kindamoody@Nightstar-0lgkcs.tbcn.telia.com] has quit [[NS] Quit: Rebooting, bbs]
18:01 ErikMesoy1 is now known as ErikMesoy
18:01 mode/#code [+o ErikMesoy] by ChanServ
18:06 Kindamoody|autojoin [Kindamoody@Nightstar-0lgkcs.tbcn.telia.com] has joined #code
18:06 mode/#code [+o Kindamoody|autojoin] by ChanServ
19:30
<@ErikMesoy>
I have a repetitive pair of Python calls I would like to condense, of the form "Name = library.CreateThing(constant_1, constant_2, RelevantVariable)" followed by "Name.LibraryFunction(constant_3, RelevantObject)". I'm doing this mode of callpair for many Named things.
19:31
<@ErikMesoy>
I can condense the first on its own by creating a wrapper function on library.CreateThing which takes one argument and passes (constant-1, constant-2, argument). But is there a sane way to condense both of these into single wrapper call or the like?
19:32
<@ErikMesoy>
It seems nonobvious to me because the first call has to return the object, which makes it hard to call a method of the object in the same go.
19:32
<&[R]>
doStuff(library, relevantVariable, relevantObj) { library.createThing(C1, C2, relevantVariable).libraryFunction(C3, relevantObj) }
19:33 * ErikMesoy squints. That's legal, calling like that?
19:34
<&[R]>
In most languages yeah
19:35 * [R] isn't sure about Python
19:37
<&[R]>
Python supports it
19:37
<@ErikMesoy>
You are surely right but this is not doing what I wanted when I implement it, so time to figure out if I implemented wrong or described problem wrong.
19:38 * [R] did that mostly as shorthand, wasn't meant to be legal code
19:38
<@ErikMesoy>
Python is shorthand+indent. :P
19:42
<@ErikMesoy>
Right, there was a third call that I had separated out for what surely seemed like a good reason at the time and so missed when condensing those two.
19:48
<@ErikMesoy>
Man, this fucked up the library so hard I'm getting a C++ assertion error.
19:55
<@ErikMesoy>
Aha. [R]: That call-on-call structure returned the result of LibraryFunction when I needed to get the result of CreateThing. Solution, wrapper function gets longer by doing those separately then a return, but at least the duplication is solved.
19:55
<@ErikMesoy>
Thanks.
19:59 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
19:59 mode/#code [+qo Vornicus Vornicus] by ChanServ
20:01
<&[R]>
lol
20:01
<&[R]>
Yeah, it works because the first function returns a function, the result of that statement would be the return of the second function
20:02
<&[R]>
Some libraries like to do chaining, where pretty much every function returns this/self
20:05
<~Vornicus>
Python functions generally *don't* chain
20:05
<~Vornicus>
methods rather
20:06
<~Vornicus>
ostensibly to prevent you from pretending that the methods arecreating copies
20:06
<@ErikMesoy>
And now I'm trying to track down where a method got a positional argument from.
20:06
<&[R]>
I don't think any language does that by default
20:12
<@ErikMesoy>
Apparently it's the event that called it.
20:21 Kindamoody|autojoin is now known as Kindamoody
20:31
<&ToxicFrog>
[R]: does which?
20:33
<&[R]>
<Vornicus> Python functions generally *don't* chain
20:33
<&ToxicFrog>
In that case I don't know what you mean by "by default"
20:33
<&ToxicFrog>
A language where object methods return this if there's no explicit return statement?
20:34
<&[R]>
Right
20:35
<&[R]>
It's something someone has to explicitly make the code do
20:36
<&ToxicFrog>
I also don't know of any languages where that's the default, and honestly I think it would be a kind of weird special case
20:37
<&ToxicFrog>
But there are definitely languages and libraries where it's the common convention
20:37
<&[R]>
Yeah
20:37
<&[R]>
I don't know about languages
20:37
<&[R]>
But libraries definately
21:14
<@ErikMesoy>
AD and I have been doing the stupidest thing in a while: discovering the Python winsound wrapper and then replicating his guitar exercises with Beep. http://pastebin.starforge.co.uk/4
21:15
<@ErikMesoy>
Now to figure out how to multithread it for simultaneous beeps at different frequencies.
21:17
<@abudhabi>
Anyone know the name of the song, though? The person who taught me didn't.
21:52
<@gnolam>
https://twitter.com/skamille/status/864874648739209216
22:05
<@ErikMesoy>
Huh. Why is pyinstaller throwing a syntax error on a line that works fine when I run the python program? (on a string format with the {var} syntax to be precise)
22:06
<&[R]>
Different python interpreter maybe?
22:07
<@ErikMesoy>
...somehow I've managed to get pyinstaller for 2.7 and this is a 3.6 program.
22:08
<&[R]>
\o/
22:13 * ErikMesoy thwacks his command line to work with Python 3, but now pip isn't recognized any more.
22:13
<@ErikMesoy>
I feel I'm making something worse.
22:15
<@ErikMesoy>
Rather than chase a potential XY problem: what do you suggest I use to convert a Python 3 program into a standalone executable?
22:15
<@ErikMesoy>
(Windows)
22:35
<&[R]>
For ease of distribution?
22:36
<@ErikMesoy>
Yes.
22:37
<&[R]>
I'd probably just use chocolaty or whatever it's called
22:37
<&ToxicFrog>
So I've spent a while trying to debug why one of the C function definitions is getting emitted twice, resulting in a duplicate symbol error at compile time
22:37
<&ToxicFrog>
SPOT THE BUG
22:37
<&ToxicFrog>
CHECK_MALLOC(compiling->name, C_IMPL_BUFSIZE, "buffer for C source code");
22:37
<&ToxicFrog>
c_append("\nvoid word_anon_%p() {\n", word);
22:40
<@ErikMesoy>
[R]: That seems to require the recipient installing Chocolatey. I am trying to minimize what the recipient has to do, ideally down to "Receive file, doubleclick file".
22:40
<&ToxicFrog>
Isn't there a "py2exe"?
22:42
<&ToxicFrog>
(the bug, btw: we don't truncate compiling->name after calling malloc, so sometimes malloc gives us back the same buffer we just used and freed for the previous function definition, and we end up appending the next function to it)
22:43
<@ErikMesoy>
py2exe appears to be for Python 2.
22:44
<@ErikMesoy>
(And there's no py3exe.)
22:45
<&ToxicFrog>
what?
22:45
<&ToxicFrog>
https://pypi.python.org/pypi/py2exe/0.9.2.0
22:45
<&ToxicFrog>
"Build standalone executables for Windows (python 3 version)"
22:45
<&[R]>
https://pypi.python.org/pypi/py2exe/0.9.2.0
22:46
<@ErikMesoy>
Oh. I was looking at the SourceForge page.
22:48
<&[R]>
Sourceforge? Is it 1998?
22:49
<@ErikMesoy>
It is there, evidently! :P
22:59 Jessikat` [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
23:00 Jessikat`` [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
23:02 Jessikat [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has quit [Operation timed out]
23:03 Jessikat` [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has quit [Ping timeout: 121 seconds]
23:08 Jessikat` [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
23:09 Jessikat` [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving]
23:12 Jessikat`` [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has quit [Ping timeout: 121 seconds]
23:12
<@ErikMesoy>
Apparently it's still 2015 even there because py2exe is throwing "Tuple index out of range" errors and search is suggesting this is due to changes between 3.4 and 3.6.
23:19 Jessikat [Jessica@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
23:50
<&ToxicFrog>
Hah
23:50
<&ToxicFrog>
if too much stuff ends on the stack, it's impossible to fix it without resetting the AVR
23:51
<&ToxicFrog>
Because it uses the free space on the stack as a scratch pad for reading input
--- Log closed Mon Jul 03 00:00:07 2017
code logs -> 2017 -> Sun, 02 Jul 2017< code.20170701.log - code.20170703.log >

[ Latest log file ]