ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: | Picolisp latest found at | check also for more information
pierpal has quit [Ping timeout: 256 seconds]
pierpal has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #picolisp
pierpal has quit [Ping timeout: 265 seconds]
pierpal has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
orivej has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
orivej has quit [Ping timeout: 244 seconds]
alexshendi has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
xificurC has joined #picolisp
rob_w has joined #picolisp
<beneroth> Hi all
<xificurC> hi you
<tankf33der> picolisp 15.11 and 3.1.6 crashed on co/catch too.
<tankf33der> 3.0.6 too. stop here.
<Regenaxer> yeah, it crashes everywhere, also on Android. I know the exact place, but still did not find the time to look at it. Thanks tankf33der!
<xificurC> curl 'localhost:8080/!upload?server&env&prj&name
<xificurC> Regenaxer: if you remember the discussion of filling in the DB with data :) curl says curl: (52) Empty reply from server. The data gets uploaded but curl exits with 52
<xificurC> can I send a 200 or 204 back?
<beneroth> xificurC, did you do (commit 'upd) ?
<xificurC> (de upload (Server Env Prjs Name)
<xificurC> (new! '(+Deploy) 'server Server 'env Env 'prjs Prjs 'name Name))
<beneroth> there is a global variable holding the http status code, I believe you can set it
<Regenaxer> yes, there is (respond)
<xificurC> grr no doc
<Regenaxer> :)
<Regenaxer> (pp 'respond) ;)
<xificurC> :)
<xificurC> I think 204 would be most clean here
<xificurC> but (respond "") might do the trick
<beneroth> Regenaxer, german retailer Lidl spent 7 years and about half a billion Euros attempting to get SAP working, now the cancelled the project in favour of continuing their internally developed ERP (which SAP was supposed to replace)
<Regenaxer> yes, I use respond in several places
<Regenaxer> Just (respond) for empty
<xificurC> duh
<Regenaxer> beneroth, yeah, read it in twitter :)
<xificurC> yes that makes a 200 with content-length 0
<Regenaxer> Like our friend Vidyuth
<beneroth> aye
<xificurC> 1 more question please :)
<Regenaxer> sure! :)
<xificurC> (rel prjs (+List +String))
<xificurC> I want this to be searchable, can I just (+Ref +List +String) ?
<beneroth> this way you make the +List into the index
<xificurC> it's a multi-question though :)
<beneroth> you want (+List +Ref +String) - a list of indexed strings
<Regenaxer> yes, or perhaps better (+List +Ref +String)
<Regenaxer> he :)
<beneroth> +Ref indexes the whole string, so no partial matching. see +Fold, +Idx etc...
<xificurC> ok, and how would you make the gui to let people search for multiple of these?
<Regenaxer> or (+List +IdxFold +String) for more tolerant search
<xificurC> I can imagine query requests of form A and B and not C
<Regenaxer> With AND ?
<xificurC> not sure how to build the html for such a case
<Regenaxer> you can use +ListTextField
<beneroth> javascript to make the form extendable. maybe using a dropdown <select> for the connection-rule (AND, OR, ) ...
<Regenaxer> but better here a fixed number of +TextFields
<Regenaxer> cause the query needs them too
<Regenaxer> But yes, could be made dynamic
<beneroth> Regenaxer, how do you usually solve this? giving the user an editor to build queries, or only offering pre-made queries?
<Regenaxer> I did that once, offering keys in a dropdown
<Regenaxer> So the user could build a restricted form of queries
<beneroth> how did it turn out?
<Regenaxer> It was good in that case, but never needed such a thing recently
<xificurC> are there features for search-as-you-type and give-options-as-you-write?
<Regenaxer> yes, +DbHint
<Regenaxer> '(+Focus +Var +DbHint +TextField) '*ResNm '(nm +Res) 40)
<Regenaxer> It pops up values from the index
<Regenaxer> Other fields have it automatically, eg +Obj +TextField
<Regenaxer> '(+Var +Obj +TextField) '*DpTecKd '(nm +Kunde) 20)
<Regenaxer> pops up names
<xificurC> so a +ListTextField could be used for people to write "A B C" and search for (and A B C)
<xificurC> sorry for jumping around, reading docs as we go :)
<Regenaxer> yes, but the Pilog query must handle this
<Regenaxer> For fixed number Pilog is simple
<Regenaxer> select handles +List automatically
<Regenaxer> So you need just eg 3 filter clauses for 3 search fields
<xificurC> can't the input be saved in *Prjs as '("A" "B" "C") and just have (select (@@) ((prjs +Deploy *Prjs)))?
<xificurC> I skipped the filter clauses for now
<Regenaxer> saved in *Prjs as '("A" "B" "C") happens with +ListTextField
<Regenaxer> but select won't work I think
<Regenaxer> it needs atomic criteria
<xificurC> a cons cell is an atom?
<Regenaxer> ie 3 generators and 3 filters
<Regenaxer> no, only number or symbol
<xificurC> but queries often have (nr +Item (1 . 10))
<Regenaxer> yes, a pair is a range
<Regenaxer> that's why a list will not work as a criterium
<Regenaxer> Pilog thinks it is a range
<xificurC> I'm confused then, that's not an atom and is a criterium
<xificurC> ah, ok
<Regenaxer> yeah :)
<xificurC> thought it might be smart with +Lists
<xificurC> so if that was to be dynamic I would need to make the query dynamic as well
<xificurC> build it dynamically
<Regenaxer> yes
<xificurC> makes sense, thanks
<Regenaxer> So taking a fixed number is easier
<Regenaxer> also in GUI
<Regenaxer> Perhaps also less confusing to the user
<xificurC> I will start with 1 and see if there is a use case for more complex queries. Just wanted to know the options :) YAGNI
<Regenaxer> :)
<xificurC> with +Ref I can search "foo" for "foobar" but not "bar" for "foobar". +Idx gives me this capability and +Fold folds the string and +IdxFold does an +Idx on a +Fold. Is this all correct?
<Regenaxer> yes, though the last one first breaks down and then folds iirc
<Regenaxer> hmm, wait. That's (+Fold +Idx), so you are right
<Regenaxer> no
<xificurC> so what's the difference between (+Fold +Idx), (+Idx Fold) and (+IdxFold) ?
<Regenaxer> +IdxFold firs breaks down :)
<Regenaxer> I always look at doc/search
<Regenaxer> it is also on I think
<Regenaxer> It lists all cases which make sense
<Regenaxer> is it there?
<xificurC> there's an entry for +IdxFold and for +Fold +Idx, none for +Idx +Fold
<Regenaxer> It shows the use cases, and the matching select filter predicate
<Regenaxer> ok, so the other makes not much sense for reasons I forgot ;)
<xificurC> I'm not sure I understand how does +IdxFold match "Regen Axer" and "regenaxer" at the same time
<xificurC> it's as if both the folded and nonfolded versions are indexed
<Regenaxer> No, only "Regen" and "Reg" etc, or "Ax..." but also "regena..."
<Regenaxer> The lists below show the dumps of the indexes
<xificurC> Item Names
<xificurC> (+IdxFold +String) part
<xificurC> ("axer" {2}) {2}
<xificurC> ("egen" {2}) {2}
<xificurC> ("Regen Axer" . {2}) {2}
<xificurC> ("regenaxer" {2}) {2}
<xificurC> ("gen" {2}) {2}
<xificurC> ("xer" {2}) {2}
<Regenaxer> So these are what can be searched
<Regenaxer> yes
<xificurC> ("Regen Axer" . {2}) {2}
<xificurC> and then
<xificurC> ("regenaxer" {2}) {2}
<Regenaxer> Yes
<Regenaxer> the full text can be found too
<xificurC> so the full text is an exception?
<Regenaxer> I find +IdxFold the most intuitive for the user
<xificurC> findable as non-folded
<Regenaxer> yes
<Regenaxer> It is not used in Pilog, but needed for (db ...) and (collect ...)
<Regenaxer> ie exact accesses
<Regenaxer> select detects that it needs to fold
<xificurC> so
<Regenaxer> so the index is not searched for "Reg...
<xificurC> what is the difference between (+Fold +Idx) and (+IdxFold)? The examples only differ in the "Regen Axer" search which seems to work as an exception in +IdxFold and won't in (+Fold +Idx)
<Regenaxer> yes, so +IdxFold is more useful
<Regenaxer> Normally I don't use (+Fold +Idx)
<Regenaxer> should perhaps be removed here
<Regenaxer> But not sure. Makes sense if ("egenaxer" should be found
<Regenaxer> despit the user entered a blank
<Regenaxer> I should write a select query generator read macro
<Regenaxer> They are all following the same patterns meanwhile
<beneroth> <Regenaxer> I should write a select query generator read macro
<beneroth> YES
<beneroth> :D
<Regenaxer> :)
<Regenaxer> In the beginning it was not clear to me which combinations turn out useful
<Regenaxer> Let's see, at the moment I'm too busy
<beneroth> good business?
<beneroth> or still fighting with android? :/
<Regenaxer> Business all
<Regenaxer> Had meeting with BTG today. Everything green :)
<beneroth> great :)
orivej has joined #picolisp
<tankf33der> Regenaxer:
<tankf33der> can you look at this C code
<tankf33der> u.ptr = key;
<tankf33der> if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
<tankf33der> u.i is not initialized, right ?
<Regenaxer> It could be in some include file
<tankf33der> i dont think so
<tankf33der> it crashs
<tankf33der> if i replace u.i to length it works as should.
<Regenaxer> Gives a compile-time error?
<tankf33der> no, address sanitize
<tankf33der> i pass 1 byte to function, it buffer overflows.
<Regenaxer> So HASH_LITTLE_ENDIAN *is* defined somewhere?
<Regenaxer> And for 'key' a sufficiently large array is passed?
<tankf33der> i think problem only in u.i
<tankf33der> full code:
<tankf33der> function hashlittle
<tankf33der> if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
<tankf33der> const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */
<tankf33der> it crashes here, because i pass 1 byte, but it thinks it is 32-bit chunk!!!
<tankf33der> because later in if it assume 16-bit chunk and default if read by bytes, not chunks.
<Regenaxer> What kind of code is this?
<tankf33der> hash function
<Regenaxer> yes :)
<tankf33der> this one :)
orivej has quit [Ping timeout: 264 seconds]
<xificurC> Regenaxer: +DbHint only works *after* first search, why is that? I land on 8080 and it doesn't work, after first search URI gets rewritten to session port and it starts working
<Regenaxer> This is not +DbHint, but a JS problem
<Regenaxer> "Same origin"
<xificurC> and we forgot on the search-as-you-type functionality, is there a prefix class for that too?
<Regenaxer> If you need JS already on the first page after (app), you need to rediret
<xificurC> ok, I can try :)
<Regenaxer> Normally, the first page is just login
<xificurC> this is a single page right now, not public (intranet), no need to auth
<Regenaxer> Try this:
<Regenaxer> (de work ()
<Regenaxer> (app)
<Regenaxer> (redirect (baseHRef) *SesId "!clock") )
<Regenaxer> (server 8080 "!work")
<Regenaxer> yes
<Regenaxer> So put some intermediate fun
<Regenaxer> (app) changes the port
<xificurC> yeah ok, thanks :)
<xificurC> and the search-as-you-type? I had a feeling I saw it on youtube when you were presenting somewhere
<Regenaxer> so XmlHttpRequest thinks it is another server. Stupid!
<xificurC> it is! :)
pierpal has quit [Quit: Poof]
<Regenaxer> search-as-you-type for the pop up?
<xificurC> I mean it is another server! :)
<Regenaxer> Should work
pierpal has joined #picolisp
<Regenaxer> Well, IP address is the same
<xificurC> no, I mean each character typed in any of the search fields automatically fires the search that searchButton does
<Regenaxer> Another port on the same server is another server? ;)
<xificurC> so the user doesn't click on a Search button, just types and sees the results live
<xificurC> on small db it is a nice feature :)
<Regenaxer> Ah, no, this might be too heavy
<xificurC> well another port can easily be another application (daemon)
<Regenaxer> yes, application, but not server
<Regenaxer> I think you could implement search-as-you-type
<Regenaxer> The search button needs to be +JS then
<Regenaxer> not sure
<Regenaxer> You could try
<xificurC> ok, as usual thanks for the tips and time
<Regenaxer> np :)
<Regenaxer> I never thought about this kind of immediate search, but what is important is that the Search button is always the first button in the dialog
<Regenaxer> In this way Return starts the search
<Regenaxer> I feel that better than an automatic search. Just hit Enter
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
rob_w has quit [Remote host closed the connection]
<xificurC> interactivity is the heart of simplicity :) It's a continuation of +DbHint if you think about it from a broader perspective
* xificurC thinks
<Regenaxer> True, I just fear that fast typing is hindered due to permanent refreshes of the chart contents
<xificurC> maybe. Personally, given infinite knowledge in this, I would somehow force the search to only happen after 100ms of inactivity
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
<beneroth> bbl
beneroth has quit [Quit: Verlassend]
arievw has joined #picolisp
arievw has quit [Client Quit]
orivej has joined #picolisp
stix has joined #picolisp
stix is now known as oooook
rob_w has joined #picolisp
xificurC has quit [Quit: - A hand crafted IRC client]
xificurC has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #picolisp
rob_w has quit [Quit: Leaving]
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
oooook has quit [Quit: oooook]
orivej has quit [Ping timeout: 240 seconds]
xificurC has quit [Quit: - A hand crafted IRC client]
xificurC has joined #picolisp
alexshendi has joined #picolisp
alexshendi has quit [Quit: Yaaic - Yet another Android IRC client -]
xificurC has quit [Quit: - A hand crafted IRC client]
xificurC has joined #picolisp
orivej has joined #picolisp
xificurC has quit [Quit: - A hand crafted IRC client]
xificurC has joined #picolisp
xificurC has quit [Client Quit]
xificurC has joined #picolisp
pierpal has quit [Ping timeout: 244 seconds]
orivej has quit [Ping timeout: 244 seconds]