No. Flycheck is the 7th most downloaded emacs package and the 3rd most popular package that's not a library. It's directly behind helm and magit. You can't just replace something like this with a thin stroke. The only reason flymake was rewritten was because the emacs devs couldn't get flycheck into emacs core, which IMHO is for the best. emacs releases is just too slow.
I kind of subconsciously do the same thing; use single quotes for symbol-like strings, and double for human readable.
But I can buy the argument that just having a single auto-enforced rule improves consistency and that has greater benefits than the somewhat vague distinction that is not enforced.
I've got to say, I'm quite happy with the default line length in Black.
The reason I always fight with people who want to increase line length is that they generally want to increase it to 100. Which is just a bit too big to fit two columns comfortably side by side at a reasonable size on a laptop screen, or three columns side by side on a wide desktop screen, which is how I generally set up my editors.
I'm always frustrated with codebases that use a 100 character standard, since I'm always running into lines that wrap, but when I use type annotations, 80 characters causes too many function signatures to have to wrap.
Hmm. My reading of PEP 8 on slices is that the spaces surrounding : in slices are optional, and used to implement the later rule "If operators with different priorities are used, consider adding whitespace around the operators with the lowest priority(ies). Use your own judgment; however, never use more than one space, and always have the same amount of whitespace on both sides of a binary operator."
This leads to the following difference between the PEP 8 recommendation and Black:
Also, this is one that PEP 8 doesn't have a example on, but I think this would be one of the cases in which the space wasn't necessary:
slice[a.b : c.d]
The "." operator binds so tightly in my mind that it doesn't need the spaces around the ":" to disambiguate. It's at the same precedence level as subscription and function call, and higher precedence than unary + and -.
After typing this all out, I think that it might be the case that the bigger difference is actually in how binary operators are treated. It looks like Black always puts whitespace around binary operators, which contradicts PEP 8's recommendation that you are allowed to vary spacing around binary operators to make precedence clear.
Since Black does allow for leaving in extraneous parentheses to make precedence clear, I wonder why it doesn't allow varying the space around binary operators as well? Of course, it should enforce that the spacing actually does match the precedence, and that the spacing is consistent within an expression. That would allow the following examples which PEP 8 lists as "Yes":
x = x*2 - 1
hypot2 = x*x + y*y
c = (a+b) * (a-b)
While right now Black rewrites them as follows, which PEP 8 lists as "No" (though my reading is that varying the spacing like this is optional, so the following could be accepted as well):
x = x * 2 - 1
hypot2 = x * x + y * y
c = (a + b) * (a - b)
Black does not take existing formatting into account. Doing so would cause non-deterministic formatting (Black would sometimes change its mind about its own formatting and a second pass would cause a different formatting than the first).
With this in mind, it has to enforce a rule around operators. Since any operand might be complex, it's more robust to default to spaces around operands always. Otherwise we would inevitably end up hugging operands with an operator that humans consider too tight. And since that's subjective, there is actually no rule that we can hard-code about that.
> Black would sometimes change its mind about its own formatting and a second pass would cause a different formatting than the first
Why not? I mean, I never built a formatter so idk about the complexity involved, but to me it seems that if Black had a rule like "if you see `a+b` (no spaces), just leave it alone", applying the rule twice shouldn't change anything.
(though I imagine that the interactions of such rules could become hard to understand...)
The whole idea is to _prevent_ people from thinking about formatting, by actually making it impossible to make any formatting decisions. There's exactly one way to format the program and that's it. It's draconian, but that's what's great about it.
That's the feeling I got from the readme, but GP sounds like this particular decision was made not so much for 'philosophical' reasons, as because Black-ing a file twice might give different results. I was curious why :)
> I'm not disagreeing, but is this something that everyone reasonable would agree on without any sort of support?
Somehow, the field of psychiatry doesn't seem to actually act on it.
Or they do, since they prescribe drugs which are designed to cross the blood-brain barrier, but even when they decide to prescribe drugs, they don't actually do any kind of blood tests to determine which drugs are likely to be effective.
They prescribe drugs based on simply you talking about your own symptoms, or observing your symptoms, and then just trying things until they find something that works or that you report works. They don't even seem to use any kind of formal testing of cognitive functionality to determine what effects the drugs are having; they just rely on purely subjective chats with the patient.
This seems consistent with what I know of psychiatry - and to be clear, I am not someone who disputes that psychiatric medications can be helpful.
Was anyone down-voting this because they said to themselves "no, that's not how psychiatrists work at all"?
To me, believing in the physicality of the mind is the most important qualification a psychiatrist needs. That's not at all consistent with naive behaviorism though.
I think people may have been downvoting me because I misinterpreted the question I was replying to; but I stand by my description of one of the things I find wrong with psychiatry, the lack of much in the way of rigorous objective testing.
> Why creating Tethers from thin air is now a cause of concern?
If you are claiming they are backed by USD, and you are creating them out of thin air, then that's a scam.
Other coins are only valued based on how the market values them. There is no fraud there; you are not claiming that you will redeem them for something else, they just represent themselves and are valued based on how useful people find that particular kind of cryptocurrency, plus hype.
MtGox was also a scam by the end, since they were trading on their exchange bitcoins and USD that they didn't actually have for people to cash out.
Banks that use fractional reserve should still have balanced assets and liabilities. It is just that some of their money is tied up in loans to be paid back instead of liquid cash. If everyone the bank loaned money to paid back there would be enough cash to allow all the customers to fully withdraw their accounts.
Bitfinex, on the other hand, is just outright insolvent.
You would be surprised how often other people use that exact argument but as a statement they say full of conviction instead of a question :) That might be the source of the confusion here.
Fractional reserve is also regulated and deposits are insured up to a certain amount, so it's definitely not comparable to printing imaginary USDT - even if fractional reserve banking has many well-known issues.
Fractional reserve banking is not what failed in the financial crisis. Multiple things failed, including credit ratings, mutual funds/pensions/etc investing in high risk investments, etc. The biggest risk people think of for fractional reserve - they won't have the money when you need it, a run on banks, etc - didn't really happen in the states in any significant fashion.
It seems to me that taxing something based on its use is a pretty much just a way to set up exactly these kinds of loopholes that continually need plugging.
Instead of taxing gasoline to help fill in the road budget, why not tax vehicles based on actual road usage, and their size and weight? Then you don't have all of the "electric cars and bikes don't pay gas taxes" stupid debates. An electric car uses just as much (if not more, due to weight) of the road as a gasoline car, while a bicycle uses so much less (and pretty much equivalent to any use of public space like walking, using a scooter, etc) that it makes the most sense for that to just be accounted for out of the general fund.
You could do this based on odometer, or based on automatic toll collection devices, or whatever. Automatic toll collection devices are probably better, because you could also include congestion charges for places where roadway real estate is low and congestion is high, like big cities.
The main reason to have taxes on something like fossil fuels would be for emissions reasons, as there is an external cost being imposed on everyone else by their emissions, and that money could go towards paying for health care costs, providing tax breaks for HVAC systems with air purification, carbon offsetting, and the like. But such a tax should be imposed regardless of use, as any use is going to wind up with the same or similar emissions.
At least in most of the US (can't speak for all 50 states) vehicles are taxed based on weight- a 1 ton pickup will cost more each year to register than a compact car or motorcycle. And what is a better method to tax based on usage than taxing fuel? Do you really want to have to log every mile driven, and submit it to the IRS? Parent poster had a good point, in that this will need to be examined in regards to EV usage of roads, but how much $ do you think it would cost to have automatic toll collection points to cover the entire US road network, and where are those billions/trillions going to come from?
And I would also like to point out that the main reason to tax fuel isn't to cover emissions, it's to help pay for the incredibly expensive roads that we all use (regardless of mode of transport). Sure, it is a good side effect that inefficient vehicles are taxed higher than more efficient ones, but that is a side effect, not the goal. Your proposed solution is far more complicated than just metering EV charging separately and taxing a portion of it.
> At least in most of the US (can't speak for all 50 states) vehicles are taxed based on weight- a 1 ton pickup will cost more each year to register than a compact car or motorcycle
Registration fees and taxes are frequently based on weight; and tolls are frequently based on number of axles.
But the relationship between weight or axles and fees is generally linear, while the actual wear and tear on roads is quartic (to the power of 4) in the weight per axle, times the number of axles. If taxes and fees were properly proportional, there would be a much bigger difference in price between a motorcycle and 1 ton pickup truck, let alone an 18 wheeler.
> Do you really want to have to log every mile driven, and submit it to the IRS?
You can use odometer readings that you collect at annual inspections. I realize that not every state does this, but every state I have ever lived in does; you have an annual vehicle safety and emissions inspection, and at that point they can check your odometer too and include that in the calculation.
You could also use the current automated toll collection systems, which are based on transponder or license plate for those who don't have transponders, for highways and congestion charges for cities, if you want to be able to charge different rates in different areas, and just subtract those numbers from the odometer readings afterwards.
Metering EV charging separately does't really solve the problem. Gas taxes are not in proportion to actual maintenance costs of the roads, and are currently a fixed amount, not tied to the price of gas or inflation, so they don't cover the full costs. If you just applied the same kinds of laws to EV charging, you'd be left with the same kinds of problems.
By not charging proportional to road wear and tear, there is an effective subsidy of those who drive larger vehicles, and in particular commercial cargo transport on the highways, by those who drive smaller vehicles. If you were to change the way vehicles were taxed, the larger vehicles would pay more of the burden, which would mean they might switch to alternatives like train transport, or moving production closer to consumption, or the like.
A similar problem exists in cities and on busy highways used by commuters, where congestion is a substantial externality. There it's the square footage of vehicle footprint that makes the biggest difference.
> vehicles are taxed based on weight- a 1 ton pickup will cost more each year to register than a compact car or motorcycle
An F-350 is 3.7 tons.
Two problems with this
1) It's unlikely to be proportional to road damage - if a 1 ton vehicle that costs $100 to register, a 2 ton vehicle should cost $1600, and a 4 ton vehicle should cost $25k.
2) It doesn't take into account mileage. Own a heavy truck that you use on your own land, and do about 1,000 miles a year on the road, and you pay the same as someone that has the same truck but does 50,000 miles a year commuting.
The odometer idea elsewhere in the thread probably works well for the U.S, just have a website to post your mileage when you drive into mexico/canada, and again on the way back, with spotchecks at the border. People who do significant mileage on their own land will be annoyed, but they currently pay gas tax on that mileage
> Instead of taxing gasoline to help fill in the road budget
In the UK we don't. We tax gasoline because it has negative externalities (same as us taxing cigarettes and alcohol). It goes into the central budget that's run by Phillip Hammond in the UK. Out of that, and income tax, national insurance, VAT, alcohol tax, etc, he funds the national road network, trident renewal, the state pension, the nhs, etc. Some of that money goes to councils to spend on what they want.
Electric cars don't have those externalities of burning gasoline in the middle of our cities.
While we don't tax fossil fuels used to generate electricity, we do subsidise non-fossil-fuels used to generate electricity. It probably should be the other way round, however in any case burning gas (not oil) in a power plant out of town and charging an electric car is better than burning oil in an ICE in the middle of a city and thus should attract far less tax. Currently 42% of UK electricity is being generated by Gas - no other fossil fuels.
The councils then take the money from central government, and the local council tax (about £1500 a household), into a local pot, and fund things like bin collections, maintaining parks, operating libraries, and maintaining the local roads.
> why not tax vehicles based on actual road usage, and their size and weight?
Until relatively recently that's not really been possible (ANPR makes it possible), hence taxing fuel as a proxy.
> Then you don't have all of the "electric cars and bikes don't pay gas taxes" stupid debates.
Given that the cost of a road is wear and tear (which a pedestrian or bike causes pretty much zero)
Charging more than £5 a year for even the most extreme cyclist wouldn't make any sense. Because damage increases at 2^4, 1 mile car does about 1/100,000th of the damage of a lorry. A bike and car is a similar ratio - therefore if you charged a bike 1p per mile, you should charge a car £1000 a mile and a lorry £100 million a mile.
> We tax gasoline because it has negative externalities (same as us taxing cigarettes and alcohol).
This is contradicted by the difference in taxation for diesel fuel and heating oil (which is also the case in the US as well). Or used for generating electricity, as you point out.
I think that like many things in government, there are multiple reasons for taxing gasoline; negative externalities is one of them, but acting as a proxy for usage fees is another.
In the US at least, the federal gas tax is specifically earmarked for transportation expenses (https://en.wikipedia.org/wiki/Highway_Trust_Fund), which indicates that it's explicitly intended as a proxy for usage fees.
> Until relatively recently that's not really been possible (ANPR makes it possible), hence taxing fuel as a proxy.
Yes, but times change, and it is possible now. Lots of people bring up the problem of not collecting gas taxes to fund roads when electric cars usage grows. So every time someone brings that up, I suggest a fairly simple solution. Electric cars also weren't previously possible, but they are now, so rather than complaining about how we won't be able to fund the roads, how about charging more effectively for road usage.
> Given that the cost of a road is wear and tear (which a pedestrian or bike causes pretty much zero)
>
> Charging more than £5 a year for even the most extreme cyclist wouldn't make any sense.
I addressed this in my comment, indicating that it doesn't make sense to charge usage based amounts for cyclists:
> while a bicycle uses so much less (and pretty much equivalent to any use of public space like walking, using a scooter, etc) that it makes the most sense for that to just be accounted for out of the general fund.
There is the cost of constructing the roads in the first place, and wear and tear from weather, but that can be adequately accounted for out of the general fund; and when I say that, I mean the taxes collected at whatever level of government is responsible for paying for road maintenance that are not based on road usage at all, such as income tax, sales tax, VAT, property tax, or the like.
As someone who lives in the Northeastern US, I know very well that it isn't just vehicle weight that leads to road wear and tear; I've ridden on dedicated bike paths that were unmaintained, and frost heaves and roots of trees cause quite a lot of trouble, though it does take a lot longer for it to become unusable than roads used by cars and trucks.
Anyhow, I think we're mostly in agreement here. It is absolutely possible to do more effective taxation of vehicles based on their direct costs to infrastructure as well as other externalities.
> Because damage increases at 2^4, 1 mile car does about 1/100,000th of the damage of a lorry. A bike and car is a similar ratio - therefore if you charged a bike 1p per mile, you should charge a car £1000 a mile and a lorry £100 million a mile.
The damage per axle is proportional to the weight per axle to the fourth power. You multiply that by the number of axles to get the total amount of damage. Also, tandem axles do substantially less damage than single axles. This ends up at being a factor of about 5,000 between a passenger car and a truck, not 100,000.
It's still a big difference, and it's not accounted for by gas taxes, tolls, or vehicle registration fees, at least in the jurisdictions I've checked. Most of them seem to just go up proportional to the weight or the number of axles, not the fourth power of the weight per axle.
If you want to do it right, you'd charge fees based on equivalent single axle load times mileage, plus a congestion factor in congested areas based on the area taken up by the vehicle, times the amount of time it's within the congested area, times a time-varying congestion factor. And of course a carbon tax which covers all forms of carbon emission, and possibly a particulate emission tax that varies with density.
But despite how obvious it all sounds, it would be somewhat expensive to implement, and would face huge political opposition from industries and individuals who are effectively subsidized by paying into the highway systems way less relative to their usage than other users.
"why not tax vehicles based on actual road usage, and their size and weight?"
Because this relies on either odometer readings, which, at least here in the US, you wouldn't be able to say how many miles were driven in one state vs the next. Or it would rely on tracking the location of the vehicle, which is downright creepy and sets off all kinds of alarm bells in people.
Every car is legally equipped with a tracking device known as a license plate.
There are no more toll booths in the state of Massachusetts.
If you travel on a toll road in Massachusetts, your car will be tracked either by E-ZPass transponder, if you opt in to that system (at a substantial discount), or via photographing the license plate and sending you a bill in the mail.
Also, pretty much everyone I know, even the most privacy conscious, carry a tracking device in their pockets at all times. I think that rms may be the only person I've met who I know does not.
Every person who is riding one of these scooters is someone who could have been using some other form of transportation.
Now, some of them may have switched from walking; in which case the small amount of sidewalk space taken up by a scooter not in use is an increase in use of space over the status quo; but not a very big one.
But many of them may have changed from driving. A car takes up far more space than a scooter. For each person who switches, you free up that much more space both on the streets while they're driving, and in parking at their final destination.
Having scooters available won't generally mean people will give up their cars. But a combination of scooters, bike facilities, car shares, buses, trolleys, commuter rail, and so on can make it possible to live in a city without a car, or by reducing a family from two cars to one.
One thing that bike and scooter share systems can help do is solve the "last mile" (or more likely "last quarter mile" or so) problem of public transportation. Walking to the nearest bus stop or train stop, coupled with the wait and then time to reach your destination, is a big factor in how efficient public transit is. Having options for being able to get to and from these places more quickly and conveniently can be a big benefit.
Anything that reduces the number of people who haul around a couple of tons of metal wherever they go, while burning black gold that funds crazy religious monarchies and failed democracies to do so, seems like a good tradeoff to me.
Hell, solving the last mile problem enables a previous failed suburb-car-city pattern, where you drive to a parking garage on the perimeter of a city core and go on foot from there.
> Maybe try to figure out how to make the work fun?
I don't think this is the right approach, because you need the ability to focus on work even when it is not fun.
You do need something that makes the work rewarding in some way, but I wouldn't push to hard to try to make it fun.
> Or, try and instill a goal less of "getting the grade" and more "attain mastery of the subject"?
This was my approach in high school as well. It led to me being the one everyone wanted to study with because I picked up the material the best, but then I flunked classes because I never did the homework.
I would flunk classes that depended mostly on homework, and ace classes that depended mostly on tests. Since I had convinced myself that mastery was more important than grades, this reinforced my behavior.
Somehow, the acing the tests part allowed me to get into an Ivy League college. Which I then flunked out of because at that point, I couldn't get by without actually doing the homework and studying outside of class.
This pattern of behavior continues to be something I struggle with as an adult. I can be quite productive for short bursts of time, but have a hard time keeping on track with longer term projects that don't pay off immediately.
I think what you need is to learn the value of steady incremental work that only shows significant results after a long period of time. Basic reinforcement training techniques can be used for this; provide rewards for getting incremental work done, but better to provide them intermittently. Eventually work up from smaller rewards for smaller goals to larger rewards for larger goals.
I think that reinforcing consistency, habit, and small incremental progress rather than brilliance is a big part of what you need. The problem with brilliance is that you can easily get a lot of positive reinforcement for it; people are impressed at how well you understand something, at how much you know, at how quickly you pick it up. But even if you are better than average at picking things up and figuring things out, you will eventually hit the limits of what you can do through brilliance alone; there are some things that will just take long hard work no matter what, and then all of that reinforcement for brilliance comes back to bite you because you're not getting the same kind of reinforcement, and you can easily get stuck and lose faith in your self-image.
>> Maybe try to figure out how to make the work fun?
> I don't think this is the right approach, because you need the ability to focus on work even when it is not fun.
this is just coming from my personal experience, but i think it is very important for a kid to have a job sometime in the high school years. my parents are fairly well off and they "protected" me from this need by just giving me spending money (sometimes for a trivial amount of chores, but usually just free money), so that a menial job would not distract me from my studies. of course, i just spent that money on frivolous things and outings with friends that distracted me from school anyway, and i ended up doing quite poorly (though i made it most of the way through a fairly prestigious school before it caught up with me).
eventually i transferred to a regional (but still quite rigorous) university and had to get a restaurant job to pay my expenses. i learned a whole lot about the world real fast. it wasn't so much that i learned about the value of steady work, but rather that low wage jobs in low margin industries really slam home the point that you will never have anything unless you put in the work, and i worked real hard from that point on. i still have bouts of procrastination, but i never just let things slide now, and every time i spend a dollar i feel the amount of my own labor that i am letting go.
One way to control unnecessary spending is to put the price in terms of how many hours you had to work to get that money. Then it becomes easy to put the item back on the shelf.
i agree, and i often think things out explicitly that way. i actually take a step further though. some fraction of my expenses are fixed (rent, insurance, food to an extent) which leaves me with some percentage of disposable income, call it 25% for this example. so if i get paid $20/hr, a $20 item that isn't absolutely necessary doesn't cost me one hour of work, but rather four, because three quarters of that money is "already spent". suddenly it doesn't seem like i need the shiny new gadget that badly.
I'm one of those people who finds perverse pleasure in writing portable Bourne shell, and doing so correctly. I know I spend far more brain cycles on it than I should; once it gets past a certain complexity limit, I should just switch to Python. But I always say "It's just a little bit more code, there must be a good way to do this," and there generally is, but only after passing over several bad ways to do it first.
Oh, and of course in doing so, I always try to minimize the amount of calling out to other processes. Why call awk when you could use `while read` instead?
You only get one array to work with in portable Bourne shell, $@. You can parse lines using read, and strip prefixes and suffixes using parameter expansion (`${parameter%pattern}`). It's a restrictive little language, with a lot of quirks and edge cases, but it always makes a nice little challenge to figure out how you can use it safely.
One of the constraints I impose is that spaces in pathnames should always be handled correctly; the biggest form of trouble you can easily get in is to forget to quote something or to parse something on space delimiters when it can include spaces. I've seen someone write a script that accidentally turned into an `rm -rf /path/to/important/data` because of poor handling of spaces.
I generally do not attempt to handle newlines in pathnames. While it's possible to do so in some cases with null delimiters, I have never seen a case of newlines in pathnames in the wild. Of course, this means that I have to make sure that these scripts are never exposed to anything that could contain malicious filenames.
Also, I move away from portable shell if it will really make the code too convoluted or fragile. For instance, if I need to parse long options (--foo), I use GNU getopt rather than the built-in getopts (with appropriate test to make sure the getopt I'm using is GNU, so it won't break silently on a system without GNU getopt), or move to a real language.
Anyhow, while I know it's counterproductive, the puzzle-solving part of me really likes trying to solve the problem of implementing something in portable Bourne shell.
> One of the constraints I impose is that spaces in pathnames should always be handled correctly;
I tend to do the exact opposite. If a filename has spaces in it, i like my script to fail spectacularly while insulting the user (who is typically me....)
Filenames are variable names. It makes no sense to allow spaces in them.
Hmm, I just switched to flycheck. Is it worth checking out this new flymake?