« first day (1601 days earlier)      last day (3577 days later) » 

00:01
@BenjaminGruenbaum what do you think of CoreOS?
If I actually knew how cloud OSs work I'd have a real opinion
I'm just now learning this
Can someone help me with this by giving me docs?
this.length doesnt work, Idk what to replace it with
return res
Also, look at Array.prototype.filter
Also, this.length is a getter and not a function
!!> [1,2,3].length; // good
@BenjaminGruenbaum 3
!!> [1,2,3].length(); // bad
00:10
@BenjaminGruenbaum "TypeError: [1, 2, 3].length is not a function"
thanks
I dont know why I did that
@BenjaminGruenbaum I'm actually working on a cloud on-demand service. We're rolling it out in a month or so.
@taco nice, anywhere I can read about how cloud architecture works?
I can't think of any. I had little to do with the engineering
There's a good video on how Cars.com moved to the cloud using Docker containers youtube.com/watch?v=PBBUnNS4dRw
If you are thinking more about appliances, you need something that makes virtuals. It doesn't matter what it is - virtual firewalls, virtual servers, et cetera. Then you pod them out, so the concerns are local
As far as software, those LXC Linux containers linuxcontainers.org or Docker containers (hub.docker.com) as shown in that Cars.com video can help you deploy without VM's
CoreOS is building their own container as well coreos.com/blog/rocket
CoreOS == Google ChromeOS stripped down
people aren't happy about CoreOS making yet another container solution... I was wondering about it. They'd been using Docker
Most Fortune 500 have been using VMWare, but containers are much more lightweight
00:28
@BenjaminGruenbaum what's their usecase for the browser version?
@Sebastian they want to develop with it, for example develop frontend with React, build tools and similar hooks usually get things wrong and are confusing for that level of development.
People get confused with them, they can figure it out when they need to actually deploy but it deters them from trying.
@Sebastian meow
@BadgerCat woof
@BenjaminGruenbaum possibly, just not sure how to increase visibility to certain docs
especially since there are many i'd consider more important than the browser ones
@Sebastian I'm not sure, I'm just letting you know more than one person was severely deterred by not finding it. Maybe show frontend workflow and backend workflows.
Or link to it in "using babel"
I think even just a link in "using babel" could help
that'd work
00:36
Thanks :)
brother just bought a Challenger, silly guy, he's gonna smash it.
00:49
How much is he paying for insurance? At least it has fairly cheap parts
crl
crl
grr, that sucks that Math.min.apply(null, [1,undefined, 2]) = NaN, it would be great of it ignored undefined's
whoa. ^ pretty sick.
anybody interested in a quick chat about a project I'm working on at the moment? need some outside perspective. think I've coded myself into a corner.
and now I'm having coder's block :f
Throw it in here, nobody's going to agree helping beforehand
alright
I have these graphic elements which can be manipulated through the UI. used to be just modifying the DOM directly, however when I took over the project I rewrote the whole system to store data in objects. fair enough, works okay. modify something via the UI, send the changes to the object. serialize to JSON for saving / loading. works nice.
each element is composed of a container (to which a few HTML properties, like z-index, are applied) and a body, to which all of the other properties are applied. background color, border, etc. the code that interfaces with the DOM sorts out which properties go where so when a property is changed it knows which element to update, the container or the body, to get the desired effect
it knows which DOM element to update*
01:09
Anybody have experience with angular and foundation combos?
@ElliotBonneville Sounds like a framework might do you well (assuming you want the existing system to be easier)
the problem is this: I'm moving on to writing behavior for "groups" of elements, like you might have in illustrator. you should be able to group a bunch of these graphic elements together to have them behave as one. each group should be its own graphic element. fine. but this is where the container / body model breaks down, because to preserve z-index, I can't just stick the the DOM container elements inside another container and call it a group.
what framework do you have in mind? i'm using jquery ui already
That's not a framework, at least not a proper one
React or Angular
that might be a good long-term solution. however I can't afford a full rewrite at this stage.
Sounds like React would be a perfect fit honestly.
Its all about components with react
sounds kind of like what you're doing now
01:15
react would be nice, but it's not feasible atm.
deadline
ah yeah that sucks
so, but
groups have their own properties, but there are also properties which need to be set on the children. there is an "Element" "class" I'm using to handle all this behind the scenes. I'm thinking that the "Group" class would "inherit" from that. at least, borrow most of the functions and override methods like "get property" and "set property" to handle getting and setting properties on all the children.
and I use "class" and "inherit" very loosely and for expediency's sake
the first and biggest problem is how to set up the DOM to maintain proper z-index between graphical elements.
can't just stick all the Elements' containers directly in another container, because that would remove them from the z-index stack of Elements not in that container, right?
@ElliotBonneville, what exactly are you coding (provided it's not secret)?
@Bardi working on a design prototyping app
best way to explain would be illustrator in a web browser. been done plenty
so, when I say "Element" you could think of a rectangle for simplicity's sake. jQuery UI provides resizable and drag utilities
01:30
So... from what I gather, you have a bunch of elements that are draggable, but you want to be able to lock them into groups without putting them in a container because that will mess with the z-index?
yes.
dragging code is relatively straightforward, I suppose. if one Element in a group moves, just move all the other Elements in the group by the same amount.
So don't put them in a div
Group them together in memory
they will be grouped in memory, certainly
When an element is moved, grab its group, and then apply the movement to all elements in the group
Sounds like one of those really complicated SO questions that give me a headache.
01:33
yep.
yeah, that's why I didn't make a question about it :|
it's almost impossible to explain even over chat. i hope you guys don't mind being rubber ducks :)
Could be a good way to get the tumbleweed badge. =P
Can you show me what you have so far?
Doesn't seem like too hard of a problem to solve
@rlemon @rlemon @rlemon I'm home!
@Meredith not really, no. the project is kind of big.
the first problem is the dom. the second problem is memory
I have an "Element" class with get and set functions that write to the DOM and update memory respectively. I need to create a "Group" class that shares a number of methods but behaves rather differently in some instances
01:36
Element should have a get group method
Which returns the group it's in
So when the drag event is fired, you grab the group
yeah, that part is pretty straightforward.
And then apply the movement to all elements in the group
for instance, the get method can't be the same because I need a way to differentiate between properties that belong to the group and properties that belong to the elements in that group ("left" belongs to the group element itself, "background color" belongs to all the children) and then a way to get the correct property from the children if that's the case
What?
the differences in the "get property" method of a Group and the "get property" method of a single Element
01:39
Group would literally have like 3 exposed properties
get, add, remove
get would return an array of elements
yes, but. complicating this even further is the fact that all elements can have more than one state, and each state is stored in memory. there's a "render" function which can take all the CSS properties and HTML attributes from a specific state on an element and apply them to the DOM representation of that element
How would that complicate it?
The group object would just be a wrapper around an array
It shouldn't care what's going on in the element
a group element will have some CSS properties, though. like "left" and "top", so I can drag the whole group around
01:42
There shouldn't be a group element
It only exists in memory
in memory, I mean. right
hm, I guess the group in memory doesn't need to know about "left" and "top" does it?
as long as its children know where they belong...
It's just a data structure
yeahhh
I see what you're driving at
When an element gets dragged, you move all of the other elements in its group too
(Unsure if Node.js is on-topic here, but don't want to ask to ask.) Before I go and reinvent the wheel... are there any good Node.js SSO servers out there? I'm looking to have centralised login/logout pages for multiple projects. It would be good if it supported Google, Facebook, etc login/account creation.
01:45
oh, but... I need to apply CSS transforms to the group as a whole, though.
Like what?
so scale, rotate, skew
So apply them to each member of the group individually
I need to have 3 tabs (3 links, A, B, C) but only two panels wher B and C point to same panel. Is something like this good approach?
http://jsbin.com/yisuzakime/1/edit?html,output
would that work, though? hmm
yeah I guess it would
01:47
You might have to do some math
Wouldn't that stuff up though? rotate would rotate from the center of each element rather than the whole group. You would have to compensate some how.
Yeah if that's what you want to do, you're going to have to do some math
hm.
my trig days are dancing before my eyes
ow
You just need to know how to convert from rectangular coordinates to polar coordinates
@Srle, that seems fine.
01:49
don't really want to conflate css properties and js if I can avoid it though
guess there's no way around it
It's the difference between just rotating and translating and rotating
if I wand 2d transforms without JS I'd have to stuff them in a container. but that breaks z-index stack, which is more important.
want
@ElliotBonneville, can you explain again why a container will stuff up z-indexs?
@Meredith yeah, but then I have to come up with a place to put that math.
Yeah it'd get a bit clunky
Why is z-indexing an issue?
Shouldn't all elements in a layer be at the same z-index?
01:52
well, elements need to preserve z-index order, that's a given. but stuffing them in another container makes their z-indexes relative to that container
I thought z-indexs were global? Time for some MDN.
Nope, relative to the container
so if I have a bunch of Elements, then some more Elements in a container, only the container can be shifted up and down among the other Elements
yeah
it's a bit of a mess.
Is this like an illustrator program or something?
01:54
And you're drawing everything with svg?
no, everything is DOM elements
so just divs
So it's not about drawing shapes?
oh, well. it's illustrator-like
yeah
no shapes.
Is it like a website builder type thing?
01:55
Ok here's my advice
Everything goes into a base layer by default
When you want to change the z-index of an element, you create a new layer and add it on top of the base layer
slick.
I see what you're driving at
You should seriously restrict bad css properties anyway
doesn't that still muck up group containers, though? because if I have two Elements in a group and I want to put just one of them above another element not in that group, then I'd have to move it out of the group container to put it in a higher layer.
yeah. thinking about it
A group is just a layer
Any items in a layer will have the same z-index
01:58
Are you adding elements to a group with ctrl+click?
no, it's "select a bunch of elements, hit cmd-g"
or ctrl-g
Yeah something like that
That implies to me that you're doing a batch change
So if you have 5 elements selected and you rotate 1 45 degrees, the rest should rotate 45 degrees as well
batch change?
Changing a bunch of elements at once
if a bunch of elements are grouped, I shouldn't be able to edit individual elements, just the group as a whole
no batch changes
well, actually.
I lied
batch changes is correct
02:02
If you want to rotate around the center of the bounding rectangle
That sounds more like an operating you'd do on a layer
mmhmm
interesting.
And elements in a layer should all have the same z-index
so you're thinking layers and groups are two different things?
no you're not. scratch that.
Yeah they'd be separate
Have you used something like photoshop/gimp before?
02:05
Or better yet inkscape
I've used illustrator, photoshop, and gimp
no inkscape
Yeah they all have layers
yeah, but they also have groups which are a distinct concept, yeah?
All of the items in a layer have the same z-index
Then you can select items in a layer to add to a group
02:06
Groups are temporary and you can only have 1 at a time
the concept of group in my application is different, then.
A group would just be a list of selected objects
you're describing having multiple elements selected
Yeah
that's already sorted, luckily :)
what's throwing me for a loop is more permanent ones
02:08
So layers
iirc layers and groups are distinct in illustrator, right? hang on, let me pull it up. I think I'm going crazy
Probably
Another thing:
eh, I have to go install java. passing for now
You could probably save yourself a lot of stress by just not letting them change the z-index
how do you mean? z-index is kind of critical
isn't it?
02:11
hello
It only works on absolute/relative elements
that's one of the features of this tool. all elements are absolute / relative.
Are they absolute/relative in the output?
Then I guess there's really not a lot of wiggle room there then
02:12
no :(
z-index trumps transform ultimately
What you could do is add the elements in a group to a div
And set that div's z-index to something really big
Do whatever you need to do with it
Then take the elements back out
Actually I'm not sure that'd work
I'm not sure what effect that would have
It'd move the elements while they were selected
right, but I'm working on more permanent groups, though
so it's important z-index is maintained while they are selected and while they aren't
I'm thinking you might just have to do the math
02:16
yeah that's what I'm thinking too
and I'd have to figure out a place to put it in my render code :(
The only hard one is rotation and that's still not bad
right
actually. scale would be annoying
I'm assuming you're putting a bounding box around the elements in the group
Then there's the dots at each corner and on the sides
02:18
yep
I'm using jquery ui resizable
Yeah that math shouldn't be too tough
just resizing the divs and their positions when the bounding box element is resized, that's not too hard. but that's not changing the scale property, that's just left, top, width, and height of the children
the scale property itself... >.<
You'd need to change the top and left no matter what
And just change the scale by how much you'd change the height/width
02:20
oh, jui resizable isn't tied to the scale transform property
is that what you're thinking?
I don't have a lot of experience with it
But in css there's scaleX and scaleY so it should be pretty straightforward
You don't need to only use scale
JUI is just changing the elements' literal left, top, width, and height. that's already working actually.
I'd recommend using css transforms if you can because they're hardware accelerated
ftr, every computation you do on your computer is "hardware accelerated"
02:23
wouldn't have access to the width and height of elements, though
css transforms can run on the GPU :)
:p
and if you have a slow computer the computations are hardware decelerated
anyway. that was actually really helpful. I guess I didn't realize how simple groups would be. just about every property can be set directly on the elements themselves (except for transforms). huh.
there are a few more complex things but they can all go straight onto the elements themselves (css transition property, some other stuff like JS interaction behavior).
there really aren't any properties the group itself needs to know about, excluding 2d transforms which I probably will disavow for now
thanks @Meredith, much appreciated
No problem
anu
anu
02:52
hey guys, i am confused about literals... why is [] == [] false ?
or even [] === [] false ?
They refer to different objects
[] creates a new array
array are passed around and compared by reference,so the first instance of [] is different from second [].
anu
anu
03:07
so why is [][1] == [][1] true ?
!!> [][1]
@Meredith "undefined"
anu
anu
ok. i remember now.
undefined==undefined is true
anu
anu
03:11
bookmarked! thank you guys!
@BardiHarborow thats pretty nice
haven't seen that before
TIL 0 == []
crl
crl
!!> [0==[], 0==[[]], []==[[]]]
@crl [true,true,false]
That page is really good at explaining why == is so bad though
03:19
!!> console.log(0 == "", 0 == "0", "" == "0")
@KendallFrey "undefined" Logged: true,true,false
logic? fuck yo logic
crl
crl
yep untransitive
@KendallFrey I'm video chatting the lemon :O
03:20
...and?
oh, right, you never join us on Hangouts
Yeah this is new experiences lol
I can give you new experiences
He's looking for the dic pic he shopped of me do you know where it is?
looking
anu
anu
@crl damn you non-strict comparsion!
03:27
@SterlingArcher Found it, if you haven't
I haven't but ping lemon with is plz
ty bby <3
Today is a sad day.
03:29
Dude how'd you find that?
That's actually very impressive given stack search options
+1
+3.14159265358979
So I ended up on the weird part of YouTube
audio is nsfw, use headphones
m59
m59
03:45
Australia is wrong ^
@monners wtf no
@m59 That's why we're all tough as nails. Repeated spider bites to the ass.
m59
m59
04:18
@rlemon Nope, nope, nope. youtube.com/watch?v=BEG-ly9tQGk
m59
m59
also, that asian bro that can cut a bullet out of the air with a samurai sword =D
ofc both to be taken with a grain of salt
mmm buffalo meatballs
is that meatballs made out of buffalo or meatballs in buffalo sauce
crl
crl
04:24
I don't know very well Angular, but generally it's said that inlining event listeners is bad, so how is this stackoverflow.com/a/28868353/3183756 suddenly good to do?
meatballs in buffalo sauce lol
m59
m59
dat aspirin though. Awesone.
@crl It's explained pretty well in the book the angular creator wrote
I'll pull it up hold on
crl
crl
Ok, to me it's mixing a bit the view with the logic
Or maybe angular considers the html like a template
04:31
And mb it wasnt the creator, just someone who works on it
crl
crl
ok
04:43
and he got 3 upvots wth
fixed
haha ty
Sublime can get really close to being an IDE though
Havent used the others so no comment
yeah I agree
So you just posted that to be an asshole?
04:51
no
I mean it can get "close"
but its still not an ide
For all intents and purposes it's an ide for javascript
but.. its not
I cant follow breakpoints
maybe a plugin can?
cant set watches
Yeah, there are plugins for breakpoints
Idk about watches
yeah I mean st is great
but idk its still a text editor at its heart imo
and the dude also said atom and vim
he listed all text editors lol
I mean, he clearly doesn't know the difference between a text editor and an ide
But do you really call someone out for saying that sublime is in ide?
That doesn't seem worth it
04:57
well #1 its reddit :P
#2 the OP was asking for an IDE for node
I don't have a problem with someone suggesting sublime for node
Even if it's just a text editor
what about vim and atom because the guy listed those as well
I know very little about them
There is a difference between a text editor and an IDE thats my main point
Never used either
Yeah, but did the point need to be made?
04:59
apparently because the guy didn't understand the question it seems
crl
crl
!!google difference between text-editor and IDE
is there any opensource and good javascript texteditor
@deepak Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don'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.

« first day (1601 days earlier)      last day (3577 days later) »