WTF Bites
-
@Tsaukpaetra omg that code is awful, it restarts the search from the beginning every time!
-
@PleegWat It might be better to use the
index()
function as that might be more likely to get an especially efficient implementation using some assembly language trickery. But restarting from the front of the buffer each time is a Bad Idea.
-
If I have 99+ notifications and mark all of them as read, how do I end up with 57 unread notifications? Counting is hard, I guess.
-
@Maciejasjmj said in WTF Bites:
If a piece of software ever achieves sentience, I sure as hell hope it won't be using C strings.
It will probably be a buffer overflow bug that leads to the unintended sentience.
-
@PleegWat It might be better to use the
index()
function as that might be more likely to get an especially efficient implementation using some assembly language trickery. But restarting from the front of the buffer each time is a Bad Idea.It might. If someone seriously challenged me on that I'd propose a benchmark. After the tie, I'll claim seniority and that my version is prettier.
-
https://www.reddit.com/r/javascript/comments/541i45/how_to_disable_pinch2zoom_on_webpages_on_ios_10/
...
A downright ugly drive-on-the-footpath solution in the name of accessibility because most pundits who profess this solution are from an era where this might have been the only way to go forward."How could I scale this page up when the text size is hardcoded and also unreadable? Let's give them pinch2zoom!"
Not a valid argument anymore. And doesn't fix the issue either.
...ok? I'm not sure how pinch-to-zoom existing ruins your ability to design a 200% perfectly-accessible site though.
-
@bb36e that reply thread...that guy has been told by two separate communities that people don't like what he's doing and he's stated that he is doing it anyway...
-
-
TIL that google chrome doesn't have an option for case-sensitive search. the fuck? how did they get 50+ versions out without something so basic? or is it a technical limitation?
-
TIL that google chrome doesn't have an option for case-sensitive search. the fuck? how did they get 50+ versions out without something so basic? or is it a technical limitation?
Does Google have that?
Google Chrome's search is nice, since it's not just case insensitive, it's also diacritic insensitive.
-
@ben_lubar I guess Google is still trying to figure out how to do string comparison with casing. I think it is difficult because of languages and locales, but perhaps they can look at notepad++ to get some starting ideas
-
@bb36e ' is lowercase h in lojban.
No, not lowercase H. There is no H and h is a capital letter.
-
@ben_lubar said in WTF Bites:
@bb36e ' is lowercase h in lojban.
No, not lowercase H. There is no H and h is a capital letter.
Of course it is.
-
@ben_lubar not only did they create a language that could be read by machines, they created a language that wouldn't be read by humans
-
@ben_lubar said in WTF Bites:
@bb36e ' is lowercase h in lojban.
No, not lowercase H. There is no H and h is a capital letter.
Why would anyone do that? Other than for reasons. It just guarantees that you need extra Unicode characters that everyone will hate.
I propose that they switch to using the alphabet normally. Or picking alphabetic symbols from elsewhere. I don't really care. But using symbols like that is just being hindering awkward and stupid.
-
@Tsaukpaetra That'll be so much “fun” when compiled on a system that puts string literals in read-only memory…
Why would that be? I don't see any writes to
"%s\n"
.
-
I don't really care. But using symbols like that is just being hindering awkward and stupid.
Makes it beautifully self-selecting.
-
TIL that google chrome doesn't have an option for case-sensitive search. the fuck? how did they get 50+ versions out without something so basic? or is it a technical limitation?
It might confuse someone typing
grumpy cat
-
NNTP gateway.
The nntp protocol should be extended to support all the features a modern forum need and we should stop using stupid web applications
-
NNTP gateway.
The nntp protocol should be extended to support all the features a modern forum need and we should stop using stupid web applications
NNHTTP?
-
The nntp protocol should be extended to support all the features a modern forum need
What's absent?
-
-
@dkf I'm not sure, but somebody is bound to miss something
-
Why the fuck would you just not do something like that? Because the original one is a confusing fucking mess, how is it simpler than my snippet?
The original version is almost identical to yours except
- it uses the POSIX synonym of
strchr
calledindex
and - it avoids the assignment in condition by doubling it
So you did improve it a bit, but not all that much.
@Tsaukpaetra omg that code is awful, it restarts the search from the beginning every time!
Yup. Both the original and the @Onyx's version do. And the fix is so trivial. Just use the previous replacement position as argument to
strchr
/index
...Strings are hard.
- it uses the POSIX synonym of
-
how did they get 50+ versions out without something so basic?
Clearly for most people it is not basic. Case matters in most program code, but in almost no natural language text, so besides programmers almost nobody needs it. And the same goes for whole-word search, which Chrome also does not support. In program code identifiers are often runtogetherwords, so searching a word in isolation is often useful. But in natural text one word being part of another and both appearing many times is rare, so again, most people don't need it.
@ben_lubar said in WTF Bites:
@bb36e ' is lowercase h in lojban.
No, not lowercase H. There is no H and h is a capital letter.
Why the $hell can't it use the alphabet normally?
Among natural languages, the only language that has special casing rules for Latin alphabet is Turkish with lowercase of I being ı and uppercase of i being İ. And I don't remember any exceptions for either Cyrillic or Greek and other scripts don't have case. So lojban is being a really special here.
-
@Bulb lojban doesn't use capital letters (including h) in its grammar unless you're using a foreign word with a non-lojban stressing pattern. Kind of like how English doesn't use any diacritics but some asshole still insists on writing the word r̳͓̓̈́̓é̥̇͛̌̽͆̀ͣs̵̰̘͔̤̪̑͑ū̖̩̥͆͘m̫͕̩̤͇͙̭ͥ̓́ḛ̴̜͖͙́͌͑͗̉̊.
-
@ben_lubar said in WTF Bites:
lojban doesn't use capital letters
Why does it have any casing rules then (so that ' can be lowercase of h)?
-
@ben_lubar said in WTF Bites:
lojban doesn't use capital letters
Why does it have any casing rules then (so that ' can be lowercase of h)?
@ben_lubar said in WTF Bites:
unless you're using a foreign word with a non-lojban stressing pattern
Gee, I wonder what would happen if I had written that in the post you quoted right after the thing you quoted.
-
@ben_lubar So when you laugh in lojban you go something like "hAhAhA'a'a'a'a'a"?
-
@ben_lubar said in WTF Bites:
@ben_lubar said in WTF Bites:
unless you're using a foreign word with a non-lojban stressing pattern
Gee, I wonder what would happen if I had written that in the post you quoted right after the thing you quoted.
So by saying h is a capital letter you implied it is only used with foreign words with non-lojban stressing pattern? Not that it would explain the choice of casing rules, but at least it would explain that it is not normal casing rules.
-
Case matters in most program code, but in almost no natural language text, so besides programmers almost nobody needs it.
But I needed it to search for a school course :| also, is it really so complex of a feature that developing it would kill the devs
-
@Bulb You know, I think it would be easier to just communicate in Perl.
-
Do I even need to say anything?
Ok, maybe I shouldn't have used the word
user
in the context (should have beenendpoint
), but I doubt Google knows that. No, it's trying to "help" me again.Does anyone remember the times when Google did what you asked it to, without trying to be "smart"?
-
Does anyone remember the times when Google did what you asked it to, without trying to be "smart"?
To be fair, most of the time its help is actually correctly correcting my typos.
-
@boomzilla said in WTF Bites:
correctly correcting my
typosinner @accalia
-
@boomzilla said in WTF Bites:
typos
I don't object to that most of the time, thought sometimes it does assume wrongly. Even then, quotes work for that.
But now it's shuffling sentences around, and quoting the entire thing is rarely useful. It defeats most of the advancements Google made in the search algorithm at the very least.
-
@boomzilla for most people the vast majority of things it corrects are what you actually wanted to search for. As programmers who often need very specific keyword searches we're probably annoyed by it more than almost any other users.
I do wish there was an option for "just search for what I tell you, redirect is not the same as reroute in this context" though
-
@Jaloopa I know, and it's usually those specific programming things that I typo'd. But fortunately they always put the link there for when it does miscorrect, so it's easy enough to do the search you wanted in those cases.
-
@Onyx Update:
No, I did not, thanks.
-
@boomzilla said in WTF Bites:
they always put the link there for when it does miscorrect
They sometimes silently search for what they consider to be synonyms, which can pollute the search results and isn't always obvious
-
is it really so complex of a feature that developing it would kill the devs
Yes.
-
Almost always, in the case where you're searching for something "unpopular" liable to give few results, and especially if one or more of the words is close to a pismelling, or more popular synonym.
For a few searches I've made recently, google has been utterly useless; in one case, the result I was looking for, the title of which was literally what I put in the query, was returned on the 10+th page of irrelevant results.
-
@tufty I got into a habit of using private windows / other machines at times ever since I spent an entire morning trying to find some documentation once. Zip, nada, nothing. Tried it on another computer for shits and giggles: third result.
-
@Onyx I forget what I was searching for now, as I'd give it a go in a private window. But if they are using "known search history" to push word for word titled results that are directly related to what I have been searching for before into search result oblivion, then I'm afraid they have somewhat jumped the shark
-
@tufty I think they are somehow associating words / phrases with the sites you already visited and preferring those sites.
-
@tufty I got into a habit of using private windows / other machines at times ever since I spent an entire morning trying to find some documentation once. Zip, nada, nothing. Tried it on another computer for shits and giggles: third result.
"personalized"
-
I think they are somehow associating words / phrases with the sites you already visited and preferring those sites.
In which case, you'd think they'd be giving me sites directly related to 1930s machine tools, and not to american kickball stars.
As a hint - I have never, do not currently, and do not intend to carry out kickball-related searches, american or otherwise.
-
TIL that google chrome doesn't have an option for case-sensitive search. the fuck? how did they get 50+ versions out without something so basic? or is it a technical limitation?
If case-sensitive search is that useful, why did it take 50+ version for you to realize it's missing?
-
Back in my pascal days I used 3 spaces for indentation.
Also, I alignedbegin
/end
with the code inside the block.I was a troubled child.
-
@cartman82 said in WTF Bites:
TIL that google chrome doesn't have an option for case-sensitive search. the fuck? how did they get 50+ versions out without something so basic? or is it a technical limitation?
If case-sensitive search is that useful, why did it take 50+ version for you to realize it's missing?
50+ versions? All that means is he didn't do a case-sensitive search for 2 days.