Re: [Jprogramming] Executing Locked Scripts from Nouns

2015-10-22 Thread Raul Miller
On Thu, Oct 22, 2015 at 7:55 PM, 'Pascal Jasmin' via Programming wrote: > the simple workaround is write it to a file, load, then erase the file. That is what Eric Iverson suggested also: > On Thu, Oct 22, 2015 at 4:42 PM, Eric Iverson > wrote: >> I suggest reading the file when you have acces

Re: [Jprogramming] Win API calls

2015-10-22 Thread bill lam
DWORD is uint32 : i LPTSTR is pointer to string, 2 versions, ascii version : *c unicode version : *w usually add suffix A for ascii, W for unicode version of function names. also look at the bottom of page to confirm the name of dll, in this case kernel32.dll 'kernel32 GetLogicalDriveStringsA​

Re: [Jprogramming] Executing Locked Scripts from Nouns

2015-10-22 Thread 'Pascal Jasmin' via Programming
the simple workaround is write it to a file, load, then erase the file. require 'format/printf' lockedV =: 2 : 0 a =. m sprintf boxopen n (3!:6 ] a) 1!:2 fl =. < jpath '~temp\filet.ijl' 0!:0 fl 1!:55 fl ) HashSalter =: 'SaltedHash_hashes_ =: ''sha256'' gethash ''%j'' , ]' lockedV The above does

Re: [Jprogramming] Executing Locked Scripts from Nouns

2015-10-22 Thread Raul Miller
I guess I didn't go looking for the locked script support. Of course, you could also implement something in user space. For example: ode=: (&.((8#2)&#:))(&.(a.&i.)) enc=: (_8 ]\[)@,@|:ode dec=: |:@($~ 8,#%8:)@,ode enc dec 'sum=:+/' sum=:+/ More elaborate possibilities exist, and of

[Jprogramming] JTECH Grade 4 Review of tables and the commutative property

2015-10-22 Thread Linda A Alvord
Note that rea and green is yellow light. Blue and green is cyan and blue and red is magenta. NB. Blend 8 Colors of GRB Light load 'viewmat' GRB=:|.255*1 0 2{"1 #:i.8 NAMES=:<>;:'WHITE YELLOW CYAN GREEN MAGENTA RED BLUE BLACK' GRB;NAMES T---┐ │255 255 255│

Re: [Jprogramming] Executing Locked Scripts from Nouns

2015-10-22 Thread Eric Iverson
I suggest reading the file when you have access and then using a temp file later on when you need to load it. This is an adequate workaround to what has always been a kludgey area. It is unlikely that Jsoftware has interest in 'bug fixes' in this particular area. We will likely, by year end, do a

Re: [Jprogramming] Win API calls

2015-10-22 Thread 'Pascal Jasmin' via Programming
probably, 'kernel32 GetLogicalDriveStrings​ i i *s'&cd the return value is first param. - Original Message - From: Devon McCormick To: J-programming forum Cc: Sent: Thursday, October 22, 2015 2:56 PM Subject: Re: [Jprogramming] Win API calls So, if I want to translate this call as

Re: [Jprogramming] Win API calls

2015-10-22 Thread Devon McCormick
So, if I want to translate this call as shown on MSDN: DWORD WINAPI GetLogicalDriveStrings( _In_ DWORD nBufferLength, _Out_ LPTSTR lpBuffer ); ​I need to do something like 'kernel32 GetLogicalDriveStrings​ i *'&cd ? On Thu, Oct 22, 2015 at 12:35 PM, bill lam wrote: > You can still cpoy

Re: [Jprogramming] Executing Locked Scripts from Nouns

2015-10-22 Thread Raul Miller
I get 0!:1]3!:6 'sum=:+/' � |open quote | � But, anyways, the source code for the interpreter is available, if you want to change how this works. (Get it working for yourself, or submit your changes back... either way...) -- Raul On Thu, Oct 22, 2015 at 12:40 PM, Thomas Costigliola

Re: [Jprogramming] Executing Locked Scripts from Nouns

2015-10-22 Thread Dan Bron
I reported this as a bug years ago. No rationale I can think of, except perhaps “unlocking” is done by the frontend, as opposed to the engine? -Dan > On Oct 22, 2015, at 12:40 PM, Thomas Costigliola wrote: > > Attempting to run a locked script from a noun doesn't work: > > 0!:1]3!:6 'sum=:

[Jprogramming] Executing Locked Scripts from Nouns

2015-10-22 Thread Thomas Costigliola
Attempting to run a locked script from a noun doesn't work: 0!:1]3!:6 'sum=:+/' � |spelling error | � I understand there might not have been an apparent use case for this, but is there a technical or security reason for the restriction? I need to read the contents of a locked script into a

Re: [Jprogramming] Win API calls

2015-10-22 Thread bill lam
You can still cpoy from the j602 winapi.dat file, eg the line kernel32 ReadFile i i * i *i * tell you the signature for ReadFile, and call it as 'kernel32 ReadFile i i * i *i *'&cd your parameters... However the signatures inside this winapi.dat are only correct for 32-bit windows. Anyways you

Re: [Jprogramming] Win API calls

2015-10-22 Thread chris burke
I am not sure what you are asking, but suggest that you google for example "MSDN ReadFile" to get the parameter definitions. On 22 October 2015 at 08:56, Devon McCormick wrote: > Can I figure out how to do this for the call I need by looking at one of > the existing API packages? > > > On Thu, O

Re: [Jprogramming] Win API calls

2015-10-22 Thread Devon McCormick
Can I figure out how to do this for the call I need by looking at one of the existing API packages? On Thu, Oct 22, 2015 at 11:38 AM, chris burke wrote: > It got dropped. The old winapi dated back to the Win95 days and was a > straight dump of VB calls. Some time ago we decided it was too out o

Re: [Jprogramming] Win API calls

2015-10-22 Thread chris burke
It got dropped. The old winapi dated back to the Win95 days and was a straight dump of VB calls. Some time ago we decided it was too out of date to distribute, and that it would be better to use MSDN. On 22 October 2015 at 07:48, Devon McCormick wrote: > I understand the forum traffic is light s

[Jprogramming] Win API calls

2015-10-22 Thread Devon McCormick
I understand the forum traffic is light since we're all riveted by the possibility of a Mets/Blue Jays world series, but I do have a J-related question. While attempting to load some old code, I get an error trying to load "winapi". I see a number of particular API libraries in the addons, but no