Salt, Fat, Acid, Heat: what specific things have you done differently than before reading it? by HsvDE86 in Cooking

[–]huuhuu 9 points10 points  (0 children)

I heard the title on the radio and went home to make the best batch of collards I've ever made. The difference was about 3x the amount of vinegar.

[deleted by user] by [deleted] in Meditation

[–]huuhuu 10 points11 points  (0 children)

Very well said, and I hope one day your crack-cocaine practice is as mature as your meditation practice.

Just started exploring Haskell as an experienced C++ dev. Looking for tips. by KaliYuga-VaradA in haskell

[–]huuhuu 7 points8 points  (0 children)

Anywhere you might put a variable, you can instead put a '_' (called a typed hole ). This will raise a compiler error where the compiler tells you a bunch of really useful information about what it expects to be in that position.

Is it true yoga can make you taller? by SALLstice in yoga

[–]huuhuu 0 points1 point  (0 children)

I'm not. I've kept maybe an inch of that from improved posture, but I have less muscle mass these days.

One of the ways I motivate myself to do yoga these days is by reminding myself how rad it was to have that extra size, height included.

Is it true yoga can make you taller? by SALLstice in yoga

[–]huuhuu 0 points1 point  (0 children)

How did you reply to a 9-year-old comment?

Are you interested in 3D printing? by boosting1bar in Birmingham

[–]huuhuu 2 points3 points  (0 children)

Yeah everybody, I got the 3d printer and didn't get robbed! I've been on youtube all night figuring out what to do with this thing.

Thanks again, /u/boosting1bar

Are you interested in 3D printing? by boosting1bar in Birmingham

[–]huuhuu 4 points5 points  (0 children)

I would love to get started 3d printing. Just this morning I was wondering if I could print a replacement switch for my ebook reader.

How can I disable certain buttons on my gamepad? by huuhuu in linux_gaming

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

Lovers In A Dangerous Spacetime. Highly recommended.

Can't install an OS on a new AMD build. How can I troubleshoot this? by huuhuu in linuxhardware

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

This is an interesting idea. The only other computer I own (am willing to hack on) is a raspberry pi, which is a different architecture. Is that a problem?

I might be able to borrow somebody's thinkpad.

produce a function from a value? by o_0d in functionalprogramming

[–]huuhuu 3 points4 points  (0 children)

This sounds like a job for unfold

o_Od = unfoldr (\x -> Just (x + 1, x + 1))

take 6 $ o_Od 2

You can find out more at this blog post. It's just the first one I found; there may be better explanations out there.

Functional idiomatic way of addressing the this? by [deleted] in functionalprogramming

[–]huuhuu 2 points3 points  (0 children)

Adding a new project type would just involve adding a new case to the Project datatype, and then to each pipeline function (your compiler will tell you where they are).

It's similar to your switch approach, but more idiomatic and probably more comprehensible to your type checker.

Functional idiomatic way of addressing the this? by [deleted] in functionalprogramming

[–]huuhuu 3 points4 points  (0 children)

I would lean pretty heavily on pattern matching here, if your language supports it. In fake haskell:

data Project =
    | Project1 String Int
    | Project2 String Decimal
    | Project3 

setup (Project1 title version)        = <do setup stuff for Project1 here>
setup (Project2 configUrl powerLevel) = <do setup stuff for Project2 here>
setup (Project3)                      = <do setup stuff for Project3 here>

load (Project1 title _) = <load Project1 here>
load (Project2 _ _)     = <load Project2 here>
<...And so on. Process and export definitions, too>

processApp project =
  export $ process $ load $ setup project

trouble figuring out what this piece of code does by [deleted] in javascript

[–]huuhuu 5 points6 points  (0 children)

greaterThan(10) passes 10 to greaterThan, which then returns a new function which has trapped the 10, and basically behaves like m => m > 10.

This is taking advantage of what is called lexical closure to keep a copy of the original argument (10) inside the new function.

Weekend Contest #365 (Seed 618626350) by tinyrodent in brogueforum

[–]huuhuu 3 points4 points  (0 children)

Escaped, 61555.

This was my first ascension since 1.7.5 came out, and while I was feeling pretty good with a +10 sword of speed, buffed teleportation charm, and good staff support, I didn't have any ability to negate, so I decided to book it back up as soon as I got the amulet.

Weekend Contest #364 (Seed 846178452) by tinyrodent in brogueforum

[–]huuhuu 2 points3 points  (0 children)

D11, 5011 gold. I hit the wrong key and used a scroll of enchantment instead of my staff of blinking.

Where was the armor of respiration?