Jump to content

The open source programming language Perseus - Wanna join the project?


Recommended Posts

Here are a few hints for porting:

1. Array bases

VB.NET has the same array base as AutoIt (0 that is), but it has a "dead element". A VB.NET array that is declared like Array(0) has 1 Element, Array(0). The bound will always be one higher than AutoIt. I did not keep the declarations consistent in the VB code (stupid me), so there will be a few problems where you have to look very closely.

2. Length-insensitive statements

Something like 

ElseIf Mid(sSourceCode, iSrcPos, 6) = "property" Then

will be true in VB, but not in AutoIt, because AutoIt needs the correct length:

ElseIf StringMid($sSourceCode, $iSrcPos, 8) = "property" Then

 

Edited by minxomat

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

One other thing to talk about is code and documentation licensing; I have no license preference -- I just don't want somebody to help then tell us we can't use their code two years from now.

 

--Edit:

I've been reading through the code, and I have a question pertaining to the global tables. In your port of IO Environment.vb -- would it be useful to enumerate the object structures? For example, $eSymbolsIsProto = 0, $eSymbolsName, $eSymbolsOffset, $eSymbolsSection, $eSymbolsSymType? When using the table, I know every symbol has a name, but I don't need to know that the name is in $Symbols[$x][1] -- I can just call it $Symbols[$x][$eSymbolsName] and be done with it.

Edited by rjframe
Link to comment
Share on other sites

That is a good idea. I'm not home now, you if you have time, please add this and pull req. We had a PM discussion about the usefulness of DLLStructs or even Maps (both make no sense in this case). Even though that was a good discussion, please post such discussion publicy here from now on :) .

About licensing, it is the same as Perseus 5, Apache 2: https://github.com/minxomat/Perseus/blob/master/LICENSE

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

One more thing regarding documentation. We will be using the free wiki software LionWiki that (SERVER) will be maintained by me and Mikahs. Set up will follow.

Edited by minxomat

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

It's just my two cents, but chm is old. Why not invest some time looking at https://docs.readthedocs.org/? Considering your responsibility as I understand is documentation creator.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

@guinness Thanks for the 2 cents :), But I would still prefer old CHM because of its compatibility & portability ;), CHM uses HTML for the docs so it would be easy to port to an other solution if needed, TD :)

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

I am aware of how CHM is constructed, I mean I re-built AutoIt's documentation builder. If you want to makes things complicated for yourself then write raw HTML, though @minxomat might agree with me that at least some documentation generator + post parser would be easier ion all and result in less bugs originating. For my PHP code, I simply document the code as a go along and then run APIGen to construct a friendly HTML version of the source code + usage docs. I dare say someone else will say exactly the same as me and then you will change your mind. -_0

Anyhow, my allegiance is to the AutoIt language, so I will continue to help out there.

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

@guinness

I dare say someone else will say exactly the same as me and then you will change your mind. -_0

lol :lol:

 

I don't know if it would be a good idea, I don't think that users of Perseus would like to check the online doc instead of the local one, also what if they live in a country where the internet connection is poor & get gets disconnected randomly (like mine :lol:)? I will think of it when someone say the same thing, TD :P

 

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

LionWiki accepts a simpile flavor of markdown. There is no way around writing some scripts to generate docs (in Markdown). The plus side is that I can text2tags the markdown as offline HTML and throw it on the server, so creating an offline and online doc is one step.

CHM will not be used for reasons mentioned.

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

There you go @guinness I changed my mind :P

I guessed you would.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

@minxomat I've got a few question:

Project:

  • I made a couple of pull requests instead of merging the code myself because I used AutoIT's data types rather than DllStructCreate and I wasn't sure that's what we wanted to do; it was much cleaner and easier than I expected so I may go ahead and merge them.
    • I am silently ignoring overflows to the Add[xxx] functions (a word value passed to a byte function, etc.); at minimum we'll need to output a debug message because this could cause some hard to find bugs when I accidentally call an xx_byte function thinking I'm calling an xx_word function. Because that's the kind of thing that I do.
  • Will we be using GitHub's issue tracker? If so, I'm going to add a few issues that need to be looked at; they should definitely wait until the port is complete, but I don't want to forget about them.
  • I have also nearly finished porting Linker.au3, but haven't pushed it yet (bad Ryan!).

Perseus:

  • Is there a way to dereference a pointer without using DirectByte? If not, that's my first feature request once the port is complete. I'm ultimately wanting to execute a function from a pointer.
  • Long-term, it would be nice to be able to inline assembly as a supplement to DirectByte (I at least could do that more efficiently). Something like asm { mov eax, ebx }. If we don't want it in the language, I think we can easily do something like it in Perseus (using DirectByte) as part of the standard library.
    • With DirectByte, I'm stuck writing assembly, assembling the code, then disassembling it so I can copy and paste the hex values. By the time I've done that, I forget what I was doing.
Link to comment
Share on other sites

@minxomat I've got a few question:

Project:

  1. I made a couple of pull requests instead of merging the code myself because I used AutoIT's data types rather than DllStructCreate and I wasn't sure that's what we wanted to do; it was much cleaner and easier than I expected so I may go ahead and merge them.
    1. I am silently ignoring overflows to the Add[xxx] functions (a word value passed to a byte function, etc.); at minimum we'll need to output a debug message because this could cause some hard to find bugs when I accidentally call an xx_byte function thinking I'm calling an xx_word function. Because that's the kind of thing that I do.
  2. Will we be using GitHub's issue tracker? If so, I'm going to add a few issues that need to be looked at; they should definitely wait until the port is complete, but I don't want to forget about them.
  3. I have also nearly finished porting Linker.au3, but haven't pushed it yet (bad Ryan!).

Perseus:

  1. Is there a way to dereference a pointer without using DirectByte? If not, that's my first feature request once the port is complete. I'm ultimately wanting to execute a function from a pointer.
  2. Long-term, it would be nice to be able to inline assembly as a supplement to DirectByte (I at least could do that more efficiently). Something like asm { mov eax, ebx }. If we don't want it in the language, I think we can easily do something like it in Perseus (using DirectByte) as part of the standard library.
    • With DirectByte, I'm stuck writing assembly, assembling the code, then disassembling it so I can copy and paste the hex values. By the time I've done that, I forget what I was doing.

Project:

Wow, I didn't expect that much progress. Guess I have to catch up on the code. :D .

1. I'll take a look.

1.1 You need to convert the values. For example, if there is a negative value passed to a function using Short, it needs to be converted to an absolute value (do this in hex), in the code. But that is something I have to look at, because I messed this up in the first place... But leave a comment when you find something odd!

2. Yes, please do.

3. Good Ryan! Remember me to get you a cookie ;) .

Perseus

1. Yes, that is a feature I look forward to. Just use the Issues on the Portbase repo and create a feature-request.

2. I would not create yet another assembler. However, inline ASM is a must, but I think we will be using the FASM DLL. AndyG posted some examples around here some time ago.

2.1 For now, use a reference table such as http://ref.x86asm.net/coder32.html . You can also use this to check if the hex values are valid when porting (but usually there is a comment next to it in the VB code).

 

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

@rjframe

You forgot to commit the change to the parent array:

;    Sub AddCodeByte(ByRef Value As Byte)
;        ReDim Preserve Section(2).Bytes(UBound(Section(2).Bytes) + 1)
;        Section(2).Bytes(UBound(Section(2).Bytes)) = Value
;    End Sub

Func AddCodeByte($iValue)
    Local $aBytes = $Section[2][$eSectionBytes]
    ReDim $aBytes[UBound($aBytes) + 1]

    $aBytes[UBound($aBytes) - 1] = BinaryMid($iValue, 1, 1)
EndFunc

You need to reassign the changed array:

$aBytes[UBound($aBytes) - 1] = BinaryMid($iValue, 1, 1)
    $Section[2][$eSectionBytes] = $aBytes
EndFunc

 

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

Another reminder that any discussion / idea etc. that is abstract enough not to be posted on githubs issue tracker, belongs in this thread. Sending your idea to me personally (especially via email) just slows down the process and excludes team members from the discussion. :) 

I'll try finishing the setup during this weekend.

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

Hey, Minxomat. Sorry about the double post in the pm. I was looking thru the framework for a plug-in to Notepad++ and I do think I could make one that could scan the .p++ file and generate a .pas header file. I'll sit down over the next couple of days and see what I can come up with, using your .p++ files for a reference. As for the idea about the paths, I have a couple ideas I want to try.

I wasn't trying to exclude anyone, I just wanted your opinion of a couple ideas before I mentioned them here, see if you would mind me trying to work them out. Your project has a lot of possible uses, even ones you might not have considered.

 

Edited by karraksc
Link to comment
Share on other sites

The easiest way for you is to create a console application that scans the source file (path as input argument) and writes a Pascal header file to disc somewhere. You can use whatever language to do this.

Since we will be using NppExec, just create a NppExec Script that runs you console app with the path of the source file as the argument. Then you can use the Macro panel to create hotkeys within Npp for that script.

Custom Keyboard Shortcut
NppExec

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...