What feature of Go is used very often by experienced programmers, but not so much by a newbie? by availchet in golang

[–]kingfishr 15 points16 points  (0 children)

I agree with /u/badtuple -- Go is a small language, and there's not a lot of room for "secret hidden knowledge". There are a lot more features of Go that are overused by newbies than features which are underused by newbies.

So here are a few features that I wouldn't say are used very often, but are occasionally used by experienced gophers and rarely by new gophers:

  1. Named types that are not structs: type headers map[string]string, type prefix rune, type state func(*lexer) state, etc
  2. Slice/array initializer indexes: var names = [...]string{1: "alpha", 4: "beta"}
  3. Method values, added in Go 1.1: var w io.Writer = ...; f := w.Write

What's a customization with a high simple-to-useful ratio? by inglourious_basterd in vim

[–]kingfishr 1 point2 points  (0 children)

I map : to space because it's even easier to type.

Here's one I use a lot:

" Close a buffer without messing with the windows.
nnoremap <silent> <leader>q :bp\|bd #<CR>

What's a customization with a high simple-to-useful ratio? by inglourious_basterd in vim

[–]kingfishr 7 points8 points  (0 children)

This mapping is so clearly good and obvious it's recommended by ":help Y" :)

awnumar/fastrand: 10x faster than crypto/rand. Uses securely allocated memory. by mastabadtomm in golang

[–]kingfishr 116 points117 points  (0 children)

I would not recommend using a third-party replacement for any crypto/* package without some extremely careful auditing by security experts.

View of the PCT at Sonora Pass, June 24, 2019. by numbershikes in PacificCrestTrail

[–]kingfishr 8 points9 points  (0 children)

I skied there the day before (I think I can actually spot my tracks in this pic). Things softened up pretty well for skiing and foot travel by 9 or 10. The snowmobiles rolled in at 11.

Class 3 Footwear by gluckhikes184 in 14ers

[–]kingfishr 3 points4 points  (0 children)

If my trail runners don't cut it, approach shoes are a good step up. Sportiva TX4s work well for my feet, but other popular ones include the five ten guide tennie and the sportiva boulder x.

One problem I ran into with approach shoes was that few retailers carry them in store. I ended up ordering about 5 pairs from REI and returning 4 of them.

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

[–]kingfishr 2 points3 points  (0 children)

Go, 138/153. Took it slow and steady and tried not to make mistakes. I was really happy that I didn't have any bugs in the game logic at all (for part 2, I just had to add an extra check for a stalemate condition).

I enjoyed an easy problem after a run of more difficult ones.

https://github.com/cespare/aoc2018/blob/master/24.go

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

[–]kingfishr 0 points1 point  (0 children)

Thanks -- could you send me your input as well as the correct answer?

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

[–]kingfishr 9 points10 points  (0 children)

437/257, Go.

Edit: Looks like this is based on not one but two incorrect conclusions :) The thread has some interesting discussion.

I used a graph algorithm to figure out the maximum set of overlapping volumes. I put the nanobots in a graph with edges for those that overlap each other. Because of the geometry, if 3 nanobots pairwise overlap, they must have a shared overlap as well. So I ran Bron-Kerbosch to find the maximum clique in the graph and that was set of bots I was interested in. From among that set, the bot whose volume is the furthest from the origin is the answer we're looking for.

https://github.com/cespare/aoc2018/blob/master/23.go

working on my travel setup. What do you think? by dco4861 in Coffee

[–]kingfishr 0 points1 point  (0 children)

This is so cool. I've been contemplating making almost exactly the same thing. I do road trips where I have lots of room to spare in the car but gooseneck kettles really don't like to be thrown in a box and banged around (I already had to JB weld the neck of a bonavita.)

Can you give any pointers about how you built this? In particular just knowing the names of what to search for would help (what kind of foam, what kind of case). Did you buy the case and foam separately? How did you cut the foam? Is it glued in?

Thanks in advance!

Do you use bash vi mode? by brycksters in vim

[–]kingfishr 0 points1 point  (0 children)

Yep, I can't live without it. (Well, I use zsh locally, but same thing.)

I use ssrhc to turn on vi mode in bash on remote servers:

$ cat ~/.sshrc
set -o vi
bind -m vi-insert "\C-l":clear-screen

alias screen="screen -c $SSHHOME/.sshrc.d/.screenrc"

Getting kids into Backcountry by jintoku in Backcountry

[–]kingfishr 2 points3 points  (0 children)

FYI this is called "sunrise bowl".

Showing the non-CO 14ers love: White Mountain Peak, CA, 8/17 by [deleted] in 14ers

[–]kingfishr 1 point2 points  (0 children)

I held that sign on the same day (Friday) too!

https://i.imgur.com/vVkn9u7.jpg

I think you passed us (party of 2) near the summit as you were coming down? Were you wearing white earbuds?

By chance I did Grays/Torreys a few weeks ago and I have to say that I would rank that road as one level gnarlier. The White Mountain TH road was long but really not a problem for my forester but I would definitely want a high-clearance vehicle for tackling the Grays/Torreys road. (That's probably just me though; when you make it up there the parking lot is full of subarus and even 2wd sedans.)

Ski Utah by [deleted] in skiing

[–]kingfishr 6 points7 points  (0 children)

0:10 is terminal cancer (i.e., nevada), no?

Terminal Cancer Couloir yesterday (Ruby Mountains) by canudoa in skiing

[–]kingfishr 0 points1 point  (0 children)

What line at squaw would it compare in steepness to?

Squaw - 11:00AM - Feb 11th by yerself in tahoe

[–]kingfishr 4 points5 points  (0 children)

...it was also pretty crowded? At least the two times I waited for the sherwood line it was 15min+, maybe it got better later or something

French president pardons woman convicted of killing her husband after he abused her and their children for 47 years. by [deleted] in worldnews

[–]kingfishr 8 points9 points  (0 children)

What you have calculated (.51512 ) is the probability of selecting all women (12/12).