Rosetta Code

Talk about anything
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Rosetta Code

09 Mar 2014, 09:45

But there is a ~= operator.
A shorthand for regexmatch.
Recommends AHK Studio
User avatar
MasterFocus
Posts: 146
Joined: 01 Oct 2013, 09:47
Location: Rio de Janeiro - RJ - Brasil
Contact:

Re: Rosetta Code

09 Mar 2014, 19:28

I actually don't know much about RosettaCode and Licences. But I suppose submit code does become licensed under GNU FDL 1.2, right? If you find out more about it, please let us know.

About the RegEx operator, sorry, I misread the code AND the supposed operator. :oops: :mrgreen:
Antonio França - git.io | github.com | ahk4.net | sites.google.com
Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.
Need help? Please post on the forum before sending me a PM.
User avatar
joedf
Posts: 8953
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Rosetta Code

10 Mar 2014, 11:55

Why not bsd or MIT, zlib?
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
User avatar
joedf
Posts: 8953
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Rosetta Code

11 Mar 2014, 08:58

Patent treachery?!? :O
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Rosetta Code

13 Mar 2014, 08:10

Improvement:
- SEDOL (~1.08x faster)
Last edited by jNizM on 13 Mar 2014, 15:42, edited 1 time in total.
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Rosetta Code

13 Mar 2014, 15:39

My personal view:
1. There are many scripts on Rosetta Code without any AHK Basic compatibility.
2. After so long time AHK_L exists, it's time to change or not?! | Latest AHK_Basic Version (1.0.48.05): 2009-09-25
3. Sorry but I don't care about AHK Basic.
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Rosetta Code

14 Mar 2014, 09:17

My code is a small and fast translated function without any invalid checks.
Your code is big and nearly full of invalid checks.

So use whatever you want?!
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
joedf
Posts: 8953
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Rosetta Code

14 Mar 2014, 11:18

I am sorry, but I must intervene in this disagreement. I have added both, a "standard" approach & an "optimized" approach. Henceforth, it will target all autohotkey users from now on : New and Experienced Users. I kindly suggest to stop this, and simply forget. You both have truth in your arguments, but I wish for Ahkscript to be a peaceful community. Please understand, I wish the best.

Thank you for your collaboration.
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
User avatar
joedf
Posts: 8953
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Rosetta Code

14 Mar 2014, 11:38

Added world's shortest implementation of Rot13 : http://rosettacode.org/wiki/Rot-13#AutoHotkey
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
User avatar
LinearSpoon
Posts: 156
Joined: 29 Sep 2013, 22:55

Re: Rosetta Code

15 Mar 2014, 16:21

Apparently this task was decided inappropriate for AutoHotkey (perhaps an older version?), but it's certainly possible now...

Code: Select all

class example
{
  foo()
  {
    Msgbox Called example.foo()
  }

  __Call(method, params*)
  {
    funcRef := Func(funcName := this.__class "." method)
    if !IsObject(funcRef)
    {
      str := "Called undefined method " funcName "() with these parameters:"
      for k,v in params
        str .= "`n" v
      Msgbox %str%
    }
    else
    {
      return funcRef.(this, params*)
    }
  }
}

ex := new example
ex.foo()
ex.bar(1,2)
User avatar
joedf
Posts: 8953
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Rosetta Code

15 Mar 2014, 16:22

nice! do you want me to add it to Rosetta Code for you? ill add a reference link to your post :)
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
User avatar
LinearSpoon
Posts: 156
Joined: 29 Sep 2013, 22:55

Re: Rosetta Code

15 Mar 2014, 17:00

You may add it; I do not have an account with the site.
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: Rosetta Code

17 Mar 2014, 05:30

Added first Post:
- AutoHotkey examples needing attention

Update Rank:
- 17.03.2014
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Rosetta Code

17 Mar 2014, 06:04

Code: Select all

Loop, PARSE, SortMethods, `,
	If (%A_LoopField%)
		Time .= A_LoopField . " Sort: " . %A_LoopField%Time . "`t`t" . %A_LoopField%Out . "`r`n"
MsgBox,, Results!, %Time%
Nightmare code.
Recommends AHK Studio
User avatar
smorgasbord
Posts: 493
Joined: 30 Sep 2013, 09:34

Re: Rosetta Code

18 Mar 2014, 03:39

oops! :x
Last edited by smorgasbord on 18 Mar 2014, 07:48, edited 1 time in total.
John ... you working ?
User avatar
smorgasbord
Posts: 493
Joined: 30 Sep 2013, 09:34

Re: Rosetta Code

18 Mar 2014, 07:43

[quote="smorgasbord"][quote="joedf"]added Parse command-line arguments : http://rosettacode.org/wiki/Parse_comma ... AutoHotkey[/quote]
Not visible to me. :([/quote]
John ... you working ?
kon
Posts: 1756
Joined: 29 Sep 2013, 17:11

Re: Rosetta Code

06 Apr 2014, 12:15

Joystick position
Keyboard input/Keypress check
Musical scale
Nth

It's a shame that when Sobriquet was banned (for reasons unknown to me) that his/her existing posts were deleted also. It seems he/she has contributed quite a lot to Rosetta Code.

Return to “Off-topic Discussion”

Who is online

Users browsing this forum: No registered users and 159 guests