« first day (1607 days earlier)      last day (3333 days later) » 

5:01 PM
@LightnessRacesinOrbit Not recommended
@thecoshman I'm up
@AlexM. This one looks more subtle than the usual if (x) { return true; } else { return false; }
 
programming 'puzzle' question, ignore if you think I'm help vampiring it up:
You are given two vectors v1=(x1,x2,...,xn) and v2=(y1,y2,...,yn). The scalar product of these vectors is a single number, calculated as x1y1+x2y2+...+xnyn.
Suppose you are allowed to permute the coordinates of each vector as you wish. Choose two permutations such that the scalar product of your two new vectors is the smallest possible.
^ Anyone know what permutation means in that context
 
it means permutation
 
Probably permutation
 
I don't understand what that means in the context of a vector
 
it means permutation
 
5:09 PM
You permute the components of a vector.
 
oh wait nvm im dumb
 
in what context do you understand what permutation means?
you made me curious
 
When I permute your mum's tits
 
@Jefffrey That's combination.
 
@AlexM. all possible orderings of a set i think
just had a lapse in memory, I think im okay now
 
5:11 PM
@Pris you know you can build a set on top of a vector, right?
 
@Jefffrey Permuting a mother's tits is a standard deviation round these parts.
 
@AlexM. I'm aware. I get it. Lost my mind for a second.
 
user1804599
Hi.
 
What was your first ever C++ book, lounge?
 
@Pris Game Programming: Compendium by Bruno Sousa
a lot of pointers and singletons
 
5:23 PM
Mines was C++ Essentials by Cay Horstmann... I don't remember it that well tbh
 
@Pris Schildt!
 
user1804599
@Pris None.
 
don't remember which one though
 
user1804599
I learned C++ through Stack Overflow, Lounge<C++> and clang diagnostics.
 
My book didn't really cover templates lol
@райтфолд Yeah I think whatever competence I have in C++ is largely self taught from online stuff
 
user1804599
5:25 PM
OK, I'm going to patch a Twitter library.
 
@Pris There are books?
 
Who needs book, just hack away
Books are for pussies.
 
@Jefffrey I doubt you could easily understand monads by just hacking away
their fundamental principles and laws, i mean
especially because they are so generic their use might be really different
compare STM, Parsec, IO, State and Cont
 
main.cpp:6:29: warning: ISO C++ forbids variable length array [-Wvla]
     int** arr = new int[n][m];
                             ^
main.cpp:6:29: error: array size in new-expression must be constant
wait what
Did that change or something?
 
@Mr.kbok TIL someone from Apple starred Lundi
I wonder if they use it secretly in Apple :D
 
5:34 PM
Hi
Wow what a timing
 
we're soulbound by code ~
> We compiled it successfully under gcc-4.7 and 4.8, clang 3.2, Intel C++ Compiler 13.1, and, right now MSVC 2012 November CTP
good old times
 
@BartekBanachewicz They want to hire you
 
lol
he prolly was just a random passer-by and got enchanted by the amazing readme ~
 
@Jefffrey Notice how the error is on m, not n
@Jefffrey Also you would never be able to initialise a int** from that
Hint: the type of new int[i][10] is int (*)[10]
 
@LightnessRacesinOrbit How is that different?
 
5:39 PM
in almost every conceivable way
 
@LightnessRacesinOrbit Yeah, you are right
 
@Jefffrey Classic me
 
Guys, what do you think about this: coliru.stacked-crooked.com/a/76df72df6ed9e8ac
 
@LightnessRacesinOrbit So I can pass a non constant as the first dimension, but can't on the second?
 
@Mr.kbok use an enum class instead.
 
5:40 PM
@Jefffrey basically
 
Does it alternate this? So the third would work but the fourth wouldn't?
 
@Jefffrey No. It's new T[n]; there is no new T[n][m][o][p].... Now, n can be variable, and T can be an array type (note, spiral C notation). But there is no valid type T[m].
 
I see
 
@FilipRoséen-refp We still use C++03 yet
 
@Jefffrey do int* ptr = new int[n*m]; and implement row-major or column-major ordering as you like on top of that
 
5:42 PM
@Mr.kbok then you are in no mans land, the scope of enumerators are very vague in the c++03 standard
speaking of arrays; can anyone remember if we have a question related to int * p = new int[5*5]; int(&ref)[5][5] = reinterpret_cast<int(&)[5][5]> (*p);?
 
or, y'know, std::vector<int> buf(n*m);
@FilipRoséen-refp yikes
 
@FilipRoséen-refp Did not know about this
 
@FilipRoséen-refp same as asking about int arr[5*5]; int (&ref)[5][5] = reinterpret_cast<int(&)[5][5]> (arr);. Which builds btw. dunno whether it's okay
@Mr.kbok It doesn't work.
 
@LightnessRacesinOrbit sure; and after digging through the standard it is well-formed, so I thought I might clear out some confusion
 
0
A: C++11 dynamically allocated variable length multidimensional array

JefffreyYou can just use: int* ptr = new int[n*m]; or even better: std::vector<int> vec(n*m); and implement row-major or column-major ordering as you like on top of that.

lol
 
5:45 PM
@Mr.kbok don't worry about it, you are unlikely to run into weird behavior unless you abuse the standard wording
 
The popularity of videos of malfunctioning or badly programmed robots was compelling evidence of systematic oppression of artificial people.
 
@LightnessRacesinOrbit Please keep the downvote. :)
 
user1804599
Java 7 y u no decent time API.
 
@райтфолд Because Joda exists.
 
5:49 PM
@LightnessRacesinOrbit pls exzplein
 
@LightnessRacesinOrbit @Jefffrey what the heck are you guys on about? it doesn't even answer the OP's question..
 
@райтфолд how about before we try to get a decent time API, we just get a decent solution for handling time in general.
 
user1804599
More difficult.
 
user1804599
Imagine the horror when other planets become colonised. :P
 
@LightnessRacesinOrbit Where are you?
 
5:55 PM
@BartekBanachewicz I'll probably do a warmup for the jam the day before
 
good idea
 
@Jefffrey right here
 
the worst thing is when the jam starts and you realize your ide/environment is broken
 
@LightnessRacesinOrbit You are missing the "fun".
 
I think chat doesn't require attribution
 
5:58 PM
huh
this has nothing to do with where the words came from
only that he's putting forth someone else's verbatim words as his own.
it's not a licence violation and it's not a copyright violation. but it is plagiarism.
I should point out at this time that I have not indicated I disapprove of this plagiarism, or want the answer removed or changed, or Jefffrey punished.
I'm just saying. It is plagiarism. It's putting forth somebody else's work as your own.
 
so it appears I'm going to stay at work till 9 pm again
maybe more
welp
 
@BartekBanachewicz Or that you don't know how to do "xyz basic thing" and you have to spend 20minutes researching it
 
My back hurts. I want a massaging chair
 
@Jefffrey your trolling is p weak
 
I know
 
6:03 PM
just repeating "no" over and over is not fun
 
I'm trying to learn
What do you recommend?
 
I recommend shutting the fuck up
 
@Mr.kbok well that always happens. Only counterable by experience
what tech are going to use?
I presume not Hate :D
 
best take a screenshot cos it's all about to be nuked
 
nuked already
Ok, I'm terrible at trolling. Got it.
 
6:06 PM
@BartekBanachewicz Name the TV show in which "Nara" was used.
 
oh fuck man
double blow
1. E. S. Posthumus broke up
2. It's because one of the brothers that constitute the band died.
 
@LightnessRacesinOrbit Match of the Day.
 
@LightnessRacesinOrbit The best TV show ever: Terranova
 
"There was nara lot in in it, but we got caught on the break in the second half"
 
6:09 PM
@LightnessRacesinOrbit rip. All I remember from those guys was the music in the spiderman trailer though
so epic
 
@Jefffrey I quite liked Terra Nova
@MartinJames lame
 
Now you are trying to troll
See, I know how to detect it, but don't know how to reproduce it
 
@LightnessRacesinOrbit Sure, and so well-suited to the Lounge.
 
@Jefffrey That's better
 
Xeo
why am I still at work
I should change that
 
6:15 PM
@Yakk The issue is not double. It's the built-in =, which doesn't modify its right operand. — T.C. 37 mins ago
lol that's quite good too
 
yay holiday
 
@BartekBanachewicz Prolly C# w/ console mode
It's the language I'm most productive with
 
C# is great
9
 
I really liked this enum namespace thing, too bad MSVC shat itself upon seeing it
 
@CatPlusPlus fanboy! burn him!
@CatPlusPlus Cat said he likes programming cat said he likes programming
@CatPlusPlus Haskell is better
^ pick the most offensive one
 
6:33 PM
@BartekBanachewicz That's what she said
 
I think I'll make a C# library for low-level console manipulation in preparation for the jam
Which OSes are the jam jury/contestants using?
 
@Mr.kbok most of the people windows, some are on ubuntu/mint
 
noobuntu
 
Hmm the marmalada rules might allow me to actually do something.
 
@Mr.kbok Perhaps ConsoleEx would suffice?
 
6:39 PM
Fuck consoles
 
@MartinJames Nah...all rectangular and sharp corners. Not even fun to hold.
 
@JerryCoffin All the functionnality described (except drawing shapes) has been included in .NET 4.0
What I'd like is fullscreen mode and event-based keyboard input
Guys, gotta go. see ya later
 
@Mr.kbok lol, you mean like a GUI app?
 
user1804599
@CatPlusPlus C# is terrible.
 
@райтфолд I've used worse.
 
user1804599
6:45 PM
Perl is awesome.
 
You're terrible
 
Perl is like Ruby, only actually worse.
 
user1804599
@CatPlusPlus No, I'm not.
 
@MartinJames Debatable
 
I'm writing an example of implementing a linked-list using std::unique_ptr, though I'm worried this way of reversing a linked-list is somewhat hard to grasp.. what do you guys reckon?
        auto curr = std::move (first);

        while (curr) {
          std::swap (curr->next, first);
          std::swap (curr,       first);
        }
 
6:51 PM
this is not going to end well
 
lol unique_ptr for a linked list
 
@CatPlusPlus I'm not sure I see the humor (well honestly, I'm very sure I don't see the humor)
 
Oh hey Greece still exists
 
It's wrong.
 
what is.. wrong?
 
6:55 PM
@FilipRoséen-refp Stack overflow at list destruction, nice
 
Everything
 
@R.MartinhoFernandes I'd say so, why isn't that the ownership semantics?
 
The ownership semantics of nodes are not those of unique_ptr
 
@FilipRoséen-refp "Wrong" is a word signifying incorrectness, inaccuracy and/or immorality.
 
@JerryCoffin you funny man.
 
6:56 PM
@JerryCoffin IRTA "immortality" :P
 
What is a word, a miserable little pile of letters
 
The nodes belong to the list, not to their previous ones.
 
@FilipRoséen-refp Thank you. I'll be here all week. Be sure to tip your waitress.
 
@R.MartinhoFernandes you can treat each node as the beginning of a list, that means that one node owns the other - so I can't see how the ownership semantics of nodes are not that of std::unique_ptr
 
But do you destroy everything if you remove the first node?
 
user1804599
6:58 PM
Use a garbage collector.
 
@R.MartinhoFernandes erhm, that was wrong - anyhow, release the ownership and assign the next node as the new start of list
 
If not, you'll be essentially fighting against the unique_ptr semantics.
Yes, you can make it work with unique_ptr but it's full of code fighting against it.
 
I don't see where the fighting is, to be honest
 
Who's fighting now
 
@R.MartinhoFernandes The only thing I see against it is allocators and unique_ptr destructors being hilarious in combination.
 
6:59 PM
If you're going to release the ownership every time you destroy a node, the ownership shouldn't be there in the first place.
The only time you destroy nodes and let the unique_ptr do its work is in the list destructor, a strong sign the list is the real owner.
 
@R.MartinhoFernandes ... you don't release the ownership, you move it
 
@R.MartinhoFernandes You don't need to do that. The unique_ptr can handle all cases (excepting the allocator fun I already referenced)
 
@R.MartinhoFernandes I was too quick to judge my first written solution std::swap (first, first->next) is equivalent to popping the first entitiy
 
no, you need first = first->next;.
you just referenced first from first's unique_ptr member.
 
@Puppy I have no idea of what you are on about, but that's inaccurate
 
user1804599
7:02 PM
std::list
 
you don't know what I'm talking about but by default it's incorrect?
 
@Puppy I don't need first = first->next, first is a std::unique_ptr<Node> and each Node has a data-member std::unique_ptr<Node> next
 
yes, I got that part.
first = first->next pops first.
swapping first and first->next just references first from inside itself.
 
@Puppy unique_ptr
 
yes, I got that part.
 
7:04 PM
I'll leave you two now.
 
oh I neglected to std::move.
too much C#...
 
@Puppy there, fine, valid argument.
 
@Puppy up for warmup today?
 
up for whatnow?
 
7:07 PM
Warmup jam :D
 
oh, a preparation marmalade?
hmm
 
I am crazy as fuck because just got back from work
 
perhaps later tonight I will be up for a short (1h maybe) jam.
I'm hungry and I've got a bunch of Starcraft 2 to watch
 
Cool
1h sounds ok
 
user1804599
Beh.
 
7:08 PM
I'll go and play some guitar and check back here in say am hour
 
user1804599
com.twitter.concurrent.Broker has no reader and writer ends as separate types so you can only have the reader–writer pair as a single object invariant in the element type.
 
user1804599
Time to write two classes.
 
You're such noobs. Having a "practice" game jam lol
 
user1804599
Problem is aaaaaaa they can't be covariant or contravariant either since they have to hold on to the broker.
 
user1804599
oh hay this works anyway. cool
 
user1804599
7:14 PM
yay
 
@LightnessRacesinOrbit yeah totally so noobish
 
7:29 PM
MFW I see a git branch
@BartekBanachewicz No idea if that can be useful, but here we go: media.steampowered.com/apps/valve/2015/…
 
@Jefffrey cc @Borgleader @melak47 @ThePhD
 
how big is that pdf?
 
0
Q: Boost Graph : Test if two vertices are adjacent

VutzI'm new in using C++ boost library in particularly the boost graph library which a needed to try coding some algorithms where i commonly check the adjacency of two vertices and dealing with other graph concepts like computing graph invariants. What i know is that we can iterate through adjacent v...

 
chrome seems kinda stuck trying to render it :v
 
Come on, everyone read "testicles" there
 
7:36 PM
@Jefffrey nope
 
@Jefffrey nope
 
@Jefffrey nope
 
@Jefffrey nope
@Jefffrey wtf
 
Ok, got it. Thanks.
 
@Jefffrey NOPE
 
7:45 PM
it's a simple comparison between Iterator and ConstIterator, the op== member function of that template should match that :/
 
@melak47 chrome sucks. Opera downloaded it and Evince showed it in <1s from clicking
 
@sehe yeah only 10 mb. odd.
 
In-browser PDF rendering was always shit
 
Especially once the rendering is being done server side
 
"DX12 & Metal further contributed" Did Microsoft help with Vulkan?
 
Why would someone implement a liked-list with any_ptr? Is there some deficiency in std::deque?
I can understand a liked-list with an actual 'real' pointer, or 'real' link-indexes, (eg. for comms with a C API or a driver).
 
any_ptr?
 
Unliked list
 
> As far as I am concerned, C++ can rot in hell. This monstrosity encompasses the worst of low-level programming and the worst of the OO paradigm.
lol
 
woo const_cast to the rescue
@Nican TAINTED
 

« first day (1607 days earlier)      last day (3333 days later) »