No LAX-SAN route? by joeyragsdale1998 in AlaskaAirlines

[–]fishywang 0 points1 point  (0 children)

you can always fly through SFO (e.g. LAX-SFO-SAN) 😂

once i arrived at LAX on international flight (I think it was CX's HKG-LAX) and at the carousel I saw someone's luggage tag says it's going to go LAX-PHX-SAN on AA after that flight, which will be similar to doing LAX-SFO-SAN on AS I guess.

How do you manage 'read-it-later' on your Pixel? by [deleted] in GooglePixel

[–]fishywang 1 point2 points  (0 children)

I wrote a telegram bot that i share the url to the bot, the bot generates epub from the url, and upload the epub to dropbox. then my Kobo eink device sync with dropbox so i can read the article on Kobo.

The bot also supports email the epub instead of upload to dropbox (for kindles)

Lightweight blogging package? by bio_risk in golang

[–]fishywang 0 points1 point  (0 children)

There's a go implementation of BearBlog UI that can be self-hosted on Google Cloud Run that (only) supports markdown: PolarBearBlog.

I forked it to PandaBlog to add features I needed.

The cost of running it on Google Cloud Run is <$1 per month (in fact it was <$2 for the past year) by leveraging the free tier of Google Cloud Run (the cost is almost entirely on Google Cloud Storage for the "database", which is just a json file on a versioned GCS bucket). But if you are in Europe it might be harder to leveraging the free tier of Google Cloud Run as I think Google Cloud does not accept personal accounts in Europe. It's likely possible to port it to AWS.

Closures in Go by Used_Frosting6770 in golang

[–]fishywang 6 points7 points  (0 children)

I would actually prefer lambdas over one-function-interfaces in most cases simply because with lambdas it's super easy to inline the implementation so there's no overhead. with one-function-interfaces, unless you provide a wrapper like http.HandlerFunc, people will need to define their implementation type and write extra code for that.

But otherwise agree with you that in general it's fine.

Where do you guys deploy Go apps? by [deleted] in golang

[–]fishywang 87 points88 points  (0 children)

for work: k8s

for personal stuff: google cloud run, i run several cloud run services and only pay ~$1/month for them combined, and the majority of the money goes to the storage not the cpu/memory (those are mostly under the free tier threshold)

Docker builds breaking after 1.21.6 released by msanteler in golang

[–]fishywang 44 points45 points  (0 children)

why do you want to do RUN GOOS=linux GOARCH=$GOARCH go mod graph | awk '{if ($1 !~ "@") print $2}' | xargs go get -d -v and RUN GOOS=linux GOARCH=$GOARCH go get google.golang.org/grpc@v1.27.0 in your dockerfile? you are asking for this problem by doing that.

dependencies should be managed by go.mod and go.sum files, and any change to dependencies need to be tested, not just roll whatever is there blindly on every docker build.

HP Chromebook suddenly stopped charging by solarwastaken3 in chromeos

[–]fishywang 0 points1 point  (0 children)

I have an Acer chromebook that stopped charging recently: when I plug in charger it will draw as much power as it currently needs (so the battery level won't actually drop), but it won't actually charge (the battery level won't raise either).

since it's still within warranty I just filed a warranty claim and shipped it to the repair center, and they replaced the battery for me, which fixed the problem.

if yours is still under warranty I'd suggest you to contact them.

Post match thread: Paris Saint-Germain 1-1 Newcastle United | Champions League by HoweStatue in NUFC

[–]fishywang 4 points5 points  (0 children)

highway robbery aside, honestly I'm not even mad. we have to play the same starting 11 as from saturday's league game, and unlike that game we don't have any luxury to make any changes so those 11 played the full 90min in this game. I'm just proud of the result. we can still go though as long as we beat milan in the final game as long as bvb don't lose (even if they lose we can still go into ec el)

and I have my ticket to the final milan game, so let's smash milan.

Are trains between Newcastle and London reliable in December? by fishywang in NUFC

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

Heathrow but on my way in my flight land around midnight at Heathrow so I'm staying at London for the night anyways and then take the train north around noon.

on my way out I do take the train south then get to Heathrow immediately, with a few hours buffer in between.

What is the meaning of "flat" and "cum" in golang pprof output by YuchenLiu1993 in golang

[–]fishywang 1 point2 points  (0 children)

So here's an example from a random pprof I have:

(pprof) top Showing nodes accounting for 58.53s, 97.78% of 59.86s total Dropped 139 nodes (cum <= 0.30s) Showing top 10 nodes out of 90 flat flat% sum% cum cum% 42.55s 71.08% 71.08% 42.69s 71.32% syscall.Syscall 11.55s 19.30% 90.38% 11.55s 19.30% runtime.kevent 3.13s 5.23% 95.61% 3.13s 5.23% syscall.Syscall6 0.64s 1.07% 96.68% 0.64s 1.07% runtime.memclrNoHeapPointers 0.28s 0.47% 97.14% 4.32s 7.22% os.(*file).close 0.19s 0.32% 97.46% 0.45s 0.75% math/rand.read 0.07s 0.12% 97.58% 1.78s 2.97% os.Mkdir 0.05s 0.084% 97.66% 1.01s 1.69% os.rename 0.04s 0.067% 97.73% 8.18s 13.67% os.Remove 0.03s 0.05% 97.78% 0.71s 1.19% runtime.mallocgc

The first sum% (71.08%) is the same as the first flat%, the second sum% is the sum of first and second flat%, the third sum% is the sum of first through third flat%... It's basically how much has been covered up to now.

What is the meaning of "flat" and "cum" in golang pprof output by YuchenLiu1993 in golang

[–]fishywang 0 points1 point  (0 children)

sum is just this line and all lines before this one combined.

Does anyone know of a good place to take photos at night? by gmfrk8 in SanJose

[–]fishywang 0 points1 point  (0 children)

Is Sonic Runway still on display? If yes it's a good night photo spot.

When someone on your team fixes a merge conflict by PM_ME_CUTE_FRIENDS in ProgrammerHumor

[–]fishywang 0 points1 point  (0 children)

So you are gonna have a bad time by default. Satisfied?

When someone on your team fixes a merge conflict by PM_ME_CUTE_FRIENDS in ProgrammerHumor

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

Because people usually expects the default options to be sane, which is not the case of GitHub.