« first day (1230 days earlier)      last day (3736 days later) » 

6:00 PM
Obviously, with bitfields, the bitwise operations are still in there, but I don't have to look at them, and the compiler builds the masks/whatever, rather than me.
 
@BartekBanachewicz You're still missing the point pretty badly, I think. Consider code that (for example) changes permissions on files under Windows. Yes, in theory you could define some abstractions and make the very top level of that portable. But the part you can make portable borders on trivial in most cases.
 
user1804599
Bit manipulations are only terrible if you cannot use binary literals.
 
binary literals don't really help much
 
user1804599
Everything is better than hexadecimal literals when you want to set specific bits.
 
making it a zero-counting exercise does not count as readability in my book
 
6:03 PM
Tables of 32-bit binary literals just look like gunge after a few minutes. It's very difficult to get them right.
 
(1 << bit index) #woah
 
If you want to fix this by adding language features add the ability to set specific bits directly
 
@rightfold Hex is a lot better than decimal for dealing with individual bits.
@R.MartinhoFernandes If I want assembly language, I know where to find it, thanks anyway.
 
@CatPlusPlus Bits 0-2 are don't care, bits 3-6 are target ID, bits 7-13 are source ID.....
 
user3010322
constexpr may help here, with variadic templates or something, I dunno.
 
6:05 PM
@R.MartinhoFernandes Is it me or that extraction code could easily be a template? (if it isnt already in the standard)
 
user3010322
Even then, it's still not very nice to work with.
 
user3010322
@Borgleader I don't think it's in the standard, but tehre's functions for switching byte orders (nhotl and hontl, IIRC?).
 
@Borg yeah but Rob is a C programmer
 
user3010322
They're usually available everywhere.
 
:lol: nhotl
 
user1804599
6:07 PM
__builtin_bswap32
 
@R.MartinhoFernandes It was more of a general statement regarding C++ than a reflection on the article itself.
 
@MartinJames how do you have to look at it if it's hidden in the abstraction?
 
user3010322
How do you tell if a window is focused again?
 
It's ntohl [Network TO Host Long] and htonl [Host TO Network Long] (and -s variants)
 
user3010322
Ah.
 
user3010322
6:07 PM
Okay.
 
Anyway, my fucking GCC does not have binary literals. I have to put the binary in a comment line, copy/paste to a calculator, convert to hex, paste back again. Even then it doesn't look right if the calcuator has chopped off leading 0-bytes, and debugging is a nightmare.
 
They're part of BSD socket interface
 
user3010322
In Win32 API, it's like GetFocus() == myhwnd, I think..
 
@CatPlusPlus Don't you love how self-explanatory these names are?
 
@MartinJames that's because you insist on writing low-level code directly
 
6:08 PM
Not HOT Long
 
why do people write low-level code
 
user1804599
You don’t always not have to.
 
why would you build logic with low-level code
 
Errm.. drivers for embedded.
 
Someone give Bartek a sugar cube or something
 
6:09 PM
@ThePhD Most windowing systems to something to highlight the window that has the focus. :-)
 
user3010322
@JerryCoffin Heh. I forgot to say "Programmatically".
 
Xom is BORED of that topic
 
user3010322
If anything this lounge has taught me, it's be deathly specific, or get trolled.
 
@JerryCoffin Actually, PhD has a point. I just tried, and the window border does not look that different:(
 
@ThePhD Any ambiguity will be misinterpreted, if somebody thinks it might be humorous.
 
6:11 PM
And also any non-ambiguity
 
@MartinJames Maybe I am not a very experienced embedded systems programmer (certainly compared to you and @Jerry), but I have often found examples where "embedded" was used as an excuse to write low level code directly where a reasonable abstraction could be made without a hassle. I think it stems from the fact that people that write C insist on keeping the code "clear", which pretty much amounts to "unstructured". That might be just my opinion based on the very little glimpse of embedded ecosystem
 
@JerryCoffin s/somebody/Jerry
 
Comedy First
 
Also the most terrible things get starred
 
The form titles and main menu items get ghosted on forms without focus.
 
6:12 PM
@MartinJames Sadly true. Microsoft (among others) certainly seems intent on destroying any and all remaining vestiges of usability.
 
Can't you guys star high quality content that is actually funny?
 
But my embedded tutor (who was of age and thus I assume had some experience) looked at me weirdly when I , for example, packed three direct registry entries into a reusable function.
 
Yes star more of my messages
 
Stop posting the poor unfunny content and then we cannot star it
 
6:14 PM
@BartekBanachewicz Maybe you are mistaken about what he was looking at.
 
@R.MartinhoFernandes lol
> embedded tutor
what's this guy/gal embedded in?
 
@StackedCrooked I am p sure it was that, because he also nearly shouted at me when I used assembly macro instead of 3 instructions directly.
 
user1804599
@TonyTheLion Hell.
 
He seemed offended.
 
@TonyTheLion Soil, like most fossils
 
6:15 PM
@BartekBanachewicz I write my drivers in C++, and a 'structured' as I reasonably can. All my ARM drivers, (except SD-card), have the same interface and use the same comms mechanisms. I do my best:)
 
user1804599
@BartekBanachewicz He doesn’t seem to like DRY.
 
imbibed programmng
 
@BartekBanachewicz It's certainly true that a lot of embedded code is pretty poor, often in pretty much the way you describe. Quite a bit of such code seems to have been written by electrical engineers, who seem to think any level of abstraction higher than a gate is purely for "architecture astronauts".
 
user1804599
He prefers pussies that are WET.
 
@R.MartinhoFernandes From that typo, is seems that you have started imbibing yourself:)
 
6:17 PM
Imbibe hard
 
user1804599
imbible
 
@MartinJames Imbibing yourself is not recommended. Imbibing alcohol is definitely better.
 
@CatPlusPlus I intend to, but not till later. I can't take more than ~5 pints of 'Rev. James' without becoming incoherent.
 
user3010322
.... So.
 
user3010322
I'm, uh.
 
user3010322
6:18 PM
Sitting in this classroom.
 
user3010322
It's set that class is supposed to be here.
 
user3010322
But... the classroom is... entirely empty.
 
:lol:
 
hahahahah
 
Why did they even let you in
 
6:18 PM
@ThePhD OK. Log on, check timetable...
 
user3010322
I walked out and I checked the door number and the time on the schedule... it all matches up.
 
user3010322
I'm... really confused. There's no e-mails from professor or TA, there's no weather emergency, other classes are happening...
 
15 minutes man
 
@ThePhD Check the date:)
 
@ThePhD Is it a holiday? did the teacher send an email? do you have an exam?
 
6:19 PM
15 minutes and you can go
 
user3010322
Did... everyone just decide not to come today?
 
user3010322
Was that like an agreement and I missed it?
 
maybe you're the only one?
 
wait the student quarter and bail out vOv
@melak47 you arround?
 
@ThePhD Look outside the window. Is eveyone else milling around on the car park, with cop cars and a bomb-disposal van parked behind?
 
user3010322
6:21 PM
Thursdays, 1:10 PM to 2:00 PM EST, Room #832...
 
@BartekBanachewicz working on uni crap :/
 
@melak47 what is that. Let me help you :D
 
@ThePhD no date?
 
user3010322
@TonyTheLion It's a recurring class.
 
6:21 PM
recursion
 
@BartekBanachewicz it's not programming related ._.
 
@melak47 dang it.
 
I only have management, business and whatnot classes left :(
 
@melak47 will you be done in reasonable time from now?
(I already hit lvl 4 BTW so we are out of newbie league :S)
 
user3010322
I... uh. I guess I'll ust sit here and program.
 
user3010322
6:22 PM
I've sent an e-mail to the professor and TA.
 
@ThePhD That ringing noise in your head is not a hangover - it's the fire alarm.
 
user3010322
@MartinJames No, there's no alarm, there's people walking around outside... I'm just insanely confused.
 
user3010322
Perhaps I zipped myself up far tighter than I could have possibly imagined.
5
 
@BartekBanachewicz idk. may decide to take a break at some point, still got 28 hours left on the assignment :v
 
user3010322
And now I'm just dreaming.
 
6:24 PM
lol
 
@melak47 the crew misses you.
and the ship too!
(I am terrible I shouldn't be doing this)
 
@BartekBanachewicz it's only the final 20p paper assignment for this course :)
 
@ThePhD You have compressed yourself into a singularity?
 
@ThePhD Actually, you're confusedly insane, not that it makes any real difference.
 
@melak47 bah, okay, then finish it and get shit done.
I've already started a new semester so it's a bit looser now
just introductions and shit
not much to do
 
6:26 PM
@BartekBanachewicz can I stay offline in steam friends since the game has it's own account thing?
 
'cept piloting The Flying Sultan, that is!
 
if yes, I could play a couple rounds without the other people I'm working on this with noticing :p
 
@melak47 oh lol.
@melak47 I think it might sign you in :S
 
I don't think the static_cast<int*>(pv1) is allowed. (The data was allocated as char[N].) But this is an example from Bjarne's book on programming.
 
user3010322
OH. Well. I derped.
 
user3010322
6:27 PM
It's every OTHER week. Today is the off week.
 
user3010322
They... they don't really mention that anywhere, but.
 
user3010322
It's... good to know?
 
user3010322
(The TA e-mailed me directly).
 
user3010322
Well. So I wasted my time coming here.
 
6:28 PM
might as well stay there now til next week :)
 
user3010322
And I also look like an idiot in front of my TA.
 
user3010322
Awesome.
 
@StackedCrooked I think it is, but not sure. The strict aliasing rules are some of the most weakly enforced by compilers anyway
 
user3010322
I'm just on a roll today.
 
@ThePhD ...so what's new?
 
user3010322
6:29 PM
@JerryCoffin Nothing, unfortunately.
 
@BartekBanachewicz well see if you can invite me in game or if I'm offline
 
user3010322
I've only solidified my standing as an idiot.
 
@melak47 orite
 
The Derp Storm Raged
@ThePhD Its a mistake, it happens to not only you. It doesn't make you an idiot. Maybe makes you a derp.
 
@DeadMG The pointer might not be aligned for int. Or is static_cast from void* special in this regard?
 
6:30 PM
@melak47 I see you online. Sent you an inv.
 
no
 
I'm a stealthy slacker :v
 
but malloc and new both give alignment guarantees.
 
user1804599
scrot is a great tool, but it reminds me of a certain body part.
 
the code sample is hardly complete but it does seem that the memory could be misaligned.
C++98/03 did not have good alignment handling and 11's is hardly great either
 
6:34 PM
http://stackoverflow.com/questions/22076642/pop-function-implementation-in-a-linked-list-c
http://stackoverflow.com/questions/22076325/linked-list-using-class-in-c

Will no one rid me of these turbulent lists?
 
sweeet
 
@MartinJames Stop going to SO main
problem solved
 
@Borgleader bretty cool
 
@rightfold inb4 scrotum
 
@TonyTheLion scrot.uml
 
6:36 PM
@ThePhD If it makes you feel any better, I once drove 20 miles to college, wondering why nobody had turned up from the car-share pool, only to find the car park empty and the building locked - it was a Saturday.
 
@StackedCrooked Not enough there to say for sure either way. It would depend on the implementation of Stack<int>::get, which he hasn't shown.
 
@Borgleader lol
I once took a shower to go to school at 4 am in the morning
I never looked at my clock
 
user1804599
s/cl/c/
 
IRTA "I never looked at my cock".
 
@TonyTheLion Thank god it was 4 am in the morning. I hate it when I take a shower at 4 am in the evening!
3
 
6:38 PM
@JerryCoffin I see it. That redundancy
 
I'm bored, and it's too early for the pub. Maybe eat something. Kitchen raid.
 
user1804599
Make a robot.
 
user image
2
babe @sehe wants to play :3
 
@rightfold Never build a robot when you're bored, or you'll end up with a Marvin.
 
OK, banana sandwich.
 
6:53 PM
@MartinJames Bartek?
 
user3010322
I need to completely rework my input systems.
 
user3010322
They're all dependent on background-manipulated statics to pass data from event sources to the actual MouseDevice KeyboardDevice PadDevice etc.
 
@EtiennedeMartel Heh - I just like banana sandwiches, Bartek or no :)
 
personally I find being able to input USB into myself most useful
you might prefer Ethernet though
 
@MartinJames (It's a pun on his last name)
 
6:55 PM
@EtiennedeMartel Yeah - the puppy coined it, AFAICR.
 
@MartinJames That can't be right.
 
I doubt it
 
Mar 22 '13 at 21:57, by Etienne de Martel
Is it me, or does "Banachewicz" does look like "Banana Sandwich"?
Which in itself was based on another pun:
Mar 22 '13 at 21:57, by Rapptz
I always say Bartek Bananaschwitz
 
@EtiennedeMartel OK, it was you:) Sorry..
@ThePhD ?? should data not be going in the other direction?
 
It's crazy the amount of BS there is. O_O http://techreport.com/news/26090/mantle-no-more-gdc-sessions-point-to-the-next-directx.
@BartekBanachewicz ^ I'm not exactly sure what he's referring to =/
 
7:06 PM
Does anyone even know what Mantle is?
 
yes.
 
shitthatdidn'thappen.txt
 
user1804599
@TonyTheLion lol
 
7:08 PM
@CatPlusPlus that doesn't make it less funny
 
@R.MartinhoFernandes No. AMD invented it, but even they don't really know for sure what it is.
 
Oh my god a random IM spam
Nostalgia
 
whoa epic day
 
user1804599
Speaking of spam.
 
user1804599
I got this message with the subject “Can I Trust You?”
 
7:12 PM
lol who would trust you?
 
I passed my theory of automaton examen... !!!!!!
 
user1804599
> I have (Twelve Million two hundred thousand united states dollars only) ($12.200,000) to invest in your country,
 
From 8 people today I'm the only one who passed the examen
 
Crawl site is down I can't get a newest build TRAGEDY
 
user1804599
Investing 12200k in the Netherlands is a terrible idea.
 
user1804599
7:13 PM
@LoïcFaure-Lacroix I am going to pass my theory of automobile examen soon.
 
user1804599
> examen |igˈzāmənɪɡˈzeɪmən| noun
a formal examination of the soul or conscience, made usually daily by Jesuits and some other Roman Catholics.
 
@rightfold I'm pretty sure the automobile examen is easier to pass
Today from the other class, only one guy passed the examen... so today only me and an other person passed the examen... I'm like fucking happy
My teacher is like Gandalf... "You shall not pass"
 
He never said that
 
user1804599
lol
 
@LoïcFaure-Lacroix Congratulations! Of course, with so few passes, they'll probably give another test more can pass, but it's still really cool.
 
7:18 PM
I wish he did
 
No, wait that was something about 640k
 
user1804599
You shall pass
out
 
CSS position values are a testament to good naming.
 
@JerryCoffin I guess too, after me there was 10 more people and he actually did the same as "You shall not pass"... he closed the door and left.
I still have to find the Economy teacher and get physical education.
 
@R.MartinhoFernandes No, it was Yoda who didn't say anything about 640K. Gandalf didn't say anything about a Red Ryder BB gun or a leg lamp.
@LoïcFaure-Lacroix I always wonder how a teacher must feel when (nearly) everybody fails the test. Must be depressing if you wrote the test thinking you'd taught people this material, and at the end of the class, only one person had actually learned it.
 
7:27 PM
IME usually they don't care
 
user1804599
Pissical education.
 
@CatPlusPlus not true, some care. And it kind of suck to be honest. Being from Canada I can't cheat at an exam and I see how some people here cheat and get better marks than me
But when it's time to answer vocally or talk about something, a lot of people know no shit at all...and I can understand why some teacher get mad
 
@CatPlusPlus I sometimes wonder if they really don't care, or if they basically have to start acting that way, just to be able to getup in the morning and go do their job without just being so depressed they want to take a job as a speed bump.
 
user1804599
TIL how to shutdown a Linux machine without rebooting it.
 
@rightfold sudo init 6 obviously
 
7:30 PM
@rightfold Power switch.
 
user1804599
poweroff
 
Why would you reboot a machine to shut it down?
 
Logic - I fail to to see it
 
user1804599
No, you don’t get it.
 
user1804599
7:31 PM
To reboot a machine, it has to be shut down first.
 
user1804599
I want to shut it down without the reboot afterwards.
 
user1804599
Also tomorrow I am going to recompile Chromium. :ihavenotimeforthis:
 
Can't be that hard?
 
7:32 PM
@TonyTheLion That's what she....naw, I just don't have the heart for it right now.
 
oh you
 
user1804599
@TonyTheLion That’s what she said.
 
I need to work in a messy codebase that uses timeval all over the place
However, I realized that I can do this:
auto us = seconds(tv.tv_sec) + microseconds(tv.tv_usec);
 
@rightfold joke is long over
 
That's kinda awesome!
 
user1804599
7:35 PM
@StackedCrooked write a function that does that, taking a timeval.
 
@JerryCoffin one thing that makes it worse here is that teacher usually get ridiculously small pay. And for that reason, some teacher really couldn't care less about how student study. Some even give exams for money and I think the whole Russian education system is falling apart because of this... as I understand that's one thing they lost with the soviet union.
 
I already did.
 
user1804599
Good.
 
user1804599
Because duplicate code is cancer.
 
But the conversion is so easy with chrono duration classes.
 
user1804599
7:35 PM
Chronosome.
 
And so straightforward.
 
Anyway gnight all
 
But std::chrono::nanoseconds is a son of a bitch.
 
user1804599
I think that a standard graphics library should reside in <chromo> to wreak confusion.
 
@rightfold Nah...much worse than cancer. With cancer you're only in really serious pain for a few months before you die. The pain from duplicated code can last for decades.
 
user3010322
7:38 PM
@MartinJames No, the er. PadDevice and MouseDevice classes are things you call .Update() on and it takes snapshots of the current MouseState and PadState for the specific device with that specific ID.
 
user3010322
It might be better off just being called "Mouse" or "Pad" or "Keyboard", since the Device bit does sound like a source rather than a sink.
 
user3010322
Albeit, externally the MouseDevice is what a person would use, constructing it with a device ID and then using .Update() on it when they wanted to preserve the state and then querying Down, Up, Held, Released, and all that other good stuff.
 
'You can't assign a value to a function.' Well, actually you can: virtual void foo() = 0;πάντα ῥεῖ 57 mins ago
lol
 
user3010322
Why didn't they just make = 0; to be pure; ?
 
user3010322
It's just such a weird syntax choice, = 0;...
 
user1804599
7:43 PM
@FredOverflow lol, what a noob.
 
user1804599
@ThePhD because keywords are evil, duh.
 
@ZacHowland No I meant s.th. like virtual void foo() = 0x00000f24;. You can use it to bind certain ROM addresses on bare metal environments. Seen that, been there ... May be a compiler specific extension though. — πάντα ῥεῖ 43 mins ago
wat
 
user1804599
I want to bind WOM addresses.
 
It's so simple.
I thought it was about incompatible representations.
 
People who write std::cout std::cin etc are just wrong. It's wrong because it needlessly clutters up the language. Obviously using using namespace std; is optimal (and obviously not in a header file) — Brandin 4 mins ago
I feel a shitstorm coming.
 
user1804599
7:45 PM
@StackedCrooked do you know much about UDP?
 
user1804599
@FredOverflow
 
I know how to compose UDP packets..
Thats' it.
And that's easy because it's documented.
 
@rightfold I'm not even sure if this guy is serious or trolling for fun.
 
Although the pseudo-header checksum is tricky.
 
user1804599
@FredOverflow seriously trolling for fun.
 
7:46 PM
@rightfold tagline of the week
 
user1804599
@StackedCrooked I’m not going to implement UDP myself (Erlang already has that). :P
 
What do you want to know then?
 
user1804599
Whether you know much about UDP.
 
Hello wizards
 
user1804599
@Jefffrey Next.
 
user1804599
7:48 PM
@Jefffrey Install.
 
@rightfold UDP is about as complex as boost::scoped_ptr.
 
user1804599
I have never used boost::scoped_ptr.
 
Not that kind of wizards silly. Real wizards.
 
@rightfold It's a smart pointer that is non-copyable and non-movable. So straightforward to implement.
 
user1804599
OIC. :)
 
7:51 PM
@rightfold This is the original UDP rfc. Notice how short it is :)
 
user1804599
Nice. :>
 
You shove out a datagram to a remote socket. Quite often, it gets received. That's about it.
 
UDP is nice.
 
user1804599
When would you use UDP?
 
7:57 PM
TCP is complex, but also fascinating. Congestion avoidance algorithms are very cool and new ones are still being invented .
 
@rightfold when you don't care about the guarantees offered by TCP
 
I would use TCP by default.
 
user1804599
@jalf OIC.
 
people often highlight music/video streaming, because if a few packets get lost, it's no big deal, you don't want that to hold everything up for an arbitrary amount of time. You always just want what should be played/rendered right now
but yeah, TCP should really be the default choice
 
not all video streaming is that way
 

« first day (1230 days earlier)      last day (3736 days later) »