« first day (2424 days earlier)      last day (2749 days later) » 

00:00
im waiting for the pixel price to come down
00:19
my hips don't lie
if i have an iterable sequence of characters, representing a JSON string, how would i go about parsing that? since JSON.parse() doesn't accept iterables, only strings
@Cauterite join("")?
well other than that, of course
mm, looks like the answer is 'write your own json parser' :/
00:35
when I search "js streaming json parser" I see lots of promising looking results.
ah, "streaming", thanks i'll take a look
[...river]
(i'm building a dam)
01:16
i am coming from a .net mvc/c# background and writing my first node/express.js application. it's a simple form with a really basic api behind it. I can see how I write my api using express.js. what do I do for the frontend? my experience is using Backbone to do my front end stuff.
I've been 'spoiled' using the bundles and whatnot to get my front end just working
there appear to be so many options that im a little overwhelmed...
why can't you use backbone anymore?
sounds like you're looking for an excuse to learn a new framework :p
i can, that would be easiest because the code can be ported over
so...whichever one you want to learn
i just dunno if it's still a modern and good tool to be focusing on
i have the opporunity to upskill on something else
the guy who used to sit next to me made the call to use backbone and we all just did it lol
i was reading that ampersand.js is a good alternative to backbone
01:21
if you want to use react, then you can try out create-react-app
its a cli that abstracts away all the nasty bundling business
i've been using Vue recently, and i'm pretty impressed with it
it doesn't do much more than DOM rendering though, if you're looking for something more monolithic
i mean its important but it lets you defer learning about it until you need to
i don't like how with angular, you kinda need to buy into the whole architecture and learn things the angular way
yeah that's why i gave angular a miss when i was shopping around
yeah it didnt seem like something iwanna do
Setting up a project is the most fun part
01:25
ahahhahaha
'fun'
that only applies to LEGO
Can be pretty nasty if you do it with webpack though
Long live React by the way, MVC is obsolete and Vue is just how jQuery should have been, and does not have nearly enough to make real applications
I need to learn vue some time this week
Don't really want to
not sure jQuery and Vue are supposed to be used for the same purpose
i mean, Vue is for dynamic DOM rendering; JQ is just general DOM manipulation tools
Yes the thing is Vue is, as far as I know, pretty basic
it is good as a tool and does really well what it does
but its not really a framework
01:31
mm, it should play nice with other libraries though
Yeah sure, but i rather use React, that has a true architecture behind it that you can rely on. And that architecture leads to the most mantainable, scalable and reusable code i've ever written, specially if you combine it with Redux. But that might be because the only thing I do are SPAs, usually big ones.
ah, 'production code'
i hope to write some of that one day
most production code is poop
Can confirm, have lots of production code running out there and it's 83% shit
I've been in corporate environments for some thing, and yes, i would say its even more than 83%
01:39
where i work the production code has no comments
not a single one
Some places prefer to document properly instead of relying on comments
jury is out on that one on whether that's a good or a bad thing
but that always mean there is no documentation
i personally rely on function names to be my comments
My code is self documenting
01:41
lol reminds me of something i read
in some parts the code is straightforward
in other areas it's hopelessly convoluted
But really though I always feel so good about myself when I comment something
I just only do that like once a week
Do you work in a small team?
Yeah
We only have 4 other node developers
That's standard anyway, not really "small"
01:43
Oh then no
If the code is well written, you really don't need comments
unless you have a long subroutine that is just too damn complex
step 1) have competent people that care
You've just discarted most of the work force @derp
hahaha
The problem is that my code is self-obfuscating
i may have discarded 83% of the developer workforce :P
01:45
hahaha
totally agree
@Meredith are you writing a production brainfuck app?
xD
explain self-obfuscating
well you start writing a program, trying real hard to make the code all clear and tidy,
6 months pass and somehow the code is now an unreadable labyrinth
haha that's bad management, if you're not pushed to write bad code you dont fuck things up
but yeah, happens a lot
has a lot to do with this famous chart
i guess i'll experience that timeline for myself sooner or later
since i just started my career a few weeks ago
02:02
best of lucks @Cauterite
thanks; it's going great so far
keep it up :)
youre welcome
and if you feel like you're not learning anymore GET OUT
learning is for schmucks
02:59
played some good golf today
code-golf?
user4280261
I love JavaScript, that's why I spell it correctly
@Valilutzik Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
golf golf
outdoors?! D:
03:01
with beers
golf and beer? though that kind of people were more into martinis or something like that
you can't drink martinis on the course, unless they server them in cans
Martini glasses are unstable af
turn them upside down for a makeshift golf-tee
hi every one, any one know angular 1 and ionic 1
Hey folks...what does this es6/react syntax do? <ComponentToWrap {...getSystem() } {...this.props} {...this.context}
... is the spread, but when inside {} what does it do?
object cloning?
is it something similar to Object.assign()?
03:14
well it's definitely not ES6 syntax; must be some React thing
@deostroll maybe you're talking about object spread, like: a = { ...b }
which means clone all the properties of b into a new object called a
Or, you might be talking about React Components: <Component {...props} propA="a" />
what {...props} means in that expression is
pass all properties in props to the components as properties
very simillar concept in fact
what's this "object spread" you speak of?
is that part of JS or part of React?
Hello guys :)
who want to join my startup :D
spread is part of ES 2015 - 2016
its basically the ... operator
how it works depend on where you use it, objects, arrays, or function arguments
check MDN or Documentation for more info, it's a long topic
is it implemented anywhere?
all i can find is spread on iterables, not objects
03:24
i use it all the time on objects
something like a = { a: 1}, b = { b: 2 }, c = {...a, ...b }
c is now { a: 1, b :2 }
its a shallow copy
basically
firefox says it's a syntax error
you can also use it in functions:
function log(...args) {
console.log(args)
}
Reacccc
logs everything
yeah browsers might not implement it yet
so what does?
03:27
you need to use Babel to take advantage of it
right, Babel
where's the peopplleeee?
@RexAdrivan the fact that you're recruiting on an internet chat doesnt speak good about ur startup to be honest
@MarcoScabbiolo ok broo anyway it's open source..
@Cauterite i play around with es6 stuff on an es6 fiddle
there's heaps out there for when i don't feel like firing up an ide and a babel task to try out three lines
03:30
@RexAdrivan i don't trust webpages which mutate the URL this many times before the page has even finished loading D:
@Cauterite what do you mean?
this guy even spits out the es5 code
@Cauterite it's hosted on github
@RexAdrivan does it not do that for you?
I coded it so you can login through your google acc.
It's could angular routing
called*
It's freak fast bcoz it's not loading :)
03:35
i don't know what you're on about
but all i see is the URL of the page get switched like 20 times before the loading bar finishes

i've never seen anything like it
@Cauterite it's called $state :D
how did you know it's switched?
doesnt matter its clientside :P
@RexAdrivan i watched it, with my eyes
hahah :D
that's a problem bcoz sometime people go ONLOAD
while if it's not onload ofcourse have to check if it's routed
It's quite complicated bcoz it's using firebase
anyway it's fully responsive (y)
is that why it takes so long to load?
I think your internet is slow?
it's streaming data
realtime
03:44
all i see is a login form, should that take 8 seconds to load?
only google login works
well, i did not finish it yet...
probably will breakdown the code of the login
the login also loads the whole app :))
@Cauterite what you doing?
i'm writing a static analyser for the codebase here at work
cool :D
03:47
parsing C# and XML files
don't use xml bro
use json
the XML was already there before they hired me
ahh.. possibly convert it
the XML is loaded into objects with C#'s System.Xml.Serialization, so probably not gonna happen
xml to json?
simply create a function
03:50
@RexAdrivan yes, xml2js is what i'm using in my code
my code runs in Node
nice.. me i'm not using any nodes :))
it works just like html static file llol
try it on your localhost
github.com/adrivanrex/rxjob <= source code
Anyone how to use client option in ejs template engine to use ejs on client side without loading ejs runtime on browser
04:13
hi
04:27
suppp
04:38
@Cauterite try creating a proj
> This adds the HotModuleReplacementPlugin. Make sure to use either the --hot flag, or the HotModuleReplacementPlugin in your webpack.config.js, but never both at the same time as in that case, the HMR plugin will actually be added twice, breaking the setup.
this is the kind of thing that makes webpack so awesome
@RexAdrivan what?
@Cauterite try to login?
that's actually pretty impressive
@RexAdrivan for how long have you been working on it?
3 days..
or 4
04:48
you programmed this many features in 4 days?
yeah hehehe
you want to join?
morning
join what?
join on the startup project/
no i don't honestly
i'm not a web developer
04:51
ok
it's fully javascript code..
excellent
i'll add realtime chat this week.. hopefully
05:22
who's parshant?
dunno, who do you think he is?
no clue .. but prashant is a common Indian name.
05:42
anyone knows firebase?
06:00
anyone knows how to reverse javascript object?
I want to reverse this object
1 message moved to Trash can
@RexAdrivan Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
what do you mean reverse an object? do you mean something like stackoverflow.com/questions/18977881/…
or perhaps you want to switch key:value to value:key ?
@suraj yes but it's not returning result?
@RexAdrivan as that answer tells you the iteration order for object keys is undefined
06:11
i mean not stored
:|
probably because there is no index for objects
you need to represent the object differently if you want a deterministic iteration order,
well an object isnt ordered.. The most you can do is return the properties in a certain order..
e.g. [["one", "foo"], ["two", "bar"]]
or sort them: Object.entries({one:"foo", two:"bar"}).sort(Kv => …).reverse()
06:28
@Cauterite can you send the full code?
the only thing missing is the comparison function for sort
now we are stuck at javascript T_T
note that this will just return as array with a certain order.. It doesnt do anything to the object itself.. i mean not stored
indeed.. yes it's an array not object
I guess the workaround is create another object? but still it's unorderd lol
how does an object have an order? It can have any string as key. It can have any type of values for those keys..
06:37
i don't understand what you want
283
Q: Does JavaScript Guarantee Object Property Order?

mellowsoonIf I create an object like this: var obj = {}; obj.prop1 = "Foo"; obj.prop2 = "Bar"; Will the resulting object always look like this? { prop1 : "Foo", prop2 : "Bar" } That is, will the properties be in the same order that I added them?

lol
if you just want an object that retains insertion order for its entries, you'll have to use a different datastructure than objects
+9 - 2034 Today was a good day.
2
how to fix this :(
who answered the question?
06:55
can anyone help me with this tree problem
@suraj enumeration order
@littlepootis I get that.. but he was talking about storing it in a particular order..check from chat.stackoverflow.com/transcript/message/37459890#37459890
Now my project is onhold because of this property ordering
> Javascript objects don't have a guaranteed inherent order, so there doesn't exist a "reverse" order.
it's the browsers fault?
07:04
It has changed in ES6. And he was talking about enumation order.
It always end like this.. like the PHP language >.< it also died lol
20
Q: Does ES6 introduce a well-defined order of enumeration for object properties?

Ben AstonDoes ES6 introduce a well-defined order of enumeration for object properties? var o = { '1': 1, 'a': 2, 'b': 3 } Object.keys(o); // ["1", "a", "b"] - is this ordering guaranteed by ES6? for(let k in o) { console.log(k); } // 1 2 3 - is this ordering guaranteed by ES6?

TIl O_o thanks @littlepootis
i think we've given you enough viable solutions already
it's up to you to decide what the most appropriate option is
since we don't really know what you're doing which requires ordered objects
it's firebase returning unordered objects
@RexAdrivan research bro and figure it out.lots of pointers so far
07:10
you haven't even told us what order you need, e.g. sorted alphanumerically
the answer is probable FALSE
will probably make a new function for that (y)
07:58
js
Hello guys ! According to all the actual browser incompatibility, How much time do you think we have left until we can use fully the Ecmascript 6 features on the client side, like class or querySelector ?
It's a simple question, to see your opinions :)
querySelector isn't really an ES6 feature
user6820627
it's just a new dom feature
user6820627
@ChristopherJ. almost zero
Depends on whether you are supporting older browsers though
08:28
querySelector is supported in internet explorer 8 for crying out loud. We dealing with time traveling clients?
Thanks !! :)
lol...I was refering to es6 features mainly..querySelector is not es6
08:49
@Neil kok
wew.. dam firebase :D
adrivanrex.github.io/rxjob/
09:27
Hi! I have a question, but I'm not sure to create a StackOverflow question about it, so I'll post it here to discuss
And reached this statement which I don't fully understand
bound functions generate hidden classes and, therefore, are not safe when using #apply.
Do someone understand what's the problem with this?
@JorgeFuentesGonzález apply, the function method?
Yeah. Is talking about arguments
And when V8 decides to optimize or not when using them, but I don't fully understand when using bind, apply and arguments together is a bailout
I followed all the guidelines above, and got some deopt functions I had optimized now, but I do use arguments on some functions I bind and maybe apply later, so that statement got me :-/
PS: I lol'd at your description @Neil
xDD
09:42
@JorgeFuentesGonzález :)
I wish I could help you. I don't think I know why that would be unsafe..
Yeah, you are like me then xD Let's see if someone knows, and if not I'll create a question somewhere in StackExchange
why is it so hard to make a url shortener? :( im a noob.
@Dream_Cap Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
Let me know if this is the wrong place to ask this question. I'm trying to make buttery smooth animations that scale with text in them. I'm currently playing with the JavaScript library Velocity.js. The problem is that when I animate anything with text in it with a scale animation, the text jitters a bit during the animation. I'm using Chrome on Windows. Here is a link to a simple CodePen I'm using to try things out: codepen.io/aaronbeaudoin/pen/yXyVME
@AaronBeaudoin Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
09:55
When using CSS animations, the text doesn't jitter at all. I'm not sure if there is some limitation with JavaScript, because another library (Anime.js) yielded the same results.
this guy was a child abuser or something, right? Did he get let off?
So it seems that the animation is running buttery smooth on iOS. Might this be a Windows related issue?
@AaronBeaudoin I guess that is because when using CSS animations, the browser don't renders the text until the animation ended. You can see that the text gets blurry while the animation is being done: codepen.io/anon/pen/jwEybX
But by using a library, the browser renders the text on each animation frame, so you get the jitter
10:10
is there stack-exchnage site for asking medical questions ?
I'm going to think that is more a browser problem than an OS realted problem.
related*
There's a toggle button on the top-left corner. Kinda small. I should styled it xD
@FlyingGambit health.stackexchange.com though its in beta
@suraj Thanks, will try it out
@AaronBeaudoin As a workaround, you can try SVG, as maybe is rendered different
10:37
Would you happen to know of any way to render the text at the end using a library? CSS doesn't support the types of easing I want to use.
what hashing npm module do people use?
bcrypt
having errors installing that. I guess I'll look more into it
node-pre-gyp ERR! Tried to download(404): github.com/kelektiv/node.bcrypt.js/releases/download/v1.0.2/…
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v51 ABI) (falling back to source compile with node-gyp)
There's always npmjs.com/package/bcryptjs, which is slower but doesn't use the native stuff
10:48
it falled back to using stuff
just had to install make and g++
hmmm, I'm noticing that it generates hashes according to variable stuff (saltRounds), but doesn't care about those when comparing...
wait a sec
oh, number of rounds is encoded in the output hash
ok, fair enough
Hashing uniformly distributed data , is there any place where things are more visualized ?
11:04
github.com/npm/npm/issues/16981 Can anyone please try to reproduce?
@towc I used bcrypt before I learned the crypto API, now I think I'll ditch bcrypt
oh heh, I didn't realise crypto was on node as well
don't know why would it not have been
got an exam on italian literature tomorrow
like, the final thing
Italy isn't even a real place
when I'll fail, I'll be proud I was here learning about js
@MadaraUchiha Repro'd
11:10
@BenFortune Thanks
Got the stack trace if you want?
@BenFortune Feel free to add that in a comment
Although the repro steps are so simple I think they'll be able to spot the problem immediately.
can we receive JSON data as multipart request? can anyone confirm?
@ZaheerAhmed Why not? And why would you want to?
I have a big json data which I want to pass as multi part instead of form data
@MadaraUchiha can you please point me to any good post for this?
11:24
@ZaheerAhmed Not really, but you can pass any arbitrary data in a multipart request
Why would JSON be different?
okay, I was expecting only files can be sent as multipart thanks for the clarification
@ZaheerAhmed if you're trying to download a file as the other part of an Ajax request, you can't do it
But that has nothing to do with the json or multipart aspect
44
Q: download file using an ajax request

Manuel Di IorioI want to send an "ajax download request" when I click on a button, so I tried in this way: javascript: var xhr = new XMLHttpRequest(); xhr.open("GET", "download.php"); xhr.send(); download.php: <? header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Conten...

@Neil I need to post data to server, no I dont need to download
11:31
@ZaheerAhmed then you should be fine
great thanks guys
how do people host production node servers?
a local machine redirecting to heroku or something?
@towc How do people host production anything servers?
Either on some cloud platform, or on a dedicated (V)PS
well, if it's static or php hosting there are a lot of things that easily provide that
I don't know many services that allow for node
here's my usecase: soon enough, I want to be able to build sites for people, assuming they don't have anything else yet (web wise)
so from getting the domain, to hosting the code, to writing the code
I want them to be doing the least possible
@towc There are several options for you
1. You can buy the domains, buy one server, point all the domains to the server, have multiple node applications running on the server under different ports, use nginx to direct traffic based on the domain
Advantages: All in one place, can manage all your node processes with pm2 or some similar simple tool
Disadvantages: Downtime for one means downtime for all.
2. You can set up droplets/heroku instances/AWS instances/whatever for each service, and point your domains there
The main disadvantage is that managing is a bit more complicated
How "production" are we talking here?
11:46
in that case, it would need to be something that the client can manage. I don't want to have my own servers, I want to be able to give everything to the client after the time I stopped working for them (ideally they'd be 1-2-3 day jobs). I can tell them "ok, if something goes wrong, you can call this number to be helped in what's happening" with the idea that I would not have to do anything for them without them giving me money
Scalable, thousands of users at any given moment "production", or "it's running for a client and he has 50 users registered" production?
variable
ideally could host 1000s of users
it might be a shopping site
it might be a blog
@towc If it's fire&forget in the sense that you could get to a point where the service is still active but you aren't maintaining it, the second option is likely better.
ok, right, so do the heroku thing
There's the question of whether you can move an instance from your account to them
11:48
well, I'd make an account for every client
unless that was illegal
Yes, that's the simple workaround
although again, heroku is not very non-developer friendly
most of my clients probably will never have touched a command line
maybe aws is more like it?
what's your take?
maybe I should make my own host-agnostic tool for doing that :P
unless there already is one
that maybe has hooks for heroku/aws/whatever that can just be added on by other people
user924016
Sounds like you want to resell the hosting
yeah, that's why it might be an issue
if it gets to it, I'll make sure to email heroku/amazon
12:19
mmm spaghetti
12:32
@BadgerCat grats!
my computer crashed ^^
@nolines Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
Hi every one
@SANTEREK Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
i.imgur.com/F69fPe8.gifv those KSP texture packs are improving

« first day (2424 days earlier)      last day (2749 days later) »