mftrhu's recent activity

  1. Comment on What are you doing this weekend? in ~talk

    mftrhu
    Link
    I meant to drop by the office of the local health services, to get a new GP - my usual doctor is ~1Mm away - but it doesn't look like they will be open on Saturday. As such, I'm probably just...

    I meant to drop by the office of the local health services, to get a new GP - my usual doctor is ~1Mm away - but it doesn't look like they will be open on Saturday. As such, I'm probably just going to sleep in, do some cleaning, and then lounge around - I'm pretty wiped right now, both physically and because of the sleep debt I accumulated during the week.

    I'll also have to do some shopping, and I'm probably going to revise a bit more on Sunday, but beyond that I have no idea.

    4 votes
  2. Comment on Day 4: Secure Container in ~comp.advent_of_code

    mftrhu
    Link
    This one was almost trivial to implement, and I ended up doing it on my phone during a break at work. I'll have to rewrite it in Julia once I'll be back home, though. Part 1 from itertools import...

    This one was almost trivial to implement, and I ended up doing it on my phone during a break at work. I'll have to rewrite it in Julia once I'll be back home, though.

    Part 1
    from itertools import combinations_with_replacement
    import re
    
    def has_double(n):
        return re.search(r"(\d)\1", str(n))
    
    def in_range(n):
        return 357253 <= n <= 892942
    
    candidates = combinations_with_replacement("123456789", 6)
    candidates = map(lambda t: int(''.join(t)), candidates)
    candidates = filter(in_range, candidates)
    candidates = filter(has_double, candidates)
    candidates = list(candidates)
    print(len(candidates))
    
    Part 2
    from itertools import combinations_with_replacement
    import re
    
    def has_double(n):
        n = str(n)
        m = re.findall(r"(\d)\1", n)
        return m and (not
            all(re.search(r"%s{3,}" % d, n) for d in m))
    
    def in_range(n):
        return 357253 <= n <= 892942
    
    candidates = combinations_with_replacement("123456789", 6)
    candidates = map(lambda t: int(''.join(t)), candidates)
    candidates = filter(in_range, candidates)
    candidates = filter(has_double, candidates)
    candidates = list(candidates)
    print(len(candidates))
    
    3 votes
  3. Comment on Why I Voted to Sell .ORG in ~tech

    mftrhu
    Link Parent
    Hell, even if they stick to their "promise"? As plenty of other people have pointed out already, 10% a year is ridiculous, and it would translate to the price of an .org domain doubling every...

    Hell, even if they stick to their "promise"? As plenty of other people have pointed out already, 10% a year is ridiculous, and it would translate to the price of an .org domain doubling every seven years.

    7 votes
  4. Comment on What are you doing this weekend? in ~talk

    mftrhu
    Link
    Two weeks ago, I wrote a comment about how I got a job in Milano. I spent that weekend on the road, and the weekend after that cleaning up and making the house livable. Now I'm on my second week...

    Two weeks ago, I wrote a comment about how I got a job in Milano.

    I spent that weekend on the road, and the weekend after that cleaning up and making the house livable. Now I'm on my second week in, and I got most of the stuff I needed to do out of the way: I renewed my ID card (it expired on me three months ago), I got all the data they need to complete the contract, I got username and password for the school email and electronic register, I started familiarizing myself with the lab, and I think I met all my classes at least once.

    Things are awkward, though. After three years on HRT, I pass, even disheveled and wearing camo & boots, but I have yet to change my legal name - which requires Very Cisnormative things like a lawyer, the opinion of a few doctors, a couple of months back and forth and a judge's order, which I could not afford before - so I can get gendered correctly, until someone asks me for my name for some thing or another.

    At least I should have, in a month or two, enough money to put things in motion to fix this (and the Milano area is bound to be much better than a bloody village in the South), but nevertheless - it grates.

    I'm just going to spend this weekend relaxing. Maybe I will do some revising tomorrow - physics is a topic I last touched in my university days - but I'm mostly going to lounge around, do some cleaning, push the info I logged during the last two weeks to my wiki, and get back to reading.

    4 votes
  5. Comment on What are you doing this weekend? in ~talk

    mftrhu
    Link
    I got a job, as a substitute lab assistant in Milano. I am supposed to start on Monday, and I'll be there 'till June/July. I was told today, so I spent the whole afternoon running to and fro',...

    I got a job, as a substitute lab assistant in Milano. I am supposed to start on Monday, and I'll be there 'till June/July. I was told today, so I spent the whole afternoon running to and fro', buying new clothes, new shoes - my old ones are old, and not fit for government work - and getting a new prescription for my glasses.

    Tomorrow it'll be more of the same - meds, glasses, even more clothes - and the road trip will start on Sunday. I am low key panicking, and I'm not really looking forwards to it.

    5 votes
  6. Comment on Let's talk bags in ~talk

    mftrhu
    Link
    It depends on where I'm going and on how long I'll be out. If it's just going to be a couple of hours, I just bring a small shoulder bag with me. More than a couple of hours, and I'll bring my old...

    What are you using to carry your stuff?

    It depends on where I'm going and on how long I'll be out. If it's just going to be a couple of hours, I just bring a small shoulder bag with me. More than a couple of hours, and I'll bring my old laptop bag.

    If it's fall/winter then you won't catch me outside without a coat, and mine have plenty of pockets.

    What stuff are you carrying?

    In my shoulder bag, I carry a wallet, pens, some paper. A 20 Ah powerbank, and an USB-to-microUSB cable for it. Sunscreen, hand sanitizer, tissues, hair ties. An asthma inhaler, cough lozenges, and other assorted meds (painkiller, antacids, anti-whatever has been ailing me lately).

    The pockets of my coat are usually stuffed with a scarf, gloves, and a beanie, plus bus passes, assorted hard candy, and a 5 euro note or two.

    My laptop bag is just the right size for my netbook, an half liter bottle of water, and an umbrella. I have tissues, pens, USB sticks and cables in the inner pockets, and full-size notebooks in the outer pockets.


    I also have a small survival kit hanging around, containing a lighter, firestarting material, a small knife I made out of a sawblade, band-aids, money, emergency meds and a sewing kit. I have never actually used it for anything, but it's just neat.


    The problem with most bags - besides the fact that they never have enough pockets - is their belt: it's too narrow, it bunches up, and the metal part that joins it to the rest of the bag likes to give up the ghost in the most inopportune situations.

    1 vote
  7. Comment on What terminal emulator do you use? in ~comp

    mftrhu
    Link
    I use urxvt, together with tmux and zsh, with the Tamzen font and the palette from this gist. I don't even remember why urxvt anymore, it has been years since I set it up. I was probably just...

    I use urxvt, together with tmux and zsh, with the Tamzen font and the palette from this gist.

    I don't even remember why urxvt anymore, it has been years since I set it up. I was probably just looking for a lightweight terminal emulator, and urxvt seemed reasonable enough.

    I don't use any shell frameworks for zsh, I just wrote my own .zshrc from scratch, and the result is both anemic and kinda messy, but I'm used to it by now.

    3 votes
  8. Comment on Hypothetics: let's say it takes 1/100 of the current fuel to take a spacecraft out of Earth's atmosphere. What happens? in ~space

    mftrhu
    Link
    Basically, you'd be increasing specific impulse a hundredfold. If keeping the same fraction of propellant to mass as today, you'd also be increasing your delta-V budget a hundredfold. It takes...

    Basically, you'd be increasing specific impulse a hundredfold. If keeping the same fraction of propellant to mass as today, you'd also be increasing your delta-V budget a hundredfold.

    It takes 10-15 km/s of delta-V to leave Earth (it depends on where you want to get). A hundred times that brings you up to 1000-1500 km/s, which is ridiculously high and pretty much torchship territory.

    That would change a lot of things, very fast, because right now? We need to use most of the mass of the rocket for fuel to get to orbit. We need stages to get anywhere. Every gram counts.

    The price for boosting mass to orbit would become dirt cheap. Getting to Mars wouldn't require a multi-month trip anymore, as you could get there and back within the week (a "conservative" 250 km/s would be enough to cover an AU in seven days). Interstellar travel would be still unfeasible, but the Solar System would become our backyard.

    Even if space is far from welcoming, I can still see a lot of people jumping to the opportunity of leaving Earth, and they would be able to do that.

    6 votes
  9. Comment on What are some good Mobile Home Pages? in ~talk

    mftrhu
    Link
    Can you point the homepage at a file on your phone? Because if so, you can just slap some HTML in there and roll your own. I did that for my laptop, putting a list of daily tasks on it, while also...

    Can you point the homepage at a file on your phone? Because if so, you can just slap some HTML in there and roll your own. I did that for my laptop, putting a list of daily tasks on it, while also making it replace the usual blank new tab page.

    5 votes
  10. Comment on Who is "John Smith" in your country? in ~talk

    mftrhu
    Link
    The Italian equivalent of John Smith would probably be Mario Rossi, but IIRC the most common names are Giuseppe (masculine) and Maria (feminine; extremely common, if the fact that 40% of the women...

    The Italian equivalent of John Smith would probably be Mario Rossi, but IIRC the most common names are Giuseppe (masculine) and Maria (feminine; extremely common, if the fact that 40% of the women in my family are called some variation of "Maria" is any indication).

    When talking about an unknown or hypothetical person, though, Tizio, Caio and Sempronio are more common. There's also Tal dei Tali and Pinco Pallino (more derogatory).

    3 votes
  11. Comment on Richard Stallman resigns as president of the Free Software Foundation, and from his position at MIT in ~tech

    mftrhu
    Link Parent
    My position is that the reasons for someone's behaviour don't really matter. Let's say that person X said some very insensitive or hurtful things about group Y. Maybe X is an asshole who enjoys...

    My position is that the reasons for someone's behaviour don't really matter.

    Let's say that person X said some very insensitive or hurtful things about group Y. Maybe X is an asshole who enjoys hurting people, but maybe they are just ignorant, don't really understand what they are saying, or why saying that would be hurtful.

    In all cases, X said those things. Group Y has been hurt by those things. What X intended does not matter, and doesn't really change the impact of what they said.

    Now, if challenging X makes them take a look at what they said, and issue an apology, that helps. But if they don't change - if they refuse to change, or if they can't change - if they keep at behaving like that, either ignoring criticism or issuing only perfunctory apologies, then they should not remain in a position of power.

    X might have "autism or other anti-social-personality disorders" but that doesn't excuse them if they keep on hurting people or being insensitive. They might be "innocent" and not capable of helping themselves, even, but so is a dog with rabies. You might want to help them change, but you can't - shouldn't - do so at the expense of everyone else.

    7 votes
  12. Comment on "Hello, world" from scratch on a 6502 - Part 1: setting up the CPU in ~comp

    mftrhu
    Link
    In which Ben Eater starts assembling a bare-bones computer based on a 6502 CPU, driving it with his own clock module, and using an Arduino board to monitor the address & data lines of the 6502....

    In which Ben Eater starts assembling a bare-bones computer based on a 6502 CPU, driving it with his own clock module, and using an Arduino board to monitor the address & data lines of the 6502.

    It's captivating, for all that most of the video is spent poking at a breadboard, writing code for the Arduino, and poring over data sheets.

    4 votes
  13. Comment on <deleted topic> in ~lgbt

    mftrhu
    Link Parent
    While replying to patience_limited, I quoted a single paragraph, which does not mention Natalie. I am not talking about Natalie at all. I am talking about truscum as a group, and about why they...

    While replying to patience_limited, I quoted a single paragraph, which does not mention Natalie.

    I am not talking about Natalie at all.

    I am talking about truscum as a group, and about why they deserve the suffix -scum.

    1 vote
  14. Comment on <deleted topic> in ~lgbt

    mftrhu
    Link Parent
    You don't see anything wrong with saying "people as they exist and behave [in the world]", while writing off part of the world - and the people who exist and act within it - as just "distorted...

    You don't see anything wrong with saying "people as they exist and behave [in the world]", while writing off part of the world - and the people who exist and act within it - as just "distorted caricatures" created by "imputed intent, selective reading, [...] projection", and thus "obviously" not real?

    I wish they could be ignored as just "trolls" and "projection".

  15. Comment on <deleted topic> in ~lgbt

    mftrhu
    Link Parent
    They are more than happy to use that term for themselves - see /r/truscum - and it's, in any case, very appropriate. Truscum are barely one step above TERfs, sometimes not even that. They don't...

    But I could have gone my entire life without seeing "-scum" as the suffix on an epithet for someone who holds to antique, invalid, damaging dogmas about what "trans" is. It's possible to offer valid criticisms of bad behavior and demand redress, without being as dehumanizing as, or worse than, the person you're attacking.

    They are more than happy to use that term for themselves - see /r/truscum - and it's, in any case, very appropriate.

    Truscum are barely one step above TERfs, sometimes not even that. They don't just hold antique, invalid, damaging ideas about what trans people are supposed to be. They actively try to spread those ideas against the "invasion of the tucutes", peddling pseudoscience like Blanchard's "they are all fetishists" and Littman's "it's just a social contagion", ranting about non-passing or gender non-conforming trans people, and holding TERs' salient exemplars - e.g. Yaniv, Karen White - as example of what "TRA tucute ideology" will "allow".

    I have no problem whatsoever with calling people who do this scum, or garbage, and I'm not worried about somehow being "worse than" them for calling them names.

  16. Comment on Unofficial Weekly Discussion #4 - What is your most "thinking outside the box", "pie in the sky", and/or "out there" idea for Tildes? in ~tildes

    mftrhu
    Link Parent
    Eeh, not really. Unless something changed recently, bookmarks on here are the equivalent of saved posts on reddit: that is, you need to remember to check on them, instead of having a bot painting...

    as well as reminders (which you can kind of already do with bookmarks)

    Eeh, not really. Unless something changed recently, bookmarks on here are the equivalent of saved posts on reddit: that is, you need to remember to check on them, instead of having a bot painting your mailbox red and, if you are active, they pile up pretty quickly.

    I ended up writing both my own "scraper" and viewer to handle the content I save on reddit, as I broke the 1k items threshold months ago, and there's no search function for them. They just don't fill the same niche as !remindme.

    4 votes
  17. Comment on Holocaust-denial, religious bigotry and pepper spray: An account of what really happened at Boston’s Straight Pride in ~lgbt

    mftrhu
    Link Parent
    SciHub would definitely not work with JSTOR links, or with the DOI of the article itself, which is not 10.2307/260332. Luckily, because bypassing paywalls on research would be A Very Bad Thing.

    [paywall warning]

    SciHub would definitely not work with JSTOR links, or with the DOI of the article itself, which is not 10.2307/260332. Luckily, because bypassing paywalls on research would be A Very Bad Thing.

    5 votes
  18. Comment on What are you doing this weekend? in ~talk

    mftrhu
    Link
    I just finished writing a writeup on edbrowse which I wanted to post on Tildes, and it's past midnight, so I think that counts. Otherwise... trying to get a decent night of sleep. Crossing my...

    I just finished writing a writeup on edbrowse which I wanted to post on Tildes, and it's past midnight, so I think that counts.

    Otherwise... trying to get a decent night of sleep. Crossing my fingers and hoping that it won't rain again. Studying maths, languages. Proofreading stuff on WikiSource. Looking for more fics to read.

    I'm really not sure how there are still people who don't believe in climate change. It's blatant these days. Not even a decade ago, summers used to be cooler, and winters milder. Snow, even in December, was an occurrence so rare that we'd pen it on the calendar.

    Now? We go from 40°C+ in summer, and widespread droughts, to constant storms in autumn, which keep on flooding the nearby areas, to winters so cold that up to 15 cm of snow can fall in a day. It's ridiculous, and it's making me hate autumns.

    I "discovered" WikiSource by accident, as I was clicking on the Random Article button on Wikipedia and stumbled across a page with next to no content. I went to look for more information on the Internet, I stumbled across a (non-proofread) WikiSource page, I decided to fix the formatting, and I spent the rest of the day untangling text and wrangling formatting. Annoying, but it feels rewarding.

    2 votes
  19. Unearthed Arcana: `edbrowse`

    I recently happened to mention edbrowse in a throwaway comment, and @ainar-g expressed some interest in it. I took my sweet time, but I finally managed to assemble a short(ish) write-up on it, and...

    I recently happened to mention edbrowse in a throwaway comment, and @ainar-g expressed some interest in it. I took my sweet time, but I finally managed to assemble a short(ish) write-up on it, and my sleep-addled mind is thinking that this topic - niche, weird tools - could just become recurrent.


    Terminal brosers, such as lynx, w3m and elinks, while still used and under more-or-less active development, are very niche tools. edbrowse fills a niche within that niche, as it's meant for use by non-sighted people, and thus provides an interface even more bare-bones and arcane than the usual TUI/curses apps that share its space.

    As per the name, edbrowse's interface is heavily inspired by ed's, the standard text editor: edbrowse, in fact, is not just a web browser, but it combines together a browser, a text editor, a mail client, and - for some reason - a database client. All of these functions are mostly controlled via one-letter commands and, as is tradition, only displaying a single ? on error*.

    edbrowse is also unique amongst the terminal browsers because of its support for JavaScript and the DOM. The text it spits out is meant for Braille displays and screen readers, so it lacks niceties like color or aligned tables, but if you were to browse to reddit.com with it, you would see a perhaps ASCII-art Snoo fill the screen.

    "Browsing reddit? How‽," you might ask. "How am I supposed to get this thing to stop questioning me? All those ? are filling me with existential dread, I have no idea what to do!"

    While it's all there in the manual (but not in the manpages, for some reason), reading through 30k words of text can be a bit of a slog. They do provide a cheatsheet, though, even if it's a bit messy.

    So, how do you use edbrowse? If you already know how ed works, most commands (especially "movement", search and listing commands) will work as expected - it is also an editor, after all - but edbrowse adds another handful of them.

    The most important of them is, perhaps, browse. It will make edbrowse put in an HTTP request, grab the response (if any), and then render it. It will print out the length, in bytes, of the response and of the rendered text, and stop there.

    $ edbrowse
    edbrowse ready
    b https://tildes.net
    119201
    20083
    

    To actually peruse the page you can use any of the ed listing commands (print, list, and number), or the z command. z works much like p, but it prints a number of lines (normally 24) while "remembering" your position within the page.

    0z10
    {Tildes}
    {Log in}
    <>Sidebar
    
    * {Activity}
    * {Votes}
    * {Comments}
    * {New}
    * {All activity}
    

    Links are indicated by curly brackets, while form elements (both input elements and buttons) are wrapped in angle brackets. You can follow a link by jumping to the line containing it and issuing a go command (using g2 to follow the second link on that line, g3 for the third, g$ for the last), but, in normal use, you should probably just search for the link text.

    /{Log in}/g
    5886
    923
    0z10
    {Tildes}
    <>Sidebar
    
    Log in
    
    Username <>
    Password <>
    <-> Keep me logged in
    <Go>Log in
    

    The same thing goes for form elements, but the command to use, here, is i (for interact). i has actually four different subcommands: i[N]=, to set the value of a text field, ipass[N] to prompt for the value of a password field, i[N]* to press a button, and i[N]? to ask edbrowse what that damned element is supposed to be.

    /Username/ i=mftrhu
    /Password/ ipass
    hunter12
    /<Go>/i*
    submitting form
    124579
    20049
    

    You can jump back to the previous page with ^, and refresh the current page with rf.

    Of course, edbrowse can do much more - can be configured to do much more, via .ebrc, as it possessed (very) rudimentary programming facilities. It can edit its own configuration file, and reload it with config, so - rejoice. You won't ever need to leave it.

    And, after seeing just how aesthetically pleasing its configuration language can be, I'm confident that you won't ever want to leave it.

    # Switch to a new editing session
    e2
    no file
    e ~/.ebrc
    # Show the last lines of the configuration file
    $100,113n
    100 function+google {
    101 b http://www.google.com
    102 /<>/ i=~0
    103 /</ i1*
    104 /^About/+2
    105 }
    106 function+ddg {
    107 b https://duckduckgo.com
    108 /<>/ i=~0
    109 i2*
    110 /<Go secure>/+1
    111 /<Go secure>/+2
    112 z24
    113 }
    

    As I said earlier, while edbrowse does possess some programming facilities, they are very rudimentary. Functions are nothing more than sequences of edbrowse commands with some flow control constructs: they can do everything an user could do, which means that they are often convoluted and overly terse.

    The ddg function, for example (which is invoked via <ddg [PARAMS]), first browses to duckduckgo.com. The DuckDuckGo home page, as rendered by edbrowse, only contains a link followed by the search form:

    {About DuckDuckGo Duck it!}
    
    <> <S secure> <X>
    

    So the function looks for the (first) empty text field (/<>/), fills it in with the parameters passed to it (i~=0), activates the second form element on that line (i2*) and, once the results page has loaded, skips the initial boilerplate (/<Go secure>/+1,+2) and prints the first 24 lines of results (z24).

    Sure. It could be replaced by a single line, replacing all the form interaction with a simple b https://duckduckgo.com/?q=~0, but where would be the !!FUN!! in that?

     


    * This is not completely true, as edbrowse will show more long-form error messages, but it's pretty inconsistent with them.
    † Iff you have JS enabled in your current session. It can be toggled on and off with the js command.
    ‡ I had no luck with the Tildes buttons (e.g., sidebar toggle, upvote button), though, at least not with the version of edbrowse that Debian bundles up.

    10 votes