Re: Arrays vs Object for Key/Value pair lookups

2017-07-17 Thread Alan Chan via 4D_Tech
Case sensitive comparison support in Find in array/Find in sorted array is long overdue. Even best, supported in string compariosn operator (or new operator for string) $true:=($string1=*$string2) $true:=($string1>*$string2) $true:=($string1<*$string2) Alan Chan 4D iNug Technical

Re: Arrays vs Object for Key/Value pair lookups

2017-07-17 Thread David Adams via 4D_Tech
> "Find" commands accept wild cards and evaluate using collation algorithms (case-insensitive comparison plus some > other locale specific rules) is it really fair to compare the two against object keys? I'm not sure what "fair" means here, but it's definitely not a apples-to-apples comparison.

Re: Arrays vs Object for Key/Value pair lookups

2017-07-17 Thread Keisuke Miyako via 4D_Tech
the "Find" commands accept wild cards and evaluate using collation algorithms (case-insensitive comparison plus some other locale specific rules) is it really fair to compare the two against object keys? > 2017/07/18 9:44、David Adams via 4D_Tech <4d_tech@lists.4d.com> のメール: > > * Sequential Find

Re: Arrays vs Object for Key/Value pair lookups

2017-07-17 Thread David Adams via 4D_Tech
Hello all, I've been interested in this topic for some time but have never taken the time to run any tests. I don't have the time now (for sure), but I took some anyway. What I did was grab a huge unique word file, clear out words that are obviously illegal JSON key names and tried doing lookups

Re: Thinking through object/text fields: Findings summarized, advice solicited

2017-07-17 Thread David Adams via 4D_Tech
Hey Lee, thanks for the suggestions, that should save me some time for sure. On Tue, Jul 18, 2017 at 3:26 AM, Lee Hinde via 4D_Tech <4d_tech@lists.4d.com > wrote: > On Mon, Jul 17, 2017 at 5:40 AM, David Adams via 4D_Tech < > 4d_tech@lists.4d.com> wrote: > > > > > My biggest problem with

Re: Thinking through object/text fields: Findings summarized, advice solicited

2017-07-17 Thread David Adams via 4D_Tech
On Tue, Jul 18, 2017 at 2:08 AM, Kirk Brooks via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Hi John, > I haven't done very much communicating from 4D to a SQL database so this is > a very naive question - but could you talk about how a tool like Navicat > helps you with 4D? It doesn't. But if

Database Settings Publishing Info IP Address - Tip

2017-07-17 Thread Allan Udy via 4D_Tech
Here's another tip for the archives... We have one client running a web server db under 4D v14.4. We're working at moving this to v16 in the very near future, but wanted to do a few tidy up's in v14 before we started the update process. Things went badly and suddenly no one could connect to

Re: version of openssl in 15.4 mac

2017-07-17 Thread Keisuke Miyako via 4D_Tech
you could also... $version:="" $param:=Get database parameter(94;$version) but it is good to make it a habit of reading the release notes for every update. ** 4D Internet Users Group (4D iNUG) FAQ:

Tip: Finding scheduling conflicts

2017-07-17 Thread David Adams via 4D_Tech
Ever had to do date math where you need to detect conflict schedules? Recently, I had to do some data analysis that involved checking for potential conflicts in a schedule, counting them, and figuring out how big the conflicts were. This isn't a live schedule, it's historical scheduling data used

Re: Arrays vs Object for Key/Value pair lookups

2017-07-17 Thread Justin Leavens via 4D_Tech
I did a 2014 Summit presentation (5 JSON Tips) which should be available for download that demonstrated the benefits of using objects for key/value pair cache lookups, but in the end it’s pretty easy to demonstrate. The benefits start to show up with a few hundred keys, but at 100,000 it’s easily

Re: version of openssl in 15.4 mac

2017-07-17 Thread Lee Hinde via 4D_Tech
Thanks Tim. > On Jul 17, 2017, at 11:06 AM, Timothy Penner wrote: > > v15.3 had an update: > http://download.4d.com/Documents/Products_Documentation/LastVersions/Line_15/VIntl/4D_v15_3_ReleaseNotes_US.pdf > > Library Update > Open SSL: Upgrade to version 1.0.2j > > -Tim > >

RE: version of openssl in 15.4 mac

2017-07-17 Thread Timothy Penner via 4D_Tech
v15.3 had an update: http://download.4d.com/Documents/Products_Documentation/LastVersions/Line_15/VIntl/4D_v15_3_ReleaseNotes_US.pdf Library Update Open SSL: Upgrade to version 1.0.2j -Tim ** 4D Internet Users Group (4D iNUG)

RE: version of openssl in 15.4 mac

2017-07-17 Thread Timothy Penner via 4D_Tech
Hi Lee, This sort of change should be in a document called "Release Notes" available from the Downloads Page: http://www.4d.com/downloads/products.html For example, v16.1 shows this: Library Update Open SSL: Upgrade to version 1.0.2k

version of openssl in 15.4 mac

2017-07-17 Thread Lee Hinde via 4D_Tech
I read somewhere that the openssl version got bumped in version 15.4. But I can't find where. I did find this: http://kb.4d.com/assetid=76175 : Tech Tip: How to Find the Version of OpenSSL used in 4D with this: - Windows 1. Locate the folder containing 4D.exe or 4D Server.exe

Re: Thinking through object/text fields: Findings summarized, advice solicited

2017-07-17 Thread Lee Hinde via 4D_Tech
On Mon, Jul 17, 2017 at 5:40 AM, David Adams via 4D_Tech < 4d_tech@lists.4d.com> wrote: > > My biggest problem with PostgreSQL is the relative lack of nice front-end > tools. My beloved SequelPro for MySQL has long hinted at a PostgreSQL > version, but it doesn't seem to be there yet. For MySQL

SQL Issue

2017-07-17 Thread Charles Miller via 4D_Tech
Environment MAC 4D v15 internal sql Given the following code Begin SQL update [Tracking] set [Tracking].[IssueDate] = :$NewTracking_d where [Tracking].[PatientRef] = :$PatientRef_L and [Tracking].[TestRef] = 62; End SQL Where all fields are correct I see a warning on the Set Line and when run,

Re: Resetting The Explorer Window - Tip

2017-07-17 Thread Douglas von Roeder via 4D_Tech
Allan: Thank you for passing this along. It's very helpful. -- Douglas von Roeder 949-336-2902 On Sun, Jul 16, 2017 at 8:32 PM, Allan Udy via 4D_Tech <4d_tech@lists.4d.com > wrote: > Hi All, > > Here's a quick tip if you suddenly loose the buttons at the bottom of your > Explorer window, as I

Re: Thinking through object/text fields: Findings summarized, advice solicited

2017-07-17 Thread John DeSoi via 4D_Tech
I bought Navicat 11 a few months ago after they made some nice improvements in the SQL editor. I thought it was the most Mac friendly of any PostgreSQL tools. Shortly thereafter Navicat 12 was released. I'm pretty sure it is not Java, but I think they switched to some other GUI library to make

Re: Arrays vs Object for Key/Value pair lookups

2017-07-17 Thread Peter Jakobsson via 4D_Tech
On 17 Jul 2017, at 17:03, Herr Alexander Heintz via 4D_Tech <4d_tech@lists.4d.com> wrote: > so I queried for the language I needed and then > apply to selection([dict];ob set(<>Dict;[dict]WordKey;[dict]Word) Ah ! So you just ‘hoover up’ into your dictionary object. Like a hoover ? Peter

Re: Arrays vs Object for Key/Value pair lookups

2017-07-17 Thread Herr Alexander Heintz via 4D_Tech
That’s basically it. only I don not need the wrapper anymore, i go directly to word:=OB Get(<>Dict;$t_MyKey;is Text) Using arrays I sorted the key array and used my own optimized array query routine (same as the new Find in sorted array introduced in V16). With object, no need to sort, the

Re: Set_Exists() function: Simple version

2017-07-17 Thread Chip Scheide via 4D_Tech
this is basically what I did, but used arrays rather then ab object. shameless plug : https://www.dropbox.com/s/075k0ap7afervs8/Sets_Component_v1.0.zip?dl=0 Distributed as shareware $15 ($35 for source & a suite testing routines), it is a compiled/built component created in v13. If you like it

Re: Set_Exists() function: Simple version

2017-07-17 Thread Chip Scheide via 4D_Tech
David, I wrote a complete collection of set operation routines here : https://www.dropbox.com/s/075k0ap7afervs8/Sets_Component_v1.0.zip?dl=0 Distributed as shareware $15 ($35 for source & a suite testing routines), it is a compiled/built component created in v13. If you like it you are free to

Re: Arrays vs Object for Key/Value pair lookups

2017-07-17 Thread Keith Culotta via 4D_Tech
Take a look at the new http://livedoc.4d.com/4D-Language-Reference-15.4/Arrays/Find-in-sorted-array.301-3274895.en.html. This would change the FIA side of the equation. Keith - CDI > On Jul 17, 2017, at 5:46 AM, Peter Jakobsson via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > Hi > > I

Re: Thinking through object/text fields: Findings summarized, advice solicited

2017-07-17 Thread David Adams via 4D_Tech
Better and better, thanks John. That's great, I'd seen mention of TOAST but wasn't sure how it fit in. Now after 1 hour total, I'm feeling like a PostgreSQL smartie ;-) Since we're on this (not 4D) subject, I'll just mention a key detail about jsonb queries in PostgreSQL: They cannot take

Re: Arrays vs Object for Key/Value pair lookups

2017-07-17 Thread David Adams via 4D_Tech
Interesting subject. Just to make sure I am able to interpret the the findings correctly, were you comparing Find in array with object find, or *binary* find in array on a sorted array? Binary search is very hard (but certainly not impossible) to compete with. If you have an array of 1,000,000

Re: Resetting The Explorer Window - Tip

2017-07-17 Thread Ken Daniel via 4D_Tech
Allan, thanks for the tip. It helped me. Ken On Sun, Jul 16, 2017 at 11:32 PM, Allan Udy via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Hi All, > > Here's a quick tip if you suddenly loose the buttons at the bottom of your > Explorer window, as I did this afternoon -- I couldn't view method >

Re: Thinking through object/text fields: Findings summarized, advice solicited

2017-07-17 Thread John DeSoi via 4D_Tech
Note: PostgreSQL automatically and transparently compresses large variable length column values. https://www.postgresql.org/docs/9.6/static/storage-toast.html John DeSoi, Ph.D. > On Jul 17, 2017, at 12:10 AM, David Adams via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > The jsonb type

Re: Arrays vs Object for Key/Value pair lookups

2017-07-17 Thread Herr Alexander Heintz via 4D_Tech
I did a lot of testing for this as I need to keep a dictionary of words identified by word IDs with some 300 000 items around. I need to retrieve the words based on their ID. Using objects was MAGNITUDES faster than synchronised arrays (Cannot find the number anymore but we are talking

Arrays vs Object for Key/Value pair lookups

2017-07-17 Thread Peter Jakobsson via 4D_Tech
Hi I remember at last year’s summit, JPR was emphasising how objects were far more optimised than arrays for doing lookups over large numbers of key value pairs. e.g. we usually do this: $x:=find in array(myKEYS;”product_code_x”) if($x>0) $0:=myPRICES{$x} end if How do people prefer to do

Re: Set_Exists() function: Simple version

2017-07-17 Thread Robert Livingston via 4D_Tech
First I have to get some more logical errors out of my code. The below is cleaned up. C_BOOLEAN($0;$setDoesExist) C_TEXT($1;$setName) C_BOOLEAN($testInSet) C_LONGINT($numInSet) $setName:=$1 $numInSet:=Records in set($setName) If ($numInSet>0) $setDoesExist:=True Else

Re: Set_Exists() function: Simple version

2017-07-17 Thread Rob Laveaux via 4D_Tech
Maybe you should take a slightly different approach here. In the JavaScript framework that comes with NTK Plugin, 4D sets are implemented as follows (simplified version). function RecordSet( table ) { assert( table instanceof Table, 'Table object expected' ); this.id =

Re: Print Project Form

2017-07-17 Thread Robert Livingston via 4D_Tech
> On Jul 16, 2017, at 3:41 PM, Keisuke Miyako via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > the command is called Print form, it can not be more obvious! Keisuke: Thanks for taking time to reply In my world, things are often not obvious. In this case the reason is that the documentation

Re: Set_Exists() function: Simple version

2017-07-17 Thread Julio Carneiro via 4D_Tech
Robert, Just out of curiosity, what happens if there is no current record to add to the set? - do you get an error, which might only indicate no record exists to add to an existing set? - nothing happens, even if set does not exist? > On Jul 17, 2017, at 8:48 AM, Robert Livingston via 4D_Tech

Re: Set_Exists() function: Simple version

2017-07-17 Thread David Adams via 4D_Tech
Hey! Don't get me wrong about sets, they are GREAT. In my opinion, there one of 4D's great unsung features. SQL is always doing full set math, but that's *very* different to doing bit math on these big bit arrays (not exactly what a 4D set is, but for the sake of conversation...) 4D set operations

Re: Set_Exists() function: Simple version

2017-07-17 Thread Robert Livingston via 4D_Tech
In the sample code: $testInSet:=ADD TO SET($setName) should just be ADD TO SET($setName) ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options:

Re: Set_Exists() function: Simple version

2017-07-17 Thread David Adams via 4D_Tech
...or am I supposed to but Wayne to put in a tech support ticket? On Mon, Jul 17, 2017 at 5:44 PM, David Adams wrote: > Okay, on to my next remedial question: How do we find out if this is a > reliable behavior? > > I'm on the forums in France now a bit (where I've been

Re: Set_Exists() function: Simple version

2017-07-17 Thread David Adams via 4D_Tech
Okay, on to my next remedial question: How do we find out if this is a reliable behavior? I'm on the forums in France now a bit (where I've been making friends and helping everyone great each new day with optimism and good cheer), but I don't know where I meant to ask questions that will end up

Re: Set_Exists() function: Simple version

2017-07-17 Thread Robert Livingston via 4D_Tech
> On Jul 16, 2017, at 9:18 PM, David Adams via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > So, I'd be grateful if anyone that is Really Into Sets (we all know you're > out there!) gave it some thought. If it's reliable, great! If not, I'll > kill it rather than rely on it. I really should shut

RE: PHP Execute

2017-07-17 Thread Epperlein, Lutz (agendo) via 4D_Tech
> (please say yes) Yes! What's the reason of the question? Or, why do you think PHP and 4D don't work in a compiled environment? Regards Lutz -- Lutz Epperlein -- Agendo Gesellschaft für politische Planung mbH Köpenicker Str. 9 10997 Berlin

Re: Set_Exists() function: Simple version

2017-07-17 Thread Justin Carr via 4D_Tech
On 17 Jul 2017, at 5:03 pm, Robert Livingston wrote: > > >> On Jul 16, 2017, at 9:09 PM, Justin Carr via 4D_Tech <4d_tech@lists.4d.com >> > wrote: >> >> Are you able to provide a link to where the documentation states this? > > I really have

Re: Set_Exists() function: Simple version

2017-07-17 Thread Robert Livingston via 4D_Tech
> On Jul 16, 2017, at 9:09 PM, Justin Carr via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Are you able to provide a link to where the documentation states this? I really have to totally retreat here. Talk about faulty memory| When I wrote that note, I was "convinced" that I had just read in