« first day (1936 days earlier)      last day (3019 days later) » 

10:00 PM
@SterlingArcher crazy folks throw themselves at whatever they're doing. If you do that once in a while, with good stuff, it's great. You thoroughly enjoy yourself. Like shows. If you do it all the time with everything, you're a nutter.
 
crl
yea maybe, because Object.assign(element, {id:1, ...}) works
 
the spread operator takes care of it
 
oh rly
sweet
 
should
unless I've misunderstood
 
What if you contain the throwing into one specific category?
Like traffic
 
10:00 PM
wouldn't reduce be cleaner?
@SterlingArcher then you're just squished
 
user1596138
Array.prototype.slice.call(Element.attributes);
 
5:01
what have I done with my life
!!afk going home
 
crl
@phenomnomnominal hmm no
VM253:2 Uncaught TypeError: (var)[Symbol.iterator] is not a function(…)
 
let o = a.attributes.reduce((p, attr) => (p[attr.name] = attr.value, p), {});?
 
so attributes isn't an array haha
NamedNodeMap
of course
 
10:02 PM
@SterlingArcher I guess you're...jamming then.
 
user1596138
@ssube What's wrong with mine?
 
user1596138
 
user1596138
Oh wtf
 
user1596138
I thought that would do something different.
 
@crl Array.prototype.reduce.call(a.attributes, ...)
 
crl
10:03 PM
yes that
 
@jhawins that was to lemon's spread and sterling's loop
 
user1596138
Mine makes an array. Did we want an array or key/value pairs
 
user1596138
Looks like key/value
 
I think so
 
Any d3 friends here know if there is a way to render text along an arc?
 
crl
10:05 PM
d3.arc(text) nah jk don't know
 
!!afk Dirty dancing
 
crl
the .attributes thing must be old as fuck
older than contenteditable shit
 
user1596138
Array.from(Element.attributes)
 
contentEditable is pretty new
 
crl
execCommand isn't
 
user1596138
10:09 PM
Except they are still Attrs
 
user1596138
The Attr object .attributes returns are strange.
 
crl
var a= document.querySelector('a')
Array.from(a.attributes) // try this in console
 
user1596138
@crl I posted that
 
user1596138
The values for the Array are still all weird.
 
crl
meh, FF works, not chrome
 
user1596138
10:11 PM
They are all of type attr
 
user1596138
@crl Post screenshot of what FF gets
 
user1596138
@crl Try Array.from(a.attributes)[0] instanceof Attr
 
user1596138
So what happens when you try to use the values is you'll get [object Attr] instead of the value
 
does node have access to other processes?
The only way I can think of is to pipe the exec results of a tasklist, and parse the ID from there, but is there a) a better way and b) even possible for node to access those processes?
 
@SterlingArcher typically no. Processes can't touch each other because security.
whatchu tryin a do?
 
10:16 PM
Learn lol
0
Q: Close another process from node on Windows

Giancarlo Ventura GranadosHow can I kill a process from node on Windows? I'm making a updater. It needs close a windows executable (.exe) to download the updates. (The update process is download and overwrite). I read that this is possible with process.kill(pid[, signal]) But, How can I get the PID of the process if I k...

I had a feeling it would be a security thing if processes had access to each other
 
Killing and accessing are pretty different
 
But theoretically you could grab that ID by parsing a tasklist exec command right?
 
"access" will let you steal keys and stuff
 
asking the system to kill is kinda safe
 
10:17 PM
I thought it was an interesting question so I'm googling
 
what you'd do is have A launch B --parent ${a.pid}, then B asks the OS to kill that
B then updates all the files, does some stuff, and launches A again
typically, A will download/copy B to a random file before running it
 
But what if A is completely abstract from B
No parent process relationship
 
anybody ever work with recaptcha?
 
@SterlingArcher that's the kill command on linux
 
trying to figure out why it doesnt work on IE , works on chrome/firefox
 
10:19 PM
Right, iirc node can execute bash commands
 
user1596138
It's Taskkill in Windows
 
and if you send it the id, it could kill the process right?
 
and kill can't actually touch another process, it just asks the kernel to send it the kill signal
for a process owned by the current user
 
user1596138
@Sterling you can even access it by name. No need for the PID.
 
Interesting
 
user1596138
10:20 PM
If you're on windows try tskill chrome
 
user1596138
It will kill Chrome ;P in case that wasn't obvious haha
 
processes can signal one another
 
user1596138
There's another one for linux
 
it's fundamental to IO and stuff
 
user1596138
@SterlingArcher you can use pkill
 
10:22 PM
So theoretically I could do...
 
but it's system-to-normal or within the same user
 
user1596138
So if you know the process name pkill processName without having to first lookup the PID. You can decide for yourself if that's safe enough..
 
user1596138
Or you could use pipeline after top/grep or something similar. Anyway there are a number of ways to do it only using a single exec
 
exec('tasklist', (err, out, code) => {
    const id = processIdFromTaskList(processName);
    process.kill(id);
});
 
@jhawins why top? ps will list procs, grep to pick the one you want, awk to get the ID
 
10:24 PM
assuming task list returns the list, get the ID (or name) from the results, and kill the process?
 
ps -Af | grep chrome | awk 2 | kill -9 or something
 
user1596138
@ssube Why he would use top I have no idea. It's for example dude.
 
isn't -9 bad?
 
-9 is more than -8 and less than -10
good and bad are all an illusion
 
user1596138
Or you can just use pidof
 
10:25 PM
you've already fallen to the dark terminal
 
user1596138
Hmm
 
user1596138
pidof ThingToKill | xargs kill -9
 
user1596138
How's that lol
 
that's probably the best one
although xargs kill does seem a little sketchy
 
... meta.stackoverflow.com/questions/315917/… <-- that would've come in handy.
Interesting read, in the logs here.
 
user1596138
10:29 PM
@ssube ....Why?
 
Another user that's lost it's credibility...
 
user1596138
How would you go about it given the same situation
 
user1596138
Like what's a nicer way to pass the input?
 
@jhawins same way rm -rf should be used very, very sparingly
a badly-escaped name leaks in and things go horribly wrong
 
@jhawins pkill or killall seems nicer
 
user1596138
10:30 PM
No, those have no correlation at all.
 
user1596138
@Zirak Already said to use pkill :P
 
Then that was a better suggestion
 
my boss just dropped a cold beer on my desk <3
 
user1596138
@ssube Then killing things by name is the problem, not use of xargs lol
 
It's a trap
 
10:30 PM
@SterlingArcher to... make me do work? That's his job. :P
 
:cracks beer: Drinking on the job eh? You're fired.
 
@jhawins yes, but you also have to be careful, cause xargs splits "arguments" on whitespace.
whitespace will screw us all one day, if it hasn't already
 
@Zirak You missed out on a very good talk today.
 
And my special pants too
 
best way to screw with somebody: create a directory named / delete-me
 
10:32 PM
lel
 
sudo mv System32 delete-me
 
rm -rf / delete-me
 
@SterlingArcher No, you misread the directory name.
 
I did no such thang
 
@ssube Would unix even let you name a directory with a /?
 
10:33 PM
and that, kids, is why you always wrap it: with quotes
@MadaraUchiha I meant mkdir "/ delete-me"
 
@ssube Yeah, I know, is that allowed??
 
that's evil
 
I don't get it
 
@MadaraUchiha No
 
10:34 PM
ssube@ops-vm ~ $  > sudo mkdir "/ delete-me"
[sudo] password for ssube:
ssube@ops-vm ~ $  > ls /
bin  boot   delete-me  dev  etc  home  lib  lib64  lost+found  media  mnt  opt  proc  root  run  sbin  share  srv  sys  tmp  usr  var
 
@copy Thought so.
 
ayup
 
/ and the null byte are the only characters not allowed
 
and ls makes it super hard to tell that the dirname starts with a space
unless you quote or tabcomplete, you're nuking / by accident
 
10:35 PM
@copy Ah, but it would let you create "/ delete which is (_)delete under the / directory.
 
and if you type it back in without paying attention, bash splits it
 
Yeah, use tab completion
 
deleting / is always easy to avoid if you're paying attention :P
 
In today's talk one of the speakers talked about how to use reducers in redux along with middleware and stuff, relatively high level
And then someone asks "But wait, if all your data is immutable, isn't it very slow because you're copying your data everywhere?"
-_-
 
I can't quite ping all ROs, but I've submitted a new issue on the RO github page...
 
10:41 PM
@Cerbrus pin it here
 
crl
it's probably slower than mutating no?
 
or pin & unpin for self star
@crl Marginally.
 
crl
yea
 
When you make a shallow copy, all the references of objects that are unchanged don't cost you anything.
The only think that actually changes is the bit you changed.
And if you throw away the old reference, it doesn't even cost you memory anymore.
 
That'll do for a day or 2. Will unpin later
 
10:42 PM
@Cerbrus hm.
 
crl
ok
 
Omg trump bought jeb bushes domain and has it linking to his own. jebbush.com
 
@Cerbrus I'm getting a 404
 
That is hilarious
 
10:44 PM
Pretty tech savvy for someone that has all his emails printed
 
@MadaraUchiha They cost you twice the space. That's why we use structural sharing
 
@monners do you have access to github.com/JavaScriptRoom/moderation ?
 
@copy The space... of the reference?
 
@MadaraUchiha Yes
 
@copy No...
 
10:45 PM
@Cerbrus Hmmm, it would appear not. I am a RO though
 
Say I do this
const newState = Object.assign({}, oldState, {change});
Did I just double my memory usage?
(Assuming that's all the state I had)
 
@BenjaminGruenbaum / @rlemon: Can either of you give @monners access to github.com/JavaScriptRoom/moderation ?
 
On mobile. When I get home
 
'kay
 
@Cerbrus I'm fairly sure we've sent all ROs invitations by email.
 
10:46 PM
@rlemon You're my hero
 
@MadaraUchiha Not double
 
@monners Check your email for an invitation.
 
@monners: Check your spam inbox
 
If it's not there, tell me your GiHub handle I'll see if I can send you
 
interesting, there only seem to be 2 .php files in donaldjtrump.com...
 
10:47 PM
@MadaraUchiha But think let a = [{ x: 3, y: 4 }, /* 10 million more points */]
 
You wouldn't want to make a shallow copy of that
 
and this, which can probably be bruteforced? secure.donaldjtrump.com/wp-login.php?wpe-login=securedjtrump
 
@copy Fair enough.
 
@MadaraUchiha Search for what? JavaScript? Github? Chat? Literally thousands of emails...
 
10:48 PM
@monners What's your GitHub handle?
 
monners
 
@monners Sent. Check email
 
Got it, thanks :D
@MadaraUchiha ༼ つ ◕_◕ ༽つ
 
@towc that's two PHP files too many
 
10:51 PM
@MadaraUchiha that actually depends
I mean, he was obviously clueless :D
 
@Mosho As with everything.
 
@ssube agreed. But it's interesting how that particular one is a php... and for the other, it's wp, what do you expect
 
but immutable stuff come at a cost
 
@Mosho Of course
But the annoying thing was it wasn't even part of the discussion
 
which isn't always so marginal
but most cases probably
 
10:52 PM
They were talking about something that's at least 3 layers away from the data being immutable or not XD
 
@MadaraUchiha So, about forEach vs map?
 
It's like asking "But wait, isn't including React and Redux very expensive because it's very large and the user needs to download a lot?"
 
@MadaraUchiha did you see what I quoted in hangouts? :P
 
The answer is "Maybe, it depends, but it's completely irrelevant to the discussion we're having"
@Mosho Now I did, lol.
I mean, I really enjoyed, finally some higher level stuff.
The things in the JSI meetups are totally noob level.
 
meh, besides benji it was all 101 stuff
 
10:54 PM
I want something I'll have a hard time keeping up with, that what makes it all the more fun to research and learn more about it.
 
Out of curiosity, @MadaraUchiha, were those waxi message (particularly this one) actually past SO's policy or do they fall within room opinion? Assuming those are still somewhat separate
 
if I wanted an intro I would have gone to the redux repo
 
@ssube It's not against any SO policy I know.
 
I had fun, the redux talk wasn't advanced enough but he was getting there, the react native talk was to close to the last one at YGLF only not as good. I wanted to hear him talk about some specific difficulty they had and how they solved it.
 
It's up to the room owners at the moment (I'm still considered a room owner, for that matter) to determine whether we want that user and those messages in the room or not.
 
10:56 PM
yeah, I want stuff based on experience/opinions
 
can I assume monners is sorted?
 
not vomiting library docs
 
@MadaraUchiha I feel like it's very similar to that discussion on meta during the election about sexist comments, where bluefeet weighed in and said it was against policy.
 
@rlemon You can.
 
@ssube as an outliar it's fine.
 
10:56 PM
I'm largely curious because some ROs disagreed on the kick.
 
It'd almost be nice to be able to kick to a room
 
Who got kicked?
 
2 hours ago, by Waxi
I'll just say that it's pretty beta to maintain friends with an ex. Why are you even thinking about this girl anymore? You two didn't work out, move on with your life. Holding onto the past is kinda weak. You should be moving forward with your next conquer. I don't understand this thinking at all.
 
I wouldn't kick for that message if it's isolated - I have little context here though.
 
@BenjaminGruenbaum: Waxi.
 
10:57 PM
oh, I missed out on all the fun I was giving a talk.
 
Check my pinned message
 
it went on for... 30 minutes? During a convo I started and intended to be legit.
 
who the feck is waxi
 
Oh cool @Cerbrus
 
@ssube I think you are reading into this and making it a sexist remark when it was just a shitty one.
 
10:57 PM
But was on pretty questionable topics.
@rlemon oh, dude, I agree. Originally calling it sexist was poor phrasing.
 
I think we all agree he needed a boot
we were just disagreeing on it being because it was sexist
 
It was just shitty towards everyone in general.
@rlemon that I misunderstood. I thought @Loktar disagreed with the kick period and you with the sexist part.
 
him saying "don't kick, now he will think you are mad"
 
I totally agree it was more just being a bad person and not specific enough to be sexist.
 
I think cleared up why he said it tho
 

« first day (1936 days earlier)      last day (3019 days later) »