« first day (1095 days earlier)      last day (3836 days later) » 

12:00 AM
I have nothing against critique.
But saying "wrong" doesn't help.
 
Apparently I've only thrown 4 times in my code. github.com/Rapptz/Gears/search?q=throw&type=Code
 
Meaning?
 
I don't throw that much
 
I throw up, after eating a giaaaant pizzzzza ;0
 
If there is no reason to throw, you don't throw?
 
12:06 AM
truth
 
@Domecraft Semi-true part of the time -- but certainly nowhere close to a universal truth. You often want to read everything encrypted with an algorithm, not just with one password. Beating often won't help because a user frequently has no clue of the password anyway (e.g., password randomly generated for use with SSL orTLS). Allowing others t know you can decrypt their data often destroys much (most?) of the value of decryption anyway (e.g., change compromised passwords).
 
welp. BOOST_MPL_ASSERT is broken in VC++2013RC - ticket
 
eh
 
and it also breaks Iterator an Range =(
 
it's not their requirement to support RC's.
they will support the RTM, I expect.
 
12:15 AM
@DeadMG it's supported in boost.config
anyway, RC is it or not, I want that stuff working =\
I hope I'll fix MPL_ASSERT tomorrow today. 4 AM here, time to sleep
 
12:30 AM
goodnight everyone!
 
When is switch on strings useful?
 
You can't switch on strings.
 
I seem to recall wanting this once, but now that I think of it, it was probably a bad idea.
@Rapptz I didn't specify C++. C# can, according to an SO comment.
 
You technically can in C++ with some effort.
Just hash it
 
My knowledge of hashing is... nonexistent, but can't hashes for different objects produce the same hash?
 
12:36 AM
that's not a good hash function
 
Is there a way you can do it to guarantee uniqueness?
 
you can lower collisions by using a good hash function
to be honest you can probably just use std::hash<std::string> and it'll be okay.
 
@Pawnguy7 switch will guarantee uniqueness.
 
Likely. But any collisions in a switch is going to be a potential problem.
@Abyx how so?
 
@Pawnguy7 you can't have two case with same value
 
12:39 AM
@Abyx I would hope not.
What is the solution? Changing your string till it works?
Wait, doesn't the expression have to evaluate at compile time?
 
yep. constexpr will help
 
constexpr
 
but you still need to compare values after you switch on hash
switch(hash(s)) { case hash("xyz"): if (s == "xyz") ...
 
// This recieves any messages sent to the core engine in Engine.cpp
virtual void SendMessage( Message *msg ) = 0;
 
@Jefffrey hm?
 
12:42 AM
Are you serious?
 
lol
that's why I don't write comments
 
Is throwing exceptions, in constructors/destructors, bad in other languages too? Like Java?
 
why would throwing an exception in a constructor be a bad thing?
exceptions were practically designed to be thrown from constructors.
 
@Jefffrey There's nothing particularly wrong with throwing from a ctor in C++. Java doesn't have destructors, so throwing from a destructor isn't an issue. Java does have finalizers, but using them at all is mostly discouraged.
 
12:57 AM
@DeadMG not in C++ really.
 
@Jefffrey ctors are certainly one of the main reasons for inventing exception handling. Pretty tough (for example) to return an error code from a ctor being used to create a temporary object.
 
@Jefffrey Er, yes, that was one of their primary motivations.
 
yes, and?
 
That's the idea behind the "don't throw exceptions in the constructor" point.
 
1:02 AM
er, what?
there's no idea there that suggests that you should not throw in constructors.
 
@Jefffrey See The Design and Evolution of C++, section 16.5.1 for more of Bjarne's thinking on this specific subject. It starts with: "To some, the most important aspect of exceptions is that they provide a general mechanism for reporting errors detected in a constructor."
 
@DeadMG It says that if an exception is thrown in the constructor, the class won't be fully constructed and won't be deallocated, therefore leading to memory leaks.
 
@Jefffrey Er, no.
 
Hmm, yes?
 
it says that if an exception is thrown in the constructor, and you didn't use a member or local object to handle any resources you acquired, then you're a moron who writes exception unsafe code.
you can only leak memory by throwing in a constructor if your code would have leaked if you threw in a free function.
constructors do not incur any additional exception safety liability.
 
1:05 AM
Hi
 
@Jefffrey No, it doesn't. The destructor won't be invoked, because the object was never constructed. The memory won't leak though. If the object contains a pointer, and you've allocated memory dynamically, you typically catch the exception, delete the memory, and re-throw the exception.
 
Anyone here looking for a starting position as a programmer in the US?
It pertains to embedded framework/OS development
C++ experience is required
 
there's a Careers website for that.
 
@Jefffrey Normally, you want to avoid all that though by using (for example) an std::unique_ptr or std::shared_ptr to handle the deallocation automatically (fully constructed sub-objects will be destroyed automatically if their containing object throws).
 
@JerryCoffin I'm aware of that. And I'm aware of the problems of dynamic allocation and exceptions. But in that fragment it does not mention any internal dynamic resource of the class BookEntry.
 
1:08 AM
it just wasn't explicit about it.
you can't ever leak automatic memory.
only dynamic resources can be leaked.
and this specific behaviour can only cause a leak if you wrote terrible exception-unsafe code that doesn't use proper RAII objects- just like any other function.
 
@Jefffrey Yes -- that's just the only situation in which you can create a memory leak.
 
You guys are right.
I read the whole chapter again and he was referring to a raw pointer to dynamic memory within the constructor.
Sorry.
Actually, thank you, because you have prevented me from going out tomorrow, yelling out "don't use exceptions in constructors" and look like a fool. ;)
 
You can only leak when your primitives suck
If you follow rule of zero, then your primitives are already impervious to that
 
So, what happens when you have A a; and an exception is thrown in the middle of the constructor? Member variables are allocated, then the exception occurs and member variables are deallocated immediately?
 
@Jefffrey Assume something like: class A { B b; C c; D d; };, and C's ctor throws. b will be destroyed automatically. c and d were never constructed, so they won't be destroyed. If c allocates some memory with a raw pointer, then throws, it's up to its ctor to catch the exception, free the memory, then re-throw.
 
1:23 AM
Ok, got it.
 
1:43 AM
Oh good, I'm not the only one that doesn't know C++.
 
My nigga :P <-- Too ghetto. It's late. I'm tired. Sorry.
 
2:06 AM
hey people
whats up
 
2:39 AM
Failure of using a graphing calculator.
 
@Mysticial Take comfort: Jon Skeet doesn't either.
 
@Mysticial I thought you didn't know C.
 
@EtiennedeMartel Not knowing C and not knowing C++ are not mutually exclusive.
 
Is the String/StringBuilder approach bad?
That is to say.
Constructing an object, then making a new one like it, but immutable.
 
2:54 AM
@Pawnguy7 If you're using StringBuilder, then you're doing it wrong. StringBuilder means Java. But "StringBuilder" is too short to be Java. You need something like MutableStringBuilderSingletonFactory.
 
@Pawnguy7 In theory, it has some good points. When objects (strings, in this case) are immutable, it's easy to share them across threads, for example (since they never change, you never have to lock them and such). In reality: string manipulation in Java (for the obvious example) is a nearly-constant source of pain, frustration and poor performance.
 
I was thinking of Java, but if I remember, C# does similar.
HEre is my situation:
Let's say I have a World.
In the past, I allow generators access to a setter.
A world of tiles, I mean.
And the get is public, so it can be drawn.
I was thinking, alternatively, I can make an editable world, and a noneditable one.
Thread safety isn't an issue.
 
@Pawnguy7 So what does the noneditable one accomplish that the editable one couldn't just as well? Assuming C++ (and therefore const) is there any real difference between non_editable_world and const world &?
 
One would have a public setter, and one would not. More or less.
Well.
I could pass a const to drawing, yes.
Previously, drawing was in the same function :D
I will do that.
 
@Pawnguy7 Does that accomplish anything compared to a setter you can't call on a const object because it's not marked const?
 
3:12 AM
hi
 
@LucDanton Good morning.
 
3:35 AM
0
Q: Why are the guys process starving?

user2824983import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public class Monitor { final Lock lock = new ReentrantLock(); final Condition girls = lock.newCondition(); final Condition guys = lock.newCondition()...

^^ seriously...
aha
 
@LucDanton Any chance you're the ld on this thread: ericniebler.com/2013/10/13/out-parameters-vs-move-semantics ? Some of it sounds to me like things you might say, but maybe not your writing style...
 
Who are you and do you have a warrant?
Also yes.
 
unmasked
 
@LucDanton I'm from the government. I'm here to help. Oh, I'm also honest, so I advise running as far and fast as you can!
 
Maybe next time when I feed the birds meat, I shouldn't hold the meat on my hand - my fingers have been bitten too many times.
 
3:48 AM
Not sure it's appropriate to get advise for prostitution programming models on this forum. In fact, I'm wondering if this question is a joke of some kind. — Lizz 1 min ago
"prostitution programming models"
 
@JerryCoffin Since you find the writing style somewhat different, can I ask your opinion on it?
 
@LucDanton Honestly, I wasn't even all that certain it was a whole lot different. Chat makes it hard to judge writing style, since it limits you to a few sentences at a time. Since it's so ephemeral, I also tend to play fast and loose with grammar and usage as well. Ignoring any comparison: there were a couple of clumsy sentences (where you may have omitted a word or two) but I thought it was generally quite readable, cogent, and well reasoned.
 
Alright.
Kinda wish that for every input field I use to enter comments/answers on the Web, any 'submitting' would instead save the draft so that I can proof it later, then actually submit it.
 
@LucDanton I tend to feel the same way -- I push SO's 5-minute limit on "free" editing to (and sometimes beyond) the limit on a regular basis.
@Rapptz Vaguely similar, but his is a producing a range instead of an iterator. I think I'm going to write some code to compare speed. Just for grins, I'll probably include your line_iterator, along with Eric's range, and a normal istream_iterator with my line proxy, and possibly Uncle Bens' line iterator as well (though at least right off, it looks like his and yours will probably be similar).
 
4:05 AM
I would have opted for ranges but I don't know how to design one.
 
@Rapptz Pretend you know what you're doing and make it up as you go.
D ranges don't necessarily map one-to-one into C++ so you have a lot of room and can invent whatever you want.
 
I don't get how I'll write ranges without decomposing to iterators.
I think the only range I could make are numeric ones.
 
@LucDanton That's almost mandatory, given that it doesn't seem like anybody's really certain about what a range should be.
 
D uses front(), empty() and pop_front() as the basis. Some languages/libraries fold front and empty into one, e.g. by returning an optional value.
The apostles of Church fold everything into one function, of course.
 
@LucDanton I keep having this strange feeling that sometime soon, somebody's going to decide (realize?) that APL wasn't really about arrays, it was about ranges (and just used the name "array" because nobody used "range" back then) and decide it's still really the future of programming... :-)
 
4:12 AM
APLonGPU :p ?
 
@LucDanton I'd never considered it before, but APL might actually work pretty decently on a GPU...
 
So that somebody is you then :p
 
@LucDanton I doubt it. As much as I liked some of its ideas, any time I actually wrote any APL, I was quickly convinced it (or at least its syntax) was a giant mistake. Maybe something with similar ideas but more readable syntax (J, perhaps?) would be more reasonable.
Even J, however, can be (often is) pretty close to write-only.
 
4:28 AM
J is readable?
Or am I thinking of R
One of those languages are basically dots to me
 
@Rapptz Not R.
 
It's J.
>./>([:*/10 10 10 10 10"_ #:[:".])&.>5<\y
 
I completely missed that there was an NT2 beta one year(?) ago and that it was preparing for a release as a Boost library. In any case the project has released a new beta (docs).
Odd. I thought it was going to be a C++11 library, or at least a library with an eye towards C++11. The examples don't really look that way though.
Those docs are so French they gave me capricorne.
 
5:05 AM
morning al
 
5:51 AM
I am hungry again :'(
drinking berry flavoured ice coffee
 
This kebab I at late last night was a bad idea.
It still feels heavy on my stomach.
 
maybe the meat was off
 
user1804599
6:18 AM
@StackedCrooked Kebab is never a bad idea, no matter what its side-effects are.
 
user1804599
@Rapptz If you know J, that’s probably readable.
 
user1804599
@sehe but it was leuk.
 
@not-rightfold TIL about std::uintmax_t.
 
user1804599
@StackedCrooked TIL TYL about std::uintmax_t.
 
TIL TYL TIL
 
user1804599
6:27 AM
TWL
 
Nice conclusion.
 
Oo barbie, you didn't!
 
  switch (_coro_value ? 0 : 1) \
    for (;;) \
      case -1: if (_coro_value) \
        goto terminate_coroutine; \
      else for (;;) \
        case 1: if (_coro_value) \
          goto bail_out_of_coroutine; \
        else case 0:
This code is a little unusual.
 
6:49 AM
@Telkitty猫咪咪 I think you need professional help
@StackedCrooked A bit off duffy's device and a bit of missing context
Are you looking at Asio's stackless coroutines?
 
@sehe why?
but you are right, I am off to see my dentist again tomorrow
 
@sehe yep
 
my teeth indeed need professional help
 
@Telkitty猫咪咪 Because it seems you are obsessed with (fat) women and the way they might be regarded. What's the relation to you or this room?
 
Each troll has a theme, I have like 5-6
fat women is one of them
 
6:54 AM
Ah. How nice.
@Telkitty猫咪咪 This is why I think you need help.
 
@sehe ?
I am being realistic
 
Me too
 
there are more fat women than skinny women nowadays
 
(a) needs citation (b) I know (c) so what
 
I am a people's person
 
6:56 AM
trololololololololololol
Make your mind up. Money or people. Or, people with money. Anyways. I was just saying. I know you're not interested
 
Money & power are the best tools to control people
I am interested in 'toys'
the kind that makes human kind more efficient
 
Religion is not bad either.
 
true
@sehe why are you so against fat women?
I know how men prefer models, but most men have to settle for fat women ...
 
@Telkitty猫咪咪 I'll tell you once you figure out why you fabricate ludicrous accusations out of thin air.
@Telkitty猫咪咪 Twice wrong. I'm getting the suspicion you're really not a male
 
You are right ... in those under developed countries people are starving, then there would be way less fat women ...
 
7:01 AM
Why do you have such a one-sided view of reality, and then violently demand that everyone you meet and don't even know must satisfy that view?
 
huh, I am not a male - every human knows that
doggies - I am not sure ...
 
You really have issues. But i'mma stop. Because this chat "toy" is making human kind less efficient
@Telkitty猫咪咪 We can't actually. This is the internet
 
We all have issues
that's life
 
user1804599
@StackedCrooked looks generated.
 
@Telkitty猫咪咪 Agreed. I do too. I hope I don't often bother you with it.
@not-rightfold It isn't. In fact, it's machinery used to generate stackless coroutines (using MACROs)
 
user1804599
7:06 AM
@sehe Ah.
 
You are assuming we are arguing, I am not sure about sehe, I was just trolling :p
but this time the theme of my troll was fat women
 
I'm just trying to raise awareness. Likely in vain
 
healthy/fit looking fat women
 
user1804599
I’m so horny, I feel like an alicorn.
 
Wouldn't you be more horny if you feel like a buck? Two horns instead of one :')
 
7:10 AM
@not-rightfold According to Telkitty, if you hit up some fat women, you could fix that
 
You'd feel pretty horny if you were completely nailed
 
user1804599
Would love it if cppreference.com covered Boost.
 
Well the thing is, it is not so very uniformly covered with documentation
Also, what's wrong with boost.org/doc?
 
I for one do not care for boost's docs and tutorials
poorly explained but I'm slow.
 
Well, I'm slow too. But I'm thanks for boost's docs. I wouldn't know how to use much from it (outside the standards adopted parts) without the docs
 
7:16 AM
I think it is due to my deficiencies in other areas of programming that I had trouble with some tutorials. I took a step away from it to learn some other stuff and will come back to it. I hope to find myself with your opinion the second time around
 
user1804599
@sehe it’s often very difficult to find out which headers to include.
 
user1804599
Last time I just decided to cd into /usr/local/include/boost and use ack because I couldn’t find it.
 
user1804599
cppreference.com lists it nicely on every entity’s page.
 
You mean how Doxygen docs generate the #include <...> on top?
 
user1804599
7:19 AM
> Defined in header <iterator>
 
Yeah. Doxygen does it too.
 
user1804599
> ???????????????????????
 
I thought Boost did it. Guess not.
They have a Reference section for all the headers
 
@not-rightfold Ah, I routinely do that. Even though Boost Spirit (e.g.) does a very good job of listing which headers define what feature
@ScottW They moan a lot on the internet
 
7:25 AM
@StackedCrooked just shared a coliru link with my coworkers. They were impressed :)
 
user1804599
> Dikke wijven die hun strot vol lopen te stouwen, nouwelijks kouwen.
 
@ScottW nothing
as long as they are healthy and can do whatever they want to do
the only problem is that ... when I am hungry & I see their bare legs, sometimes, just sometimes, I think of bacon :'(
lol
and you have no food in your fridge again?
 
morning kids
 
I'll leave the kids to greet you back
lol
 
@Telkitty猫咪咪 stop pretending, your one of the more immature people in this place
 
user1804599
7:32 AM
row.append(
    $(document.createElement('td'))
        .append($(document.createElement('button'))
            .text('Voeg toe')
            .addClass('btn btn-primary btn-sm')));
 
user1804599
My code of the day.
 
... ew
 
user1804599
Tuesday morning.
 
user1804599
Fuck this shit.
 
user1804599
I’m using Angular.
 
7:37 AM
@ScottW I've had that thought multiple times.
Yeah.
I always thought the idea would be pretty neat but I probably would never code it.
 
fucknuggets
 
Yes please
We can't see The Forest And The Trees because his name is too long
 
lo
 
7:43 AM
ohai
 
Hello(world);
Hello(&world);
Hello(*world);
 
Exciting
 
I am fixing this bug at the moment, being not very efficient for the past week.
you mean being constantly hungry for the past 27 years :p
$
 
$>
no
debugger-crappiness
 
user1804599
Angular is awesome.
 
7:57 AM
$bash you
 
user1804599
I did this in like, five minutes.
 
user1804599
With jQuery it would take about an hour.
 

« first day (1095 days earlier)      last day (3836 days later) »