« first day (1670 days earlier)      last day (3296 days later) » 

6:00 PM
That's like saying apples are a superior fruit because they have flavor.
 
Delete-line is nice, but it can be super-annoying without an obvious way to undo a change
 
No, it's like saying apples are a superior fruit because they come pre-sliced.
 
ctrl+shift+k, make a mistake ctrl+z
 
I guess i'll give it a shot, its more of a curiosity thing now.
 
in ST.
 
6:01 PM
Technically, yes, apples have flavor but so do all other fruits! (except grapefruits, you redundant mess)
 
vim is a good editor because it turns most common functions into home row key chords (and not hotkeys)
 
Vim is worth trying. Just keep a cheat sheet nearby.
 
@JanDvorak otherwise you'll get stuck forever :(
 
@ssube I'm a coder, not a musician
 
a chord is pressing multiple keys in sequence, rather than all at once
 
6:03 PM
I thought it was the opposite way around in music?
 
stupid editors want to to hit ctrl+alt+win+shift+squiggle-square+shelf+^]+c+3 to indent the last 9 lines. Vim just has to do v, 9, k
 
What's the k key for?
 
the best part about vim, vs intellij or emacs, is not playing twister with your keyboard
 
Vim: Because you only have one finger.
 
@JanDvorak up. H is left, J is down, K is left, L is right.
 
6:04 PM
lmfao
 
Rather than moving off to the arrows, everything is home row.
 
You're playing twister with your keyboard anytime you type plaintext using QWERTY instead of Dvorak.
 
Dvorak is for repurposed post-consumer keyboards and their scarf-wearing, beard-having, american spirit-smoking, volvo-driving owners.
 
@SomeKittens Emacs: Because you have ten fingers
 
@ApathyBear I'm a Sublime Text fan, as the learning curve is fairly straightforward (not sure why anyone would recommend a tool where you need to Google to find out how to exit) and for reasons outlined here: gist.github.com/Zirak/9999e97e01a7bd0a76f6#comment-1451520
 
6:05 PM
I don't smoke or drive volvo.
 
@ssube I just use Colemak
 
No but serious, I think Emacs is bad if you have wrist pain
 
it addresses Dvoraks shortcommings.
@ApathyBear try vim so you can learn why it sucks.
then try sublime text
 
Does Dvorak have shortcomings? I thought about swapping U and I, but that subsided after a bit of practice, too
 
and learn why it sucks
 
6:07 PM
^
 
@SomeKittens Yea I was using sublime text for awhile, I also used Coda for awhile panic.com/coda
 
/me was joking about vim sucking, its just not my bag.
 
ST is better than notepad only because it supports themes :P
 
@JanDvorak haha idk I was reading a random article on it, here is the quote
> Just as Dvorak was a response to QWERTY’s shortcomings, Colemak addresses the failures of Dvorak but does so in a way that doesn’t alienate current QWERTY users. The intended result is a layout that aims for speed, efficiency, minimal repetitive stress injuries, and an easy learning curve for QWERTY typists.
 
I liked Atom, too.
 
6:08 PM
I was just being a smartass, I've never used Dvorak layout.
 
@Loktar Have you used colemak, though?
 
@JanDvorak lol no
I had never heard of it until today
 
This is valid ES6, right?
Wordpress.BlogPost.retrieve(3).then(posts => $("#blogPosts").append(posts));
 
I'm a qwerty nub
 
6:09 PM
ah. I am actually using DSK.
 
@NickDugger Pretty sure ES6 auto-deletes Wordpress for the greater good of the web
 
lol, if only. I guess I' more asking about the arrow function
if I can use it in that fashion
 
Hey guys, quick question. Using comparing operators, can i just compare two strings, for example "a" > "b" will return me true?
 
i want to save form data that i have via javascript to a json file on the server
do i use nodejs for that?
 
@shawwy yes, no
 
6:10 PM
@ApathyBear Atom is the least responsive editor I've used since VS2003
 
^ Ill agree with that.
 
How could i compare two letters then?
 
what's the best way to go about saving a form data to json file on the server?
 
also, got my grade 12 today!
 
I still have a bug open on it where on multiple monitors the menu jumps to the next monitor (on Windows)
 
6:10 PM
@shawwy compare how?
 
only 3k until I get whatever permission you get at 15k
 
grats
 
I'll pick it up whenever @MadaraUchiha bounties the XHR question
 
15k is like turning 25. You get boring stuff.
 
@ssube shoot, and I'm turning 25 this year....
time to have my quarter-life crisis.
 
6:12 PM
Well, you'll get to protect questions and rent cars for cheap. Congratulations.
 
Well, for example let's say i have two characters A & B and comparing A > B should result true (since A is before B in alphabet)
and that for other characters aswell
 
@shawwy B > A, since A is before B
same way 2 > 1, since 1 is before 2
 
ohh
like this
 
@shawwy have you tried "b" > "a"?
 
okay, thanks :)
 
6:16 PM
!!> "a">"b"
 
@rlemon false
 
.. but a comes first.. O wait.. that makes sense.
bosses bday, we went out for lunch
big lunches are the worst at work
all I wanna do now is take a nap
-1
Q: How to read an javascript object in object

Vassilis PitsIt maybe a simple question for more but i'm stack here. I'm getting this data from a service: {"ok":{"rundomkey":"value"}} I need to read the value. I do have the rundomkey every time but i cannot read it with plain javascript. I would love to have some help. Thank you!

:D
awesome
 
Anyone up to code in parallel and see who codes faster? :D
 
@rlemon The last time our boss took us out for lunch, we ended up closing and getting hammered
 
@BenFortune I remember years ago, we all went out on paddy's day for just lunch. around 330 the boss was too drunk and decided to go home and left his CC saying "last to leave pays"
we closed the pub.
 
6:19 PM
i want to save form data to a json file and save that file on the server, what do you think?
 
@JoeSaad sure
 
@JoeSaad Why not a database?
 
how to do that?
 
@JoeSaad great idea
 
@JoeSaad lots of ways
what have you tried?
 
6:20 PM
it's not a DB because it is small stuff and i don't think i need a db for that
completely javascript
how can i do that?
 
so nodejs?
 
ok, so nodejs is the best way to do about that?
 
if you want nothing but js, it is the only way I can see
 
ok, that's what i thought.. thanks @rl
 
why not a database?
 
6:21 PM
@rlemon
 
it will take less time to set up a DB than to figure out some FS document store
 
1) serialize form data
2) send to server
3) sanitize on server if you need to
4) use the fs module to access the filsystem to create a write stream
5) write to the file
6) buy rlemon a beer for being so kick ass.
@ssube fs is simple
 
Until you run into locking/permission issues
 
7) ??
8) profit
 
and uniqueness
 
6:23 PM
@BenFortune everything can be made harder "once you run into the fucked up part"
db's are not excluded.
 
and if you want to check if a similar record already exists, may php save you
 
ok, so better is to set up a db for that i guess
 
!!s/".*/if you're brave enough/
 
@NickDugger @BenFortune everything can be made harder if you're brave enough (source)
 
DB are excluded cause the whole thing is the fucked up part.
 
6:24 PM
?
 
@JoeSaad yes, use redis or rethinkdb (personal and opinionated advice)
 
@JoeSaad all depends on your needs.
 
@AwalGarg neither of those is really a persistent database
 
WE can't decide what is best for YOU
 
@ssube both of them are
 
6:25 PM
I cannot recommend rethinkdb to enough people
 
i got you.. i just thought that db would be better for bigger set of data, that's why i thought a json file would be best
 
rethink is the kind of shiny nonsense that's guaranteed to fail in prod and redis is a key-value cache
 
@JoeSaad fs is also like a database, but harder to use pragmatically. (i think.)
 
why not just a normal database like postgres?
 
use php mysql and apache
 
6:26 PM
since it is really a small set of data, then i'll just resort to sqlite
 
use google forms?
 
@rlemon Why not Access?
 
-1
Q: How to access property of nested JavaScript object

Vassilis PitsI'm getting this data from a service: {"ok":{"rundomkey":"value"}} I need to read the value. I do have the rundomkey every time, but I cannot figure out how to access it with plain javascript. My latest try is like this: function(data) { console.log(data.ok.rundomkey); } I would love to...

can we please kill this
 
@JoeSaad sqlite works great until two people use it
 
My latest try is like this:

function(data) {
   console.log(data.ok.rundomkey);
}
THIS WORKS
:flips table:
 
6:27 PM
@JoeSaad what databases are distributed with your OS?
 
@ssube redis is persistent through disk. Why will rethink fail? Educate me please?
 
why doesn't new FormData(document.forms.formName) work?
 
if we had killed it a few minutes ago the rep whores wouldn't be all over it
 
i'll use mysql then
 
@JoeSaad postgres is better
 
6:28 PM
yeah, postgres if you can
it does all the normal things and does them in boring ways
 
ok
 
Postgres for the smug satisfaction of superiority over all databases.
 
postgres is because case sensitivity makes code easier to write
 
Why did nobody mark it as a dupe? :/
 
plus it can do document store stuff
mysql is pretty similar but can't store documents
 
6:30 PM
Postgres 9.5 supports upserts :>
 
It also has ridiculously good JSON support
 
both postgres and mysql come with your OS, unlike NoDocument MyThink Ultra-Sharded ReSQL
both postgres and mysql have been used successfully in prod, unlike NoDocument MyThink Ultra-Sharded ReSQL
both postgres and mysql have node/JS bindings, with postgres coming out ahead since it does JS-like stuff
 
both postgres and mysql don't pretend to be fast like hell when they are not, unlike mongodb
 
postgres and even mysql are reasonably fast
 
6:33 PM
yeah but they don't hype about it
 
they do require indexes for that (i.e., they require you to know what you're doing)
@AwalGarg that's because "able to respond to queries" is only a fancy new feature for NoDocument-MyThink-Ultra---Sharded-ReSQL.js :P
 
hahaha true
 
@rlemon The people in the audience are more toxic than the people that go on the show, and that's saying something
 
never seen the show before.
but he makes a good fucking point
 
6:37 PM
postgres is faster than Mongo
 
google is telling me it is the UK Jerry Springer
 
It's what the benefit scroungers spend their day watching whilst sipping on their white lightning cider
 
> Never trust a benchmark you didn't fake yourself.
 
@rlemon good!
Did you see that woman? I'd throw myself off a balcony too
 
6:40 PM
figured you'd appreciate that
 
sharing with my boss
 
@Loktar unexpected GTA V Thug life. youtube.com/watch?v=3CRgv9EGD1o&feature=youtu.be
 
lol wtf
 
6:56 PM
WTF is samsung galaxy s6 advertisement supposed to mean ?
 
"next is now" <= referring to this?
 
sounds like generators
 
I think it means the middleware is done and now your callback is being executed.
 
obviously they don't use promises
 
@AwalGarg Are you kidding? All marketing is based on promises.
 
7:02 PM
@SomeKittens but those promises never resolve to the device itself
 
@SomeKittens marketing promises are the only kind less reliable than jQuery promises
 
marketingPromise = new Promise(resolve, reject) {
    console.log('resolving...');
    reject();
}
 
(new Promise(function(resolve, reject) {
  reject(resolve);
})).then(Function.call);
er, that should be resolve reject
oops
or replace the then with catch
w/e
 
}--\---+
<----O|
}--/---+
 
lol
 
7:12 PM
new Promise(function(reject, resolve) {
  resolve(); // good job, marketing
})
 
lies. that never happens.
 
I used to get them mixed up too...
 
@AwalGarg Since when does Gnome come with Builder? I've never heard of it before.
 
@Zirak the dev version does, wiki.gnome.org/Apps/Builder
 
How can you require a webpack-d module into node's repl?
 
7:25 PM
@Zirak nice weapon
@ssube you are out of luck
there is something called node-webpack
 
@darkyen00 bullshit, just got it working
 
@ssube meh i tried it years ago it never worked :P
 
var webpackOptions = {
  output: {
    filename: '[name].bundle.js',
    libraryTarget: 'umd'
  },
  plugins: [
    new webpackOptimize.UglifyJsPlugin({minimize: true})
  ]
};
 
ah its part of it now :-D
 
entry point file exports default the stuff I care about
 
7:27 PM
@ssube anyways why are you webpacking a module and loading it in node ?
 
@darkyen00 I don't think webpack has existed for years
@darkyen00 Bundling everything. Not about to leave the loose files lying around.
 
@ssube erm why ?
whats wrong with the npm approach ?
 
@darkyen00 there are far too many and they're all ES6
@darkyen00 oh, fucking everything. It's a disaster.
 
@ssube explain, with examples ?
 
it makes it a pain to distribute a packaged, tested, bundled version of a library
if you're making a lib, you want one final artifact to send out
NPM assumes you want to distribute everything in site, including your build scripts and metadata
 
7:29 PM
I use a few libs who have es6 code they just have a ./lib which is exactly your compiled babled output
 
I prefer using a /build folder, myself
 
once the library is built, there's a single file to distribute
that most absolutely should never be pushed into the git repo
it's compiler output, not source
npm tries to ruin all of that
 
actually as per npm idea
once js is good enough
you won't need the built stuff
so this /build or /lib or /bin is a temporary solution
 
npm made up some shit without testing it
that doesn't work for any real library
that's why they all have /lib in their repos now
or /dist
 
/bin
  /Debug
  /Release
because Visual Studio .. that's why
 
7:34 PM
 
this is why i left web-pack
 
@darkyen00 why? because their runtime transpiler shim isn't maintained? that's a shame, since compiling on load is a terrible idea anyway
 
@ssube compiling on load in node.js ?
in a server side environment ?
 
@darkyen00 yeah
that's a horrible idea
there's a reason most major runtimes use a very simple, well-defined, static intermediate representation
 
crl
How Do I add multiple classes to classList?
 
7:37 PM
actually compiling the code at runtime is stupid slow and incredible unstable (one dep changes slightly, all your code changes, everything breaks)
 
crl
document.querySelector('.user-container:last-child').classList.add('catchup-mar‌​ker').add('catchup-marker-1')
^ wanting to add these 2
 
@crl not sure if possible with chaining
 
why does mysql-workbench always freeze when altering a table-fields datatype >=(
 
crl
chaining doesn't work, I tried it with stupidly
 
@darkyen00 compiling AoT into an assembly-like (but platform-independent) IR makes startup much faster and the final machine code more predictable
Node and NPM's loading process is fundamentally flawed and it's a huge pain
 
7:38 PM
@crl just write a utility function
 
crl
bah, I just wanted to make fun with chat's dotted lines
 
function addClasses(el) { [].slice.call(arguments, 1).forEach((cl) => el.classList.add(cl);}); }
 
crl
11
Q: Is there a way to add/remove several classes in one single instruction with classList?

DbuggerSo far I have to do this: elem.classList.add("first"); elem.classList.add("second"); elem.classList.add("third"); While this is doable in jQuery, like this $(elem).addClass("first second third"); I'd like to know if there's any native way to add or remove.

 
@crl neat, TIL
 
7:47 PM
hey guys stuck with a seriously simple issue here
How do i query a json array and get an array of jsonobject matching a particular array item property?
 
jsoniq.org <- check it out Nezam
 
crl
meh.. document.querySelector('.user-container:last-child').classList.add('catchup-mar‌​‌​ker-1', 'catchup-marker') is not working
 
@rlemon thanks.. but where is the download button ??
meaning how do i use it? the plugin
 
crl
you should find it yourself
 
@crl deres no place to download this stuff.. may be its still in alpha stages...
 
7:51 PM
it is a language spec
you don't download it
you look for the implementation you wanna use
 
@rlemon ok any way do it less complicated way. Thanks
like searching an array for object values and getting an array returned?
 
you want to query an object.
you can loop over every item inside and compare it
or you can use a library
 

« first day (1670 days earlier)      last day (3296 days later) »