Jump to content


Photo

make ahk a top 10 language on github


  • Please log in to reply
15 replies to this topic

#1 tinku99

tinku99
  • Members
  • 560 posts

Posted 07 September 2011 - 11:39 PM

I think its time to bring autohotkey fame to github.
Thanks to uberi's persistance, github has syntax highlighting for ahk.
But we're not going to settle for ahk just to be listed as a language.
It needs to be in the top 10.
If we could do it on rosettacode, we should be able to do it on github.
If people would just start posting their "scripts and functions" on github as gists in addition to announcing it on the scripts and functions part of the forum, we'd get there pretty fast.


Edit:
Please link to your github repo if you post in this thread: my github repo

It may be hard to get a high rank in terms of lines of code as autohotkey scripts rarely get very big. But in terms of users and repo's, we have no disadvantage (except not having a strong presence on linux or mac yet).

Edit2:
For those intimidated by the commandline, You don't have to mess with the command line.
Github gists are as easy as copy/pasting bbcode.
Just make yourself a github account and then post a script as a gist.
Gists are automatically fully functional repos.

Edit3:
you don't even have to sign up on github.
You can posts gists anonymously. example <!-- m -->git://gist.github.com/1203668.git<!-- m -->

Edit4:
# 58 as of 9/30/2011

#2 Elesar

Elesar
  • Members
  • 690 posts

Posted 08 September 2011 - 12:00 AM

I guess its finally time for me to see what this GitHub thing is all about....

#3 Uberi

Uberi
  • Fellows
  • 1048 posts

Posted 08 September 2011 - 01:51 AM

Great initiative!

I'm extremely proud of the AHK community for the heroic RosettaCode efforts, and I'm confident that we can rally up a lot more AutoHotkey awareness through these campaigns.

Top 10 may be a little ambitious (I'd consider Top 30 an astounding success if we did that), but I am confident that initiatives such as these will both improve AutoHotkey visibility and help debunk the myth that AutoHotkey is not a "real" programming language*.

Plus, exposing GitHub to AutoHotkey users is a good idea - fast, efficient version control is absolutely indispensable to me now when I work on larger projects, and having the freedom to experiment without worrying about breaking anything is simply a breath of fresh air.

I hope we can bring some of what makes our community such a great place into the mainstream world of programming! :D

I'd love to see that day.

* For an example, see here, under the section "Desktop Scripting".

Edit: forgot to link to my GitHub page.

#4 tidbit

tidbit
  • Moderators
  • 2288 posts

Posted 08 September 2011 - 02:24 AM

I attempted github a couple weeks ago. gave up.

no simple web interface. got to download stuff and do some cmd voodoo to set it up. no simple installer to do everything. and then on the setup guide, I saw something like: "brought to you by the guys who made linux" and then thought "well, that explains it..."
It seems like a lot of work for little benefit. I guess it could be more helpful then ahk.net with big projects with many files, but I don't see the point for single-file projects (which probably consists of 86.457% of this forum). much easier to copy/paste, wrap in code tags or upload to ahk.net.

I bet this will be a huge speedbump for others. Maybe someone could make an AHK interface for all the cmd stuff :idea:.

#5 engunneer

engunneer
  • Fellows
  • 9162 posts

Posted 08 September 2011 - 03:33 AM

I've been trying to transition from SVN to git for my internal projects, and just am not there yet. I have read a few good articles on git lately, so I may as well post them here for discussion:

how git stores data

I'll post more as i remember where they are.

Also, I've been looking at tortoise git as an interface, so i don't have to do the command line.

we are also in a scripting forum. perhaps if we made an AHK interface over the command line stuff, we could make it a bit simpler?

#6 fragman

fragman
  • Members
  • 1591 posts

Posted 08 September 2011 - 09:47 AM

Setting it up wasn't all that difficult if you simply follow the instructions. However, I installed TortoiseGIT and right now I have both the original GIT shell extensions and TortoiseGIT shell extensions and it's bit bloated...nothing that can't be fixed though. I also have the feeling that TortoiseGIT isn't as far as TortoiseSVN yet in terms of quality.

#7 tinku99

tinku99
  • Members
  • 560 posts

Posted 08 September 2011 - 03:03 PM

I attempted github a couple weeks ago. gave up.
no simple web interface. got to download stuff and do some cmd voodoo to set it up. no simple installer to do everything. ... It seems like a lot of work for little benefit. I guess it could be more helpful then ahk.net with big projects with many files, but I don't see the point for single-file projects... much easier to copy/paste, wrap in code tags or upload to ahk.net.

You don't have to mess with the command line.
Github gists are as easy as copy/pasting bbcode.
Just make yourself a github account and then post a script as a gist.
Gists are automatically fully functional repos.

#8 IsNull

IsNull
  • Fellows
  • 990 posts

Posted 08 September 2011 - 03:15 PM

Boys, use gitextensions if you arn't familar with the commandline usage. This tool is great and very stable.

I use it for hobby-projects as same as for professional usage.

You just have to download the full installer and everything is setup properly (mysysgit, putty etc.)

#9 nimda

nimda
  • Members
  • 4301 posts

Posted 08 September 2011 - 03:21 PM

I recently tried to get portable msysgit running on my flash drive, and I *think* I *might* have succeeded.

Given the AHK Community's quick response time and noob-friendlyness, should we have a "Put here requests for help with Git(Hub)" thread?

#10 tinku99

tinku99
  • Members
  • 560 posts

Posted 08 September 2011 - 03:30 PM

you don't even have to sign up on github.
You can posts gists anonymously. example <!-- m -->git://gist.github.com/1203668.git<!-- m -->

#11 nimda

nimda
  • Members
  • 4301 posts

Posted 08 September 2011 - 04:03 PM

I think I'll put cfxbot on github as a learning experience :)
Give me a week or three :roll:

Edit: so... my portable msysgit works. I'll mostly be adding my Scripts&Functions stuff as gists

Edit2: HAHA! Yes! *dances*
I have git and github really working. Somehow, I even made the whole thing portable!
Now, I've heard it's easy to revert if you break something. Someone want to tell me how? (The only commands I know of are "git add file.ext", "git commit -m 'message'", and "git push origin master")

#12 Uberi

Uberi
  • Fellows
  • 1048 posts

Posted 13 September 2011 - 02:04 AM

nimda:

IIRC it's:

git checkout --help

Edit: Pro Git is a great book about Git. Highly recommended.

#13 Guests

  • Guests

Posted 31 December 2011 - 08:18 AM

Regarding ahk v2 docs here:
<!-- m -->http://www.autohotke...324.html#501324<!-- m -->

If you would like to contribute, the best way to do so is to fork the github repository, make changes locally and and submit a pull request via github.

Can one use gist as well? Perhaps someone can explain if that is the case <!-- m -->https://gist.github.com/<!-- m -->

#14 Uberi

Uberi
  • Fellows
  • 1048 posts

Posted 31 December 2011 - 05:20 PM

Gists seem to be different from GitHub repositories. I don't believe it is possible to transfer files between them.

Anyways it is still possible to contribute changes through the forum if you wish.

#15 Guests

  • Guests

Posted 31 December 2011 - 06:39 PM

Not sure if that (forum) will work because of the html coding and all. Testing below with the updated Hotstrings helper script from docs/Hotstrings.htm

<pre class="NoIndent">; AutoHotkey Version: 2.x
#HotString, SI

#h::  <em>; Win+H hotkey
; Get the text currently selected. The clipboard is used instead of
; "ControlGet Selected" because it works in a greater variety of editors
; (namely word processors).  Save the current clipboard contents to be
; restored later. Although this handles only plain text, it seems better
; than nothing:</em>
AutoTrim Off  <em>; Retain any leading and trailing whitespace on the clipboard.</em>
ClipboardOld := ClipboardAll
Clipboard := ""  <em>; Must start off blank for detection to work.</em>
Send ^c
ClipWait 1
If ErrorLevel  <em>; ClipWait timed out.</em>
    Return
<em>; Replace CRLF and/or LF with `n for use in a "send-raw" hotstring:
; The same is done for any other characters that might otherwise
; be a problem in raw mode:</em>
StrReplace, Hotstring, % Clipboard, ``, ````  <em>; Do this replacement first to avoid interfering with the others below.</em>
StrReplace, Hotstring, % Hotstring, `r`n, ``r  <em>; Using `r works better than `n in MS Word, etc.</em>
StrReplace, Hotstring, % Hotstring, `n, ``r
StrReplace, Hotstring, % Hotstring, %A_Tab%, ``t
StrReplace, Hotstring, % Hotstring, `;, ```;
Clipboard: = ClipboardOld  <em>; Restore previous contents of clipboard.
; This will move the InputBox's caret to a more friendly position:</em>
SetTimer, MoveCaret, 10
<em>; Show the InputBox, providing the default hotstring:</em>
InputBox, Hotstring, New Hotstring, Type your abreviation at the indicated insertion point. You can also edit the replacement text if you wish.`n`nExample entry: :R:btw`::by the way, , :R`:::%Hotstring%
If ErrorLevel  <em>; The user pressed Cancel.</em>
    Return
If InStr(Hotstring,":R`:::")
{
    MsgBox You didn't provide an abbreviation. The hotstring has not been added.
    return
}
<em>; Otherwise, add the hotstring and reload the script:</em>
FileAppend, `n%Hotstring%, %A_ScriptFullPath%  <em>; Put a `n at the beginning in case file lacks a blank line at its end.</em>
Reload
Sleep 200 <em>; If successful, the reload will close this instance during the Sleep, so the line below will never be reached.</em>
MsgBox, 4,, The hotstring just added appears to be improperly formatted.  Would you like to open the script for editing? Note that the bad hotstring is at the bottom of the script.
If (A_MsgBoxResult = "Yes")
    Edit
Return

MoveCaret:
If !WinActive("New Hotstring")
    return
<em>; Otherwise, move the InputBox's insertion point to where the user will type the abbreviation.</em>
Send {Home}{Right 3}
SetTimer, MoveCaret, Off
return</pre>