These are chat archives for canjs/canjs

1st
May 2017
Eben
@eben-roux
May 01 2017 06:33
apologies for the late replay Brad, went to bed (around 23h00 here last night)
But yes... the helpers are not included in the lookup. Perhaps I was doing something odd. I'll see if I can get create a jsbin demonstrating the issue. Usually a simplified version does help :)
Brad Momberger
@bmomberger-bitovi
May 01 2017 06:35
I don't think you're doing something odd. I think that's intended behavior; helpers only work in {{magic tags}}
Eben
@eben-roux
May 01 2017 06:35
ah... ok. Not going to btoher with the jsbin then. I actually thought so since all the docs indicate it as such
So Nico's suggestion is sound then? It worked so I'll go with that anyway.
Here is the solution:
Using helper setRemoveButtonContext.
Stuff still in development so sorting out as I go along
Brad Momberger
@bmomberger-bitovi
May 01 2017 06:42
If it works for you, it's fine. I would consider moving helpers into the viewModel as viewModel functions, which would let them be used in both contexts.
Eben
@eben-roux
May 01 2017 06:43
Perhaps there is a way to do that but I'm not seeing it at present :(
I pass a list of colum items to the table and a column can be a remove-button. A context is then given to the column for the button.
I also pass the rows as the super map's value so as each is rendered a remove-button is added to the relevant column for the row. It then needs to get the context.
I could probably add the context to the row when returning the list of rows I guess... I'll have a look
Brad Momberger
@bmomberger-bitovi
May 01 2017 06:54
I don't know whether you defined the helper on your component or globally via stache.registerHelper
in the second case, if you also need to use it everywhere, yeah, that's a bit complicated.
"moving the helpers into the viewModel" is more relevant to the first case, if the helper is already defined in the component
Eben
@eben-roux
May 01 2017 06:55
Was on the table component. I am adding a processedRows on the table's ViewModel so the values will be set on each row. It should yield the same result without resorting to the odd helper calling.
Brad Momberger
@bmomberger-bitovi
May 01 2017 06:56
Sounds reasonable. Are you using a getter that references rows? :)
Eben
@eben-roux
May 01 2017 06:57
On the table's view model:
    rows: {
        Value: DefineList
    },
And passing that from a promise:
<sentinel-table {columns}="columns" {rows}="usersPromise.value" />
Brad Momberger
@bmomberger-bitovi
May 01 2017 07:02
OK so far. We push getters for data that's a view on other data, because managing the dependencies is not fun. So:
   processedRows: {
     get: function() {
        if(this.rows) {
           return this.rows.map( ... some function that adds contexts and such ... )
        }
     }
  }
Eben
@eben-roux
May 01 2017 07:03
pffft... serious brain fart
If you can read you can excel!
You have been saying to just move the method to the view model...
well... I did
lol
Brad Momberger
@bmomberger-bitovi
May 01 2017 07:05
And that worked?
Eben
@eben-roux
May 01 2017 07:05
That works just fine! For some odd reason my head wasn't seeing that as an option.
I just needed a method to process the column and row that I passed in. I guess I was thinking in terms of attributes for the view model but it can do everything a helper can do.
It means I don't really need the helpers.
Brad Momberger
@bmomberger-bitovi
May 01 2017 07:07
Right.
We still support local helpers but generally nudge people away from using them for this reason. They're really complicated and mostly the extras that helper functions offer (settable computes as arguments, getting access to the truthy and falsy subsections) aren't needed for cases like this.
Eben
@eben-roux
May 01 2017 07:10
That's true. I'll keep it in mind.
Brad Momberger
@bmomberger-bitovi
May 01 2017 07:10
You can do some awesome stuff with helpers but you should consider them as stache extensions.
Eben
@eben-roux
May 01 2017 07:10
Thanks for the nudging :)
Brad Momberger
@bmomberger-bitovi
May 01 2017 07:10
Working with your data is always best done on the view model.
Ah, you're welcome! Now I'm overdue for bed.
Frank Lemanschik
@frank-dspeed
May 01 2017 07:11
gn8
:D
Eben
@eben-roux
May 01 2017 07:11
lol, I got up about 1.5 hours ago
good night then!
Frank Lemanschik
@frank-dspeed
May 01 2017 07:11
Eben! Diffrent time zones maybe ;)
Eben
@eben-roux
May 01 2017 07:23
@frank-dspeed : I suspect you're onto something... :P
Have the same thing supporting my open-source projects with the time zones. I am sometimes concerned that folks are thinking that I'm not responding. Meanwhile I'm sleeping.
lol
Frank Lemanschik
@frank-dspeed
May 01 2017 07:25
ya i know this problems :)
i am on Gran Canaria
but did you heard about auto responders? i can imagin they are usefull for the case of customers or contributors messaging on sleeping times
Eben
@eben-roux
May 01 2017 07:27
Goodness... you have a lot of water around you if I'm reading the map correctly. So your time zone isn't too far off the South African one.
he he... yes... auto-responders
Frank Lemanschik
@frank-dspeed
May 01 2017 07:27
Right :)
Eben
@eben-roux
May 01 2017 07:27
heard of them
mmm.... not a bad idea... perhaps I'll look into that. Mostly support via github issues.
Frank Lemanschik
@frank-dspeed
May 01 2017 07:29
and github again supports bots and autoresponders
for issus
Eben
@eben-roux
May 01 2017 07:29
ooo... bots. I can do with an ebenbot.
Frank Lemanschik
@frank-dspeed
May 01 2017 07:29
for example in docker/docker or other bigger projects
Eben
@eben-roux
May 01 2017 07:29
or autobot lol
Frank Lemanschik
@frank-dspeed
May 01 2017 07:30
we use bots to verify if a Issue has all needed infos
if not the bot answers the issue what is missing
Eben
@eben-roux
May 01 2017 07:30
interesting
use this that are the events fired by github you can send them to a express server or what else
and let it handle that
you can use for example issues hook and if conditions like time are true
you simply post a respond that is a under 10 lines code bot that does exactly what you like
Eben
@eben-roux
May 01 2017 07:34
cool beans, thanks for the info. Pretty nifty things one can actually do with all the technology nowadays.
Frank Lemanschik
@frank-dspeed
May 01 2017 07:34
yes sure thats why we created the tech of now days
today the problem is not what you can do it exists more then you can do
problem is to choose the right method out of this all for the job
Eben
@eben-roux
May 01 2017 07:35
that is true... and finding the time to get around to making these things dance :)
Frank Lemanschik
@frank-dspeed
May 01 2017 07:35
yes thats the most big chellange
find co workers
to multiple the knowleg of the people that have it
good co workers are rare
Eben
@eben-roux
May 01 2017 07:37
Also true. Finding people that are willing to invest time in one's open-source project is also difficult. Although a PR every now and again certainly does help.
Frank Lemanschik
@frank-dspeed
May 01 2017 07:37
but also that is solved via now days tech and methods but hard to combine them right
Eben if you need help on opensource you will most time simply offer bountys
there are plattforms for that
where you can offer tasks to coders
and if you wonder how you get the money for that then you need to choose crowdfunding /donations
Eben
@eben-roux
May 01 2017 07:38
That "combination" is a big one I find. You can even see it in job specifications. The combinations are ridiculous.
Frank Lemanschik
@frank-dspeed
May 01 2017 07:38
ya i take it easy
i take only jobs where i can do it how i like it
i don't accept any wishes
if a customer wants to do something him self he can do it else if he wants to hire me he should let me do it or .......
:D
then i also contract hourly only
!
Eben
@eben-roux
May 01 2017 07:39
What I am aiming for is a freemium model on some of the projects. I'll see how that goes. So my core projects stay totally free but if you use some supporting bits then production use becomes a paid affair.
Frank Lemanschik
@frank-dspeed
May 01 2017 07:39
so i get payed anyway
freemium is a bad idea :)
and will not stay for long time
Eben
@eben-roux
May 01 2017 07:40
Also contracting myself. Have contracted for about 13 years of my professional career since 1995.
Frank Lemanschik
@frank-dspeed
May 01 2017 07:40
as software delvelopment evolves its possible to copy software really fast
i for example leaded many projects where software got created from existing
without source
and that goes really fast because all is specificated and only needs to be done
for example if i find a good software i will simply create it my self :)
Eben
@eben-roux
May 01 2017 07:42
Some software is easy to copy. TBH I am not too fussed about the freemium. If folks don't want to pay me I'm not going to go hunt them down :)
Frank Lemanschik
@frank-dspeed
May 01 2017 07:42
so you need to understand that as always!!! Knowleg / Specification is the value
not the software it self
Eben
@eben-roux
May 01 2017 07:43
yip... certainly the IP is key
Frank Lemanschik
@frank-dspeed
May 01 2017 07:43
Often Planning a Software costs more then creating it
For example: Creating a Immoportal with Wordpress costs more then Installing Wordpress use 1,2,3,4,5 defined modules and configure them
job 1 costs around 1200+
job 2 costs around 300
but result is the same
Eben
@eben-roux
May 01 2017 07:47
True, there are generic bits that one could pull together or get off-the-shelf.
Frank Lemanschik
@frank-dspeed
May 01 2017 07:48
today there are always generic bits existing
github is for example a giant collection ;)
you can simply search for similar software that has a function and take it
and with the future of code we work even on Software that Codes Software
and it works amazing :D
i think soon we are able to say Create Office Application
the Software will search for Office Application Specifications
will match the stuff up choose the best and will create the software :D
Eben
@eben-roux
May 01 2017 07:50
What I have found is that finding quality software is sometimes challenging. I am currently working, for a client, on a municipal billing system. I have searched GitHub for billing solutions just for the heck of it and what I have found is mostly woeful.
Frank Lemanschik
@frank-dspeed
May 01 2017 07:51
Billing systems in fact are challenging because of National Regulations
its not a free market
Eben
@eben-roux
May 01 2017 07:51
Therein lies the rub... those core business bits that make software unique :)
Frank Lemanschik
@frank-dspeed
May 01 2017 07:52
your best billing solution is at present bank + creditcard
Eben
@eben-roux
May 01 2017 07:52
However, there is quite a bit of "genericism" even in billing.
Frank Lemanschik
@frank-dspeed
May 01 2017 07:52
direct acceptance
if its for a bigger size
you should go to a bank and ask them for sdk and contract with them directly that has the lowest fees also
Eben
@eben-roux
May 01 2017 07:53
I'm off to go entertain my kids. Public holiday here today. Thanks for the chat :)
Frank Lemanschik
@frank-dspeed
May 01 2017 07:53
i hate holidays
Eben
@eben-roux
May 01 2017 07:53
lol
Frank Lemanschik
@frank-dspeed
May 01 2017 07:53
have fun :)
Eben
@eben-roux
May 01 2017 07:54
This is more consumer billing, though. Recurring costs, billing by consumption (such as water/electricity usage), etc.
cheers
Frank Lemanschik
@frank-dspeed
May 01 2017 07:54
Ya again bank is your frind
i implamented that already for some citys in Spain
Michael Price
@web-mech
May 01 2017 17:02
fyi - i have production systems that still depend on can 2.x and can-compile. It looks like can 2.x used to be exposed as a global variable, now it looks compiled down to amd with no global can available. This breaks can-compile and my build systems are broke
i have can-compile pointed to 2.2.7, if i hit this url, it looks amd compiled https://canjs.com/release/2.2.7/can.jquery.js. Funny thing is, if i go back just a minor version, i get the globally compiled version again https://canjs.com/release/2.1.3/can.jquery.js
@bmomberger-bitovi @justinbmeyer @phillipskevin ^
Frank Lemanschik
@frank-dspeed
May 01 2017 17:07
i think it got striped out into a extra package
Michael Price
@web-mech
May 01 2017 17:07
this is legacy stuff, why would any of it ever change
Frank Lemanschik
@frank-dspeed
May 01 2017 17:08
it changed longer time befor i think
Michael Price
@web-mech
May 01 2017 17:08
i just used this friday
Frank Lemanschik
@frank-dspeed
May 01 2017 17:08
as you see 2.1.3 got it 2.2.7 not
Michael Price
@web-mech
May 01 2017 17:09
i’m almost positive the compile changed, i havent touched my build system in ages and today it no longer works because its expecting window.can to be a thing, which it isn’t anymore with 2.2.7
Frank Lemanschik
@frank-dspeed
May 01 2017 17:15
i don't know the name but it got a indipendent module
can-namespace
or something like that
Brad Momberger
@bmomberger-bitovi
May 01 2017 17:16
The independent modules should only be relevant with can 3.x. All the 2.x branch code was contained in canjs/canjs.
Are you using steal-tools to do your build?
Michael Price
@web-mech
May 01 2017 17:17
just can-compile
can-compile uses can-simple-window to load in can and a few other things
can-compile has code that requires window.can to exist
if i point to 2.2.7 today it will not work because that url is now exposing can as an amd module
Frank Lemanschik
@frank-dspeed
May 01 2017 17:18
wait
Michael Price
@web-mech
May 01 2017 17:19
just friday though, it was working
Frank Lemanschik
@frank-dspeed
May 01 2017 17:19
i remember a nasty bug in compile
please try to update can compile indipendent or try to use really the last canjs release from the github repo
for 2.x
maybe you got simply some how not the corrected version
Brad Momberger
@bmomberger-bitovi
May 01 2017 17:20
Could be related to this: canjs/can-compile#54
Michael Price
@web-mech
May 01 2017 17:20
its exactly that @bmomberger-bitovi
well no, similar
that happened when can3 was published and the files for can2.x were wiped
i remember when that happened too
Frank Lemanschik
@frank-dspeed
May 01 2017 17:22
i think daff is trying to correct that
but he has also holidays for marriage
i think some one else should take over that issue fast as its braking
Brad Momberger
@bmomberger-bitovi
May 01 2017 17:27
This is interesting. We apparently don't have a 2.2.7 tag on github. it jumps from 2.2.6 to 2.2.8
Frank Lemanschik
@frank-dspeed
May 01 2017 17:27
ya
because it got deleted
because it was buggy
i remember that
Brad Momberger
@bmomberger-bitovi
May 01 2017 17:31
I was going to suggest trying to point to a global dist on rawgit.com, but it seems we only started putting dist builds into our source trees starting with 3.0.0-pre.6
Brad Momberger
@bmomberger-bitovi
May 01 2017 17:50
Anyway. @web-mech I've been looking into it and I think it's all pathing issues (the v2. was never added to the urls). When I change the paths referenced in can-compile it works for me.
So I made a PR; I'm about to merge it but I don't have publish rights. Fortunately almost all of Bitovi is in one room right now so I can get an owner to publish.
Michael Price
@web-mech
May 01 2017 17:52
ok cool. thanks @bmomberger-bitovi
it would point to this right?
Brad Momberger
@bmomberger-bitovi
May 01 2017 17:53
Yes, and the same for can.ejs.js
canjs/can-compile#59 for the PR. this is making the tests fail so I'm going to look into why that is before merging.
Michael Price
@web-mech
May 01 2017 17:54
ok, i guess that works. it looks like it would still be amd compiled though
but i may be overlooking something
Brad Momberger
@bmomberger-bitovi
May 01 2017 17:55
If I have this right, it's sort of faux-AMD. It uses AMD syntax but ultimately exports to the global object.
Michael Price
@web-mech
May 01 2017 17:55
gotcha
Brad Momberger
@bmomberger-bitovi
May 01 2017 17:55
But if the script wasn't found, there would be no exports to global (and thus win.can would be undefined)
Michael Price
@web-mech
May 01 2017 17:56
right, that was the issue last time
this time it just looks like its not doing what it should be, which is exporting globally
you can see its explicitly being set
Brad Momberger
@bmomberger-bitovi
May 01 2017 17:57
Yeah. That was built with an earlier version of steal
Michael Price
@web-mech
May 01 2017 17:57
gotcha
Brad Momberger
@bmomberger-bitovi
May 01 2017 17:57
Before steal became the module-syntax-agnostic dependency manager that it is now.
Michael Price
@web-mech
May 01 2017 17:57
just wanted to double check since that was something i noticed
Brad Momberger
@bmomberger-bitovi
May 01 2017 18:53
OK, fix is in. Upgrade can-compile to v0.11 and it should fix your issues.
Michael Price
@web-mech
May 01 2017 18:53
sweet! will do. thanks @bmomberger-bitovi
Brad Momberger
@bmomberger-bitovi
May 01 2017 18:54
And of course follow up if it still doesn't work for you
Michael Price
@web-mech
May 01 2017 18:54
right on
thanks
prakashtjp
@prakashtjp
May 01 2017 19:29
Could you please suggest document for CanJs local environment setup
Brad Momberger
@bmomberger-bitovi
May 01 2017 19:31
We have a guide for setting up DoneJS as a dev server for a CanJS application: https://donejs.com/Guide.html
prakashtjp
@prakashtjp
May 01 2017 20:30
Okay Thankyou