« first day (2306 days earlier)      last day (2654 days later) » 

9:00 PM
In mathematics and computational geometry, a Delaunay triangulation for a set P of points in a plane is a triangulation DT(P) such that no point in P is inside the circumcircle of any triangle in DT(P). Delaunay triangulations maximize the minimum angle of all the angles of the triangles in the triangulation; they tend to avoid sliver triangles. The triangulation is named after Boris Delaunay for his work on this topic from 1934. For a set of points on the same line there is no Delaunay triangulation (the notion of triangulation is degenerate for this case). For four or more points on the same...
 
@corvid Oh hey, thats me
@KendallFrey what I think of bl.ocks.org/mbostock/dbb02448b0f93e4c82c3
 
Is anyone here familiar with the Datatables plugin, specifically how to programmatically toggle the details-control button?  I am using the following code to hide the child details when a user navigates away from the page:

window.addEventListener("pagehide", function(e) {
    $( "tr" ).each(function() {
        var tr = $(this).closest('tr');
        var row = table.row(tr);
        if (row.child.isShown()) {
            tr.removeClass( 'details' );
            row.child.hide();
        };
    });
 
there is at least one other person nagging about DataTables. You two should hook up.
Is that staircase that always asks about that?
 
My problem is that when I click the back button, the child row is hidden like I want, but the details button is still red with the minus sign. How can I toggle just the details button back tofrom red back to green. Can someone help with the last part? Thanks!
 
9:15 PM
yea, @BrianJ
 
Isn't it $( "tr" ).forEach(
Because the selector returns an array of elements?
 
not if you're using jquery
:p
 
The code above works fine for hiding the child element of all rows where details are open, it's just that the details icon does not change.
I am using jquery
 
console.log(row,row.child,row.child.isShown())
 
 
9:20 PM
I got the stupid report done, fixed the only bugs I know of from my big-ass webpack2 + lots of other dependency updates and it's 4:20. Time to quit.
 
That way, you get value, index and array in the callback
 
user1596138
@Luggage Dammit different timezones. Got me excited... Today's a drag
 
It's ok to start earlier. I sometimes do.
:)
 
user1596138
No I just meant it getting close to 5
 
user1596138
Lol
 
9:24 PM
@KevinB That comes back false for each, as it should. My child rows are being hidden properly, I just can't change the details icon. For example, if you go to this link and click the green detail button you see it changes to red and displays the child. My code is hiding the child, but leaving the details icon red. I am trying to change it back: datatables.net/examples/api/row_details.html
 
did you inspect to confirm the class was beign removed?
wait... if it's false... that's why it isn't being removed..
 
window.addEventListener("pagehide", function(e) {
    $( "tr" ).each(function(index, tr) {
        var row = table.row(tr);
        if (row.child.isShown()) {
            tr.removeClass( 'details' );
            row.child.hide();
        };
    });
});
Couldn't you pass tr in the callback?
 
you could, but you'd have to $(wrap) it to use removeClass
 
@KevinB What should my result be running console.log(row,row.child,row.child.isShown())? The child is disappearing when I hit row.child.hide(); Are you saying there is a class still in effect causing my issue?
 
what i'm saying is.. What is causing your problem?
you're hiding the child, removing a class, why isn't it having the effect you want?
is the class not removed? is the style not tied to said class?
What isn't working?
Why?
 
9:31 PM
The details icon is still showing red, indicating the details are open.
 
And in the example, that's controlled by a shown class on the table row.
You're using a details class, is said class removed properly? do you have a css mistake?
is that even the right class?
 
Perhaps that is my issue. I can delete this tr.removeClass( 'details' ) and I still get the same result
So I think you are right in that I am going after the wrong class
I tried tr.removeClass( 'shown' ) to no avail.
 
are you adding the shown class?
if the shown class isn't present, the icon is red
in the example
 
opps, forgot ctr k
 
1 message moved to Trash can
@Pennywise Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
9:46 PM
this was copied from the docs
    $('#example tbody').on('click', 'td.details-control', function () {
        var tr = $(this).closest('tr');
        var row = table.row( tr );

        if ( row.child.isShown() ) {
            // This row is already open - close it
            row.child.hide();
            tr.removeClass('shown');
        }
        else {
            // Open this row
            row.child( format(row.data()) ).show();
            tr.addClass('shown');
        }
    } );
 
@CapricaSix My bad. I apologize.
 
i imagine you essentially just need that if statement, with the condition reversed.
 
@Luggage lel I'm not nagging anymore, figured out the datatables issue
 
Is there a collaborative version of JSbin?
 
yes.. i forget which.. one of the common ones..
or maybe it's just watching..
 
9:48 PM
jsfiddle is collaborative, isn't codepen too?
 
super pro
 
paid service :(
 
9$ a month, not bad
 
Anybody have any experience with Golang?
 
9:56 PM
@DenysSéguret
 
cc @copy @Zirak @BenjaminGruenbaum?
 
I just told you
y u ping
 
Multiple opinions fam
 
:P
pretty sure Denys has the most experience
 
I created a wordpress installation on Azure but browsing to the site just gives me the default Azure Get Started page
 
9:57 PM
I might have an interview coming pending if I like them and they like me
 
any ideas what's up there?
 
@SterlingArcher I dabbled
what's up?
 
What's your general feel about it? Pros cons?
 
Your webserver is passing a 302, rerouting to install.php
@BrianJ I refreshed, now everything is in Arabic.
 
How many system languages use type inference?
 
10:06 PM
@SterlingArcher It's nice, but I can't get myself to like it
 
42
 
@SterlingArcher Not a lot
 
10:18 PM
I'm suprised numbers have toStrings()
10.toString()
 
y
 
var i = 10
i.toString()
i=NaN
NaN
i.toString()
"NaN"
doesnt work if set to null or undefined
 
!!> Object.prototype.toString.call(null)
 
@rlemon "[object Null]"
 
kinda does
 
10:33 PM
NaN is a number
 
pretty sure null and undefined (or maybe just null) are broken by design. aka they know its wrong but can't fix it without breaking changes to the web
 
TIL you can include parent attributes in their pseudoelements' content using attr
 
makes sense. kinda, I suppose
they're part of the originating element. they don't exist in the dom
 
would be amazing if this was available for things like background-image and stuff
yeah, it's good, but I had no idea you could use an element's attributes for more than selecting them
 
just build the element to have a data-background="src" and pull that?
 
10:36 PM
which is why I'd love it, but it only works on contents of pseudoelements
no other css property
 
what?
 
the css content property
you can't pull that into background-image
I can't pull that from within css, is my point
.el::after {
    content: attr( data-background ) " ";
}
 
you'd be programming in no time if you could do that with css.
 
^ only case in which it works, in most browsers. Sure, works on after as well
 
ohh I see what you mean
 
10:38 PM
@shriek yeah, and I'm still trying to make my mind up on whether you should be able to do that, or it adds quite serious security concerns
 
yea
 
not to mention inlining your styles! :P
it would certainly allow for much easier programming, a better structure and flow
 
CSS.js
 
css isn't really meant to have such logic though
and if you really want that, use a preprocessor
 
or variables.
 
10:40 PM
imo css already has too much conditional logic
fun to play with.. but when you think about it.
probably too much
 
well, ofc there are ways around it, like libraries and preprocessors, but I'm just entertaining the idea of extending the standard version
@rlemon like? Advanced selection and calc()?
I feel like advanced selection is quite a bit too out-there, but calc is fine, for example
 
hacks mostly.
you can make a lot of stuff with just css and form elements
given that you can conditionally apply things on form element states
 
heh, the only thing that is kind of wrong, is allowing for selectors like + and ~ to exist
but :checked is totally fair imo
 
:checked,:active,:hover even are all conditional logic
sure it is handy
 
nth selections too.
 
10:43 PM
but css is a style definition
should it be the place to control said logic?
 
again, think if you had to do all of that in JS. Not only would it risk to be a lot slower because the browser wouldn't differentiate it and super-optimize it from other things, but it would be a lot harder to understand what's going on when trying to debug or finding out how something works
 
I argue the exact opposite. not only would you separate concerns, but css is not at all slower than js today for event handling
 
and yeah, sure, css has arguably gone way past simple style definition, but is that necessarily bad? Technologies should change based on how they can be used well, rather than what they originally were used as
@rlemon yeah yeah, I'm saying the same thing, I think :P
 
@towc it's mixing your style definitions with your logic. it arguably makes the entire thing more fragile and harder to maintain (albeit not by much currently)
we're just all used to the stuff css can do today. I used to argue it would be better to have it do more, now I'm not so sure
 
One argument would be it makes debugging harder if you start to put your logic in CSS.
 
10:46 PM
separating my styles from other more immediate logic concerns is a big bonus
 
@shriek it would make it a lot easier if you didn't have to look through the js to find out where certain things come from
 
@towc and when I have to determine if the hover effect is css or js...
 
is data-background supposed to indicate any logic, really?
 
if js did all events it would be better
right now css can do like 2 events. and that leaves me with some area of ambiguity
(probably more, I'm not really thinking about it)
 
!!should I buy the thing or not?
 
10:49 PM
@MadaraUchiha not
 
the argument here isn't about attr, if you scroll back it is about css not needing to be more powerful, it is already too powerful. (in regards to handling logic)
 
@CapricaSix Why would I listen to you? :(
 
@rlemon well, we'd need a newer js api for handling them with the same performance optimizations as css, mainly keeping stuff in a different thread
 
what makes you think the performance of the js now is bad?
 
something like element.eventTogglesClass( 'hover', 'element-hovered' ), so the browser can internally add it to a new thread, but that's arguably already what css is achieveing
 
10:49 PM
libraries like GSAP and Velocity have proven inline style on the JS is faster in a lot of cases than native css
 
@rlemon when the thread is occupied, everything goes to shit if you're handling event state changes in js
 
write better code?
we're not talking about overloading js here, we're talking about a few event handlers.
 
oh no, but say other stuff is occupying the thread, not the listeners
 
if js is already locking you've got bigger issues
 
the listeners won't fire until it gets to their point in the queue
well, sure, but it would make things easier
for example, think about when you need everything you can to display animations
 
10:52 PM
for the browser, not for the developer
@towc again, GSAP and Velocity already prove that animations can be and in a lot of cases are faster without css animations
 
well, nothing is stopping you from adding the listeners in your js...
 
I agree. we're discussing the idea of it all
not what either of us should actually be doing.
 
@rlemon I'm not talking about css animations, sorry, rather when you need all of your js power to get your js animations as good as you can, but suddenly you also need to handle basic events
 
I use :hover all day long.
@towc shouldn't be an issue tbh
 
I guess it's a pretty specific case, yeah
 
10:54 PM
I'd be flabberghasted if you could make that case a reality and show me detrimental performance from it
 
oh yeah, sure :P resize events can happen every frame in an animation, so if you're trying to handle other stuff on the page instead of, say, using media queries, it's going to be quite heavy on the rest of your js
 
@Zirak interesting. You wouldn't perhaps know if it plays well with node would you?
 
handling a resize event without a debounce is just bad coding imo tho
 
well, but you can have the full power of it if you used media queries instead, why fall back to js?
 
for all the reasons listed above
 
10:56 PM
this is I guess mainly because they're in completely different threads and the browser can ultra-optimize stuff
 
I'm not worried about optimizations where they don't need to be
I'm more worried about maintainability and understanding the code
 
yeah, I guess with my arguments one might as well code in assembly, in the sense of "why use something slower when it can be faster"
 
I can make an OP run 1000000/s or 10000000000/s
the client doesn't notice the change
 
@rlemon and on that, I do still think that adding attr() on other properties would be extremely helpful as well
 
@towc probably. maybe the new css-variables spec would solve it mostly.
 
10:58 PM
it's like having a basic react thing but using css
 
@SterlingArcher :P
I'm happy with scss right now. if done right it outputs readable css, and it gives me the variables and slight logic that makes design easier
and I'm really trying to embrace React. even tho I still scorn inline events in regular interfaces
 
Fun fact guys: today marks 2 years of sobriety for me :)
14
 
user2620028
wait what really
 
user2620028
good job bro
 
Thanks man! I don't know why I remembered I honestly forget now I was a user
 
11:01 PM
@SterlingArcher nice! but you should probably specify you still drink. because you've posted pictures recently of you super drunk at dinner
still a major accomplishment tho. not trying to discredit that
 
btw, I started looking this up because I was trying to find a good way to implement the pen stuff a bit better here, as it's kinda hacky as I'm overlapping two elements (what do you expect: didn't work in IE without me fiddling about a bit more. Fix still isn't on the site). In that case, the best case scenario would be having the image be a background-image, and it would be different for every pen. Ideally none of this styling should need JS logic
 
Oh yes, well, I've never had a drinking problem. I like to get drunk, but I've never driven, thought about it, or gotten problematic
 
I could make 6 different classes (scss would help), one for each pen, each with a different background-image, but that means implementing state with css, which is urgh....
 
But you're right lol sobriety from hard drugs*
 
if I could add an "x-src" attribute instead, and fetching it directly from css, that would be ideal
instead, what I think I'll do to have it remotely semantically correct, is adding the x-src attribute, then with js look for all childs with x-src of certain element, and simply use element.style and insert the background image there
but that reminds me of when I was using jQuery to determine styles, when it totally wasn't jQuery's job
and way to go sterling :D
 
11:05 PM
heh, "gotten problematic".
 
user2620028
@rlemon this was my initial confusion
 
@rlemon inline events like onclick={} ?
If so, I have justification.
 
no like <button onclick="foo(this)">
 
ohh. what does that have to do with react?
 
I know jsx is translated
 
11:07 PM
@Luggage it's encouraged in React
 
@Luggage because it's still similar code. takes a little getting used too with jsx.
 
No. different thing.
 
onClick is encouraged, at least
 
yes, different thing, but writing similar to the understood to be bad.
 
different, but feels similar in many ways
 
11:07 PM
ok.. so you DO mean <button onclick={this.foo} />
 
mental block takes a little bit to get rid of
 
1. you only ever have one handler for en event in react
 
just seems weird to be writing html in the middle of js
 
@Luggage I mean that took a little bit to get used to writing because I've lived my life scorning <button onclick="foo(this)">
 
2. It actually uses something like event delegation for reasons.
 
11:08 PM
when that's what we've been trying to move away from for the past decade
 
@KevinB we wrote js in the middle of html for too much time. It's only fair JS gets revenge
 
@KevinB gets it
o/
 
and here i am still doin it with cfml
not even react
 
So.. similar syntax because it's declarative.. and that's the only way that makes sense for that.
 
I 100% understand it is translated from jsx. don't get me wrong
 
11:09 PM
Yeah it's super weird to go back to
 
but it's not an "inline" event. It's a managed event.
 
@Luggage yea, we all get that.
 
also, it's not a string in html.
 
I can't even remember the real issue with inline events
 
i mean, at least i'm not doing onclick="foo('bar')"
 
11:09 PM
but you write it as an inline event. and you write jsx similar to html
 
@jake it was installing WP it seems..showing the WP page now. But during setup using the plugin for WP in Azure I was never prompted for a password.
 
Is it the scoping thing?
 
dunno what the login is now grrr
 
@phenomnomnominal keep your js in your js, basically
 
yea, but the reasons it's discouraged in html don't apply here.. So I think it's misplaced distaste.
 
11:10 PM
yup
 
user2620028
well shiiiit. i have to find out now why my website is displaying an embedded youtube video as a .swf on mobile and html5 on desktop
 
yea and I fully owned that
I think you misunderstood what I said earlier
 
and the fact that you can't add multiple of that same technique for a single object, which defeats a lot of modularity requirements
 
user2620028
i think you all misunderstood each other
 
it's not that i think it's wrong, it just feels wrong.
 
11:10 PM
^ at first
 
lul
 
like I first said, I'm trying to embrace it
 
Learn to love it.
 
do people write React without jsx? (I'm sure they do, but like.. do a lot of people?)
 
nope
 
11:13 PM
I never see it.
 
although again, if you're trying to go for minimal setup...
 
the most react i've worked on so far was just serverside, outputting static html
 
preprocessors dont' bother me
 
Though, you could use hyperscript or similar.
 
you can use react with js without jsx by only using a library and not multiple files for parsing, so that's compelling
 
11:13 PM
the client doesnt' feel it, I might see an extra second or two on a build
 
I'd like to do a more involved project with react, but there's little reason to at the moment
 
but same deal with the events in hyperscript.. div({ onclick: this.handleClick })
 
@KevinB make a reason?
it's what I did
 
eh, i don't work outside of work
gets me burned out
 
I try to make sure I have a mix of things to do. woodworking, fish keeping, electronics, programming, gaming
 
11:14 PM
nothing new coming up in the next few months, maintaining/improving existing
 
one gets tedious, move on for a few weeks.
 
what i ought do is bring the electron app up to date one day, that's built with react
dig in and see how it works etc
 
forget about your social life
in fact, you don't have a social life
 
has someone tried to code a 3D game?
 
@HatterisMad jsmpeg.com
 
11:18 PM
@user4447655 aye captn
not professional or anything, but still
 
i couldn't forget about js chat
 
oh wait, who was it who built the 4x4x4 tic tac toe? florian?
@KevinB <3
 
unless it's the weekend
 
user2620028
@jake i think maybe overkill for embedding a youtube video
 
I just know ios has problems with videos --in the browser
 
11:21 PM
@ndugger the cider I "ruined" a year+ ago has been sitting in my cold cellar ever since. opened a bottle tonight. still strong of clove but completely drinkable now
very sour
 
Im creating a webapp with nodejs and reactjs. How exactly can i achieve partial views with reactjs? Im trying to ahve a component for header, and one for footer, but since they ahve to be rendered to a base container, this will not work?
 
carbonated, and kinda nice
 
Basically i want
<Header />
<Content />
<Footer />
 
hmm... wouldn't header and footer just be components that you pull in?
 
@KevinB Luggage has helped me with mine. his boilerplate is pretty solid. and at least there are two of us who have projects with react + webpack + electron going
 
11:23 PM
pull in?
 
require and use?
 
<div className="app-wrapper">
  <Header />
  <Content />
  <Footer />
</div>
you mean you need a base component?
 
Yes, all component has to be rendered at a container, no?
a element with a id for example
 
yea, so just wrap them in one
 
Ah, so everything wil be inside a div container for example?
 
11:24 PM
yup
 
I see, i'll try that
 
html,body,.app-wrapper {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}
 
But do i still have to write all html, head, link tags etc for each page at the website? I had wish to be able to have all the <head>-stuff in the header-component
so i only ahve to define it at one place
 
idk, I have an index template and have webpack inject the client js for me
thanks @Luggage :D
 
with react, you usually have just one html template file. You don't deal with the <head> in react.
 
11:31 PM
Could you elaborate please?
 
our current electron app, last time i tried i could get it to run in the browser just fine, but never could get it to compile to electron for some reason. I'll take a look at luggage's next time i take on that project.
 
Just go look at a react example.
@Dexception single-page-app. you don't have multiple root level html files
 
Yeah, im not making a sinlge-page app
 
funny thing.. if anyone remembers me bitching about the panel pc freezing. it doesn't freeze when running the built executable, but it does when running electron ./blah
it does freeze when the screen saver is on, but disabling that and it doesn't freeze when sitting there anymore
 
11:54 PM
@rlemon did you have a chance to look through my stuff? Is it marketable as a particular skill?
 
no, I forgot
 
heh, it's not like you owe me anything
you're still in underwear
 

« first day (2306 days earlier)      last day (2654 days later) »