« first day (1014 days earlier)      last day (3937 days later) » 

3:00 PM
I ran into weirdness with nodejs. I was trying to write Transfer-Encoding: Chunked wav data, so I was calculating the hex lengths and doing everything by the book, http specs, but maybe nodejs automatically does this? I hate that that isn't documented then, because my stuff was corrupted but worked when I deleted all that extra logic.
 
can i use js in a mustache template?
i'm trying to do something like this:
<p><span>Created Time:</span> prettyDate({{createdAt}});</p>
<p><span>Updated Time:</span> prettyDate({{updatedAt}});</p>
in my text/template script
 
ok well... shit. :/ do I abandon what I have? I'm pretty sure it would work if I were using it as a seed for a 3d model. but 2d it is pretty ugly.
1) look at how they do the 3d shit
2) look at loktars implementation
3) look at other guys implementation
 
the client is a bank
 
4) 1-3
 
3:05 PM
he wants 3 webservices to generate PDFs...
 
3 separate web services?
 
which one do you have @rlemon?
I havent seen your newest
 
692
Q: Using a piano keyboard as a computer keyboard

Артём ЦарионовI have RSI problems and have tried 30 different computer keyboards which all caused me pain. Playing piano does not cause me pain. I have played piano for around 20 years without any pain issues. I would like to know if there is a way to capture MIDI from a MIDI keyboard and output keyboard strok...

@hanleyhansen How about assigning the result?
I don't know Mustache, but if you pass in a context object, context.prettifiedCreatedAt = prettyDate(context.createdAt)
 
let me try that. thanks.
 
lol btw you guys missed an AWESOME discussion last night
 
3:09 PM
Who missed it?
 
poor connor was banned for 2.5 days
 
I popped in while you and Connor were talking too
 
oooh that's why the room was in gallery mode
 
@Amaan it was only a few of us many of the regulars were asleep I think
there were maybe 6 of us (including you)
 
Did you read the transcript from before?
It was hilarious
 
3:10 PM
lol yea
thats why I jumped in
 
what was it about?
 
then I was called a pedophile :(
 
is there a way to push a new frame into an existing websocket using Chrome dev tools? I'm reverse-engineering SO's HTML, and I'd like to fake a new answer.
 
in Trash can, 13 hours ago, by Connor
@Loktar Then you support Paedophiles, there is no debating that.
^ Because I said I like the BBC
lol it got so crazy last night
 
@Zirak explain the context part to me please gist.github.com/hanleyhansen/1547f58219efe760b456
 
@hanleyhansen I didn't mean that you'd do it verbatim...
 
on scale of 1 - 5 how ugly is that javascript ?
its straight in the page.
 
Don't you need to pass something to the template to generate it?
 
tank missile?
 
@Loktar I pay a TV licence to the BBC so what the heck does that make me?
 
3:13 PM
@Zirak line 6
 
@Darkyen You lose 3 points for the "!!!!!!!!!!"
 
Take your createdAt property of it, and make a prettified version of it
I assumed what you passed in is called context
 
@dystroy i will gain more from u :-> soon if u read down :D
 
ugh, why did you call it d
 
lol sorry
 
3:14 PM
me ?
 
Then d.prettyCreatedAt = prettify(d.createdAt)
 
oh duh
lol my bad
got it. stupid me. i didn't change that var
 
@Darkyen I might be kind because the heat sent to sleep my neurons but this code doesn't strike me as especially ugly. Or maybe do I see to much SO code...
 
@dystroy :-)
 
i'm really likin node and js in general with this project
 
3:16 PM
> // The cross browser dystroyer.
That's not how you spell destroy
 
i spelled it in favor of your name ;)
i think most of people here will get 'named' in the source code by the time project is complete :-D
 
Dear hell...63.9k questions in the close votes review
 
lol
 
@mikedidthis a murderer probably!
 
@Loktar I think I would take that over peado pete.
 
3:20 PM
@Zirak I reviewed more than 1000 questions in this review queue but, seriously, this is a painful task... I always open the question in full to see the answer...
 
still where I was left off
I muddled around with the off-grid points (wrapping them) but it didn't really make for a better presentation
 
There are just so many...
 
@Zirak and spending so much time desperately looking for some kind of sense in stupid questions...
 
so I think I'm going to try your way, and try 'his' way this weekend
implement them both and tinker until this shit makes complete sense to me
 
3:23 PM
The path to understanding sometimes forks
 
here was the 'best' wrapping I had. I still don't think it is right.
 
d.parameters gives me something like this:
{"trade":"Electrical","showDetails":true,"sortBy":"d","format":"c"}
 
I literally have sheets of paper with hand drawn grids trying to work it out in my head. stepping and drawing in the points / values by hand.
 
Git forked hash-hole
 
but it's a string
 
3:24 PM
painful debugging :/
 
I did that too
 
how can i turn it into an object so i can access format
 
it didnt only take a day for me to do
I cant remember how long it took
but I was pretty fucking happy when I finally got it
 
eh, it's a completely new concept for me. I will be elated once I get this
 
3:25 PM
thats why in my code I have like topleft topright
crap like that
 
How was that off-topic ?
1
Q: How to get JSON data from the text?

KirixI have a string, something like this: sometext{"points":{"point":[{"lat":"55.68705772049725","lon":"21.127218855544925"},{"lat":"55.68714472465217","lon":"21.127141742035747"},{"lat":"55.6871934235096","lon":"21.12712439149618"},{"lat":"55.68733625113964","lon":"21.127151465043426"},{"lat":"5...

 
got it
thx
 
@dystroy Cast a reopen, it's not off-topic
 
@GiuseppePes Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
People seem to be using the "minimal understanding" reason to say "your question is dumb"
 
3:28 PM
/({.*})/ seems wrong
 
@Shmiddty everything from the first opening curly to the last closing curly?
 
Who's up for a job in London?
 
Would that not hit the first closing curly?
 
No, * is greedy
*? would match as little as possible
 
I see
 
3:31 PM
@Shmiddty why ? edit : oops, zirak was faster
 
@OctavianDamiean say what?
 
But it does seem a bit wrong...maybe. Depending on the case.
 
Just my lack of regex knowledge
 
@mikedidthis A JavaScript developer career.
 
@OctavianDamiean ohhh... sounds... dandy. :D
 
3:32 PM
Maybe not, if he was trying to find it in a book or something, then regexps are definitely a good answer. But otherwise...why is it embedded?
 
/data = ({.*})/
had to do exactly that a few weeks ago
 
@OctavianDamiean any chance for remote with the possibility of a few visits per year ? I know how to javascript.
 
there was var data = {....}
 
@AlecHewitt ok, well if you could write up a new question and we can work on that issue separately (hint: it has nothing to do with the code you have here). see: tinker.io/e3ec8/1rlemon 19 secs ago
chances OP rejects this hint and demands answers in this Q: 75%
 
3:33 PM
@dystroy Nah, sadly those are London based.
At leas this time I know how they found me. It was my GitHub profile.
 
@Zirak that's a question I can vote to close without opening it in full :)
 
Which is kind of funny because I'm not really doing all too much on GitHub. :D
 
Isn't your github mainly Android stuff?
 
@Zirak Nah.
According to GitHub I'm a JavaScript, Shell and Ruby hero. :P
 
I tend to avoid regex
 
3:36 PM
Don't ask me how Ruby ended up on that list ...
 
@OctavianDamiean write two languages, get one free?
 
@Shmiddty My main regret regarding regexes is the number of years I lost trying to avoid them
 
I use them where they make sense and don't obfuscate
And sometimes golf
 
weird_object.methods.sort.grep /!$/ #find "dangerous" methods
 
rofl
I still get notifications for this meta.stackoverflow.com/questions/190106/…
 
3:47 PM
@mikedidthis Ah, I think because of defac but I don't know why I forked that repo ...
 
@OctavianDamiean yeah I remember it said I was a java developer. :(
 
user1125394
!!rock
 
@cx paper >0, you lost!
 
@mikedidthis I'd complain to the GitHub support, I'd like to inform you that your interface is offending me by saying I'm a Java developer. Please tell your interface to stop harassing me.
 
@OctavianDamiean after the @Zirak lack of gold star incident, I am not speaking to Github period :P
 
3:50 PM
What incident?
 
I don't remember the full details, but wasn't he promised a gold star from github?
 
They issue stars?
 
@OctavianDamiean I saw yesterday that my biggest project was seen as PHP :(
 
user1125394
if it's a mix of languages..
 
I suppose the hordes of employers who look for me come to github just before they call me and then say "Hurgh! A PHP coder ! Let's never call him !"
 
3:52 PM
heh
 
I should sue them
 
@uservss Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
Seriously, sometimes I'd really love to get a gun and go visit some of those bastards that torture animals.
 
what, like IE programmers?
 
@OctavianDamiean urm.. you ok bro?
 
3:59 PM
Or I could get some gasoline and a fire extinguisher. I'd light them on fire, extinguish them, light 'em on fire again and keep going until it's over.
That sounds adequate.
@mikedidthis Just saw a report of a fucking idiot that chains up bears near chained up dogs which attack the bear until either the bear dies or the dogs die.
Now tell me you don't feel the same way I do.
 
@OctavianDamiean its is very distressing and sickening, but I am not so sure about the gasoline + fire.
 
I'd be in for that.
 
user1125394
didn't find out yet how to close SublimeText bottom search bar
 
@cx esc key
 
user1125394
oho! well done
 
4:03 PM
:D
 
This is actually a very ancient game that is also popular in Pakistan, but banned. en.wikipedia.org/wiki/Bear-baiting
 
I think the esc key closes most dialogues in Sublime (console etc)
 
@beta0x64 bear-baiter-baiting. Something I'd enjoy watching.
 
@OctavianDamiean I believe that is called blood sports
 
I know and it's a shame.
 
4:07 PM
There's worse out there
 
It's a shame that something like that is called a sport.
 
that's how I feel about curling
but seriously there's not much you can do about it
 
I know, because I'm too far away from those people.
 
CURLING KICKS ASS! STFU!
 
Probably the only reason I'm not in jail or dead yet.
 
4:09 PM
:polishes his stones:
 
@Adri Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
user1125394
!!urban dudies
 
@cx [dudie](http://dudie.urbanup.com/1507662) 1) A word used to describe something as great, normally used when someone is feeling happy or exited.

2) A wod to call someone
@cx dudies Someone who thinks vonage is alphadog.
 
a wod!?
 
user1125394
urban dict employs urban terms :)
 
4:13 PM
!!urban urban
 
@Shmiddty urban City-like. From the Latin word "urbs", which means "city".
 
omg omg omg omg
 
user1125394
you can factorize
 
> DELIVERY ESTIMATE TUESDAY JULY 30 2013
@SimonSarris ^
\o/
 
is this readable and clean?
$(".answer").each(refresh);
$(document).ajaxSuccess(function(_,_,options){
  var match = options.url.match(/ajax-load-realtime\/([\d;]+)/);
  if(!match) return;
  var ids = match[1].split(";");
  for(var i = 0; i < ids.length; i++){
    $("#answer-" + ids[i]).each(refresh);
  }
})
 
4:19 PM
@Loktar what editor do you use? (j/w)
 
sublime text 2
 
code completion?
 
no
 
I want Brackets for Linux so badly.
 
long variable names suck when tinkering :P i'm reading your code and just wondering how you manage it without going insane
 
4:21 PM
lol oh well for older code like that I used notepad++
 
haha (that is what i'm using)
but stock + theme change
no plugins
pretty much the reason I end up with two/three letter variable names
topLeft is a pita to write 19 times
 
user1125394
don't say you write tl
 
you know it
var tl,tc,tr,ml,mc,mr,bl,bc,br;
 
@JanDvorak Looks good to me, but why $("#answer-number").each()? Why not getElementById('answer-'+ids[i])
 
user1125394
@rlemon c as corner?
 
4:24 PM
t/m/b = top middle bottom
l/c/r = left center right
 
user1125394
ah indeed got it before, bah if you put that comment ^^ in the header of you .js it's fine
 
@rlemon I don't like that.
 
@Loktar when i'm done with all of this i'm going to do proper demo and have it step over each pass visually. I think it would be so much more helpful to see it when learning it
@cx I often do comment them as well.
 
Soooo, let's try to build CouchDB 1.3.1
 
@OctavianDamiean no one likes it - however when tinkering with the same algo over and over and over again 1/2 letter var names is a lot nicer :/
 
4:26 PM
:\
 
ohhh, I also meant to ask, @Loktar what is with Math.random(1.0) ?? :P
just a reminder what it returns?
 
user1125394
!!> Math.random()
 
@cx 0.5955096242358069
 
user1125394
(just checking)
 
@rlemon yeah
 
4:29 PM
k
 
lol like I said though I wrote that in like 2010 or so
 
confused about Math.random() 3 years ago?
 
I've came a long way in JS since then (imo anyway)
 
haha, yea well... I see my stuff from 2010 and cringe.
 
@obitusis Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
4:33 PM
!!Should I buy a Kindle Paperwhite?
 
@OctavianDamiean Impossible
 
!!Should I buy a boat?
 
@rlemon I expect so
 
so do i. so doo i.....
 
4:35 PM
@beta0x64 ah, right, thanks. refresh.call(getElementById('answer-'+ids[i]))
 
@rlemon The hell you want a boat for?
 
boat related stuff.
 
@beta0x64 wait, the element might not exist. The jQuery wrapper handles that case for me.
 
Makes sense, I thought you wanted one to slice bread.
 
also, my trunk is full and I need to get to international waters before the neighbors start to smell.
 
4:37 PM
ah okay
I tried
@JanDvorak I try to cut down on passing parameters directly as returned from functions. I find it nicer to assign function output to a variable, then pass the variable. I'm stupid though
 
user1596138
@rlemon Swim it across to Detroit.
 
@beta0x64 I'm torn between a little bit of inefficiency (jQuery magic) and explicit null-checking (your suggestion; faster and clearer but longer). I do like your suggestion, however.
 
@Jhawinsss couple of empty 3L faygo bottles and some rope should do the trick.
 
user1596138
@OctavianDamiean To feel cool?
 
var answer = document.getElementById("answer-" + ids[i])
if(answer) refresh.call(answer)
 
4:40 PM
@Jhawinsss Eh no, to use it.
 
wow. It's not really longer. Thanks
 
Nice
 
user1596138
@OctavianDamiean Wait, that's @BenjaminGruenbaum who trolls on linux. My bad.
 
!!/mustache obitusis
 
4:42 PM
HOLY POTATO CAMERA!!!
 
user1125394
nice quality
 
var plotCache = {};

function setPlotLines(action, vendor, type, name) {
    var setKey = vendor + '_' + type + '_' + name;
    if (action == 'add') {
        plotCache[setKey] = [];
        plotCache[setKey].vendor = vendor;
        plotCache[setKey].type = type;
        plotCache[setKey].name = name;
    } else if (action == 'remove') {
        delete plotCache[setKey];
    }
}
 
It'd make a fine minecraft face
 
user1596138
@all I want to implement something like Geek Dictionary into Caprica. We have /urban and /define already, but they lack a lot of terms that are relevant to the room. Thoughts?
 
@Neil nah. Too much resolution
 
user1125394
4:44 PM
@jbolanos plotCache[setKey] = {}; rather?
 
yea delete sucks
 
morning all.
 
why does delete suck?
 
@jbolanos it throws of V8
 
user1596138
!!define DRAM
 
4:45 PM
*off
 
@Jhawinsss DRAM (electronics) dynamic random access memory
 
user1596138
I guess /define does pretty much cover things.
 
how do I export highcharts as PNGs?
 
what's the alternate to delete?
 
set it to null
 
4:46 PM
@Jhawinsss delete throws off V8's anonymous classes, and forces each property access to be a hash lookup
 
user1596138
@JanDvorak I am not the skid you are looking for.
 
@Crowz You need your own export server or willing to use Highchart's public export server
 
> Javascript objects properties are typically implemented with a hashtable. Setting to null leaves the key in the hashtable pointing to a null value, while delete eliminates both the key and the value.
 
@jbolanos ... huh? There's no way to just get them as PNG or anything?
 
@rlemon what if I don't want the key to remain?
 
4:47 PM
!!define ARAM
 
then delete it
 
@Shmiddty It means I aint got time to learn your $5 words
 
but if you don't care keep it
are you enumerating over the properties later on?
 
@Crowz They are generated as SVG - Highcharts has a method for generating images from them - but you have to use a backend tool to convert the SVG to PNG
 
!!color f00,fff,f00
!!color f00
 
user1596138
4:48 PM
!!/define i7
 
@Jhawinsss It means I aint got time to learn your $5 words
 
@jbolanos v8 tries to make sure that elem.x takes no more than 1 CPU OP by guessing the anonymous class of elem beforehand. If you delete from an object, it becomes a hash map.
 
@Jhawinsss My pocket dictionary just isn't good enough for you.
 
user1596138
@Zirak I hate you for giving her this damn sass.
 
@Jhawinsss No definition found.
 
4:49 PM
g2g, sry
 
@jbolanos happen to know if python can do that?
 
@Zirak what IRC client do you use? Irssi?
 
irssi ftw
 
@Crowz java, php, phantomjs
 
is it possible to retrieve the raw SVG?
 
4:53 PM
Does no one user mirc anymore?
 
Never used it.
Was always a malware magnet.
 
I miss mIRC
 
I know someone who uses mirc still and makes fun of me for using irssi
irssi is not very pretty by any means
 
I'm using it in a shell so I don't care how fancy it looks. :P
 
yeah same here
 
4:55 PM
@Crowz in the Highcharts folder you downloaded - look in js/modules/ and get exporting.js - it uses Highcharts' server to do the export for you
 
@jbolanos but how do you use it to get the SVG? I have flask doing mostly everything
 
@Crowz that I haven't had to deal with so no idea - sorry
 
back in my irc days I used mirc
I need an SO chat client.
screw the browser
and a SO chat app for mobile.
 
I used to have my own file server on mIRC - it was a worthy successor to the BBS
 
user1596138
@OctavianDamiean Compare top to htop. Aside from the new functions in htop it's organized a lot better even though it's in a shell.
 
4:59 PM
1
Q: Apply multiple actions to one selector

ShapperI have the following: $('img, a').Tooltip( ... ); $('img, a').data( ... ); $('img, a').on( ... ); Is it possible in JQuery to do something like: $('img, a') { .Tooltip( ... ); .data( ... ); .on( ... ); } So basically declare the selector only once ...

 

« first day (1014 days earlier)      last day (3937 days later) »