User talk:CRGreathouse

From Rosetta Code

Knapsack problem/Unbounded answer in PARI/GP

Hi, I flagged your answer as incorrect, and I will apologise if the name of the flag "incorrect" might have caused offence, but its the name of the flag used on RC when someone thinks that the example given strays too far from the task description and unfortunately might have an impolite handle to the uninitiated.

The problem I saw with your code was that all the output printed were not of the maximal value. It printed the best values so far as it converged to the maximal. I would expect, (and you could check by looking at a few of the other examples outputs), that the only printout should be of one or more (probably one or all four), of the maximal values. It would be good to carry on the conversation on the relevant talk page here. --Paddy3118 05:25, 31 October 2010 (UTC)

Frankly -- and don't take this poorly -- but it did offend me.
The code functioned as intended and as documented. That way is sensible -- if you scale these instances up they could run for hours or days, and getting feedback in that time is useful.
Further, the "fix" is obvious -- don't output, save the appropriate line(s), then output at the end. But this wouldn't add anything to the program, adds clutter, and removes the nice scaling property I mentioned.
If you want to keep it, feel free to "fix" it. I won't, because I think the fixed version is worse.
CRGreathouse 05:29, 31 October 2010 (UTC)
Hi again, I'll take your points and give replies:
  • I explained that no offence was meant. Sorry if it spoilt your RC experience.
  • My points were about getting the code to better fit the task description, and fit in better with the other examples. In this case scale is something that is good enough to do the task given. We do welcome talk of scalability and allow multiple solutions that address any other issues that contributors might want to bring up, but the program was on its own and so I thought it should accomplish the task as output from other examples does. When there are examples in other languages, with output, then it is good to either follow their examples or be aware of and probably explain answers that may be different.
  • The fix may well be obvious but in this case I thought that it should be given. You have shown that you know how to do it, but without the fix being in place I think that you cannot make a fair comparison with other language examples that use brute force but go that bit extra to only print the right answer, rather than a lot of wrong answers followed by the right answer. Other examples use different algorithms to add scalability.
  • I'm afraid I don't write PARI/GP so will not personally be applying a fix (I converted the code to Python and executed the Python to confirm my initial opinion).
I guess we still disagree, but that's life. Thanks for your contributions to RC I do welcome them, as I do value the site and all who contribute. --Paddy3118 06:08, 31 October 2010 (UTC)
It's OK, the problem is fixed as far as I'm concerned. CRGreathouse 06:10, 31 October 2010 (UTC)
That is, the code that bothers you is gone and the template that bothers me is gone. That there is no Pari code for that problem is of no particular consequence. CRGreathouse 06:11, 31 October 2010 (UTC)

Welcome!

(I started the practice of leaving greeting notes in early 2010, so I missed leaving one when you signed up. Anyway, I hope this helps.) Welcome to Rosetta Code! I'm Mike, and I noticed you created an account.

Some quick things you should be aware of:

Template:Mylang Helps you show what languages you're familiar with, and helps us become aware of skills with languages we haven't seen.
Category:Unimplemented tasks by language A place to find tasks missing solutions in various languages.
Blogs, twitter, facebook... We have them, and are interested in yours.
Special:Webchat Logs you into #rosettacode on the Freenode IRC channel. Not usually the most active communications medium, but occasionally helpful. It's logged at http://irclog.perlgeek.de/rosettacode/today.
Rosetta Code:Village Pump A general Q/A and discussion area.
Rosetta Code:Finances For most of Rosetta Code's history, expenses have been paid out of my pocket. I can't afford that much longer, and so you can see the state of Rosetta Code's finances, and how you may help. If you enjoy or are excited about the site, please consider reading through it.

Sorry for the boilerplate; it can be a bit difficult giving an individual greeting to each person. If you post information about your technical interests and background, I'll probably read it. If you already have put that kind of information on your user page, I probably already have; I'm always interested in how people do and can benefit from Rosetta Code.--Michael Mol 12:31, 1 November 2010 (UTC)

Hailstone output

Hi, I saw your comment "output isn't needed -- if you want that, run the program. But to satisfy the pedant here's the Windows output." and read again the task details as well as the context of the other examples showing output. The idea is to fulfil the task and you would be one of the few who took the opinion that reminding one of the need to show output in this case is pedantic. Maybe careful, but not pedantic.

Most readers will not be able to run all examples, and the request to show output in some RC tasks has allowed us collectively to both spot errors in calculations, and also spot weaknesses in task descriptions. It can also show up differences in efforts to make the output pleasing to the eye (but not so much in the Hailstone task). --Paddy3118 22:33, 6 May 2011 (UTC)

It's pretty unusual that most of the entries for that task wrote their output; almost none of the answers across the site do this. I don't really see the point in having it, and standardizing Rosetta Code would suggest deleting the outputs from the other programs for that task. But hey, you have your pound of flesh, I did it the way you wanted rather than the way I want it or the way the rest of the site does it. CRGreathouse 23:43, 6 May 2011 (UTC)
Sorry, that's pretty harsh. I'm actually recovering from a pretty bad bug right now and I'm not in the best of tempers. CRGreathouse 04:06, 7 May 2011 (UTC)
I've had some bad flu's in my time ... So much so that I reckoned that I alternate between having a really bad flu one year then only a milder flu the next. Last year was my good year so I am looking at a real stinker this winter - and they usually occur in time to mess with my xmas/new year holidays too! Get well soon :-)
--Paddy3118 07:25, 7 May 2011 (UTC)

Header change

I saw a change you made to the header template recently. Why did we need that change exactly? Were there any places where you saw C# causing a problem? Also, before making edits to widely used templates (like {{task}}, {{language}}, and {{header}}) it would probably be nice to have a discussion on the problem you're fixing. --Mwn3d 18:47, 18 May 2011 (UTC)

After seeing many headers proclaiming "C sharp" I decided to correct the problem and have them display as C#. I don't know if there are other languages with similar issues (none that I saw at a quick glance), but they should probably be included as well.
The problem was already documented on the template itself, with a workaround supplied. This obviates that need except for new languages.
CRGreathouse 19:58, 18 May 2011 (UTC)
F# is treated the same way. I don't think there are any others. --Mwn3d 20:38, 18 May 2011 (UTC)
Great, added that one.
On an unrelated note: I saw Category:JAMES II/Rule-based Cellular Automata and was wondering what you thought. At a glance it seems like it should not be a programming language (rather, that should be Category:JAMES II and this should be a subcategory or an implementation page) but perhaps I'm missing something?
CRGreathouse 21:02, 18 May 2011 (UTC)

Your language file

Hi,

I just uploaded the language file version as uploaded on the SourceForge trcker. Please take care of the notes there.

Regards, --BenBE 13:20, 5 July 2011 (UTC).

P.S.: http://sourceforge.net/tracker/?func=detail&aid=3303485&group_id=114997&atid=670234 P.P.S.: Have a look at what the langcheck.php (included with GeSHi) tells you about the formatting. I just skimmed over the file and it screamed like the langcheck would complain ;-)

LangCheck Report

Validating language file for 'parigp' ... Failed

NOTICE Language file contains unescaped tabulator chars (probably for indentation)!
NOTICE Language file contains irregular indentation (other than 4 spaces per indentation level)!
WARNING Language file contains per-group duplicate keyword 'realprecision' in $language_data['KEYWORDS'][2]!
ERROR Language file contains no $language_data['CASE_SENSITIVE'] specification for keyword group 3!
ERROR Language file contains no $language_data['URLS'] specification for keyword group 3!
WARNING Language file contains cross-group duplicate keyword 'simplify' in $language_data['KEYWORDS'][1] and $language_data['KEYWORDS'][2]!
WARNING Language file contains cross-group duplicate keyword 'log' in $language_data['KEYWORDS'][1] and $language_data['KEYWORDS'][2]!
WARNING Language file contains cross-group duplicate keyword 'real' in $language_data['KEYWORDS'][1] and $language_data['KEYWORDS'][3]!

Talk:Matrix arithmetic

Hi, I left a question on the task. Thanks. --Paddy3118 14:06, 25 July 2012 (UTC)

Revert of an "incorrect" for PARI/GP Solution to Floyd's Triangle.

Hi, I received your message that your reverted the "incorrect" tag I added to the solution, thanks.

Please take a more careful look at the problem, and at the sample output of numerous solutions that get it right.

The last two rows of the example output for the n=14 case show it clearly:

  79  80  81  82  83  84  85  86  87  88  89  90  91
  92  93  94  95  96  97  98  99 100 101 102 103 104 105

The columns in the solution are all equal width. So in the last row, there are two spaces between the two-digit columns like 93 and 94.

The problem calls for the columns to be packed, rather than of equal width: it states that there is to be one space between the columns in the last row, so the last two rows look like this:

 79 80 81 82 83 84 85 86  87  88  89  90  91
 92 93 94 95 96 97 98 99 100 101 102 103 104 105

Kazinator (talk) 17:49, 21 March 2014 (UTC)

Nth PARI/GP Output

If the solution works, can you update all of the output? The %3 line still shows

"1011st", "1012nd", "1013rd"

while the %4 shows

"1012th"

--Ooorah (talk) 15:33, 24 June 2014 (UTC)

Thanks for fixing that! --Ooorah (talk) 13:07, 7 July 2014 (UTC)