User talk:Thundergnat
nice job on the Perl6 language name in 3D
Hi. Nice job on the Perl6 version of Write language name in 3D ASCII ! :-) --Grondilu 19:36, 14 November 2012 (UTC)
Hi Thundergnat.
Regarding the Perl 6 solution of the checking Machin Style formulas. The problem is that the Perl 6 solution uses floating point numbers. The task requires one to use exact computations.
For example:
is tan(atan(1/2)+atan(1/3)), 1;
Here atan(1/2) and atan(1/3) produces floating point values.
--Soegaard (talk) 15:31, 1 June 2013 (UTC)
Spam redirect
(Posted this on Paddy's page a while back but he doesn't seem to be around atm, maybe you'd like to have a look at it.)
Just found the following redirect. It seems to refer to a software company. http://rosettacode.org/mw/index.php?title=CalmoSoft_Fifteen_Puzzle_Game&redirect=no Fwend (talk) 19:00, 26 February 2016 (UTC)
- Not spam exactly. More confusion on the part of a new user. As far I as I can determine, CalmoSoft is a person, not a company. That was Calmosofts first contribution to the site, (the first of many) and an overly specific page description was entered. While it wasn't well planned, I don't think it was malicious. That being said, you are probably right, that page probably should be removed at this point. --Thundergnat (talk) 20:50, 19 March 2016 (UTC)
massive changes to Heronian triangles
Many many thanks for reverting the massive (and damaging) changes to the Rosetta Code task: Heronian triangles.
I didn't want to start an editing war on the task's preamble, but I couldn't let the damaging and negatory changes to the two REXX language's entries, as well as their prologues and epilogues.
As an aside, it was nice to get the Ring programming entry back from the graveyard after being eighty-sixed.
I did, however, sent a rather lengthy thingy to Paddy (user Paddy3118, the original author of the task); you should be able to read Paddy's discussion page for what I did, and I tried to explain some of my reasons for my complaint.
The revert you did of the massive changes didn't revert my latest trivial changes. I guess Rosetta Code's (or Wiki's) reversion process works better than we hoped.
From now on, I'm going to have to keep a copy of my (REXX'es) prologues and/or epilogues. I always keep a backup copy of each of the REXX programs, but I don't bother with the extraneous text(s). I had never thought that people would be butchering my comments of my REXX programs, ... but there ya have it.
Again, many thanks for your actions. -- Gerard Schildberger (talk) 23:42, 8 July 2016 (UTC)
- I really doubt that the change was malicious, and certainly not targeted at the REXX entry. It looked to me like he (I assume he) was looking at an earlier version of the page, made some edits to it and saved it without realizing the implications. It wasn't only the REXX and Ring entries affected; The ALGOL 68, ALGOL W, AutoHotkey, CoffeeScript, EchoLisp, Elixir, Fortran, FreeBASIC, Go, JavaScript ES5, Julia, Kotlin, Lua, Pascal, Phix, R, REXX 2nd version, Ring, Scala, Sidef and Tcl entries were deleted completely and several other implementation had edits rolled back.
- I hope you don't think that I implied it was malicious, just damaging (which required a bit of work to re-instate essential "by hand" and viewing the before and after screens, which are a royal pain in the ole neckhole for cut 'n paste). --- I didn't dare to revert such a massive change (having used up my silver bullets long ago). I had no idea that so many others programming entries were deleted completely. -- Gerard Schildberger (talk) 05:01, 9 July 2016 (UTC)
- For what it is worth, if you notice such a large scale destructive edit in the future, don't try to fix it piecemeal, bring it to my or one of the other admins attention and we can roll back / undo the edit with one click. However, we can only easily roll back the last edit without higher permissions, so once further edits have been made to the page it becomes much more tedious. I generally try to check the recent changes page at least 4-5 times a day to catch spam and unintended edits before they get out of hand. I can't be here all the time though. Cheers --Thundergnat (talk) 00:28, 9 July 2016 (UTC)
- Will do. I didn't try to fix the massive changes, I only tried to fix the (two REXX) entries that I authored; that way, if it didn't get rolled back, at least I corrected what I could. -- Gerard Schildberger (talk) 05:01, 9 July 2016 (UTC)
- After a cursory investigation, it looks like it had been reverted to the 17:52 13 March 2015 version of the page, which tellingly is exactly the same size.--Thundergnat (talk) 00:53, 9 July 2016 (UTC)
For what it's worth department:
Perusing around some odd and dusty corners of the ole Google-net, ... er, I mean internet, I came across several negative comments about the various tasks (and formats) concerning the Rosetta Code website; some of the negatory statements were complaining about the loosey-goosey task definitions (and the various flavors on how the tasks/problems are presented --- that is, not having a more strict format, or even not having a common format), and also that the task requirements are "all over the place" and most requirements aren't rigorous enough, and/or some such words to that effect, and other minor complaints. That's why I argue about people using number instead of integer and the like. I don't believe I've ever won any of those changes (some task author defend their original wording as if their first born's life depended on it).
To that end, I've been making minor changes (I assume you or others may have noticed) to
some (well, OK, OK, a not small number of) Rosetta Code task's preambles, mostly in the
manner of:
- trying to have each task contain a ;Task: section header --- this is more dangerous than ya think
- changing ;C.f.: to ;Related tasks: whenever noticed
- changing See also to ;See also: section headers
- using a larger font for most mathematical formulae, especially when:
- Greek symbols are used
- sub- and/or superscripts are used
- when other hard-to-read glyphs are used
- removing pronouns from the preamble: ... Your task is to ...
- removing superfluous wording: ... The purpose of this task is to ...
- more use of highlighted numbers and variable names instead of: ... where "x" is equal to b or c and ...
- more use of bullet points (either plain or numbered) instead of long comma-separated continuous lists
- separating all the multiple [[xxx]] and {{yyy}} thingys into distinct lines
- adding whitespace for visual fidelity
- adding whitespace where it makes the reading of the text easier, and adds fluidity to your perusing
- adding whitespace before the first text, this ensures that the (above) stuff won't be abutted with the task preamble
- adding whitespace before the TOC (table-of-contents)
... Regarding this last bullet, this has become a concern (in my mind) ever since the last major
Wiki's upgrade. Previously, the TOC (on my screen, using FireFox, FireFox Aurora, and/or Microsoft's
Internet Explorer), the list in the TOC was always a very light blue. Now the TOC list is white,
with nothing distinguishing it from the regular (the background, so to speak) Rosetta Code task
preamble.
It was this "sameness" that prompted me to add more whitespace before most TOC's to make it easier to find
the TOC when scrolling. The best of all worlds would be to have the "old" very light blue color
reinstated somehow. I have no idea where to change the TOC list color, but I'm sure it's possible.
By the way, that very light blue is the same color as
the "box" for the <lang xxx> thingy.
I would like to add much more thingys (er, I mean Related tasks) for a lot of Rosetta Code tasks, but that's 'nother kettle of fish. (I used to do this kind of documentation for a living for quite a few years --- and most programmers get quite territorial about "their" wording (documentation) and don't take lightly to improvements and/or changes --- no-siree bob). Some tasks already have a template, but I don't think I have the proper authority or permission to update those templates, and even add one, for that matter. Primes are one such "category". There are many others. It helps curious people to find other birds-of-a-feather, especially if they don't know the wording to use to perform searches for (maybe) obscure (or hard to define) algorithms or procedures.
There has been some kickback here and there (reverts, but mostly deletions), and when it happens, I don't push it further, as I've said, I've used up my silver bullets earlier. I also like to add appropriate JPEGs to a task's preamble, but several have been deleted by one person, even though those images on the right-side of the preamble don't use up real estate on the preamble part of the Rosetta Code task. Ya can lead a horse to water, but ya can't push a rope. One guy (same as above) is reverting more than a few of my preamble changes, so if it gets worse, I'll probably just fade away from further changes. No sense in wasting time if I try to make improvements to some task's preambles if it ruffles his feathers (or steps on his toes). Sometimes it feels like pushing a chain uphill. -- Gerard Schildberger (talk) 05:01, 9 July 2016 (UTC)
Heronian triangles
Thank you for finding and correcting my edit on Heronian triangles! I have no idea what happened, but I certainly didn't mean to delete half the page. (I only happened across it just now.)
CRGreathouse (talk) 15:05, 26 August 2016 (UTC)
- No long term harm done. It wasn't too difficult to recover. Cheers. --Thundergnat (talk) 19:00, 26 August 2016 (UTC)
Uploading photos
Is there a trick to uploading photos? The photo shows in the preview and all seems okay until I try to upload and get the following warning:
Upload warning Could not read or write file "mwstore://local-backend/local-public/a/a7/Futurebasic_logo.jpg" due to insufficient permissions or missing directories/containers. Could not store file "/tmp/phpwWtwYV" at "mwstore://local-backend/local-public/a/a7/Futurebasic_logo.jpg". Could not delete lock file for "mwstore://local-backend/local-public/archive/a/a7". Could not delete lock file for "mwstore://local-backend/local-public/a/a7". Could not delete lock file for "mwstore://local-backend/local-public/archive/a/a7/20160829132005!Futurebasic_logo.jpg".
Still finding my way around here, and am not even sure this is the correct way to ask for assistance, so please bear with me.
--KenS (talk) 01:25, 29 August 2016 (UTC)
- It appears that image uploads have been blocked since late May ~ early June 2016, not just for you, for everyone. I really don't have much more information about it than that. I believe the block to be intentional, I seem to remember Short Circuit saying something about problems with malicious image uploads (though I can't find where that might have been) and I haven't heard any time-frame of when they may be re-enabled.
- Really, despite being an "admin", I have little more little more control over or knowledge of the inner workings of the site than you. A more appropriate title for me might be "janitor". ;-) I have the power to remove messes, but that's about it. Sorry. --Thundergnat (talk) 15:21, 29 August 2016 (UTC)
using of intermediate variables
Concerning the Rosetta Code task Sorting three variables, in the last comment of the section header for Perl 6, you noted:
Note that this example is awkward and verbose to comply with the task requirement to use a bunch of intermediate variables.
Where did you see a task requirement to use a bunch of intermediate variables?
The (one) algorithm shown in the task s preamble notes that it could be used and wasn't suggesting that it should be used.
If your assertion is correct, do you have a remedy (or improvement) for better wording in the task's requirements?
-- Gerard Schildberger (talk) 19:59, 30 April 2017 (UTC)
- Quote:|Sort (the values of) three variables (X, Y, and Z)| Seems to me that says use three variables. For something like this, in Perl 6 normally I'd just assign three values to an anonymous array and sort that, E.G.
say [9 7.7444e4 -12].sort
. The task could just say "sort three numeric values by magnitude and three string values in some lexical order" without really delving into how the values are stored or accessed. Once it specifies variables and especially numbers of variables, it is adding constraints that in this case have little to do with the main task.--Thundergnat (talk) 20:55, 30 April 2017 (UTC)
- Yes, your first statement (above) is dead on, use three variables X, Y, and Z. I intentional didn't specify (just) three values. However, those aren't intermediate variables, they are the primary variables (that contain the original defined values). The original question is where did you see the mention of intermediate variables in the task's requirements?
- As an aside, I don't recall seeing the phrase sort numeric values by magnitude in any other Rosetta Code sorting task, I assumed that that's what sorting does (when sorting numbers).
- As for delving into how the values are stored, some computer language store numbers in different formats/methods, depending on what format (or kind of) the number is, so I tried to make allowances for those languages in the wording of the task. I was trying to be generic (and inclusive) as possible.
- In addressing the main task itself, the specific mention of sorting three variables is crucial to the task; it is an old and well-known programming topic of discussion elsewhere. Knowing that some programming languages don't care what is stored in a variable, and other language have very particular syntactic rules (casting or typing?) about their construct (that is, how the data is stored --- floating point vs. integer for instance), I tried not to exclude some (well, probably most) programming languages via the task's wording. -- Gerard Schildberger (talk) 21:35, 30 April 2017 (UTC)
moving of REXX routines
Are you checking to see if all the pages that refer to those REXX routines (links) are still working? -- Gerard Schildberger (talk) 00:00, 7 September 2017 (UTC)
- Nope. I am not changing the location just the classification. If you go to the REXX page and look under subcategories you'll see the link for Category:REXX_library_routines. Now they are all identified as to what they are so they are not as likely to be deleted as 'orphaned' or 'unused' and have a centralized link index for easy access, but are still at the same address so previous links still work the same. --Thundergnat (talk) 00:12, 7 September 2017 (UTC)
- Thanks for all your time and work. I checked a few of the Rosetta Code pages that used the links, and they all work. I'm not sure which one of my REXX entries that previously failed, but I will try to hunt that one down and check it out. Also, I think the wording you added was very succinct and perfectly stated (about why the REXX routines where stored this way and such). -- Gerard Schildberger (talk) 00:19, 7 September 2017 (UTC)
- Followup. I found that rogue page that previously has a failing link to $T.REX.
http://rosettacode.org/wiki/Number_names/REXX
- It now works as advertized. Thanks again for whatever ya did to make the link work again. -- Gerard Schildberger (talk) 00:26, 7 September 2017 (UTC)
Today, around 1630 my time, all of my viewing of every (or any) Rosetta Code tasks (of any flavor) no longer honors my JS (Java script) for all skins (I was, of course, logged in):
Username (Gerard Schildberger) Preferences Appearance Skin Chameleon (or Vector, both aren't working) Shared CSS/JavaScript for all skins Custom JavaScript
that I had previously entered (it allowed me to toggle the highlighting [ON or OFF, with the default of OFF]. I tweaked the JavaScript (that was created by some JavaScript expert and posted here [somewhere] on Rosetta Code a few years back) such that a long (solid) bar is pre-pended to the toggle so that is makes a handy-dandy eyeball fence, allowing more visual fidelity and creates a good eye-catcher.
The failing (of the JavaScript) came out of the blue, I hadn't changed anything in my "Preferences" for quite some time.
When I went to re-save it (thinking that may do the trick), I got the message (in red):
To protect the wiki against automated page creation, we kindly ask you to solve the following CAPTCHA:
BUT ... no CAPTCHA appeared, and I was then in some manner of limbo --- no way to save it (successfully). If I tried to save it again, I just got the same (red) message, but CAPTCHA (usually it used to be something of the sort like "I am not a robot"). I could (and did) leave the page un-saved by closing the window (and at another time, just navigated to another Rosetta Code page). I have re-booted in an attempt to flush all the buffers and what-not, but the same thing happens.
Is something happening to Rosetta Code, and will time fix this problem on its own?
Next question, are you a/the person to ask, or should I ask someone else? -- Gerard Schildberger (talk) 22:15, 12 September 2017 (UTC)
- For what it is worth, it seemed like there was a problem with javascript on the site for me earlier too. I took the view of "Meh, I can live without javascript for right now, see if it's still a problem later." And at this point it seems to be working again for me. As to what went wrong, why, and what may have changed to fix it; your guess is as good (possibly better) than mine. --Thundergnat (talk) 01:09, 13 September 2017 (UTC)
- Well, the JavaScript "toggle highlighting" thingy is again working. As you said (or inferred), it's working now, so I guess we'll never know what the hiccup was. That CAPTCHA thing was also weird. But, all's well that ends well. I certainly thought that there was something seriously amiss in Rosetta Code land. -- Gerard Schildberger (talk) 02:56, 13 September 2017 (UTC)
In case you can't see it or have trouble getting to it, here is the code: <lang> (function(){
function get_code_pres() {
var pres = document.getElementsByTagName('pre'); var codes = []; for(var i=0;i<pres.length;i++)
if(pres[i].className.match(/\bhighlighted_source\b/)) codes.push(pres[i]);
return codes; }
function toggle_highlight(pre) {
if(pre._alt_html == null) { pre._alt_html = pre.innerHTML; var spans = pre.getElementsByTagName('span'); for(var i=0;i<spans.length;i++) spans[i].className = ; }
else {var z=pre.innerHTML;
pre.innerHTML=pre._alt_html; pre._alt_html=z;
}
}
function show_toggle() { // the bar below has 61 'db'x characters. var xdb = '███████████████████████████████████████████████████████████████████████'; var bar = xdb.concat(' «toggle highlighting»');
var codes = get_code_pres(); for(var i=0;i<codes.length;i++) { var a=document.createElement('a'); a.textContent = bar;
a.style.cursor = 'pointer'; (function(e) {a.addEventListener('click', function() { toggle_highlight(e); }, false);
e.parentNode.insertBefore(a, e); } ) (codes[i]);
toggle_highlight(codes[i]);
} }
show_toggle();
} ) ();</lang> I tried to align (with indentations) what I could understand so I could follow the logic better. I also re-named some function names.
For what it's worth, the solid bar shows up as blue on Rosetta Code task/draft pages. -- Gerard Schildberger (talk) 22:15, 12 September 2017 (UTC)
erasing an erroneously created Rosetta Code task
The deletion of the just recently "deletion" of an erroneously created Rosetta Code task did not, in fact, delete it.
The erroneous (or bad URL link to it in the Rosetta Code task Eertree) now shows up as a "good" (valid) URL (link), and nobody will now see the error that I originally saw in the Eertree task.
It needs to be completely (if that is what I mean) deleted, ... that is, with no stub left behind. Either that, or somebody should fix the original error (a bad URL in the 2nd sentence of the Eertree Rosetta Code task's preamble.
-- Gerard Schildberger (talk) 23:02, 13 October 2017 (UTC)
- I... uh... can't parse that first sentence at all.
- When I clicked on that bad URL, it still got me to the deleted page. It no longer does.   -- Gerard Schildberger (talk) 03:35, 14 October 2017 (UTC)
"or somebody should fix the original error"
- Don't forget, you're somebody too! Those were probably intended to be wikipedia links. I'll seize the initiative and make them so. --Thundergnat (talk) 23:27, 13 October 2017 (UTC)
- When I clicked on that bad URL, it still got me to the deleted page. It no longer does. -- Gerard Schildberger (talk) 03:35, 14 October 2017 (UTC)
- As to the phrase, I'm somebody too, ... yes, I am, but I didn't know that it was meant to refer to a Wikipedia page, not a Rosetta Code page (as it was for the other link in the same sentence). If I knew where the error was, I would've fixed it myself. But, at least I raised attention to the error rather than just ignoring it, and the problem (bad URL) got fixed. (albeit that inadvertently created a new task instead of a new discussion entry). -- Gerard Schildberger (talk) 03:35, 14 October 2017 (UTC)
entering language stubs
I noticed that you are adding computer programming language stubs for various languages. Perhaps you've noticed, there's been some new additions for the language(s):
N/t/roff .ROFF
It looks like an attempt to use/specifiy three versions of nroff, TROFF, and ROFF (or roff). I'm not quite sure of the various capitalizations.
There've been quite a few entries, but so far, there is no programming language stub. I don't know what the official names of those (three?) languages (dialects?) are, but it would be a good thing to agree how to have a name for these (three?) computer programming languages, or agree to have a generic/common name for the three. -- Gerard Schildberger (talk) 12:32, 4 December 2017 (UTC)
Rosetta Code spelling of the Déjà Vu programming language
Also, you may want to read the discussion (last entry on my user page) concerning the universal misspelling of the Déjà Vu programming language on Rosetta Code. All of the misspellings (over 100 total) have the language as: Déjá Vu. Is this issue worthy of being addressed and/or corrected? -- Gerard Schildberger (talk) 12:32, 4 December 2017 (UTC)
About some page deletion on march 8th
Hi,
This one seems to have escaped the deletion: Widr. Should be in userland I guess. Eoraptor (talk) 21:38, 10 March 2018 (UTC)
- Ah. Right. On it. Thanks. --Thundergnat (talk) 22:17, 10 March 2018 (UTC)
Problem with GPL code inserted in RC and translated in other languages
Hi,
In case you have any idea of what to do with this mess: Talk:P-value correction#License problem.
The problem comes from this: the task creator inserted R source code from the official distribution, which as can be checked in the actual file (R-3.4.3/src/library/stats/R/p.adjust.R in the tarball), has GPL license. Most other language in this task are translation of this R code, or translations of translations. Thus, they are ALL covered by GPL. It's a bit annoying since the GFDL and GPL are incompatible, and RC contributors are supposed to distribute code under GFDL.
Eoraptor (talk) 11:23, 14 March 2018 (UTC)
- Ugh. What a can of worms. At this point, the changes you made (notices of GPL licensed code) is probably our best option other than removing the task. Sorry I don't have a more concrete answer; I'm basically just a janitor.--Thundergnat (talk) 22:10, 15 March 2018 (UTC)
Perl 6 code review
I think it's great that you're doing a thorough review of the Perl 6 code. Anyone looking at Perl 6 for the first time is bound find broken code discouraging/annoying, so best-foot-forward is important. In particular, I think making it easy to copy/paste whole examples with runnable code is valuable, to encourage experimentation. This is why I first came to Rosetta Code (but upon discovering bit-rot, I decided that debugging code would be a good way to learn). Ultimately, I stumbled into a project that complements what you're doing. Off and on since late 2015 I've been building up a local copy of Perl 6 tasks from Rosetta Code, instrumented for regression testing (which I run daily for MoarVM, for JVM occasionally). Tracking all revisions to the Perl 6 code as well. The pace of your recent edits is not doing my RSI any favors, but I'm trying to keep up...
The manglement I end up doing makes the code unsuitable for displaying directly on RC (though I do update the site with any functional revisions). It's not "done", but it's pretty far along. Real Soon Now I'm going to push it all onto github, come up with some sort of decent front-end for the summary. For now, here's the current status of my test suite, in its full ASCII glory: task status
- Hi SqrtNegInf, Thanks for YOUR efforts too. Sorry about the gigantic dump of minor changes over the past week. I've been working on implementing a Perl 6 Rosetta Code/Run examples implementation and have been battling it for a week or so. I've gotten to the point where it will download every/any implemented task, pull out the code inside <lang perl6></lang> sections and run it. The code runner has a configurable 'skip' function to skip trying to run blocks I know are going to fail: code fragments, code trying to do things not allowed, whatever. After this past week, I have made a full pass through the implemented tasks. I've unified the <lang *> markup to the official version (<lang perl6>), combined blocks to make runnable code wherever possible and included referenced code to make runnable code blocks. As I've found broken tasks, I've either fixed them, or at least marked them as broken until I have a little more time / energy. It still doesn't check for correctness, but it's a start.
- I still want to implement a "resource" folder to supply needed resources for various tasks. "unixdict.txt" for Anagrams, Deranged/Anagrams/Textonyms/etc., the various text files for the Text Processing tasks, whatever needs a resource file. At some point, I want to look into automatically detecting and installing needed modules, and capture output and compare it to output in the {{out}} blocks to see if they are returning the expected output.
- It still isn't ready for prime time but if you want to take a peek at it, I could put a copy up on github or somewhere.--Thundergnat (talk) 22:29, 10 April 2018 (UTC)
- Very interesting (and ambitious!). Yes, if not a lot of trouble, I am curious to see your code, particularly the source filtering. Anything that would enable more efficient processing of tasks would be welcome (especially if I extend my scope to include Perl 5). Likewise, I will make my setup public; might be helpful to you when you get to the "correctness" phase of your project. --SqrtNegInf (talk) 17:56, 12 April 2018 (UTC)
Keep in mind that this is still early stages. RC-run.tar.bz2 Extract this somewhere where you can run perl6. This has the script, a folder "./rc" and a folder inside that, "./rc/resources". Run it from the directory the script is located in. Each task will have a directory made under ./rc and the perl6 entry and code blocks will be put in that directory. If files are required, they will automatically be loaded from the .rc/resources directory (if available), then each code block will be run depending on the options in the resources hash. Note that there is still quite a bit of configuration to do in the resource hash yet. I probably only have 40-50% of the options I eventually want implemented.--Thundergnat (talk) 22:21, 12 April 2018 (UTC)
- The task example is up and the files are now available in their own repository: rc-run --Thundergnat (talk) 23:23, 15 April 2018 (UTC)
- Was just having a look at it, and so far everything works fine for me (this is on Mac OS X). Among other benefits: I can use this to verify my own RC updates; recently I've seen tasks where you've had to fix editing mistakes I've made... --SqrtNegInf (talk) 23:46, 15 April 2018 (UTC)
vanity badges
Kudos on your recent removal of some of the vanity badges. There are only a few (that I know of) contributors that include vanity badges, and as you probably know, vanity badges makes updating and/or changing of those tasks problematic, because when an program entry/solution is "signed" (or somehow otherwise implied it is the work of a sole author), it makes it much harder to make updates and/or improvements to a "signed" programming solution/entry without (in some way) invalidating the signature/ownership/authorship. But, I suppose I'm preaching to the choir. It would be nice if Michael Mol (or some other deity) could make a much stronger statement regarding vanity badges (possibly as a policy statement) that vanity badges are very strongly discouraged (or forbidden) from being used on Rosetta Code. Eliminating vanity badges makes for a better (and much friendlier) Rosetta Code; and it it helps to remove the ego (and also possibly ownership) from the computer program language entries/solutions. -- Gerard Schildberger (talk) 02:48, 29 July 2018 (UTC)
OUTPUT not being included
Recently, there has been (from only one contributor as far as I can tell for Scala entries) the use of such things like:
Best seen running in your browser either by ScalaFiddle (ES aka JavaScript, non JVM) or Scastie (remote JVM).
In addition, the above output section was before the computer programming entry, and not in the usual place (but that isn't my concern here). First of all, I don't know nuttin' about running my browser by ScalaFiddle or whatever. In another case, there was some kind of link, but it didn't work and I couldn't verify that the computer programming entry produced the correct results. (It is possible that the problem is only on my badly outdated and un-updateable browser). In other cases, when pointed to another site/web-page (not Rosetta Code), the output isn't shown or otherwise not visible for whatever reason. At first, it seemed to be only used (for Scala entries) on some of the Rosetta Code tasks that I had entered/created), but that usage has expanded to other Rosetta Code tasks as of late. I was going to flag those entries using the {{output?}} template, and this inclusion (or something resembling it) was on Rosetta Code tasks that explicitly required the output to be here on this page task requirement. But, that would've most likely have started an edit (or some other kind) war with (user) Cloudius, and my back was already stuck full of arrows as it was from other ... er, ... (non-productive and/or retaliatory edits) discussions/disagreements/un-doings concerning this particular user. Do you have any thoughts about using that substitution of Best seen running in your browser either with ScaleFiddle ... instead of actually just showing a few lines of output? -- Gerard Schildberger (talk) 03:39, 29 July 2018 (UTC)
- I've noticed it and have similar reservations about that being the only "output" when a task specifically requires output to be shown. That isn't output. I don't really want to discourage the "Run it in your browser" option though. I personally am disinclined to run unseen code willy-nilly and and very hesitant to blindly click through, but it makes demonstration of code that you might not have a compiler for very simple. Really, I've been picking my battles lately. July/August is typically the busiest time of my year and I just haven't the energy to spare. Besides, I do this as a hobby, for entertainment, and getting into endless edit wars is not my idea of fun. --Thundergnat (talk) 13:40, 29 July 2018 (UTC)
- I also am very hesitant (if not just out-right refuse) to run unseen code for the same reason(s) as yours, but how are we Rosetta Code readers (or more specifically, the task author) supposed to know if the program is correct without verifying the output, and of course, I'm assuming whoever wants to verify the correctness of the computer program? Including a few lines of output would obviously (at a quick glance) show that the results of the computer program are correct, and in come cases, also show how/why the output is formatted, and it may also show other informational messages and/or data. I prefer the demonstration of code to just simply be ... well, the output. I have no strong feelings about also show/including a link to run/execute the (or an unseen) program, but I don't see how the benefit outweighs the possibility of dangers of "willy-nilly" (hidden/unseen/invisible) code. Apparently, so far, no malicious or dangerous code has been linked to. As for picking ones battles, I absolutely understand that choice. If it were my choice, I would be proactive before some malicious or even harmful (hidden) code gets executed. That decision is, as the ole saying goes, above my pay grade. Time and energy are finite resources for all of us, and especially more-so for extremely busy working
stiffsprofessionals. As for for our reasons for being on Rosetta Code, I started out entering programming examples more or less as a hobby, but it later grew into more than that, as it represented a way to showcase (and/or improve) some computer programming languages and pass on knowledge. -- Gerard Schildberger (talk) 00:32, 30 July 2018 (UTC)
- I also am very hesitant (if not just out-right refuse) to run unseen code for the same reason(s) as yours, but how are we Rosetta Code readers (or more specifically, the task author) supposed to know if the program is correct without verifying the output, and of course, I'm assuming whoever wants to verify the correctness of the computer program? Including a few lines of output would obviously (at a quick glance) show that the results of the computer program are correct, and in come cases, also show how/why the output is formatted, and it may also show other informational messages and/or data. I prefer the demonstration of code to just simply be ... well, the output. I have no strong feelings about also show/including a link to run/execute the (or an unseen) program, but I don't see how the benefit outweighs the possibility of dangers of "willy-nilly" (hidden/unseen/invisible) code. Apparently, so far, no malicious or dangerous code has been linked to. As for picking ones battles, I absolutely understand that choice. If it were my choice, I would be proactive before some malicious or even harmful (hidden) code gets executed. That decision is, as the ole saying goes, above my pay grade. Time and energy are finite resources for all of us, and especially more-so for extremely busy working
Overlapping edits
No worries, surprised it doesn't happen more often... The pass-in-the-angle business is a bit of a dodge really (angles are implied by how %c2 is constructed), but was setting up to pass in just one angle (60) to make the extra credit problem more efficient. Not that it really helped, the calculation still takes a bit over 3 hours to run for me. Work in progress here, ideas welcome:
--SqrtNegInf (talk) 16:49, 24 September 2018 (UTC)
- Put an edited version up. Still not great, finishes in ~90 seconds on my system. Putting a .hyper in the .map drives it down to around 25 seconds... but then only returns the correct answer about 1/3 of the time... 🙄 --Thundergnat (talk) 01:34, 25 September 2018 (UTC)
- Looks good, with .race now runs under a minute for me. If nothing else this exercise drove home how expensive the X operator is: it tested as 67x slower than the pair of loops.
- Well I, for one, welcome our new fiddly overlords. ;-) Because all that fiddling turned out to be very instructive, regarding code efficiency, details of .race and correct usage of atomic operations. That said, I, for one, am well and truly done with this particular task! --SqrtNegInf (talk) 11:41, 19 October 2018 (UTC)
- Cool. Thanks for going through some of the older, slower tasks and working on adding concurrency / parallelism. I've done a few, but it is interesting / useful to get another take on things and see how different people approach problems. (And working things out in ways that never occurred to me.) --Thundergnat (talk) 22:38, 19 October 2018 (UTC)
Lynch-Bell numbers
--Steenslag (talk) 22:34, 27 September 2018 (UTC) In the Lynch-Bell numbers item (Perl 6 contribution), isn't the line "next unless all $test.comb.map: $test %% *; " unnecessary ?
- Yes. By the time it gets to that line it already knows it has a solution. But it only ever executes it once so adds at most microseconds to the execution time. It is a leftover from when I was developing the code before I added the task. It hasn't bothered me enough to go back and remove it. Feel free if you want to. --Thundergnat (talk) 23:07, 27 September 2018 (UTC)
- Meh. Never mind. Now that you pointed it out, it bothered me enough that I went and edited it. Thanks. --Thundergnat (talk) 23:15, 27 September 2018 (UTC)
How about 1024?
1000? Just an artifact of base-10 counting. Meh. I'll be more impressed when the task count reaches 1024.
But seriously... Kudos, props, and garland of Martian fire-flowers to you for pushing that task count up, and doing it with very nicely written code, quantity and quality. Your comment on IRC is beyond modest. Like you took a break from watching sloth videos on Youtube, and just happened to notice the odometer roll over on P6 tasks... What's next? The remaining un-implemented tasks range from hard to odd. Tamagotchi emulator? Have fun with that! --SqrtNegInf (talk) 01:56, 12 November 2018 (UTC)
- Have you seen those sloth videos? Riveting! :-) Thanks. Don't see much point in tooting my own horn about it though, it's a community effort. --Thundergnat (talk) 22:19, 12 November 2018 (UTC)
Hi Thundergnat, Nice to meet you and thanks a lot for the warm welcome. :-D
Thanks for your advice and provided a complete sendmail solution. I will fix the half-hearted submssions. Starting with the median filter example, should I just retract it and state on the discussion page there is a WIP module on Perl 6? Thanks again.--Hkdtam (talk) 10:31, 3 December 2018 (UTC)
Anti-primes - concurrency failure?
I am getting inconsistent results for the 'Anti-primes' task when concurrency is used (without the .hyper it's fine). I'm using the very latest Rakudo. Tried tweaking the code, without success. Maybe there's an unavoidable race condition with that hyper can't work around here (or hyper is buggy)? Likewise, in the 'Proper divisors' task, when I un-commment .race, there are problems. Or am I just missing something here? --SqrtNegInf (talk) 16:03, 8 December 2018 (UTC)
- Hmm. That's odd. They both work fine for me. After running them 100 times in a row, I've had no failures. I'm not on blead though, only on 2018.11 tagged release. Is it OS specific maybe? I'm using Linux Mint 19. --Thundergnat (talk) 18:11, 8 December 2018 (UTC)
- Kind of went down the rabbit hole on this one... Stress-tested all of the RC tasks that use concurrency (mainly in an Ubuntu VM with the latest P6, but also Windows/2018.10). P6 performed pretty well (aside from sporadic crashes), always giving correct results except for 'Anti-primes'. So it doesn't appear to matter which OS or P6 version, in line with the race condition hypothesis. The best way I found to trigger is low free memory. Also, the story with 'Proper divisors' and .race: Always ended up with the right answer, but if you look at @candidates you see that it's different with each run. --SqrtNegInf (talk) 15:59, 11 January 2019 (UTC)
- I still haven't seen a failure on my system running either of those. I may need to roll up a memory limited VM to see if it fails then. With 32GB of main memory I don't run into low memory situations very often.
- I changed the hyper grep to use atomic-assign. That's the only place I can see where concurrency may be an issue. It continues to work flawlessly for me so I can't really judge if it helps or not. Maybe you could give the new code a try? If it is still a problem, I'll just remove the concurrency. It is fast enough without it. It's just nice to get the "free" speed-up. --Thundergnat (talk) 17:24, 12 January 2019 (UTC)
- Using those revisions, and here's my experience on Linux: Under normal load 'Anti-primes' usually works when run as a foreground process, sometimes fails when run in the background. Under heavy system load, sometimes fails in the foreground, and almost always fails when run in the background. Specific details of my test setup, procedures and results in this gist.
- It's probably worth submitting this as a bug, though I suspect it is going to be hard to trace. If it was using .race, well, with .race, you rolls your dice and you takes your chances... but .hyper is specced to always return items in the correct order; if it isn't, that's unspecced behaviour. --Thundergnat (talk) 14:32, 13 January 2019 (UTC)
Mayan numerals
Kudos on your Perl 6 solution for drawing the cartouches for Mayan numerals. A few people went the other way and used HTML tables (which construct grids), and don't really draw a cartouche properly. I was going to flag them as needed improvement, but I figured it was their best effort, and ya can't fault them for that. -- Gerard Schildberger (talk) 23:08, 16 January 2019 (UTC)
- Erm. Thanks? You are aware that the Perl 6 example is rendered in HTML tables? (Or was that meant to be sarcastic? It's hard to tell in text... ) Well, technically it's in wiki-table formatting, but that is rendered as HTML... At any rate, I tried to render it in a format that displays pretty much the same across many browsers. The ASCII gets horribly distorted, especially on android browsers. I do somewhat agree that the gridded table examples are less than awesome, but they do get the point across. --Thundergnat (talk) 23:34, 16 January 2019 (UTC)
- No, I wasn't aware that it was HTML. I saw the "style" but didn't realize it was an HTML "style" (I just thought it was part of Perl). In any case, it has a very "clean" look and does rendering of cartouches very nicely and no cluttering of grid lines and the like. -- Gerard Schildberger (talk) 23:42, 16 January 2019 (UTC)
- The grid lines are just the default wikitable style – easily switched off. I'll do that at some point – for the first draft I was more interested in the architecture than the lip-stick :-) Redundant high-contrast lines certainly do distract the eye – I don't know if you can fix the multiple redundant edge problem with those ascii borders ? I notice, incidentally that they explode into a kind of unintelligible chaos on hand-held browsers with small view windows – the HTML approaches (Thundergnat's is already exemplary) do at least flow and retain legibility. Hout (talk) 00:25, 17 January 2019 (UTC)
- No, I wasn't aware that it was HTML. I saw the "style" but didn't realize it was an HTML "style" (I just thought it was part of Perl). In any case, it has a very "clean" look and does rendering of cartouches very nicely and no cluttering of grid lines and the like. -- Gerard Schildberger (talk) 23:42, 16 January 2019 (UTC)
- I wish I knew about how to turn off those grid lines when I was creating those colored boxes in the task's preamble for magic squares. I unsuccessfully tried all sorts of workarounds. -- Gerard Schildberger (talk) 00:52, 17 January 2019 (UTC)
- Also of note (well, maybe not that noteworthy ...). I have noticed that the "square bullet" the 'fe'x on code page 437 (used by my Microsoft DOS windows) doesn't render correctly on the browsers that I use for Rosetta Code for various places (areas). Here (on Rosetta Code), it renders as a square block (full width) when editing (in the "edit" window). Here are three of them: ■■■. (Not as high as a full block: ███). Note that the display of the square bullets displays incorrectly in the "editing" window (as square blocks), but displays differently (as a square bullet) when rendered to the Rosetta Code page. They also render incorrectly when used within the <pre> tag where they show up as square blocks. there are probably other places where it renders differently/incorrectly). Kinda weird. That really defeats the purpose of using a preview window to, er, ... preview the text. It should be noted that I haven't used all of the web browsers available. Now-a-days, I'm restricted/limited to just two web browsers. Also, quite of few other characters are treated summarily, such as the equivalent character (≡) for one (an equal sign that has three lines). Some extended ASCII characters (not a huge list, but enough to make it a royal pain in the neckhole) are really horribly mangled (within the comments in my REXX programs when language (syntax) highlighting is enabled, and makes quite of few characters in those comments almost unreadable/unrecognizable). The three dithering characters are some more characters that are mangled, or SNAFUed). That is why I asked for a way to turn off language (syntax) highlighting and someone eventually wrote a custom JavaScript (which I modified) so that I could toggle it off and on (for any language entry that I choose). Now, me modifying JavaScript was quite the adventure into the Land of Oz (while on acid). By the way, can anybody look at someone else's custom Java scripts? I wish that kind of option would be available for everyone (without installing the custom script), just finding the right place to install it wasn't a simple chore. I wish there was a way to turn off italics for some programming languages when syntax highlighting REXX (and some other) languages (at least for their comments). Truly ugly italics. -- Gerard Schildberger (talk) 00:52, 17 January 2019 (UTC)
eban numbers
You posted (for eban numbers) the output (in part):
eban numbers up to and including one trillion: 134,456 eban numbers up to and including ten trillion: 134,456
why wouldn't four trillion, and four trillion two (and many others) be counted? -- Gerard Schildberger (talk) 23:29, 27 March 2019 (UTC)
- Well... actually those are supposed to be t-ban numbers in that section, which won't count the trillions. I screwed up and left the e-ban description in all of the sections. Thanks for the heads-up. --Thundergnat (talk) 23:39, 27 March 2019 (UTC)
Extended BrainF*** (language and/or category)
Thank you for fixing my typo for Extended BrainF***. Prior to that, I had noticed that it was not being reported in the languages file.
I tried to fix the problem with the idea that the embedded blank maybe should (or should not be) represented as an underbar (underscore). However, the problem still doesn't appear to be fixed. I believe it has to do with the underbar (either the presence or absence of one), but I don't want to muck up the problem even worse with multiple re-directs or whatever. I'm sure it's something simple, but (as my typo suggests), it's most likely something I'm overlooking (or can't see). -- Gerard Schildberger (talk) 18:35, 29 March 2019 (UTC)
I think it could be fixed by changing (once again) the re-direct page to point to the category:
#REDIRECT [[:Category:Extended_BrainF***]]
(which has an underbar). But like I said, this may or may not work, and I don't want to mess it up further. Perhaps an more knowledgeable person could address/fix this problem. -- Gerard Schildberger (talk) 18:48, 29 March 2019 (UTC)
- I didn't really look into it, I just fixed some obvious typos. Now that I have looked a little deeper, there was already a Category:Extended_BrainF*** page, it just needs to have a language block put on it. --Thundergnat (talk) 23:38, 29 March 2019 (UTC)
- And, fixed. --Thundergnat (talk) 23:41, 29 March 2019 (UTC)
- Ah, so that was the problem. Tank qew fur fixin' dat. -- Gerard Schildberger (talk) 23:51, 29 March 2019 (UTC)
Calculating Ramanujan's constant
Wouldn't you agree that Rosettacode needs yet another task based on number theory? Ramanujan draft task. Indirectly, I credit you for getting me started on this, as it was the Rat::Precise module that got me thinking... Any comments on the code appreciated; can you see any place where I'm doing more work than I need to? The main trick keeping the calculations in FatRat throughout. Is my task specification too minimal, i.e. it will leave people with questions? --SqrtNegInf (talk) 17:53, 19 April 2019 (UTC)
- I kind-of like the number theroic tasks, as long as they aren't just a copy of another task with a tiny difference. "Find and print all the primes up to 1000... but right justified!" :eye-roll: I keep on thinking maybe I should look at porting the ntheory module to Perl 6, but then I look inside, look at my schedule and quietly put it away again.
- This looks like a pretty cool task. It is interesting how much code it pulls in from other tasks, (and helped highlight some bugs in those examples.) I am amused that Ramanujan's constant was named by Martin Gardner as an April Fools prank. I tried rewriting a few of the subs to see if I could "improve" them but ended up about the same or worse. I do have a few suggestions. Added pull request to the repository. The only thing I see that may need clarification: you are asking for at least 32 digits of precision but only displaying 14. May want to either ask for less or display more. EDIT> (I would display more. See this gist for possible mods: https://gist.github.com/thundergnat/26ac75141cda5614c3da44e6a537f40e ) <END EDIT I'd say go for it. --Thundergnat (talk) 12:57, 20 April 2019 (UTC)
- All this is remarkably helpful. I knew there was an issue with '**' (in the debugger it would take minutes to step out of the function) but didn't know how to resolve. TIL, and turned out to be simplicity itself. And best of all, you found a typo that crept in (^5 vs ^d) that was crippling the precision of the π calculation–I definitely owe you a $beverage! Regarding 32/14: I guess I was phrasing it in a confusing manner, and everyone expects to be talking about number of values right of the decimal, so will go with that. And, yes, why not go with more precision. Will incorporate your suggestions, finalize, and add task soon. Regarding Gardner: Some nostalgia involved in this task, as I fell for the prank at the time. Had just starting subscribing to Sci.Am., and was but a callow youth...
- Added the draft task... Regarding ntheory: I'd be happy if
use ntheory:from<Perl5>
worked reliably, but it's hit-and-miss in my experience so far. --SqrtNegInf (talk) 04:05, 25 April 2019 (UTC)
- Added the draft task... Regarding ntheory: I'd be happy if
First perfect square in base N with N unique digits
you said " 25, # very slow" Win Calculator can't calculate these values, so i did online. My runtime is ~43 seconds
base 25 1011E109GHMMM # 0 //Start value dec: 59705969332701822 1023456789ABD5AHDHG370GC9 # 0 //Start value sqr dec:3564802773957530451841538362119684 solution: 1011E145FHGHM 102345DOECKJ6GFB8LIAM7NH9 937.105.500 -> steps 42.851 s 3.7 Ghz -> 42.851/937105500*3.7e9= 169.2 cpu cycles per one complete number test n-> n+1 => sqr(n) -> spr(n+1) -> examine digits
i think doing bigint base conversion takes much to long time.
I now have to include bigint, to find the start values.
- For sure the base conversions are a time sink. The Perl 6 version checks ~1.5 - 2 million possibles per second; it needs to check through ~937 million to find the answer in base 25. So yeah, it's pretty slow. If raw, intensive processing speed is what you are after, Perl 6 is not there yet. (It's getting better and is still in development, but...) It's great for rapid, proof of concept stuff though, and is often "good enough". --Thundergnat (talk) 11:59, 26 May 2019 (UTC)
- "If raw, intensive processing speed". See, that Chai Wah Wu on oeis.org/A260182 found solutions up to 28. I hope, i can check the solutions before christmas ;-) --Horst_h
Smarandache prime-digital sequence, et al
I tried added a few variations of {{Category:Prime numbers)) but none seem to work.
Normally, I add a phrase to the task (or draft task) name: {{draft task|Prime numbers}}
but it was already preempted with other text.
At this point, I'm not sure of which category name should be used for prime numbers, as there seems to be a mixture of 'em. -- Gerard Schildberger (talk) 19:37, 31 May 2019 (UTC)
- Yeah, I just replaced the bogus text in the task header with:
'Prime numbers''Prime Numbers' to get it to categorize as a prime number task. In the interests of disclosure, I put that bogus text there in the first place, so mea culpa; though, to be fair, I just replaced other bogus text... but still. Fixed now. --Thundergnat (talk) 19:49, 31 May 2019 (UTC)
- I just fixed a dozen or so category name for various prime number-type tasks. There seems to be a few re-directed category names, but the re-direction(s) doesn't seem to work. -- Gerard Schildberger (talk) 19:59, 31 May 2019 (UTC)
Vlang (language) assistance
The (language) Vlang could use some help defining itself as a language (category) on Rosetta Code, it's missing something. -- Gerard Schildberger (talk) 14:08, 23 June 2019 (UTC)
- I have no knowledge of Vlang so I don't know how much help I can be. I assume it is probably vlang.org but that is a complete guess on my part. I can stub out the category page but you may be better off asking User:Rustem b to fill it in since they were the one who added the only Vlang entry and presumably know something about it. --Thundergnat (talk) 14:35, 23 June 2019 (UTC)
- Thanks. It was the {{stub}} that was missing. I've also tried to contact User:Rustem b on his user talk page. -- Gerard Schildberger (talk) 15:05, 23 June 2019 (UTC)
RE: Checkpoint synchronization
Thanks for the update. Actually I have no clue on securing a tidy/ordered output :-D if the duration is too short so I used longer values as a cover up. On the other hand, I came across this better solution, is it acceptable to post only the link as a solution? Thanks.
deletion
Please email me what you deleted. -- Shyam Has Your Anomaly Mitigated (talk) 12:22, 14 July 2019 (UTC)
- Three points:
- I don't have your email address. Nor do I want it.
- I don't particularly feel inclined to help you out after you abusing the site.
- What part of "deleted" did you not understand?
- --Thundergnat (talk) 14:59, 14 July 2019 (UTC)
calculation of column widths for Stirling's numbers
Thanks for catching the error of (not) calculation of Stirling's numbers of the 3rd kind (or Lah's numbers).
I was up (not sleeping) a lot longer than I planned, and I was getting pretty punchy at the end of the day (er ··· late morning) when I added the auto-calculation of the minimum column widths for the columnar output, and I neglected to calculate for column (when K=1) where that particular calculation was short-circuited specifically by using factorials (performed elsewhere in the code). Obviously, I had overlooked the visual verification of the output. I think I'm getting a bit long in the tooth to go on these coding marathons. Any-a-ways, many thanks for spotting the error. -- Gerard Schildberger (talk) 19:52, 16 August 2019 (UTC)
- Not a problem, it was pretty obvious that it was a formatting problem, not a calculation problem as earlier code had the correct values, I just don't know enough REXX to be comfortable fixing it myself so flagged it for your attention. --Thundergnat (talk) 21:09, 16 August 2019 (UTC)
Cloudius' old tricks
Thundergnat, please see my latest comment on (userid) Cloudius' discussion page, in regards to the entry:
- == Scala entry was NOT erased. ==
-- Gerard Schildberger (talk) 21:24, 22 August 2019 (UTC)
Cloudius is now (apparently) using the userid OldManBuster and saying that he's updating Scala and instead doing massive changes to the entire file. At one point you had warned him of this type of behavior and said you'd roll-back this entire changes to a file that last time he did this. This is in reference to the Show ASCII table RC task. In addition, he has also marked a bunch of language entries incorrect in a random fashion for some languages that showed more than was required, and other languages that did the same thing weren't flagged. I would roll back his entire set of changes, but I'm not about to start an edit war with Cloudius/Siskus/OldManBuster/his-latest-userid. -- Gerard Schildberger (talk) 21:30, 2 September 2019 (UTC)
You may note that other users are nos un-doing some of the massive (global) edits by userid Cloudius/OldManBuster, in particular the somewhat arbitrary (and erroneous) flagging of some of the language entries as incorrect. -- Gerard Schildberger (talk) 23:32, 2 September 2019 (UTC)
tank qew, n-smooth numbers
Thundergnat, thanks for fixing (adding) a section header for the REXX entry. I was up way too long and I guess I'm getting too old to do an all-nighter plus a good part of the previous day and the next day to boot. I was overlooking some pretty basic stuff, a language header for a programming solution, of all things. -- Gerard Schildberger (talk) 01:50, 29 August 2019 (UTC)
- No problem. It never pays to try to do complicated stuff when you're really tired. --Thundergnat (talk) 08:22, 29 August 2019 (UTC)
- I think I was past tired. -- Gerard Schildberger (talk) 23:33, 2 September 2019 (UTC)
de Bruijn sequences
Nice job on the de Bruijn sequences. Your Pearl 6 code is tight.
I wouldn't want to say how long it took me to get my REXX logic correct.
Sorry about the changing of the specifications. I thought nobody would code up a solution that fast. In any case, it doesn't matter if one adds something to a digit, or just replaces it with another (character). I thought that adding unity to a digit would force programmers to then (only) use the right-most digit (in case of a carry), and it might slightly bloat the program with unnecessary logic, if only by just one more statement or clause). Any-a-ways, I wasn't planning on flagging any solutions if addition was used for the replacement, but the new specs are easier to understand and makes a shorter read of the task's preamble. -- Gerard Schildberger (talk) 17:12, 1 September 2019 (UTC)
- Not a real problem. I had opened the new task page just before I went out for several hours and whipped up a solution when I got back without checking for updates, so, my own fault really. --Thundergnat (talk) 21:04, 1 September 2019 (UTC)
- As Perl 6 uses zero-based indices, I think this line:
- $seq.substr-rw(4444,1) = '.';
- should be:
- $seq.substr-rw(4443,1) = '.';
- which will mean that PIN 5814 is missing rather than 5914 (agreeing now with the REXX and Go solutions).--PureFox (talk) 18:05, 1 September 2019 (UTC)
- It doesn't really matter as any solution (to the de Bruijn would be a valid sequence, but different (as mentioned in the task's preamble, the number of "solutions" is quite large). If however, you are constructing exactly the same de Bruijn sequence that is shown in the task's discussion page, then that's a horse of a different color. However, any digit in the sequence could've been used, but I didn't want someone finding a "fence post" anomaly, so I arbitrarily picked a snazzy location. But you do raise a good point, and I had forgotten that the 4,444th digit may be interpreted as something different based on how some languages regard what (or where) the 1st character is versus the zeroth character. -- Gerard Schildberger (talk) 18:20, 1 September 2019 (UTC)
- <Purefox> Argh. You are correct, It should be 4443. I'll fix that. Thanks. --Thundergnat (talk) 21:05, 1 September 2019 (UTC)
Two questions about 'Stirling_numbers_of_the_second_kind'
Regarding the one-liner routine 'Stirling2': (1) What exactly were you smoking when you came up with that? and (2) Can I have some too? --SqrtNegInf (talk) 13:14, 28 September 2019 (UTC)
- Nah. Much as I'd like to take credit for it, I cribbed it from Util from the Bell numbers task. My implementation is much more prosaic. --Thundergnat (talk) 13:39, 28 September 2019 (UTC)
Names_to_numbers flagged by RC-run
Just a heads-up: When I used your 'RC-run.p6' (up-to-date via git) to verify the recent Perl 6 update of 'Names_to_numbers' task, it flagged the code as broken, but when I ran the downloaded code directly it was fine. Not immediately clear to me what the issue is; being lazy, leaving the debugging to you... --SqrtNegInf (talk) 17:30, 26 November 2019 (UTC)
- Sorry, distracted by real life. Yeah, that task was hard coded as being broken. Fixed in latest pushed to Github. (Delete line 324) --Thundergnat (talk) 12:40, 27 November 2019 (UTC)
your definition of vandalism?
Are you seeing something that I don't (regarding the changes that I made to the Lah numbers task)?
Do you really think I intentionally did an edit that you considered vandalism? -- Gerard Schildberger (talk) 16:34, 1 December 2019 (UTC)
- Unnecessary insertion of non-breaking spaces; makes text look stilted and not flow nicely. Unnecessary enlargement of formula text. Overrides peoples setting and preferences. --Thundergnat (talk) 16:44, 1 December 2019 (UTC)
- Oh my gawd! And you call that vandalism? Almost all changes to make things easier or better to read can be called unnecessary (especially if one has some ego or other kind of investment involved in it). I'm not aware of whatever settings and/or preferences you are referring to are being overridden. Sorry for trying to improve the task's readability. I never heard that additional whitespace would harm the readability, same with enlarging a group of formulae. But choosing to name the changes as vandalism is just plain wrong, you should know better than that. I have no qualms if you differ in what one could call unnecessary or stilted (are you referring to italics?). And I'm sorry for thinking that this is a site were words aren't chosen more carefully. This is what I meant about (not) being civil. I won't try to improve your prose in the future. Also, please try to use words like other people use them (or as defined in a dictionary): vandalism is the action involving deliberate destruction of or damage to public or private property. My actions didn't deliberately destroy or cause deliberate damage, it was my intent to improve, not destruct. -- Gerard Schildberger (talk) 17:31, 1 December 2019 (UTC)
- Intent seldom has much bearing on effect – I do remember having to clear up over fifty tasks after a spate of opinionated white-space work had left many formulae completely invisible to most browsers.
- Impeccable nobility of intention didn't make the formulae any more visible to puzzled users.
- Two problems with non-essential white space engineering 1. It's real impact on readability and appeal varies with the reader (not to mention the browser) 2. There has been a track-record of significant damage from interventions of this kind, which others had to clear up.
- Perhaps just better to skip it ? Hout (talk) 23:35, 1 December 2019 (UTC)
- These things are best handled by template defaults, and by prior discussion of any changes to those defaults that might be suggested. Don't execute the prisoner before consulting the emperor. Hout (talk) 00:01, 2 December 2019 (UTC)
Salute with million thanks
That is a herculean task and I hope you will have some good rest after everything is settled. Btw would you consider blogging about the whole journey? --Hkdtam (talk) 03:59, 15 March 2020 (UTC)
- Thanks, it was a slog. I did automate most of it, but still kept some manual control to keep things from running amok if my scripts didn't anticipate some bizarre formatting. (And a few things slipped through anyway and needed to be cleaned up. Ah well.) I hadn't really thought about writing about the process, perhaps I should. --Thundergnat (talk) 11:12, 15 March 2020 (UTC)
- Kudos on the renaming project overall, but especially to code that worked right the first time, an inspiration to all programmers... And commiseration regarding RC's spell-check/auto-correct, which repeatedly insists on inventing this new 'Rake' language for me as well. Can that feature be burned with fire, boiled in bleach, have a stake drive through it's heart, or otherwise be disabled?
- A more practical issue: Am I confusing the 'next step' with my scatter-shot updates for the remaining 'Perl 6' links and mentions. Should I stick to an alphabetic range or something like that? --SqrtNegInf (talk) 00:59, 17 March 2020 (UTC)
A-HA-HA-HA! Ha ha, ha... sorry. Yeah, (glances around shiftily,) it worked right the first time. As projects that involved though, I am fairly pleased with how smoothly it went. The thing that really caught me by surprise was tasks with multiple entries for the same language, each with their own header, in different places in the page. For some reason Forth was good for that. I had to go back and hastily rewrite some of the block detection/re-alphabetize code on the fly to compensate for that.code that worked right the first time
- In retrospect I probably should have written in some logic to do the link and comment rename at the same time but was very leery of trying to take on too much at once and making a real mess of it. I don't really have a specific plan going forward for the remaining clean-up. I am actually quite grateful that you have stepped in and started chipping away at it. You are not interfering with any plan or hurting my feelings at all. --Thundergnat (talk) 10:18, 17 March 2020 (UTC)
- Well, for certain values of 'first' anyway... Will continue to grind through the tasks, goes pretty fast.
Golfing down that lazy list issue...
For GH3570 I put in minimal bit of code golfed down from the Kolakoski sequence task that didn't do anything useful; it was maybe too small. I will weigh in on the issue later today, but probably after the Europeans are asleep... If you can cook up a tight/focused example showing the DWIM-ery of this 'phrasing' of lazy-list construction, might be motivating for the Raku-language hackers? --SqrtNegInf (talk) 18:47, 26 March 2020 (UTC)
- I think I found a repeatable golf that would cause what you are seeing.
my @wat = lazy flat [2,3,4], 10,11 .. *; say @wat[^5]; # (2 3 4 10 11) Good my @wat = lazy flat [2,3,4], 10,11 ... *; say @wat[^5]; # ([2 3 4] 10 11 12 13) Bad
- Left a comment on #3570 --Thundergnat (talk) 22:24, 26 March 2020 (UTC)
- Much belated thanks for the solid analysis, and a toast to weird edge cases! --SqrtNegInf (talk) 14:55, 7 April 2020 (UTC)
- NP. Thanks for your behind-the-scenes work that found the problem before it made it into a release. --Thundergnat (talk) 21:55, 7 April 2020 (UTC)
bug in longest palindromic substrings
Can you check your entry in Longest_palindromic_substrings#Raku against an input of "abbbc". My translation of your code yielded "bb", not "bbb". The fix is pretty simple, rev needs to be attempted with both 0 (always) and optionally 1. --Pete Lomax (talk) 15:07, 2 October 2020 (UTC)
- Ah! Good catch! I'll fix that up. Changes the results from 1e6 digit of pi slightly too. Thanks! --Thundergnat (talk) 17:25, 2 October 2020 (UTC)
Primes!!!!
You're not the only person who's noticed that many of these new "tasks" are just trivial variations on the same theme. It probably would be a good idea to scale them back a bit. When I've solved them I have tried to go for a different approach each time, but even I am getting sick of this prime-digit spam. Cheers, Thebigh (talk) 08:22, 5 December 2020 (UTC)