« first day (1794 days earlier)      last day (3170 days later) » 

12:00 PM
@AnukulSangwan just try to write an operator[] that does what you want, ask us the problems you get while doing that
 
@gnzlbg Me too, I'm interested in this link
 
it should take you 5 minutes to discover why it doesn't work that way
 
@Rapptz Why are you still up
 
@gnzlbg i don't know anything operator overloading.
 
I'm always up.
 
12:01 PM
@AnukulSangwan Go learn then.
 
@Elim okay. thanks
 
@sehe it never happens
 
@sehe should i link you boost.fusion or boost.hana? or std::pair/std::tuple's std::get?
 
lol boost.hana
 
@AnukulSangwan Search on SO: [c++-faq] operator overloading
 
12:01 PM
surely that will help him understand
 
@gnzlbg Oh I remember requiring some ... months of template usage to get to the point of recognizing the static/dynamic divide. Obviously not this specific case, but in general, designing my own code base
@gnzlbg unrelated
 
1
Q: access tuple elements by index c++11

Khurshid NormuradovIt's not secret, std::get<i>(tuple) annoys many programmers. Instead of it, I want use something like tuple[i]. So I tried to simulate it. #include <iostream> #include <type_traits> #include <tuple> template < int > struct index{}; template< char ... > struct combine; template<> struct co...

 
> Setup requires 2GB across all drives
wow, didn't think MFC was that big
2
 
> It's not secret
 
@gnzlbg Wow. Good match. (The OP doesn't have the same confusion, sadly, so chances are it's gonna "whoosh" @AnukulSangwan)
 
12:02 PM
@gnzlbg this is worse than Cinch's question
 
@AndyProwl If only "MFC" had been "it".
 
i just googled "access tuple elements by index"
my google foo must be black-belt level at least
 
@ElimGarak I'm carefully crafting my messages to make them unstarrable
 
it's a typical question, that is not trivial to solve
 
Also, about objective code metrics, I've found a few things apparently
 
12:03 PM
but trying to write yourself operator[] explains the problem in 5 minutes
 
there we go
 
when you cannot come up with a return type
 
MY FUCKING COCK
Got it!
 
@gnzlbg i'm not at that point in c++ knowledge that i can make my own operators. so i was simply asking the reason (if one such exists for newbies like me).. guess i'll just go and learn operator overloading... thanks
 
@gnzlbg That answer is clever though.
I was expecting indices wankery but that was pretty good.
 
12:04 PM
20 mins ago, by sehe
Because what would be the type?
If you want an array, use an array
I was done so much earlier
 
@AnukulSangwan For prettiness. Shorter syntax, better looking, etc.
 
@AnukulSangwan write a function get_element(tuple<int, std::string, std::vector>, int index) that return the element of the tuple at a given index
 
@AnukulSangwan I literally spoonfed you search terms.
 
write only the signature
what is the return type?
what can it be?
 
Pity it's not zero-based. — R. Martinho Fernandes Oct 10 '13 at 11:28
Indeed
 
12:05 PM
std::any
 
He knows the magic word
 
@набиячлевэлиь void*
 
@Rapptz everyone did
17 mins ago, by sehe
@AnukulSangwan Go ahead. Continue not listening. But please, also refrain from asking/complaining
 
user1804599
Go ahead?
 
user1804599
Fun! I love Go!
 
12:06 PM
@gnzlbg void* is poor man's any :P
 
@sehe don't want an array. AFAIK, an element of an array can't hold different data types, like a tuple can.
 
@AnukulSangwan so what is the return type of a function that gets the element of a tuple by index?
you don't need to know about operator overloading, just know how to write simple functions
 
@AnukulSangwan use an array of anys
 
user1804599
@gnzlbg std::variant<T, U, V>
 
there is a fundamental problem with that approach that will tell you why it doesnt work that way
 
12:07 PM
@AnukulSangwan so, live with it. Or go program in a nice, promiscuous dynamically typed language. Have a good day
@набиячлевэлиь oh sod it
 
@sehe Could you answer this boost question, seems rather esoteric. :/
 
@AnukulSangwan Why do you think we use a template for a tuple?
 
user1804599
boost::recursive_wrapper is nice for trees.
 
@VermillionAzure he doesn't know that yet, which is fine
 
@ElimGarak Too esoteric for a monday
 
I agree tuple could just be [_0], etc
with _0 being mpl::int<0>
 
They could. In fact, the linked answer shows it
 
std::nooble container, you can put anything you want in it, but there is no guarantee you're going to get it back ever.
 
12:09 PM
(last) instant stackoverflow again, please: is there a way to see the only-ifdef-preprocessed code? (no, I do not mean gcc -E)
 
@sehe inorite
 
@Mr.kbok but then they'd have to define _N for N up to a lot
 
@quasatillis cpp.
 
my pussy!
 
wat
 
12:09 PM
t*
 
no star, I knew it!
 
@AndyProwl well, if you look at the horrors in the boost code, this isn't that crazy
 
No context, no star.
 
@Mr.kbok ah wait I thought you meant std
 
all sexism, cock gets free stars, pussy gets nothing!
 
12:10 PM
@chmod711telkitty try with a verb and bold
 
@ElimGarak I'd say, there was no cock in it.
 
@sehe: you mean there is an option in the compiler?
 
@chmod711telkitty it was also not bold
 
@AndyProwl can't we have an UDL for mpl::ints ?
 
@quasatillis No. I mean, the preprocessor is a separate program linux.die.net/man/1/cpp
 
12:11 PM
@Mr.kbok that would work better yes
 
f*ck
 
but 0_index or 0i... not sure I like it
 
user1804599
tempted to flag that
 
today is the mondayest day of my week
3
 
maybez
 
12:11 PM
@AndyProwl template<int i> mpl::int<i> operator "" _() or whatever
 
user1804599
but won't since uncle @JonClements will yell at me
 
@Mr.kbok I don't think it can be called _
 
next time I am probably going to ask about the url of SO chat
 
@Mr.kbok no you cannot :/
 
thanks, @sehe
 
12:12 PM
@AndyProwl _b then
 
@Mr.kbok no
 
@Mr.kbok yeah, but that's confusing
 
@Mr.kbok but why
 
Uncle hey!? That didn't show in my family tree research @elyse :p
 
@Mr.kbok you cannot explicitly pass template arguments to UDL
 
12:12 PM
@gnzlbg I know you can't, just saying it would make sense.
 
b is used for binary
 
Xeo
No, that's 0b000....
 
namespaces
 
Xeo
:P
 
@Mr.kbok it would be like deducing from a runtime int a type std::integral_constant<int, i>
 
12:12 PM
ah, right
 
@AndyProwl oh
 
@Mr.kbok (I wrote bs)
 
Xeo
_b is technically fine, but a shitty name
a b-shitty, if you will
 
@gnzlbg no, it's a literal. it's different.
 
_bs
:P
 
12:13 PM
@Xeo "boxed"
Feel free to propose another letter
 
_index maybe, or _ic for integral constant, but it's meh
 
_punched_in_the_face then
 
@Mr.kbok how so? even if its a constexpr function the literal argument will be passed by value
 
I mean, we have numbers for that
 
Xeo
_c
 
12:13 PM
so it cannot affect the type
you want a metafunction
 
get<N> isn't that bad
 
What about BANANA
 
Xeo
overloaded for different constant types, maybe.
 
my_tuple[1_🍌]
2
 
Has anyone heard of using Halstead metrics? I just found them and I'm wondering why I haven't heard more about it
 
12:14 PM
cool, there are flags and they're not from the lounge
 
They weren't the first
 
@gnzlbg it doesn't have to be.
 
@Mr.kbok how so?
check meta::size_t<int> for example, it does what you want
 
@gnzlbg you can say that the UDL resolution tries to apply template parameters first, and then rely on overloading if that fails
 
so 1_your_udl would try to resolve your template parameters first?
 
12:16 PM
yes
 
since the whole point is that udl are just normal functions, that won't go through :/
 
whatever
 
i know it sucks, but dependent types in C++ are bolted in
 
you can BOOST_PP all ints from 1 to 65535 into banana macros
if you really want
 
can you recognize morons at compile-time? I.e. the compiler writing out > Error: the programmer who wrote this crap should be fired immediately - aborting compilation and deleting sources with force-file-shredding lv8
 
12:17 PM
@Mr.kbok i mean that's how std::placeholders is implemented
 
sure.
Maybe they shouldn't, though
 
probably, in retrospect, etc but we have to live with it,
for this type of thing we have Idris
or dependent Haskell
rust doesn't even have type value integers because the main developers used to work on dependently-typed languages and wanted to get it right
so they never got it done at all
 
John Skeet must be one hell of Ejaculator
 
so they have support for arrays till ... 32 values I think... and they implement all the traits for them by hand
 
@gnzlbg really?
 
12:21 PM
check the docs at the bottom, they are automatically generated from sources, and go to array [T; 32]
if you check the source file, that's what's implemented, by hand
 
lol
 
@gnzlbg lol
 
deep work of genius, again
 
type level integers solve that, but since they were considering fully dependent types, they didn't wanted to split the world between integers and any other type
@Mr.kbok rust 1.0 doesn't have them
but there have been a couple of RFCs to add them
so they can be added in a backwards compatible way
but none of them allows type-level strings
or type-level your user defined type as values
or type-level floating point arithmetic
those things are just hard, and they didn't wanted to commit to any broken design
at least for 1.0
so they cut those features off, and made sure that they can be added in a backwards compatible way
but this means that there are no linear algebra libraries in rust like eigen or blaze
since you cannot be parametric over array sizes, or specialize on that..
that makes rust useless for a lot of programming niches
 
SJD
Is somebody here which has some knowledge of OpenGL?
 
12:25 PM
oh, you are talking about Rust equivalent to std::array?
 
@thecoshman no, the equivalent to a c array
 
oh?
 
well rust "plain arrays" are like std::array
 
@SJD Ask @Nooble
 
12:26 PM
@gnzlbg yeah, but not any size, it just has 32 sizes and you can pick one of them to use?
 
he woke up crazy
 
SJD
@Mr.kbok I'm afraid I will trace the rules of this chat if I ping him without any reason >D IIRC you should ping ppl who you are already talking to
 
@thecoshman yeah, basically you can have a larger array like [T, 256]
but then you have to implement things like comparison for it
 
@SJD Ask @Nooble
 
oh right, lol
 
SJD
12:26 PM
o.O
 
because the standard library only does it till size 32
@thecoshman i mean its a 5 liner to implement all the traits I guess
or maybe even a 1 liner
 
@ElimGarak lol
 
@SJD there is a difference between a response to a particular message and pinging someone.
 
@SJD No really, there are a lot of OpenGL people here. (not me.) Also I recall seeing you here before
 
SJD
@thecoshman but there is no respose :)
 
12:28 PM
huh?
 
SJD
I didn't talked to him yet >D
so it would sound like "ping him, ping him!"
 
thecoshman writes a best programming with the C pointar. He also knows how pointar is formed.
 
just fucking ask him
 
Xeo
@ElimGarak But does he also know about verbibols?
 
12:28 PM
@thecoshman that macro implements everything for a given size
 
@ElimGarak vOv pointer maths is all you need
@Xeo hey hey hey, shtop
 
SJD
@thecoshman ok Sir!
@Nooble hey
 
@gnzlbg lol
 
@SJD ........
 
@SJD ping him with the fucking question you want to ask him you turd spanner
 
12:29 PM
Just buy a book or go to learnopengl.com
 
or better yet, ask on SO
 
gawd, my desktop is so sexy.
 
I cannot use Rust till they get type level integers, but I can understand that they want type level integers to work with user defined integer types too, and that it is hard to design a general dependent type feature for an imperative language
 
SJD
I love it... @VermillionAzure it's a subjective question..
 
12:31 PM
@ElimGarak is it literally made of fire?
 
probably the best thing we have right now is actually C++ and D, and they suck compared to Idris
so its is an open research problem
 
@gnzlbg Rust was looking so nice, but it turned to muush
 
@SJD just ask your question already jesus
 
@thecoshman i like it, they plan to get HKT, type level integers, variadics, and anonymous return types done in 2016
 
12:32 PM
@ElimGarak -3 using a single screen desktop image thrice and not a single triple screen image
 
Maybe it will get better.
 
it is already an interesting language but it might actually turn out to be a very useful one by then
 
SJD
@Nooble If I'm using the vertex shader, and I'm using 2 uniforms (perspectiveProj & viewProj - perspective matrix and view matrix), shall I use transProj (translation/model matrix)? It is interesting that if I use only first 2, works like hell, otherwise works fine. SHould that (third matrix) influence somehow my vertexes?
 
1.0 is a very crippled version of rust
to stop breaking the world every month
 
@gnzlbg Oh I liked it, but it's just not worth it atm
 
12:33 PM
@thecoshman yeah, same thoughts
i mean for writing asynchronous services it is nice
 
@SJD it's up to you, do you need it?
 
if you don't need to write overly generic code, or code that is generic over arrays
it is actually ok
 
most people don't realise how generic they could write their code
 
SJD
@thecoshman I don't. But seems that it works bad.. without it.
 
@SJD but what?
 
12:34 PM
@thecoshman rust has concepts with concept maps for both dynamic and static polymorphism
it is actually way better than C++ in that at least
 
and what would you do if you did set a model matrix?
 
SJD
@thecoshman I'm working on shadow mapping. I'm trying to generate the depth map, so when I use another shader (for generating de depth) is used only projection and view matrix uniforms for light's perspective
I added just a simple (glm::rotate(glm::radians(0.0f), glm:vec3(0.0f, 1.0f, 0.0f)) - nothing special, but without it, the depth map would look weird (instead of 3 cubes it renders only 1)>D
 
You are making very little sense
 
SJD
With?
 
most of what you are saying
 
12:36 PM
How the hell are you working on shadow mapping if you don't understand the basics of linear algebra? I need some sleep. I need Monday to be over.
 
SJD
I do. What I'm missing?
 
Look like someone's got a case of the - ok shutting up
 
@SJD You seem pretty well into it already
 
> error C2039: 'map' : is not a member of 'std'
WELL OBVIOUSLY THAT'S NOT TRUE
 
PORNO
 
Xeo
12:38 PM
@Mr.kbok Obviously it is.
 
@Mr.kbok failed to include?
 
yep
but technically map is a member of std
 
it's not if you don't include it
 
It's actually map::std.
 
@SJD Wait so I know nothing about openGL but...
 
12:40 PM
std::map is part of the standard library, but not part of the built in shit that you can just compile against.
 
Xeo
@Mr.kbok It's not until it is
 
You have a matrix that's used for movement, one for the camera, and another for the perspective
 
If I say, "map is a member of std", would you answer by "only if you include <map>" ?
 
Xeo
That's the correct answer, anyways :P
 
@Mr.kbok I wouldn't answer, there was no question.
 
12:41 PM
You're asking if the model matrix, for movement, is important for the vertex shader?
 
@Xeo s/correct/pedantic/ :D
 
I think the correct error message would be "using map without including <map> is ill formed"
 
SJD
@VermillionAzure not for movement. It works fine. For light's point of view. For shadow mapping we render the scene from the point of view of light
 
@SJD oh, and there's very little reason to not just have a single 'model/view' matrix.
 
Who is we?
 
12:42 PM
@SJD Isn't that different, though?
 
@Mr.kbok except that would require the compile to know everything ever. You didn't include anything that provide 'std::map' thus as far as the compiler can see, std doesn't contain map. job done, move on. NEXT!
 
@SJD There's three, right? One for the view, perspective, and model,
 
@MarcoA. Release Fucking Cock, please?
:P
 
@thecoshman That's not how the standard works
@thecoshman It's just an implementation detail
 
SJD
12:44 PM
@thecoshman I use 2 different shader programs (load first when rendering from light point of view and load the second one when rendering normally). THe point is that I have 3 uniform matrixes in my normal shader (perspective + view + model) but in depth shader (i have only perspective + view)
@VermillionAzure yep
 
@Mr.kbok it's how compilers work, and compilers are no the standard
 
You could just have <map> be magic and the compiler know about ALL the std in an internal structure
 
@SJD So what?
 
@MarcoA. tl;dr
 
State the question again
 
12:45 PM
@thecoshman They should be conformant.
The error is broken.
 
It requires knowledge of the inner workings of the compiler
 
You're asking if you need to use the model matrix in the vertex shader?
 
@elyse please help me, I'm being nitpicky with cosh
 
Indded map is was not member of std:: officaially, up untill 2014
 
SJD
12:46 PM
if I use glUniformMatrix4fv on seomthing that does not exists in my shader
 
@ElimGarak Request For Cock, obviously!
 
SJD
like model matrix:)
 
@SJD How does the model matrix not exist?
Don't you sort of... need it
 
@Mr.kbok conformant to what? AFAIK the spec says nothing about error messages
 
12:50 PM
@SJD Why do you need two different programs
 
Wait, what is the point of contention between you two?
 
@ElimGarak one called the other a moron
 
Xeo
asklfjaklfjajgajgag;lsgk;
fuck unreal
2
 
Sounds reasonable.
 
yes, I'm inclined to think you're right
 
Xeo
12:54 PM
The code that calculates the area a text occupies is so fucking broken
you have to fiddle with margins on three sides to get it to not cut off text.
 
Unreal has been broken since 1999. It's a clusterfuck of one dude trying his best to compete with John Carmack.
 
what are we exactly talking about?
 
roll your own crappy engine instead then :D
 
Xeo
Unreal Engine
 
well i think i'l be going to sleep
 
12:57 PM
@thecoshman No, it doesn't. That's not what I meant.
 
good night
 
@Mr.kbok ah ah ah, silence. You were foolish and wrong, let's just leave it at that
 
WTF
 
1 message moved to bin
 
I kinda suppose that is inappropriate
 
12:58 PM
JESUS CHRIST, WHAT IS WRONG WITH YOU.
 
flag & ban please
 
who posted that?
 
I can't even flag his shit, I don't want it to appear on my screen
 
Why would you post that? Anywhere?
 
12:59 PM
@Mr.kbok that's not a shame, if you flag it you're doing the right thing
 
... be a shame if he was downvoted
 

« first day (1794 days earlier)      last day (3170 days later) »