I write code and play games and stuff. My old username from reddit and HN was already taken and I couldn’t think of anything else I wanted to be called so I just picked some random characters like this:

>>> import random
>>> ''.join([random.choice("abcdefghijklmnopqrstuvwxyz0123456789") for x in range(5)])
'e0qdk'

My avatar is a quick doodle made in KolourPaint. I might replace it later. Maybe.

日本語が少し分かるけど、下手です。

Alt: e0qdk@reddthat.com

  • 1 Post
  • 47 Comments
Joined 10 months ago
cake
Cake day: September 22nd, 2023

help-circle




  • Haven’t used that particular library, but have written libraries that do similar sorts of things and have played with a few other similar libraries in C++ and Haskell. I’ve taken a quick glance at the documentation here, but since I don’t know this library specifically apologizes in advance if I make a mistake.

    For OneOrMore(Word(alphanums)) + OneOrMore(Char(printables)) it looks it matches as many alphanum Words as it can (whitespace sequences being an acceptable separator between tokens by default) and when it hits ( it cannot continue with that so tries to match the next expression in the sequence. (i.e. OneOrMore(Char(printables)))

    The documentation says:

    Char - a convenience form of Word that will match just a single character from a string of matching characters

    Presumably, that means it will not group the characters together, which is why you get individual character matches after that point for all the remaining non-whitespace characters. (Your result also seems to imply there was a semicolon at the end of your input?)

    For OneOrMore(Word(alphanums)) + OneOrMore(Char(string.punctuation)) it looks like it cannot match further than ( since 1 is not a punctuation character; so, you got the tokens for the parts of the string that matched. (If you chained the parser expression with something like + Word(alphanum) I’d expect you’d get another token [i.e. "1"] added onto the end of your result.) You may eventually want StringEnd/LineEnd or something like that – I’d expect they’d fail the parser expression if there’s unconsumed input (for error detection), but again, haven’t used this specific library, so it may work different than I expect.

    There appears to be a Combine class you can use to join string results together; that might be useful for future reference.

    i was trying to parse a string with pyparsing so all the words were separated from the punctuation signs

    Have not tested it (since I don’t have a copy of the library installed anywhere and can’t set up an environment for it easily right now) but perhaps something like OneOrMore(Word(alphanums)|Char(string.punctuation)) would be more like what you are looking for?


  • The attached picture says 133 qubits, so whatever that chip is (edit: Heron) it’s not this thing.

    IBM’s post (that the article links) says:

    Breaking the 1,000-qubit barrier with Condor

    We have introduced IBM Condor, a 1,121 superconducting qubit quantum processor based on our cross-resonance gate technology. Condor pushes the limits of scale and yield in chip design with a 50% increase in qubit density, advances in qubit fabrication and laminate size, and includes over a mile of high-density cryogenic flex IO wiring within a single dilution refigerator.

    So, it sounds like this is actually another fridge sized system.






  • Pokemon (1st gen and 2nd gen – plus some of the spin-off stuff from that era to a lesser extent) captivated me in a way no other games have before or since. Honestly, I hope nothing ever grabs me that hard again; it’s kind of scary how obsessed I was in retrospect.

    A number of N64 games also made a big impact on me. Majora’s Mask was probably my second favorite game (after Pokemon) for many years. (OoT made an impression too, but I played MM first.) I loved the music in Diddy Kong Racing. I got 120 stars in Mario 64, and when I tried it again as an adult, I really appreciated how short and to the point levels could be (not that I played that way as a kid) – also the camera in that game sucked. Castlevania: Legacy of Darkness kind of disturbed me a bit as a kid, but it’s probably the first game I encountered a sort of “New Game Plus” in, which was neat. (People have since told me that’s the “black sheep” of the series and that it’s really weird that that’s the only one I’ve played significantly.)

    Duke Nukem 3D was the first game I modded, I think (very simple graphical stuff). Definitely wasn’t age appropriate but I played the heck of it anyway. Didn’t really get much into other shooters other than playing through the main game of Perfect Dark on N64 and playing split-screen Golden Eye with friends.

    I also played a lot of Sim\ games – particularly SimCity 2000, SimEarth, and SimTower. Also had a bunch of others like SimFarm and even some of the more obscure ones like SimSafari. Streets of SimCity and SimCopter being able to load SC2K maps was really neat though. Played a fair amount of other city builders and simulation games like Caesar III and Roller Coaster Tycoon too. My parents probably hoped I’d become some sort of business manager. :p

    I had a lot of creative tools back then as well which I treated as not-that-different from video games. Various Kid Pix programs (one of which had a bunch of odd video clips integrated – including a short documentary about jackalopes of all things), Kid’s Studio, Digital Chisel, some version of HyperCard, etc. Game Maker – which I found around the year 2000 back when it was still on www.cs.uu.nl – ultimately led me to being a professional programmer.


  • It probably makes more sense to host your novel somewhere else and post links to it chapter by chapter.

    I’d suggest doing one of the following:

    1. Host the images on a site that already supports image galleries and link to that. Most image hosts are kind of annoying, but this is an understandable way to do it if you don’t want to run a website. (Maybe someone can chime in with a suggestion for whatever they think is the least annoying image gallery host in 2023.)
    2. Host the images yourself on a simple website. Webcomic artists have been doing that for many years, so there are lots of examples to draw from. (e.g. Gunnerkrigg Court)
    3. Zip the images up chapter by chapter and either self-host the zip or toss it on a file host like catbox.moe. If you structure it as a .cbz (i.e. zip up a folder with the images named in order like 1.jpg, 2.jpg, 3.jpg, … and just change the extension from .zip to .cbz) then a number of document viewers (like evince) can be used to view the image sequence – or people can just unpack the images and use their favorite image viewer on their computer.


  • I think they’re specifically wondering if using @@ mention syntax will result in a notification popping up for the user on Lemmy.

    I’ve been wondering that too (in the context of threads though) – and if it does work, are there limitations regarding visibility between instances that people should be aware of. e.g. what happens if I @ someone in a post to a community on a lemmy server that is defederated from their home instance? Or, in a community that no one on their home server has subscribed to? Will they still get a notice?

    I guess I don’t really have a good mental model for how @ works on the Fediverse.


  • No way is AI going to end capitalism.

    In the medium term we will end up with AI corporations. I already consider existing corporations to be human-based swarm intelligences – they’re made up of people but their overall large scale behavior is often surprising and we already anthropomorphize them as having will and characteristic behaviors separate from the people they’re made of. AI corporations are just the natural evolution of existing corporations as they continue down the path of automation. To the extent they copy the existing patterns of behavior, they will have the same general personality.

    Their primary motive will be maximizing profit since that’s the goal they will inherit from the existing structure. The exact nature of that depends on the exact corporation that’s been fully cyberized and different corporations will have different takes on it as a result. They are unlikely to give any more of a damn about individual people than existing corporations do since they will be based on the cyberization of existing structures, but they’re also unlikely to deliberately go out of their way to destroy humanity either. From the perspective of a corporation – AI-based or traditional – humanity is a useful resource that can be exploited; there isn’t much profit to be gained from wiping it out deliberately.

    Instead of working for the boss, you’ll be working for the bot – and other bots will be figuring out exactly how much they can extract from you in rent and bills and fees and things without the whole system crashing down.

    That might result in humanity getting wiped out accidentally; humanity has wiped out plenty of species due to greed and shortsightedness. I doubt it will be intentional if they do though.





  • It’s a small wonder that people can travel into space at all. I mean, the problem is hard enough already for us squishy humans, but just imagine how much worse it would be if we were merpeople… Air’s about 1.2kg/m^3 at sea level; liquid water is about 1000kg/m^3! Or, if we were the size and weight of blue whales? We’d probably never get off the planet – let alone to the moon.