« first day (673 days earlier)      last day (4293 days later) » 

6:24 PM
@R.MartinhoFernandes wheels::value_ptr allows for polymorphism with value semantics, right?
 
Aight. Exactly what I need.
Does it have many dependencies on your other libraries?
 
I have a single header version of each component in the downloads page.
 
Awesome.
You are the greatest robot on earth.
 
Check if it compiles fine in clang.
 
6:28 PM
K sec. I need to get my code right.
 
There were some issues with it a while back and I haven't checked again.
 
Is there a make_value? How do I use it?
 
> /wheels/include/wheels/smart_ptr/value_ptr.h++:1782:65: Member access into incomplete type 'wheels::value_ptr<daklang::StmtNode, wheels::copy_constructor_cloner<daklang::StmtNode>, std::__1::default_delete<daklang::StmtNode>>'
Hmm wait a sec.
template<class T>
void append_stmt(T&& node) {
  static_assert(std::is_base_of<StmtNode, T>::value,
                "Node must be a subclass of StmtNode.");
  statements.emplace_back(wheels::make_value<T>(std::move(node)));
}
StmtNode is an abstract class and I pass it a subclass which is copyable and movable.
 
@RadekSlupik Hmm, how can that be incomplete?
 
6:32 PM
I have no idea.
 
Lemme check line 1782 (ow)
 
Short, self-contained, incorrect (uncompilable) example: gist.github.com/3396957
 
    ~value_ptr() noexcept(noexcept(std::declval<value_ptr>().reset())) {
WTF?
 
lolz
 
GGG
o_o
 
sbi
6:36 PM
@R.MartinhoFernandes Huh? You have less badges (in any category) than I have? Despite the fact that I haven't given more than 2 answers per month (on average) for about a year or two?
@sehe Well, I was in bed <15mins after that. You?
 
@sbi bronze badges.
@sbi Still, you have 50% more answers than I have.
 
sbi
@Chimera The complete and utter newbie you are, you don't even have one over me, let alone 5.
@R.MartinhoFernandes Do I? What have you been doing all that time? Hanging out in the chat? Slacker!
@TonyTheLion Don't worry, we are used to you being a dork anyway. :) Also, you (and @Chimera, prolly) were the only one taking this serious.
 
@R.MartinhoFernandes umwot?
looks like throw throw throw throw throw throw throw throw "Excepshuns" to me
 
sbi
@rubenvb Here it felt like we got 57°C in the sun today. I severely missed that apple tree's limb that I had to cut off last weekend for sitting in its shadow. It was so hot, for large amounts of times even the kids were somewhat apathetic.
 
@DeadMG The double noexcept is correct (C++ disappoint).
But the compiler claims value_ptr is not complete at that point. Which it clearly is.
 
6:43 PM
tisn't
I think
 
@R.MartinhoFernandes all diagnostics: gist.github.com/3396981.
 
isn't it basically the same thing as auto foo() -> decltype(declval<this_type>()->some_member()) { ... }?
 
The first is the noexcept specification, which takes a boolean argument. The second is the noexcept operator, which converts an expression to a boolean.
 
the funny thing is
 
@RadekSlupik Thanks.
 
6:44 PM
in C++11, you can write a definition of a member so that it returns "the thing that member returns"
 
@RadekSlupik Hmm, I built a similar test case and it doesn't compile in GCC either, but with different diagnostics (which actually seem to make sense, btw).
 
maintenance win, IMO
 
@DeadMG Hm, just auto foo() would be much better...
 
@R.MartinhoFernandes Absolutely it would. But that's what you get in C++ :P
 
I think the issue is that cloner<derived> is not convertible to cloner<base>. Ooops.
 
6:48 PM
@R.MartinhoFernandes lambdas! :D
 
@R.MartinhoFernandes pwntificated
 
I once wrote a value_ptr and called it poly_val but I deleted the source code. :(
 
@RadekSlupik would you mind entering an issue in the tracker for me?
 
@R.MartinhoFernandes Linky?
 
(I'm kinda busy with a big refactoring on ogonek right now.)
Oh wait, the fix is quite simple, it seems. Found the bastard: EnableIf<std::is_base_of<T*, U*>>
 
6:51 PM
Oh okay.
 
Of course pointers are not base of other pointers.
 
@sbi Ooo, close call. I think I was earlier. Usually I don't tak 5mins, but I did the dishwasher and went back to let the cat in. Let's call it a tie (I didn't actually note the time :))
 
@R.MartinhoFernandes I can't inherit from pointers? :( ;)
@sehe Who let the cat in?
 
Who let the dog out?
 
My compiler is going to be so great. throw ParseError("Expected identifier"); and throw ParseError("Expected ';'");.
 
sbi
6:52 PM
@sehe I don't wear ties.
 
The user may use a debugger to find out why his code doesn’t compile.
 
who = let the = cat in ...
 
@sbi Then, what took you the other 10 minutes?
@RadekSlupik Why hardcoded errors? Why not just dynamically enumerate the tokens that could be expected/accepted at the particular time?
 
@RadekSlupik Well, I'd appreciate if you entered the bug, because I want to add a test for this later. But if you want a quick fix, just change line 47 to EnableIf<std::is_base_of<T, U>> = _> (i.e. remove the stars).
 
@sehe how would I do that?
 
6:54 PM
@DeadMG Soo useful
 
sbi
@sehe Brushing my teeth, having a look at the kids, arbitrarily closing some windows, arbitrarily opening others, changing into my night gown, going back to the sitting room to retrieve my book...
 
@RadekSlupik By knowing in your lexer state table what token were expected
 
@R.MartinhoFernandes line 47 in which file?
 
@sbi You bring a book to bed? Whoa. At 2am
 
Ah wait. I’ll do find and replace.
 
6:55 PM
@RadekSlupik value_ptr.h++.
 
I don't take 5 mins to reach my bed. And I don't take 5 mins after that to be sound asleep
 
@R.MartinhoFernandes I am using the single-header version. :)
But I found it.
 
sbi
@sehe Well, I probably slept before I could finish the second page, but I never go to bed without my book, and I can't imaging closing my eyes without having read something.
 
@RadekSlupik Can't you at least have "Expected identifier *after class at line X and column Y"?
 
@RadekSlupik Oh, right, :S
 
6:56 PM
@R.MartinhoFernandes Line 1696.
@DeadMG I am going to do that, yes.
 
Yeah, that's it.
 
Still does not work. xD
 
Works in GCC :P
Clang sucks.
 
meh :<
 
Did the errors change?
 
6:58 PM
@RadekSlupik You get to supply patches for clang support now
 
How in the world does this compile?
0
Q: Pointer to member variable

K.KThe following program output is always 1 1 1. In "Inside the c++ object model" book, it is mentioned that it will give offset. The purpose is also to find out object layout. But, I am confused with the output. Used g++ 4.5.2 class Test { public: float a; float b; flo...

You can do this?
float Test::*ptr = &Test::a;
 
@R.MartinhoFernandes /Users/daknok/Desktop/daklang/wheels/include/wheels/smart_ptr/value_ptr.h++:1749‌​:13: Static_assert failed "conversion cannot cause slicing" among others
 
@Mysticial Yes.
 
@Mysticial yep
 
6:59 PM
@RadekSlupik Do your types have clone members?
 
AAhhhhh.
 
You can't magically do polymorphic copies.
 
I feel stupid to have never seen such syntax - let alone know what it does.
 
/wheels/smart_ptr/value_ptr.h++:1687:24: Allocating an object of abstract class type 'StmtNode'
@R.MartinhoFernandes no, they do have copy constructors.
 
sbi
@Mysticial Don't say you've never heard of member pointers!
 
7:00 PM
@Mysticial That's OK. There's a reason you've never seen it and it's because they suck.
 
@Mysticial It's a pointer to a data member.
 
essentially
 
Like pointer to a member function.
Except for data.
 
@sbi Heard of them, but never used them.
 
@RadekSlupik Copy constructors in polymorphic types slice.
 
7:00 PM
Nobody uses them.
 
My value_ptr will refuse to slice. (You can write a custom cloner that slices, but it's your fault).
 
@RadekSlupik Copy ctors are not polymorphic.
 
sbi
@Mysticial Ah, that's Ok then. In 15 years of writing C++ code, I've used them probably twice.
 
@sbi I've used &Foo::method with std::bind and such. But you don't have to write the type for that :)
 
7:05 PM
    class base {
    public:
        virtual base* clone() const = 0;

        virtual ~base() = default;
    };

    class derived : public base, private tracer<derived> {
    public:
        derived* clone() const override { /* do the stuffs */ }
    };
    // works with the default cloner.
 
sbi
This (not for the squeamish) is an image of Pjotr Pawlensky, while he had sewed shut his mouth in support for Pussy Riot.
 
Puppy riot?
 
@sbi Oh, the image is real? Wouldn't shopping it be a lot less painful? :)
 
What did @DeadMG do this time?
 
@R.MartinhoFernandes band in jail for protesting
 
sbi
7:06 PM
@R.MartinhoFernandes Sorry. Freudian slip.
 
Reverse Freudian slip.
 
That evil bus.
 
I took a trip to london
 
sbi
7:07 PM
@FredOverflow He was delivered to a hospital where they removed the thread. He then said he did it to protest against the increasing censorship.
 
and expressed my disappointment
 
20
Q: Why are side-effects considered evil in functional programming?

GulshanI feel that side effects are a natural phenomenon. But it is something like taboo in functional languages. What are the reasons? Edit: My question is specific to functional programming style. Not all programming languages/paradigms.

The lambda commands you to repent!
> In the end, any program must manipulate state. A program that has no side effects whatsoever is a kind of black box. All you can tell is that the box gets hotter.
 
7:24 PM
@JohannesSchaub-litb you were absolutely right about the upvotes :) stackoverflow.com/questions/12027977/…
 
@rubenvb ohh great!
 
@FredOverflow The box gets hotter? How impure!
 
@StackedCrooked gg
oh
it wouldn't if it was superconducting
and you also wouldn't be consuming electricity if superconducting, I think
 
@R.MartinhoFernandes I wrote this, though it cannot be empty/null and it is probably somewhat buggy. Also I should use make_unique and provide make_polyval.
 
user406009
@DeadMG Wait, don't the transistors still need power to switch?
 
7:40 PM
@EthanSteinberg Don't think so.
 
@RadekSlupik You can simply inherit from unique_ptr and add a copy ctor.
 
private inheritance?
Also good point. Didn’t think of that. xD
 
Also, what happens when I pass a Derived& that refers to an EvenMoreDerived?
 
What do you mean? EvenMoreDerived is subclass of Derived?
 
7:41 PM
No, it's just called that to confuse everyone.
 
lol
 
@DeadMG you consume energy when you do calculations. No way around that, not even with superconductors.
 
You're code has no way to determine the runtime type at compile time (that should be obvious).
That's why a strategy with copy constructors won't work in the general case.
 
I wonder how much more efficient a superconducting CPU could be
 
Again, the number of possible types when using subtype polymorphism is not bounded at compile time.
 
7:44 PM
@DeadMG remember every single contact (layer) has losses. It'd have impressive improvements, but far from what you might imagine.
 
well, I did once read the quantum mechanics behind a transistor, and it did not seem to me like a superconductor would lose energy performing such a mechanism
 
lol quantum mechanics behind transistor.
 
it's full of electrons and holes and energy levels
 
You can explain it very classically too, without much loss of information.
 
@rubenvb Everyone knows the quantum mechanics are in front.
 
7:47 PM
but maybe I'm too QM oriented to say such a thing and I assume too much.
 
really? I didn't know there was a classical explanation
what is it?
 
Warning: I may be talking out of my ass
 
@DeadMG I remember there was one from EM class. But I don't really remember much about it.
 
@sehe why would the lexer know anything about expected tokens? Isn’t that the job of the parser?
 
well, IIRC, the transistor was invented in, what, the late 60s?
that's well after the advent of QM
 
7:49 PM
Lexer takes character stream and produces tokens.
 
I don't know if this would register as classical, but let me give it a go...
transistor is something like this:
source----____---drain
          gate
now, there's no conduction because the electron concentration at the gate is too low.
Now, we apply a potential at the gate as to attract electrons to that gate, until the concentration is high enough to let electrons pass from source to drain.
 
Argh, I wish the curious dude stopped generating flags.
 
uh
you're going to attract a negatively charged particle to a place by .... adding more negative charges?
 
That would be my classical explanation. Never said it would be complete, or completely QM-agnostic.
 
last time I checked my electrodynamics, that's not how things worked
 
7:52 PM
@DeadMG no, you can apply a positive potential.
 
if you had a thing (the gate) with few electrons, then it would be very attractive to electrons
 
@DeadMG no, because it's neutral.
 
@R.MartinhoFernandes if he could talk to someone without insulting them... :P dude has no social skills.
 
a doped semiconductor is neutral.
 
right
so how, exactly, would a low concentration of electrons block current from passing?
 
7:54 PM
but it's Grimm on the telly. I might be back later
 
ok
 
@cHao Actually, I once had a fruitful and civil conversation with him.
 
@R.MartinhoFernandes no wai!
 
But that seems to have been the rare exception.
 
my universe, it's the upside downs
electrons have positive charge, antimatter dominates the universe, and gravity repels things
 
7:58 PM
@R.MartinhoFernandes how'd that work? did you gag him and tie his hands behind his back?
every time i've seen him post more than 2 messages to someone, it degraded into arrogance and insults
 
I have proof!
> A machine dispensing UDP packets had a sign saying "Out of Order".
 
My parser is working well. :)
 
@DeadMG I'm back for a few. Think about how an undoped semiconductor can conduct. Two ways: dope, or increase temperature to free electrons. In short: the higher the charge carrier concentration, the higher the conduction.
 
Except for the diagnostics, but I’ll do those tomorrow.
Scoping, I can do that with a stack of symbol tables, right?
On table per scope.
 
@rubenvb Doesn't increasing temperature increase resistance, reducing the useful charge it can carry?
 
8:11 PM
@DeadMG not in a semiconductor at moderate temperatures.
that is true for metals, which already have a large free electron concentration.
 
Showing formulae to the puppy? You're doing it wrong.
 
mobility is dependent on material (and temperature), concentration in a semiconductor is dependent on temperature as well, but in the other direction. The concentration rises faster than the mobility drops for an acceptable temp range.
@R.MartinhoFernandes I know.
Grimm's back.
 
sbi
@R.MartinhoFernandes Formula? That's my cue: youtube.com/watch?v=gZIUGreqrCY
 
@rubenvb no fair, I have to wait til the episode finishes airing before I can watch it :p
 
Ah well I will do the diagnostics right now.
 
8:16 PM
> If it’s a legitimate rape, the female body has ways to try to shut that whole thing down.
Wow. Those US politicians are really dumb.
 
What.
 
sbi
@R.MartinhoFernandes They are the cream of their people.
 
@sbi Yeah no, not really.
 
sbi
@Chimera What? No? Why not?
 
@R.MartinhoFernandes Got a link? That's a gem
 
8:26 PM
@sbi U.S. politician aren't the cream of the American people. A lot of them are just power hungry bastards who aren't anymore special than the regular Joe Schmoe down the street.
 
sbi
@Prætorian Just paste it into google. The web's full of it.
 
@R.MartinhoFernandes That is a really dumb statement. Which politician said that? Fucking idiots.
 
"Legitimate rape" on Google doesn't yield much else. For obvious reasons.
 
sbi
@Chimera Ah, don't let me tease you.
In which country are politicians anything but scum?
 
8:28 PM
@sbi Well, I think the problem is that a lot of politicians probably start out with the right intentions, but then get pulled into and corrupted by the system.
 
sbi
@Chimera It takes a certain kind of personality to make it to the top of politics. Unfortunately, that's not the kind of personality you'd want for your country's leaders...
 
And I personally dislike abortion, but it's not the governments place to tell people how to deal with such issues.
 
The Dominion of Melchizedek (DoM) is a micronation known for facilitating large scale banking fraud in many parts of the world. The president was Pearlasia Gamboa, wife of vice-president David Korem. Their activities were described by the Italian newspaper La Repubblica as “one of the most diabolical international scams ever devised in recent years.” Origin and Status The DoM was created in 1986 by Evan David Pedley and his son, Mark Logan Pedley. The latter also uses a number of pseudonyms, including "Tzemach Ben David Netzer Korem" and "Branch Vinedresser" (which is a rough English t...
 
@sbi I totally agree.
 
8:29 PM
@R.MartinhoFernandes What did you find? Bjarne cramming OO features into C?
 
@Chimera More importantly, I dislike rape, especially the legitimate kind.
 
I think I lost @DeadMG at the formula
I didn't think he'd go completely silent.
 
sbi
> The Dominion of Melchizedek (DoM) is a micronation known for facilitating large scale banking fraud in many parts of the world.
@R.MartinhoFernandes Yeah, right, you got me there. I bet their politicians aren't more scum than the rest of the population.
 
@R.MartinhoFernandes Well yeah, that goes without needing to be said.
 
evening fellas
 
8:31 PM
@Chimera That's the thing I don't get about most conservatives. They're very vocal in their opposition of not letting the government telling them what to do with their lives, until it comes to abortion
 
sbi
@Prætorian ...until it comes to the issues they feel strong about: Those they want protected by a strong government.
 
@Prætorian I agree.
Hi @TonyTheLion
 
hi.
what's up here?
 
sbi
I am not sure I should answer. You might consider it an attack.
 
8:39 PM
@sbi I did apologize yesterday, after you left
don't know if you saw it
 
sbi
@TonyTheLion You may guess three times whether I did.
 
oo, sounds like I missed some drama, for a change
 
@sbi lol
 
Maybe I'll check in again tomorrow. Bye again
 
Erm. Bye.
@jalf Have fun.
 
sbi
8:41 PM
@jalf Hey, why don't you stay? That drama was yesterday, and the only one considering it a drama was the lion.
BTW, @jalf, I meant to ask you whether the Copenhagen "Cykelsuperstier" is as good as our newspapers say. What do you think?
 
sbi
8:56 PM
> His penis was still smoking. — Eleven Eleven by Austin Chapman
 

« first day (673 days earlier)      last day (4293 days later) »