« first day (844 days earlier)      last day (4096 days later) » 

user142019
11:00 PM
Haha yeah, a porn block that prohibits code that doesn't follow the style guide.
 
make a porn block a place to put shameful code
 
Instead of warning messages print gory images.
 
@Zoidberg there is already the antipattern region, will t be overlap?
 
user142019
I'll make porn a reserved word just for fun. :)
 
@StackedCrooked hungarian isn't hungarian if you don't encode delcspecs, calling conventions, alignment, constness and character encoding too. It's no fun with < 7 cryptic leading characters.
 
user142019
11:00 PM
@JohanLarsson I love #region! I use it everywhere!
 
Name mangling is for humans Hungarians
 
joking right?
 
user142019
No.
 
user142019
Well
 
user142019
not everywhere. :P
 
11:01 PM
@Zoidberg What is #region?
 
user142019
But I like using it to group related methods.
 
@Zoidberg Impossibru. You can't use it everywhere. Try using it in javascript
@Zoidberg Vim folds. Fool
 
user142019
@StackedCrooked #region-#endregion can be used to declare a block of code in C# that an editor can fold. It has no further meaning to the compiler.
 
@Zoidberg And this will be the future of Zoidlang: smbc-comics.com/index.php?db=comics&id=1169#comic
 
@Zoidberg Dude, that's wrong.
 
11:02 PM
Minus the "child prodigies" part ofc.
 
user142019
@StackedCrooked how.
 
user142019
I like it, not only for code folding.
 
Polluting the source with IDE related stuff.
 
user142019
In Objective-C I use #pragma mark for it.
 
@StackedCrooked I thought that so, but it actually doesn't hurt. And it's easy to get rid of when switching IDEs
 
user142019
11:03 PM
@StackedCrooked It's also useful to the programmer!
 
user142019
You can add labels. :P
 
user142019
#region Event Handlers
private void Button1_Click(object sender, EventArgs args) { ... }
private void Button2_Click(object sender, EventArgs args) { ... }
private void Button3_Click(object sender, EventArgs args) { ... }
#endregion
 
@Zoidberg yea, it looks nice when folded
I stopped to use it though, and started to modularize code well instead :P
 
#region Antipattern
    ...
#endregion Antipattern
 
Function bodies, classes etc can be folded anyway
 
11:04 PM
@WindAndFlame Slightly relevant, until we get Modules and Concepts, there is no viable autocompletion anyways in the light of modern C++ (multiparadigm), e.g. static polymorhism
 
Code folding is something that I never got excited about.
 
user142019
I'm sure I'll put #region in Zoidlang.
 
@Zoidberg you can have comments anywhere. No need to wait for the IDE to "allow" it.
 
@Zoidberg you know you can do ctrl + m + o in vs and collapse all methods, that goes a long way imo
 
@sehe oh, I totally agree. But, I have a lot of catching up to do, even with intellisense... Right now, I am trying to combine static and dynamic polymorphism, and that is occupying me enough. No way I could do this without autocomplete for now. :)
 
user142019
11:06 PM
@JohanLarsson I know. :P
 
@BartekBanachewicz I disagree even there. I never fold my own code. Folds hide the rotten bits. They serve to 'appease' the programmer, when really he knows better.
 
@WindAndFlame Huh?
 
user142019
But you know
 
just use a comment like this: // Your compiler doesn't like type punning? SUCKER!
 
user142019
I like sectioning my code.
 
11:06 PM
tits, it's fucking cold in here
 
@sehe You don't have to edit 3kLOC file, do you?
 
@WindAndFlame Just start. You have the edge here, coming from the 'spartan' style
 
never heard of Spartan style. :)
 
@Zoidberg do it by language structures instead
 
user142019
Meh.
 
11:07 PM
@Zoidberg you are actually pretty lame
 
@Zoidberg reduce hierarchy, prefer flatness
 
@BartekBanachewicz The configuration dialog "modelviewcontroller" class on my last project was pushing 16k
 
I like writing pretty code, though
 
user142019
@StackedCrooked That's why I like #region. :P
 
and I can pet it...
 
11:07 PM
@BartekBanachewicz My point exactly. And, yes, I ported larger packages of arcane PL/SQL code recently. Much larger. And here's what I do: I sit down with a proper editor, I run ctags (properly tweaked for said arcane code base) and I manually close folds as appropriate just to get overview.
 
#pragma region is an oddity.
 
@WindAndFlame I bet you spend hours looking at just how pretty it is :)
 
Vim folding: <motion>zf done
 
@sehe Well I close all except what I'm working on. What's bad in it?
 
user142019
@sehe use an outliner.
 
11:08 PM
So, viBiBzfclose two {}blocks around cursor
 
I lately use Ctrl-minus to reduce the font size if I need an overview of the code.
 
user142019
 
@BartekBanachewicz What's useful in it?
 
user142019
:P
 
@Zoidberg That's what it is
 
11:09 PM
right
I fucked up again.
 
user142019
But it's nice if the outliner could sort methods by their #regions.
 
man, this shit is harder than I thought it would be.
 
@sehe VS stops lagging on scrolling.
 
@BartekBanachewicz What's bad in it is this: it prevents confrontation with cruft. Which removes the incentive to organize and cleanup the cruft
 
user142019
It's just documentation.
 
11:09 PM
There seems to be a culture here of marking related code in the Xcode-equivalent #pragma mark sections. To my eyes, it seems to be equivalent to #warning I know that I should refactor this as its own class, but I'm too lazy to add another file to the project
 
@BartekBanachewicz ROFC
 
Rolling on the floor choking?
 
@Rapptz Fun times!
 
user142019
@rvalue you don't need to put each class in its own file.
 
user142019
11:10 PM
I dislike the "one-file-per-class" shit.
 
@Zoidberg No problem with that. But #region is inflexible unnecessary. Use comments to mark you folds.
 
@sehe how can you not love VS? :)
 
user142019
Haha.
 
@Zoidberg admit it, it would be better as ///region
 
user142019
#todo, #fixme, #bug directives. xD
 
user142019
11:11 PM
@BartekBanachewicz nah.
 
@BartekBanachewicz I do love VS. But when you are using it to edit multi-kLOC files you're doing it fantastically wrong
 
@Zoidberg hmm... now that I think about it
 
@BartekBanachewicz Verenigde staten? Nou de prairie is wel mooi ja.
 
@sehe Like it's me who even creates multi-kLOC file in the first place -.-
@StackedCrooked Zrozumiałem z tego mniej więcej tyle, co Ty z mojej odpowiedzi.
 
@Zoidberg // NOTE: This is clearly better way to signal BUG or FIXMEs in code.
 
user142019
11:12 PM
I think something like this will be hello world in Zoidlang:
 
@BartekBanachewicz yes
 
@Zoidberg Multiple classes per file means that anything that uses one of those classes has to include all dependant definitions for all of them. Effectively, you're either still thwarting code re-use and modularisation, or trading it for compile time.
 
@StackedCrooked yeah, we cool.
 
@Zoidberg var x = foo() /*try this with #fixme FIXME */ as TypeX;
 
user142019
using IO;

main() : Unit {
    print("Hello, world!");
}
 
11:13 PM
@Zoidberg the hell is Unit?
 
user142019
void, but I dislike that word. Especially with an uppercase V which is ugly IMO.
 
is it Pascal way of specifying return type?
 
user142019
I don't know. Got it from ML.
 
What problem is Zoidlang gonna fix?
 
because fuck.
 
user142019
11:13 PM
@EtiennedeMartel Me being bored to death.
 
Or is it a Daknok-class SLFP?
 
@rvalue Sometimes classes are really intended to go together. For example, a list will typically have an associated list_node that almost certainly belongs in the same file, because neither makes sense without the other.
 
@EtiennedeMartel Sshht.
 
@EtiennedeMartel don't think in that terms. What new problems will it create?
 
@EtiennedeMartel The extremely important need for more programming languages in the world.
 
11:14 PM
lol ^
 
user142019
Also you can do stuff like this:
 
@JerryCoffin pimpl
:)
 
user142019
foo := switch (x) {
    case 0: 42;
    case 10: 1337;
    default: 0;
};
 
@StackedCrooked Pimples? We don't need no steenking pimples!
 
Whoa this seems awfully bad code: news.ycombinator.com/item?id=5175666
 
user142019
11:15 PM
lolwat
 
it's written in PHP
you were expecting?
 
> Error 2 error LNK2001: unresolved external symbol "public: virtual class boost::optional<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &> __thiscall CSimpleDirectLoader::GetParam(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (?GetParam@CSimpleDirectLoader@@UBE?AV?$optional@ABV?
 
user142019
Also RAII and LINQ.
 
@JerryCoffin They smell like computer.
 
@JerryCoffin Yes, if the classes are part of the same data structure.
 
11:16 PM
well fuck you too, compiler.
 
@bartek amen bruthur
 
@BartekBanachewicz Must I constantly point out that women are better?
 
user142019
And multiple inheritance.
 
user142019
And ADTs.
 
user142019
SUPPORT ALL THE FEATURES!!1
 
11:17 PM
@sehe seems clear enough. what's wrong besides questionable goto
 
There is nothing so frustrating as QAing a C++ compiler--from Microsoft.
 
@BartekBanachewicz Once you collapse the typenames and look through the mangling, it's quite clearly telling you that you did not define boost::optional<const std::string&> CSimpleDirectLoader::GetParam(const std::string&) const
 
@rvalue I wouldn't be dogmatic about that. Allthough, I'd rather use nested types for closely coupled types
 
@DeadMG how did you do that? o.O
 
@JerryCoffin But for such things I would prefer to see nested classes. (edit: damn you, sehe!)
 
11:18 PM
@BartekBanachewicz It's a simple skill really.
first, the very last section of the error is the mangled name, you can ditch it.
 
@DeadMG Do you offer an API to yourself?
 
@doug65536 This is PHP. Last time I checked, PHP runs serverside. What on earth is the password doing being sent in plaintext. The server has no need to receive it
 
then, std::basic_string<char, char_traits<char>, allocator<char>> = std::string.
so substitute in.
also ditch the class keywords.
 
@BartekBanachewicz You don't want it :)
 
@rvalue For that particular one, yes, usually. For some things (e.g., iterators) it's often preferable that they not be nested.
 
11:18 PM
then you are left with something fairly simple.
 
@BartekBanachewicz it's actually pretty clear in your case
though there have been uglier ones posted here by MooingDuck iirc
 
@sehe they might be using salted hashes computed on the client side and matching them up with the hash computed on server side
 
Well I figured it out, but not quite as fast as you.
 
@BartekBanachewicz Ah lol you were serious. I tend to assume sarcasm until proven otherwise.
 
I think I just need more experience in reading complicated template errors
 
11:19 PM
@BartekBanachewicz I call it CompileOVision.
 
@doug65536 That's terrific. You didn't actually read it, then
 
@BartekBanachewicz That one was neither complex, nor templated.
 
@doug65536 They're doing case-manipulations on the actual password, not on a hash (that would be marginally more secure but make them look even more silly)
 
Jan 17 at 1:46, by Mooing Duck
can anyone decrypt this? class _com_ptr_t<class _com_IIID<struct MONITOR_lib::IMonitorMe,&struct __s_GUID const _GUID_1d12b7c4_456f_11d5_88ea_009027e532c6> > comm_mm" (?comm_mm@@3V?$_com_ptr_t@V?$_com_IIID@UIMonitorMe@MONITOR_lib@@$1?_GUID_1d12b7c‌​4_456f_11d5_88ea_009027e532c6@@3U__s_GUID@@B@@@@A)
found it
 
@JerryCoffin Iterators are a great example of isolation of elements from collections, is that not a counter-argument to multiple classes per file?
 
user142019
11:21 PM
Also let-in.
 
@JerryCoffin I recently saw a blog post titled: 10 things than women do better than men. Such posts seem to be trendy. But why does swapping the "women" and "men" parts in the title make it politically incorrect..
 
i.e. I can then make a class that is only dependant on the interface of the iterator.
 
I still wonder why he wanted the implementation of this method, since I hardly remember using it. It was marked as override though
 
@StackedCrooked Underdog rule.
 
@StackedCrooked It's sexist both ways, but there are far fewer masculinists.
 
Ell
11:21 PM
Positive discrimination
 
@Rapptz _com_ptr_t<_com_IID<MONITOR_lib::IMonitorMe, __guidof(MONITOR_lib::IMonitorMe)>> comm_mm.
 
Ell
It's sexist neither way, women are better at some things, men are better at some things
It's only sexist taken to the extreme
 
Yeah but you are only allowed to enumerate the former :P
At least in public.
 
I have determined that the cause of my failure is that I have no idea what the fuck I'm doing.
3
 
Ell
Yeah, positive discrimination :3
 
11:23 PM
@rvalue I don't think so as a rule. An iterator without a container is almost never useful, and a container without an iterator only marginally better. I see no real virtue gained from including one header instead of two, when the two nearly always go together.
 
@DeadMG Then how do you know it's a failure? Maybe it's actually a success!
 
@Rapptz I'd guess it's a CComPtr<MONITOR_lib::IMonitorMe>
 
@Zoidberg No, unless you make it a singleton.
 
Wat
 
I read all design patterns. The singleton is the best one.
 
11:26 PM
@StackedCrooked Because political correctness is designed primarily to protect those perceived as being disadvantaged -- and women have done a much better job of painting themselves as disadvantaged (largely because the opposite is so often true).
 
I like the composite pattern myself
 
@doug65536 No alias templates in C++03, so it can't be.
 
Lol amazing what deleting ,struct std::default_delete<.*> can do to error message
 
Ell
Is access to a shared resource an acceptable use of a singleton?
 
no.
let me aid you with this simple rule of Singletons.
 
11:27 PM
@Ell That's the whole problem with singletons.
 
if lazy multithread initialized it's one way to do it reliably
 
if you're not sufficiently knowledgable to prove that it is the only possible choice
 
@doug65536 But why? That stinks of crappy design.
 
then you should never, ever, be using a Singleton.
IOW, you can always answer the question "Is X an acceptable use of a Singleton?" with "No."
 
ok, how are you going to implement a lazy multithreaded instantiation then?
 
11:28 PM
@doug65536 Fuck lazy like a whore.
 
@DeadMG So it's like a singleton answer?
 
Ell
I do wonder why people use It over a static global variable
 
@Ell Because they're dumber than the stuff that comes out of your arsehole.
 
because global variable constructors suck
 
@doug65536 C++11
 
11:30 PM
all global mutable state sucks.
 
@doug65536 Why would you?
 
the only time I've ever accepted it is to represent what's really process-local, like stdin handles.
 
@DeadMG People in the sex industry are hard workers!
 
@LucDanton Speaking from the voice of experience?
 
Fuck dammit this should be compile errors not link errors -.-
 
11:31 PM
@Ell Because the GoF said singletons are cool, and everyone tells you global variables are bad.
 
Fucking dinkumware stdlib
 
@LucDanton That, or they are being worked hard.
 
@DeadMG They work hard!
 
uh
maybe you meant to reply to Stacked?
 
@EtiennedeMartel performance
 
11:32 PM
9
A: C++ is it possible to delay initialization of constant static member?

seheTypical solution: #ifndef CONSTANTS_H #define CONSTANTS_H class Constants { public: static const char* const getFILE_NAME(); }; #endif // CONSTANTS_H And in cpp #include "constants.h" #include <QApplication> const char* const Constants::getFILE_NAME() { static const char* co...

 
@doug65536 bwahahahahahahahahahahahahaha.
 
@DeadMG Whoosh! (Or, maybe I should correct that to: "Speaking from the voice of hard experience?")
 
@doug65536 Why not, say, inject the dependency where it's needed instead of getting it through a singleton?
Push, not pull.
 
@EtiennedeMartel Pull lexers > push lexers.
 
Ell
Is dependency injection where you pass an instance around? Or ref to?
 
11:33 PM
@DeadMG I'm not talking about lexers. Or Lex Luthor. Or Lexus.
 
@LucDanton they don't crack minds, mostly
 
inorite
@Ell As far as I can tell, it's the Enterprise! version of "Pass a fucking parameter like a normal person".
 
@DeadMG Yes, but "dependency injection" can be understood by the pattern regurgitators much more easily.
Fight fire with fire, in short.
 
Is adding this-> to everything within a class any good? I got the habit... does it only do a difference where there's need to differentiate arguments with the same name with the variables?
 
yes, if there's no variable shadowing then it's quite redundant in most contexts.
there are some rare scenarios involving dependent typenames... you don't wanna know.
 
11:35 PM
so how would you implement something expensive to construct or difficult to construct early, that may be needed asynchronously from one or more threads
 
Somehow thought it was good for performance or whatever D:
thanks!
 
@DeadMG actually, you do
 
@doug65536 Uh, firstly, the Windows API provides a specific thing for that.
and secondly, it's called a "Lock".
 
@doug65536 I would construct it when it's needed, and then pass it around to the objects that need it.
 
@GigaBass ?! terribad advice
 
11:35 PM
and thirdly, there's a lockless algorithm for that that I know.
 
But I would not let it sit in a glorified global variable like a singleton.
 
@sehe Probably, actually. I just didn't want to expand upon it.
 
Eh @sehe? No one told me that explicitly, it was just one of those ideas I had wedged into me randomly :P
 
not to mention
 
yep, take the lock every time. let's put lock convoys everywhere
 
11:36 PM
@doug65536 How the fuck do you think your implementation implements Singleton lazy-loading?
 
@GigaBass okay. By the way, read the discussion earlier. Start here:
1 hour ago, by Bartek Banachewicz
@WindAndFlame this-> is obsolete
 
it's not magic, buddy.
they use a lock or a lockless algorithm, and you can do exactly the same.
 
@DeadMG interlocked compare exchange
 
1 min ago, by DeadMG
and thirdly, there's a lockless algorithm for that that I know.
 
11:37 PM
@doug65536 Why do you want to use singletons in the first place?
 
@sehe will do Sehe. Always miss the interesting bits dammit.
 
multithreaded lazy instantiation is the only legitimate use I can think of
 
@GigaBass Well. There's a solution to that, but it involves having no life outside the lounge (and very little sleep) :)
 
Why the hell did they go with ALL CAPS type names in the Windows API.
 
@sehe hehehe I know :P
 
11:38 PM
@AndreiTita because they're MACROs (90% of the time)
 
@doug65536 And what I'm saying is that you don't need your initialization to be lazy (and therefore no need for the multithreaded stuff either).
 
@doug65536 As I've just stated, repeatedly, any technique that can lazily multithreaded instantiate a Singleton is equally applicable to any other variable.
 
@AndreiTita they're not all ALL CAPS.
 
#define GetWindowText GetWindowTextA
 
E.g. HDC is actually just HANDLE (except for debug info, IIRC)
 
11:38 PM
@sehe Not anymore.
 
@DeadMG They're finally strongtyped?
 
they did change those to be A) typedefs and B) somewhat type-safe.
yep.
 
Oh god. Cats and dogs living together! Heresy!
 
it's actually the other way around. the only way to do multithreaded lazy instantiation (that I know of) is the exact singleton pattern. don't confuse double-checked locking with singletons
 
user142019
There will be a dumb keyword. :)
 
11:40 PM
@doug65536 firstly, double-checked isn't safe.
 
Totally wish I decided to ask that simple question before going through my entire code and putting in over 100 redundant this->
 
and secondly, any lazy instantiation technique can work for any variable- not just Singletons.
 
yeah, isn't safe on weakly ordered architectures
 
like the fucking Windows API function we linked to.
which clearly performs this function.
 
@Zoidberg Ah, meaning double unsigned motherboard I assume.
 
11:41 PM
@Ell No, not really. DI is really mostly a Java thing, trying to fight against the excessive dependency on inheritance by making relationships between objects a more a matter of configuration instead of hard-coded.
 
and the DCAS algorithm used by your implementation.
 
@doug65536 That doesn't change what I said, that is: no need for that lazy initialization bullshit.
 
damn fuck
 
user142019
@StackedCrooked No, just structs with everything public and no methods. :P
 
user142019
A dumb data object.
 
11:41 PM
@GigaBass Only 100?
 
Can I use map<string, unique_ptr<whatever>>?
 
@sehe I posted it a while ago
 
That could prove to be interesting. Where's @Chimera ?
 
@BartekBanachewicz Of course.
 
11:42 PM
@DeadMG Yeah, it's a simple project. Nothing big
 
user142019
@BartekBanachewicz TIL: your first name is Ben.
 
@Zoidberg plain or simple seem more fitting..
 
@BartekBanachewicz damn. Anyone with an informed opinion?
 
the main advantage of unique_ptr, unlike auto_ptr, is that Standard containers work fine with it.
 
user142019
@StackedCrooked hmm didn't think of plain. Thanks.
 
user142019
11:42 PM
Or just struct. xD
 
@GigaBass Fortunately, it's an easy search and destroy -- and use of this-> outside a template is clearly pointless, and unless you know exactly why you did it in a template, it probably is there too.
 
@DeadMG Can I then copy that map?
 
@BartekBanachewicz Of course not. How would that possibly work?
 
Ell
And also auto_ptr can double destruct
 
if you store move-only elements, the container is move-only.
 
11:43 PM
Yeah I read the earlier discussion about it here @JerryCoffin
Also I hate seeing _var, so ugly
 
@DeadMG What if the thing inside unique_ptr is copyable, and I want the whole thing to be copyable?
 
@GigaBass Then don't use it. If you insist on underscores for object-level vars, make them trailing, not leading.
 
@BartekBanachewicz Then what the fuck are you using unique_ptr for, find a value_ptr or someshit like that- if you even want a pointer instead of a value.
 
@GigaBass Wait. I remember now. Tell me you didn't blindly adopt this 'new method of qualifying members with this->' around this point in time:
Jan 7 at 0:54, by sehe
void DrawObject::setName(char* name)
{
    name = name;
}
 
Bam, @sehe, I tried to follow in your footsteps :P
 
11:45 PM
@GigaBass this-> sucks
 
@GigaBass Sadly, without understanding the point.
 
memcpy(&name, &name, sizeof(name));
 
man
why is there no useful material on semantic analysis online
 
I did understand the point, @sehe, but I thought, back from when I learned java, that it had some performance advantages
 
void DrawObject::setName(char* aname) { name  = aname; }
void DrawObject::setName(char*  name) { _name = aname; }
 
11:45 PM
isn't someone going to say that memcpy is UB?
 
@DeadMG fucking fuck. I need to pass a collection of pairs of string, vector<uc>. I thought map of unique_ptrs would be ok
 
all I found is useless university course materials
 
Solved ^
 
@StackedCrooked I puked in my mouth.
 
@GigaBass java sucks
 
11:46 PM
@sehe Y U NO const char *?
 
@EtiennedeMartel Yeah, took sizeof(char*) as length :)
 
I know, I know @sehe xD
 
@doug65536 It isn't UB per se. But it's ugly as fuck.
 
@BartekBanachewicz It would be fine if you're fine with moving it.
 
@EtiennedeMartel WUT. Why you no string. I'm using his code sample. Check the date
 
11:46 PM
If memcpy was UB then why would it be part of the language?
 
but if you need to copy it then you need a copyable element type and that is not unique_ptr.
 
Was the only language I've learned "oficially" (aka in college) so far, @BartekBanachewicz, not a big fan either
 
@sehe Somehow makes me think of Brave New World.
 
@DeadMG Fuck.
 
@sehe I'M SORRY.
 
11:47 PM
I mean
 
if you want to copy the value, then make map<string, value>.
if you want to share ownership, make map<string, shared_ptr<value>>.
 
@sehe your code really sucks
 
@StackedCrooked The same reason gets and strncpy are?
 
@EtiennedeMartel Wokay. Nice save
 
11:47 PM
@DeadMG isn't it costly to store large objects as values? I mean, shouldn't we only store pointers in std containers?
 
@StackedCrooked Petty troll
 
is there a medical term for fear of programs not working on every computer ever made?
 
@BartekBanachewicz If that's the case then why not simply refer to the map instead of copying it?
 
@JerryCoffin Now I need to check the docs.
 
@BartekBanachewicz Fuck, no.
"only pointers", who dafuq told you that?
 
11:48 PM
@BartekBanachewicz It's costly to copy them.
 
value is the normal.
 
@DeadMG I read it somewhere
 
you'd need megabytes of data.
your choice of a node-based container has way more serious performance implications.
 
@StackedCrooked Honestly, it's not as bad as gets (but what is?)
 
@Zoidberg What language is that? If that's Perl6 I'm eating my beard
 
11:49 PM
63
Q: C++ STL: should I store entire objects, or pointers to objects?

StéphaneDesigning a new system from scratch. I'll be using the STL to store lists and maps of certain long-live objects. Question: Should I ensure my objects have copy constructors and store copies of objects within my STL containers, or is it generally better to manage the life & scope myself and...

 
also, since your code doesn't work, you don't know that by-value is a serious performance problem for you.
 
user142019
@sehe Zoidlang. :|
 
@doug65536 Realism?
 
> if updates are common storing pointers will save the copy/relocation costs.
@DeadMG point taken.
 
user142019
lol LINQ in Perl.
 
11:49 PM
@BartekBanachewicz Large objects?
 
@Zoidberg Rule #1 There is no syntax that hasn't been adopted in Perl
 
@StackedCrooked vectors
 
user142019
@sehe lol
 
user142019
:|
 
11:51 PM
@JerryCoffin Never seen a function that takes two iterators?
 
what's wrong with nodes? locality?
 
@rvalue He's not in
 
@sehe Ah, thanks.
it was a bit "welcome to an hour ago" anyway
 
@StackedCrooked POSIX functions are UB too
 
11:53 PM
@doug65536 That's a common problem. Basically explains why much 'naive' C++ was often so much slower than the standard C approach
 
@rvalue You think that's as bad as gets? Sounds like my kids complaining that having the Wii taken away is equivalent to medieval torture.
 
@BartekBanachewicz "are" ? Have a potential for?
 
@JerryCoffin Just saying that an iterator is useful without the container.
 
user142019
Meh return types can be inferred.
 
@BartekBanachewicz UB as in ..unix bound?
 
11:54 PM
@JerryCoffin My kids wouldn't notice. Honestly, I think I should replace it by a cardboard box, but they'd only find out in... two months I guess
 
@rvalue Oh -- yes, can be. Sorry, didn't realize you were going back to that.
 
@StackedCrooked I'm going with unsigned bool
 
2 mins ago, by rvalue
it was a bit "welcome to an hour ago" anyway
 
@rvalue I like you :)
 
@JerryCoffin Yeah, been AFK.
 
11:55 PM
@sehe My kids -- it depends. They'll go for a few months without even turning it on, then play it every chance they get.
 
@JerryCoffin That might still start to happen. Who knows
 
I think we're close enough to the same page that it doesn't matter anyway. I'm ready to move on to newer, brighter flame wars.
 
@StackedCrooked damn, I can't find that discussion
 
@rvalue Yeah -- that definitely won't be a mag-flare, since I'll openly admit you're largely correct.
 
Dec 21 '12 at 16:15, by R. Martinho Fernandes
POSIX docs recommend using UB to avoid some UB or whatever.
have that ^ instead
 
Ell
11:57 PM
Does java have ub?
 
@JerryCoffin As do I reciprocate. It was only a question of code arrangement, after all.
 
@Ell Search SO
12
Q: What are the common undefined behaviours that Java Programmers should know about

hhafezThe same as this question but for java Update Based on the comments and responses of a few people, Its clear that Java has very little undefined behaviour. So I'd like to ask as well what behaviour is not obvious. Please when answering make the distinction between the two :)

 
@Ell Try to release memory.
 
> I used a regular stl::list and found walking forward from a point in the list to be a little difficult, but doable.
that's the first time I've seen someone use stl::
 
@Rapptz really. You must be new here
 
11:58 PM
As a namespace?!
 
Happens at least once in two weeks, I wager
 
user142019
@sehe those answers don't really address undefined behaviour.
 
user142019
Rather unspecified or implementation-defined behaviour.
 

« first day (844 days earlier)      last day (4096 days later) »