C++ is a decent language to choose for many types of projects, and which pieces of the language depends on which type of project that is.
Embedded applications: There are several sets of best practice for embedded or hard real time c++, no exceptions (unbounded latency), no dynamic memory allocation (fragmentation), no dynamic casting (unbounded latency), no recursion and on and on. There actually seems to be a bit of consensus on this best practice, but it varies with the constraint of your particular system and if it needs some safety committee's approval.
Systems programming (OS or driver): I have never read any best practice documents for this, but the code I have read all looks like C with classes. few or no templates show up I've noticed.
Large scale performance critical stuff (games among other things): Widely varying best practice statements and all sorts of different coding, I have no idea.
Scientific (matlab but faster): who cares, you just want the answer, not the software, right? Don't read this stuff, it hurts. but it usually works.
I always look forward to/. c++ posts. I know I'm being clickbaited by Nerval's but its sooo fun!
This article has some more details on the specific error modes. The examples given in physics involve processing collider result data. When the researchers knew what they were looking for they found it reproducibly. When they didn't have any preconceived notions it was discovered that it was a false positive. Some of these biomed and psych studies were the basis of policy and went un reproduced for years. This is a real problem, we should look for solutions. http://www.economist.com/news/...
I remembered one more. The binary file io and probably all binary io and serialization is about half the speed of java unless you write your own read into a buffer method and wrap it in an unsafe region.
They know they need to work on the compile times and if you consider the time it would take the static analysis tool then it is understandable. The dependency detection part of the compile time issue is with cargo. I haven't gotten another make system to work yet but it might solve that problem too. They intentionally decided to hide the compiler flags in cargo so I intentionally decided not to use it. There are people using both autotools and cmake.
Given the support for the functional paradigm that rust has, I am dissapointed that parallelizing folds and maps is so verbose and thought requiring. Not sure why a fold can't just use all the cores like in haskell.
Sting slices vs strings. Verbose again but it works.
No tail call optimization, makes some FP stuff impossible.
No metaprogramming.
Regex library is slow. But I don't use regex and it is on the long list to improve.
Compile times. It rebuilds everything in a library or exe even if you only changed one line. Also it is just slow. Even hello world takes surprisingly long. This is really annoying because I have a habit of recompiling quite regularly as I code.
Cargo, the package manager and build system is inflexible in that it does not let you pass command line parameters to rustc. This means that if you want to cross compile or use simd or any of the other cool stuff you get by building on the llvm back end, you have to roll your own build system with make or cmake or whatnot.
The four most populous countries use the death penalty and in total over 50% of the world population lives in nations where state aurhorized executions occur. Capital punishment is not unusual even among the worlds economic leaders. There are many good arguments against capital punishment but this isn't one. Instead cite 4% of those executed being innocent or the higher cost relative to incarceration.
I disagree. The inventors of the trebuchet had no idea about the Higgs, the inventors of the windmill didn't understand Bernoulli's work, and the first people to take Valerian root had no concept of biochemistry. We can use observed patterns to serve our needs without understanding the reasons for those patterns. Yes a lot of people died eating random plants, but there are a lot of us, and we learn quickly. My favorite part about engineering is using techniques to solve problems that no one understands yet. Its like magic. The best is when a true subject matter expert tells me "that shouldn't work!" and yet it does. Science always catches up and we are the better for it, but that is no reason to proceed with caution when we have so many people, and so much to learn. I would qualify this by saying test subjects should be informed and consenting.
As someone above pointed out, load balancing and redundancy are valid reasons to send packets with source IPs not in the originating AS. That mostly doesn't apply to residential subnets where the zombies are, but one reason does. I sometimes use LTE tethering and my home internet connection simultaneously because the LTE is as fast or faster than my home connection during non peak hours. I don't know if it is doing load balancing between the two uplinks, but why shouldn't it?
If your alarm is a very loud sound system playing an obnoxious song, the police might get called for free, no monitoring. Add another track over the song of people talking and perhaps vomiting noisily, and you are set. They won't show up as quickly as if an alarm had been tripped though, unless your neighbors are important.
I have heard circumstances like this multiple times. It really bothers me that we have invented a tax code that is on par with the game "go" as far as its ability to be computerized. There are extremely talented individuals making a living interpreting our tax code. Those same people could be doing something far more useful to society than they are now, but we have created an entire industry that sucks them away from more useful endeavors by cobbling together a tax code that is a mashup of bribes to interest groups, bribes to voters, authoritarian interference with our individual lives, and a glass ceiling protecting the one percent. If any highschool graduate can't just sit down with a calculator and pay the *exact* amount owed, we have done something wrong.
I got down to a healthy weight by counting calories (or so I thought). Much later, I decided I wanted to lose more and see my sixpack, so I divided my caloric intake by 3... and gained 25lbs. I'm now overweight again. That is impossible I thought, thermodynamics works! But I realized I was sleeping almost 12hrs a day, and barely moving the rest of it. It seems fairly clear that at least *my* body can save energy. The military studies that indicate the body will not enter starvation mode until you hit 6% body fat no matter how little you eat only worked that way because the soldiers maintained the same level of daily activity. They were forced to. You have to monitor your calories expended, it can vary. The previous time I had lost weight, I had been doing a lot of weight lifting just before cutting calories, and I think my lost weight was a combination of losing a huge amount of muscle mass, and the high number of calories burned by that resting muscle that I had built. So now I'm off building muscle again and eating the number of calories I would expend if I were the weight I want to be, so that I asymptote down to that weight.
It would be easy for your employer, and for schools to simply adjust the time at which people are expected to arrive. If some employers did it and others didn't, or some did it by different amounts or on different dates, it would also thin traffic at rush hour and lunch which could save lives, but cost more in labor for places that are only open at those times. If I were an employer I would have the work day begin after sunrise by the amount of my employees average commute, plus some margin. So your start time is different each day by a minute or two. I would rather have them mix up now and then and be a little late, than wake up in the dark and be groggy for a few hours.
Maintaining and extending software is *always* hard. If abandoning concepts such as minimizing coupling, or hiding data make the design/implementation easier, then do it. Code that tries to adhere to these best practices when the problem space makes it difficult is consistently horrendous to extend and no easier to maintain. Not all problems can be partitioned out into neatly abstracted uncoupled cohesive realms of responsibility. Beauty is code that works well and is easy to extend, not code that is easy to understand. The latter is often impossible despite all our best efforts.
Full disclosure, I mostly write research code now, and my observations are based on over a decade of production coding experience that is probably not representative of normal business/web software.
I could be wrong, but I'm pretty sure he is suggesting that progressives (educated scientifically literate liberals) want a philosopher king. Woodrow Wilson could be considered the prototype of such a king. An authoritarian schoolmaster if there ever was one. Willing to trample the rights of the individual to make the correct decision *for* that individual. The fact he was very well educated and probably right quite a large portion of the time doesn't alleviate the effects of removing individual responsibility and freedom upon creative thought.
And the notion that a greedy optimization algorithm like a anarcho-capitalist pure free market is so incredibly elegant that it must work, neglects the nasty inelegant humans that are part of that market and screw everything up. If it doesn't work, it doesn't matter how elegant it is. I think that is the mysticism the gp was talking about. The faith Ron Paul has placed in elegant ideas often involves handwaving and appeals to common sense, rather than empircal tests. I think that is somewhat unfair as he does cite historical incidents, he just has different interpretations from his detractors. Also doing correctly scaled economic tests that control for all the variables is impossible. Still, he's kinda handwavy even compared to economists.
Does the classic gnome share that problem? Or are you talking gnome 3? You can select either. I like the new gnome 3, but I never used the mouse much and the keyboard shortcuts didn't change. If you are starting from scratch though, you are right, it makes no sense to pick a distro that you would have to customize, if there are others that are configured as you wish. I was simply pointing out that if it is already installed, and you decide you don't like the windowmanager, switching them is trivial, and because people have different preferences, each user can have their own window manager. That is one of my favorite aspects of linux.
Charge cycles are not a lithium ion batteries worst problem. Rather it is age. They lose 20% of their capacity every year in ideal temperatures. In Phoenix the nissan leaf was losing upwards of 50% of its capacity (read range) in the first year due to the heat. Also I wish the batteries weren't so heavy, I like tiny light cars, and the tesla roadster's battery pack was 450kg, the only reason they got the weight down to 2700lbs was all the carbon fiber. ICE + fuel tank still weighs less than electric motor + battery pack. I want an electric car, for the torque and the elegant simplicity, but the battery life is a deal breaker for me until my city has a recycling station for them, and the cost of swapping them once a year is even with the maintenance on an ICE car.
While I like xubuntu, wouldn't it have been easier just to download a new window manager? It is pretty seamless. Ubuntu was the easiest thing to get running on my old macbook pro, but I didn't like unity. It took less than minute to switch to my preference, which I will not state, as it is even less popular than unity. But if you want ice or enlightenment or windowmaker or kde, or classic gnome, they are all immediate options with just a few clicks. That said, I still wish I could get fedora running, but the UEFI for macbooks is not quite standard, and fedora doesn't put up with it last I checked.
Also we tend to have higher blood pressure:( It bothers me when people keep talking on their phone, even though I know it shouldn't. And deep down, I wish I was daring enough to continue reading my eBook, even in airplane mode. Also, seriously, why don't people signal when they are changing lanes?
My parents also explained to me that retaliating against a bully would get me in trouble, because the bully's punch caught the corner of a teacher's eye, and the second punch (mine) would occur after the teacher was looking. It happened that way once, but usually the teachers didn't notice either their attack or my retaliation. Teacher's aren't superhuman, they can't be everywhere, and bullies pick their time and place carefully, kids have to handle some of this on their own, even though we wish they didn't.
Not only has mathematical ability been correlated with music, people who don't enjoy music scare me a little. Someone once said that liking at least one song by Nina Simone was a prerequisite for humanity. Shakespeare regularly had his antagonists show an indifference to music. I think he might have been on to something.
I blame the complete lack of tolerance for violence in schools. Ask someone who graduated in the last ten years about the fights they got into at school. Now ask someone 20 or even just 10 years older than that the same question. It was a relatively rapid change where occasional fights were the norm, to being unthinkable. I don't know if it was us applying rules that made sense for schools where kids brought shivs, to schools that didn't have anything more than normal scuffles, or just the general risk aversion society has developed. Parents teaching their children to always walk away from a fight didn't help. In an adult life that makes sense. If someone is violent you get out of there. You will probably never see that person again and it doesn't matter what impression you make. School is a lot more like prison. If your kid walks (or worse runs) away from a bully, he will see that bully again tommorow, now having the left the impression of weakness. My parents taught me it was ok to defend yourself, and I figured out on my own that the best method for deterring a bully is hyperescalation. From k-12 I can count on one hand the number of times it was necessary, but today I would have been expelled. So today we are forced to tell our children to take the beating or to continually run and hide, because of the intelerance of our schools for violence.
The NIST 800-22 test has bit length parameters. The article doesn't indicate if it passed the 128 bit NIST test after they reduced the entropy to 32 bits, only that it passed *some* NIST test. From another poster it seems the standard NIST parameters used for the NIST test may not be sufficient to test that the prng exhibits the level of entropy that people are relying on it to exhibit. The lavarnd folks pass a billion bit NIST test, so it is possible to run longer versions of the test. If the reduced entropy source is still passing a higher entropy test, we have a problem with our testing method.
Your other (very valid) point is that just because data is random, doesn't mean you are secure. The data stream has to be both random and unknown to your attacker, which PI would not be. In this case they do not have a way to set the seed, or all inputs to the prng, only to limit the prng's bit length, so the attacker will not know the random sequence or even its statistics. It simply makes a brute force attack much less time consuming.
It still concerns me that a 32 bit prng might have passed a 128 bit 800-22 test. Does anyone know more about that aspect of it?
C++ is a decent language to choose for many types of projects, and which pieces of the language depends on which type of project that is.
Embedded applications: There are several sets of best practice for embedded or hard real time c++, no exceptions (unbounded latency), no dynamic memory allocation (fragmentation), no dynamic casting (unbounded latency), no recursion and on and on. There actually seems to be a bit of consensus on this best practice, but it varies with the constraint of your particular system and if it needs some safety committee's approval.
Systems programming (OS or driver): I have never read any best practice documents for this, but the code I have read all looks like C with classes. few or no templates show up I've noticed.
Large scale performance critical stuff (games among other things): Widely varying best practice statements and all sorts of different coding, I have no idea.
Scientific (matlab but faster): who cares, you just want the answer, not the software, right? Don't read this stuff, it hurts. but it usually works.
I always look forward to /. c++ posts. I know I'm being clickbaited by Nerval's but its sooo fun!
This article has some more details on the specific error modes. The examples given in physics involve processing collider result data. When the researchers knew what they were looking for they found it reproducibly. When they didn't have any preconceived notions it was discovered that it was a false positive. Some of these biomed and psych studies were the basis of policy and went un reproduced for years. This is a real problem, we should look for solutions.
http://www.economist.com/news/...
I remembered one more. The binary file io and probably all binary io and serialization is about half the speed of java unless you write your own read into a buffer method and wrap it in an unsafe region.
They know they need to work on the compile times and if you consider the time it would take the static analysis tool then it is understandable. The dependency detection part of the compile time issue is with cargo. I haven't gotten another make system to work yet but it might solve that problem too. They intentionally decided to hide the compiler flags in cargo so I intentionally decided not to use it. There are people using both autotools and cmake.
The other stuff is just minor as you said.
Given the support for the functional paradigm that rust has, I am dissapointed that parallelizing folds and maps is so verbose and thought requiring. Not sure why a fold can't just use all the cores like in haskell.
Sting slices vs strings. Verbose again but it works.
No tail call optimization, makes some FP stuff impossible.
No metaprogramming.
Regex library is slow. But I don't use regex and it is on the long list to improve.
Compile times. It rebuilds everything in a library or exe even if you only changed one line. Also it is just slow. Even hello world takes surprisingly long. This is really annoying because I have a habit of recompiling quite regularly as I code.
Cargo, the package manager and build system is inflexible in that it does not let you pass command line parameters to rustc. This means that if you want to cross compile or use simd or any of the other cool stuff you get by building on the llvm back end, you have to roll your own build system with make or cmake or whatnot.
That said, I am still excited about it.
The four most populous countries use the death penalty and in total over 50% of the world population lives in nations where state aurhorized executions occur. Capital punishment is not unusual even among the worlds economic leaders. There are many good arguments against capital punishment but this isn't one. Instead cite 4% of those executed being innocent or the higher cost relative to incarceration.
and walk away
I disagree. The inventors of the trebuchet had no idea about the Higgs, the inventors of the windmill didn't understand Bernoulli's work, and the first people to take Valerian root had no concept of biochemistry. We can use observed patterns to serve our needs without understanding the reasons for those patterns. Yes a lot of people died eating random plants, but there are a lot of us, and we learn quickly. My favorite part about engineering is using techniques to solve problems that no one understands yet. Its like magic. The best is when a true subject matter expert tells me "that shouldn't work!" and yet it does. Science always catches up and we are the better for it, but that is no reason to proceed with caution when we have so many people, and so much to learn. I would qualify this by saying test subjects should be informed and consenting.
As someone above pointed out, load balancing and redundancy are valid reasons to send packets with source IPs not in the originating AS. That mostly doesn't apply to residential subnets where the zombies are, but one reason does. I sometimes use LTE tethering and my home internet connection simultaneously because the LTE is as fast or faster than my home connection during non peak hours. I don't know if it is doing load balancing between the two uplinks, but why shouldn't it?
So now WINE *is* an emulator? Thats a tough acronym to sell, recursive or otherwise. I guess really the QEMU package is the emulator, but still.
If your alarm is a very loud sound system playing an obnoxious song, the police might get called for free, no monitoring. Add another track over the song of people talking and perhaps vomiting noisily, and you are set. They won't show up as quickly as if an alarm had been tripped though, unless your neighbors are important.
I have heard circumstances like this multiple times. It really bothers me that we have invented a tax code that is on par with the game "go" as far as its ability to be computerized. There are extremely talented individuals making a living interpreting our tax code. Those same people could be doing something far more useful to society than they are now, but we have created an entire industry that sucks them away from more useful endeavors by cobbling together a tax code that is a mashup of bribes to interest groups, bribes to voters, authoritarian interference with our individual lives, and a glass ceiling protecting the one percent. If any highschool graduate can't just sit down with a calculator and pay the *exact* amount owed, we have done something wrong.
I got down to a healthy weight by counting calories (or so I thought). Much later, I decided I wanted to lose more and see my sixpack, so I divided my caloric intake by 3... and gained 25lbs. I'm now overweight again. That is impossible I thought, thermodynamics works! But I realized I was sleeping almost 12hrs a day, and barely moving the rest of it. It seems fairly clear that at least *my* body can save energy. The military studies that indicate the body will not enter starvation mode until you hit 6% body fat no matter how little you eat only worked that way because the soldiers maintained the same level of daily activity. They were forced to. You have to monitor your calories expended, it can vary. The previous time I had lost weight, I had been doing a lot of weight lifting just before cutting calories, and I think my lost weight was a combination of losing a huge amount of muscle mass, and the high number of calories burned by that resting muscle that I had built. So now I'm off building muscle again and eating the number of calories I would expend if I were the weight I want to be, so that I asymptote down to that weight.
It would be easy for your employer, and for schools to simply adjust the time at which people are expected to arrive. If some employers did it and others didn't, or some did it by different amounts or on different dates, it would also thin traffic at rush hour and lunch which could save lives, but cost more in labor for places that are only open at those times. If I were an employer I would have the work day begin after sunrise by the amount of my employees average commute, plus some margin. So your start time is different each day by a minute or two. I would rather have them mix up now and then and be a little late, than wake up in the dark and be groggy for a few hours.
Maintaining and extending software is *always* hard. If abandoning concepts such as minimizing coupling, or hiding data make the design/implementation easier, then do it. Code that tries to adhere to these best practices when the problem space makes it difficult is consistently horrendous to extend and no easier to maintain. Not all problems can be partitioned out into neatly abstracted uncoupled cohesive realms of responsibility. Beauty is code that works well and is easy to extend, not code that is easy to understand. The latter is often impossible despite all our best efforts.
Full disclosure, I mostly write research code now, and my observations are based on over a decade of production coding experience that is probably not representative of normal business/web software.
I could be wrong, but I'm pretty sure he is suggesting that progressives (educated scientifically literate liberals) want a philosopher king. Woodrow Wilson could be considered the prototype of such a king. An authoritarian schoolmaster if there ever was one. Willing to trample the rights of the individual to make the correct decision *for* that individual. The fact he was very well educated and probably right quite a large portion of the time doesn't alleviate the effects of removing individual responsibility and freedom upon creative thought.
And the notion that a greedy optimization algorithm like a anarcho-capitalist pure free market is so incredibly elegant that it must work, neglects the nasty inelegant humans that are part of that market and screw everything up. If it doesn't work, it doesn't matter how elegant it is. I think that is the mysticism the gp was talking about. The faith Ron Paul has placed in elegant ideas often involves handwaving and appeals to common sense, rather than empircal tests. I think that is somewhat unfair as he does cite historical incidents, he just has different interpretations from his detractors. Also doing correctly scaled economic tests that control for all the variables is impossible. Still, he's kinda handwavy even compared to economists.
Does the classic gnome share that problem? Or are you talking gnome 3? You can select either. I like the new gnome 3, but I never used the mouse much and the keyboard shortcuts didn't change. If you are starting from scratch though, you are right, it makes no sense to pick a distro that you would have to customize, if there are others that are configured as you wish. I was simply pointing out that if it is already installed, and you decide you don't like the windowmanager, switching them is trivial, and because people have different preferences, each user can have their own window manager. That is one of my favorite aspects of linux.
Charge cycles are not a lithium ion batteries worst problem. Rather it is age. They lose 20% of their capacity every year in ideal temperatures. In Phoenix the nissan leaf was losing upwards of 50% of its capacity (read range) in the first year due to the heat. Also I wish the batteries weren't so heavy, I like tiny light cars, and the tesla roadster's battery pack was 450kg, the only reason they got the weight down to 2700lbs was all the carbon fiber. ICE + fuel tank still weighs less than electric motor + battery pack. I want an electric car, for the torque and the elegant simplicity, but the battery life is a deal breaker for me until my city has a recycling station for them, and the cost of swapping them once a year is even with the maintenance on an ICE car.
While I like xubuntu, wouldn't it have been easier just to download a new window manager? It is pretty seamless. Ubuntu was the easiest thing to get running on my old macbook pro, but I didn't like unity. It took less than minute to switch to my preference, which I will not state, as it is even less popular than unity. But if you want ice or enlightenment or windowmaker or kde, or classic gnome, they are all immediate options with just a few clicks. That said, I still wish I could get fedora running, but the UEFI for macbooks is not quite standard, and fedora doesn't put up with it last I checked.
Rule followers caused the holocaust!
Also we tend to have higher blood pressure :( It bothers me when people keep talking on their phone, even though I know it shouldn't. And deep down, I wish I was daring enough to continue reading my eBook, even in airplane mode. Also, seriously, why don't people signal when they are changing lanes?
If you are referencing doom, d&d actually came first (1975).
My parents also explained to me that retaliating against a bully would get me in trouble, because the bully's punch caught the corner of a teacher's eye, and the second punch (mine) would occur after the teacher was looking. It happened that way once, but usually the teachers didn't notice either their attack or my retaliation. Teacher's aren't superhuman, they can't be everywhere, and bullies pick their time and place carefully, kids have to handle some of this on their own, even though we wish they didn't.
Not only has mathematical ability been correlated with music, people who don't enjoy music scare me a little. Someone once said that liking at least one song by Nina Simone was a prerequisite for humanity. Shakespeare regularly had his antagonists show an indifference to music. I think he might have been on to something.
I blame the complete lack of tolerance for violence in schools. Ask someone who graduated in the last ten years about the fights they got into at school. Now ask someone 20 or even just 10 years older than that the same question. It was a relatively rapid change where occasional fights were the norm, to being unthinkable. I don't know if it was us applying rules that made sense for schools where kids brought shivs, to schools that didn't have anything more than normal scuffles, or just the general risk aversion society has developed. Parents teaching their children to always walk away from a fight didn't help. In an adult life that makes sense. If someone is violent you get out of there. You will probably never see that person again and it doesn't matter what impression you make. School is a lot more like prison. If your kid walks (or worse runs) away from a bully, he will see that bully again tommorow, now having the left the impression of weakness. My parents taught me it was ok to defend yourself, and I figured out on my own that the best method for deterring a bully is hyperescalation. From k-12 I can count on one hand the number of times it was necessary, but today I would have been expelled. So today we are forced to tell our children to take the beating or to continually run and hide, because of the intelerance of our schools for violence.
The NIST 800-22 test has bit length parameters. The article doesn't indicate if it passed the 128 bit NIST test after they reduced the entropy to 32 bits, only that it passed *some* NIST test. From another poster it seems the standard NIST parameters used for the NIST test may not be sufficient to test that the prng exhibits the level of entropy that people are relying on it to exhibit. The lavarnd folks pass a billion bit NIST test, so it is possible to run longer versions of the test. If the reduced entropy source is still passing a higher entropy test, we have a problem with our testing method.
Your other (very valid) point is that just because data is random, doesn't mean you are secure. The data stream has to be both random and unknown to your attacker, which PI would not be. In this case they do not have a way to set the seed, or all inputs to the prng, only to limit the prng's bit length, so the attacker will not know the random sequence or even its statistics. It simply makes a brute force attack much less time consuming.
It still concerns me that a 32 bit prng might have passed a 128 bit 800-22 test. Does anyone know more about that aspect of it?