« first day (1188 days earlier)      last day (3766 days later) » 

2:00 PM
Do you like coffeescript @rlemon ?
 
nvm
 
@Deniro May I answer?
 
@JanDvorak Yeah, I edited
 
I don't mind coffeescript, but still prefer theRealStuff^(c)
 
@Deniro I like it in concept. I don't like what the compiler spews out
 
2:02 PM
I'd rather call it PythonScript :-)
 
Yeah, I agree
 
@rlemon I don't read the compiled code
 
I like to see what it is producing
 
@rlemon you mean
  __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
 
don't want to just trust me
 
2:03 PM
?
ha
 
Compiled code is always terrible to read
 
^ +1
 
sure, but this is a high level language compiled to another high level language - I will need to read the compiled code when debugging
 
not with source maps
 
@rlemon why?
@rlemon why? (consider what @Florian) mentioned
 
2:04 PM
but source maps are recent, that said.
 
Hey, wait... does coffeescript polyfil too now?
 
well debuggers exist for a long time already and we don't read binaries :)
 
yeah, but coffeescript debuggers are recent
you didn't have source maps until like 2 years after coffeescript went out
 
Chrome supports source maps natively
 
wow, this dude done this $('#username'); 11 times in his page :( stackoverflow.com/q/21163964/3200153
 
2:07 PM
yes, and coffeescript has to spit them out. It didn't do that until recently.
 
Hi
 
Hi
 
@Deniro I nearly always start with $sth = $("#sth")
 
Yeah, me too :)
 
@Deniro I wonder why optimizers don't catch that automatically, seems trivial /cc @Jan
 
I would say it's far from trivial, but OK :)
 
is there an SO question for that?
 
@BartekBanachewicz You can implement that into jQuery, but you need to reset the cache after each DOM manipulation
 
I think the jQuery crowd doesn't realize that you only need to get the reference to the DOM object once.
 
@JanDvorak But why doesn't the browser engine do that?
 
2:11 PM
@BartekBanachewicz Optimizers aren't targeted for jQuery, and if the page has some element with id 'username' that gets removed and replaced with another element of the same id then it would make sense to have to multiple jQuery selectors and caching the first one would break functionality.
 
@Shmiddty you never know when the cache gens stale
@BartekBanachewicz it probably does for all IDs
 
@BartekBanachewicz Because the browser doesn't know jQuery?
 
but you still need to construct a new jQuery object
 
anyway just use method chaining, IMHO.
 
I have to go for a while, cya guys :)
 
2:12 PM
or do stuff like if(cache[id].dom == dom) return cache[id].jquery
 
@nderscore that sounds like trivially fixable by some sort of dom dirty flag (not necessarily from jQ itself)
 
I am continuing to watch the vids @BenjaminGruenbaum
 
@BartekBanachewicz method chaining doesn't survive control statements :-)
@BartekBanachewicz the whole DOM? That happens way too often
 
@JanDvorak oh right imperative languages :F
@JanDvorak hm right...
 
Javascript doesn't read the DOM structure to shorten its day, it reads the DOM in order to write to it :-D
 
2:18 PM
$("...").a().b().if_( cond, c, d ); would be a rough solution, but then stuff like if_( cond, compose(c,e), d) is getting much hairier
 
0
A: Setting text of an element in HTML

danisupr4Next time try jquery so you dont need to write many codes.

 
runjQuery (a >> b >> (if cond then c else d)) $ "#header"
hi hi hi
which allows (a >> (if cond then b >> c else d >> e >> f)) !
 
UBS (my bank) is stupid... To login to my account via the android app I enter my account number and PIN and put the NFC access card next to my phone. Everything fine. But to login to their website I need to plug the card into a separate card reader (which I obviously don't carry around with me) instead of being able to use their app to generate the login token
 
2:35 PM
o/
 
@Loktar o/
 
user1596138
Looking to use a live "intercom" type system over LAN, using Growl. Have no idea where to start. Just end up smoking a bunch of cigarettes whenever I decide to work on it.
 

Monadic promises evaluation

52 mins ago, 23 minutes total – 83 messages, 8 users, 0 stars

Bookmarked 27 mins ago by Bartek Banachewicz

cc @BenjaminGruenbaum ^
 
pulled out the oscilloscope - port is telling me it is open but nothing is actually being transmitted.
no wonder this isn't working
 
@rlemon Did !!undo break?
 
2:44 PM
:(
 
why does nudge remove the nudge message?
 
no i'm hogging my network.
will be better in ten miinutes
 
@SomeGuy Did you do an !!undo?
 
In another room
 
bloody
it deleted my nudge message after half a second
you're good
 
2:46 PM
Hahaha
 
user1596138
Letter from my Mayor... Could be interesting..
 
user1596138
Nope.
 
When was the last time you got an e-mail from a politician that wasn't selling you something?
 
@rlemon @Zirak make undo room-specific
 
Or letter for that matter
 
2:47 PM
Cool
ohh make it!
I thought you said made it
umm I think there is already an issue
 
user1596138
@Neil This morning.
 
user1596138
> Josiah,

I’ve given this issue some time recently for research and here is what I found:
 
this is not respect on pedestrian
 
user1596138
Followed by (basically) you're fucked, good luck.
 
2:50 PM
@Jhawins Good for you. I'm pretty sure that isn't the typical case though
 
anyone else suffer from phantom pings?
 
user1596138
@rlemon ?
 
jesus I hear them all the time
 
@rlemon What do you mean?
 
user1596138
I get pings and the notifications just sit on my screen forever...
 
2:50 PM
I hear a ping. come to the chat... no pings.
 
"Good for you" meaning good you didn't try to get swayed by some politician with an agenda, not "Good for you" you're fucked
 
like a phantom sms notification
 
It's your subconcious craving attention, don't worry about it.
 
you hear your phone go off, but when you check it nothing went off
 
Never have that
 
user1596138
2:51 PM
@Neil Yeah I know what you meant lol
 
sorry for potato images: imgur.com/a/aUpvF
 
hi guys! according to an answer on this post stackoverflow.com/questions/8359748/… the jquery.scrollTop() was not supported on iPad. Does anyone know if this is still true? ('cos im having some issues with it)
 
this is my new lunch box.
made in 1978
 
user1596138
So the Mayor declined to meet with me due to the fact that "police agencies do not target individuals"
 
Pretty sure that would make it an old lunch box.
 
2:52 PM
it is new for me
 
user1596138
When in reality, they're not allowed to, that doesn't mean they don't and I am so far out almost $2K because they are. But no it's cool don't actually look into my issue or anything it's not like I expected a politician to be any help.
 
Also, is there even any room for lunch? Looks like the water bottle takes up most of the space
 
Thermos*
 
Water bottle.
 
!!s/W/Hot w/
 
2:53 PM
@rlemon Hot water bottle. (source)
 
@Jhawins He probably feels good about himself that he took the time to write you a letter, you realize
 
user1596138
Yup
 
user1596138
The Mayor of a city of 8,000 people..
 
Takes the time to write a "fuck you, not my problem" letter to a citizen. I'm sure he gets a warm fuzzy feeling too
 
What are you guys on about?
 
user1596138
2:56 PM
> I can promise that there is not a collaboration to target your specifically
 
user1596138
^ But didn't even ask me what admissible evidence I have to the contrary.
 
Which is exactly what a conspiracist would say
@Jhawins What did you complain about?
 
user1596138
@Kippie No no no this is a local problem because my police department is butt hurt since I got 2 of them in trouble a few years back and they've been getting me into make-believe trouble for 2 years. Except this time it's real trouble.
 
Angstrom is stupid
just letting everyone know
but as I read, the beagle board bone black support Arch!
@FlorianMargaine you use Arch yes?
 
user1596138
So I mistakenly thought "Hey! The Mayor will care. He doesn't want his town to be corrupt" Which was untrue... He didn't even ask me to back up my claim he just dismissed it immediately.
 
2:59 PM
@rlemon Wat ? The length unit ?
 
@dystroy the linux distro
 
@Jhawins How could they get you in trouble? They don't have evidence that you did anything wrong
 
@rlemon I do!
 
they have been having website issues over the past week
 
Not often, but it does happen
 
3:00 PM
@rlemon their site isn't sexy
 
@SomeGuy I imagine node.js support is out of the box?
 
@Neil You're pretty naive if you think they'd need evidence
 
@dystroy there was a plain text version up yesterday. they just killed that.
 
user1596138
@Neil They can say I did anything they want. All they have to do is find the IC codes that put the burden of proof on the defendant
 
they were having webserver issues.
 
3:01 PM
@rlemon I was talking about phantom pings :p
I didn't enjoy Arch much
 
@SomeGuy ohh I should have clicked the arrow :P
 
@Kippie Not that naive, I just don't think two cops can point their fingers and they can simply arrest a guy.. at least the appearance of justice must still apply
 
oops
 
@Neil For a felony, maybe. Minor offences they don't
 
3:02 PM
@Kippie That's what I was trying to understand
 
I love that it does that for the bot too
 
user1596138
@Neil Which is what they did. They marked my ticket as unpaid twice now after I paid it lol. So then they got me on driving while suspended (for not paying the ticket). I was only suspended because I "didn't pay the ticket" that I have an eye witness ready for the stand that watched me pay it twice now.
 
Should it go before a judge, they will almost always side with the officers, unless there's a real reason for them to doubt the cop's judgement
@Jhawins Did you pay cash?
 
user1596138
@Neil you'll learn soon that the real world is unfair, and people can ruin your life.
 
user1596138
@Kippie Yeah :/
 
3:03 PM
ya dumb git.
 
programming is unfair and piss poor distros will ruin your life.
 
Such as?
 
4 mins ago, by rlemon
http://angstrom-distribution.org
 
@Jhawins Sorry, should I have said? "You're doomed. What do you want me to say at your eulogy? Is that a red dot on your forehead?"
 
user1596138
But, for them to ignore an eye witnesses testimony they'd have to get the witness with purgery, which would require them proving that she wasn't there, which requires looking at the surveillance footage... Which will show me handing in the money twice, with my witness beside me.
 
3:05 PM
@rlemon not anymore
 
They generally give receipts proving you paid a ticket
If you have that, they'd have to prove you got it illegitimately.. burden of proof is on them at that point
 
a rolling distro is fun, but I want my machine to be stable and not worry too much about it
 
user1596138
All I know is... I've got some new dress shoes, a new suit, a haircut and a fancy smancy lawyer. And I'm going to court. So we'll see.
 
@Jhawins I hope it works out for you, I sincerely do
 
user1596138
@Neil They did. I haven't been pulled over in 10 months, and have moved twice in that time. I have no idea where a paper receipt is.
 
3:06 PM
@Jhawins Ouch.. that's the first thing they'll ask
 
hi Experts..
 
You might want to find it. Otherwise, I wouldn't waste money on lawyers
 
sorry for disturb in between
I am doubt,regarding api calls
 
user1596138
@Neil Eye witness stating that it was paid twice, in front of her both times. That's cause enough to check the footage and see if I paid it. Says my lawyer.
 
can I ask you
 
3:08 PM
@Hanumath Hello, Doubt. Please tell us your problem
2
 
I am making api call to my static server
 
@Jhawins Well, I would ensure I had the footage then at least
 
user1596138
Plus they claim I went to court and pled guilty to the original charge... Which is funny because I had never been in a court room before this week. So the lawyer basically says this is one of the most sloppy cases he's seen and that there's no way I shouldn't be able to get out of it... lol
 
I need to see, whether is it going or not
How can I find that
 
Check the console's Network tab
 
3:10 PM
@SomeGuy 1 min, I will check it
 
user1596138
We're a town of 8,000... Or less. So it's not like this is some big city justice system haha
 
@Jhawins Maybe they figured you wouldn't actually fight the charges
I doubt if it will play out like in the movies where the officers try to remove evidence
 
@SomeGuy thank you man.
 
This thing probably happens more often than they're willing to admit
 
@Neil thanks for your response ...
 
3:12 PM
@Hanumath No problem
 
@Hanumath No problem, Doubt. :)
 
user1596138
@Neil That's what he said. He said if they'd incarcerated me Saturday we would be looking at a hefty counter-suit... Which is funny because according to my charge I should've been arrested and spent the weekend at the jail. He says they were more than likely covering their asses so that if I fought the charges I couldn't sue over that.. But that's just his speculation it isn't admissible.
 
user1596138
Anyway enough about this. Sorry to spam the room @all.
 
@Jhawins You'll see it'll work out fine
 
user1596138
lol so far I've lost $2K and my license for 3 months minimum. No avoiding those 2 facts... But yeah if I stay out of jail/have no more trouble in the future it'll be worth it.
 
3:14 PM
If they think you'll get a lawyer, they'll either leave you alone or the next time they hit you, a lawyer won't help
But probably the former
 
posted on January 16, 2014

Just some random notes from the trenches in order to show everyone that, despite appearances, the viewport is not simple or easy to understand. A browser vendor asked me to study the following problem: A page has width=device-width, or initial-scale=1, or both. The page also has an element of 1600px wide; far too wide for the layout viewport that’s normally created by the meta view

 
user1596138
@Neil Which is why I'm hoping to just move out of state. Haha
 
@Jhawins That's kind of a scary thought, isn't it?
 
user1596138
@Neil The entire situation is kind of scary. I'm 19, never been in real trouble. Moving away doesn't scare me though.
 
@Jhawins Can I ask what you did to these two police officers?
 
user1596138
3:21 PM
Even though I've only left the neighboring states of Indiana enough times to count on my hands haha
 
user1596138
@Neil I was playing in a gravel pit a long time ago (3 years, was 17). Gravel pit meaning there was a dump truck or two, an excavator, and huge piles of dirt/rock. I climbed the rocks, got arrested by 6 police officers with 2 K9s, handguns at my head the entire time because I climbed a pile of fucking rocks. The officers proceeded to basically just throw me around. Concrete barriers, squad cars, anything was apparently funny to watch me be shoved into.
 
@Jhawins Yikes. You think they're still trying to make your life hell?
 
user1596138
I reported the entire incident. The arrest/charges were 100% dropped and wiped from record. Not even marked as a wrongful arrest, they were literally wiped. Because I was also able to prove in court (by myself) that the criminal trespassing charge I had was false, because of a loop hole in Indianas definition of criminal trespass.
 
@Jhawins Why the hell are you a programmer? You'd make a kickass lawyer
 
user1596138
Well not a loop hole. Just the fact that for it to be criminal it either has to be a repeated trespassing charge where you've been in trouble before, or it has to be posted somewhere "no trespassing"
 
3:26 PM
They're probably just afraid of what kind of trouble you could give them
 
user1596138
Obviously not lol. I just got lucky that time and the officers all caved quickly as soon as our neighboring county sent in a team to evaluate the complaints and caused a mess for our local PD.
 
user1596138
Never ever file a complaint on an officer in a town that you want to stay in. It's not worth it.
 
Yeah, i can see how that would make them mad
 
Hey @Benj are you there?
 
user1596138
@Neil But the thing is I can prove all of these events happened... Which should be enough to cause an investigation of some kind I would think.
 
3:28 PM
Well, no, you can't actually prove anything. You have statements by you and your witness who is certainly biased, opposed to those of the police
 
@Jhawins when things like this happen on a small scale, either people don't care or they'll try to put it right
but when things like this involve a lot of people, it suddenly becomes political in nature
 
user1596138
@Kippie You don't know how the legal system works, and you pulled that claim out of no where. Ask me how I can prove it.
 
And the accused try to pull strings, and depending on the number of accused and how many strings can be pulled, you'd have a real wasps' nest on your hands
Police officers are definitely not the kind of people you want as your enemy
 
user1596138
"Well, no, you can't actually prove anything" sounds like my mayor. All you had to do was ask if I could prove it. all the records that were wiped are also stored in our neighboring county due to the formal investigation launched into our Captain and Master Patrolman.
 
user1596138
@Neil Oh yeah it's worth noting that the Officer I complained most about (the one who really did most it) is our PDs Captain. And our Chief of Police is always working out of county somehow. So the guy I got a formal investigation launched on is the very top of our local PD pretty much.
 
We0
3:33 PM
Hey gusy
guys
*
So jquery moobile
it ajax stuff in
but not adding stuff to dom
 
Next you'll tell me your mayor was cheering them on
 
We0
if that makes sense?
 
@We0 Ajax doesn't add anything to the dom
 
We0
I nkow
 
@We0 No, it didn't make any sense
 
We0
3:35 PM
I need it to add
 
user1596138
Our Mayor is a new Mayor. He wasn't in office at the time which is why I thought he might not be biased on it.
 
@We0 Well which part are you having difficulty with? The reading the ajax data part or the adding something to the dom part?
 
We0
adding to dom part
 
user1596138
Ok. Time to get work done.
 
We0
so I have JS that is is on page load
then it ajax more things in
but need that in the DOM
 
3:37 PM
2
Q: dynamically adding/removing a div to html

jslearnerI want to dynamically create a div element with id="xyz". Now before creating this, I want to remove any other div with id ="xyz" if it exists. How can i do it? var msgContainer = document.createElement('div'); msgContainer.setAttribute('id', 'xyz'); //set id msgContainer.setAttribute('class',...

 
We0
@Neil not my problem exactly
So the url loads with a basic empty template
then it ajax the rest of the view
but instead of adding similar js in each load
I want it in my header
 
user1596138
$(ele).append()
 
We0
append? Really?
jquery mobile uses
 
user1596138
.prepend() , .appendTo()
 
We0
See my profile picture
that is how I am looking at your chat
 
user1596138
3:40 PM
Hahaha
 
user1596138
I like this guy
 
user1596138
But sadly I don't know what you're asking.
 
lol
 
We0
I know
lets try again
Uhm
Jquery mobile loads an empty template on the url call
 
Is there an underscore/lodash method that works like map, except that each element might not show up in the resulting array?
 
We0
3:42 PM
then it ajax loads the content
 
(I could do _.filter(_.map()); but I was wondering if there was a more concise way.
 
We0
and puts it in the page, still with me?
 
user1596138
no
 
user1596138
How about some code?
 
user1596138
"url call" and "ajax loads the content" aren't normal phrases so I have no idea what they actually mean
 
user1596138
3:43 PM
Terminology is a big deal when asking questions haha
 
go the the page, there's an empty template, ajax loads in the rest
but.. im not sure what he means by wanting it in the head
 
We0
is the master empty template
in the html <head> I want to keep ajax code
otherwise I have to have it on every content load
 
You want to cache what the ajax returns?
 
use a partial template then
make the content in <div data-role="page"> a partial
 
We0
@Loktar Now I don't understand you :/
but the JS there I want generic into the master template
like pastebin.com/rpnGtT0u
that works
but when the mobile loads the partial it doesn't add it to the dom
 
3:48 PM
hmm.. I mean you could just throw the js in a file and lead that in along with jquerymobile ect.
 
We0
Yeah, still getting to that
take all custom JS and put into a file
 
jQuery.getScript()
idk what is avail in mobile
> Description: Load a JavaScript file from the server using a GET HTTP request, then execute it.
 
We0
@Loktar That looks like what I need. So I would jQuery.getScript("http://domain.com/path/to/my/custom/script");
?
 
yea
 
We0
In my page head?
THANK YOU
makes total sense
 
3:50 PM
I mean that might work might not lol
Im kind of shooting the dark
might as well try it though :P
 
We0
yerah but it makes sense
 
question... can you make a div eliminate from the DOM after x seconds? If so, how?
 
We0
thecodinglove.com to say thank you
 
@Shmiddty I was able to cut out some bytes and reduce to a single print call :D
for(b=[(i=j,c=0)for(j in a=readline())];~i;c=b[i]<a[i]?!++b[i]:i--)c||print(b.join(''))
 
We0
yes
 
3:51 PM
@Crowz use a timeout and remove?
setTimeout(function(){//select and remove some element}, seconds)
 
We0
@Crowz use api.jquery.com/delay with $("#theDiv").remove();
 
user1596138
I got lost and gave up... Sorry
 
Mornin fellas
 
morning
damn they have too many good devs on codepen now
lol i remember when I was featured stuff would stay up for a whole day
now you're lucky if its up for a few hours lol
 
Make your own codepen style site, and feature your pens 24/7
 
3:56 PM
^ and profit!!
:P
 
But mostly internet pride
:D
 
dude I mean I would totally go there every day
Id be like, shit guys I was featured on jasonbrownssweetdemosalwaysfeatured.com
 
Is that your name?
 
heh yea
 
lol didn't know that
 
3:57 PM
one of the most common pleb names
 
pleb?
 
plebian
 
poor/common
 
Ahh
 
you commoner
 
I knew I recognized that from somewhere.. I wanna say history class
 
lrn2latin
 
My son Gavn has a sweet name
Gavin Aurelius
 
!!youtube jason brown figure skating
 
Although i wanted Aurelius to be his first name :?
 
3:58 PM
 
Is he a Roman Emperor in the making? lol
 
How come he's not named Gavin Brown?
 
@Loktar hopefully Cat stepped in
 
@RyanKinal dude I didnt want to show off
@Kippie well Brown is his last name :P
 
LOLOL
 
3:59 PM
@Loktar You're damn good. Be proud of it.
 
@Loktar dude you're so gay
 
I mean yeah I fucking own the ice, its just idk I dont want people to treat me differently for it
like "wow your code is so graceful!"
 
lol
 
And just to emphasize Florian
 

« first day (1188 days earlier)      last day (3766 days later) »