User talk:PureFox: Difference between revisions

(add comment)
 
(7 intermediate revisions by 4 users not shown)
Line 266:
 
: Go seems to be prioritizing keeping the multiplicand as high as possible, while not checking more balanced combinations. --[[User:Chunes|Chunes]] ([[User talk:Chunes|talk]]) 13:43, 3 November 2021 (UTC)
 
::Sorry, you're both right - the original Wren (and hence Go) solutions were wrong and it was just by good fortune that they were giving the right answers for N <= 6. However, I've corrected them and the results for N = 7, 8 and 9 now agree with the Raku solution. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 16:19, 3 November 2021 (UTC)
 
== problems with trait.wren ==
 
Hi;
 
I'm learning Wren by reading the Rosetta Code web site containing task solved using Wren. I copy the code and run it on my computer where I have installed Wren. The tasks written not using the extra Rosetta Code Wren libraries works great. All of the extra Rosetta Code Wren libraries that need trait.wren fail with the following errors:
 
an example...
 
ren_cli 15_puzzle_game_solver.wren
[../RC_Wren_Lib/trait line 108] Error at 'class': Expect method definition.
[../RC_Wren_Lib/trait line 108] Error at 'Const': Expect end of file.
Could not compile module '../RC_Wren_Lib/trait'.
[../RC_Wren_Lib/long line 3] in (script)
[./15_puzzle_game_solver line 1] in (script)
 
I've tried very carefully to copy&paste the trait.wren code and the same error occurs.
 
I have copy&pasted several (obviously not all!) of the Rosetta Code Wren libraries and this is the only one that I have problems with so far.
 
I have successfully run many of the Rosetta Code Wren examples and am slowly learning a new computer language!
 
Thanks,
Retired_Build_Engineer
 
:Hi and welcome to Rosetta Code!
 
:I've made quite a few changes to Wren-trait lately and the problem is that I've somehow managed to lose the closing brace at the end of the ByKey class when updating the RC copy. Sorry about that but I've fixed it now so it should work OK.
 
:Incidentally, in some of the earlier examples you'll find that I've been importing modules like this: import "/fmt". This works fine on Linux (which I use) but may not work on Windows or MacOs due to a glitch in how Wren-cli is currently written. If you find that's the case, then just precede the module reference with a dot: import "./fmt" and it should work.
 
:Thanks for taking an interest in Wren which I think you'll agree is a nice little language and surprisingly stable given that we're not yet at version 1.0. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 08:42, 31 August 2023 (UTC)
 
Thank you for the updated trait.wren; it seems to have resolved all the problems I experienced with that library. There are a few new things that I've noticed, but in general, this is awesome!
 
Thanks,
Retired_Build_Engineer
 
== Wren Syntax Highlighting ==
 
Hi PureFox,
 
I ran an old script looking for <code>syntaxhighlight lang="ecmascript"</code> and found these. Most are where the Wren entry has multiple code blocks.
 
'''Tasks'''
 
* [[Associative array/Merging]]
* [[Currying]]
* [[Determine sentence type]]
* [[Grayscale image]]
* [[Map range]]
* [[Make directory path]]
 
'''Drafts'''
 
* [[Conjugate a Latin verb]]
* [[Exactly three adjacent 3 in lists]]
 
'''Talk'''
 
* [[Talk:Code Golf: Code Golf]]
* [[Talk:Statistics/Chi-squared distribution]]
 
I'd be happy to change these to <code>lang="wren"</code> if you're fed up with it.
 
Cheers,
James
 
--[[User:Jgrprior|Jgrprior]] ([[User talk:Jgrprior|talk]]) 16:57, 17 February 2024 (UTC)
 
:Hi James,
:Thanks very much for finding these stragglers :)
:I'm not surprised I've missed some as it's an awful job trying to maintain concentration when doing something like this manually.
:Fed up with it as I am, as it's my baby, I think I'd better finish the job myself.
:Thanks again. [[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 18:32, 17 February 2024 (UTC)
9,476

edits