« first day (785 days earlier)      last day (4177 days later) » 

9:00 PM
I've done a if like if ((900 % k) == 0) do somenthing
but this does not work.
 
@StackedCrooked It's probably not idle, it's seeding.
 
@Rapptz Transmission is supposed to be good, at least last time I checked.
 
user142019
@Favolas if (i % 3 == 0)
 
It's seeding 0.1 kB/s. This does should not ever require 0.1% CPU.
 
only 0.1 kb/s seed?
Just use a different client
 
9:01 PM
@Zoidberg'-- THANKS. So simple :)
 
@Favolas That wasn't math by the way >_>
 
It's fluctuating between 0.1 and 0.7. Now it's stable at 0.0.
CPU usage is 11%.
 
user142019
@Favolas you can also try this:
 
I have a 8 core machine.
@Rapptz I'll check out qTorrent.
Wasn't @R.MartinhoFernandes working on a torrent client?
 
9:03 PM
Thanks.
 
user142019
map (f . snd) $ filter (\(x, _) -> x `mod` 3 == 0) $ zip [1.3..] xs
 
I've also used rTorrent on my VPS. But a GUI would be preferable :)
@Rapptz Btw, why would you prefer it over Transmission?
 
It's lightweight. I switched over to it when uTorrent turned to v3.0. Though I've never used Transmission.
I guess I seed a lot more than you though
 
user142019
map (f . snd) $ filter ((== 0) . (`mod` 3) . fst) $ zip [1.3..] xs
 
user142019
Because everybody likes point-free style.
 
9:06 PM
@Rapptz Apparently nobody wants my files :(
 
You've got xs in there
 
extra-small
 
user142019
FCUK
 
@StackedCrooked The problem is that you're running a Mac. :P
 
9:09 PM
@StackedCrooked You're running Mac.
 
Bluntness.
The minds here.
 
Xeo
Hm, the Ebi-Furai were a little underwhelming for nearly 4eur. :(
 
user142019
I meant map (f . snd) $ filter ((== 0) . (`mod` 3) . fst) $ zip [1,3..] xs.
 
user142019
@CatPlusPlus the filter predicate is point-free.
 
9:12 PM
@Zoidberg'-- But the expression isn't
 
user142019
Making that expression point-free would be a hell. :P
 
user142019
I’d also have to remove f.
 
@Xeo Sorry to hear that. I must say that I was rather careless with concerning money when I was in Japan. I didn't measure the satisfaction against the price. (My friends thought I was crazy.)
 
Xeo
Heh, I don't think I could hold back either.
 
hmm
I'm actually finding myself tempted to use a goto
 
@DeadMG Go for it!
 
user142019
I could also rewrite this as a list comprehension.
 
@DeadMG facebook does it, too.
 
Xeo
@DeadMG :O Oh noes! You must be doing something wrong! Didn't you just say that your code is not shit anymore?! /sarcasm
 
@bamboon You did not include <tuple>
 
9:15 PM
@bamboon #include <tuple>
 
Xeo
@bamboon Well facebook sucks.
 
@Xeo Eh. I need to "break" out of an if.
 
Xeo
Make it a lambda and return!
 
Second time I've seen someone forget to include a header in the past two days.
 
@Xeo Been thinking about that, but I need to do it a couple times in a row, and the lambda version would be really rather icky.
 
Xeo
9:16 PM
@DeadMG for(; cond;) { ... if(cond2) break; ... }
:3
 
user142019
[f (snd x) | x <- zip [1,3..] xs, (fst x `mod` 3) == 0]
 
Xeo
#define breakable_if(cond) for(; (cond);)
 
@Griwes doesn't help
 
I think Dijkstra was making a claim for structured programming over the goto spaghetti that was rampant at the time. But for some reason people turned against goto, condemned it, lynched it, without actually focusing on the structured programming point. That's why Java is popular today.
 
@Xeo That's worse than goto, I think.
at least I'm only using goto across like, ten lines of code.
 
Xeo
9:18 PM
@DeadMG No, really?
 
@DeadMG doesn't help
 
Why are you even hesitating? Are there any potential pitfalls? Is your code suddenly gonna flop into a bowl of spaghetti?
 
@Griwes doesn't compile?
 
Xeo
sigh I just can't get the disposable chopsticks to split perfectly in the middle.
 
9:19 PM
Neither can I.
 
@bamboon Doesn't matter. That problem is somewhere else, go figure it out by yourself.
 
Or ask on SO.
 
Xeo
@bamboon tuple constructor is explicit.
 
damn, don't spoonfeed him :(
 
Xeo
9:20 PM
And return {...}; is copy-init aka can only call implicit constructors.
 
@Xeo Why dafuq would the Standard do that?
 
Xeo
@DeadMG Fun fact: Two-argument ctor is not explicit!
 
@Zoidberg'-- Thanks but that is more difficult to understand compared with the previous solution
 
Xeo
(to be consistent with std::pair)
 
Another question.
 
9:20 PM
Is there ever a reason to make a two-argument constructor explicit?
 
@Xeo I carry a pocket knife -- they always come out perfect!
 
Xeo
@StackedCrooked it's not explicit
And no
 
@Xeo ok thanks, so it shouldn't. clang 3.1 compiles it fine.
 
Not helpdesk
 
Xeo
9:21 PM
@DeadMG That's what almost everyone seems to ask themselves.
 
@StackedCrooked Yes -- if the second one has a default.
 
Xeo
@bamboon May be a problem with the stdlib
 
user142019
lol
 
Posting it again won't help you.
 
user142019
Asking the same question after it got deleted is foolish.
 
9:22 PM
didn't see that
sorry. My bad
 
Xeo
6
Q: Can learning C or C++ be dangerous to my computer?

Gordon PotterIs there such a thing as dangerous knowledge when just starting out learning C or C++? In other words what is the likelihood that I could "accidently" write and compile a code snippet that formats the hard drive, renders the OS unusable, or worse case scenario silently deletes random files on the...

What the...
 
2
Q: Can Win32 API be dangerous to my computer?

will griffithsIs it possible to accidentally format the hard drive, damage the OS in some way when learning the Win32 API? This question is an extension of the one asked here: Can learning C or C++ be dangerous to my computer? The reason I ask is as follows. Stupidly, I created an array of HWNDs but loope...

What a question title!
 
He thinks that he might accidentally run "system codes" that will damage his OS or machine.
 
9:24 PM
Can spilling coffee be dangerous to my computer?
 
@Xeo yeah, probably libc++
 
Xeo
@bamboon hm, trunk libc++ still allows that.
Lemme check their tuple header...
 
@Mysticial Depends on the coffee. If it has too much caffeine, the computer may run enough faster to increase heat output. Iced coffee can help prevent heat problems, but hot coffee exacerbates them. :-)
 
Coffee sucks and you've ruined your computer forever
 
@Mysticial If you spill it accurately inside the internals.
 
Xeo
9:29 PM
@bamboon: Funny, the header synopsis at the top has it as template<class... U> explicit tuple(U&&...);, but the actual implementation leaves the explicit out.
 
@Mysticial However, if they find you've used too much coffee, you may lose all 7 of your world records on account of drug use.
2
 
@Xeo worth a bug report?
 
Xeo
Dunno, might be deliberate.
 
@JerryCoffin fuck...
 
@JerryCoffin There's is no authority that oversees this like there is in sports. :D
So he could shoot cocain if he wanted.
 
9:30 PM
Wait, I have 7 world records?
 
@StackedCrooked ...for which we can be eternally thankful!
@Mysticial Think "Lance Armstrong".
 
@JerryCoffin oh right... haha
 
> but in 2012 he was disqualified from all his results since August 1998 for using and distributing performance-enhancing drugs and was banned from professional cycling for life.
Wow, that's infinitely severe.
> The USADA report called Armstrong a "serial cheat who led the most sophisticated, professionalized and successful doping program that sport has ever seen".
Lol, I don't follow sports, but this is quite dramatic.
 
@StackedCrooked Worse, as far as I can see, absolutely none of the so-called evidence they base this upon would qualify as evidence in any court on the planet.
 
user142019
Yes. Learning C or C++ may cause your head to explode; the resulting blood and brain-matter may damage your computer. — Mark Sep 13 '09 at 23:18
 
9:37 PM
@Zoidberg'-- That's unlikely to penetrate the internals. It should be ok.
 
user142019
@StackedCrooked It’s a big explosion.
 
user142019
So, also bone shards from your skull.
 
@StackedCrooked Probably better to be safe -- here's your GWBASIC and a padded cell.
 
user142019
It’s like a grenade.
 
@Zoidberg'-- Hm, I agree that if it's big enough to break the wall, then your computer is likely to be damaged.
 
user142019
9:39 PM
@JerryCoffin If you want to be safe while learning C++, try template metaprogramming. No side-effects.
 
user142019
C is fun.
 
@Zoidberg'-- C: it's almost as fun as dental work!
 
user142019
Screw Python. I’m going to use Haskell.
 
I read that the author of Logo had an accident that damaged his brain and the tool for rehabilitation is logo.
 
user142019
I read that as lego.
 
9:42 PM
> His rehabilitation team is using some of the very principles of experiential, hands-on learning which he pioneered to aid him in recovery.
@Zoidberg'-- > Papert has also collaborated with Lego on their Logo-programmable Lego Mindstorms robotics kits.
 
user142019
When I first read your sentence, I thought you meant they repaired his brain with LEGO.
 
I think the resolution of Lego blocks isn't high enough.
 
user142019
I think plastic is not good for your brain.
 
It would make him a little blunt-minded.
 
user142019
LEGO Mindstorms :D
 
9:45 PM
Nothing against plastic. AFAIK bacterias and viruses can't penetrate it.
 
sbi
@Zoidberg'-- I'd believe that immediately. I have been using Lego to teach math to the kids for a decade.
There's nothing like a standard Lego trick to explain show a kid why 2x4 is the same as 4x2.
 
user142019
That’s cool.
 
38+5=43 I estimate your kid to be of age 6 or 7.
More likely 7.
 
sbi
@StackedCrooked For more than a decade now, at least one of my kids has always been close to 6 or 7yo.
 
Huh, are you running a human experimentation lab?
 
user142019
9:48 PM
Just tell them that the natural numbers form a commutative monoid under multiplication! :D
 
@sbi I still remember in school when they marked my answer as wrong because it was going from a picture, and I wrote 3x4 and they wanted 4x3...
 
sbi
@JerryCoffin Bad school. But thus were our school days.
 
@JerryCoffin Did they mark you wrong for 2 + 5 or 5 + 2?
 
@sbi Yeah -- contrary to a lot of doom-sayers, I think schools are quite a bit better now.
 
sbi
@StackedCrooked When you have more than two kids, they are usually 2-4 years apart, which tends to make sure one of them is always close to a certain age range.
 
user142019
9:50 PM
I used decimals instead of remainders in elementary school and they didn’t like it. :<
 
@Zoidberg'-- Stepanov mentioned that food poisoning caused him to be in a state of delirium. It was when he realized that the associativity of the sum operation is what enables it to be parallelized.
 
@Rapptz Not that I can recall.
 
user142019
@StackedCrooked awesome (well, the second part).
 
@Zoidberg'-- Remainders are for chumps. Though only useful for long division with polynomials.
 
sbi
@StackedCrooked Excuse me for a moment while I go to dig that old fish out of the trash can...
 
9:51 PM
@sbi Ah. Ok, I believe you. But only because I've known you for a while.
 
sbi
@StackedCrooked I am sure the robot, after a few msecs of processing would be able to confirm my claim.
 
Sorry for my slow meat brains.
:D
 
user142019
Just overclock ur brain.
 
@Zoidberg'-- But take note of the previous warning about caffeine.
 
Perception of danger requires at least 300 ms for a human. Makes me wish I was a robot.
 
sbi
9:53 PM
@Zoidberg'-- Just look at the puppy if you want to know where that ends.
 
user142019
@JerryCoffin Caffeine? meh
 
@sbi I think they are already sharing certain personality traits.
 
user142019
 
I rarely drank coffee as a teenager.
 
user142019
I rarely drink coffee as a teenager.
 
9:56 PM
It became a habit when I started working because we had the convenient coffee machine.
 
@Zoidberg'-- Note that I definitely did not mention coffee. Mountain Dew provides caffeine and sugar in precisely the proportion necessary to maintain alertness and concentration for extended programming. Coffee is just nasty!
 
sbi
I still don't drink much coffee, and my teenage days are decades ago. I have maybe one per month.
 
user142019
@StackedCrooked At my job we went to the supermarket or the McDonald’s every day to get food and drinks.
 
One cup lasts you a month?
 
user142019
Two months one cup.
 
9:57 PM
@Zoidberg'-- Ok.
@Zoidberg'-- Bweuurk.
 
sbi
@StackedCrooked I drink them when I feel like I could enjoy the taste, not for the caffeine. Now that I discovered that espresso machine which provides hot chocolate half across the building, I might drop considerably below a dozen coffees per year.
 
@StackedCrooked I'm pretty sure all the coffee I've ever had wouldn't add up to one decent sized cup.
 
@StackedCrooked Hey
 
sbi
@JerryCoffin Yeah, but then you dislike beer, so your taste isn't something we would need to consider.
 
I drink lot's of coffee.
@DeadMG Er... male, young, caucasian, ....
 
9:58 PM
@sbi ...unless, of course, you actually had decent taste.
 
@sbi It may satisfy you to learn that susceptibility to caffeine is down to genetic factors
 
sbi
@DeadMG Do you have a script running that plinks at you when the word "puppy" is dropped in the chat?
 
@StackedCrooked What makes you think I'm caucasian?
@sbi No, I literally just got back from eating a cracker, saw the entertaining picture, and then scrolled up to see the ensuing conversation.
 

« first day (785 days earlier)      last day (4177 days later) »