« first day (423 days earlier)      last day (4540 days later) » 

2:00 PM
right, so why make the original one a language feature?
it could just be shipped as a library
then your users can, for example, template on the iterator and write code that can use either version
 
anyway, std::map has only one implementation, where was unordered_map five years ago?
 
in Boost
and there were several implementations by Google, and MSVC, and GCC
 
I am sure most people would agree the no language can solve all problems well. There are certain problems that require a language of a certain style.
 
like prolog
 
ewwwwww
 
2:02 PM
lol
prolog just doesn't make sense to me. how do you get real work done with it?
 
practically nobody does
 
btw, often we don't need performance - only readable and maintainable code.
when you need performance - you can write a module in another language
 
doesn't matter how good the language is, people will still find a way to make it almost impossible to read or maintain.
 
don't work with those people =)
 
says the guy who was scared of shared_ptr
 
2:12 PM
@Dead ¬_¬ I'm stuck with Java :(
 
yep, T^ in C++\CX looks better than std::shared_ptr<T>
 
except when you decide that T^ doesn't quite meet your needs
you can't template away syntax
you need to stop thinking it "looks better" and start thinking that it has real, large, functional disadvantages
can T^ do type-abstracted deleters? I think not
 
I don't want to think about disadvantages when they can be ignored.
 
that's pretty pathetic
 
When do you need a custom deleter?
 
2:14 PM
I used one for COM types
actually, technically, that was unique_ptr, but same principle
 
T^ is COM type
 
ok
now what are you going to do for WinAPI HANDLEs?
T^ won't work for them
shared_ptr will
or how about a lua_State?
 
I have my nice auto_handle
 
so basically, you reinvented shared_ptr or unique_ptr
 
And it's really obscure to use shared_ptr<void> for HANDLE
 
2:16 PM
but less customizable, and probably a lot more bugged
good job
 
btw, shared_ptr<> is not memory-performant
 
I know exactly how it's implemented
 
me too
 
it's an excellent reason to prefer unique_ptr, which I do
not a reason to prefer T^, which is the exact same thing, effectively
 
T^ has readable syntax
 
2:18 PM
so what?
that's a bad thing
 
readable syntax?
 
@Abyx does it? How do you determine that?
it's shorter, certainly
 
well, you can't do void^
or lua_State^
so tomorrow, you're just going to have to change it anyway
 
@Abyx troll.
T^ is not readable, where as std::shared_ptr<T> is obvouis
 
that's an awful lot uglier than shared_ptr or unique_ptr
 
2:19 PM
but shared_ptr<T> is syntactically very simple. All I need to know is the syntax for template specializations, and that's pretty well known to anyone who's ever looked at C++
 
and shot my leg too
 
T^ is a new piece of syntax. That means it's something new I have to learn before it becomes readable
 
yeah
template syntax is well-known and very common, even Java and C# use it
 
Also I can guess that std::shared_ptr<T> is a pointer of type T with zero knowledge of C++, T^ is line noise (I hurd u liek APL)
 
T^ is pretty random
 
2:21 PM
Hello
 
regarding lua, why do you use lua, when you can write all code in C++ ?
 
yeah... where does the T^ come from?
 
I personally don't
 
@Abyx because lua does not have be compiled into the EXE
 
maybe syntax and language features matters?
 
2:21 PM
but other people use it because it's interpreted, which C++ isn't
syntax and language features only matter to the extent that library features can't cope
 
@Abyx I don't think anyone ever claimed that syntax and language features "did not matter"
 
for example, lambdas
 
^T is Pascal notation for a pointer.
 
that's a ridiculous strawman argument
 
@DeadMG <offtopic> are there no reputable C++ interpreters?
 
2:22 PM
I can design my EXE so that a designer can write very high level lus scripts
 
I am having a very wierd problem.
 
@Raynos Not as far as I know. Parsing C++ is so tough, and it's so inflexible, and the TU system
it's not really suitable for interpretation at all
 
sbi
@thecoshman What the hell are you talking about??
 
There's at least one C++ interpreter, don't remember how well featured it is.
 
@Abyx the reason I dislike T^ is because syntax matters. And despite what you seem to think, syntax does not simply mean "as short as possible"
 
2:25 PM
lambdas are good syntax, because they can't be replaced by a library feature
 
@sbi got a badge for so many posts with ten stars :S
@sbi keep up
 
sbi
@thecoshman You mean you "had a message starred at least ten times" (rather than started)? And why are you then linking to a message by Adam Davis?
 
@jalf I prefer to write something like auto x = ref new X(); rather than std::shared_ptr<X> x(new X());
 
auto x = std::make_shared<X>();
 
@Abyx but the argument was not what you preferred, but whether it was "good syntax"
I personally prefer pancakes
 
user142019
2:28 PM
Hello, chatters.
 
And it's way better than std::shared_ptr<X>(new X()).
And not just because it avoids duplication of the type in invocation.
 
this line of code crashes my program: totalClassCount = 1;
 
@sbi that I do... Because I liked it ¬_¬
 
We don't know why, and can't know why.
 
@TheBreadCat try = 42
 
2:30 PM
its a public integer defined in a header, and is initialized in a constructor as 0.
 
sbi
@Abyx I have worked with a codebase of several MLoC, and I strongly prefer them to not to introduce new keywords as simple as ref, because it's very likely that this would break several kLoC in such a codebase.
 
That still tells me absolutely nothing.
Keywords can be made contextual, though.
Not like C++ grammar will suffer much from it.
There isn't much left to break there, anyway.
 
@Abyx any kind of assignment breaks the program.
 
sbi
@thecoshman You confuse me. You get a badge because so many messages of you got starred, and as a proof you link to someone else's message?
 
how is it "good syntax" to have a different syntax for everything? For some types, I have to type ref new, and for others, it is an error to do so. Some types can be pointed to by a T^, others cannot. How does ^ play together with type traits? is there a std::is_cx_ptr<T>? Is it an error to use a Foo^ with existing type traits? Is T^ a POD type?
 
2:31 PM
@sbi they where two unrelated events... why did you link them together?
 
user142019
If you want consistent syntax, write HQ9+.
 
sbi
@thecoshman Did I mention you confuse me?
 
C++ grammar will be promoted from context-sensitive to unrestricted in the next two revisions, I tell ya.
 
I haven't the faintest clue. And that's the (well, a) problem with introducing new syntax. How does it interact with all the other syntax we have?
 
I also fail at English today, but I blame Java and sleep deprivation for that.
 
2:32 PM
@jalf it can't be std::
 
@Abyx ah yeah, so we need another special case to handle the ^
 
sbi
@CatPlusPlus IMO the C++ grammar was raped with the "can't do much more damage anyway" excuse way too often.
 
@sbi You will do before the year is out
 
you're really selling the feature
 
sbi
14 hours ago, by Cat Plus Plus
Sleeping is for weak.
 
2:34 PM
@sbi It really needs to be written from scratch.
 
well... we started from D class handles and now switched to C++\CX pointers...
 
Also, pointers using * is so ugly.
Especially with C declarator syntax being brain-dead. The infamous int *a, b;.
 
huh... that's some heavy rain ¬_¬ hope it stops before I have to go home
 
@CatPlusPlus yup, that's a syntactic problem (and one which shared pointers don't suffer from, but T^ does, I might add)
 
C++ could use Go-ification of syntax.
 
2:35 PM
@CatPlusPlus D was written from scratch
 
sbi
BTW, where's the robot today? ISTR him being here in the early morning. Did he stay up all night and is now tied to the receptacle for recharging?
 
but @DeadMG don't like it
 
@CatPlusPlus eh, I'll just repeat myself. The entire point in using C++ is source compatibility. Cleaning up the syntax gives you a cleaner language that's not worth using.
 
@CatPlusPlus don't change my syntax... just getting used to it
 
I could never get started with D.
 
2:36 PM
@jalf I think that IDE integration can make that go away
 
@jalf I know it's compatibility. Doesn't make it good.
 
being able to use C++ and hypothetical future languages in the same application doesn't imply source compatibility
 
If C++ defined ABI, we could have a language that's easily binary compatible, but gets rid of the cruft.
 
@DeadMG then you're even more naive than I thought
 
Well, maybe. One can dream.
 
user142019
2:38 PM
What about a C interface?
 
only when it doesn't work
 
I need something relaxing to do.
 
:D
 
I was thinking about those stack-based languages.
 
@WTP C interface don't support overloading, templates and so on
 
2:39 PM
Screw the build system, I'll never finish that anyway.
 
user142019
@Abyx you do have a point.
 
user142019
@CatPlusPlus you've predicted the future yesterday. Congratulations!
 
@jalf Why wouldn't interoperating at the semantic level be valid?
 
user142019
@CatPlusPlus you said you won't finish it
 
2:41 PM
I assume that on every project I do.
 
user142019
me too, and otherwise my friends remind me
 
@DeadMG because for real-world applications, nearly all the code being written is in the middle of existing code. It's not a matter of writing some application logic in AwesomeLanguage(tm), which calls MyC++Library::DoStuff(), but modifying the middle of a C++ function, or modifying a data structure defined in C++
when I say existing code is the reason people use C++, I don't mean libraries. Libraries are easy to access from Haskell, Python or PHP or whatever you prefer
 
Real-world applications tend to be big and clunky. I prefer my perfect world of half-finished, fun projects.
2
Well, quarter-finished and not-quite-started-yet, usually.
But still.
 
The reason C++ caught on was that I could take a huge existing project written in C, and say "from now on, we're using C++", run it through a C++ compiler, and it'd work. Then I could modify the C code piece by piece, and always have a working application
 
@jalf c++ libraries, not so much.
 
2:44 PM
yes, that's what happened for C++
but it's not necessary
if you look at Java and C#, they weren't source-compat with C++ at all
 
@DeadMG ah, I'm sorry then. Haskell must have become the #1 most popular language in my lunch break then.
 
that doesn't refute my argument at all
 
If you look at Java, it became popular for other reasons. "trying to fix C++" was not one of them. Neither of them are trying to replace C++
 
I wouldn't be so sure about that.
 
If you want to compete with C++, then you need to be able to compile C++ code. Otherwise, you're competing with Ruby, Haskell, Fortran, PHP, Java and Perl
you can still become a popular language, but you're no longer a serious contender for replacing C++
 
2:46 PM
My Java vector-graphics designer project's code-base is now 593 lines long and it still doesn't do anything even remotely useful.
 
user142019
Today my teacher explained arrays. He told us the index of the first element was 1. The language was C.
 
593 is barely Hello world.
 
@IntermediateHacker it clearly doesn't have enough singletons!
 
wstring mystring = L"blah"; wchar_t *pbegin = mystring.begin();
why is this wrong?
 
mystring.begin() returns an iterator, not a pointer to wchar_t.
 
2:46 PM
iterator != T*
 
@jalf wrong! it has eleven singletons
 
It might be a pointer, but you don't know that.
 
@WTP ¬_¬ seriosuly?
 
@CatPlusPlus so how do I get a pointer to the first char?
or wchar_t even
 
@TonyTheLion std::wstring::iterator isn't necesarily a wchar_t*
 
2:47 PM
const iterator is not convertible to T*
 
&strin[0]
 
user142019
@thecoshman I'm serious, unfortunately.
 
cpx
wstring::iterator
 
&mystring[0]
Or &*mystring.begin()
 
2:47 PM
I'm probably writing this over here for like the millionth time but, I hate Java
2
 
user142019
Hi.
 
@sbi Yeah, I was recharging. I can't be here 24/7.
 
user142019
@IntermediateHacker everyone should.
 
I hate C++, so what
 
We hate C++, too.
 
user142019
2:48 PM
Everyone does.
 
@jalf right, for some reason I thought this was the case
weird
 
@IntermediateHacker Exactly. That's only one every 50 or so lines. There's room for more!
 
sbi
@RMartinhoFernandes Are you now scanning the transcript for the word "robot"?
 
@jalf That's not true. Those languages can't, for example, instantiate C++ templates.
 
user142019
Ah! Flag overflow. ><
 
2:49 PM
@DeadMG So? Why would they need to?
 
@jalf lol.
 
well, a lot of important C++ libraries are templates
 
That's it, I'm CSSing that flag crap away again.
 
Silly flags again... Sigh.
 
user142019
They're flagging everything in the PHP chat -_-
 
2:49 PM
a language that can call into template code is a lot better than a language which can't
 
It might be legitimate spam this time.
 
But what do C++ libraries have to do with anything?
 
But I don't really care.
 
quick question, UB does not mean illegal, right?
 
I'm not in PHP room.
I don't want to deal with PHP room's problems.
 
2:50 PM
well, you suggested that the other languages could use C++ libraries just fine
but that's not really true at all
 
@Pubby UB means UB.
 
only some C++ libraries can be exported for use
no Java code can use std::vector<T>
 
user142019
@Pubby it is legal. Just don't do it.
 
@Pubby UB can be legal on specific compiler if its manual says that it's legal
 
I thought it was neither legal nor illegal :S
 
2:52 PM
effectively, UB means illegal, but the compiler doesn't have to diagnose or protect you from it
 
@Pubby ask ur lawyer whether it's legal or not
 
no program that works can depend on UB
 
Say I have a big application written in C++. Now, I want to migrate to a better language. If your language is source-compatible with C++, then I can simply switch to another compiler, and I'm flying. if I can't do that, then I have to rewrite my application. If I have to rewrite my application anyway, then there's no inherent reason why I couldn't choose a completely different language
 
language lawyers!
 
sbi
@RMartinhoFernandes They appeared here the moment you did.
 
2:52 PM
then I might as well use Haskell as D or your hypothetical cleaned-up-C++
 
Undefined behaviour means exactly what it says on the tin. The standard does not say what happens, so anything can happen.
 
@DeadMG nearly every program running on your PC depends on UB
 
sbi
@DeadMG No program should. In practice, almost all do.
 
@sbi What are you suggesting?
 
@jalf you can define API and write new code in new language
 
2:53 PM
WTF is UB?
 
exhibiting UB is quite a bit different to depending on UB
 
sbi
@RMartinhoFernandes Whistles.
 
user142019
@IntermediateHacker nobody knows. It's undefined, it has no definition.
 
@IntermediateHacker ugly butts
 
@IntermediateHacker Utter Bollocks.
2
 
2:54 PM
if you want a trivial example, then nearly every program was (a) written in C++, (b) not using a C++11 compiler, and (c) using more than one thread. Therefore, it had UB, behavior not defined by the standard
@Abyx yes, and then you're rewriting your application
reusing a bit here and there, sure, but rewriting
 
sbi
@IntermediateHacker Might I direct you to this perl of wisdom? :)
 
#flag-count { display: none !important; } FTW.
 
Like I said before, if you're working on an existing application, then your changes have to be made in the middle of existing code
 
Farming the boats again...
 
15
Q: What exactly do "IB" and "UB" mean?

cHaoI've seen the terms "IB" and "UB" used several times, particularly in the context of C++. I've tried googling them, but apparently those two-letter combinations see a lot of use. :P So, i ask you...what do they mean, if they're said like it's a bad thing?

 
2:54 PM
@jalf think that it's refactoring
 
Perl of wisdom? Is that like, #$)*@!#)$*@#)($*!@#$*!@#)$?
 
what if you could automatically convert from C++?
 
user142019
IB is horrible.
 
Show me an API that allows me to modify the last three lines of a function
 
oh, I can do that anyway
 
2:55 PM
@DeadMG Do you trust automatic conversion tools?
 
sbi
34
Q: Undefined, unspecified and implementation-defined behavior

ZolomonWhat is the difference between these three?

 
eh
 
Wait, I know what undefined behaviour is (been getting it for the last 1.5 years), just didn't know it was abbreviated as UB
 
@Abyx Refactoring everything is the same as rewriting your application
 
cpx
2:56 PM
oh that question again
 
there's a big difference between "C++ convert to Java" and "C# convert to Java", for example
 
cpx
hm I didn't have any good experience with VC++ compared to g++.
so which one is good compared Microsoft Visual C# and Portable.NET?
 
g++ is way better than VC++
 
@DeadMG it's impossible because of lots of preprocessor definitions
 
@IntermediateHacker don't. even. start.
 
2:56 PM
tis probably true
 
user406009
@jalf You could write C wrapper functions for your C++ code. Almost every language can link to C.
 
every time I want to modify existing code, I have to (a) split up the function into a C++ part and a NewLang part, (b) update the API with the necessary hook for jumping from the old C++ code to my NewLang fix, and then back to the C++ code, and (c) write the fix in NewLang code. And then fix it
 
@IntermediateHacker The wanted to use FX as the acronym, but it was already taken.
 
well, I certainly can offer an API which can modify C++ types
 
Christ, hasn't anyone here ever worked on a software project that wasn'
wasn't written from scratch?
 
2:57 PM
and modify C++ functions
 
@jalf nope
 
although that doesn't necessarily make it as good as maintaining it inline
 
user142019
@jalf I used the project template my IDE provided me.
 
You're given a nice, tidy function of 20 lines of C++ code. One of the lines has a bug that you need to fix. How do you do that in another language without rewriting the function?
 
@jalf horrible amounts of legacy Java code... serious vomit code
 
2:58 PM
It's not a matter of APIs or refactoring
 
@jalf I will rewrite it.
 
you can import the function as a semantic object and modify the statements directly
 
I lost the track of what's happening.
 
@Abyx exactly. So in order to maintain your application, you are now forced to rewrite it
 
@CatPlusPlus ur not alone
 
2:58 PM
@jalf You suggested the movie Drive. I liked it.
 
user142019
Gonna delete some GitHub projects I never finished…
 
user406009
@jalf considering that a function is an abstraction that might not even exist at run time, you have to modify the C++ version.
 
And since I have to rewrite the application, I'm free to choose whichever language I like
 
bitbucket > github.
 
cpx
Does Portable.NET even have its own IDE?
 
2:59 PM
functions are obstractions of abjects
 
so I throw C++ far away, and then I certainly won't look at D, or at @DeadMG's C++-done-right. Then I'll consider Ruby or Haskell, or perhaps C# or Scala
 

« first day (423 days earlier)      last day (4540 days later) »