HNHacker News
TopNewBestAskShowJobs

dharmaturtle

454 karma · joined October 7, 2013

[ my public key: https://keybase.io/dharmaturtle; my proof: https://keybase.io/dharmaturtle/sigs/xb251-ShxEpBNZae8VvDaqxiONfTyI-GZD4nZSKYG_A ]

Or you can reach me at my HN handle at gmail

submissionscomments
dharmaturtle··on Google Drive may restrict files identified as violating ToS
Apple's CSAM would scan your offline photos.

Google scanning photos you upload to their cloud seems fine to me. Not a slippery slope.

dharmaturtle··on LG’s new 16:18 monitor
I want to emphasize the other comment:

> The other thing that's absolutely essential for using these larger format monitors is window management software and in general a more keyboard/macros focused workflow.

My 4k 39" screen really, really drove me to use keyboard shortcuts. By default on Windows, hitting Windows+Number will take you to the 1st/2nd/3rd/etc program in your taskbar. I use AutoHotKey to take this further: CapsLock+Number and CapsLock+F1-F12 also take me to predetermined programs. I install websites as Chrome apps (chrome://apps/) in order to make going to Gmail/Calendar/Github faster. (I use 7+ Taskbar Tweaker to hide the labels so they don't take over my taskbar.) I also use this script: https://www.autohotkey.com/board/topic/79338-simple-window-p... which makes window management (resizing, centering, moving, etc) much easier. I also use Vimium and this program https://github.com/zsims/hunt-and-peck - now my hands almost never leave the keyboard.

I encourage you to spend some time optimizing your setup. It really, really pays off. The powerboard on my TV-monitor has broken 3x now - and each time I've repaired it/replaced the part because I like my setup so much.

dharmaturtle··on Ligatures in programming fonts: hell no (2019)
I had autocomplete more in mind.
dharmaturtle··on Ligatures in programming fonts: hell no (2019)
> [this] makes you dependent on the tools.

Socrates had a similar opinion w/r/t reading and writing:

> This discovery of yours will create forgetfulness in the learners’ souls, because they will not use their memories; they will trust to the external written characters and not remember of themselves.

I feel like you and Socrates are incorrect for similar reasons.

Humanity advances when it can hide complexity. Tools help with that. To argue against tooling because it makes you dependent on the tooling is like telling the construction worker to put away the jackhammer and pick up the pickaxe. Programmers are super productive (compared to other professions) because we can build tools that make us better programmers. The leverage recurses.

dharmaturtle··on Functional Programming as a Competitive Advantage – A Real-World Use-Case
F# person here. Unfortunately I agree with you - the article doesn't really live up to the title. I'm going to assume that you're coming from C#. F# is unquestionably a superior language if you're doing LOB work. (Part of being an F# fan is knowing what it's bad at, and it's bad at game programming & perf compared to C#. This isn't to say F# is slow - but it's slow-er than C#.)

"Domain Modeling Made Functional" by Scott Wlaschin is excellent. It's in F#. His "railroad oriented programming" talk drove home the benefit of discriminated unions, which C# is... someday going to get. (It's been a WIP for years.) https://vimeo.com/113707214

Avoiding side effects makes reasoning about code simpler. If you call a pure function, you know it doesn't effect anything else in the system. It doesn't mutate its arguments, it doesn't call a web service, etc. This means you can memoize it. What you see is exactly what you get. *In contrast, imagine writing code that must return `void`. The only way you can "return" a value is by mutating the arguments.* Now to be fair, eventually you must side effect in order to have any reasonable program (i.e. printing to the console is a side effect), but the goal of FP is to push side effects to the boundary of the system.

This also enhances testability. Your "core" is pure and easily testable, and your IO can have its own integration tests. My personal definition of "unit test" is a test of pure code. If it does IO, it's an integration test. F# is also wonderful in that it has FsCheck (and Hedgehog.Fsharp). Property based testing is a fantastic rabbithole to get into, and these days the majority of my unit tests are property based.

Where F# shines is when there's intrinsic, essential complexity in the domain. (Distinct from infrastructure complexity - F# doesn't have any real advantage if all your complexity is in IO). However, even something as simple as "user input validation" may count as domain complexity. For example in my domain, I have a discriminated union who's cases are `IdempotentError` and `UserInputError + string`. In the case of an IdempotentError, I just report things are groovy back to the user. For a `UserInputError`, I display the associated string. That string may/should be a type if you're starting to do internationalization. In C# you would need to do a ton of run-time if-checks or polymorphism to do the above. Yuck. In F#, these checks are enforced by the compiler. You literally can't forget to handle an error case.

Lastly, F# virtually eliminates all null errors. Its option type is wonderful, and C# only wishes its nullable reference was as simple.

I personally learned F# through Advent of Code. F# has a REPL which is ideal for these types of problems. Here's a blog and video about it: https://www.compositional-it.com/news-blog/a-brief-introduct... https://www.youtube.com/watch?v=_QnbV6CAWXc&t=1298s FYI F# notebooks is now out of preview, so you can use normal VS Code (and not the Insiders version).

dharmaturtle··on NewLimit: a company built to extend human healthspan
I personally think it would just be fun to re-program myself. What would life be like if I could make myself less argumentative? If I could turn myself Christian? If I could make myself enjoy OOP?

Also, imagine all the various hardware updates I could get - how cool would it be to see UV/IR?

dharmaturtle··on Japanese scientists develop vaccine to eliminate cells behind aging
To not answer your question, here's the /r/science thread https://www.reddit.com/r/science/comments/ren6cc/japanese_sc...
dharmaturtle··on Why punish a scientist for defending science?
Sorry, but I don't think this rebuffs Pew.
dharmaturtle··on The Fable of the Dragon-Tyrant (2005)
13 minute long CGP Grey video of this story: https://www.youtube.com/watch?v=cZYNADOHhVY
dharmaturtle··on Fakelish – Fake English word generator
https://raw.githubusercontent.com/nwtgck/fakelish-npm/develo...

Basically a big probability map. I'm guessing this was machine generated though, and it isn't clear to me how that was done.

dharmaturtle··on Why punish a scientist for defending science?
> While religiously unaffiliated people currently make up 16% of the global population, only an estimated 10% of the world’s newborns between 2010 and 2015 were born to religiously unaffiliated mothers. This dearth of newborns among the unaffiliated helps explain why religious “nones” (including people who identity as atheist or agnostic, as well as those who have no particular religion) are projected to decline as a share of the world’s population in the coming decades.

https://www.pewforum.org/2017/04/05/the-changing-global-reli...

dharmaturtle··on Firefox is the alternative to a Chrome hegemony
Are you talking about Chrome or Edge?

Both are better than Safari on iOS though, which does force you to use it.

dharmaturtle··on The melancholy decline of the semicolon
I totally agree with you. I like using symbols to shape the way I think, and I find using AutoHotKey to to expand typed strings works well for my workflow. Stuff like "qbeta", "qright", "qdegree" and "q@" become β, →, °, and my email. Very useful when I was in university.

These days, I use it to type stuff like (゚ヮ゚ ) ¯\_(ツ)_/¯ and a black box symbol that HN won't let me type, but is eye catching for when you're scanning logs. Symbols like checkmark, ×, the thinking emoji, and the hourglass are useful when taking notes.

Lots can be found in the Windows 10 emoji finder (Win + Period), but AHK is more customizable. Also WinPeriod is juuuuust that much more friction and I find AHK fits into my flow better. This flow shapes the way I think.

dharmaturtle··on Everyday robots are slowly leaving the lab
Good video: https://www.youtube.com/watch?v=_rBO8neWw04

TLDW: Stop using detergent packs, start using the pre-wash bin.

dharmaturtle··on What's next for language design? (2017)
Gonna shoutout F#'s unit-of-measure types

> It's "small" but rather important not to mix units!

With unit of measure, it's possible to easily/simply create types like CustomerId, which is actually a Guid/Int under the covers. Means you can't pass a CustomerId to something that expects an OrderId. These types are erased at compile time, so there's zero effect on runtime performance. It's lovely.

dharmaturtle··on Advent of Code 2021
If you do it in F#, try out VS notebooks: https://www.compositional-it.com/news-blog/a-brief-introduct...

It makes working with the F# REPl very nice. I also had a good experience with F# type providers on consuming external input like AoC's.

dharmaturtle··on Embedding the F# Compiler
I have ~8 months of Clojure experience and ~3 years of F#. Clojure's REPL and feedback loop is bloody marvelous. F# also has a REPL, but it doesn't compare. However I still prefer F#'s type-safety. (I believe) a key part of how Clojure's REPL works is by compiling top level forms into JVM instructions which it puts into global mutable scope. Clojure can run on the CLR, so it seems this should be possible with F# as well. It would be cool if F# could temporarily bypass type-safety to quickly iterate on a module before plugging it back into the rest of an assembly and re-enabling type safety. There's no reason to recompile everything when all I want is to test out a 1 line delta independent of its... uh... dependents.

Basically, I want Jupyter-stype notebooks to be my primary dev environment. The blog goes in that direction, but calling code via

    let result = assembly |> extract<string -> Async<unit>> "This.Is.A.Namespace.HelloHost.myFunc"
is just yuck. What I want probably requires language level changes.
dharmaturtle··on WSL2 can now mount Linux ext4 disks directly
TIL about A_PriorKey, thanks!

My own scripts are hardly prettier. AHK is not a great language, and I've put very little effort into learning its syntax. Here's my implementation Alt IJKL & friends: https://pastebin.com/F0xgWHH9 Same invitation to you. If you find a way to improve it, email me at my HN handle at gmail :D Note that it has explicit stuff to work with the AltTab window.

I daily drive a Thinkpad X1, but honestly these days Alt+IJKL is so ingrained into my muscle memory that I make grumbly noises when I try to use them on another coworker's machine and fail. Well at least I used to precovid.

> Did you have any specific reason to go with IJKL instead of WASD?

Ergonomics, primarily. I didn't want to twist the fingers of my left hand to try to hit Ctrl/Shift/Alt WASD while my right hand is sitting snickering. Oh. And I just realized I could have used the right alt + WASD. I went with LeftAlt because Caps is also on the left. You can certainly choose to go with RightAlt, though I would encourage you to try ESDF so you get to leave your fingers on the homerow. Also means you have a bit more room for QAZ if you wanna do anything fancy with them.

I suppose I could try and make RightAlt+ESDF mouse movement... but TrackPoint. Might be useful for when I'm at the desktop though. Anyway, being able to left click from the keyboard is surprisingly useful. (CtrlCaps for me.) Often times my mouse is exactly where I want it to be. Happens multiple times a day.

> To to go the end, I use the same keys, but in the opposite order!

That is fantastic.

dharmaturtle··on WSL2 can now mount Linux ext4 disks directly
I have no idea what glove size I am... but yeah I'm a dude.

> I've noticed a tendency for modern keyboard to remove these edit keys...

The teeny tiny arrow keys on modern laptops is actually part of the reason why I have Caps+IJKL be arrow keys. I have a lot of opinions/feelings about arrow keys. (Why are the most commonly used keys so small??? /rage)

For me Caps + H and semicolon are home/end, Y/P are PgUp/Down, U/O are 4lefts/4rights, and 8/, are 4ups/4downs. The 4's are surprisingly useful, especially when navigating. Home and End combo with Ctrl to yield beginning/end of document, which is also nice. (so like Ctrl+Caps+H = beginning). Everything combos with Ctrl and Shift for wordskipping/selection which is really nice.

I haven't tried making modifiers do different things when used alone - that's a neat idea.

dharmaturtle··on WSL2 can now mount Linux ext4 disks directly
I use two actually - the G700 when at my desk, and G604 when travelling. I really, really like the G700 - I've bought a total of four of them now. Unfortunately Logitech's stopped making them, hence the 604, which is actually not bad. I still prefer the 700's shape/heft, but it's a minor thing. You likely have smaller hands so the 604 will probably suit you fine. The 700(s) has a terrible battery life (like literally 1 day), but the 604 can go months without a recharge (if on bluetooth). Both have toggleable smooth/segmented scrolling, a tiltwheel, a cluster of thumb buttons, a high DPI, and can do FN13+ keys as mentioned. I forgot how I got FN13+ keys onto the 604, but here's the `profile.dat` that I use for my 700s: https://pastebin.com/Sp50Bnpn The process for getting it on to the 604 may or may not be similar.

The thumb buttons do stuff like CtrlW/AltF4 (depending on the program), toggle between maximize/restore, minimize, media play/pause, and summon media player. Pretty basic stuff:

    #IfWinActive ahk_exe chrome.exe
    F14::
    WinGet MX, MinMax, A
    If MX
    WinRestore A
    Else WinMaximize A
    Return
    F13::SendInput ^+t
    F15::WinMinimize,A
    F16::SendInput ^+{Tab}
    F17::SendInput ^{Tab}
    F18::SendInput !{Right}
    F19::SendInput !{Left}
    F20::SendInput ^w
    F21::Media_Play_Pause
Oh, and one of my more favorite AHK things:

    RButton & WheelUp::Send {Volume_Up 1}
    RButton & WheelDown::Send {Volume_Down 1}
    RButton & F17:: Send {Volume_Mute} ;; aka right click + mousetilt = mute
dharmaturtle··on WSL2 can now mount Linux ext4 disks directly
Oh fantastic. Your link eventually led me to find "Vim-like Layer for Xorg and Wayland", which is pretty much what I want. https://cedaei.com/posts/vim-like-layer-for-xorg-wayland/

Now I just need to learn Vim :D

dharmaturtle··on WSL2 can now mount Linux ext4 disks directly
Thanks for this! I have some stuff to google now. Great to hear that what I want is "simple" - I think it's pretty basic too :)

My AHK stuff is a bit more complicated - my scripts total about 5000 LOC, but a lot of that is inflated cause it also doubles as a window manager. It does a bunch of other minor stuff, e.g. Alt-IJKL also combos with Shift for selection and Ctrl for word skipping, but I'm sure xmodmap and other tools you mentioned can handle that.

dharmaturtle··on WSL2 can now mount Linux ext4 disks directly
I don't think this is a solution since you're likely a power user, but https://www.photopea.com/ is surprisingly good. It also retains photoshop's keyboard shortcuts, so my muscle memory is satisfied. It's noticeably slow when doing complex stuff - but for my casual purposes it's great.
dharmaturtle··on WSL2 can now mount Linux ext4 disks directly
Mostly because my Windows setup works for me and moving to Linux would be a large disruption for questionable benefit. Things about my Windows setup which (I think) are hard to recreate on Linux, ignoring the possibility of writing my own code/tool:

* AutoHotKey. Alt/Capslock + IJKL is a universal way to get arrowkeys - e.g. it works in Chrome/a note taking app/Terminal. I'm not against getting a QMK keyboard, but I'm not aware of any laptop keyboards which support QMK. Switching between the two will get real annoying real fast.

* 7+ Taskbar Tweaker. My taskbar hides window names for programs like Spotify/Outlook/Slack (programs which usually have 1 window), but shows window names for programs like Chrome/Terminal/VSCode (programs which usually have multiple windows).

* Logitech software. My mouse has buttons hooked up to F13-F20 (yeah, there's more past F12), which AutoHotKey listens for and does specific stuff depending on what program is currently in focus.

The above are relatively important for my computing happiness, and I'm not entirely sure what I'll gain from moving to Linux.

If you can can address any of these points, please LMK! My reasons not to move to Linux have been growing fewer and fewer, but I've yet to find reasons to move to Linux.

Edit: Actually now that I think about this... I can just setup the mouse on a Windows box and it should just keep sending F13 etc. to a Linux box. So now I only have 2 reasons keeping me on Windows: AutoHotKey and an easily customizable Taskbar. The latter reason will also likely prevent me from upgrading to Win11.

dharmaturtle··on China to supercharge uranium race with 150 new nuclear reactors
Previous discussion, 5 days ago (20 comments): https://news.ycombinator.com/item?id=29094422
dharmaturtle··on GPT-3 is no longer the only game in town
Let me rephrase:

> The fact that GPT3 works at all for English indicates that English is too low level and forces a lot of redundancy (low entropy).

I don't think the goal is to compress information/language and maximize "surprise".

dharmaturtle··on An Epic future for SPJ

    CurrentRound^ : int = 0

    for (i = 1..NumberOfRounds):
        CurrentRound := i
        if(!SetupPlayersAndSpawnPoints()?):
            ShutdownGame()
            return
        else:
            Players.PutAllInStasisAllowEmotes()
            ResetMatch()
Looks nonfunctional as heck to me. Also it isn't expression-based - at least that's what the bare `return` says to me.

Honestly just looks like a dialect of Python. I wonder what SPJ will do with it...

dharmaturtle··on The Engineered Student: On B. F. Skinner’s Teaching Machine
> "All models are wrong, but some are useful."... It is usually considered to be applicable to not only statistical models, *but to scientific models generally*. The aphorism recognizes that statistical or scientific models always fall short of the complexities of reality but can still be of use.

Emphasis mine. Human behavior is not physics. Even in that domain though, Newtonian physics is still useful - we just happen to know its limits.

https://en.wikipedia.org/wiki/All_models_are_wrong

dharmaturtle··on Helion
You need to be an accredited investor, aka have a net worth of 1 million dollars or an annual income of 200k+

https://www.investopedia.com/articles/investing/092815/how-b...

dharmaturtle··on Coconut: Simple, elegant, Pythonic functional programming
> So I can program in F# and run it in Python?

Yes.

> What are the limitations?

It's in alpha.

> Also, is the resulting code readable?

I think so, at least in this screenshot: https://user-images.githubusercontent.com/849479/104726627-3... from this PR https://github.com/fable-compiler/Fable/issues/2339

Its author gives a talk about it here, though you may need to make a (free) account: https://skillsmatter.com/skillscasts/17237-fable-python-f-sh...

He elaborates on the above screenshot and shows F# and Python running on the same Jupyter kernel.

← PreviousPage 3 of 6Next →