« first day (1532 days earlier)      last day (3641 days later) » 

21:00
Because you forgot to put on your C++ flame-proof suit first. — Robert Harvey ♦ 1 hour ago
hehe I missed Boxing Day's display of Christmas Peace
I'm thinking of replacing uint8_t in my codebase with a Byte (POD) class. Something like this for example.
3
built-in types really suck
But if you put them in a struct then suddenly everything is possible.
user1804599
Nice.
It's UB only when you actually dereference a null pointer (that is, convert the lvalue to an rvalue). Additionally, using a null pointer to compute the offset of a class member is an ancient trick from the days of plain ol' C. — Sam Varshavchik yesterday
huh
*(A*)0 totally not UB
The behavior is kinda predictable though.
Evening
21:09
@AndyProwl What happens if you do that in kernel code?
Shit. I go away for a bit and Vlad pops up on the recursive shit. I could have microwaved popcorn...
@AndyProwl It is UB and that offset-from-null thing is actually not well-defined behaviour- that's why offsetof exists.
@StackedCrooked you have UB in kernel code, I guess
user1804599
Great.
user1804599
The Boost.Coroutine documentation is mediocre.
21:11
I should start a company called UBsoft.
9
@rightføld yeah, it's kinda voodoo
Interesting stat from The Guardian. http://t.co/Ein2UHggdF
Ell
Ell
Time to fight Mom again
@StackedCrooked Don't forget to hire @ThePhD :P
> explantion
@AndyProwl He's gonna co-founder.
Ell
Ell
21:14
Oh I won.
That was quick
guys
I need a teammate for a factorio mod
teammate for what exactly?
@Jefffrey for helping me create a mod
that solves one problem I have with the game
should be fairly easy
user1804599
Nice. So after a channel operation is finished I can just do thread_pool.post(coroutine).
user1804599
21:21
And after invoking the operation I can do yield().
sourcetree is nice
I like sourcetree
user1804599
Stackful coroutines are fascinating.
@AlexM. it's only nice for small codebases
@BartekBanachewicz What problem is that?
@BartekBanachewicz like mine
21:25
If they managed to make the syntax a little nicer it would be great.
@Puppy belt counters
for large codebases (i.e. work) I use tortoise svn and I don't like it :(
not even needing to hook them up to networks
I just want a number over a belt section
don't even know what a belt counter is
something that replaces a belt (visually) with a number showing how many items per time unit flow through it
user1804599
21:27
ugh mathematics
ah.
well that sounds like functionality belts should just offer by default.
svn is ok as long as you only need to commit and checkout.
and never need to rename anything
I never took the time to learn SVN
@Puppy I'd like to have it visually represented. I know that alerting system is more or less planned, but this sounds like an easy idea; I just don't want to have to click the thing or even mouse over it
21:28
I just use it as if I was using git and then go like "wait" when it doesn't act like git
branching is always a bad idea. better to simply write the new code in a new file and later overwrite the old one.
lucky me, I only do simple conflict resolving, commiting and checkout
Ell
Ell
@StackedCrooked not sure if srs
There won't be merge conflicts.
@StackedCrooked mmm nice. i'm a bit surprised this is actually pod. I'm trying to remember the downside that usually makes me discard this idea. It looks like it makes too much sense the way you demonstrate it :)
21:32
@sehe Because of the defaulted constructor.
Normally constructors kill the POD. But =default restores it.
@AlexM. I hate it. Way too slow. Bad UI for "advanced" features. IOW: you drop to the shell to do anything interesting.
However, there was a bug in GCC 4.5-4.6 where value initialization no longer worked when doing this.
I like it because it saves my credentials for bitbucket and github
@StackedCrooked Oooh. It's likely that MSVC doesn't honour that then. That might have made the deal sour
@StackedCrooked Or that. Nah. Too old versions
so it's quicker for my average use than shell
i.e. commiting and pushing
21:33
@AlexM. bwahaha. How about PK :)
inb4 Windows crappy tooling support (no issue here, but this is going to stick nonetheless)
@AlexM. crede what
you call your keys funny
PK? like in password manager?
like in Private Key [Auth]
@BartekBanachewicz user/pass
If you have constructors then you still get is_trivially_copyable (which is all I really need). However, that trait is not yet implemented even in recent libstdc++ and libc++.
21:35
private what
@AlexM. is this 1900s again
I dunno what that is
Public-key cryptography, also known as asymmetric cryptography, is a class of cryptographic algorithms which requires two separate keys, one of which is secret (or private) and one of which is public. Although different, the two parts of this key pair are mathematically linked. The public key is used to encrypt plaintext or to verify a digital signature; whereas the private key is used to decrypt ciphertext or to create a digital signature. The term "asymmetric" stems from the use of different keys to perform these opposite functions, each the inverse of the other – as contrasted with conventional...
Thank you
@BartekBanachewicz public key, actually
21:36
:D no biggie. They come in pairs anyways
your git client needs your private key on your side
@StackedCrooked I settled for that for my Guid class last year, I remember
@BartekBanachewicz but it's not what P in PK auth stands for. What describes PK auth is that the key can be public
is it available on VS?
21:37
@sehe Alright.
@StackedCrooked It's based on boost so yes. I bolted on Edm/Odata functionality though (so JSON serialization in several flavours)
Ah, is_trivially_copyable was added since VS2012.
IIRC there was a TR1 trait for that.
@BartekBanachewicz I'll take a look
it looks complicated though
user1804599
bollocks
21:40
@AlexM. it really isn't
user4001900
Hi there!
I see stdlibc++ started committing a first version of is_trivially_copyable around October 2014.
@dylamsamuel hi there
so hmm yeah I think adding new item types isn't that hard
user4001900
@BartekBanachewicz Merry Xmas
user4001900
Hey guys, I want to ask a simple question, Is good to implement Assembly functions on to a C++ Project? I mean, for example, using add X,Y rather than X = X+Y, Is the same thing?
Ell
Ell
21:47
No
@dylamsamuel no
user4001900
Why? Is not correct or its just dumb? What's the diference?
@dylamsamuel it serves no purpose. By introducing assembly you gain precisely nothing, and introduce code that has to be maintained, with a higher risk of failure.
I google for "inheritance is composition" and I get "an alternative to inheritance is composition".
@StackedCrooked What else did you expect?
21:49
ponies
Inheritance is not composition, by any stretch of imagination.
Ell
Ell
Private inheritance is
user4001900
@BartekBanachewicz Thanks for the answer, I thinked that some functions can be on a way more faster than the normals of C++
inheritance is a superset of composition
@dylamsamuel Profile. Profile. Profile.
21:51
@dylamsamuel why would you think that?
user4001900
@Jefffrey What do you mean?
@dylamsamuel On the contrary, the compiler is WAY better at writing assembly than you are.
user4001900
@BartekBanachewicz Because the Assembly calls are extremaly simple in terms of Machine understanding (I mean, Assembly is more closer to Machine code than C++)
@dylamsamuel Micro-optimizations serve almost no purpose. Profile (analize) your program and see where the bottleneck is and then work on that.
user4001900
@Jefffrey Yeah, but is a good practice to learn Assembly? or is just a waste of time?
21:52
@dylamsamuel If I had to choose between you and the compiler's optimizer. I wouldn't choose you.
user4001900
@Borgleader Lol, me too.
@dylamsamuel Nothing is a waste of time. But I wouldn't write in assembly.
In fact, I have no idea how to write assembly.
I learned some x86 instructions (or were they "RISC vs CISC"-chapter instructions?) and they are boring as fuck.
Ell
Ell
@Jefffrey analising isn't a good idea :P
user4001900
the functions are like:
add eax,0x20
jmp $2020
user4001900
and things like that
21:54
public MasterManager MasterMan;
oh wow I had a master manager
user4001900
and can vary from processor to processor
oh dear.
@dylamsamuel It's a total waste of time.
@Ell how do you spell it? analyzing?
@Jefffrey Many things are wastes of time.
user4001900
@Puppy Yeah, Now i see it.
Ell
Ell
21:55
Anylising
No
are you serious
Ell
Ell
You were right
user4001900
@Ell But Hey, For Hacking purposes it will be good ;D
user4001900
Just Kidding XD
I mean, I always misspell it.
I'm a lost cause, but "anylising" seems deadly wrong.
Ell
Ell
21:56
The anal just looked weird.
kinky
@Ell thats what she said
user1804599
> src/fiber.cpp:21:5: error: thread-local storage is unsupported for the current target
user1804599
(╯°□°)╯︵ ┻━┻
It's so much of a fun hobby writing bootloaders and drivers without any assembler. It can keep you occupied for years.
21:58
> because C/C++ is the only true multi-platform language
muahahahahahah
Ell
Ell
Saw that
user4001900
Yeah, but how you write a Operative System in C++? MIND=BLOWN
Ell
Ell
They're reimplementing the standard library
I have already seen find. The problem is I want it to return 1 if the char exists or 0 if it doesn't. — rebel1234 3 mins ago
Ell
Ell
@dylamsamuel not really
21:58
oh OP...
@rightføld TLS: hidden global vars.
user1804599
I need them.
Ell
Ell
Freebsd did it
@Ell you guys mocked it already?
user1804599
__thread seems to work.
user1804599
21:59
> src/fiber.cpp:28:28: error: no member named 'make_unique' in namespace 'std'
Ell
Ell
@Jefffrey j didn't mock it here
user1804599
wtf it worked last time
> There is no roadmap, no timeline and no feature set.
no need to mock it, it mocks itself
user1804599
oh right c++1y lol
user4001900
@rightføld Which ide you use?
21:59
> code/
> int main(void) {
user1804599
@dylamsamuel Depends on the programming language.
> Singleton removal: IO
wat u fink
user4001900
22:01
@rightføld Well the error that you're putting is from a C++ Project, So, Which IDE you use to code in C++?
user1804599
Vim.
user1804599
I don't like how = is implicit on capture lists.
user1804599
I wish I could do [=function, =fiber_ptr, &push].
lol Vlad so desperate for rep, his answer is super long for something really trivial.
user1804599
@Puppy remove the silly part about assertions.
user1804599
22:05
Run plugins in their own process, like Chrome does.
> if it requires exceptions enabled, it's out
every gamedev ever seems to hate exceptions :(
@AlexM. I guess that's the reason he reinvented std::string
user4001900
if you're using Window you should use std::wstring rather than std::string, Just Sayin'
@Jefffrey hahahahahahahaha
> if it requires exceptions enabled, it's out
So basically C++ is out.
(Disabling exceptions basically means it's not C++ anymore.)
@Griwes Not really
22:09
@Borgleader Read the standard, it requires exceptions to be enabled in both hosted and freestanding implementations.
user4001900
@Griwes Not Really.
Any acceptable uses of goto?
@Griwes Not really
18 secs ago, by Griwes
@Borgleader Read the standard, it requires exceptions to be enabled in both hosted and freestanding implementations.
26 secs ago, by Griwes
@Borgleader Read the standard, it requires exceptions to be enabled in both hosted and freestanding implementations.
@Griwes Hey, I was joking
22:09
disabling exceptions is throwing exception handling out the window
@Jefffrey I know.
which is enough of a bad thing to do
user1804599
What is it with all these people coming in and asking silly questions or saying silly things?
@AlexM. you don't say :O
@Griwes ikr
22:10
@AlexM. I think this should meet the Lounge Asylum.
user4001900
@rightføld delete[] world;
Ell
Ell
C++ without exception handling is surely c++ still
user4001900
It is, but at a lower level.
user1804599
@dylamsamuel lol manual memory management.
@AlexM. took me a while to notice the pun
user1804599
22:11
@AlexM. dat pun
@Ell Not according to the standard.
user1804599
Manual memory management is for losers.
@Jefffrey I still think it should meet the Asylum.
@Jefffrey what pun? throwing? not sure that was intentional, as throwing something out the window is an expression
hang on, I still haven't noticed the pun
oh
22:12
@Griwes How do you distinguish what goes to the Asylum and what doesn't?
@Jefffrey I let my insanity make the distinction.
@Borgleader are you going for another pun there?
lol
@Jefffrey what pun? o.o
@rightføld Which is still highly inconvenient for a totally avoidable reason.
user1804599
22:14
It has many advantages.
@Borgleader expression like expressions in programming
I think
user1804599
For example, it can corrupt heaps all it wants without affecting the host.
sure, but I don't care a great deal about that.
user1804599
And it can be written in any language ever.
or that.
22:15
@Borgleader you have thrown an expression at that previous "pun"
expressions are usually what you write next to the throw keyword. :P
yeah... that was not a pun
neither was the first one
mine are more obvious, and terrible
user4001900
You're still talking about the Pun?
user1804599
Can Catch be configured to run each test in its own process?
22:19
there was no pun
user4001900
@Borgleader Well, The Imaginary Pun.
@rightføld I don't think I've found such option. My Mayfly can, though - as a matter of fact, that's pretty much the only mode it has implemented as of now. :D Plus it's kinda behind Catch in some aspects, especially things like printing the values on failed asserts, but I'm getting there.
@rightføld No. This is why I changed away from using Catch to test.
user1804599
ok
@Puppy What do you use now?
22:30
@AndyProwl inda house?
@TemplateRex hey :) I'm just about to leave
what's up?
re your contains remarks in the thread on std-proposals stackoverflow.com/a/26886693/819272
I thought about the second solution indeed, comments went in that direction too
OK, didn't bother to read the whole thread, went off on a tangent too much
however, one thing is I don't like much assignments inside if()
the other thing is that you'd still need another function for find, because using contains as a find just reads odd if you want to use the iterator
but yes, I understand your point
22:34
the find != end idiom would be killed then right?
(all right, g/f came to fetch me :P)
so why need 2 if you just have contains
ok, go have fun
@EtiennedeMartel tnx for the typo fix
short answer: it's a feeling, perhaps unmotivated. I think auto it = find(c, x) is more intent-revealing thatn auto it = contains(c, x) if you want to look for one element
ok, then just change find signature to return optional or pair<it, bool>
then what would read odd is if (find(c, x))
but yeah, just my feeling
(also, it should have a name other than find)
all right I'm really off now :P cya later
22:38
alright, take care
@DietmarKühl Hello
@Borgleader: hello!
seems I joined when Andy was discussing his silly proposal and needed to leave...
user1804599
> I need to know how to make an API from scratch, can it be done with pure c++?
user1804599
> how this takes place?
first, you draw a pentagram on the ground then...
Ell
Ell
22:51
@DietmarKühl I haven't seen his proposal. What makes it silly?
user1804599
It will be snowing tomorrow.
@Ell: he proposes to add contains(c, x) to the standard C++ library.
Ell
Ell
Hmm
it is silly because the existing [or soon too exist] functionality seems sufficient: c.end() == find(c, x)
user1804599
@AlexM. Magic Simulator 1350
Ell
Ell
22:53
Yeah
You'll probably be wanting to assign too
(the ranges stuff is being added; leveraging that to have contains(c, x) may be reasonable.
user1804599
@DietmarKühl lol yoda expressions
Ell
Ell
If(auto it = find(c, x), it == end) {...}
Can you do something like this currently?
user1804599
You can in Go!
@rightføld: you are actually right - with the system I'm current working it wouldn't even work!
user1804599
22:55
@Ell if (auto it = find(c, x)) if (it == end) {...}
the end-point is meant to be only on the right hand side...
user1804599
Wait, that only works if the result of find can be converted to bool. :P
Ell
Ell
@rightføld ah yes
user1804599
You want { auto it = find(c, x); if (it == end) {...} }.
Ell
Ell
Wait its alsp pointless :L
22:56
@rightfield: there is a different proposal which could deal with that, too...
there is an auto template proposal and you could leverage to create a type result:
if (result<auto> it = position(c, x)) { ... }
user1804599
why
user1804599
just use auto it
result<T> could be a type which explicitly converts to bool and otherwise converts happily to an iterator.
Ell
Ell
Not sure I like that
iterators shouldn't have a conversion to bool. They are positions and you can't tell an end position from another position without context.
user1804599
22:59
BUKKAKE
Ell
Ell
@DietmarKühl I think explicit end check is best practise

« first day (1532 days earlier)      last day (3641 days later) »