Search found 91 matches

by [Shambles]
11 Dec 2018, 04:13
Forum: Scripts and Functions
Topic: v2 "is" operator and "Type" function backports
Replies: 0
Views: 961

v2 "is" operator and "Type" function backports

In the process of (re)writing type checking code for Facade I cloned AutoHotkey v2's is and Type features. https://github.com/Shambles-Dev/AutoHot ... e_Checking
by [Shambles]
24 Nov 2018, 21:57
Forum: Scripts and Functions
Topic: Facade Functional Programming Suite
Replies: 68
Views: 13488

Re: Facade Functional Programming Suite

saying "AHK is verbose" is deceiving. first of all you've omitted your "Op_Add()" func which is required for your example to run. but still all you've provided is the functional programming fold() func. ANY language that doesn't provide these functional programming funcs built in would be "verbose"...
by [Shambles]
24 Nov 2018, 21:37
Forum: Scripts and Functions
Topic: Facade Functional Programming Suite
Replies: 68
Views: 13488

Re: Facade Functional Programming Suite

<lots of stuff> I do not want my replies to keep just getting longer, so I will try to avoid long quotes. Functional programming is a kind of declarative programming. I consider referring to it as that to be almost overselling it to the point of it being misleading. Prolog is a lot closer to truly ...
by [Shambles]
24 Nov 2018, 19:02
Forum: Scripts and Functions
Topic: Facade Functional Programming Suite
Replies: 68
Views: 13488

Re: Facade Functional Programming Suite

Have you seen Object.ahk for v2? https://autohotkey.com/boards/viewtopic.php?f=37&t=57591 This separates data from interface, methods from properties. At the moment, it's theoretical, but having a dedicated data type should speed up AHK arrays when implemented. I had not. As far as I knew the curre...
by [Shambles]
24 Nov 2018, 15:28
Forum: Scripts and Functions
Topic: Facade Functional Programming Suite
Replies: 68
Views: 13488

Re: Facade Functional Programming Suite

I am not a programmer so OOP, functional, and procedural programming stuff are all new to me. I recently built a crappy v2 function evaluator that works more or less like a REPL, and while building it, my approach was to convert everything from infix to prefix form, which basically converts express...
by [Shambles]
24 Nov 2018, 15:25
Forum: Scripts and Functions
Topic: Facade Functional Programming Suite
Replies: 68
Views: 13488

Re: Facade Functional Programming Suite

I will respond to the other criticisms as a whole because they are all about AutoHotkey’s type system. The decisions made with regards to AutoHotkey’s object model are bad because we know of better alternatives, and why they are better, and we knew this long before AutoHotkey was ever written (e.g. ...
by [Shambles]
24 Nov 2018, 13:47
Forum: Scripts and Functions
Topic: Facade Functional Programming Suite
Replies: 68
Views: 13488

Re: Facade Functional Programming Suite

Could you provide an example of verbosity in AutoHotkey that this library mitigates? Array := [1, 2, 3] ; This is meant to represent an array you got from somewhere else. It is not a part of the verbosity argument. ; without Facade Total := 0 for _, Value in Array Total += Value ; Note that omittin...
by [Shambles]
24 Nov 2018, 11:15
Forum: Scripts and Functions
Topic: Facade Functional Programming Suite
Replies: 68
Views: 13488

Facade Functional Programming Suite

Facade is intended to replace most of AutoHotkey's processing constructs, to provide error reporting and reduce sources of defects. It is more heavily inspired by combinatory logic (see the Func library of combinators) than lambda calculus. This works well in AutoHotkey v1, which does not support c...
by [Shambles]
17 Nov 2018, 13:03
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 9896

Re: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change

In expressions numbers are just numbers: Loop 13 { } If you want to iterate over each line in a file using expressions I would suggest this: for each, line in StrSplit(FileOpen(fileName, "r").Read(), "`n", "`r") { } I think this has slightly gone offtopic from your initial suggestion though - it mi...
by [Shambles]
17 Nov 2018, 12:14
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 9896

Re: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change

How would I loop for a certain number of times using an expression? How would I loop over lines in a file where the file comes from an expression?
by [Shambles]
17 Nov 2018, 11:54
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 9896

Re: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change

The difference to normal commands is that all parameters are expressions - they were not expressions in v1. That seems to remove the need for % . I am skeptical about whether it is truly unnecessary in v2. For example, loop , which cannot be function, almost always required % shenanigans. Also, giv...
by [Shambles]
17 Nov 2018, 10:56
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 9896

Re: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change

Command Syntax has been removed in v2. According to my understanding of the changes, that is misleading. You understand it wrong then. Command syntax is not simply omitting () , as I noted above, hence, calling it command syntax is what is actually misleading. Consider the (perfectly reasonable) li...
by [Shambles]
17 Nov 2018, 07:06
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 9896

Re: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change

Command Syntax has been removed in v2. According to my understanding of the changes, that is misleading. Foo(X, Y) can be called as Foo(1, 2) or Foo 1, 2 . Given that, one could reasonably argue command syntax is alive and well. This situation also creates 'fun' mental puzzles... Consider the (perf...
by [Shambles]
16 Nov 2018, 23:07
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 9896

Re: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change

I thought about merging the function and variable namespaces some more, and decided it's too impractical. If anything, calling "".base.length := StrLen should look for a variable named StrLen first before failing and looking in the function namespace for StrLen(). I'm not sure how AHK handles comma...
by [Shambles]
16 Nov 2018, 13:04
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 9896

Re: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change

Thanks for the links :) You can use ObjectBindMethod on COM Objects. I hope they help. It is good, and surprising, to know that ObjBindMethod(Obj, Method, Args*) works on external COM objects. Thank you. Someday I may need to use it that way. If the resulting BoundFunc objects could not preserve th...
by [Shambles]
16 Nov 2018, 12:38
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 9896

Re: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change

"".base.length := Func("StrLen") ; would become ; "".base.length := StrLen() ; or even StrLen MsgBox % "hi every1 im new!!!!!!! *holds up spork*".length() It would become "".base.Length := StrLen , yes. AutoHotkey user-defined functions and methods are both non-BoundFunc function objects, but when ...
by [Shambles]
16 Nov 2018, 12:01
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 9896

Re: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change

I do not believe many problems would be solved by merging the function and variable namespaces, but I would not be very offended by it either. I have gotten in the habit of using the same name for a lot of my parameters as AutoHotkey's constructors (e.g. Array, Func, etc.). I would have to change th...
by [Shambles]
16 Nov 2018, 10:31
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 9896

Re: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change

Do you have any source on how Powershell gets the amount of parameters for any COMObject? I do not. I tried to figure that out before PowerShell was open sourced. I was trying to use DLL calls to do the same thing from AutoHotkey. I used Microsoft's documentation to try to find the right functions ...
by [Shambles]
16 Nov 2018, 08:34
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 9896

Re: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change

My case is fundamentally different from your and I do have to assume that you did not run the code. In the first case only the meta functions will be called and not the methods behind that - in the case of useing %fn%() the parameter count is therefore equivalent to 0-1 or 1-2 depending on the mode...
by [Shambles]
16 Nov 2018, 07:28
Forum: Wish List
Topic: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change
Replies: 57
Views: 9896

Re: ObjGetBase(Object) and ObjSetBase(Object, BaseObject) Need to Change

You are oversimplifying things: How many parameters would the following objects have at each point in time? Msgbox using `%fn`%() ;inconsistency t := new test() %t%("Hello World") %t%("Hello World", "Hello World 2") %t%() Msgbox using fn.call ;featuring the stuff of nightmares t2 := new test() t2.c...

Go to advanced search