« first day (1415 days earlier)      last day (3530 days later) » 

6:00 AM
MAL got hacked
lol
 
hey everyone
anyone know the C language best practices free ebook ?
 
@Rapptz wut?
 
link?
I don't see anything on their forums talking about it.
 
it's on the front page of the forums lol
 
6:15 AM
Oh, it's not in the title.
 
a vast majority of my anime got changed to 9001 episodes
only those had the title change though
 
I can see it now.
Some of the shows on my list are also corrupted.
 
lol
 
 
1 hour later…
7:48 AM
Message to avoid 'The last message was posted x hours ago.' 'cos Loungers don't get up early on a Sunday.
 
Xeo
mornin
 
> Added bonus: none of your background windows are resizing themselves right now.
I can't imagine a scenario where resizing the background windows is a feature..
 
Xeo
@ThePhD Hahaha, cool
@ThePhD I just might have to work on it again, although really, with C++14 it's mostly doable with a macro.
 
@MartinJames 6:01pm ... always get up before this time, even on Sundays ...
 
@chmod711telkitty OK, I accept that there are some different time zones:)
 
8:02 AM
but I guess it would be weird for me to have a monologue ...
 
@chmod711telkitty Most of the Loungers are EuroMerkins, so it's easy to assume they all are:)
 
8:14 AM
 
Xeo
YaY
 
8:44 AM
wtb scoped, implicit underlying type enums
namespace stuff { enum : int { .. }; } it is :(
 
@Rapptz Guess those people just don't understand the concept of "mathematical proof".
 
that's not proof at all
the golden ratio is not some magical ratio that applies to all of life
 
the Facebook post itself does not really describe it that well
 
I'm not sure what you were going for
that blog post is bad too
using a multiplier of 2 doesn't mean you can't reuse memory
 
it does directly mean that you can't re-use the memory blocks that you yourself previously freed.
like I said in my second post on Reddit, whether or not the underlying allocator actually permits that to be any kind of real advantage is another question.
 
Xeo
9:02 AM
@Rapptz yesh please
current scoped enums are sucky for making mapping arrays
 
or flags..
 
Xeo
well, you can alleviate that with traits + operator overloads easily
 
unnecessary boilerplate
 
Xeo
it's write-once, in a header somewhere
 
doesn't make it not-boilerplate
 
Xeo
9:04 AM
which is why I said "alleviate", not "solve"
 
I have it in gears
I just can't be arsed to do it every fucking time I make bitflags.
So I just go the easier route with namespace + regular enum
 
Xeo
struct _flags{ enum type : T { ... }; };
using flags = _flags::type;
is what I currently do
which allows (apparently only in C++11...) flags::enumerator and flags the_flag, as if it was declared directly in that scope, without leaking the enumerators.
 
I don't see how it's different from a namespace
 
flags::enumerator is a common C++03 extension really
 
:s
why not just do struct flags { enum : T { ... } };
Oh the latter case.
Never mind.
I guess that's a nice benefit.
but that still has issues..
 
9:13 AM
ergh... great, now my RSS reader is farting some 'toolkit' over every page.
 
Xeo
@Rapptz Hm?
 
time to sort out my own system
 
Xeo
@Rapptz yeah
 
yeah
it's stupid as hell
either way you lose
:(
 
9:15 AM
maybe the best option is to just use some form of 'flag' class
 
Xeo
The best option is the boilerplate with operator overloads
 
ICBW but enums are not intended to be a drop in solution for flags
 
enums are totally meant to be used as flags..
 
bah
 
even the standard library uses them that way
 
9:17 AM
up to 31 pounds gained since health
time to cut back.
 
that's more weight than I've gained in 10 years.
:p
 
@Rapptz but not for the sort of combinational logic like you showed above.
 
hyperbole intended.
@thecoshman Uh.. yeah?
 
its 5 am here
 
std::ios_base::app | std::ios_base::out.
 
9:18 AM
so, good morning
 
ok, ok
 
works like you expect
 
@Rapptz are those enums though?
 
I think that we all know that the design of iostreams is so fucked, nobody needs to do it like that.
 
...yes?
 
Xeo
9:19 AM
@Rapptz not necessarily, IIRC
 
what do you think they are?
 
Xeo
they can be simple integral constants
 
@Rapptz just constants
 
@thecoshman I'll save the pedantry. They're enums in libstdc++.
and libc++
and probably Dinkumware.
yeah dinkumware too
just for shits and giggles
std::launch policy is an enum class as per the standard and is required to be able to be used with operator| and operator&.
so there, a better example
 
9:23 AM
so what was wrong with your example?
 
@Xeo and @Puppy were being pedantic that it didn't have to be an enum despite it being one in every popular implementation.
 
your argument is still fundamentally an appeal to authority, where the authority is the guys that brought us iostreams and std::thread.
 
I'm not 'appealing' to anyone.
I'm saying the use case is there and is used by other people.
 
that doesn't really make it a good use case, or the use case intended when the feature was designed
 
I was intending to use std::thread for my game engine due to the fact I want to rewrite my engine.
 
9:27 AM
@cyberspace009 ok
 
I'm just saying since I see some people are against std::thread.
 
first I've heard of it
 
Some people are also against C++ and some people are against computers.
Better not use them!
 
@Puppy I'll bite. Why are you against enums being used for flags?
 
because flags are not enumerations, due to the fact that the combined result isn't a value in the enumeration.
 
9:30 AM
..what
okay
 
OR-flags are silly anyway.
Use std::set<flag_t>.
Or Boolean keyword arguments, even better.
Oh wait C++ has no keyword arguments HAHA.
 
9:51 AM
'Directly Googling your question, 'sending data to multiple USB devices/terminals connected to a single USB port' results in 'About 27,300,000 results' .....

'Yeah I tried too, but none answers my question' - I wish I could check so many results so quickly:)
 
Ell
10:04 AM
What are keyword arguments?
 
kwargs in python
f(stuff='1', test=10)
 
Ell
Oh
That's an odd name for them
I like enums for flags
 
0
Q: translate a code from c into php

Mostafa Kingthis code written to generate an identify code to using as a hash for every registration we run this code by write WhatsAppApi.Register.WhatsRegisterV2.GenerateIdentity(201111120202) then it generate the hash for this number 201111120202 please i want to generate the same code by php h...

Ahahahah.
That C# code is horrible, lol.
 
can't vote down
rep 125 is needed
its not my fault that im anti-social sometimes
 
10:25 AM
Cat previously shit on Discourse
but I don't see anything wrong with it (?)
 
Every Discourse website I have used had a terrible user interface.
 
@Xeo Pro static_if or contra?
 
interface seems okay.
 
Sticky header is always horrible with no exceptions.
 
yeah main gripe so far
 
10:37 AM
static_if is a terrible and bad thing.
 
Except for static if (foo) { return bar{}; } else { return baz{}; }.
 
that doesn't work
or well, I don't believe it does.
 
For sane static if semantics it should.
 
yeah it doesn't work in D either
from what I'm seeing
might work with auto though
 
Yeah, that's the point.
 
10:43 AM
@Griwes All my searches with static if allow it to only to be used with template.
e.g.
template factorial(int n)
 {
     static assert(n>0);
     static if (n == 1)
         const factorial = 1;
     else
         const factorial =
             n * factorial!(n-1);
 }
oh I found one with an actual return expression but they have the same return type.
 
That's D, hmm? I don't care much about that, I care about what Ville Voutilainen said he's working on.
 
eh?
 
I assume that work is going to be titled ‘A curse of pox on Bjarne and his ilk’, to improve its chances.
 
Bjarne and friends had an entire paper opposing adoption of static_if.
He must have really disliked the feature.
also
 
Ville is working on proposing a subset of static if.
 
10:48 AM
TIL this exists: isocpp.org/wiki/faq/wg21
 
Namely one that doesn't let declarations out of its scope.
 
> My wife Tana organized Dinkumware, Ltd. in 1995 to license the Standard C++ library I had developed. Our earliest customers include Microsoft, IBM, Green Hills Software, and IAR. We still operate Dinkumware from our home in Concord MA, but of late we have shifted our focus to supporting our longstanding customers who are major C++ compiler vendors. We were first to market with full libraries for C++98, C++03, and C++11.
TIL that too.
Cool page.
Lawrence Crowl isn't there.
that guy has so many papers
 
11:04 AM
#6e4a7e is such a nice colour.
 
Ell
I like Chandler Carruth
 
I like Enchanted Carrot.
 
ClamWin is free, open source antivirus software for Microsoft Windows. It provides a graphical user interface to the Clam AntiVirus engine. == Features == Scanning scheduler (only effective with user logged in). Automatic virus database updates on a regular basis. Standalone virus-scanner. Context menu integration for Windows Explorer. Add-in for Microsoft Outlook. A portable version that can be used from a USB flash drive. Firefox extensions exist that allow the users to process downloaded files with ClamWin. === Real-time scanning === ClamWin does not automatically scan files as they ...
anyone know a better open-source anti-virus?
 
I don't know of any anti-virus I'd actually recommend for anyone to install
 
11:08 AM
microsoft's antivirus works well for me
the one that comes bundled with windows 8
 
@cyberspace009 limiting yourself
 
@Rapptz what do you mean?
 
user image
7
 
Ell
ClamWin is the only open source anti virus I know of
 
@cyberspace009 your requirements limit your choices significantly.
 
Ell
11:13 AM
I need to start doing some maths again
 
@Rapptz well, I also use combo fix. Another open source I think.
 
@AlexM. well done, WB
 
Merica
 
no alter ego tonight snow bear?
 
"better antivirus"? - lolsumwat
I don't think that exist. And probably it shouldn't.
This somewhat confirms the suspicion that anti-virus mainly serves to make money of scared consumers by doing total security theatre
20 hours ago, by sehe
5 hours ago, by sehe
@chmod711telkitty you're still here, right :)
 
11:26 AM
RNC. I want to move into Canada and escape the stupidity: thinkprogress.org/immigration/2014/08/22/3474640/…
 
@cyberspace009 Plot twist: Tamara Scott is an ISIS affiliate and this is a deliberate move in their new approach to spreading terror (aka terrorism)
 
Canada has stupid politicians too.
 
Should there be a new rule in order to be a politician? For example, a scientist or a teacher?
or maybe vote for the right ones.
 
there are a lot of stupid teachers and or scientists
you're never going to avoid it
 
Uh I... Overslept a bit
 
11:35 AM
I'm starting to see the hopelessness called Mankind. :(
 
@BartekBanachewicz It's pm here. 'a bit' seems somewhat inadequate?
Somethiing is ticking at ~1Hz in my headphones. Some horrible script is polling somewhere.
 
Yes, a bit :)
I feel great now, time for a breakfast
 
an online store here is trying to get rid of that harry potter thing for PS3s (book of spells and wonderbook) and is selling copies for $2
I don't really need it but hey it's cheap
adds to basket
 
@ThePhD Kerning modifies the space between glyphs. It doesn't make sense to apply kerning to a single glyph.
 
Is wiki down for you too?
 
11:47 AM
actually judging by some youtube videos, it looks like a nice augmented reality game thingy
might even like it
 
win.worm palevo-4055
how nice
 
@Cmdr_Hadfield have you seen this pic? comet in scale with downtown LA http://t.co/FaN7AhizLK
@MartinJames or you just have a synch issue in your sound card/driver path. Something that produces a buffer underrun every 1s perhaps?
This kinda thing is ubiquitous with (badly written?) apps on linux with pulseaudio
@cyberspace009 yeah, that's it! Just select the votes (reject all votes for bad politicians). Problem solved !
 
12:07 PM
@Rapptz correct, it is technically a bugfix
my implementation is almost identical, the only difference is that I place the pivot after partitioning in the right position, instead of always including it in the bottom partition (which is what gcc does)
 
12:20 PM
How do you guys feel about the C++ standard's way of doing getters/setters?
e.g. width(); // gets and width(10); // sets
 
I don't dislike it.
 
I agree with the getter, not certain if I agree with overloading the getter for the setter
but from what I can see it's not fundamentally flawed, so I guess it works
 
It's less pretentious than "setWidth", "getWidth", more uniform if you will, and less suggestive of magic "action" ("set" - what does that mean, that it merits a complete syllable?)
 
I like stuff like
.size() and .resize(10)
 
I like that too.
I purposely chose the other one though :p
I don't think anyone dislikes those setters/getters.
 
12:24 PM
I refuse camelCase in method names though
I only use CapitalizedCamelCase for non-built-in classes, everything else is lower_case, except constants, which SCREAM_CONSTANT
 
outside of iostreams I can't find another example that uses the other style of getter/setter.
I don't make my constants all caps.
it's a relic from C macros.
 
I don't know, making constants all caps has an upside (clarity of meaning) and a downside (less readable typeface)
 
C++ doesn't need the whole ALL_CAPS_SCREAMING thing
it just makes code look ugly.
 
I might change it to reserving it only for macros
 
12:29 PM
yeah I guess
I'll use it for macros only
 
I sincerely wonder if anyone actually uses the min and max macros provided by windows.h.
 
Lots of people! Unknowingly, and possibly bug-inducingly
 
Most people do everything unknowingly and bug-inducingly.
 
Speaking of windows.h
/* On Windows, windows.h defines CreateWindow */
#ifdef CreateWindow
#undef CreateWindow
#endif
lol this sounds like a bad thing to do
 
> On Windows
 
12:41 PM
Accurate it the project includes a windows.h only on windows, or they include a stub windows.h on other platforms
@AlexM. Did the police recover you r underwear?
 
the project in question is SDL
I'm just source diving
 
Source drowning
 
trying to understand why everything returns error codes
even their setters
it's weird
 
convention, coding standards
this way, they can create (excessively) smart classes that masquerade as dumb ones, perhaps? thinking active object, remote proxy classes etc.
 
well, I was over-exaggerating. Not everything does. It just seems like a lot of mundane stuff does (retrieving window position, brightness, etc).
 
12:44 PM
(I'd like to stress my excessively adverb)
 
Oh boy IE y u non-standard color syntax.
 
@Rapptz so implementations can choose to not have it return from class members, but instead use a native API call (so they only have a memory footprint for the handle type?)
 
Luckily Sass has ie-hex-str function.
 
hmm.. doesn't seem like it
 
@sehe nah I just bought new underwear
 
12:47 PM
this is surprisingly well written for a C library :p
 
@Rapptz there are a lot of conflicting macros running around in the windows headers, some of which have actually corrupted the resulting code. As I recall one interface function in WIC is corrupted by a GDI macro, and if you undef it it breaks the linking
 
I am unsure of this useless _THIS parameter.
they really went all out for emulating member functions :o
 
@AlexM. Alex: proud sponsor of the needy
@Rapptz that's frequently exceptionally helpful, self-documentation FTW
 
the _THIS parameter?
it's kinda weird.
static int
SDL_UpdateWindowTexture(_THIS, SDL_Window * window, const SDL_Rect * rects, int numrects)
 
o.O
 

« first day (1415 days earlier)      last day (3530 days later) »