<    April 2017    >
Su Mo Tu We Th Fr Sa  
                   1  
 2  3  4  5  6  7  8  
 9 10 11 12 13 14 15  
16 17 18 19 20 21 22  
23 24 25 26 27 28 29  
30
00:03 FunnyLookinHat joined
00:13 scippio joined
01:22 joshonth_ joined
01:44 LastWhisper____ joined
02:27 Lierdakil joined
02:43 coffeescriptbot joined
02:43 <coffeescriptbot> [coffeescript] GeoffreyBooth pushed 1 new commit to master: https://git.io/vSb3z
02:43 <coffeescriptbot> coffeescript/master 0da9d71 Geoffrey Booth: Fix broken links, update redirected links (#4505)...
02:43 coffeescriptbot left
02:43 coffeescriptbot joined
02:43 <coffeescriptbot> [coffeescript] GeoffreyBooth pushed 1 new commit to 2: https://git.io/vSb32
02:43 <coffeescriptbot> coffeescript/2 d7e096a Geoffrey Booth: [CS2] Fix links in v2 docs (#4506)...
02:43 coffeescriptbot left
02:53 coffeescriptbot joined
02:53 <coffeescriptbot> [coffeescript] GeoffreyBooth pushed 1 new commit to 2: https://git.io/vSbsI
02:53 <coffeescriptbot> coffeescript/2 ae096a3 Geoffrey Booth: Merge branch 'master' into 2...
02:53 coffeescriptbot left
04:35 LastWhisper____ joined
04:56 Cidan joined
05:57 auvipy joined
06:30 coffeescriptbot joined
06:31 <coffeescriptbot> [coffeescript] GeoffreyBooth pushed 1 new commit to 2: https://git.io/vSb0E
06:31 <coffeescriptbot> coffeescript/2 0e8feb7 Geoffrey Booth: [CS2] Literate CoffeeScript without dependencies (#4509)...
06:31 coffeescriptbot left
06:45 netj joined
07:00 scippio joined
08:28 tvw joined
09:07 jscheel joined
09:12 jscheel left
09:37 vlad1777d joined
10:41 netj joined
10:50 BearishMushroom joined
11:30 TinkerTyper joined
13:49 LastWhisper____ joined
15:18 joshonth_ joined
15:52 trojanc joined
16:30 Gustavo6046 joined
17:30 tvw joined
17:37 LastWhisper____ joined
17:52 coffeescriptbot joined
17:52 <coffeescriptbot> [coffeescript] GeoffreyBooth pushed 1 new commit to 2: https://git.io/vSNNH
17:52 <coffeescriptbot> coffeescript/2 e215a2d jessaustin: Write .coffee_history in $XDG_CACHE_HOME (#4472)...
17:52 coffeescriptbot left
18:20 scippio joined
18:37 tvw joined
20:37 paradoxguitarist joined
20:42 joshonth_ joined
20:46 <paradoxguitarist> Why is it that inserting a variable like this is wrong? request_body = '{"ticket": { "comment": { "body": "#{ticket_comment}", "public": "no" }}}'
20:47 <deltab> paradoxguitarist: consider what the result is when tick_comment contains a "
20:49 <paradoxguitarist> Do strings inherently contain them?
20:56 <deltab> no
20:58 <paradoxguitarist> I get why I'm going to need to .replace some of the special characters. but I'm not sure why I can't place the var into the string.
20:58 <paradoxguitarist> http://coffeescript.org/#try:ticket_comment%20%3D%20%22fine%22%0Arequest_body%20%3D%20%27%7B%22ticket%22%3A%20%7B%20%22comment%22%3A%20%7B%20%22body%22%3A%20%22%23%7Bticket_comment%7D%22%2C%20%22public%22%3A%20%22no%22%20%7D%7D%7D%27%0Aalert%20request_body
20:59 <deltab> interpolation is only done in "-delimited string literals
21:00 <deltab> so you can do this: http://coffeescript.org/#try:ticket_comment%20%3D%20%22fine%22%0Arequest_body%20%3D%20%22{\%22ticket\%22%3A%20{%20\%22comment\%22%3A%20{%20\%22body\%22%3A%20\%22%23{ticket_comment}\%22%2C%20\%22public\%22%3A%20\%22no\%22%20}}}%22%0Aalert%20request_body
21:01 <paradoxguitarist> Thanks!
21:01 <deltab> but notice what happens here: http://coffeescript.org/#try:ticket_comment%20%3D%20%27not%20%22fine%22%27%0Arequest_body%20%3D%20%22{\%22ticket\%22%3A%20{%20\%22comment\%22%3A%20{%20\%22body\%22%3A%20\%22%23{ticket_comment}\%22%2C%20\%22public\%22%3A%20\%22no\%22%20}}}%22%0Aalert%20request_body
21:02 <deltab> it's no longer valid json
21:03 <deltab> so you get an error message: http://coffeescript.org/#try:ticket_comment%20%3D%20%27not%20%22fine%22%27%0Arequest_body%20%3D%20%22{\%22ticket\%22%3A%20{%20\%22comment\%22%3A%20{%20\%22body\%22%3A%20\%22%23{ticket_comment}\%22%2C%20\%22public\%22%3A%20\%22no\%22%20}}}%22%0AJSON.parse%20request_body
21:06 <paradoxguitarist> So i'll have to strip the \ from the string prior to adding it?
21:06 <paradoxguitarist> **parsing it.
21:06 <deltab> no, the issue is the "
21:07 <deltab> anyway, do this instead: http://coffeescript.org/#try:ticket_comment%20%3D%20%27not%20%22fine%22%27%0Arequest_body%20%3D%20%0A%09ticket%3A%0A%09%09comment%3A%0A%09%09%09body%3A%20ticket_comment%0A%09%09%09public%3A%20%22no%22%0A%0Aalert%20JSON.stringify%20request_body
21:07 <paradoxguitarist> =)
21:08 <paradoxguitarist> thanks
21:25 shesek joined
22:43 paradoxguitarist joined
22:49 joshonth_ joined
23:11 joshonth_ joined
23:14 shesek joined
23:36 Gustavo6046 joined