« first day (1010 days earlier)      last day (3921 days later) » 

12:00 AM
is there any way to add html to an angular model and display it using {{}}
nvm found answer
 
@DannyBeckett =>, ..., destructuring assignment, TCO
 
@NagaJolokia What's ... - ranges?
 
@DannyBeckett rest parameters
e.g. function foo(a, b, ...c)
Well, not in the call, but in the definition.
 
The first three are already in latest SpiderMonkey nightly.
Modules.
 
12:10 AM
interesting.. need to have a play around with SpiderMonkey some time
check out new things
 
They do a build of a command-line interpreter which you can FTP; handy for playing around.
 
m59
It doesn't make as much sense like this, lol.
But it demonstrates what I need.
 
> Function return types are on a separate line preceding the function name.
void DoThis() /* bad */
{
...
}

void
DoThis() /* OK */
{
...
}
Wonder why they have their coding style like that... wiki.mozilla.org/JavaScript:SpiderMonkey:C_Coding_Style
 
m59
@BenjaminGruenbaum "options" in this example will have the same set value, but in the context I'm actually in, they will be different. I need a way to go in that pluginSetup() function and put those options in a scope for $plugin.
 
> Comment /* FALL THROUGH */ in place of missing break when intentionally falling through from one case-controlled statement sequence into another, or into the default statements.
that's a good idea actually. I should start doing that
> In a conditional, if the consequent (and, if present, the alternate) is a single statement, no braces are used.
Woohoo! Jon Skeet told me off for this!
e.g.
if (today == "Tuesday")
    puts("I don't have my wallet on me.");
else
    puts("I would gladly pay you on Tuesday for a hamburger today.");
 
12:22 AM
Morning peeps
 
8:22 here o.O
p,
pm*
 
!!/time
 
alright mate
 
@monners That didn't make much sense. Maybe you meant: timer
 
@monners Trying to parse the DOM took the p!ss... ended up resigning myself to RegEx.... despite all the warning signs I usually throw out, like the link to the Parsing HTML with RegEx question
Seems Webkit flat out won't work with standard JS
 
12:24 AM
@DannyBeckett Ouch!
 
Currently throwing comments all over my html templates....
<div class="period">{{section_10_5_from}}<!--[education5to]--> - {{section_10_5_to}}<!--[/education5to]--></div>
 
!!> (new Date()).now()
 
@Gacnt 1374463591048
@Gacnt "TypeError: (intermediate value).now is not a function"
 
Then parsing the string, like, if(!data['education5to']) ..psuedo.. remove with regex pattern
 
!!> Date.now();
 
12:26 AM
@NagaJolokia 1374463643519
 
Is it that time already?
 
What the hell format is that?
 
@monners Unix timestamp
 
How do you translate it into something readable?
 
It's the number of seconds since 1/1/1970
Since the Epoch
 
12:36 AM
!!> new Date(Date.now());
 
@phenomnomnominal "2013-07-22T03:36:51.505Z"
 
So it's been counting for over 43 years?
 
!!> alert('Too bad I'm in the mindjail');
Yup
 
What timezone is it based in?
 
In the fields of chronology and periodization, an epoch is an instant in time chosen as the origin of a particular era. The "epoch" then serves as a reference point from which time is measured. Time measurement units are counted from the epoch so that the date and time of events can be specified unambiguously. Events taking place before the epoch can be dated by counting negatively from the epoch, though in pragmatic periodization practice, epochs are defined for the past, and another epoch is used to start the next era, therefore serving as the ending of the older preceding era. The w...
 
12:38 AM
@DannyBeckett milliseconds in JS though.
 
!!> new Date(0)
 
@monners - actuallly, there's a little gremlin sitting in Greenwich counting it's ass off
 
@phenomnomnominal "1970-01-01T00:00:00.000Z"
 
Click that Wiki link - it's an anchor
 
@adeneo And I thought my job was boring
 
12:39 AM
Lol...

> December 31, 1840 - MUMPS programming language - rationale: 1841 was a non-leap year several years before the birth year of the oldest living US citizen when the language was designed.
 
Also, it's really important when using epoch that one is aware of the big timezone change in Shanghai. That's why some peeps get all the votes -> stackoverflow.com/questions/6841333/…
 
^ Bitches love guys who know about timezones
2
And by bitches, I mean the lovely people of SO
 
I've been called worse
 
will they ever change epoch time
eventually the int is going to be quite long =/
 
Got confused for an Account Manager once... That hurt
 
12:44 AM
The Year 2000 problem (also known as the Y2K problem, the Millennium bug, the Y2K bug, or simply Y2K) was a problem for both digital (computer-related) and non-digital documentation and data storage situations which resulted from the practice of abbreviating a four-digit year to two digits. In 1997, The British Standards Institute (BSI) developed a standard, DISC PD2000-1, which defines "Year 2000 Conformity requirements" as four rules: # No valid date will cause any interruption in operations. # Calculation of durations between, or the sequence of, pairs of dates will be correct wheth...
 
@monners By whom? I want names! We're the rudest bastards dammit!
 
read that, go to the bit about the 2038 problem
 
so instead of changing epoch they just upped to 64 bit =/
 
@NagaJolokia It doesn't matter, they're no longer of this world
 
great more data to process instead of making it smaller =/
 
12:47 AM
!!> new Date(9999999999999)
 
@adeneo "2286-11-20T17:46:39.999Z"
 
Wish I could make this project smaller... approaching 5k lines of JS. Nasty stuff :p
 
5k ? thats nothing
 
It's a lot for JS lol
 
not really
 
12:47 AM
not really
 
although it depends on your aim
 
my ray tracer is 20k and counting
 
what are you making
 
CV/Resume maker
for Adobe AIR
(not by choice, paid job)
 
and its taken 5k lines :S?
 
12:48 AM
5k
 
i just threw up a little bit
 
to make a text editor?
 
lol
 
actually, a lot of that is HTML and CSS
the JS itself is at about 3k
 
12:49 AM
with / without a library or you made your own?
 
without
can't stand them
 
still seems quite high for a text editor thing
 
I'll probably be persuaded to try jQuery some time, but not yet
 
my isometric game is about 8 to 9k
so far
 
Yeah it's ridiculous
 
12:50 AM
for a game 9k is nothing :P
 
jQuery uncompressed is 10K lines, but it's the bytes that count, not lines
 
Manipulating Word documents etc
PDF's
 
if your being paid .. jQuery does make your money per hour better
@adeneo true
 
the JS is around 100k
 
How do you access the info in a pdf doc via js?
 
12:51 AM
100k lines
 
Lots and lots of very long AIR function names
no, filesize
 
oh
 
@monners I found a very nice CLI tool for that actually
wkhtmltopdf
 
link?
 
Uses a .exe for Windows, and a compiled bin for Nix/OS X
Use an AIR NativeProcess to launch it. Sends the HTML to it for conversion to PDF
The only f*cked up bug I've found, it doesn't like <img>'s for some strange reason
 
12:53 AM
What does it return?
 
Having to use a div with a background-image instead
 
@monners - explore the source of pdf.js and find out -> mozilla.github.io/pdf.js/build/pdf.js
 
a PDF file
I looked at pdf.js and another one
Was a PITA to have to write a bunch of commands to essentially 'make' the PDF
 
@adeneo That's why I asked for the link. Cheers
 
wkhtmltopdf is serverside, and requires some setting up
 
12:54 AM
it isn't
it's just an executable
 
> -*- Mode: Java; tab-width: 2;
wat?
 
wkhtmltopdf.exe input.html output.pdf
I see what you mean though. Becomes less useful when used for a website instead of a client-side app like this
 
@DannyBeckett - Well, yeah! I've used in a project once with PHP, but you could run it on a servers commandline, or you local computer or whatever, but it doesn't run in the browsers
 
There's also jPedal for java
 
12:59 AM
Java sucks donkey balls :p
 
Actually, Java and C# are both great languages
 
...ah you're Norwegian... met a few Norwegians who swear by it
 
But java on the clientside sucks
 
Yeah I love C#
Apparently Oslo Kommune likes Java... thedailywtf.com/Articles/Classic-WTF-Java-is-Slow!.aspx
 
I'm sure they do, I don't really, but it's still a great language.
 
1:03 AM
@Pabce 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.
 
Some morron in norway decided to use JVM for the login system for all banks in the entire country. Big mistake!
 
Lol
You mean the little oval thing with the button?
Generates a 6-digit code or something?
(I lived in Oslo for a bit)
BankID
that's it
or maybe not.. idk
 
@DannyBeckett - yes, that's it. Requires JVM installed in the browser to run
 
Yeah, that thing
You just reminded me actually.. I had my gf calling me asking why nobody could login to their bank one morning
It was cos of a Java exploit... Java was disabled in Chrome soon after, or something
 
Java is the COBOL of the 21st century.
 
1:07 AM
Luckily for me, I skipped that Java shit every time I logged in. Just use my date of birth instead :p
 
@DannyBeckett - happens all the time, a new version without Java is coming soon, or so they say. The article above is about that, but they mixed up Java and JavaScript, great reporting !
 
lol
Miss the Norwegian girls man
 
I bet you do
 
Favourite past time on the bus ride from work, staring out the bus windows at all the blondies in latex jogging :p
 
I'll bet you miss the great weather too
 
1:10 AM
AHAHAHAHAHA
Fucking funny :D
 
m59
@BenjaminGruenbaum Here's a much simplified version. See the line I have commented out. This should very simply demonstrate what I need to happen.
Dunno if you're still around at all..
 
When I left it was -38C
 
!!/weather manchester, uk
 
@NagaJolokia Manchester: 13.64C (286.79K), scattered clouds
 
Once it goes below a certain temperature it all feels the same to me.
 
1:11 AM
!!/weather Melbourne, Australia
 
@monners Melbourne: 10.16C (283.31K), overcast clouds
 
Trust me, you feel -40C :p
 
!!/weather Texas, USA
 
Snow up to your knees trying to get to work
 
@monners [](openweathermap.org/city/4671654): 82.454F (28.03C, 301.18K), Sky is Clear
 
1:11 AM
!! /weather oslo norway
 
@adeneo Oslo: 16.3C (289.45K), Sky is Clear
 
!!/weather Wellington, New Zealand
 
@phenomnomnominal Sorry, I couldn't get the data: Error: Not found city
 
Yeah, but if it's not raining ...
 
!!/weather seventh-circle, Hell
 
1:12 AM
@monners Sorry, I couldn't get the data: Error: Not found city
 
@NagaJolokia Are you saying 14C is cold...?
 
30C is warmish, 35-45 is nice.
 
Used to get some nice hash in Oslo actually
 
From all the nice immigrants in the park ?
 
1:13 AM
haha yeah
 
@NagaJolokia Jeez. That's way to hot for me =/
 
@phenomnomnominal Wellington: 12.475C (285.625K), light rain
 
at least it wasn't from by the canal :p
 
Look at that tweet, and look at the weather
 
1:14 AM
55-70 F is fine for me, out of that range I get mad >.<
 
on the picture
 
!!/weather South Pole
 
@monners Tucumcari: 87.035F (30.575C, 303.725K), few clouds
 
@DannyBeckett - It was 32C yesterday (in oslo, daytime, it's night now)
 
Not bad at all!
 
1:15 AM
Dunno but -20C feels the same as 0C to me. It's all cold.
 
Oooo, weather's nice down there
 
We had the same in England yesterday
 
@NagaJolokia - then you haven't lived somewhere with 7 months of winter and -30-40C
 
@NagaJolokia They make nice thick coats over there anyway.
Exactly!
 
@adeneo The lack of daylight would be much worse than the cold for me. :-(
 
1:17 AM
That's only in the far North
 
Yeah, in the winter the sun never sets on Svalbard
 
on Svalbard
 
No thanks!
 
My ex goes there every 2 months. Apparently you're required to carry a shotgun with you at all times in case of polar bears
 
been there, done that, not going back
 
1:18 AM
lol :p
Ever gotten close with a polar bear?
Like, had to shoot..
 
Nope, never even seen one.
Just been there twice for some work
 
ah ok
 
cheap booze and smoke
 
I hear they're very protective of their Coca Cola
 
1:23 AM
I guess the silence means it's time to get back to work
 
more like time to go to bed
 
lucky for some
@AshKetchum Did you get that working the other night?
 
@DannyBeckett The htaccess thing?
 
Weren't you trying to do something with having 2 Apache servers?
 
Yeah, but I am no longer pursuing. I ended up installing XAMPP on laptop and going from there.
 
1:37 AM
Ah ok
 
But sadly, htaccess is giving me problems now.
 
What's up?
 
I am kinda debating if I should switch back to live.
 
m59
still? man that sucks
 
Oh, I remember
 
1:37 AM
It does. It's halted all other development.
 
You were rewriting to absolute URLs, right?
You can just setup a domain on your laptop you know
 
Yes.
 
Using a VHost in Apache and the Windows HOSTS file
I.e. make your laptop think that abc.com actually points to your laptop
So you can type abc.com in to your browser, and it will come up
I have a batch script to setup a new domain if you want it
 
@DannyBeckett That's nice of you, the problem I am currently facing is with mod_rewrite.
 
Explain the problem again briefly?
I seem to remember you had your original machine rewriting to example.com/?abc
Instead of /?abc
 
1:42 AM
mod_rewrite doesn't work despite being enabled.
 
So you were having problems when migrating to another machine
Restarted Apache?
 
htaccess was working fine on the live server but is all messed up on xampp's localhost.
I restarted it so many times that I can't even remember.
 
lol
Do you get an error 500?
 
Error 404
 
Your .htaccess is in C:/xampp/htdocs, right?
 
1:44 AM
Its inside the project folder.
 
Ok, but your document root?
That dir, by default
 
I changed the DOCUMENT_ROOT to "C:/xampp/htdocs/Test" where Test is my project name and contains all files.
 
so localhost points to the index.php file in Test/
 
Make a file called phpinfo.php
Put it there
Inside it: <?php phpinfo() ?>
 
1:45 AM
Yeah, I have one already.
 
Open it
Ctrl+F for mod_rewrite
Any matches?
 
@kaesve 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.
 
@DannyBeckett Yes. One match.
 
Then it's enabled
 
Funny thing is, I put the htaccess code inside the <Document> block for DocumentRoot inside the httpd.conf file.
 
1:49 AM
and it worked?
 
Yup. I know this line at least was working: ErrorDocument 404 /error.php since it is pointing me to that custom error.php page instead of the default "Object not found!" page.
But the URL rewrite is still not working.
Would you like to see a sample of the rewrite code to see if it has any errors in it?
 
Thing is, if it had errors, it should show an error 500
 
It shows 404
 
Post it though
 
@DannyBeckett Here is one line from it: RewriteRule ^bio inf/bio [L]
 
1:53 AM
Above your rules, do you have RewriteEngine On
 
With that line, I'd expect the url "localhost/inf/bio" to be rewritten as "localhost/bio"
Yes I do.
RewriteBase /
RewriteEngine on
 
Enter some crap in to your htaccess file
localhost should error 500 if the .htaccess is actually loaded
If it doesn't, it's an Apache config problem
 
It doesn't, I get:
Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

localhost
Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.16
 
The 2nd answer has a good point actually
Do you have:
<Directory ..>
    ...
    AllowOverride All
    ...
</Directory>
in your vhosts?
 
By the way, as I said earlier, I have changed the DocumentRoot to /xampp/htdocs/Test
instead of just xampp/htdocs.
 
1:57 AM
See, I think that's what's causing it go a bit mad
I seem to recall there being at least 1 more var to change, if you change doc root
 
m59
@BenjaminGruenbaum I get the impression you're not really here, but I'm going to keep messing with this until I get it. Here's another version that shows my intent a little better. Still very simple. jsbin.com/esohan/3/edit
 

« first day (1010 days earlier)      last day (3921 days later) »