code logs -> 2016 -> Wed, 27 Jan 2016< code.20160126.log - code.20160128.log >
--- Log opened Wed Jan 27 00:00:52 2016
00:57
< catalyst>
yay I crashed the clang frontend
00:57 * catalyst declares victory
00:59
<&McMartin>
High five
00:59
<&McMartin>
I can only claim devastation of lldb
01:04
< catalyst>
sadly this means that my template does not work
01:05
<&McMartin>
:(
01:22 * catalyst fixes it by having fewer implicit cast cases
01:23
< catalyst>
(probably for the best)
01:25 Derakon[AFK] is now known as Derakon
01:25
<&McMartin>
Heh, quite
01:25 mode/#code [+ao Derakon Derakon] by ChanServ
01:25
<&McMartin>
Yeah, the time I leveled lldb it was because I was using a library that made such heavy use of template metaprogramming that individual symbol names were over 2KB.
01:25
<&McMartin>
lldb was... not okay with that
01:27
<@Reiv>
What do you mean by symbol names
01:27
<@Reiv>
or in fact, template metaprogramming
01:34
<&Derakon>
Symbol names are stuff like names of classes and functions.
01:34
<&Derakon>
Template Metaprogramming is heavy shit that I can't adequately describe except in that you probably should not be doing it.
01:35
<&Derakon>
(symbol names typically get mangled by the compiler in order to enforce that e.g. it can tell the difference between class A's "foo()" and class B's "foo()" even though B inherits from A)
01:35
<@Reiv>
snrk
01:47
<&McMartin>
Also to tell the difference between foo(int x) and foo(float x)
01:47
< catalyst>
So, this is what crashes it: http://paste.ofcode.org/nrRa3ZbFJSAiRRUydELPSG
01:48 * McMartin beholds intentional use of std::forward, flees in terror
01:48
< catalyst>
:D
01:48
< catalyst>
I was attempting to implement std::result from Rust, it turns out that's a little forlorn
01:48
<&Derakon>
Man, I can't read that shit.
01:48
<&McMartin>
I need to rebuild my stockpile of Elder Signs
01:48
< catalyst>
that's a stripped down version of it
01:48
<&Derakon>
My C++ knowledge dates from the early 2000's and I never did much with templates.
01:48
<&McMartin>
Yeah, so
01:49
<&McMartin>
C++11 is, as I've noted a few times over the last six months, for all practical purposes a completely different language
01:49
<&McMartin>
std::forward and its related technologies turn out to be a large part of why
01:49
<&McMartin>
And they are "supposed" to live in the depths of standard library implementations
01:49
< catalyst>
This crashes the compiler via: Assertion failed: Loc.isValid() && "point of instantiation must be valid!", file D:\src\llvm_release_build_3.7.1\llvm\tools\clang\include\clang/AST/DeclTemplate. h, line 1606
01:49
< catalyst>
:D
01:49
<&McMartin>
This is where I occasionally delve and where catalyst lives
01:50
<&McMartin>
Result is the one that's basically bost::optional but instead of "none" it's a value of some different type, right?
01:50
<&McMartin>
*boost
01:50
<&McMartin>
My rust is rusty
01:50
< catalyst>
I wrote an internal article on how to use std::forward (to wit: don't, unless you're writing core factory types, generally)
01:51
< catalyst>
result is the one that's basically <returntype, errortype> and has the try! macro
01:51
<&McMartin>
Yeah
01:51
< catalyst>
it basically provides compiler support for scoping exceptions implicitly
01:51 * McMartin nods
01:51
< catalyst>
amusingly, this is basically Haskell's do syntax applied from the other direction
01:51 * McMartin <3 that mechanism. Death to exceptions~
01:51
<&McMartin>
Yeah, it's Haskell's Either type
01:51
<&McMartin>
And IIRC under that name or one similar to it it's made it into C++17
01:52
<&McMartin>
I do not recall if building the reference version of it required extending the language somehow
01:52
<&McMartin>
That is, I'm not sure if C++11 is good enough to do Result *right*
01:52
< catalyst>
this is essentially C++14
01:53
< catalyst>
I should actually submit a bug report to clang
01:53
< catalyst>
but I'll do that tomorrow
01:53
< catalyst>
it's 2am
01:53
<&McMartin>
Sounds good
01:54
< catalyst>
(incidentally, the template support is there in theory, the macro support to enable decent use of something like try! I've not figured out yet)
01:54
< catalyst>
(I'm sort of heading down the 'Well, Alexandrescu might have invented it' path with that)
01:54
<&McMartin>
(Heh)
01:54
<&McMartin>
(Yeah, I'm a little vague on exactly what it was I found, and maybe it's just a standardization of template-discriminated unions)
01:54
< catalyst>
Regardless, I'm pretty happy that I managed to break a compiler xD
01:55
<&McMartin>
Definitely a fine accomplishment
01:55
< catalyst>
boost::variant is likely to make it into the standard
01:56
<&McMartin>
That is probably what I was thinking of.
01:58 * McMartin checks Wiki
01:58
<&McMartin>
... oh yes please, can we get boost::filesystem into the standard, its lack is an embarassment
02:01
< catalyst>
right, I've got the crashing example down to http://paste.ofcode.org/jeHMXTvFkPdQcRsmCZGKGD
02:01
< catalyst>
ugh
02:01
< catalyst>
let me fix the whitespace
02:02
< catalyst>
http://paste.ofcode.org/QTxtPZRaeRYPKDLekzZ6zx
02:02
< catalyst>
there
02:02
< catalyst>
...that still has dodgy whitespace
02:03
< catalyst>
http://paste.ofcode.org/V2uWMs4HMdacugsK5kbAQC
02:03
< catalyst>
THERE
02:04
< catalyst>
oh, wait I can remove the parameter names
02:04 * catalyst wonders if she's gone past pedantry into sleepless mania at this point
02:04
<&McMartin>
Hee
02:07
< catalyst>
conclusion: definitely - http://paste.ofcode.org/pq9LjVbtQPU9Mr4kGRwRvH
02:09
< catalyst>
fs, every time I think it's minimal enough I find a way to shave bits off
02:11
< catalyst>
Pretty sure this is the smallest I'm getting it: http://paste.ofcode.org/3pFkccbKHta7xYYDjNRzCc
02:12
< catalyst>
...that was a lie
02:15
< catalyst>
http://paste.ofcode.org/35JukEyvQmnrf9fR2HxU2EG
02:15
< catalyst>
:D
02:15
< catalyst>
(someone tell me to stop)
02:19
<&McMartin>
plz stop
02:19
<&McMartin>
go to bed
02:19
<&McMartin>
you're drunk
02:19
<&McMartin>
on power
02:19
<&Derakon>
And possibly on alcohol.
02:21
< catalyst>
I'm teetotal for a reason
02:21
< catalyst>
I feel like I might be an alright programmer right now, though
02:22
<&Derakon>
Ahh, then you are in the madness place~
02:22
<&Derakon>
Delusions of competence strike us all from time to time.
02:23
<&McMartin>
Now now
02:23
<~Vornicus>
So wait that's -- hang on, you've done - built a "base" struct that contains a "foo" and a "bar", and then building a derived object that-- I don't know what the hell you're doing with that using
02:23
<&McMartin>
using is the new typedef
02:23
<@Reiv>
If Vornicus can't follow it, I am relieved.
02:24
<&McMartin>
Oh wait
02:24
<&McMartin>
That is "re-import the declarations from _____", I think
02:24
<&Derakon>
Catalyst and McM have openly admitted that this is deep magic.
02:24
<&McMartin>
using itself is not so much deep magic
02:24
<&Derakon>
I sincerely hope there's no shame in not understanding it because I don't have a clue.
02:24
<&McMartin>
But it's one of The New Bits
02:24
<&Derakon>
Well, maybe not using necessarily, but std::forward et al.
02:24
<&McMartin>
Yeah
02:24
<&Derakon>
(I also don't know what using is either~)
02:24
<&McMartin>
That's now missing from the latest
02:24
<&Derakon>
(I mean, aside from "using namespace std"~)
02:24
<&McMartin>
(In C++98, it was the equivalent to... yeah)
02:25
< catalyst>
the latest one is pretty simple
02:25
< catalyst>
derived is is a class that wants to use the constructors from base
02:25
< catalyst>
is just*
02:25
<&McMartin>
!
02:25
< catalyst>
wait, I was wrong
02:25
<&McMartin>
And that's a private derivation, isn't it
02:25
< catalyst>
I can reduce it further
02:25
< catalyst>
it works with public as well
02:25
<&Derakon>
You're playing golf with crash-the-compiler?
02:25
<&McMartin>
... yes?
02:25
< catalyst>
I have been for the past hour, what of it?
02:25
<&McMartin>
That's standard practice
02:26
<&Derakon>
...yes, you're right.
02:26
<&McMartin>
"Minimal repro", etc
02:26
<&Derakon>
A minimal reproducing sample is generally appreciated by the developers of whatever you're filing a bug report against.
02:26
< catalyst>
oh shit dawg
02:27
< catalyst>
oh, no, that is the minimal one
02:27
< catalyst>
you need to derive from a templated type with two templated constructors
02:28
< catalyst>
onto templated types
02:28
< catalyst>
then attempt to use one of them
02:28
< catalyst>
and it crashes without any other error output
02:28
< catalyst>
there appears to be another report of the same assert with like 500kb of compressed source attached :|
02:29 * catalyst thinks that perhaps hers might be more useful
02:29
<&Derakon>
Haha.
02:30 * McMartin confirms that g++ will compile the code
02:30
<&McMartin>
But not link it >_>
02:30
< catalyst>
xD
02:30
<&McMartin>
(But that code won't link alone, anyway; none of declared constructors are defined, and there's no main)
02:30
< catalyst>
it's kind of past being useful at this point
02:31
<~Vornicus>
300 bytes is a little bit better than ...I guess it'd probably come out to 2MB
02:31
< catalyst>
McM: try this? http://paste.ofcode.org/AJFvS4sFbsTiM4fn52TjFb
02:33
<&McMartin>
Works
02:33
<&McMartin>
well
02:33
<&McMartin>
"control reaches end of non-void function"
02:33 * McMartin adds a return 0, works
02:33
< catalyst>
coolio
02:33
< catalyst>
(incidentally, the standard mandates that that implicitly returns 0)
02:33
< catalyst>
(so :P)
02:34
<&McMartin>
Even if it didn't though, hitting an assertion in the front end is *always* a compiler bug
02:35
< catalyst>
oh, sure
02:35
< catalyst>
given that correct code does not compile
02:35
<&McMartin>
And incorrect code is not correctly signalling an error
02:36
< catalyst>
aye
02:36
< catalyst>
well, it is... just orthogonal to the useful one ;)
02:36
< catalyst>
(honestly, I suffer ridiculously from imposter syndrome :/)
02:37
<&McMartin>
You can file this episode in your counterexample file >_>
02:40
< catalyst>
<.<
02:40
< catalyst>
(you think this is something that's uncommon to find?)
02:40
<&McMartin>
(Yes)
02:41
<&McMartin>
(Getting into corners deep enough that you hit compiler crashes in release-quality compilers is rare, and isolating it within two hours is A Feat.)
02:42
< catalyst>
it looks so innocuous
02:42
<&McMartin>
It's a baby scorpion! :D
02:44
< catalyst>
I guess if I look at what I was trying to achieve with the original code, writing that within a few hours belies that I implicitly understand move semantics and perfect forwarding, placement new/delete and templated name lookup
02:44
< catalyst>
and the rules about lvalue collapsing within template argument type deduction
02:44
< catalyst>
...that last sentence is probably enough evidence by itself
02:46
< catalyst>
I also love the mental image of playing golf with compiler crashes
02:47
<&McMartin>
They keep driving the little cart into lakes and sand traps, the bastids
02:48 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Leaving]
02:48 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
02:53 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving]
03:00 catadroid [catalyst@Nightstar-1dld15.dab.02.net] has joined #code
03:05
<@Reiv>
catadroid: Yeah, so, that entire sentence is Magic Wizard Words and I am generally pretty decent at parsing technical talk, it's my job
03:06
<@Reiv>
So yes, you're just fine~
03:08 * catadroid nods
03:09
< catadroid>
It's.. the concept seems quite simple but I'm also weird so
03:10
< catadroid>
I guess it only matters if you are writing very abstracted generic code
03:11
< catadroid>
And it determines whether things are moved or copied
03:16
<@Reiv>
It is /far/ from simple
03:17
<@Reiv>
It is only simple once you've already internalised several other complex topics, themselves only making sense in the context of a whole swirling world around them.
03:17
<@Reiv>
This being one of those things like where you can explain the theory of relativity very simply indeed... but to actually use the sucker requires you to have done all the hard work beforehand yourself. "But I can explain it simply" just means you've mastered it. ;)
03:23
<&McMartin>
I think I could manage to explain move semantics, but I'd want about three days of prep work writing slides and rehearsing lectures
03:30
<@Reiv>
Hence: Not exactly 'simple'
03:46 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
04:00 Turaiel is now known as Turaiel[Offline]
04:05 Kindamoody[zZz] is now known as Kindamoody
04:15 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
04:57 Alek [Alek@Nightstar-n7s.4qg.15.24.IP] has quit [[NS] Quit: overdue beroot]
05:11 Alek [Alek@Nightstar-n7s.4qg.15.24.IP] has joined #code
05:11 mode/#code [+o Alek] by ChanServ
05:11 Derakon is now known as Derakon[AFK]
05:51 Kindamoody is now known as Kindamoody[zZz]
06:20 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed]
06:42 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
06:48 celticminstrel [celticminst@Nightstar-uce74q.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:53 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
06:57
<&jeroud>
catadroid: If we were in the market for your skillset and I were authorised to do so, I would offer you a job at the maximum salary our budget could handle just on the strength of that conversation.
06:59
<&jeroud>
That demonstrates the kind of directed competence that is extremely rare to find.
07:18 Turaiel[Offline] [Brandon@Nightstar-7mqsi0.mi.comcast.net] has quit [Ping timeout: 121 seconds]
07:18 Turaiel[Offline] [Brandon@Nightstar-7mqsi0.mi.comcast.net] has joined #code
07:19 catadroid` [catalyst@Nightstar-1dld15.dab.02.net] has joined #code
07:19 catadroid [catalyst@Nightstar-1dld15.dab.02.net] has quit [A TLS packet with unexpected length was received.]
08:05 Kindamoody[zZz] is now known as Kindamoody
08:06 catadroid [catalyst@Nightstar-dddm21.dab.02.net] has joined #code
08:09 catadroid` [catalyst@Nightstar-1dld15.dab.02.net] has quit [Ping timeout: 121 seconds]
08:30
< catadroid>
jerith: that's extremely heartening
08:40
< catadroid>
jeroud even, sigh
08:47
< catadroid>
Move semantics are where you can transfer internal state from one object to another. You begin with one externally valid object and end with one externally valid object. Copy semantics only ever allows to begin with one valid object and end with two valid objects. C++11 allows you to distinguish these cases by overloading functions - you use a reference when the object is to be copied, and the new rvalue reference when it is to be moved. Situati
08:48 Kindamoody is now known as Kindamoody|afk
08:49
< catadroid>
This has two effects - when users naturally refer to complex objects by value, the code is naturally faster because the language elides a lot of pointless copies.
08:51
< catadroid>
And you can use the compiler to enforce uniqueness by only declaring the move operations and not the copies (which is what enables unique_ptr)
08:54
< catadroid>
The template type deduction rules now allow you to write template arguments that decay to either an old style reference or an rvalue reference - so your code is optimal in the case where you are allowed to move into functions deeper in your implementation but keeps a reference to the original object if not
08:57
< catadroid>
And you only have to write one implementation to cover both cases. In code this looks like an rvalue reference to a template type - but it might decay to either be an rvalue reference or an lvalue reference depending on whether the thing passed to you was either of those things. The problem is that once your argument is named, it is treated as an lvalue reference. Perfect forwarding allows you to use the original template argument to preserve th
09:01
< catadroid>
Again, this is achieved by casting the type of the object to call the correct overload - this is what std::forward does.
09:01
< catadroid>
And if any of that makes sense, then I'm glad.
09:19
<@gnolam>
Well, some of it got cut off.
09:19
<@gnolam>
".. when it is to be moved. Situati", "... reference to the original object if not ", "... allows you to use the original template argument to preserve th"
09:33
< catadroid>
http://pastebin.com/j3w4QKxX
09:33
< catadroid>
^ couldn't make it paste into either of my preferred places so have one at the devil's site
11:12
< catadroid>
I do feel like less of a fraud than normal, which is nice
11:19
<@TheWatcher>
\o/
11:22
<@gnolam>
Yay! With the Scotch-draining "port a custom printing solution from 20 years ago" stuff brought up to a working level (it prints, and I can change stuff in a WYSIWYG interface rather than an arcane proprietary macro language), I can finally start /adding/ features.
11:23
<@TheWatcher>
Now the madness truly begins!~
11:47
< catadroid>
:D
11:48 * TheWatcher ponders that to call this function
11:50
<@TheWatcher>
I suspect it should be `sub deepfork { ... }`, but that seems wrong somehow...
11:56 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code
11:56 mode/#code [+o Crossfire] by ChanServ
13:29 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
13:53 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
14:37 catadroid` [catalyst@Nightstar-l3fl7b.dab.02.net] has joined #code
14:39 catadroid [catalyst@Nightstar-dddm21.dab.02.net] has quit [Ping timeout: 121 seconds]
14:49
<@froztbyte>
http://blog.chipx86.com/2016/01/26/a-tribute-to-vmware-workstation-fusion-and-ho sted-ui/
14:51 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [Ping timeout: 121 seconds]
15:09 catadroid` is now known as catadroid
15:17 Natanial [NSwebIRC@Nightstar-f3k.t3q.245.162.IP] has joined #code
15:33 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
15:37 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
15:37 mode/#code [+o himi] by ChanServ
16:04
< Natanial>
hi
16:08 celticminstrel [celticminst@Nightstar-uce74q.dsl.bell.ca] has joined #code
16:08 mode/#code [+o celticminstrel] by ChanServ
16:16 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
16:22
<&jeroud>
Hello Natanial.
16:22
<@gnolam>
... and of course I had to go back and redo the arcane macro language parser >_<
16:22
<&jeroud>
Do you write software?
16:22 froztbyte [froztbyte@Nightstar-frrora.za.net] has quit [Ping timeout: 121 seconds]
16:23
<&jeroud>
If not, this channel is an excellent place to learn. :-)
16:26
<@gnolam>
And with that I naturally also discovered that the vertical alignment is off between the editor and the output.
16:26 * gnolam sighs.
16:28 froztbyte [froztbyte@Nightstar-frrora.za.net] has joined #code
16:28 mode/#code [+o froztbyte] by ChanServ
16:29
<@gnolam>
Relatedly, the Hardest Problem in Computer Science also applies to file extensions.
16:32 Kindamoody|afk is now known as Kindamoody
16:46
<@Alek>
Naming Things? I heard it was tied with Cache Invalidation.
16:47
<&ToxicFrog>
The two hardest problems in CS are naming things, cache invalidation, and counting.
16:57
<&McMartin>
That sure is problems 0-2.
17:31
<@Alek>
:P
18:07 Kindamoody is now known as Kindamoody|afk
18:33 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: WeeChat 1.3]
18:37 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
18:37 mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ
18:39 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [Ping timeout: 121 seconds]
18:47
< abudhabi>
http://www.adityaravishankar.com/projects/games/commandos/
18:50 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has joined #code
18:59 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
19:02 kourbou [kourbou@Nightstar-deqg8j.fbx.proxad.net] has quit [[NS] Quit: Iām not a psychopath. Iām a high-functioning sociopath. Do your research.]
19:15 catadroid [catalyst@Nightstar-l3fl7b.dab.02.net] has quit [[NS] Quit: Bye]
20:18 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
20:18 mode/#code [+o Reiv] by ChanServ
20:39 Natanel [NSwebIRC@Nightstar-f3k.t3q.245.162.IP] has joined #code
20:42
< Natanel>
hi?
20:50 Natanel [NSwebIRC@Nightstar-f3k.t3q.245.162.IP] has left #code [""]
20:54
<@gnolam>
ToxicFrog: I prefer the phrasing "... and off-by-one errors".
20:59 Natanel [NSwebIRC@Nightstar-f3k.t3q.245.162.IP] has joined #code
21:05 Natanel [NSwebIRC@Nightstar-f3k.t3q.245.162.IP] has quit [[NS] Quit: Page closed]
21:11 Meatyhandbag [sebastianfe@Nightstar-6bm.1a3.224.136.IP] has joined #code
21:34 Netsplit *.net <-> *.split quits: Ogredude, abudhabi, @Reiv, Natanial, @Alek, Emmy, @McMartin, @froztbyte, @Syloq, Attilla, (+4 more, use /NETSPLIT to show all of them)
21:35 Netsplit over, joins: &jeroud, &jerith, VirusJTG, @Alek, &McMartin, @froztbyte, @Reiv, Natanial, Attilla, [R] (+4 more)
21:35 Kindamoody|afk is now known as Kindamoody
21:41 * Azash scratches head
21:41
< Azash>
Has anyone here ever embedded an LCD display (from a monitor or similar, desktop use sized) in wood or similar?
21:46
<@gnolam>
How big? If it's small enough, you don't have to worry about heat.
21:50
< Azash>
gnolam: Well ventilation can always be sorted
21:50
< Azash>
My thoughts are mainly how I should go about attaching it
21:54 Meatyhandbag [sebastianfe@Nightstar-6bm.1a3.224.136.IP] has quit [Client exited]
22:01
<@gnolam>
Are you dealing with a screen that's meant to be embedded or are you embedding a regular consumer screen?
22:02
<@gnolam>
(I'm counting a laptop screen as the former)
22:09
< Azash>
It'd probably be the latter
22:09
< Azash>
Unless I stumble on affordable ones of the former that have usable resolution
22:12 Kindamoody is now known as Kindamoody[zZz]
22:35 Reiv_ [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
22:36 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
--- Log closed Thu Jan 28 00:00:26 2016
code logs -> 2016 -> Wed, 27 Jan 2016< code.20160126.log - code.20160128.log >

[ Latest log file ]