The Official Status Thread
-
I meant whatever I meant to mean
-
#USA
#USA
#USA
#USA
#USA
<f
-
If the powers that be actually corrected their broken-ass CLI command and changed the name from "processor" to "core", that script would be broken. But of course, they wouldn't, because there's 632,217,322 other scripts like that littered all over and they'd all "break".
You get number of cores on Windows from NUMBER_OF_PROCESSORS variable (or SYSTEM_INFO.dwNumberOfProcessors if you go via GetSystemInfo). I don't think there is one OS in existence that reports cores as "cores" as opposed to logical/virtual processors.
And that's because most of the time this information is used as "how many things can actually run in parallel", and the core/separate CPU distinction is not important for that.
btw
/proc
is an API — it's a virtual filesystem maintained by the kernel. All *nices have that,OSX included(coincidentally alsosysctl
interface).
-
WHAT!? THAT'S REAL? (There is text in this body you piss poor excuse for forum software.)
-
All *nices have that
Unless you go to something really old. More of a problem for most people is that the contents of
/proc
— apart from having one subdirectory per process — tend to vary wildly between different unices.
-
-
Huh, I thought it had it. It really is a special . Well, it has
hw.ncpu
via sysctl anyway.
-
I think you photo shopped that.
Or two people went and liked it. I wonder who those two people are?
RaceProUK and DogsB. Well, it may be that one of them joined AFTER that post was made, giving me concrete proof. I'll just check their profile page and wat
http://i.imgur.com/WDDXlMy.png
BOTH of them are "undefined". And yet it brings up a profile page. Because apparently someone registered "undefined" as a username.
https://what.thedailywtf.com/users/undefined/activity
Jesus fuck this goddamn piece of shit software.
-
But why are so many of these CLI programs single-threaded!?
The answer is probably "historical reasons" and "why do you need more than one core to do the one thing you're doing". In other words, laziness and inertia.
-
This is pngcrush. I'm feeding it about 1400 PNG images at once
Without knowing the specifics of pngcrush, you could, in theory, at least with Unix shells, write your shell script to run a series of processes instead of one.
-
Or because you can just run multiple instances and the OS scheduler will take care of spreading the load across cores. With no additional coding effort, even. If the work bits are independent of one another then multithreading buys you nothing over that except more possible bugs.
Without knowing the specifics of pngcrush, you could, in theory, at least with Unix shells, write your shell script to run a series of processes instead of one.
You can use xargs to do that with any program. That's why this paradigm is preferred over making every single program specifically multithreaded: composability.
Now sometimes you can't do that and really need specific multithreaded code, because there actually is sharing etc, but this is not one of those cases.
-
-
Or because you can just run multiple instances
That was, indeed, what I was getting at, but I CBA to piece together a shell script, since I haven't done that in years.
-
@Lorne_Kates said:
Or two people went and liked it. I wonder who those two people are?
RaceProUK and DogsB. Well, it may be that one of them joined AFTER that post was made, giving me concrete proof.
Or I could just admit I was the first to like it about a minute after seeing your post ;)
-
You can use xargs to do that with any program.
Well, as I said, I haven't written shell scripts in years.
-
Don't worry, seems there's some jellypotato potential on NodeBB as well, had it spaz out a few times.
-
This post is deleted!
-
(post withdrawn by author, will be automatically deleted in 42 hours unless flagged)
FFS man. Just leave your posts. You wouldn't be the first (or last) person to verbally assault blakey for being a cockhole.
-
I'm pretty sure I disabled history viewing from my posts. Are you a @boomzilla alt?
-- Post was an adaptation of the navy seal copypasta with rats and detetization, but it didn't get funny enough
-
-
Can we disable the delete button?
-
Can we disable the delete button?
Depends on the group referred to by the word "we."
-
Feature request: disable the rate limit on deleting posts
-
I should make a NodeBB plugin that disables the delete button for users with 5-letter lowercase usernames.
-
-
Isn't there one of the banning mechanisms that deletes all posts with the account?
-
It can't be used on users with more than 5 posts because why would you ever want to mass-delete more than 5 posts.
-
raisins
-
-
the HDD got shot in transport
People say the US has too many guns, but at least we don't generally go around shooting package delivery trucks.
-
That reminds me the HR department at WTFbanking takes horoscope seriously, and did some activity (don't know how to translate or explain that) where they asked us to inform our zodiac signs.
Previously they were big on the numerology thing.
-
That's Numberwang
-
It's self-evident that if the product was perfect, he would have found the value he was looking for. He didn't, so it isn't, so it's a flaw, so fix it.
If 1000 people use a product, and 999 of them can find the value, is the defect in the product or the induhvidual who can't find
his own assthe value?
-
@Lorne_Kates said:
You're not undefined. He specifically said two people called undefined.Or two people went and liked it. I wonder who those two people are?
RaceProUK and DogsB. Well, it may be that one of them joined AFTER that post was made, giving me concrete proof.
Or I could just admit I was the first to like it about a minute after seeing your post ;)
-
@blakeyrat said:
This reminds me of a time I was talking to dhl over the phone and swore blind that I couldn't see a number on the slip. It took the poor woman about two minutes to ask me to turn the slip over. Lo and behold the number was at the very top of the page.It's self-evident that if the product was perfect, he would have found the value he was looking for. He didn't, so it isn't, so it's a flaw, so fix it.
If 1000 people use a product, and 999 of them can find the value, is the defect in the product or the induhvidual who can't find
his own assthe value?It was a Christmas miracle.
-
Are you a @boomzilla alt?
No, but he and I are lovers. I saw it on his laptop during post-coital spooning. You just can't drag him away from his work.
-
@loopback0 said:
Which century is that carpet from?!
No idea. I can only hope that an unfortunate accident happens to it.It looks a bit like something my ex would pay extra for the vintage look.
-
Status: Hungry and very tired. Eating dinner at 01:30, having been up since 03:00 yesterday.
Status: Six hours of sleep, breakfast, caffeine and a dose of sSSτατuSuτατSSs. Feeling much better (although I'm not sure whether that last bit helped or hindered).
-
But everybody tells me the CLI is the "efficient" way to get work done! It's so efficient! Why, it maxes out my PC at a full 20th of its capability!
Meanwhile, the C# program I wrote in like an hour that produces those PNGs initially maxes out the CPU at 100% the entire time it runs. And it has a GUI. But I guess that's inefficient sorcery.
Without knowing the specifics of pngcrush, you could, in theory, at least with Unix shells, write your shell script to run a series of processes instead of one.
I get to post one of my favorite phrases. Yes, I could. But why should I have to? Where's the guy out there who WANTS pngcrush to run 1/12th as fast as it could? Maybe treat that guy as the mutant and not the default.
-
-
Meanwhile, the C# program I wrote in like an hour that produces those PNGs initially maxes out the CPU at 100% the entire time it runs. And it has a GUI. But I guess that's inefficient sorcery.
Are you going to post the source on GitHub? And, more importantly, if you did would it then become a steaming pile of feces?
-
No, because it's already a steaming pile of feces. I wouldn't share it with the world.
If you really really care I could email it or something.
-
-
This is not this forum favorite's author, but I remember reading something about pngcrush and these things here:
He claims that pngout compresses more.
edit: I think Discourse uses it, so you can use Discourse as a GUI!
-
Meanwhile, the C# program I wrote in like an hour that produces those PNGs initially maxes out the CPU at 100% the entire time it runs. And it has a GUI. But I guess that's inefficient sorcery.
I could probably get more done on the CLI than trying to develop something in C# to make it happen. Your still wrong.
-
so, google thinks this forum is trying to scam me.
-
That'd be a nice avatar.
-
Sometimes a program will run faster in one thread, because of L1 cache. Not saying it's the case here, but I saw it happening with one video encoder once.
-
i like the way it looks, for now it stays
-
Well, he doesn't know how to use imagemagick properly, so excuse me if I don't trust him with image processing.