Software that creates software?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
superpeter
Posts: 115
Joined: 18 Dec 2020, 05:17

Software that creates software?

21 Feb 2021, 15:14

I'm researching exponential technologies (i.e. technologies that can be used to improve themselves, leading to exponential growth) and was thinking, "Is it possible, with Autohotkey, to create software that creates software?"

As a very basic example, suppose a script (ex. softwarecreator.ahk or softwarecreator.exe) had a series of inputboxes that the user must answer.

Then, his answers (each of which is assigned to a variable or array location) would be used to create the AHK source code (ex. newsoftwareby_%username%.ahk).

The above process would instantly turn a USER into a (kind of) DEVELOPER even though the user might not know how to use AHK at all!

Is this technically feasible? Thanks for your feedback!
gregster
Posts: 9111
Joined: 30 Sep 2013, 06:48

Re: Software that creates software?

21 Feb 2021, 15:31

Sure - ahk scripts are only text files. No problem to create a code generator, and it has be done a number of times - of course, it can get complex quickly.

A very complex example: https://www.autohotkey.com/boards/viewtopic.php?f=63&t=143 (written in AHK)
another one: https://www.autohotkey.com/boards/viewtopic.php?f=6&t=62550
kind of: https://www.autohotkey.com/boards/viewtopic.php?f=6&t=34184#p158285
or: https://www.autohotkey.com/boards/viewtopic.php?f=6&t=77188&p=358370 (there is a web version, but also a portable AHK script version of it)
or the GUI creator tools in Scite4AHK and AutoGui; there are also a few advanced msgbox creator tools... they all put out AHK code.
there are surely more. That were just a few that came to mind quickly... of course, you can start much simpler.

And of course you are not limited to create AHK code...
User avatar
mikeyww
Posts: 27366
Joined: 09 Sep 2014, 18:38

Re: Software that creates software?

21 Feb 2021, 15:34

Sure. A script can also edit itself.
AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: Software that creates software?

21 Feb 2021, 15:46

this is a big trend now called nocode development and with ahk its been done for a while by many programs mentioned above
User avatar
mikeyww
Posts: 27366
Joined: 09 Sep 2014, 18:38

Re: Software that creates software?

21 Feb 2021, 15:50

But that's what I'm already doing every time I write a script myself...... :)
User avatar
SpeedMaster
Posts: 494
Joined: 12 Nov 2016, 16:09

Re: Software that creates software?

21 Feb 2021, 18:11

At the moment there is no such thing in AHK. You need an Artificial Neural Network for that. :twisted:
Why bother programming when programs can program themselves with much better results. :D :D
Having a powerful ANN is the first step. The next step is to train it sufficiently for the tasks it has to perform. :think:
Once these two steps have been completed it would then be easy to distribute to people who do not know how to program. :thumbup:
You can find more explanations here (by Gio)
https://www.autohotkey.com/boards/viewtopic.php?f=7&t=42420
A funny example that I like very much. This program creates a GUI in one click but without artificial intelligence. (by Tidbit)
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=12830
With the help of a virtual intelligence one could ask the program to generate for example a calculator and then require it to be smaller or larger with an additional button that displays the local temperature etc...
superpeter
Posts: 115
Joined: 18 Dec 2020, 05:17

Re: Software that creates software?

21 Feb 2021, 18:55

Thanks everyone for your feedback! Big thank you gregster for the resources!

I played a bit today to implement the idea of enabling a user (who knows nothing about AHK) to create AHK source code.

I teach digital marketing at a college and the script below would enable fellow teachers to quickly create EXAMS (in the form of a standalone executable file). This was just an ultrasimple feasibility test, but a future version could tabulate the exam score for each student (interestingly, not knowing which questions he got right or wrong but knowing the final score, he could do the test over and over again till a high score is achieved).

I think it's even possible, if the teacher inserted his Gmail login details, to automatically send the student scores to himself by email so he knows WHEN students have completed the test.

==========================================================

Code: Select all

; software that creates software, or metasoftware

#SingleInstance, force 

; SUDO:
; create generic script
; create inputboxes
; search and replace variable or code blocks in generic script
; save as new script under user's name

;===========================================================================

; exam-building form filled out by teacher
^r::  ; registering new question and answer
inputbox, question, , What is the question you want to test students on
inputbox, answer, , What is the CORRECT answer
; search and replace question AND answer in the source code script

fileread, oldscript, C:\Users\super\Documents\AHK files\software that creates software.ahk
newscript := StrReplace(oldscript, "oldquestion", question)
filedelete, C:\Users\super\Documents\AHK files\newsoftware1.ahk 
fileappend, %newscript%, C:\Users\super\Documents\AHK files\prefinalsoftware.ahk   

fileread, oldscript, C:\Users\super\Documents\AHK files\prefinalsoftware.ahk
newscript := StrReplace(oldscript, "oldanswer", answer)
fileappend, %newscript%, C:\Users\super\Documents\AHK files\software%a_now%.ahk  ; newly created software!
return 

;===========================================================================

^t::  ; test given to student
inputbox, student_answer, , oldquestion
if(student_answer = "oldanswer")
{
	msgbox CORRECT answer, congratulations`!
}
else 
	msgbox Wrong answer, try again`! Press "CTRL + h" if you want a helpful hint.    ; this hotkey opens a GUI offering a hint
return
[Mod edit: [code][/code] tags added.]
Last edited by superpeter on 21 Feb 2021, 18:59, edited 1 time in total.
superpeter
Posts: 115
Joined: 18 Dec 2020, 05:17

Re: Software that creates software?

21 Feb 2021, 18:58

Thanks Speedmaster, I'll check out the links!

Perhaps a future, more advanced version of GPT-3 can do the coding (at least, the low-level coding). But computational thinking or high-level software design, I think, will still be performed by talented coders.

If machines can do that, then Skynet is here and it's the end of the world. lol

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 261 guests