xk3's recent activity

  1. Comment on What’s your method for archiving bookmarked/liked social media posts? in ~comp

    xk3
    Link
    If it's something that I feel is (my abstract notion of) knowledge then I save it here: knowledge.list. Usually things only go there if I think about it more than once or if I've referenced it...

    If it's something that I feel is (my abstract notion of) knowledge then I save it here: knowledge.list. Usually things only go there if I think about it more than once or if I've referenced it before in conversation

    If it's something I want to tinker with in the future then I save it here: todo_tools

    I have the same repo on my phone too so I can add stuff (via Termux), even offline and sync it later but usually I just use SSH. I have the same fish function on both too:

    function knowledge
        for l in $argv
            echo $l | sed 's|\.m\.|.|' >>~/j/lists/knowledge.list
        end
        sorted ~/j/lists/knowledge.list
    end
    
    function sorted
        if isatty stdin
            sort --unique --stable --ignore-case $argv | sponge $argv
        else
            cat - | string trim | sort --unique --stable --ignore-case
        end
    end
    

    Beyond those two categories I haven't felt a need to store lists of things aside from normal data hoarding activities.

    It has been pretty useful to save my internet comments so that I can search them and reference them later:

    ~/j/social/
    library tildes ~/d/library/datasets/social/tildes.db xk3 --cookies ~/.local/cookies-tildes-net.txt
    for title in (sqlite --no-headers --raw-lines ~/d/library/datasets/social/tildes.db 'select path from media' | sed 's|.*\(/\)||' | strip)
        sqlite --no-headers --raw-lines ~/d/library/datasets/social/tildes.db "select text from media where path like '%$title'" >$title.html
    end
    
    ~/d/library/datasets/social/
    reddit-user-to-sqlite user BuonaparteII
    
    ~/j/social/
    for title in (sqlite --no-headers --raw-lines ~/d/library/datasets/social/reddit.db 'select permalink from comments' | sed 's|.*\/comments\/[^\/]*\/\(.*\)/.*|\1|' | tr / '#')
        set comment_id (string split '#' -f2 $title)
        sqlite --no-headers --raw-lines ~/d/library/datasets/social/reddit.db "select text from comments where permalink like '%$comment_id%'" >$title.md
    end
    for title in (sqlite --no-headers --raw-lines ~/d/library/datasets/social/reddit.db 'select permalink from posts' | sed 's|.*\/comments\/[^\/]*\/\(.*\)/.*|\1|')
        sqlite --no-headers --raw-lines ~/d/library/datasets/social/reddit.db "select text from posts where permalink like '%$title%' order by timestamp desc limit 1" >$title.md
    end
    lb mergedbs --pk id ~/d/library/datasets/social/BuonaparteII.db ~/d/library/datasets/social/reddit.db
    
    1 vote
  2. Comment on How do you organize your Linux packages? in ~comp

    xk3
    Link
    I've shared this on Tildes before: I keep track of useful programs in a similar way to on my phone, using functions like these pipinstall pipuninstall which write to these files: cargo_installed...

    I've shared this on Tildes before:

    I keep track of useful programs in a similar way to on my phone, using functions like these

    which write to these files:

  3. Comment on America's never-ending battle against flesh-eating worms in ~science

    xk3
    Link Parent
    I added a link to an interesting primary source:

    I added a link to an interesting primary source:

    August 15, 1977
    Completion of the Darien Gap Highway, the final link of the Pan American Highway system located in Panama and Colombia, is currently dependent upon establishing successful control of foot-and-mouth disease in Colombia.

    After 3 years of cooperation between the United States and Colombia, mostly at U.S. expense, little has been achieved. Findings/Conclusions: Safeguards outlined in a 1973 cooperative agreement have not been implemented, and there were more outbreaks of the disease reported in 1976 than in either 1974 or 1975. There is no assurance that the Colombians are fully committed to the foot-and-mouth disease eradication program.

    Recommendations: The Secretary of Agriculture, in cooperation with the Secretary of State, should develop an overall plan that sets forth realistic target dates for eradicating and controlling foot-and-mouth disease within the existing program area of Colombia to the extent that the disease would no longer pose a threat for transmission northward via the Pan American Highway system. The plan should also provide for the commitment by Colombia of sufficient resources that will assure its willingness to participate in a control program following the eradication and control of the disease from the program areas in Colombia. Because control of the disease is also important to the Central American countries and Mexico, consideration should be given to involving them in the planning and financing of control and eradication programs in Colombia.

    1 vote
  4. Comment on What programming/technical projects have you been working on? in ~comp

    xk3
    Link
    I've also been doing more testing this week. Wrote something to fail my CI when I don't have tests for a specific file: unique_modules = list(set(s.rsplit(".", 1)[0] for s in modules.keys())) #...

    I've also been doing more testing this week. Wrote something to fail my CI when I don't have tests for a specific file:

    unique_modules = list(set(s.rsplit(".", 1)[0] for s in modules.keys()))  # chop off function names
    
    def get_test_name(s):
        path = s.replace("xklb.", "tests.", 1).replace(".", "/")
        parent, name = os.path.split(path)
        path = os.path.join(parent, "test_" + name + ".py")
        return path
    
    @pytest.mark.parametrize("path", [get_test_name(s) for s in unique_modules])
    def test_pytest_files_exist(path):
        Path(path).touch(exist_ok=True)
        assert os.path.getsize(path) > 0, f"Pytest file {path} is empty."
    

    Last month I wrote this: cptree.py to try and solve the problem:

    cptree.py xklb/ tests/ -v --simulate --ext py --file-prefix test_ | grep -v '__'
    

    And while it created the test files, it didn't give me the motivation to actually write tests so now I have to actually fill in the empty files. Maybe I'll switch to actual code coverage in a few years...

    2 votes
  5. Comment on America's never-ending battle against flesh-eating worms in ~science

    xk3
    (edited )
    Link
    : https://en.wikipedia.org/wiki/Dari%C3%A9n_Gap#Pan-American_Highway Edit: Sorry I was confusing this with foot-and-mouth disease: https://www.gao.gov/assets/psad-77-154.pdf

    This is one big reason why there is no road between Central and South America. The Darian Gap, the 125 miles of jungle with no road, between Panama and Columbia: https://en.wikipedia.org/wiki/Dari%C3%A9n_Gap#Pan-American_Highway

    Edit: Sorry I was confusing this with foot-and-mouth disease: https://www.gao.gov/assets/psad-77-154.pdf

    7 votes
  6. Comment on Two pizzas for me - What is this article trying to say? in ~tech

    xk3
    Link Parent
    eh. It's hard enough for most of us to get one job. I doubt more than 10% of people have more than one job at a time

    eh. It's hard enough for most of us to get one job. I doubt more than 10% of people have more than one job at a time

    2 votes
  7. Comment on Best news sources and blogs to keep you informed about IT and Software Development in ~comp

  8. Comment on Best news sources and blogs to keep you informed about IT and Software Development in ~comp

    xk3
    (edited )
    Link
    Mostly agree with above, here are a few more: https://futureofcoding.org/ https://computer.rip/ GitHub Home is actually pretty good(?). Maybe I just follow interesting people. I would say it is...

    Mostly agree with above, here are a few more:

    • https://futureofcoding.org/
    • https://computer.rip/
    • GitHub Home is actually pretty good(?). Maybe I just follow interesting people. I would say it is more relevant to me than the HackerNews firehose of content. Although I still look at the first two pages of HN everyday of the previous day.
    • LinkLonk is also pretty good
    4 votes
  9. Comment on Please recommend me an anime to watch? in ~anime

    xk3
    (edited )
    Link
    Here are some of my favorites: Baccano! (Comedy, 1930s Manhattan) Darker than Black (Sci-Fi, big mood, music by Yoko Kanno who also composed Cowboy Bebop) Detroit Metal City (Comedy, death metal...

    Here are some of my favorites:

    • Baccano! (Comedy, 1930s Manhattan)
    • Darker than Black (Sci-Fi, big mood, music by Yoko Kanno who also composed Cowboy Bebop)
    • Detroit Metal City (Comedy, death metal band, the manga is also fantastic)
    • Space Dandy (basically a parody of Cowboy Bebop but it stands on its own well)
    • Samurai Champloo (soundtrack by Nujabes)
    • Love Complex (yes, this is J-Drama but it's so ridiculous it is basically anime)
    • Patlabor 2 is underrated. It also has a TV show

    Here are some others: https://github.com/chapmanjacobd/journal/blob/main/lists/video.tv.anime.list

    9 votes
  10. Comment on Any recommendations on places to visit in Singapore? There for a week. in ~travel

    xk3
    Link
    The National Stadium is a nice place to walk around and get some exercise. I also second the recommendation of trying out hawker stalls every day for lunch. Tons of great options everywhere. Don't...

    The National Stadium is a nice place to walk around and get some exercise.

    I also second the recommendation of trying out hawker stalls every day for lunch. Tons of great options everywhere. Don't be afraid of Indonesian or Malaysian food... Ayam penyet is really delicious. Nasi pecel (peanut sauce) is also quite good.

    1 vote
  11. Comment on What programming/technical projects have you been working on? in ~comp

    xk3
    (edited )
    Link
    I prefer argparse but never really liked how argparse prints the help menu. It feels very cluttered with overlapping text: example here. One of the things I did in the past week is create my own...

    I prefer argparse but never really liked how argparse prints the help menu. It feels very cluttered with overlapping text: example here.

    One of the things I did in the past week is create my own CustomHelpFormatter which prints arguments and their help text as two distinct columns. The most interesting part is here:

    def format_two_columns(text1, text2, width1=30, width2=70, left_gutter=2, middle_gutter=2, right_gutter=3):
        terminal_width = min(consts.TERMINAL_SIZE.columns, 100) - (left_gutter + middle_gutter + right_gutter)
        if text2:
            width1 = int(terminal_width * (width1 / (width1 + width2)))
            width2 = int(terminal_width * (width2 / (width1 + width2)))
        else:
            width1 = terminal_width
    
        wrapped_text1 = textwrap.wrap(text1, width=width1)
        wrapped_text2 = textwrap.wrap(text2, width=width2)
    
        formatted_lines = [
            f"{' ' * left_gutter}{line1:<{width1}}{' ' * middle_gutter}{line2:<{width2}}{' ' * right_gutter}".rstrip()
            for line1, line2 in zip_longest(wrapped_text1, wrapped_text2, fillvalue="")
        ]
    
        return "\n".join(formatted_lines) + "\n"
    

    the design is very human...

    1 vote
  12. Comment on AI to drive natural gas boom as utilities face surging data center demand in ~finance

    xk3
    Link Parent
    Yes I agree it is very much a better use of natural gas--but it makes me wonder what kind of efficiency these plants can deliver without the use of non-renewables. If the technology isn't really...

    Yes I agree it is very much a better use of natural gas--but it makes me wonder what kind of efficiency these plants can deliver without the use of non-renewables.

    If the technology isn't really useful without natural gas that would be unfortunate.

    I'm sure many people have already run the numbers, but if we're only talking 10%, 20%, or 30% more energy at the expense of 25% CCGT's natural gas then I wonder if that extra power is really worth the extra resource cost

  13. Comment on AI to drive natural gas boom as utilities face surging data center demand in ~finance

    xk3
    Link Parent
    It is somewhat interesting to note that these facilities also use natural gas for energy conversion efficiency. That's not to say they are a step in the wrong direction--just that I was surprised...

    It is somewhat interesting to note that these facilities also use natural gas for energy conversion efficiency. That's not to say they are a step in the wrong direction--just that I was surprised to read it. They use enough natural gas to be only 3 times more efficient than a traditional Combined Cycle Gas Turbine (CCGT) plant.

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

    4 votes
  14. Comment on An equitable solution to a problem at work regarding sick leave and staffing? in ~life

    xk3
    Link Parent
    I imagine that's monthly and CZK

    I imagine that's monthly and CZK

    2 votes
  15. Comment on ‘The Fall Guy’ box office disappointment hurts more than opening weekend in ~movies

    xk3
    Link Parent
    I saw The Fall Guy a couple days ago and I thought it was a really beautiful "love letter" to stunts. During the credits they show a lot of footage of the actual people performing the acts. And...

    and I assume, have any actual stunts performed by an actual stuntman

    I saw The Fall Guy a couple days ago and I thought it was a really beautiful "love letter" to stunts. During the credits they show a lot of footage of the actual people performing the acts. And Ryan Gosling did actually do at least one stunt.

    10 votes
  16. Comment on What are some non-science-fiction books that are deep, insane, mind-bending, etc? in ~books

    xk3
    (edited )
    Link
    I think it depends how you define science-fiction. There are a lot of books/stories that take place in a science fiction setting but they use fantasy (magic) to resolve tension. Star Wars is a...

    I think it depends how you define science-fiction. There are a lot of books/stories that take place in a science fiction setting but they use fantasy (magic) to resolve tension. Star Wars is a famous (and often debated) example of this.

    There are also a great many books that don't take place in a science fiction setting but they use science to resolve tension. I think Harry Potter and the Methods of Rationality is a good example of this. It is a good balance between funny and thought-provoking:

    https://hpmor.com/

    4 votes
  17. Comment on Any tips for Barcelona and Lisbon in June/July? in ~travel

    xk3
    Link Parent
    This is really great! Thanks for sharing. Do you have a similar list for Porto?

    This is really great! Thanks for sharing.

    Do you have a similar list for Porto?

  18. Comment on AI, automation, and inequality — how do we reach utopia? in ~talk

    xk3
    (edited )
    Link
    Even if we had universal maximum income where everyone could afford a McMansion and their own private archipelago, having a job and not having one would still be a social differentiator (the same...

    incompetent or unmotivated folks just stayed at home and got out of other people's way

    Even if we had universal maximum income where everyone could afford a McMansion and their own private archipelago, having a job and not having one would still be a social differentiator (the same way that having a university degree is still important to people in an age where anything can be learned from anywhere via the Internet).

    So the big boss would still do the nepotism and you'd have his nephew as a coworker. The guy who you'll need to babysit and will be promoted before you but you'll still need to tactfully dismiss his dangerous ideas (economic and human life) even though he outranks you.

    2 votes
  19. Comment on When the US Army uses "enhanced interrogation" on an American soldier in ~life

    xk3
    Link
    From the article:

    From the article:

    In gruesome detail, Luther described what happened to him at Camp Taji's aid station. He thought he would receive medical care. Instead he was confined to an isolation chamber and held there for over a month, under enforced sleep deprivation, until he agreed to sign papers saying that he was ill before coming to Iraq and thus not eligible for disability and medical benefits. "They wanted me to say I had a 'personality disorder,'" Luther told me.

    After a month, Luther was willing to sign anything — and did. Soon after he signed his name to a personality disorder discharge, he was whisked back to Fort Hood and informed about a PD discharge's disastrous consequences. No disability pay, no long-term medical care, and because he didn't serve out his contract, he'd have to pay back a portion of his signing bonus. "They told me I now owed the Army $1,500."

    18 votes