code logs -> 2016 -> Tue, 03 May 2016< code.20160502.log - code.20160504.log >
--- Log opened Tue May 03 00:00:33 2016
00:16 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Operation timed out]
00:16 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
00:16 mode/#code [+o Syloq] by ChanServ
01:00 Derakon[AFK] is now known as Derakon
01:07 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [[NS] Quit: broken scrollback]
01:08 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
01:12 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving]
01:14 catadroid [catalyst@Nightstar-5a6fb2.dab.02.net] has joined #code
01:19 Turaiel[Offline] is now known as Turaiel
01:24 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
01:24 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has joined #code
01:24 mode/#code [+o himi] by ChanServ
01:37 celticminstrel [celticminst@Nightstar-q0f7bb.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
01:38 celticminstrel [celticminst@Nightstar-q0f7bb.dsl.bell.ca] has joined #code
01:38 mode/#code [+o celticminstrel] by ChanServ
01:39 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
01:58 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
01:58 mode/#code [+o Reiv] by ChanServ
03:13 crystalclaw|AFK is now known as crystalclaw
05:11 Kindamoody[zZz] is now known as Kindamoody
05:16 Derakon is now known as Derakon[AFK]
05:29 Turaiel is now known as Turaiel[Offline]
06:02 catadroid` [catalyst@Nightstar-a24255.dab.02.net] has joined #code
06:05 catadroid [catalyst@Nightstar-5a6fb2.dab.02.net] has quit [Ping timeout: 121 seconds]
06:32 crystalclaw is now known as crystalclaw|AFK
06:36 celticminstrel [celticminst@Nightstar-q0f7bb.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:23
< abudhabi>
In python, what's the difference between 'print "lol"' and 'print("lol")'?
07:24
<@ErikMesoy>
The former is 2e and the latter is 3e.
07:30
<~Vornicus>
the former uses print as a keyword. works fine in python2 but they decided (rightly) that having print as a keyword was dumb, so in 3 it's not any more.
07:32
< abudhabi>
OK.
07:33
<~Vornicus>
Other than that, nothing. () in expects-a-value context is just for grouping, so print("lol") in python 2 is exactly the same as print "lol"
07:35
<@Reiv>
I find a language who, with but a version change, completely breaks standard syntax to be baffling
08:09 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds]
08:19 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
08:21
< abudhabi>
What's a good python 3 tutorial, then?
08:21
< abudhabi>
Because all the ones I've stumbled upon are like py2 by dint of using print as a keyword.
08:22
<~Vornicus>
I learned Python from the official language tutorial. It's probably still good
08:23
<~Vornicus>
-- 15 years later.
08:29
<@gnolam>
Yeah. The official one is good.
08:30
<@gnolam>
Reiver: well, for the print case, they simply fixed the language for the principle of least astonishment.
08:49 catadroid` is now known as catadroid
09:13 Kindamoody is now known as Kindamoody|out
09:23
< abudhabi>
I'm impressed. Python has operators for integer and float division separately.
09:31
< simon_>
my predecessor made this smart feature, and then built a huge feature on top of it that isn't completely working. I've been tasked to remove this feature until we make it work properly. unfortunately, it seems that the tests for the small, neat feature are all embedded into the tests of the huge feature.
09:31
< simon_>
so much for testability.
09:33
< abudhabi>
EXTERMINATUS.
09:40 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code
09:40 mode/#code [+o Crossfire] by ChanServ
09:43 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
09:45
< abudhabi>
How the hell do quotes work? What's the distinction between " and '?
09:48
<~Vornicus>
double-quoted strings can have unescaped single quotes, and vice versa
09:48
<~Vornicus>
that's it
09:49
<~Vornicus>
things in tripled quotes (of either type) don't end even at line boundaries; you can keep going until you place triple quotes again.
09:51
<~Vornicus>
so " and ' work the same way as in javascript.
09:52
< simon_>
ahhh, that beautiful feeling when a class only references itself. *delete*
09:59
< abudhabi>
OK.
10:01 ion [Owner@Nightstar-g4pdrm.eng.wind.ca] has joined #code
10:02 emmy [M@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
10:04 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
11:11 Derakon_ [chriswei@Nightstar-5mvs4e.ca.comcast.net] has joined #code
11:12 Reiv [NSwebIRC@Nightstar-g7fs0k.xtra.co.nz] has joined #code
11:12 mode/#code [+o Reiv] by ChanServ
11:13 Derakon[AFK] [chriswei@Nightstar-5mvs4e.ca.comcast.net] has quit [Ping timeout: 121 seconds]
11:14 catadroid [catalyst@Nightstar-a24255.dab.02.net] has quit [[NS] Quit: Bye]
11:14 catadroid [catalyst@Nightstar-a24255.dab.02.net] has joined #code
11:15
< catadroid>
So, I have successfully written and deployed std::unique_ptr and std::shared_ptr implementations
11:15
< catadroid>
I should probably consider myself a reasonable C++ programmer
11:27
< abudhabi>
You know, I've heard Python pitches before, but they all seemed to concentrate on largely irrelevant stuff like the indentation instead of brackets.
11:27
< abudhabi>
What those should tout is Python's string handling.
11:28
< abudhabi>
I never saw https://docs.python.org/3.5/tutorial/introduction.html before, and this is what is selling me on Python.
11:28
< abudhabi>
After working two years with Java's awful way of doing strings.
11:28
< abudhabi>
(And Java is actually pretty good, all told, compared to the nightmare of C/C++.)
12:29 ion [Owner@Nightstar-g4pdrm.eng.wind.ca] has quit [Ping timeout: 121 seconds]
12:31 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
12:32 catadroid` [catalyst@Nightstar-oge2a7.dab.02.net] has joined #code
12:35 catadroid [catalyst@Nightstar-a24255.dab.02.net] has quit [Ping timeout: 121 seconds]
12:47
< catadroid`>
Native and managed languages tend to really suck at strings
12:48
< catadroid`>
I've not done much python, perl or similar recently, but I remember liking Ruby
13:09
<@TheWatcher>
I heard a good one about perl a couple of weeks ago, a guy in work saying that it shouldn't be used "because it's an old language"
13:10
<@TheWatcher>
I've heard lots of arguments against perl, some of them even valid, but that one...
13:12
<@TheWatcher>
(He then proceeded to waffleon about a python web framework that hasn't had a stable release in the last 6 years, for extra irony)
13:18
<&ToxicFrog>
abudhabi: as far as string handling goes, that's not so much a selling point of Python as it is a selling point of any remotely modern HLL
13:19
< abudhabi>
ToxicFrog: Such as?
13:25
<&ToxicFrog>
abudhabi: python, ruby, clojure, lua, arguably even rust, and those are just the ones I've used in the last year
13:34
< abudhabi>
Never used any of them.
13:45
<&ToxicFrog>
Aah.
13:46
<&ToxicFrog>
Anyways, what I'm speculating here is that most python pitches are assuming you've already decided to use something in that general family and are trying to answer the question "why should I use Python instead of Ruby", say
13:46
<&ToxicFrog>
Rather than "why should I use a HLL rather than Java or C++"
13:46
< abudhabi>
Whereas the pitch for me would be "why should I use Python instead of Java/C++".
13:46
< abudhabi>
Yes.
13:47
< pjdelport>
TheWatcher: That's kind of a valid argument against Perl, at this point.
13:48
< pjdelport>
TheWatcher: It's the kind of old relative to which a Python web framework that hasn't had a stable release in the last 6 years is *fresh*.
13:49
< pjdelport>
Perl is still maintained, but it's old in spirit.
13:49
< pjdelport>
If that makes sense.
13:51
<&ToxicFrog>
pjdelport: python is only slightly younger!
13:52
< pjdelport>
Nah; the difference is Python has been very actively refreshing itself. :)
13:52
< pjdelport>
More so than Perl. (At least as far as I'm aware; it's been a long time since I've done Perl.)
13:53
<&ToxicFrog>
So has perl; the latest semantic change (5.22) was released last fall and the latest bugfix last week.
13:56
< abudhabi>
ToxicFrog: So, hm, which of that list are compiled?
13:57
< abudhabi>
Do any compile to native applications?
14:06
<&ToxicFrog>
abudhabi: Rust has a mandatory compilation step that emits native binaries and has ABI compatibility with C.
14:06
<&ToxicFrog>
Clojure automatically compiles to JVM bytecode at load time, which is then handled by the JVM JIT; it can emit jars but not native binaries.
14:07
<&ToxicFrog>
Lua and Python compile to bytecode for their respective VMs at load time and have optional JIT implements (luajit and pypy); they can't generate native binaries but tools exist to bundle (compiled or not) scripts with the interpreter as a single binary.
14:08
<&ToxicFrog>
Clojure, lua, and python can all optionally be precompiled (to bytecode) to speed up loading and obfuscate the program.
14:08
<&ToxicFrog>
I don't know enough about Ruby to answer.
14:08 Reiv [NSwebIRC@Nightstar-g7fs0k.xtra.co.nz] has quit [Ping timeout: 121 seconds]
14:08
<&ToxicFrog>
(also, I *think* tools exist that will turn jars into native binaries by bundling them with the JVM, but I've never used them)
14:12
< abudhabi>
Why does Python's string literal concatenation not add spaces in between, but print() does?
14:13
<@gnolam>
Eh?
14:13
<&ToxicFrog>
abudhabi: also, if "generates native executables" is a requirement for you, you may want to look into Gambit Scheme or OCaml and/or pick McMartin's brain about them.
14:14
<&ToxicFrog>
abudhabi: because string concatenation concatenates the strings, and print outputs all of its arguments separated by whitespace.
14:16 * TheWatcher readsup
14:18
<&ToxicFrog>
abudhabi: print is roughly analogous to sys.stdout.write(' '.join(map(args, str)) + '\n')
14:19
<&ToxicFrog>
Er, map(str, args)
14:20
< abudhabi>
OK.
14:22
< pjdelport>
If we're throwing programming language recommendations around, I want to throw in Haskell :D
14:22
< pjdelport>
Woo Haskell
14:22
<@TheWatcher>
lisp!~
14:26
< pjdelport>
Lisp is great, but it can't compare to the depth and scope of Haskell, for me.
14:27
< pjdelport>
I love Scheme, but there's a point where the language no longer teaches you anything.
14:28
< pjdelport>
The Haskell ecosystem doesn't stop teaching.
14:40
<&ToxicFrog>
Haskell is one of those languages that I like in principle but have never been at all productive in.
15:25
< catadroid`>
Haskell is something I want to understand well enough to apply principles in other languages
15:26
< catadroid`>
In much the same way as becoming reasonable at Scheme idioms vastly improved my C++
16:00
< pjdelport>
Hoo boy, does Haskell ever do that.
16:35
< catadroid`>
It amuses me that I grok monads well enough to spot them in bespoke features in other languages
16:35
<&ToxicFrog>
Yeah, it's been valuable in that respect
16:35
<&ToxicFrog>
But I've never shipped anything written in it
16:49 * simon_ is planning to eventually quit his job and write Haskell full-time
16:49
< simon_>
a friend with whom I wrote my bachelor's thesis just did that.
16:49
< simon_>
I earn and learn too much at my current job to do the same.
16:50
< simon_>
catadroid`, where besides linq have you spotted monads?
16:54
< catadroid`>
?. is the maybe monad
16:54
< catadroid`>
But I'm not sure if that counts as linq
16:56
< catadroid`>
I'm pretty sure that the this pointer is probably a monad of some kind
17:02
< simon_>
catadroid` :D https://twitter.com/simomorphism/status/639775354450747392 I tweeted that when I heard of it!
17:03
< simon_>
catadroid`, linq corresponds to the lazy list monad.
17:03
< simon_>
catadroid`, nullables only need to be functors, though, for them to have ?.
17:07
< simon_>
catadroid`, .SelectMany() is the bind-operator and the function IEnumerable<T> Unit<T>(this T unit) { yield return unit; } is unit (it isn't built-in, but they call it .SingleAsEnumerable() at my job.)
17:31 crystalclaw|AFK is now known as crystalclaw
17:56
< catadroid`>
:)
17:56
< pjdelport>
Twisted's Deferred has a strictly monadic API.
17:56
< catadroid`>
I'm not very precise with this stuff yet
17:57
< pjdelport>
https://www.reddit.com/r/programming/comments/mjcf/the_monad_laws/cmobm :D
17:57
< pjdelport>
I think it's only fair to call something monadic if it actually has an API that's directly monadic enough to state the usual monad laws in.
17:58
< pjdelport>
Otherwise, well, *everything* is potentially monadic, if you insert the missing glue.
18:20
< simon_>
all unityped languages are monadic by default :P
18:35
< simon_>
I agree, though. things shouldn't be called monadic unless there is some actual intention in the design. (although, it could be monadic by design without the author knowing.)
18:40
<&McMartin>
For reasons I cannot explain, having learned about monads in abstract algebra first seems to have heart me
18:40
<&McMartin>
*hurt me
18:40
<&McMartin>
Wow, I've got some randomly firing lexical neurons today
18:40
< Azash>
Love hurts, apparently
18:41
< simon_>
holy fuuuuck. GoT is killing me.
18:41
<&McMartin>
I have so many projects right now I don't really need one more
18:41
<&McMartin>
I'm torn between having my next one be Rust or Haskell, though.
18:41
< simon_>
McMartin, hehe. first having learned about monads in category theory makes the whole notion seem terribly wasted on monads in functional programming.
18:42
< simon_>
Rust! choose Rust! (I say, because I've decided that my next project will be in Haskell and really want to choose Rust.)
18:42
<&McMartin>
Rust has probably improved my C++ more than anything else, atm
18:42
<&McMartin>
Okay!
18:42
<&McMartin>
If you're going to say that, this carries way more weight ;-)
18:42
< simon_>
:P
18:43
< simon_>
I actually know no Rust at all. but I've read a lot about it, and it seems insanely cool.
18:43
<&McMartin>
It is kind of what you would get if you tried to cross Haskell with C++11
18:43
< simon_>
before Rust, I would've said that OCaml was the next C. but not really.
18:43
< pjdelport>
simon_: Oh, I don't think intent matters.
18:44
<&McMartin>
Even more than Haskell, I find myself wondering if "mere mortals" can truly manage Rust
18:44
<&McMartin>
Or if it will just be a mechanism for receiving lengthy judgement from their robot overlords
18:44
< simon_>
McMartin, how so? I thought it wasn't extremely complex like C++.
18:44
< pjdelport>
simon_: For example, Deferred definitely was not designed with a monadic API in mind. It's effectively just a rediscovery of it.
18:44
< simon_>
pjdelport, right.
18:44
<&McMartin>
I've softened on that a bit because you have to manage that to write modern C++ code properly anyway, so it's more "it's actually catching your memory errors"
18:45
< pjdelport>
But it counts because the API maps exactly, one-to-one, to a monadic interface, and you can formally express the monad laws with it. :)
18:45
<&McMartin>
simon_: To write Rust code that compiles you need to actually understand typestate and reference lifetimes
18:45
< pjdelport>
So it's not just a hand-wavey "this is sorta kinda monadic if you squint" thing
18:45
< simon_>
typestate and reference lifetimes?
18:45
<&McMartin>
I'd say that's presently a bit of a tall order
18:45
<&McMartin>
Rust has a "borrow checker" that must be satisfied for your code compile. It enforces a very specific memory discipline.
18:46
<&McMartin>
It turns out to be pretty close to my favored C++11 memory discipline, so that's great for my C++11...
18:46
< simon_>
pjdelport, I also wouldn't say that various JS libraries that fancy method chaining are monadic if they share state between method calls.
18:46
< pjdelport>
simon_: Right, exactly.
18:46
< pjdelport>
There's nothing monadic about method chaining.
18:47
<&McMartin>
... but it's very easy to write something that it refuses to accept as OK, because it is in principle a possible ambiguously leaked reference or w/e
18:47
< pjdelport>
(and state is also not relevant to whether it's monadic or not.)
18:47
<&McMartin>
And it's presently overaggressive about this, which makes it even more annoying
18:47
<&McMartin>
Let me see if I can find an example of Shit You Need To Deal With, I just saw one yesterday
18:48
<&McMartin>
http://smallcultfollowing.com/babysteps/blog/2016/04/27/non-lexical-lifetimes-in troduction/
18:48
<&McMartin>
The rules are logical but they're "obviously" over-restrictive right now.
18:48
<&McMartin>
Maybe I've been poisoned by people bitching about Java's "definite assignment" rules
18:49
<&McMartin>
Those people will react to Rust like Nazis opening the Lost Ark
18:50
< simon_>
whatare Java's definite assignment rules?
18:51
<&McMartin>
Anyway. Writing libraries in Rust involves annotating almost every argument and structure field with little values that involve telling the scope/lifetime checker "This field/argument/etc. must have a scope at least as broad as this other one" and getting it wrong gets you a four-screen long mathematical proof of why you are a bad person
18:51
< simon_>
haha
18:51
<&McMartin>
Java's rule is that it must be able to prove by a flow-sensitive but path-insensitive analysis that every variable is defined before use.
18:54
< simon_>
interesting blog post. I had something similar bookmarked from the other day.
18:54
<&McMartin>
Right, so
18:54
<&McMartin>
I did my grad work focusing on compilers and program analysis
18:54
<&McMartin>
I have no idea how restrictions like those that presently exist will play in Peopria
18:54
<&McMartin>
*Peoria
18:54
< simon_>
Peoria?
18:54
<&McMartin>
Sorry, dumb old phrase
18:55
<&McMartin>
"how will it play in Peoria" is in principle what someone who wants to move their popular musical out of New York is wondering
18:55
<&McMartin>
Peoria being a smaller midwestern town with a name that alliterates nicely, I guess.
18:55
<&McMartin>
Anyway, some of the feature requests for Swift is to give it a borrow checker of its own, so it's more popular than I initially expected, I think
18:56
<&McMartin>
And after spending six months working in C++11, where you have to worry about this stuff but don't have much compiler support for avoiding memory corruption while doing so, I feel better about it
18:56
<&McMartin>
C++ is incredibly complicated, but the minimum threshold of complexity is actually quite low.
18:56
<&McMartin>
It is *easier* to write straightforward code in C++11 than C++98, imo, but you're relying more on black magic to do so.
18:57
< simon_>
oh.
18:57
<&McMartin>
The immense complexity is when you look at how that black magic is implemented, which folks like #code like to do.
18:57
<&McMartin>
Shorter me: I've been too close to problems like this for too long to know what restrictions on a language are actually reasonable in a widely-deployed language
18:58
<&McMartin>
On the other hand, you said "the next C", didn't you, and that's a less popular language all the time. They may cross more quickly due to that, too.
18:58
< simon_>
that's true.
18:59
<&McMartin>
Also, I much prefer a four-screen detailing of my many sins than having the compiler accept the code and produce immediately correct answers while still silently doing the wrong thing
18:59
<&McMartin>
Not that I am naming names
18:59
<&McMartin>
Objective-C.
19:00
<&McMartin>
I solved my memory leak issues with a somewhat nasty bit of lambda-slinging by exhaustive-searching all possibilities for storage annotations. -_-
19:00
<&McMartin>
(Granted, that was, like, six)
19:02 catadroid [catalyst@Nightstar-f2gsr0.dab.02.net] has joined #code
19:04 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
19:06 catadroid` [catalyst@Nightstar-oge2a7.dab.02.net] has quit [Ping timeout: 121 seconds]
19:11
< simon_>
McMartin, in that blog post, I'd say that problem #2 is an actual bug in the language.
19:11
< simon_>
McMartin, or, at least if his solution is the best fix for it.
19:12 celticminstrel [celticminst@Nightstar-q0f7bb.dsl.bell.ca] has joined #code
19:12 mode/#code [+o celticminstrel] by ChanServ
19:29 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
19:29 mode/#code [+qo Vornicus Vornicus] by ChanServ
19:55
<&ToxicFrog>
simon_: yes? That's the whole point of the article -- the current behaviour is overly restrictive and thus gets it wrong in these cases.
20:04
< simon_>
ToxicFrog, I'm just a bit surprised those problems exist.
20:17 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed]
20:22 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
20:23 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Leaving]
20:23 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
20:42 crystalclaw is now known as crystalclaw|AFK
20:52 crystalclaw|AFK is now known as crystalclaw
21:16
<&McMartin>
simon_: You're surprised that an initial cut at scoping semantics looks exactly like every other block-structured language instead of intrinsically incorporating a liveness dataflow system?
22:20 Kindamoody|out is now known as Kindamoody
22:31
< simon_>
McMartin, I am admittedly not thinking very far. ;)
22:43 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
22:44 mode/#code [+o Reiv] by ChanServ
23:01 crystalclaw is now known as crystalclaw|AFK
23:04 Kindamoody is now known as Kindamoody[zZz]
23:07 catadroid [catalyst@Nightstar-f2gsr0.dab.02.net] has quit [Ping timeout: 121 seconds]
23:29 emmy is now known as emmy-zZz
23:55 Derakon_ is now known as Derakon
23:55 mode/#code [+ao Derakon Derakon] by ChanServ
--- Log closed Wed May 04 00:00:49 2016
code logs -> 2016 -> Tue, 03 May 2016< code.20160502.log - code.20160504.log >

[ Latest log file ]