« first day (1252 days earlier)      last day (3695 days later) » 

9:01 AM
This day is moving slower than a snail moving backwards on a turtle moving forwards
 
spice it up
 
@TonyTheLion turtles be fast bitch! You are either a dirty mercan or mean tortoise.
 
why the hell would a snail moving backwards be slower than a snail moving forward
 
@corpseRott they have to think really hard how to do it.
@ScarletAmaranth chilli in the jap's eye?
 
@thecoshman you're entitled to do whatever you please :)
 
9:19 AM
but honestly, a snail looks the same from front and from the back pretty much, only the shell changes
so in theory the move speed should be similar
that is
unless it ends up on the plate of some french dude
 
or chinese dude ... frenches use butter, chinese use chilli
 
Unless forward and backward are taken to be absolute (e.g. endowing a coordinate system).
 
anyone noticed Jon Skeet is in this room no longer?
 
@corpseRott yeah, but they are wired to drive their muscle(s) in a certain direction
 
doing too much elementary maths and high school physics for this construction thing
 
9:32 AM
@R.MartinhoFernandes May and June 2013? This should be old news!
 
morning lounge
when you access the nth element out of a parameter pack, selected at runtime by recursion, can the recursion be optimized out?
 
define "optimized out"
 
it does not get executed, and the compiler uses a faster way to call the correct function on the nth element
 
9:48 AM
 
I drew this ... although surveyer did the contour
Oo my contruction project drawing
 
@presiuslitelsnoflek no longer there
 
@nightcracker template parameter packs are a compile time construct
afaik
 
so theoretically the recursion could be optimized out?
 
9:52 AM
well, the compiler will do recursion for you, at runtime there will be no recursion
 
Hm, most of the starboard entries I remember from yesterday. One of them is even two days old! What has happened to the Lounge?
 
so I'm not sure what you want optimized out
 
let me stir up an example
 
@FredOverflow I think the Lounge is dying. Decay has set in
 
no
I'm here.
 
9:53 AM
@nightcracker always a good idea
 
Today is a better day than yesterday.
 
@BartekBanachewicz That's the first sign of decay :P
 
I feel much better about myself.
@TonyTheLion shush.
 
@telkitty.exe Does your current job blow?
 
I am going to learn tesselation shaders proper
 
9:54 AM
@FredOverflow lol
 
ok so how do I opengl
 
moaning
 
-1
Q: This c++ code made me feel crazy

user3445772I am having trouble understanding what's going on with this code, I tried to figure out the output manually so I've got 6 6 8 6, When I applied it on the dev c++ 5.6.1 version I've got 6 7 8 6 why am getting the 7 instead of 6?!!! another thing that made me feel crazy, when I applied the cod...

Who comes up with these questions? :)
 
@FredOverflow does it really predate C++ standard?
I thought C++98 was a thing already back then
 
@BartekBanachewicz yesterday is no longer a day
 
9:57 AM
if not then heck VC6 was even worse than I thought
 
@FredOverflow it's a killer on here knees, I am sure
 
@thecoshman hence yeterday was a worse day than today is
 
@BartekBanachewicz Visual Studio 6 was released in 1998. Maybe it came out slightly after the standard was finalized, but it does not adhere to it.
 
oh well I don't doubt the latter part
Stone Age C++™
 
You have to keep in mind that software is developed not in a couple of weeks ;) The compiler was probably written in 1996 and 1997 or whatever.
 
9:59 AM
@BartekBanachewicz it can't be, it is not one of those things.
 
@FredOverflow and gcc had C++11 before the standard came out (well, you know what I mean). Anyway, Microsoft laid their dick on the standard for the past 15 years anyway. (dunno if this great colloquial phrase translates from Polish to English)
 
@FredOverflow One thing I haven't seen before is x+++y. How is that parsed? Is it even valid?
 
@StackedCrooked x++ + y
 
how do you know it's not x + ++y
 
10:01 AM
parses from the left with the assumption of getting as much as it can.
 
@nightcracker I will gladly refer you to our resident template nerds, @Xeo, @R.MartinhoFernandes or @sehe
 
@StackedCrooked greedy parsing
 
because I have no idea :/
 
@BartekBanachewicz oic
 
altough I am not a so expect caveats
 
10:03 AM
Hej Bartek :p
 
@nightcracker you want the recursion to be tail-optimized?
 
wont x+++y end up with a compiler error?
thats like *++x
;
 
@StackedCrooked I don't care what optimization method is used, but I'm just wondering whether the compiler can remove the recursion
 
In computer programming and computer science, "maximal munch" or "longest match" is the principle that when creating some construct, as much of the available input as possible should be consumed. The earliest known use of this term is by R.G.G. Cattell in his PhD thesis on automatic derivation of code generators for compilers. Application For instance, the lexical syntax of many programming languages requires that tokens be built from the maximum possible number of characters from the input stream. This is done to resolve the problem of inherent ambiguity in commonly used regular express...
 
@StackedCrooked all it does is munch up arguments until index reaches 0 or we've ran out of arguments
 
10:04 AM
that so explains it
 
@corpseRott No, the lexer sees x followed by ++ followed by + followed by y.
@corpseRott *++x is not a compiler error, either. It is read as "dereference the incremented iterator".
 
@nightcracker I suspect that the compiler can inline and unroll it to a flat list of instructions.
Is that what you mean?
 
@corpseRott which is not an error
@corpseRott oh god more Poles
 
sort of, yea
 
Is it really Poles, not Polish?
 
10:06 AM
it should be possible in a jump table
 
@FredOverflow I don't feel offended by that and it's funnier :P
 
because the function that is called always has one argument
 
deep c isnt it?
 
LoL community basically writes "Polacks"
 
or Pollocks
depends on the country
 
10:07 AM
OTOH Polish LoL players are mostly total dumbfucks
 
true
thats why I play on US West
 
@corpseRott Are you talking about the book Deep C Secrets?
 
basically something like this:
switch (element) {
case 0: push arg0 on stack
case 1: push arg1 on stack
case 2: push arg2 on stack
}
jump_to_function
 
no, actually bout the deep c presentation
but its kidna like the book
that's the one
 
that looks scary
 
10:08 AM
I love it
i figured my C++ knowledge is around 4-5 after reading that one
out of 10
kennighan was stating hes 7
 
I will never reach 10, because I was never really interested in multiple and virtual inheritance. And those seem to be important topics in C++ quizzes.
 
Stanford sleep researcher William Dement said that after 50 years of studying sleep, the only really solid explanation he knows for why we do it is 'because we get sleepy'.
4
 
@corpseRott Kernighan wrote C++?
 
@corpseRott you might want to reevaluate that rather sooner than later in this room
 
10:10 AM
@Feeds What do you mean, nobody knows why? Creatures need sleep.
 
@FredOverflow I don't have a perm role, I am only selling my own apps & do apps for clients. Which was really fun for a while, but I was earning more on perm base. Most important of all I intend to get another mortgage (buy another property) - just a lot easier if I am on a fixed income.
 
yeah, thats the point :p
it was the joke
 
woosh
 
It is still possible to get a loan for self employed, but you won't get the best rate
 
stop with the elaborate jokes already
 
10:14 AM
@nightcracker In your example the the result is found at compile time. (Notice how only the string "that" is present the assembly.)
 
let's laugh at ruby programmers instead
 
@StackedCrooked cool, that'll probably change once I don't hardcode the 1 though
@StackedCrooked this is for type-safe formatting btw
 
You have got to love when programmers use accurate terms to describe their questions :S
Thank you @sehe for a long and well written reply - but it seems you addressed processes, and the case I had in mind was really about threads... again sorry :) My case should be easier, right? — Emil Fredrik 2 hours ago
@EmilFredrik ahahahaha... wat!? :) Yeah. That's simpler. as in: it's a solved problem. See my new answer: stackoverflow.com/a/22553946/85371sehe 2 hours ago
 
@nightcracker yeah, you can replace it with argc to test this.
 
lol ... that and also I am sick and tired of getting paid little for doing clients apps ... and I can't sell much for my own apps
 
10:15 AM
So, I apply plenty of turd polish.
 
@FredOverflow your answer was beaten by another guy's :(
almost 7 days have passed since the last valid answer so I'll soon have to accept one
(talking about the code golf thing)
 
@StackedCrooked looking at the assembly output for argc it seems to be using if-else for each index
@StackedCrooked probably not optimal, but better than recursion
 
at least you can buy a house for your pay :p
 
The observations you make are mostly incorrect. You should go back to where you started from and reread about encryption, ftp, sockets, binary/text files, zipping files, adding libraries to projects, available compression libraries, CMake configuration and... asking questions on Stack Overflow. — Bartek Banachewicz 35 secs ago
people ask weird questions today
 
I have a house (a mortgage more precisely) and building a 2nd one in the backyard with parents money (650 square metres yardy)
 
10:20 AM
@BartekBanachewicz typical case of a beginner overshooting a project he can manage here
 
But I grew tired of making apps ... especially since it does not make enough $
 
@nightcracker frankly the project (task) isn't that hard. But the guy is certainly overengineering.
 
@BartekBanachewicz the project is very hard if you can't even compile and link libraries yet
 
well he can't add this one particular library
 
not to mention that you should not attempt crypto-sensitive projects unless you are very experienced
 
10:23 AM
well it will be shit security obviously
 
@BartekBanachewicz you should at least pinpoint some of his mistakes. like this it's not very helpful.
 
> Security of the transfer is the most important key here, for that I'm just trying to crypt/decrypt transfered data.
 
He could just use encrypted rsync or scp.
 
he could do a proper research.
 
^
 
10:26 AM
Not every library is as easy to link as qt
 
linking is linking
 
what the
 
I saw a guy write a http server in one printf call
 
? . ?
 
10:29 AM
@nightcracker that was a cheat, he simply had the binary embedded in hex
 
@nightcracker lol
 
@StackedCrooked when you abuse the language like this, everything's a cheat
 
@BartekBanachewicz using constexpr, nice
 
@AlexM. What? This is an outrage! Loungers, I need your support :-D
63
A: Call a method without calling it

FredOverflowWell, how is malware able to execute functions that aren't called in the code? By overflowing buffers! #include <stdio.h> void the_function() { puts("How did I get here?"); } int main() { void (*temp[1])(); // This is an array of 1 function pointer temp[3] = &the_function; ...

 
10:32 AM
why did they make the restriction of constexpr function being only one return statement?
 
@nightcracker That restriction no longer applies in C++14.
 
this is to much for me lol
 
@FredOverflow so why was it made in the first place?
 
this is a great challenge but all the answers I would have thought of have been taken so I was left with posting this one:
0
A: Write program in your favorite language in another language

Alex M.C in C++ #include <stdio.h> int main(int argc, char** argv) { printf("Hello world!\n"); return 0; }

:(
 
I remember my lecturer from object c++ used to do that all the time
but you can protect yourself from it
simply make sure to have your string closed
 
10:33 AM
@nightcracker Fear of complexity, I suppose. How do you ensure that a constexpr function does not have side effects?
 
@FredOverflow lol u so cheatr
 
@FredOverflow by not allowing it to call any non-constexpr functions?
and no access to globals
 
That's more or less the C++14 solution.
 
so again, why not make it like this in the first place?
 
Running short on time? I don't know, read the paper.
 
10:35 AM
goto *&hello_world;
 
@FredOverflow AFAIK constexpr functions can have side effects (at compile-time)
 
that looks amazing.
 
in C++14 constexpr no longer implies const
 
@AndyProwl those pesky imperative languages will stick mutability everywhere
 
@nightcracker Because it is very complex
 
10:36 AM
it doesnt ever cease to amaze me that there are still people who spend literally thousands of hours
studying inbuilt io functions
 
@AndyProwl how is it very complex? any kid can see if you're only allowed to call constexpr functions from constexpr functions they'll be constexpr themselves
 
to find vulnurabilities like this
 
@BartekBanachewicz lol, spreading the FP word became a life mission for you
 
@AndyProwl I'm totally a convert.
 
Bartek where y from?
 
10:37 AM
@AndyProwl But only side effects on local variables.
 
which admitely might be going a bit far but who cares.
Lounge<Haskell>
 
I mean as city
 
@AndyProwl whether your do this in one statement or multiple does not change anything
 
@corpseRott 's in my profile
 
@nightcracker It does change apparently. I remember Chandler Carruth in a GN2012 video saying it took extremely long time to get it working in Clang and that we should be careful with generalizing constexpr.
So things are not as simple as they look like
But yeah, eventually with C++14 the generalization happened
 
10:39 AM
> Tessellation is the Vertex Processing stage in the OpenGL rendering pipeline where patches of vertex data are subdivided into smaller Primitives. This process is governed by two shader stages and a fixed-function stage.
hmpfh
 
what I expect to have taken a very long time is enabling stuff to be constexpr, things like basic types, not restricting constexpr stuff
 
hello
 
another Bartek
 
hi 2nd Bartek
 
10:40 AM
lol
 
: D
hi
 
Honestly, computer graphics is to much for me, I never liked playing with the Matrices
 
@BartekBanachewicz how are you? what's up?
 
SDL = just about enough
 
@corpseRott matrices are just the lame easy beginning
 
10:42 AM
@FredOverflow Also member variables
 
@BartoszKP I'm trying to learn tesselation
 
thats the point
 
@BartekBanachewicz it's a pity that it doesn't actually solve the 8-queens problem. it only seems to verify a given solution.
 
@BartekBanachewicz :V something to do with Tesla?
 
I never got past the beginning in openGL
2d graphics are fine but thats fairly simple
 
10:43 AM
woooo
I finally understand Geometry Shader invocations!
 
lol
 
one step closer.
@BartoszKP naah, GL.
> layout(triangles, invocations = 3) in;
This tells the GPU that your GS should run three times on a single primitive. You can figure out which vert you’re on by looking at the built-in gl_InvocationID variable.
I am going to spend the whole saturday writing and analyzing GS and TS programs
it's a gaping hole in my knowledge
which needs fixing ASAP
 
you sound like a maniac
thats good I guess
 
@corpseRott also that's my job.
 
@BartekBanachewicz are other shapes than triangles used for this in practice?
 
10:45 AM
@BartoszKP mhm. You can easily subdivide quads
 
@BartoszKP triangles are used because trigonometry
 
for exmple, specifying N outer tesselation factor for a quad should divide it into n^2 smaller quads (like in a grid)
 
wish it was my job as well
but I am a tech consultant
 
:o
 
@BartoszKP You can operate on lines and points.
 
10:46 AM
:[
 
@corpseRott consultants are paid well at least, huh?
line tesselation is particularly efective in curve rendering
 
depends what kind of a consultant
 
this might get important if OpenVG becomes a thing
 
@BartoszKP And 'adjacency' too.
 
@corpseRott are there kinds of consultants?
 
10:47 AM
@R.MartinhoFernandes sorry, I don't follow. what about adjacency?
 
if you're a integration consultant like erp, yeah, it is well paid
but if you're a tech on a service desk
its not really that good
development > integration > support
 
coffee >> ...
 
true
 
Also I am going to dump my studies and become a physicist.
 
are contents of std::vector guaranteed to be laid out contiguously?
 
10:48 AM
I am not but I wanted to see how that looks written.
 
@BartoszKP Each input is a line/triangle along with the adjacent lines/triangles.
 
after so much GL that sounds just about correct
 
@BartoszKP yes
 
I have to compliment the C++ guys on inventing parameter packs (or at least putting it in C++)
 
@BartekBanachewicz awesome, thanks!
 
10:48 AM
they are very powerful
 
With lines input you get two vertices; with lines_adjacency you get four: the normal two, plus two adjacent ones.
 
@R.MartinhoFernandes yes, but I still don't get what it has to do with other shapes than triangles used for tesselation
 
no no, that wasn't addressed to me
anyway, I've spent almost 2 hours yesterday trying to compile FLANN C++ library on Windows :|
 
No biggy
 
10:52 AM
and another 2 trying to wrap it with C++\CLI
 
I remember spending 1 days once when I was trying to link SDL
that was when I was learning how to statically link
 
I found like 3 bugs in cmake implementation, and 2 in their cmake files
@corpseRott windows or linux?
 
@BartoszKP waaait
ah, high dimensional means "more than 3" I guess
 
yeah, I need at least 10
 
I have this idea for a spatiotemporal in-memory database project
but that would be 2/3d
 
10:55 AM
for 3d there are dedicated solutions
 
thing is, they are not many!
either cryptic, with weird APIs, proprietary...
 
but, in FLANN they have them also implemented and claim their "autotune" function will choose the algorithm appropriately
 
or not realtime, which I forgot to add
 
;0
 
basically everyone writing MMO or dunno an RTS writes their pathfinding and stuff from scratch
one common spatial database could make it much simpler
 
10:57 AM
do you need it dynamic or static (i.e. do you need to add points to the existing index) ?
 
fully dynamic.
 
yeah, that's hard to find
I writing this myself now, also
 
mhm. I was able to found SpaceBase, which looks nice, but it has only Java and Erlang APIs
I would prefer something native and smaller I think
> As of 2008, there are no RDBMS products with spatiotemporal extensions. (...) Unlike in the pure spatial domain, there are however no official or de facto standards for spatio-temporal data models and their querying. In general, the theory of this area is also less well-developed
 

« first day (1252 days earlier)      last day (3695 days later) »