« first day (1376 days earlier)      last day (3579 days later) » 

6:20 AM
 
Xeo
What was this discussion about maybe_delete about?
 
I was thinking of using it for optional ownership
But everyone was like "use a variant"
so I ended up doing neither
 
Xeo
lol
I only advertise maybe_delete for keys in a map/set
 
I needed to store a pointer to an l-value or if one isn't provided a new'd up resource.
 
@Rapptz Why not move the l-value resource then, have a variant of the l-value and the pointer.
 
6:32 AM
I already said no variants
 
Different from the owning/non-owning pointer variant.
 
I can't "move" the resource
 
6:44 AM
0
A: Why a string which contains '\0' and '\t' can't use operator == to compare with "\0\t"?

user3397844you need banalization on s+='\t', banalization (in this case) means that you need a second backslash '\' . you should write s+='\\t'. '\t' means tabulation if u want to that this backslash lost its effect u must add another baackslash.

banalization!
I have never seen that word used on SO.
Pretty cool.
 
user3010322
So.
 
user3010322
Uh.
 
user3010322
std::conditional doesn't, uh
 
user3010322
do SFINAE and stuff.
 
user3010322
So I'm stuck. ._.
 
6:52 AM
huh
 
On its own, no.
 
user3010322
std::conditional<meow::value, some_trait<T>, does_not_exist_for_certain_types<T>>
 
user3010322
@Rapptz Wrapping it up in usings gives you lazy evaluation?
 
user3010322
That's... incredibly stupid. Why doesn't it just do that up front...? Oh, whatever.
 
user3010322
6:59 AM
@Rapptz That actually doesn't work. :c
 
your traits* don't do SFINAE and stuff then
blaming the wrong guy bud.
 
user3010322
:c
 
user3010322
Game is hard.
 
user1804599
7:18 AM
GUIS
 
user1804599
I was thinking.
 
stop it!
 
user1804599
I wish instances were first-class values in Haskell.
 
Xeo
@ThePhD LazyIf
@ThePhD Because it's generally more useful
You can implement the lazy version on top of it by wrapping the arguments with a simple identity wrapper and >::type::type at the end
template<class C, class T, class F>
using LazyIf = typename std::conditional<C::value, identity<T>, identity<F>>::type::type;
 
7:39 AM
Onice I didn't know that
 
Xeo
7:58 AM
> Other minor things voted into C++17 include:

auto var{expr}; is now valid and equivalent to T var{expr}; (where T is the deduced type)
wait, what?
OH COME ON GUYS
> A template template parameter can now be written as template <...> typename Name in addition to template <...> class Name, to mirror the way a type template parameter can be written as typename Name in addition to class Name
 
whaaaat
abandon ship
 
user1804599
@Xeo Nice.
 
user1804599
Consistency is good.
 
@Xeo Buffalo buffalo Buffalo buffalo Buffalo buffalo
 
@Xeo ...?
How in the name of God does that work?
 
8:10 AM
@Xeo Nothing specific on auto var = { expr };? Still std::initializer_list?
 
@Xeo link?
trigraphs were removed lol
Whoa.
Fixed size parameter types.
I've like, never needed this lol
 
user1804599
Add named goddamn arguments.
 
@Rapptz IIRC it also includes variadics with the same type. I'm not sure I've read it correctly though.
 
@MarkGarcia No.
 
Too bad. :(
 
user1804599
@Rapptz Named template arguments as well.
 
I can't think of a single use case for that
 
user1804599
Overriding only one of the defaults.
 
> As a result, the Array Extensions TS is completely stalled: ARBs themselves are ready, but we don’t want them without a library wrapper, and no proposal for a library wrapper (or mechanism that would enable one to be written) has consensus. This means that the status quo of not being able to use VLAs in C++ (unless a vendor enables C-stle VLAs in C++ as an extension) will remain for now.
please stay this way permanently
 
8:22 AM
morning, fucks
 
user1804599
I like vla.
 
toxic salivla
 
user1804599
toxic vulva
 
vlad
 
user1804599
@MarkGarcia VLA from C
 
user1804599
8:24 AM
Vlad for mod!
3
 
no
I'd rather have the "smelly, shitty asshole".
 
he's not H2CO3 anymore
 
Vlad should annex the Lounge.
 
he's using his real name on Twitter
 
@BartekBanachewicz has done for as long as I've had him on Twitter
i.e. some time before the ill-fated election run
 
8:26 AM
oic
 
> The absolute limitation on TCP packet size is 64K (65535 bytes)
I wasted a day and a half because of this
 
You wasted a day and a half because you lack basic networking knowledge?
 
yes
 
user1804599
Why are you dealing with low-level crap like TCP?
 
8:27 AM
here we go
 
I had no idea why the shit I was sending and receiving wasn't identical
sending less bytes than that in one go solved the issue
 
"it's 2014; you don't need to mess around with TCP; just use Haskell IO libraries; no matter what your application is or does"
 
@rightfold I don't
 
leadership ... herd of sheep ... I never thought of the connection, maybe it used to be ... leadersheep?
 
I'm actually using boost's asio
 
8:28 AM
@AlexM. ehm, sounds like your read loop isn't a loop
it's obvious that you can send more than 64K via TCP in the main
 
@LightnessRacesinOrbit getting on a level lower than necessary is dumb
 
@AlexM. I wonder why Boost.Asio doesn't split them.
 
@BartekBanachewicz my point is that knowledge of TCP's mechanisms is often quite relevant to our job
 
you seldom need to send "raw bytes"
 
I was doing async_read to read the exact # of bytes I sent
 
8:29 AM
@BartekBanachewicz I have to debug comms at that layer rather frequently in my world
@BartekBanachewicz doesn't mean I'm hand-crafting TCP packets
 
well if your job centers around that, sure.
 
and yes, in the handler, it was the # amount of bytes I sent
 
just pointing out there's a lot of low-level knowledge
you can't possibly learn it all
 
user1804599
@AlexM. does that function write like, raw packets?
 
but for some reason after the 65530th byte the data differed
 
8:30 AM
speak for yourself
@AlexM. that's kinda weird
 
user1804599
Because you know, there are APIs that split data into packets.
 
@rightfold it reads, it doesn't write
 
user1804599
Same principle.
 
@AlexM. it's obviously not supposed to do that regardless of the max packet size
 
I just followed boost's tutorial :(
 
8:30 AM
time to break out Wireshark
see this is what I'm talking about
 
@AlexM. Off-by-N error?
 
@AlexM.: It's more likely you have a bug somewhere; your OS should abstract away segmented packets
 
bought some caving ... rock climbing/abseiling gears to be more exact, ready to immerse myself into the darkness this weekend!
 
user1804599
@LightnessRacesinOrbit What? I'm just asking a question.
 
user1804599
If he has to do it then he has to do it.
 
8:32 AM
(otherwise reading 30MB of data, which is by no means unusual, wouldn't work)
@rightfold just pre-empting Lounge stupidity ;p
and as I said before, knowing how TCP works and debugging network comms is not the same as hand-crafting TCP packets; you can require the former (and often do) without needing to know how to do the latter (which I wouldn't, offhand)
 
@MarkGarcia why doesn't it occur on smaller amounts of data then?
all I changed was the constant saying how many bytes are sent/received
the logic behind the assertions is the same
 
Off-topic: provide a minimal [not] working example in the question itself
 
user1804599
Send one byte per packet.
 
lol
 
i'm tellin' ya; this is not inherent to TCP unless you're doing something mad (like hand-crafting and doing so wrongly)
well, not inherent to TCP/IP
if you're doing UDP then I think we're talking about other possibilities (as it's stateless)
 
8:38 AM
it's tcp/ip
 
@rightfold
 
user1804599
@BartekBanachewicz
 
@rightfold about automatic JSON serialization
do? don't? why?
(deriving Generic)
 
user1804599
For what?
 
data Base = Base { position :: Point,
                   visionRange :: Double
                 }
            deriving (Generic, Show)
instance ToJSON Base where
    toJSON = genericToJSON defaultOptions
@rightfold I wrote this yesterday.
 
8:41 AM
yeah it's probably a bug on my side, failed again
 
@BartekBanachewicz well well kudos for avoiding the "retarded" label for a minute :|
 
user1804599
ideone.com/XqzxSB It's Perl!
 
@sehe "retarded" applies mostly to design :P
 
user1804599
@BartekBanachewicz I don't know what Generic is.
 
@rightfold no it's not
@rightfold Neither do I
 
user1804599
 
why cryptography now
anyway could I use TH to automate instance generation?
 
user1804599
I don't know.
 
makeGenericToJSON ''Base would be cool
 
user1804599
You can do that.
 
user1804599
And it should not be too difficult.
 
user1804599
8:45 AM
But I can imagine you want transient fields or custom computed fields.
 
> Please keep in mind that this is my first semester of C++. source
 
so, I imagine nvidia does not publish .pdb files for their drivers, right?
 
.pdb implies source code
go figure.
 
user1804599
I'm not a fan of automatically generating serialization code.
 
@rightfold reasonable-by-default-customizable-when-needed
 
user1804599
8:47 AM
What you can do is something like a schema so you could say baseSchema = makeSchema ["position" ~~ position, "vision_range" ~~ visionRange] where position and visionRange are lenses.
 
Interestingly, by reposting that comment, the answer predates it by 16 hours :). If you want seconds optional, make it e.g. time_ = _2digit >> ":" >> _2digit >> (":" >> _2digit | attr(0u)); (which takes 00 for seconds if unspecified) — sehe 10 secs ago
lol
 
user1804599
But I think you still need TH for that for it to work well.
 
the point is I need two serialization schemes
 
@BartekBanachewicz how?!
 
@sehe I was under impression .pdb contains full source code.
from SQL -> Haskell -> to JSON
 
8:49 AM
@BartekBanachewicz well. go figure :|
 
user1804599
The Go figure is a gopher.
 
3 mins ago, by Bartek Banachewicz
go figure.
 
@sehe dang it.
 
yesterday, by Bartek Banachewicz
We're all a bunch of ignoramuses as it seems.
 
user1804599
I like how Go does JSON serialisation and deserialisation.
 
user1804599
8:50 AM
But you cannot do something like it in Haskell.
 
> A symbol file also contains the original location of the source files, and optionally, the location of a source server where the source files can be retrieved from.
@rightfold why?
@sehe this is gonna be a popular citation of mine I suppose
 
user1804599
@BartekBanachewicz because Haskell has no field tags.
 
@BartekBanachewicz it doesn't. It just contains mappings between instruction addresses and function names + offsets
 
user1804599
You can say type User struct { Name string `json:"user_name"`; Age int `json:"user_age"` } and it will map between Name and user_name and Age and user_age when converting to and from JSON.
 
user1804599
Same goes for XML and some other stuff.
 
8:54 AM
mhm
 
user1804599
But then again this is possible with TH.
 
wel in haskell it makes more sense to do it from the outside
 
So it does "leak" information about function names etc., which is probably "bad" enough for nvidia, but it doesn't contain any actual source code
 
user1804599
As long as you don't always assume and require that record field names are the same as JSON field names.
 
user1804599
Because that would be utterly inflexible.
 
8:55 AM
@sehe lolling at ... yourself?
 
@jalf DLLs and stuff do that too.
 
@MarkGarcia only for the symbols that are actually exported though.
 
-1
Q: call a php page to a php page (PHP)

user3867931I need to know how I can call and run a php page to another php page. I also need to pass parameters too. I tried with include (), but the server says "401 Unauthorized" and exec () does not work ..! how can I do?

 
user1804599
> (PHP)
 
user1804599
lol
 
8:58 AM
lol
 
@LightnessRacesinOrbit Probably trying to include facebook's php files.
 
@rightfold ... what is that?
 
@rightfold y'know, just in case you weren't sure what language he was talking about
 
user1804599
@thecoshman It is a data type.
 
@MarkGarcia lul
 
8:58 AM
@rightfold Go?
 
user1804599
Why do you use while instead of for? And even more important why do you not use std::upper_bound? And what does "guessing the size is sorted" mean? — rightfold 1 min ago
 
0
Q: Run a C++ code on Tizen OS

NidhaRecently I've known about Tizen. As available programming languages for Tizen are HTML5, C and C++, does that mean we can write program in C++ in Tizen or else we have to do something else. If then how can I run a C++ code on Tizen.

 
user1804599
@thecoshman Yes! :3
 
@rightfold it's odd... but nice... I presume if you don't json serialization, you can spare that crap
 
user1804599
Of course you can. :v
 
user1804599
9:00 AM
Backticks are just raw string literals. You can add any string tag you want to a struct field.
 
user1804599
I'm not sure whether I like it but for this kind of things it works fine.
 
Yeah, fairly sure you will be programming in C++ or something else. — thecoshman 17 secs ago
 
> Tizen is the open-source operating system for all device areas.
> Mobile Wearable In-Vehicle Infotainment TV

ALL DEVICES!
 
@thecoshman Logic
 
Ok, chat, I give up.
 
9:01 AM
@ParkYoung-Bae vOv I doubt my technically correct answer would get accepted
 
Someone did answer the obvious, though
Hah nice @jalf
 
TIL: apparently if you fiddle with the settings on medical image viewing software without really understanding them, you can turn a simple xray into some kind of horrifying fluorescent tentacly space monster
 
@LightnessRacesinOrbit at the comment. At the fact that I answered his comment before he even noticed and (almost immediately) removed his comment.
 
@Mysticial looks ok?
oh, hang on
 
Have to scroll down lol
 
He got into a rollback war with... himself?
 
yeah...
@jalf Hmm.. weird.
I don't think I've seen anything look tentacly.
The only fluorescent images that I know of are CT Scans and Neuroimaging.
 
@Rapptz like I said, it requires you to fiddle a bit with the rendering settings :)
 
9:26 AM
@LightnessRacesinOrbit Must be whoring some badge or something.
 
I don't know of a badge regarding edits?
 
there are a few
 
Oh I found them.
It's been so long.
I forgot I had these.
 
9:40 AM
I wrote a comment on his post, lying that there is no badge for him for that behaviour
 
@LightnessRacesinOrbit flag+ban=no badge
 
user1804599
@rightfold It is already there — Sajeetharan 57 secs ago
 
user1804599
Ugh. No, it isn't.
 
he edited the comment
 
Just received Amazon refund with reason: Export fee reduced. That's nice.
 
9:47 AM
what are the chances of named arguments in C++1z?
 
0.04%
 
AFAIK there are no papers working towards that goal.
 
lol Y U so funny?
 
so highly unlikely.
plus you've gotta add in the Committee Idiot Factor
 
2 hours ago, by Rapptz
@rightfold http://ehsan.github.io/namedargs/namedargs.html
 
9:48 AM
it's like the Bus Factor except instead of being hit by a bus, they turn into total morons.
 
@rubenvb Probably 50%.
Committee seems to be moving pretty fast/sanely.
 
user1804599
because I want to use checkPoint method inside time parameter using his crono istance — diegoo 38 secs ago
 
@rubenvb No N-number, no consideration of lots of things like named packs, named varags, names for arguments in the Standard library, forwarding named arguments, no existing implementation/consideration of implementation difficulties
 
user1804599
Ugh wtf is it with all these confusing people today?
 
@Puppy He already got that advice informally from knowing people on the committee and is editing it accordingly.
 
9:51 AM
that doesn't mean he will succeed by any means.
 
Yeah, we get it.
You like being negative
At least he's trying
 
@Puppy named packs and varargs could just be not-nameable, names for arguments in the Standard library are already defined in the current Standard where applicable, what do you mean by forwarding named args? That works like any other argument I suppose.
Implementation difficulty... well, seriously, we have variadic templates.
How much harder can it get?
 
@rubenvb No, the names for arguments are not defined...
 
@R.MartinhoFernandes I'm looking at the Standard now, and most (if not all) functions have named arguments in the declarations shown.
 
they're not forced to use them
or even recommended really
 
9:54 AM
Right. Sure.
 
@rubenvb The argument names are not defined at all.
they're non-observable and the given names are exposition only.
 
> most significantly: parameter names becoming part of a library’s interface that library authors then have to be careful not to break
 
Well then, they become more than exposition.
 
he listed that as the biggest issue he received
which is a valid reason obviously
 
Yep, it is.
Same thing happened in C#.
 
9:56 AM
I would rather have a subset of named parameters, so to speak.
like **kwargs from python :v
 
python's kwargs are pretty nice but they only really work because Python is super-dynamic.
you couldn't make that system work in C++.
 
kwargs is kind of crazy.
For it to be in C++ land anyways
 
Yeah. I guess.
It could be a library feature I suppose.
Like a saner Boost.Parameter
or w/e it's called
 
@AlexM. Make a proper read loop and look at the number of bytes read.
 
The platform ABI thingie should consider patented techniques that might hinder competing implementations of implementing the ABI.
 
9:59 AM
the platform ABI thing doesn't have a chance in hell of passing.
 
I don't quite get how it would improve things at all.
Different library, different ABI. You're screwed. Deal with it.
 

« first day (1376 days earlier)      last day (3579 days later) »