« first day (1477 days earlier)      last day (3465 days later) » 

Sim
can i ask a stupid question?
 
o yeah
I am trying your videojs watermark though.
 
Sim
persist to cookies or localstorage. what does that mean?
 
it means some data is getting stored in localStorage or cookies and maybe is not getting deleted
 
Sim
does it matter what kind of data it is?
 
3:12 PM
Cookies are sent in http among other data, localStorage is only stored on the client.
That's the major difference
 
Sim
so lets say if i embed video using <video> with that js i will be able to view the video even after there offline?
not embed*
 
localStorage can store 5MB of data in Chrome and Firefox and 10Mb in internet explorer. so maybe, and i once read localStorage supports strings, but that may be changed by now,
 
Sim
so its different from AppCache right?
 
Oh yes. Appcache is to store assets, localStorage is to store state.
 
Sim
im still learning :)
thanks
 
3:19 PM
@argentum47 localStorage only supports strings
@Sim Enjoy
 
Sim
@zirak can you take a look at watermark issue?
 
oh, then I am right for the first time in my life. something that I didnot guess
 
@Sim You can do the same thing I'd do: google for it.
 
Sim
yup google is best friend only if its something common but when is not then stackoverflow :)
 
posted on November 01, 2014

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Augie is about to go to press. If you still want to be part of the f

 
3:27 PM
Did you try downloading the files from github and running it locally, because the codepen link codes and the example codes matches. and you cannot do a src="../whatever/videojs-watermark.js" at codepen, you need a public facing link, like cdn
Because I downloaded it and it works for me
 
Sim
weird
 
:O how is that weird
 
Sim
havent tried it locally yet it might be the issue but i did put the codes
on codepin for css and js
 
:P nopes, maybe you forgot to give the right link
try it locally. its really sad.
 
Sim
will do so
is there anything exciting to learn?
something like turndownforwhat JS hahah omg have you seen it yet?
 
3:34 PM
Hello everyone!
 
yes, there is . the most exciting and challenging thing to learn is to learn what to learn. There is where most people get stuck. And as ircmaxell says in is video, to learn what to learn you must learn a lot. (somewhat similar concept)
 
I had a thought - you think it would be sane to write a javascript "compiler" that would produce Java code for Android, Objective-C for iOS and some other language (I think I would go for Object Pascal here) for desktop?
 
no , i guess
 
@argentum47 why?
 
Sim
@argentum47 thanks for helping :) take care god bless :)
 
3:38 PM
@Killah First and foremost...Object Pascal?
What year is this?
 
Not even Delphi
 
By Object Pascal I mean FPC
 
Mosho wrote some Object Pascal code at work I think the other day.
 
And you can run JavaScript on all those platforms anyway
 
Also that ^
 
3:40 PM
I know, but performance of JS on ARM sucks
 
@BenjaminGruenbaum ...why?
 
Why produce Java on Android? Produce ARM instructions
 
@Loktar Wrote an Android game in JavaScript
 
Thats why people use native language to write native apps.
 
@Zirak because we're that hardcore (installer builder uses it as a scripting language)
 
3:40 PM
@Mosho Why!?
@BenjaminGruenbaum o_O
 
@BenjaminGruenbaum I was thinking about it too, but I wanted to produce code in a language that is "preffered" for each platform.
 
I made an emulator in JavaScript that can boot Freedos in Firefox on Android
 
@Killah preferred for what? Java is quite slow and you don't write fast parts of android apps in it - you still use C++ for that.
(Quite slow is an overstatement, also a language can't be slow, but I hope I got the point across)
@SterlingArcher congrats on the raise I just saw.
 
@BenjaminGruenbaum Android 5.0 is supposed to change that. Anyway, I don't want to produce the fastest code, just faster than JS.
 
@Killah the problem with JS is that people don't know how to write fast JS. JS is quite fast and both JSC and V8 are very fast runtimes.
 
3:44 PM
And we haven't even talked about using the different platform-specific APIs and what debugging will look like
 
If i asked how do i write js to operate fast on meta, would you answer that?
 
@Zirak like phonegap
@argentum47 what?
 
@BenjaminGruenbaum I know that and I know how to write fast JS, but on ARM it's always slow
@BenjaminGruenbaum Don't even get me started on phonegap
 
@Killah you keep saying that but the v8 benchmarks tell a different story, it outperforms Java on several of those.
 
@BenjaminGruenbaum On Android?
 
3:45 PM
"the problem with JS is that people don't know how to write fast JS", I have been searhcing for that answer like ages
 
@Killah On ARM, I don't know what they used in the benchmark you can go to the v8 repo, check it out and run it yourself.
The problem with JS is the same problem with Java - garbage collection, that's a lot of why asmjs is so fast.
 
@argentum47 First Rule of Program Optimization: Don't do it.
 
@BenjaminGruenbaum Well, off I go then. If it's true my problem is solved ;)
 
:P my image filter is so slow.
 
@copy That's for premature optimization.
 
3:47 PM
@Killah what are you building that's slow?
 
No
 
@BenjaminGruenbaum A 3D game sadly
 
cool
 
@Killah JS is horrible for those for whole other reasons.
@argentum47 well, you can't have a 'how do I write fast code' answer that's way too big.
 
@copy Hunger
 
3:48 PM
How to write fast code: Change your code to do less operations
@BadgerGirl Where are you?
 
but you wouldn't look at my code if I gave you the github link
 
@copy Germany
 
@copy 2 meters to your right.
 
@argentum47 I'd take a look but I wouldn't read all of it.
@BadgerGirl 2 disatance units
 
3:50 PM
@BadgerGirl Do we have something in the fridge?
 
@BenjaminGruenbaum I did quite a bunch of them actually, but only for desktop and it was not so hard
 
I want grapes
 
Got to look at the v8 benchmarks, cya
 
Bring them and feed me them?
 
I think we have grapes
 
3:51 PM
@Killah on a language with a single, not very good 3d APIs, no value types or value semantics, GC everywhere so you practically have to manage memory ETC?
of wrath
 
Too lazy and I'm working
 
tsk tsk tsk
 
@BenjaminGruenbaum Doable, WebGL is there and you can tame GC (also I'm not talking browser javascript, it was Node.js with OpenGL->WebGL module)
 
@Killah no collections, no integers, very poor vector ops, no SIMD (yet) etc... common, it's one of the worst languages to do it in.
@Killah WebGL is the API I was speaking of and it is still in its diapers.
 
3:53 PM
github.com/argentum47/JustBnW/tree/master/vf1.2 the second version I did was with webworker , but then it became three .js files
 
I don't think you understand version control
 
@BenjaminGruenbaum I was pretty much using OpenGL since the module I made was just WebGL-compatible API-wise. I guess I cheated a lot by making a lot of C addons for things you point out
 
You have commits, history and branches. You don't need to have versions in directories.
 
that time I didnot. now I partly do.
 
also - tags
@Killah if you used modules (I assume C++) then yeah - you cheated :P
 
3:56 PM
Tags in Github? I am unaware.
 
$('#red').onclick = function(){
    if(parentCanvas){
        processor = 'red';
       imageProcess(parentCanvas,parentContext);
    } else {
        alert("Choose an Image!!");
    }
};

$('#green').onclick = function(){
    if(parentCanvas){
        processor = 'green';
        imageProcess(parentCanvas,parentContext);
    } else {
        alert("Choose an Image!!");
    }
};

$('#blue').onclick = function(){
    if(parentCanvas){
        processor = 'blue';
       imageProcess(parentCanvas,parentContext);
 
Oh my
 
@BenjaminGruenbaum pretty
 
3:58 PM
@argentum47 you should not have that many selectors, or nest selector - pass elements to functions. Remember that the dom is global state after all
 
you see, I had no-one to watch-over me to tell me what is right and wrong. You gotta help me.
ok
 
You should really look into loops and bracket notation
This code reminds me why I hate Java
 
oh, ok. So I can cut the number of lines of code
 
To like... a tenth
Which menas less code duplication
Which means less places to change the code when the requirements change
Which means less bugs and less errors.
 
4:01 PM
Don't underestimate not having to write code, code that doesn't exist doesn't have bugs
 
@argentum47 You can create multiple workers and distribute work on a single image on them
 
since the announcement of angular 2.0, many people seem to come out and say it sucks...
 
@copy he already does that, doesn't he?
 
Oh, right
 
@FlorianMargaine they did bad PR, Angular 2 is very early on and it's not even fully specified yet - it's slated to release in over a year
 
4:03 PM
yup, still means it's completely incompatible with angular 1 though
 
@copy yes I did that. but the problem with it is for images like 1024x600, some parts are rendered first some are done later. and with some small images I have one or two streaks of colored lines of the original colored image.
 
I answered a question on that IIRC
 
Hello guys!
I have this regex to select a link. I am doing really simply not complicated links. So, here is my regex.
(https?:\/\/\S+)
It select links like this http://example.com/link-bla-bla<br />
I want to remove html `<br />` tag from the selection. Can anyone please tell me how? Thanks in advance.
 
tl;dr; don't write code that relies on a framework - that's a stupid thing to do
1
Q: What can I start doing today to prepare for Angular 2.0?

JMKI'm pretty excited about Angular 2.0, but also recognize that a lot of the stuff I learned for Angular 1.x will be rendered obsolete. Waiting another year to start learning 2.0, when 1.x will be unsupported shortly after it's release leaves me uneasy, so what can I do today to ease the learning ...

 
@BenjaminGruenbaum :)
 
4:05 PM
@mwaseema don't parse HTML with regex - you want to select all a links in the page?
 
yeah I want to link people to blog.ircmaxell.com/2012/07/framework-fixation-anti-pattern.html all over the reddit threads :D
 
what should I be actually correcting in tools.js
 
I'm interested to know what you think about the pattern in that question btw @FlorianMargaine
 
about to read it
 
Pattern as I know, in general is a solution to make a complex code easier to read and write and maintain, but that doesnot mean we should use pattern all the time
 
4:08 PM
@argentum47 wat?
 
Err... bad explanation. sorry
 
@BenjaminGruenbaum yes and no... yes, it's how it should be done. No, because every service you use has to be converted too... which means a lot of time (if ever) before you can use your code (not every 3rd party is "well written" and you have no control over it). Also no, because a lot of code is CRUD-like where everything in just using angular's code. You still have to rewrite all this. In theory, it should work. In practice, it will still require a lot of work to convert to 2.0
 
@FlorianMargaine well, up until primitives you should write your code that way. You write your code to use depenceny injection and then write the wiring in Angular, if you move library or framework you have to rewrite only you presentation layer and your wiring - nothing else.
 
yup, that's the theory
 
Converting isn't free - but it's a lot cheaper than if you use Angular's DI as a source of globals which people often do.
 
4:12 PM
in practice, there's all the 3rd party code, all the code written by interns, all the code written by you in the beginning of angular, all the code that sorta-somehow-does that but still isn't perfect, etc etc
and there's still all the code genuinely using angular's code
 
it's ok to use Angular's code as long as you inject it.
I don't see how poor code is relevant here.
 
poor code is real code
 
You can still write 'poor code' in a certain pattern if there's a convention
 
I don't see your point, sorry
 
I don't understand how poor code would affect this - if people write their code this way it'll be portable even if the code itself is bad.
 
4:16 PM
@BenjaminGruenbaum He's saying the problem is other people
 
If they don't - they haven't followed the advice
 
@Zirak how so? As a team you have a relatively uniform coding convention. Even if your style varies the general structure is the same.
 
That no matter how good you are, your project still relies on other people's work, which is broken, which makes porting difficult
 
@Zirak how is it broken though?
Even if they write horrible code - if you inject their functionality you're only relying on their functionality and not their code and you're doing it explicitly
 
4:17 PM
@BenjaminGruenbaum in theory, yes, following your pattern should make the porting easier. There will still be the porting of angular's code (directives, controllers, etc), but it should be doable.
 
I dunno, I don't agree, was just trying to explain @FlorianMargaine's viewpoint (did I get it right?)
 
@Zirak yep
although "doable"...
depends on the budget.
 
@FlorianMargaine oh of course, this wouldn't help at all with controllers/directives etc. You'd have to rewrite all that.
 
but that's another matter
 
Well, you could make that modular too - but those bits are usually smaller.
 
4:19 PM
what I'm saying is that in real life, the code already written today won't be written following your pattern. Upgrading to 1.3 shouldn't be too much a mess, upgrading to 2.0 will be a big one, and probably never done.
following your pattern, you could just replace angular with anything else tbh
 
That's the point
> Where you get $http and $q from Angular via dependency injection. However now your API can easily be used in Ember passing RSVP promises instead of $q for example, or with Backbone passing $.get instead of $http.get, or with React.
You're not tied to a specific framework.
 
yup, that's how code should be written :)
 
You get all the benefits of Angular, but you can swap things out :)
 
I don't disagree on this point, quite the opposite
I'm just saying it's not realistic
but that may be because I've never seen a single big corporate project respecting best practices mostly everywhere
 
Why? If you have code that talks to your API it's only reasonable to not tie it to a framework - it's very likely you'll want to write a widget in the future or another site using it or you might want to open source it and let other people access your API.
It's quite simple to do too
@FlorianMargaine linux is pretty consistent
 
4:23 PM
@BenjaminGruenbaum note "corporate"
 
Linus is backed and coded by corporations so there's that.
 
PHP too, although it has its own quirks, it's a well written project. Same for Drupal.
 
Chrome is pretty consistent, it's not great but they take their conventions pretty seriously.
@FlorianMargaine what?
 
@BenjaminGruenbaum yep.
 
Have you seen the thousand lines macros in php? @FlorianMargaine
 
4:24 PM
I have
 
I would not call php well coded.
 
> big corporate project respecting best practices mostly everywhere
 
They want a rewrite, they have an engine that's very hard to work with or extend.
 
note the "mostly"
 
PHP as a project didn't scale well, they're dying to replace the engine but it's too much effort.
 
4:25 PM
most code I've come across of is nice to work with tbh
 
It's not only poorly designed, the modules are very tightly coupled and rely heavily on macros. It's also slow and has lots of buggy parts people don't want to touch.
 
I'm only talking from my minimal experience though
 
Ask the php engine people in the php room.
 
yeah, I talk with them quite regularly. I've also written some PRs for php-src
that said, when I say "big corporate projects", I mean the not open source ones
 
hmm, how could you know what their code looks like then?
 
4:28 PM
because I've worked on them
or have looked at them
 
@FlorianMargaine It'd be interesting to look at the asp.net source, then.
 
Oh, I can't comment then.
 
Go to the very first commit so you'll have a clean(er) slate
 
@Zirak you do realize that the entire microsoft web stack is open source right?
 
Yeppers, that's why I mentioned it, since only "recently" it became open source
 
4:29 PM
You can literally go to their chat right now on Jabbr and talk to them about it and they'll (Microsoft) be glad to indulge you.
 
But as a large project which evolved over time in closed source it'll have the corporate feel, enhanced by how it came from Microsoft.
 
This is the new repo github.com/aspnet/Mvc
@Zirak I told the project lead I think they're not releasing WebForms because they're ashamed of their code, he lol'd
(He said it's because of lawyer stuff)
 
@BenjaminGruenbaum hahaha
 
@BenjaminGruenbaum I've only looked at a couple hundreds of them, you know (having worked in a web agency and doing consulting work), I'm surely not very experienced. But that's been my experience up till now.
couple hundreds may be exxagerated
 
Well, I've seen some horrible code but I've also seen some pretty code - it really depends. Some companies take code seriously and some don't.
 
4:31 PM
let's say couple dozens :)
 
Also, web agencies tend to get work on bad projects to begin with since work was outsourced to begin with by the company.
 
@BenjaminGruenbaum yup, it's only my limited experience.
@BenjaminGruenbaum I can't agree more
 
I wonder if there is any real data on that, it's hard to measure code quality though.
I'm yet to see one meaningful metric.
 
that said, it's still code written that should be upgraded when angular 1.3 will drop support, and it won't be possible to upgrade to 2.0.
@BenjaminGruenbaum yeah, that's definitely an issue
only experience of such and such can talk
my experience has only been bad :P
 
@FlorianMargaine they'll release Angular 2 in 2 years and will support 1.3 two years later. That's 4 years from now Angular 1.3 will be supported. Forever in web years.
 
4:34 PM
the best I've worked with... were small projects
like, <100 man days
 
4 years ago jQuery 1.4 was the bomb.
 
what has a lawyer to do with codes
 
@BenjaminGruenbaum most of code written for jquery 1.4 still works on jquery 3.
 
You wouldn't expect jQuery 1.4 to still be supported now, would you?
@FlorianMargaine I disagree, a lot doesn't - they changed how $.ajax works, how delegation works, how selectors select things and their method signatures several times since 1.4, most significantly in 1.5 and 1.6.
 
@BenjaminGruenbaum no, that's not what I expect
 
4:35 PM
I wouldn't expect jquery to still exist
 
In 4 years I hope Angular would be at best redundant.
 
@BenjaminGruenbaum still, I've done upgrades from 1.4 to 1.8 without much effort
 
I agree that Angular 1.3 looks completely different from 2.0 I think they're kind of day dreaming with 2.0
 
@Zirak :D
 
At best they end up with a Python 2 Python 3 scenario.
 
4:37 PM
"at best"...
 
I'll never forgive them for removing reduce, map etc
 
@Zirak I wouldn't expect the DOM to be still directly worked on in code. Then again - I believe my wish will come true in 2-3 years and it's heading that way with react.
 
@BenjaminGruenbaum and mercury! :P
 
@BenjaminGruenbaum Oh god, let's not talk about the DOM evolution again...
It makes me so sad
 
4:37 PM
@FlorianMargaine you know I have a lot of criticism about Raynos but I think Mercury is pretty nice.
 
I think it is too
it wasn't sarcasm
 
He improved a lot of things I criticized in his earlier attempts.
 
I just hope mercury will get some docs...
 
From 10 minutes of looking at it, Mercury looked a bit more like masturbation.
Just from the number of times he called it "truly modular"...
 
Yeah, he has that problem
 
4:40 PM
masturbation? everyone has that problem
 
"problem"
The problem isn't doing it - it's doing it in public.
He was also very lucky or very smart to join Uber when he did - it grew a lot since.
 
how can a doc be compared to jacking
:D
 
5:01 PM
In delhi, trek begins tomorrow :D, wish me luck.
 
no idea what trek is... but good luck
 
any fedora user here?
@darkyen00 ?
 
@AwalGarg I've used it in the past.
 
5:16 PM
@Zirak how does it compare to ubuntu for dev?
 
@AwalGarg similarly.
 
@AwalGarg It doesn't matter
 
Use Archlinux
 
Once you have a system up and running, you don't notice the OS until you have to do maintenance and such.
 
Fedora is debian based as well, right?
 
5:17 PM
lol
@AwalGarg no, fedora is centos based
 
No, it's the free (as in beer) branch of Red Hat
 
rather... fedora is the base for centos, which itself is a base for red hat
@Zirak nope, centos is the free branch of red hat
 
nice
 
CentOS is the ripped-off version of RHEL
 
it's the opposite :P
well, that's what I know though. I'm 90% certain of that however, so I may be wrong.
 
5:19 PM
so since fedora ain't debian based, I guess the command line commands and usage would be different than ubuntu, right?
 
Hrm? Fedora is a Red Hat project, CentOS started off as an individual project
They joined Red Hat some time ago, but still steer away from RHEL
@AwalGarg No
 
@AwalGarg no, the package manager is different, and some directory conventions are different (e.g. apache conf is in /etc/httpd/ instead of /etc/apache2/), but that's it
 
!!wiki fedora operating system
 
Fedora /fɨˈdɒr.ə/ (formerly Fedora Core) is an operating system based on the Linux kernel, developed by the community-supported Fedora Project and owned by Red Hat. Fedora contains software distributed under a free and open source license and aims to be on the leading edge of such technologies. Linus Torvalds, author of the Linux kernel, uses Fedora on all his computers. == Features == Fedora has a reputation for focusing on innovation, integrating new technologies early on and working closely with upstream Linux communities. Making changes upstream instead of specifically in Fedora ensures that...
 
@Zirak kk
 
5:20 PM
@Zirak my bad then, I was pretty certain red hat was based on centos
 
@FlorianMargaine I don't use the package manager, I use the command line to install packages... (and most other tasks) so that is why I was concerned.
 
> CentOS (abbreviated from Community Enterprise Operating System) is a Linux distribution that attempts to provide a free, enterprise-class, community-supported computing platform which aims to be functionally compatible with its upstream source, Red Hat Enterprise Linux (RHEL).
I stand corrected
@AwalGarg the package manager is what you use on the command line. You won't have apt-get.
You'll have another package manager though
namely, dnf
 
@FlorianMargaine ahh I thought you were talking about the gui desktop app for that. Ok, makes sense now.
 
fedora also has a different philosophy related to sudo
 
@FlorianMargaine dnf? It's yum, which is a wrapper for rpm
 
5:23 PM
it wants you to be in root
@Zirak dnf is replacing yum
it's basically yum but more performant
 
that wiki says fedora uses rpm package management system
 
e.g. it supports parallel downloads
 
Oh neat
 
sounds cool
 
right now yum is still the official one, but dnf is already shipped with fedora. The default one will be dnf in next version
@AwalGarg as opposed to the deb system for debian
 
5:25 PM
fedora 21 eh? The final release cycle is in december so I guess I can procrastinate trying fedora till then.
yeah
 
Try it now, it's not like it'll be a mind-bending difference.
It's (nearly) always good to try new things
 
I would, but I am very much limited on bandwidth (1gig means a lot to me). I would get it next month when my bandwidth quota refreshes
 
that sucks
 
yea my sis has to upgrade to ios8 and I would let her do that
that is as well, about 1 gig... and then those apps would update lol I am outta luck :(
Aug 15 at 16:33, by Awal Garg
http://www.speedtest.net/result/3691554727.png lol...
see that? That is my max speed lol
 
5:41 PM
ouch
I wish my upload were higher
 
may your connection die immediately
 
@Loktar i pay for 100+10 (up to), i get 20+7
fuck marketing
 
Our ISP doubled all of our speeds like 2 months ago
I was paying for 50mbps
now its up to 120 I believe
 
Can't you all go to some remote island and never come back?
 
!!tell AwalGarg ead
 
5:49 PM
@AwalGarg Eat a Dick™
 
@CapricaSix as if you have a dick, foolish bot
!!afk
 
What to do when you don't know where to apply your programming knowledge and feel like you should be working on a project, but that so called project doesn't happen?
 
Create a project? Play games? Read a book? Run around in the rain?
 
You start the project
 
Should I only read programming books with my computer next to me?
 
5:53 PM
No, you should start the project
 
Or it is ok to read it as a normal book!?
 
whatever's ok is ok
 
@copy What project, that's the question haha, dont feel motivated x_x
 
Do Conway's Game of Life
 
@AfonsoMatos You don't have to write code
If you don't have an idea for a project or don't feel motivated, that's okay, do something else.
The computer's not going anywhere, neither is your knowledge.
 
5:56 PM
Do you feel that when reading a programming book is necessary to test the code in the computer right away and knowledge you acquire to actually learn something?
 
3 mins ago, by CSᵠ
whatever's ok is ok
Do whatever works for you. People are different.
 
running around in rain is probably the best idea
@Zirak where did you get that from?
really good one dude
 
My brain?
 
can you ask your brain for another one?
 
Ask yours
 
6:07 PM
I want a local version of jsfiddle running on localstorage with save, list and export to jsfiddle functionality and code auto completion
 
Just use a normal editor like everyone else
 
I don't like to type code -> save -> alt+tab -> f5 -> repeat
 
It's exactly the same as in jsfiddle
Just open editor and browser side by side
 
Haven't we gone through this before? There are tons of auto-update solutions
 
oh wait, fiddle doesn't have live refresh
ok jsbin
 
6:10 PM
Also, both projects are open source. You can run them locally just fine.
It'll just be stupid
 
Sim
6:33 PM
hey guys does anyone know how to unlock iphone?
 
slide, I think
 
Bend, so I heard
 
alert(decodeURIComponent(escape(window.atob("aVBob25lIHVubG9ja2VkIQ=="))));
Run that in your console, it will unlock your iphone ;-)
On completion, it should (probably) show an alert showing a success message.
@Sim ^
 
Sim
lol
 
6:52 PM
so I discovered another great thing about the dev tools \o/
 

« first day (1477 days earlier)      last day (3465 days later) »