« first day (444 days earlier)      last day (3344 days later) » 

6:00 PM
with the stylesheet specifically
 
nothing, I fixed it
 
pft
 
issue is with page back button -> deals with push/pop
 
user652649
 
user652649
just replace the page-pop.js file
 
user652649
6:02 PM
it surely has problems xD but try it out
 
seems to have the same exact issue, haha nevermind, was on wrong testing env
 
user652649
1 sec, checkin'
 
user652649
no, it doesn't work at all lol @ZachSaucier
 
ya, seems to just load the pages
I would think this is actually simpler than we're making it xD
 
user652649
update the live site
 
user652649
6:05 PM
so i can test
 
done
 
user652649
@ZachSaucier it is simple indeed, just i can't write code without testing it
 
user652649
change line 83 with
WebTools.requestURL("GET", URL, null, onSuccess, onFail);
 
user652649
me #fail
 
so what is the ACTUAL problem
I'm going to learn the historyAPI in 15 minutes so I can finally help yo ass ;)
 
user652649
6:07 PM
@rlemon shut up, i'm doing this xD
 
@rlemon the old page fails to load when we click the back button
 
okay, going to nuke my coffee and take a pee and i'll figure it out :P
 
user652649
listen, i'm going to feel offended in 3.... 2.... 1....
 
user652649
xD
 
@rlemon gives us an error of "Uncaught NotFoundError: Failed to execute 'appendChild' on 'Node': The new child element is null." in my case
 
user652649
6:08 PM
@ZachSaucier update that line and the js file on the site
 
done
 
user652649
@ZachSaucier line 49 replace the function
 
user652649
ZachSite.prototype.registerLink = function(elmAnchor){
	if(!elmAnchor instanceof HTMLAnchorElement)
		throw new TypeError("Only HTMLAnchorElements");

	elmAnchor.addEventListener("click", function(ev){
		if(this.host == location.host && (this.pathname != location.pathname || this.search != location.search)){
			ev.preventDefault();
			history.pushState({zachSiteURLRequest: true}, this.textContent, this.href);
		}
	});
};
 
Hello, anyone using web forms or mvc code expressions over client side template engine, please help me understand the pro and cons of doing this: stackoverflow.com/questions/24831102/…
 
@ObiWanWesabi done
 
user652649
6:10 PM
updated on live site?
 
ya
error gone
 
user652649
line 43: if(ev.state && ev.state.zachSiteURLRequest){
 
done
 
user652649
do i need to test it using SERVICES right?
 
or work
 
user652649
6:15 PM
add some console logs, like:
 
user652649
ZachSite.prototype.loadSitePage = function(URL)
{
	var THIS = this;
	console.log("asked to load URL " + URL);

	var onSuccess = function(responseData)
	{
		console.log(responseData);
 
done
doesn't seem to be reached
 
user652649
line 54 replace with if(this.host == location.host){
 
user652649
for now
 
k, doesn't seem to help
 
user652649
6:18 PM
indeed, try
elmAnchor.addEventListener("click", function(ev){
console.log(this);
 
user652649
told you i'm rusty :\
 
user652649
lol, well, get rid of if(this.host == location.host)
 
user652649
it must be it
 
user652649
elmAnchor.addEventListener("click", function(ev){
		console.log(this);
		ev.preventDefault();
		history.pushState({zachSiteURLRequest: true}, this.textContent, this.href);
	});
 
6:21 PM
@ZachSaucier still throwing this?
 
user652649
no @rlemon
 
@rlemon with my code yes, not with Wes'
 
what line?
 
@ObiWanWesabi done
document.head.appendChild(doc.getElementById("keep")); only when back is pressed
(also for document.body.replaceChild(doc.getElementById("content"), content); which is the next line)
 
user652649
@ZachSaucier
 
user652649
6:23 PM
add the console.log(ev);
 
I don't see that code on the page
is that in pop-state.js?
page-pop
w/e
 
@rlemon no, we're using Wes' at the moment
 
user652649
@rlemon stfu.
 
user652649
@ZachSaucier focus here
 
ahh, I should have noticed the lack of well formatted JS ;)
 
user652649
6:24 PM
are you saying that my js isn't formatted?
 
not well
 
@ObiWanWesabi I think I added it in the right place
 
and @ObiWanWesabi var THIS = this; :(
 
@rlemon it's mostly broken from copy - paste stuff
 
no it is his style. :P
don't let {} scare you, they don't bite. you can include them
and var onSuccess = function(responseData){}.bind(this)
for this application it is fine as there is no real performance hit
if @ObiWanWesabi doesn't want me to help you, I'll just pick apart his code instead ;)
 
6:27 PM
@rlemon My code that was working for the forward but breaking when pressed back jsfiddle.net/3n2SY
 
user652649
ok i give up @rlemon
 
:P
 
want me to put mine back on live? @rlemon
 
user652649
it's just that i didn't test the code
 
don't give up. just take my suggestions about your js :P
 
user652649
6:27 PM
i need a local copy of the site
 
@ObiWanWesabi I believe you
@ObiWanWesabi I can send it to you xD
 
user652649
yeah set up a zip
 
@ZachSaucier it would be nice to see the error, but wes is getting angry. :P
look at that face. srs eyes.
 
user652649
haha
 
user652649
@rlemon there is no error atm, but the popstate event doesn't get called
 
6:29 PM
@rlemon k, it's up
@ObiWanWesabi shouldn't popstate only be called on the back button?
 
@ObiWanWesabi but seriously. if you are to be writing JS. include {} :P for everyones sake
 
user652649
@ZachSaucier did you revert back to your old js? :|
 
@ObiWanWesabi Have an email I can send it to?
 
user652649
@rlemon you mean if(){} ?
 
@ObiWanWesabi yes, rlemon asked me to :P I still have yours
 
6:31 PM
@ObiWanWesabi yes
 
sent
 
if( condition )
  statement;
else
  statement;

^ - i've cried over less.
 
user652649
i like that
 
the JS community as a large does not
 
user652649
i hate wasted lines of code
 
6:32 PM
readability > any other argument you have for this :P
 
user652649
shorter code == readability
 
user652649
it's subjective
 
no it isn't
 
that's also the cause of the Apple security issue
was something like this
 
user652649
yes it is @rlemon
 
user652649
6:32 PM
i'm not telling you to not use {}
 
It is subjective, usually
 
okay, then rather we work in a community - and the community is a majority rule.
 
user652649
i'm saying that it's subjective
 
if(condition)
    deathFunction;
    deathFunction;
 
and the majority rules against you
 
6:33 PM
But it's hard to agree with your view
 
do whatever you want man :P but if I were handed your project my first step would be to write a macro to fix your code :P
because the majority of js devs agree that readability does not mean less lines of code
 
It explains why Wes is fond of using bitwise operators too, I guess?
 
Just spent like 30 min debugging why I had this problem. The parameters were in the incorrect order... (not the push/pop error)
 
~~() is no where near as readable as Math.floor()
@ZachSaucier lol how many times have I harped you on that already?
 
6:35 PM
@rlemon nono, completely different page
 
the #1 issue with the DOM APIs are they are not consistent
 
what I was working on while Wes was helping
 
what works for one, doesn't always work for the other
 
custom function
 
ahh, well then.
 
6:36 PM
Even worse :p
 
^
:P
I have issues with plurals.
often mix up foo/foos type of stuff
 
function scaleMe(elem, scaleX, scaleY, newOffsetX, newOffsetY, originX, originY) {
^^ I wrongly assumed the origins could be switched because they can be in CSS
 
eww
 
7 arguments? use an object man!
then order doesn't mean shit
 
6:38 PM
I wrote it before I knew how to use objects in js
 
@rlemon Wow, way to go man. You're objectifying things
 
function scaleMe(elm, props) {

}
 
user652649
@SomeGuy i'm feeling offended
 
@ObiWanWesabi Very little offence intended :P
 
@SomeGuy I'm allowed to objectify things, just not people .. kinda the definition I think.
 
6:39 PM
@rlemon You're welcome to turn my code into object form if you want to :D
 
:P
 
But yeah, I agree with rlemon. Use an object
 
If it works I move on and it works xD
 
More than 4-5 arguments means you probably want to use an object instead
 
feel free to do it for me if you'd like
 
6:39 PM
@ZachSaucier but you should be looking to improve
 
But I have improved
If I wrote something similar now I'd make it objects
 
3 years ago I would have been like "fuck braces, fuck good style, fuck you guys. my code works. moving on"
 
but I don't want to go back and rewrite it TBH
 
now i've realized I was wrong :(
 
jsfiddle.net/3n2SY/1 Feel free to improve it for me :)
 
6:41 PM
Why would we bother?
 
because you are kind and bored? :D
 
have you met me?!
 
hahaha, touche
 
I'm like the anti-canadian, I hate you all :P
but not really
 
@rlemon You fix my push/pop issue yet? :P
 
6:42 PM
no wes told me to stfu
so I stopped
 
he wants to tackle this problem :P
I'll take another look later and maybe write a small lib to handle it
 
What's the problem?
 
when he moves back (back button) in the history the old page never loads
 
zachsaucier.com/testing ^^ but it's because of push/pop state I'm using
 
6:43 PM
Ah
I see it
 
user652649
<div id="content">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="chart" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="-8.7 183 728.7 392.3" enable-background="new -8.7 183 728.7 392.3" xml:space="preserve">
 
user652649
why do you have svg like that @ZachSaucier ?
 
@ObiWanWesabi generated in Illustrator
 
Probably exported from somewhere
 
user652649
that's not valid html, so it fails
 
6:45 PM
I made the basics in Illustrator and the details manipulating it
 
user652649
@SomeGuy @rlemon not because js community not uses it means that is wrong
 
@ObiWanWesabi ? Works for me
 
@ObiWanWesabi I didn't say it was wrong
 
user652649
bitmasks and bitwise operators are used and they still are very since the beginning of times
 
@ObiWanWesabi lol okaay
 
6:45 PM
I was talking about a predisposition to liking shorter code
As I said, I believe it is subjective
But I do not like it
 
I disagree. if you ever worked with me I'd make you change it :P and I feel A LOT of other js devs would as well
 
If it was bitwise, I'd probably ask him to change it
If it was the if conditions, I'd probably change it myself
 
@SomeGuy if it was on a single line, okay, throughout a larger program, make them change it
 
user652649
i disagree with you both. it can't happen that i work with you in the first place xD
 
That's probably a good thing :p
Collaborating with other people is hard, though
 
6:48 PM
languages have style guides. you can go against every 'adopted' style guide if you want. but your argument "it isn't invalid so it is okay. it is all subjective" fails when the community of standards writers tell you it is wrong to write the code that way
I can hammer in a screw, but it is wrong, a screwdriver is right.
just like people who think relying on ASI isn't wrong. ASI by definition is fixing your wrong code... it is wrong! just because it works doesn't mean anything at that point in the argument :P
 
Oh, @rlemon, have your seen the comma-first style?
It's kind of convincing
 
it is.. but it is so ugly.
 
(If you declare multiple variables with one var)
 
personally I agree it is better, but it is one I cannot get behind myself.
 
I'm not going to adopt it
 
But it makes more sense now, at least
 
^ I find this is a great style guide for JS
 
Yeah, I like it
 
Hi everybody can I give Bootstrap sass question
 
@VeeeneX yes, read the room description
 
6:58 PM
How can I change box shadows in _bootstrap settings
 
user652649
@ZachSaucier pastebin.com/ii1YHdNg there
 
user652649
but try to do something for indentation @ZachSaucier use tabs OR spaces, not both
 
@ObiWanWesabi ya, I thought I did?
 
user652649
it was mixed :P
 
@ZachSaucier I tried google and searching in settings too
 
user652649
7:00 PM
but i fixed it now
 
@ObiWanWesabi Nice! It seems to be working quite lovely
just have to make a couple site-specific changes
mind going through and explaining what it's doing?
we could get on google chat or teamspeak or something if you'd like
 
user652649
firstly you were right, popstate is called only when you hit the back button
 
or text is fine
 
user652649
so you need to call it manually the first time
 
user652649
this behaves differently from what i remember, i think because of the hashchange event (which is similar)
 
m59
7:03 PM
Me VS MYSQL
 
user652649
ah btw change this history.pushState(null, this.textContent, this.href);
 
m59
@ObiWanWesabi can I plz help vamp u sir.
 
user652649
lol @m59
 
@m59 I've already been doing that the past couple of hours xD
 
user652649
today i tried to help people
 
user652649
7:04 PM
and i got constantly humiliated
 
m59
I'm stuck on the same problem for like 2 weeks and I can't put it off any longer
 
@ObiWanWesabi and they were very thankful
 
user652649
as usual :D
 
wasn't me!
 
m59
I started beating up my couch a few minutes ago.
 
7:05 PM
haha
 
m59
Learning to fish: I just don't understand joins. They're some kind of unstable magic.
 
@VeeeneX I don't understand your question. You find the defaults and change them. If there are no defaults you add rules for it...
 
@ZachSaucier Ok, thank you
 
user652649
@m59 check the wikipedia page about joins, it's very simple and clear (which is rare for a wikipedia page about programming)
 
@ObiWanWesabi where did you learn this type of stuff? Reading docs?
 
m59
7:12 PM
@ObiWanWesabi I'm pretty sure I'm dumb.
 
user652649
7:35 PM
@ZachSaucier you mean history api?
 
XHR mostly
 
user652649
i don't know xhr much actually, as @rlemon pointed out xD
 
ha, you are fine.
I'm over critical with people I regard
if you were anyone else I wouldn't care. :P
> "I'm hard on you because I love you"
2
 
@rlemon read that one before. Hard to stay focused
 
and I also read a lot of other peoples code
libraries like jQuery and Zepto are nice to pick up concepts from
just don't pick up their bad habits :P
 
7:41 PM
@ObiWanWesabi Thanks again for helping. Trying to figure out what my old code was missing now
 
user652649
@ZachSaucier yw, but i'd suggest to start from mine and improve it
 
I am, just trying to figure out what the missing piece was at the same time
 
user652649
@rlemon lies
 
@ObiWanWesabi rlemon is afk: the slides! the slides are attacking! they are seeking revenge! SAVE ME SUPERMAN!
 
m59
@ObiWanWesabi SELECT * from foos JOIN bars on foos.id=bars.foo_id
I only need 1 record from bar, though
 
user652649
7:51 PM
@m59
INNER JOIN joins two rows into one using a common ID (there is no LEFT or RIGHT INNER JOIN, since it's always 1:1)
LEFT OUTER JOIN takes the "left operand table" as a base result set and tries to join it with the "right operand table".
if table on the left references an id that is not found in the table on the right all values will be set to NULL
RIGHT OUTER JOIN, same thing of the above but inverted

these two queries are equivalent:
SELECT * FROM a LEFT OUTER JOIN   b ON a.pid = b.id
SELECT * FROM b RIGHT OUTER JOIN  a ON b.id   = a.pid
 
user652649
the difference is that if you have a b.somecolumn and a.somecolumn, two columns in two different tables with the same name
a LEFT OUTER JOIN b a.somecolumn will be overwritten by b.somecolumn
b RIGHT OUTER JOIN a b.somecolumn will be overwritten by a.somecolumn
 
user652649
most of times you need only LEFT OUTER JOIN, but sometimes it happens to have operands inverted
 
m59
so, what you're trying to say is that I need to hire you to do my database work. Got it.
 
user652649
SELECT * from foos JOIN bars on foos.id = bars.foo_id WHERE bars.id = 10
 
m59
oh doh.
I think it's more complicated than that.
well yeah, because that's going to limit all of it
 
user652649
7:59 PM
SELECT *, bars.id = 10 AS makeItFirst FROM foos JOIN bars on foos.id = bars.foo_id ORDER BY makeItFirst DESC
 
m59
but I don't need bars.id
It's all rows in the first table and the newest related record from the other table.
I can do that just fine if I'm only getting 1 row at a time from the first table
 
user652649
more details pls
 
m59
@ObiWanWesabi

      [
        "SELECT * FROM bars",
        "JOIN foos ON foos.bar_id=bars.id",

        //select this bar by id
        "WHERE bar.id=?"

        // only most recent
        "ORDER BY foos.time_submitted DESC",
        "LIMIT 1"
      ].join(' ');
That works when I'm dealing with only 1 foo record and its most recent bar record
 
I'm fooling around with some 3d CSS effects codepen.io/web-tiki/pen/dgHsD any idea how I could improve it?
 
m59
But I want all the foo records (and I'll also need limit, offset later) and the most recent bar for each
 
user652649
8:08 PM
SELECT
    *,
    MAX(foos.time_submitted)
FROM
    foos
JOIN
    bars
ON
    foos.id = bars.foo_id
GROUP BY
    foos.id
 
m59
oh hmm..
I think I messed that up
should be bars.time_submitted, I think
 
@web-tiki Improve it how?
as in add stuff? performance? what?
 
m59
yeah, dangit. I'd show you the literal one, but NDA :(
 
user652649
@m59 anyway i'm ko :D got to sleep a bit
 
user652649
check GROUP BY and aggregate function (such as MAX())
 
m59
8:11 PM
ok, thanks for trying!
 
user652649
also TIMESTAMPDIFF
 
user652649
could be useful
 
@ZachSaucier I was thinking about the look and feel
 
@ObiWanWesabi thanks again. Sleep well!
 
I find something is wrong with the reflection
 
user652649
8:12 PM
thanks, talk to you in a few hours :P
 
@web-tiki besides the fact that box-shadow sucks?
 
@ZachSaucier lol
why?
performance?
 
performance terrible, repsonsiveness terrible, etc.
 
true but I was too lazy to go into gradients for this one :shy
 
don't get me wrong, I abuse them, they just suck
 
8:15 PM
perspective origin doesn't seem right either, is there an easy way to see where is actualy is?
 
you could try using rem on it to make it more dynamic (haven't used it myself yet, just heard we could)
 
m59
@ObiWanWesabi SNAP DRAGONS I THINK IT WORKED!!!!
SNAP DRAGON NECK
 
@web-tiki perspective is just a little much (meaning too low)
 
Haha! now I can see where it is codepen.io/web-tiki/pen/dgHsD?editors=110
@ZachSaucier what do you mean by perspective is too low, you think I should use a bigger value or do you mean the perspective origin is too low?
 
A value closer to 1000, as it seems the object does not stay proportional to the buildings
 
8:27 PM
@ZachSaucier you're right, this seems much smoother : codepen.io/web-tiki/pen/dgHsD
 
has some glitches on hover for me now
if you move cursor over/out several times
 
yeah, same here
dunno why
 
you're working the processor pretty good with that demo
might just be due to overworking it
 
box-shadows...
+3d
make my computer steam
 
where are you from?
 
8:32 PM
I'm french
half english
 
Wouldn't have guessed that based on your name
 
haha, no, lived in places where they have tiki's that's why
I'll have to work on the reflection shape, it doesn't move like a reflection should.
 
I think I'd do square with gradient on it
 
m59
Oh utterly cruel mysql.
 
@rlemon Now the pages load perfectly, the scripts of the appended ones just doesn't run. Any idea how I can get them to? Using eval of their text hasn't seemed to work zachsaucier.com/testing
 
m59
8:38 PM
It's not giving me the row with the max time submitted, it's giving the a different row with that field changed. Great...
 
function exec(fn) {
    var script = document.createElement('script');
    script.setAttribute('type', 'application/javascript');
    script.textContent = '(' + fn + ')();';
    document.body.appendChild(script); // run the script
}
 
shouldn't it be doing that already by using replaceChild on the parent?
I wouldn't think it'd be any different given that the script tags are appended correctly already
 
what is the js you are including that isn't running?
link me the file
 
any of them included in the #content section, i.e. zachsaucier.com/testing/js/header.js is one
I tried enveloping it in a (function() { but that didn't seem to help
 
9:04 PM
and how are you loading that file?
copying the node from the other document?
@ZachSaucier
 
9:19 PM
@rlemon ya, replaceChild on the #contents
 
yea I don't think that'll work
 
9:30 PM
hrm.
yea looks to me like I had to eval it
there has to be a better way
 
displaying a website as a 3D hologram... interesting thought
Stare at this in full screen for 20 seconds or so then look around. Interesting effect on visual perception codepen.io/CucuIonel/pen/vwEte
reminds me of a futuristic game effect when on low HP or something
@rlemon And thanks, that'll likely work (I'll test Monday)
 
9:47 PM
boom
		function loadScript(script) {
			var elm = document.createElement('script');
			elm.src = URL.createObjectURL((new Blob([script.textContent])));
			document.body.appendChild(elm);
		}
no eval.
 
yay!
 
and you can give the script a unique id or w/e if you want to remove them later (bindings do not remove FYI)
 
your XHR request is so much simpler xD
 
it doesn't have to be complicated if you are targeting new browsers
 
@rlemon I think I'll just prevent them from being loaded multiple times that way
@rlemon perhaps that's why Wes' is longer? zachsaucier.com/testing/js/page-pop.js
I'll have to read up on those articles tonight
 
9:50 PM
his has some padding mine does not
mine doesn't target IE8/9
!!caniuse xhr1
 
caniuse: xhr2
 
does his? (sorry for my lack of knowledge)
 
onreadystatechange is better supported
 
caniuse: xhr1
 
bah
 
9:51 PM
kk, I don't know which are which
 
okay, xhr level 2 is just an addition of APIs
level 1 is what we had before the additional APIs
the load event wasn't in there until level 2
readystatechange on the otherhand is, but the caveat is you need to check the statuses yourself.
in xhr2 you have load, error, and abort events
 
kk, sweet
thanks for the info
 
m59
10:16 PM
@ObiWanWesabi I came up with this:

SELECT foos.id, bars.title FROM foos
JOIN bars on foos.id=bars.foo_id
WHERE bars.time_submitted=(SELECT MAX(time_submitted) from bars WHERE foo_id=foos.id);
it seems to work, but time will tell...
 

« first day (444 days earlier)      last day (3344 days later) »