« first day (846 days earlier)      last day (4118 days later) » 

1:00 PM
@sehe we should shout at something actually worth shouting at instead
 
for some reason, I thought the cast to int would modify the value of the pointer so it's properly aligned.
 
@LuchianGrigore That is not allowed.
 
But printing the values showed it hadn't modified.
 
reinterpret_cast must be a bijection, i.e., you must be able to retrieve the original pointer.
 
@R.MartinhoFernandes well, now I'm clinching on the argument that there's UB somewhere
so I can go back and say - "I might have been wrong, but so were you"
:D
 
1:01 PM
I just got an email asking to optimize/fix some guy's code...
Gonna respond:
> If you have questions like this, please post it stackoverflow.com It's a much better resource than me.
 
I don't think there's UB unless you dereference anything.
 
This is kinda cool
 
I'd respond with an email asking him to optimize my bank account.
 
@R.MartinhoFernandes well, @LightnessRacesinOrbit says otherwise
 
@LuchianGrigore assert(ptr == (char*)(int*)ptr); must hold.
 
1:01 PM
@R.MartinhoFernandes so my comment is right? You can cast as much as you wish as long as you don't use it
 
I'll optimise your bank account
 
@LuchianGrigore And I think aliasing is completely irrelevant.
 
It's undefined whether its UB or not. The int may not be aligned anyway.
 
@DeadMG So that it consumes as little resources as possible?
 
@MartinJames it's undefined whether it's undefined? -.-
 
1:02 PM
@sehe So that I can get more things of value from the same account.
 
better be explicit with your optimization goal :)
 
Xeo
@sehe What is that?
 
It's a regex crossword :)
 
@sehe lol
it's kinda cool now that I look at it
 
It's the bees' knees
 
Xeo
1:07 PM
@sehe I have no friggin clue how to even start solving that.
 
@Xeo Use regexen to iteratively reduce solution space... (it's from here btw)
 
Xeo
lol
 
@Xeo lol? it's pretty easy
 
@LuchianGrigore Since reinterpret_cast has the bijection requirement, I think that, if merely holding an unaligned pointer is not fine in some implementation, that implementation must produce a different value (it could just multiply the address by 4 and be done with it) (because the result is said to be unspecified, not undefined behaviour)
 
I just have to copy it to my iPad, since it's hard without rotating
 
1:09 PM
My brain automatically converts all regex questions/comments/whatever to whitespace.
 
Really any claim for this question must be backed up with chapter and verse. You/we/I can throw assertions around until the end of time, totally pointlessly.
 
@R.MartinhoFernandes multiply by 4, or align at 4?
 
@LightnessRacesinOrbit If you are interested, I think the relevant section is §5.2.10/7.
 
@Mysticial Okay just to not leave you hanging too much R.Martinho is using every argument I would be using (no surprise -- we learned a lot of those things together). I don't have anything to add.
 
@LuchianGrigore Well, assuming alignof(int) is 4.
 
1:10 PM
@R.MartinhoFernandes I suspect the relevant section is about 25% of the standard
 
@LuchianGrigore No, wait. Multiply. That gets you an aligned value that can be used to retrieve the original.
 
Well, not really 5 could become 20 or 4....
@R.MartinhoFernandes aaa ok now I understand what you mean
 
@LuchianGrigore Only 20 would do. You can't get 5 back from 4.
 
1:12 PM
but you have 3/4 chance to fall outside the addressable range
 
@LightnessRacesinOrbit I've seen worse :P
I'll find one
 
@BartekBanachewicz nope
 
@LuchianGrigore In order to maintain the requirement in §5.2.10/7 your implementation will have to either 1) have bigger pointers or 2) have a smaller addressable range.
 
@LucDanton Oh, I wasn't really paying attention. :)
 
@R.MartinhoFernandes FYI the thing I might have learned today is that a T* -> void* -> U* static_cast chain is guaranteed to roundtrip. I still want to double check that at a later time.
 
1:13 PM
Got side-tracked.
 
@Mysticial But but but my vidya gaems >:(
Don't abuse the me-signal!
 
@LucDanton under some alignment-related restrictions, no?
 
@R.MartinhoFernandes Standard-layout, sorry.
 
@LuchianGrigore Actually, if you have stricter alignment on the target type, not even that is required, so it can result in pretty much anything.
 
user142019
1:17 PM
Cool.
 
user142019
My code works.
 
@Mysticial I am not sure which answer precisely you meant but I kind of agree with this postIvaylo Strandjev 40 secs ago
 
@Zoidberg WOAH how did you do that?!
 
^^ Does this guy not have a sense of humor?
 
:P
 
user142019
1:19 PM
@Doorknob Erlang!
 
user142019
I wrote a unique ID generator.
 
@Mysticial Um... need context?
 
Lua question: why doesn't this trigger an error: if var == nonsense then ... Where var has been defined and nonsense hasn't?
 
@Doorknob Oh, you can't see the deleted question that I linked him to.
 
0
Q: Why was my Bash programming question on the `&` symbol closed?

Lightness Races in OrbitThere are currently 18,770 questions tagged bash, with top answerers in the tag being high-rep users. Why was "Why is `ls -al & ; ls -al` invalid?" closed as "off-topic" by a moderator, with precisely zero community votes to that effect? The previous concensus appears to be (example) that B...

 
1:20 PM
The question is not deleted
 
@Doorknob delightful
 
@Doorknob Read my comment on that question.
Or rather, my comment is just a link to a deleted question.
 
@Mysticial You don't have a comment there
I think you sent the wrong link
30
A: What is the difference between static_cast<> and C style casting?

GlenC++ style casts are checked by the compiler. C style casts aren't and can fail at runtime also, c++ style casts can be searched for easily, whereas it's really hard to search for c style casts Another big benefit is that the 4 different C++ style casts express the intent of the programmer mor...

 
user142019
@LightnessRacesinOrbit Reopened. :|
 
user142019
1:22 PM
@Doorknob dupe.
 
Wow MonoDevelop's editor is even worse than VS one
Amazing
 
user142019
lol
 
user142019
Use Vim and voila.
 
@Zoidberg @CatPlusPlus Eclipse rules all! :P
 
user142019
No fuck you Eclipse is terrible.
 
1:23 PM
Ahahaha Eclipse no
 
user142019
I'd rather use Notepad++ than Eclipse.
 
Eclipse never crashes1
 
@R.MartinhoFernandes is that so?
 
Eclipse just stops rendering text sometimes
 
Expected reaction to that statement.
 
1:24 PM
Friendly reminder that if you paste this into whatswrongwithmyscript.com, it'll automatically point to your semicolon and say "It's not 'foo &; bar', just 'foo & bar'." — that other guy 20 hours ago
^ Whoa. Nice feat
 
user142019
That's fucking awesome.
 
@thecoshman Pretty much. It just presses on with whatever crazy erroneous state it ends up in. Which is worse than crashing.
 
I'd rather write code by colouring pixels in Paint than use Eclipse
 
I've had Eclipse try to press on even after an out-of-memory error.
 
1:25 PM
@CatPlusPlus A lot, actually. I tried to work on ViMode (monodevelop.sehe.nl/?p=monodevelop.git;a=log;h=refs/heads/…) but I lost interest since the design of the plugin was a bit betwixt-and-between. The main editor component is nice enough to be extended
 
That basically amounted to indefinitely displaying dialogs mentioning an out-of-memory error. Had to forcibly kill it.
 
@CatPlusPlus That actually sounds kinda fun
 
someone have the gif? :p
 
user142019
 
user142019
^ Gif on a JPEG!
 
user142019
1:26 PM
inb4 lame Dutch pun.
 
Meh I'm going to have to open a question and modify my rep :(
 
Zoidberg loses last shreds of sanity ITT
 
user142019
lol
 
18
Q: How did this person code "Hello World" with Microsoft Paint?

Eamonn O'BrienI have just seen this within the past few days and cannot figure out how it works. The video I talk about is here: It's the top rated answer from this Stack Overflow question: Why was this program rejected by three compilers? How is this bitmap able to show a C++ program for "Hello World"?

 
@R.MartinhoFernandes this says the cast won't necessarily round-trip.
 
right, sorry :)
 
That animated GIF is killing my browser (IE and Chrome) - there are better ways to post videos than an animated GIF. — MusiGenesis Apr 10 '11 at 12:47
lies
 
question of the day: to pay 600 EUR for headphones or not?
 
nah
 
@LightnessRacesinOrbit not necessarily. But my browser (opera) sits at ~2%, or 15% when it's actually in the visible clip-region of the browser
@KonradRudolph Nope
 
1:32 PM
@sehe But they are niiiice!
 
@KonradRudolph Buy nice Grados/Sennheiser/Bose set. Don't go "top end" because that's mostly market differentiation. And while you may like the quality, you'll regret it when they get stained/broken/...
 
@sehe They’re all shit ;)
 
agree
getting headphones which are cheap means when you break them, no problemo
 
Bose = WE HAZ BASS. DUH.
Sennheiser = OK sound but uncomfortable fit, crammed full with useless extras, not usable without battery (WTF!), fixed cable
 
B.O.S.E. - BOSE OH SHIT EXCITING
 
1:33 PM
Grados = dunno them, will check out
 
@KonradRudolph They're legendary
 
Piet is an esoteric programming language designed by David Morgan-Mar, whose programs are bitmaps that look like abstract art. The compilation is guided by a "pointer" that moves around the image, from one continuous coloured region to the next. Procedures are carried through when the pointer exits a region. There are 20 colours for which behaviour is specified: 18 "colourful" colours, which are ordered by a 6-step hue cycle and a 3-step brightness cycle; and black and white which are not ordered. When exiting a "colourful" colour and entering another one, the performed procedure is d...
 
@sehe Grados are mostly overpriced shit for hipsters
 
user142019
Boost.Coroutine is pretty sick.
 
user1357851
@KonradRudolph yes, if 600 Euro is split amongst 20 pairs - will last you for about 10 years
 
1:34 PM
@KonradRudolph Actually, Bose has -definition- all range, quite nice - Only compared them in-shop, though, so not extensively and not with my own music collection
 
@sehe Weird, never heard of them even though they’re German … there are quite a few traditional German audio producers it seems
 
I am using relatively cheap philips headphones, and IMO they can compare to models 5x times more expensive
 
@BartekBanachewicz Well, they have a hipster line nowadays. They were boringer than boring, so like sennheiser, they had to do hipster products to stay 'in the loop' with the market
^ I actually have that one
 
user1357851
most headphones break down after 6 months if you use them every day anyways
 
1:36 PM
@sehe Compared them extensively at home, hated them; and most good reviews say the same thing. They have way too much bass, artificially boosted, and are weak in the middle range
 
looks like motherfucking proffesional grade @sehe
 
@Telkitty Well not expensive ones obviously
 
user1357851
@KonradRudolph They last longer, but it is not linear relationship
 
Philips makes really good headphones imo
Though my next one will be pioneers
 
@Telkitty Although to be fair my previous pair just broke, which is why I’m looking for new ones. But I got the money back for those (< 2 years old) so everything’s fine
 
1:37 PM
@BartekBanachewicz It's quite heavy :] I bought it ~10 years ago I think. I'd not buy that again, honestly. I'd go with a cord HP, and good is good enough
 
They have great cheap audiophile series.
 
user1357851
a 600 euro one will probably last 3 years compare to 3 months for a 6 euro one
 
@Telkitty Hehe, nope, they should definitely last longer than that, and I expect them to
 
this ancient sennheiser model has lasted my mom 19 years, now's the first time she had to replace a part
 
Incidentally, I’m talking about these here: amazon.co.uk/dp/B008MUXSOK
 
1:38 PM
@BartekBanachewicz To my shame I can't seem to remember how much they cost. But it wouldn't surprise me if it was an insane amount. Like 700-900EUR or something. It's been a long time though
 
@KonradRudolph oh, I wore them recently. They are really fucking nice. I have no amp to actually use them properly, though :P
 
@melak47 Well, my point is: durability and build quality are nice, but not the most important in a headphone set. Comfort and sound quality come way first, and I'd rather buy a new a set in 8 years, than pay 2x the money for "something that lasts a lifetime"
 
@sehe these cost around ~200€, not 700-900 :p
 
@melak47 That's better. At that price, I'd all but completely ignore the lifetime
 
user1357851
that & no one is going to steal it & re-sell it on ebay
 
1:41 PM
especially with the coiled cord I have :p
 
@sehe I agree completely, actually
 
(I'm not bringing my over-ear/closed HP set outside - in-ear buds are for mobile use)
That's white
(removed)
SCNR
 
^ i have these right now
I am very happy with their quality/price ratio
 
user1357851
LOL thought ear phones are usually for workplace/colleague/public places?
 
@Telkitty hm?
 
1:43 PM
@Telkitty even in private the bass is nice
 
user1357851
@home most people use speakers >_<
 
@Telkitty Nope. They're for audiophiles. I don't do that outdoors
 
@Telkitty and, ultimately, you're always in a public place unless your house is on its own in the middle of nowhere
 
Listening to music outdoor is fucking shitty
 
...
 
1:43 PM
Too many noises
 
Okay, then I’m probably going to buy those, at around 300 EUR:
 
@Telkitty and unless you're one of those utter fucking fuckwit twats who blasts loud bassy music out at all hours of the day and night
@BartekBanachewicz Noise cancelling FTW
 
@KonradRudolph I think you'll be happy with them
 
1:44 PM
@KonradRudolph always annoys me when the cords come together under the chin :/
 
@LightnessRacesinOrbit in-ear buds are surprisingly nice for on the road. I sometimes wear them even when the music has stopped...
 
@sehe just so you can pretend not to hear people? :p
 
@sehe I don't want to know what else you do with them then ;p
 
@melak47 It does? Never bothered me … what I find more important is that the chord isn’t fixed and can be replaced
 
noice cancelling headphones (closed cheap models) tend to have too much bass
 
1:45 PM
@melak47 No, so I can have less distraction
 
user142019
 
@Zoidberg no, u
 
@Zoidberg hehe
 
user1357851
@LightnessRacesinOrbit I live in a house, everyone has their own sound proof rooms and my ear drum is delicate?
 
@melak47 do some exercise. lose the chin fat!
 
user142019
1:45 PM
MONOPOLY IS AWESHUM
 
@LightnessRacesinOrbit lolwut
 
@Zoidberg Completely lol-rated
 
it's more about getting entangled :(
 
@Zoidberg would be better if it weren't done in such a shitty manner
 
Well I want to make headphones with integrated player someday
That would be really nice
 
1:46 PM
@Telkitty Well. you're one lucky bird bastard
 
@BartekBanachewicz use chewing gum
 
haha I just googled "monopoly go to fail" deary me
 
@melak47 ...
 
user142019
@LightnessRacesinOrbit applies to everything.
 
I live in a house too.
 
user1357851
1:47 PM
@sehe I like bird better >_<
 
wtfnowai
 
user142019
@R.MartinhoFernandes Your house lives around you.
 
I thought robots lived in closets
 
1:47 PM
@DeadMG Hobos don't.
 
@Telkitty I seemed to remember that
 
I know they look terrible, but nevertheless... no cables
 
@DeadMG ... in houses.
 
user142019
@DeadMG I thought robots didn't live.
 
@BartekBanachewicz what's the transmission protocol?
 
1:49 PM
@sehe they have mp3 player built-in
 
that's crazyness :)
 
user142019
@BartekBanachewicz Sounds cool; pun intended.
 
just imagine for a while
 
Still. mp3... Not much point in discussion acoustics
 
Oh, also, if we're mentioning headphones, I want Razer Tiamat (8.2 sound) one day
 
user142019
1:50 PM
MP3 is good enough.
 
@sehe If When I build mine, they will have flac support.
 
@Zoidberg It is
 
@Zoidberg kill yourself.
 
@BartekBanachewicz Great
 
user142019
@BartekBanachewicz nah.
 
user142019
1:50 PM
I want to complete a project first.
 
You'll live a long life
 
he'll get hit by a bus first
 
statistically sound
 
user142019
lol
 
the highest praise I have ever received
"Your argument is statistically sound."
 
user142019
1:53 PM
Oh hey week-fucking-end.
 
maybe my ears are terrible or my sound hardware is terrible or both, but I can't seem to make out a difference between 320kbps mp3 and wav/flac ripped from a CD :/
 
@melak47 playing it safe, huh. 320kpps is normally quite ok. But not for all music and in my music room :)
 
AARgdh, AppendFamilyName Y U NO APPEND FAMILY NAME.
 
user142019
lol
 
@sehe low bitrate can sound crappy, but with high enough bitrate/quality I just can't tell the difference
 
1:58 PM
@melak47 that's the point, you know
 
@R.MartinhoFernandes It is orphan
 
It's a font, not a person.
 
@BartekBanachewicz yeah, so how come "mp3 is good enough" -> "kill yourself"
 

« first day (846 days earlier)      last day (4118 days later) »