« first day (1044 days earlier)      last day (3907 days later) » 

4:00 PM
Heyoo :)
 
@Borgleader I stand by my reply.
 
OP was lazy. It's not hard to look up the operator.
 
@Borgleader Exactly. I point out how easy it is for every operator question.
And questions where they could just pull up a reference on the function of focus.
It really is a minimal understanding cv question imo.
Minimal understanding of effort at least.
 
I VTCed early on, hoping to stop the onset of infinite downvotes.
 
Well, honestly, I get pretty annoyed by any "I want to make money programming, but I want all the answers just given to me" questions.
I find it funny how you write template...class, but they're called class templates.
Tbh, I remember because I look up vector and stuff in the standard by searching for "class template blah"
 
4:11 PM
@R.MartinhoFernandes: oh hi
 
cant find a proper dupe for this also the first answer is wrong imo
 
Xeo
Hi.
Twilight Imperium was fun.
 
@chris That's why the phrase "template class" is often used to describe them and effectively synonymous.
 
Xeo
Only took 11h
 
4:13 PM
@R.MartinhoFernandes I was thinking about a language feature for Wide, where instead of checking just the function signature, I would also check the function body when choosing whether or not to reject an overload.
 
And check what?
 
mostly that the type meets the relevant requirements.
so if you had f(t) { return t.foo; } f(t) { return null; } then if the argument has no foo member, the first is eliminated.
so it's kinda like concepts, but the concepts are built for you automatically.
 
Waiiit, so your things work similar to C++?
 
@R.MartinhoFernandes What things?
 
Templatey things.
 
4:14 PM
well, not really.
I know that I wanted to have some kind of constraints thing and SFINAE sucks.
 
Like, f(t) { return t.foo; } by itself compiles fine.
 
oh
then yes, of course it compiles fine.
hell, I never analyze the body at all unless the function is called.
 
Oh, so it's more like MSVC then :S
 
well, not really.
because in C++ you have two-phase lookup versus normal lookup.
whereas in Wide it's just normal lookup.
 
0
Q: Why does gallery not load after it has no hits for a while?

JABFreewareI have a gallery that uses an xml file to link to all the images etc. The images are dropbox public links. The site does not have a lot of traffic. No one has loaded the page in a while, since I performed the work on it. I just went there and gallery would not load. At first thought I thought d...

 
Xeo
4:16 PM
aka MSVC
 
but arguably, yes you could do something like f(t) { 5[5]; return t.foo; } and if you never called it, it would be valid.
 
Xeo
And f(t){ { }? Or does it atleast have to be brace-matched?
 
it has to be a valid parse.
 
I think two-phase lookup is a good thing (in C++). Ideally it would not be needed, because errors would be found with one lookup (i.e. not MSVC style).
 
@DeadMG And 5[5]; is an error normally, right?
 
4:19 PM
the main difference between Wide and C++ is that the Wide parser needs way less semantic context to make a parse
@chris Yep.
that's actually a bit of a bad example since I didn't actually implement indexing ... at all ... yet.
 
@DeadMG Maybe a switch to tell it to check everything would be nice if it's easy enough.
 
@chris What's the point of optional checking?
 
so anyway
I haven't done any constraints yet, but I'm seriously thinking about what I want to do in this space right now.
 
@R.MartinhoFernandes Catch errors the first time you compile. Or does the plugin underlining do that well enough?
 
and I was thinking about having something similar to SFINAE, but it includes the function body as well as just the prototype.
so the compiler essentially automatically generates the constraints.
 
4:21 PM
I think something like concepts is better.
 
eh
 
@DeadMG It certainly sounds interesting. I'm not sure how complex it could eventually end up being, though.
 
the main thing I don't like about concepts is that you, the user, have to end up writing a whole bunch of code to tell the compiler what you want.
 
user1804599
> as well as just
 
when in reality, the compiler already knows what you want- you want a thing that isn't going to fail when you use this function on it.
at least in terms of interface constraints.
 
4:22 PM
@DeadMG And in return you get your templates checked for validity without instantiating all possible specialisations.
 
Xeo
@DeadMG Maybe you only accidentally used the function and didn't actually need it? :P
 
Maybe you didn't want to require copy constructibility, but did by accident.
 
@R.MartinhoFernandes Arguably, that would just be an optimization that I could do later if I wanted to.
 
@DeadMG You cannot optimise the user's head.
 
Well guys, i have to tell you of course i know that this ! means "NOT" for BOOLEANS. But what i didn't know is that in case the flag and mask[j] are integers which is accepted in C++ but not in Java. Somebody answered my question Mr Cabe Sechan and i thank him. Even if this is the easiest thing, i didn't expect such answers from some people who i believe that they are in StackOverflow to help in every question they know and not try to be smart. — George Melidis 9 mins ago
 
4:23 PM
You assume the code is correct and deduce from there.
@chris I wish people didn't try so hard to be dumb.
 
@R.MartinhoFernandes What has the user's head got to do with anything? In terms of how many specializations I instantiate, I can reduce that number if I want to.
@R.MartinhoFernandes Well, that I get. But like any other interface, a simple mock would be enough to prove that you meet the intended requirements- instantiate with one move-only type and you will immediately notice that you accidentally required copyability.
 
@DeadMG Concepts do that automatically.
 
@R.MartinhoFernandes There's nothing automatic about concepts.
I have to write out every single requirement myself.
 
And they generate the mocks for you.
With yours you have to write every single mock yourself :S
 
user1804599
Your idea sounds like a nightmare.
 
4:27 PM
it's easier to generate the mocks (or simply use real cases, in the case of most code) than to endlessly describe the requirements to the compiler.
 
user1804599
Maybe if you can explicitly say constraint(auto) or whatever your syntax is and allow explicit constraints in addition.
 
@DeadMG It's... the same amount of easy ("endlessly describe the mocks").
Except one guarantees you didn't forget something.
 
you could forget something in your concept just as easily as in your mock.
 
@DeadMG And instead of not testing something, you get a compiler error.
 
not if your concept describes something that you shouldn't actually have required, like copyability, and your function only actually uses movability.
 
4:30 PM
The only way for your concept to describe that is if you write there: requires Copyable.
 
the only way for your mock to describe that is if you write there T(const T&).
besides
 
@DeadMG You're missing the point that you will have to write requires Movable to get a compilation, but don't have to test with move-only objects to get one with your idea.
 
@R.MartinhoFernandes Right. But I don't have to write requires Movable a thousand million times in my codebase for every single function, ever, that requires a movable object.
 
And you don't have to test every single function ever with move-only objects?
 
no, why would you do that?
if I have two template functions, f and g, and f calls g, then if g requires movable and you call f with an immovable type, then that will fail.
f implicitly has all the requirements of g.
and in addition
I would suggest that in many if not most real systems, the requirements are "What the implementation will accept".
it's only in the case of heavily formally specified stuff like Standard classes that there are other useful requirements
 
Xeo
4:35 PM
@DeadMG f(t){ g(bar(t)); } - still the case? What if bar returns t for one overloads, but not the other?
 
@Xeo What about it? If you instantiate f(t) then I obviously know which overload of bar is going to be called, so I know which overload of g will be called.
 
@DeadMG Well, fuck that way of thinking.
 
Xeo
right, I forgot the lazy checking for a second.
 
That's what we have in C++ right now and it sucks balls.
2
 
@R.MartinhoFernandes Well, it's not really the same thing at all, because if you pass it something the implementation won't accept, not only will you get a shitty error message, but you have no opportunity to provide alternative overloads, say.
 
4:37 PM
Consolation prize.
 
well, concepts are not going to be substantially different to what we have right now.
it's a bit of shitty syntactic sugar over enable_if.
 
Xeo
concept maps... :'(
 
you'd still have to spend eternity describing in detail the interface your functions should take.
 
Maybe not in C++; not the point.
@DeadMG And they do give some more benefits, though: more errors on the first lookup phase, better errors in general.
 
I don't have two-phase lookup, so that's good
 
4:39 PM
You have MSVC-lookup :S
 
eh
if you have a function which has an unconditional error (i.e. regardless of the types of the arguments) you will find out when you call it with any arguments.
if you never call it, then I should probably issue a dead code warning, but I'm not feeling the urgency of erroring on it.
 
@DeadMG It saddens me that you think that's ok :(
 
well, here's the thing, since I don't have a bunch of dead code in my programs, the lack of checking for dead code really isn't a big deal for me
sure, in an ideal world I would fix or remove all dead code, but I have better things to do with my time in most cases
 
user1804599
@DeadMG eww
 
@DeadMG That's about like calling a one-day, out-patient arthroscopic knee operation "syntactic sugar" for "hack off his leg with a chain saw and hope he survives."
 
4:44 PM
@JerryCoffin Eh, I read the concepts lite paper at Bristol, and it's just "Replace std::enable_if with requires and you're pretty much done already."
 
@JerryCoffin Just like in Game of Thrones, but without the chain part.
 
personally, I don't see how they could be any other way, if not like that or what I have suggested.
how are you going to determine the interface requirements for a generic function if I don't either waste my life specifying them manually and the compiler does not infer them from the body of the function?
how can it be anything but manual specification or automatic inference?
 
I can't argue because I don't accept your first assumption.
 
@DeadMG So you haven't quite caught the fact that they tacked "lite" onto the name to signify the fact that it's not complete concepts?
 
@JerryCoffin My memory of the full-blown concepts was little different. If I recall correctly, the reason it was cut was because the amount of concept description it required to specify the stdlib was more than that required to specify the entire of templates.
 
4:47 PM
Or did you just not notice that your previous post only said "concepts', not "concepts lite"?
 
that's hardly a suggestion that full-blown concepts were somehow not going to require the user to specify everything themselves all the time.
@R.MartinhoFernandes Which one?
 
The fact that you have to spend humoungous amounts of time writing requires clauses.
 
@DeadMG Not so -- mostly it was canceled due to disagreement over a couple of points. First and foremost, whether a concept should be automatically inferred for a template if not manually specified. Second, and probably more importantly, over the reverse side: how to specify semantics when asserting that a template did meet a set of requirements.
 
@R.MartinhoFernandes Well, if I have a function f, how can it have a constraint if I don't manually specify it (and you reject automatic inference)?
 
if I do: int a = 2; bool b = !a; I'm assuming theres an int-to-bool conversion in there? (before applying not)
 
4:50 PM
@Borgleader Yep. ~a is bitwise-not.
 
@Borgleader First, he asked how to write it in Java. This works. Second, the ! operator doesn't only work on booleans in C++. In fact the most common use is probably to check for null pointers. Claiming its meant to be used on booleans is pedantic at best, flat out wrong most of the time. — Gabe Sechan 8 mins ago
 
Xeo
@Borgleader Yes, still ew - write it as bool b = (a == 0);
 
So I can safely tell him he's mistaking implicit conversion to bool with "operator ! working on non boolean values" ?
 
@Borgleader No.
consider, say, unique_ptr.
no implicit conversion to bool, operator! supported.
 
Things are usually converted to bool first in one way or another.
 
4:57 PM
or, hell, consider expression templates, where operator! is overloaded as part of the expression template.
 
It has the nice advantage over overloading operator! that you don't have to use !!obj.
@DeadMG Or analog literals!
 
why would you use !!obj
 
@DeadMG Exactly, use explicit operator bool() instead.
But the first doesn't require it to be a bool before operator! does its stuff.
 
Xeo
... what?
You lost me three messages ago.
 
2 mins ago, by chris
Things are usually converted to bool first in one way or another.
Start with that. Overloading operator! doesn't let you do if (obj).
So it's really more common for operator bool to be there, which follows the first comment.
Probably more of a tangent than anything.
 
5:03 PM
I was just emailed the best news ever:
> You have inherited 20.5 million Contact Us cliffordchance@hotmail.co.uk
 
Hello, anyone interested in discussing ranges? I'm shopping around for ideas regarding grouping/chunking functionality (i.e. [a] -> [[a]]).
 
sure
 
Haskell has a generic groupBy :: (a -> a -> Bool) -> [a] -> [[a]]) but the generalized list comprehension extension also provides a groupWith :: (a -> t) -> [a] -> [[a]] mechanism -- i.e. projection + group, AFAICT.
Is something like group_by(project(&some_pair::first), r) grokkable?
 
what does the groupBy do?
 
You get subranges of consecutive runs according to some criterion.
 
5:09 PM
ok
so f(x, y) returns true, it's part of the current range, else, it's part of a new subrange.
 
> groupBy (==) [1, 1, 1, 3, 4, 3, 3, 4]
[[1,1,1],[3],[4],[3,3],[4]]
@DeadMG Yes.
 
@LucDanton Yes.
 
So in my 'is this grokkable' sample the project functionality would be something separate -- a functor transformation.
 
wait, wait.
I get that project(&some_pair::first) is going to return the first of a pair.
but what is group_by going to do with it after that?
 
Xeo
@LucDanton project == std::mem_fn in this case?
 
5:12 PM
No, &some_pair::first is the selector to get the first element. So arguably it is itself the projection, not the result of calling project.
projected_equal(f) == compose_over(ops::equal_to {}, f) == [](auto x, auto y) f(x) == f(y); is a better name perhaps.
 
Bleh, I drank way too much beer.
 
@Xeo No. I'm using the assumption that I'm working with invokables, not callables, so ptm work out of the box.
 
Xeo
mh
 
group(by(&some_pair::first), r)?
group(r) as a convenient default for group(ops::equal_to {}, r)?
 
Xeo
wait, one sec
 
5:16 PM
group(f, r) vs group_by(f_to_be_projected, r)?
 
Xeo
I just remembered my compare_by :D
@LucDanton oooh, it's what Haskell has as on!
 
@Xeo Yes. Mine is compose_over because it's variadic: compose_over(f, g)(a...) == f(g(a)...) vs compose(f, g)(a...) == f(g(a...)).
 
Xeo
mh
 
compose_over meets on in with arity 2 and compose meets (.) with arity 1.
 
user1804599
Man.
 
user1804599
5:22 PM
HTTP is such a shitty protocol.
 
> data Person = Person { name :: String, fooFactor :: Int } deriving Show
> let people = [Person "Xeo" 5, Person "DeadMg" 7, Person "Robot" 7]
people :: [Person]
> groupWith fooFactor people
[[Person {name = "Xeo", fooFactor = 5}],[Person {name = "DeadMg", fooFactor = 7},Person {name = "Robot", fooFactor = 7}]]
it :: [[Person]]
 
great, my highest voted comment on Reddit is about pancakes
4
 
@DeadMG Does that shed some light? (Apologies for the naming -- my hypothetical group_by would be similar to Haskell's groupWith, not groupBy.)
Or maybe it shouldn't be. See the alternatives.
groupWith projFunc list == groupBy ((==) `on` projFunc) list, more or less.
 
@KonradRudolph Is it a rabbit with a pancake on it's head by any chance?
 
5:27 PM
nah, it was about Berliners
 
@not-rightfold Due to being really, really complex?
 
user1804599
@NikiC transfer encodings, connection header, referer (sic), overly complicated clusterfuck.
 
5:51 PM
the spelling mistake is a bit silly, and its lies are silly too (having referrer at all; user agents)
I'd also call it slightly verbose
other than that it's remarkably robust
"Do you have the Foo Factor?"
 
user1804599
Querying RDBMSes with list comprehensions is cool.
 
6:26 PM
Hi all
 
user1804599
Hi you
 
Which of the various range libs by folks here is most like Alexandrescu ranges?
 
Loki?
I don't know whether it even has ranges, but I associate it with the writings of Andrei
 
2
Q: c++11Lambda functions as base class

user2715978Playing around with Lambdas I found an interesting behaviour that I do not fully understand. Supose I have a "struct Overload" that derives from 2 template parameters, and has a "using F1::operator;" clause. Now if I derive from two functors I can only access the operator() of F1 (as I would ex...

 
user1804599
@sehe D ranges!!
 
user1804599
6:38 PM
Tomorrow it's Monday! Excited!
 
lol
 
@sehe loki is sooo 2000, i meant D ranges
 
user1804599
Use D.
 
@zneak The using public inheritance, and the using statement eliminates the name hiding. Didn't know you can inherit lambda's though.
Not sure if my theory is correct though :)
 
@StackedCrooked Course you can. They're just like any other class.
 
6:44 PM
Well, it makes sense, right? They have types in their own rights
 
@DeadMG Didn't know they were classes.
 
user1804599
You cannot inherit from any other class.
 
user1804599
They may be final. :3
 
may, or must?
 
might
 
user1804599
6:45 PM
@zneak a class may be final.
 
I mean, lambdas
 
user1804599
A class doesn't have to be final. That would be extremely silly (although awesome).
 
this guy is inheriting from lambdas at this very moment
ooh I see.
 
this is so real time
 
@not-rightfold's statement was ambiguous to my non-English brain.
 
user1804599
6:46 PM
@StackedCrooked Heb jij veel verstand van performance m.b.t. TCP?
 
niet echt
 
@Borgleader Eh, not really. It's a specific type.
 
@StackedCrooked Yeah, a lambda basically defines a functor. Under the right circumstances, they define a conversion to "pointer to function" as well, so they can be passed where a pointer to function is needed.
 
Something that makes them seem lazy and just in it for the money (or whatever have you) without doing any work at all.
 
user1804599
6:48 PM
Haskell. Always learn Haskell. — not-rightfold 4 secs ago
 
At least this person seems like they know it's going to take work to carry out their project.
 
user1804599
His project will fail.
 
@chris Oh ok, I see the distinction now
 
And the other one (what does ! do) was funny because the way they asked the question made it seem like that when in reality, they already knew what it did, just not when you tried it on an integer.
And I know I've seen that question pop up (maybe more so in C).
I guess another way of looking at it is if they have no interest in learning at all.
 
@TemplateRex @R.MartinhoFernandes's RTL (Range Template Library) was written with an eye on one of Andrei's books. Or at least that's the vibe I get whenever I take a peek at it.
 
6:55 PM
Any idea how to make the glow not look ugly?
Or should I just keep the yellow and no glow?
 
@not-rightfold Awesome :D
 
user1804599
 
user1804599
Still working on it.
 
Erlang syntax looks kinda cool.
 
user1804599
The lack of multiline string literals makes it terrible.
 
user1804599
7:11 PM
JavaCrypt
 
@ScottW They are used by the government.
 
user1804599
Code written by others sucks.
 
user1804599
lol
 
user1804599
query was a keyword in Erlang.
 
user1804599
CHECK (email_address ~ '@') vOv
 
7:18 PM
Is it odd to use a for loop with doubles?
 
Do you hate Skyler White?
 
user1804599
Yes.
 
user1804599
(Who is Skyler White?)
 
I wonder because of this.
Haven't seen the series yet. I just saw it on Hacker News.
 
user1804599
CREATE TABLE item (
    collection_id       integer NOT NULL REFERENCES collections(id) ON DELETE CASCADE,
    key                 bytea NOT NULL,
    value               bytea NOT NULL

    PRIMARY KEY (collection_id, key)
);
 
user1804599
7:20 PM
I wonder whether this is a good idea.
 
user1804599
Although I don't think I really need a surrogate key, and both collection_id and key never change.
 
I wouldn't do that unless I had a good reason.
 
user1804599
Normally I don't use surrogate keys only for join tables.
 
@StackedCrooked no
 
cool
Is seems there is a lot of rage going on against her.
 
user1804599
7:30 PM
Man.
 
user1804599
I can't wait till it's Monday.
 
@StackedCrooked Because she has a pretty negative reaction to the primary content of the show.
so a lot of people see the character as a bit of a killjoy, not fun, etc
 
@ScottW more beer
 
user1804599
I decided to use custom COMPAREANDSWAP HTTP method. POST and PUT don't really work well.
 
user1804599
No resource is ever created nor decorated.
 
7:33 PM
@LucDanton tnx I will study it
 
-3
Q: UVA 336 - A Node Too Far run-time error?

Shimul ChowdhuryI am newbie on UVA and its verdict. Actually i am totally new with this verdict things. Didn't understanding why my solution have a runtime error. I googled about this but not get a good solution. #include <iostream> #include <vector> #include <queue> #define max 100 usin...

 
@StackedCrooked I hate Walt more than Skyler at this point
 
Good thing Feeds exists.
 
k, finally cleaned up the range_operators/range::manipulators nonsense.
 
7:49 PM
lol 12 downvotes in a minute.
Wait, why is @Feeds giving us a -3?
 
@LucDanton twas about time
 
@Rapptz Oh, thanks.
I always feel like I have to uv people after I comment and they fix their answer or whatever with it.
 
auto const l = { 1, 2, 3 }; 'works' but auto const l = { { 1, 2 }, { 3 } }; doesn't?
 
@LucDanton Interesting, I would've expected the second to be a const std::initializer_list<tsd::initializer_list<int>>, although it does sort of seem a bit silly.
 
8:04 PM
@H2CO3: writing high performance code is a bit like being down in the engine room of ship, getting your hands dirty, etc - whereas general coding is like being up on the bridge in your starched and pressed captain's uniform. The engine room doesn't suit everybody, and likewise for the bridge. ;-) — Paul R yesterday
^ powerful analogy. Also, highly sensible discussion with H2CO3
 
Xeo
@LucDanton What nonsense?
 
@Mysticial ^ probably officially requires more votes^ ?
 
@not-rightfold Why?
 
user1804599
@FredOverflow Work! :D
 
@not-rightfold you know. I'm pretty sure you can :/
 
user1804599
8:06 PM
You know. Fuck PostgreSQL.
 
user1804599
Y u no upsert.
 
user1804599
I need to use PL/pgSQL. ;_;
 
@TemplateRex Yup. Wazzamapoint
 
@Xeo Ya know how I have the habit of putting functor versions of things, so I originally wanted to have a range::operators::map to the corresponding range::map. But then I hit a snag where code in namespace range couldn't use e.g. operators::equal_to to refer to annex::operators::equal_to -- the rules for lookup search inside annex::range::operators and stop there. So I introduced an annex::range_operators namespace alongside annex::range.
Kinda stupid, esp. I later introduced one anenx::range::manipulators operators.
The proper fix was to have using annex::operators; inside namespace annex::range::operators. That is, the latter is an extension of the former. If you have using namespace annex::operators; it means 'I want all the functor versions of what's in annex', and using namespace annex::range::operators; now means 'the functor versions of what's in annex and annex::range'.
 
Xeo
I see
 
user1804599
 
On an unrelated note, I'm investigating possibly ADL-related issues. Namespacing sure is 'fun'.
Of course, it was SFINAE-related issues. And I can't tell one from the other because 'issue' means 'compiler ignores the problematic overloads and points to the wrong ones in the wrong namespace' for both ._.
 
@FredOverflow Did you try the exercises?
 
@Borgleader I haven't even looked at them. As I understand it, no coding involved?
 
@sehe Does that mean if I wear my captain's hat I can order the dirty low-level coders on my team to make my code go faster?
 
user1804599
@sehe Nee.
 
user1804599
8:16 PM
Fuck weekend. It's boring.
 
@FredOverflow None, either multiple choice or you enter value sequences or single values.
 
user1804599
It tricks me into writing SQL. Oh wait, I do that at work too.
 
@Borgleader Sounds like a waste of time. I want to write code.
 
I knew checking for specific, non-enumerated colors, including the alpha value, would bite me.
 
Is this supposed to happen? (Semi-rhetorical, fuck lookup rules.)
 
8:26 PM
Does kbd not work in comments?
 
Xeo
@LucDanton IIRC, yes.
 
+1, @sehe unrelated, your profile pic is awesome. So many times I've had days like that. — WhozCraig 7 mins ago
^ lol
 
Xeo
parent-namespaces of ADL-found namespaces aren't considered.
 
@Xeo Is the would-be fix appropriate? (I certainly can't fault it.)
 
Want to see my lightning?
 
Xeo
8:28 PM
@LucDanton Can't think of a better way, really.
 
Plus in this case the inner namespace is a detail namespace.
Heh, bidi range-of-ranges which element is a forward range.
Eh, too complicated to make that work.
Once again a situation where reverse(foo(a..., r)) wouldn't quite be the same as foo(a..., reverse(r)).
 
@Pawnguy7 Is that how you pick up girls?
 
@FredOverflow I don't follow.
 
@LucDanton You could let ADL work for you with this (clever) hack /cc @Xeo coliru.stacked-crooked.com/…
Feel free to s/adl_hook/adl_hack/ :)
 
lol
 
8:38 PM
Gotta hand me .5 points for creativity, right :(
 
.5i you get then.
 
Ah. Delicious imaginary internet points. Now to find the other 9.5i
 
What's so favourable about -10 + 10i? :p
 
Lol. Pedants all around
 
user1804599
@LucDanton you're missing an expression between the question mark and the colon.
 
8:41 PM
thanks a lot ! but it doesn't work : i'm compiling with cl.exe /EHsc main.cpp (Visual C++ windows)... I have this error : main.cpp(6) : error C2061: syntax error : identifier 'int16_t'Jos Bas 10 mins ago
^ I sooooo hate this
@JosBas Really? It wasn't hard to find: <cstdint>sehe 26 secs ago
 
user1804599
@sehe Do you use Oracle database? Does it have upsert?
 
@not-rightfold INSERT OR UPDATE, perhaps (but that's prolly just in the declaration of a trigger)
86
Q: Oracle: how to UPSERT (update or insert into a table?)

Mark HarrisonThe UPSERT operation either updates or inserts a row in a table, depending if the table already has a row that matches the data: if table t has a row exists that has key X: update t set mystuff... where mykey=X else insert into t mystuff... Since Oracle doesn't have a specific UPSERT s...

 
user1804599
Ah, cool.
 
@not-rightfold wow, you are cussing out Haskell? I didn't think I'd ever see that...
 
user1804599
I can't wait till PostgreSQL has something like UPSERT and ON DUPLICATE IGNORE.
 
user1804599
8:47 PM
@MonadNewb Meh.
 
user1804599
I use Python and Erlang these days. Haskell is getting boring and annoying.
 
heh
 
@not-rightfold Heretic!
 
user1804599
The problem is that I know many languages that have nice features, but no language that has them all, and that really sucks.
 
Anyone heard about the Emotiv Insight?
 
8:49 PM
..what
@Rapptz If I don't use "using namespace std" I must write "#include <iostream.h>" ? — user2714617 30 secs ago
 
@sehe I already upvoted that answer a while ago. But I'm quite amazed that Paul managed to keep that from devolving into a flame war.
 
@Rapptz Getting confused by the respective roles of using directives and include directives isn't unusual or unexpected imo.
 
And I know Paul pretty well since we run into each other all the time in the SSE tag.
 
i.e. textual inclusion is just weird
 
8:52 PM
@LucDanton Hm.. I don't know. It's a bit strange, really.
 
@Mysticial It's not just his virtue. H2CO3 can be quite constructive. As long as you don't refuse to acknowledge facts about UB :)
 
@Rapptz Once upon a time (pre-standard) there was an iostream.h that was roughly similar to the current iostream, but predated namespaces being added to the language, so everything it declared was in the global namespace. It's been close to 20 years since that was "current" C++ usage though.
 
@sehe The code you posted doesn't compile... — user2714617 1 min ago
16 mins ago, by sehe
^ I sooooo hate this
 
@JerryCoffin Well, I know that. I just couldn't grasp how a beginner managed to go from <iostream> needing using namespace std to the fact that removing the using statement will need a completely different header, <iostream.h>.
 

« first day (1044 days earlier)      last day (3907 days later) »