« first day (1991 days earlier)      last day (2961 days later) » 

1:00 PM
@Andy I mean if it bothers you to use classes purely for identification of elements in js code, add a prefix to those class names so you'll know
 
@Andy you can return as type document, which makes it a lot easier. THEN there is client side rendering (sending the json and building the dom) which has its drawbacks and benefits
 
@Andy no, the trap would be to return html directly
 
of which you have to decide for your application
 
ok cool, just confirming :) classes makes sense, i guess it's the standard? I assume, deep down in the nuts and bolts, document.getElementsByClassname is probably quicker than doing something more indepth like i'm suggesting
 
0 flexibility
 
1:01 PM
json doesn't inherently offer more than HTML
you just get an easy way to parse it into a object structure
 
the only issue i have RE: rendering in the DOM vs returning the HTML is that i then have 2 places to render stuff. vs. just the one.
 
if you make the response type document you can return the HTML to the client fine
 
if i return the HTML then i can use the same partials, views etc... when rendering the main site or doing the AJAXy stuff.
 
just look up the wins/downsides of client side rendering
 
Plus i'm doing the full stack, so dont want to add work for myself. (I'm using Zend 1.X and PHP) might be other frameworks makes my thinking redundant
will do (doing now)
 
1:04 PM
Whatever happened to AndyE ?
 
pretty much depends on a gazillion factors whether or not you want client- or serverside rendering.
 
yup
 
Maybe we're not in agreement, but I personally would avoid directly returning html, unless you are manipulating/templating serverside
 
For instance.. I would suggest facebook, ebay and google to do clientside rendering unless they want to pay another gazillion for cpu power for their servers
 
neither carry a clear benefit
very situational
 
1:06 PM
ok, well, looks like there are pluses for both, but i'm going to stick with my own knowledge and use Server rendering. If this product works and i can get staff i can get them to deal with it :D
 
even they could afford it ;)
 
Twitter and G+ are full client side are they not?
been a while since I looked. g+ source used to be a mess
 
i just read something that said Twitter went back to server side in 2013 as it's quicker.
but then it might have flip flopped. So who knows shrugs
 
yea, it's been a while since I looked
in fact, I have a commit :P I can tell you exactly how long
 
if you're in the game long enough you see things being cyclical (sp)
 
1:08 PM
my point was just to bring such things into consideration.. even tho.. most of us and our companies won't be really in that decision because we have a quadtrillion views/hour
 
Apr 2012
 
remember when one pagers were all the rage? Then everyone when back to multiple pages and now we're back at one pagers.
@rlemon haha. Been a while :)
 
fuck time flies man. I wrote FragBuilder (a lib no one used, myself included) in 2012
 
ok, righto, so for my needs and skillset i'm going to use Server rendering so that i dont have to deal with 2 ways to do rendering (i'm still old school and think sites should work without JS enabled)
 
Crossing the t's and dotting the lower case j's.
omg omg omg @KendallFrey
 
1:10 PM
and i'll refrain from reinventing the wheel using attribute selectors and will stick to sensible classnames
 
why do they do this to me
 
user3119231
!!arial or calibri
 
@Maurice arial
 
sites should work without JS enabled ... oh come on now :o
 
well, depending on the site. yea
if I'm reading your blog and it doesn't work without JS you failed.
 
1:11 PM
 
but I don't expect my live dashboard to work without js
 
I can't even think of a sarcastic comparison that matches the requirement
 
user5861300
0
Q: How can i write query to connect mongodb?

001i have installed mongodb in different server. i have modified my old code db: 'mongodb://localhost/dev', to new code my username : proUseAdd password : mongodb@23 ip : 169.213.64.127 i modified like his db: 'mongodb://proUseAdd:mongodb@23@169.213.64.127:27017/dav', i am getting error ...

 
your connection string is wrong
also you probably are posting too much information there
and if it is fake, make it more obvious it is fake
 
Mongodb@23@169.213.64.127 looks wrong
 
1:15 PM
the answer points out the problem.
 
@jAndy inorite it was just ingrained into me from when i started working.
 
I don't have the documentation in front of me, but I am pretty sure that is wrong
 
but that was 10 years ago so things have moved on
 
@Neil his pw contains a @ which is a control character in the connection string
so he needs to escape it (not sure how) or change the pw
 
@rlemon ah
 
1:16 PM
or change the connection string to pass the password some other way
 
@rlemon agreed, My thinking is front end, not logged in. This was from the SEO stuff, i.e. google couldnt intepret JS as well as it can now so didnt know what the pages were about.
 
@Andy well today Google works. Dynamic content and JS generated stuff is executed and parsed
the robots are working
 
@rlemon thank fuck :D
 
been that was for.. 3? years now
 
Hmm, in retrospect, maybe my password shouldn't be "drop database *"
 
1:18 PM
i havent done any hard core dev for that amount of time, i had others do it for me humble brag but well, business has been shit so need to start again. So much has changed.
 
have fun catching up
 
i know for example that ZF 1.X is v. old and i should move on to others, Laravel etc...
 
in the past few years the game took a 180
 
@rlemon .... it's been a blast so far
 
even in it, hard to keep up
 
1:21 PM
ok, so, any tips / tools that i should be using that i might not be?
 
I actually thought the game was slowed down a lot for the past 6-12 months or so
before that.. agreed, like daily changes on core-level somewhere
 
@jAndy nope, just you ;)
Sorry, you set me up there
 
might be true also :O
but I don't think it's entirely like that, feels like es6, node, html5 and a couple of libs have stabilized a bit the whole game
 
@jAndy yea if you narrow the timeline to the past 6-12mo. but in the past few years (imagine looking at JS in 2011 vs today) it's almost a complete 180
2011 people were like "yo, is it safe to use es5 yet?"
 
guys, another Q form me in terms of the data stuff. i'm doing basket stuff. I have a basket icon within an a tag (<a href=''><span icon><span></a>) where should i add the data stuff and onclick? to the A or the span? In terms of best practice.
 
1:28 PM
10/10 would play
@Andy the anchor
 
cool figured as much.
thought i'd double check.
 
although, "data" is pretty subjective and imprecise. It actually opens a whole new topic where to handle data and how to link it (DOM). Philosophy #1: scripted data-bindings, Philosophy #2: dataset (use DOM to store data)
 
@SterlingArcher @ndugger youtube.com/watch?v=xa-4IAR_9Yw
ohh god, the end made it even better
 
and from there we can discuss whether to use a thing like angular.js or write our own binding's or another cool thing to hash-link data<->node
 
@jAndy whoa ... what :D so doing things like <a href='#' data-type="television" data-label="a wicked TV"></a> and then doing jQuery.data("type"); is "wrong"?
i guess it can expose things and also increase the HTML footprint / data to transfer?
 
1:35 PM
An a tag without a click event or link is improper usage imho
 
there is no 'wrong' in that topic, it's about pros and cons
 
@Neil this is just an example
@Neil it's not even my final form
 
@Andy ;)
 
but in general it's current "best practice" to store data in ECMAland and hash-link that to nodes and the DOMworld
 
@Neil this goes back to my "old school" thinking. In the above case i'd have the src='' go to a page that does something and the JS would just take the bits it needs and do the client side things.
 
1:37 PM
@Neil named anchors
BOOM
(which is one of their intended purposes)
 
@jAndy ...... whoa, did you see that? Straight over my head :D
 
@rlemon call it a link
 
but it isn't a link
it is an anchor point
 
<a name="inorite"></a>
 
exactly.
 
1:38 PM
<a href='#inorite'>Isnt this nuts?</a>
 
@Andy fun fact: that works with id's now in modern browsers
easier than littering anchors everywhere
 
really?
 
yup
 
that's awesome
i was wondering about that, my CEO / type chap, wanted a one pager with all that dynamic scrolling and i thought "fuck putting all those A Names in there"
(that was the "old" way to do it) but i like that you can do that.
(as in just use the ID)
 
I was thinking about that joke, the one that goes: wife of a programmer sends her husband to the market and tells him, "if you see some butter, grab it. And if you happen to find some eggs, grab a dozen." The husband returns with 12 packs of butter.
He should technically return with 13
Or am I just mistaken?
 
1:48 PM
@Neil a dozen is 12...
 
@Neal yeah, I know
 
@Neil So where do you get 13?
 
But he already grabbed one thing of butter. . Then he gets another 12 on the condition that he finds eggs
 
@Neil ehhh
 
user3119231
wtf neal neil
 
1:50 PM
Hi, I have a question about concatenating object property with another variable.

for(i=1;i<21;i++){
document.getElementById("id").innerHTML = object.property+i;
}

This isn't working and i understand why. My question is, how can i concatenate the i to object.property?
It's not working with "." as well.
 
user3119231
object["property"] + i  ?
 
If butter.exists () butter.fetch (); if eggs.exists () butter.fetch(12)
 
no
look
var object = {
x1:"something",
x2:"dasddsa",
x3:"dsada",
x4:"dsada"
}
for(i=1;i<21;i++){
document.getElementById("e"+i).innerHTML = object.x1;
}
I need to concatenate the i after object.x1
because now it's only targeting my x1
 
object ['x' + i] ?
 
yes, now it works
thanks !!!
 
1:56 PM
@smobx there are arrays that you can use you know
 
 
In case you're interested, I created a list of the most used words in this room over the past week (used at least twice).
 
@jAndy guy with pink eye? I don't get it
 
drank too much blood I guess
 
He likes his koolaid
 
@Abhishrek eh?
 
@KendallFrey first username to show up in the list
 
it ignores usernames
(words starting with @)
 
user3119231
<div scroll_target="second" class="continue-link">
 
user3119231
if I console.log the whole element I got this.
 
user3119231
2:01 PM
But if I just want to get my custom "parameter" I get undefined
 
user3119231
But why?
 
"javascript" missed out on the top 100
 
@because javascript and javascript, javascript. are different for you
 
yeah that
I was too lazy to fix it
 
2:05 PM
yo anybody here got reference of a really simple and good example bout autocomplete js + codeigniter?
 
JQ autocomplete? or is there some master "autocomplete" plugin out there for all
 
poop is said more than it should be in here
 
user3119231
if some regex magican is around: Is possible to just get the value of the parameter? string: <div class="continue-link" parameter="second">â–¼</div>
 
@KendallFrey poop is in the top 1/3rd
 
...
 
2:08 PM
oh my holy child of russian hackers...
 
@Maurice how are you trying to get the parameter?
 
user3119231
with str.split and stuff
 
@Maurice are you using jQuery or pure JS?
 
templateElement.innerHTML = string;
const param = templateElement.querySelector('.continue-link').getAttribute('parameter')
 
@Maurice you could use match.
 
2:09 PM
or use a DOMParser
or something
 
@rlemon fuck is #273
 
hi guys
 
oh wow, that's an elegant solution and doesnt require any regex. DOMParser be hella slow though right?
 
user3119231
I'm using pure js
 
@Andy 10000op/s is slow compared to a million, sure. but it still gets the job done with room to spare
 
2:10 PM
"fuck" is said on average around every 4 hours
 
it's like saying "your car is slow.. compared to my jet"
 
are there any browser scripts that will loop through all your fb contacts and send them each an individual message with there name in it?
 
your jet is slow... compared to my warp drive
 
facebook would shut that noise down as spam
 
your warp drive is slow compared to my improbability drive
 
2:11 PM
there's a limit on the number of messages you can send in a given amount of time, iirc
 
Should e.preventDefault() for a text input disable showing the dropdown of previous options in chrome?
 
@JoshuaLonganecker but maybe the script can use heuristics
 
@rlemon Story of my life
 
@rlemon last i did anything with the DOM for searching, granted years ago, but that was so painful and slow so i mastered Match and Regex stuff. So much quicker and nicer.
so havent really touched it nor think to
 
@ndugger "maybe she is Canadian and just being polite"
 
2:12 PM
but anyways.. DOMParser() is actually pretty lightening fast afaik
 
@Andy searching through XML with regex?
 
@Andy DOM is slow, yea. but the DOM API isn't always slow
manipulating the live DOM is
 
@KevinB yea, my template using JQuery i think
 
@ssube na, i cant recall what i needed to do. it was my first job outta uni. but the DOM way was slow as hell vs using some regex stuff.
 
probably looping and updating large chunks of the dom
which would be silly today as well :P
 
2:14 PM
sounds about right.
 
then the jQuery UI docs should be about the best set of examples you can get.
 
And then you had two problems
 
then i had to do somethign similar with Perl and downloaded HTML too. the guy before me did the searching in DOM and was a huge mess. Took so long just to analyse a simple HTML page vs. doing some clever regex and text stuff.
 
And then he said: "We can just parse that HTML with regular expressions".
6
 
but then, perl is great for that
 
2:15 PM
the thing is, HTML isn't regular
 
indeed, which is why the dom bit was cray cray. so much shit.
 
so you can only ever do a 'decent' job parsing it with regexp
never a good job
 
rlemon is an unholy child for sure, his parents are apparently russian
 
Ruby's regex has reentrant patterns
 
It's easy to write a regex that will find that parameter in that exact string. but... then the string changes in some unexpected way
 
2:16 PM
true, but finding "<a tag.*parameter="(.*?)"> is pretty easy
 
or something similar.
 
To alcohol! The cause and solution to all of life's problems.
 
but maybe it is better to have a state in JS that updates the view, and not have to depend on the view to get information about the state?
 
!!^
 
user3119231
hmm. still working on it. :DF
 
\kn matches what the pattern for n-th capturing group would match.
 
so i'm right?
 
@Andy I like my parameter values without quotes, thanks
 
2:18 PM
@littlepootis DAMN!
 
let me answer that picture with that little animation I just saw here...
 
@KevinB ... I liked the giant arrow better, actually.
 
@jAndy The music now sounds like "WHAAAAT THE FUCK, WHAT THE FUCK, WHAAAAAAAAAAAAT THEEEEE FUUUUUUUUUUUUUUUUUUUUCK"
 
so my company just launched the first new site in years
 
my assumption here is that the HTML is from their own program as opposed to random HTML from the Interwebs.
 
2:19 PM
paahahahaha
 
missing a hubcap and half on fire, but she drives
 
@Joshua Gratz
 
user3119231
@rlemon works very fine. thank.
 
only problem is, i want to be proud of it because we launched it under such a tight deadline
 
user3119231
+s
 
but the code is shite from all the shortcuts we had to take, and all the legacy code we had to borrow
 
pooping myself a bit
 
I ported staging.snapick.me to use google's image recognition (: and dropbox
 
2:21 PM
dafuk
GH SSL is dead ?
 
god dammit I forgot to incognito. now that's in my recently viewed. :/
 
has anyone else had to work with Adobe AEM?
 
@JoshuaLonganecker well... if it got the job done, on time, it's a success, now you get to maintain that mess
we're kinda in that same situation... launching a new site this week
 
@rlemon Would I wear adult diapers? It really just depends...
 
@jAndy THE GAME
 
2:23 PM
...
 
o/ where are some popular css, web dev chat room alternatives on the interwebs?
 
@JoJo Why not? :-D
 
alternative to what?
 
depends on what frequency of messages would qualify as popular
 
@JoJo you're asking us? This is the alternative for us. ;)
 
2:24 PM
@jAndy haha i think stack may have one at times
 
@Neil I think that kid declares us and this very room as outdated and obsolete
and needs alternatives :P
 
this is JavaScript though
 
@jAndy I think so too. I am deeply offended, sir
 
so its not the same
im just being honest with you both
youll appreciate it much more later
 
You're right... where is the 300 THIS IS JAVASCRIPT meme when you need it
 
2:26 PM
This is mostly javascript, sometimes sparta
 
#squadgoals
 
....
 
Damn ninja!
 
I only come here to discuss diet and politics
 
back at it again with the white vans
 
2:27 PM
more donuts today?
 
I found out today that Germans call jelly donuts krampfen
 
look at this awesomeness
 
@KendallFrey <:
 
nice video :D
 
2:29 PM
LOVE that flower menu
stealing it...
 
Republicans : "Well, I tell you Bill we do have a button to cut down global warming...Its not a problem at all :D"
 
s/republicans/trump/
 
wth
 
@littlepootis gizmodo.com/…
 
2:38 PM

HTML / CSS / WebDesign

This room is now defunct. RIP.
also check freenode
 
there are probably some slack channels as well
 
@littlepootis dafuk ?
 
dont take code personal
 
any regular deep web / toor user around?
 
2:40 PM
some people get waay too attached to the code they write
 
@Abhishrek I just.. can't..
 
@CharlieBrown well, the code is feeding many of us :P
 
@littlepootis I imagine Congress blaming Modi for global warming.
 
some people cant get through a code review without being enraged or crying by the end
 
How the fuck do they even come up with that shit? "Catch this snowball, Mr. President." "It's about earth's rotation. You know, it's very complex"
 
2:42 PM
and code is art too. Art usually is used to display emotions. People are obviously attached to emotion. People are attached to code
 
@Abhishrek I want me to not care about american politics and especially this presidential election so bad, but it's not working
 
I was attached to my code, but then I added in a removeEventListener so we're all good now
 
stop using ie6
 
@Loktar @KendallFrey we should get a mp Factorio game going one night
 
@rlemon ^ add me in
 
2:45 PM
I'm down
 
I will be able to do it when am in Russia
 
@Abhishrek you'll kill the ping
 
@rlemon not from Russia :P
 
when you are out of India, sure :D
 
Heh
 
2:46 PM
Hey ppl; I want to limit the regex at the first group ( juste perou) how shall I do this ?
https://regex101.com/r/lS6hV2/1
 
@KendallFrey imagine MP KSP. I start on the other side of the planet
 
@Abhishrek you're not in the US anymore?
 
and can fuck with you
 
@GNi33 @littlepootis That's politics they are catering to people who don't think climate change is real. Many uneducated people do not think GW is real and see current govt as wasting tons of money to fix a problem they do not believe. Republicans simply tap into that base.
 
like fly over you and drop my garbage
 
2:46 PM
@GNi33 I am being roasted in India. 40C here :D
 
I think you'll have to actually fly something into my space centre
 
@Abhishrek climate change is just a tiny, tiny bit about all this presidential race that's bothering me
 
or rendezvous with a ship while I'm not controlling it
otherwise I wouldn't even notice you
 
Got its sry
 
@KendallFrey yea, wait till you send up a fuel station and take it over :D
or could be a KSP Space Race
 
2:49 PM
fuel stations are pretty useless in KSP
so meh
 
It simply isn't enough to say that gw is a problem, while businesses would have a bigger problem to turn green. Bottom line
 
start on Realism overhaul and race to the mun
 
jeebus
I've never been near the moon on RO
 
@Abhishrek there are educated people who chose not to believe because of their creationist upbringing
 
You want to fix the problem, there needs to be incentives
 
2:49 PM
@KendallFrey I call cold war russia!
 
I call Kennedy because inclination
 
man that would be one hell of a mod
I wonder if it is possible
 
what mod?
 
making KSP multiplayer with two camps
 
Well, DMP + KSC switcher might work
 
2:52 PM
I haven't looked at the mod scene
what is it written in? I assumed c++
 
Hello. Got this JSON [{id:0,},{id:1,},{id:2,},] It's a string. I need to get it as an object. How can I do this ?
 
@rlemon C#
 
@Addict JSON.parse
@KendallFrey XNA or w/e?
 
eval would be only option, since it isn't JSON.
 
@rlemon no, Unity
 
2:53 PM
Is my json well formated for JSON.parse ? I think it's not an exact JSON syntax.
 
most KSP mods are on GH
 
hrm, Maybe I'll start fucking with Unity
means I'll need windows tho
 
@Addict naaah
 
You don't need to know Unity to mod KSP
 
@ssube naaah it's not well formated or naaah it's gonna work ? :p
 
2:53 PM
@KendallFrey yea but why not right
 
@rlemon it's not a bad "make your own game quick" tool
 
QQ RE: Basket. When adding to a basket should it be cookie or session based? My AJAX session stuff doesnt seem to work.
 
@rlemon fair nuff
 
the underlying engine has actually gotten to be pretty good
the stuff on top is better than average
 
@Addict if it's not JSON, then you need to go to the source and make sure that you get real JSON. Don't try to do hacky parsing with a string that should simply just be json.
 
2:54 PM
@Addict neither.
 
if VR works for me, I would love to make some 3D Unity stuff
saw a few youtube videos on it
looked pretty easy
 
@Loktar searching google for freenode now, ty
 
Unfortuantelly I have no control on source ndugger :/
 
fix whatever's generating it to generate valid json. there's no excuse now days with pretty much every language having built-in json serialization. or a lib that does such.
 
2:54 PM
@Addict then you need to contact the source and have them fix it.
 
@rlemon Crytek engine and UE4 might be interesting too.
 
Freenode, formerly known as Open Projects Network, is an IRC network used to discuss peer-directed projects. Their servers are all accessible from the domain name chat.freenode.net and irc.freenode.net, which load balances connections by using the actual servers in rotation. In 2010, it became the largest free and open source software-focused IRC network and, as of 2013, the largest IRC network, regardless of focus, encompassing more than 90,000 users and 40,000 channels, gaining almost 5,000 new users per year. == Characteristics == Freenode is centrally managed. Staffers or staff (as IR...
 
lol UE
the CryEngine tools are pretty dope, though
 
3D movies I can't see, and 3DS I can't see (the 3d, that is)
 
somebody made a mechwarrior game in CE1 or 2, it was awesome
 
2:56 PM
so knowing modern VR is the same 3d tech, I have very little hope
 
@rlemon I figured you'd know KSP was Unity, since that was the story of basically the entire 1.1 update
 
:(
 
Unity is much more casual and easier to use, plus I think the scripting is in C# or JS
 
@KendallFrey only really started following the 1.1 update last week :D
 
doesn't matter
 
2:56 PM
Just have @Loktar bring over one of his VR head sets so you can try it out
 
was more excited about 64 bit
 
@rlemon You used a good 3D setup? And not some cheesy cinema one
 
so kinda just ignored everything else
@RoelvanUden yup, stereoscopic 3d doesn't work for a small percentage. something about my eyes not being the same speed or something
all I see is blurry lines, and if I REALLY focus I can make out stills. as soon as the scene moves I lose it
 
maybe you should get better eyes
 
overclock them
 
2:59 PM
@rlemon I did not know that could happen. Still, having two "separate" screens should be sufficient, no? Try it. :P
 

« first day (1991 days earlier)      last day (2961 days later) »