[-] UlrikHD@programming.dev 4 points 7 months ago

Please don't stalk/harass our users, it can and will lead to a site wide ban if reported.

[-] UlrikHD@programming.dev 4 points 9 months ago

Please follow our Code of Conduct when interacting with our instance. Hate speech violates section 3.5 and in this instance is severe enough to lead directly to a temporary ban instead of the usual warning. Repeated offences may lead to a permanent ban.

[-] UlrikHD@programming.dev 4 points 2 years ago

programming.dev will migrate over to (lemmy compatible) Sublinks once it's ready, which will feature a different set of mod features. For that reason we will need new moderators to have an active programming.dev account. If you're willing keep an active user account on our instance let me know. We would prefer people we know will actively use their mod account to make sure reports are handled in a timely manner.

[-] UlrikHD@programming.dev 4 points 2 years ago* (last edited 2 years ago)

Personally I would recommend to use regex instead for parsing, which would also allow you to more easily test your expressions. You could then get the list as

import re
result = re.findall(r'[\w_]+|\S',  yourstring)  # This will preserve ULLONG_MAX as a single word if that's what you want

As for what's wrong with your expressions:

First expression: Once you hit (, OneOrMore(Char(printables)) will take over and continue matching every printable char. Instead you should use OR (|) with the alphanumerical first for priority OneOrMore(word | Char(printables))

Second expression. You're running into the same issue with your use of +. Once string.punctuation takes over, it will continue matching until it encounters a char that is not a punctuation and then stop the matching. Instead you can write:

parser = OneOrMore(Word(alphanums) | Word(string.punctuation))
result = parser.parseString(yourstring)

Do note that underscore is considered a punctutation so ULLONG_MAX will be split, not sure if that's what you want or not.

[-] UlrikHD@programming.dev 4 points 2 years ago

Stickied post would work just fine yeah, can't really expect the developer to set up a public repo for just tracking features. Hopefully Ruben takes notice.

[-] UlrikHD@programming.dev 4 points 2 years ago

Those doesn't break backwards compatibility though. Naturally you can't use match with a python 3.7 interpreter, but what scripts written for python 3.7 wouldn't work with a 3.11 interpreter?

I haven't encountered that issue before, so I'm curious what those problems OP have encountered looks like.

[-] UlrikHD@programming.dev 4 points 2 years ago

I assume you meant that both Rust and C compiles into machine code? Python compiles into bytecode that is then run in a VM, Rust and C usually doesn't do that as far as I know.

I was mostly curious if it was as easy as in C. Turun's reply answered that question though. Cheers.

[-] UlrikHD@programming.dev 3 points 2 years ago

putting thumbnails in the file selection dialog

Could you elaborate what you by this?

[-] UlrikHD@programming.dev 4 points 2 years ago

Since it's variations of the combined ending, each permutation would count as unique. Meaning that 10 companions with 10 endings each would total 10.000.000.000 variations,

[-] UlrikHD@programming.dev 5 points 2 years ago

I've never seen anyone being smug about their distro, but I've also never seen a comment where somebody have said they use Ubuntu. Arch on the other hand is everywhere, meme or no meme.

[-] UlrikHD@programming.dev 4 points 2 years ago

Whenever I click on the link it prompts me to register on kbin. Is it a closed off instance?

[-] UlrikHD@programming.dev 4 points 2 years ago

Got a Sony Xperia premium XZ from 2017 with the latest update being from 2019, android version 9

view more: ‹ prev next ›

UlrikHD

joined 2 years ago
MODERATOR OF