Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

RFC(s) regarding: Literate AHK, git, gitiki, scrape, lenses?


  • Please log in to reply
3 replies to this topic

Poll: Should we pursue an RFC for #? (4 member(s) have cast votes)

Should we pursue an RFC for #?

  1. #1 (1 votes [25.00%])

    Percentage of vote: 25.00%

  2. #2 (plus #1) (0 votes [0.00%])

    Percentage of vote: 0.00%

  3. #3 (plus #1, #2) (0 votes [0.00%])

    Percentage of vote: 0.00%

  4. #4 (plus #1, #2, #3) (1 votes [25.00%])

    Percentage of vote: 25.00%

  5. none of these (2 votes [50.00%])

    Percentage of vote: 50.00%

Vote Guests cannot vote
technogeeky
  • Members
  • 2 posts
  • Last active: Apr 25 2010 05:54 PM
  • Joined: 21 Apr 2010
I am beginning work on an ambitious user interface project designed mostly to meet my specific needs, and in the course of R&D I have essentially decided that AHK is the most powerful starting point for prototyping certain aspects of my UI.

I am always amazed at how thoroughly powerful the unassuming generosity of open source developers can be. With that in mind, and with my interests and (I believe) the AHK community's interest, I propose the following ideas:

1.Develop Literate AutoHotKey

[*:t1rt7224] similar to and inspired by Literate Haskell
[*:t1rt7224] such a format would likely bear a useful resemblance to the often used format (inline AHK in forum posts)2. Develop AHK <--> git SCM tools

[*:t1rt7224] the benefits of dVCS systems are apparent[/url]
[*:t1rt7224] you can automatically gain a whole slew of wonderful tools, though I have some in particular in mind.3. Develop or Adapt a DVCS wiki supporting #1 and #2

[*:t1rt7224] like gitit (in Haskell + git/mercurial)4. Build AHK code-base automatically!

[*:t1rt7224] With #3 out of the way, and given the wonderous workflows easily enabled by git, scrape the AHK forums and build a repository where one only tenuously existed before!
[*:t1rt7224] imagine using this interface (as an example - if you're using git you get it for free!) to manage AHK files, scripts, and projects
5. Lastly, not exactly an RFC but has anyone tried to formalize the AHK API(s) backwards to something more rigorously typed? Has any static analysis been done on AHK? Is anyone aware of any research work involving AHK? Has anyone developed or discussed something along the line of lenses to enhance AHK?


tl;dr; Therefore, I hereby call for an RFC on issues #1, #2, #3, and #4.

Please cast your vote for which stage seems most compelling to you.

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
So this would be literal AHK ?

This script will show a message box!
In Bird-style you have to leave a blank before the code.
See <!-- m -->http://www.haskell.o... ... Bird_Style<!-- m -->

> MsgBox Hello world ; start code with >

And you have to leave a blank line after the code as well.


To make it actually run:

;file:=%1%
;FileRead, File, %file%

File=
(
This script will show a message box! 
In Bird-style you have to leave a blank before the code.
See http://www.haskell.org/haskellwiki/Literate_programming#Bird_Style
 
> MsgBox Hello world ; start code with > 
 
And you have to leave a blank line after the code as well.
)


Loop, Parse, File, `n, `r
	{
	 If (SubStr(A_LoopField, 1, 2) = "> ")
	 	LitCode .= SubStr(A_LoopField, 3) "`n"
	}
	
FileDelete, __litcode.ahk
FileAppend, %LitCode%, __litcode.ahk
RunWait, __litcode.ahk
FileDelete, __litcode.ahk
(crappy code of course, just proof of concept)

I think the lack of response so far may have to do with the fact the majority of AutoHotkey users aren't programmers so may not (fully) understand what you are talking about. I don't understand it myself but the literal bit is nice although I won't use it. (I think)

technogeeky
  • Members
  • 2 posts
  • Last active: Apr 25 2010 05:54 PM
  • Joined: 21 Apr 2010

So this would be literal AHK ?

This script will show a message box!
In Bird-style you have to leave a blank before the code.
See <!-- m -->http://www.haskell.o... ... Bird_Style<!-- m -->

> MsgBox Hello world ; start code with >

And you have to leave a blank line after the code as well.


To make it actually run:

;file:=%1%
;FileRead, File, %file%

File=
(
This script will show a message box! 
In Bird-style you have to leave a blank before the code.
See http://www.haskell.org/haskellwiki/Literate_programming#Bird_Style
 
> MsgBox Hello world ; start code with > 
 
And you have to leave a blank line after the code as well.
)


Loop, Parse, File, `n, `r
	{
	 If (SubStr(A_LoopField, 1, 2) = "> ")
	 	LitCode .= SubStr(A_LoopField, 3) "`n"
	}
	
FileDelete, __litcode.ahk
FileAppend, %LitCode%, __litcode.ahk
RunWait, __litcode.ahk
FileDelete, __litcode.ahk
(crappy code of course, just proof of concept)

I think the lack of response so far may have to do with the fact the majority of AutoHotkey users aren't programmers so may not (fully) understand what you are talking about. I don't understand it myself but the literal bit is nice although I won't use it. (I think)


Essentially, yes. The point of literate haskell is twofold:

[*:wnq5sz4t]haskell is *supposed* to be so concise that it's self-obviating
[*:wnq5sz4t]place haskell code inline in HTML (or other pretty readable markups) so that explanations of each code segment are made clearer
In AHK's case, the forum threads containing code blocks (which must be syntax checked) would be "literate AHK projects" already, and particular replies with code blocks or attachments would be the "literate AHK" itself.

One of my main concerns is that the software and AHK code fragments on this forum are wonderful, but a forum is a far from ideal place to find these things - especially if you're looking for things whose search terms isn't obvious.

Most of what I posted above can be done "almost free". Thus, my point in suggesting literate AHK wasn't to invent a new standard (and ask/force people who post here to use it) but to determine if a useful standard exists already. I have no doubt that it's possible to put \[code\] segments inline with posts, so that part is taken care of.

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
Re your last part, dR has something in mind like that <!-- m -->http://www.autohotke... ... 191#334191<!-- m --> grabbing code from a forum post.