« first day (1629 days earlier)      last day (3318 days later) » 

7:00 PM
Voted 3 votes
 
thanks! :D
nvm
if (input.slice(-1) === "" || input.slice(-1) === " ") {
        return 'Fine. Be that way!';
    }
@ApathyBear use trim
also, you are mixing " and ' ~_~
 
@Zirak baaaaa
 
and your if table is actually a hash table
 
@AwalGarg Good idea. And yes it should of been consistent. Thanks.
 
@BenjaminGruenbaum dum tish?
 
user1596138
7:07 PM
@BenjaminGruenbaum you seem to have marked the wrong answer as a duplicate
 
@BenjaminGruenbaum Heavily considering
You coming?
 
np. Good luck with learning JavaScript :)
 
user1596138
Why don't you answer the original and mark the duplicate as a duplicate of it. The original does have accepted answers, though.
 
room topic changed to JavaScript: Read this: rules.javascriptroom.com. Before asking inform yourself on the XY problem goo.gl/taIqf | WATCH: Developers, entrepreneurs and depression: vimeo.com/78419167 [cereal] [ecmascript] [es17] [javascript] [peter-programming] [we-so-excited]
 
user1596138
How do you dispute such a marking btw? Do you mod flag it? Meta?
 
7:11 PM
@Jhawins You don't.
 
@SecondRikudo what is in that video?
 
user1596138
I'm not going to. But it happens
 
Even mods can't change the accept mark.
 
user1596138
What do you do when it happens
 
(They can delete an accepted answer though)
 
user1596138
7:11 PM
No it's the duplicate flag.
 
@Jhawins vOv
@AwalGarg No idea. I only changed the name.
@Jhawins I'm not familiar with the situation fully, can you elaborate?
 
user1596138
The question (which has accepted answers but Benj didn't like them) is marked as a duplicate of a question asked 4 years later. They should be reversed lol
 
user1596138
14
Q: What are ECMAScript 6 WeakMaps?

TowerAfter reading this description: http://wiki.ecmascript.org/doku.php?id=harmony:weak_maps I'm trying to get a hang of it, but I do not get the overall picture. What is it all about? It seems to be supported in Firefox 6: http://kangax.github.com/es5-compat-table/non-standard/

 
@AwalGarg this room has been tremendously helpful. It's amazing how many resources are online today (books, exercism.io, SO, etc).
 
I am not clicking it in case it turns out to be blackfriday or something
 
7:12 PM
@Jhawins If the question asked later has considerably better answers, it's fine to mark the older as a duplicate of the newer.
I have a lot of canonicals which are like that.
 
user1596138
Idgaf but I'm curious how you would do it if you wanted to bring attention to it
 
That I chose to ask a new question rather than use an existing mostly because I couldn't control the accept mark.
 
@Jhawins what?
@SecondRikudo 90% chance I am, I like the idea.
@Jhawins nope, that's totally accepted. When the OP and the guy who posted the accepted answer aren't around.
 
user1596138
Cool.
 
@Jhawins you can flag the two questions to be merged
Which basically means delete the duplicate and move all answers to the canonical.
 
7:14 PM
Which we know they aren't since we pinged them a month ago and also one of them is Raynos
 
marged!
 
:P
 
@Shmiddty That's a good one
I'm going to use that :D
@PeeHaa Filthy mac user. Go away.
 
@@@@@8⪾) marged
 
@ApathyBear Yes this room is really helpful.
(well, I should not have said that)
 
7:16 PM
Totes
 
mac user? peehaa-- :P
 
@SecondRikudo It's called language settings and it's on windows ;)
 
@PeeHaa Filthy windows user. Go away.
 
@AwalGarg How do you think I found out about it? I pretty much was bugging @SomeKittens
 
windows user? peehaa------ :P
 
user1596138
7:17 PM
Filthy OS haters, go away.
 
<- mac user. I came out of the OS closet 6 motnhs ago.
 
there has been enough bloodshed in the OS wars, my brothers
 
@AwalGarg you try binding a linux machine to AD and then we'll talk :P
 
there is no cause for conflict
 
7:18 PM
@Jhawins Filthy OS haters hater. Go away.
 
@AwalGarg Actually I need to use linux because webdev, mac because ios uggggggh and windows for everything else because I need a sane desktop to do actual work on
 
I'm using windows and osx
 
@ssube AD?
 
Linux sucks
 
@BenjaminGruenbaum haha
 
7:18 PM
@AwalGarg active directory
 
It's for people who care about being cool more than they care about being legit
 
yknow, the only thing every company uses to manage users
 
@ssube s/company/corporation/
 
@BenjaminGruenbaum I think you have a typo in there s/linux/mac
 
binding a nix machine to AD with the machine certs and kerberos stuff is a nightmare
it may actually be impossible
but running windows bound to the domain and a nix vm on that is dead simple
 
7:19 PM
!!afk back to work!
 
@PeeHaa nope, most people who use linux on the desktop that I know do it to look leet and not because it solves their problems better. There are exceptions to that but that's my observation.
On servers it's a whole other story.
 
@BenjaminGruenbaum you need to switch off that troll button on your back :P
 
@BenjaminGruenbaum oooooooh desktop
Yeah fully agree there
 
@BenjaminGruenbaum what if you spend all day in a terminal?
 
@PeeHaa yeah, windows desktops aren't too fun, I use them but I don't like them very much at all - they're all magical and silly.
 
7:20 PM
@ssube ah, never tried
 
@ssube then osx.
 
@ssube then you are probably retarded and need to seek mental help.
 
@Luggage osx is fucking broken
 
could be but i haven't encountered it's broken parts, yet
 
their "terminal" and supporting tools are 4-8 years out of date and handle everything different
 
7:21 PM
besides shitty finder
 
it just doesn't work
 
@AwalGarg That didn't make much sense. Use the !!/help command to learn more.
@AwalGarg @BenjaminGruenbaum then you are probably retarded and need to seek mental help. (source)
 
@ssube you can put any shell on OSX.
 
great
 
Also you can get zsh just fine on windows.
No one spends all their day in the terminal though.
 
7:21 PM
@BenjaminGruenbaum yeah, but to get things actually working, you have to update bash, swap sed and awk, and a dozen other things
 
brew install bash
 
or, you can just spin up a nix machine
 
@ssube and it's still faster than setting up linux probably.
 
user1596138
NodeOS
 
so while fixing another bug I noticed something strange and just decreased the overall bandwidth used by our app (for the client) by probably around 10x
 
7:22 PM
@BenjaminGruenbaum it's not
 
@BenjaminGruenbaum yeah we do it on browsers on internet chats :P
 
brew install awk
:)
 
OSX automagically installs on macs, you power them on and bam.
 
(making 10x less redundant calls now :D)
 
@Luggage so hard
 
user1596138
7:22 PM
 
user1596138
Where's IO.jsOS
 
i'e had the opposite experience, osx and linux have been so similar i don't notice much of a difference
 
isn't the terminology such that io.js and node.js both are versions of 'node'
 
^ true story (what luggage said)
 
@Jhawins o_O
 
7:23 PM
@Luggage osx is darwin-based, linux is linux-based. There are subtle differences that can bite you.
 
so node-os can be running on io.js and still be called node-os ???
 
osx has a much better terminal than windows. But then I never really got into powershell
 
sed, specifically, has different semantics
 
no doubt, but when doing node.js development the general unixy nature of osx is much closer to linux than windows.
 
awk may, I forget.
most of their terminal tools are super old, as well.
 
7:23 PM
@Luggage also it's what everyone uses
 
so it's a lot easier just to spin up a debian/centos vm and call it a day
 
Their terminal tools work just fine on osx, I use both daily and I didn't notice any differences except for esoteric libraries.
 
hell, a headless vm and just ssh into it. Anything to use a real terminal.
 
I'm not bashing linux. I deploy to linux. I just like my linux on the server, not in the bedroom.
 
Also, you don't spend 90% of your day on a terminal :D
Because that'd be silly.
 
user1596138
7:24 PM
@Shmiddty Uhh... OSX has bash so
 
yea, on windows i tried linux vm + putty ssh. it was ok, but not is nice as not needing a vm
 
@ssube and then we have ssh -X ftw
 
@BenjaminGruenbaum not when you manage dev tools
 
@Luggage I think there's a putty client for windows
 
I have chrome on one monitor, konsole on the other, and usually a dozen ssh sessions into servers
 
7:25 PM
@Shmiddty sure there is
 
yea, putty IS a windows ssh client.
 
oh ok
 
@rlemon things be broken
 
@Luggage an awful one
 
terminal emulator, too
 
7:26 PM
git bash is much easier to use
 
putty isn't awful
git bash is nice yeah
 
hell, chrome ssh works better
 
the only one. i can't find a good terminal on windows
 
@BenjaminGruenbaum it hides a lot of features behind some really weird menus
 
Trying to switch a color for a person by clicking on their border does nothing
 
7:26 PM
@ssube what stuff?
 
user1596138
Cygwin works
 
and the default 'terminal' in windows is complete shit. I really wish MS would put in a good one
 
(I just tried setting someone to #000000 and it didn't work.
 
What features are all you people using that I'm not?
 
7:26 PM
@BenjaminGruenbaum port forwarding, agents, all that nonsense.
 
@Luggage powershell is crazy powerful
 
the menus in putty are just really confusing
 
cygwin has caused me permissions based problems when it creates files
 
@Jhawins cygwin is the most broken of them all
 
7:27 PM
@SecondRikudo @PeeHaa see what you did?
 
it screws with paths so hard
 
yea, i love powershell. i've written some significant automation in it
also, I love windows explorer and it's taskbar way better than mac. I'm not 100% mac fanboy. I wish i could cimbine what I like from all 3 OSes
 
user1596138
@ssube Cygwin works
 
@Luggage you can, it's called linux, and it's a waste of time :P
 
I did some bash programming, then did some python bash programming, not sure which one I like better. Any thoughts?
 
user1596138
7:29 PM
WinubuntX
 
no, linux has up-to-date gnu tools. that's what it brings to the table. NOt a ui.
 
@Luggage this is why I spend all day in a terminal
plus I can work faster on tmux and vim than always using one of those mouse thingies
 
me too. on osx. sometimes sshed into a linux machine, sometimes local
i usually maximize a terminal to be a desktop
 
what happens when you ssh -X from a linux distro to mac?
@Luggage I wish some distro offered to set the desktop background to a working terminal :/
 
@SecondRikudo what things?
 
7:33 PM
thisis better. it's fullscreen. 100%. no menus or taskbars.
 
@AwalGarg you can if you try hard enough, but why not just fullscreen?
 
@rlemon Keep reading
 
@SecondRikudo open the user menu
 
@rlemon Neat, then the old one should die.
 
@AwalGarg FROM linux to mac? so linux is the x server and the app is running on mac? might be possible
 
7:34 PM
the old one is dead
 
Not for me it isn't.
Let me foricbly check for updates.
 
0.0.3.3 should be latest
also make sure you are not also running it as a local userscript
 
@ssube I hate the fact that when alt-tabbing, the desktop is listed as a "window", and I almost always have a terminal opened and fullscreen, so why not change the desktop to terminal? I don't keep anything on the desktop either :/
 
@rlemon Yeah, looks good now
False alarm :)
 
@Luggage hmm, I have a couple of mac vms, should try.
 
7:36 PM
i'm trying the opposite.. to ssh -X into linux form my mac and see if i can run it here
 
fires virtual box
 
but i need to get somethign on the server that needs x
 
I am so bad at mongoldb :|
 
@Luggage xeyes should do
 
that was my first guess. apt-get isntall xeyes told me I was a dirt hippie
 
7:37 PM
@SecondRikudo check the closed issues. everything should sync now. and there is an options page to select the border location
 
ahh, foudn it
 
soon will include a lot more options
 
yup, ssh -X my-linux-vm xeyes works as expected
 
@rlemon lol
 
7:38 PM
I guess mac uses the same xorg?
 
this project is turning into "how much WTF code will I wake up with"
 
@rlemon You should refactor it to Object.keys(options.useColorBorder).map()
 
Is this a sane way of having private variables jsbin.com/buyifonexa/1/edit?js,output ?
 
@SecondRikudo good idea, you should do it for me and PR it :D
 
@rlemon I could, I've got my hands full right now with this thumbnailer thing
 
7:40 PM
XQuartz
 
I accidentally discovered a data leak in my application this afternoon
 
Posted the weakmap answer on HN here: news.ycombinator.com/newest
 
decreased bandwidth by 10X
:D
so I'm pretty happy about todays coding adventures
@SecondRikudo I'm going to add an option to just disable the entire 'dark' aspect of the extension. then people can just cherry pick the js add-ons from the options menu and enhance the current theme
 
@PeeHaa why are you passing the empty object into the first iife?
 
ignore me
 
7:43 PM
Because otherwise I cannot add properties to it?
 
you're not adding anything to it
 
I am not?
MyThing.Bar?
 
MyThing.Bar = (function(/* so yea... you are not really doing anything with MyThing from below*/) {

}(MyThing)); // I get passed as an argument to the iife
 
I seem to be missing your intent there...
 
I can't tell if I am doing something wrong, but mongo is running text searches very slowly...
 
7:45 PM
@rlemon oh yeah I don't need to pass it around
 
good catch @AwalGarg
 
also, if your final sole aim is to handle private variables, just use the module pattern?
@rlemon :)
 
@PeeHaa just make regular object variables and prefix them with _
 
@AwalGarg Sounds great. How? :P
 
You don't want them to be really private for security, you just want them to convey intent
 
7:46 PM
@BenjaminGruenbaum So basically go the python route
 
!!tell PeeHaa google javascript module revealing pattern
 
@PeeHaa Yes, that's the most effective pragmatic way.
You don't want a module pattern or anything else that uses closures, it's not just slower - it's harder to debug
Because in practice in a REPL enabled environment inspecting private state is totally helpful when debugging and you want to play with it. It's harder (but possible) with closures in the debugger but less nice.
 
@AwalGarg Looks at my code. Glances over the first codeblock of the first link because I am lazy. It's the sameish?
@BenjaminGruenbaum Valid point
Am I missing the difference between what cap linked and what I do? @AwalGarg
 
No, you're not
 
7:51 PM
k :)
 
0
Q: Javascript window.open not firing on Mobile

mystackaccount1234I've been looking everywhere for an answer all over but I can't find anything that works. It works fine on all of my browsers but doesn't work on mobile devices. I'd like to have the links open in a new tab if possible. Does anyone have any suggestions? Here's what I have: <form name="dropdo...

that code
 
I love how there is exactly 0 jquery in there :P
 
which would fire first
the select onchange of the form onchange?
I imagine select
so he's submitting the form before the form onchange is fired?
 
@dystroy super-human javascripter. It's a play on SSJ from DBZ
 
@PeeHaa it is similar, but they describe it systematically, and no need for the _. Also, I did pretty much the same myself when I tried to emulate private variables, and then ended up with someone from this chat pointing to module pattern.
Life === easier.
 
8:00 PM
@rlemon This is intended just for Chrome right?
It's not a userscript?
 
awal@awalGarg:~$ ssh -X -p 3022 awal@127.0.0.1
Password:
X11 forwarding request failed on channel 0
Last login: Thu Apr  2 12:55:51 2015 from 10.0.2.2
awals-Mac-mini:~ awal$
#fail @Luggage
 
user1596138
@AwalGarg There is no X11 in standard OSX
 
start an x app instead of bash?
ssh -X -p 3022 awal@127.0.0.1 xeyes ?
 
@SecondRikudo FF is on the roadmap (ofc with changes)
 
@rlemon So I can't go wild with ES6
 
8:02 PM
guys, why am I breaking jQuery
 
you might not have xeyes until you put x11 on the mac
 
@SecondRikudo I'm going to start a branch for scss and es6
 
@rlemon First argument is index, second argument is the element
 
8:03 PM
@rlemon HTTPS?
@rlemon kk, I'll hold back for now
 
@Zirak fuck off jQuery!
god damn
this is why we can't have nice things
ty @Zirak
 
Enjoy your time of day
 
4:04pm
close to 5
so i'm doing okay
 
@Luggage what do you call mac's finder from the terminal?
 
@rlemon 4:04 - clock not found
2
 
8:05 PM
@SecondRikudo it'll be good practice for me to re-write what is there in es6
 
what do you call it? what do you wan tto do, open a directory in fider?
 
@Luggage what do you call mac's finder from the terminal?
 
open <path>
 
@rlemon kk
 
open opens and file or directory with the default handler. it's the same as double clicking it tin the UI. the windows equivalent is 'start'.
 
8:07 PM
hmm, it starts it on the mac instead :/
I want it to open that finder on my Linux installation :P
 
finder isn't x11
on the mac type: which xeyes
 
not installed :/
I should probably do some googling first
 
might try to install x11 automatically if you try to run it. otherwise: xquartz.macosforge.org/landing
 
Everything seems to be in working order.
@rlemon Wait a little before merging, I may have some more under way.
 
8:16 PM
@Luggage yeah, seems like installing x11 would be the only way
my experiment failed
 
unless some x11 apps are available separate in hombrew
but i don't knwo if they still need local components from the x11 package
 
@rlemon Do options.useColorBorder and savedOptions.colorBorderPositions both only ever have .top, .right, .bottom and .left?
 
yes
 
@AwalGarg You can try seeing if there're any VNC or RDP servers available for mac
 
options.useColorBorder.top = savedOptions.colorBorderPositions.top;
options.useColorBorder.right = savedOptions.colorBorderPositions.right;
options.useColorBorder.bottom = savedOptions.colorBorderPositions.bottom;
options.useColorBorder.left = savedOptions.colorBorderPositions.left;
options.useColorBorder = savedOptions.colorBorderPositions;
 
8:18 PM
I was drunk
 
Will add to the PR
 
At least you didn't use snake case
 
I may have other places
 
@Zirak TIL VNC
 
Or whatever's the equivalent on Mac, I'm sure there's something
 
8:20 PM
@AwalGarg @Zirak nomachine?
 
user1596138
Just install X11
 
And install a linux distro while you're at it
 
x forwarding is about the slowest option
 
If there would be, I am sure there would be atleast ~80k weird limitations on what kind of devices can connect to it.
 
user1596138
No you can just install X11 on OSX
 
8:22 PM
NX isn't great at being a service/server, but works surprisingly well
 
That'd be if it was made by Apple. Apple: Because fuck you.
 
it's not as quick as RDP, but pretty close, and can use an SSH session (so no additional user setup nonsense, like VNC has)
 
@AwalGarg brew install homebrew/x11/xdu
 
Apple is a shy girl who doesn't like to move out of her corner.
 
user1596138
8:23 PM
I believe all you have to do is have X11.app running and then do your normal ssh -X
 
user1596138
Well in xterm ofc
 
we're going the other way
 
@Luggage I might look stupid but why does bash say brew is not installed? Doesn't it come with Mac by default? I only use the mac vm to test safari and stuff.
 
Alright @rlemon PR is ready. Feel free to review/merge.
 
user1596138
@Luggage Doesn't he want to have the Mac be local
 
user1596138
8:24 PM
Err
 
it's not installed by default but a single commandling installs it: brew.sh
brwe is a pckage manage written in ruby and backed by git. both of which come with osx
 
@Luggage gross, now I can't use git anymore
 
user1596138
He wants to connect from a mac, to a nix box, and therefore use -x from the mac right?
 
@Jhawins Nope, that's already been tested by me
 
apple got their grubby little brushed aluminum fingers all over it
 
user1596138
8:26 PM
@Luggage Ok is that what he wants to do?
 
user1596138
Idk what you would've tested lol
 
@Jhawins no, from linux run: ssh -X my-mac someXapp
 
user1596138
Oh. Just don't do that lmao
 
user1596138
Wtf
 
@Luggage ah nice
 
8:27 PM
@Luggage is it related to the separate environments between the mac cli and windowed apps?
you may have to forward/set up the necessary env vars for x forwarding in the windowed app conf
 
user1596138
There shouldn't hardly be anything to run that way
 
maybe..
it's possible that apps compile for mac's x11 wont forward, we don't know
 
for X forwarding to work, you need to a) be running an X app (obvs) and b) have the display env var(s) set
 
well I am just experimenting...
 
you running this mac vm on osx host or somehwer else?
 
8:28 PM
I know OSX isolated windowed/UI apps from the normal shell env, as some "security" thing
 
i forwarded form linux to osx withou setting anything it jsut worked
 
(we ran into problems with IDEA not picking up env vars)
 
mac vm on linux host
 
How did you manage that?
 
@Luggage yep, linux to osx works good for me too
 
8:29 PM
@AwalGarg works well.
Don't be a word criminal.
 
what does ssh -X mac "echo $DISPLAY" return?
 
now you can use osx as your server and linux as your desktop. Ideal. :)
 
@Luggage it's technically possible but super against Apple's EULA
(or used to be)
 
still is
 
most any intel machine can virtualize osx, and vmware's tools all support it, it's just disabled if the host isn't apple cause eula
 
8:30 PM
@Luggage took a relative's retail disk and some googling
 
it's a really stupid rule on their part, since rather than buying mac servers, everyone just decided not to use osx on servers
if we could run osx on our openstack, I know we'd have a few boxes (and licenses) that we don't now
 
and then vb's nat mapping to the rescue for ssh
 
Morning Chaps
 
21
Q: What's the best way to dispose of a body in the backcountry?

ShemSegerSuppose you needed to dispose of a large carcass for one reason or another while in the backcountry... what would be the best way to dispose of it in the woods so that it wouldn't be discovered? You always hear stories of people burying bears that they've had to shoot, but I can't imagine digging...

 
@ssube what would the advantages over debian ones?
 
8:35 PM
@AwalGarg build agents to run xcode on
right now, we have a mac mini sitting somewhere in the office
if we could run virtual macs, we would have 2 or 4 VMs with much better hardware
 
@ssube delete window.body, duh
 
ahh
 
user1596138
@SomeKittens need jQuery
 
@SomeKittens what if body was defined with the configurable flag set to false?
 
user1596138
$.globalEval('delete window.body;')
 
8:41 PM
^LOLOLOLOL
I am enjoying my first book so darn much.
 
user1596138
^ Read title -> thought "one of the indians posted this"
 
user1596138
Dat humor
 
@SecondRikudo on unity right now?
 
@AwalGarg Yeah
 
@SecondRikudo mind doing a test for me?
need to create a new chrome profile though -> alt -> profile name -> enter -> what happens?
ohwait
nvm, got it.
 

« first day (1629 days earlier)      last day (3318 days later) »