« first day (2350 days earlier)      last day (2600 days later) » 

10:00 PM
unlke jQuery
 
I'm just going to move out pubsub logic out of that function
which will make above code unit testable as well
I honestly don't 100% get generators yet
=)..
 
I'm having a situation where the value in module.export.value is being filled in a promise. $.ajax(...).done(function(a){....value=a;}); module.exports.value=value . Obviously the require which will importa that module won't be able to use it until value has filled in. Does the right way is to export the promise ?
 
But I will try it out soon, I know its fundamentals, just streaming out values using yield
 
if(!window["Zone"]) {
  require( 'zone.js/dist/zone'); // Included with Angular CLI.
}
Is that valid in es6?
Since zone haults you app if you try and load it twice?
 
export default function foo() { return $.ajax(options) }
deal with the promise on the other end
foo().done(blarg)
 
10:09 PM
another solution that I can think about the above code is
I can turn that entire pubsub.publish into promise
and just await on that
 
@jake require() should never load anything twice.
what require() implementation is it?
 
export default async function foo({url, options}) {
  const results = yeild fetch(url, options);
  const json = yeild results.json();
  return json;
}
alternative
because who needs $.ajax when there is fetch
 
guys, I have a question. I am using Q atm in my project and wondering if Q has a function to turn callback to Promise? (like bluebird)
I was searching it last time and couldn't find it
 
To answer your question I would look in Q's docs. Does it have any?
I am only familiar with bluebird.
 
might be built in now ,but there are projects to fill that gap
*if it isn't
 
10:12 PM
Not sure, I had a look and couldn't find it. It's such a fundamental operation and would be suprised if Q doesn't have it
 
The climate in the room is bluebird friendly.
 
311
Q: How do I convert an existing callback API to promises?

Benjamin GruenbaumI want to work with promises but I have a callback API in a format like: 1. DOM load or other one time event: window.onload; // set to callback ... window.onload = function(){ }; 2. Plain callback: function request(onChangeHandler){ ... request(function(){ // change happened }); 3. No...

benji talks about Q in his answer
steal from him
he likes it
 
I like q because it's a one letter
 
I just happened to have recently re-implemented bluebird's promisify and promisifyAll (passing all bluebird tests) on top of native promises, so there is always that.
 
and you use q in words like "bbq"
 
10:14 PM
I like bluebird because it's a good promise library
 
Star Trek spoiled the letter for me
 
and I can rename variables, so const Q = Bluebird;
@KendallFrey really? I liked the Q
 
resolve: {
    extensions: [".js", ".json", ".jsx", ".ts", ".tsx"],
    alias: {
        // I already have a promise implementation, thank you
        'rsvp/promise': 'bluebird',
 
they made the show interesting. one could even argue the entire show was about humans and Q growing together
 
@rlemon await ;)
 
10:15 PM
yea yea 😛
my bad
you got the idea anyways
 
TIL if I get a pi I can connect it to a 3D printer for a web interface to the printer
 
some library I use wants rsvp/promise but I give it bluebird instead. fortunately it doesn't use anything non-standard that bluebird doesn't have.
 
@rlemon which show?
 
tng
 
I must have not gotten that far
 
10:16 PM
first ep was them starting their trial with the Q. it's a constant theme all the way
 
I don't remember much Q
 
not every episode, but they come back to it multiple times
 
few times per season, maybe?
 
baaa so now I should search for fetch polyfills
 
babel all the things
 
we're very pro babel in here as well
 
Your search is over. That is the de-facto standard polyfill for fetch
 
im a pro-babeller
go away typescript
 
I typescript AND babel.
 
babel and/or ts
 
10:19 PM
I babel my typescript
 
mostly, babel for sure.. ts.. eh. I haven't taken that pill yet
 
only reason why I would've used typescript 1 month ago is their definitelytyped definitions
 
ts -> es6 -> babel -> es5 yo
 
but now I've found out there's flow type definitions too
 
I'm a simple man, I like my beer cold and my js without strong types.
 
10:19 PM
TS is great tho
 
From my testing not babel nor TS transpile fetch
 
I tried flow. All it did was eat cpu and complain about everything
 
@Eris why would they?
it's easily polyfillable
 
TS was a painless 10 minutes until my project ws running and I was getting good feedback in the editor
 
@Luggage Systemjs loading a webpack chunk that imports zone.js
 
10:20 PM
TS === tooling
 
OH , cause rlemon said babel all the things
 
@jake I'm out. :)
 
Maybe he wasn't refering to my commnet
 
@jake that sounds bad
 
Yeah
 
10:20 PM
anyway i'll polyfill
 
it is
 
System is so slow on mobile
 
isn't it redundant with webpack?
 
@phenomnomnominal not with http/2
 
it's too future
@jake it doesn't scale
 
10:21 PM
@Luggage webpack is from another repo
 
it's not web scale?
 
def not
 
Mind you this is all on a Rails stack
 
Let's all ES5 + ES6 + ES7
 
@Luggage This is my solution for now:
 
10:23 PM
don't worry about TS, it's just tooling system.
 
For @phenomnomnominal:
 
https://github.com/Biphub/Biphub-frontend
Can you give me suggestion about frontend strcuture atm? I am using vuejs and currently have structure of
component (stateless) / container (stateless?, contains various components) / pages (routing happens using pages and they are stateful)
I feel like 3 different layer is too much (?) but not sure. At work we only have 2 layers, containers and components and it worked somewhat OK
 
@jake :D
unfortunately not imaginary :( we had huge issues
 
;^]
@phenomnomnominal We split things up into their own repos, SystemJS only loads flat things that webpack created via angular-cli.
 
if you're using cli, just use webpack
 
10:30 PM
"why not just use webpack" - because of Rails dev folder
 
right i don't know anything about rails
we do a similar thing though. Each of our repos spit out a bunch of AoT compiled lazy loadable modules
 
@jake just make your frontend completely seperate from backend
 
then webpack acts as a aggregator
 
It does not like JS, Systemjs gives me enough configuration to seperate the frontend
 
10:32 PM
and build your backend using RTM. Restful apis that makes http requests is too old.
 
Rails tried to tie everything up and dump it into the global scope
 
I think react licensing means Facebooks is trying tell everyone they are the power over React ecosystem and they can do whatever with React.js at anytime.
 
@JasonMarsh Right now every JS project, like a SPA, is a separate repo.
That way I can run JS in isolation.
 
For example, they can easily turn react.js into subscription based technology
let's all move onto Vue.js guys
@jake right
@jake then why does Rails dev folder block you from using webpack?
 
Vue needs a snappier name if I'm to take it seriously.
 
10:37 PM
find . -type f | wc -l
60393
 
like vQuery or something.
I'd use that ^
 
how about vuevue, sounds cute right
or ^_^.js
 
💩.js
 
choo.js
 
@JasonMarsh There are 60,393 files checked into VCS. Thats a nightmare for any filewatching
 
10:37 PM
or svelte
great names
 
The only thing about Vue is it might be better to use Angular 2 given the number of devs available
But I agree with the sentiment
 
is Vue a framework?
I thought it was akin to react
 
It takes from both I thought
 
nah, it's still just view layer in MVC system
it still needs like vuex (redux)
for state management
 
!!info npmroulette
 
10:41 PM
@rlemon Command npmroulette does not exist.
 
bet it got nuked
yup
!!learn npmroulette <>https://www.npmjs.com/package/$encode($1) (.*)
 
@rlemon Command npmroulette learned
 
!!npmroulette bananas
 
good fun all around
 
10:42 PM
!!npmroulette sex
 
!!npmroulette kimchi
 
> Test sex in your browser.
 
imgur.com/gallery/VAPOd that's pretty crazy
> do we need PPE?
> "no, just keep throwing water at me"
 
10:45 PM
!!npmroulette china
 
That's why our products are cheap. Enjoy that.
 
@Luggage when life is cheaper than flame retardant clothing... :(
 
You should see how dangerous it is for the children making the fire retardant clothing...
Are you a monster?
:)
 
as i've been told, yes, yes I am
 
11:15 PM
man, I upgraded the cable modem yesterday and didn't expect it to make much difference, but that old one must have been a pos
 
giagbit ethernet?
 
nah, too far from the hardware downstairs, just on wifi. The ping changed the most, though.
 
what are the wireless standards up to nowadays?
 
with a few antennas and a 5ghz network, you can get something close to gbit
 
5g
my wireless is pretty good from the modem
 
11:26 PM
I'm mostly getting capped by the wifi
 
i wish i had that problem
 
I'm mostly capped by shitty wiring :(
and it is peak hour right now
 
hooray for shared coax lines
 
real download speed, I've seen like 14Mb/s on Steam
average about 7
 
like that's an indie game every few seconds
 
11:30 PM
fark, what I'd give for that
I have 16Mbps/1Mbps :(
 
gg whereabouts are you hsimah?
i get around that too :(
 
Australia,
 
$/mbit keeps going down here, they've been boosting speeds every few months
 
I pay like $120/mo for mine :(
it isn't like I'm getting mine for pennies
 
I pay $90
 
11:31 PM
$90 during the special, $150 after for 250mbit
 
mine is 'said' to be 150 down, 75 up. unlimited bandwidth
but the numbers you're seeing above are pretty normal. they get slightly better off peak hours
mostly ping/upload speeds
 
we've gotta pay $50 extra for unlimited
 
i thought i recognised australian speeds lol
 
@ssube I'm paying $45 on top of my regular plan (which brings me to $120ish)
 
with the unlimited and no specials, it would be $190 or so
 
11:33 PM
lol
 
I can live with $0.80/mbit, I think
 
I save $5 off my cellphone plan by bundling 😃
so that's $85/mo
cell + internet = ~$200
 
the only cell provider here that might do internet is Verizon and they'll screw you almost as bad as Oracle
 
oh you guys are probably affected by this
https://arstechnica.com/tech-policy/2017/03/senate-votes-to-let-isps-sell-your-web-browsing-history-to-advertisers/
voting to allow isps to sell your web browsing history to advertisers
 
do you get a discount for that service
 
11:38 PM
@derp they might now what sites I visit, but they already knew and used that (so do the sites)
plus, it's only a matter of time until I start routing everything through Canada anyway
 
me cell + phone + 300mb up/download = 85€/mo
with the same company
 
i can imagine pricing based on your browsing history
do you visit expensive watch sites? we're charging 50% more for this ip address!
which means that you will need a vpn but that's just hassle
 
@derp Those sites generally use cookies and shared tokens via 3rd parties
Rather than IP addresses.
So just clearing your cookies or going from incognito should clear most of the shite up
 
yep today that works
but what about when advertisers could associate browsing history based on IP?
 
you just pick which devil you're going to make a deal with (I picked Google) and use their search and browser
@derp that's easy enough to spoof
 
11:46 PM
true...but its just annoying you know?
 

« first day (2350 days earlier)      last day (2600 days later) »