« first day (849 days earlier)      last day (4100 days later) » 

12:00 AM
 
What/Who is GoF?
Oh Gang of Four
 
Which is why I'm saying, plenty of thing fall under MVC, it's a concept. I agree that it has evolved much but it's the same concept. You wouldn't say that the decorator pattern changed or that the iterator pattern changed. They got better implementations, iterators are no longer a 'pattern' in that you have to manually implement them most of the times and JS decorators are very straightforward
 
You don't get to rewrite history that easily!
 
But that's ok @tereško , I'm used to you not admitting you were wrong :) I can quote the definition of MVC from the guy who invented it, or the gang of four, or whoever, it won't convince you. Just don't let those facts confuse you.
 
@LittleBobbyTables modern MVC is a pattern which is composed from 2 layers: presentation layer ans model layer. In the presentation layer you have views, controller (when applied in MVC-inspired patterns) templates/layouts. Presentation layer seals with presenting the domain business logic to the user. The model layer is also a complicated structure, where you separate domain logic , storage logic and "application logic" ( the interaction between domain entities and storage abstractions)
What people started call "models" are actually domain objects ( in some literature called model and domain objects) which is the the business rules are implemented within model layer
They "why" they started using the name "models" for this is rising popularity of prototyping framework , know as "ruby on rails" , which by now has clones in almost every language
 
12:05 AM
Domain objects and models are not the same :/ You can use your domain objects as models, doesn't make them the same thing :(
 
yes .. actually more often they are not even domain object
 
DOs are models more so in MVVM than in MVC.
 
instead they are implementation of activerecord pattern
 
A model (in MVC) is anything that notifies a view that it has updated so that the view can react accordingly.
 
@xtal when was the last time you implemented it this way on web ?
 
12:08 AM
I don't, but then I don't call it MVC because that would be wrong.
 
What I was saying is that MVC is a pattern, patterns have very broad meaning, it's the concent behind them (seperation of presentation concerns from business logic) that matters. Many thing can be made to look MVCish.
 
@BenjaminGruenbaum MVVM has nothing to do with domain objects
instead it is governed by fact that you have either blackbox at the views and/or model layer
and you are using viewmodel to translate between them
what asp.net mvc refers to as MVVM is actually Model2 MVC .. they just cannot call it this way because it would confuse the people who started using it when it was a bare-bones Rails clone
 
@tereško Well, You're sick of my book quoting so I'll spare you the definition of domain objects from the Eric Evans book :) I'm not going to argue the difference between MVC Models and DOs (which there clearly is).
 
@BenjaminGruenbaum .. and whay i was saying is that every time you have "models" in your "mvc" you are pusing the domain business logic in the presentation layer, because you start using "controller" to facilitate interaction between so-called "models", which is actually Application logic
and application logic should be part of the model layer
 
Why would I use the controller to facilitate interaction between the models?
Anyway, this is not the point I was trying to make :/ What I meant is that the MVC pattern can be found in many places that are not huge frameworks.
That's all I was claiming, nothing about the merits of DOs, nothing about the difference between classic MVC and web MVC, just referring to it as a (pretty broad) design pattern.
 
12:17 AM
please stop confusing "separation of concerns" with MVC design pattern
 
MVC design pattern enforces a form of separation of concerns, I'm not confusing anything.
Anyway, I got to go to sleep, so feel free to argue just be sure to ping me so I'll see it when I log into the chat tomorrow :) Good night
 
12:37 AM
@LittleBobbyTables, just because you can write bad code in a language, doesn't make it a bad language.
@LittleBobbyTables, what would be wrong with something like this?
 
!!/live
@Zirak there is an issue with my work internet connection lately. ISP is having issues and we're getting network drops - I need to write a cron to physically reload the page after a network connection error.
 
!!/echo hello
 
1:06 AM
LOL
 
1:23 AM
I wonder why green paprika tastes so shitty compared to red paprika
 
I wonder why there are so many names for paprika
 
2:05 AM
@OctavianDamiean yea, obviously console.log is better, but to test something really simple like that, I tend to opt for the lazy way.
 
2:25 AM
Doing a project for the JS1K challenge. I want to store some "data" that then gets interpreted into creating an array that is used to draw sprites via canvas. I'm going through that trouble because storing it directly in the script would cost me all the space. Can't I store several values in one Unicode character by using bits ?
 
They count bytes, not characters
 
2
Q: Can I disable only double-tap zoom and not pinch zoom?

DoorknobI am making a game in Javascript, therefore it can be played on a computer or a mobile web browser. It is perfect on the computer, but it requires a lot of clicking. When I use a mobile web browser, this is sometimes interpreted as a double-tap and keeps zooming, which I don't want. I know how ...

^ Anyone have any ideas?
 
@copy Yes. What I mean is, if I can store 16 values inside 1 character, instead of 16 characters, then that would save a lot of bites
y*
 
Probably not more than it would cost to put them in and get them out, unless it's just binary data
And even then, why not just store it as Hex or something
 
That depends a lot on the data
 
2:33 AM
0
Q: Redirect to current user page upon link click

WesI hope this problem does not have too complicated of a solution. I also hope it isn't too easy so I don't feel like a fool for not figuring it out :) On my website, (Wordpress), I have Peter's redirect plugin that redirects users after login to their specified personal page (not profile.php). Th...

 
@phenomnomnominal A hex grid? woulndt that just be a 2d array? Array of a string with 200 characters almost goes over the 1k
 
But yeah, it would make sense for sprites
 
String seems to take more memory then a number
 
Well that makes sense?
 
2:39 AM
for(s="long string",i=12354;i--;fillSomeArrayWith(s.charCodeAt(i)));
 
I am using bootstarp image gallery
and need a little help
not bbig enough to be posted as a question
 
For smaller portions, use numbers, yeah. But you can only store 53 bits, or 32 if you use bitwise operations
 
my console returns me the error Uncaught TypeError: Cannot read property 'defaults' of undefined
 
maybe you're trying to read the property "defaults" on an undefined value
 
this is how the image looks.
@Doorknob sorry I didnt get what u meant
 
2:42 AM
Like var a; alert(a.defaults);
which gives the same exact error message
 
ohk but this error is shown in bootstrap-image-gallery.min.vjs
so how can I debug it?
 
@Shagun, do you use Chrome?
 
yes
 
Go into Developers Tools, and go to the Sources tab
 
Nobody has any ideas for disabling only double-tap zoom and not pinch? :/
 
2:44 AM
@copy @phenomnomnominal Hm.. I guess I could do some advanced stuff by using a string, like A(65) So when A comes up, fill the next 65 fields with a color... Checking out numbers now.
 
@phenomnomnominal what next?
 
the numbers might be smaller though heh
 
See the little Hexagon with the pause sign on it?
Click that til it goes purple
Then run your code again
 
it was purple originaaly
 
with the sources tab still open
Well then run your code again
and it should stop at the error
and then you can see what is undefined
and then you can go back up the call stack to see what the error is
 
2:46 AM
ohh awsum
thank u :)
error fixed but still the image is cuming only half its width
no console errors this time
 
please closevote this question (mine) as a duplicate, I realized there was a duplicate :P
 
 
1 hour later…
3:57 AM
can't set inputButtonNode.type in IE??
 
4:33 AM
Hi Guys
may I ask u a question?
I'm working with drawing things on HTML5 canvas but having trouble with transitioning.
I want a.scale to scale just the bezierCurveTo() part
but it also affects the shape 2 (circle) as well. What is happening here?
anyone can help me ? XD
=( =) =3
I also tried to a.scale(1,1) <- resetting scale
but did not work.
 
5:05 AM
I just failed at being a programmer
The person I was hired by knew more than me
 
I was hired to do some php and I couldn't do it
Not that I had the skill to do it anyway
 
what kind of php work was it?
 
Remember me login
He gave me 30 minutes to do it . Is that the normal time to do something like that ?
Well He gave me more time than that but It took me like 25 minutes to use ftp
 
yeah i think so
 
5:13 AM
@noob1992 what is remember me login ?
 
When someone logs in and the computer remembers the login.
Keep me signed in
awesomescreenshot.com/0a7wv4dda I kept on getting this error he said
 
@noob1992 that is simple if there is security issue ... also if one have good typing speed
 
I don't know who to feel more sorry for me or him
 
 
@noob1992 sorry but header already sent error ... that is wearied ..
 
5:17 AM
He seemed reasonable that I couldn't complete the job. just said he understood and yeah
idk
I think I'm getting sent to a clinic anyways
 
Dude, you need to actually get some skills before trying to make money...
 
@noob1992 ohh :( try again .... after with more php work ....
 
It doesn't matter
 
@noob1992 also learning only php is not make any one good programming
@noob1992 what ?
 
No I quit
 
5:20 AM
@noob1992 did you output anything before header ?
 
@andrewjackson There's no such thing as element.type
Perhaps you thought of element.nodeType
 
no
 
@noob1992 or did your query failed ?
 
It wasn't php's fault it was mine
lol
 
@Zirak even for an input element?
 
5:21 AM
durr
Oh yeah, I recall some IE bug
 
@noob1992 ohhoooo :P:P
 
I'm gonna go back and work on my site. If I can even do it
 
I thought it was quircks, so I put on transitional dtd, and now IE freezes everytime I try to get developer tools, even when it's not on my page.
I'm on Chrome right now staring at an IE menu
Because it froze on the screen
I never knew a browser could suck so bad, and it all started from that one JS bug.
That + debugging
 
do they use ftp to share source code? @noob1992
 
@noob1992 if the do simple trick always get ready with your class .. and just use them .. and it will take only few minutes
 
5:57 AM
I really want to make something like this, thetutlage.com/demo/portfolio
See: the menu when scrolling...
The active states change.
How could I do this with vanilla JavaScript?
I've tried various things but I cannot think of the math. I know I can calculate it using offsets and stuff.
 
Look at the source
 
I am but it is in jQuery >_<
JavaScript doesn't have a forEach function that is supported by a wide-array of browsers. Neither do I understand jQuery or want to.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
function goToByScroll(id){
$('html,body').animate({scrollTop: $("#"+id).offset().top},'slow');
}

$('#menu li').click(function(){
var getDiv = $(this).attr("id");
targetDiv = getDiv.split('_');
goToByScroll(targetDiv[1]);
return false;
});

$(document).scroll(function() {
var $this = $(this),
scrollTop = $this.scrollTop(),
sections = $(this).find('.outer_blocks'),
 
okay, so shim it yourself
 
There is the source. I can see that document.scroll is related to window.onscroll.
I don't understand what attr(); method is.
 
forEach is in everything except ie<8
Then look it up in the jQuery docs and rewrite it
 
6:07 AM
>_< meh. I'll figure it out. jQuery really bugs me. forEach wasn't supported in Chrome when I tested it earlier.
 
bullshit
 
This was my code
 
var elements = document.getElementByClassName("span");

function getSpanHeight(obj, ind, arr) { console.log(ind); }

elements.forEach(getSpanHeight);
Maybe I typed it wrong but it said that forEach was not a method.
 
getElementsByClassName returns a NodeList I'm pretty sure
forEach has been in Chrome since at least v5
 
6:11 AM
yes, it returns a NodeList, so wait, yup I see it, its supported. jQuery forEach can operate on NodeLists as it seems.
 
But even then, you can use Array.prototype.forEach.call(nodeList, someFunction)
 
Oh, You got to call it through the prototype. That is why it wasn't working.
 
In that case yes
if nodeList was an Array you could do nodeList.forEach
 
Okay now I see. Now maybe I can skim through the rest of this code and figure out how exactly it works.
 
Good luck
 
6:15 AM
Thanks for the help.
 
6:45 AM
@FlorianMargaine do u evn HIGGS BOSON ?
 
7:10 AM
hey guys
how r u today?
 
8:04 AM
r u dead?
 
not yet
not yet fully awake either
 
8:29 AM
Is there a google+ developer around ?
 
Noone's really here but ask anyways
 
guys can someone look my qustion on "stack" its already answered but i dont really like the solution that is givven
 
show us
err... show me
 
8:44 AM
nwm
sorry for that got it already)
 
Ok, thanks :)
Anyone having problems with google hangout in developers sandbox mode ?
 
9:05 AM
anyone gud at canvas?
 
Sure
 
one sec, let me organise my question
have a look at this
so basically my question is
the first shape has scale transformation applied on it
and the other one doesn't have it applied
i want to move the first shape y + something
but for example if i move y + 300 for the scaled shape
it doesn't actually move it 300? but scaled one moves it exactly y += 300?
i mean non-scaled shape
move exactly y += 300
how would u make sure that scaled shape move y += 300 same as the non-scaled one?
 
The point is, you aren't moving the shape. You are moving the pen for that shape. The pen should be scaled.
 
what is "pen" that you are talking about? the context from canvas object?
 
I mean the point that is the starting point for the next line within that context.
Otherwise, the scale would have no effect
 
9:18 AM
how can I reference the pen so I can move it?
translate()?
 
Looks good
 
o/
 
sick
that did the trick
=3
 
9:59 AM
So much controversy...
1
Q: Difference between creating Jquery plugins with $fn and without it

Alex OpentI'm looking on some Jquery plugins,and I want to build my own. In all tutorials I see syntax like this: (function($) { $.fn.myPlugIN = function() { // Add plugin code here }; })(jQuery); But when I look at the code of few popular plugins like iScroll.js, Carousel,js I see the dont use ...

And most comments of the second answer have been removed (I don't know if they've been removed by a mod or their author)
 
@rlemon That really happens, doesn't it?
 
My customer sends me an error log of my java program. First line of the log :
> java.version=1.4.2_19
Java 1.4 is the only one authorized in their company....
 
dramatic gasp
 
10:14 AM
what? how old is that version?
 
2002
 
haha, what the hell?
 
tell them about all the fine security flaws
 
I told them
 
10:15 AM
let me take a guess, they don't care?
gotta love lazy it-departments
 
But it's one of the biggest companies in the world... The people I speak with can't change things easily. And probably no one can, by the look of it...
At the old time of Java 1.02, I was the guy introducing Java in this company... I leaved them 10 years ago and I guess they didn't bother making watchfulness since...
 
@dystroy Well done. You have what we call Pandora's box.
 
good evening!
 
I had WTF meetings at that time, with in front of me the IT department chief explaining me VB was good enough for anything and that parallelism was useless as a computer can do only one thing at a time... Even the non IT guys around the table could see how bad he was... And java won agains VB
 
anyone feel like chatting about async.js vs deferred/promises?
so i guess not (-;
 
10:23 AM
I love promises, but I don't know async.js
 
never touched async.js
 
waterfall, that sounds like an interesting function.
 
basically i had been playing with jQuery and deferreds quite a bit a few months ago
and then more recently i began playing around with node.js
 
I had to touch that area as well some time ago.
 
i decided to test node by writing a commandline tool in it that did lots of things asynchronously
 
10:27 AM
Promises have the full expressive power of data-driven programming.
 
@hippietrail Did you use commander for that?
 
but i found myself in a bit of callback hell when using two nested async.js loops and it struck me as being a very different paradigm to jQuery's deferred's
@OctavianDamiean: yes i'm using commander for command line parsing
if i grok the situation node.js uses explicit continuation passing which leads to highly coupled code
 
@hippietrail Well not if you make use of events, kinda.
 
jQuery used callback passing before it had promises. It was strictly less good.
 
I mean it doesn't completely solve the situation but it helps.
 
10:30 AM
whereas deferreds let you decouple your code, and i guess it's implemented internally with some kind of message passing?
i did have trouble getting my head around deferreds and had to ask a few questions on SO - when they worked i really liked them - i think i miss them in node.js/async.js
 
Have you tried getting around those with Node's EventEmitter?
I mean it is really helpful.
 
Promises work by tracking the promise state inside the promise. The promise author can resolve the promise at any time, at which point all registered handlers are executed, and the state is remembered.
 
actually i never got into events in js at all - just the odd onclick handler type thing
 
@Zirak OH! Absolutely did not see that coming
@SomeKittens No problem!
 
@hippietrail You should take a look.
 
10:34 AM
i guess i could use deferred's to reinvent a few async looping and iterating wheels
 
!!s/wheels/hells
 
thanks @OctavianDamiean got a couple of tabs open to read about EventEmitter
i love how node makes the reactor pattern the basic concept instead of being tacked on like POE is for Perl
but it's making me think they should've also included decoupling at the basic level too because you end up dealing with the blocking problem but confronting the callback spaghetti problem instead
 
@AmaanCheval This one is very very old, isn't it ?
 
10:42 AM
I don't know. Simon Sarris posted it recently
I hadn't seen it before
 
@hippietrail Much cleaner isn't it?
 
@OctavianDamiean: I'm a very slow reader (-;
 
You guys can probably tell I'm not being very productive right now.
I lost the game
 
why answer isn't absolute :S
 
The answer is absolute
You clicked relative
I don't get it, though
 
10:51 AM
I don't get it either :/
 
hey boys 'n girls, did you play the game already today ? Wonderful day isn't it
 
2 mins ago, by Amaan Cheval
I lost the game
I lose the game the second you enter the room.
 
oh damn :P you're sealed
I lost the game so many times over the weekend, it was ridiculous
 
@OctavianDamiean: hmm actually this reminds me more of POE, though i only ever did one project with POE (an IRC chatbot)
 
@jAndy do you know what did I lose?
 
10:52 AM
@JanDvorak Your arm?
Your leg?
An eye?
 
huh ? :p
 
@AmaanCheval no
 
I even got trolled by my music device, which for some reason, just displayed Game
 
oh oh, I know!
That baby you caught for supper?
 
anyone here think TypeScript or Google Dart will see any adoption?
 
10:54 AM
No. I don't eat living things (not even yoghurt)
 
@hippietrail I don't know about POE, if it's a Perl thing, that might explain why I don't know about it. I tend to make a huge step around anything Perl.
 
@hippietrail what about coffescript?
 
i think it's clear that coffeescript does have fans - though i've never played with it
 
@JanDvorak Yeah, my Yoghurt died gruesomely
Kidding. I know what you meant
 
Gosh, they screwed up Canary in the last update ...
 
10:56 AM
I LOVE COFFEESCRIPT
 
yeah POE is Perl's reactor. all my old scripting stuff was in Perl and Perl has the best Unicode support, which is very important to me
 
@OctavianDamiean they did?
 
I've never tried any of these. The only thing I don't like about Javascript is how many characters function() has
 
@hippietrail The best Unicode support? What do you mean?
 
10:57 AM
the thing i like about javascript is i only need any computer and any text editor - don't need to be online, doesn't need to be my computer
 
@GNi33 Yea, can't type an at symbol, the browser windows is fubar'd right after start and other things.
 
@hippietrail of course, coding on a T9 keyboard is hard.
 
hm, mine is up to date and i got less problems than last week
 
there's a comparison table somewhere. basically perl has just about everything implemented in unicode. all the regex stuff. all the character classes and properties like what's a letter or punctuation or uppercase / lowercase / titlecase, script codes, CLDR for collation
Perl has a problem with implicit conversions and that combined with the fact that strings can have various encodings internally can lead to getting unicode strings to work being a real pain
 

« first day (849 days earlier)      last day (4100 days later) »