Re: [WebDNA] maybe silly suggestion? [founditems]
This WebDNA talk-list message is from 2015
It keeps the original formatting.
numero = 111890
interpreted = N
texte = exactly.On Jan 15, 2015, at 9:39 AM, Terry Wilson
wrote:> I already do something similar with a preparse function to store =things like properly formatted dates for 1 day, 1 month, 30 minute, 1 =year, etc. cookies. Is this something along that line, setting variables =from a db in a preparse script?>=20> Sent from my iPad>=20>> On Jan 15, 2015, at 7:23 AM, Donovan Brooke wrote:>>=20>> I guess I don=92t understand these =93improvements=94 being made on =whim.>>=20>> *constants* (static variables) are a staple feature of any language =and WebDNA already has them.. yes, surviving a reboot.>>=20>> What=92s the big mystery here?>>=20>> Donovan>>=20>>=20>>=20>>=20>>> On Jan 15, 2015, at 2:46 AM, christophe.billiottet@webdna.us wrote:>>>=20>>> I find the idea interesting. There is quite nothing in WebDNA that =cannot be done with a little bit of creativity, but if a tag (or "codon" =to stick with biological language) can simplify coding, then I am for =it.>>>=20>>> The following is for debate:>>>=20>>> We are currently working to add a simple tag that stores variables =permanently (8.0.3), something that reminds me the Hewlett Packard way =of permanently storing variables (back in 1978) on a hp29c (named ="Continuous Memory"). This has to survive a reboot, and the variable and =the name should be as long as wanted and it would save the hassle of =writing the code to save those in a database. However, to avoid ="overheating", we would have only one name per variable, meaning that if =you store name3 as "pink", and you later store name3 as "black", then =only the last value will remain and "pink" will be overwritten by ="black">>>=20>>> The process will use [sto] and [rcl] (for store and recall) + the =name of the variable + the variable itself>>>=20>>> There would be four possible ways to describe such a feature:>>>=20>>> [sto name=3Dvariable]>>> [sto name]variable[/sto]>>> [sto]name=3Dvariable[/sto]>>> [sto]name1=3Dvariable1,name2=3Dvariable2,name3=3Dvariable3[/sto]>>>=20>>> The last one it obviously better as it allows to store multiple =variables and use long names, if requested.>>>=20>>> Recall would work individually: [rcl name2] so we can just get the =codon replaced by the variable.>>>=20>>> It should be possible from here to build a [stofounditems] within a =[search][/search] cell, but we would need first a [listfounditems] and =it could bring up a *lot* of data in certain cases, as founditems works =like a loop. Second, the names will be identical: Imagine a db with =100,000 entries from 1 to 100,000>>>=20>>> [search db=3Dallthethings.db&grnamedata=3D1]>>> [founditems]>>> [name]=3D[variable]>>> [/founditems]>>> [/search]>>>=20>>> Any idea welcomed there.>>>=20>>> Then we could have a [rclfounditems]>>>=20>>> Giving a name as Brian suggests, like [stofounditems =name=3Dpeoplenameddave] would be complicated: it would mean to create a =global name that would contains an unlimited number of names and =variables.>>>=20>>>=20>>> Well, these are just ideas that go through my head. Debate welcomed.>>>=20>>> - chris>>>=20>>>=20>>>=20>>>=20>>>> On 14 Jan 2015, at 23:57, Brian Burton wrote:>>>>=20>>>> to help separate my controller logic from my display code it would =be awesome to have a shortcut like:>>>> [search db=3Dallthethings.db&blahblahblah][savefounditems =name=3Dpeoplenameddave][/search]>>>>=20>>>>=20>>>>=20>>>>=20>>>> then later in the page, where i=92m rendering the html>>>> [displayfounditems use=3Dpeoplenameddave] html things =[/displayfounditems]>>>>=20>>>>=20>>>>=20>>>> I know it looks like it=92s not saving that much code, but I can =see switching which search I want in the controller, and still being =able to use a universal founditems loop lower in the code. Also the =ability to reuse search results (if needed) without doing the same =search again.=20>>>>=20>>>> ok, feel free to start telling me how you can do this with a table =(you=92re missing the point) or how we don=92t need more tags or =whatever :)=20>>>>=20>>>>=20>>>> -Brian B. Burton>>>> --------------------------------------------------------->>>> This message is sent to you because you are subscribed to>>>> the mailing list .>>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>> Bug Reporting: support@webdna.us>>>=20>>> --------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us>>> Bug Reporting: support@webdna.us>>=20>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> Bug Reporting: support@webdna.us> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us
Associated Messages, from the most recent to the oldest:
exactly.On Jan 15, 2015, at 9:39 AM, Terry Wilson wrote:> I already do something similar with a preparse function to store =things like properly formatted dates for 1 day, 1 month, 30 minute, 1 =year, etc. cookies. Is this something along that line, setting variables =from a db in a preparse script?>=20> Sent from my iPad>=20>> On Jan 15, 2015, at 7:23 AM, Donovan Brooke wrote:>>=20>> I guess I don=92t understand these =93improvements=94 being made on =whim.>>=20>> *constants* (static variables) are a staple feature of any language =and WebDNA already has them.. yes, surviving a reboot.>>=20>> What=92s the big mystery here?>>=20>> Donovan>>=20>>=20>>=20>>=20>>> On Jan 15, 2015, at 2:46 AM, christophe.billiottet@webdna.us wrote:>>>=20>>> I find the idea interesting. There is quite nothing in WebDNA that =cannot be done with a little bit of creativity, but if a tag (or "codon" =to stick with biological language) can simplify coding, then I am for =it.>>>=20>>> The following is for debate:>>>=20>>> We are currently working to add a simple tag that stores variables =permanently (8.0.3), something that reminds me the Hewlett Packard way =of permanently storing variables (back in 1978) on a hp29c (named ="Continuous Memory"). This has to survive a reboot, and the variable and =the name should be as long as wanted and it would save the hassle of =writing the code to save those in a database. However, to avoid ="overheating", we would have only one name per variable, meaning that if =you store name3 as "pink", and you later store name3 as "black", then =only the last value will remain and "pink" will be overwritten by ="black">>>=20>>> The process will use [sto] and [rcl] (for store and recall) + the =name of the variable + the variable itself>>>=20>>> There would be four possible ways to describe such a feature:>>>=20>>> [sto name=3Dvariable]>>> [sto name]variable[/sto]>>> [sto]name=3Dvariable[/sto]>>> [sto]name1=3Dvariable1,name2=3Dvariable2,name3=3Dvariable3[/sto]>>>=20>>> The last one it obviously better as it allows to store multiple =variables and use long names, if requested.>>>=20>>> Recall would work individually: [rcl name2] so we can just get the =codon replaced by the variable.>>>=20>>> It should be possible from here to build a [stofounditems] within a =[search][/search] cell, but we would need first a [listfounditems] and =it could bring up a *lot* of data in certain cases, as founditems works =like a loop. Second, the names will be identical: Imagine a db with =100,000 entries from 1 to 100,000>>>=20>>> [search db=3Dallthethings.db&grnamedata=3D1]>>> [founditems]>>> [name]=3D[variable]>>> [/founditems]>>> [/search]>>>=20>>> Any idea welcomed there.>>>=20>>> Then we could have a [rclfounditems]>>>=20>>> Giving a name as Brian suggests, like [stofounditems =name=3Dpeoplenameddave] would be complicated: it would mean to create a =global name that would contains an unlimited number of names and =variables.>>>=20>>>=20>>> Well, these are just ideas that go through my head. Debate welcomed.>>>=20>>> - chris>>>=20>>>=20>>>=20>>>=20>>>> On 14 Jan 2015, at 23:57, Brian Burton wrote:>>>>=20>>>> to help separate my controller logic from my display code it would =be awesome to have a shortcut like:>>>> [search db=3Dallthethings.db&blahblahblah][savefounditems =name=3Dpeoplenameddave][/search]>>>>=20>>>>=20>>>>=20>>>>=20>>>> then later in the page, where i=92m rendering the html>>>> [displayfounditems use=3Dpeoplenameddave] html things =[/displayfounditems]>>>>=20>>>>=20>>>>=20>>>> I know it looks like it=92s not saving that much code, but I can =see switching which search I want in the controller, and still being =able to use a universal founditems loop lower in the code. Also the =ability to reuse search results (if needed) without doing the same =search again.=20>>>>=20>>>> ok, feel free to start telling me how you can do this with a table =(you=92re missing the point) or how we don=92t need more tags or =whatever :)=20>>>>=20>>>>=20>>>> -Brian B. Burton>>>> --------------------------------------------------------->>>> This message is sent to you because you are subscribed to>>>> the mailing list .>>>> To unsubscribe, E-mail to: >>>> archives: http://mail.webdna.us/list/talk@webdna.us>>>> Bug Reporting: support@webdna.us>>>=20>>> --------------------------------------------------------->>> This message is sent to you because you are subscribed to>>> the mailing list .>>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us>>> Bug Reporting: support@webdna.us>>=20>> --------------------------------------------------------->> This message is sent to you because you are subscribed to>> the mailing list .>> To unsubscribe, E-mail to: >> archives: http://mail.webdna.us/list/talk@webdna.us>> Bug Reporting: support@webdna.us> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us
Donovan Brooke
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
WebMerchant when CC network is down (1998)
[WebDNA] Forum Module Made In WebDNA (2020)
searchable list archive (1997)
2.0Beta Command Ref (can't find this instruction) (1997)
security (1997)
Count regular expressions in a file (2007)
Emailer [cart] file names (1997)
using showpage and showcart commands (1996)
WebCatalog NT (1996)
Cookies and webcat (1997)
Tab Charactor (1997)
Navigator Parsing (1997)
Adding Header Values with [SetHeader] (1998)
Multihoming and webcat (1998)
WebMerchant 1.6 and SHTML (1997)
FM and Webcat together? (1998)
WebCat Hosting - Pricing Question (2002)
OLD ORDERS (1998)
user flush db (2002)
calculating tax rates, mail order solutions and version 2 (1997)