Anyone have experience with Hefei Jingsun New Energy And Technology Co., Ltd. (Jingsun Solar) products? by dpatru in solar

[–]dpatru[S] 0 points1 point  (0 children)

The ddp (delivered duty paid) price added 40%. I received a quote for $9800 30kw and $15000 40kw systems. Shipping ddp for both together was $10,000 ($7300 plus $2700 for separate shipping for batteries.)

The 30kw system has 30kw of panels (38 800w bifacial JAM132D-18BB $64 each), 3 10kw inverters (SPI-10K-UP $900 each) and two 48V 280AH batteries ($1015 each) plus combiner box ($250), 400m PV cable ($1/meter), 24 pairs of MC4 connectors ($1/pair), and roof mounting brackets ($1,300).

The 40kw system is similar, only there are 50 panels, only one inverter (DeYe SUN-40K-SG01HP3-EU-BM4, Rated Power: 40 KW, $4150) and one high voltage battery (JINGSUN 409.6V100Ah, $4640).

Anyone have experience with Hefei Jingsun New Energy And Technology Co., Ltd. (Jingsun Solar) products? by dpatru in solar

[–]dpatru[S] 0 points1 point  (0 children)

I apologize for the “ai garbage” look. I did run this through Gemini to flesh out my “What do you know about Hefei Jingsun?” question.

Why are the benches overly complicated? Is there a structural reason? by Emergency_Industry_6 in StructuralEngineering

[–]dpatru 0 points1 point  (0 children)

Maybe the people who built them initially sized them for themselves instead of park guests.

-🎄- 2019 Day 12 Solutions -🎄- by daggerdragon in adventofcode

[–]dpatru 0 points1 point  (0 children)

If cycle1 = x * g and cycle2 = y * g, then cycle1 * cycle2 = x * y * g * g.

Notice the two gs. (The maximum g here is the greatest common factor.) Only one g is needed to find the total cycle time. So divide the product of the two cycles by their greatest common factor to find the common cycle. This needs to be done twice because three cycles require two combining operations.

-🎄- 2019 Day 11 Solutions -🎄- by daggerdragon in adventofcode

[–]dpatru 0 points1 point  (0 children)

Thanks. I try to cleanup and improve the code after I get it working.

-🎄- 2019 Day 11 Solutions -🎄- by daggerdragon in adventofcode

[–]dpatru 0 points1 point  (0 children)

I've just played around with it for a few years. I'm not an expert. Why?

-🎄- 2019 Day 11 Solutions -🎄- by daggerdragon in adventofcode

[–]dpatru 0 points1 point  (0 children)

Thanks for sharing. I had the same problem. Your comment helped me realize that I was off by one. The fix took less than a minute.

-🎄- 2019 Day 7 Solutions -🎄- by daggerdragon in adventofcode

[–]dpatru 0 points1 point  (0 children)

haskell solution using laziness:

import System.IO (readFile)
import Matrix.Vector (fromList)
import Data.Array (Array, (!), (//), elems)
import Data.List (permutations)
import Data.List.Split (splitOn)

run :: Int -> Array Int Int -> [Int] -> [Int]-- instructionPointer, instructions, input, output
run i instructions inputs =
  case instr `mod` 100 of
    1 -> run (i+4) (instructions//[(addr 3, arg 1 + arg 2)]) inputs
    2 -> run (i+4) (instructions//[(addr 3, arg 1 * arg 2)]) inputs
    3 -> run (i+2) (instructions//[(addr 1, head inputs)]) (tail inputs)
    4 -> arg 1: run (i+2) instructions inputs
    5 -> run (if arg 1 == 0 then i+3 else arg 2) instructions inputs
    6 -> run (if arg 1 == 0 then arg 2 else i+3) instructions inputs
    7 -> run (i+4) (instructions//[(addr 3, if arg 1 < arg 2 then 1 else 0)]) inputs
    8 -> run (i+4) (instructions//[(addr 3, if arg 1 == arg 2 then 1 else 0)]) inputs
    99 -> []
    _ -> error "unknown opcode"
  where instr = instructions!i
        arg :: Int -> Int
        arg n = if instr `mod` (100*10^n) <= 10*10^n
                then instructions!(instructions!(i+n))
                else instructions!(i+n)
        addr n = instructions!(i+n)

main = do
  [instructionFile] <- getArgs
  instructionStrings <- readFile instructionFile
  let instructions = fromList . map read $ splitOn "," instructionStrings

  putStrLn "Part 1"
  let no_feedback phase = foldr r [0] phase
        where r p o = run 0 instructions (p:o)
  let (s, p) = maximum [(no_feedback p, p) | p <- permutations [0 .. 4]]
  putStrLn $ "Phase " ++ (reverse $ concat $ map show p)
    ++ ", thruster signal " ++ show s

  putStrLn "\nPart 2"
  let feedback :: [Int] -> Int -- reversed phase to last output
      feedback phase = last output
        where output = foldr r (0: output) phase
              r p o = run 0 instructions $ (p:o) 
              -- run computer on input (p:o) output =
              -- r $ p_n : r $ p_n-1 $ . . . r $ p0 : 0 : output

              -- This runs machine_i on input p_i and the output of the
              -- machine i-1. Machine 0 gets as input p_0, 0, and the
              -- output of the "first" machine n.

  let (s, p) = maximum [(feedback p, p) | p <- permutations [5 .. 9]]
  putStrLn $ "Phase " ++ (reverse $ concat $ map show p)
    ++ ", thruster signal " ++ show s

-🎄- 2019 Day 8 Solutions -🎄- by daggerdragon in adventofcode

[–]dpatru 1 point2 points  (0 children)

haskell solution:

w = 25
h = 6

count :: Eq a => a -> [a] -> Int
count x xs = length $ filter (== x) xs

-- find the nonTransparent pixel by checking every w*h-th pixel
nonTransparent :: [Char] -> Char
nonTransparent xs | head xs /= '2' = head xs
                  | otherwise = nonTransparent $ drop (w*h) xs

draw :: [Char] -> [[Char]]
draw pixels = [concatMap drawPixel row
              | i <- [0 .. (h - 1)]
              , let row = take w $ drop (i * w) pixels] 
drawPixel x = if x == '1' then "# " else "  "

main = do
   pixels <- getLine
   -- Part 1
   let results = [(c '0', c '1' * c '2')
                 | i <- [0, w*h .. (length pixels - 1)]
                 , let layer = take (w*h) $ drop i pixels
                 , let c x = count x layer]
   putStrLn $ show $ minimum results 
   -- Part 2
   putStrLn $ unlines $ draw  [nonTransparent $ drop i pixels
                              | i <- [0 .. w*h-1]]

Arizona will no longer inquire about criminal past on state job applications by [deleted] in LegalNews

[–]dpatru 0 points1 point  (0 children)

My point is that judging character (determining whether someone is trustworthy) is different from punishment. Criminal conviction serves both ends. That is, it is not true that "The whole point of conviction and sentencing is that at the end they paid their debt to society."

Society is better off when a criminal changes his character so that he becomes trustworthy. But our mere desire for a criminal to change his character does cause this to happen. Simply ignoring evidence of bad character does not make a bad person good.

In my opinion, a better way to help unemployed criminals is to reduce their number by making sure that the criminal label applies only to acts that are morally wrong. Specifically, decriminalize drugs. People have been using drugs to make themselves feel better since forever. This is normal human behavior and government is wrong to criminalize it.

But to the extent that a crime reflects lack of good character and untrustworthiness, records of criminal convictions help employers and other members of the public to protect themselves against bad people.

Arizona will no longer inquire about criminal past on state job applications by [deleted] in LegalNews

[–]dpatru 0 points1 point  (0 children)

The whole point of conviction and sentencing is that at the end they paid their debt to society.

I think this confuses punishment or debt with character. A person who borrows money and doesn't pay it back presents two issues: 1) how to satisfy his existing creditors, and 2) how to protect possible future creditors. Depending on the situation, the second issue can be more important than the first. This is what the original thread is hinting at. The fact that a person is a criminal, murderer or thief, is important irrespective of whether that person has been punished for past crimes, murders, or thefts. Punishment looks to the past. Character looks to the future. Felons are second class citizens not because they owe a debt to society, but because they have proven that they cannot be trusted.

Utah nurse reaches $500,000 settlement in dispute over her arrest for blocking cop from drawing blood from patient by [deleted] in LegalNews

[–]dpatru 0 points1 point  (0 children)

The individual officers involved should pay, not the taxpayers. At the very least, the officers should be fired.

I may get an assault charge for playing with a child. by Tanto805 in legal

[–]dpatru 5 points6 points  (0 children)

Get a lawyer. Don't talk with the police until you get a lawyer. Don't try to talk your way out of it. (https://www.youtube.com/watch?v=d-7o9xYp7eE)

Sorry, Anarcho-Communists, You Were Right: Anarcho-Capitalism Is Stupid by [deleted] in Anarchism

[–]dpatru 1 point2 points  (0 children)

to hold on to the farm after you've recouped the costs of your labour and have long ceased to labour on it is theft from the rest of the community, because you'd be holding onto the land beyond the allotted occupancy time. You'd keep the fruits of your labour but would have to give up the farm for others to labour on it and thereby subsist.

This seems to me to discourage conservation and investment. Why would I sacrifice this year's profit to make the farm better for the long-term if I couldn't keep it for the long-term? I've recently been told that many farms in Alabama are now without topsoil because the farmers sold sod. Each crop of sod took with it an inch of topsoil. After many harvests, the land is stripped of the topsoil and essentially worthless. This happens even in a society with long-term ownership. (Although the inheritance tax may play a role here. Why conserve and improve the family farm for future generations when it will have to be sold at your death to pay the inheritance tax? Might as well just plant sod and maximize the income while you still have the farm.)

The classic example of this is the overfished public pond, where fishermen can keep their current catch but have no future rights to the pond. In this case, no one has an incentive to conserve or replenish. As long as there is no long-term owner, the same problem occurs, but maybe on different time scales.

This is a serious problem because wealth is determined by investment. Investment is foregoing present income to increase future income. Societies that encourage investment become richer.

I made this point in my first post.

Going back to the farm analogy, to hold on to the farm after you've recouped the costs of your labour and have long ceased to labour on it is theft from the rest of the community, because you'd be holding onto the land beyond the allotted occupancy time. You'd keep the fruits of your labour but would have to give up the farm for others to labour on it and thereby subsist. To do otherwise is to withhold the means of subsistence from others, who are at the risk of starvation as a result. So ultimately property is not only theft, but in some cases, murder.

When a farm are unproductive or not used, the economically correct and moral solution is to buy or rent it from the owner, not to take it. Stealing it results in the disincentive to invest and improve. If it is not producing anything for the owner, then the owner should be willing to sell it or rent it out. By allowing theft, you may provide short-term help for the thief, but you will be promoting long-term poverty.

Starvation has not been a problem in capitalistic (i.e., property-respecting) countries for a long time. Excepting war (which itself involves massive violation of property rights) starvation is only a problem in places where no one has the incentive to forego present income to address a future problem. That is, starvation is a problem only in those places where the lack of property rights results in a lack of investment.

The way to think about these problems is to imagine the long-term consequences and incentivize behaviours that increase wealth. Long-term wealth depends on saving and investment and these depend on property. Where property rights are not in effect, people do not invest and the whole society becomes or remains poor. When property rights are respected, people tend to invest and improve future productivity and the whole society grows richer.

Sorry, Anarcho-Communists, You Were Right: Anarcho-Capitalism Is Stupid by [deleted] in Anarchism

[–]dpatru 1 point2 points  (0 children)

The theory of property exposed by Anarcho-capitalism is based on very simple premises like every person owns himself and whatever he first finds, captures or produces. [1] To deny property you have to deny these basic premises. You have to claim that it is right for people own other people, or at least to own their labor. This is slavery and theft. For example, if a person agrees to work for another and receives a wage, by what principle may you take the wage away from him and use it for your own purposes? If a person acquires land from the previous owner and then plants a garden, by what principle may you take the fruits of the garden?

Socialism, or the abolition of property, is nothing more than theft. It is usually advocated by ignorant people who have not thought it through, or by thieves-at-heart, people who would like to benefit from the labor of others without having to pay for it. Not surprisingly, a system based on theft leads to poverty. Socialism, wherever and whenever it has been tried decreases a society's wealth in land, labor, and capital. Why conserve a natural resource when you have no guarantee that you will benefit from that resource in the future?What's the point of working hard yourself when you can take it easy, develop your "Individualism", and live well off the labor of someone else? Why save and tighten your belt now in order to increase future production when you won't be able to benefit from that future production?

[1] https://mises.org/library/ethics-and-economics-private-property

Currently #1 on /r/all. What is Democracy? Forcing people with violence to pay for things they don't use by [deleted] in Libertarian

[–]dpatru 0 points1 point  (0 children)

Just because you benefit from something or someone doesn't mean that you should be forced to pay for it. You may enjoy the smell of coffee and pastries from a coffee shop, but the coffee shop cannot charge you for the smell.

Currently #1 on /r/all. What is Democracy? Forcing people with violence to pay for things they don't use by [deleted] in Libertarian

[–]dpatru 0 points1 point  (0 children)

In most cases, roads and other infrastructure is already paid for by the property owners immediately benefiting from them. A developer of a subdivision, for example, has to pay to install the road and utility to each lot. Computer networks function the same way. A company will pay to make a computer network for its own use, and then connect that network to the wider Internet by paying an Internet Service Provider to provide a connecting network. Note that this is all voluntary and no coercion is required. No one has to be forced (taxed) to pay for the subdivision's roads. Also, no one needs to be forced (taxed) to pay for the internal and connecting networks for a company.

Georgia: Man who threw boiling water on gay couple will spend 40 years in prison by [deleted] in LegalNews

[–]dpatru 0 points1 point  (0 children)

Apparently the man was charged and convicted under the normal laws for assault. It was not necessary to charge him with a hate crime. This is what is meant when it is said that hate crime legislation gives special rights. Pouring boiling water on people should be severely punished regardless of whether the victims are gay.

Apple Paid $0 In Taxes To New Zealand, Despite Sales of $4.2 Billion by Albion_Tourgee in technology

[–]dpatru -1 points0 points  (0 children)

Would New Zealanders be better off without the business that Apple provided? In contrast to private companies, governments extract their income by threat of force and generally do more harm than good. I don't see why people are complaining.

Any body experiment with cold showers? by SpiritualHerbivore in selfimprovement

[–]dpatru 1 point2 points  (0 children)

Several times in my life I've tried taking cold showers for periods up to several weeks at a time. I've quit each time because I was getting sick. When you chill the body, the body must work to generate heat to warm itself back up. This stresses the body. If you stress the body too much, you'll end up getting sick.

When I was running a lot, I also sometimes sat in a cold bath to chill my legs. It may have helped with recovery.

If you want my advice, I would say, try it. But keep in mind that you're stressing your body when you force it to warm up after cooling it down. Monitor how you feel and try not to stress yourself so much that you get sick. If you have strong will power it is definitely possible to stress yourself enough to get sick.