« first day (1752 days earlier)      last day (3186 days later) » 

5:02 PM
@LemonPi Why are you using a union?
 
I think the original writer did it for space savings
It also makes the struct size a power of 2 (32); would be 40 otherwise
 
@LemonPi What did the original writer use this union for?
 
It's inside a struct representing a node in a binary heap
It's a priority queue for nodes in a routing tree (temporary directed parts of a routing graph)
The structs are stored in the binary heap in pointer form
 
Is there no way to copy-construct a std::vector<CopyConstructibleFromT> from std::vector<T>?
 
No. You can only copy from the same type. Use the range-taking constructor.
 
5:08 PM
@LucDanton This one?
> template< class InputIt > vector( InputIt first, InputIt last, const Allocator& alloc = Allocator() );
 
Yup.
Combine with make_move_iterator if you want to pilfer the elements from the source (i.e. counterpart to moving).
 
Quick question. is there an easy way to ignore casing when reading an xml (planning to strcmp the xml data to the room name, but since there's many variations in casing for each room name, i need to ignore the casing from the xml).
 
@LucDanton Would do if I weren't in bcc32 (C++03)
 
@Jeff use tolower()
 
the first day at the new workplace was very nice :D
 
5:11 PM
@caps Also you wanted to copy, not move.
 
@AlexM. Congrats!
 
people seem to be very work focused so I was spared of looking awkward while not participating in random unrelated chit chat all the time
 
@LucDanton In this case moving would probably be okay, actually.
 
@AlexM. Watercooler chit-chat.
Alex do you use a mechanical keyboard?
 
the watercooler is way too complex I need to explore it later because I don't know how it works yet
 
5:12 PM
@caps Then my advice still applies in general. There’s one in Boost.Move, too.
 
@DonLarynx Tried using tolower(), but it causes my server to crash for some reason. Maybe b/c I'm using a pointer & find to get the contents of the xml from the server and send it to the client?
 
@LucDanton Also, in this case, bending over backwards (i.e. using a boost library) would be overkill just to move. :)
 
@Nooble yes
roccat ryos mk pro with mx blues
 
@AlexM. Interesting...
 
@Nooble tenso.com has the shipping discount again
if you want cheap topre
 
5:14 PM
YES
 
@AlexM. Do the switches have inconsistencies? My blues are weird. I have a super light key compared to the others.
@Jeremy Ooh.
 
I'm missing half the conversation here, are we discussing topre boards?
 
Blues.
 
@Jeff Here, put your code in this room so I can take a look at it chat.stackoverflow.com/rooms/85020/jeff-dons-room
 
oh
 
5:16 PM
@Jeremy I can't read japanese.
 
@Nooble no, only for the keys which use different switches obviously
like caps lock, space etc.
 
@Nooble just go to rakuten.co.jp and search for the model number that you want
 
those are not blues
 
whiterabbitjapan.com is like a proxy buying service, you could check them out
almost bought a 2nd HHKB through them
would have been cheaper than going through EliteKeyboards and I could get the JP layout
 
@ʞɔᴉN So I was thinking of taking away orlp's keyboard and giving him a membrane.
 
5:18 PM
@Nooble like.. a standard keyboard or topre?
 
@ʞɔᴉN Standard.
So we can't hear him type.
 
@ʞɔᴉN go type-s
 
ah ok. get him a laptop-style keyboard
@Jeremy I would but it's so much more expensive, not sure if it's worth it
you have type s?
 
@ʞɔᴉN Yes.
 
And we can give his keyboard to Scott, since he's always freaking muted anyway.
 
5:19 PM
noice
US or JP layout?
 
@ʞɔᴉN US. JP spacebar way too narrow.
 
@Nooble good idea
 
imo, anyway.
 
@Jeremy ah. I'd probably get used to the spacebar if it meant having dedicated arrow keys
the backspace key is what gave me second thoughts though. it's so tiny
 
@ʞɔᴉN yeah, that too.
Going to pick up a silenced RF board and see how it compares
 
5:21 PM
silenced realforce is expensive as hell too
 
But it seems that tactility and travel are better on silenced switches.
Meh. Only about 180 USD going through tenso with shipping discount.
Could be a lot worse.
 
ah true
 
@ʞɔᴉN I'd love those.
 
@Nooble yeah, you don't appreciate em till they're gone :/
 
@ʞɔᴉN I'm getting used to it though.
 
5:24 PM
> $394.00
uh mhm
 
@fredoverflow -1 not in STL
 
go big or go home
 
Boo. Now I need to inject extra stuff into the constructor for CopyConstructibleFromT.
 
I wonder how topres feel.
 
@Griwes honestly I'm so tempted though. I feel like after a few years the value is going to go wayyy up
 
5:25 PM
I should start a topre keyboard modification and repair business
 
You'd need a mill.
And that's my idea.
 
@Jeremy If you could offer topre/cherry stem converters you'd be a god
 
Hehe.
 
or hell, just some custom keycap sets specifically for topre boards. they tend to have nonstandard layouts anyways
@Nooble honestly not hugely different from a regular keyboard, except the action is a lot smoother and the bump much more noticeable
 
@ʞɔᴉN WANT
 
5:28 PM
they actuate at a certain point like mechanical keys. you don't have to push it all the way down like regular membrane keys
 
oh god a topre keyboard is so expensive o.o
 
which is awesome for gaming. so fast
 
i'll just stick with my dell silver/black keyboard lol
 
@Jeff haha smart
 
@Jeff Those feel bad.
 
5:29 PM
eh, im used to it. I play a MMO called GunZ: The duel and th ekeyboard can do some sick glitches to the game
 
This 87UB-55 is ~160USD: item.rakuten.co.jp/dtc/4560299340448
 
i don't even use a gaming mouse lol, i just change the hz rating on my old logitech to 500
 
That's about what a good cherry board can cost, right?
 
@Jeremy why can't they make an english version :(
 
My Pok3r cost $119.
 
5:29 PM
yeah that's the lowest price I've seen for topre
 
Pretty good.
 
other than HHKB lite maybe? edit: nvm, no topre switches in these
 
@ʞɔᴉN That is an english version
It's just from a JP reseller on rakuten
 
ah
 
I want a tenkeyless but 60%s are so cute <3
 
5:31 PM
haha
kind of impractical but very cute
my mousepad is far larger than my keyboard at work
 
The only gaming keyboard I ever used was a cyborg saitek v.5. cheap & felt smooth
 
@Jeff I think we have one of those at home. switches aren't comparable to mechanical but you can do a lot with it
my only beef with the saitek is it's soooo wide, especially with those macro buttons on the side haha
@TonyTheLion 'murica
 
@ʞɔᴉN do mechanical's really feel that much better? I always thought of them as more of a gimmick than actual improvement. Just something to make people think they'll play better.
 
@Jeff Probably because you're using it wrong (like most people do). Have you cast the value to unsigned char before passing it to tolower? If not, that's probably your problem.
 
5:35 PM
@Jeff WHAT? I CAN'T HEAR YOU.
 
@Jeff Haha it can be a bit of both. Spending 150+ on a keyboard isn't going to magically help your typing or gaming or make you a better programmer
 
Oops, No I didn't cast it.
 
but a keyboard is something I'm in contact with for a huge part of the day. Personally I'd rather have a quality tool
 
@ʞɔᴉN It gave me magical powers.
 
ok well Nooble is the exception
 
5:38 PM
@ʞɔᴉN Yeah, so are monitors, PC hardware and my chair
 
@ʞɔᴉN Actually, it can help your typing. Nicely sculpted key caps can (and do) help train your fingers to hit keys right on the center, where there's less chance of a mis-strike.
 
Are there transcripts for these Channel9 videos? Can't find them.
 
@unordered_meow Indeed. I really appreciate quality monitors too
 
A keyboard is something I use for hours on-end every day. Damn if I won't own and use one I love.
 
@JerryCoffin Sure, but you don't have to have a mechanical keyboard to get those.
 
5:40 PM
I'm still working off an old 768p monitor (sadface)
 
My Microsoft ergonomic keyboard has curved key-caps.
Pretty sure it's not mechanical.
It didn't cost me $100+ so it can't be mechanical, right?
 
Yeah it's not.
 
> Because keyboards are accessories to PC makers, they focus on minimizing the manufacturing costs. But that’s incorrect. It’s in HHKB’s slogan, but when America’s cowboys were in the middle of a trip and their horse died, they would leave the horse there. But even if they were in the middle of a desert, they would take their saddle with them. The horse was a consumable good, but the saddle was an interface that their bodies had gotten used to. In the same vein, PCs are consumable goods, while keyboards are important interfaces.
 
@JerryCoffin That's true, but you can train your fingers on pretty much any halfway decent keyboard. I can type just as fast on my macbook
@caps it's not, the microsoft keyboards are good though
 
@ʞɔᴉN It's loud enough to be mechanical though. :p
 
5:41 PM
lots of people even prefer them after trying mechanical haha
@caps oh really? I thought they were almost laptop-style keys (edit: never mind, looks like there's a bunch of different models)
 
@caps True, it doesn't have to be mechanical. This is a matter of correlation without causation--but there is correlation nonetheless. Better keyboards have better keycaps much more often than not.
 
@Jeremy pretty much yeah. I can see me going through a few PCs before I change my keyboard
 
Oh god i can't type on a macbook
 
@ʞɔᴉN Not the one I have.
This is basically what mine looks like:
Not looking closely enough to see if there are any differences
 
that said, I feel like I would like to swap mine my keycaps for something with a bit of roughness to them... mine feel rather smooth
 
5:44 PM
@caps You could do a lot worse for a membrane keyboard.
 
@caps oh yeah we have a few of those at work. How do you get used to the shape though?
 
@thecoshman You want PBT keycaps.
 
@caps What type is it? Seems nice. I have Microsoft Comfort Curve 2000
 
membrane keyboards feel like typing like I am poking poo or something
 
I tried typing on a co-workers computer and I literally could not find keys
 
5:45 PM
@thecoshman Hehe.
 
Of course I've mostly worn away the inking on the left-ctrl, S, D, X, C, V, M, left-arrow, and right-arrow keys.
 
@ʞɔᴉN Practice.
 
Not to mention some of the cover on the padding on the left corner has worn away.
Padding is all still intact.
 
@thecoshman what Nooble said. PBT keycaps tend to have a textured surface and they last a lot longer than the regular ABS types
 
I've been using it for... years now.
Not sure how long.
 
5:46 PM
that's mine
 
@wilx Image metadata says "Microsoft Natural Ergonomic Keyboard 4000." Not bothering to check if that's exactly what I have.
Very, very, very similar to mine for sure, though
 
@unordered_meow nice logi ;)
 
I like it
Haven't used mechanicals so I can't compare
 
@caps It is also on the back of the keyboard. :)
 
surprised it's wired though. I'm so used to wireless logitech stuff
 
5:48 PM
@wilx Sure enough, that is the exact model. "v1.0"
 
I wouldn't touch wireless keyboards with a 10-feet pole
 
I spend way too much time at a computer to not have ergonomic stuff.
So this is my mouse:
It is wireless, but I don't game enough to care (or notice, most of the time).
(unfortunately for me)
 
@caps OK. How is the keys resistance? I had one older model and it was nice except the resistance of the key press was weird/hard.
 
fucking rage at shit UI
 
@wilx I suppose there's a little resistance, but not enough to bother me.
 
5:50 PM
@caps nice. does the scroll still work fine? i have a friend who owns that but the scrollwheel quits intermittently
 
@ʞɔᴉN Scroll works fine. I don't actually use it more than a few times of day at most.
 
@caps At one time Keytronic made keycaps with the letter (or digit, etc.) molded in, so unless you literally wore all the way through the key, the "inking" remained intact. Not sure they do that any more though.
 
Well, I suppose I use it quite a bit.
 
So ergonomic.
 
5:50 PM
if you have a god damn search form, fill out with what I am currently searching for, don't make me re-enter everything every time I want to slightly change my search!
 
^ quality.
 
@JerryCoffin I think they're called double shot?
 
Gotta' have something from there.
@JerryCoffin Sounds nice.
 
@JerryCoffin you can still get multi-injection caps, but it's expensive
 
Hahahahahahaha.
What's up.
 
5:52 PM
@R.MartinhoFernandes Not much. What's funny?
 
Oh wow.
Found Club Mate Winter Edition.
@caps my life is like a sitcom.
 
@R.MartinhoFernandes Elaborate?
 
well that's not going to be cheap
 
Xeo
@caps He needs a laugh track to keep him going.
 
@Nooble Such small keyboards aren't my taste. I'd like to have tenkeyless, but a good tenkeyless is hard to find, and I don't have that much money for mechanicals (not yet, I think)
 
5:54 PM
@JerryCoffin Signature plastics still makes doubleshot (PBT!) keycaps.
And, I suppose GMK makes keyboards with doubleshot keycaps now, too.
 
also I'm a mouse scrub
 
What's the syntax for overloading a function based on templated "type classes"?
i forget.
 
@unordered_meow get a Ducky Zero, less than $100 for full set of mechanical keys... there might be a -10 too
 
@caps Template template parameters?
 
Yumm that cinnamon flavor...
 
5:59 PM
@R.MartinhoFernandes Spice melange!
 
@caps I'm fully prepared for a robot harem story.
 
@wilx overloads for RandomAccessIterator vs. BidirectionalIterator for example
 
Nothing to do with women.
 
Use tag dispatching
 
6:00 PM
@unordered_meow Right, pretty sure that's what I want to do. Can't remember the syntax.
But now I know what it's called to google it.
be back soon
 
It's a long story and I'm keeping it for myself till it's over anyway.
 
You provide overloads for a several dummy types
 
@caps Give me an example
 
@R.MartinhoFernandes The part of your life with women is a drama? :)
 
Dunno.
It's complicated.
 
6:02 PM
And you can query the type with typename std::iterator_traits<It>::iterator_category
 
I am picky and apparently only pick the problematic ones.
 
@R.MartinhoFernandes No kidding.
@R.MartinhoFernandes Saviour complex?
TBH, I am not the one to talk, given my track record.
 
What's that?
 
> Notes: There is no separate tag for ContiguousIterator (since C++17)
whyyyy
 
@R.MartinhoFernandes You pick the ones that need saving or such.
 
6:07 PM
@wilx Robot, saving all the lesbians
 
6:20 PM
"Noobel Prize", lol
 
@bartek Get your ass over here. I miss ya.
 
@ScottW Thank you, thank you.
 
@wilx Are you the one who knocks though?
 
@ʎǝɹɟɟɟǝſ Knows? If this is a joke, I do not get it. :)
 
> the committee has hit new lows
 
6:27 PM
@wilx It's a BB reference
 
BB?
 
@ʎǝɹɟɟɟǝſ :(
<3 Barket.
 
31 mins ago, by caps
@wilx overloads for RandomAccessIterator vs. BidirectionalIterator for example
@unordered_meow There we go. That's it. Thanks.
 
Any advice for getting up to speed quickly for shifting bits?
 
6:39 PM
Why are you doing bit shifting
 
I need to unit test embedded code that shifts bits
So I need to understand what the method does, so I can unit test it properly
 
cliffs: << is left shift, >> is right shift. Here's *one* example from that page:

Here is a bitwise left shift, performed on x (x << 2):
x: 00011010 11101011
---------------------------
shifted: 01101011 10101100 // this is the value 27564
 
You do tests by implementing them according to your spec
 
Unsigned shifts are trivial
 
6:46 PM
You are trivial
 
You don't need (as the test writer) to understand the source. You provide several inputs and verify if the outputs are correct.
 
Note that x << 2 raises x by a power of 2, twice
 
multiplies it by 4
 
oops
 
In general x << y is x * 2^y.
 
6:47 PM
Signed shifts are annoying
 
Use unsigned for bit operations
 
@DonLarynx No, it does not raise x by a power of 2 twice.
x^2 is quite different from x * 2^y
Maybe I'm wrong actually
 
this looks like jargon to me
 
like what does left shift mean and how does it work?
 
6:49 PM
@ʎǝɹɟɟɟǝſ No you're not
 
It shifts
To the left
 
for the unit tests, I want to assert if a result is equal to an expected value like a hexadecimal value. So I need to understand this
 
GET YOUR SPEC
 
It shifts the bits to the left
 
I like your syntax better anyway, correction: Note that x << n multiplies x by 2, n times
 
6:50 PM
what spec? LOL
 
Don't have a spec? Your company is LOL then
also SOL
 
Wait, he is working at a company and doesn't know what bit shifting is?
 
Dunno, that was my assumption probably
 
Give me your job coach
I'm ready
 
6:51 PM
lol
never learned it
I did a minor in cs and that was not a required class
SOL?
 
@KalaJ from what university?
 
crappy local school
 
If you're unit testing a function and the function internally uses bit shifts then you do not care.
 
@KalaJ Wait, are you seriously working as a programmer?
 
I even asked a friend who is a CS major!!!
and he said he never heard of it!
 
6:52 PM
topkek << 2
 
laffo
 
Please tell me you are kidding
 
so I know I went to a bad school
I wish I were :(
 
what's the name of your school Kala J?
 
Like you are trolling or something
 
6:53 PM
no I'm not
unless my friend is trolling
 
And now where are you working, if I may ask?
 
can't disclose :P
 
probably google then
 
Good luck getting through Google interviewing without being able to bitshift
 
they'll left shift you to 1970
 
6:54 PM
Oh wait, you are an engineer. Why didn't you say so? @KalaJ
That makes sense now.
 
meh who'd want to work at Google anyway?
 
I shall bestow upon you the knowledge of unsigned bit shifts
You have bits
Like 0001000
 
Like ones and zeroes
 
ok
 
You can shift them to the left (like 0001000 << 1 is 0010000) or right (0001000 >> 1 is 0000100)
That's it
 
6:55 PM
why do you want to shift them?
 
it does shit
 
<< i implicitly means 2^i
 
Why did chicken cross the road
All that multiplying nonsense is red herring
 
to get to the other side
 
Get the spec
 
6:56 PM
what spec? Lol
 
@KalaJ because you can have bools but bools take up 1 byte, which is 8 bits...get the picture yet?
 
user1804599
@CatPlusPlus Because chickens are careless about roads.
 
And write your test according to the spec
 
It is a side effect of shifting but you shift because you want a shifted state
 
@KalaJ Formal specification of your software
 
6:56 PM
so bit manipulation is more efficient than bools
 
its more space efficient
 
I've heard rats do not have a good deep percetion, and that's why they cross the road even if there's a truck about to hit them.
 
want 8 bytes of usage or 8 bits?
8 bits == 1 byte
on most machines
 
@KalaJ Just like mortar is more efficient than a sniper rifle
 
6:57 PM
what
 
This is also irrelevant red herring
Purple even
 
user1804599
wtf
 
user1804599
you're all so bad at efficiency
 
so there is no spec
 
You shift because you want shifted result, probable use cases are not very important to the core behaviour
 
6:58 PM
ok
 
user1804599
cryptic code is less efficient as it takes more effort to maintain and fix all the bugs hth
 
for example, I see this:
 
 index = ((U8) m_crc) ^ data;
   m_crc = (m_crc >> 8) ^ CrcTableA[index & 0x0F] ^ CrcTableB[index >> 4];
 
Maybe you have a thing that has lights in a row and you want to do the "oh my god the light is moving" trick
Maybe you're packing and unpacking data
 
6:59 PM
that looks complex but I need to understand the value of m_crc
 
Maybe you're bad at programming and using them as multiplication and division
 
Above is C btw
 
@KalaJ Explain this code please? What's it meant to do?
 

« first day (1752 days earlier)      last day (3186 days later) »