If you think is-number can be replaced with a one-liner, you don’t have the enterprise code mindset. What if the world gets more inclusive and MMXXIV, ½ and ⠼⠁ become recognized as numbers? 𒐍𓆾 were numbers in the past but what if people start assigning numeric value to other characters? Are 🖐🔟💯🆢🂵🀌🁅 numbers of the future???
/s
I’m not even all kidding, Regex implementations are split on whether “٣” matches d.
You may argue that writiing 2024 as “MMXXIV” and not “ⅯⅯⅩⅩⅣ” is a mistake but while typists who’d use “2OlO” for “2010” (because they grew up using cost-reduced typewriters) are dying out, you’ll never get everyone to use the appropriate Unicode for Roman numerals.
Even if they did use unicode, any codeset , glyph or language changes over time , ulimately they emerge out of communication, not the other way round.
If some culture decides they want to use the glyph “2” to mean a word “to”, they can and will, and no codeset is going to stop them. And if they get their message to their intended audience it doesnt matter that somebody else’s isnumber fuction get’s it wrong.
A person, community or standard codeset or dictionary cannot deny the accuracy or content of encrypted communication just because they can’t decipher it.
Put another way a more robust isnumber() should maybe have a second argument to specify the codeset being used, and maybe whether written words - in some defined languare - are also to be converted
Excel is going to have a Date with you, and it’s not asking further questions. If you didn’t wish to consent to have your col’n shattered, you should have preceded it with a '.
yeah, I’ve been rohypnolled by both microsoft and oracle, and general cloud shit , and various co workwers so many times now i barely even notice.
Hilariosly excel has recently started asking now, I think it says something like: “I’ve just fucked up several columns in your csv that you went to the bother of enquoting.” “Do you want me to reload it and i’ll try to un-fuck a few of those columns? ( whispers to audience - but probably not all of them - tee hee).”
I think my employer just needs to employ 25-50 more “delivery” managers and empower them to spend millions on a prettier barrel for us to bend over, that’ll solve it. Maybe it’ll have flufffy handcuffs.
So the only valid digits are arabic numbers but arabic script numbers are not a valid digit? If we want programming to be inclusive then doesn’t that make sense to also include the arabic script number?
So the only valid digits are arabic numbers but arabic script numbers are not a valid digit?
Some people writing Regex implementations have that opinion. I’ve refrained from saying mine.
If we want programming to be inclusive then doesn’t that make sense to also include the arabic script number?
Maybe. IMO, number tests should be chosen/implemented based on the project’s requirements. If you want to include every Unicode character or string pattern anyone’s ever used to convey a numeric value, that would be a long and growing list. Arguably, it’s impossible: the word “elf” means a number if interpreted as German for “eleven” but not if interpreted as English for 🧝.
Yeah, but “elf” are not digits. Digits are a symbol abstracted from the language itself. Does 5 and V convey different meanings in the context of digits? And yeah, I can see why they would argue about the implementation because inclusivity is important. Especially when designing a language implementation. If you are designing it wrong, it will be very hard to extend it in the future. But for application level implementation, go nuts.
As I said, a digit is a symbol. Much like how we use letters to compose words, digits are used to construct numbers. When you start to repeat or reuse the symbol then it is no longer a singular symbol (what regex \d does). Hence my comments on why arabic script are one of the understandable debates since i18n is a valid concern as much as a11y is.
You are right, “elf” is a stretch, it does not make sense to parse it as a number. But in some languages, the string “15 240,5” is just how a number is written (yes, that’s a U+2009 THIN SPACE, you can’t stop me from using it as a thousand separator in German). Obviously, despite having a , on their numpads, German programmers still expect computers to parse numbers with decimal dots and interpret commas as list values.
Alright, maybe you misunderstood the term digits with numbers. When parsing a digit, you do not attach semantic yet to the building blocks. A \d regex parser does not care that the string “555” is not equivalent to “VVV”. All it cares about is that there is the digit “5” or “V”. In the same vein, regex parser should not try to parse IV as a single symbol.
It’s not just digits. Nobody is expecting it to understand language yet but the parser is-number still returns true for “2e3” or “0x0F”. It tells you whether the string can be interpreted as a real numeric value.
Yeah, hence is-“number”. But we were talking about regex are we. A number representation can use digits but it can also not. Much like how you make a number using the word “elf”.
Lisp code is already like this. That’s why I keep trying to explain it to programmers. Try reading the book SICP, published decades ago by MIT computer researchers.
All junior devs should read OCs comment and really think about this.
The issue is whether is_number() is performing a semantic language matter or checking whether the text input can be converted by the program to a number type.
The former case - the semantic language test - is useful for chat based interactions, analysis of text (and ancient text - I love the cuneiform btw) and similar. In this mode, some applications don’t even have to be able to convert the text into eg binary (a ‘gazillion’ of something is quantifying it, but vaguely)
The latter case (validating input) is useful where the input is controlled and users are supposed to enter numbers using a limited part of a standard keyboard. Clay tablets and triangular sticks are strictly excluded from this interface.
Another example might be is_address(). Which of these are addresses? ‘10 Downing Street, London’, ‘193.168.1.1’, ‘Gettysberg’, ‘Sir/Madam’.
To me this highlights that code is a lot less reusable between different projects/apps than it at first appears.
That’s either a professional level dad joke, or holy wow, does he not know how much you make?
That said, I’ll build anyone a website for £500, no matter how large. But that’s the base model. It’ll be a template taken from a catalog, and Hugo. My maintenance fees are only £250 per hour.
It’s a pretty good racket. My friends boss saw us building ourselves a site one time when he let us use his shop on the weekend and he got intrigued.
So as payment for letting us use the machine shop we took over his business website from some expensive marketing company that charged a ton we got him down to a domain and a basic weebly plan. We took photos of the shop and just used their shop colors for the text and slapped on all the contact info he wanted.
Then his bookkeeper saw his site and wanted one so we did the same for her, then her son saw the site and wanted one for his friend who’s a plumber. Next thing you know we are turning down jobs because everyone and their mother wants a $500 website from us haha. It became a better business than what we borrowed the machine shop for to begin with
It showed up for me about a month ago. I put up with it for about a week and then broke down and finally switched all my browser search engines to duckduckgo.
The funny thing is, I tried making this same switch a couple years ago. I legitimately had a harder time getting the results I needed and ended up switching back to Google.
I was looking up some tips for Baldurs Gate missions and these fking AI generated pieces of shit with hallucinated fake playthroughs ruined the whole experience.
There has been something similar for years: a page that basically says “Yeah, nah, we don’t have any information for that, but you might be interested in a totally irrelevant something else”, but phrased in a way that gets it high in the results. What’s astonishing is that Google doesn’t punish those pages.
Wikimedia and W3C log their chats with bots developed by themselves. I admit though that I am not expert in this topic, but I know that LiberaChat’s policies forbid logging.
IRC archivers just idle on a server and record anything that comes by. You can do that with Discord. Matter of fact, I keep regular archive backups of a server we have that’s full of news
Servers can be hosted by anyone; there is usually no account needed to join the chat; it would not randomly demand a phone number or an ID; it does not get pissed over people not using a very specific piece of bloated spyware… So nope, not against.
I had a friend doing mobile gamedev, making near unheard-of money for their then city of residence, had everything going well for them… except the job was soul-crushing and draining, eventually giving them severe depression.
When I was getting my first dev job, they said I’d be really sorry about doing outsource, and I just thought that out of us two, I’d be the really happy one, even making much less than them.
Something that a union would definitely solve. What are the banks gonna do? Fire every veteran and hire a team of underpaid newbs to manage their critical systems? If they were dumb enough to do that, let them save themselves millions a year by facing billions in losses… I’m sure that’ll work out well.
The thing is, this type of job never needed a union previously. It was niche enough for a long time, that you were sought out and rewarded well. But yes, I think we're moving into an era where we do need union representation.
Oddly enough, with my experience I am sought out still. Just for bizarre startups who clearly never checked my previous work history. Some of the messages I get on Linkedin for example are just weird requests.
If only there was one, I wish I had one just so I wouldn’t have to do all the fucking social hoops just to get my resume noticed by an actual human before the HR’s “I don’t want to do my job!” machines filter me out for not going to an Ivy League School like apparently everyone else did.
I think the problem is that unions are famous for fighting for equal pay across the board for the workers they represent regardless of individual competency or market demand. For this example they’ll give COBOL developers a raise to 120K and give web developers a pay cut to 120K.
Or best case scenario they give the COBOL developers a short-term raise to 150, then raises across the industry stagnate in coming years to offset the fact that employers feel like they’re overpaying for some people. But sure, a few years later the union can come in to look like a hero arguing for a fraction of the raise the web devs could have already gotten.
Not too surprising if the people making malware, and the people making the security software are basically the same people, just with slightly different business models.
Based on a completely superficial review there are three almost guaranteed ways to become unhinged; studying infinities, refactoring legacy code, and working with timezones.
I’ve been a proponent of this for ages. It makes no sense to cross some imaginary line and suddenly time shifts. Time should change constantly as you move east or west, up or down. Everyone has their own personal time, which is constantly updated.
That was kinda the situation in the past: Every town would have its own time, synced to the local noon every once in a while as the precision of the church or townhall clock demanded. That stuck around until railroad operators and passengers got sick and tired of dealing with the timetables that produces.
Lmao I love how he just gets more and more flabbergasted throughout the whole video. Truly an accurate depiction of dealing with timezones (which I’m unfortunately dealing with right now!)
“Due the global economic circumstances, we were forced to make the incredibly tough decision to say good bye to one of our staff members, cutting down the work force by 100%”
Just make sure the ingame store is functional so you can sell more add-ons to your vaporware - star citizen is the most profitable video game to ever not be released.
Kids get infinite registers and no restrictions on stack ordering. Programmers are constrained to solving it with one register and restrictions on stack put operations.
Sure. But in a sane language doing something totally nonsensical like that is an error, and in a statically typed language it’s a compiler error. It doesn’t just silently do weird shit.
Agreed! Unfortunately these maddening behaviors were kind of set in stone several decades ago, and it has been (correctly) decided “Don’t break the web”, these weird quirks are kept in modern interpreters/compilers.
It’s actually quite interesting to read through the logic to follow when implementing an interpreter:
This relationship can be saved as long as the guy’s wife does not start expressing an interest in Emacs. That would, of course, put an end to the relationship, but if she’s one of those “Notepad is all I need” types, there is hope this can be worked through.
You made me look up helix again after a few years and it’s gotten pretty sick actually. I might main it for a while to see how it fairs. It’s fairly similar to kakoune of course, but it’ll take a while to get all the modes into my muscle memory. The similar actions are in different modes and there are many more modes in helix as far as I can tell. But it’s cool, looking forward to experimenting.
programmer_humor
Top
This magazine is from a federated server and may be incomplete. Browse more on the original instance.