code logs -> 2016 -> Mon, 08 Aug 2016< code.20160807.log - code.20160809.log >
--- Log opened Mon Aug 08 00:00:33 2016
00:38 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
01:03 catadroid` [catadroid@Nightstar-950560.dab.02.net] has joined #code
01:06 catadroid [catadroid@Nightstar-ckobm8.dab.02.net] has quit [Ping timeout: 121 seconds]
02:23 himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has joined #code
02:23 mode/#code [+o himi] by ChanServ
03:10 mac [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has joined #code
03:10 mode/#code [+o mac] by ChanServ
03:13 macdjord|Otakuthon [macdjord@Nightstar-r9vt2h.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
05:50 catadroid` is now known as catadroid
07:18 ion [Owner@Nightstar-2qv0j0.vs.shawcable.net] has joined #code
07:33 catadroid` [catadroid@Nightstar-8tj.159.132.82.IP] has joined #code
07:36 catadroid [catadroid@Nightstar-950560.dab.02.net] has quit [Ping timeout: 121 seconds]
08:08 Kindamoody[zZz] is now known as Kindamoody
08:29 catadroid` [catadroid@Nightstar-8tj.159.132.82.IP] has quit [[NS] Quit: Bye]
08:39 himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has quit [Operation timed out]
08:49 Kindamoody is now known as Kindamoody|afk
09:20 celticminstrel is now known as celmin|sleep
11:14 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
11:14 mode/#code [+o himi] by ChanServ
12:08 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
12:08 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
12:08 mode/#code [+o himi] by ChanServ
12:17 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
12:27 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
12:27 mode/#code [+o himi] by ChanServ
12:54 catadroid [catadroid@Nightstar-8tj.159.132.82.IP] has joined #code
13:58 You're now known as TheWatcher[d00m]
14:03 catadroid` [catadroid@Nightstar-6h4uo6.dab.02.net] has joined #code
14:06 catadroid [catadroid@Nightstar-8tj.159.132.82.IP] has quit [Ping timeout: 121 seconds]
14:10 catadroid` is now known as catadroid
14:14
< catadroid>
No no no no no no, Go inserts semicolons
14:15
< catadroid>
WHY DID NO ONE POINT OUT HOW BADLY THIS WENT FOR JAVASCRIPT
14:15
< catadroid>
>.>
14:19
< catadroid>
This also explains the awful error I had the other day
14:54
<~Vornicus>
js I instincitvely include semicolons anyway
15:05 You're now known as TheWatcher
15:08 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
15:10
< ToxicFrog>
Is there a practical difference between "inserts semicolons" and "permits, but does not require, semicolons as statement separators"?
15:35 * TheWatcher EYES gitlab
15:37
<@TheWatcher>
Ruby, ruby on rails, python scripts, shell scripts, and Go.
15:37
<@TheWatcher>
Chose. A. Fucking. Language.
15:37
<@TheWatcher>
+o
15:49 celmin|sleep is now known as celticminstrel
16:03
<&[R]>
<catadroid> WHY DID NO ONE POINT OUT HOW BADLY THIS WENT FOR JAVASCRIPT <-- can you give an example of that?
16:03
<&[R]>
Because honestly, I haven't had a problem with it.
16:26 gizmore [kvirc@Nightstar-l67gjq.dip0.t-ipconnect.de] has joined #code
16:49
<&McMartin>
Go is, in fact, even worse than JS at semicolon insertion, last time I checked
16:49
<&McMartin>
In that something like
16:49
<&McMartin>
while (i > 5)
16:49
<&McMartin>
{
16:49
<&McMartin>
// stuff
16:49
<&McMartin>
}
16:49
<&McMartin>
is probably an infinite loop
16:49
<&McMartin>
It puts one after the while clause
16:50
< catadroid>
^
16:50
< catadroid>
That
16:51
< catadroid>
Admittedly it's less of a problem for Go since there's a single incredibly strongly enforced canonical style
16:51
< catadroid>
But the error message you get when you put the brace on a newline is awful
16:51
< catadroid>
In Javascript where there's less typing, you need to be very careful not to separate return statements and such since you often end up accidentally returning null
16:52
< catadroid>
(typing as in types, not keystrokes)
16:53
< catadroid>
I think my main issue with it is the insistence on not altering language semantics with invisible characters
16:53
< catadroid>
And then doing that
17:15
< catadroid>
ToxicFrog: I'm pretty sure the difference is that I don't want a lexer adding syntax to my program
17:16
< catadroid>
It is actively making it different in unforseen ways, whereas optional statement terminators are potentially a passive problem
17:24
<@celticminstrel>
With optional statement terminators you still need to determine where the statement terminates though. Is it really that different?
17:28
< catadroid>
I personally don't like either
17:28
< catadroid>
I'd prefer it to be visible in the code
17:28
< catadroid>
Potentially with IDE help
17:28
<@celticminstrel>
Does "newline is the statement terminator" count?
17:29
< catadroid>
That's prohibitive and I'm practice not that different from 'insert all the semicolons'
17:29
< catadroid>
In practice*
17:29
< catadroid>
IMO
17:29
<@celticminstrel>
Eh. Maybe.
17:30
<@celticminstrel>
Works well enough in Python though.
17:31
< catadroid>
Python is the worst offender
17:32
< catadroid>
But at least whitespace is more visible in that context
17:32
< catadroid>
Heh, I largely find it funny that Rob Pike was dead set against significant whitespace but happy to insert semicolons
17:33
< catadroid>
In practice this causes a lot more bikeshed discussion than actual issues it seems
17:38 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
17:38 mode/#code [+qo Vornicus Vornicus] by ChanServ
17:39
<&[R]>
Go enforces One True Brace Style?
17:39 * [R] must check it out then
17:47
<&McMartin>
No, no it does not
17:47
<&McMartin>
If you violate it, it does not stop you
17:47
<&McMartin>
It just silently breaks your code and calls it succeess
17:48
< catadroid>
And sometimes noisily breaks in unfathomable ways
17:51
< catadroid>
I think I like a number of Go's features though
17:56 * catadroid appears to be a catalyst of process fixes in production elsewhere in the company today
17:56
< catadroid>
Whilst being very clear that I do not wish to drive this process for them
17:56
< catadroid>
But I did get to talk about human psychology in terms of GUI design though
17:56
< catadroid>
Which was fun
18:35 catadroid` [catadroid@Nightstar-6h4uo6.dab.02.net] has joined #code
18:35 catadroid [catadroid@Nightstar-6h4uo6.dab.02.net] has quit [The TLS connection was non-properly terminated.]
18:36 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
19:42
< ToxicFrog>
catalyst: so, for context, I'm coming from a C and Lua perspective here, where the former requires explicit statement separators and will not compile without them, and the latter has a completely unambiguous grammar that does not require explicit statement separators anywhere but permits them if you think they aid in readability
19:42
< ToxicFrog>
(the convention in the lua community is to use them for one-liners but not elsewhere)
19:43
< ToxicFrog>
And as a C programmer new to Lua, I might naiively describe the latter as "the parser automatically inserts semicolons where needed"
19:43
< ToxicFrog>
And it's not clear to me how this differs from what JS does, or why what JS does is a problem
19:47
<&McMartin>
ToxicFrog: JS's version is almost perfect
19:47
<&McMartin>
Its sole failure mode is:
19:47
<&McMartin>
"return\n val" being not the same as "return val"
19:48
<&McMartin>
If "val" is a large multiline expression, a C or similarly-syntaxed programmer could find themselves doing the former by reflex
19:48
<&McMartin>
And that is turned into pseudo-C as "return NULL; (void) val;"
19:48
< catalyst>
I suspect I dislike the idea of valueless statements at this point
19:49
< catalyst>
ToxicFrog: the difference is that Lua's grammar is grokkable and having a semicolon inserted, e.g. to make an infinite while loop that looks like a finite one is infuriating
19:50
< catalyst>
Specifically that the semantics of the program changes with the whitespace (newline) that you use feels bad
19:51
<~Vornicus>
As someone who programs in lua I didn't know there were semicolons
19:51
<~Vornicus>
tells you how often I see them.
19:51
< catalyst>
I do prefer to avoid semicolons
19:51
<~Vornicus>
Python technically has them too but I don't think I've ever seen one outside of "I'm pasting an example onto a single line in IRC"
19:52
<&McMartin>
Go's version of this is straight-up a fuckup, though
19:52
<&McMartin>
I believe I had phrased that one as "you hate to see that kind of thing at that level of play"
19:52
<&McMartin>
Rob Pike should have known better *there* at least >_<
19:58
<@celticminstrel>
I thought JS had another failure too, but I forget what it was...
19:58
<@celticminstrel>
By the way, doesn't Lua also have the problem with return statements?
20:17
< ToxicFrog>
Vornicus: semicolons are eqv to , inside table initializers and to whitespace between statements; elsewhere they're a parse error.
20:17
< ToxicFrog>
celticminstrel: no.
20:17
<~Vornicus>
oh.
20:18
<@celticminstrel>
Huh...
20:20
< ToxicFrog>
celticminstrel: in fact it is a parse error for a return statement not to be the last thing in its containing block.
20:20
<@celticminstrel>
Eh?
20:21
<@celticminstrel>
I see...
20:21
< ToxicFrog>
celticminstrel: "return; foo()" is a parse error. "return foo()" is valid.
20:23
< ToxicFrog>
you may have been thinking of the case where "a = b(c):d()" is potentially ambiguous: it could be parsed as "a = b; (c):d()" or as "a = (b(c)):d()". In practice it is always parsed as the latter, and if you want it parsed as the former you must insert the semicolon yourself (IIRC, this is the only place in lua an explicit statement separator is required).
20:25
<@celticminstrel>
Wait, does this mean that anything of the form (...):blah() on a line following something like a = b will be parsed incorrectly?
20:28
< ToxicFrog>
As a special case, inserting the newline will result in an "ambiguous syntax" parse error, precisely to avoid that failure mode
20:28
<@celticminstrel>
Ah...
20:29
< ToxicFrog>
But that's a "save the programmer from themselves" special case; it's not being parsed incorrectly, you've formatted your code in a highly misleading manner.
20:29
<@celticminstrel>
I would tend to disagree, but whatever.
20:33 catadroid [catadroid@Nightstar-td1d0s.dab.02.net] has joined #code
20:35 catadroid` [catadroid@Nightstar-6h4uo6.dab.02.net] has quit [Ping timeout: 121 seconds]
20:57
<&[R]>
IIRC there's 3 gotchas with JS' semi colon insertion, I'll try and find the article.
21:09
<&[R]>
return/break/continue/throw and the postfix expressions all behave the same under ASI.
21:10
<&[R]>
Second gotcha is: a + b\n(c + b).foo()
21:13
<&McMartin>
12:29 < ToxicFrog> But that's a "save the programmer from themselves" special
21:13
<&McMartin>
case; it's not being parsed incorrectly, you've formatted
21:13
<&McMartin>
your code in a highly misleading manner.
21:14
<&McMartin>
That's only formatting it in a misleading manner if in inserting the line "a+b" you meant "oh, that thing on the next line needs to be an *argument list*"
21:59 GreenGuy [uid85383@Nightstar-oju.p8m.184.192.IP] has joined #code
22:14 Kindamoody|afk is now known as Kindamoody
22:26
< catalyst>
"I'm not used to things being successful"
22:30
< catalyst>
Today I was literally debugging a production process for them
22:30
< catalyst>
...I don't think I'm primarily a coder any more at work
22:31
<&McMartin>
It sounds like your skills outside of coding are direly necessary though
22:32
< catalyst>
Oh, absolutely
22:32
< catalyst>
I have the trust of many different departments, can see patterns and am able to be diplomatic about suggesting courses of action and compromises
22:33
< catalyst>
Empathy goes a long way in a sea of introverted technical types
22:33
< catalyst>
I'm learning how to delegate with more trust as well, which also helps a great deal
22:34
< catalyst>
And, frustratingly, I'm somewhat of a natural leader
22:34
< catalyst>
I can't just hide away in my hole and code to spec when I see people failing to spec things properly
22:34
< catalyst>
Oh well
22:37
<~Vornicus>
Did you say the quoted sentence?
22:44
< catalyst>
No, that was Rob Pike in his 2014 Gopher conference keynote
22:44
< catalyst>
(To be fair to Go, I think it gets a lot of interesting things right)
22:52 catadroid [catadroid@Nightstar-td1d0s.dab.02.net] has quit [[NS] Quit: Bye]
22:53 catadroid [catadroid@Nightstar-td1d0s.dab.02.net] has joined #code
23:03 gizmore [kvirc@Nightstar-l67gjq.dip0.t-ipconnect.de] has quit [[NS] Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/]
23:06 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving]
--- Log closed Tue Aug 09 00:00:49 2016
code logs -> 2016 -> Mon, 08 Aug 2016< code.20160807.log - code.20160809.log >

[ Latest log file ]