Search content
Sort by

Showing 20 of 684 results by PowerGlove
Post
Topic
Board Meta
Merits 16 from 7 users
Re: [Discussion] Bitcoin Pizza Day on Bitcointalk 🍕
by
PowerGlove
on 23/06/2025, 11:56:45 UTC
⭐ Merited by klarki (5) ,LoyceV (4) ,hosemary (2) ,JayJuanGee (2) ,babo (1) ,joker_josue (1) ,dkbit98 (1)
I have a better suggestion, you can rate 114 with 0 points as I am no longer interested in the contest.
Don't be like that, dude. It's all good...

Probably you only meant to say "Thanks" to the people that voted for you, but, try to see things from a zoomed-out point of view. Imagine if every participant (in this competition and others) got into the habit of sending merit as a "Thanks" to the people that voted for them. I mean, that would get out of hand pretty quickly, no? People that really struggle to rank-up by making high-quality contributions would make sure to vote in every competition that they could find...

Also, it's kind of unsportsmanlike, isn't it? I would never want to win anything by encouraging people to vote for me. I'd want to win "clean" (even if all my competitors were trying everything that they could think of to tip the scales in their favor).

(Having said all that, one thing where I myself am pretty unsportsmanlike, at least according to others, is with deathmatch first-person shooters: I basically stopped playing them because everyone else thinks it's bullshit that I sometimes "camp" and feel comfortable staying out of view for long periods of time. Most people can't have fun like that, and resent the fact that I can outwait them, and I've myself gotten into heated arguments about how it's not against the rules, but, yeah... I don't like irritating people, even when I think that I'm in the right, so I changed my playstyle, and still lit them up nine ways to Sunday, haha, but, I really, really don't enjoy being in overly-prescriptive environments, so, I just stopped playing, except occasionally with close friends.)
Post
Topic
Board Meta
Merits 37 from 8 users
Re: Hidden pages/ features on the forum
by
PowerGlove
on 03/06/2025, 14:32:34 UTC
⭐ Merited by The Sceptical Chymist (12) ,LoyceV (6) ,ABCbits (5) ,dkbit98 (5) ,vapourminer (4) ,ibminer (3) ,JayJuanGee (1) ,babo (1)
Maybe this one isn't as not-known as I think (I've only ever seen it used on a handful of old posts), but, if you post while in ;wap2 mode (or ;imode, too, I think) then you'll get a different "message icon" than any of the 12 that you can ordinarily [1] pick from (I posted this message in that way, so, you should see the "wireless.gif" icon to the left of this post's subject and date/time).

[1] I'm aware of "moved.gif" and "recycled.gif", and I'm aware that there are some extra message icons on the "Important Announcements" board. I'm just referring to the 12 that you typically get to pick from.

Who knew there's a [php]-tag?
Yeah, that one's easy to forget about. It's worth noting that (with the right delimiter) you can get PHP code-coloring with [code][/code] tags, too:

Code:
<?php echo "Me?! I know who I am! I'm a dude playing a dude disguised as another dude. You're a dude that don't know what dude he is!";

BTW, here's a (I think) complete list of the 59 BBCode tags that the parser recognizes (it's an alphabetical arrangement of the 57 tag names that I found within SMF 1.1.19's parse_bbc function, plus the [btc] tag which came from theymos, and the [nbsp] tag which came from me):

Code:
#
*
+
0
@
abbr
acronym
anchor
b
black
blue
br
btc
center
chrissy
code
color
email
flash
font
ftp
glow
green
hr
html
i
img
iurl
kissy
left
li
list
ltr
me
move
nbsp
nobbc
o
O
php
pre
quote
red
right
rtl
s
shadow
size
sub
sup
table
td
time
tr
tt
u
url
white
x

(From the above list, I think only flash, html, and move are disabled: they are recognized, but, they emit inert stand-ins.)

(Adding new BBCode tags isn't as difficult as it might seem, so if anyone has any good ideas for useful ones, feel free to leave them in my thread.)

And who knew there's some sort of "space" that Admin can post, but turns into " " when I quote it? And why can Mia Chloe post it without problems? Never mind, the " "-thing only happens when I Preview my post.
That's the numeric entity reference for a non-breaking space. I don't know why entity references (and other inconsistencies) show up sometimes during preview. Between theymos' version of SMF being different to mine, and either version being approximately the same bug-harboring contraption, I probably wouldn't be able to get to the bottom of it without sinking something stupid like 2 or 3 days into figuring it out. Angry
Post
Topic
Board Meta
Merits 10 from 4 users
Re: Why is it impossible to Undo (CTRL+Z) Smiley and Bulletin board codes?
by
PowerGlove
on 30/05/2025, 14:17:38 UTC
⭐ Merited by dkbit98 (3) ,logfiles (3) ,ABCbits (2) ,Cyrus (2)
Why is it not possible to undo smiley or BB codes that one may have clicked on accidentally in a post they are trying to create?
Hmm... I've never noticed that before, but, it makes sense to me now that I consider it (what's happening is that the undo history of the textarea is being cleared/reset each time its contents are changed programmatically: when you insert something into a post/PM by using the toolbar, then either an SMF-provided JavaScript function named replaceText or one named surroundText is invoked, and, in either case, the textarea gets modified in such a way that the undo history is wiped; though, strictly speaking, I'm only considering the non-IE paths, and so maybe undo/redo did actually work correctly back in the day on Internet Explorer, but, that's neither here nor there).
 
Or can our script guy (PowerGlove) make some patch?  Smiley
I can. Smiley



Code:
--- baseline/Themes/default/script.js 2006-11-01 07:46:11.000000000 +0000
+++ modified/Themes/default/script.js 2025-05-30 10:34:10.000000000 +0000
@@ -113,6 +113,14 @@
 // Replaces the currently selected text with the passed text.
 function replaceText(text, textarea)
 {
+ // First, attempt to use the execCommand interface (it's deprecated, but, it doesn't wipe the undo history, which is nice).
+ if (typeof(document.execCommand) != "undefined")
+ {
+ textarea.focus();
+ if (document.execCommand("insertText", false, text))
+ return;
+ }
+
  // Attempt to create a text range (IE).
  if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange)
  {
@@ -167,13 +175,11 @@
  // Mozilla text range wrap.
  else if (typeof(textarea.selectionStart) != "undefined")
  {
- var begin = textarea.value.substr(0, textarea.selectionStart);
  var selection = textarea.value.substr(textarea.selectionStart, textarea.selectionEnd - textarea.selectionStart);
- var end = textarea.value.substr(textarea.selectionEnd);
  var newCursorPos = textarea.selectionStart;
  var scrollPos = textarea.scrollTop;
 
- textarea.value = begin + text1 + selection + text2 + end;
+ replaceText(text1 + selection + text2, textarea);
 
  if (textarea.setSelectionRange)
  {

(Between the three different ways that I can think of to fix this, I think the above way makes the most sense in the context of the existing code. It's not perfect, but, it's much lighter than trying to spoof input events or maintain a non-native undo history, and, if the deprecated interface that it relies on does actually get removed at some point, then the logic will just more-or-less return to the state that it's currently in.)

(I'm not going to bug theymos with a PM about this one, so, hopefully he bumps into this post naturally. I didn't test this change very carefully, because that's always the most time-consuming part of the process, and it doesn't make much sense for me to allocate a huge block of time to doing cross-browser testing for a proposed change that theymos might never even see, let alone merge. If he merges it and it turns out that I've overlooked something, like maybe selection-preservation not working exactly how it used to, then the change can be undone and I'll attempt to revise/improve it at that point.)
Post
Topic
Board Meta
Merits 18 from 3 users
Re: New moderator in forum?
by
PowerGlove
on 06/05/2025, 08:45:53 UTC
⭐ Merited by LoyceV (12) ,dkbit98 (5) ,Lafu (1)
@mprep: What's the point of doing this, though? I can't think of any non-contrived upside to merging old posts, but I can think of a few genuine downsides: Destroying timelines, breaking links to specific message IDs, sometimes hiding/losing "Merited by" markers, sometimes hiding/losing "Last edit" markers, adding new divergences between the forum and its various third-party archives, generating notification noise, and just generally irritating the affected posters (and it's not like Bitcointalk has a flourishing user base, so, why annoy good members for no real upside?). I mean, how much sense does it make to bypass the reporting mechanism and produce these old-post amalgamations on your own? Especially when, as you've said, they likely would have been marked "bad" if they had been reported organically rather than found by your bot.
Post
Topic
Board Meta
Merits 1 from 1 user
Re: If You love AI, Protect Human Written Texts at any Cost.
by
PowerGlove
on 28/04/2025, 07:41:48 UTC
⭐ Merited by Cyrus (1)
I enjoyed that. Thanks for recommending it! (It's available on the Internet Archive, BTW. Though, that's not how I read it: I hate creating unnecessary accounts, so I just found a copy of it on Anna's Archive.)

There are some thoughts in that story (mostly presented by "Jasper") that struck a chord with me, so I'll repeat some of them here:

Quote from: So Bright the Vision (Clifford D. Simak)
Someday, the human race will outwit itself. Someday it will mechanize to the point where there won't be room for humans, but only for machines.

Quote from: So Bright the Vision (Clifford D. Simak)
Of course, it's a great testimonial to the cleverness of Man, to the adaptability and resourcefulness of the human race. It is a somewhat ludicrous application of big business methods to what had always been considered a personal profession. But it works. Some day, I have no doubt, we may see the writing business run on production lines, with fiction factories running double shifts.

Quote from: So Bright the Vision (Clifford D. Simak)
But it should make some difference to us. It should make some difference in the light of a certain pride of workmanship we are supposed to have. And that is the trouble with machines. They are destroying the pride in us.
Post
Topic
Board Meta
Merits 14 from 6 users
Re: Little things that bug you/me about the forum
by
PowerGlove
on 19/04/2025, 15:41:00 UTC
⭐ Merited by The Sceptical Chymist (5) ,Xal0lex (3) ,ibminer (3) ,bitmover (1) ,vapourminer (1) ,Cyrus (1)
Does anyone know what is going on with PowerGlove?
He is not so much active in forum these days, only six posts written in April and March.
As unofficial main forum developer, he is either working on some big update, or he is busy with other things.
Getting Merit Poker done in time for the April 1st deadline was tough (and explains my lack of availability leading up to and during March). I've been chilling/recovering at half power (no glove) for the last few weeks. Tongue

In all seriousness, I'm always watching Meta, and working on forum-related things, even when I'm not posting about it. For example, last week I noticed a discussion come up about the "Report to moderator" function and saw Xal0lex mention that the "Please note that your email address will be revealed to the moderators if you use this." part of the description is no longer accurate. Someone asked if that language might be putting people off, and Welsh said that he thought so (which is my feeling, too), so I put together a patch and sent it to theymos.



Say I'd like to share this post in another post, I would press the currently imaginary share / 🔗 button located somewhere in the header of the post (in the thread title, or next to the quote and edit buttons). Clicking it would then maybe present a small dialog allowing me to copy it in this format:
Code:
[url=https://bitcointalk.org/index.php?topic=5503118.msg65275936#msg65275936]Little things that bug you/me about the forum[/url]
That's a very nice suggestion, Cyrus! I've started work on it. Smiley



What other consequences exist here?
It's a whole thing... I'll put together my thoughts on this soon and either post them here or send you a PM. Wink
Post
Topic
Board Project Development
Merits 15 from 5 users
Re: [BETA] [NEW] beta.ninjastic.space (forum search, archive and data visualization)
by
PowerGlove
on 13/04/2025, 01:02:24 UTC
⭐ Merited by mprep (10) ,TryNinja (2) ,NotATether (1) ,FatFork (1) ,Cyrus (1)
So I guess you just can't know.
It's a little off-topic for this thread, but, just so you know:




Post
Topic
Board Meta
Merits 219 from 11 users
Re: Replacing the merit system
by
PowerGlove
on 01/04/2025, 20:35:31 UTC
⭐ Merited by fillippone (50) ,EFS (50) ,theymos (45) ,LoyceV (42) ,Foxpup (12) ,mole0815 (10) ,ibminer (4) ,Halab (2) ,JayJuanGee (2) ,Cyrus (1) ,Avox (1)
Hey, everyone!

I just wanted to say that I hope you're all having fun! Smiley

(I actually had this idea back in 2023, soon after I did the FlappyCAPTCHA thing, but, I wasn't able to pull it off in time for last year's event.)

There are some chat commands that might be worth knowing:

/t+ makes the table bigger.
/t- makes the table smaller.
/t= makes the table the default size.
/c+ makes the controls bigger.
/c- makes the controls smaller.
/c= makes the controls the default size.
/q unseats you and puts you back in spectator mode. (This was from before I added the "Leave" button.)
/qj is the "quit join" command. You can use it to quickly be re-seated (it basically just selects a new table at random, without much intelligence, so you could end up back on the table you came from; if that keeps happening then there are likely only a few active tables).
/> rotates your position on the table (in case you prefer being seated somewhere other than the "south" chair).
/e is a (basically useless to anyone but me) command that does a console.log() on any recorded errors.

You can use the up and down arrow keys to navigate through the items that you've entered. If the chat input doesn't "accept" something you've typed in, then that's because you're either trying to enter an unrecognized chat command, or you're not seated, or you're trying to enter something that would take too many bytes when encoded in UTF-8 (like a long string of emojis, or something).

If anyone is interested in some programming details: With comments, and minus the custom build script, this project consists of just 1599 lines of code (168 lines of PHP, 576 lines of Python, and 855 lines of JavaScript, all according to cloc). It uses only the standard library from each language. While this project was mostly a solo effort, I certainly wouldn't have been able to complete it without help from both theymos (who helped with ideas and who did the database/SMF integration), and ibminer (who designed the table, the cards, and the chips, and who also helped with ideas).

One last thing: I added a cool little tribute/nod to o_e_l_e_o (who we all still miss very much around here). If the 5 "community" cards come up in a way that's suggestive of o_e_l_e_o's palindromic name (as in, something like 2-3-4-3-2, or J-5-A-5-J, etc. then the cards will display with a blueish glow, and everyone at that table gets a pMerit gift (and whatever is in the pot gets tripled).
Post
Topic
Board Meta
Merits 5 from 1 user
Re: Little things that bug you/me about the forum
by
PowerGlove
on 19/03/2025, 11:21:09 UTC
⭐ Merited by Hueristic (5)
Now the embed code by default only includes the height. Hopefully it minimizes the likelihood of disproportionality.
Hmm...

Are you sure that you fully understood my last post? I know that the punchline looks like I'm suggesting option 3, but, I'm not. In fact, if you go over all of my thinking on this, you'll see that at both points in time (back in December, and now in March) I've basically been inclined to leave TalkImg's default BBCode without any dimension information at all. Back in December that's where I landed because I felt like we didn't know whether or not including just the height attribute would actually help to reduce layout shifts, which is why I said: "So, you should probably do nothing until someone tests that hypothesis.", and now in March that's where I land again (but this time, it's because of the issue that Loyce pointed out; that is, I suspect that it's actually the height attribute that sometimes interacts poorly with the forum's responsive down-sizing of images).

I know that I have a tendency to explain my thinking in kind of a tiresome way, so please don't feel bad if you did misunderstand me. (That is, I expect people to linearly digest each sentence, like I do when I'm reading someone else's thoughts on something, but, I realize that that's incompatible with the modern tendency to just quickly skim over things while pausing at the relevant-looking bits in the hopes of being able to pick up the gist of what someone is saying.)
Post
Topic
Board Meta
Merits 1 from 1 user
Re: Little things that bug you/me about the forum
by
PowerGlove
on 19/03/2025, 04:38:45 UTC
⭐ Merited by joker_josue (1)
What do you think about just setting the height as default?
Wasn't that basically what I ended up suggesting when we last spoke about this? Tongue

It makes me think that maybe a sane default choice for TalkImg would be BBCode that includes just the height attribute...

And then later:

Ha! Reading my own thoughts, I see that I've left you with three options:

(1) Do nothing, and rely on this problem being fixed in another way.

(2) Make the default TalkImg BBCode include both a width and a height attribute.

(3) Make the default TalkImg BBCode include just the height attribute.

I think if it were up to me, the choice would be between 1 and 3. (But, remember, I only have a hunch that for typical forum content vertical layout shifts can mostly be avoided if the browser knows just the height of an image before loading it. So, you should probably do nothing until someone tests that hypothesis. If it turns out that browsers really are super picky about needing both dimensions before they can do anything clever around avoiding layout shifts, then the choice is between 1 and 2, and in that case, the tradeoffs aren't so clear, and with unclear tradeoffs, I tend toward inaction.)

I remember wondering at the time: "Why did he go for the option that I least recommended?" Smiley

The thing is, back then, we (you, me, and Loyce, I mean) were only really considering things in terms of hoping to reduce the probability of layout shifts by accepting a possible increase in the amount of users incorrectly adjusting [img] dimensions, but, the issue that Loyce just now reported is actually orthogonal to all of that, and would've presented even if you had gone with option 3 (at least, according to the quick test that I just did).

So, that kind of leaves you in a tricky spot, where the only thing that you can really do from TalkImg's end (to both reduce the problem of people making incorrect BBCode size adjustments, and the problem where an image with a height attribute will sometimes not have its aspect ratio maintained during responsive down-sizing) is to revert the change and go with option 1 (which puts you back where you started in terms of the layout shift problem). Cheesy
Post
Topic
Board Meta
Merits 9 from 3 users
Re: Little things that bug you/me about the forum
by
PowerGlove
on 18/03/2025, 16:53:34 UTC
⭐ Merited by LoyceV (4) ,vapourminer (4) ,dkbit98 (1)
I've stumbled upon this a few times.
Yup, me too.

I figured it was because people were taking the BBCode that comes from TalkImg and then sometimes messing up the aspect ratio by fiddling with the image dimensions...

But, it looks like what's mostly going on is that having non-automatic dimensions is interacting poorly with this:

Code: ("https://bitcointalk.org/Themes/custom1/style.css")
img.userimg { max-width: 100%; }

I don't know if this would be easy to improve.
I think it's going to be tricky to fix in a completely clean way.

I guess, a discussion-wise starting point might be:

Code: ("https://bitcointalk.org/Themes/custom1/style.css")
img.userimg { max-width: 100%; height: auto; }

(As in, I think that that would fix the specific problem you're talking about, but, not without producing some other consequences, too.)



To everyone that's recently left me a post (or sent me a PM): I'm sorry that I've been so unresponsive lately. I'll get back into my usual rhythm soon.
Post
Topic
Board Meta
Merits 16 from 6 users
Re: Bug about topics from Spanish board which are not displayed correctly
by
PowerGlove
on 04/03/2025, 15:24:19 UTC
⭐ Merited by theymos (5) ,LoyceV (4) ,DdmrDdmr (3) ,vapourminer (2) ,GazetaBitcoin (1) ,Porfirii (1)
I think that the weirdness you're talking about is due to one (or both) of the following uBlock filters:

Code:
bitcointalk.org##:xpath(//span[contains(text(),"Advert")]/../..)
bitcointalk.org##td:has(> span[class]:has-text(Advert))

Both that XPath expression, and the CSS selector seem buggy to me (in different ways).

Anyway, I'm not sure what content blocker you're running, but I can get this post to display correctly for me by disabling "cosmetic filtering" in uBlock Origin:

Post
Topic
Board Meta
Re: [TOP-200] Members who have a lot of earned sMerits
by
PowerGlove
on 24/02/2025, 00:24:05 UTC
It's kind of disconcerting to see members who earn a decent number of merits not giving them back, and from the last few months of data it looks like there are quite a few members like that.
While there definitely are members like that, I'm not sure that I'd try to pick them out using the monthly snapshots. For example, if you look a few posts above (at the stats for October 2024), I'm near the top of the list, but that doesn't really say anything useful about my merit-sending habits in general...

I've received 5573 merits in total, giving me 2786.5 sMerits, 2706 of which I've put back into the system (~97%). So if someone were to look at that one month of data and think "That damn PowerGlove guy, getting all those merits and then being a stingy bastard when it comes to giving them back out.", they'd be mistaken. (Honestly, I often wish that I had more sMerits to hand out, because it always feels really cheap to me when I leave just one merit on a post that deserves more, but, if I routinely spent my balance in bigger chunks, then I'd basically only get to merit a small handful of posts before I'd have to turn my attention back to earning merit so that I can top up my sMerit balance, and I can only do that at a fairly pedestrian pace; I mean, I know that my merit-to-post ratio is high, but, probably that's precisely due to me not posting at a rate much beyond the natural rate that I can add value at.)
Post
Topic
Board Meta
Re: Thread to discuss acceptable uses of AI in the forum
by
PowerGlove
on 21/02/2025, 17:08:50 UTC
Haha, yeah. I do. (To be clear, if what you used Google for was to retrieve the links to articles which you have previously read, enjoyed, and are now recommending to me, then I wouldn't be irritated by that. But if all you did was use Google to just now find some articles saying something, then, yeah, that's kind of irritating, isn't it? I mean, I could just do that myself.)

I actually find that negative attitude that denies the obvious quite irritating.
Are you talking about me or suchmoon?

If you're talking about me, then, I don't think that I'm "denying the obvious", am I? I'm just saying that I prefer to interact with people in ways that familiarize me with them rather than their assistants, and that I'm worried that people are going to eagerly embrace, at the great expense of their own skill development, this new low-effort way of "creating".

If you're talking about suchmoon, then, I think that they probably feel similarly, and that you're interpreting their post in a too-literal and ungenerous way. (As in, I don't think that their position is actually "AI isn't changing the world". Probably they just meant that, in their view, it's not something that deserves the positive connotations associated with language like "world changing".)
Post
Topic
Board Meta
Merits 7 from 3 users
Re: Thread to discuss acceptable uses of AI in the forum
by
PowerGlove
on 20/02/2025, 16:08:10 UTC
⭐ Merited by suchmoon (5) ,ABCbits (1) ,dkbit98 (1)
Did you ask ChatGPT to give you some links?

Of course, I hardly use search engines like google anymore. I had to do my part, though, as it first gave me some sources that I did not consider of quality, like wikipedia, and I refined the search a couple of times, apart from selecting from what it gave me.
I'd personally (that is, if it were you and I talking rather than you and suchmoon) find a response consisting of a lightly-curated set of ChatGPT-sourced links to be pretty irritating...

When I'm chatting with someone, I'm interested in engaging with them (and enjoying their style of writing/talking/thinking, while considering their perspective on things, and maybe setting aside some time to digest the resources that they have recommended to me, etc.)

If someone feels that they must involve the output of an artificial intelligence model in their post (even if it's just to clean up their writing), then I'd personally prefer that that was made very clear (so that I know what not to consider when trying to evaluate them; beyond knowing what content I should ignore, I also don't want to, for example, think "Wow this person is very detail-oriented!" only to later find out that, when writing without assistance, they're actually the kind of person who frequently mixes up "its" and "it's").

One of the things that worries me about this new generative AI frontier is the difficult-to-appreciate damage that I think it's going to inflict on society as human activity shifts even further away from "comprehension", and further towards "productivity". That is, people seem to think that it's a good idea to be able to operate outside of the limits of their own understanding, and to, for example, write programs beyond their ability as a programmer, or make music beyond their ability as a musician, or paint scenes beyond their ability as an artist. While most people seem super excited about these new low-comprehension paths to productivity being opened up, I mostly just see paths that will inevitably lower the average value of things as it becomes less and less popular for people to invest the time it takes to build real expertise in something.



What follows is a personal anecdote that probably most people can't relate to, so feel free to skip it, but, when I was a kid, I was fascinated (to put it mildly) by computer games and wanted to know how to make one myself. Back then, the answer wasn't "That's easy, just pick between Unity and Unreal Engine!", it was "Computer games are just programs. Advanced computer games are advanced computer programs. If you're aiming to make high-quality computer games, then you'll need to become a highly competent computer programmer, first."

That put me on a learning path that went: Logo (via "turtle graphics"), then BASIC, then Pascal, and then C and x86 assembly. Looking back, I feel really fortunate that I was effectively forced (by the lack of easier alternatives) to go down that very difficult and very tedious path (which was honestly way too challenging for me at the age I started, but, I didn't know that at the time, and so I just did my best and kept trying and trying until things clicked). I'm grateful because, by the time I was 13 (and my friends were struggling with problems like how to style their hair, or how to get shoes with lights in them), I was happily programming little graphical demos and implementing things like Bresenham's line algorithm in x86 assembly and learning about things like perspective projection, and had somehow become a surprisingly well-rounded if very inexperienced programmer. I didn't know it at the time, but I now know (or at least, very strongly suspect) that minus that early high-difficulty foundation (or one similar to it) I'd be a much, much less capable person today (I mean, life knocked me off the path I started down, like it does to many people, and I never actually did get involved in commercial game development, but I did do a lot of dependency-free DOS-era gamedev in private, and that ended up forming the bedrock of my programming style).

From my perspective, the skill of programmers (on average) has been dropping for a long time now. Most programming these days seems to be about stitching together a set of not-fully-understood dependencies, and then hoping for the best while you endlessly push bugs around or turn them from one kind into another. Add a synthetic "programming assistant" to the mix and even the stitching becomes something that most people will decide not to do on their own (which means that they'll typically neither understand the components being bound together, nor understand the binding itself; writing code that appears to work correctly is easy, it's the full comprehension of it along with all of its dependencies that's the hard part).
Post
Topic
Board Meta
Merits 81 from 7 users
Improving the word-breaker (SMF patch)
by
PowerGlove
on 17/02/2025, 02:54:32 UTC
⭐ Merited by LoyceV (42) ,dkbit98 (15) ,vapourminer (12) ,ABCbits (9) ,Lafu (1) ,Cyrus (1) ,BlackBoss_ (1)
I ran into a nice suggestion from a long time ago (~12 years):

SMF breaks up long words by inserting a space every 79 characters (it is a space in a <span> with a negative margin). Example: here are 120 'a' characters:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

When copying/pasting the chars, the space is visible at the 80th position, which is very annoying...

Instead, SMF should insert the standardized <wbr> tag (word break opportunity) already recognized by most browsers. In theory <wbr> is identical to U+200B (ZERO-WIDTH SPACE) but this is false; for example the current Chrome version on Linux (Version 23.0.1271.97) replaces U+200B with '#' when copying & pasting to a non-UTF8 application, whereas <wbr> is nicely invisible...

Maybe newer members haven't encountered this particular issue before, but I know exactly what the above poster is complaining about, and I'm sure that many other people do, too.

Basically, if you (with some exceptions that aren't worth getting into) post an unbroken sequence of 80 or more letters, digits, underscores and/or periods, then it'll automatically get divided into chunks which are each 79 characters in length (or less, in the case of the final chunk).

So, for example, if you were to post the SHA-512 of the text "How would you like to suck my balls, Mr. Garrison?", then instead of it appearing like this:



It would appear like this:



(See that tiny space at around the two-thirds point? Between dbcc and 9e06?)

That "breaker" space will, among other things, cause problems with copy-pasting (because there's now a space in the content that the author didn't intend for there to be), and will also affect double-click selecting, like this:



So, what I've done is add a new kind of "breaker" to SMF (to go along with the three existing variations that are chosen between based on what browser the BBCode parser thinks it's producing markup for). This new breaker avoids the problems described above and is used by default (but, I've left the older breakers accessible by a context variable in case theymos wishes to selectively flip between the new and the old behavior).

Here's the diff:

Code:
--- baseline/Sources/Subs.php 2011-09-17 21:59:55.000000000 +0000
+++ modified/Sources/Subs.php 2025-02-16 23:39:26.000000000 +0000
@@ -1860,24 +1860,27 @@
  if (!empty($modSettings['fixLongWords']) && $modSettings['fixLongWords'] > 5)
  {
  // This is SADLY and INCREDIBLY browser dependent.
  if ($context['browser']['is_gecko'] || $context['browser']['is_konqueror'])
  $breaker = '<span style="margin: 0 -0.5ex 0 0;"> </span>';
  // Opera...
  elseif ($context['browser']['is_opera'])
  $breaker = '<span style="margin: 0 -0.65ex 0 -1px;"> </span>';
  // Internet Explorer...
  else
  $breaker = '<span style="width: 0; margin: 0 -0.6ex 0 -1px;"> </span>';
 
+ if ($context['bbc_use_modern_breaker'] ?? true)
+ $breaker = '<wbr />';
+
  // PCRE will not be happy if we don't give it a short.
  $modSettings['fixLongWords'] = (int) min(65535, $modSettings['fixLongWords']);
 
  // The idea is, find words xx long, and then replace them with xx + space + more.
  if (strlen($data) > $modSettings['fixLongWords'])
  {
  // This is done in a roundabout way because $breaker has "long words" :P.
  $data = strtr($data, array($breaker => '< >', '&nbsp;' => $context['utf8'] ? "\xC2\xA0" : "\xA0"));
  $data = preg_replace(
  '~(?<=[>;:!? ' . $non_breaking_space . '\]()]|^)([\w\.]{' . $modSettings['fixLongWords'] . ',})~e' . ($context['utf8'] ? 'u' : ''),
  "preg_replace('/(.{" . ($modSettings['fixLongWords'] - 1) . '})/' . ($context['utf8'] ? 'u' : '') . "', '\\\$1< >', '\$1')",
  $data);



When doing these sorts of fixes, I always hem and haw on whether or not it makes sense to keep using the older behavior on old posts, and only use the newer behavior on new posts...

I guess, I don't much like the idea of posts changing in ways that the author didn't account for (for example, I hate that one of my own posts was mangled by the wordfilter at some point after I authored it). I (mostly) lean toward wanting to keep old posts displaying as they did at the time they were authored. For example, in the post I quoted from above, mrb is demonstrating the problem he's describing, as in, if you try to copy-paste his example-sequence, then you'll get the result he's talking about: 79 characters, followed by a space, followed by 41 characters. But, after this fix is applied, if you then tried to copy-paste mrb's example, you'll find that you get 120 contiguous characters, so it'll look (from the perspective of someone reading that post cold) like mrb must have been confused or mistaken when he constructed that example.

I dunno, maybe I'm just overthinking things, but, in case theymos feels that the old behavior is worth preserving, here are two additional diffs that will make sure (at least, in the two places that are important, I think) that old posts won't be affected by this fix:

Code:
--- baseline/Sources/Display.php 2011-02-07 16:45:09.000000000 +0000
+++ modified/Sources/Display.php 2025-02-17 01:11:58.000000000 +0000
@@ -878,24 +878,26 @@
  else
  {
  $memberContext[$message['ID_MEMBER']]['can_view_profile'] = allowedTo('profile_view_any') || ($message['ID_MEMBER'] == $ID_MEMBER && allowedTo('profile_view_own'));
  $memberContext[$message['ID_MEMBER']]['is_topic_starter'] = $message['ID_MEMBER'] == $context['topic_starter_id'];
  }
 
  $memberContext[$message['ID_MEMBER']]['ip'] = $message['posterIP'];
 
  // Do the censor thang.
  censorText($message['body']);
  censorText($message['subject']);
 
+ $context['bbc_use_modern_breaker'] = (int)$message['ID_MSG'] >= 65073000;
+
  // Run BBC interpreter on the message.
  $message['body'] = parse_bbc($message['body'], $message['smileysEnabled'], $message['ID_MSG']);
 
  // Compose the memory eat- I mean message array.
  $output = array(
  'attachment' => loadAttachmentContext($message['ID_MSG']),
  'alternate' => $counter % 2,
  'id' => $message['ID_MSG'],
  'href' => $scripturl . '?topic=' . $topic . '.msg' . $message['ID_MSG'] . '#msg' . $message['ID_MSG'],
  'link' => '<a href="' . $scripturl . '?topic=' . $topic . '.msg' . $message['ID_MSG'] . '#msg' . $message['ID_MSG'] . '">' . $message['subject'] . '</a>',
  'member' => &$memberContext[$message['ID_MEMBER']],
  'icon' => $message['icon'],

Code:
--- baseline/Sources/Profile.php 2013-10-21 19:01:11.000000000 +0000
+++ modified/Sources/Profile.php 2025-02-17 01:12:02.000000000 +0000
@@ -1479,24 +1479,26 @@
  }
 
  // Start counting at the number of the first message displayed.
  $counter = $reverse ? $context['start'] + $maxIndex + 1 : $context['start'];
  $context['posts'] = array();
  $board_ids = array('own' => array(), 'any' => array());
  while ($row = mysql_fetch_assoc($request))
  {
  // Censor....
  censorText($row['body']);
  censorText($row['subject']);
 
+ $context['bbc_use_modern_breaker'] = (int)$row['ID_MSG'] >= 65073000;
+
  // Do the code.
  $row['body'] = parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']);
 
  // And the array...
  $context['posts'][$counter += $reverse ? -1 : 1] = array(
  'body' => $row['body'],
  'counter' => $counter,
  'category' => array(
  'name' => $row['cname'],
  'id' => $row['ID_CAT']
  ),
Post
Topic
Board Meta
Re: The Scam Accusations subforum name. Should it be changed?
by
PowerGlove
on 08/02/2025, 17:12:59 UTC
I'm always flipping through old-Meta, looking for forum-improvement discussions, and I recently bumped into the following post by BadBear:

I said once I think Scam Accusations should be renamed to Trade Disputes, I think it would fit better. I've managed to resolve several situations amicably and I don't think for a second either one of the parties was a scammer, they just needed someone to help guide them in the right direction. If I had a problem and needed help, I probably wouldn't post in Scammer Accusations just because I wouldn't want to imply someone is a scammer just because we have an issue.

There's something cleaner and more constructive-sounding [1] about "Trade Disputes" than "Scam Accusations", isn't there?

I mean, I can't see "Scam Accusations" being renamed, but, maybe there's a case to be made for "Trade Disputes" to be added? (As in, user-to-user trade-related issues could go there, instead of in "Scam Accusations" which sounds kind of goofy to my ear for that use-case. If I was having a contentious financial interaction with another user, I'd feel pretty stupid making a post about it in "Scam Accusations", and I'd also feel it wrong to post about it in "Reputation", but "Trade Disputes" would feel just right.)

Anyway, just leaving BadBear's idea here because I think it's worth pondering...



[1] Please don't think that I like the idea of "soft language". If you've got ~7 minutes, I recommend watching George Carlin's take on this. If you're anything like me, you'll find yourself smiling and nodding along to basically the whole thing. The way he delivers the following line always gets me: "They don't have a negative cash flow position... They're fuckin' broke!" Cheesy
Post
Topic
Board Reputation
Merits 3 from 2 users
Re: nvK c0inkite c0ldacrd is Anti-OpenSource nutcase
by
PowerGlove
on 02/02/2025, 06:48:51 UTC
⭐ Merited by DireWolfM14 (2) ,dkbit98 (1)
I see you finally learned how to copy feedback with the correct reference links.
I actually meant (but then forgot) to stick up for dkbit98 about this...

There genuinely was a strange interaction (which I independently confirmed and then fixed) between the BPIP extension and the "Ignore threads" userscript by NLNico.

Here's my side of the conversation I had with dkbit98 about this:

I can't think of any SMF patches that might have affected the trust page (there's one that I can think of, but that one hasn't been merged yet, and anyway wouldn't have affected the markup deeply enough to confuse the BPIP extension, I don't think).

Still, I examined the code from the BPIP extension (v2.2.5) to see if I could find your bug...

I don't mess with browser extensions, so what I did was extract the relevant code from this archive, and then paste it directly into a web console to test the feature. I'm on Tor Browser, and the feature works correctly for me.

Here's the snippet I tested:

Code:
// Ha! Cloudflare won't let me include the ~40-line snippet.
// I'm not in the mood to massacre the code until I can get it past Cloudflare, or in the mood to ask theymos to disable whatever WAF rule(s) I'm triggering. Sorry.

Looking at the above code, there's not much opportunity for the BPIP extension to get things wrong, so, I'd probably put my money on some other extension or userscript you've installed that's doing something weird...

Your screenshot below looks odd to me (though maybe it doesn't to others; like I said, I only ever see Bitcointalk in its basic form, without anything additional on top):

All I did is copy-pasted link from nvK profile trust page via BPIP extension.
Here I will do it again:



What is that hyphen-in-a-box thing next to the reference link?

EDIT:
Sorry guys, I did some testing and I identified the culprit, it was Ignore threads user script from NLNico.
Ha! I was about to PM you with the same discovery.

BTW, if you'd like to keep using NLNico's script, then you can try replacing the following @include line (near the top of the file):

Code:
// @include       https://bitcointalk.org/*

With these three lines:

Code:
// @match         https://bitcointalk.org/index.php?board=*
// @match         https://bitcointalk.org/index.php?action=unread*
// @match         https://bitcointalk.org/index.php?action=watchlist

If the above change doesn't work, then the other way to go (though less preferable) would be to leave the original @include line alone, and instead add this line underneath it:

Code:
// @exclude-match https://bitcointalk.org/index.php?action=trust*

(I don't write userscripts, and I'm not up-to-date on syntax quirks and directive preferences between different userscript managers, so maybe the above is incorrect in some way; if neither of the above approaches works for you, then let me know and I'll look more deeply into it.)
Post
Topic
Board Meta
Merits 1 from 1 user
Re: Little things that bug you/me about the forum
by
PowerGlove
on 24/01/2025, 19:13:38 UTC
⭐ Merited by vapourminer (1)
However, it would have been great if it could be implemented as a default setting and available without having to do that all the time.
Haha, yeah. You didn't seriously think that I'd expect users to have to do this all the time, did you? Cheesy

At this "concept" stage all I'm really interested in is gathering feedback from the people in this thread that want to try it (for example, I didn't really put much thought into the key assignments; I just quickly roughed out some code to demonstrate what I was thinking about).

Edit: It works! At first, I was getting "undefined", but it worked when I removed the two round brackets "()" before the semicolon at the end. Smiley
That "undefined" is expected, so it probably did work the first time (but you didn't immediately test it, because you got spooked by the scary-looking undefined). When you tried it again (after removing the parentheses you mentioned), you would have gotten something like function in response, which, while more comforting, wouldn't have actually accomplished anything. (In technical terms, initially you entered what's known as an IIFE, that is, an immediately invoked function expression, and on your second attempt you entered just the function expression part, which, besides evaluating to itself, did nothing.)

To confirm the above, try entering this into a console:

Code:
(function () { console.log('!!!'); })();

You should get something like !!! in response (along with an undefined).

Now, try entering the following (that is, make the same bracket-removing adjustment that you made to my code):

Code:
(function () { console.log('!!!'); });

You should get something like function in response (but, notice that you didn't get back any !!!, that is, the function wasn't executed, it was just evaluated).
Post
Topic
Board Meta
Merits 21 from 5 users
Re: Little things that bug you/me about the forum
by
PowerGlove
on 24/01/2025, 11:50:28 UTC
⭐ Merited by fillippone (9) ,vapourminer (6) ,LoyceV (4) ,Alone055 (1) ,Wonder Work (1)
The "0" is too risky, as I constantly risk sending 30 merits to a random post from my mobile (80% of my posting here on the forum).
I know. I know. That "0" is a flippin' hazard, IMO. Smiley

I have a patch that removes the "0", and also adds mouse wheel support:

(*) I saw a post by vapourminer (here) saying that it would be nice if he could sometimes stay in mouse-mode for longer, and that needing the keyboard to send merit is kind of a bummer. I don't like the suggestion that he (and others) made about pre-populating the input with a 1 instead of a 0, because that will, I think, skew the statistics towards single-merit-sends. So, what I did was make it so that you can now use the mouse wheel (on that input) to raise or lower the amount (clamped between 1 and 50). It actually works really well, and because of the clamping, an initial wheel event in either direction (up or down) sets the value to 1 (and from that point, wheel up makes the value increase, and wheel down makes it decrease).

But, it's written in a new/different way compared to my other patches, and I'm still trying to figure out with theymos if he'll let me work in this new way.

(Concerning your specific suggestion of user-settable default values: I've got some ideas for that, but I'd first like to see the above-mentioned patch get accepted before pursuing more elaborate merit-sending tweaks.)



I don't know if this is considered a minor problem that can be easily solved, but I find the lack of this function I describe below quite inconvenient. (...)
Yup, I know what you mean. Wink

While it won't address your suggestion exactly as you've stated it, I am working on something that I think will help you with the problem you've described:

(In an upcoming patch, I'm considering making those face-containing icons clickable: The idea would be that when you click on it, it would open the topic, but with just your posts visible, so that you can easily see the things you've already said in that topic. Seems like an odd feature on its own, but, it's part of a bigger patch to allow quickly seeing only the posts within a topic by a specific author.)



Hi @PowerGlove.
Hi. Smiley

I don't know if this has been suggested before, but I will go ahead and do it. If it's a repeated request/suggestion, it should be ignored.
It's probably been suggested before, if not in this thread then in some other Meta topic. (I don't mind repeated suggestions; if I notice that something has been suggested over and over, then I just think more and more about some way to implement it.)

It's nothing major, but I think this can bring some convenience for writing posts. So, I suggest that there should be keyboard shortcuts for some of the writing patterns or styling elements, such as Bold, Italic, Underscore, etc.
I could see something like that being useful. (I write my posts in Sublime Text, so it wouldn't be very useful to me personally, but, I've noticed that I usually need to make changes to my posts after I've previewed them, and when doing that I tend to use the forum's BBCode editor.)

For example, if I'm writing a post, and I have a line or maybe a word that I want to have in bold letters, I would select it, and press CTRL+B and it should add an opening and closing tag for the bold element on both sides of the text selected. The same can be done for other styling elements as well. We can also do it for the alignment elements as well.
Hmm... I don't think I like the idea of overriding the browser's built-in keyboard shortcuts (for example, in Firefox, Ctrl+B normally toggles the bookmarks sidebar).

But, your suggestion does give me an idea: If you think about it, you could make single-key shortcuts work if they were only "in effect" while something was selected. That is, normally b just means "b", but you could make it mean something else in the context of a selection. As in, you would select some text and then just hit b to make it bold (and if the selection were preserved, you could then even hit it a second time to make it unbold).

It's tough to explain what I mean, so lemme do my warm-up stretches real quick (who farted?), crack my knuckles (not really), and then try to write some example code...

2 cappuccinos later:

Code:
(function () {

    const allShortcuts = [

        { key: 'b', open: '[b]', close: '[/b]' },

        { key: 'i', open: '[i]', close: '[/i]' },

        { key: 'u', open: '[u]', close: '[/u]' },

        { key: 's', open: '[s]', close: '[/s]' },

        { key: 't', open: '[tt]', close: '[/tt]' },

        { key: 'q', open: '[quote]', close: '[/quote]' },

        { key: 'c', open: '['+'code]', close: '[/'+'code]' },

        { key: 'g', open: '[color=gray]', close: '[/color]' },

        { key: 'y', open: '[glow=yellow,2]', close: '[/glow]' },

        { key: '[', open: '[left]', close: '[/left]' },

        { key: ']', open: '[right]', close: '[/right]' },

        { key: '\\', open: '[center]', close: '[/center]' },
    ];

    const allEditors = document.querySelectorAll('textarea.editor');

    for (const editor of allEditors) {

        editor.onkeydown = (keyEvent) => {

            const normalKeyPress = !keyEvent.altKey && !keyEvent.ctrlKey && !keyEvent.metaKey;

            if (editor.selectionEnd > editor.selectionStart && normalKeyPress) {

                for (const shortcut of allShortcuts) {

                    if (keyEvent.key.toLowerCase() == shortcut.key) {

                        keyEvent.preventDefault();

                        while (/\s/.test(editor.value[editor.selectionStart]) && editor.selectionEnd > editor.selectionStart) {

                            editor.selectionStart += 1;
                        }

                        while (/\s/.test(editor.value[editor.selectionEnd - 1]) && editor.selectionEnd > editor.selectionStart) {

                            editor.selectionEnd -= 1;
                        }

                        if (editor.selectionEnd > editor.selectionStart) {

                            const selectedText = editor.value.substring(editor.selectionStart, editor.selectionEnd);

                            if (selectedText.startsWith(shortcut.open) && selectedText.endsWith(shortcut.close)) {

                                editor.setRangeText(selectedText.substring(shortcut.open.length, selectedText.length - shortcut.close.length));

                            } else {

                                editor.setRangeText(shortcut.open + selectedText + shortcut.close);
                            }
                        }
                    }
                }
            }
        };
    }
})();

You can try this by going to any Bitcointalk page that contains a BBCode editor, and then opening up the developer tools in your browser (Ctrl+Shift+I for me) and pasting the above code into the "Console" and then hitting Enter (probably it'll bug you to type in a confirmation phrase like "allow pasting" before permitting you to do so). That should then give you (temporarily; just for that tab) the following selection-shortcuts: b for bold, i for italicize, u for underline, s for strikethough, t for teletype, q for quote, c for code, g for gray (lowlight; Loyce knows what I mean), and y for yellow (highlight). Also [, ], and \ for left-align, right-align, and center-align, respectively.

I've got to say, it feels quite natural to me. With a mouse it feels natural for me to just double-click on a word and then hit b to make it bold, for example. And for people like Loyce who say that they prefer not to involve the mouse too much while writing posts, it's still quite pleasant to make selections with the keyboard (either character-by-character with Shift+Right/Shift+Left, or chunk-by-chunk with Ctrl+Shift+Right/Ctrl+Shift+Left, or by selecting stretches with Shift+End/Shift+Home). Also, even though it wasn't what I set out to do, I suspect that this might all work out pretty nicely on mobile, too.



Actually, a script for BBcode would be nice, as I don't have 100% use of my left hand.
Let me know how you find the single-key-shortcuts idea from above.