« first day (1324 days earlier)      last day (3850 days later) » 

user1804599
10:00
This question appears to be off-topic because it is about debugging a giant wall of unreadable bad code. — rightfold 6 secs ago
Signal.... I gotta resite my router.
ho boy
estimated burn: 15 minutes
I cannotclosevote from kindle:(
Xeo
Xeo
FFS Windows, stop changing my theme to non-aero and screwing my colours up
user1804599
Hmm.
user1804599
10:07
( • )( • )ԅ(‾⌣‾ԅ)
char * GetFileName (char * Location) --> fun guaranteed
user1804599
@Jefffrey Fuck that API.
Why are you doing C shit?
Guise... it's the last question linked by Tony.
@chmod711telkitty Looks like it's playing the harmonica :)
10:14
-2
Q: ++i or i=i+1, which has fast performance?

user3693546I was stuck in a argument. whether ++i is fast enough on registers or i=i+1. because i=i+1 has a constant involved with it so it should take a extra register, hence I said ++i is fast. Am I right, And What is the actual working concept of these two? Thank in advance.

:lol:
Xeo
Xeo
Take OP and shoot him into space, FFS
user1804599
You have no idea what you are talking about. — rightfold 1 min ago
The best part is the upvote.
user1804599
@Xeo I’m currently implementing the shooting-into-space software. Should I use ++i or i = i + 1? Which is faster?
@rightfold i+=sizeof(char)
user1804599
10:17
@FredOverflow Syntax error.
Foo Foo::operator++(int ignored_dummy_value)   // called for i++
{
    Foo tmp(*this);   // variable "tmp" cannot be optimized away by the compiler
    ++(*this);
    return tmp;
}
what?
user1804599
sizeof requires parentheses around the operand if the operand is a data type.
the compiler could definitely optimise that if it wanted to.
@Rapptz The author of the comment assumes the compiler only optimizes inside methods
user1804599
@LightnessRacesinOrbit Olumide for room owner.
10:19
@Rapptz Maybe compilers weren't capable of that optimization in the past.
@Rapptz link
your dupe
160
A: Is there a performance difference between i++ and ++i in C++?

Mark Harrison[Executive Summary: Use ++i if you don't have a specific reason to use i++.] For C++, the answer is a bit more complicated. If i is a simple type (not an instance of a C++ class), then the answer given for C holds, since the compiler is generating the code. However, if i is an instance of a C+...

it's pretty old
2008
user1804599
Question was about C, not C++. You cannot overload operator++ in C.
ITT: virtual operator++(int)
10:21
also it's the dupe of the dupe
question only has 3 score but his answer has 86
surprised there isn't a badge for that
the more I learn about C++ the more I form two conclusions
1) It was certainly designed, compared to PHP
2) I should use haskell
2) It was designed badly.
nah
2) isn't true.
it simply wasn't designed to meet modern coding requirements
since they did not exist when it was being designed.
10:25
okay then
2) It's badly designed for today.
can we dump it into the COBOL pit already?
how do you not get sick of bashing C++ everyday?
working on it
doesn't it get boring?
user1804599
Yes we know C++ is terrible. Let’s have a useful discussion instead.
Apparently no one gets sick of bashing PHP.
10:26
@Rapptz not really. I find new places worth bashing every day (just like I find new places worth praising in Haskell)
I'm sick of that too
OTOH I also posted a Haskell critique post yesterday
and Java bashing and Haskell fanboying and anything that devolves into those two extremes
user1804599
@Rapptz Plonk him, problem solved.
it's annoying
I did actually
10:27
I dunno really, call me an idealist but I fucking despise flawed solutions
be it a dumb design of a toothbrush or a programming language
maybe I should take up pole dancing
@Rapptz According to the comments, mostly due to my choice of function name :)
@MooingDuck Not only for one line, you can use a compound-statement
user1804599
@BartekBanachewicz That’s totally fine, but keep it to yourself, please.
People keep bashing stuff here on a daily basis
he he
the thing I like about bashing C++ is that pretty much everybody else bashes it meaninglessly without even attempting to address the issue
Said it just once myself too
I don't think I've fanboyed or bashed a language in this chat.
10:31
@Jefffrey returns a whopping of 3 results for me
2 are quotes
funny enough, most of these posts are starred
Jul 4 '11 at 14:16, by Robik
Nooooo! PHP is awesome
@Jefffrey but then again, Danny said that he's also annoyed by praises
Then let's stop talking about languages altogether.
10:34
Uh oh, for me that would mean going back to uni assignments
I'm annoyed at fanboying
oh right, uni, almost forgot
k well 6:40 AM.
Sleep time.
night
Xeo
Xeo
Why does the "yes open this app" dialogue take so friggin long for large files
Oh look, 5 minutes after "opening" it, I finally get the dialogue
10:40
the UAC one?
Xeo
Xeo
hai
user1804599
Argh.
user1804599
What to do.
Maybe windows defender
user1804599
What a horrible day.
Xeo
Xeo
10:41
@BartekBanachewicz nope, that .exe was in an excluded folder
@rightfold you never had problems with finding new projects
user1804599
I’m out of projects.
Xeo
Xeo
> UAC scans the files for security directives embedded inside, for larger files this will take longer.
asdf
there.
@rightfold there's still pure lua VM wink wink
user1804599
That is the most boring thing I have ever heard of.
10:44
it's not.
Clearly you haven't heard of programming books
someone just downvoted my C++0x question
wat.
class CDialog
{
    CButton* ButtonPtr;
    bool m_Visible;
    void SomeMethod ();
}
oh god did I write terrible code back then
Xeo
Xeo
Did? Back then?
can any of you guys look at code you wrote a year ago and think it is ok?
10:47
that was actually two and a half years ago almost
Xeo
Xeo
@JohanLarsson I can't look at code I wrote a week ago and think "it's ok", usually
user1804599
Lol, how Traceur does let.
@Xeo and now think about "senior developers" who write code for say ten years without learning/changing approach
user1804599
try {
  throw undefined;
} catch (x) {
  x = 12;
}
10:48
@rightfold is why I don't look in generated javascript
@rightfold What the fuck.
FWIW when I suggested JS bytecode, JS room didn't actually shoot that idea down on sight
user1804599
It was suggested before you suggested it.
when I suggested it to them vOv
anyway I don't see it in ES7 discussions so I guess it's dead for now
user1804599
It’s not needed.
user1804599
10:50
JavaScript works just fine.
we apparently have two competing definitions of "just fine"
Xeo
Xeo
Let's add a third!
I need to draw a use cases diagram
user1804599
What for?
for RUP documentation
user1804599
10:53
What is RUP?
a project methodology
user1804599
Oh, I see.
it's like waterfall but a bit less shittier
user1804599
Fuck weekends.
you're a goddamn nerd.
weekends are the greatest thing in the world
user1804599
10:57
s/greatest/most boring/
user1804599
I’m a workaholic.
that's not really a good thing
depends on how you define 'work'
user1804599
Maybe I should go to work. :v
If you like work then it
is not really work.
user1804599
11:03
I’m going to try Java RMI.
@StackedCrooked is it still ok?
what is ok?
user1804599
It.
unreal work
why would work be not ok?
11:05
dunno
user1804599
Because everything should be fully automated.
user1804599
We engineers are automating stuff so that those lazy bastards in the future don’t have to work anymore. :<
they will have to work to automate stuff just like we do
this makes me feel good about the internet
who is Snooki?
11:09
Snooki is a kind of fish.
some famous someone probably
There's about 100 sites where people are unironically voting for only two first options
shush
160k people voted in this one
ho boy
gotta rebuild my analyzer again.
@BartekBanachewicz Hey - I was up this morning at 06:30 fixing, (OK, trying to fix), my DB shit. OTOH, I'm going down the club early now to play cards and get totally ratted:)
It's too hot to walk while carrying electronics and sun-oil, so I'll drive down. That's the end of my car for another day or two:)
11:19
Vlad has almost 25k rep
and, ironically, his description states "Unemployed." :P //cc @LightnessRacesinOrbit
gosh, people write terrible code and then wonder why it doesn't work
why are they all taugh writing mutating code?
it's hard to get right
numerical for loops require experience and extreme care.
they might seem more "natural", but they are ultimately much harder to execute properly
meh why PEP8 requires two lines between functions? it's so annoying
also BDD seems to be really cool
11:35
@Abyx I have mixed feelings about it
yeah, I also feel something fishy, but I think it's because I suck at that test-first thing
user1804599
@sehe how did you use RMI with futures? I can’t find anything on asynchronous remote calls.
you know, that idea that you should write code only to fix a test - so all the code will be covered with tests because of it
@Abyx why? I think it's a rather natural approach. I call it "dream API".
@Abyx you're not really "fixing" anything when adding functionality, if that bothers you.
well I'm just not used to it yet, and always try violate YAGNI and write some more code
user1804599
11:39
Wait, I guess I can just wrap it using a thread.
user1804599
@sehe nevermind, I got it.
user1804599
Nevermind, I didn’t.
11:59
you sound like me trying to figure out what analyzer design I need.
user1804599
lol
BTW Puppy
have you thought about starting with a minimal core first and only then adding new features?
define "minimal core"
minimal something to write functioning programs with
I'd stop there and write as much wide code as I could
from my perspective, you seem to be adding a lot of stuff
yes, I certainly did consider it.
but here's the thing.
I'd really need stuff like exceptions, RTTI
12:05
RTTI?
what for?
stuff like dynamic_cast, kinda useful.
I don't think that dynamic_cast is very useful
I also do know that Haskell has pretty much 0 RTTI.
Haskell doesn't really model inheritance so that's no surprise.
user1804599
Stop comparing Haskell and Wide.
user1804599
They are completely different languages.
user1804599
12:07
You cannot take random Haskell features to Wide, or remove Wide features because Haskell lacks them.
I am certainly not planning on it.
I am just not sure if pushing for one OOP scheme as a language feature is such a good idea
virtually every language that supports OOP directly supports something like dynamic_cast and for good reason.
the Wide compiler has several uses of it.
user1804599
@DeadMG Not dynamically typed languages, usually. Thought they have instanceof.
that supports OOP, or that supports class-based inheritance-based code reuse?
I feel that people often mix those.
user1804599
12:10
Subtyping in general.
inheritance is not about code reuse, it is about dynamically substituting derived classes.
hm, "runtime code behaviour changes"
and in some places only some derived classes are acceptable.
for a very simple example, when you do f(arg := expr) in Wide, then expr can have any type, but only some types are actually acceptable there semantically.
wouldn't runtime pattern matching be a better solution than dynamic_cast anyway?
12:12
they are effectively the same feature in some ways, and I have absolutely no need whatsoever for the other ways.
I feel that Wide is getting really similar to C++.
user1804599
Whether you have pattern matching or dynamic_cast doesn’t really matter except syntactically.
well
@rightfold oh but of course
there's only one person here who has any idea what it'll be like, and that's me.
12:13
but that can still be a big difference.
and even then, considering how languages change and evolve over time, it's not a very great idea.
@DeadMG hm. For a general-purpose language intended to replace C++, you might want to work on that part.
yeah
unless you want Wide userbase count to remain at 1, that is.
but before I tell everybody about all the features I have, I might actually need to have them first.
12:14
there's nothing wrong in outlining planned features IMHO
user1804599
@BartekBanachewicz also, you still need RTTI for that. :P
2 mins ago, by Bartek Banachewicz
@rightfold oh but of course
implied by "runtime" I'd say.
user1804599
Well, time to write some code that extract data from an Excel sheet.
@DeadMG okey, I was unfair. Like C++ - C.
user1804599
Using the HSSF Horrible SpreadSheet Format library.
12:17
well, to be entirely fair
my basic starting point is "Need to migrate away from C++".
so to some extent, it intentionally resembles C++ in terms of, being compatible with code, tools, developers, etc
and to another extent, I didn't want to lose what I liked about C++
The only thing I really like about C++ is how transparent storing of external resources can be via RAII.
and what I am definitely not going to do is put in a bunch of features that would require re-designing the language from the ground up to support that I have little experience with and that little experience was overwhelmingly negative
i.e., pattern matching, implicit currying, etc.
your experience with pattern matching and currying was negative?
woah.
I hate pattern matching.
well, okay, currying might require some adaptation
@DeadMG then you're in a minority nowadays, I think.
12:20
every time I had to use it, it was just a terrible replacement of simply writing my own code to decide what to do.
it's "if" in a terribly shitty DSL (which binds the language to the library hardcore)
why is it shitty?
also, it's not just an if
it's a way more explicit and safer if
consider optional
that is not necessarily better.
woo, I managed to find my cv
the user should have the choice to choose unsafety if he needs it for some particular purpose.
12:22
Too bad you can't draft questions and answers, blargh
not unless you spell out unsafe
@FilipRoséen-refp you can.
user1804599
@DeadMG How does it bind the language to the library?
might do
@BartekBanachewicz post, and delete it?
@FilipRoséen-refp answer drafts are saved automatically
12:23
@BartekBanachewicz oh snap, I forgot to write that I'd like to draft something and being able to link it so that others can take a look, before I actually post it
@rightfold If I have a pair<int, int>, and I want to match on the contents, how are you gonna know how many items are in it and what values they have without applying special language magic?
user1804599
By having an extractor function.
@DeadMG I'd say tuples are something that should be language-supported.
user1804599
Oh yeah, it makes the language depend on Option and Tuple. Woo.
12:24
anyway... optional really isn't a very good example
@BartekBanachewicz cause I hope that whatever idea you have also works for, I dunno, those silly IVector<T> C++/CX collections
and boost::circular_buffer.
it should be processed in a monadic Maybe context
and Concurrency::concurrent_unordered_map (whoops)
pattern matching on Just/Nothing is as retarded as if really
I think people will start using real monads soon anyway.
user1804599
You could also have a pattern { first: …; second: …; } for pair<int, int>, of course. But extractor functions are more general.
12:26
ironically, ES is doing a lot to help it
and Scala, of course.
@DeadMG Do you think that adding a fully imperative equivalent of monadic context to my article would help in clarifying anything?
It would be extremely verbose, but maybe that's what it needs
well, that depends on who the target audience is.
people who don't write code basing on monadic contexts... yet.
that's way too generic
yes.
12:28
We express context in most of the code we write.
It's just that people do it differently.
but here's the thing
if you want to communicate with me, you need to speak the same language as I do.
it's good for bugger all if you want to communicate in Haskell and I want to express monadic context in Java.
the only thing I'm gonna see is a bunch of strange squiggly lines.
the thing is, it's clumsy to represent monadic contexts in the languages you speak
which brings us to the core conclusion that it's probably dumb to try to bring monadic contexts to people who work in those languages.
which is a great reason why most of the users of those languages don't deal with monads, and probably never, ever will, no matter what tutorial you write.
user1804599
You don’t use language features useful in X in Y if they are not useful in Y.
user1804599
Shut up about monads.
user1804599
Everyone is getting sick of you trying to convince people to make everything into Haskell.
8
yeah, you know what.
you're right.
I don't belong in this room anymore.
@rightfold Nah, I think you're wrong here.
I think that a bit of syntactic sugar and monads would be perfectly applicable to virtually any language.
the core problem with monads is that they are an effective general pattern only if you add language support.
anyway, for Wide I am seriously considering looking at adding language support for monads.
nice job rightfold, really nice.
bartek and I were having a perfectly good conversation
@rightfold Ahahaha
'tis a circle
Also you can use pseudocode
@DeadMG What you want is bind desugaring, i.e. a "monadic statement" form and "monadic bind" form, where the first desugars to >> and the other to >>=
Other thing is picking up right >>/>>=
I have no idea what >> and >>= are.
12:45
>>= is a core monad operation
So for every monad you have different >>=
And this is where the magic happens
the lounge is in fact a monadic tribe
It's called 'bind', on LHS you have a wrapped value and on RHS a function that takes unwrapped value and returns a new wrapped value
@rightfold lolwut
@AlexM. lies
@rightfold that is indeed horrific
can you consider Aspose? It's spammy commercial, but the library is okay
Or just export to csv
@CatPlusPlus I did read up about this stuff, but forgot.
Bind is sometimes called programmable semicolon

« first day (1324 days earlier)      last day (3850 days later) »