code logs -> 2016 -> Sat, 13 Aug 2016< code.20160812.log - code.20160814.log >
--- Log opened Sat Aug 13 00:00:53 2016
00:02 JustBob [justbob@Nightstar.Customer.Dissatisfaction.Administrator] has quit [Connection reset by peer]
00:56 JustBob [justbob@ServerAdministrator.Nightstar.Net] has joined #code
00:56 mode/#code [+o JustBob] by ChanServ
02:08 * Vornicus searches through an es6 compatibility chart, wonders what the hell an "astral plane" string is
02:08
< catalyst>
o:
02:11
<~Vornicus>
Ah. "astral plane" means unicode points beyond the basic multilingual plane
02:56 * Vornicus breaks out the knuth
03:06
< catalyst>
A good vintage?
03:06
< catalyst>
Knuth is clearly some form of alcogol
03:06
< catalyst>
alcohol*
03:08
<~Vornicus>
this is 2011 vintage.
03:17 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving]
03:25 catadroid` is now known as catadroid
03:38 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer]
03:39 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
03:39 mode/#code [+qo Vornicus Vornicus] by ChanServ
04:18 macdjord|slep [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
04:18 mode/#code [+o macdjord|slep] by ChanServ
04:21 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
04:34 catadroid` [catadroid@Nightstar-kio5lq.dab.02.net] has joined #code
04:37 catadroid [catadroid@Nightstar-m88bot.dab.02.net] has quit [Ping timeout: 121 seconds]
04:52
<@himi>
There's a 2011 vintage Knuth?
04:58
<~Vornicus>
Volume 4A, Combinatorial Algorithms Part 1
05:12 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
05:13 mode/#code [+o mac] by ChanServ
05:15 macdjord [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
05:15 mode/#code [+o macdjord] by ChanServ
05:16 macdjord|slep [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
05:17 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
05:23 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
05:23 mode/#code [+o mac] by ChanServ
05:25 macdjord [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
05:28 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Connection reset by peer]
05:29 macdjord [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
05:29 mode/#code [+o macdjord] by ChanServ
07:01 celticminstrel [celticminst@Nightstar-nhhr58.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:02 Kindamoody[zZz] is now known as Kindamoody
07:29 gizmore [kvirc@Nightstar-sprecj.dip0.t-ipconnect.de] has joined #code
07:34 * Vornicus throws together a 'solver' for some weird minesweeper-voltorb-something puzzle in a pokemon game for his brother
07:58
<&[R]>
Minesweeper's impossible to get perfect on 100% right?
07:58
<~Vornicus>
Sometimes.
07:59
<&[R]>
No matter what, you both have to make random choices and get randomly screwed.
07:59
<~Vornicus>
There are certain configurations -- two cells next to each other that you know one has a mine but you only have clues that count both cells -- that are impossible.
08:00
<~Vornicus>
They are by no means a certainty.
08:01
<~Vornicus>
this particular thing is rather different. each cell has either a voltorb, a 1, a 2, or a 3 in it. FOr each row and each column you get the number of voltorbs in that line and the sum of the scores in that line as well.
08:01
<&[R]>
Right, but you will eventually have that situation.
08:01
<~Vornicus>
No
08:01
<~Vornicus>
Not all minesweeper boards have this failure.
08:01
<&[R]>
I am assuming infinite game.
08:01
<&[R]>
Games*
08:02
<~Vornicus>
Well okay, the set of infinite minesweeper boards that have ambiguous situations is of measure zero
08:02
<~Vornicus>
but when I was playing a lot of minesweeper, maybe 20-25% of boards have ambiguous situations.
08:02
<~Vornicus>
(on expert)
08:05
<~Vornicus>
The goal in this thing is to find all the 2s and 3s before hitting a voltorb; it's not typically possible to know the complete configuration or even the configuration of the voltorbs, so it generates all possible boards and then highlights the known and safest cells.
08:51 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds]
09:00
< catadroid`>
Rawr
09:00
< catadroid`>
Today I will at least complete exercise #28
09:01 * Vornicus cookies catadroid, gives her http://duznanski.github.io/voltorb/
09:01
<~Vornicus>
exercise #28 in what?
09:01
< catadroid`>
clojure thing I was following
09:01
<~Vornicus>
aha
09:02
< catadroid`>
Minesweeper?
09:04
<~Vornicus>
It's a -- in one of the pokemon games (I don't know which one, my brother was playing it) there's a minigame where you're given as clues the sum of scoring tiles, and the number of voltorbs, in each row and each column
09:06
< catadroid`>
So are the voltorbs good or bad?
09:06
<~Vornicus>
My thing figures out the safest squares to try, given the clues, and as you reveal squares in the thing you can put the results into the page to get it to update the probabilities
09:06
<~Vornicus>
THe goal is to get points while avoiding voltorbs; the game ends in victory when there are no 2s or 3s left unrevealed
09:06
<~Vornicus>
and ends in failure when you reveal a voltorb.
09:07
< catadroid`>
Ahhhh
09:10
<~Vornicus>
so it will highlight those squares which are least likely to contain a voltorb.
09:15 catadroid` is now known as catadroid
09:15
< catadroid>
Neat
09:20 Kindamoody is now known as Kindamoody|afk
09:47 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer]
10:02 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
10:35 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
10:36 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
10:36 mode/#code [+o himi] by ChanServ
11:04 catadroid` [catadroid@Nightstar-5l8qoi.dab.02.net] has joined #code
11:07 catadroid [catadroid@Nightstar-kio5lq.dab.02.net] has quit [Ping timeout: 121 seconds]
11:24 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
11:24 mode/#code [+qo Vornicus Vornicus] by ChanServ
11:41 catadroid` [catadroid@Nightstar-5l8qoi.dab.02.net] has quit [Ping timeout: 121 seconds]
11:58 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer]
12:16 * catalyst finally locates sufficient spoons to submit that clang crash report
12:22 * catalyst hopes it does not make her look stupid
12:22 * catalyst thinks she worries too much about looking stupid
12:24
<@Pi>
catalyst: Good to hear!
12:24
<@Pi>
Yay for spoons
12:24
<@Pi>
Yeah, you're submitting a clang crash report, I think that inherently rules out being stupid. :)
12:25
< catalyst>
https://llvm.org/bugs/show_bug.cgi?id=28962
12:25
< catalyst>
Does that look ok?
12:25
< catalyst>
The interface for submitting only allows a single attachment, although it seems you can subsequently add more
12:25
< catalyst>
so I copied the text of the relevant files into the body
12:26
< catalyst>
Which is why I potentially feel stupid
12:28
<@TheWatcher>
Anyone should be feeling stupid, it's them for running SHA-1 signatures on their ssl certs~
12:30
<@TheWatcher>
You've given trace, code to reproduce, worded it sensibly; I can't see any reason to feel stupid there at all. Hell of a lot better bug reporting than many I've seen, and them too I'm sure.
12:30
< catalyst>
I hope so
12:33
< catalyst>
Thank you
13:11 abudhabi [abudhabi@Nightstar-7nkq9k.de] has quit [Ping timeout: 121 seconds]
13:24 abudhabi [abudhabi@Nightstar-7nkq9k.de] has joined #code
13:24 mode/#code [+o abudhabi] by ChanServ
14:21 gizmore [kvirc@Nightstar-sprecj.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
14:22 gizmore [kvirc@Nightstar-rddln2.dip0.t-ipconnect.de] has joined #code
14:57 celticminstrel [celticminst@Nightstar-nhhr58.dsl.bell.ca] has joined #code
14:57 mode/#code [+o celticminstrel] by ChanServ
14:58 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
15:01 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
15:01 mode/#code [+o himi] by ChanServ
15:20 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
15:29 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
15:29 mode/#code [+o himi] by ChanServ
15:52 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
15:57 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
15:57 mode/#code [+o himi] by ChanServ
16:08
<@celticminstrel>
I want to implement a copy/move constructor without manually copying every single field...
16:35 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
16:49 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
16:49 mode/#code [+o himi] by ChanServ
16:57 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [Connection closed]
17:00 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
17:01 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
17:01 mode/#code [+o himi] by ChanServ
17:10 catadroid [catadroid@Nightstar-imo62a.dab.02.net] has joined #code
17:10 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
17:14 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
17:14 mode/#code [+o himi] by ChanServ
18:09 catadroid` [catadroid@Nightstar-lh766i.dab.02.net] has joined #code
18:12 catadroid [catadroid@Nightstar-imo62a.dab.02.net] has quit [Ping timeout: 121 seconds]
18:18 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
18:26 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
18:26 mode/#code [+o himi] by ChanServ
18:34 catadroid` is now known as catadroid
18:51
<@celticminstrel>
Is memcpy(arr, other.arr, sizeof(arr)) sufficient to copy a multidimensional array?
18:52
<@Tamber>
Should be, I'd imagine. (I could be wrong, though.)
18:53
<@celticminstrel>
What about swapping? Is there any better way than looping through and swapping the individual elements?
18:53
<@celticminstrel>
(Or does std::swap work on them?)
18:54
<@Tamber>
That, I don't know enough to comfortably say.
18:55
<&McMartin>
It depends on how the array was constructed.
18:56
<&McMartin>
That might be a copy, or it might be a move.
18:56
<&McMartin>
If it's multidimensional but created with a single malloc, it's fine, but if you did individual allocations of each sub-bit, then no
18:56
<&McMartin>
And I don't remember quite how you sort that out in C.
18:57
<&McMartin>
I think the answer I'm supposed to give is "You probably shouldn't be using C arrays"
18:59
<@celticminstrel>
It's not malloc'ed
18:59
<@celticminstrel>
It's declared as an array in a class.
18:59
<&McMartin>
As in, int grid[100][100] or whatever?
18:59
<@celticminstrel>
Yeah
19:00
<&McMartin>
That can be memcopied.
19:00
<&McMartin>
Let me double-check that though
19:00
<&McMartin>
Well, first
19:00
<&McMartin>
Is it something like int
19:00
<&McMartin>
Or is it a class
19:00
<@celticminstrel>
It's int or char or something.
19:00 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
19:00 mode/#code [+qo Vornicus Vornicus] by ChanServ
19:01
<&McMartin>
Yep. Memcpy is fine
19:01
<&McMartin>
There is no move constructor that isn't copy for such a thing either.
19:01
<&McMartin>
"grid" in my example is just a chunk of (probably) 40,000 bytes there in the middle of the class.
19:02
<&McMartin>
Where things get interesting is when you are instead an array of pointers, or a pointer-to-pointer
19:02
<&McMartin>
Then allocation strategy matters and you can probably move or swap via pointer swaps
19:03
<&McMartin>
If this is *your* class
19:03 * catadroid purposefully avoids multidimensional arrays in C/C++ fwiw
19:03
<&McMartin>
Consider making the big array its own structure with one element and then copying/moving/swapping just the pointer
19:03
<@celticminstrel>
Hmm, okay.
19:03 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
19:04
<&McMartin>
But a copy then requires a reallocate, mind you.
19:04
<&McMartin>
Unless it's *also* an *immutable* array.
19:05
<&McMartin>
catalyst: I actually used one yesterday! I was writing a Conway-game-of-life kind of thing in a screen or so of code and was too lazy to set up rowmajor/columnmajor etc.
19:05
<@celticminstrel>
So for swap I have no option other than looping through? (Or memcpy thrice, which seems bad.)
19:05
<&McMartin>
memcpy is going to be better than looping through.
19:05
<@celticminstrel>
Even doing it multiple times? Okay then.
19:05
<&McMartin>
memcpy is going to be able to write a faster loop than you can.
19:05
<~Vornicus>
yeah, memcpy gets actual processor/system controller support
19:05
<@celticminstrel>
Alright.
19:06
<&McMartin>
Doing it yourself will only save space.
19:06
<@celticminstrel>
I think some of these are supposed to be 2D bit arrays...
19:07
< catalyst>
McMartin: fair - for the kinds of things I generally use arrays in, I tend to want to be precise about the iteration order of the elements, and I find that far easier to reason about if I'm defining the dimensionality myself from a single large allocation
19:07
<@celticminstrel>
Might be able to replace them with std stuff later.
19:07
<@celticminstrel>
For now though I just want to get proper copy/move semantics set up.
19:07
<&McMartin>
Yeah. This one was so lazy it's not even dynamically sized. :)
19:08
<&McMartin>
celticminstrel: move is only for things with internal structure, and C arrays of ints don't have a primitive structure.
19:08
<&McMartin>
So move == copy
19:12
<~Vornicus>
long as what you're moving is bigger than like two words I think you win.
19:12
<&McMartin>
(The automaton I was implementing, idly, was https://hkn.eecs.berkeley.edu/~mcmartin/CCA.html - still my favorite cellular automaton)
19:13
<@celticminstrel>
Though despite that there's still a separate memmove.
19:13
<&McMartin>
memmove differs from memcpy in that memcpy demands the source and destination ranges not overlap, and memmove does not require that.
19:13
<&McMartin>
It is less efficient but more correct.
19:16
<~Vornicus>
I once tried to figure out how to do a memmove, there are a ridiculous number of cases
19:17
<&McMartin>
... there should only be three
19:17
<&McMartin>
disjoint, overlapping with src < dest, overlapping with src > dest
19:17
<&McMartin>
I suppose once you start actually using SIMD instructions those latter two start to subdivide
19:17
<~Vornicus>
Yeah
19:20
<&McMartin>
Funnily enough for all my madness I've never delved into the SIMD extensions on x86.
19:25
<@celticminstrel>
I guess there's no way around having a list of all attributes in the copy constructor and the swap function...
19:30 * catalyst knows far too much about SIMD on x86/x64/PPC
19:31 ion_ [Owner@Nightstar-2qv0j0.vs.shawcable.net] has joined #code
19:34 ion [Owner@Nightstar-2qv0j0.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
19:45 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
19:47
<@celticminstrel>
The coupling is getting in the way of my copy/move semantics...
19:47 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
19:47 mode/#code [+o himi] by ChanServ
20:19 Kindamoody|afk is now known as Kindamoody
20:31 ion [Owner@Nightstar-2qv0j0.vs.shawcable.net] has joined #code
20:33 ion_ [Owner@Nightstar-2qv0j0.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
21:04 * McMartin meanwhile is trying to get a handle on the iOS software stack
21:05
<&McMartin>
I've managed to get an app that actually looks and behaves correctly thanks to mostly autogenerated boilerplate, but a lot of this relies on magic
21:05
<&McMartin>
And all the iOS Actual Pros I'm talking to at work (because I need to learn this stuff to be in a position to help them out) are pretty insistent on the magic petering out real fast
21:05
<&McMartin>
Which means peeling off the flashy bits or the weird extra engines Apple provides and get closer to the system's core.
21:06
<&McMartin>
(And then back out, from that, to the toolkit my co-workers are actually *using*, but one step at a time!)
21:33 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
21:34 mode/#code [+o mac] by ChanServ
21:36 macdjord [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
21:45 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
21:45 macdjord|slep [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
21:46 mode/#code [+o macdjord|slep] by ChanServ
21:48 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
21:52 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
21:52 mode/#code [+qo Vornicus Vornicus] by ChanServ
21:52 Vornotron [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
21:53 Vornotron [Vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
21:54 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
22:06 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
22:06 mode/#code [+o himi] by ChanServ
22:32 ion_ [Owner@Nightstar-2qv0j0.vs.shawcable.net] has joined #code
22:34 ion [Owner@Nightstar-2qv0j0.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
22:35 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
22:35 mode/#code [+o mac] by ChanServ
22:38 macdjord|slep [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
22:40 macdjord [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
22:40 mode/#code [+o macdjord] by ChanServ
22:41 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
22:42 gizmore [kvirc@Nightstar-rddln2.dip0.t-ipconnect.de] has quit [A TLS packet with unexpected length was received.]
22:46 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
22:46 mode/#code [+o mac] by ChanServ
22:49 macdjord [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
23:27 Pink` [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
23:31 macdjord [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
23:31 mode/#code [+o macdjord] by ChanServ
23:31 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
23:51 gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has quit [[NS] Quit: No Ping reply in 180 seconds.]
23:51 gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has joined #code
23:51 mode/#code [+o gnolam] by ChanServ
23:53 macdjord [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Connection reset by peer]
23:54 macdjord [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
23:54 mode/#code [+o macdjord] by ChanServ
--- Log closed Sun Aug 14 00:00:09 2016
code logs -> 2016 -> Sat, 13 Aug 2016< code.20160812.log - code.20160814.log >

[ Latest log file ]