#foswiki 2015-12-18,Fri

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
gac410vrurg, I added examples to the topic. (still brainstorming)
Like many other macros, control output with format="$various $tokens..."
[00:06]
vrurggac410: Looks reasonable if I got it right that URLPARAM with validate parameter does not produce any output but validates only? For fail="report" the parameter value will be replaced with formatted string. For fail="inline" failures are to be displayed with %URLREPORT.
Is it this way?
[00:11]
gac410Not quite. If validate passes, just return the output.
I was thinking that with the "regex" validation, the format= could also contain $1, $2 ... capture tokens
So "report", (or replaced by "only" in my last update) would ONLY report errors, otherwise be a nop.
[00:11]
vrurgIf it returns the output when validate passes then I cannot use it in INCLUDE. [00:13]
gac410Then you would use "only" aka "report"
So oops, and inline would be used right in the macros. report/only would be used in a validaion block or include.
s/macros/topic/
the downside of "oops" is that the way foswiki is structured, we have no way to collect them. So the first macro that evaluates to a failure will kill the transaction with the oops screen.
[00:13]
vrurgI see what you're trying to achieve... Let me think for a while... [00:16]
gac410Sure. Thinking is good. [00:17]
vrurggac410: I see no problem with oops. Sometimes it's better to fail. No point of collecting them. [00:17]
gac410well if I have a topic with 10 validations, I have to encounter one-at-a-time. vs. seeing all the results [00:18]
vrurgIs it possible to oops with a particular message? Should be. [00:20]
gac410Yes. code issues a "throw" of an OopsException ... and templates are used to generate the results. [00:20]
vrurgThen it would be nice to have err_msg="Invalid parameter param_name" for oops. [00:21]
gac410  throw Foswiki::OopsException(  'params',    def    => 'min_length_error',   params => [ 'blah', $min ]
- params is the template, "oopsparams.tmpl", def is the specific message template definition, and params, is an array of values to substitute into the message.
[00:23]
FoswikiBothttp://trunk.foswiki.org/System/PerlDoc?module=Foswiki::OopsException [00:23]
gac410So min_length_error points to a template definition that includes: %MAKETEXT{"The data enterned for [_1] is too short. It must be at least [_2] characters." args="%PARAM1%, %PARAM2%"}% [00:24]
vrurgMy point is: all three has to be available to to pure validation blocks. For that matter there must be a way to avoid any output from them when validation passes ok. So, perhaps it would be better to have a no_output parameter. inline could be dropped in favor of report and instead URLREPORT be used to output errors about parameter expansion.
vrurg need to discuss local dictionaries for MAKETEXT... Constantly forget about this question.
But maketext waits.
Otherwise you have a very good point of validating those URLPARAMs which used only once.
[00:25]
gac410okay. I'll ponder some more. I was trying to avoid the URLREPORT and gathering up messages into some transient storage. Though that would be a nice option. [00:27]
vrurgNo need to have additional macro. [00:27]
gac410Because the place to oops would be in URLREPORT ... so that you get all the messages reported in one big failure. [00:27]
vrurggac410: Ok, no URLREPORT. URLPARAM with empty parameter name and format="$report"
oops is oops. Once called to stops everything. I don't think it'll be used a lot.
[00:28]
gac410hm well the macro name isn't as difficult as the save the validation errors all up for reporting later.
Probably need to hang it off the session somehow.
Okay anyway .. thanks for the sounding board. I'll tinker some more.
[00:29]
vrurgActually why not storing it on Foswiki::Meta object? It shall have some kind of temporary store for purely internal used by plugins and whoever else would need it. [00:31]
FoswikiBothttp://trunk.foswiki.org/System/PerlDoc?module=Foswiki::Meta [00:31]
vrurgThe store would have no direct impact on the output.
s/used/use/
[00:31]
gac410Meta is a "TopicObject that represents an object potentially in store. Not sure that's a good place to hang temp stuff. In most plugins, you save it in the plugin instance which gets created for each session.
But URLPARAM is a special macro, no plugin to hang stuff, it's in the Foswiki:: namespace IIRC
The Macros in lib/Foswiki/Macros are ugly. They were refactored out from Foswiki.pm. but still declare themselves as "Package Foswiki;"
[00:33]
vrurggac410: I'm not proposing to store it as META. Just to have a key on Foswiki::Meta object hash. Like, say, $topic->{_temp}{urlparam}{errors}. Nothing from _temp key would make it into the store and will be just trashed when the object destoyed. [00:36]
gac410Okay. That one would probably need some discussion with CDot. ... [00:37]
vrurgThe point here is that any error from the validation process make sense only until redering is done. So, the parent object which actually depends on this information is definetely the place to keep this info. [00:38]
gac410URLPARAM is called with two fields: $this - the foswiki session object, and $params the parameters. We'd have to poke around to find a topic object. [00:39]
vrurgBTW, as I plan to switch plugins to OO model I also plan to make them bound to pieces of topics being currently processed. I.e. if there is an INCLUDE from parent topic – this INCLUDE must have it's own pool of plugins attached. But in this case if a plguin from INCLUDE would need to pass over some info to another instance attached to the parent topic then the only way to do it is to use some storage from the parent topic.
$this contains a reference to the currently rendered base topic, doesn't it?
[00:42]
gac410$this is the Foswiki session object. $this->{request} to get the request object. Complete list are at the top of Foswiki
request, response, context, .. .topicName, webName ... but no object
[00:45]
vrurggac410: I don't remeber details at the moment as deep into another issue. And >3 hours on a video call makes me a bit distracted. :) A hacky way then to use the request object as it's guaranteed to be one-to-one mapping into the base topic. But that's ugly.
There must be a way to have such a pocket for temporary data persistent over the time of rendering of an object. Would it harm adding one more parameter to a call to a macrot?
[00:51]
gac410I'll have to poke around and see if there are other precedences. The finish() method for the Foswiki singleton undefs a bunch of stuff that I suspect were tacked on along the way.
Macros/ICON.pm adds on $this->{_EXT2ICON} and {_KNOWNICON} and a few others.
Zones macro use {_addedToHead}
anyway. I'll have to pick it up another time.
[00:56]
vrurggac410: I was sure there is need to have a kind of _registerTempStore method which would remember what temporary keys were created and has to be cleaned up upon destruction.
Because what's in the finish() now is definetely both hack and messy even if it looks pretty. ;)
[01:01]
gac410Nothing formal that I'm aware of. when DEBUG aka Asserts are enabled, then the Foswiki::finish will crash if stuff is left behind. [01:02]
vrurg604K Moo
1,1M Mouse
[01:03]
gac410that's a pretty big bump in memory size.
or maybe I'm dating myself working about a meg here & a meg there.
worrying
[01:04]
vrurgI hope to have it formalized when OO is revamped. Yet, that temp storage is better be an object on it's own . [01:05]
gac410yes. ageed [01:05]
vrurgThe actual lib code is 420K for Moo and 804K for Mouse. Rest is manuals. [01:06]
gac410oh. and that's hopefully not all resident, but loaded on demand? [01:07]
vrurgIgnoring a KB here, a MB there produces GB monsters eventually. So, I vote for the old-fashioned expensive RAM to be kept in mind. :)
gac410: Still checking. I've got a script installing modules into their own private subdirs. Have clear view what's been installed with each module – not just their own code but dependencies too.
[01:07]
........ (idle for 37mn)
gac410installing moose installs 12 packages on ubuntu 15.04
Hm Requires Class::Load. At one point we had added that, and there was a dependency issue and we had to go back and remove it. I don't recall the details now.
[01:46]
I think at the time Class::Load had some xs requirements that we had trouble getting around. Ubuntu has two packages libclass-load-perl and libclass-load-xs-perl [01:54]
vrurggac410: Forget about Moose. Both Moo and Mouse are Moose compatible. Even better: they can just step aside if they detect Moose is already loaded.
It's better to use one of them. And if there is Moose loaded under supervision of PSGI/Plack then we're gonna be ok.
[01:57]
gac410cool. so we use lighter versions initially, and if PSGI/Plack takes over , it just works.
Mouse is completely standalone - no deps came in. Moo is bigger, 10 deps installed.
[01:59]
vrurgSome of these 10 are build-time only. I still checking. Have a list of what it is loading in memory. But same time on OSX: "use Moo" – +648K, "use Mouse" – +1324K.
Mouse loads Class, next, maybe::next
Moo loads Sub, Class::MOP, Class::Method, maybe::next, Devel::GlobalDestruction, MRO, MRO::Compat, Role, Method,
This is output of analysing of GLOB tables. I skipped some sub modules.
[02:03]
gac410came across this snippet while googling: perl -e 'use Moo; printf qq{%30s %s\n}, $_, $INC{$_} for sort keys %INC;' [02:09]
vrurgDamn, of course!!! It's been more than decade since I last used $INC{}...
This is what is called professional deformation – I've spent too much time mangling with GLOBs last few months. ;)
[02:13]
Ok, Moo depends on Devel::GlobalDestruction, Module::Runtime Sub::Exporter::Progressive and Sub::Util. [02:19]
***ChanServ sets mode: +o Lynnwood [02:20]
.......................................................... (idle for 4h46mn)
ChanServ sets mode: +o CDot [07:06]
.................................................................. (idle for 5h29mn)
ChanServ sets mode: +o gac410 [12:35]
................... (idle for 1h34mn)
ChanServ sets mode: +o Lynnwood [14:09]
............. (idle for 1h4mn)
ChanServ sets mode: +o MichaelDaum [15:13]
...................................... (idle for 3h5mn)
gac410ping Babar ... are you around? [18:18]
....... (idle for 31mn)
***gac410 sets mode: +v WikiRingBot [18:49]
................................. (idle for 2h43mn)
SvenDowideit_gah. first day of holidays. [21:32]
gac410Hi SvenDowideit_ [21:32]
SvenDowideit_sorry, yes, i have not sighted any emails - i'm overwhelmed by github updates
i'd love to pass you guys the domains
[21:32]
gac410Did you get my emails? foswiki.org cannot send to gmail any more.
We need spf records. they are blocking email if not valid spf,
[21:33]
SvenDowideit_i probably did, they'd be in the 100,000 unread emails in that account [21:33]
gac410I sent it to 3 accounts of yours - one bounced. [21:33]
SvenDowideit_foswiki.org currently uses dreamhost
i'm a tad surprised - as my other emails from there are ok
i think..
which bounced?
[21:34]
gac410fastmail domain [21:34]
SvenDowideit_ah y, i only used that as a 30 day trial, sweet [21:35]
gac410the spf requirement is for any server using ipv6, which the sonologic network is on. [21:35]
SvenDowideit_but fosiki.com and home.org.au are set up the same as foswiki.org [21:35]
gac410I guess ipv4 is still okay without spf. [21:35]
SvenDowideit_ah, roger [21:35]
gac410I thing these are right ... I used a generator
foswiki.org. IN TXT "v=spf1 a ip4:82.94.245.62 ip4:78.137.100.221 ip4:46.16.79.183 ip6:2001:888:2156::3:11:1 ~all"
and foswiki.org. IN SPF "v=spf1 a ip4:82.94.245.62 ip4:78.137.100.221 ip4:46.16.79.183 ip6:2001:888:2156::3:11:1 ~all"
[21:36]
SvenDowideit_so - if you guys have a plan, tell me and i'm happy to act - if you twitter me, or facebook, its (currently) still got few enough incoming for me to see it in a non-batched way :( [21:36]
gac410oh... to transfer the domains? [21:37]
SvenDowideit_either way
its pretty clear that i've lost all foswiki bandwidth
[21:37]
gac410in meantime could you try adding those spf records? [21:37]
SvenDowideit_yup, will do
i'd be very happy for the association to be independant :)
[21:37]
gac410We'll have to wait for them to propagate and see if it clears up the 500 Service unavailable from gmail. [21:38]
SvenDowideit_i'll poke it in the next 30mins [21:38]
gac410I use godaddy for my domains, and host my own dns. but I'd rather not be the owner of foswiki though. Who knows what the future brings.
It woudl be good if we could find a hoster where multiple foswiki admins could have access.
[21:39]
SvenDowideit_yup [21:39]
gac410Thanks Sven.
And Merry Christmas!
(almost)
[21:39]
SvenDowideit_hehe, you too :)
nice to see the updates flying past
[21:40]
gac410I really hope it doesn't come down to needing DKIM and DMARC ... that's a lot harder to set up. Google seems to day they want SPF and recommend DMARC/DKIM for ipv6 senders.
day/say
[21:41]
SvenDowideit_SvenDowideit_ expresses ignorance [21:45]
gac410https://support.google.com/mail/answer/81126?p=ipv6_authentication_error&rd=1#authentication [21:45]
SvenDowideit_ISP's here in Aus are horrible and don't give us IPv6 [21:46]
gac410Though that says SPF is only recommended. But I've verified our PTR records, and they are correct for both v6 and v4 . The V6 ptr was wrong.
google gmail and ipv6, and lots of places are pretty unhappy. Gmail won't tell you exactly what's wrong, only that it's rejected.
[21:46]
SvenDowideit_mmm, the first google hits on dreamhost and spf seem to use a hostname, not IP's
ah, there's noe
ah, there's one
[21:49]
gac410yeah IP addresses are definitely supported.
The ip addresses I included are for translate.foswiki.org, and it's relay, foswiki.org and the ipv6 for foswiki.org
[21:49]
SvenDowideit_need to put the SPF into a TXT is seems [21:50]
gac410You have to have both.
a TXT record and a SPF record. iirc
[21:50]
SvenDowideit_there's no SPF type in the 'type' dropdown [21:50]
gac410crap. Well it is part of the standard. [21:51]
SvenDowideit_none of the kids these days care about standards
We have now added the TXT record for .foswiki.org with value v=spf1 a ip4:82.94.245.62 ip4:78.137.100.221 ip4:46.16.79.183 ip6:2001:888:2156::3:11:1 ~all. Our DNS servers will start serving this record within a couple of minutes.
so we have options:
1 xfer the 3 foswiki.* domains to the association
[21:51]
gac410Okay great thanks. Looks like the SPF record may be deprecated, but older clients might want it. But meh... you can do what you can do.
three?
[21:52]
SvenDowideit_2 i can point the nameserver to a box/ dns providor you guys have
3 mumble, mumble, business as usual
y, com, net, org
[21:53]
gac410Ah... okay. [21:53]
SvenDowideit_when i made the fosiki company, i grabbed the full set of miss-spellings
foswiki is just a typo domain for my company \0/
[21:54]
gac410Probably we ought to at least get the 3 to our own server. I'll have to talk to gmc to see if he is interested. If he hosts the primary, I could maybe be the backup.
when are the domains up to expire?
[21:54]
SvenDowideit_I finally managed to snag uwiki.com - i would have loved to have those 3 years ago
5months for foswiki.com, 10 months for the other 2
doesn't really matter - its on auto-renew
[21:55]
gac410Is the code that builds your debian packages uploaded somewhere? [21:55]
SvenDowideit_probably, but i'm not sure enough [21:56]
gac410I assume someone's credit card takes the hit though. [21:56]
SvenDowideit_y, $30 / year or something
we're not at 10 years of foswiki yet :)
[21:56]
gac410I've checked your github. couldn't find it. And the one on foswiki github is very old - drake's old code iirc. [21:56]
SvenDowideit_and you guys gave me way more fun than that [21:56]
gac410We had someone offer to build packages, but he gave up when we could not find the code. He didn't have it to build a complete build system. [21:57]
SvenDowideit_yeah, the main foswiki release deb pkg source is in there too [21:57]
gac410in where? [21:57]
SvenDowideit_yes :)
i can't remember if drake removed it from master, or what
whereas the contribs was hyper-secret - and i keep wanting to er, make sure its sanitized
[21:57]
gac410well anyway we are left in the lurch. 1.1 has security holes, won't run on new apache, won't run on recent perl, and we can't fix the packages. [21:59]
SvenDowideit_probably pointless given how long its been - idk what the protagonists care about these days
so the main foswiki 1.1 pkg is the important bit?
what repo is that in now?
[21:59]
gac410Well people who want packages and insist on them want everying I suppose... but whatever we can get [22:00]
SvenDowideit_SvenDowideit_ is a pre-git foswiki-er man :) [22:00]
gac410everything is in github.com/foswiki/distro [22:00]
SvenDowideit_oh gosh - i goto the foswiki org, and it says i can 'invite someone' [22:01]
gac410svn is still kicking around. read-only
You are still an owner of a lot of foswiki accounts.
[22:01]
SvenDowideit_k, cloning distro
is that where the dev is happening?
[22:01]
gac410we all hope you come back some day ... if your contracted sites ever pull you back in to update. [22:01]
SvenDowideit_giggle :)
so many things to work on
dalmatian puppy got added to the mix too
[22:02]
gac410We are trying to keep master in "releasable state" so it's the tip of the "next release" but experimental stuff goes into "feature branches" [22:02]
SvenDowideit_nice - i was wondering about the separate all the things into repos thing :) [22:02]
gac410We don't want master on git to ever get like trunk ended up with semi-implemented code that was a beast to figure out how to release. [22:03]
SvenDowideit_yup [22:03]
gac410Each non-Default extension get's its own repo. most just use master. distro, is core + all default. and master tries hopeffuly to stay a bit more stable. [22:04]
SvenDowideit_even --depth 1 is huge
ah, sweet
[22:04]
gac410pseudo-install does an auto-clone of the github.com/foswiki/<theextension> [22:04]
SvenDowideit_nice :)
mmm, but you don't normally use pull requests huh
[22:05]
gac410if someone forks and asks us to pull... sure. that works too.
But we are letting most dev's just commit right into our own repos.
[22:06]
SvenDowideit_ok, so Release01x01 branch [22:06]
gac410is dead
Release02x00 is current and master is the upcoming 2.1
[22:06]
SvenDowideit_oh, so you're not wanting a newer fixed pkg for 1.1 [22:07]
jastsome of the security fixes in 2.0 were pretty big so they didn't end up in 1.1 [22:07]
gac410well, we did release a 1.1.10 to make it work with recent CGI and Perl. [22:07]
SvenDowideit_roger that
ok, and that's in the 1.1 branch?
[22:07]
jastat least that's what I think summarizes what happened :) I didn't follow the details on what went where [22:08]
SvenDowideit_it might be easiest to remember how to build debs from there, and then work out how to bring it into master
hope you don't mind if i use Docker containers for it
[22:08]
gac410yeah. and all the CGI redesign around multi_param() to prevent that security hole is only in master. 1.1.10 just disables the warnings so fw will run. [22:09]
SvenDowideit_I used to have to have a RH and a DEB vm to build some things [22:09]
gac410gac410 has no idea what a docker container is. [22:09]
SvenDowideit_think chroot, but using modern linux features, and adding all sorts of extra limitations to process visibility
its been my life for the last 2.5 years :)
and i'm only doing peripheral work
darn, looks like i can't really use a shallow clone for this
[22:10]
gac410Ah ha... gmail from foswiki.org finally didn't get rejected. [22:12]
SvenDowideit_yay, i've done something useful on my holidays, time to go take a long nap :) [22:13]
gac410Still went into the spam folder, but finally no 500 [22:13]
SvenDowideit_i wonder if there will be a dockerized foswiki install before or after there's a dockerized sharepoint :/
i presume installing a contrib still goes into the same dir structure as the core?
as that makes the immutable containers thing harder
[22:17]
gac410Wahoo ... a registration email from foswiki.org was accepted by gmail, and was not filtered to junkmail folder!
Thanks again Sven
Yes, nothing really has changed with foswiki structure. Contribs, Plugins, etc... same structures
[22:18]
SvenDowideit_cool - looks like i'm off to take dog to beach
I've got code, bug me more later :)
[22:19]
gac410okay. well have a great Christmas, and happy new year!
I'll hit you up later for more packaging, domain transfer stuff, etc. Suppertime here for me, so gotta head to the kitchen.
[22:19]
SvenDowideit_enjoy :) [22:20]
gac410Sven. if you have thoughts on how foswiki could be better structured for immutable containers, or distro packaging, please add your $.02 to Foswiki:Development.ImproveOOModel [22:23]
FoswikiBothttp://foswiki.org/Development.ImproveOOModel [ ImproveOOModel ] [22:23]
SvenDowideit_noooooooooo! you're trying to suck me into another 90 hour a day thing :) [22:23]
gac410btw. on your old hot-button regarding configure. I hope CDot et. all addressed 110%. new CLI tool ... ie tools/configure -save -set {SomeKey} = value
very easy to automate cli based configuration
[22:24]
SvenDowideit_YAY, that is super awesome
ok, found the deb tooling for 1.1.9 core release, so progress
[22:25]
gac410the last year getting 2.0 out was a HUGE leap forward. fully unicode core now too. [22:25]
SvenDowideit_i wants my single page ASCII back [22:26]
gac410:) [22:26]
SvenDowideit_damnit, if i make a PR, i'll be listed in https://github.com/foswiki/distro/graphs/contributors [22:27]
gac410If you do a PR, if you make the commit message have Item13002: that's as good a catchall task for the debian package as any of the others. Thx [22:33]
FoswikiBothttp://foswiki.org/Tasks/Item13002 [ Item13002: add debian packaging support ] [22:33]

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)