« first day (794 days earlier)      last day (4380 days later) » 

user142019
09:00
Intel documentation. ;_;
user142019
Well, time to download a 100k pages (pun intended) document.
@Zoidberg'-- Can't be worse than IBM documentation
@Zoidberg'-- hahahah good luck with those docs.
user142019
I have a friend who has a paper copy of it.
user142019
I'm an idiot.
user142019
09:05
Why don't I use Preview for a PDF document. T_T
TIL that in VC++ ostream::operator<<(streambuf*) copies data with sgetc+sputc. WTF? is it considered fast?
@GamErix I have no idea where you got this nonsense from but: #1 you are probably talking about Quake 3; and #2 no, it was not better, it was a very good approximation but it was not the optimal one.
@Abyx lulzies
user1182183
@R.MartinhoFernandes ah okay :P I read a article about it a few years ago, don't expect my drunk brain to remember every bit of detail ;F (not drunk atm)
Mwhahahah, Facebook bought Instagram and now changed policy to allow selling your photos. How surprising.
Facebook bought Instagram months ago.
09:11
Three months ago.
@Rapptz The deal was not finished at that time.
Still 3 months is like 3 decades internet time.
@Rapptz We are talking lawyer time here.
09:16
mawing chaps.
morning
god damn it, you got me trying to spell 'mawning' correctly
user1182183
@thecoshman :P
There is not enough innuendo on the starboard, I must slip some in!
user image
2
Best book cover ever?
09:20
I can't stop laughing, this entire thread is gold.
user1182183
user1182183
trolololol, depth-ception
0
Q: URL path including .DEPENDS in linux packages

Armen B.I've been searching all around the web and couldn't find any subjects on this matter. What does a URL with the extension .DEPENDS mean in Linux package installation? from what I've understood, it's a file with newlines of URL's indicating it's dependency packages from outside sources. I am most ...

:)
lol I think it's a reference to the book he's using
@GamErix Farming simulator!
09:22
That's a book.
user1182183
@Pubby 2013 ye xd
Oh it's a book?
So it's actually a legit tag...
user1182183
@Mysticial anyone with enough rep can make a tag
user1182183
Actually, is there a tag.. Pawn-Sux ?
There's also like 13 questions on that tag.
user1182183
09:23
hopefully not xd
lettuce c++
user1182183
@Pubby any good recomendations on C++ books in polish language or dutch?
@Rapptz C and C++ in the same book? what black magic is this
@GamErix learn English :S
@GamErix 1) I don't speak polish or dutch 2) the only C++ book I've read is Effective C++
user1182183
09:25
@thecoshman I know english but in C++ you use always words which get me a headache, which I have anyway because I need to wait for a surgery >_>
not brain surgery I hope? :S
user1182183
no
Let Us C is the best book ever
user1182183
my salivary gland is kinda "fucked up" and instead of giving spit into my mouth it gives spit to the skin in my cheek, now I'm walking like a mutant and it fucking hurts.
user1182183
They're going to remove it in.. january.. january 14th ;/
user1182183
09:27
I look like a super ugly fat mutant fuckhead.
user1182183
While i'm not fat -.-'
user1182183
anyway I hope you guys know what I mean with "salvary gland" - google translate
this seems to attract people with really odd conditions
@GamErix the bit that makes spit :D
deadly spittle
09:29
@Rapptz ... what?
user1182183
@thecoshman ye and swallowing hurts, at least talking does not hurt so I still can fucking scream when I'm angry :F
user1182183
but breahing problems arise sometimes -.-' harder to breath because of all that pressure that's build up.
user1182183
and the whole day I''m like: please shoot me, whatever to avoid that pain ;F
user1182183
now go to school, work, make a living, do stuff, make homework, busy life.. owh gawnd
user1182183
TeenDrama beginz.
user1182183
09:31
Add tag plox xd
so, your cheeks are just constantly filling up with more and more sliver?
user1182183
nah just joking about the teen drama :p
Not sliver. Silver.
user1182183
@thecoshman something like that ye, well, spit.
09:31
He will be rich in a few months.
user1182183
@R.MartinhoFernandes who, me? noh, srsly. A polish guy in the NEtherlands rich? IF I rob the bank :F
lol, typos make for amusing reading at times :P
That's why they are removing: there are no laws to tax salivary glands that produce silver, so the government will force him to remove it.
user1182183
@R.MartinhoFernandes ahsoo xd
@R.MartinhoFernandes probably would be covered by some sort of tax
user1182183
09:33
kinda funny how they depend on me at work. One day I was sick at home and they've only had problems. I should ask for a rise XD
@thecoshman I have no idea. Just making shit up.
@R.MartinhoFernandes me neither, just presuming
oooh, two step authentication for ssh server... very swish
user142019
Dammit I downloaded the wrong manual. No wonder I couldn't find anything about paging.
TWTF: Windows 8 changed all file permissions in my repo from 644 to 755; Now git wants to recommit everything. Microsoft, I did not tell you to chmod anything!
user1182183
anyway, g2g2 school. was nice having lil bit of social activity with you guys xD Now.. back to reality :p let's PARTY <- little gift for you guys to humour you up. SAFE FOR WORK.
09:36
Is two-step authentication for SSH worth it?
combined with an email alert for any failed logins, and perhaps even pub-pri keys... I might finally be willing to open my pi to incoming connections
@R.MartinhoFernandes I'd say so
considering how little it would get in the way
@Nican Wut. Windows knows nothing about UNIX file permissions, or does it?
@thecoshman How little?
I think I am happy with zero-hassle public key authentication.
@R.MartinhoFernandes admittedly more so then psk
@R.MartinhoFernandes Using cygwin.
Then blame cygwin.
@thecoshman A lot more.
It changes from amortized zero to linear.
09:39
It depends if I can set it up so that I can use psk or two step
(Well, it can actually be zero if you don't password-protect your private keys)
thus letting me use psk from my desktop at home but still login if I am out and about
@thecoshman Wait, what is psk?
Pre-shared key?
@R.MartinhoFernandes yeah...
though not really the right term
ok... libcxx uses (i|o)streambuf_iterator to implement ostream::operator<<(streambuf*) but it's same char-by-char copying
09:40
PSKs are used for symmetric stuffs.
it's just you already have to put the one key on the machine you are connecting from, so it's sort of pre shared
psk is easier to say then 'public/private key pair'
You could say "p/pkp"! ;)
Not really.
@Mysticial FGITW!
@Abyx Yeah, most (all?) iostream implementations are just dead stupid.
09:42
probably "all" =\
@thecoshman I carry a private key in a USB flash drive.
@Pubby :(
I've lost my touch.
Or maybe it's too late at night. :(
@R.MartinhoFernandes ooh, sounds risky to me :P
Well, if I lose it, I can simply unauthorize it.
but sure, you have to balance security with practicality. A closed server is not that handy :P
09:44
if you're getting data from a user on std::cin, can you have a timeout, so it stops waiting after x seconds or so
I mean, is that a good way to handle the case where input is not given
It's password protected, but I honestly have no idea how secure that is.
but yeah, it's a nice idea... I might look at getting one of those tiny USB sticks
@R.MartinhoFernandes depends, what do you use for the password?
What I use for all non-generated passwords: crappy poems of my own.
12345 obviously :)
same combination as my luggage!
I guess that if I was a bit more paranoid I could set up some secret HTTP endpoint for unauthorizing that key. Then I could kill it from anywhere with a browser.
09:47
oooh, I really hate websites that impose arbitrary rules on your password
@thecoshman yes >_>
@R.MartinhoFernandes you mean some sort of panic site?
don't forget mr R, that you can have one user who can log in via that p/pk and another that can use two step
thus, if you do feel the p/pk is compromised, you can log in and block that key
Yes, but HTTP is more readily available.
or, you could get a cheap phone, which you can call, and when it rings, it triggers a lock down script that prevents access from the internet. and can only be reset from being physically at home
and what are the chances or some one prank calling that random number?
@Pubby There is already a 10th Edition? Wow.
09:52
....what are we talking about protecting here? do you have a nuclear power plant in your basement?
perhaps get even fancier, some sort of android phone, with a custom app that can just reject calls, but from a certain number, yours, it will then trigger said script :P
@melak47 shh... they'll here you
@melak47 I admit nothing, deny everything and launch counterattack.
@R.MartinhoFernandes not cool man, don't irradiate my city
@FredOverflow And yet no 1st edition of the Lounge<C++> book :(
> His best-selling books include Let Us C, Understanding Pointers In C and Test Your C Skills. These books are specific to the long outdated Turbo C compilers, and do not contain reliable information on standard C language.
Aw, and I already considered buying Let Us C :(
09:54
@Pubby still trying to find a publisher willing to print "It's shit"
I wonder if anyone has written a book called "To C or not to C"
@Pubby We could make new year's foobar (what do you call it when you plan to change your life on new year's eve?) to write that book in 2013 :)
new year's scope resolution
@thecoshman Well, I could set up that HTTP endpoint to generate a nonce and SMS it or e-mail it to me, to prevent nuking by third-parties. But not sure if it is worth it: nuking by third-parties only results in no one being able to SSH on the road.
@FredOverflow resolution
09:55
@melak47 "That is the question mark colon!"
@R.MartinhoFernandes what do you mean by endpoint btw?
let's name the book "led sepples"
TIL copy_n doesn't work with *streambuf_iterator in VC++ =\
It is a minor inconvenience. As soon as I get to one of my trusted machines, I can make a new "on-the-road" key.
@thecoshman The HTTP kill switch.
@Pubby Who would be the target audience of the book?
09:57
@FredOverflow middle aged women
I think you are approaching this from the wrong angle.
I don't think Fifty Shades of C++ would be a good idea.
@Pubby Is your life in ruins? Did your husband leave you for a teenager? Do not worry, help is near: The Book<C++> has arrived!
@thecoshman Just some small server that is waiting for some POST request at a particular URL.
so... you carry nothing with you. Get to a machine you feel comfortable using, contact a HTTP server, that responds with nothing but triggers the generating and sending of an SSH key that you can then then use to connect to your server
@R.MartinhoFernandes what I thought
@thecoshman No, not that. That server only exists to unauthorize the on-the-road key I carry.
10:00
wait, what's a 'nonce' that a typo?
It is for containing damage, not exarcebating it.
In security engineering, nonce is an arbitrary number used only once in a cryptographic communication. It is similar in spirit to a nonce word, hence the name. It is often a random or pseudo-random number issued in an authentication protocol to ensure that old communications cannot be reused in replay attacks. For instance, nonces are used in HTTP digest access authentication to calculate an MD5 digest of the password. The nonces are different each time the 401 authentication challenge response code is presented, thus making replay attacks virtually impossible. An example is in ordering ...
oh I see, so you just have a server that sends you a code that you can use to de-authenticate your p/pkp
hmm... I still think having a second user that can be accessed via OTP is easier
@thecoshman It is also your new weakest link.
@thecoshman The point is, if don't want third-parties logging in, you don't want to make it easier to login.
Of course that sucks if you leave your private key in your other pants, but well.
10:12
Hi everyone... considering point to be a struct point { int x; int y; point() {...} } is it wrong to do a.push_back(point()); considering a to be an std::vector?
No, that's fine.
can you get std::cin to stop blocking without input from user?
In C++11 you may prefer simply a.emplace_back();, but push_back is fine.
@TonyTheLion No.
There is no such thing as user in C++.
10:13
well, cin waits for something
The console is just a file on a drive that may take very long to read.
strange...
@TonyTheLion Consider input redirection.
@R.MartinhoFernandes breaking news: C++ is a godless language
@R.MartinhoFernandes woah, what a funny concept. So it's really a file...
10:15
A C++ program has no way to tell if std::cin is reading from a pipe, or from a file, or from an actual console.
As far as C++ is concerned, they are all one and the same.
It just happens that the console sometimes acts weird and takes forever to read the next input.
Tonight the C++ User Group Berlin meets: http://www.meetingcpp.com/index.php/eventreader/events/c-user-group-meeting-berlin-16.html #cpp
Oh, there's a C++ user group?
in Berlin
hello everyone...
Hmm, seems they'll have some talk about "C++ Move Semantik", i.e. in gibberish German.
@R.MartinhoFernandes meh
0
Q: How to Change Default Console window(cmd) on Code::Blocks IDE

PattinsonHow to change default cmd terminal on Code:Blocks. Is it possible or not to do that? In Ubuntu I had change it by replacing xterm -T $TITLE -e with gnome-terminal --title=$TITLE -x on Settings>Environment>Terminal to launch console programs but in Window 7 OS (for my case) that field is dis...

please help me on above question...
10:19
-1 for drive by linking.
@Pattinson please read the room rules first
You could have like, asked us how our day went or something like some people do.
@Abyx I got no response and as it is c++ group so I post here as Anybody here know or not... @Rapptz (n)
to be fair, how could he have known there are real people here who have days
@Pattinson FWIW, 25 minutes is not a long time.
10:22
btw, shouldn't it be asked on superuser?
Don't think so.
I think since it's an IDE it's allowed here.
Just like asking VS questions
(...) but if your question generally covers …

a specific programming problem
a software algorithm
**software tools commonly used by programmers**
practical, answerable problems that are unique to the programming profession
VS is special.
Why?
10:23
Because it sucks. <insert bad joke about Special Olympics>
bcoz I like use it.
it's pretty good at C#.. I guess
Also, fuck you InDesign. I don't want to get replacement characters. I don't want to jump through hoops to read non-Unicode characters, because I don't know what fucking hoops I need to jump through to read them. ARrhgrhgrehrh.
@R.MartinhoFernandes I had seen lots of question on those about os or ide which hadn't got any answer... or received only few incorrect answer...
Is there a better to way to get the last inserted index of a std::vector other than myvect.size()-1?
10:28
Why would you want that?
doesn't std::vector also have a back() method?
@AndreiTita, I need the index, not the reference to the object...
I don't like the idea of manipulating indices manually.
If you want the index you're better off with size()-1...
10:29
myvect.rbegin() gives you an iterator to the last element.
@R.MartinhoFernandes, I just use that as a reference to a particular object inside the vector.
@Jeffrey Then no, there isn't a better way.
user142019
Intel should publish a manual on how to read the Intel® 64 and IA-32 Architectures Software Developer Manual.
So you want something like std::extent but for vectors? Isn't that just like size() though for std::extent I mean.
@Zoidberg'-- If I were you, I would proceed to something else and leave long mode for later.
2 hours ago, by R. Martinho Fernandes
@Zoidberg'-- hahahah good luck with those docs.
10:34
man it's 5:35 AM and I can't think straight
(Though I remember reading the paging docs and actually understanding them)
user142019
@R.MartinhoFernandes Introspection huh.
user142019
You're a robot.
Btw, have you looked at the OSDev wiki?
I know from experience it isn't terribly helpful for most non-basic stuff, but in this case it appears to have step-by-step instructions.
user142019
10:37
Yes. It says how to go into long mode, but not whether enabling paging is the same in long mode as in protected mode.
I would think so, but there is always the Intel manual :P
user142019
Jup. :P
IIRC it consists of simply setting a bit in one of the control registers.
user142019
This should do the job (besides setting up the page directory): github.com/daknok/sulfur/blob/master/kernel/arch/x86/paging.c
Is it me or is recursion really confusing to think about?
10:39
just you :D
@Zoidberg'-- Yeah, something like that.
for some reason, if recursion comes in the picture, I get completely lost
what's confusing about recursion?
how the calls are made
10:41
@TonyTheLion I would not say it is just you (I see that complaint a lot), but I honestly cannot relate to that.
if you're doing a fibonnaci in the simplest manner, like fib(n - 1) + fib(n -2), now what order are these things called in and when is the result of this set of calls gotten?
well yeah it is confusing for a lot of people I guess
I always feel like I missed something because recursion always felt simple and natural to me.
well if you took a lot of math classes it shouldn't of been confusing
@TonyTheLion The order is irrelevent, since there are no side-efffects.
10:42
so if n = 5, then when do you get the result of fib(4) + fib(3) ?
They can be even called in parallel if you want.
@TonyTheLion When the two calls are over?
I have a feeling I did not understand the question.
@Rapptz I was terrible with math when I was still at school, so it was never my strongest subject, though I am getting better
@TonyTheLion I stumbled across a question on Math SO which has a recursive binomial calculation method that for constant P, and variables N and K, it calculates the binomial(N, K, P) as P*binomial(N-1, K, P) + (1 - P)*binomial(N-1, K-1, P), returning 1 when either N or K is 0
10:43
@TonyTheLion Just expand until you come to a point where you have an explicit value.
@R.MartinhoFernandes but they are only over when the whole thing returns, ie when n <= 1, then it has to travel back up the call stack
He asked how many calls it would make, and for the life of me I didn't know
I couldn't figure out a way of calculating a formula for the number of recursive calls
Well for your example, addition is commutative anyway. :|
@Neil right, but how does that help me? (besides adding more confusion)
I did stumble upon an interesting axiom which is that in order to determine the number of calls of a recursive function in a non-recursive way, you must first have a non-recursive way of determining what the recursive function solves for
@TonyTheLion It doesn't, simply agreeing with you :)
10:44
ah I see
You can just imagine it as a chain of events
I drew this fib call as a binary tree of calls
is that a good way to imagine it?
It's easy to think about if you think in terms of, "I have N, how do I define N?"
ok thanks
Defining it in terms of f(n) just means calling recursively
10:46
@TonyTheLion that's how I was thinking about it when I said chain of events
though I think in reality it's optimised.
I don't deal with recursion too much in programming really I tend to avoid it unless I do TMP or constexpr.
@TonyTheLion When n = 1, how would you calculate fib(n)? When n = 2, how would you calculate fib(n)? When n=3, etc.
the actual return value of any fib(n) call would be 1 or 0, because it never actually returns before it reaches there
right?
Thinking like that, you'll quickly realize how to write a recursive function
hmmm interesting
;)
@TonyTheLion Eh?
10:47
@TonyTheLion That is only the return value of the calls in the leaves.
Then the return values of the other calls are built up from those.
The recursive functions that return first are the ones which are trivially solveable
Followed by the callers which use those values in order to make their return values, etc.
I like the fib function
While we're talking about recursion...
O(fib(n)) = fib(n).
-2
Q: Difference Between Recursion And Function

ShivamHey guys I am not new to programming but I really dont know the difference between recursion or function...I know these are the basic things so thats why I want to clear them. Also are there functions used in java or those are called methods in java? Now coming to C, I wrote a program of factori...

10:50
@DeadMG What?
@R.MartinhoFernandes The complexity of that really silly recursive fib is fib(n).
Ah. Notation fail, though.
maybe
I've never seen O used except as like, O(expression in variables)
Big-O notation?
Book chapter 1: jsfiddle.net/rEVkL
10:51
T(fib(n)) ∈ O(fib(n)) would be the strictly correct notation, but T(fib(n)) = O(fib(n)) is a widely accepted abuse of notation.
@Pubby Huh, you went all out with the CSS
@Rapptz It got generated from asciidoc
Oh. Okay then.
Wait, you are writing a book in jsfiddle?
I need to find breakfast
10:53
@R.MartinhoFernandes using jsfiddle as pastebin
I dunno what to write though
That's not important for a book, right?
the formatting and pictures are more important
I've rewritten this BigInteger class 5 times but I'm still not satisfied with it :(
y'know
I was talking to Tony and I finally came up with a fairly concise rule for the best interfaces
user142019
@Rapptz I once wrote a rational class. It was fun.
10:57
@TonyTheLion Does this help? i.sstatic.net/LPQsD.png (I wish I could make gifs in paint)
@DeadMG "The best interfaces are better than all the others."?
@R.MartinhoFernandes He said earlier that's how he imagined it didn't he?
I was busy :(
@Zoidberg'-- I don't know what a rational class is
A class that reasons.
Does it turn a floating point to a rational number?
10:59
^ image for the book
user142019
@Rapptz you know, an object of rational represents one of the rational numbers.

« first day (794 days earlier)      last day (4380 days later) »