« first day (2050 days earlier)      last day (3121 days later) » 

09:00
I have seen the last supper but depicted with only dogs
there are several funny last supper parodies
I just like the fact he is sorrounded by females and it sitting at a computer. It reminds me of myself and my family.
"last supper girls" yields some interesting stuff
funny definitely not it though
09:02
anyone here interested in algorithms ?
@JanDvorak rule #34
My search turned up an image of Spongebob licking the behind of Nicki Minaj
I'll return to work now
@Mathematics who, us? We're just programmers. What need could we possibly have of algorithms?
@BenFortune @FilipDupanović @doug65536 I recovered it, thanks!
09:06
I need coffeee
there should be a girl juggling in the photo
some people just don't like to think hard core, that's why I wanted to know if anyone interested in particular subject, anyway I got this issue.

I have this method which creates nested tables, I need to create a flat table instead means merge all tables..

now I have 2 ways I could achieve this, 1st to let it create tables the way it creates, then merge them...
or modify the code and start creating flat table from start....

I went with modifying the code but it works when objects are nested @ 2 levels, but as soon as Object goes 3 level deep, it breaks...
just send an email but forgot to include an attachment. Created a new email with an excuse and send it without attachment. The third email was with a "oh man i'm failing today" in message content WITH attachment. ARGH
now I am not sure if I should create a question on SO or what else
09:07
@Mathematics his message wasn't an invitation for a targeted help request
I am proper stuck and this is real programmers problem
@JanDvorak I know, I just enclosed the question with it
instead of making 2 messages, I can send it again, if you want me too...
@Mathematics why should you avoid nesting tables?
Hint: recursion. Or repeat until stable.
@Neil because client want to see flat table, and manager want me to do so
You'd seriously complicate matters to use just the one
09:09
because nested tables are fugly
merge your dataset so that it becomes one table and create your table from it...
@JanDvorak that's what I am doing, but if my object A has no child objects but object B has some then my first row misses the cells in the table , which object B's child table going to add
@KarelG true, but I am guessing that he's having to nest tables on the fly
@KarelG how, let me try creating a fiddle, which I think I will fail miserably because of complexity
@Mathematics you need to know max depth before you start
At least that would be the only sane approach
hierarchies are much faster than flat lists. hierarchies divide and conquer
09:14
@Mathematics how is merging a dataset complex? If it's complex, then something is wrong.
@Mathematics try writing it to work with one level of depth
With the caveat that you must be generic (no ids)
it's unlikely you have a data processing problem that actually takes time. when you profiled it, how much % was in the code for the table searches?
if it were big enough to be a problem, the JS engine would give out of memory
but, I'd have to see specifics to be sure
Also, whether you should use nested tables flat tables or flexbox is your prerogative, not your boss's or your client's
The client can only tell you how they want it to look
@Mathematics you aren't talking about a performance problem?
If it looks like it is a single table, that is all that should count for the client
09:19
what does "algorithms" have to do with it then
slightly relevant question. How do I do a multipage search on google for images?
multipage?
yes it only gives me one page of results
it is infinite scroll
09:22
@Neil that's what I did but it fails on depth of 2
@doug65536 definitely not infinite
Noun: infinite scroll ‎(uncountable)
  1. (Internet) A web design technique that prevents the browser scroll bar from scrolling to the bottom of the page, causing the page to grow with additional content instead.
  2. 2009, Robert Hoekman, Jared Spool, Web Anatomy: Interaction Design Frameworks That Work (page 96)
  3. The prime example of this is the so-called infinite scroll pattern. The idea is simple: rather than distribute results across a series of pages, all results are loaded into a single page.
  4. 2012, Evan Goer, Yui 3 Cookbook (page 80)
  5. You want to create an “infinite scroll” interaction that appends new results as the user scrolls down the page....
@Mathematics how does it "fail"?
09:23
@doug65536 will do that after making it work, it's just the algorithm for which I am taking N objects, but in reality it won't be N.. will be 3,4 or 5 max
@doug65536 it stops after 300 results or so
not infinite
@Neil at the moment it's failing because it isn't liking the way I added JSON to it :(
@William you didnt read the definition?
which #
@Mathematics so you are expanding an existing table?
09:24
@Neil it's failing logically... the logic is wrong
@Neil yes, and adding objects to it, logic is wrong, I can see it, but I am not sure how to fix it
@William link?
@doug65536 they # of results are no way equivalent in infinite scrolling as they were to the paged version
@Mathematics this is a bit like being told to install SQL server on a macbook...
You should seriously consider understanding the why so that you can satisfy the request by following best practice
@Neil see I am trying, I am stuck at the logic right at the heart of problem
my original question wasn't how to fix it by the way, it was should I merge table at the end, but modifying $table object
or should I keep doing what I am doing and fix it
@Mathematics I don't think merging the tables afterwards is a smart plan
09:32
iam exporting a function from one file so i can use the returned string in app.js on server side. i send a string like return 'testeste'; but i am not able to see it in the console from app.js what could be the problem**?
exports.ensureAuthentication = ensureAuthentication;
and thats what i do in the other fiel console.log(authJS.ensureAuthentication);
@Mathematics $headRow.append($('<th />', { text: cName })); ... is cleaner like this -> $('<th />', { text: cName, appendTo: $headRow });
@doug65536 thank you, I will try improving code once it's started working, it's all coming from Microsoft OData Query builder library with little bits added by me :)
Here is working fiddle if anyone intereted
I want to display above table as output, can anyone tell me how can I do that please ?
if there will be a very large number of table cells, performance will suck. reason: every time it changes any cell anywhere it has to scan through and see if it has to rewrap anything in the entire table. it gets bad
every cell affects the width of every cell above it
and every cell affects the width of every cell beside it
it's ridiculous
@doug65536 is it for first approach or 2nd one, sorry bit confused
you can get far better perf with divs
09:41
I am also using jQuery Datables, as I need to export it to excel too
if you use tables, you must use pagination or something that caps the amount of cells
it can bog down to choppy 2 fps with large tables
trust me in real world it won't be bad, I am just trying to work it for n scenarios, but it would be limited
is 6000 cells too much?
thanks for the suggestions though, if performance became an issue, I will def follow your advise
@JanDvorak depends. If you append 6000 cells to an already visible table, it is very bad
if offscreen and you whack a whole table document fragment into the page, it can be fast enough
09:44
lol
I'm all for tables for tabular data, but quadratic perf is not nice
So, let's just say that if a person with a subpar PC chooses to paginate by 1000, it's their own fault?
how can I append $table to output ?
should I do it inside a div
here's why divs are so much faster: it doesn't care about thousands of cells above it in the table when you append a row. you control the widths. with a table, it has to reflow everything every time you touch anything. you might have made a cell get wider, and therefore the whole column
Another problem with display:table is that it ignores explicit size, making it impossible to scroll out.
09:49
okay, here is the problem...
I am able to show it in a table
@Mathematics don't append the table to the page until after you add all the content to it
it is drastically harder for it when it is visible because it has to obsess over the appearance and reflow repeatedly
@doug65536 Adding large amounts of data at once could hang the page though.
Why shouldn't it be able to delay the reflow?
@JanDvorak is it possible? maybe if you never turn around and read any properties. I've spent quite a bit of time optimizing huge tables, they reflow their asses off.
09:57
That. It reflows when it repaints or when you read a property after changing anything. But it shouldn't otherwise.
Maybe tables are different?
@BenFortune yeah, ironically the effort to make it actually faster reduces perceived performance if the delay is human-visible
I did a speedhack once where I generated just the rows above the fold, then offscreen did the rest, and put them in
pagination is the real solution. these concerns are for when clients want huge scrolling lists/tables
I am very near to give up
@doug65536 Lazy loading ftw
@doug65536 client will usually have something like top 10 etc..., or where x = this...
so my concerns are not about performance at the moment :)
@JanDvorak every cell affects every cell above it and every cell below it and every cell to the right. that's what kills table perf
10:05
Nope, each reflow should still be linear. Every cell affects the column widths, and the column widths affect every cell, but there's no more interaction (unless you also count colspans et al.
0
Q: Nested objects to flat table

MathematicsI have nested objects, depth of objects can be N, each object can have X properties as well as X objects nested to it. Problem 1) I am having trouble guessing what column headers will be added to my table until the whole loop is completed. As you can see in my first row, I only had 1 column "Na...

every cell affects its entire column and all of the columns to the right, including every cell above and below the row, in all the following columns
wat? How?
if you make a column wider, all of the following columns shift right
and when they shift right, the right edge might have to stay where it is, so every cell to the right might change width
I tried the very best to explain my issue, any help would be highly appreciated !!
10:07
That's a column-level thing, not a cell-level thing. And it still can be computed in linear time.
Plus, you have the exact same dependency with block elements.
not it can't because it has to rewrap every cell and every time another cell is affected it might change that cell's width, causing that whole column to reflow
it's amazing they ever reflow. the crap perf we get is actually amazing, considering
because wordwrap
When you change anything in a flow, you have to reflow everything that follows. Not just table cells.
follows sure. table cells affect cells above too
Keyword: complexity class
!!hammertime
10:10
STOP
HAMMERTIME!
!!help hammertime
@JanDvorak hammertime: User-taught command: <>STOP
In physics, the Planck length, denoted ℓP, is a unit of length, equal to 6965161619900000000♠1.616199(97)×10−35 metres. It is a base unit in the system of Planck units, developed by physicist Max Planck. The Planck length can be defined from three fundamental physical constants: the speed of light in a vacuum, the Planck constant, and the gravitational constant. == Value == The Planck length ℓP is defined as where is the speed of light in a vacuum, G is the gravitational constant, and ħ is the reduced Planck constant. The two digits enclosed by parentheses are the estimated standard err...
maybe someday fixed width cells will bypass the crazy obsessing over cell widths. it would require a way to tell a table that it has all fixed columns
Mind blown (section Visualization)
10:13
Is there a nice way to tell which z-indices are being used in a given element's stacking context?
In firefox dev tools
@JanDvorak no one wants to talk about logical problems which is why I was trying to find if anyone was interested
10:25
@Mathematics does the answer provided do what you needed? append empty cells at the end of rows to make them all the same length? Or did you need to inject empty cells into the middle of rows to line things up?
so, if record 1 has id,description,cost,price and item 2 has id,description,price, you need to inject a cell to push the price out of the cost column
@doug65536 yes you are right, it won't work
above fiddle explains it
@JanDvorak I used to visualise layout order with the 3D view, recently removed and I think re-implemented by an addon.
ah, so you need to analyze the columns across record types and find where they line up and where fields are missing, and inject appropriate empty cells on rows that don't need that column?
@doug65536 yes, that's right, I think can I add data-attributes e.g. which value belongs to which column and then .. let me think
and retroactively inject a column that has never been seen and scan up that column and put empty cells, or something?
what if one record is id,cost,price and the next record is id,price,cost
10:36
@doug65536 Sort the keys before insertion.
@Sheepy users won't like it
you can't scramble a table's columns
Then live with it.
@Sheepy that is the go-to solution for order independence, though.
@Mathematics yeah, I have an idea. keep an array of column names. every time the current column name is not equal to the expected column name, insert a cell at that column in every row above and insert that column name into the column name list
ah, but you'd have to verify that it doesnt happen later already
which is why I asked if you ever have id,cost,price followed by a rec with id,price,cost
@rlemon Zirak is fine
Happy birthday @GNi33
Any way to make function bind syntax use apply instead of call (in babel)?
wildCardEvent.apply(this, args);
this::wildCardEvent(args); // wildCardEvent.call(this, args);
10:44
@BenjaminGruenbaum does he have a girlfriend now?
@BenFortune why not use the spread operator instead?
20 hours ago, by ssube
@Abhishrek they glued goat hair to your face m8
this::wildCardEvent(...args) or something
is this normal?
I am using angular 1.4.4 and in my angular app there are let's say five paths available /first, /second and vice versa. Now when I am calling the app via domainname.com/first - without any $location.path changes it is automatically calling specific controller
10:45
@BenFortune this::wildCardEvent(...args) works, yes.
@AwalGarg That makes wildCardEvent.call.apply(wildCardEvent, [this].concat(args))
@BenFortune that's correct
It looks really convoluted though
whistles lightly and turns away
@BenFortune yeah, bind the apply function
var x = Thing.prototype.something.apply.bind(Thing.prototype.something); now x(foo) passes foo to something.apply
10:48
apply the bind to the call
@littlepootis Doesn't that defeat the object of using the syntax though? :P
do you need this in the called function?
Hi Everyone! I need a solution of the following problem if some one guru can resolve this.
http://stackoverflow.com/questions/37409343/ui-response-is-too-slow-when-attach-large-document
@SirajHussain Welcome to the JavaScript chat! Please review the room 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.
10:51
@BenFortune then you probably need to write a function that calls apply and stop being fancy ;)
bind ruins this
You're loading 10Mb of text in to the DOM; it's going to be slow. If you want to speed it up then you need to not load so much data at once. You could use paging or lazy loading to load manageable chunks of data for the user to view before requesting the next chunk when required. — Rory McCrossan May 24 at 9:24
I mean, there's nothing wrong with wildCardEvent.apply(this, args);, I just wanted to try something new
Are persistent WSS/HTTPS connections an issue for connections form China to "non-China"?
^ ooh good question. technically they should be
Why? What's wrong with China?
10:54
We have a potential client in China and I'm somewhat concerned about the reliability of our service, which relies heavily on a persistent, secure websocket connection
the great firewall
there is no way to counter the great firewall?
@OliverSalzburg networking code must be prepared for problems, no matter what
why not just reconnect
@OliverSalzburg You use cloudflare?
10:55
I am using angular 1.4.4 and in my angular app there are let's say five paths available /first, /second and vice versa. Now when I am calling the app via domainname.com/first - without any $location.path changes it is automatically calling specific controller
is this normal?
-sorry for reposting
@doug65536 It will, but if they block our service completely, then that's not an option
@BenFortune No
@OliverSalzburg if they do that, you're screwed, no?
Like, if we have 100 users who are constantly trying to reestablish a connection to our service, which they constantly disconnect, they might just shut it down completely
some chinese users come here and use the chat. this chat depends on a secure socket connection too but then it also has a polling fallback
@doug65536 Indeed
10:57
@OliverSalzburg I worked for a software company that had a Chinese client
@AwalGarg Polling would work as well for us, we use socket.io
100? you using php? ;)
It was a nightmare.
@OliverSalzburg ahh ok. should be alright then
@AwalGarg But it's still a secure connection to the same IP endpoint. So, might be just as bad
10:58
Couldn't transfer anything without filezilla that recovers download after a failed connection
@Neil That sounds like what I expect :P
Well, I fear it at least
@OliverSalzburg we needed to perform an installation remotely and I swear there were days when I could not even connect
We had asked for some sort of intermediary server with a decent connection, but we never got it
Not even sure that would have helped for that matter
I don't think I will get an answer without bounty, but that's 2 days far
They had a test server we could access and a production server that wasn't even connected to the network. The boss had organized an installation in the test server with the understanding that they would deal with the production installation
I wanted to shoot my boss. Didn't end well of course
Don't shoot your bosses. They don't usually end well.
- Neil
11:07
$bodyRow.append($('<td />', {
  text: property.toDateString()
}));
how can I add a dataattribute while appending td ?
$('<td />', {
  text: property.toDateString()
}).attr('data-id', 'container'));
found it
above will work
that was fast, gj
good job
thank you
real job is still pending though
$bodyRow.append($('<td />', {
  text: property.toDateString(),
  'data-id': 'container'
})
11:16
!!afk lunch
@Mathematics any property name that isn't a method becomes an attribute
$('<th/>', { 'data-woohoo': 10 })
lovely, thanks
@doug65536 I am trying to add column header but I am still clue less on overall strategy to get this done
Is there any detailed documentation about webpack2 ?

I just updated webpack from 2.1.0-beta.6 to 2.1.0-beta.7, then webpack told me the config is not valid. While the config works with 2.1.0-beta.6. I tried webpack-validator to get more information, but I've no idea how to correct my config.

Here's the config: https://git.io/vryzL
And the failed log: https://travis-ci.org/frantic1048/restia/builds/132034736
@Mathematics I think I have an idea.. I have half done fiddle
Thank you :)
11:29
@Sheepy I'm asking because I want to add a z-layer to an existing application and I'd like to spread them out more evenly.
Actually, I can just grep the CSS for z-index
@littlepootis sound advice
@frantic1048 what command are you running webpack with?
@Mathematics almost
@Mathematics works
oops, broke
11:47
@doug65536 trying to understand the first one now lol
simple, it remembers which column to inject a bunch of empty cells at, and how many rows of them it needs, when the next input column is not equal to the expected next column
@Aides I'm running from `gulp test`, and gulp starts a karma server, then webpack loads sources.

Here's the gulpfile, it just pass configuration to karma: https://git.io/vryaT
let me try, I was reading things like Object.keys(obj) etc.. as it's new to me
doing headings and stuff right now
11:56
can I test it with my JSON data, afraid if it will not fail lol
@frantic1048 no, nothing. we're mostly looking at the repository sources. there aren't really any release or upgrade notes yet
@frantic1048 that looks really bad, might hint that the Karma plugins aren't working with Webpack 2 :(
@Mathematics jsfiddle.net/1tsu6xt9/4 yeah, whack your data in place of the testdata I faked in
hmm
it is not that simple? let me look
@doug65536 added it here - jsfiddle.net/1tsu6xt9/5
ah, the other scenario... what if the next row is missing columns this row had
not hard either, requires possibly putting a few consecutive empty cells on this row
any missing columns will be empty - I believe
either before or after row
12:03
yeah, what I mean is, if the row above was id,price,cost, and the next row is id,cost, then an empty "price" needs to be on that row
that's correct
that's the other direction
I handle a new column suddenly being needed in the fiddle (so far)
an existing column not being needed needs to be handled next, then it should handle anything except switching column orders
I am about to test what you already wrote using debugging tools, I understand things slowly lol
@FilipDupanović It seems I had to check what changed between beta.6 and beta.7 ?
eh, tough that plugin shows the requirement of webpack1, I found it work with webpack2 before, and I used webpack2 with it for about a month. I know it's not a good idea..

For now, may I switch to another test-runner to make things work ?
guys , where do you keep the generated JS/CSS for a live project?
somewhere like /public/js/compiled/ ?
12:13
I don't bother foldering it, just appending a .min or calling it bundle.js or something
Hi all, does anyone know a good way of arranging the tables in an ERD? This just looks bad: imgur.com/J5lmnPV
@rlemon I am just thinking about how to organize the files and what exactly to git-ignore
@tereško normally I just put a directory for generated/compiled stuff under root of project, naming it like "/bulid" or other.
@Mathematics closer
@frantic1048 if you don't need the headless client testing, you can use Mocha's or Jasmine's test runner straight-up
@ChristophBühler mmm I'm pretty sure you can create entity groups and other abstractions in ERDs
12:21
@Mathematics now the flattening you mentioned earlier makes more sense
@FilipDupanović That projcet was used on browser, so I'm using a minimal client testing. I'm considering back to webpack1 for least change..
do you think that { x: 2, a: [ b, c, d] } should become 3 rows with xb, xc, xd
@frantic1048 that might be prudent. you can backport things you like from Webpack 2
@doug65536 not every key will be a column, here products is a child object
@doug65536 yes that's right
there are few filters in my code that understands what is a property and what is an object and there will be some rubbish there too
@FilipDupanović yes, thanks for your tip :)
12:25
should I just make an automated flattener? seems straightforward. ah, not so simple for multiple arrays though. needs to cartician product the arrays and duplicate the scalars
so if you have 2 columns, one with [a,b,c] and one with [d,e,f], then I need to make 9 rows: ad, ae, af, bd, be, bf, cd, ce, cf, right?
it's starting to not make sense
1 second
@doug65536 check this out
this generates nested tables, I am trying to create flat table instead
@doug65536 does it makes sense now ?
so from above example my table will have these headers

Category.ID, Category.Name, Product.ID, Product.ReleaseDate, Product.Rating...., Product.Description, ProductDetails.Details
so my current logic is to create row, then go through it's child tables add them to main row, then keep going deep until we have all the rows and went through all the objects
whereas next row "Category" in this case might not have any PRODUCT or PRODUCT details
oh, so if it was { a: { x, y, z}, b: { s, t, u } } then you want { x, y, z, s, t, u }?
Yes, regardless of how deep it would go
3
ah okay
I am working on adhoc reporting
user will select columns they want from different tables, then want flat output
12:39
maybe { s, t, f, u }
idk why I read that
@Neoares lol
ohh shit son
@FlorianMargaine @Loktar rebecca.blackfriday GOTTA GET DOWN!
@Mathematics like that?
Explaining this thing in my answer will be an adventure
guess he left :(
12:55
@Mathematics thats what she said?
@Mathematics how do you handle conflicts?
@Abhishrek violence and prejudice
:P
@rlemon sounds like Shaka Zulu from civ5
> Ohh, I see your troops crossed into my territory for half a turn. I DECLARE WAR!
man, been a while since I've played civ
more like
@rlemon Hahaha that's a brilliant thread
12:57
> Oh you have a capital, I covet your land!
> Wind is simply what happens when the air decides it wants to make a change.
@SomeGuy sounds like an Indian proverb
Hahaha it totally could be
@rlemon well me and Lok and few others are planning to play on sunday, why dont you join in ?
maybe
ping me
(My Internet can't possibly fuck up civ5)
12:59
my strategy is rush for nukes then fuck up everyones shit fam. :D or get obliterated trying
I prefer stacking gold and buying nukes (or allies) at end game :P

« first day (2050 days earlier)      last day (3121 days later) »