« first day (1672 days earlier)      last day (3503 days later) » 

19:00
AWS question: are you ever able to use the public IP to access a server because it appears I can only use the public dns entry (eg. ec2.123-4-56-789.compute-1.amazonaws.com)
19:11
@ElliotBonneville heyjavascript.com why never use ?
my whole code is written using 7 of them _
@darkyen00 2 and 6 are perfectly fine, even good practice. The rest are bad.
hell, #6 was added to ES6 because it's something you should totally be doing
I actually use a few of them myself
#6 there's a pretty good argument to remove from that list
#2 I use from time to time.
but mainly they lead to unclear code.
@ElliotBonneville #2 is silly for numeric counters, but super useful when your "iterator" is slightly non-traditional
like what?
while (item = item.next()) is a pretty common use
19:15
If Python uses WSGI to interface between Web Servers and applications, what does Javascript use?
@ApathyBear it doesn't
JS tries to run its own server
@ApathyBear nothing
@ssube yeah.
you can simply host a reverse proxy with nginx for nodejs
I've also learned a lot since I wrote that article, @darkyen00
I've been meaning to write some more posts but I've been too busy programming
19:17
@darkyen00 What exactly does reverse proxy mean? Bit confused
@ApathyBear a proxy allows one client access to many servers. a reverse proxy allows many clients access to one server.
the internet hits the reverse proxy, which can act as a load balancer or any other sort of gateway, and are forwarded to the application
for example, in our environments, we have an apache load balancer (mod_cluster) for each application and 4-16 app nodes behind it
@darkyen00 or, y'know, just run node
@ApathyBear A specific implementation, node, just listens on a port and parses http requests - no middleman
api-(env).company.tld/(service) redirects to one of those apaches, which picks the least loaded node to serve the application
@ApathyBear The biggest reason Python doesn't serve itself is because it's single-threaded and typically blocking.
19:21
AND EPIC SLOW
Languages that start with P are always slow.
What about...P...Pe...Pro...
...
The aim of this list of programming languages is to include all notable programming languages in existence, both those in current use and historical ones, in alphabetical order, except for dialects of BASIC and esoteric programming languages. Note: Dialects of BASIC have been moved to the separate List of BASIC dialects. Note: This page does not list esoteric programming languages. == A == == B == == C == == D == == E == == F == == G == == H == == I == == J == == K == == L == == M == == N == == O == == P == == Q == == R == == S == == T == == U == ...
all the P languages are slow
I don't know how or why, but if the language's name starts with P, it's destined to be really slow.
Pizza is an open-source superset of the Java programming language with the following new features: Generics Function pointers Case classes and pattern matching (a.k.a. Algebraic types) In August 2001, the developers made a compiler capable of working with Java. Most Pizza applications can run in a Java environment, but certain cases will cause problems. Work on Pizza has more or less stopped since 2002. Its main developers have concentrated instead on the Generic Java project, another attempt to add generics to Java which was eventually adopted into the official language version 1.5. The pattern...
2
NNNNNNOOOOOOO
I'm going to write a non-turing-complete language called Pfast and it's going to be really fast because it'll do exactly one thing: print 'Hello World'
19:24
eww
WHY DID THEY TAINT PIZZA
There's a party there, anyone can join.
@Zirak whoever put green bell peppers on pizza did worse
@Zirak the package manager must be called topping
topping add uuid
19:26
topping add uuid on one side
I'm running a long test
I should play a game
suggestions?
Play the "let's automate our tests and actually make QA effective" game. :|
bloodrizer.ru/games/kittens/# is fun, but too slow
lol
if I had another computer to run it on maybe. alas I don't at the moment
doesn't matter anyways I'm testing for a memory leak, that's the last thing on my to-do list. so. I just have to wait for results.
19:36
Guys guys guys
look how beautiful my texting app looks
you used bootstrap?
dem margins, where hast they gone?
also. where is my pudding padding?
yes, bootstrap with some custom CSS
why is there absolutely no amount of ether between the back button and the text following it?
19:38
why do you have a back button
@Amnestic 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.
@AwalGarg ether is a drug, not something you put on a web page
@ssube same deal
ether is also used to refer to empty space
archaically.
@AwalGarg buh, buh, buh
19:39
^ tis my genius friend
it's not as entertaining that way
but you got it right, I was referring to the "empty space" only.
i am following a js tutorial and have seen something really strange
what is he doing here
foo = "bar",
baz, quux;
@AwalGarg working on that
!!tell lovetolearn mdn comma operator
19:41
I just finished the fancy border on the text messages
is it var foo . . .?
@lovetolearn bad things, don't do it
you should almost never have to type a ,
@Amnestic the back button goes to a list of conversations
@lovetolearn that snippet creates three variables, points out that it created one, but only gives one a value
19:42
@SterlingArcher also, is this a one to one chat or a group chat? There are no author names?
@ssube you're not a fan of var foo, bar, baz;?
one to one anonymous chat
@ElliotBonneville he is a fan of var java;
it's a service to help people anonymously
19:45
@ElliotBonneville copy.sh/iw
Frog fractions is also ok
Getting better at fractions
@ElliotBonneville we have that banned in our lint rules
it's a great way to declare a bunch of stuff nobody knows about and is highly discouraged
@SterlingArcher How do people find each other? Is traffic encrypted? Is it store server-side? If so and you're hacked, can it be determined who talked to who? If not, how do you store who's talking to who?
@ssube I see it everywhere
that's strange.
the apple kills me
why
19:47
@ElliotBonneville yeah, because people are lazy. If you're properly doing RAII, then you have an initializer for each variable when you declare it, so multiple variables in a line gets very long and complex: foo = bar(baz(), bum()), baz = foo || bar(bum(baz)), ...
why does the apple kill me? it's supposed to be a good thing @copy
@ElliotBonneville It's more like a giant cherry
of death.
@ssube RAII is interesting. but that means you only declare variables when they're needed, and not all at the top of your functions?
I like the comma operator and declaring variables at the top, that way you aren't tempted to get confused about scope
@ElliotBonneville I agree with @ssube
@ElliotBonneville yes? what is this, C? Variables are declared when they're needed, just before the first use.
19:50
!!google define:RAII
@ElliotBonneville confused about scope? You shouldn't need to care about scope because you shouldn't be reusing variables. They exist from where they're declared to the end of the surrounding block.
@ssube I've seen lots of different people who recommend declaring all variables at the top of functions, because of JS's non-block scope
#fixed-by-es6
That's an odd suggestion considering your blocks shouldn't be large anyway
19:52
@ElliotBonneville yeah, no longer an issue
it was a poor workaround to a lousy mistake in the language, but doesn't matter anymore
sweet. I'm not to up-to-date on ES6
hell, even C fixed that at some point
think I should get into it? I haven't because it seems too far off
it's just not relevant to my day-to-day work right now.
It's not, thanks to babel
we're starting to use it pretty heavily here
19:54
how trustworthy is babel for production code?
oh nice, node-webkit just crashed for no reason. no log.
@ElliotBonneville more reliable than coffeescript, groovy, scala, or IE. Less reliable than C.
@ssube that's really interesting.
no, it's completely useless and sarcastic
no, that the fact that you're using it
also there's a little bit of a gap between coffeescript and c
could mean a lot of things!
babel works and the people maintaining it are smart
19:57
I still have a deep and abiding distrust of something else between me and JavaScript (that's why I never even looked at coffeescript) but I guess I'll have to take that into account
@Zirak people don't find each other, a staffer sits and talks with them till the conversation is over. Everything is stored server side, but we don't store anything that will reveal who talked to who
@SterlingArcher each message has a unique id?
I mean honestly I probably won't get into ES6 until browsers support it native but I don't know. babel looks promising
your application gets a request with a message and puts it in the DB?
19:58
@SterlingArcher oh, then I didn't get it - what's the purpose of what you're writing? Where'll it be used?
@ElliotBonneville You can do --whitelist and get selected features selectively
@ssube correct, it's correlated with a conversation ID, but there's no phone number returned
if your app logs that ID anywhere near headers or referrers or origin IPs, then you're screwed
@Zirak it's for work, people text in for help, and our staffers help them
@ssube even though I have authentication in place?
it's account based
you have to be logged in to get a response
@copy I still don't like it :P I just have to look into it some more I guess.
20:01
@SterlingArcher depends on how you take incoming messages. People text in through... some kind of SMS portal? Does that log anything?
Then anonymously like "he doesn't want the worker to know his name", not anonymously like "he's a secret agent"
The worst part about anon is making sure you don't have logs
People text in via their phones
through twilio, which routes to my rest api
yeah, keeping shit anon is a major pain. The only reason I'm allowed to store the phone number is because we need it to send a response. But it's never returned from the api
That's okay then. When you said "anonymously" it popped a few fuses, lots of services claim to be "anonymous" without knowing what that actually means for people who really need it.
@Zirak correct. Anonymous to where a hacker could get the messages and not reveal who sent them.
20:03
Twilio is an awesome service
Solder your fuses brah
@SterlingArcher the phone number will show you who sent them, though
aaahhh, that is a different kind of anonymous, the harder kind
Phone -> Service -> Staffer. If someone hacks Service, he can find out which Phone sends what.
Maybe not retroactively, but going forward
There's no way this app could exist without storing the phone # though
A song by "Baywood" shows up. I misread it and think "Inappropes"
20:06
Then it's not anonymous, it just doesn't display all the data it has
It's secured by account restriction, but it's anonymous to the point where the staffer and the user have no idea who is who and wont unless they are superh@x
buzzwords brah
But to Bob the DB Guy it's not anonymous as well
unless they're stored encrypted
I'll ask my boss about that
Encryption means something's decrypting them, and in this case something=Service, which is also what stores the data, so you have a single point of failure
20:09
But, to be fair, bob the db guy is me lol
I never trusted you
not if you pull in an encrypting service
which I don't know if one exists because it probably wouldn't be secure if it did
@Zirak I didn't realize that you did change it in the end. Thank you
20:10
@ElliotBonneville HSM
I wake up in the middle of the night every now and again thinking about the stake
Now I can sleep in peace
inb4 he changes it back
@copy yeahh
@SterlingArcher context ?
Besides, is it a constant encryption key? Hardcoded? Where? If it's not constant, where is it stored?
1 min ago, by Zirak
I never trusted you
20:11
that will do
@Zirak I don't know these things D: I only know basic authentication
Encrypt with rot13
DB guy will never figure it out
What talks to this Encryption Machine? Is it also Service? If so, still a SPoF
This shit's hard
20:12
All I know is when i was using coldfusion shit was encrytped with SHA256 and a 16 digit salt
the alien ninjas, @Zirak
all you have to do is hire mercenary alien ninjas.
@Zirak that's where a TPM comes in handy
if you hire alien ninjas SPoF is you.
@SterlingArcher SHA is not a form of encryption, it's a one-way cryptographically secure hash
you can't get the phone number back out
@ssube Sure, but what actually calls encrypt? If I can place myself between that call and the internet, I win
20:13
what you need is an appliance that stores the sensitive data in encrypted form (encrypted on the fly, not just at rest) and a TPM storing a number of keys
So.. cryptography != encryption?
Also
@Zirak Yes, but that's always the case
your app nodes each have a unique key, regenerated on the hour, calling into the appliance
@copy Not always, if I sit on a Tor exit node, I don't know the identity of the one browsing
(unless they're really stupid)
@Zirak yeah, you need the app nodes to have a direct link to the appliance. Probably a VPN or point-to-point link between the two boxes.
So you have the proxy/balancer -> app nodes (each with unique, short-lived key) -=-> appliance (with tpm)
-=-> being the universal notation for a tunnel
20:16
@Zirak Then it's still not encrypted
it requires setting up an internal CA, but you can treat the app nodes as completely expendable and knock them down and revoke their keys if they show any signs of tampering
Anyway, everything discussed here is overkill for @SterlingArcher's requirements
Oooorrr you can not call yourself "anonymous"
@copy exactly
Having requirements for "security" is almost always going to be laughed at by everyone in the software security field.
20:17
@Zirak STOP NITPICKING AT ME D:
Security is hard to measure, and even still, it always feels like the security you have isn't enough.
To be fair, @SterlingArcher doesn't have to keep out the reds.
This isn't cold war level secrecy.
It's good to keep thinking about ways your system can be compromised, and ways to prevent them, but it's not always useful in a business sense.
@ShotgunNinja bullshit and bullshit
@SomeGuy It wasn't me, there was an edit war, then meta.programmers decided I'm a dbag and edited against my will.
20:18
@ShotgunNinja and bullshit
@Zirak You deserve it
Guys it's ok, I authenticate
@app.errorhandler(401)
def not_authorized(error=None):
	message = {
		'status': 401,
		'message': 'Not authorized, please log in.',
	}
	resp = jsonify(message)
	resp.status_code = 401
	return resp
Douchebag
68 times that we've spoken about it.
was wondering if anyone has any ideas/suggestions on how to left alignt the js-marquee div's text on click/edit? jsfiddle.net/9879zuma
Heh, 69 now. Let's leave it that way
20:19
I'm still pretty pissed at it, they pretty much said "fuck you and your artistic license", but who cares
stake
what's at stake if we don't?
@Zirak Yeah, I understand
@SomeGuy xD
20:20
Rosebud was his dinner.
@ssube what are you playing at?
Oh yeah, upboat stuff here:
39
Q: What is java interface equivalent in Ruby?

crazycrvCan we expose interfaces in Ruby like we do in java and enforce the Ruby modules or classes to implement the methods defined by interface. One way is to use inheritance and method_missing to achieve the same but is there any other more appropriate approach available ?

Now I'm hungry
@copy I had thai for lunch so I'm hungry again too
@Zirak there isn't ruby isn't a good language
@copy #5, from top-left to right-bottom
@copy Last Saturday, I had a sudden craving for pizza, but my throat started aching so I said myself "Zirak, you handsome creature, you won't enjoy the pizza this way - wait for a day, feel better, and then consume". I've been sick for a week. Yet to have that pizza.
Earlier today; they made me select the gyro as a burrito...
20:24
@taco #2
last night we had a shouting war at my house about how to define a sandwich
grilled cheese
the main debate was whether hot dogs count as sammiches
@Zirak Remember to ask them to draw you something!
since they are content between two pieces of bread
no, it's open faced
20:25
one of my housemates was of the opinion that it's one piece of bread
I said one piece doesn't matter, since a bagel sammich can be cut part way
what about a piece of bread folded over with something in the middle? that's a sandwich
then I folded a slice of pizza in half and all hell broke loose
so a hotdog is too
why does the shape of bread factor into it?
It's an open-faced single bun
IMO, folded pizza is a sammich: it has bread on both sides to hold the content
20:25
@SomeGuy But of course. I think I have a gallery somewhere of all the unicorns.
@ssube You fiend
hamburgers are sammiches, pretty clearly
@Zirak I had pizza twice in the last two days
really what you have to do here is determine if the article of food in question has another name, and how popular that name is.
if that name is less popular than sandwich it is a sandwich; otherwise it is not.
but hotdogs are the tricky one. Is a hotdog a sammich if the bun is connected or only if the bun is split in two?
@copy /me wants to punch you in the punching area
20:26
Does a sad hamburger with the bun still joined on one side not count as a sammich?
WHAT IS SAMMICH?
you can't define whether or not something is a sandwich because there is no formal definition.
Clearly, we need to invent a new language which handles this specific case.
an item of food consisting of two pieces of bread with meat, cheese, or other filling between them, eaten as a light meal.
and a culture too
there so is a formal definition
20:28
yeah you literally can define what a sandwich is, just how they literally defined 'literally' as meaning 'figuratively
'
pop culture plays a part
@taco tacos clearly aren't sammiches so stfu
lol :(
you're not even a real meal
@ssube what about half a sandwich? i.e. I'm feeling hungry so I go in the kitchen and look for some food. I spot cheese and upon deliberation decide I want a cheese sandwich. However I am not that hungry, so I only want half a sandwich. Am I going to make a whole sandwich with two pieces of bread and then throw half away, or am I going to use one piece of bread instead, but fold it over?
I am delicious
20:28
and if the latter, is it still a sandwich?
You could make anything into a taco
@taco said the creators of the fleshlight
gotta get some work done, have a good weekend guys
/poof
bye taco :(
the room just got a little less delicious.
Does it have to be bread? What about rice cake?
20:30
/gasp what about icecream sandwiches?
And other assorted goodies, like the Pancake Sandwich?
@Zirak pancakes are a kind of bread
Your face is a kind of bread
Your mom was a kind of bread last night, when I folded her in half and put her in the toaster.
Was it at least one of those popping toasters?
But of course. A very springy one, too.
When she was done toasting, your mother flew up in the air and landed on the counter.
hello silly people
Classic Mom
3
Object.freeze(window);
I wish that would happen in my office to sombody lol
Hahaha
hm. Compliance wants us to start using Nexus Pro, but that costs as much as TeamCity and Gitlab put together.
@AwalGarg still need halp
Turns out Gitlab and TC are actually really cheap.
20:46
@MadaraUchiha yes, just a sec
3 hours ago, by Awal Garg
Anyone knows how I can use es6 module syntax when using in browser compilation described here? I am getting a require not defined error when using es6 modules :( Including the babel polyfill doesn't help, including es6-module-loader doesn't help, etc.
what else are you using?
I've had that problem before.
the browser
conflict between a couple of libraries, one of which redefined require.
@AwalGarg ES6 modules compile to some other module system that works with ES5
seriously?
20:47
If you compile AMD, you'll need require.js
You you compile CommonJS, you'll need Browserify
etc
@MadaraUchiha got an example project up somewhere? I tried including require.js but that gave me a 3page error which is completely unreadable :/
or webpack to UMD and call it a day
@AwalGarg ^
If you have to suffer through require later, your library still works.
I think that's the best solution
20:49
I am trying to avoid a watch/build system because this is in a VM.
require sucks, really.
var webpackOptions = {
  output: {
    filename: '[name].bundle.js',
    libraryTarget: 'umd'
  },
  plugins: [
    new webpackOptimize.UglifyJsPlugin({
      minimize: true,
      output: {comments: false}
    })
  ]
};
@AwalGarg Well, jspm works well in that case
gulp.task('package:lib', ['scripts', 'tests'], function () {
  return gulp.src(paths.dest.main + '/index.js')
    .pipe(webpack(webpackOptions))
    .pipe(gulp.dest(paths.dest.pack));
});
@MadaraUchiha seems like that is my last option :/
20:50
@AwalGarg watch/build are totally different things. Watch is always bad, build is always good.
Greetings
Sorry for the delay in saying something
I'm making a very basic syntax highlighter
@ssube a build system which watches for changes and autocompiles
Since it may be something simple as hell, I'm asking you here
@AwalGarg those are made of satan
And it works pretty fine for SQL, but screws up in Javascript
If you can check jsfiddle.net/fwfc1yd9 and tell me what I'm (probably) doing wrong in the code
I would thank you a lot
I can't see any reasonable reason for it to screw up
20:52
what's it doing wrong?
Check the link
Basically: it is highlighting keywords before highlighting anything else
yeah, the link has some stuff, and it appears to be highlighted
But, if you check the 2nd function, it has an array
And that array has the keywords' part in the middle
After the string matching
But it is being executed before
is it?
This makes no sense what-so-ever
Well, the output suggests it
20:54
it looks right to me, except that it's not matching regexes, which you can't do with regex
also the part where regex won't work for parsing JS
One thing is parsing Javascript, other thing is matching tiny specific regular bits
what's preventing the keyword rule from matching within a string?
I'm doing a crime there:
I'm matching it, stuff it into a string and match the HTML again and again and again
That isn't performance-friendly
But it will fetch the textnodes
Hi everyone!

I've a problem with my calculating system.
Ich have 3 input fields. In the first input I type what I earn for money (for example, I earn 500 Dollar), the second how many I give out for buying something ( for example 50 Dollar) in the third input I became the result of the first two inputs. (500 - 50)

So its easy when I use for the inputs an id, but, I can have multiple fields of the same inputs.
I dont know how to select the first and second input to became the result like a loop.
(see full text)
@HarisBjelic 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.
20:56
So, I need to have the right order or it will be chaos
But the order doesn't seem to be respected
I tryied with a foor loop but my website crashes.. The problem is I add dynamical an row with the 3 inputs
Salve centurion!

« first day (1672 days earlier)      last day (3503 days later) »