developer
900 TopicsThe Diagonal Suite: Gentle thunking goes a long way!
I've become a big advocate for gentle thunking - using thunks to delay eager evaluation wherever possible in generalized Lambda development. The timings are quicker and the logic is cleaner. On the other hand, thunking the results of MAP, BYROW, or BYCOL - especially when it leads to rows of thunks - tends to introduce recombination overhead and complexity. I think thunking is often dismissed as “too complex,” and that’s understandable if someone’s first exposure involves unwrapping a row of thunks. When used gently thunking becomes indispensable. Typically, I introduce the thunks after the initial benchmarking to see the difference in the calculation times and the after is always quicker. To illustrate, I’ll share The Diagonal Suite - a collection of functions where thunking is used at every opportunity. Simple, clean, deferred logic. What are your thoughts on gentle thunking? Where have you found it helpful/harmful in your own Lambda development? //The Diagonal Suite - Version 1.0 - 10/27/2025 //Author: Patrick H. //Description: Directional traversal and diagonal logic for 2D arrays. // Functions: // • Traverseλ - Directional traversal engine // • ByDiagλ - Diagonal-based aggregation // • DiagMapλ - Wrapper for diagonal matrix extraction // • DiagIndexλ - Targeted diagonal extraction // • Staircaseλ - Construct diagonal staircases from a vector or 2D array //──────────────────────────────────────────────────────────── //------------------------------------------------------------------------------------------- //Traverseλ - Directional Axis Remapper //------------------------------------------------------------------------------------------- //The selected axis is remapped to the top-left traversal order. //Accepted directions: // "NE" or 1 → Northeast (↗) // "SE" or 2 → Southeast (↘) // "SW" or 3 → Southwest (↙) //Parameters: //array → 2D input array (scalars not accepted) //new_axis → Axis direction ("NE", "SE", "SW" or 1–3) Traverseλ = LAMBDA( array, new_axis, //Input validation IF(OR(ROWS(array)=1,COLUMNS(array)=1), "#2D-ARRAY!", IF(AND(ISNUMBER(new_axis),OR(new_axis<=0,new_axis>3)),"#AXIS!", LET( //Dimensions i, ROWS(array), j, COLUMNS(array), //Axis traversal indices (deferred) x_NE, LAMBDA(SEQUENCE(j,,1,0)*SEQUENCE(,i)), y_NE, LAMBDA(SEQUENCE(j,,j,-1)*SEQUENCE(,i,1,0)), x_SE, LAMBDA(SEQUENCE(i,,i,-1)*SEQUENCE(,j,1,0)), y_SE, LAMBDA(SEQUENCE(i,,j,0)+SEQUENCE(,j,0,-1)), x_SW, LAMBDA(SEQUENCE(j,,i,0)+SEQUENCE(,i,0,-1)), y_SW, LAMBDA(SEQUENCE(j,,1)*SEQUENCE(,i,1,0)), //Axis mode selection mode, IF(ISNUMBER(new_axis),new_axis, SWITCH(new_axis,"NE",1,"SE",2,"SW",3,1)), //Index selection x, CHOOSE(mode,x_NE,x_SE,x_SW), y, CHOOSE(mode,y_NE,y_SE,y_SW), //Unwrap indices and get results result, INDEX(array,x(),y()), result ) ))); //------------------------------------------------------------------------------------------- //ByDiagλ - Diagonal-based aggregation //------------------------------------------------------------------------------------------- //Apply an ETA function or Lambda to diagonals //Parameters: //array → 2D input array (scalars not accepted) //[function] → ETA function or Lambda applied to diagonals //[row_wise_stack?] → Optional: Display results as a vertical stack ByDiagλ = LAMBDA( array, [function], [row_wise_stack?], //Check array input ValidateDiagλ(array,,function,row_wise_stack?, LET( //Optional parameters No_Function, ISOMITTED(function), No_row_wise_stack,ISOMITTED(row_wise_stack?), //Dimensions i, ROWS(array), j, COLUMNS(array), //Diagonal count k, MIN(i,j), //Indices - deferred r, LAMBDA(SEQUENCE(k)*SEQUENCE(,j,1,0)), y, LAMBDA(SEQUENCE(k)+SEQUENCE(,j,0,1)), c, LAMBDA(IF(y()>j,NA(),y())), //Unwrap indices, shape, and aggregate result, IFNA(INDEX(array,r(),c()),""), shaped, IF(No_row_wise_stack,result,TRANSPOSE(result)), final, IF(No_Function,shaped, IF(No_row_wise_stack,BYCOL(shaped,function), BYROW(shaped,function))), final ))); //------------------------------------------------------------------------------------------- //DiagMapλ - Wrapper (Calls ByDiagλ) to extract diagonals as 2D matrix //------------------------------------------------------------------------------------------- //Calls ByDiagλ to extract the diagonals from a 2D array. //Parameters: *Please see ByDiagλ for descriptions.** DiagMapλ = LAMBDA( array, [row_wise_stack?], ByDiagλ(array,,row_wise_stack?) ); //------------------------------------------------------------------------------------------- //DiagIndexλ - Targeted diagonal extraction //------------------------------------------------------------------------------------------- //Extract a diagonal or anti-diagonal vector from a 2D array. //Parameters: //array → 2D input array (scalars not accepted) //col_index → Column number to start from. Negative = anti-diagonal DiagIndexλ = LAMBDA( array, col_index, //Input checks ValidateDiagλ(array,col_index,,, LET( //Dimensions i, ROWS(array), j, COLUMNS(array), //Diagonal direction: +1 = SE, –1 = SW s, SIGN(col_index), //Determine diagonal length based on bounds k, IF(s>0, MIN(i, j + 1 - col_index), MIN(i, ABS(col_index))), start, IF(s<0,ABS(col_index),col_index), //Indices - deferred x, LAMBDA(SEQUENCE(k)), y, LAMBDA(SEQUENCE(k,,start,s)), //Unwrap indices and extract vector deliver, INDEX(array,x(),y()), deliver ))); //------------------------------------------------------------------------------------------- //Staircaseλ — Construct diagonal staircases from a vector or 2D array //------------------------------------------------------------------------------------------- //Parameters: //array → Input array (flattened to vector row-wise) //block_size → Number of rows/columns per staircase block //[block_offset] → Optional padding between staircases //[IsHorizontal?] → Optional toggle for column-wise orientation //[IsAntiDiag?] → Optional toggle to display staircase anti-diagonal. Staircaseλ = LAMBDA( array, block_size, [block_offset], [IsHorizontal?], [IsAntiDiag?], //Check inputs ValidateStaircaseλ(array,block_size,block_offset, LET( //Check optional parameters no_Block_Offset, ISOMITTED(block_offset), zero_Offset, block_offset=0, col_offset, IF(No_Block_Offset,0,block_offset), IsVertical?, ISOMITTED(IsHorizontal?), Not_Anti_Diag, ISOMITTED(IsAntiDiag?), //Convert to vector and get dimensions flat, TOCOL(array), k, COUNTA(flat), seq, LAMBDA(SEQUENCE(k)), V, TOROW(EXPAND(WRAPROWS(seq(),block_size),, block_size+block_offset,0)), width, COLUMNS(V), //Anchors and indices - deferred i, LAMBDA(SEQUENCE(block_size)*SEQUENCE(,width,1,0)), col_arr, LAMBDA(IF(Not_Anti_Diag,SEQUENCE(,width), SEQUENCE(,width,width,-1))), j, LAMBDA(MOD(col_arr(),block_size+block_offset)), j_, LAMBDA(IF((no_Block_Offset)+(zero_Offset), IF(j()=0,block_size,j()),j())), idx, LAMBDA(IF(i()=j_(),V,NA())), //Obtain results, shape, and calculate result, DROP(IFNA(INDEX(flat,idx()),""),,-col_offset), final, IF(IsVertical?,TRANSPOSE(result),result), final ))); //---------------------Error Handling & Validation--------------------------- //Validates inputs for Staircaseλ. Please see Staircaseλ for parameter //descriptions. ValidateStaircaseλ = LAMBDA( array, block_size, [block_offset], [on_valid], LET( //Checks NotArray,TYPE(array)<>64, Invalid_block_size, OR(ISTEXT(block_size),block_size<=0,block_size>COUNTA(array)), Invalid_block_offset, OR(ISTEXT(block_offset),block_offset<0), //Logic gate IF(NotArray, "#NOT-ARRAY!", IF(Invalid_block_size, "#BLOCK-SIZE!", IF(Invalid_block_offset,"#BLOCK-OFFSET", on_valid)))) ); //---------------------Error Handling & Validation--------------------------- //Validate inputs for ByDiagλ, DiagMapλ, and DiagIndexλ. //*Please see those functions for parameter descriptions.* ValidateDiagλ= LAMBDA( array, [col_index], [function], [row_wise_stack?], [on_valid], LET( //---Checks--- //Array input IsArray?, TYPE(array)=64, Not_Array, NOT(IsArray?), //Col_index No_Col_Index, ISOMITTED(col_index), Col_Index_Included, NOT(No_Col_Index), Not_Valid_Col_Index?, NOT(AND(col_index<>0, ABS(col_index)<=COLUMNS(array))), //Function No_Function, ISOMITTED(function), Function_Included, NOT(No_Function), Invalid_Function?, AND(ISERROR(BYROW({1,1},function))), //Shaping input RowWiseStack?, NOT(ISOMITTED(row_wise_stack?)), //Deterine which function is being validated DiagIndex, Col_Index_Included, ByDiag, AND(No_Col_Index, Function_Included), DiagMap, AND(No_Col_Index, No_Function), //Logic gates //DiagIndexλ a, IF(Not_Array, "#NOT-ARRAY!", IF(Not_Valid_Col_Index?,"#COLUMN-INDEX!", on_valid)), //ByDiagλ b, IF(Not_Array, "#NOT-ARRAY!", IF(Invalid_Function?, "#FUNCTION!", on_valid)), //DiagMapλ c, IF(Not_Array, "#NOT-ARRAY!", on_valid), //Logic gate selection decide, IF(DiagIndex,a, IF(DiagMap,c, IF(ByDiag,b, "#UNROUTED!"))), decide )); //End of The Diagonal Suite - Version 1.0 //Author: Patrick H.30Views0likes0CommentsAccess fixes released in versions 2507 and 2508
Version 2507 (Build 19029.20136) Bug Name Issue Fixed Alert, “The Microsoft Access database engine cannot find the input table or query ‘MSysSQLComments’.” when importing queries from an old database which has never been used with the Monaco SQL editor Importing queries from older databases now works correctly Queries do not save when they contain Unicode characters This happened only with the new Monaco SQL editor and should now work correctly Error "The Object isn't open" when running Find Duplicates and Crosstab query wizards This happened only with the new Monaco SQL editor and should now work correctly Crash when pressing F1 in Monaco SQL Editor F1 will now launch context sensitive help when used with the Monaco SQL editor Error “Object is not connected to server” when referencing OLE automation object in VBA code This could happen when referencing the OLE object stored in an Unbound Object Frame, such as a PowerPoint slide or Word Document Crash when opening a query directly into SQL view This happened only with the new Monaco SQL editor. All queries should now be able to open successfully directly in SQL view Images sometimes do not display correctly on buttons/image controls All buttons and image controls should now correctly display images Announce deprecation of Salesforce connector We added a callout to let people know about the imminent deprecation of the Salesforce connector Version 2508 (Build 19127.20154) Bug Name Issue Fixed Control wizards do not launch when adding new controls to subform in design view The control wizards will now work when adding a control to a subform Access terminates unexpectedly when pressing F6 key in Design View F6 should now navigate correctly with forms in design view Unable to select large number (BigInt) field within "Find Unmatched Query Wizard" You can now select Large Number fields in the Find Unmatched Query Wizard Some wizards giving an error in 32-bit builds on launch “There was an error loading an ActiveX control on one of your forms or reports.” All wizards should now launch correctly Invalid output when exporting to HTML Some fields (e.g., number and date/time) were being incorrectly encoded Please continue to let us know if this is helpful and share any feedback you have.458Views6likes3CommentsAccess doesn't close properly. A remaining background process can only be terminated in task manager
Since yesterday I noticed that in all my Access databases there is a problem when I close them. When I close a database, it leaves a background process that can only be terminated in Task Manager. Without this, it is not possible to (re)open databases! I have already checked some possible causes. It also concerns databases that I have not changed at all in recent months and that worked fine until this week. Therefore, I have to assume that it is a bug in an automatic update! It seems that it has to do with a malfunction in the deallocation of allocated memory in VBA source code. Did anyone experience the same problem? Are there already fixes or solutions available?Solved92KViews8likes190CommentsAccess announces removal of Salesforce ODBC driver in October 2025
MS Access 2019 (and newer) ships a licensed Salesforce ODBC driver from InsightSoftware that will lose sustaining support after June 30th, 2026. But because we can no longer provide updates for the driver, the Access team has decided to accelerate the removal of this driver and remove it from the product in October 2025. Applies to: Access 2019 volume licensed and Enterprise plans Access 2021, Access 2024, and Microsoft 365 subscriptions Access 2021 and Access 2024 as part of the Office 2021 and Office 2024 perpetual licenses (standalone versions) The Salesforce ODBC driver bundled with Office includes shared libraries such as: libcurl.dll libcrypto-3.dll libssl-3.dll These libraries are located under the following path: Program Files\Microsoft Office\ODBC Drivers\Salesforce. They may also be present in different locations. Drivers installed by Office and used to access your Salesforce data will be removed on permanently on October 28, if you are using Access as part of a Microsoft 365 Apps monthly version and on November 11 if you are on the semi-annual release. For customers using perpetual Access 2019, 2021, or 2024, the drivers will be removed on November 11. You do not need to manually remove the drivers. Access currently doesn't have a way to talk directly to the Salesforce APIs so customers must continue to use the standardized ODBC driver framework that we currently support. Customers can independently purchase the Simba.DLL driver if needed from InsightSoftware. There are also other vendors that offer a Salesforce driver. Simba driver from InsightsSoftware https://insightsoftware.com/simba/ ODBC driver from devart https://www.devart.com/odbc/salesforce/ Salesforce integration from boomi https://boomi.com/solutions/application/salesforce/ Salesforce driver from cdata https://www.cdata.com/drivers/salesforce Once you purchase and install the driver, Access can connect to your Salesforce external data source. On the External Data ribbon, choose New Data Source > From Other Sources > ODBC Database We will provide more updates when available.25KViews2likes1CommentRemove sub-folder urls if the parent folder url exists
I have an excel sheet with one column which contain urls from sharepoint, the urls looks as follow:- /sites/Marketing/Budget /sites/Marketing/Budget/2015 /sites/Marketing/Budget/206 /sites/maps /sites/Expesnes /sites/Expenses/2020 now i want to delete all the sub-folders if their parent folder exists? so for example the above rows should be as follow:- /sites/Marketing/Budget /sites/maps /sites/Expesnes is there any script i can run to do this cleanup? Thanks85Views0likes2CommentsExcel macro VBA issues
Hey guys. - I wrote a macro, which contain other macros using Call orders. If I running the macros separately everything ok, from the main macro one of them didn't running it's like it skipped from the list. Reason unknown. -On running I can see 4 application window get visible, and those didn't connect any kind of application. Also a Clipboard error message get visible, but I get a Clipboard cleaning macro, which several times cleaning the Clipboard, so it can't be. It's like a hack, or something which I don't recognize. - One a sheets called Total, I can't use the built in group function and can't collapse the selected section so the project I working on lost functionality. I didn't make any change on that side, but previously it was useable. Thanks for help in advance. Cheers. Zsolt50Views0likes2CommentsMacros crashed Word, then disappeared, now back again but not working
My problem started with a few macros in Word (Office 365) crashing Word, then the list macros, while still showing up with Alt+F8, disappeared from VBA. I played around with templates and such, and now have the VBA showing the whole list of macro scripts. However, there is a red scroll icon on my macros list and I have had the message "Your organizations administrator turned off the service required to use this feature", which is odd because I am the administrator (this is a home Office 365 subscription). So I can see the macros in VBA but I can't run any of them, nor can I create any new macros. How do I get my macros up and running again? (I tried to 'repair' Office, and after the full repair ended up with a version of Word that isn't as customised as it used to be.) And what might be the cause of this problem?74Views0likes2CommentsAccess Error on File Import through VBA
We are running a custom VBA routine in Microsoft Access that imports and parses text files into a database. Starting around September 9th, some machines began showing an error dialog during this process. The dialog mentions a failure in the VBA Regular Expression engine. The error does not occur consistently. On the same machine, the import may succeed several times and then fail (roughly 1 out of 4 attempts). The behavior appears to vary depending on the input file. The VBA code itself has been unchanged for years and continues to function correctly on older builds. We are wondering if this is related to a recent update in Access or the VBA runtime. Has anyone else encountered this behavior, and are there known workarounds or fixes? Going to leave version numbers out of this post because it keeps getting deleted and I'm not sure why. This is my 4th or 5th attempt to write this post and it keep getting auto-moderated.69Views0likes3CommentsWorking with workbooks shared via Teams/Sharepoint
Hello Excellers, I need some insight on an issue that I am not sure what the source is... A) We sometimes share workbooks via Teams. You know when you are in a particular chat and next to the name of the chat at the top of the screen you see Shared and then you see Files button a bit below the Shared menu and when you click on that Files button you will see a list of what workbooks are shared. B) So I wrote some VBA code to download a copy to the Downloads folder like that: Dim RetVal As Long Dim SharePointFileURL As String Dim LocalDownloadPath As String Dim FileName As String RetVal = URLDownloadToFile(0, SharePointFileURL, LocalDownloadPath & FileName, 0, 0) If RetVal = 0 Then MsgBox "File successfully downloaded to: " & LocalDownloadPath & FileName, vbInformation This will message be replaced by the code we need to run... but for now I needed an indicator that it finished downloading. Else MsgBox "Failed to download the file. Please check the URL or your network connection.", vbExclamation End If So RetVal is = 0, and I do see the workbook in the \Downloads folder and it has a size of 4KB and the correct Date Modified time stamp, BUT When I try to open the workbook via the Excel desktop application I get the message: Excel cannot open the file "File name here" because the file format or file extension is not valid. Verify that the file is not corrupted and that the file extension matches the format of the file. The workbook should be 34KB in size and that 4KB file is not what I need??? Any ideas how to manage this, saving a workbook from a SharePoint / Teams file location to the computer so that we can run VBA code on it. GiGi154Views0likes4Comments