« first day (963 days earlier)      last day (4003 days later) » 

3:01 PM
@Xeo Yeah, but that's the kind of workaround I was talking about. Is it worth the bother?
 
Xeo
@R.MartinhoFernandes Hm, it can also be used for something else (while being renamed), i.e. to keep references to functors instead of moving / copying them.
I opted for protect for now.
 
@rightfold UTF-32 as an encoding scheme (iconv works with bytes, therefore only encoding schemes) needs a BOM to be unambiguous.
 
Xeo
I'm a bit torn atm, will investigate further later...
 
@Xeo He's wrong is the short (check my response on isocpp for the long)
 
UTF-32LE or UTF-32BE don't.
 
user142019
3:03 PM
@R.MartinhoFernandes OIC.
 
user142019
Yeah I noticed the output was in the wrong endianness for my computer.
 
Xeo
FWIW, I agree with the sentiment that stuff shouldn't be automatically moved into lambda captures.
 
@Xeo The buzz around lambdas is so fucking annoying.
 
there is no difference between implicit move into lambda capture and implicit move into return value.
 
3:04 PM
they are both language contexts strictly restricted and the safety is trivially provable and the same for both cases.
 
I don't like the idea of less consistency.
 
implicit move into lambda capture is more consistent, not less.
 
Xeo
watno
 
@Jeffrey I was using Disqus (requires some form of login) but they started serving unasked for ads so now I have no comments.
 
Xeo
Obtw robot, I also am entertaining the idea of overload(guarded<Conds...>(fs)...) which adds sfinae to the invokations. Should be fun to implement.
 
3:06 PM
the language makes exactly the same guarantees about return p; and return [p] { return *p; };
 
Not listening.
 
namely, the move constructor of p must be elidable and yadda yadda
 
[p] { return *p; } means one and one thing only so far.
 
@R.MartinhoFernandes return p; only meant copy in C++03 and we changed that in C++11.
how is lambda capture any different?
 
Is return std::vector<T>{ t }; any different?
 
3:08 PM
yes.
 
Then I guess we're done.
 
how is a core language construct not different to calling an arbitrary user-defined constructor?
 
@R.MartinhoFernandes I see a lot of blog that use that one, pretty cool... not the ads though
I think I'll go with plain and simple OpenID, then I'll implement it myself. I just need to find the Ruby gem...
 
@Feeds Good, I like Herb's guidelines (but his diatribe on atomic refcount updates is way too long for my taste).
 
Xeo
> Guideline: Don’t pass a smart pointer as a function parameter unless you want to use or manipulate the smart pointer itself, such as to share or transfer ownership.
Sweet
 
3:13 PM
posted on June 05, 2013 by Herb Sutter

What does auto do on variable declarations, exactly? And how should we think about auto? In this GotW, we’ll start taking a look at C++’s oldest new feature.   Problem JG Questions 1. What is the oldest C++11 feature? Explain. 2. What does auto mean when declaring a local variable? Guru Questions 3. In the […]

 
Xeo
> JG Questions 1. What is the oldest C++11 feature?
lol
(Missing Unqualified for the non-protect stuff)
Btw, what does the "JG" stand for? "Junior Guru"?
 
Something like that.
 
sbi
So. I just had a 70mins meeting with my boss regarding those admins. This thing unnecessarily killed two more working days of mine than it should have. It will be brought up in the appropriate meeting next week, and my boss wants me to appear there and tell my story before one manager of the executive board. The aim isn't to punish that guy, but to find and solve the underlying problem.
Well, I think I could live with that. :)
 
@Xeo Sounds fun, but starting to look like "just write the goddamn function object".
 
Xeo
3:25 PM
haha
It'd be more verbose, though!
What with getting noexcept, constness and everything right..
 
Fuck noexcept.
 
Xeo
heh
 
I am not propagating that crap all the time.
Only for swap.
 
Xeo
C++ needs introspectable cv: void mem() cv(cv(some_memcall))
 
It's not like it's super useful outside of swap and move ctors.
 
sbi
3:26 PM
@Xeo I seem to remember Bjarne saying (during his talk at the ACCU conference) that one of the features C++14 will introduce is "the oldest C++ feature", since he had already considered it in the early 80s, when it was still mostly just him who decided what C++ would look like.
 
Xeo
But really, if we can have decltype(auto), how about noexcept(auto)?
 
@sbi What is it?
 
Xeo
@sbi Yeah, I know about it.
@R.MartinhoFernandes auto.
Wait, C++14?
 
sbi
@R.MartinhoFernandes That's the problem. I forgot. :-/
 
Xeo
3:27 PM
@R.MartinhoFernandes I like how you had the manual | bar there for a second
Hm. What would you call const (from Haskell) in C++? always?
 
@Xeo I was contemplating to show an image of a screaming man when Ctrl-S was pressed.
 
Xeo
lol
 
But it wasn't popular.
 
Xeo
That'd be bad
Because I keep pressing ctrl-S all the damn time
Just by reflex
 
That would make it funny.
 
Xeo
3:34 PM
After writing any line of code
 
@Xeo Hmm, not bad.
 
You'd become afraid to use Ctrl-S even in other applications.
 
Xeo
lol
 
@Xeo There's not much reason why, except that nobody came out and proposed it. Plus, the whole "separate compilation" thing makes the value of inference in C++ minimal in many cases.
 
@Xeo I have abandoned that habit by using vim. Now that means I can get screwed by crappy software, i.e., most of it.
 
Xeo
3:37 PM
@DeadMG :|
"minimal"
Seriously?
 
No one gives a fuck about noexcept.
 
Xeo
Just declare everything noexcept, problem solved.
 
let me put it this way
 
Everyone wants lambdas instead.
(Do we have noexcept lambdas? We should!)
 
what would I do if all my functions in the Wide compiler were inferred noexcept?
nothing
 
Xeo
3:38 PM
My lifting-lambdas will be perfect-ALL-the-things
 
not only can most or all of them throw, but to actually infer it, the compiler needs the body and that's in another TU.
so what value does it have to me if the compiler can infer noexcept?
the lack of enforced noexcept move construction in some parts of the stdlib and such things also means that pretty much nothing, ever, will have noexcept
 
@R.MartinhoFernandes We have them already
 
@R.MartinhoFernandes Why shouldn't a lambda's operator() be just as noexcept as a function with the same signature and body?
 
Dunno. I wasn't trying to make sense.
 
user142019
fcuk
 
Ell
3:43 PM
Woo, minecraft observatory finished!
 
user142019
GCC y u no char32_t.
 
I guess I just don't use lambdas as much as some other people.
And captures even less often.
$ cd ~/dev/ogonek
$ grep "[^r]\[.*\](" include -R | wc -l
10
$ grep "[^r]\[](" include -R | wc -l
8
$
 
Xeo
heh
 
user142019
Hmm.
 
Xeo
What about [.*?]{ form?
 
user142019
3:45 PM
GCC's C11 status page says it supports Unicode strings since GCC 4.7 but I get an error when I'm trying to use one.
 
user142019
U"foo"
 
They support it for C++11, so I would expect it for C11 to come free.
 
user142019
Oh wait, huh.
 
user142019
Oh fuck, it does support them. These diagnostics are confusing.
 
user142019
3:48 PM
It doesn't seem to support char32_t.
 
user142019
Maybe I should include <uchar.h> but I don't have that header. :D
 
WTF? "warning: command line option '-std=c11' is valid for C/ObjC but not for C++ [enabled by default]"
@rightfold <uchar.h> is a known missing feature. I wonder if it is on 4.8.1.
 
user142019
@R.MartinhoFernandes mv main.cpp main.c && …
 
Xeo
 
user142019
 
user142019
But yeah that requires <uchar.h>.
 
user142019
char32_t is a typedef, but I don't know for what in GCC. Time to find out!
 
Hmm, time to unmask 4.8.1
> emerge: there are no ebuilds to satisfy "=gcc-4.8.1".
Wut.
 
user142019
> <stdin>:97795:9: error: initialization from incompatible pointer type
 
user142019
3:54 PM
Can I tell GCC to show me which type it expected?
 
Oops, need to emerge --sync first. Yay, installing.
 
Xeo
struct{}_ = stuff?
 
user142019
struct{int x;}_ = U"foo";
// <stdin>:75:7: error: invalid initializer
 
Xeo
lol
 
love GCC error messages :P
 
Xeo
3:57 PM
> main.cpp:2:23: error: conversion from 'const char32_t [4]' to non-scalar type 'main()::<anonymous struct>' requested
I wonder why g++ shows a nicer error
 
Because no one gives a fuck about C.
8
 
Xeo
heh, true
 
user142019
Maybe if I use + operator.
 
Xeo
lol
 
user142019
> <stdin>:82:25: error: invalid operands to binary + (have 'unsigned int *' and 'struct osl_ucd_entry')
 
user142019
3:59 PM
So it uses unsigned int. :v
 
What did you expect?
No one gives a fuck about types in C.
Everything is a number or a pointer.
Except NaN.
 
Xeo
Is there also NaP?
 
I believe that Unicode characters were supposed to be distinct character types, like in C++.
 
Xeo
@DeadMG As if that would matter for C in any way.
 
@Xeo _Generic.
 
4:00 PM
@Xeo Er....
 
user142019
Hurray a syntax error.
 
no, wait, I misread what you just said.
 
:9827448 He meant that there is no overloading in C.
 
Xeo
@R.MartinhoFernandes hm
 
user142019
Yay it compiles. :D
 
4:01 PM
Turns out there is, though. And even if not, semantic distinctions are still useful, but no one ever cared for that in C.
 
Xeo
@rightfold s/D/C/
 
(isdigit(int) anyone?)
 
Xeo
lol
 
@rightfold What did you do?
 
user142019
typedef unsigned int char32_t;
 
4:08 PM
I have written too much code without tests.
 
@R.MartinhoFernandes Been considering not adding any character types at all to Wide.
 
I feel uneasy.
@DeadMG So u32 would make the basic unit of text?
Not even a rune type?
 
I feel more like that the idea of a "basic unit of text" is a bad one.
"text" and "basic" aren't things I'd put together
I mean, arguably, I could have a 21bit codepoint type, rather than using uint32
 
How would I go about, say, HTML-entitfying a string?
 
depends on the context, but a regex might be the right move (I don't actually know much about HTML entities and what context they require)
 
4:12 PM
Ok, time to compile this crap. youtube.com/watch?v=impxSqA5S2Q
 
I mean, I'd presumably have to offer codepoint iteration
 
@DeadMG Erm, what's the unit that regices match against?
 
er, I am sure as hell not gonna have those crappy "match codeunits" regex
 
speaking of which, I'm not actually sure of all of the support that entails Level 1 regex support for Unicode
 
4:15 PM
Right, that's my point. One way or another, "being made out of code points" will leak out the interface.
 
@R.MartinhoFernandes Yeah. But I intend to discourage people from using it where possible.
 
@DeadMG Little else beyond "thou shalt not leaketh thine enkodinge"
 
I mean, you need it to implement algorithms, which I get.
it's more of an unfortunate implementation detail of string algorithms
 
\X (match grapheme cluster) is a L2 feature that is quite interesting to have too.
 
so when you guys have finished discussing Unicode, I can come and have a normal conversation again.
 
user1182183
4:22 PM
Unicode, again? Didn't this room discuss it thousands of times? ;o
 
user1182183
I'm wondering if there is an opengl library for a Windows 7-like GUI and stuff
 
@DeadMG It's a simple substitution process: replace U+nnnnnn with the string &#xnnnnnn. Using regexes would be a bit impractical because they would be ginormous when the function is basically, concat("&#x", to_hex(cp)).
 
Hi @ScottW! :)
 
@Xeo I think I'll make a Inheritable alias. template <typename T> using Inheritable = If<std::is_final<T>, unfinal_needs_a_better_name<T>, T>;.
 
@R.MartinhoFernandes Would people mind not flagging that? kthanx
 
4:32 PM
lol
 
Oh gawd, who flagged that?
 
Either someone that really likes C, or someone that has a pavlovian reaction to certain sequences of four letters, like "fuck", "cunt", "piss", "crap", "shit", etc.
 
Sam
Anyone know if it's possible to change the FSB speed?
 
Yes. Buy a new one.
 
Sam
lol. im making a program that need's to be able to change the FSB speed.
not tell people to go out and but a new one...
 
4:37 PM
The use of the word "need" in that sentence is worrisome.
 
The fact that you need to write a program to do that is worrisome
 
Most programs cannot even feel their legs the FSB.
 
surely there's tools already out there that do this stuff
 
Sam
course there are, but im trying to write my own.
 
also FSB's are old now, they've been replaced with more modern HyperTransport or Intel QuickPath Interconnect in modern CPU's
 
Sam
4:40 PM
umm, sounds like my app is already outdated, and it's not even finished.lol
 
Why do you want to change the FSB
 
overclocking or something, I guess
 
Sam
yep
 
I would say you'd need an API provided by either the CPU manufacturer (so your CPU's instruction set) or by the mobo manufacturer
I think those would be your best bets
 
Sam
4:42 PM
alright, thanks, i'll look in to it.
 
lol, in GCC (following a proposed defect resolution) '\u00E9' is an int with value 0xC3A9.
 
user1182183
lol <GL/gl.h> is standart in MSVC?
 
user1182183
didn't download anything and my hello world compiles
 
It's part of WinSDK
 
user1182183
oh nice
 
4:44 PM
It's also close to useless.
 
user1182183
why?
 
user1182183
and if so, any recommendations? FreeGlut?
 
Because it's outdated as hell.
FreeGlut is not a replacement for gl.h
 
oh you guys are talking to someone I plonked, apparently
 
user1182183
so what can I use to use up to date opengl stuff? :0
 
user1182183
:D
 
@TonyTheLion lol
 
user1182183
@TonyTheLion ME? O_O
 
user1182183
:(
 
user1182183
yep me apparently...
 
4:50 PM
Oh wait. Can't write unfinal in an interface-agnostic manner.
 
@Borgleader ohai
 
C++ sucks.
 
I'm glad you realize
 
user1182183
he shouldchange his name to TonyThePlonker.
 
My mission here is done
 
4:51 PM
I should go outside, its beautiful weather
@CatPlusPlus Awww.
 
@CatPlusPlus What did you do?
 
@TonyTheLion I'm glad I'm inside, it's warm outside
 
@melak47 you suck
 
22° C is perfectly fine. more than that is just ughhhh
 
4:52 PM
ye
 
@TonyTheLion <3
 
I still haven't bought summer clothes.
 
in other news, I'm indecisive about going outside
 
No dont
 
@TonyTheLion don't! it's dangerous out there
 
4:53 PM
@R.MartinhoFernandes just don't put a jumper on
 
there's evil UV and cosmic rays!
 
@melak47 oh you! You need to go out more
 
user142019
lol 15MB C file.
 
@rightfold have fun with that
 
4:54 PM
I was parsing CSV files in Python today
 
user142019
Takes several seconds to compile.
 
at least it was less painful than in C++
 
I go outside almost every other day, isn't that enough? ._.
 
user142019
@TonyTheLion Pretty trivial.
 
user142019
Python has CSV parser in the standard library.
 
4:55 PM
indeed
this is what I used
@Borgleader <3
 
user142019
I wonder how big this is when compiled.
 
Where is the Loungesexual? (@ScottW)
 
-1
A: C++ Pointer: changing the contents without changing the address?

JavaNewbMyCustomObject *object = new MyCustomObject(); *object = &(new MyCustomObject()); .//this doesnt work?

 
oh gawd
that made me sick
 
5:00 PM
0
Q: Trying to make a simple CRC8 function in C

LF4I'm trying to make a CRC8 function but my code isn't correct for my logic I wrote. I was wondering if anyone could help give me some direction on what I'm messing up. Diagram of my CRC8: My pseudocode for the logic Loop for each bit in data stream Define next states for each bit Next ...

not sure if we should close this?
he doesn't specifically say what is wrong with what code.
 
REJOICE
THE DAY IS ALMOST OVER
PRAISE THE MOON
 
Speak for yourself its 1pm here
 
@TonyTheLion Meh - 'It is going to be really hard work debugging this, so please do it for me, I can't be bothered with the hassle'.
 
@Borgleader HAHA INFERIOR TIMEZONE INHABITANT
 
@MartinJames nice analogy :)
 
5:14 PM
10 am here :(
 
> The pointer IS the object, so if you do new Object() you create a new one, but the functions with the prevoius pointer will not see it.
ugh
 
@LightnessRacesinOrbit I don't understand the OP question either. The only time I can think of, off-hand, where I would reload/reseat a pointer like this is if I have queued off the previous value in the line above.
 
@MartinJames The OP just wants to replace the object, and have all existing pointers to the original object now point to the new object.
He probably doesn't need to replace the object.
Also, he probably shouldn't be storing pointers.
 
@LightnessRacesinOrbit Well, that's just fine as long as the number of existing pointers is exactly one :)
 
@MartinJames Quite.
Well...
void foo(int* ptr) { store_this_somewhere(ptr); }
int main() { int* ptr = new int(5); foo(ptr); ptr = new int(6); }
so, not necessarily
the answer is, of course, not to do ptr = new int(6)
 
5:30 PM
@LightnessRacesinOrbit lol
 
You have infinite recursion.
 
Infinite recursion caused by instantiation? Or infinite inlining attempt?
 
user142019
Eww trailing semicolon in macro definition.
 
user142019
Eww macro.
 
5:43 PM
@StackedCrooked Former. The recursion diverges from the base case.
 
Ell
Has anyone here written a web app before? as in, lot's of client side javascript?
 
I have, unfortunately.
 
Ell
or coffee iced tea script or whatevs
 
You could also talk in the JS room.
 
Ell
I will, good idea
 
user142019
5:44 PM
@Ell IcedCoffeeScript :P
 
Ell
I was close :P
 
@rightfold WTF is that? A wrapper around CoffeeScript?
 
user142019
CoffeeScript with await and defer.
 
user142019
So you don't have millions of indentation levels anymore in Node.js.
 
user142019
Or jQuery.
 
user142019
5:47 PM
await $.getJSON url, defer json
foo json
# instead of
$.getJSON url, (json) ->
    foo json
 
Does the await/defer handle exceptions correctly?
Ex. If "foo" throws an exception, and there exists a try/catch around getJson, will that try/catch get the exception?
 
@Nican it's possible to implement correct exception handling with domains. @rightfold We're talking about IcedCoffeeScript? Do you have production experience with it? I always wanted to try it out.
 
user142019
@Nican Yes.
 
lol, production experience.
 
user142019
@BenjaminGruenbaum I don't have much production experience at all.
 
user142019
5:50 PM
Like, some PHP and JavaScript and that's about it.
 
user142019
And with "some" I really mean some.
 
IcedCoffeeeScript is a real thing?
 
Ell
Yeah
 
user142019
No, I've made it up and I'm talking bullshit.
 
@rightfold I really like the concept of async/await , I use it all the time in my C# code. It'll be possible in the language level when ES6 kicks in and we get real co-routines, not just subroutines with closures.
 
5:51 PM
@CatPlusPlus As a Cat yes, you like the night.
 
Shitty name.
 
@ScottW Have fun <3
I went outside bitches, it was nice.
2
 

« first day (963 days earlier)      last day (4003 days later) »