gist.github.com/masak/5431185; logs at irclog.perlgeek.de/masakism/today
Set by moderator on 23 April 2013.
07:57 RichiH joined 08:16 woolfy joined 09:24 cognominal joined 11:22 Farow joined 11:36 j0se joined 12:37 GlitchMr joined
masak -op GlitchMr 12:47
cognominal afk for ~45 minutes 12:55
GlitchMr lol, ok ;-) 13:01
I'm just wondering how it will look. Actually, I have no idea why I joined, considering the channel has logs, but whatever. 13:02
masak there will likely not be much action here until Wednesday. 13:04
only anticipation :>
GlitchMr ;-) 13:05
2013-05-01T16:00Z -- 2013-05-01T20:00Z 13:07
I assume it is in UTC
east GlitchMr: "GMT time is also referred to as "Z" or, phonetically, "Zulu" time" 13:12
GlitchMr Oh, I cannot read. 13:14
Why I haven't noticed it's ISO 8601... 13:15
masak GlitchMr: you can also follow the link in the gist. it will take you to the correct timestamp and show it in different time zones. 13:19
GlitchMr That page confused me when I entered it
masak anything you'd do to improve it? 13:29
pmichaud the link in the gist (when I looked) didn't actually show the UTC time anywhere. 13:52
masak it should show the time-in-all-timezones as a vertical line. 13:53
but -- correct -- I see no UTC+0 time either.
pmichaud yeah, so I wasn't entirely certain that the time it was displaying corresponded to the time in the gist 13:54
13:54 isBEKaml joined
masak since I'm in UTC+2 (CET), it shows 6:00 pm here, with a green line. 13:54
isBEKaml ooh, activity. :)
masak: 6pm? that's surely not right? It's 1930 hrs here where I am. 13:56
Oh, you must be on DST.
isBEKaml stupidly gets confused by TZs. 13:57
masak yes, most of Europe is on DST.
and I wasn't talking about the current time, I was talking about the time of the workshop.
isBEKaml masak: ah, okay. 13:58
14:59 ggoebel joined
japhb isBEKaml, it's not stupid to be confused by TZs. They're confusing all on their own. 15:03
15:16 ggoebel joined
isBEKaml japhb: yeah, spherical problems. 15:20
15:20 ggoebel_ joined 15:25 isBEKaml_ joined 15:27 isBEKaml joined 15:47 isBEKaml joined
isBEKaml japhb: yeah, spherical problems. :) 15:48
doh, sorry about that double message (lost connectivity and all) :| 15:50
16:53 Farow|2 joined 17:41 mjgardner joined
mjgardner I'll be attending the workshop on May 1. 17:42
raiph masak: thesis: "It is more difficult to achieve simplicity in a language whose runtime is known for the "DWIM" principle: "do what I mean"." # your reaction? 18:07
(let's give that proposition the tag #simplicity) 18:09
#readability thesis: "It is more difficult to achieve readability in a language whose community prides itself on clever shorthand"
#elegance thesis: "it is more difficult to achieve elegance in a language which requires so many baroque decorations to accomplish basic things." 18:10
(these are from www.reddit.com/r/coding/comments/1d...ance_free/ )
masak: i'm mulling these atm and intend to respond this afternoon 18:11
cognominal raiph: s/baroque/admnistrative/; instead terse languages superficially look baroque, other language just look boring and are stalinian in their look (as in stalinain architecture) and in their coercive behaviour. 18:19
raiphL but the "baroque" in terse languages have a purpose. they are an huffmanization of some boring syntax. 18:21
raiph hmm. the poster seems to imply verbosity ("so many") of adverbs/adjectives ("decorations") for "basic things". that surprised me. 18:23
what do you think s/he's talking about? 18:24
18:24 snearch joined
raiph cognominal: "baroque" is a derogatory evaluation so i'm basically ignoring that 18:25
18:27 mjgardner left
raiph masak: while my main concern is to fairly understand the posters points, I'm also wanting some rebuttal options. As such I'm now looking for a p6 example each of DWIM --> simplicity; shorthand --> readability; longhand --> readability; and p6 elegance contrasted with inelegance in some other respected and popular lang due to baroque decoration for something basic 18:43
19:01 Farow joined
GlitchMr projecteuler.net/problem=5 19:09
say [lcm] 1..20
Well, ok, that's too mathematical to be helpful
Then again, Haskell doesn't have bad solution for that too 19:10
foldl1 lcm [1..20] 19:13
moritz except that the 1 in 'foldl1' looks like cruft :-) 19:22
GlitchMr moritz, it's Haskell, not Perl 6. 19:29
It likes cruft.
It's still better than many other programming languages, nevertheless. 19:30
19:30 ggoebel joined
GlitchMr Hi, ggoebel 19:30
masak backlogs 19:31
raiph: I really, really want to give a good response to that poster. his intent seems genuine. 19:33
raiph: let me try here first. 19:34
raiph masak: yeah. it really has me thinking
here's what i have so far for his #simplicity point:
"DWIM is an embodiment of the idea that the [coder] ... should not be stopped and forced to correct himself or give additional information in situations where the correction or information is obvious." 19:35
DWIM is a 50 year old paradigm that is specifically aimed at letting users viscerally experience simplicity, especially newbies. It works.
DWIM can have negative consequences, including creation of increased complexity in other regards. As in all things, there are tradeoffs.
masak raiph: my general rebuttal is that Perl has its roots in DWIM, clever shorthand and "baroque decorations" (which I take to mean "unfortunate syntax") -- what I *see* in practice is a community that loves its language, and can take it places, warts and all.
GlitchMr I don't think that DWIM in Perl was bad.
But here are some examples of bad DWIM - catb.org/~esr/jargon/html/D/DWIM.html
masak raiph: specifically, for each point:
raiph: I don't see DWIM and simplicity standing in opposition. at all. a Pythonista would perhaps have you think so, but I wouldn't, and I bet a Perler in general wouldn't. 19:36
GlitchMr It could be annoying if you typed "delete *$", and system assumed you meant "delete *".
masak raiph: in some senses natural languages and Perl embrace DWIM because the *world* embraces DWIM. it's just a kind of realism. 19:37
GlitchMr But I think that Perl is easy to learn, because it reminds natural language.
raiph masak: right. if you read what i just posted above i claim dwim is PRO simplicity (of a particular sort)
GlitchMr DWIM is one of things that make it seem more like natural language.
masak raiph: I concede the second point. but I don't think the (Modern) Perl community embraces clever shorthand.
raiph: as for the third point -- Perl, 5 in particular, has a number of syntactic warts. they're annoying, especially to outsiders. but it also has a number of syntactic conveniences. achieving elegance becomes a matter of preferring the latter. harder than in a better-designed syntax? yes. doesn't stop Perl programmers, though. 19:39
I'm gonna let it simmer for a bit now and not reply immediately :)
raiph masak: a culture that encourages haikus arguably encourages readability of its prose 19:40
GlitchMr move $zig target => $here; 19:41
I actually like indirect object notation. But I sort of agree it has lots of quirks. 19:42
masak chuckles at SNRI's comment
19:43 ggoebel joined
GlitchMr Or, even 19:43
move $zig $here;
It feels like natural language... almost
I'm not Yoda to write $zig->move($here)
masak raiph: I guess part of the truth is this: I don't always prefer Perl for its *syntax* (though that's still part of it). 19:44
raiph: I prefer Perl mostly for its *semantics* -- and so, simplicity/elegance don't always come down to perfect syntax. 19:45
readability, admittedly, hinges mostly on this.
but as I said, other things save Perl there.
GlitchMr I find Perl readable.
I think it's mostly problem for non-Perl programmers.
It isn't Java, but it never intended to be Java. 19:46
It's different.
masak it certainly wasn't intended to be Java back in 1987 :P 19:47
GlitchMr It also depends on programmer. You can make awful code without indentation, function names that don't make sense, generic variable names, and so on in any language.
In Python, you can have awful indentation by randomly mixing tabs and spaces. 19:48
raiph masak: do you think dwim in perl embodies the dwim definition i put in "quotes" above? 19:50
masak: do you see any validity to my point above about haikus and prose? 19:51
masak raiph: I think your definition is *correct*, but it feels too abstract. 19:53
raiph: to me, it's more like "DWIM is about not having to be overly specific" 19:54
raiph masak: it's from wikipedia. it may not match what larry means.
masak which says the same thing, more or less, but in fewer words.
oh, ok.
GlitchMr In Perl, you don't use 'System.out.print(it);'
You just 'print;'
masak re haikus and prose, that sounds nice, but I don't know what you mean by it. sounds like a metaphor for something.
GlitchMr: you make a lot of rather obvious points. 19:55
;)
GlitchMr: (and still I don't see where you're heading with it) 19:56
GlitchMr I'm not sure myself anymore.
Perl allows you to make code as short as you like, or as long as you like.
If you don't like "print;", you can type "print STDOUT $_;" 19:57
It isn't idiomatic, but well, you can do that.
It doesn't say you have to make short code (APL, Mathematica), but it also doesn't say you have to make long code (Java). 19:58
It gives you choice.
masak aye. 20:03
but it'd be some weird kind of hubris to claim that Perl is alone in doing this :>
raiph masak: haikus = clever shorthand; prose = regular code; the fact a culture encourages writing of haikus does not mean its prose will suffer; indeed, the practice of writing haikus may improve prose best practice
masak though I would claim that we emphasize it quite a bit. that's what TIMTOWTDI is about, after all. 20:04
raiph: I think "clever" carries along a value judgement that I don't agree with. it sounds like "you're going to regret it, because it was too clever".
raiph: but often enough, when I use shorthand, it's for very good reasons. like in a one-liner that isn't meant to be used more than once (or during a 10-minute period). 20:05
raiph i was quoting the reddit commenter
masak yes, I know.
I
I'm just defending shorthand. :)
raiph right. i'm defending clever shorthand.
just not in production code 20:06
masak modulo the word "clever", I agree with your point. :)
raiph ok. so i take it you disagree with the thesis that cultural support for haikus leads to better prose 20:08
masak hm.
I never saw golfing (for example) as something more than a fun side thing.
there will always be people who cannot wield the instrument properly. I think that was most of GlitchMr's point.
raiph ok. fun leads to better (serious) prose 20:09
:)
masak in Perl, those people are in some sense more of a hazard. there are more ways to screw up.
raiph just give them lisp
masak I'm sorry, this conversation is currently blocking me from writing a blog post. my productivity alarm just went off.
raiph ok. thanks.
masak it's a very interesting conversation, though.
I hope we can resume it. 20:10
raiph later
masak aye.
masak blogs
GlitchMr I also like how Perl makes sense. In C++, you could see "a + b" and have no idea what it does. 20:12
20:15 ggoebel joined 20:36 ggoebel joined
ggoebel GlitchMr: hi :-) 20:40
connectivity issues here... 20:41
masak raiph: ok, I'm back. 20:49
raiph: sorry for so brusquely pausing the conversation before. :)
raiph: I see the reply you've made in the thread.
raiph de nada
masak raiph: fwiw, the "clever shorthand" *is* a form of elegance. 20:50
IMO.
raiph mine too
sometimes
when it's elegant. :) 20:51
Neighbour like when you want an array of values given a hashref and an array of keys?
masak but despite the good intentions of the guy, I'm unsure whether we'll really manage to dig beyond the surface layer of "Perl + elegance. but... I don't feel like they belong together!" -- "well, we do!"
Neighbour: s/array/list/g, but yes. 20:52
like that.
that elegance is especially interesting, because it rests on a semantic bit of sloppiness (arrays and hashes always flattening to lists in transit) that could very easily be confused for semantic ugliness. 20:53
Neighbour @{$_[1]}{@{$_[0]}}; <-- is definitely short, but does not really look elegant (though once you understand it, it might be) 20:54
masak oh, you really meant arrays. 20:55
I must confess that in a case like that, I'd rewrite it until it looked less... brace-y. 20:56
well actually, it depends.
raiph Neighbour: I was thinking you meant @a = $h{@b} # does that, er, DWIM? :) 20:57
Neighbour yes, i'm still just using the basics of perl...apparently :)
masak (on the context the code is in. will others read it? will I re-use it in lots of places?)
raiph: @h{@b} # ;)
raiph: and yes, I was thinking of that use case, too.
Neighbour masak: I stuffed it in a library function which nobody will probably dare look at
raiph that's P5 right? 20:58
Neighbour yes
works with 5.8.8 even (oldest i've had to work with)
raiph i can't imagine p6ers being ok with code that looks like that 20:59
masak raiph: I replied: www.reddit.com/r/coding/comments/1d...ee/c9mmkzk 21:00
Neighbour some p5ers probably aren't either :)
raiph heh
masak raiph: I'm probably not going to participate more in that comment thread now :)
labster good morning, #masakism 21:01
masak good morning, labster! 21:02
labster I have no problem believing in elegance in Perl. Although I've been using an awful lot of Perl 6 lately, and that certainly helps
I do have a regex in perl 5 that I commented "# next time I'll use TECO to improve code readablity" 21:03
masak :)
hey, don't know TECO. it has that homoiconic goodness to it. :P 21:04
knock*
21:29 woolfy left 22:15 mtths joined