« first day (1094 days earlier)      last day (4076 days later) » 

23:00
@Zirak Write-access, huh?
yeah - trying to wrap my head around this...
They're by far more descriptive easier to read than the written version of the spec.
is that so?
I think I got it @BenjaminGruenbaum
Well, which is it? What's that construct?
23:01
@SG 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.
At least for me it is.
//this?
@shmuli Yes, a single line comment.
aha - interesting, i see...
so basically, a single line comment represents a whitespace...
is that one of the things that this diagram is pointing out?
that such a line is disregarded...?
@OctavianDamiean: I see your point. The documentation is rather complex.
It is very thorough (which makes sense, because it is the spec).
23:07
@BenjaminGruenbaum: did you see my last message?
@shmuli When you talk about a language, any language two things matter. Syntax and semantics.
Syntax means the letters and expressions that compose the language. Semantics is how we interpret them.
@BenjaminGruenbaum: listening...
This diagram tells us that //this? is called whitespace, but it does not define that whitespace is disregarded.
@OctavianDamiean: and you're saying that all of this is included in the railroad diagrams?
@BenjaminGruenbaum: Okay, that makes sense...
I could offer a different language with similar to JS semantics and JS syntax where only code that comes after an even number of whites-spaces is considered and everything else is discarded.
23:09
No no, never mind. I generally don't know what I'm talking about.
The syntax would not change at all and the diagram would stay identical, but the definition of how the language treats whitespace does.
This is what the spec has to say about semantics:
> White space characters are used to improve source text readability and to separate tokens (indivisible lexical units) from each other, but are otherwise insignificant.
@BenjaminGruenbaum: if I understand correctly, you telling me that these diagrams only serve to define the semantics, but not behaviors, per se...
This is the part that tells us that white space is insignificant (section 7.2) in the spec.
@OctavianDamiean: lol
@shmuli The semantics are the meaning, they only define the syntax :)
23:12
@BenjaminGruenbaum: intersting
*interesting
@BenjaminGruenbaum: so in concept, these railroad diagrams do not aim to substitute the documentation. correct?
When I write 5+5 you interpret that as 10. However, from a syntactic point of view that's an expression that's an AdditiveExpression containing a number literal, the + sign and another number literal. That's all the syntax of a language, and those rail diagrams tell us. Giving meaning to that expression is what semantics do.
@BenjaminGruenbaum: that makes a lot of sense
@shmuli No, all they do is explain how "words" are written in the JavaScript language. It doesn't substitute the documentation and Crockford elaborates about things in this book. It doesn't replace documentation and it doesn't replace the language specification.
@shmuli it basically just tells you how to write valid JavaScript, not how the parsers are treating code units.
23:16
@BenjaminGruenbaum & @OctavianDamiean: thanks for all your help. that was extremely clear!
Glad we could help.
@Shaz Correct, being a bot maintainer.
pls post. :)
So, wondering if scoped extension methods are worth it from a syntax point of view.
@shmuli I don't really see how our discussion could be an answer :P I did post something pretty similar to a question about Crockford's book a while back
5
A: Crockfords Top Down Operator Precedence

Benjamin GruenbaumWhen parsing a language, two things matter - Semantics and Syntax. Semantically, var x=5; and var x;x=5 seem very close if not identical (Since in both cases first a variable is declared and then a value is assigned to that declared variable. This is what you've observed and is correct for the m...

Yep, pretty similar
@Zirak SO how do I sign up? ;)
23:18
Oh, it's not about the book, just the article - but you might find it interesting since it explores a similar subject.
@BenjaminGruenbaum: I'll definately read it
@Shaz Well, be an active member in here and on the bot. It was really meant to inform the regulars. But of course you can always do PRs, and then get direct write access.
@Zirak Well I may not be on every day, but I've been here since I started using SO :P
...then I've managed to completely forget you?
Sorry
@dystroy Did I tell you the js questions has a restart option now?
@YiJiang Can back me up xD
23:26
Him I remember. Did you change your avatar?
Yes once, but I don't remember what it was before
Only 2K messages.
Zirak has 74K
7+4 = 11. Sum the digits of my age, 9 + 3 = 10. 11 - 10 = 1, 10 - 1 = 9. 9/11 !!!!!
DO YOU NEED ANY MORE PROOF!?
0
Q: AngularJS Improvement - Am I Starting Out Right?

JonI've recently just started with AngularJS and the best way for me to learn is to get some criticism to find out how I can do things better. I did a small project that calls a third party API and shows a bit of the return data. The HTML <body ng-controller="Album"> <div class="container"> ...

23:35
Mar 10 '11 at 20:58, by Shaz
I changed the image not too long ago
ah, Nathan...
...so many people just disappeared
@Nathan last seen 438d ago
@Mr.IDon'tCare Do you care?
23:40
@Shaz I "just dun care."
!!stat 1079641
@BenjaminGruenbaum Mr. I Don&#39;t Care has 365 reputation, earned 0 rep today, asked 41 questions, gave 1 answers. avg. rep/post: 8.69. Badges: 0g 5s 16b
!!learn why "Shutup."
!!stat 464257
23:41
@Shaz Shaz has 6232 reputation, earned 0 rep today, asked 23 questions, gave 216 answers. avg. rep/post: 26.07. Badges: 0g 17s 39b
!!/ban 1079641
@BenjaminGruenbaum User 1079641 already in mindjail.
Spamming bot :/
Ah lol, someone beat me to it.
Noooo. You shall unban me.
I have lived through my punishment.
Its been quite some time.
@CapricaSix I'm pretty sure I earned rep today
23:47
Not according to main
guys, a quick question here about REST API routes
which one seems better
second one
I'm a fan of the 7th option
@Zirak I've found that runs into scalability problems
23:56
Maybe, but it has a great dental plan
POST "/comments/1/like"
POST "/comments/1/dislike"
POST "/comments/1/unlike"

OR

POST "/comments/1/like"
POST "/comments/1/dislike"
DELETE "/comments/1/like"
DELETE "/comments/1/dislike"
ops, got it wrong
dislike and unlike?
@mateusmaso you can edit your posts
did it look like I was typing this
DELETE is wrong, unless you've got only one like and unlike
23:57
@mateusmaso why POST? You're updating state not creating a new resource
As it says, it's supposed to DELETE something, not change it.
All of these sound like a PUT
I'd probably use PATCH over PUT, but definitely not POST
so how you guys would write this routes?
PATCH "/comments/1/like"
PATCH "/comments/1/dislike"
PATCH "/comments/1/unlike"
Maybe not, have to sleep. Gnight
23:59
hmm.. got it
how are the likes stored?
PATCH would make sense if it's a partial update of something; as it says, it patches. PUT is literally overriding. Or PUTting.
@rlemon terraria
?
there is a "likes" table.. to differ like from dislike there is a column for that
...it's really very literal here

« first day (1094 days earlier)      last day (4076 days later) »