2110 i-beam

General APL language issues

2110 i-beam

Postby MBaas on Mon Nov 30, 2009 10:16 pm

I really like the idea of 2110⌶, but I must admit the doc for it is...a bit sparse. The doc for i-beam only mentions 2110⌶ in the context of "export to memory" whereas the do of recent changes also states that it can be used to export standalone-executables - but w/o any explanation of the right argument (which has no use, according to the 1st doc!).
Any chance you could share some more info on that one?

Oh, and BTW: now that there is a purpose for ⌶, can't it also get a place on the language-bar? ;)
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: 2110 i-beam

Postby Morten|Dyalog on Tue Dec 01, 2009 10:31 am

Not only is the documentation sparse, it is also wrong. The correct number for this I-Beam is 2100, as you can see here http://www.dyalog.com/help/12.1/html/export%20to%20memory%20ibeam.htm. A couple of references to this page incorrectly identify it as 2110.

This function currently ONLY exports to memory and it does not provide any options. The documentation says the argument is ignored; I would use an empty vector to allow for future extensions.
User avatar
Morten|Dyalog
 
Posts: 451
Joined: Tue Sep 09, 2008 3:52 pm

Re: 2100 i-beam

Postby MBaas on Tue Dec 01, 2009 1:06 pm

Thanks Morten - I guess in that case I need to revise the title, as I am really interested in the "standalone executable" created by 2110⌶ - for which there is also no doc, and the obvious idea to use the filename as right argument did not create an .exe but instead caused a DOMAIN ERROR (as did ⍬) . Maybe this uses parameter-pairs as arguments? I'd also appreciate the possibility to assign version info etc. programmatically ;)
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: 2110 i-beam

Postby JohnD|Dyalog on Tue Dec 01, 2009 2:08 pm

Hmm, that part of the documentation is incorrect too, sorry about that.

You can however (and this is really, really undocumented, so it may change), use 2 []NQ to create an exe:

2 []NQ '.' 'Bind' <app.exe> 'NativeExe' 0 '' <icon.ico> <cmdline>

This binds the active workspace to make app.exe. It gets the icon in icon.ico, and passes <cmdline> to the interpreter engine at start up.

The last 4 arguments default so you can shorten it to:

2 ⎕nq '.' 'Bind' 'c:\tmp\mb.exe' 'NativeExe'

/john
User avatar
JohnD|Dyalog
 
Posts: 74
Joined: Wed Oct 01, 2008 9:35 am

Re: 2110 i-beam

Postby MBaas on Tue Dec 01, 2009 2:40 pm

Cool :)

Thanks John, that does the trick. Now, as we're obvisouly getthing this precious little gem documented, can you perhaps elaborate a bit on the 0 and '' following the name of the .exe? ;)

Thanks

Michael
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: 2110 i-beam

Postby JohnD|Dyalog on Wed Dec 02, 2009 12:55 pm

Please don't consider these comments as formal documentation.

The '0' is actually a combination of flags. The only values that I think will be useful to you are 2 for a console app and 8 for a runtime app.

The empty vector is used internally when building a .net assembly for ASP.NET, and need not concern you.

The first parameter can be one of 'Library' (to make a .Net assembly) or 'NativeExe' (to make a, erm, native exe).

/john
User avatar
JohnD|Dyalog
 
Posts: 74
Joined: Wed Oct 01, 2008 9:35 am

Re: 2110 i-beam

Postby Veli-Matti on Wed Dec 02, 2009 5:20 pm

Hi, John!
Is there any way to attach the Version information to the executable with []NQ, too?

- Veli-Matti
Veli-Matti
 
Posts: 93
Joined: Sat Nov 28, 2009 3:12 pm

Re: 2110 i-beam

Postby MBaas on Sun Dec 13, 2009 4:14 pm

Good question/suggestion, Veli-Matti - if we think about automating build-processes, for which this would be ideal, then a possibility to assign the version-no would be very useful :)
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: 2110 i-beam

Postby MBaas on Mon Dec 14, 2009 9:08 am

John, I have just distributed a NativeExe - and immediately got a support-issue, because the .exe complained about dyalog121_unicode.dll not being available. Are these always bound to the interpreter?
I also noticed that File/Export usually remembers the last selected type - but after running the NQ, that type is set to "Bound Executeable", and the checkmark in "Runtime-app" is removed. It may not be related, but it could indicate a bug...
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: 2110 i-beam

Postby Vince|Dyalog on Mon Dec 14, 2009 11:16 am

On a PC which has Dyalog 12.1 installed, you can simulate not having dyalog121_unicode[rt].dll by making a tmp subdirectory in the location "C:\Program Files\Dyalog\Dyalog APL 12.1 Unicode\bin\". Move all the dyalog121*.dll files to that tmp subdirectory. Also, ensure that you don't have the dlls in other locations such as where your standalone .exe file is.
Vince|Dyalog
 
Posts: 408
Joined: Wed Oct 01, 2008 9:39 am

Next

Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest