« first day (1626 days earlier)      last day (3327 days later) » 

12:00 PM
Unicode has its own line separators :v
@BartekBanachewicz Congrats
 
@BartekBanachewicz yeah. You're careless :)
 
base_auth.html, menu-auth.html
Good thing we have consistency there
 
What is the following operator called
operator const T&()
 
the "tand" operator
 
12:04 PM
@AlexM. I like it.
Hmm, I can't using class::enumerator; :(
 
@R.MartinhoFernandes during merge
 
@Pris It’s a conversion operator.
 
@sehe we have no automated tests and I refactored code that worked like this:
 
@BartekBanachewicz lol what
 
12:07 PM
    class C {
       bool x;
       void f() {
         if (!x) {
            ...
            x = true;
         } else {
          #ifdef WINDOWS
           f();
          #endif
         }
       }
   };
 
Thanks for formatting
 
How's that related to newlines?
(Looks like infinite recursion from here)
 
f() eats them
 
@LucDanton thats what i was looking for, thanks
 
@R.MartinhoFernandes Windows sucks.
 
12:08 PM
@BartekBanachewicz error on line 5
 
@R.MartinhoFernandes well I don't remember how it looked exactly, but the point is it used a member flag and called itself again to do something completely different
 
@AlexM. It's "tamper sand"
 
So what newlines changed
 
12:09 PM
I refactored the proper parts into separate functions and changed the strucure a bit
 
You just fucked up a merge :v
 
and then... well yes. that.
 
@CatPlusPlus He wouldn't have if all source was on a single line
 
I mean the bad code was also a reason but still
I just wanted to rant on newlines actually
 
I still don't see what this has to do with blaming OS designers for newline differences
 
12:11 PM
Hi, can someone help me? I have a project that has "src/ia32/foo.cc" folder and inside that folder is #include "src/bar.cc" instead of "../../src/bar.cc". The project is build using a cmake, what should i write into cmakelists so the #include will find files on correct path?
 
@LightnessRacesinOrbit Well, you just provided the missing link
 
Can anybdy pls tell that if it is true that in dynamic polymorphism at compile time, type is not identified just because its the pointer(base) to which an object(derived) is assigned. I mean pointer means just address and compiler is not able to determine the type. Pls help...Its simple but frustrating
 
> dynamic polymorphism at compile time
 
> dynamic polymorphism at compile time
 
12:12 PM
1
A: How to create an interface for a stateful component where the state type is opaque?

Petr PudlákFirst, I'd suggest to read Combining multiple states in StateT, just to see other available options. Since in the case of nested states we need to update values inside more complex objects, using lens can make life a lot easier (see also this tutorial). A value of type Lens' s a knows how to rea...

 
@milleniumbug lol, same time
 
@cbinder Roughly, yes. It needs to inspect (chains of) vtable pointers at runtime
 
Bartek dances around
nanana
 
@milleniumbug Well it's not hard to see that dynamic polymorphic code is compiled too
 
belief in haskell restored
this thing can be done
 
12:13 PM
you dance alone in the office by yourself during working hours?
 
@milleniumbug yes
 
I can do it.
 
> (though I might backpedal from that, given how much pain it is to work with regular haskell records)
That's more like "forward-pedaling", no?
 
so why @ compile time type is not identified
 
Because you don't specify it (and it hasn't been deduced). Next.
(inb4 semi-related "But de-virtualized calls")
 
12:14 PM
@BartekBanachewicz help! it's melting me mind
 
@cbinder closed as "unclear what you're asking"
 
K.K
@chmod711telkitty: Well, in my office we are allowd to dance, sing,whatever...as long as we are giving them what they want...they dont mind ..:)
 
@sehe well the library used lens before. I'm not sure which direction this is going. Sideways, perhaps.
 
@milleniumbug What's unclear. He's asking what keeps the compiler from knowing the type at compile time
 
@sehe exactly
 
12:15 PM
@cbinder I answered it (from two different angles). Now (a) search SO (b) find the ask button if needed
 
@sehe suffice to say he's peddling something
 
Line Separator, U+2028 is the best newline :D
 
@cbinder because it's dynamic polymorphism
 
Base *b1 = new Derived1;
Base *b2 = new Derived2:

At compile time itself it can be deduced that base class points to derived object and its functions are called
 
@cbinder the whole point is that the object's true type is not statically known
@cbinder That is not true in the general case.
 
12:19 PM
That awkward moment when you have a race condition between UI update and counter update that cases a lethal security hole iPhone PIN brute-forcing
 
void foo(Base* ptr);
void bar()
{
   foo(new Derived1());
}
 
@cbinder Base* b = (std::rand() % 2) ? new Derived1 : new Derived2;
 
Now, define foo in another translation unit. How is the compiler to know, when it compiles foo, that ptr points to a Derived1? What about other calls to the same function?
 
hmmm...@milleniumbug ur expression makes sense
 
The entire point is that this determination be made at runtime so that you may call foo with pointers to objects of different derived types.
 
12:20 PM
@cbinder This is called devirtualization and compilers can do that. As an optimization. However, in the general case, e.g. when b1 is marked volatile or a load/store is performed, the compiler cannot assume anything anymore
 
Base* b = function(); //function returns Base* via return new Derived1;
 
So does mine, by the way.
 
I think this is similar to milleniumbug's though
 
@LightnessRacesinOrbit yup :)
thanks
 
You're right that in the very simple example Base* b1 = new Derived1; b1->something(); delete b1; the compiler could probably optimise out the vtable lookup. I'm not sure whether it would.
 
12:22 PM
Are there any resources for dealing with crappy code?
 
f(base const& d);
int x = 0;
std::cin >> x;
if(x == 0) f(derived0());
else f(derived1());
 
@LightnessRacesinOrbit if this is the case then textbook mentioning these simple example should write this as footer note that it can be optimised
 
@cbinder Consider this.
 
there was this IDE that was only able to infer the type in cases like auto a = new something; but I can't remember which one
maybe eclipse with the D plugin, but I don't remember any inference going on
 
It's really annoying to commit mistakes because the code is ultimately shitty
I dont work that way
 
12:23 PM
@cbinder I don't see why it's important. And, again, I'm not guaranteeing that it either can or will be optimised out.
@BartekBanachewicz It sounds like you're making excuse after excuse for fucking up
 
My codebases have static guarantees and tests
 
18 mins ago, by Bartek Banachewicz
@sehe we have no automated tests and I refactored code that worked like this:
 
How the hell do i become "more careful"
 
well, welcome to the real world. suck it up and rely more on diligence than automation
in short, pay attention more :)
(honest answer)
 
Don't refactor stuff without tests.
 
12:25 PM
Uh
 
@BartekBanachewicz by having the tests :)
 
We have no tests. Adding them is outside my tasks
 
Then "careful" is to not make any changes. Or at least not promising they'll work
 
"I fucked up. I'm blaming someone else. How can I fix that person's code? Or at least how do I best work around it?" "Write tests." "Not my job."
well sod off then
 
How do i tell that to my manager?
 
12:27 PM
politely
 
How to refactor:
1. Establish what the code does.
2. Of everything the code does, find the bits that count as useful.
3. Confirm the code does the bits in #2.
4. Refactor.
5. Confirm the code does the bits in #2.
#3 and #5 are tests.
Even if you don't "add" them, you have to perform them.
 
We have human QA and they let that slip
 
I don't mean to sound harsh, but aren't these the very most basic principles of software development?
@BartekBanachewicz QA is not this.
You test your code before you commit it. You don't just "hit and hope" then rely on QA to discover your bugs. You're not done with your task until you've verified that it does what it's supposed to.
 
ax + ay + az == c => a(x + y + z) == k /* all refactored */
 
But still I was told to be more careful. Is that a reasonable expectation?
 
12:29 PM
lol
@BartekBanachewicz Yes, absolutely.
 
Xeo
One can always be "more careful"
 
@BartekBanachewicz Somehow you managed to introduce a bug during a merge due to fucking newlines. You definitely need to be more careful.
 
@LightnessRacesinOrbit Even better: "I'm blaming the course of history and evolutionary growth of things"
 
And verifying your fix is just the fundamental beginning of taking care
can't fathom why you wouldn't do that
 
12:30 PM
Is this the first device manufacturer to do this?
 
@LucDanton :D
 
It goes all the way back to the Xperia S.
Too bad my Xperia P just misses out though :(
 
@rubenvb Likely. Google has made an effort to make AOSP undesirable.
 
@LightnessRacesinOrbit it was a corner case untestable on pc
It only appeared on devices and all the testers missed it
 
12:32 PM
how stupid was the bug, in terms of code?
1-10
 
Xeo
11
if it stems from a newline problem during merging
 
3-4? It forgot to process one variable in a special way
 
Okay. Short story.
 
Forget about newline it was a logic thing actually
 
My project manager calls me over.
PM: "Did you ever see this message?"
Me: "Huh?"
PM: "It's a c++ message!"
/me walks over
Browser dialog box says: "h is undefined"
... okay then
@BartekBanachewicz Yeah. Fuck people who thought it was a good idea to have a difference between logic and line-ends. Seriously. Fuck them
 
12:35 PM
@sehe uh oh
 
I just don't know where does my responsibility end
 
@BartekBanachewicz It ends when your dismissed. Not joking.
 
If I am not allowed to allocate time for automatic testing, how much time do I have to test manually
 
It's hard to say more without knowing the bug. That is, without knowing how reasonably you should have caught it.
 
@DonLarynx :D I his defense this is a-typical for him. He just suffered a (rather funny) brainfart I guess
 
12:35 PM
If qa fails its still me who introduced the bug
 
@BartekBanachewicz Not enough
 
@BartekBanachewicz As much as you need to ensure your code works?
 
@BartekBanachewicz qa didn't fail you. You just realized qa is not a silver bullet
 
I am a human being, I make mistakes. That's why I use tools
 
I actually wrote some manual integration tests on Thursday
 
12:36 PM
That's why you should be more careful. So that you make fewer mistakes.
 
That's why I statically verify my code
 
@BartekBanachewicz QA are not tools. At least, it's impolite to say so
 
Reliance on tools is p retarded
and it shows now
 
apparently automating integration tests across the whole stack is too difficult for us
 
@Sehe uh.
 
12:36 PM
but that's no excuse for not having tests
 
we have a shitton of manual tests
but that's kind of unavoidable due to the nature of what we do
 
@BartekBanachewicz So, live with it. Learn. People make mistakes. I commit bugs on a daily basis. At a certain point you get very very careful about bugs that might cause actual damage
 
you can't automate a room full of lab equipment
 
user1804599
I'm voting to close this question as off-topic because it is about benchmarking unoptimized code. — Ñ€Đ°Đ¹Ñ‚Ñ„Đ¾Đ»Đ´ 6 secs ago
 
well you can with a few billion pounds and some robots, I guess
 
12:37 PM
actually I have never paid attention to whether 'x is undefinte' has the same usage, by that I mean exact wording in Java, C++, C & C#
 
@LightnessRacesinOrbit Yeah, same here.
 
Kinda hard to automate people's brains, or eyes.
 
Xeo
Wow. Do you have any idea why optimizations make such a big difference? Do you know which kind of opimization makes this difference? — moose 1 hour ago
lol
 
Wait, that gives me an idea.
 
12:38 PM
Ultimately I would agree that QA should be told to take more care, before you are. They are the last line of defence against shitty programmers so they should have protected the world from your error. That's literally their job.
But that doesn't mean you shouldn't take more care.
:)
 
@Xeo EWWWWWWWWWWW Rust comes with micro-benchmark functionality.
 
@R.MartinhoFernandes uh oh
 
I am afraid I don't have the ability to magically become more careful
 
Xeo
@R.MartinhoFernandes wat
 
@Xeo No need to do that start = now, end = now bullshit.
It annoys me.
 
Xeo
12:40 PM
Ah. "eww" as in, what the OP's code does.
Not, as in, "Rust has a micro-benchmark framework"
 
@R.MartinhoFernandes How so? Except from not updating the browser, keyboard, and mail/calendar apps (all with alternatives), I don't see what is so bad about AOSP?
 
@rubenvb Undesirable for manufacturers.
 
Man the property binding stuff on this site seemed neat at first but it makes no sense to me. I hate when people don't explain their code for the dumber devs like me woboq.com/blog/property-bindings-in-cpp.html
 
the day after tomorrow is ___
 
12:43 PM
Android might be ~open~ but firmware is hard to get by and flashing is not supported by anyone
 
@LightnessRacesinOrbit iWish
 
Android might be open, but hardware manufacturers are being retarded.
 
I wanna a dual OS phone
 
It's like reliving PC history from about 30 years ago.
 
12:45 PM
@Pris have you considered that some topics are just ... Complex?
 
@milleniumbug Blame Google.
 
I wanna be able to have the choice of whether to start my phone in either Android, iOS & windows
 
I'd like the choice of weather too.
 
@BartekBanachewicz idunno the responses on that site made it seem like everyone understood what was going on. The code is also really short, its just not clear to me what its doing
 
Can someone (following me on twitter) confirm that my last tweet about Nonius is showing up in my public timeline?
I just realize it might have been a mistake to start with @reply
 
12:46 PM
4 day weekend coming up woot
 
@R.MartinhoFernandes Just commission it
@R.MartinhoFernandes Arrg. Will repost
 
@sehe No.
@sehe You can check by looking here: twitter.com/sehetw, I think.
 
lol std::polar
std::bi::polar
 
@sehe it worked
 
Congrats @martinfernandes on v1 of #Nonius nicely done benchmarking microframework for #cpp https://github.com/rmartinho/nonius/releases/tag/v1.0.0
 
12:49 PM
Thanks.
 
Bonus: typo fix.
 
Ah. Fro was in there? I thought it was stupid twitter web UI making it near impossible to copy/paste
 
would be mad if my phone is also a taser, that would be awesome ~_~
 
also apparently f ( x ) is in our style guide
 
@R.MartinhoFernandes ISTR going directly to a feed also shows direect replies anyways.
 
12:51 PM
@Pris it looks straightforward. And has a lot of comments
 
@sehe There's a tab for that.
 
tabs are great
@BartekBanachewicz ok that's terrible
 
I'm so happy I get to format my code in my own way
 
@R.MartinhoFernandes W00t. Now I'm wondering whether that changed a year ago and I never noticed
 
12:53 PM
imagine if I were forced to right-align asterisks in declarators. ugh
 
@sehe Something like that, yes.
 
ugh asterisks in declarators
 
I would have a breakdown
 
Meaning, you'd hardly notice the difference
 
This project is draining me
 
Catdrain - Drains 5% cat every second, lasts 9 months
 
I was just told my code is "too structured"
 
@CatPlusPlus what project?
 
fuck
my
life
 
Work project
 
12:58 PM
ye
"we're using full OOP not structural programming"
 
Xeo
lol
 

« first day (1626 days earlier)      last day (3327 days later) »