« first day (1364 days earlier)      last day (3807 days later) » 

18:00
Anyways, why is that a problem? There are std::map implementations. They adhere to the const stuff... It works.
@rubenvb Yes, but they can't be extended with some nice features because that would require mutating K in some perfectly safe manners.
the interface we have cannot support extension without breaking change because they slapped the const and the reference in the wrong place.
I actually don't remember which extensions were proposed that had to be blocked because of this.
Why did they not change the const-ness of the key then?
@Puppy Apparently the extensions weren't that nice then :P
breaking change.
@StackedCrooked It was a long time ago and when I was in the room, I really wanted to be in another room.
plus the guy only suggested them for ordered map and I almost exclusively use unordered map
It wouldn't be the first breaking change, nor will it be the last.
18:05
most of those breaking changes only broke very small amounts of code.
fixing the const would break virtually every line of code using std::map.
and unordered_map, for that matter.
and probably set and unordered_set too.
What if they add a new language feature that allows casting pair<T, U> to pair<const T, U>.
user1804599
Why does Google translate “veertig centimeter” to “forty inches” lol. :v
Then they could omit the internal const and still use the const version in the public api.
honestly, I've absolutely been thinking about permitting such things in Wide.
@rightfold gigidy
18:08
@rightfold it doesn't do that to me
IMO C++ is too restrictive about pointer casts in some ways.
user1804599
IME the reality of pointer casting is that people do all sorts of officially unsafe shit all the time.
it's better to make what pointer casting you can safe.
18:08
@rightfold I see.
@rightfold I suppose the heuristics take a little too much freedom.
the real question is
user1804599
@StackedCrooked no new language feature needed.
how does Clang translate member data pointers to LLVM IR?
user1804599
You can overload the constructor.
@rightfold References in C++ do not have constructors.
and even if they did, it would be the resulting reference that would fall afoul of all sorts of rules, like strict aliasing.
Xeo
Xeo
18:12
@StackedCrooked the thing is that they should return <Key const&, V&> (and V const& for const access) instead of a reference to the pair :/
right.
@Xeo if only you were there in 98
but that would break lots of stuff, like auto x = *map.begin(); would now still refer to the contained values instead of copy them.
Xeo
Xeo
an adaptor would prolly be the smarter choice, eh
though that won't help with internals
Hi, I don't know where to publish a question, can I say it out loud here and get your opinions?
Xeo
Xeo
18:15
unlikely
ok :/
@Jonathan Would you like to die?
Xeo
Xeo
At least not without getting a whole bunch of opinions about you asking here in the first place :P
@StackedCrooked right now no
in the next century yes
@Puppy You mean std::pair<std::reference_wrapper<const K>, std::reference_wrapper<V>>?
18:21
@puppy they could always make a new addition to the STL, call it a maap, do it right this time, problem solved
@Jefffrey No, I'm fairly sure I don't.
user1804599
RAM is like the Great Wall of China.
@Puppy You can't have std::pair<const K&, V&> because references do not have size.
@Jefffrey That really doesn't matter. Having a size is not needed for std::pair.
@Jefffrey How do you think std::tie works? It creates a tuple of references.
right
18:24
fuck.
I just started a game of FTL, got a free Engi crewmember right away, and then realized I was playing the wrong ship.
Xeo
Xeo
@Jefffrey references effectively have the size of pointers if not used for direct aliasing
oh well.
@Xeo The standard does not specify such a thing. But yes, references might be implemented as pointers.
Ell
Ell
Do they check things like reverend/lord when you register to things or buy things like train tickets?
doubt it
Ell
Ell
18:26
I might put myself down as a reverend for my own entertainment
or professor
wtf
Ell
Ell
xD
and then I randomly got a free drone recovery arm.
dat RNG
You're going to die horribly
last time I got a run of good luck I died because I couldn't find a store to spend all my scrap and get some decent weaponry.
also I came up against an opponent with four shield and 8 laser in like, sector 3.
woot
picked up another free Engi crewmember.
and a free Rock crewmember, with weapons training, in sector 1.
18:29
rip
lol
What game is this?
FTL
just a pity that I picked the wrong ship layout at the start else I'd really be feeling good
@Puppy which ship is the wrong one?
Kestrel
18:33
I'm feeling dizzy today too. I'm worrying a bit.
the other layout is clearly superior
also there's no wrong ship unless you've picked the engi one, cos that one is boring as fuck :D
say
would I like another free Engi crewmember?
why yes, I would.
You're so dead.
those guys may suck at repelling boarders but they make super good systems repairs
Xeo
Xeo
18:35
5 mins ago, by Cat Plus Plus
rip
and I have three of them now to conduct repairs on top of my manning crew
What C++ containers would you use for something like a music library that can list songs/albums/artists and group them by album/artist etc..?
Tantrum spiral inco- oh wait, wrong game
Xeo
Xeo
@StackedCrooked boost::multi_index :D
18:36
sounds like a job for multi_index
Xeo
Xeo
or just a vector with music files and different name-to-index maps
though multi_index is made for that scenario
@StackedCrooked PGconn*
hmm
@CatPlusPlus what is that?
it's an enemy whose only weapon is 1 basic laser
I'm gonna go afk and let him skill up my shields, engines, and pilots.
18:37
A connection to a database
@StackedCrooked postgres connection
Xeo
Xeo
lol
I suppose a relational database is a good match for this kind of problem.
it's probably a bit overkill if you don't need to persist the data.
after all, there's a small, finite number of mappings involved.
what do you guys think of noSQL?
18:39
Why on Earth would you need a non-persistent music library
@AaronKyleKilleen "at least it's not SQL", is basically what I think
Are you back doing idiotic assignments for uni or what
@CatPlusPlus There's a difference between persisting the music and persisting the mappings.
"NoSQL" is a meaningless buzzword
also it's a dumb term.
18:39
@AaronKyleKilleen I say yes.
to valsoia
it's probably fast enough to just recreate the mappings every time you start up the program.
Xeo
Xeo
Did anybody invent YeSQL yet?
Oh yeah that makes much more sense
What was I thinking
eh, pulling in a large external dependency like a database library just to persist a few mappings you can easily recreate seems like overkill to me.
Xeo
Xeo
18:41
if you're persisting the music list anyways
(Graph database is probably better for music than relational one btw, depending on how rich the data you want)
"When in doubt, don't use a SQL database" is basically the philosophy I try to live by. It has served me well so far
@Puppy I would use a music library containing one million songs during development and testing. Seems like a reasonable upper bound for scalability.
only a million?
Have fun reinventing the wheel
18:43
For the free version :)
well I guess that actually, re-creating the mapping would probably involve actually loading the million off the disk.
and that would probably suck.
You only need the pathnames.
However, you might want to cache that too..
I'm sure your metadata is of very high quality
Ergh I'm out of ideas for this dumb code
This is not a real project.
Watch more Friends or stupid game hm
18:47
wow I just noticed you can box-select your crewmembers.
Ell
Ell
> Enter between 6 to 10 letters and numbers using at least one letter and one number without spaces.
gahhh
on Visa for goodness sake
you'd think that for payments they'd let you use a few more characters
and keeping it to letters and numbers is bad.
Everyone is terrible at security
throwing in a ™ expands the range of potential codepoints in the password hugely.
user1804599
@CatPlusPlus Especially you!
18:51
What do.
contribute to wide
user3010322
@R.MartinhoFernandes Read my design doc for a game!
user3010322
... No, don't actually do it, it's terrible.
user3010322
Also being on the West Coast sucks. Everybody gets out of work and it's only like Lunch Time here.
@ThePhD I want to read it.
user3010322
18:55
And everyone goes to work and I'm on that weird Xeo-timer where I wake up at like 4 AM.
@ThePhD where on the West Coast?
user3010322
Maybe my body wants to be in Berlin.
user3010322
@jalf Redmond, Washington, USA
ah
18:56
@CatPlusPlus No, the other Redmond :p
user3010322
@CatPlusPlus , North America, Earth*
user3010322
@jalf Redmound, Washington, USA, Mars
user1804599
@ThePhD North America, The Americas, Earth!
user3010322
@rightfold Oho, superior locational hierarchy!
user3010322
Needs more red tape though.
18:58
iTunes uses an xml file like this to store everything.
user3010322
@StackedCrooked I used to seriously use iTunes.
Coincidentally iTunes is shit
Also plist is a terrible format
user3010322
What I would do is I created a folder called E:\ in my mac
user3010322
And then mounted it to a convenient place
user3010322
then when I Bootcamped into windows I mounted my music folder at E:\
user3010322
19:00
So my iTunes library could be shared betrween Bootcamped Windows and the Mac half of my VM.
user3010322
I also used that same trick when using Linux to keep all of my pathnames similar.
Ell
Ell
Musebrainz has it all in a sql database I think
yup. Postgresql
user3010322
So I could have everything stored on one drive while all my applications could use the same data formats.
uhh; I have a vector of rgba, rgba and I want a vector of color, color - the most elegant way of doing this? transform won't work - ideally I'd just have a... view of sorts; or do I just copy :-\? (I currently have an amazing for loop)
holy shit.
I just got a free upgrade for one of my Engi crewmembers... maxed out all stats.
Ell
Ell
19:03
@ScarletAmaranth rgba are ints?
user3010322
@ScarletAmaranth What's the difference between rgba and color ...?
@Ell unsigned chars
@ScarletAmaranth Why not transform
@ThePhD there's none; just from the type perspective
user3010322
So remove one.
19:04
@CatPlusPlus because you can't transform groups of 4 unsigned chars to 1 color
Xeo
Xeo
example types plx
What, what the hell does that vector look like
@ScarletAmaranth what is this 'color' type you speak of
user3010322
struct rgba {
unsigned char r, g, b, a;
};

struct color {
unsigned char r, g, b, a;
}; // why is this even here?
vector<unsigned char> -> vector<color<unsigned char>>
Ell
Ell
19:05
I presume `[12. 35. 63. 225, 53,22, 51, 225, 223, 199, 80, 255 ... ]
oh wait.
user3010322
Ooh.
Ell
Ell
Can't you cast that then?
user3010322
You need buffer_view.
Why why why why do you have the first one
Xeo
Xeo
^
Ell
Ell
19:05
if the structs are the same?
@ThePhD where do I get that
Just don't fucking have the first one
@CatPlusPlus stupid third party code
yeah I wish
the first one is really retarded
it's not a struct
user3010322
@ScarletAmaranth You write it.
Don't use that third party code then
19:06
it's just a stupid vector of unsigned chars that I get from an API call
user3010322
Here's the paper, have fun!
Xeo
Xeo
try std::accumulate
with a fancy functor
aaah; fold could work!
user3010322
I wish you could force vector to release its underlying memory.
Xeo
Xeo
shoo shoo
19:07
that's a good idea; thanks
user3010322
{ ptr, capacity } = vec.release()
user3010322
So nice.
user3010322
SO NICE.
that would demote it to an array
vec.demote() :D
a pointer to an array
user3010322
19:08
If you want a releasing-vector, though
I want buffer_view
user3010322
just make a std::unique_ptr<T[]>() and also keep the size.
user3010322
That way if someone wants to pass on the data to something else, they can.
and also provide a container interface
yeah I wish it returned something more sensible than vector<unsigned char>
:-\
user3010322
19:09
buffer_view fixes that problem for me.
user3010322
and my make_buffer_view_as<T>( container );
user3010322
All the reinterpret casts. All the time!
yeah that sounds like something I need
user3010322
Write it. It's not hard.
Xeo
Xeo
if colour is POD, you could actuall reinterpret_cast the unsigned char* as colour*, I think.
user1804599
@Xeo eww British English spelling in code.
@Xeo well, I could just for loop and be done with it :-\ but that's not fancy enough
user3010322
I could give you my whole implementation of buffer_view
user3010322
The only dependencies on my engine are type_traits, which are header-only already and easily dumped elsewhere.
nah that's alright, thanks; I think it's an overkill - I'll either fold or make color POD and reinterpret_cast as @Xeo suggested
19:14
Just for fun in oro.math.unifi.it/paolini/src/sudoku I propose this solution: #define F for(;i<81 s[81],m[82],k,i,e;main(){F;++i)scanf("%d",s+i),m[i]=s[i];for(;!e; ){for(i=0;m[k];)k++;if(e=k>80)F;printf("%d%c",s[i++],i%9>7?10:32));else if(++s[k]>9)for(s[k--]=0;m[k];e=!k--);else{F&&(i==k||s[i]==0||s[i]-s[k] ||i%9-k%9&&i/9-k/9&&(i/3%3-k/3%3||i/3/9-k/3/9));++i);k+=i/81;}}} — Emanuele Paolini 52 secs ago
user1804599
There aren’t enough terrestrials yet. We need extra terrestrials.
user3010322
Furrovine::unionable and Furrovine::pod
user1804599
Furrovine::octopod
Furrovine::not_funny
user1804599
Jefffrey::fuck_you
user1804599
19:17
@FredOverflow I love that picture of Sutter. Looks like his glasses are glowing.
So, I am the one saying "fuck you" or you are?
user1804599
I want glowing glasses too!
I'm feeling anemic.
hmm
handling boost::optional does not actually require handling member function pointers in general.
it only requires that I can describe them at the LLVM level.
it would be a lot better to have basic support and then get back to writing what I actually care about, which is the example.
well
I now have 160" of Lounge
19:19
hi
Xeo
Xeo
hm. I feel like I'm invoking UB with the reinterpret_cast, though it should be fine.
weird
@rightfold him?
user1804599
@Jefffrey Time for an enema!
user1804599
@Jefffrey Herb dummy.
19:20
too bad the fucking window in between the rooms is dirty
Xeo
Xeo
damn, this really seems like UB. as soon as I switch the data-type to int it "works"
char is aliasable by anything, y u no work
@rightfold yeah no
user1804599
@BartekBanachewicz Cillit Bang!
user1804599
Bang! And the dirt is gone!
@rightfold I know.
19:21
obligatory.
hmpfh
i gotta say
negating keystone effect takes a bit of quality from the picture
like, the really considerable bit
I've just became dumber
OTOH i would have to buy a whole another mount for it
to put it lower
Ell
Ell
19:23
@Puppy this is techno? :P
user1804599
@Xeo Ask clang’s UB finder.
@Ell yuppers
that's why it's called "Cillit Bang Techno Remix"
@Xeo What's the expected output?
Xeo
Xeo
1 2 3 4
4 3 2 1
You're std::couting chars
Xeo
Xeo
19:27
... fuck
thanks
@Xeo lol
user1804599
that's a sexy skeleton
Xeo
Xeo
@ScarletAmaranth: So yeah, there: coliru.stacked-crooked.com/a/982349cb296e2024
user1804599
19:29
where do you find those things?
user1804599
Tumblr.
Xeo
Xeo
damn, it doesn't seem like this graphics card is going to go down to 209eur again...
I should've gotten it while it was so low
are there const member data pointer types?
@Xeo ye; thanks
ISTR something.. like T (const Ty::*)?
or is that only for member function pointers?
Xeo
Xeo
19:30
fuck if I know
member pointers are fucked up
user1804599
Duh.
user1804599
They’re a C++ feature.
@rightfold yeah something like that
@ScarletAmaranth why are you guys using char for color values?
memory is cheap
anyway this projector is not for text
it's for movies
user1804599
19:31
@BartekBanachewicz I’d use something specifically made for glass. :v
and games
@rightfold I think i have something like that
user1804599
Or just fill the room with fluorine and throw in a torch tomorrow.
@Jefffrey it's a third party crap
Ell
Ell
@Jefffrey lol. you gotta ask for consent is the problem
19:40
grumble grumble this is catchy grumble grumble
> Vagina are not prisons. They are penistentiaries.
this thread is hilarious
user1804599
@thecoshman Nice song.
user1804599
user=> \u05D0
\?
user1804599
Wat.
user1804599
user=> "א"
"??"
user1804599
19:46
Fail.
user1804599
Oh, it’s some terminal crap.
@rightfold stfu, cli wtf, tla atb dyk
user1804599
Haha.
user1804599
eon.core> #{\u05D0 \u05D1}
;; => #{\א \ב}
user1804599
Dat misplaced backslash.
19:55
I think I'm feeling better. Thanks ladies.
user1804599
eon.core> (denominator (* 2 5/10))
ClassCastException clojure.lang.BigInt cannot be cast to clojure.lang.Ratio  clojure.core/denominator (core.clj:3246)
user1804599
This is kinda suck.

« first day (1364 days earlier)      last day (3807 days later) »