« first day (1104 days earlier)      last day (4074 days later) » 

18:02
@GamesBrainiac Sounds pretty big (compared to Lisp or Smalltalk).
@JerryCoffin Well, C# has all that and generics and more juicy data structures :)
@GamesBrainiac You forgot LINQ, probably the best part of C#.
@Pawnguy7 Perfect.
@JerryCoffin Sorry, it was foolish of me to forget :P
Its like SQL meets list comprehensions :P
user1804599
MONADS
18:10
@GamesBrainiac s/Its/It's/. But yes.
@JerryCoffin who wants to put an apostrophe there anyways ? :P
meh php.net was unbanned
user1804599
@JerryCoffin It’s still grammatically correct. :P
Ell
Ell
Damn. Nothing fits me :(
My thigh diameter to torso size is off :/
@not-rightfold Not really.
user1804599
18:12
“Its like SQL” is the subject.
user1804599
And it meets list comprehensions.
@StackedCrooked GCC won't treat the array index as a constant expression.
@Ell When I used to do bike racing I had that problem a lot. Was especially bad because jeans at the time were expected to be pretty tight on the legs anyway...
@Mysticial So many lounger's answers in that question.
18:14
@not-rightfold To be grammatical, that would really need a comma or two: "Its like, SQL, meets list comprehensions."
Looks like we totally lounged that meta question.
Although it was very relevant to us in the first place.
@Mysticial Who would know UB better than us?
Ell
Ell
@jerry I think I'm going to have to wear a size a little too big with a belt, it seems the only option :/
@Mysticial Well, that question got Lounged.
@Ell I just quit wearing jeans for about 10 years, until looser fitting ones came back into fashion.
18:18
Although I do somewhat despise the people who always blindly take cover behind "UB" as the answer to everything. Since there are quite a few instances where knowing how a compiler handles UB can be very useful for debugging purposes.
I tried once, but needed jeans with about a 38" waist to get big enough legs (and at the time a 32" waist was a bit on the loose side).
One instance I ran into recently was when I was converting C to C++. I made a function virtual and that completely broke the code. Turns out that there was a place where the old C code was mallocing the object. The result was that the vtable was never made. So the object would crash only when calling the virtual function. But worked fine on everything else.
@Mysticial I agree, at least for those (rare) questions that aren't a dupe of 50K others. I'm also getting a bit sick of the "show your code" comments on questions that already have enough to show the problem (e.g.)
As a temporary work around, I had to insert a placement new into the C-style "constructor". At least until the everything was refactored into proper C++.
@JerryCoffin lolwut
@huahsin68: I'd generally advise that you avoid sing atoi (at all). — Jerry Coffin 15 hours ago
18:23
@CatPlusPlus That camera is horrendous.
I usually avoid singing anything at all.
fuck
I was half-way-through eating a chocolate bar and I suddenly realized what a bad idea that would probably be.
@R.MartinhoFernandes Hmmm...perhaps U do, but sing misses U doing that.
@DeadMG Why do you do that?
@Mysticial That's a far more specific question than the one the OP posted- for example, you'd want to start with specific versions of specific compilers.
@R.MartinhoFernandes You try not eating when you're hungry and tell me how far you get.
What do you use ERROR_SUCCESS for?
@DeadMG Right. In my case, virtual inheritance implementations are pretty standard among all compilers.
@Pawnguy7 Normal return -- there wasn't an error. Part of the ugliness of COM is that the only type anything ever returns is an error code.
18:26
So it didn't take me long to realize that I had a corrupted vtable pointer.
@Mysticial Well, I'm pretty sure that's specced by the Itanium ABI, so I should hope so.
@Pawnguy7 It's a SUCCESS value with the ERROR prefix.
Notice how all values in there start with ERROR.
@JerryCoffin Ah. I feel I have seen pictures of applications with such an error recently here.
zch
zch
I've seen once application showing me "Error: no error".
I guess it used such constant
@zch "We expected an error here, so lack of an error is itself an error."
is C++ ever going to get something like LINQ?
you can write your own without too much hassle.
42
Q: Is there a LINQ library for C++?

Robert GouldAre there any Platform agnostic (not CLI) movements to get LINQ going for C++ in some fashion? I mean a great part of server frameworks around the world run on flavors of UNIX and having access to LINQ for C++ on UNIX would probably make lots of people happy!

@JerryCoffin Good lord!
18:34
Hey look, I managed to beat Luc at something (if only by about 100th of a second).
zch
zch
You need a const_iterator
It didn't compile for him so he "fixed" it
Is anything real?
@GamesBrainiac I wrote my own list comprehensions, it's not that difficult.
18:37
@Rapptz lol
@Rapptz You are wrong.
@LucDanton ? why
Someone is wrong on the Internet. ohhhhh
No GC.
Ha, love that answer.
18:39
What's GC got to do with list comprehensions?
I'm lost lol
If you didn't find any difficulty I'm crawling under a pile of it to go around. Right now I'm revisiting the first difficulty I've ever faced, which was something as 'simple' as filtering.
@LucDanton What's up with it?
Yeah what was your first difficulty?
18:41
> FileNotFoundException - if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason
Masters of exception naming.
Gentlemen, and Cat. I wish you all a good night. I'm off.
@DeadMG I want to limit how many times an element is 'visited'. Ideally I want it to be visited at most once. Since filtering means inspecting an element before keeping or discarding it, there's some friction.
Limiting the number of visits is relevant for things like mapping over a range with a function.
'Generating' ranges as well (which is a range over a function, this time).
no
2 messages moved to bin
Please read the code of conduct
in the right hand side starboard on top
In comparison, GC means you can have/emulate laziness: it doesn't matter too much when an element is generated, you keep it around for however long you need it. Then the GC takes care of it.
@LucDanton You want to visit only once, even for forward/bidi ranges?
18:45
@TonyTheLion But I don wan a code of conduck, I want a code 4 MMO
You can help plz ??
I think the space before the question marks sold it.
@LucDanton oh that explains it
18:47
@MohammadAliBaydoun You forgot the "It's due in 17 minutes."
@DeadMG I didn't phrase that very precisely. In some cases, you can express the amounts of visitations for an element of an underlying range in terms of the visitations of a composite range: e.g. front(map(f, r)) should perform an equivalent of front(r). If you visit that element twice, then the corresponding element of r is visited twice. You get relationships like that even when the ranges aren't one-to-one (e.g. grouping).
@LucDanton Right, but it's pretty trivial for filtering to express a 1-1 relationship between visiting the filtered range, and the number of times it evaluates the underlying range.
Hah, was totally right to preempt you by mentioning grouping. tl;dr read the entire thing.
@Jefffrey Apparently wrapping this was harder than I anticipated.
I don't know what you mean.
as in, I totally did read the entire thing.
18:50
I'm confused too.
You have an habit to attack examples instead of the arguments they illustrate. What's the point?
How do you visit the same element twice?
clearly I simply don't understand your argument.
@Rapptz E.g. call front or back or at twice.
On the same position.
would you do that or would the user do that?
18:51
but I guess that for filter()
you might have to search forwards or backwards for the next item.
so that might be O(N) of the underlying range evaluated.
@Rapptz Yes, no, maybe.
I always figured filter was O(N) applications of the predicate going forward but I guess that's wrong apparently.
@DeadMG What does 'evaluate the underlying range' mean?
if you don't have a random-access range, you might consider a kind of map.
@LucDanton Well, access an element- generate it, if it's a generator.
> I saw you are very active the Berlin C++ community so you might be open to these roles? Alternatively maybe you know people in Italy who could be tempted to relocate for a brilliant job for 2013?
WHAAAAAAAAAAAAAAAAAAAAAT
Why the fuck would I know people in Italy?
18:54
recruiters, nuff said.
I'm trying to decide if he thinks Berlin is in Italy, or if he assumed I'm Italian from my name.
(My activity in the Berlin C++ community was, btw, zero until they asked me to do the talk next month)
@DeadMG I still don't get what you said there.
There are two people on SO that are from Italy that I know of.
@LucDanton I don't think I get what you said either.
maybe we should just call a truce.
I still don't get why you would call front to the same element twice
18:56
mutually assured destruction is better than a truce.
@Rapptz Well, yeah, I guess knowing people from Italy isn't that far-fetched. But I am totally lost as to why he picked Italy there. (The job is in London)
@DeadMG So you just throw things at the wall to see if a discussion sticks? You can ask me to clariy, I'm aware that my explanations aren't great :|
@Chemistpp Erm, isn't it effectively a truce?
@Rapptz That would be (in essence) a filter on a forward_iterator, which can be pretty simple. Now consider, however, an underlying range that's (for example) the next 100 results you'd get from calling rand(), and you want to provide bidirectional (or random) access to it. You need some way to recover the result from a previous call to rand. With GC, you just save results, and when they're no longer needed, they disappear. Without GC, how do you figure out when to throw them away?
@R.MartinhoFernandes It's a truce everybody's scared to break.
@R.MartinhoFernandes Hahaha, if I compare it to fighting with my gf, I give into a truce after I've been beaten into submission, so I think you're right.
18:58
@R.MartinhoFernandes Well, we do have an Italian regular in the Lounge.
@EtiennedeMartel Who?
@R.MartinhoFernandes Jefffrey.
@LucDanton No, I'm just not sure what you're saying except that you think that if you use filter, it uses too many operations on the underlying range.
@Chemistpp As long as you have sex afterwards, all is fine.
@DeadMG It's more about quantifying how many than outright disallowing things.
19:01
@R.MartinhoFernandes Makeup sex is awesome (at least the first few hundred times...)
Great. I was given two pens yesterday, and it seems one already ran away. Why don't people kill the pens before they give them to me.
@LucDanton It's gotta be O(N), I think.
maybe in the case of bidi you could go O(1) backwards if you wanted to store the results or something.
@DeadMG O(N) whats in term of whats?
@JerryCoffin Hahaha agreed. I think after so many times, it's just hate sex.
@LucDanton Each operation on a filtered range (e.g. attempting to access the next element) may cause up to N operations on the source range, where N is the size of the source range.
19:02
Right. So I'm talking per element operations, not per range.
right.
unless you want to try to eagerly evaluate or something like that.
or perhaps you could say that (ignoring going backwards for a moment), the total number of operations on the underlying range will never exceed N.
you could implement filter so that it can go backwards without touching the underlying range.
No you can't.
Depending on what assumptions of what makes for a sane range or not you're using.
FWIW, filter can only go back with a referentially transparent predicate. Or an unreasonable amount of bookkeeping.
@LucDanton Just chuck the previous results in a std::vector or something. Unless you want to permit mutating the source range.
That would make it a container.
19:06
well, it's a tradeoff.
Ya, hence the assumption bit. When you have a GC, the line is even more blurred.
either you can go backwards on any range type (including input) without touching the underlying range for a bit of bookkeeping, and you can guarantee no more than N operations on the underlying range (assuming access-current-and-increment-to-next is one op)
I'm more concerned about what's worth doing right, and for what meanings of 'right', than what's possible at all.
hm.
I would say, don't offer going backwards for input/forward ranges.
I'm not planning on making 'forward' synonymous with 'bidirectional', no.
19:09
shaddup its in Belgium :P
you can guarantee that the total number of operations on the underlying range when traversing a filtered range forwards is N.
What's at stake is how many times a given element is visited though.
well, logically, you would assume that if you offer access without increment as an operation, then you would have to cache the result.
If I visit each element twice it's still linear complexity but that kind of complexity was never at stake.
@DeadMG Precisely!
then you could guarantee just once.
19:11
Then what happens if I filter twice? Do I cache twice?
^and that's where I am today
each filter would need its own cache.
Mmmh I've used rhetorical questions with you before right?
dunno, but I thought the whole reason you brought this up is because you wanted an answer to that question, give or take.
I don't have this issue.
also
what exactly did you mean by "filter twice"?
19:14
Composition of a filter with a range that involves a filter somewhere.
Gotta go.
arguably, if you have statically-typed range types (like filter<map<filter<fold<...>>>>) etc, you could implement a collapsing optimization.
Sort of. How does the bottom filter finds the cache of the other one? (Half rhetorical.)
well, IMO, this depends on map.
if map uses the same strategy (cache) to avoid double-evaluation
then you're really talking about two collapses- map -> filter, then filter -> map.
Do typedefs not implicitly cast to each other?
19:18
you can't cast to a typedef.
that just doesn't make sense.
typedefs are just aliases, nothing more, they are exactly equivalent to naming the underlying type.
It would seem that it is like so: typedef HANDLE HWND;
So I pass a HANDLE...
It didn't like it.
er, no.
that's not what it is at all.
a HANDLE is a void*, give or take.
Yes.
a HWND is struct __HWND; typedef __HWND* HWND; or something like that.
the WINAPI typedefs are strongly typed these days- or stronger, at least.
Oh. On MSDN's articles on types, it said it had that typedef.
19:21
not anymore.
I think you have to give it a specific macro if you want that behaviour.
I think this is the first time I have ever used a void *.
good
but really HANDLE isn't much of a void*.
or less of one, anyway.
Sort of like a... interface? Not sure how to say it.
Base type of sorts.
It's an opaque pointer.
@Pawnguy7 No, no, no.
I see you're still struggling with inheritance bias.
user1804599
19:24
It’s sort of like an abomination.
Take lists, for example.
If I remember correctly.
The Java convention is that the reference type is the interface.
Assigned to... some specific implementation.
I am not sure of what use it is then, though.
yeah, but everybody here hates Java and for a good reason.
@Pawnguy7 It's to avoid naming or declaring the implementation.
What do you ever use a HANDLE for, anyway?
If you cast it to everything else.
In Java? Yes.
you don't typically cast a HANDLE to anything.
the correct use for a HANDLE is to pass it to a WinAPI function that takes a HANDLE.
nothing more, and nothing less.
So it can break easily?
19:26
there are places in the WinAPI where they take HANDLE and void*.
Yay, refactoring the unit tests is worth it. Now uncovering bugs!
@Pawnguy7 Not really. It would be ideal if they made it stronger typed, but it's really not that bad because only WinAPI functions deal in HANDLE.
it's a bit like Hungarian Notation, really.
HANDLE = WinAPI void*.
Oh man, using Java's close() and going back to prehistoric, RAII-less style of coding is retarded.
I mean, some HANDLEs aren't even pointers.
user1804599
PVOID
19:28
some of them are indices into a kernel-space array of objects.
> ERROR_INVALID_WINDOW_HANDLE
user1804599
@Griwes try-with-resources.
I take this to mean, I have no idea what I am doing :D
did you cast a HANDLE to an HWND.
I did :(
19:28
because you really should not do that.
user1804599
You idiot!
if Windows gives you a pointer to a window (an HWND), it will be typed as an HWND.
@not-rightfold That's ugly.
user1804599
Don’t depend on the definition of a typedef and don’t randomly cast.
user1804599
@Griwes It’s Java. vOv
user1804599
19:29
Also don’t use Java.
@DeadMG There is a window out there somewhere, correct? Given that, don't the HANDLE and HWND point to the same thing?
@not-rightfold Except I am forced to.
user1804599
By whom?
@Pawnguy7 You cannot get a HANDLE to a window.
at least not normally.
Perhaps there is a function which gives me an HWND given the console HANDLE.
Or maybe that was to the console buffer.
19:31
wtf, dude.
I cannot keep them straight.
there is no console window.
user1804599
POSIX is intly typed and Windows is void*ly typed! :D
you cannot get an HWND to the window holding the console.
perhaps if you used EnumWindowsEx or something.
but I'm pretty sure that stuff is handled by Windows internals.
I was trying to move it.
19:31
it's not a real window.
A fake window? Hrm.
@DeadMG you mean like HWND WINAPI GetConsoleWindow(void); ? :p
user1804599
GetConsoleWindow? :V
@not-rightfold too slow :p
they have that now?
user1804599
19:32
@melak47 olol
fair enough then
user1804599
@DeadMG since 2000 :V
Have what?
34 secs ago, by not-rightfold
GetConsoleWindow? :V
@not-rightfold By the university.
user1804599
19:32
Hahaha.
@DeadMG and you can do fun stuff with that window, too :>
user1804599
Use Scala and decompile the resulting class files.
@not-rightfold Why?
user1804599
So you don’t have to use Java!
user1804599
19:33
Btw Fred I started learning Scala.
Hit any bumps yet?
user1804599
I figured out a way to have the compiler not reload everything on every invocation.
There's a Scala compiler demon or something.
user1804599
@FredOverflow HOFs suck.
user1804599
// [error]  found   : Nothing => Nothing
// [error]  required: Int => Nothing
// [error]         println(map(id, List.range(1, 10)))
// [error]                     ^
19:34
@not-rightfold Why? Because of the variance annotations? :)
user1804599
What’s that?
Watch, then read the linked comment.
user1804599
I need to do id(_:Int), which is fucking terrible.
What is map? A function you wrote? Because normal map is a method, no?
user1804599

Functional Programming

Laughing at mutability!
19:36
That was strange.
It was giving me the same error code, so I put a breakpoint.
It didn't hit it, or give me an error...
user1804599
@LightnessRacesinOrbit What a pair of idiots.
@not-rightfold Pair?
user1804599
There’s two people.
@not-rightfold One of them is defending himself and his home, and incredibly calmly at that. How is he an "idiot"?
@Pawnguy7 you scared it away with your 1337 debugging skills
19:40
@melak47 I don't know, I am scared. VS has been acting strange recently.
@DeadMG are all C-style APIs like this?
By that, I mean, you pass in something, and it fills it.
And/or bitwise flags and such things.
I am not sure if I am bad at using MSDN.
Or if buffer is a confusing term.
buffer is not confusing
Well, I get a normal buffer - say, of chars for a window title.
GetLargestConsoleWindowSize returns in character sizes.
I don't know what you use that for...
I don't get why people go so crazy over functional programming
19:50
Tell me if you figure out.
C++ could have tail_return btw.
2
however it won't work with RAII and temporaries with non-trivial dtors
user1804599
The compiler can infer that.
thus C++ will never have it
user1804599
There is no need to state it explicitly.
19:56
What does work_area of a monitor mean?
@not-rightfold I mean that tail_return should yield an error if it can't be used.
user1804599
The compiler can guess that you want tail recursion and emit a warning, which turns into an error because you use -Werror. :D
@not-rightfold You didn't answer my question :(
@not-rightfold yep, or a warning.
but there should be a safe way to use infinite (tail) recursion
I'll return your tail ;)
20:00
@Pawnguy7 Presumably you mean in Windows. Monitor area minus anything taken up by the taskbar/notification bar, etc. IOW, the area a window would/will cover when maximized on that monitor (assuming it doesn't restrict the size by replying to WM_GETMINMAXINFO).
@JerryCoffin Just tested. Confirmed.
> Set this member to sizeof ( MONITORINFO ) before calling the GetMonitorInfo function. Doing so lets the function determine the type of structure you are passing to it.
Doing so allowed it to work, but I cannot help but feel that is messy.
@Pawnguy7 It's very common (I'm tempted to say "rampant").
C doesn't have overloads does it?
I cannot remember :\
google it?
Well, some operators are overloaded. But you cannot overload functions, if that's what you mean.
Xeo
Xeo
20:04
Hoooome~
@Pawnguy7 It doesn't allow you to do explicit overloading anyway. The built in operators are overloaded so + works on char, short, int, long, etc.
I guess that explains this then.
screw it. I want #pragma language_syntax_version([push | pop]) which would allow to enable/disable language features, so we could add breaking features like new keywords
Just use contextual keywords ;)
Xeo
Xeo
pragma is explicitly for implementation-defined stuff
20:06
@Xeo I know.
Xeo
Xeo
Thing is, that just won't work
Didn't they add [] for that?
@Xeo why? preprocessor will change lexer state, enabling or disabling keywords
Xeo
Xeo
I meant from a standardization POV
what's wrong with it?
Xeo
Xeo
20:08
@Pawnguy7 Attributes ([[blah]])? That's specific to identifiers, and again, mostly an extension point for implementation-defined stuff. There are, IIRC, two (three with C++14) attributes defined explicitly by the standard - noreturn, carries_dependency (and deprecated).
@JerryCoffin I always hum the riff to that song when someone mentions it, which I just tried in the SO chat text entry box, which did not work. Then I remembered that I usually mistake "Time" for "Money" and this occasion was no exception. An all round failure, really.
@JerryCoffin ergh... floyd
well, actually new keywords can be added via macros. something like #define _Tail_return ~![tail return]!~ won't break any existing code
but holy fuck I don't want that.
@Abyx _Tail_return won't break any (conforming) code anyway, since it's reserved for the implementation anyway.
20:14
meh C++ sucks so badly =\
@JerryCoffin ah, right.
I kinda overthinked it
well it seems that ABI for C++ and a new language with better syntax is the only feasible solution
Xeo
Xeo
@DeadMG: Did you clear up that filter & GC discussion with Luc? I think I know what he meant (with the grouping).
I wonder
what is the plural of "daedalus"?
@Xeo Don't remember.
@DeadMG That's a proper name, no?
@DeadMG isn't that a name?
@R.MartinhoFernandes think so
Xeo
Xeo
20:26
@R.MartinhoFernandes I remember reading it, but I don't quite remember the content.
Xeo
Xeo
My memory is bad today anyways, I have a headache.
but I have multiple copies of a thing, which is named "Daedalus"
The plural of octopus is octothorpe, so the plural of daedalus is daedathorpe?
@R.MartinhoFernandes Isn't it just "octopi"?
20:31
Maybe. I'm making shit up.
Um...
What does this thing do?
make shit up apparently
@StackedCrooked A colleague of mine wondered if he could get Coliru to fork, and then have that child process join a botnet.
That's the main thing I'm trying to prevent.
Internet access is disabled.
Fork is allowed up to 20 processes or something.
Timeout occurs after 20 seconds. Then all processes are killed.
The setuid root is removed from programs like ping
And sandbox user is not root :P
And also runs in a chroot which only mounts /usr/ /lib /bin, not /dev or /proc.
To be honest I keep my fingers crossed.
Ell
Ell
Can't think of anything it could do
Also are boost libs installed?
20:46
better to secure at the operating system level
and yes, coliru has boost installed
as well as LLVM/Clang.
Ell
Ell
I can access boost headers but not libs, last time I tried. But I'm not at a PC atm

« first day (1104 days earlier)      last day (4074 days later) »