« first day (1785 days earlier)      last day (3146 days later) » 

12:17 AM
@Srle if I recall correctly, socket.io 1.0+ actually starts by polling and upgrades to websockets if supported
so you might see a couple of those requests even on browsers that fully support ws
 
@ʞɔᴉN it looks like starting with polling, upgrades to ws and falls down to polling again
 
ouch
are you using IE6? :)
 
nope :D
IE2 :P
 
classic Calvin
 
no really, it is chrome last stable version, and grab.by/KbnW is network tab
 
12:28 AM
that's dedication my friend
 
12:53 AM
@ʞɔᴉN using 1.3.6 it seems that transports options must be provided :(

// Client side
var socket = io('http://localhost:8080', { 'transports' : ['websocket', 'polling'] });

// Server side
io = require('socket.io').listen(server, { 'transports' : ['websocket', 'polling'] });

In that case transport is websocket
 
oh really? I haven't ever had to do that, but then again the last time I was really using socketio was a few months ago
 
1:11 AM
@ʞɔᴉN months
 
user406009
@SomeKittens You see, ʞɔᴉN, actually travels backwards in time. That's why he gets so confused when features "disappear".
 
"features"
 
socket.io's documentation is pretty crap and they don't seem to track all these changes
at least not in a place where i can find it
 
Have you tried SocketCluster?
 
nope
do you recommend it?
 
1:15 AM
I've started playing with it
it's pretty intense
 
it looks pretty intense, not sure how to use it
 
WITH YOUR BRAIN
 
SOMEONE TELL ME HOW TO USE IT
 
DOCS
AS IN YOU NEED ACTUAL DOCKTORS
 
1:31 AM
@Lalaland Didn't seem to change. When I start my node server inside a directory, the server decides to basically take over and I can't access any other content on the folder besides my own files.
 
user406009
@DemCodeLines You need to configure the port for the node server.
 
user406009
3000 or something is good.
 
It's on 3000. Basically, once I do npm start, test.dev.com automatically becomes test.dev.com:3000/#!/home and there is no way I can access test.dev.com/1/index.php
 
user406009
Are you willing to post your apache config? Or at least most of it with names/etc changed?
 
@Lalaland Not sure how helpful, but I've got this:
<virtualhost *:80>
    ServerName dev.website.com
    ProxyPreserveHost on
    ProxyPass /lab1/ localhost:3000
    ProxyPassReverse /lab1/ localhost:3000
    Alias /lab1/ /web-root/set1/lab/lab1
</virtualhost>
 
1:45 AM
ditch apache
nginx4lyfe
 
user406009
Aren't you missing a "DocumentRoot /blah/blah" somewhere?
 
user406009
Do you happen to have another <virtualhost *:80> block somewhere? You are only supposed to have one.
 
<VirtualHost *:80>
  ServerName rlemon.ca
  ServerAlias rlemon.ca
  ServerAdmin admin@rlemon.ca
  DocumentRoot "/var/www/otherdomains/rlemon"
  <Directory /var/www/otherdomains/rlemon>
    AllowOverride All
    Allow from all
  </Directory>
</VirtualHost>
from my old apache configs
before I saw the light
 
user406009
Using a <Location> directive so that either the document root or the proxy pass is targetted correctly.
 
@Lalaland That's the only virtualhost there.
The node files are in /web-root/set1/lab/lab1 and ideally when I start the server, I'd like to access it on dev.website.com/lab1
 
user406009
1:51 AM
Actually it looks like Location is unnecessary for ProxyPass. Try adding a DocumentRoot or whatever you had in your original config to that new config.
 
Adding documentroot declines to work.
Still the server it running and is only accessible at dev.website.com:3000 and no where else
 
hey es6 guys, have any of you built jshint into your build process?
just starting up a small es6 + Node.js project, hopefully es6 for both client and the server
 
I use TS, which has its own checking
 
TS?
oh typescript
interesting.
 
Terra Scape
it is a new thing
 
2:04 AM
yup.
:D
 
user406009
@ElliotBonneville I use flowtype.
 
user406009
It's quite effective.
 
ok, I think I got ST back up and running
whew
 
flowtype, interesting
 
user406009
ESLint is supposedly the newest lint tool, with better support for ES6. Haven't really tried it out yet though.
 
2:07 AM
(I'm using grunt)
I think I'll give that a whirl, see how it goes. thanks!
 
Ok, time to make a list of things to do this weekend
 
2:29 AM
Alright, it can't be that hard to find out a running node app's base URL, can it?
 
__dirname
 
user406009
@SomeKittens 1. Troll the bread pit. 2. Post your cat gif collection in chat. 3 ??? 4 Stars, endless stars.
 
@ElliotBonneville Gotta get it from the console.
 
process.cwd()
 
sudo npm start => Port 80 is already in use. lmao
 
2:37 AM
Hey guys! Does anyone use PostgreSQL here? I'm at the download section and there's a Stack Builder configuration option
I don't wanna screw anything up so I'm not sure which part of Stack Builder I should download
 
@OneRaynyDay What OS?
 
Mac OS X, v.10.9.5
 
@SomeKittens O_O does this download the same postgres-xxx-xxx.app as the installer on postgres's official website?
 
It's got postgres 9.4.4
 
2:46 AM
@SomeKittens Ah yeah, I think I have the same version currently in process of downloading.
 
postgres.app is WAAAYYY easier
 
Oooh.. Okay, I'll go uninstall this then haha
Thank you for the link! One minute ^_^
 
so right now my basic build process is webpack -> eslint -> babel, which should in theory generate a server.js file I can run with node
but I can't require things
get undefined errors.
 
@SomeKittens bleh I'm not sure why but my old postgres is still running. quite a bummer
One second.
 
am I going about this an insane way? is there a single grunt module that'll eslint and compile my files to regular js? or is this the best I'll get right now?
 
3:01 AM
@SomeKittens errr.. getting some errors somekitty
LOG:  could not bind IPv6 socket: Address already in use
hongshuhongs-MacBook-Pro:~ hongshuhong$ sudo lsof -i :5432
Password:
COMMAND  PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
postgres 954 postgres    4u  IPv4 0x60339613e33d9313      0t0  TCP *:postgresql (LISTEN)
postgres 954 postgres    5u  IPv6 0x60339613e01016b3      0t0  TCP *:postgresql (LISTEN)
hongshuhongs-MacBook-Pro:~ hongshuhong$ sudo kill -9 954
I killed it specifically and yet it's not listening on the port because "it's already there"
 
ah
I'm not sure
 
blehhhhh
welp, now it says there's a lock on the server.
I'll have to remove that too... but I'm not sure if it's a part of the new PostgreSQL.app
 
anyone here ever play M.U.L.E?
such a great game.
 
brb restarting comp
slowly dying... getting fatal errors everywhere
Okay I give up LOL... this is what happens when I download two instances of anything. I'm going to install another instance for the uninstaller and wipe everything and try again QQ
@SomeKittens btw do you have a kitten? Just curious because I have one and it needs some behavioral changes... don't know what to do LOL
 
3:36 AM
omg it works PRAISE THE HELIX FOSSIL
 
@FlorianMargaine interesting. I am curious about some parts of the code, like why does github.com/ralt/hermes/blob/master/pam_hermes.c#L72 (and the likes) not use perror? And is the indentation of the goto label at the end a convention?
(ofcourse not reviewing code, just learning by reading myself)
 
@OneRaynyDay Not currently.
 
@SomeKittens ah, so you've had one before?
 
@OneRaynyDay squirt bottle.
 
@phenomnomnominal I made a hole in my waterbottle and sprays it with the bottle
it enjoys it unfortunately...
Or it doesn't care
 
3:43 AM
negative reinforcement doesn't work well with cats
 
yeah... but sometimes when I'm sleeping with it, and it wakes up first, it just chews my face really hard - like not playfully biting
I have 3 small lines across my face from yesterday night LOL... I tried putting it inside its own little room tos leep but it keeps clawing on the door at night
 
user406009
@FlorianMargaine Is there a bug on github.com/ralt/hermes/blob/master/pam_hermes.c#L77? Shouldn't it be: if (bytes_read < FINGERPRINT_LENGTH) {
 
@Lalaland yeah wondering the same, maybe he is ok with 1 byte as well :/
 
user406009
Anyways, that code is clearly incomplete.
 
user406009
He hasn't done the actual authentication yet.
 
3:53 AM
well he just said "real work begins" so I guess that's right
 
Upgrade Complete.
 
user406009
@rlemon Are you now running Troll 2.0?
 
user406009
It's much more effective.
 
yes
Troll 2.9
 
 
1 hour later…
5:25 AM
Damn... that benjamin gruenbaum post got me good
I even told my friends about the news and they were like woah seriously
after a few hours I click on the link.............. fml
 
5:49 AM
MORNING
anyone can help me with regex to convert string '2^4^3' to 'Math.pow(Math.pow(2,4),3)' ? I am stuck at str.replace(/(\-*[0-9]+\^\-*[0-9]+)/g, 'Math.pow($1)').. :(
 
/(\-{0,1}[0-9]+)/
{0,1} = ?
 
{0,1} = *
 
6:06 AM
* = {0,} actually?
 
 
1 hour later…
7:24 AM
@choz I personally won't use regex for that.
 
 
1 hour later…
8:27 AM
i like mushrooms
dont do drugs kids! i'm talking about edible ones
 
Magic mushrooms are edible
 
8:44 AM
The Perl ones are spot on
(And I'm not bitter about spending my first year after school maintaining someone else's Perl code)
 
lmao, :mq for vi
 
9:23 AM
oh, and btw, vi is much better than emacs
 
#RealProgrammersUseButterflies
 
is there a reference I don't get?
 
!!xkcd real programmers
 
@Callum That didn't make much sense. Use the !!/help command to learn more.
 
Oh, and GNOME Builder is pretty decent.
 
I'd go for Sublime, but I prefer opensourced apps over non-opensourced apps
But yeah, Builder is quite good.
 
I'd use Builder mooore when I get a larger screen (-res).
 
I'm stuck on a laptop, so maybe not as efficient as I could be with it.
 
Yeah, me too :(
 
1366x768, it could be worse I suppose.
396.24mm diameter, so again - it could be worse
 
9:40 AM
oh, same res here on a 15" screen. It is okayish, although I'd like 1080p or something. Working with devtools at this size is horrible.
 
This is the only size of screen I've ever had, so I'm very much used to it
 
9:53 AM
<i8b4uUnderground> d-_-b
<BonyNoMore> how u make that inverted b?
<BonyNoMore> wait
<BonyNoMore> never mind
 
0
Q: Testing promises with mocha chai and sinon

vamsiampoluI would like to test my promise resolve handler and promise rejection handler using mocha,chai and sinon.In addition,I have got the sinon-chai plugin and sinon-stub-promise plugin set up. This is my block of require statements: var chai = require('chai'); var expect = chai.expect; var sinonChai...

 
If I have a container with flex-wrap: wrap; is there any non-hacky way of making it wrap after, say 6 children?
Closest I have so far is flex-basis: calc(100%/6);
But then I don't get any spacing between children
 
10:09 AM
calc(100%/6+50px)? Just guessing
 
That will just make them wider, not introduce whitespace :)
 
give them margins or padding?
calc(100%/6-10px)?
 
That works, but then I don't want margin/padding on the last item in a row
I'm starting to think I need a fullblown responsive grid
or caniuse.com/#search=columns if browser-support wasn't so spotty
 
padding + negative padding on the container?
 
hm... maybe
that worked but it also demonstrated to me that I've approached this problem wrongly, I've discovered that what I really wanted was to break after nth element only when the screen is wide enough to have room for n+1
I'm doing this the wrong way
 
10:18 AM
media queries?
 
Yeah, I could do that. Or I could just do display: inline-block; and restrict the width of the container
which I just realized
 
but then they don't stretch
 
I actually don't want them to stretch, that's the problem
I have this disease where I see a new tech (here: flexbox) and I try to use it for everything I'm doing
 
Ah. Then display:inline-block with margins
also remember that margins collapse, which should handle the first/last element for you
 
That didn't parse, what do you mean by collapse?
If I have en element at the edge of my container and increase the margin, it jumps down, is that what you meant?
 
Got it, thanks
Ungh, I don't think there's any escaping mediaqueries here
 
any reason to escape them?
 
I don't want to write them if I don't have to
making a codepen atm to show what exactly I'm struggling with here
 
Oops, ping spam. Sorry
 
No worries, and thanks for link. Checking it out :)
 
10:38 AM
@monners @MadaraUchiha potential canon candidate
 
@AwalGarg Yeah, I kinda wrote it that way, but figured maybe everyone else already knew about it :p
God I love flex-box. If only all of my projects were as progressive as some with respect to browser support.
 
@monners That's a good answer!
 
@SomeGuy Thanks. It's gotten next to zero attention. But one day... Just planting seeds :P
 
You've got a few upvotes incoming
 
Haha, smart man
 
10:43 AM
Maybe bootstrap will have a heart attack and suddenly people will have to write their own grids
 
@AwalGarg err, I guess I could use perror. I have to look at its usage vs fprintf(stderr, strerror())
 
btw, use flexbox even if it's not progressive imho, and write fallbacks
 
@Lalaland indeed, that's a bug, thanks for catching it :)
 
But don't be like me and use 2.x of Modernizr to test for flexbox, use 3.x unless you want IE10 bugs
 
@Lalaland and yes, the auth part is not finished, I just made the "find the Hermes USB stick" part for now, and decided on the binary protocol
 
10:46 AM
@monners Can't apply that directly since I need fixed widths on my children but still a good answer
 
What's left is fetching the key (should be relatively easy with the protocol I made), and write the gpgme dance
At this point I'll have a hardcoded prototype
 
@ivarni If you need fixed widths on your children then shouldn't it be easier?
 
Then I'll add some mapping between user and gpg keys, and afterwards some CLI to format the USB sticks as needed
 
Ya don't have to worry about ratios :P
Hell, you could even just use floats
 
(i.e. formalize the stuff in the scripts/ folder)
 
10:49 AM
@monners Yes, this pretty much. I'd still be interested to see if that could be done with flexbox
 
@AwalGarg the indentation of the goto is the convention, yes
Thankfully emacs does that on its own
 
@FlorianMargaine weird convention
 
It makes sense, the code in the goto should be at one level only
 
why is the goto keyword space prefixed?
 
@ivarni Not sure what I'm looking at. What's the issue, the wrapping?
 
10:53 AM
@monners The issue is solved already, but the issue was having margin on the last item in a row, which I solved with the negative margin on the wrapper
 
@Lalaland do you know your way around autotools and shared libraries and headers? I tried to split the file yesterday but couldn't get it working. I know how to get it working for a binary, but not for a shared library :/
@AwalGarg dunno, emacs does that
 
I guess now I'm mostly wondering if I was an idiot for using flexbox in the first place when it's that simple with inline-block
 
good excuse to never learn emacs, thanks
 
@ivarni As tempting as it is to use flexbox everywhere, I've found it actually only solves a fairly specific set of problems. That being said, I'll use it even if all it does is allow me to avoid having to apply a clearfix :P
 
Hell I've used it to center shit vertically
 
10:57 AM
That'd be one of those specific problems :P
 
Still feels weird to use text-align to center vertically with flex-direction
 
@AwalGarg :)
 
Flush margins! Woot!
Image how simpler the world would be if designers didn't know about JavaScript...
 
Or if they just gave us templates and css (that didn't suck)
 
11:04 AM
@ivarni Then I'd be out of a job :P
 
That's a good point...
Speaking of which, now that I've figured out how to do this thing I should probably get around to actually doing it so I can bill for it
 
@ivarni What is this thing?
 
@monners It's for a CMS I'm making. They have a list of pages they link to, each goes into a box with a corresponding icon and they want a layout like that
I was just playing around with ideas for how to lay it out
 
Building a CMS eh?
 
well, configuring one more like it
actually pretty nice to work with
 
11:10 AM
My colleague and I are actually working on something at the moment to decouple our company's choice of a CMS from the templates.
Our API is beautiful, the CMS's is not :(
 
Yeah, they have a solution now in Orchard (some .NET shit) and I just told them I'm not touching that shit even if it's just a redesign so now they asked me to redo the entire thing
 
0
A: Testing promises with mocha chai and sinon

vamsiampoluThis line of code here is wrong: expect(resolveHandler).to.have.been.called(); called is just a property on the spy whose value is always a boolean and can be simply tested using chai like this: expect(resolveHandler.called).to.equal(true); Similarly instead of this line to confirm that the...

 
@ivarni That's not the worst scenario to be in. You've probably got your work cut out for ya, but nail it and you'll be the man! there.
 
is the answer any good
 
@monners Oh I'm pretty much done already and I've only spent like 20 hours
It's not a complex site by a longshot
 
11:13 AM
So you've avoided the .NET POS?
 
Yep
 
Is it an internal app, or client facing?
 
client facing
 
Woah, ok. That's a pretty ballsy sell.
 
I just had to do it when they asked. I get to decide the entire stack and it's client facing. That's the two best things I know
 
11:15 AM
How complex is the control needed in the CMS aspect? Just a couple of fields, or full WYSIWYG areas, etc?
 
They have some WYSIWYG content, which is the only thing that terrifies me
keystonejs ships with TinyMCE and the HTML it produces is terrible, I just have to make sure I don't accidentally fuck with it
 
Heh, yeah. Have you thought about using a markdown editor instead?
Pretty hard to fuck up markdown
 
The thought crossed my mind but they're used to TinyMCE from the old Orchard site
 
Do they actually need anything more than what markdown offers? I'd argue that it's worth the time of training them.
Otherwise you're just one copy/paste from word away from failure :P
 
I've told them that if they copy paste from Word they're on their own. Which is pretty much the same thing the dev that made the previous site told them :)
But yeah, I might try to sell them on markdown
 
11:21 AM
And that's what we do. They never listen...
I've seen a few really decent MD editors that preview and teach the editor as they use it.
I feel pretty strongly about this. Recently spent about a week stripping hundreds of <p>&nbsp;</p> from a website
 
I'm stuck with whatever editor keystone uses, as the entire admin UI is autogenerated but I might check it out and see if they have a good one
@monners Yup, they've got that. I made a screen scraper for them last year to feed content back to a mobile app and $$('p').length on any given page returns horrifying numbers
New site will be mobile-friendly though, so I can throw away the scraper when we launch and the app can just webview the pages it wants
 
Are you scraping on the server or client? o.O
 
It's a horribly hacky solution, the scraper gets a request from the app, goes and fetches the page, cleans it up and serves it back
 
Ugh... I've been there. I hate myself for it, but sometimes it's the only thing you can do. Hence Markdown :P
 
Yeah, I told them straight up that a scraper is a terrible solution but they couldn't find anyone willing to touch the .NET code
 
11:28 AM
lol, or train their editors to use the editor properly?
 
the problem is that the entire site needed a redesign to even work on mobile
it's archaic
which is why it's getting replaced :)
 
Ah, the infamous don't rebuild it, just 'refresh' it
 
But I won in the end and now it's getting rebuilt \o/
 
o/
On a more positive note, I was assigned a 6 year old site the other day that they wanted to make responsive, and the markup was so clean that it was actually possible! Who knew!
 
That's great :)
 
11:32 AM
It's moments like those that renew my faith in the web community :P (at least in my country)
 
You should write a thank-you mail to the previous dev ;)
 
lol, he's my boss
 
Great, then you have his mail-address :D
 
I expressed my surprise and appreciation :P
 
> Your account is suspended because:
Account callumbarclay.scot exceeded allowed 70% CPU quota limit for more than 61 times. This is considered abnormal as it causes a high server load and overall slowdown. Website must be secured and optimized or removed form the server
Thanks Obama PHP
 
11:34 AM
How'd you manage that?
 
I've got some PHP code, y'see,
 
Granted, but still...
 
I'm assuming PHP sees that it can use more of the CPU, so it does to make it faster
 
Errr, no.
 
Nope?
So just PHP being inefficient then.
 
11:36 AM
Have you got a whole bunch of endless loops, or a bitcoin mining operation in there somewhere?
PHP by itself doesn't melt servers
 
Nope, I'm checking a list of ~6000 words a few times a day
I assumed that it'd be fine, but apparently not.
Tempted to make an actual processing run in JS
Just updating word lists, etc., running in PHP.
 
Ya know there's a PHP room?
 
Random question: Does anyone know if it is possible to create a torrent that is merely a collection of other torrents? :-)
So if you have the 'collection' torrent you'd still be seeding to the individual torrents?
 
@monners Yup, but I'm leaving that till I want to end everything.
 
@Callum End everything?
 
11:41 AM
@monners Mhm.
 
i.stack.imgur.com/wiNkp.png <- wat is even going on here? Where's that extra space outside the margin even coming from? wtf css?
 
@ivarni inline-block does that. It's the whitespace character that's added
 
aha
 
Well, not added, but it's kerning
If you put a <!-- --> between the elements then that won't be there
But that's not really a long-term solution :P
 
wow
 
11:47 AM
!!google adobe blank font
 
Is there any way to tell how wide it will be so I can adjust for it?
 
Not really. Check out the font above. If you apply that to your inline block elements then that'll take care of the white space (and introduce a whole lot of other problems). Or you could just float your elements.
It's a hack though. You're applying a font that, I think, has zero kerning, so inline-block elements sit flush.
 
Sounds better to float then
well I made it pretty far before having to make a clearfix mixin
 
Yeah, but then you've gotta clear your float if you're doing anything underneath it in the layout
 
11:50 AM
Days since last .clearfix(): 0
 
You could use flexbox :P
 
TIL how to clear cookies per-site in mobile chrome, finally
 
@JanDvorak eh?
 
It's not that intuitive, IMO
 
Sorry, I meant I don't actually know what you mean, not that's news to you? :P
 
11:54 AM
in webGL, when people get shaders I always see them iterate through the text node kids of the script containing the shader and adding their text content to a string, then using the string as the shader. Wouldn't it be a lot easier to just set the string to the text content of the script element?
this is what MDN does for example:
function getShader(gl, id) {
  var shaderScript, theSource, currentChild, shader;

  shaderScript = document.getElementById(id);

  if (!shaderScript) {
    return null;
  }

  theSource = "";
  currentChild = shaderScript.firstChild;

  while(currentChild) {
    if (currentChild.nodeType == currentChild.TEXT_NODE) {
      theSource += currentChild.textContent;
    }

    currentChild = currentChild.nextSibling;
  }
then all the rest...
but still, can't you just do theSource = shaderScript.textContent?
 
@monners I mean, how to delete the cookies for one site without deleting all stored cookies for the entire interweb.
 
It's not in settings => site settings => cookies. You have to go through page information (that (i) icon in the menu).
 

« first day (1785 days earlier)      last day (3146 days later) »