« first day (1237 days earlier)      last day (3937 days later) » 

06:04
i should get back into medical... crazy stuff. all about chances.
and the business side of it is really .. strange
Looks like most industries have two sides: tech side & business side ... except for finance - it's business side and business side
@sudorm-rfTelkitty Bloomberg has a rep on the C++ ISO committee…
Bloomberg uses C++ and Java
Are you saying that isn't part of their tech side?
@Potatoswatter ..who occasionally drops by SO.
06:08
but medical and maybe military have also a moral side.
I think I got a couple of ex colleagues who used to work for bloomberg
Hell, according to isocpp.org/std/the-committee Bjarne is/was employed by Morgan Stanley.
I could be wrong, but at least one of them did ...
@Potatoswatter Not surprising ...
It is just a job ... except he probably got paid much better than most of the people here
Now, industries besides finance have some kind of salable product between the tech and the business side. Because finance is simply the tech of business.
I was in the finance industry, strangely most of the people in finance weren't rich
Just a job really ...
06:12
@Potatoswatter very well put.. i don't ask for much morals from finance
It is like a pyramid scheme - only the top 5%-10% in finance are "well off"
You get paid better, but not that much better
If banks are supposed to pay programmers well, then by the same logic they should pay the tellers well too. In reality they aren't known for generosity.
banking has a very broad definition
"Getting paid to shuffle money around" FTFY
Investment banks were supposed to make money from brokage ... until they got greedy
they start hold positions, tried to manipulate the market
then guess what? they got burnt
06:15
finance is the lube to make things work... and it is paid by the value they add (perceived)
finance has a even broader definition
for example "financial controller" are usually from accounting background
"Getting paid to tell people what to do with money, or else just to do it."
qwr
qwr
Hi
@Potatoswatter greatest advantage of having finance/economics knowledge .. is that it is much easier to make money for yourself
@starmole It's paid by the social necessity of the services they provide. Credit card providers don't add value equal to their service fees; they're a monopoly.
06:19
@Potatoswatter All comes down to supply and demand. The requirements on a teller aren't high enough to support a particularly high price.
@sudorm-rfTelkitty Should be taught in public school. Along with the difference between viruses and bacteria. However, the value system of society at large is very much stuck in the 19th century.
a couple of people stranded on an island... they have to eat somebody. the least useful first. we have a doctor, a farmer, a carpenter, a hunter, a banker, a coder.
banker or coder?
It depends whether he's good at general engineering. Programmers vary greatly in this regard. Same with the banker, and skill in generalized economics.
@starmole Obvious question: what else can they do?
06:21
In the above case I would say I am an engineer not a coder
you want to get out of the island, you need a boat right
thus engineer is the most valuable :p
the point is that both are only useful in a big society
Personally I think there are many useless jobs
Wait, if they're about to eat a person, that implies that hunter already failed to make himself useful.
just a way the society keeps everyone busy and has some thing to do
maybe throw in a lawyer too :)
it's just a thought experiment
06:24
an accountant? :p
and yes i would play being an engineer there too :)
how about a policeman?
but the banker is probably more charismatic
add a priest, a hollywood actor... a politician. it's a fun game :)
a female porn star? :p
~_~
What if all the other ones are female? There are no female hunters, farmers, etc? You chauvinist.
06:29
i think almost any female would get a free pass in the begining
@Potatoswatter what if they are all lesbians?
the same game all females would be the same
@sudorm-rfTelkitty They still won't need a porn star.
so easier just to leave sex out of it
would be a fun statistics web experiment
quiz a lot of people only with a random selection
His name is Goto
06:38
In the case of Titantic, they simply gave the life boats to women and children ... & 1st class passengers
It's a common name in Japan, but still funny because he went to the US to write assembly code, which is characterized by goto-like branches. (Why couldn't he get a job in Japan, where the supercomputer industry is proportionately larger?)
is the link safe to follow outside a vm?
Because UTA needed a hand tuned BLAS library for ALPHA, which he had been working on as a puzzle on the train every day
turned out he was the best in the world
In scientific computing, GotoBLAS, GotoBLAS2 and OpenBLAS are related open source implementations of the Basic Linear Algebra Subprograms (BLAS) API with many hand-crafted optimizations for specific processor types. GotoBLAS was developed by Kazushige Goto at the Texas Advanced Computing Center. , it was used in seven of the world's ten fastest supercomputers. GotoBLAS development has since stopped. OpenBLAS is a successor library, developed at the Lab of Parallel Software and Computational Science, ISCAS. GotoBLAS GotoBLAS was written by Goto during his sabbatical leave from the Japan ...
It's usually romanized as "Gotoh".
06:43
who are you, why are you link dumping?
I asked for this guy's name earlier
to much chagrin
but I think it's worth posting
sorry for cutting into anything
I'll be off now~
@starmole Afraid of catching typhoid from Oregon Trail?
@Potatoswatter ?it was something else... dis something?
TIL: typhoid is a form of salmonella.
yes! dysentery!
@OregonTrail but blas is great. thanks for any work on it
07:29
..bored
there are very few random new questions to answer nowadays
fun c++ fact i learnt recently
std::hash for ints is useless in clang
it just returns back the value
which is fine by spec
I think the standard requires that. In any case you won't likely find a implementation which does it differently.
but sucks in practice.
both gcc and vc do a real hash
qwr
qwr
guys is it possible to get type of dereferenced Type of (*T)
MSVC does munge integers though.
qwr
qwr
07:41
?
@qwr std::remove_pointer
i never tested gcc. vc does hash integers
@qwr T has to be a type of pointer, a pointer to a certain type.
@starmole Waste of cycles if you ask me.
qwr
qwr
I have situation where I need to check if passed iterator has got iterator itself
07:42
it's very useful in graphics
reproducable random numbers
instead of doing srand(x^y); rand(0)
just hash x^y
That's an abuse.
All PRNGs (e.g. the contents of <random>) are reproducible.
qwr
qwr
OutputIterator copyStr2(S first, S last, OutputIterator result) {
to check has_iterator< >::value for returned (*S)
but it's a waste
because you want only ONE random number
they are designed to make a lot of random numbers for one seed
@starmole PRNGs don't have a lot of setup time. Just get one with a total state (i.e. sizeof) equal to what you want.
@starmole That's just a faulty assumption.
07:46
a lot more than just a hash
a hash is the right thing there
just unhappy that i can not use std
back to including one
hi all . is there a way to ensure global access and single instance concept without using singletons/static
qwr
qwr
or to check has_iterator<iterators: value_type>::value . Is it possible?
@qwr You're making a lot of gibberish. To remove a pointer, use std::remove_pointer. To get the value type of an iterable sequence, use std::iterator_traits<Iter>::value_type.
just a fun thing i learned :) and clang is actually right.. if you really have a map with int keys the identity hash is prop the most efficient
another random thing
i am trying to get used to std::vector
forever i had my own little template class that did basically the same thing
but for std.. other people etc.. use std
but the implementations are so crazy different!
qwr
qwr
@Potatoswatter thank. think it can do the task: has_iterator<typename iterator_traits<S>::value_type>::value
07:58
vc bounds checks in debug builds... clang does not
user1804599
@Jefffrey that's what she said.
clang is crazy slow in debug running a constructor function for things like uint8
how do people deal with that?
user1804599
By writing code that is not terrible, and by using languages that are not terrible.
@rightfold There exists such an artifact?
every language is terrible... all code written is terrible
user1804599
08:01
That is not true.
This is an part where you show a counter example to starmole.
@rightfold so which one?
user1804599
Clojure.
user1804599
Emacs Lisp.
user1804599
Haskell.
user1804599
08:04
Erlang.
no. I did a lot of functional, esp Haskell... the reason i complain about std::vector is that i do graphics
and functional sucks for that
user1804599
Graphics sucks in general.
alright then :)
functional is great for logic. but it always calls out to c for number crunching
also i would not want to do UI in a functional language
clojurescript is not that bad.
user1804599
@starmole LOL C
user1804599
08:08
Use C++ for that newb.
user1804599
Also be Mysticial.
meh...
user1804599
> YT
user1804599
@ScottW Yep.
Wow..I was blissfully unaware of this "chat" ability on stackoverflow O.O.. until now.. hi all
user1804599
08:16
I want a lisp that compiles to Perl.
user1804599
It would be insanely awesome.
why? also, it probably exists. or would be easy to do.
user1804599
Because lisps and Perl are awesome.
user1804599
Perl already has support for functional programming here and there but it's too limited IMO.
user1804599
08:23
Also, I wouldn't be surprised if it were possible to implement it in Perl such that it would be valid Perl code.
Weak trollo :) But I am really bored trying to make the best out of it ... whatever i get :)
perl is terrible. more like js. a hack. sometimes useful. often abused
lisp is neat... as theory
i should learn lisp some day
i always think of it in the same space as brainfuck
very easy to write an interpreter or compiler
crazy to write code in
08:49
Meh... the SSD on our TVserver box has dieded.
> dieded
dafuq
It's deader than 'Dead' Jock McDead. Just plugging it into a SATA port on my development box stops the machine booting. Controller??
09:06
I'd say so. Anyways, the controller having trouble to handle a failing SSD if anything
@rightfold that shouldn't be hard to make
user1804599
xpdf y u no in portage.
@sehe Yeah - I've ordered a new one. It had only W7 OS on it and I have the CD to load it up again. All the user data is on spinners and backed up, so no biggie.
@ScottW hi
what's new?
yes
09:23
woops I think I cancelled a 12-star message.
bad starbait
hallo
user1804599
Nothing is as fun as working with a mounted FTP server when you're used to SSDs.
@rightfold Thanks for mentioning SSD:((
user1804599
09:34
slowslowslow
@rightfold Not as slow as the OCZ Vertex 2 on my desk, (and soon to be in my bin).
user1804599
Especially fun with Emacs, which saves backup files now and then. :3
user1804599
@MartinJames It takes about two seconds to ls. :v
@rightfold It should make a copy and thread off the backup.
@ScottW you didn't show me anything
09:38
@rightfold Sounds like a job for SSH..
SSL
I passed one of my guy friend's number to one of my girl friends
now I feel like a pimp
@_@
@sudorm-rfTelkitty Don't forget to add your cut.
~_~ ... I am not getting anything out of this hook up ... just providing free match making service ...
user1804599
I want a CSS REPL.
09:50
She said she "just want to ask him a couple of questions" ...
It will be shipped out-of-band.
@R.MartinhoFernandes what does out-of-band mean?
Like a tr1 library?
What is new to C++14 anyways?
09:55
Is @Cubbi around?
IIRC boost::optional<T> is basically a container of T + bool. Which means that with padding sizeof(optional<T>) == 2* alignof(T) (for built-in types). This makes it a bit wasteful if you have a multiple members of type optional<uint64_t>. Or would the compiler be so smart to rearrange the booleans and the Ts cross-object-wise?
That would not be smart. It would be intrusive. And it can't be done for reasons of object layout
The compiler is already allowed to rearrange member variables in certain situations.
"certain situations". Also, that's member variables. It can't change the layout /of/ those member objects internally
maybe an optional<T...> with compile-time layouting magic
iirc @R.MartinhoFernandes did something similar with tuples.
10:02
Frankly would only make sense with an abomination like std::vector<bool> for optionals
@StackedCrooked Sounds a bit dubious if inheritance is involved?
@StackedCrooked He did it for the general case where /different/ member orders would lead to different optimal packing. For optional, there will always be 1 optimal packing per template instantiation. Your case is one abstraction level up
@MartinJames I don't know the details, but it's possible. I asked before on this chat, I should find the transcript.
@sehe optional<int, long> could reorder {{int, bool}, {long, bool} into {bool, bool, int, long}.
@StackedCrooked "It's possible" <-- the "it" is undespecified. Nobody doubts the compiler can rearrange (direct) members (if the struct is not standard layout).
The thing is, there is zero reason to expect that it can rearrange indirect members (members within member objects)
This would reduce the size from 24 to 14. (Assuming int = 4 bytes and long = 8 bytes.)
10:05
@StackedCrooked Wait... Is that in c++14? I've never seen this and I can't imagine what it would /mean/
oops that's what you said :P
That's what I meant :)
@sehe optional<T...> is my imaginary solution
@StackedCrooked Assuming it would not be equivalent to optional<tuple<int,long> > what would it "do"?
In the case of optional<tuple<int,long>> it could /just/ be specialized for that and reach optimal packing.
Not trivial, but no magic required
@sehe it would do nothing extra at runtime, but it would be smaller.
basically a type transformation from tuple<pair<T, bool>...> to pair<tuple<bool...>, tuple<T...>>
ah well
@sehe that's basically what I was thinking of
10:15
So there's no need to special case this in the class interface. Just specialize and be happy :)
morning
@StackedCrooked Just derive from a smart::tuple<StorageFor<T>, bool>. Or have it as member since it will never be empty.
@StackedCrooked That said, you cannot avoid the padding.
@StackedCrooked Nope.
It's trivial to prove that all layouts are optimal if there are only two members.
Oh, wait, I misunderstood you, I think.
Yeah, a specialisation for tuples would do.
@sehe Given a smart::tuple, it is trivial.
@sehe Not the same thing.
Has to be tuple<optional<T...>> that gets specialised, not the other way around.
(1+T)^N != 1+T^N.
hmmm
f(bool.lvalue arg) {
    arg = true;
	return int.pointer;
}
Main() {
    ret := false;
	reinterpret_cast(f(ret), &ret);
	return ret;
}
unsure if should pass or fail.
10:30
@DeadMG what's up with the <Type>.<Dunno> syntax'
wat
@DeadMG what's bool.lvalue? an object declaration?
it's a type.
an lvalue reference to a bool.
@DeadMG so you have bool.lvalue instead of bool& and int.pointer instead of int*?
yep
10:34
and you can pass types around like if they were objects
yep
this last part is neat
user1804599
Cool.
Dammit, excessive friendliness is biting me.
user1804599
Sass supports HOFs.
10:35
it is, in fact, not as neat as I was hoping for.
user1804599
No higher-order mixins, though. :(
turns out that I need to have templates anyway.
@sehe Actually, no, can't be done because of the object model. /cc @Stacked.
Unless you're willing to go vector<bool>-style crazy on it, no deal.
Straw poll: what scope guard library/libraries, if any, do you guys use? Boost.ScopeExit? Loki? Rolled your own?
4
I'm writing an ISO proposal, and want to review as many popular libraries as possible.
none because they're worthless shit
10:41
@DeadMG Puppy doesn't like RAII. Anyone else? :)
real RAII and scope guards have nothing to do with each other.
Yay, it's nearly lunchtime and I haven't gotten anything done yet
Art thou trolling me?
I don't like scope guards either.
it's a common opinion amongst the more C++ educated that scope guards are a bad thing that encourage bad programming.
10:42
Fine. What do you guys use for exception-safe invariants, then?
I wrote one once and later realised I didn't have any use case for it.
@Potatoswatter classes?
@Potatoswatter classes
Huh, I thought it was just me who felt that way.
nope
10:43
Yes, but a scope guard is just a convenience to generate a local class, so that's a non-answer.
@Potatoswatter It's a convenience to generate one local class that can only be used in one place, which voids the point.
It moves the clean up responsibility to client code.
and it's a convenience that moves the responsibility of creating the scope guard in the first place to external interface.
@Potatoswatter You asked what scope guard libs we use. This is the answer. How can it be a non-answer?
i.e., it's super bad.
10:44
Also what @R.MartinhoFernandes said. I prefer my RAII classes to represent more than just "call a function when you go out of scope"
@jalf Well, to my latter question, it's an answer involving contradictory logic.
you've gone from "Guarantee creation and cleanup correctly" to "Require clients to write their own cleanup logic".
That said, I'm leaving this discussion now. Not gonna have it thrice this week. Nothing personal.
not to mention that it's hard to go e.g. std::vector<ScopeGuard>.
@R.MartinhoFernandes Might be because of the new proposal floating around N3949.
10:45
fact is, scope guards are inferior to classes in a great many ways and the inconvenience of writing a class is minimal at best compared to the safety you gain.
oh gawd he actually proposed that shit?
@Potatoswatter The one with the loop advancement and such use cases?
You know that guy? What other sins has he committed?
@Potatoswatter He's a well-known Asylum inmate.
ISTR that many people ripped his proposal to shreds, including myself, when he first suggested it.
but
I just can't stop laughing at "loop advancement".
It's on the third revision now. The fifth revision of a terrible rejected proposal could become a very mediocre but accepted proposal.
10:47
That sounds bad :(
@Potatoswatter Nah. That's like suggesting that if you keep revising a piece of shit, it will eventually become a flower.
which it won't.
fundamentally, the functionality he wants is worthless and bad, and no amount of tweaking the interface will change that.
What page is the loop stuff on? I don't find the word "loop" in it.
it was part of his original proposal/discussion
@Potatoswatter Then it sounds like a different one.
Lemme check.
personally, I'd love the Committee to accept N3949.
10:49
@DeadMG You are suggesting that a committee of bureaucrats, even extremely intelligent ones, can be relied upon to render a logical decision after years of back-and-forth.
Ah, seems to have changed a lot.
the more they pull shit like that and dynarray, the better things will be for Wide.
@Potatoswatter the standards committee members are bureaucrats?
@Potatoswatter No, I'm merely suggesting that revising his proposal further won't make it less shit. I lost faith in the Committee in Bristol.
10:50
when I was the only one in the room (out of about 30) to vote against dynarray.
@jalf Everyone who belongs to a committee governing anything is automatically a bureaucrat.
@Potatoswatter This was the one for C++14 that had that silly stuff in it: open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3677.html
It's not a personal thing, but a "hat" of responsibility that one wears.
@R.MartinhoFernandes What could be better news for Wide than C++ throwing itself even further into a pit?
Apparently he dropped that nonsense. Took long enough.
10:51
I felt sick when I saw the original, and was tempted to write something in response.
@Potatoswatter huh? You might want to look up a definition of the word
However, it still has all the other broken use cases in it.
Now I see that as he's being guided to write something more proper, maybe the committee would appreciate cutting to the chase. :)
> an official in a government department, in particular one perceived as being concerned with procedural correctness at the expense of people's needs.
I honestly hope not :S As usual, none of the use cases is a valid one.
Well, maybe the one that is described as "useless" is fine-ish. That's it.
@R.MartinhoFernandes Well, I use them to ensure that state passed into a user callback, but stored non-locally, is cleaned up if the callback throws.
10:56
@Potatoswatter The chase which is still a giant pile of shit.
thanks for your answers they have all been great...ill changeCode and see what happens — user3387276 13 mins ago
> changeCode
The alternative would be to move said state into local storage, but mumble mumble move overhead. Also, there are occasionally other invariants, just related to protocols.
So… seriously, nobody here uses Boost.ScopeExit or anything?

« first day (1237 days earlier)      last day (3937 days later) »