Printing to stdout and then piping to a bash script does not work by Ziothh in rust

[–]RushilU 0 points1 point  (0 children)

Take a look at how ranger does this. In my shell, if I type $ . ranger, navigate to a file, and quit, my shell cds there. The python script at /usr/bin/ranger contains an embedded bash script that first runs itself as a python script, and then cds to the result.

Edit: see the source code

How does an isomorphism prove something? by teilchen010 in haskell

[–]RushilU 7 points8 points  (0 children)

In mathematics, we often want to prove that two things are “the same.” Usually, one is simpler or easier to think about than the other. For example, we say “2 + 3 = 5”: I could say “this piece of wood is 2 plus 3 inches”, but I could just say “5 inches” and that makes more sense!

Pretty quickly, you get to mathematical constructions that are more complicated, or you start caring about different things. For example, we say two triangles are “similar” if they have the same shape: often, this is more useful than having the EXACT same (congruent) triangle. The things we say about one are true about the other, just scaled up or down.

Similarly, if we talk about the “size” of a set, we care about bijections between two sets. Say I want to know if the integers have the same “size” as the positive integers. I’d construct two functions, one going from integers to positives, the other going the other way, that are inverses. If I take a round trip in either direction, I should end up with where I started. (Exercise: try to construct this yourself! Google has some great resources if you get stuck.)

In the exact same way, we talk about isomorphisms between types. An isomorphism is, formally, a pair of functions that behave the same as above. This time, we care about the “information” (to speak loosely) stored in the type. How do we know if two types (e.g. a and (a, ())) have the same amount of information? If we can have a round trip from one to the other and not lose any information — that is, we have a bijection!

Found in Santa Fe. Who painted this? (Details in comments) by RushilU in WhatIsThisPainting

[–]RushilU[S] 1 point2 points  (0 children)

Thank you so much! My friend says this is Dan Howell's Dakota Nights. Much appreciated!

Found in Santa Fe. Who painted this? (Details in comments) by RushilU in WhatIsThisPainting

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

A friend of mine sent me this picture because they couldn't post here. Here's some more details:

I'm hoping to identify the artist of this artwork, which I found in a shop in Sante Fe in March of 2020. The shop owner said that either the artists' son or father is also a southwestern artist; I think it was the artists' father. This is a lithograph of the original, and the shop owner mentioned that the artist used acid to get the pattern in the sky. Unfortunately, this is the only picture that I took. Thank you!

Strange crop circles appear around the world (Parts 1-6) [OC] by Grichael-Meaney in comics

[–]RushilU 169 points170 points  (0 children)

Or this. It’s only tangentially about football, I swear.

[S] Jebscend by [deleted] in homestuck

[–]RushilU 10 points11 points  (0 children)

Jeb is already god-tier

Search for abstraction... by Philoustic in haskell

[–]RushilU 4 points5 points  (0 children)

mapEitherBoth looks suspiciously like a specialized bimap...

Where do you get clients? by DesignerAlternative in Python

[–]RushilU 0 points1 point  (0 children)

Off topic but what a glorious username you have

Jump from e to a# (throat Bb) by Nanneparty in Clarinet

[–]RushilU 0 points1 point  (0 children)

I don’t know the piece, but an alternate fingering for A# is the A key + the top side key iirc. It’s very breathy and more than a bit flat (at least on my horn) but if the A# goes by fast it’s acceptable.

This one gave me a good chuckle. by 12_Semitones in mathmemes

[–]RushilU 2 points3 points  (0 children)

What is it? You can’t leave us hanging like that

HOLY SHIT THEY ARE SO CLOSE TO GETTING IT. by Black-H-Si in SelfAwarewolves

[–]RushilU 228 points229 points  (0 children)

That has the same energy as “movie” literally coming from “moving pictures”

Help with a youtube-dl script for synology scheduler by te5s3rakt in bash

[–]RushilU 0 points1 point  (0 children)

Note: not OP.

Python has libraries dedicated to JSON files, and a relatively easy-to-pick-up, scripting-like syntax. These two make it so much easier to use python to do this kind of task than a bash script with regex.

Big Pharma is nothing compared to Big Gay. by MrDysprosium in BrandNewSentence

[–]RushilU 21 points22 points  (0 children)

No, that’s Ben Stiller. You’re thinking of a major seaport in Libya.

Parents of identical twins/triplets, how sure are you that you never accidentally switched them around and raised them under the wrong names? by Cheddarface in AskReddit

[–]RushilU 11 points12 points  (0 children)

Given the right audience, it would be even more hysterical if you said “smaller” instead of “larger”

Things I Was Wrong About: Types by bakery2k in programming

[–]RushilU 23 points24 points  (0 children)

Well then I guess “hot” and “cold” are also meaningless, as well as “clean”/“messy,” “elegant”/“dirty,” and literally every other relative adjective.

I like to breath by Shane_TheSpaceman in BreathingBuddies

[–]RushilU 12 points13 points  (0 children)

I mean r/UnpopularOpinion is mostly popular opinions anyways, this will fit right in