« first day (1185 days earlier)      last day (3777 days later) » 

7:00 PM
@BartekBanachewicz Are you making an application?
 
@connorspiracist I am not sure if 80 kB makes a difference. As for powerful, I am not sure if I am going to need it either.
@Shmiddty Another uni project I've been putting off constantly
 
@BenjaminGruenbaum I'm with you in that it looks like a bug. Did Pekta say why he wanted an integer ?
 
I am seriously minifying SQL statements right now.
 
@BartekBanachewicz ha ok
 
@BartekBanachewicz But is it an application, or a slightly-dynamic web page?
 
7:01 PM
@dystroy not convincingly :P
 
@Shmiddty web app mock, so I guess it fits the 2nd
i.e. I need to show a concept of functionality only
 
Ok. No sense over-engineering it, I suppose.
 
exactly
but Handlebars looks easy enough
 
But you'll want to look into MVC patterns
eventually
 
You know it's not exactly the first web app I've created
 
7:03 PM
@BartekBanachewicz Handlebars are cool ;)
 
According to the w3.org, it's clear that non integers numbers are authorized
 
@Miszy I finished MDX! :3
 
> Apply the ToNumber() abstract operation to timeout, and let timeout be the result. [ECMA262]

> If timeout is an Infinity value, a Not-a-Number (NaN) value, or negative, let timeout be zero.
 
@BenjaminGruenbaum It was the object.create that was removing the prototype :(
if i use new it works
Any other ideas?
var PluginService, object;

PluginService = (function() {
  function PluginService() {
    this.init();
  }

  PluginService.prototype.init = function() {
    return log('here');
  };

  return PluginService;

})();

object = Object.create(PluginService);

PluginService.apply(object, []);
@BenjaminGruenbaum try that
 
@Miszy is there an easy way to stash html code of templates separately?
 
7:06 PM
@BartekBanachewicz What do you mean, like separate .html files?
 
@BartekBanachewicz the HTML would be the template...
 
oh wait I found `<script id="entry-template" type="text/x-handlebars-template">
template content
</script>`
@Miszy yep
 
@BartekBanachewicz I'd go with require.js and !text plugin, but that might be just overcomplicating things for your simple app.
 
var serialport = require("serialport");
serialport.list(function (err, ports) {
    ports.forEach(function(port) {
        console.log("comName: " + port.comName);
    });
});
 // comName: /dev/ttyUSB0
 
Back
 
7:07 PM
@RUJordan I thought you'd never come back!
 
@BartekBanachewicz is text/x-handlebars-template valid too?
 
@Cicada3301 hello again :)
 
var serialPort = new SerialPort('/dev/ttyUSB0', {
  baudRate: 19200,
  dataBits: 8,
  stopBits: 2,
  parity: 'none'
});
// Error: Cannot open /dev/ttyUSB0
:rage:
 
> :rage:
 
@connorspiracist no idea
 
7:08 PM
@connorspiracist Does it matter? :)
 
@Miszy Well yes, of course
 
@connorspiracist Why does it matter?
 
@Miszy Because if it's not valid then it wont work
 
@connorspiracist ha ha ha
 
it's usually text/x-handlebars
 
7:10 PM
you made me laugh
 
@connorspiracist You made me laugh too :D
 
script type is not important.
 
You didn't make me laugh
Make a funny for me connor? <3
 
@RUJordan for a JS developer, you should know better
 
@miszy!
 
7:10 PM
@BartekBanachewicz tbh I didn't even read anything. Like literally nothing.
 
do you guys mean to tell me no one here has serialPort communication experience with JavaScript?! that seems insane to me.
 
lol
 
@miszy, now I'm trying to make the website use more flexbox and less jquery UI as possible
 
who uses serial ports anymore!? :P
 
Oh a valid script type?
 
7:11 PM
@rlemon have you tried IRC
 
@rlemon teach me serial ports and I'll give you an answer :P
 
Oh, you're getting the html, I'm used to working with ember so it's probably different
I've never used handlebars on it's own
go eat dog shit
 
Is anybody having replay issues with youtube?
 
@connorspiracist <script id="entry-template" type="text/x-handlebars-template"> is completely valid.
 
7:12 PM
angular is hell slow
 
@Miszy No
 
@AbhishekHingnikar What do you mean?
 
@AbhishekHingnikar Don't
 
@connorspiracist Yes, I just checked with validator.
 
<script id="entry-template" type="text/bananaphone">...</script> is fine too.
 
7:13 PM
@AbhishekHingnikar no it's not.
 
@Cicada3301 Don't use JS at all.
 
@Loktar no. are the ##node guys a holes? or are they nice on IRC?
 
@BenjaminGruenbaum yes it is
 
@AbhishekHingnikar no it's not.
 
yes it is
 
7:13 PM
@Miszy you're missing closing tag
 
I like all of the facts in this debate
 
@AbhishekHingnikar No it's not. It's probably your code that's slow.
 
@AbhishekHingnikar no, it's not.
 
Define doesn't work? (PS, your rep is very evil) — RUJordan 37 secs ago
 
I can SEE the port, but I cannot open it. GRRR. but I can open it fine on windows... so I know it isn't my device.
 
7:13 PM
Very evil rep indeed
 
eh I cant remember
 
@connorspiracist We were talking about the type. Obviously I meant proper html.
 
@Miszy doubtful because my code is absolutely nothing so far
 
I think the node guys were ok
there's ##javascript as well on freenode
lots of smart guys on there
 
@AbhishekHingnikar So how can you tell it's slow?
 
7:14 PM
@Miszy and I have no idea if I'm doing it right: 2 divs, in which 1 is a tab container and the other is a result. In the tab container there are various buttons, which change the result to what it was before, even tho before it was just hidden, now it's generated, having much less code in the HTML.
 
lke 400 users on..
 
I was told it is full of trolls :P
 
@Miszy I know all types are VALID fuck sake people
 
@connorspiracist Exactly.
 
@Miszy cause basically the vanilla solution smokes hell out of this
 
7:14 PM
hah 985 users
 
@Miszy I'm used to working with ember, I always thought it got all the templates by the type
 
I bet a large portion are idlers
 
@AbhishekHingnikar Obviously it does when you compare an empty document with empty AngularJS project
 
and a vanilla solution that is written in canvas ... whereas this is using native scroll view
@Loktar angular was taking too much to render -_-
 
    addItemX = function() {
        var source   = $("#item-template").html();
        var template = Handlebars.compile(source);

        return function(item) {
            var itemHtml = template(item);
            $("#items").append(itemHtml);
        }
    }();
 
7:15 PM
@AbhishekHingnikar ... What are you trying to do?
 
much better
 
I am highly suspecting that my issues is mostly due to the usb serial converter + linux
 
@AbhishekHingnikar I don't know exactly your application but AngularJS is very fast and will get even faster in the future.
 
@AbhishekHingnikar so, you're telling me not using a framework is faster than using a framework?
 
@Shmiddty display an infinite scrolling list of images from server.
 
7:15 PM
This is a purely opinion question: when is "dat line" where a library is good to use? I've had people tell me use like.. underscore, or something, but I always try to avoid using those.
 
@BenjaminGruenbaum no i kinda re-wrote the whole thing in canvas :-|
 
@BartekBanachewicz WARNING too much jQuery.
 
Why would you use canvas for infinite scroll?
 
@AbhishekHingnikar "issue === you don't know what virtualization is" :P
 
7:16 PM
the first converter i tried with wouldn't even find the serial port, the next converter I am using allows me to find it, but I can't open it.
 
@Shmiddty i just wanna show images !
 
And you don't want people to be able to save those images?
 
@BenjaminGruenbaum what is ng-repeat doing :P
read the source.
 
@AbhishekHingnikar I have :)
 
var $ = function $ (sel) {
return document.querySelectorAll(sel);
};
 
7:17 PM
@Miszy with all due respect, I have to turn that in rather soon
 
@Miszy var $ = document.querySelectorAll;
 
@rlemon You can't do this :(
 
also point-free style ^
@Miszy what
 
@Loktar Seen Nidhogg?
Seems like a fun game
 
yeah looks interesting
 
7:18 PM
-1
Q: Javascript program to find quadrgrams in a string

user3184807var str = "dsahdssdaswe" So basically I need a program that will find every set of four. So, in the example above it should hold the values "dsah","sahd","ahds","hdss","dssd","ssda","sdas","dasw" and "aswe" thanks.

 
I like those sword fighting types
 
!!>var $ = document.querySelectorAll; $('div');
 
@Miszy "ReferenceError: document is not defined"
 
FFS
 
what the fuck
 
7:18 PM
reminds me of Pirates!
 
@BartekBanachewicz No, I meant this: d.pr/i/OQKc
 
what. is. going. on
 
var $ = document.querySelectorAll.bind(document);
 
var $ = document.querySelectorAll.bind(document);
 
@connorspiracist Yeah, that will work :)
 
7:19 PM
is bind on Function.prototype?
 
@connorspiracist I still prefer more explicitly return a function call just in case.
 
yup
@Miszy in case of what?
 
You got stuck after defining a variable? — RUJordan 2 mins ago
Was that rude? lol
 
@BartekBanachewicz bind call and apply are crazy useful :)
 
@Miszy no, really?
 
7:20 PM
this guy
 
@connorspiracist In case I need to do something else before I return. Eg. Often I don't want to return NodeList, i prefer Array so I call Array.prototype.slice or sth.
 
@Miszy sorry. var $ = document.querySelectorAll.bind(document);
@Shmiddty ninja'd while I nuked my coffee :/
 
@BartekBanachewicz Yes.
 
@rlemon connor ninja'd me as well.
 
^ you just lost IE8 compat!
better load up jquery :P
 
7:21 PM
log = console.log.bind(console); // best line of code ever
 
@Loktar HOORAY!
 
@Loktar no one cares about IE8 but you :P
 
@Miszy fun fact: they are all the same thing in Haskell, invoked by The Space Operator
 
you spent too long working for the gov.
 
@Loktar Cool. Better check on my Netscape Navigator 4.
 
7:21 PM
GET OFF IE8!!!
 
well people who make sites that make $$ care :P
if I said FU IE I would have made half the $$ I have
 
@Loktar that excuse is getting older and lamer
 
I mean, people who care about making money still care about IE7
 
says the people not making money from websites
 
7:22 PM
but they shouldn't
 
@Loktar you don't make money from websites?!
 
"Guys look Im willing to flush 2k down the toilet monthly fuck IE!"
 
13
A: Is it possible to bind a date/time to a console log?

ShmiddtyYes. http://jsfiddle.net/SwFJg/6/ var DEBUG = (function(){ var timestamp = function(){}; timestamp.toString = function(){ return "[DEBUG " + (new Date).toLocaleTimeString() + "]"; }; return { log: console.log.bind(console, '%s', timestamp) } })(); DEBUG....

 
@Loktar bring me the actual cases for this... and not the other way around where you spend 60% of your development time supporting 10% of your users
 
?
Actual use case >50% of my users are on IE
I make anywhere from 2-5k monthly
 
7:23 PM
are 50% on <= IE8
 
I spent maybe a few hours supporting IE
not that hard.
 
I make nothing from my websites...
 
over the years yeah, currently no
I had to support IE6
 
Dang, that's a lot of money
 
well we are talking currently :P
 
7:24 PM
How do you generate income?
 
of course we needed to support it when there were less versions around
 
@RUJordan advertising
 
So you have to have a decent amount of traffic?
 
but saying "you lose IE8 support" today is like saying "ohh well, fuck windows XP users", which for the most part I think we can be okay with.
 
I wanted to buy dell inspiron 17 laptop but only ship to US. cost $599
Any idea how can i get it?
 
7:25 PM
@vzhen bananas.
 
@vzhen buy one off ebay?
 
?
 
@rlemon Not really, XP users can has IE9 or Chrome or Firefox.
 
from 2013 until today 318,015 users on IE8
 
@rlemon MS doesn't even support those bastards any more.
 
7:25 PM
out of 1,311,792 IE users
 
We're ending XP support this year.
 
Everyone is ending IE8 support, even Atlassian who has a lot of IE8 users. Educate your clients!
 
The thing is, I don't think people who are still using IE8/WinXP are the types of people who like to pay for things.
 
Our policy is to piss on IE8, make the app work on IE9 and make it sexy on every other browser.
 
What is involved in owning a website? I know you have to buy a domain name (is that a one time fee?), you also need a host, right?
 
7:26 PM
We support anything over 5% of our user base visually and functionally, and anything over 1% just functionally
 
@Miszy not the point I was making. IE8 shipped last with XP. All post XP users should be using IE9+ (yes I know it was also shipped with IE8, but iirc those users were prompted to upgrade)
 
@phenomnomnominal I'm going to start using your application(s) in IE5 Mobile
 
@rlemon I understand bussiness reasoning behind this but I will defend my point of view: educate your users :)
 
@phenomnomnominal IE10's adoption rate has made me happy
 
7:27 PM
@Shmiddty we have like 4 million users so hopefully you won't be much of a blip :P
 
@RUJordan cannot found in ebay
 
@RUJordan domains are a yearly fee
 
but the 'business' reasons are very VERY limited for most cases (unless you work on a large country wide site or government site)
 
@Cicada3301 how is it going?
 
@rlemon you are just throwing out a lot of excuses to be lazy
once it hits < 5% idc about it
 
7:28 PM
@Miszy quite good... still not sure tho
 
Okay, and how costly is hosting?
 
anything greater than that id rather support it to an extent.. its not like its hard
 
/what are some good hosts?
 
@RUJordan hostgator
 
@Loktar not at all. I am pointing out that for most users, the requirement that it work on X out dated browser is complete and utter bullshit
 
7:29 PM
the cost of developing and maintaining for old platforms is not insignificant
 
^^^^ and that is why
 
who here doesnt work somewhere where they dont have to support IE?
 
I don't
 
everyone who has a position in front end development
 
That's the benefit of not working on public-facing applications. We get to target specific browsers!
 
7:29 PM
for our web based platform i'm developing right now
 
hoorah
 
@RUJordan We host everything on Amazon AWS
 
I mean, I will support IE10, 11 and maybe even 9
 
@Miszy yeah depends on what hes looking for, for simple sites just do shared hosting its dead simple
 
@Loktar Double negation, didn't get this at all :D
 
7:30 PM
but I'm not going out of my way to give them the richest content
 
@Miszy haha :P
 
@Loktar if I'm not prying too far, what plan do you have/suggest for a new site owner?
 
^ to have a plan!
 
(Before I buy, I would need an actual website idea...)
 
yeah exactly
something you enjoy and can write about, or produce/gather content for
even if it already exists, just look at the competitors
see what you can do better
 
7:31 PM
@Miszy I have buttons, and their onclick property link to functions in the .js file... not sure if I should simply make them do the function without checking another file, or to keep the code clean and link to those functions... but making that that .js load for every page and causing a lot of delay in the rendering of the page...
 
target niche audiences
 
So like a blog?
 
@Miszy or maybe I should just make that js to run on that page...
 
you cant make a social network to compete with Facebook, but you can make a social network to compete with smurf lovers.
2
 
I would like to host little JS games preferably
 
7:31 PM
@Shmiddty nothing nasty just almost a few thousand images
 
And maybe have a blog to explains how they work or new fun things I learn
 
@RUJordan need to have some sort of niche though
yeah that wouldnt be bad
 
The niche is me :3
 
I mean you wont make $$ or crazy $$ by any means, unless you get big with it
because there are a shitload of game hosting sites out there
 
@Cicada3301 I don't see how loading of JS could possibly cause that of delay. Maybe try including them at the end of your <body> instead of <head>?
 
7:32 PM
ps @Loktar the non-native canvas got insanely slower once there were too many images in memory :P
so LRU'd that bitch
 
That's true. Does hostgator offer ad free hosting?
 
@AbhishekHingnikar hah
@RUJordan eh not sure
 
@Miszy ext resources in the head download first, and block the page rendering until they are complete.
 
@Miszy the client needs to download a lot more from the .js... and that is for every page... even tho it is not necessary...
 
but its crazy cheap.. like $3 a month or so?
 
7:33 PM
this is nasty.. safari what the fuck are you making me do ?
 
so it is advised for perceived performance to include those in the body
 
@rlemon That's what I said - include them in the body ;)
 
ps the limit is so because iOS has a texture limit which makes sense.
 
(which you suggested, I was just giving the reasoning behind it)
 
$3.96/month
 
7:33 PM
@Cicada3301 If it's not necessary why is it included?
 
@miszy btw, flexbox really removed half of my code :D
 
@Cicada3301 It wasn't flexbox. It was spending actual time on reading instead of guessing.
 
@Miszy because for that page is needed
 
@Loktar wow that's really good pricing
 
@Cicada3301 Make your website work without a single line of JS first, okay?
 
7:34 PM
If it's ad free I'll totally get that
 
yeah its ad free
 
@Miszy now it does
 
I used shared hosting until I couldnt any longer because it allowed me to make WAY more $$ lol
VPS is the next step up but the prices start at at least 10-20/month
 
@Miszy there are just some functions to... guess what... add functionality!
 
@Cicada3301 FFS, delete everything and start from scratch.
 
7:35 PM
@Cicada3301 nope
 
    Gents:
    how to access `this` in this function? It points to the function, and I need an element it was called from
$('#select-graph').submit(function(event) {
	event.preventDefault();
	$.ajax({
		url: 'https://www.google.com/jsapi?callback',
		cache: true,
		dataType: 'script',
		success: function(){
 
@rodling store this in some variable
@rodling eg: var self = this;
 
@Miszy if you'll guide me on what users prefer I will
 
Users prefer not to think
 
@Cicada3301 users prefer unobtrusive readable webpages
 
7:36 PM
@Miszy at the top level of the function?
 
I'm repeating myself.
 
@rodling Yes.
 
Question, I have a div w/ 20% width, and I wanna access the width in PX, how do I do that? document.getElementById("").style.width?
 
$.ajax({ .... , success: function(){}.bind(this)});
 
@rodling the this you want to access ;)
 
7:36 PM
ok guys... adding a new branch to the website, all made with your suggestions
 
@deep nope
 
@deep developer.mozilla.org/en-US/docs/Web/API/… or something like that I believe
 
@rlemon But he might want to access both this
 
@deep google "Get computed width javascript"
 
well that is silly.
tell him not to be silly.
 
7:37 PM
What about getComputedStyle?
 
@Cicada3301 Are you on OSX, Windows or Linux?
 
that too
 
@Miszy windows
 
element.offsetWidth would work as well no @Loktar @deep @SomeKittens
 
@Cicada3301 That's a pity. Do you have some kind of *nix shell like Cygwin or git-bash?
 
7:38 PM
Sarcasm?
 
@Miszy don't think so...
 
@Loktar last question, if I don't want to pay in full, does the monthly option mean they'll charge me monthly? (I think it's an obvious question but I want to be sure)
 
@Cicada3301 Okay, no problem :)
 
yea monthly
every month youll get charged, can cancel anytime
 
Thank you :)
 
7:39 PM
I hate the ones that force up front payment
np
 
@Loktar only when they give you a heavy discount
 
@Cicada3301 You should make a complete website which doesn't require JS to work; which doesn't use it at all. That will be a good excercise.
 
:( my godaddy just ended and they won't let me use another code for 2 years hosting
I am migrating next month or the month after
 
@Miszy I will
 
lame (about the coupon code)
 
7:40 PM
they were offering (when I got it) 47% off the 2 year VPS purchase (up front)
NICE discount
 
$3,888.00
First year price
 
@Cicada3301 Then read on Progressive enhancement
 
Ok godaddy.. I'm not freaking rich
 
@miszy *nix shell is a whole new language... hope you don't want me to learn that
 
7:40 PM
@Cicada3301 At some point you will learn the basics.
 
jsfiddle.net/a5a83/1 all the ways! (calculated width)
 
@Miszy you have no idea how much I wish not to be in highschool right now... Can you be my teacher in our freetime?
 
Dang, I'm bad at clever names. What's a clever name for a javascript themed blog?
 
@Miszy following to that this question, it points to the form that it submits, and I need <a> element so that i can pass a value.
 
@RUJordan Blogascript
 
7:42 PM
@Miszy as of, someone that takes care of what I do and grows me up in his style, I'd really love that
 
@Cicada3301 You're my padawan. You have to finish your high school and then continue your education. These are wise things to do. Don't leave school ;)
 
Sorry, blogascript.com is already taken. Really want it?
 
@Cicada3301 You're very lucky to be in high school. Embrace the lack of things required of you.
 
dammit, I liked that too
 
@RUJordan It's taken by this room
 
7:43 PM
oh
 
hmpfh
in emulated mobile mode, my page doesn't fit on the screen. And I have no absolute sizings
 
@rodling uh, so maybe just do $('a') to get the element you need?
 
If I make a subdomain, it's totally being called this
this.domain.com
 
If the domain's Javascript themed, this will never be what you want it to be.
 
el.getBoundingClientRect().width is the only way to do it in ie8 < btw!! :P
lol must be why it was stuck in my head
 
7:45 PM
@SomeKittens Unless you open this.domain.com/bind(thisIsWhatIWant)
 
-3
A: document.form.submit() with confirm()

user2989328You can go to www.w3schools.com

appaling answer
 
heh you guys see the top image on reddit?
^ cd case
pretty sweet idea
 
@Loktar I had that once
 
@JanDvorak I almost upboated it :P
 
@Loktar then plants died after vacation :\
 
7:48 PM
hobojs.com
 
@JanDvorak flagged as spam
 
@SomeKittens it's not spam. A non-answer at best, VLQ at worst.
 
Go to $URL // close enough
eh, disputed.
 
@SomeKittens likewise.
 
7:50 PM
"emulate viewport" in mobile emulator turned on by default completely borks it
 
It kind of fits the spam bill though.
"This question is effectively an advertisement with no disclosure. It is not useful or relevant, but promotional."
It linked to w3schools.com. No specific link, just the main page
 
Its purpose intention is not to advertise
 
there, works on mobile :V
 
@Miszy yea sorry, dont exactly know JS, just trying to make a ajax call work on something
 
@rodling ...
 
7:53 PM
@rodling That's usual ;) Trial-and-error is your best option then, I guess.
 
@Miszy I finished reading it: for everything basic I do I need to check if it is available for all browsers? That will take some time...
 
If somebody told you to go to hobojs.com would you?
 
wrote a python script to just open the port -> python actually gives me useful error messages... then my issue was clear as day (and my head hit my desk)
 
@Miszy haha yea, got pretty nifty graph updating ajax call working, now just cant pass a correct value from different <a> to it? Suggestions? Using <a> didnt seem to work as it points to all <a>s on the page and this is point to the form
 
@rlemon port already taken?
 
7:55 PM
nope
access denied
apparently you need root access to even open a serial port on ubuntu
I wouldn't have assumed so :/
and clearly I didn't
 
!!xkcd permissions
 
oh, I thougt you meant a TCP port
 
@JanDvorak nahh, serial :P old school.
 
syntaxerror.com is for sale. But it's for sale by owner, so that can't be cheap.
 
7:57 PM
rlemon.com is only like $2k
but me that someone
 

« first day (1185 days earlier)      last day (3777 days later) »