Re: url no longer working as expected

2024-06-28 Thread Richard Gaskin via use-livecode
Likely the case. The expense of collating all that data and presenting it to 
their site visitors is considerable.  They use advertising to cover those 
costs.  If the data were easily scrapable, scrapers diminish revenue, putting 
the resource itself at risk.

Some data provides offer APIs.  When you see anti-scraping effects, look for 
API options (I saw none there but I didn't look deeply).  APIs take fewer 
resources to deliver, and may have strategic benefit for some data brokers.

But if they have scrape-prevention and no API, they're sending a clear signal: 
"We need to pay our bills, please send your traffic to our page so we can do 
that."

That said, I've come across stock APIs before, and while I don't recall many 
free ones there likely are some.

Richard Gaskin
FourthWorld.com



Paul Dupuis wrote:

> I get a response from Yahoos that is an html page with a 404
> information as part of it.
...
> I think this is Yahoo Finance not being able to detect the
> browser type and intentionally returning a 404 as a method
> of deterring screen scraping.
>
>
On 6/28/2024 1:04 PM, Hugh Senior via use-livecode wrote:
...
>> Problem:
>> Enter "https://uk.finance.yahoo.com/quote/SHEL.L/history/; into
>> any web browser and the page is displayed as expected.
>>
>> Use LC's URL command to access the same page direct returns a
>> 404
>> put url "https://uk.finance.yahoo.com/quote/SHEL.L/history/;
>>
>> Anyone got any insights?

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Slow stack problem

2024-06-27 Thread Richard Gaskin via use-livecode
Neville Smythe wrote:
> The same handler, same code, in a previous version of the
> offending stack, takes 0.06 seconds, both in the current
> 9.6.12 IDE, and using a standalone compiled under a
> previous LC version.

In your previous message yesterday you wrote:

> So I have done something to the data stack in the last
> few months. It is not a change of LC version or platform
> OS. A standalone I produced a couple of months ago does
> not display this slow behaviour when working on its old
> version of the data stack, but does show it when I apply
> it to the latest version of the data stack.

If the code hasn't changed but the data has, you've narrowed it down.

What is in the data stack?

Where does the data come from, and when/how does the data stack get updated 
with new data?

--
Richard Gaskin
FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: eMail attachment: best practice?

2024-06-27 Thread Richard Gaskin via use-livecode
Matthias wrote:

> Am 27.06.2024 um 02:48 schrieb Richard Gaskin>:
>> I wouldn't make anyone fill out anything. I'd just present
>> a window for them to review, and POST it to my web site.
>> The receiving CGI can do whatever I need. 
> 
> I would say this always depends on the purpose the app is
> supposed to fulfill.

Every good app does. :)


> In my private projects I am using quite often Livecode Server
> as the backend for my LC apps, but I had some customer projects
> in the past where the customer wanted an app to send out e-mails
> with special  attachments, like logfiles or reports or whatever
> and it had to be without user interaction. 

I think we're on the same page. I tend to prefer open disclosure for users to 
review data before sending from their local machine to a server, but it's not 
functionally necessary.  Most apps don't bother, and of course a POST command 
can be sent without any user interaction.


> In the days before tsNET I either used Shao Sean's e-mail
> library, Chip Walter's altEmailHarness or I called command
> line tools using shell function to get this done. 

If the final reciever *needs* to be an email client, nearly any method will 
require a mime wrapper for the payload.

The nice thing about doing that for sendmail on the server, rather than for 
whatever the user uses for email on the client, is we don't know what the user 
is using.  Things can get tricky with all the possible options one might 
discover a need to support (native email apps, webmail like GMail or Nextcloud, 
gawdonlyknows what special handling may be needed for monsters like Office 365, 
etc.).  Sendmail gives us one one well-documented compatibility target to build 
for and test against. And it's already available; I don't need to set up half a 
dozen client email options just to get started.

But the other benefit with POSTing to the server is you can change your mind 
easily about how you want to handle it.

Maybe today the reciever is a support person's email In Box, but if so that's 
really an intermediary place, where the final destination will be some form of 
issue tracking DB.

So one can go ahead and use sendmail to get the info to support in email today, 
and later revise the CGI handler to post directly into the issue tracker DB 
API, saving the payroll cost and error rate that comes with rote human 
intermediation.


Another consideration is trust, esp. when the method used requires users to 
enter their server credentials.

With a simple POST, no interaction is needed, no information the app doesn't 
already have in the course of normal use is obtained.  The situation is 
trustless, in the sense of trust not being a requirement to proceed.

The moment any app asks me for any server credentiails, I need to stop and 
consider the implications.  If the app is my email client, of course I expect 
that, and I only use email clients I already trust.  With anything else I'm 
going to think it through carefully, and probably contact the vendor to seek a 
different method, if I bother continuing using the product at all.

Imagine if you went to a web site and the Contact form required your server 
creds.  Would you hand those over?

Do your users know you intimately enough to have complete confidence they can 
give you the keys to their kingdom in an app form?

I can imagine maybe some enterprise environments where that level of trust 
*might* be available.  But the same security awareness that makes the 
environment trustable probably wouldn't ask for server credentials.  Good IT 
staff regard all networks as hostile, even LAN.


In short:

- POST requires no more work for mime-wrapping the payload than client email;

- sendmail on the server is a simpler target than all possible email clints;

- can have a UI or not, as desired;

- leaves the door open for easy re-routing later on if needed;

- requires no trust from the user beyond what they might expect with any web 
form.


--
Richard Gaskin
FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: eMail attachment: best practice?

2024-06-26 Thread Richard Gaskin via use-livecode
I wouldn't make anyone fill out anything. I'd just present a window for them to 
review, and POST it to my web site. The receiving CGI can do whatever I need. 

If the diagnostic info is for a support issue, you may be able to use your 
support tracking DB's API to automate creating the ticket.

Richard Gaskin
FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Socket Packaging

2024-06-24 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote:
> I don’t use SSL because I don’t like having to deal with certificates,
> and also because I use a method for encryption that I don’t think
> anyone else has thought of, or at least I can’t find any info online. 

Encryption is half of what SSL offers, the other half being external validation 
that the server you're trying to reach hasn't been spoofed.

I used to roll my own but these days I have audit compliance to meet, so I just 
do things the OG way.

For those of you who need a cert on any modern Ubuntu, it's now a one-liner:

sudo apt install certbot python3-certbot-apache

Run that, follow the prompts, and you're good to go in seconds.

Details:
https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04


Of course it never hurts to do belt AND suspenders, so your encrpyted packaging 
can offer a second layer of protection for critical needs.

Richard Gaskin
FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Mosquitto library.

2024-06-12 Thread Richard Gaskin via use-livecode
Mike Kerner wrote:

> Richard wrote:
>> Either way, I'd imagine a subscribe client looking to avoid polling
>> is going to depend on a long-lived socket, no?
>
> That's part of the point of a websocket. you don't have to keep
> reopening it, and both ends can use it, as needed.

Exactly, websockets are useful in browser apps because browsers don't offer 
direct socket support.

LiveCode makes OS-native apps and supports sockets.

The socketTimeoutInterval lets us set how long they live.

What am I missing?

--
Richard Gaskin
FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Mosquitto library.

2024-06-08 Thread Richard Gaskin via use-livecode
Mike Kerner wrote:

> * if you're on mobile, you can use push

Desktop push isn't supported in LC's notifications API?


> * you can also set up a small web server in your app to receive messages.
> levure uses this technique to receive messages from a plugin in sublime
> text that a script has been updated (so livecode will reload the script)

Good on a LAN, but how do you get past a firewall without port forwarding?


> * if we get websockets working, that will be another way to make this work.

Do we need websockets on this?  XMPP, for example, runs over regular sockets.

Either way, I'd imagine a subscribe client looking to avoid polling is going to 
depend on a long-lived socket, no?


Richard Gaskin
FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Snapshot question

2024-06-04 Thread Richard Gaskin via use-livecode
Craig wrote:
> The docs must be wrong. I just tested with all seven of the graphic
> options in the tools palette, and they all rotate just fine.

I'd guess that Dictionary entry was written before July 7, 2007.

In the revcommonlibrary script you'll find the revRotatePoly command on lines 
496 thru 532, with the comment block above it noting the date it was added.

On line 506 it gets the EFFECTIVE points for any graphic styles that doesn't 
innately have a points property.

On line 525 it changes the style of the target graphic object to polygon if 
needed.

Those two changes are not present in the older revRotatePolygonOld command 
listed just below it.

--
Richard Gaskin
FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


LiveCode on Social Media

2024-06-03 Thread Richard Gaskin via use-livecode
For LC support nothing beats this use-list and the LC Forums, but for spreading 
the word about LC and the cool stuff you're making with it nothing beat social 
media.

Two of the largest social media discussion groups for LC are:


LinkedIn: "LiveCode Developers"
Best social media platform for professional interests
https://www.linkedin.com/groups/50811/


Facebook: "LiveCode Users"
One of the biggest platforms for general audiences
https://www.facebook.com/groups/livecodeusers


Is there a third I should include there?

If you use those platforms please consider joining the LC groups. The more 
active discussion that takes place there, the more newcomers may be introduced 
to the language we love.

--
Richard Gaskin
FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Saving data in standalone

2024-05-22 Thread Richard Gaskin via use-livecode
When I've used a group as a document view, sometimes I just copy the group to 
an invisible stackfile for storage.

The engine handles stackfiles efficiently and robustly.

If we had viewers it'd save me the copy step.
https://quality.livecode.com/show_bug.cgi?id=2786

Richard Gaskin
FourthWorld.com



Bob Sneidar wrote:
>
> Including datagrids? I have a save and restore method for
> Datagrids, but I don’t think I back up ALL the properties,
> just the critical ones.
>
> Bob S
>
>
>> On May 20, 2024, at 5:58 PM, Tom Glod wrote:
>>
>> I have a plugin that is not complete which can save livecode
>> groups and all of their properties, custom properties and
>> scripts.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: UPDATE: filterArray()

2024-05-20 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote:

> I’m surprised about the time differential.

I was too, but in the end it kinda makes sense.

Both LC and SQLite are complex scripting engines, where code has to be parsed 
and interpreted into executable machine instructions.  The one advantage of 
filtering LC arrays in LC Script is that it's with-the-grain, without needing 
to be reformatted for the expectations of a foreign system designed with no 
consideration of LC at all.

And never underestimate the internal complexity of RDBMS data structures.  
B-trees are flexible but computationally expensive.


> I guess the main advantage for using filterArray() is that using the
> LC parser, for each use case would require it’s own code. filterArray()
> is a one-stop-shop approach. For instance, if you need to compare data
> with another dataset (as in an SQL join) or finding the maximum value
> in a dataset, or limiting your results. 

Somewhat. If I read your code correctly, it create a single table from the 
array, limiting the depth of the array and thereby obviating the complexities 
inherent in operations across multiple tables.

For table-equivalent arrays, the query field provided for LC in that example 
stack lets you explore the possibilities just like the SQL query field there.  
The syntax is a bit different, e.g.:

   LC:   contains "arbitrary"
   SQL:  like '%arbitrary%'

...but both are readable and about as capable as the range of options each 
parser provides.

One could further generalize this example on the LC side, but it's so easy to 
custom-code solutions in LC I try remain mindful of the tradeoffs of 
generalization.

LC's value function has continually surprised me over the years with how well 
it works as a general-purpose expression evaluation engine.


> It’s conceivable that you could write a pseudo-database system
> that uses LC arrays instead of sql, but you would have to do
> auto saves to file on that kind of database to prevent data
> loss, and that would.

The example I delivered should already be using in-memory SQLite, with the same 
benefits and risks as LC's arrays.

Your arrayToSQLite includes:

  IF pDBFile is empty THEN put ":memory:" into pDBFile

...and I passed no file specifier to it.

Might be fun to add saving to both and see how that works out.


> LIKE queries are also one of the slowest kinds of queries there are,
> so any query that does not use an index is going to take a longer
> time. I suppose I could add indexing but that would create more first
> time overhead. 

Substring searches are a challenge in any scripting engine. It's laudible that 
not only does LC do them well, but also in the worst-case scenario, excuted in 
the dynamic context of the value function.


> I made the assertion when I first wrote this, that for single queries,
> the sql method would not be very performant, because the overhead of
> creating the database to begin with could be significant, but if
> subsequent queries were made directly on the database, the filterArray
> method would begin to catch up, because the LC parser method cannot
> gain efficiency with iteration. I suppose the real test would be to
> see whether or not direct queries agains a memory database is faster than the 
> LC parser. 

That's an interesting question, how performance would be affected if the 
translation from the LC-native form to the SQLite-native form were eliminated, 
to compare evaluation engines only.

Indexing is key to every data store, and I've experimented with hash-batched 
indices with some success over the years.  Tempting, tho I have to be mindful 
of my time these days, and lately reserve entertainment time for board game 
design. :)

But the question of isolating the effects of translating data between two 
systems with very different expectations seems central to this exercise: 
choosing storage structures per app needs, and then using the querying methods 
available for the chosen solution.

When associative arrays are the foundation of an app's operations, filtering 
them using LC-native syntax seems useful, esp, in those cases where it can 
deliver two orders of magnitude performance gain in about a dozen lines of code.

But of course for apps built around SQLite, there's no need to bother with LC 
arrays at all (except maybe for display operations like the DataGrid), since 
SQLite is also a very feature-rich, performant scripting engine.



>> On May 17, 2024, at 6:55 PM, Richard Gaskin wrote:
>> 
>> Thank you, Bob.
>>
>> It reminded me of a test I started a while back, and prompted me to finish 
>> the relevant part of it:
>> 
>> go url "https://fourthworld.net/lc/Array%20vs%20SQLite.livecode;
>>


Richard Gaskin
FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: UPDATE: filterArray()

2024-05-17 Thread Richard Gaskin via use-livecode
Thank you, Bob.

It reminded me of a test I started a while back, and prompted me to finish the 
relevant part of it:

go url "https://fourthworld.net/lc/Array%20vs%20SQLite.livecode;


Richard Gaskin
FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC compilation

2024-04-30 Thread Richard Gaskin via use-livecode
Kinda perfect, really. ;)

Richard Gaskin
FourthWorld.com


Bob Sneidar wrote:

> That LC compilation should read GROKING stupid spell correct.
> Seemed like a good idea at the time…
>
> Bob S
>
>
>> On Apr 29, 2024, at 4:28 PM, Bob Sneidar wrote:
>>
>> I have a hard enough time growing
>>

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Websockets ... again.

2024-04-27 Thread Richard Gaskin via use-livecode
Bernard Devlin wrote:

> One thing to bear in mind is that Livecode does not support secure sockets
> (despite what the Dictionary might say).

This is based on the Dictionary example for the "open socket" command. It runs 
without error, and the callback works. 

  on mouseup
 open secure socket to "livecodejournal.com:443"  \
with message "wasConnected" without verification
 put it & the result
  end mouseup

  on wasConnected
 put cr& the params after msg
  end wasConnected


I haven't taken the time to craft a more specific test, but perhaps you can 
describe what you encountered to help guide that.

--
Richard Gaskin
FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Websockets ... again.

2024-04-26 Thread Richard Gaskin via use-livecode
Tom Glod wrote:
> Can we get a measure again as to the interest in web sockets implementation
> in livecode?

Requested 2015, last activity 2020:
https://quality.livecode.com/show_bug.cgi?id=16091

Given the elapsed time so far, maybe we can find another way to do this.

- How hard would it be to script it using LC's good socket support?

- Is there a curl option available that might allow Charles to handle
  this more quickly in tsNet?

- Would it be feasible to use WebSockets through an embedded browser widget?

- What are the use cases requiring WebSockets excluisively?

- Given the better performance and ligher resource usage for normal sockets, 
could
  the service host consider supporting normal sockets in addition to WebSockets?


Richard Gaskin
FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Enhanced HTTPD - native HTTP 1.1 Livecode Socket Server

2024-02-28 Thread Richard Gaskin via use-livecode
FWIW I haven't heard from David, but with the economic numbers off to a good 
start this year I suspect he's just been as busy as most I know.

I know of at least one other LC fan with an interest in decentralized 
protocols, but I'm not sure how far he's gotten with his implementations.  I've 
mentioned LC in some of those circles, but those communities tend to make and 
use FOSS tools, so the conversation is usually very short.

Richard Gaskin
FourthWorld.com



On February 28, 2024 at 9:00 AM, Mike Kerner wrote:
> 
> just pinging to see if anything more has happened on this
> 
> and the how list is really quiet
> 
> On Tue, Feb 6, 2024 at 11:09?PM ambassador--- via use-livecode <
> 
> use-livecode@lists.runrev.com> wrote:
> 
> > David Bovill wrote:
> > 
> >  I've been working for a while on a native server written in Livecode 
> >  using sockets. I feel it is definitely something that is sorely needed
> >  - but to do it properly is more work that I initially thought. I need
> >  to add HTTP 206 partial content support -
> >  https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206. I expect
> >  there to be other things that will need to be added.
> >  Is anyone interested / need this? Or does anyone already have something
> >  they use?
> > 
> MC shipped with a simple HTTPd example included, and many years ago back
> 
>  when Pierre was still active here I dusted it off to add support for HTTP
>  1.1 so it would work with modern browsers: 
>  https://fourthworld.net/lc/mchttpd-4W.zip
> 
> It's been years since I touched it, and IIRC the only other change I made 
> was to use callbacks for both ends of the network I/O (for some reason
> Raney had used callbacks only on one side, tho I can't recall if his was on
> the write or read end). Callbacks for net I/O help a lot.
> 
> If you're already far enough down the road to be thinking of 206 errors,
> there's likely nothing here you haven't already written. But as an example 
> (slightly updated) of the sort of thing that used to ship with old versions 
> to encourage exploration of network apps, it may be a fun trip down memory 
> lane.
> 
> A question, if interesting to answer: one of the reasons I set this aside 
> was the beginning of a process of moving away from my own homegrown tools 
> for generic commodities like socket servers. Apache and Node cover most of 
> what I've needed since, and I don't have to maintain them, so I can focus
> on the stuff specific to my app. What are you working on these days? I 
> stumbled across your chat with Ward Cunningham in the Full Moon Happening 
> just a few months ago; good stuff. Curious if your interest in
> decentralization is still a focus, and whether it also includes things like 
> IPSF and blockchains. Maybe offlist if it's not too LiveCodey is fine.
>
> Richard Gaskin 
> FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Deployment: a plea/opportunity

2023-10-13 Thread Richard Gaskin via use-livecode
We see it here in this list. We see it in the forums. We see it wherever 
app deployment is discussed:


OS requirements for packaging/stapling/signing apps are onerous.

At the edge of, and sometimes exceeding, being prohibitively so.

There's no point in making a standalone if you can't ship it.

If pro devs with decades of experience struggle with this, newcomers 
will run screaming.


SIMPLIFYING DEPLOYMENT IS THE NUMBER ONE PRIORITY.

Pardon the all-caps. I rarely use them. But this is important.

Simplifying deployment is more important than "AI".
Simplifying deployment is more important than "nocode".

It is the single biggest pain point.

And so it is the single biggest opportunity.

Fulfill the promise of "Everyone can code": focus on simplifying deployment.

Step 1: Acquire Matthias' great tool.

Step 2: Enhance it for current requirements across platforms.

Step 3: Look for every opportunity to further simplify the process, and 
take it, at least one more simplification with each new build.


This is important. It really is.

--

And no, web export will not magically save things.  Even when that 
becomes truly production-ready, it's only for web apps.  Not everything 
needs to be a web app.


There are a hundred ways to make web apps.

There are few ways to make cross-platform native apps.

And almost none that rival what LC can do on the desktop.

Play into strengths.  Make native deployment the best it can be.

When that's done, only then resume work on more peripheral features.

--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


[OT] Re: Forum Software LC?

2023-09-28 Thread Richard Gaskin via use-livecode
Dan Brown wrote:
> A lot of corporations are indeed making a ton of money off
> the back of free
labour and free software. Thanks Stallman

 
Public goods benefit the public. I trust that those who choose to volunteer to 
contribute to public goods understand that will include businesses as well as 
individuals.
 
The relationship is often symbiotic: Apple is one of the key funders of what 
began as KDE's WebKit, a browser engine widely used far beyond Safari. Heroku 
has full-time staff contributing to PostgreSQL. Adobe and Microsoft are 
platinum funders of the Linux Foundation, where 3/4 of kernel contributors are 
salaried.
 
Even in my modest corner of the world, my business derives so much value from 
Ubuntu, Nextcloud, Inkscape, SuiteCRM, and others that I contribute to those 
projects where I can.
 
There is the occasional rug-pull from FOSS corps, like Oracle's infamous 
shenanigans with MySQL and OpenOffice, attempting to turn Free into Freemium.  
But those are few, and often backfire: MySQL was forked to MariaDB, OpenOffice 
forked to LibreOffice, even Owncloud forked to NextCloud, in each case bringing 
key devs and often the project founder with them.
 
I'm not familiar with anything Stallman has written advocating rug pulls or 
labor exploitation, but if I'm missing something I wouldn't mind catching up on 
that if you'll point the way.
 
--  
Richard Gaskin
Fourth World Systems
 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


[OT] Re: Forum Software LC?

2023-09-28 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote:
> Richard wrote:
>> That said, my circle of friends include a good many who still use IRC 
>> daily...

>
> You seem like a World Of Warcraft guy to me.
 
Worse: Mage Knight :)
 
--  
Richard Gaskin
Fourth World Systems
 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Forum Software LC?

2023-09-28 Thread Richard Gaskin via use-livecode

Keith Martin wrote:

> To me, Discord looks like a refugee from a moderately poorly
> designed BBS from 30 years ago. I use it (it's the student
> comms platform of choice for a course I teach on) and it does
> work well in the sense of being very functional, but it offends
> me on multiple levels.

You're not alone. When I started using it for board game discussions my 
first response was "Holy hellballz, which overcaffienated stoner fell 
too deeply in love with IRC?" :)


The functionality is great, but even just dropping the hashtag to 
distinguish channel labels would go a long way to making it look less 
like an IRC holdover.


That said, my circle of friends include a good many who still use IRC 
daily...


--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Livecode 10dp6 and web fonts

2023-09-28 Thread Richard Gaskin via use-livecode

Paul Dupuis wrote:

> So this is sort of an informal poll among Livecoders who MAKE
> multi-platform apps (defined as 2 or more platforms of (macOS,
> Windows, Linux, iOS, Android, Web)
>
> (A) Do you try to make your interfaces across platforms the
> SAME (as much as possible)?
>
> OR
>
> (B) Do you TAILOR each interface for the specific platform (as
> much as possible)?


The universe of software vast, and with games and other entertainment 
software, and educational other edge cases, there are solid arguments 
for a wide range of design priorities.


But when it comes to software for enhancing organizational productivity, 
it may be useful to step back from our app and look at the context of use.


An app is one part of a multi-step workflow.  The user brings things 
into our app space, does stuff with it there, and takes things produced 
there for use elsewhere.


Word processors take in ideas and notes, and output print and web 
documents.  Illustration tools take in visions and sketches and output 
diagrams and pictures.  QDA software takes in interviews and other 
source materials and outputs reports and analysis summaries.


With this in mind, a more user-centric question could be:


  Which number is larger:

  (A) Number of hours a given user will use one app across
  multiple operating systems.

  (B) Number of hours a given user will use multiple apps
  on a single operating system.


OS vendors have expended significant resources documenting the products 
of their research into user interface guidelines.


And the LiveCode team has undertaken significant effort in the v9 series 
to make delivery of OS-HIG-savvy apps easier than using just about 
anything else.


I don't believe all of those resources were a waste of time.

Beyond the simple comparative exercise above, I arrived at my 
appreciation for LC's xplat savvy following an email exchange I had a 
few years ago with Bruce Tognazzini on one corner of this subject: 
dialog button placement.


As you know, Mac dialogs put the default button at bottom-right, and Win 
puts the default at bottom-left.


I asked him whether I should use button placement consistent with my app 
or consistent with OS convention.


He described the research behind Apple's choice, and (tho we can expect 
a certain bias since he directed that research), he presented a strong 
cognitive argument favoring Apple's approach.


But on the question of consistency with user expectations borne of 
immersion in an OS, even where the OS convention is arguably inferior, 
he was equally clear:


Consistency is far more important. Otherwise, users
have to develop a very muddled rule that includes,
"except sometimes."



> And optionally, an opened ended question: Does your answer depend
> of what platforms you are deploying for?

I'd be surprised if it doesn't. Look at LC itself, made in a mostly-Mac 
office and more conformant with Mac conventions than with Win or Linux.


If you don't spend most of your time on Windows, you won't have 
developed the same expectations as someone who uses it exclusively.


But consider this: how many times have we seen a Windows app ported to 
Mac, and it's obviously a Windows port and it just doesn't feel right?


That's how Windows users see Mac ports that play fast and loose with 
Windows UI conventions.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Forum Software LC?

2023-09-28 Thread Richard Gaskin via use-livecode

William Prothero wrote:

> Discord looks really interesting. I'm thinking of trying it out.
> One thing I wonder about is user privacy. I know there are private
> channels, but does the entity supporting discord have access to
> user data, emails, names, etc?
>
> That will be the first question I'm asked.

It's a good question.  With almost every public service today, the 
answer will be negative.


Discord is free of charge but is not open source, so while you can set 
up a server there easily, someone else is hosting it, and like nearly 
every public service the TOS fine print allows data mining.  Same with 
Facebook, Twitter, LinkedIn, and pretty much every SaaS you use.


For the purposes Discord used for, this is usually fine.  Game 
publishers use it for support and tips, and a great many other orgs 
besides, and for that sort of discussion privacy needs are minimal.


For example, there's a growing HyperCard group hosted on Discord:
https://discord.gg/RZZv3wk4

But with VERY few exceptions, any service you're not hosting yourself 
will be subject to data mining in one form or another.*


Only self-hosted systems provide you with complete assurance about how 
user data is handled.


Discourse is free and open source, but for some the system requirements 
for self-hosting may be daunting.


No worries: there are many dozens of good packages for threaded 
discussion forums, and most are FOSS and can be self-hosted.  And if you 
use any shared hosting you can try out many of them easily enough in 
Softaculous or whatever one-click install system is provided by your host.


And Bill, it's been a couple years since we talked. If you want to kick 
around a few ideas for what your group needs, give me a call.  Always 
good to talk with you.






* Privacy rant:

I'm rebuilding all of my web tooling, and with that my content, and with 
that I just started the rewrite for my Privacy Policy.


When I wrote this more than 15 years ago, the biggest concern at the 
time was spam.  We hadn't yet seen comprehensive cross-indexed user 
behavior tracking used to build psychographic models capable of 
destabilizing entire regions, as we've seen with more modern information 
warfare (the US Senate Intel Committee reports on disinformation 
campaigns include a good methodology overview: 
https://www.intelligence.senate.gov/publications/report-select-committee-intelligence-united-states-senate-russian-active-measures 
).


So while I'll be extending some of the wording scope when my new site is 
published, I was frankly surprised at how well the rest of a 15-year-old 
policy has held up - here's the meat of it:



To be perfectly frank, we find it disappointing that so many
companies who sell products and services online also act as
mass-marketing companies, selling your email address and other
personal information to anyone who's willing to pony up the cash.

We offer our Privacy Policy as a challenge for all other online
companies:

Stick to what you do, do it well, and stop the practice of selling
customer information to strangers. If you can't be profitable
sticking with your core business and need to also sell your
customers' personal information to remain viable, maybe it's time
to rethink your business plan.

The sale of customer information to other companies is a
significant contributing factor to the ever-growing volume of
unsolicited commercial email (commonly called "spam"). Last
year alone spam cost ISPs more than US$7 billion, and the
aggregate cost to global industries is many times that. We
know there are many more legitimate ways to spread the word
about good products and services, and hope that by working
together we may one day see an end to spam.


If digital surveillance is of interest, I've found the work of author 
and EFF consultant Cory Doctorow particularly enlightening. This article 
provides a good intro to what he's been up to lately:

https://www.pasadenastarnews.com/2023/09/14/cory-doctorow-takes-on-big-techs-worst-impulses-in-the-internet-con/

--
 Richard Gaskin
 Fourth World Systems



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Forum Software LC?

2023-09-21 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote:
> Richard Gaskin wrote:
>>
>> Bob Sneidar wrote:
>>> Erm… neither of those are free. :-)
>>
>> Please explain.
>> https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md
>> https://discord.com/blog/starting-your-first-discord-server
>
>
> Well, if I go to my bartender and ask for a free beer, I might get one,
> but then the bartender or the owner has to pay for it.
 
True. These systems are popular enough that there's enough who choose to pay 
for optional premium services so the rest remains free of cost for everyone 
else.

> As for freedom, everyone I think knows that our freedoms are purchased
> at a precious price.
 
Also true.  After thousands of years of intellectual property theft, the Berne 
Convention of 1886 finally created a global framework establishing that the 
author of an original creative work has sole authority over its distribution.
 
A hundred years later the Free Software Foundation and others used the 
foundation established by the Berne Convention to create standardized licensing 
guaranteeing the freedom to read, modify, and redistribute software for any 
package using those licenses. These freedoms fostered such proliferation that 
today most of the world's software infrastructure is powered by open source.
 
--  
Richard Gaskin
Fourth World Systems
 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Forum Software LC?

2023-09-21 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote:
> Erm… neither of those are free. :-)


 
Please explain.
 
https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md
https://discord.com/blog/starting-your-first-discord-server
 
-- 
Richard Gaskin
Fourth World Systems
 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Forum Software LC?

2023-09-20 Thread Richard Gaskin via use-livecode

Rick Harrison wrote:

> On Sep 20, 2023, at 11:38 AM, Richard Gaskin wrote:
>>
>> The project is open source, so you can also host it yourself:
>>
>> https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md
>
>
> Thanks for the additional information.
>
> If I host it myself do I pay anything, or it is free?


It's free as in both freedom and beer.

From the COPYRIGHT.md file in the archive I linked to above:

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version
2 of the License, or (at your option) any later version.


That said, I'm sure they don't mind contributions to the project, in 
code or cash.


--
Richard Gaskin
Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


LC domain for sale: livecodeworld.com

2023-09-20 Thread Richard Gaskin via use-livecode
I had two extra LC-related domains, one of them sold quickly to a member 
of our community, and I have one remaining:


livecodeworld.com

I'd taken out the domain with the vision of using it to replace 
livecodejournal.com, but for SEO reasons I've decided to build out going 
forward on that older domain instead.


If there are no takers here I'll see if someone outside the LC community 
wants it. "Live coding" and "#livecode" are popular terms for the 
practice of coding live for a streaming audience.


But like the other domain I'd sold a few weeks ago, I wanted to make 
this available to the LC community first.


If interested the domain is listed at AfterNIC.com, and I'd be happy to 
discuss favorable pricing if you have a community-oriented use in mind.


We did the last domain sale with a trusted community member, so we were 
able to streamline quick transfer. I would do the same with just about 
any member of this list.


--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Forum Software LC?

2023-09-20 Thread Richard Gaskin via use-livecode

Rick Harrison wrote:

> On Sep 18, 2023, at 1:57 PM, Richard Gaskin wrote:
>>
>> Use Discourse.  There are others, but Discourse is currently the
>> go-to choice for new forums.  Great UX, open source.
>
> Discourse is $50 per month! No free option for that.

If you want the core team to also host and support it, yes, you can hire 
them to do that for a monthly fee. And for less than the cost of an 
hour's billable time, having their team handle everything can be a good 
value.


The project is open source, so you can also host it yourself:

https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md

--
 Richard Gaskin
 Fourth World Systems


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Forum Software LC?

2023-09-18 Thread Richard Gaskin via use-livecode
Rick Harrison wrote:
> Has anyone built Forum Software with LiveCode?
There are a lot of PHP
> ones, but I have yet to
find one that was built with LiveCode.

PHP is
> hacked all the time, and I have found
hacker bots that try to hack my
> server all
the time by exploiting holes in PHP.  They
even try to install
> PHP on my server so they
can then use it to hack my server!

I think
> Forum Software built with LiveCode
could be more secure, but I don’t
> want to
build it myself if someone has already
created it.

Suggestions?

 
Don't build it yourself. It's a lot of work.  Software is almost always more 
affordable to buy than build, and most forum packages these days are FOSS and 
free of cost.

Crafting the user experience alone would take months to do well.  And if you 
think security is lacking in established packages see what happens when you 
roll your own. ;)
 
Use Discourse.  There are others, but Discourse is currently the go-to choice 
for new forums.  Great UX, open source.
 
Another option that's become increasingly popular is to ditch hosting your own 
forum altogether and using Discord instead. Forums can be set up there for 
free, with native mobile apps available and rich APIs if you need to customize 
anything.
 
--  
Richard Gaskin
Fourth World Systems
 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Responsive Layout and Opencard

2023-09-07 Thread Richard Gaskin via use-livecode
James wrote:
> Is it my imagination or does using the responsive layout on a card 
> trap the opencard message?
 
I haven't used that widget, but I would imagine any moving/resizing of controls 
would be triggered by the resizeStack message, which on mobile is also sent 
when a stack opens.
 
Richard Gaskin
Fourth World Systems
 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Update RE: LC domains for sale

2023-08-01 Thread Richard Gaskin via use-livecode
learnlivecode.com is being sold (buyer has good plans for teachingLiveCode 
scripting, and I wish him the best with that).
 
livecodeworld.com remains available for now.
 
-- original message --
I had taken out these domains some time ago for possible projects, but now I'm 
planning on having those proposed services become part of the existing 
livecodejournal.com domain instead.
 
If anyone here is interested in these domains they're listed at AfterNIC.com, 
and I'd be happy to negotiate favorable pricing if you have a 
community-oriented use in mind:
 
 
livecodeworld.com
learnlivecode.com

 
--  
Richard Gaskin
Fourth World Systems
 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


LC domains for sale

2023-07-31 Thread Richard Gaskin via use-livecode
I had taken out these domains some time ago for possible projects, but now I'm 
planning on having those proposed services become part of the existing 
livecodejournal.com domain instead.
 
If anyone here is interested in these domains they're listed at AfterNIC.com, 
and I'd be happy to negotiate favorable pricing if you have a 
community-oriented use in mind:
 
livecodeworld.com
learnlivecode.com
 
-- 
 
Richard Gaskin
Fourth World System
 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What is your best practice for setting a script in a script?

2023-07-20 Thread Richard Gaskin via use-livecode
Paul Dupuis wrote:
> So in the instances where you have a script that creates an object
> and then sets the script of that object (example below), what is you
> best practice for having the script in a script and still be readable?
 
Why?
 
Among other concerns (robustness, debugging, maintenance), setting the script 
of an object requires turning off script encryption.
 
Dick Kriesel wrote:
>

Hi, Paul. The best way to set the script may be not to; that is, instead
> set the new object’s behavior to a button that contains the readable script.
 
^ this.
 
Simple, clean, with-the-grain.
 
Know the engine.
Trust the engine.
Use the engine.
 
--  
Richard Gaskin
Fourth World System
 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: permanency of an unsigned Android app on the phone?

2023-07-20 Thread Richard Gaskin via use-livecode
J. Landman Gay jacque wrote:
> Depending on the Android version the user
may need to bypass
> a scary warning, accept some permissions, and turn on
the ability
> to download from unknown sources in system settings
 
...and after the app is installed then immediatel turn sideloading back off.
 
It's powerful.  And the bad guys know it.  Don't run with it turned on.
 
-- 
Richard Gaskin
Fourth World System
 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


User Experience Success (or not quite) (was Re: Code-Signing Frustration)

2023-06-16 Thread Richard Gaskin via use-livecode

William Prothero wrote:
> Matthias' document on code-signing is very detailed. I should
> have used it from the start.

You would have been more likely to use it if it was built in with 
guidance to do so.


The value opportunity of tools like LiveCode is:

The shortest path from ideation to deployment.

This will never be a single step, but the design process for a toolkit 
like this is the process of continually removing steps in that journey.


The shorter that ideation-deployment distance is relative to the vast 
range of alternatives powering the 21st century's software revolution, 
the more clearly LC distinguishes itself, stands out from the crowd.


If we say, "Well packaging is a drag in every tool", we're aiming low.

Matthias' tool is great, but it's entirely invisible to newcomers. 
Heck, as we see here, its invisible to devs who've been using LC for 
decades.  You have to know about it to to use it. It simply isn't in the 
box.


Whether it gets bundled or similar functionality is integrated through 
some other means is less important.


The important point here is:


- The world is making a LOT of software.

- Little of that is made with LC.

- LC has a hundred untapped opportunities like this
  to improve the developer experience in ways
  that can more than offset the cost of learning
  an unusual language and workflow.

--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: The Backdrop's Purpose In Life

2023-05-26 Thread Richard Gaskin via use-livecode

Bob Sneidar wrote:

> HA! I just figured out what the purpose of the backdrop is!
> If you have multiple LC windows open and you tab to another
> app's window, then tab back to the LC window, ONLY that LC
> window will appear in the foreground. With Backdrop on, ALL
> the LC windows will become visible when you tab to any LC
> window.

The OS vendors help with that too:

Windows: Shift-click Taskbar icon -> "Bring All Windows Forward"

macOS:   Window menu -> Bring All to Front

--
Richard Gaskin
Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Latest video -- integration of AI into script editor

2023-05-19 Thread Richard Gaskin via use-livecode

Mark Smith wrote:

> On 18 May 2023, at 10:14 pm, Richard Gaskin wrote:
>
>> If you need to do that again:
>> http://fourthworld.net/lc/4W_FormMaker.rev
>
> Hi Richard, do you have a short introduction to FormMaker?

"It makes forms." :)

I have a large number of simple tools (a GB by now?) I've made to help 
with things I've worked on over the years. They're not like products or 
anything, just simple stuff to get a job done.


In this case, it reduces the steps needed to make a simple text entry 
form down to the one thing that will always require variance: the names 
of the fields.  Type those in the field provided, click a button, and it 
creates a label and entry field for each line you'd entered, all inside 
a group so you can easily handle appearance things like text font and 
size, and script binding by looping through all members of the group (I 
tend to populate sets of fields from arrays, with field names matching 
keys so one simple handler gives me binding everywhere quickly without 
having to think about it).


Having a good GUI layout tool like LC valuable.
Having it scriptable to automate common tasks is invaluable.


Some day I'll get around to doing a writeup on a layout construction 
metalanguage I was working on a while back to extend layout automation 
in ways that provide the most construction with the least typing. Maybe 
that'll be a good kickoff for the radically-reimagined 
LiveCodeJournal.com in the works...


--
Richard Gaskin
Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Latest video -- integration of AI into script editor

2023-05-18 Thread Richard Gaskin via use-livecode

J. Landman Gay wrote:

> I had to make a form yesterday with lots of fields and while it isn't
> hard, it took 20 minutes to name everything and align the labels and
> entry fields.

If you need to do that again:

http://fourthworld.net/lc/4W_FormMaker.rev

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Looking for recent, complete Google OAuth2 example

2023-05-16 Thread Richard Gaskin via use-livecode
Anyone know of a good and *recent* example of using Monte's great OAuth2 
lib with Google's API?


I'm updating some stuff and have found that after the Big G changed 
their API in March my stuff needs revision. But the vastness of their 
docs have me poking around when I'm sure it's not a hard thing once I 
find the right example (sorta like the LC Dict: great when you already 
know what you're looking for ).


Side question:

tsNet is a well-crafted wrapper around the industry-standard cURL. 
Fabo.  But unless I've missed something, for all the great ways Charles 
has meticulously made scripting interfaces for cURL functionality, 
there's one thing I can't find documentation for: cURL's own syntax.


Does tsNet support cURL syntax directly, or must we convert the vast 
range of API documentation out there into LC-specific forms to use them?


I'd be done with going back and forth between LC and Postman if I could 
make a Postman-like tool right in LC.


--
 Richard Gaskin
 Fourth World Systems


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Livecode script on Raspberry pi

2023-04-14 Thread Richard Gaskin via use-livecode

Hello Heriberto -

I haven't run the old LC/ARM-Linux build in so long I have no idea how 
well it works anymore. It was created as a weekend side project of an LC 
staff member who's long since moved on. Back in the open source days I 
tried to find someone to maintain it, but I was unable to locate anyone 
who'd made a successful compile, let alone be able to maintain it with 
future OS changes.


But if your current LC/ARM build runs on whatever RPi you're using, 
there was never a Server build but LC has always had the ability to use 
standalones as command-line apps, going al the way back to beginning in 
1992. This is how we were using MetaCard/LC as our server CGI engine for 
all the years before the team made the PHP-style LC Server edition.


To run an LC standalone from the command line, add a "-ui" flag, e.g.:

  /home/UserName/AppName -ui

The -ui flag prompts the engine to launch in a way that bypasses GUI 
initialization.  This may be essential on many RPi units, since LC's GUI 
implementation there is old and no longer in sync with the OS, so 
crashes are increasingly common when attempting to run with a UI.


But since command-line is all you need you should (hopefully) be fine, 
and you'll find the engine runs _very_ fast with no GUI.



Bonus: Back when Dr Peter Brett was with LC he made a nifty library for 
parsing command-line arguments. To learn more on that see the GetOpt 
function in the LC Dictionary.


--
 Richard Gaskin
 Fourth World Systems



Dear Livecode experts,

I'm interested in running the Livecode script/server version on my 
Raspberry Pi. While I'm not keen on creating graphical applications, I'd 
like to switch from using Python as my scripting language and utilize 
Livecode instead. I find Livecode to be more efficient and productive 
for my needs. My question is: have you successfully managed to run the 
server version of Livecode on a Raspberry Pi using an x86 emulator like 
Box86? Any insights or advice on this matter would be greatly 
appreciated. Thank you!


Best,

Heriberto Torrado



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: iOS Device orientation confusion!

2023-04-12 Thread Richard Gaskin via use-livecode

Henry Lowe wrote:

> The problem is that when the iPhone is in Landscape Left mode
> (according to the simulator and to Apple’s definition of that mode
> - see below), Livecode is returning Landscape Right. When the
> device is in Landscape Right mode, Livecode returns Landscape
> Left - via the MobileDeviceOrientation function.
>
> Apple’s Definition (developer.apple.com )
> of these two modes:
>
> • LandscapeLeft:
>   The device is in landscape mode, with the device held upright and
>   the front-facing camera on the left side.
>
> • LandscapeRight:
>   The device is in landscape mode, with the device held upright and
>   the front-facing camera on the right side.
>
>
> Livecode’s Definition (Dictionary):
>
> • landscape left: the device is being held upward with the home button
>   on the left
>
> • landscape right: the device is being held upward with the home
>   button on the right
>
> It would appear that these two definitions at odds with each other.

They are indeed at odds. Apple should update their description to match 
LC's. :)


They seem consistent with one another, except that each uses a part of 
the hardware at opposite ends of the phone to define orientation.


Apple's docs are referencing the camera as the point of reference for 
orientation, while LC uses the Home button as the point of reference. So 
while "left" and "right" are used differently, you should be able to get 
the result you need in LC.


Use Apple's spec when coding in Apple tools and languages, and LC's when 
writing in LC and you should be fine.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: [[ ANN ]] Release 9.6.9

2023-04-12 Thread Richard Gaskin via use-livecode

Quite a long list of enhancements - thank you, esp for the field alignment.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: REGRESSION in LC 9.6.9rc2

2023-03-07 Thread Richard Gaskin via use-livecode

Craig Newman wrote:

> What modal dialog has a dropDown menu?

In this example it's an option control, similar to what we see for 
account types in Apple's Users and Groups details sheet, the file type 
filter at the bottom of the OS geFile and putFile dialogs, various 
selectors in the OS Print dialog, the modifier key remapping dialog from 
the Control Panel's Keyboard settings, and others.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sort list alphabetically- ignoring first character if it is a space

2023-02-20 Thread Richard Gaskin via use-livecode

David V Glasgow wrote:

> I am trying to alphabetically sort a list of unique strings, some of
> which have a leading space character.  I need these to sort as if the
> second character is the first character rather than all space prefixed
> strings being bunched together.

Would using the word delimited type help with this? e.g.:

  sort lines of field 1 by word 1 to -1 of each


> I just had a hilarious conversation with ChatGPT on this challenge.
> We ended up having a disagreement about whether a keyword “ignoring”
> exists in Livecode.  Please tell me it doesn’t.

I don't recall having seen an "ignoring" keyword in LiveCode.

But I have seen countless articles about Vincent Cerf, Mark Cuban, Steve 
Wozniak, and a great many others much smarter than me cautioning against 
making any investment in ChatGPT for serious work involving precision 
and accuracy.


Once you see it's a caffeinated auto-complete, the useful and less 
useful applications for a tool that literally can't understand a single 
word it spits out become clearer.


This background from Stephen Wolfram is helpful:
https://writings.stephenwolfram.com/2023/02/what-is-chatgpt-doing-and-why-does-it-work/

ChatGPT is fascinating, but since this isn't the first time we've been 
through the Gartner hype cycle with an "AI" tech (I first joined AAAI 
back when Expert Systems were a thing), even more fascinating has been 
watching humans forget that the Trough of Disillusionment will happen 
before we eventually reach the Plateau of Productivity.

https://en.wikipedia.org/wiki/Gartner_hype_cycle

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Chat and textarea formatting

2023-02-16 Thread Richard Gaskin via use-livecode

Rick Harrison wrote:

> Richard wrote:
>> I find that a lot of this boils down to the Clipboard more
>> than a browser being able to know what it's rendering.
..
> When I copy colored text or bold faced text
> from TextEdit and pasted it into the box it
> doesn’t carry over.
>
> Of course if I copy the one sample line you
> provided that copies fine and renders fine.
>
> I also tried creating some text with bold
> and colored text using LibreOffice Write.
> It copied and pasted just fine.  The
> rendering was correct but it put in a
> little more space between the lines
> for some reason.  Perhaps I was
> using a strange font or something.

Leadding is among the things that will almost always have at least some 
variance between apps and platforms. No two engineering teams write text 
rendering engines exactly the same.



> The apostrophe problem went away too.
>
> I will have to do some more research with this.
> I’m not sure I can tell my users to all use
> LibreOffice Write when composing messages.

Naw, just let them know that some apps are better than others at 
translating styling info into a form that pastes well into browsers and 
other apps.


But with the recipe provided, at least you have a way to faithfully 
preserve and restore those things that do get put onto the Clipboard well.



> Thanks for getting back to me!

My pleasure. I've been having a lot of fun with web dev lately.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Chat and textarea formatting

2023-02-15 Thread Richard Gaskin via use-livecode
What is the "junk" you're seeing for apostrophes? Could it be the 
Unicode number or character entity?


RE lost styles, like bold and color, are those rendered in the editable 
field before obtaining the innerHTML?


I find that a lot of this boils down to the Clipboard more than a 
browser being able to know what it's rendering.


If you can see it, it should be in the innerHTML.

But sometimes copying styled text may not carry all information over in 
the Clipboard.  What you see when pasting will show you what came over 
in an HTML-renderable way.


Below is a new page with two new output fields: the first is a textArea 
showing the raw HTML, the second shows the var contents rendered.


I also included some sample text up top, and did some stylings inline 
with others using CSS.  On this page both carry over well, because this 
page includes the CSS classes needed for referenced rendering.


For thorough testing you'll want to also make some styled text in 
another program, like a word processor, and paste that in to see what 
happens.


When I do that here using styled text made in LibreOffice Write 
everything shown in the paste field is accurately rendered in the final 
output field.


--
 Richard Gaskin
 Fourth World Systems


Rick Harrison wrote:

Hi Richard,

It takes care of the line spacing problem fine which is good!

It doesn’t like apostrophes in words, and returns garbage for that.

It doesn’t keep any bold facing or text coloring information.

Thanks for this suggestion.

Rick


-





function GetContents() {
var tFldMainHTML = document.getElementById("fldMain").innerHTML
// alert( tFldMainHTML );
var tFldOutRaw = document.getElementById("fldOutRaw");
tFldOutRaw.innerHTML = tFldMainHTML;
var tFldOutRendered = document.getElementById("fldOutRendered");
tFldOutRendered.innerHTML = tFldMainHTML;
}


#fldMain {
border: 1px solid blue;
padding: 4px;
width: 400px;
height: 200px;
overflow: scroll;
}
[contenteditable] {
outline: 1px solid blue;
}
.Colorized {
color: yellow;
background-color: darkgreen;
}
.fldOutput {
border: 1px solid lightgray;
padding: 4px;
width: 400px;
height: 200px;
overflow: scroll;
}



Heres some sample text 
to copy

 
 Show InnerHtml
 
 Output raw HTML:
 
 
 Output re-rendered:
 



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Chat and textarea formatting

2023-02-15 Thread Richard Gaskin via use-livecode

Rick Harrison wrote:

> I have to create a little chat program with LiveCode on a LiveCode
> server. Currently I have a textarea text box to accept the user’s
> input, but it won’t keep any formatting at all, not even carriage
> returns, line feeds, or bold faced text.  I also have to put that
> information into a database, so I can pull it out later.
>
> How are you handling such things with LiveCode?  One would think
> that by this time we would have something simple that would deal
> with this! It has to be a common problem, and one would think
> their would be a common solution to it.
>
> Suggestions?


As Alex noted, not a LC thing, just a limitation of HTML's textArea.

You may find it easier to set the contenteditable property of a 
container element like div or p, and then you can retrieve the inner 
HTML of that element with:


  var tFldMainHTML = document.getElementById("fldMain").innerHTML

Save the example below to a text file and run in your browser. There's 
extra stuff there just for appearance, but the meat of it is that one line.


Once the page is loaded, copy some styled text and paste it into the 
field. When the button's clicked you'll see the full HTML tags in an 
alert dialog.


--
 Richard Gaskin
 Fourth World Systems


--





function GetContents() {
var tFldMainHTML = document.getElementById("fldMain").innerHTML
alert( tFldMainHTML );
}


#fldMain {
border: 1px solid blue;
padding: 4px;
width: 400px;
height: 200px;
overflow: scroll;
}
[contenteditable] {
outline: 1px solid blue;
}



 
 Show InnerHtml



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Training the AI to write better LiveCode

2023-01-25 Thread Richard Gaskin via use-livecode

Bob Sneidar wrote:

> If we get to the point where mankind no longer has to work
> to live (universal basic income), then I fear we will come
> to experience intimately what the old saying hints at, "An
> idle mind is the devil's playground."

You'd be in good company. Camus, Sartre, and others in the middle of the 
last century about how the newfound leisure ultimately borne of the 
productivity gains of the Industrial Revolution might become the 
greatest crisis mankind faces.


Prone as I am to myopic projection, I'm not so sure. If we find the 
tedious work of providing basis essentials delivered by machines, I 
believe we'd find new and more interesting things to do.


I've enjoyed the rhythmic calisthenics of digging ditches, and the 
back-to-nature connectedness of farming. But TBH for all those jobs 
taught me I find designing board games more fascinating.



> It will be the end of any really productive society.

Art isn't "productive", but I'm glad people do it.

And at the moment the only way to stop it is to try to shut the machines 
down by throwing a shoe into their gears (the legendary etymology of 
"saboteur").


With automation resulting in widespread permanent unemployment, folks 
will be idle either way.


The only question is whether we want to see the masses thriving, or 
living in a cardboard box under a freeway no longer driven by anyone but 
the owners of the machines.


I prefer thriving.

--
 Richard Gaskin
 Fourth World Systems




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


XML external: differences between Mac and Linux?

2023-01-23 Thread Richard Gaskin via use-livecode
Anyone here aware of any significant differences with the XML external 
implementation between Mac and Linux?


I have some XML files about 250 MBs in size that parse well enough on my 
M1 Mac, but crash on Linux. I expected that Linux box to be slower given 
the CPU age, but not a crash. Both machines have same amount of RAM.


At the moment I'm fine with this one-off task running on my M1, but if 
there are known limits with the Linux version of that external it may 
save me some setup time in the future.


Thanks in advance -

--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Training the AI to write better LiveCode

2023-01-21 Thread Richard Gaskin via use-livecode
It's not possible to talk about software's current Second Industrial 
Revolution without talking about the lessons learned from the First 
Industrial Revolution.  And it's not possible to talk about the benefits 
of the First Industrial Revolution without including the Labor Wars that 
eventually made the gains useful for more than a fee.


And since this list is about LiveCode, I'll step off this train here.

But Geoff, you're always welcome to call me and we can discuss the 
history and the future anytime. I value you and your ideas, as always.


--
 Richard Gaskin
 Fourth World Systems




Geoff Canyon wrote:


Those only interested in LiveCode, click "next" now.

On Sat, Jan 21, 2023 at 10:40 AM Richard Gaskin via use-livecode <
use-livecode at lists.runrev.com> wrote:



After all, the Codex had been trained on billions of
publicly available source code lines – including code
in public repositories on GitHub. That included, among
other things, all of the Apache Foundation's many
projects' code.
https://www.theregister.com/2022/11/11/githubs_copilot_opinion/


Stability Diffusion, Midjourney, and DreamUp were
trained on copyrighted materials without credit,
compensation, or consent, according to a new lawsuit.

https://www.pcmag.com/news/artists-sue-ai-art-generators-for-copyright-infringement



My not-a-lawyer understanding is that this lawsuit is almost guaranteed to
fail. Just from a conceptual perspective, human artists have access to the
same copyrighted material (albeit not the ability to ingest *all* of it)
and even the ability to mimic it for their own edification. It's the act of
publishing similar work that is problematic. And it's going to be fun for
the lawyers to sort out who's at fault if I use Stable Diffusion to create
a corporate christmas card that happens to resemble the Coca-Cola polar
bears.

 > We're a very long way from attempting to write all apps in assembler

 > using this sort of AI.

Are we?  As late as my teens I was still reading science mags saying
"Well, AI is going to be a big deal, but no machine will ever beat a
human at something as complex as chess."

Big Blue beat world chess champion Garry Kasparov less than two decades
later.

So the goalpost moved, with explanations like "Well, chess is ultimately
a memorization task, but no computer can ever beat a human at something
as abstract and intuitive as Go".

Google's DeepMind beat Go champion Lee Se-dol in 2019.

I would caution against underestimating how CS advancements accelerate
further CS advancements.



If anything I think those examples undersell how quickly this is going to
proceed. I'll be very surprised if GPT-X (not an actual name) isn't
human-capable for a broad range of programming tasks by 2025.

So how'd that First Industrial Revolution turn out? ;)




I know you're just being cheeky here, but to make it explicit and let
others disagree if they wish: the First Industrial Revolution turned out
*great*. "Some economists have said the most important effect of the
Industrial Revolution was that the standard of living for the general
population in the western world began to increase consistently for the
first time in history" (others say it began right after). "Economic
historians are in agreement that the onset of the Industrial Revolution is
the most important event in human history since the domestication of
animals and plants." https://en.wikipedia.org/wiki/Industrial_Revolution



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Training the AI to write better LiveCode

2023-01-21 Thread Richard Gaskin via use-livecode

J. Landman Gay wrote:

> Microsoft thinks it's a good idea. They'll eventually own 49% of
> ChatGPT when talks are finalized.
>
> 



No doubt. The power to control a content engine that valuable is 
enticing to the few in a position to bid for it.



Back in 2017, Andre posted an OT note here on this list that garnered 
only one reply despite its scope and significance:


   [OT] The Internet is Living on Borrowed Time
http://lists.runrev.com/pipermail/use-livecode/2017-December/243374.html

The article he linked to there is still available:
https://staltz.com/the-web-began-dying-in-2014-heres-how.html

As one who studies social media memetics (the sociology of idea spread, 
as opposed to "memes" GIFs), Andre's post altered the course of much of 
my reading since.


We live in a world that no longer merely enjoys the Internet, but is 
increasingly dependent on it. McLuhan's vision of "Global Village" was 
inspired by broadcast television; the Internet's two-way communication 
should more than fulfill that optimistic view.


But along the way we've arrived at a historical moment when we finally 
have this vast global communications network, yet most of what travels 
across this public infrastructure is under the control of fewer than a 
dozen corporate leaders.


8 billion voices, curated by about 10.

So if my participation in tech discussions seems preoccupied with 
concerns about ethics and equity, about the relationship between value 
and values, blame it on Andre. :)


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Training the AI to write better LiveCode

2023-01-21 Thread Richard Gaskin via use-livecode

Geoff Canyon wrote:

> Eliza never passed a Turing Test, not even remotely.

Formally, no. Nothing yet has.
https://dataconomy.com/2021/03/which-ai-closest-passing-turing-test/

But Weizenbaum himself was surprised to see how readily people 
attributed human-like feeling to its rudimentary algo, even Weizenbaum's 
secretary.


GPTZero was recently announced as an experimental effort to help humans 
discern whether content was machine- or human-generated:

https://gptzero.me

Human-generated disinformation is already a significant destabilizing 
force. When we trust machine-generated content we run that same risk at 
light speed.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Training the AI to write better LiveCode

2023-01-21 Thread Richard Gaskin via use-livecode

Kevin Miller wrote:

> Richard wrote:
>>> So before we donate much time to providing index fodder for the
>> owners of ChatGPT, we might ask whether this is an investment we want
>> to make, or perhaps at least ask for compensation for having provided
>> the data that makes ChatGPT valuable for its owners.
>
>
> An interesting point of view.


Though admittedly not at all original, e.g.:

   After all, the Codex had been trained on billions of
   publicly available source code lines – including code
   in public repositories on GitHub. That included, among
   other things, all of the Apache Foundation's many
   projects' code.
https://www.theregister.com/2022/11/11/githubs_copilot_opinion/


   Stability Diffusion, Midjourney, and DreamUp were
   trained on copyrighted materials without credit,
   compensation, or consent, according to a new lawsuit.
https://www.pcmag.com/news/artists-sue-ai-art-generators-for-copyright-infringement


> We're a very long way from attempting to write all apps in assembler
> using this sort of AI.

Are we?  As late as my teens I was still reading science mags saying 
"Well, AI is going to be a big deal, but no machine will ever beat a 
human at something as complex as chess."


Big Blue beat world chess champion Garry Kasparov less than two decades 
later.


So the goalpost moved, with explanations like "Well, chess is ultimately 
a memorization task, but no computer can ever beat a human at something 
as abstract and intuitive as Go".


Google's DeepMind beat Go champion Lee Se-dol in 2019.

I would caution against underestimating how CS advancements accelerate 
further CS advancements.



> And humans are going to want to go on reading, editing and
> understanding code to create whole programs, whether produced
> by machine or a human, for a long time yet.

Exactly. The uniquely human pursuit of pleasure will remain. And with 
the productivity gain from this Second Industrial Revolution, we're 
finally arriving at the potential to actualize the vision toolmakers 
have had since Archimedes' screw: a world where we leverage technology 
smartly so machines do the drudgery of producing commodities and humans 
are freed to pursue artistic, philosophical, and recreational interests.


So how'd that First Industrial Revolution turn out? ;)

Technology's fine. Now if only we could see similar advancements in ethics.


> When AI really is advanced enough to be creating an entire
> complex program in perfect assembler I think the world will
> change in so many ways that we'll have far bigger societal
> implications to consider than just its impact on scripting
> languages.

Yes, it will.

For several years we've come to accept as "normal" that we humans have 
to convince gatekeeper robots that we're not robots ourselves.


Right now some of the greatest excitement for ChatGPT is content 
generation for SEO. That is, robots writing content for consumption by 
robots.


Given the efficiencies of such systems for evaluating the quality and 
value of competing products, it seems more efficient to drop SEO and let 
the robots decide which products we buy. Vendorbots could then 
communicate directly with purchasebots for optimized consumer value. 
There would be no need for this signalling to use English, or any human 
language.  The bots could arrive at an optimized signalling format far 
more efficiently.


We already use bots for trading even stocks. So when signals become 
machine-optimmized for consumption by machines, entire macroeconomies 
can be nearly fully automated.


And since those of us who make software know that all software always 
has bugs, it's not much of a stretch to imagine three or four 
generations from now we see macroeconomies transacting at light speed, 
then a bug causes global economic meltdown at light speed, and then 
corrects itself within an hour. Our great grandchildren will watch these 
"hiccups" with the same bemusement we have when our grocer says they 
can't let us purchase right now because their network is down.




> At the end of the day, this sort of AI is clearly going to happen
> and get better -  whether it comes from OpenAI or someone else.
> We will have about as much luck stopping that as stopping a change
> in the weather. When the wind changes, it's time to adjust your sails.

Exactly. The tech is happening. The opportunity still available for this 
one early moment may be to shape the ethics of ownership and value 
surrounding it.



--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Training the AI to write better LiveCode

2023-01-21 Thread Richard Gaskin via use-livecode

Rick Harrison wrote:

> Hi Richard,
>
> That’s for sure!
>
> We should never let an AI write code that we don’t have a prayer
> to understand.
> It should always write code that is humanly readable and correctable.

Advanced pattern-matching software (these day mislabeled "Intelligence") 
is in some ways a write-only tool.


It does an amazing job of emulating human textual communication 
patterns, while truly understanding nothing, not even its own words:

https://twitter.com/SanujShah/status/1616779605775351810

It is an advanced variant of Eliza, which also passed the Turning Test 
(decades ago).


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Maximum field size

2023-01-20 Thread Richard Gaskin via use-livecode

David Epstein wrote:

> Richard Gaskin asks “Why?”
>
> I have developed a set of routines to analyze tabular data.  For KB
> or MB-sized files, it is convenient to display them in a field.  It
> would be simplest if I could also load GB-sized files and use my
> routines unchanged, but I accept that this is impractical.  But in
> order to design workarounds I’d like to get as much clarity as
> possible on what limits I am working around.

Do you read the text when it's measured in megabytes?

R and other data processing tools encourage habits of displaying 
results, but rarely the data set as a whole.  Of course I haven't seen 
what you're working on, and I've had my own moments now and then when 
just randomly scanning large data sets has yielded "a ha!" insights, so 
I can appreciate the desire for your work with Cornell.


One option to consider, if practical for your needs, is that a one-time 
change to work with the data in a variable for all data regardless of 
size would at least obviate the need for special-casing data sets of 
specific size.



As for field limits, I believe Jacque summarized them well:

- Per line: 64k chars per line when rendered without text wrap
  (rendering limit only; field text still addressable, and everything
   works swimmingly in a var)

- Total - Logical: 4GB (32-bit ints used for allocation)

- Total - Practical: a mix of: available addressable space on the 
current system in its current state, likely at times requiring much more 
than the size of the data on disk given the iterative allocation calls 
to move the I/O buffer into the variable space, mitigated by any 
limitations imposed by the host OS's allocation routines provided for 
contiguous blocks (Mark Waddingham has cited in this many times how 
Win32 APIs have some limits on contiguous allocation far below the 
logical 4GB threshold).


- Total - Anecdotal: I use the Gutenberg KJV Bible file frequently for 
stress testing text routines, but while we think of the Bible as a large 
text it weighs in at just 4.5 MB.  In rarer cases where I've needed to 
probe for outliers I've created test sets above 100 MB without issue, 
but begin to see major slowdowns long before that is line-wrapping 
calculations are needed, and further above ~100 MB significant slowdowns 
for display, scrolling, and save operations.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Training the AI to write better LiveCode

2023-01-20 Thread Richard Gaskin via use-livecode

If ChatGPT can write script, it can write machine code.

If it can write machine code, scripting is unnecessary.

If scripting goes, so goes scripting tools.

So before we donate much time to providing index fodder for the owners 
of ChatGPT, we might ask whether this is an investment we want to make, 
or perhaps at least ask for compensation for having provided the data 
that makes ChatGPT valuable for its owners.


--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Maximum field size

2023-01-19 Thread Richard Gaskin via use-livecode

David Epstein wrote:

> How many rows or columns or characters can reasonably be displayed
> in a LiveCode field?  A 1.39 GB text file seems pretty clearly to
> surpass the limit, but how much do I need to subdivide it?

Jacque noted the machine limits, but I'm curious about a human question:

At an average of ~3,000 characters per printed page, if I'm doing the 
math right then 1.3 GB of text = 433,333 pages worth of content.


For comparison, the entire text of the KJV Bible from the Gutenberg 
Project is 4.5 MB.


What are you displaying for the user to read during the session?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Mobile Clipboard?

2022-12-23 Thread Richard Gaskin via use-livecode

Mark Talluto wrote:

On Fri, Dec 16, 2022 at 10:54 AM Richard Gaskin wrote:
>> Unless there's been a very recent change, I don't believe LC-made
>> mobile apps can use the clipboard at all outside of user interactions
>> within scripted instantiations of mobile-native fields.
>>
>> Do we have any word from the team on when this will be added?
>
> Livecode apps for mobile devices take advantage of the host OS
> clipboard. You have to use the native input fields to access the
> clipboard.

Yes, the mobile-native fields you describe were what I was referring to.

Those are useful for many if not most tasks, but on desktop we're 
accustomed to a copy command (and deliciously more in recent LC 
versions) that lets us put things on the clipboard outside of user text 
editing operations.


I don't know Dan Friedman's need specifically, but cases where I've 
allowed users to copy things beyond selected text include things like 
DataGrid list items, where the copy of the data I export to the 
Clipboard for use in other apps is a tab-delimited set of record items 
(pretty much the same as Excel does), suitable for pasting in anything 
that can accept that, from plain text editors to email clients to Google 
Sheets or Apple Numbers.


This hasn't been a show-stopper for me yet, and I don't know how 
critical it is for Dan.  But given the excellent Clipboard support 
xTalks have always enjoyed, and how far beyond those conventions LC has 
taken it in recent years, just about any useful subset of LC's Clipboard 
options would be very useful to have on mobile.


--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Lock screen and animated gif

2022-12-20 Thread Richard Gaskin via use-livecode

How many chars in the text?

I'd wager that unless it's uncommonly enormous, you may find that the 
one-time cost of writing a handler to use the styledText array of the 
field will speed things up so much you may not even need anything more 
than a brief watch cursor.


If you can post a sample project with text of similar length we may have 
another good opportunity like the many forum threads we've seen where 
long processes become brief blips with iterations from the community.


--
 Richard Gaskin
 Fourth World Systems


jbv wrote:


Le 2022-12-20 08:19, Brian Milby via use-livecode a écrit :

Could you make changes to htmlText in a variable and then assign all
at once back to the field?



I thought of that, but it makes other parts of the script more 
complicated.
Finally I will chose a different strategy : instead of an animated gif, 
I'm

gonna use a progress bar that will be updated every 10 lines...



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What ever happened to LC blockchain?

2022-12-18 Thread Richard Gaskin via use-livecode

Rick Harrison wrote:

> Hi Richard,
>
> I just read an article about Ethereum, and smart contracts.
>
> How one would approach this with LiveCode would be
> an interesting topic, although it does raise some questions.


All good questions, which is why I was quick to note that I have no 
interest in speculative psuedo-currency applications.


At the moment I'm mostly interesting in finding ways to use tokens to 
certify different stages of participation in scavenger hunt games for 
live events. Some of these events have global secondary audiences, so a 
token with decentralized availability and inherent authentication has 
some utility.


What is your interest that prompted you to introduce this thread?

--
Richard Gaskin
Fourth World Systems



> For example: Assume that someone writes an app
> like a game, that is stored as a smart contract. Although
> it is decentralized, future obsolescence of hardware
> and software, will eventually make the game
> obsolete too. Then it’s just trash data slowing
> down blockchain transactions.  Does that make
> sense?
>
> The article I read also discussed CrytoKitties
> which I would say is the same as NFT artwork.
>
> I don’t see much value in that kind of artwork.
>
> There is also speculation that the reason some
> of this artwork has sold for large sums of money
> is because it is being used by criminal elements
> to conduct money laundering.  That of course
> falsely makes the currency seem that it must
> have some real value, that fools others into
> investing in it.
>
> There has to be a better way to implement
> such ideas.
>
> Just my 2 cents.
>
> Thanks for your replies!
>
> Rick



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: ChatGPT

2022-12-18 Thread Richard Gaskin via use-livecode

A Twitter thread with ChatGPT botsplaining how 77 is a prime number:

https://twitter.com/bellafusari1/status/1603161415678046208

--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What ever happened to LC blockchain?

2022-12-16 Thread Richard Gaskin via use-livecode
The question is almost too big to answer, akin to asking about file 
systems or sockets. The range of applications for blockchains are 
currently too big to count, and only just beginning.


As far as a role for LC, I've seen some interest from LC users but 
nothing very specific, and nothing along the lines of libraries or 
tooling yet.


I am meeting with another LC user with an interest in this space next 
week.  If anything noteworthy comes up I'll report back.


In the meantime, my own interest is mostly centered around the corner of 
the Ethereum world focused on smart contracts. I have no interest in 
speculative psuedo-currency applications, but now that Eth2 is running 
and gas fees are plummeting, there's a universe of opportunity in smart 
contracts. At the moment nearly all of that work is limited to one 
language, Solidity, so that and studying the underlying protocols and 
data structures of Ethereum nodes have been where my time in this space 
has been invested.


--
 Richard Gaskin
 Fourth World Systems



Rick Harrison wrote:> Hi Richard,


This is my first real exploration of how it works,
and I wondered if anyone had tried to do anything
using LiveCode.

I didn’t have any application in mind yet, I was just
wondering how difficult it might be to work with the
concepts in an LC environment.

This was more of a question of what’s out there
already that I should know about, not about what
do I need, as that has yet to be defined.

If you know of some good resources/examples 
please let me know.


Thanks for getting back to me! 


Rick


On Dec 16, 2022, at 1:57 PM, Richard Gaskin via use-livecode  wrote:

Hard to say what became of that particular group from so long ago, and given 
how blockchain use cases have expanded in the years since it can be challenging 
just identifying what types of blockchain integrations would be most useful 
with a GUI toolkit like LC.

I've started dipping my toe in the waters of Solidity as one way to explore 
this space. But it's such a vast space...

What are you working on, and what do you need?

--
Richard Gaskin
Fourth World Systems



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What ever happened to LC blockchain?

2022-12-16 Thread Richard Gaskin via use-livecode
Hard to say what became of that particular group from so long ago, and 
given how blockchain use cases have expanded in the years since it can 
be challenging just identifying what types of blockchain integrations 
would be most useful with a GUI toolkit like LC.


I've started dipping my toe in the waters of Solidity as one way to 
explore this space. But it's such a vast space...


What are you working on, and what do you need?

--
 Richard Gaskin
 Fourth World Systems



Rich Harrison wrote:


I was doing some research and came across this
old post from 2016.

Whatever happened to the research group you
guys formed?  Did anything happen?  If so,
where did you archive the stuff?

Thanks,

Rick



On Aug 20, 2016, at 5:17 AM, David Bovill mailto:david at 
viral.academy>> wrote:

Mike that would be great. I'd like to get together a small group to
research together the integration of Livecode with blockchain - starting in
November. The format would be asynchronous work with some live
get-togethers.

Involvement does not need to be super-geeky. It will be a research group,
so I'll collect links, podcasts and videos and present these within a
Livecode environment - so there is a need for media, writing and research
skills and we will be working together on a publication within Livecode.
This publication will also be online and on the decentralised web.
Super-geeks with a knowledge of Javascript and Livecode are also more than
welcome.

If anyone else is interested just email me here or off-list, and I'll send
out information when the dates are confirmed.



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Mobile Clipboard?

2022-12-16 Thread Richard Gaskin via use-livecode

Dan Friedman wrote:

> Is there a way to set the clipboard text on a mobile (iOS and Android)
> device?  Something equivalent to "set the clipboardData to someText"?

Unless there's been a very recent change, I don't believe LC-made mobile 
apps can use the clipboard at all outside of user interactions within 
scripted instantiations of mobile-native fields.


Do we have any word from the team on when this will be added?

--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: So, looks like we'll be able to run LiveCode on an iPad at some point

2022-12-16 Thread Richard Gaskin via use-livecode

Geoff Canyon wrote:


https://sixcolors.com/post/2022/12/answering-the-burning-questions-about-apples-reported-app-store-plans/

Being able to work on an iPad the same as I do on my MacBook would be very
nice.


I must be slow today. How does Apple's potential policy shift with app 
stores to meet new regulatory frameworks change the technical challenges 
of rendering multiple windows in a single-window compositor?


--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Anyone any experience with Livecode under Ventura?

2022-11-10 Thread Richard Gaskin via use-livecode

Portable drives are just $50/terabyte.

Time is irreplaceable.

--
 Richard Gaskin
 Fourth World Systems


Mark Smith wrote:

> I tend towards lazy myself, backing up only after the umpteenth prompt
> from Time machine that I haven’t backed up in XX months. But I am also
> the anxious type so if I am working on something important (like a
> paper, a presentation or a program) I’ll just periodically mail myself
> a copy. That way, if I lose a disk, I can just retrieve copies from
> whatever mail server I am using.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Really OT, but i need the help of native English speakers

2022-10-31 Thread Richard Gaskin via use-livecode

Matthias wrote:

> Now i am stumbling over a question  i do not understand and Google
> Translate is also not of great help.
> What exactly does this question mean? Could someone on this list
> please help and describe it with own words?
> I do not understand what they are asking me. I really don't get it.
>
> The question is:
> Please select the option that best defines your user persona of
> FastSpring's services.

In a software development context, "persona" usually refers to part of 
the user experience practice in which the target audience is divided 
into segments, with each segment primarily distinguished by needs and 
workflows, often personalized with names or other details to facilitate 
team discussion.


I covered personas briefly in my UX talk at the LC Global conference in 
2018.


A more complete discussion of personas in modern UX practice is here:
https://www.uxdesigninstitute.com/blog/what-are-ux-personas/

--
Richard Gaskin
Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC -> Applescript -> Chrome

2022-10-11 Thread Richard Gaskin via use-livecode

jbv wrote:

I have a stack that interacts with Chrome via Applescript.
It has been running fine for months.
Suddenly, one command line began to stall the whole process,
with the spinning wheel spinning forever.

And when I run the same Applescript in the script editor,
it still runs fine as before.
The line is :
tell application "System Events" to click at {x, y}
I am using LC 9.6.8

What should I look at to fix the issue ?


At first this struck me as potentially an intentional change from Apple 
for security purposes, but a quick DuckDuckGo search shows many having 
the same AppleScript issue with "click at":

https://duckduckgo.com/?q=macOS+applescript+%22click+at%22

Interesting discussions, but I didn't see a proposed solution that works 
for Mavericks.  I also didn't look that hard; there may be a fix out 
there. Or it may be a bug in macOS.  But at least it isn't you. :)


--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Standardize Font Appearance

2022-09-14 Thread Richard Gaskin via use-livecode

Neville wrote:

> You can see screen grabs of the resulting Mac and Windows standalones
> at
> 
https://www.dropbox.com/s/v2hzwe159ep6nep/My%20beautiful%20app%20on%20Mac.png?dl=0

>
> 
https://www.dropbox.com/s/wr2limdozwob9v7/My%20beautiful%20app%20on%20Windows.png?dl=0


Thank you for the screen shots. If a picture is normally worth a 
thousand words, in discussions of visual details they're worth a million. :)



I did a quick search for "font baseline difference mac windows" on 
DuckDuckGo and found several discussions across a great many tools 
around this issue of vertical drift, e.g.:


https://community.adobe.com/t5/adobe-xd-discussions/absolutely-different-font-rendering-on-mac-and-windows/m-p/11070914

https://stackoverflow.com/questions/11726442/font-rendering-line-height-issue-on-mac-pc-outside-of-element

https://community.adobe.com/t5/adobe-xd-discussions/google-font-and-adobe-font-line-height-discrepancies/m-p/10941118#M24073

The last two may be especially interesting, as commenters suggest using 
Google fonts for common faces sometimes yield better results than fonts 
from other foundries, with apparently more detail in the font code to 
account for fractional ascenders/descenders.


A couple of suggestions also point to software tools like FontForg or 
the web app Transfonter.org to make adjustments to the font metrics.


And of course with web devs we see some conditional CSS to account for 
the difference, similar to what you're doing with LC margin properties.


It would be helpful to get Mark Waddingham's view on this, since of 
course he knows the interaction between LC's rendering engine and the 
underlying text renderers in the OS better than anyone.


But given how widespread the issue is across some of the most 
heavily-financed apps in the world (Microsoft, Adobe, web browsers), my 
hunch aligns with the comments in those discussions linked to above: 
variances in both OS renderers and in the code of the font files 
themselves would make it perhaps cost-prohibitive to attempt to address 
all possible combinations.


If you find that using an embedded font from Google solves it, or at 
least reduces it, please let us know.


Beyond that, where fine-tuning is needed for non-HIG GUIs it may be that 
carefully-crafted margin adjustments are as good as we get. Small 
comfort, but such tediousness would still leave us no worse off than pro 
designers using Adobe tools or web browsers.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Standardize Font Appearance

2022-09-13 Thread Richard Gaskin via use-livecode

Bob Sneidar wrote:

> On Sep 12, 2022, at 19:51 , Richard Gaskin wrote:
>> The team worked hard in v9 to deliver font management in a way that
>> makes it easier than ever to deliver apps that meet user expectations
>> and OS design specs on the platforms deployed to.  Mac looks like
>> Mac, Win looks like Win, all with one font setting.
>>...
>> So help me understand: what are you working on where a user expects
>> fine-grained font rendering consistency on multiple OSes? What do
>> these apps do?
>>
>> Do your users switch OSes during a session, or work on Windows by day
>> and Mac at night?  How many also use Linux in that multi-OS workflow?
>
>
> For me it's simple. I want the same baseline and alignment on two
> platforms I work with, MacOS and Windows, when using an embedded font.
> ...I just want a label that has the width and height auto fitted on a
> Mac to not be cut off on Windows.

Thanks. I can see that, esp. since the HIGs for Mac and Win specify 
different font sizes.


I've been including a little extra space to allow for that, and with 
alignment set well (left-aligned for full-row headers, right-aligned per 
HIG for form field labels) it's been working well enough.


But this suggestion may help with some layouts:

> Perhaps what would be useful is if there was an Autofit property for
> fields that would adjust the width and height of a field, instead of
> having to manually do it. Otherwise I can do it programmatically.

It would be more convenient to have a property to set the width to the 
formattedWidth, but it raises another question: what do you do with the 
space saved?


That is, if the layout it too tight to allow some extra space in a label 
field to accommodate the different HIG specs for each platform, when a 
field is automatically readjusted as proposed then wouldn't you also 
need to adjust surrounding controls to take advantage of the change?


--
 Richard Gaskin
 Fourth World Systems





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Standardize Font Appearance

2022-09-12 Thread Richard Gaskin via use-livecode

This discussion has been very interesting to me.

The team worked hard in v9 to deliver font management in a way that 
makes it easier than ever to deliver apps that meet user expectations 
and OS design specs on the platforms deployed to.  Mac looks like Mac, 
Win looks like Win, all with one font setting.  I used to have to work 
really hard with all sorts of workarounds to get that platform-savvy 
look, and now with the team's efforts with v9 it's a snap.


Of course we all use the web, and I used to subscribe to CD-ROM 
publications that deliver textual content for multiple platforms.  So I 
see the value in getting heading and body content in text-focused 
content-driven apps to look reasonably on-brand across platforms. But in 
all my native and web dev reading over the decades I don't think I've 
seen this much effort expended toward attempting to get near-perfect 
parity for text appearance across platforms (except for prepress, but 
that's another era).


But I know you folks. You wouldn't put in this kind of effort if it 
wasn't useful.


So help me understand: what are you working on where a user expects 
fine-grained font rendering consistency on multiple OSes? What do these 
apps do?


Do your users switch OSes during a session, or work on Windows by day 
and Mac at night?  How many also use Linux in that multi-OS workflow?


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Standardize Font Appearance

2022-09-07 Thread Richard Gaskin via use-livecode

You can have that. You don't need a message.

Too many possibilities to try to anticipate in a list email. Give me a 
call and let's discuss. I'll bet in under 20 minutes you'll be fired up 
and crafting the styling subsystem of your dreams.


--
 Richard Gaskin
 Fourth World Systems


Bob Sneidar wrote:


Yes but I had more in mind then display properties like font size and style.

Bob S


On Sep 6, 2022, at 15:30 , Richard Gaskin via use-livecode mailto:use-livecode at lists.runrev.com>> wrote:

Bob Sneidar wrote:


That's great for buttons. I'd like to implement something for all
objects. My goal is to be able to offer the end user a way to change
their "motif" with a single click. Imagine being able to set the
properties of an object designated as a "class object", the object
then getting a propertyChanged message, and then having that
propertyChanged handler trigger the change of all the subscribed
properties of all the objects that are an instance of that class or
sub-class.


Sounds very much like the way word processors manage styles: define a set of 
attributes, assign a name to the set, apply that set by name to selections as 
you go.

If a change is needed just edit the style definition, click "Save Changes", and 
the changes are propagated to all objects to which that style has been assigned.

Do I understand the desired workflow?

--
Richard Gaskin
Fourth World Systems



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Standardize Font Appearance

2022-09-06 Thread Richard Gaskin via use-livecode

Bob Sneidar wrote:

> That's great for buttons. I'd like to implement something for all
> objects. My goal is to be able to offer the end user a way to change
> their "motif" with a single click. Imagine being able to set the
> properties of an object designated as a "class object", the object
> then getting a propertyChanged message, and then having that
> propertyChanged handler trigger the change of all the subscribed
> properties of all the objects that are an instance of that class or
> sub-class.

Sounds very much like the way word processors manage styles: define a 
set of attributes, assign a name to the set, apply that set by name to 
selections as you go.


If a change is needed just edit the style definition, click "Save 
Changes", and the changes are propagated to all objects to which that 
style has been assigned.


Do I understand the desired workflow?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Standardize Font Appearance

2022-09-02 Thread Richard Gaskin via use-livecode

Bob Sneidar wrote:

> See, this is the exact reason why I would love to be able to employ
> an OOP style system. Simply changing the font, size and style of a
> few "Master Class" objects could change the entire project's look
> and feel in a matter of a second or two. As it is, it took me almost
> an entire day futzing around with fonts I liked, and then going to
> each and every object and making the changes there. Now I see
> immediately other font and style combinations I really like! Am I
> going to spend another day? Hell to the no! See just changing a font
> might not be enough. Often the size and lineheight have to be changed
> at the same time to get it to look proper.

How does this proposed system know which objects are bound to a style 
defined elsewhere and which ones aren't?


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: propertyChanged message

2022-09-01 Thread Richard Gaskin via use-livecode

Bob Sneidar wrote:

> I would like to see a propertyChanged message implemented that gets
> sent to any object when any of it's properties change. There could
> even be two messages, one for built-in properies and another for
> custom properties.

I like the idea (I'd love messages for all sorts of things), but 
conversations with Dr Raney remind me of the impact messages have on 
overall performance.


There are probably super-smart ways to implement things that don't have 
the drag on performance that mouseStillDown once imposed, or the 
limitations eventually placed on it to keep it from being a persistent 
source of performance loss.


But cleverness comes at a cost of its own, in design, implementation, 
testing...


This is worth considering, but perhaps we can start with the use case - 
thank you for providing this one:



> Imagine being able to change the font or size of a particular object,
> and then having all the other objects that "subscribed" to that
> object's font or size property ALSO have their fonts change. It would
> then be possible to build a kind of Object Oriented environment.

OOP systems are largely defined by their object model.

In LC's stack/card/control model, visual properties are inherited, so 
changing once at the stack level allows everything downstream to reflect 
the change, no code needed at all.


I can see cases where it would be nice to have CSS-like classes, where 
we could define style properties in one place and have everything 
assigned to use that set of properties automatically reflect changes.


I believe that level of style-sheet-like flexibility is something Mark 
Waddingham may have mentioned before. Bonus if it could use actual CSS 
syntax as an *option*, so newcomers can jump in quickly and old-timers 
can choose whether to enjoy the compactness of CSS or the completeness 
of LC Script, "set the x of y to x".



There are of course ways to do things like this using custom props, and 
I'll go out on a limb to try to channel Dr Raney on this, based on 
conversation I'd had with him about messages:


"Show me a use case where it's not possible to get what you need from a 
custom message, and I'll consider a way to override built-in messages."


His concern with messages was two-fold:

- Performance: the open-ended mechanism needed to allow overriding
  adds overhead to setting up the calling change each time the
  context changes, and sometimes during execution.

- Consistency: it creates a world of unpredictability, where simply
  using someone's library can alter messages you've been relying on
  for years.

I believe both of those can be seen as relevant to property changes.

And with that view, one attempt to satisfy this is provided with virtual 
properties: getProp and setProp.


Using custom prop names for custom behavior ensures that the built-in 
names will always reliably do what you expect, while still leaving open 
a boundless universe of options for custom behavior, simply by calling 
it via a custom name.


Within a getProp or setProp handler, one can get and set any number of 
built-in properties, and also custom properties, and call commands and 
functions, and set properties of other objects, and do just about 
anything LC Script allows.  Very powerful.



I know you're already very familiar with getProp and setProp, as are 
most of the readers here. So I'm not re-introducing them to be pedantic, 
or to gatekeep your request. I'm merely trying to understand your 
request in terms of real-world development needs.


So to help my understanding, I'll pose to you a variation of what Raney 
posed to me:


"What are you working on that can't be done by having custom property 
handling accomplished via custom property names?"



--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: lcb missing manual

2022-09-01 Thread Richard Gaskin via use-livecode

Geoff Canyon wrote:

> I've put off LCB because I don't much bother with widgets.
> I suppose I could update Navigator, but it already works well,
> so ¯\_(ツ)_/¯
>
> So if it isn't faster, dare I say it, why would I?

Foreign Function Interface, and certain custom control needs.

In short, the language choice hierarchy seems to be:

- Use LC Script wherever you can.

- If you need FFI or have specific rendering/packaging needs
  for shared components beyond what custom group-based controls
  offer, use LC Builder.

- If raw CPU speed is absolutely critical, consider externals.


Kevin said this more eloquently back around the time LC Builder premiered:

I think this is a really important principal. Always use
the highest level language you can for any given project.
Offering that very high level language option is a big
part of LiveCode's reason for being.

Previously our primary choices were between LiveCode
Script and a lower level language such as C. Now we have
a third choice, an intermediate LiveCode Builder. Its
much faster than C but slower than Script. It is going
to excel at certain tasks. However we should always
choose to use it only when it offers clear advantages
above LiveCode Script for the project that outweigh the
extra level of effort needed to use it. I know its
very tempting having added a whole new language to build
everything in that, but we must carefully resist that
temptation and use it judiciously, only for what it is best at.

http://lists.runrev.com/pipermail/use-livecode/2015-August/217849.html


--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BN Guides

2022-08-30 Thread Richard Gaskin via use-livecode
I've fantasized about being able to paint directly to the window buffer 
without using an object, but having done that in C back in the day I 
enjoy the conveniences scripted objects bring.


Your stack suggestion is intriguing, but how does it work in practice?

I find the systemic overhead of dynamically reinstantiating windows to 
fit a changing shape makes things a bit less smooth than I'd prefer.


Or are you suggesting a separate stack for each guide line?  That would 
keep the performance up, but seems tedious to write.


--
 Richard Gaskin
 Fourth World Systems




Geoff Canyon wrote:

He's also throwing controls into the stack to show guides for the
alignment, and then disposing of those. So maybe in for a penny?

If I were doing something like this I think I'd try:

1. A frontscript, as you say, or just setting up to receive IDE messages --
pretty sure there's an objectMoved IDE message or something like it.
2. Using stacks with the shape set as guides.

But maybe my idea is out of date or impractical in some way. I experimented
with some sort of auto-alignment code a long time ago. I have no memory of
how far I got with it.

gc

On Mon, Aug 29, 2022 at 1:52 PM Richard Gaskin via use-livecode <
use-livecode at lists.runrev.com> wrote:


Geoff Canyon wrote:

 > Okay, so it looks like BN Guides works by assigning behaviors to
 > controls and temporarily adding controls to your stack as you drag
 > things. I think this is meant to be transient as you drag controls.

Instinctively I'd be inclined to try a frontscript before something as
intrusive as altering an object's behavior property for something this
transient.

But Bernd does good work, so I'm curious: why this approach and not a
frontScript?

--
  Richard Gaskin
  Fourth World Systems



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: the script of with line numbers?

2022-08-29 Thread Richard Gaskin via use-livecode

Another option: Automate it, replacing Bugzilla's web UI with LC

Mod Ken Ray's RevZilla to retrieve support emails, reformat them however 
needed, tuck them in the DB, integrate the report display with things 
like double-clicking a line in the executtionContexts to open scripts, etc.


http://www.sonsothunder.com/devres/livecode/downloads/RevZilla2.htm

One-stop shopping for a fully integrated software support system.

A similar approach could be used with Nextcloud's Deck APIs, or a wide 
range of other issue tracking systems, even Github.


--
 Richard Gaskin
 Fourth World Systems


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Why is Livecode not on this list?

2022-08-29 Thread Richard Gaskin via use-livecode

Richmond Mathewson wrote:

> As such, there will always be very few advertisements for LiveCode
> programmers.

But still many good stories to tell. And apparently LC Ltd just hired a 
new Brand & Digital Marketing Lead, so I imagine we'll see those stories 
told.


https://twitter.com/happymaan/status/1562801044132085762

--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Why is Livecode not on this list?

2022-08-29 Thread Richard Gaskin via use-livecode

Gregg wrote:

> https://spectrum.ieee.org/top-programming-languages-2022

Demand.

Their methodology note explains it's based on job listings. When was the 
last time you saw a job posting for LC skills?


It's also a short list (50?).

This one ranks by usage, listing the hundred most popular, where LC has 
only been in the top 50 a few times over the years I've been tracking 
it, but is often in the bottom 50 (out of hundreds of languages not so bad):


https://www.tiobe.com/tiobe-index/

--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: BN Guides

2022-08-29 Thread Richard Gaskin via use-livecode

Geoff Canyon wrote:

> Okay, so it looks like BN Guides works by assigning behaviors to
> controls and temporarily adding controls to your stack as you drag
> things. I think this is meant to be transient as you drag controls.

Instinctively I'd be inclined to try a frontscript before something as 
intrusive as altering an object's behavior property for something this 
transient.


But Bernd does good work, so I'm curious: why this approach and not a 
frontScript?


--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Livecode performance problem

2022-08-21 Thread Richard Gaskin via use-livecode

Paul Dupuis wrote:

> For strange legacy application reasons, when lines get added to the
> set of fields (a frequency action by users - sometimes adding hundreds
> of lines a day), the data has to be repackaged into this tab delimited
> structure in a single variable to run some procedures on.
>
> So a user driven action of:
>
> 1) Add a line (or a few) to the fields
> 2) repackage data and run a few procedures
> 3) User repeats starting at step 1
>
> Can become very slow as the number of lines in the fields gets large
> - as you all have noted!


I'd just bite the bullet and replace those columnar fields with one 
delimited field.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Comparison chart for DataGrid, PolyList, PolyGrid, list fields....

2022-08-18 Thread Richard Gaskin via use-livecode



If a newcomer needs to display a list, how can they know what to use?

Currently we have:

- list field
- Table field
- DataGrid
- PolyGrid
- PolyList
- others?

Is there a chart listing the features of each that I can point new users 
to when this question comes up?


--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: issue related to Print.PrintSupport.Source.dll

2022-08-18 Thread Richard Gaskin via use-livecode

J. Landman Gay wrote:

> The suggested fix in the bug report has worked for us:
>
> https://quality.livecode.com/show_bug.cgi?id=23659
>
> Basically, delete the driver that comes with Windows and get the
> driver from Epson. Most of the  problems seem to be with Epson
> printers but if your customers have a different printer, try
> that OEM driver.


The Read Me that came with MetaCard included: "MetaCard is very good at 
exposing bugs in drivers."


It used to annoy me that Raney would ask me to make sure I was using the 
latest driver available from the manufacturer of whatever device I was 
having trouble with (displays, printers, etc.).


I'd say, "But it doesn't happen with any other software!"

And he'd say, "Please check the driver version, and if a newer one 
doesn't fix it let me know."


In nearly every such case since I had that exchange with him in 1999, he 
was right.


Always check driver versions.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Is there a way to create a generic setprop handler?

2022-08-03 Thread Richard Gaskin via use-livecode

David Epstein wrote:

> Control “A” has many custom properties that are set by a variety
> of other controls.  If Control “A” has a "setProp property1”
> handler, it can react when property1 gets set.  But is there a
> way to give Control “A” a general handler that will be triggered
> whenever any of its custom properties is set?

I don't know of a way to trap getProp and setProp generically, and that 
may not be bad since it would affect the performance of all custom 
property access, whether it's the subset of properties you're interested 
in or not.


An alternative could be to put the properties you want custom handling 
for into a custom property set of their own, e.g.:


   getPRop uPropSet[pKey]
  put the params
   end uPropSet

   on mouseUp
  get the uPropSet["key1"] of me
   end mouseUp

...puts this in the Message Box:

   uPropSet "key1"

This will allow open-ended trapping of property keys, but limited in 
scope to the set you need that for.



A word of caution with dependency on getProp and setProp:

Those messages are subject to suspension during lockMessages, which may 
be exactly what you want, or may have unintended side effects that can 
be maddening to track down if you don't keep that in mind.


Using getProp and setProp requires review of your code base, including 
any third-party libraries, which may lock messages so you can evaluate 
the implications for your circumstance.



If you need consistently reliable ways to trigger custom evaluation 
consider accessor handlers instead.  LockMessages only prevents system 
messages; calling a custom handler is not affected by lockMessages.


Examples:

-- Using an object as the value container:
on SetMyProp pKey, pVal
   set the uPropSet[pKey] of  to pVal
end SetMyProp

function GetMyProp pKey
  return the uPropSet[pKey] of 
end GetMyProp


-- Using an array variable as the value container:
on SetMyProp pKey, pVal
   put pVal into sPropVarA[pKey]
end SetMyProp

function GetMyProp pKey
  return sPropVarA[pKey]
end GetMyProp



-- Usage for either storage method:

on mouseUp
  SetMyProp "key1", "val1"
end mouseUp

on mouseUp
  put GetMyProp("key1") into fld 1
end mouseUp



Fun: If you abstract data access using normal custom handlers, you have 
one-stop-shopping to change the storage mechanism.  If you don't need 
persistence across sessions a variable may do, and if you need 
persistence you can store in an object whose stackfile gets saved, or 
encode the array variable and save that to disk, or use a local 
database, or even use any form of remote storage across the internet if 
you like -- all by updating just two handlers.



--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Dispatch

2022-08-03 Thread Richard Gaskin via use-livecode

Sean Cole write:

> I was particularly asking if there was any 'advantage/disadvantage'
> in using
>
>  dispatch myHandler with myVar
>
> over just using
>
>  myHandler


In coding as in life, when in doubt leave it out.

If something isn't needed it's usually simplest to not go out of your 
way to add it.


The message path is fine.

It works reliably, and with as much efficiency as the team can throw at 
it. In most cases it's not only the easiest thing to type and the most 
efficient to execute, its simplicity and predictability also aid 
debugging and maintenance.


For those times when you need an exception to the message path, LC 
provides many.  Send, do, call, dispatch, etc. - each has their own 
unique set of tradeoffs that make it a good fit for the specific 
circumstance where the native message path isn't what you need.


But those are for exceptional circumstances.

The native message path is the norm of this language.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Tree Widget: hilitedValue?

2022-07-10 Thread Richard Gaskin via use-livecode

Brian Milby wrote:

> You could also turn the path into an array (but lose the error
> checking above):
>
> function getValue pArray, pPath
>   split pPath by comma
>   return pArray[pPath]
> end getValue

Thanks, Brian. I keep forgetting we can use an array as an element 
specifier.


Has that been around the whole time, or was it added in recent years?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Tree Widget: hilitedValue?

2022-07-08 Thread Richard Gaskin via use-livecode
I see the Tree widget supports a hilitedElement property, which is 
useful for managing the selection in the UI.


Is there a one-liner for obtaining not the element path but the value?

It wouldn't kill me to extract the arrayData and turn a hilitedElement 
path like:


  level1,level2,level3,

...into a proper array notation to obtain the value at:

  tArray["level1"]["level2"]["level3"]

But it seems such a common need I'm guessing I'm overlooking a more 
direct way to do that.


TIA -

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: On API keys...

2022-06-27 Thread Richard Gaskin via use-livecode

Heather Laine wrote:

> Tom Glod wrote:
>> This is a great best-practice explanation. Perhaps someone can turn
>> it into a blog post and put it on the site.
>
> Yes indeed. See Blog.

https://livecode.com/best-practice-for-api-keys-and-security/


Tip: Dropping in-bound links to relevant content is a useful 
organization habit, making it easy for customers, prospects, and 
searchbots alike to discover the roads that lead to the site where the 
store lives.


--
Richard Gaskin
Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Stylistic question.

2022-06-23 Thread Richard Gaskin via use-livecode

J. Landman Gay wrote:

> Breakpoints work fine in the IDE. But script only stacks do not
> retain them when remote debugging

Breakpoints are a runtime-settable property, so those who enjoy 
C-flavored workflows with lots of tiny text files could save their 
breakpoints out to text files and have a module load them in again at 
runtime.


Maybe that could be added to any of the tools that turn normal 
stackfiles into script-only stack files and back again so they can be 
worked on.


Then we could add a tool to handle custom props, turning those into JSON 
files and back again.


Then the UI stuff could still be binary like it is with Apple's tools, 
and as long as we don't call them stackfiles but call them NIBs instead 
then it's cool again. :)


::ducking::

#FaFaFaFashion

--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How to color a "cell"?

2022-06-23 Thread Richard Gaskin via use-livecode
Thanks Mark - works. I could have sworn I'd tried "line" earlier when 
attempting to set the backgroundColor, and when it failed was when I 
switched to trying "paragraph". But it works now so I don't mind being 
mistaken.


Oddly, "paragraph" appears to be synonymous with "line" for the 
borderWidth, borderColor, firstIndent, leftIndent, textAlign, 
spaceAbove, hGrid, vGrid, and tabs paragraph properties.


Near as I can tell backgroundColor is the only paragraph properties 
where the "paragraph" chunk type isn't synonymous.


Should it be? I'm good either way now that I have a solution, but if it 
would be helpful I could file a bug report/enhancement request.


--
 Richard Gaskin
 Fourth World Systems


Mark Waddingham wrote:

> IIRC you need to use ‘line’ to set ‘paragraph‘ properties of fields…
>
> On 23 Jun 2022, at 19:29, Richard Gaskin wrote:
>> I could get away with setting the backgroundColor of the whole line,
>> but that does the same as setting the backgroundColor of a "cell": it
>> draws the color only beneath the portion of the line that contains
>> text, leaving the rest blank.
>>
>> The borderWidth and borderColor paragraph properties work as
>> expected, affecting the full line whether it's filled with text
>> or has no text at all.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How to color a "cell"?

2022-06-23 Thread Richard Gaskin via use-livecode

Craig wrote:

> Richard wrote:
>> I had hoped the paragraph-level formatting options introduced in
>> v5.x would help, but alas as far as I can tell I can only set the
>> backgroundColor of a run of text, not the full cell.
>
> I think this was discussed on the forum a while back. I do not believe
> you can do what you want without another control overlying the “rect”
> of the “cell”.

Thanks. I could get away with setting the backgroundColor of the whole 
line, but that does the same as setting the backgroundColor of a "cell": 
it draws the color only beneath the portion of the line that contains 
text, leaving the rest blank.


The borderWidth and borderColor paragraph properties work as expected, 
affecting the full line whether it's filled with text or has no text at all.


But backgroundColor as a paragraph setting feels broken, as it works the 
same as setting that property for a chunk rather than for the field.


From the v5.5.4 Release Notes:

- The backgroundColor property allows the color of the content area
  (inside any paragraph border) to be filled (note that strictly
  speaking this property is not inherited, but the effect is the same
  as if it was as the background of the field is rendered before the
  paragraphs are so the background color at the field level will
  ‘show through’ to the paragraph if the paragraph has no background
  color).

- The borderWidth property determines the width of the border to draw
  around the paragraph.

Pretty much all the other paragraph-level formatting options work just 
their their field-level counterparts, but of course limited to the 
specified paragraph.


So I'm surprised the backgroundColor was added in such a way that it 
appears to do nothing we didn't already have with setting 
backgroundColor of chunks.


I was hoping I was just using it wrong.

Here's how I set it in my tests:

set the backgroundcolor of paragraph 2 of fld 1 to yellow

Unless there's a different syntax I should be using, it would appear the 
paragraph-level implementation of backgroundColor is unfinished, no?



--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


How to color a "cell"?

2022-06-22 Thread Richard Gaskin via use-livecode

I need to set the backgroundColor of a complete "cell", where "cell" is
defined as the portion of a row in a table field between tabs when the
vGrid is set.

I had hoped the paragraph-level formatting options introduced in v5.x 
would help, but alas as far as I can tell I can only set the 
backgroundColor of a run of text, not the full cell.


Anyone know a way to do this WITH FIELD/TEXT PROPERTIES ONLY?

(Pardon the all-caps, but I can come up with many workarounds that 
include other objects, but I really need something here that works with 
one field object and nothing else.)


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: arrayencode

2022-06-22 Thread Richard Gaskin via use-livecode

Alex Tweedly wrote:

> Nevertheless, my central point remains (afact) valid - the support
> for JSON in Livecode seems incomplete, and in particular it seems
> flaky/missing on LCServer.

Making externals easily findable by the LC Server engine should be a 
quick fix for them, no?


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: arrayencode

2022-06-22 Thread Richard Gaskin via use-livecode

Alex Tweedly wrote:

> On 22/06/2022 17:02, Richard Gaskin via use-livecode wrote:
>> [ ... about using JSON ... ]
>> But if you don't need interoperability, you wouldn't need to write a
>> parser, since LC includes a good one built into the engine.
>>
>> What did I miss?
>
> The fact that Livecode's support for JSON is, hmmm, mediocre at
> best ??
>
> The parser "built-in" seems to work fine in the IDE, but not on the
> server


Interesting take. Thanks. I'd read Tom's post as being about LSON, with 
LC in both producer and consumer roles, which would make a 
JavaScript-optimized format unnecessary.  Perhaps I'd misunderstood.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: arrayencode

2022-06-22 Thread Richard Gaskin via use-livecode

Bob Sneidar wrote:

> Richard I think I hear you say that JSON is an alternative to
> arrayEncode?

I'm apparently writing so badly maybe I should skip the shorthand "LSON" 
and just write the full form: "output from LC's built-in arrayEncode".


I'd adopted "LSON" to help position its role as the LC-native way to 
transport and store array data, similar to the role of JSON in 
JavaScript workflows or BSON within MongoDB systems.



When you need interoperability, there's no longer much of a choice: JSON 
is the de facto standard. Though highly specific to how JavaScript 
works, browsers are so ubiquitous that most languages other than 
JavaScript now have some means of transforming JSON into a format that 
can be used internally, as LC does with its JSONtoArray and ArrayToJSON 
functions.



But when all producers and consumers of data in a system use the LC 
engine, LSON (output from LC's built-in arrayEncode) is the 
with-the-grain choice.



> What about storing to SQL blob and binary files? Will it suffice? I'd
> consider converting all my arrayEncoding to JSON if so.

LSON (output from LC's built-in arrayEncode) is a binary format, so any 
storage or transport mechanism suitable for binary data can be used.


--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: arrayencode

2022-06-22 Thread Richard Gaskin via use-livecode

Tom Glod wrote:

> Hello Richard, thanks for the detailed answer.
> There are 2 reasons why I am considering this.
>
> 1. I can skip the encoding and decoding from and to json.
> 2. it supports binary, and does not require base encoding and its
> 33% inflation.
>
> For interoperability for the users, JSON is the way to go for sure.
> But for throughput between the UI Layer and "background service" I
> would love a way to just skip all the extra steps and send the
> serialized array to be unserialized into an array or map directly.
>
> I was hoping this was easy.

If you don't need interoperability with non-LiveCode systems, the choice 
couldn't be easier: LSON is the LC way.


But if you don't need interoperability, you wouldn't need to write a 
parser, since LC includes a good one built into the engine.


What did I miss?


> I may ask you for your notes in the future, after I have a chat with
> Kevin and Mark about it.

If you're talking with Mark you won't need my notes. He knows a thing or 
two about LC's array formats. :)


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: arrayencode

2022-06-22 Thread Richard Gaskin via use-livecode

Martin Koob wrote:

> Hi Richard
>
> Thanks for the explanation. I think it is a helpful term or
> distinction to have.  I think it would be good to actually have
> that term with a formal  definition published by LiveCode or
> the community with references to BSON so it will show up in
> web  searches for either term to lead people to LiveCode.  Maybe
> a start would be to introduce it in the forums.

I've been using the term for years whenever I discuss LC encoded arrays. 
A few others have as well, tho not many. If LC Ltd finds it useful for 
orienting newcomers to LC they could include it in the Dictionary's 
glossary, and perhaps sprinkle use of it in places where "LSON" can 
serve as a shorthand for "encoded associative array".



> Just a question though how is what you define as LSON different
> from JSON.  Is it a different way of serializing LiveCode native
> arrays?

LSON is the LC-engine-native way to serialize LC arrays.

JSON is the JavaScript-engine-native way to serialize JS objects.

BSON is the MongoDB-engine-native way to serialize document objects.

They're similar only in that each is purpose-built for its respective 
scripting engine. LSON is to LC what JSON is to JavaScript.


But they're structurally very different, as different as LC associative 
arrays are from JavaScript's objects.



> Is there a way that LiveCode developers can have access to it directly
> through LCB or is it accessible in the realm of the engine only.

I haven't yet had occasion to use LC Builder in production, so I'm not 
sure if that language also offers some form of LC Script's 
arrayEncode/arrayDecode. Given how central arrays are to working in LC 
I'd be surprised if LCB doesn't include support for array serialization.


--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: arrayencode

2022-06-21 Thread Richard Gaskin via use-livecode

Martin Koob wrote:

> What is LSON?  A web search doesn’t turn up anything.  A shot
> in the dark here but Is it something internal to LiveCode i.e.
> Livecode Script Object Notation that is the basis for LiveCode
> arrays?

Sorry, Martin. I need to get out more. I've been using LSON  ("LiveCode 
JSON", in the way "BSON" is "Binary JSON") to describe LC's serialized 
array format for so long that the friends I talk with most often have 
picked it up as well - and along the way I forget that not everyone else 
has. :)


So it's just personal slang.  But useful, IMO, to help newcomers 
familiar with JSON and BSON appreciate its role.



> Thanks for the references on BSON

Glad someone found them interesting. I was especially impressed with 
variable integers for the length specifier.  Nice format, would be cool 
if it were more widely used outside of MongoDB circles.


--
 Richard Gaskin
 Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: arrayencode

2022-06-21 Thread Richard Gaskin via use-livecode

l oTom Glod wrote:

> I am wondering if anyone here knows the encoding algorithm
> that arrayencode() uses?

Yes.


> Is it one that can be implemented in another language or is
> it proprietary?

It should be technically possible to implement any algo in any 
sufficiently-complete language.


Whether LC Ltd considers is proprietary in terms of limiting 
interoperability with other systems is something only they can address.



I have notes on the v6.7-and-earlier format, and it shouldn't be hard to 
figure out the changes for v7-and-later.


But as much as I've enjoyed LSON for LC-to-LC data transfer, I wouldn't 
recommend it as a general-purpose serialization format. Though its 
binary nature makes it similar to BSON in some efficiency areas, the 
world uses JSON for interoperability, and these days that includes even LC.


If you have a use case that truly needs it and can't use 
industry-standard JSON, let me know and I can dig through my archives to 
find the notes I'd assembled years ago from some tips Mark Waddingham 
was generous enough to send.


But you'll want to consider this carefully. Format choices have a way of 
becoming technical debt with surprising ease over time.


For better or worse, the universal de facto standard for serialization 
today is JSON. LC itself is committed to JSON for interoperability, even 
bringing in parts of the ECMAScript parser. JSON is well documented, 
with tons of tooling. And in some ways JSON is a superset of LC's 
associative arrays, so it offers options for expressiveness beyond LSON.


I've had some good times with LSON. But the moment I think of any part 
of the system not made with LC, I think about other formats.


If I needed the efficiency of a binary format, for interoperable work 
I'd consider BSON. Its only drawback is the same as LC's: it's currently 
used by only one tool ;) (MongoDB, though in all fairness it's presented 
as an open standard and may have a few other adopters as well).


https://bsonspec.org/

BSON parsers are available for a great many languages:
https://bsonspec.org/implementations.html

--
Richard Gaskin
Fourth World Systems

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Generating Random numbers to conform a distribution

2022-06-08 Thread Richard Gaskin via use-livecode

Rick Harrison wrote:

> Try rolling 2 six-sided dice.  7 is the number that appears the
> most so it’s at the middle of the curve, while 2 and 12 are at
> the ends of the distribution.  Roll the dice multiple times to
> generate a distribution.
>
> Now simulate rolling the dice with random numbers in LC the same way.
>
> Now conduct your own experiments, and graph your results.


I've been poking at some of that now and then for prototyping board 
games in software (an ironic moment after all these years of making 
paper prototypes of what later becomes software ).


For my needs I found the simplest way to get the same results in LC as 
with dice was to do what dice do: use "any" in a range of six, iterated 
by the number of virtual dice.


There's probably a more clever mathy solution, but for my modest 
prototypes it helps me to keep the virtual implementation as close to 
the physical tabletop result as close as possible anyway, so I have a 
justification for making software that behaves no smarter than cardboard. :)



When I was making a game for a friend last summer I fell in love with 
the Royal Game of Ur (RGoU)- good history with an online version here 
for those interested:


https://royalur.net/

The dice used in RGoU are binary in range, tetrahedra with the faces 
blank and two of the four points painted.


The game is played with four of those, delivering a range of 0 through 4 
on a probability distribution of:


Dice Result   Likelihood
0 1
1 4
2 6
3 4
4 1

Or more graphy:

  +
  +
   +  +  +
   +  +  +
   +  +  +
+  +  +  +  +
0  1  2  3  4


If you ever need to plot dice probabilities, this tool handles nearly 
any number of any type of dice you can think of (except Ur dice, it 
turns out, but oh well):


https://anydice.com/

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


  1   2   3   4   5   6   7   8   9   10   >