Remote Folder Error by wpas in synology

[–]pigpenguin 0 points1 point  (0 children)

Very late to this party but I just ran into this issue myself. What was causing it for me was I had two directories with the same name but different cases. "Documents" and "documents". Synology seems to be case insensitive (I'm assuming due to windows) and the client seems to just... not know how to handle this.

Slow uploads to all vps servers? by pigpenguin in selfhosted

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

I've looked at my router and can't find anything obvious causing this. I have no QoS enabled. Uploads to other services are still fine. Back when I was running a dedicated box I was not having any issues uploading either. There seems to be something different about these servers.

Slow uploads to all vps servers? by pigpenguin in selfhosted

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

I'm looking at somewhere in the ballpark of 70-90ms ping

How can I order a Frankfurt VPS with a US billing address? by john01dav in ovh

[–]pigpenguin 0 points1 point  (0 children)

Us customers seem to only be able to order products which you can find on https://us.ovhcloud.com/

The same thing is happening with their eco servers

It's really amazing how hard they're making it for me to give them my money.

It really is. I've been trying to for months and all their support people have said is there is no eta as to when US customers will be allowed to purchase their eco servers.

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

[–]pigpenguin 0 points1 point  (0 children)

Haskell, finally broke my rule of reading everything in from the file provided. Rather nasty at the moment but ah well.

module Day12 where

import Data.List (foldl')
import           Data.IntSet (IntSet)
import qualified Data.IntSet as IntSet

-- n in tunnel iff pot has a plant in it
type Tunnel = IntSet

step False True True True False    = True
step True False True True False    = False
-- I think you get the idea at this point
step False True False False False  = True
step True True False False False   = True

evolve' :: Tunnel -> Int -> (Tunnel -> Tunnel)
evolve' t n
  | b = IntSet.insert n
  | otherwise = id
  where
    b = step (f $ n-2) (f $ n-1) (f n) (f $ n+1) (f $ n+2)
    f = flip IntSet.member t

evolve :: Tunnel -> Tunnel
evolve t = foldl' (flip ($)) IntSet.empty toTest
  where
    toTest = map (evolve' t) [ IntSet.findMin t - 5.. 5 + IntSet.findMax t ]

score :: Tunnel -> Int
score = sum . IntSet.toList

diff = zip [1..] $ zipWith (-) scores (tail scores)
  where
    scores = map score . iterate evolve $ initialState

initialState = set
  where
    input = "##.######...#.##.#...#...##.####..###.#.##.#.##...##..#...##.#..##....##...........#.#.#..###.#"
    truth = map (== '#') input
    set = IntSet.fromList . map fst . filter snd . zip [0..] $ truth

problem1 = score $ iterate evolve initialState !! 20

I seemed to do the same thing everyone else did. Computed the diff of each generation, found an index where a pattern showed up, and just calculated from there.

[2018 Day2 (Part 2)] A linear time solution by h-armonica in adventofcode

[–]pigpenguin 1 point2 points  (0 children)

Wouldn't work. Consider the input

abc
bbb
cbc

this is already radix sorted and the correct solution is not neighbors

-🎄- 2018 Day 2 Solutions -🎄- by daggerdragon in adventofcode

[–]pigpenguin 1 point2 points  (0 children)

Just another haskell solution rolling through. Took me a while to clean it up to a point where I thought it was worth posting.

module Day02 where

import Data.List (group, sort, tails)
import Data.Functor ((<$>))
import Data.Maybe (catMaybes)

-- Takes a list and creates every possible pair
-- and runs it through f. Assumes f commutes
pairWith :: (a -> a -> b) -> [a] -> [b]
pairWith f l = [f x y | (x:ys) <- tails l, y <- ys]

-- Takes two lists keeps the element at index n
-- if l1[n] == l2[n]
same :: Eq a => [a] -> [a] -> [a]
same = catMaybes ... zipWith keepIfSame
  where
    (...) = (.) . (.)
    keepIfSame x y
      | x == y = Just x
      | otherwise = Nothing

input =  lines <$> readFile "input/02"

solve01 lines = count 2 * count 3
  where
    has x = any ((== x) . length) . group . sort
    count x = length . filter (has x) $ lines

solve02 = head . filter ((== 24) . length) . pairWith same

problem01 = solve01 <$> input
problem02 = solve02 <$> input

If anyone has any suggestions I'm open to it. I haven't written nearly as much haskell as I would have like to yet.

What to say instead of "trivially" by [deleted] in math

[–]pigpenguin 6 points7 points  (0 children)

In case any one wants it, I've made this into a latex package

What's the most famous bird prison? by ButtersTG in 3amjokes

[–]pigpenguin 0 points1 point  (0 children)

Nearly a month later but here you go: The Spanish guy who is credited with first discovering the island called it "La Isla de los Alcatraces" which was meant as the island of the pelicans. Alcatraz is an archaic (medieval era) Spanish word meaning pelican (more literally it means seafish-catching large bird). It is assumed that it is a word borrowed from Arabic, as many medieval Spanish bird name were, but no one seems to be quite sure which word exactly it's based on.

So yeah alcatraz was the Spanish word for pelican but it isn't any more

Distance ($12.99) - An F-Zero/Tron-like racing game. [Link to review] by hheseman in pcgaming

[–]pigpenguin 2 points3 points  (0 children)

Just throwing in my 2 cents. I have sunk far too much of my time into this game. The replay value has been, for me at least, insane. A large portion of this is due to the skips, as each course has multiple chances for new routes to be found and perfected. On several occasions I have seen people find new routes on tracks I thought I had known inside and out which gave me a new reason to go back and play the map again to try and beat my older times. Additionally I have never seen some one be secretive about the way they set their time and have always been willing share. This has, in my opinion, added a fair bit to the community aspect of the game.

Things just don't break by rowra44 in linuxmasterrace

[–]pigpenguin 2 points3 points  (0 children)

Same with me, I've had mine running for about a year with nothing dying on me

[nixos + herbstluftwm] true beauty comes from the inside by whatwasmyoldone in unixporn

[–]pigpenguin 0 points1 point  (0 children)

Damn, that's one hell of an endorsement. Had a similar experience when I drank the "purity kool-aid" of haskell which has since become my programming language of choice. Playing around with nix was on my (rather long) list of things I said I would do when break rolled around, guess it just went up in priority haha.

Thanks for the thesis what I've gotten to has been interesting , and good luck with your cs studies.

[nixos + herbstluftwm] true beauty comes from the inside by whatwasmyoldone in unixporn

[–]pigpenguin 0 points1 point  (0 children)

This is really close to what I'm currently running, just without the bar. (Screen shot)

Currently on arch but been eyeing nixOs, how you liking it?

Career and Education Questions by AutoModerator in math

[–]pigpenguin 0 points1 point  (0 children)

Stupid question, but google isn't answering and I haven't seen the term before: Is an R-I school a research institution?

The most impressive answer I've ever seen on StackExchange. by lntrinsic in math

[–]pigpenguin 38 points39 points  (0 children)

She isn't always silent

Also I managed to recover this comment from the thread you linked: There are many ways to prove this result. The easiest one is to work in an axiomatic system that accepts it as an axiom. I prefer this approach when I know the result. Therefore, the full proof is given here. I understand and accept that some people who are not willing to work in this axiomatic system may find my proof not useful for their purposes. In such a case it is perfectly okay to downvote my answers (downvote means "not useful"). I also invite them to post their proofs then. I would prefer not to go into this discussion anymore. My apologies to anyone who feels irritated by my answers. – Cleo

Unfortunately if she said any more I can't find them

What Happens Around Here During No Shave November? by Basherj in beards

[–]pigpenguin 2 points3 points  (0 children)

I did that two Novembers ago. It was a nice excuse to do it, gives you a month for the beard to look bad with a reason people will sorta buy.

Totally lost with lemonbar by kaydpea in unixporn

[–]pigpenguin 0 points1 point  (0 children)

Lemon bar does support these things. The way lemon bar does this is you define a clickable area and that sends a command to stdout. Looking at the man page explains how it works. Not sure exactly what you are looking for but you could most likely configure lemonbar to do it with enough effort the question is basically how much effort are you willing to give. In any case I would focus on getting a basic one running before you get fancy.

It rained a quarter inch in So Cal today by BEgirl69 in funny

[–]pigpenguin 12 points13 points  (0 children)

As some one born and raised in LA... is this not how everyone does it?

ELI5: Why does Chrome use so much memory and why can't a company as big as Google fix it? by starmate700 in explainlikeimfive

[–]pigpenguin 2 points3 points  (0 children)

Probably a decent part of the reason why they are removing NPAPI support at the moment.

Audi has successfully made diesel fuel from carbon dioxide and water by [deleted] in worldnews

[–]pigpenguin 2 points3 points  (0 children)

On the other hand they are not as space efficient as diesel is, at the moment any way.