New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jeff Bezanson PhD #8839

Closed
stevengj opened this Issue Oct 28, 2014 · 174 comments

Comments

Projects
None yet
@stevengj
Member

stevengj commented Oct 28, 2014

One of the core Julia authors, @JeffBezanson, has become a problematic developer. He needs to graduate from MIT, ideally by January 2015. Dependencies:

  • Thesis proposal.
  • Thesis outline.
  • Meeting with thesis committee.
  • Rough draft sent to advisor(s).
  • Schedule defense.
  • Final draft sent to committee.
  • Defense.
  • Alcohol.

This is a priority issue, to ensure that arms are not broken and to guarantee long-term viability of the Julia project.

cc: @alanedelman, @jiahao, @StefanKarpinski, @ViralBShah, @samanamarasinghe, @gjs

Edit (VS): This issue is closed with the following thesis. I am putting it up here, since many people will be interested in finding it.
https://github.com/JeffBezanson/phdthesis/blob/master/main.pdf

@stevengj stevengj added this to the 0.4 milestone Oct 28, 2014

@johnmyleswhite

This comment has been minimized.

Show comment
Hide comment
@johnmyleswhite

johnmyleswhite Oct 28, 2014

Member

cc @fperez who also is interested in this outstanding issue

Member

johnmyleswhite commented Oct 28, 2014

cc @fperez who also is interested in this outstanding issue

@jiahao

This comment has been minimized.

Show comment
Hide comment
@jiahao

jiahao Oct 28, 2014

Member

Supporting information attached.
p1170816
p1170832

Member

jiahao commented Oct 28, 2014

Supporting information attached.
p1170816
p1170832

@JeffBezanson

This comment has been minimized.

Show comment
Hide comment
@JeffBezanson

JeffBezanson Oct 28, 2014

Member

As a procedural issue, closing this might require work in a separate repository. The thesis should perhaps be included in Base to make it easier for others to contribute.

Also the ordering of the last task is misleading; it will actually recur frequently throughout the process.

Member

JeffBezanson commented Oct 28, 2014

As a procedural issue, closing this might require work in a separate repository. The thesis should perhaps be included in Base to make it easier for others to contribute.

Also the ordering of the last task is misleading; it will actually recur frequently throughout the process.

@stevengj

This comment has been minimized.

Show comment
Hide comment
@stevengj

stevengj Oct 28, 2014

Member

+1 for including it in Base, or at least in julia/doc/thesis. Or maybe theses to allow for future needs.

(Please go ahead and open up a thesis branch, Jeff.)

Member

stevengj commented Oct 28, 2014

+1 for including it in Base, or at least in julia/doc/thesis. Or maybe theses to allow for future needs.

(Please go ahead and open up a thesis branch, Jeff.)

@jiahao

This comment has been minimized.

Show comment
Hide comment
@jiahao

jiahao Oct 28, 2014

Member

Also the ordering of the last task is misleading; it will actually recur frequently throughout the process.

*has also already recurred

Member

jiahao commented Oct 28, 2014

Also the ordering of the last task is misleading; it will actually recur frequently throughout the process.

*has also already recurred

@stevengj

This comment has been minimized.

Show comment
Hide comment
@stevengj

stevengj Oct 28, 2014

Member

I'm looking forward to being present at the Close issue ceremony.

Member

stevengj commented Oct 28, 2014

I'm looking forward to being present at the Close issue ceremony.

@timholy

This comment has been minimized.

Show comment
Hide comment
@timholy

timholy Oct 28, 2014

Member

I can't reproduce this issue locally; is it MIT-specific?

Member

timholy commented Oct 28, 2014

I can't reproduce this issue locally; is it MIT-specific?

@jakebolewski

This comment has been minimized.

Show comment
Hide comment
@jakebolewski

jakebolewski Oct 28, 2014

Member

One of the core Julia authors, @JeffBezanson, has become a problematic developer academic

Member

jakebolewski commented Oct 28, 2014

One of the core Julia authors, @JeffBezanson, has become a problematic developer academic

@tknopp

This comment has been minimized.

Show comment
Hide comment
@tknopp

tknopp Oct 28, 2014

Contributor

Is this the github version of a PHD thesis? Jeff has to open a PR with his proposal and the committee will decide whether to merge or not...

Contributor

tknopp commented Oct 28, 2014

Is this the github version of a PHD thesis? Jeff has to open a PR with his proposal and the committee will decide whether to merge or not...

@ViralBShah

This comment has been minimized.

Show comment
Hide comment
@ViralBShah

ViralBShah Oct 29, 2014

Member

+Inf for speedy resolution of this one!

Member

ViralBShah commented Oct 29, 2014

+Inf for speedy resolution of this one!

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Nov 1, 2014

I had the same problem on IPython repo a few month ago, hopefully it was fixed 32 days ago.
I'm pretty sure it involved coffee, annoying paperwork and last minute change of plan because of jackhammers.

Good luck !

Carreau commented Nov 1, 2014

I had the same problem on IPython repo a few month ago, hopefully it was fixed 32 days ago.
I'm pretty sure it involved coffee, annoying paperwork and last minute change of plan because of jackhammers.

Good luck !

@stevengj

This comment has been minimized.

Show comment
Hide comment
@stevengj

stevengj Nov 19, 2014

Member

Updated: Jeff met with his thesis committee and gave us a rough outline.

Member

stevengj commented Nov 19, 2014

Updated: Jeff met with his thesis committee and gave us a rough outline.

@timholy

This comment has been minimized.

Show comment
Hide comment
@timholy

timholy Nov 19, 2014

Member

Glad to hear progress is being made!

But git log --date=short --all --since=22.days.ago --author="Jeff Bezanson" still makes one wonder how he has time for writing a thesis. Either that, or he's a superhero. Actually, scratch that: we all know he is a superhero, so never mind.

Member

timholy commented Nov 19, 2014

Glad to hear progress is being made!

But git log --date=short --all --since=22.days.ago --author="Jeff Bezanson" still makes one wonder how he has time for writing a thesis. Either that, or he's a superhero. Actually, scratch that: we all know he is a superhero, so never mind.

@jiahao

This comment has been minimized.

Show comment
Hide comment
@jiahao

jiahao Nov 19, 2014

Member

The commits involving juliatypes.jl record our attempts to describe Julia's type system, which is directly relevant thesis work.

Member

jiahao commented Nov 19, 2014

The commits involving juliatypes.jl record our attempts to describe Julia's type system, which is directly relevant thesis work.

@johnmyleswhite

This comment has been minimized.

Show comment
Hide comment
@johnmyleswhite

johnmyleswhite Nov 19, 2014

Member

The type system work seems to already be hitting some nerves: https://twitter.com/plt_hulk/status/535045242920378369

Member

johnmyleswhite commented Nov 19, 2014

The type system work seems to already be hitting some nerves: https://twitter.com/plt_hulk/status/535045242920378369

@StefanKarpinski

This comment has been minimized.

Show comment
Hide comment
@StefanKarpinski

StefanKarpinski Nov 19, 2014

Member

I kind of doubt that's directly in response to Jeff's work, although I could be wrong. Hilarious tweet either way though.

Member

StefanKarpinski commented Nov 19, 2014

I kind of doubt that's directly in response to Jeff's work, although I could be wrong. Hilarious tweet either way though.

@timholy

This comment has been minimized.

Show comment
Hide comment
@timholy

timholy Nov 19, 2014

Member

@jiahao, my comment was mostly tongue-in-cheek---I kinda wondered about that very thing. I, for one, tend to have a lot of commits when I'm polishing something up for presentation.

Member

timholy commented Nov 19, 2014

@jiahao, my comment was mostly tongue-in-cheek---I kinda wondered about that very thing. I, for one, tend to have a lot of commits when I'm polishing something up for presentation.

@jiahao

This comment has been minimized.

Show comment
Hide comment
@jiahao

jiahao Nov 19, 2014

Member

@timholy humor noted. :)

It would be remiss to not mention the lovely Magritte homage our local theory collaborator @jeanqasaur made and posted on twitter:

magritte_type_with_types

"The Treachery of Types" has a nice ring to it, no?

Member

jiahao commented Nov 19, 2014

@timholy humor noted. :)

It would be remiss to not mention the lovely Magritte homage our local theory collaborator @jeanqasaur made and posted on twitter:

magritte_type_with_types

"The Treachery of Types" has a nice ring to it, no?

@tonyhffong

This comment has been minimized.

Show comment
Hide comment
@tonyhffong

tonyhffong Nov 19, 2014

Member

That's quite funny.

Member

tonyhffong commented Nov 19, 2014

That's quite funny.

@timholy

This comment has been minimized.

Show comment
Hide comment
@timholy

timholy Nov 19, 2014

Member

Love it!

Member

timholy commented Nov 19, 2014

Love it!

@stevengj

This comment has been minimized.

Show comment
Hide comment
@stevengj

stevengj Dec 19, 2014

Member

Call for help: Jeff is looking for nice examples that show off multiple dispatch (and maybe staged functions), things which would be much harder/slower in languages without those features.

Member

stevengj commented Dec 19, 2014

Call for help: Jeff is looking for nice examples that show off multiple dispatch (and maybe staged functions), things which would be much harder/slower in languages without those features.

@tonyhffong

This comment has been minimized.

Show comment
Hide comment
@tonyhffong

tonyhffong Dec 19, 2014

Member

er, show?

Member

tonyhffong commented Dec 19, 2014

er, show?

@timholy

This comment has been minimized.

Show comment
Hide comment
@timholy

timholy Dec 19, 2014

Member

(and maybe staged functions)

subarray.jl and subarray2.jl should serve rather nicely. Design document is at http://docs.julialang.org/en/latest/devdocs/subarrays/

Member

timholy commented Dec 19, 2014

(and maybe staged functions)

subarray.jl and subarray2.jl should serve rather nicely. Design document is at http://docs.julialang.org/en/latest/devdocs/subarrays/

@johnmyleswhite

This comment has been minimized.

Show comment
Hide comment
@johnmyleswhite

johnmyleswhite Dec 19, 2014

Member

I think the Distributions package really makes multiple dispatch seem useful. Having things like rand(Gamma(1, 1), 5, 5) vs rand(Normal(0, 1), 3) is a huge gain in expressivity at no performance cost because of multiple dispatch.

Member

johnmyleswhite commented Dec 19, 2014

I think the Distributions package really makes multiple dispatch seem useful. Having things like rand(Gamma(1, 1), 5, 5) vs rand(Normal(0, 1), 3) is a huge gain in expressivity at no performance cost because of multiple dispatch.

@jakebolewski

This comment has been minimized.

Show comment
Hide comment
@jakebolewski

jakebolewski Dec 19, 2014

Member

I don't see how that is the best example as it really is showing off
single-dispatch. How is it different than Gamma(1,1).rand(5,5) which you
would do in a more traditional OO language like Python or Java?

On Fri, Dec 19, 2014 at 1:39 PM, John Myles White notifications@github.com
wrote:

I think the Distributions package really makes multiple dispatch seem
useful. Having things like rand(Gamma(1, 1), 5, 5) vs rand(Normal(0, 1),
3) is a huge gain in expressivity at no performance cost because of
multiple dispatch.


Reply to this email directly or view it on GitHub
#8839 (comment).

Member

jakebolewski commented Dec 19, 2014

I don't see how that is the best example as it really is showing off
single-dispatch. How is it different than Gamma(1,1).rand(5,5) which you
would do in a more traditional OO language like Python or Java?

On Fri, Dec 19, 2014 at 1:39 PM, John Myles White notifications@github.com
wrote:

I think the Distributions package really makes multiple dispatch seem
useful. Having things like rand(Gamma(1, 1), 5, 5) vs rand(Normal(0, 1),
3) is a huge gain in expressivity at no performance cost because of
multiple dispatch.


Reply to this email directly or view it on GitHub
#8839 (comment).

@johnmyleswhite

This comment has been minimized.

Show comment
Hide comment
@johnmyleswhite

johnmyleswhite Dec 19, 2014

Member

Ok. Replace that with examples of computing KL-divergences using analytic results: kl(Normal(0, 1), Normal(0, 1)) vs kl(Normal(0, 1), Gamma(1, 1)).

Member

johnmyleswhite commented Dec 19, 2014

Ok. Replace that with examples of computing KL-divergences using analytic results: kl(Normal(0, 1), Normal(0, 1)) vs kl(Normal(0, 1), Gamma(1, 1)).

@timholy

This comment has been minimized.

Show comment
Hide comment
@timholy

timholy Dec 19, 2014

Member

I should have also added, there were some potentially-useful statistics on what life would have been like without staged functions in my initial post in #8235. The take-home message: generating all methods through dimension 8 resulted in > 5000 separate methods, and required over 4 minutes of parsing&lowering time (i.e., a 4-minute delay while compiling julia). By comparison, the stagedfunction implementation loads in a snap, and of course can go even beyond 8 dimensions.

Member

timholy commented Dec 19, 2014

I should have also added, there were some potentially-useful statistics on what life would have been like without staged functions in my initial post in #8235. The take-home message: generating all methods through dimension 8 resulted in > 5000 separate methods, and required over 4 minutes of parsing&lowering time (i.e., a 4-minute delay while compiling julia). By comparison, the stagedfunction implementation loads in a snap, and of course can go even beyond 8 dimensions.

@vtjnash

This comment has been minimized.

Show comment
Hide comment
@vtjnash

vtjnash Dec 19, 2014

Member

Vs single-dispatch, it still demonstrates the unification of what other OO languages describe as: functions vs methods. You could constrast to python's sorted(a) vs a.sort(). In comparison to "traditional" OO languages, it dramatically changes what it means for a function to be "associated with" a class.

You could point out how it replaces the need for static vs instance variables, since you can dispatch on the instance or the type. I might have some more ideas from some recent IRC conversations, when I can get to a computer.

Member

vtjnash commented Dec 19, 2014

Vs single-dispatch, it still demonstrates the unification of what other OO languages describe as: functions vs methods. You could constrast to python's sorted(a) vs a.sort(). In comparison to "traditional" OO languages, it dramatically changes what it means for a function to be "associated with" a class.

You could point out how it replaces the need for static vs instance variables, since you can dispatch on the instance or the type. I might have some more ideas from some recent IRC conversations, when I can get to a computer.

@eschnett

This comment has been minimized.

Show comment
Hide comment
@eschnett

eschnett Dec 19, 2014

Contributor

I have an implementation of fmap. This traverses several arrays and
applies a function to each set of elements. This implementation is actually
very slow since the number of arrays can be arbitrary. To make this useful,
I have manually created specialization of this for various numbers of
arguments yss. I've always wanted to write a staged function for this,
but haven't done so yet.

The staged function would need to evaluate in particular the map call
that produces the arguments to f.

-erik

function fmap{T,D}(f::Function, xs::Array{T,D}, yss::Array...;
                   R::Type=eltype(f))
    [@assert size(ys) == size(xs) for ys in yss]
    rs = similar(xs, R)
    @simd for i in 1:length(xs)
        @inbounds rs[i] = f(xs[i], map(ys->ys[i], yss)...)
    end
    rs::Array{R,D}
end

On Fri, Dec 19, 2014 at 12:46 PM, Steven G. Johnson <
notifications@github.com> wrote:

Call for help: Jeff is looking for nice examples that show off multiple
dispatch (and maybe staged functions), things which would be much
harder/slower in languages without those features.

Reply to this email directly or view it on GitHub
#8839 (comment).

Erik Schnetter schnetter@cct.lsu.edu
http://www.perimeterinstitute.ca/personal/eschnetter/

Contributor

eschnett commented Dec 19, 2014

I have an implementation of fmap. This traverses several arrays and
applies a function to each set of elements. This implementation is actually
very slow since the number of arrays can be arbitrary. To make this useful,
I have manually created specialization of this for various numbers of
arguments yss. I've always wanted to write a staged function for this,
but haven't done so yet.

The staged function would need to evaluate in particular the map call
that produces the arguments to f.

-erik

function fmap{T,D}(f::Function, xs::Array{T,D}, yss::Array...;
                   R::Type=eltype(f))
    [@assert size(ys) == size(xs) for ys in yss]
    rs = similar(xs, R)
    @simd for i in 1:length(xs)
        @inbounds rs[i] = f(xs[i], map(ys->ys[i], yss)...)
    end
    rs::Array{R,D}
end

On Fri, Dec 19, 2014 at 12:46 PM, Steven G. Johnson <
notifications@github.com> wrote:

Call for help: Jeff is looking for nice examples that show off multiple
dispatch (and maybe staged functions), things which would be much
harder/slower in languages without those features.

Reply to this email directly or view it on GitHub
#8839 (comment).

Erik Schnetter schnetter@cct.lsu.edu
http://www.perimeterinstitute.ca/personal/eschnetter/

@eschnett

This comment has been minimized.

Show comment
Hide comment
@eschnett

eschnett Dec 19, 2014

Contributor

Sorry, ignore the call to eltype(f) in the function signature in my code,
that's non-standard.

-erik

On Fri, Dec 19, 2014 at 3:08 PM, Erik Schnetter schnetter@cct.lsu.edu
wrote:

I have an implementation of fmap. This traverses several arrays and
applies a function to each set of elements. This implementation is actually
very slow since the number of arrays can be arbitrary. To make this useful,
I have manually created specialization of this for various numbers of
arguments yss. I've always wanted to write a staged function for this,
but haven't done so yet.

The staged function would need to evaluate in particular the map call
that produces the arguments to f.

-erik

function fmap{T,D}(f::Function, xs::Array{T,D}, yss::Array...;
                   R::Type=eltype(f))
    [@assert size(ys) == size(xs) for ys in yss]
    rs = similar(xs, R)
    @simd for i in 1:length(xs)
        @inbounds rs[i] = f(xs[i], map(ys->ys[i], yss)...)
    end
    rs::Array{R,D}
end

On Fri, Dec 19, 2014 at 12:46 PM, Steven G. Johnson <
notifications@github.com> wrote:

Call for help: Jeff is looking for nice examples that show off multiple
dispatch (and maybe staged functions), things which would be much
harder/slower in languages without those features.

Reply to this email directly or view it on GitHub
#8839 (comment).

Erik Schnetter schnetter@cct.lsu.edu
http://www.perimeterinstitute.ca/personal/eschnetter/

Erik Schnetter schnetter@cct.lsu.edu
http://www.perimeterinstitute.ca/personal/eschnetter/

Contributor

eschnett commented Dec 19, 2014

Sorry, ignore the call to eltype(f) in the function signature in my code,
that's non-standard.

-erik

On Fri, Dec 19, 2014 at 3:08 PM, Erik Schnetter schnetter@cct.lsu.edu
wrote:

I have an implementation of fmap. This traverses several arrays and
applies a function to each set of elements. This implementation is actually
very slow since the number of arrays can be arbitrary. To make this useful,
I have manually created specialization of this for various numbers of
arguments yss. I've always wanted to write a staged function for this,
but haven't done so yet.

The staged function would need to evaluate in particular the map call
that produces the arguments to f.

-erik

function fmap{T,D}(f::Function, xs::Array{T,D}, yss::Array...;
                   R::Type=eltype(f))
    [@assert size(ys) == size(xs) for ys in yss]
    rs = similar(xs, R)
    @simd for i in 1:length(xs)
        @inbounds rs[i] = f(xs[i], map(ys->ys[i], yss)...)
    end
    rs::Array{R,D}
end

On Fri, Dec 19, 2014 at 12:46 PM, Steven G. Johnson <
notifications@github.com> wrote:

Call for help: Jeff is looking for nice examples that show off multiple
dispatch (and maybe staged functions), things which would be much
harder/slower in languages without those features.

Reply to this email directly or view it on GitHub
#8839 (comment).

Erik Schnetter schnetter@cct.lsu.edu
http://www.perimeterinstitute.ca/personal/eschnetter/

Erik Schnetter schnetter@cct.lsu.edu
http://www.perimeterinstitute.ca/personal/eschnetter/

@stevengj

This comment has been minimized.

Show comment
Hide comment
@stevengj

stevengj Dec 19, 2014

Member

@timholy, since Matlab and NumPy have subarrays/slices too, why can we argue that multiple dispatch is essential here?

Member

stevengj commented Dec 19, 2014

@timholy, since Matlab and NumPy have subarrays/slices too, why can we argue that multiple dispatch is essential here?

@ivarne

This comment has been minimized.

Show comment
Hide comment
@ivarne

ivarne Dec 19, 2014

Contributor

Ease of implementation? As far as I can tell you can simulate multiple dispatch in any language, so it isn't essential for anything.

Maybe not good to sugest something we haven't yet decided we want. In #9297, there is a proposal that allows us to have both efficient UTF-8 buffer positions and convenient indexing without holes so that you can do convenient arithmetic when you want that. Regex and search will return the wrapped internal index, but s[2] can give the second character regardless of how many bytes that were used to encode the first.

Contributor

ivarne commented Dec 19, 2014

Ease of implementation? As far as I can tell you can simulate multiple dispatch in any language, so it isn't essential for anything.

Maybe not good to sugest something we haven't yet decided we want. In #9297, there is a proposal that allows us to have both efficient UTF-8 buffer positions and convenient indexing without holes so that you can do convenient arithmetic when you want that. Regex and search will return the wrapped internal index, but s[2] can give the second character regardless of how many bytes that were used to encode the first.

@timholy

This comment has been minimized.

Show comment
Hide comment
@timholy

timholy Dec 19, 2014

Member

Can they make efficient subarrays/slices of AbstractArrays, or does their implementation only work for contiguous blocks of memory? This isn't a terribly hard problem to solve if you can assume your parent array has contiguous memory; it gets more interesting when you don't make that assumption.

Member

timholy commented Dec 19, 2014

Can they make efficient subarrays/slices of AbstractArrays, or does their implementation only work for contiguous blocks of memory? This isn't a terribly hard problem to solve if you can assume your parent array has contiguous memory; it gets more interesting when you don't make that assumption.

@stevengj

This comment has been minimized.

Show comment
Hide comment
@stevengj

stevengj Dec 20, 2014

Member

Yes, that's the key feature we are looking for: not just that something can be done nicely with multiple dispatch and/or staged functions, but that the lack of these features in other languages made implementation of the feature much harder (ideally, so much harder that no one has even attempted it).

@timholy, a NumPy array is characterized by a fixed stride for each dimension, not necessarily contiguity (essentially equivalent to our DenseArray). This property is preserved under slicing, so slices themselves can be sliced etcetera.

Member

stevengj commented Dec 20, 2014

Yes, that's the key feature we are looking for: not just that something can be done nicely with multiple dispatch and/or staged functions, but that the lack of these features in other languages made implementation of the feature much harder (ideally, so much harder that no one has even attempted it).

@timholy, a NumPy array is characterized by a fixed stride for each dimension, not necessarily contiguity (essentially equivalent to our DenseArray). This property is preserved under slicing, so slices themselves can be sliced etcetera.

@vtjnash

This comment has been minimized.

Show comment
Hide comment
@vtjnash

vtjnash Dec 20, 2014

Member

aberrant had some good questions on IRC along these lines. I've tried to extract just the relevant bits of comments (from among the unrelated conversations and notifications) below:

2014-12-10 (EST)
11:41 aberrant: “Organizing methods into function objects rather than having named bags of methods “inside” each object ends up being a highly beneficial aspect of the language design.”
11:41 aberrant: why?
12:20 Travisty: aberrant: I can’t speak for them, but I imagine that the argument is that it’s a nice separation of concerns. I have data (which I will represent with types) and routines for operating on that data (which I will represent as functions), and rather than having some routines belong to specific types, they are kept separate
12:21 aberrant: Travisty: I sort of understand the argument, but I’m not sure I agree with it :)
12:22 Travisty: aberrant: Yeah, sure. This is the sort of thing that may be hard to argue about from first principles, and it may be useful to look at examples. I think one place where this design simplified things was in impementing the standard mathematical functions on all of the numeric types, and dealing with conversion
12:22 Travisty: I’m not sure, but I think the solution in julia is quite elegant because of this design and it would be a bit trickier to do it in the traditional OOP setting
12:23 aberrant: Travisty: perhaps. I need to think about it some more. I really like pure OO, and this is a bit of a change that I need to wrap my head around.
...
12:54 vtjnash: julia has a convention that a method name will end in a ! to signify that the method will mutate one of it's arguments
12:56 aberrant: that’s one thing I sorely miss in python. foo.sort() vs foo.sorted() always confused me.
12:57 vtjnash: except that in python, isn't it sort(foo) vs sorted(foo) ?
12:57 aberrant: it might be :)
12:58 aberrant: no
12:58 aberrant: it’s foo.sort vs sorted(foo)
12:58 vtjnash: ah
12:58 aberrant: foo.sort modifies foo in place.
12:58 aberrant: see?
12:58 aberrant: that’s what I mean.
12:58 vtjnash: well, anyways, that's an unintentional example of why . oriented programming is a pain
12:58 aberrant: sort(foo) vs sort!(foo) makes much more sense.
12:59 vtjnash: python made a reasonable choice there
12:59 vtjnash: and tries to help you remember
12:59 vtjnash: but it still was forced to make some decision
2014-12-14 (EST)
15:25 aberrant: there’s no way to do type constants, I guess?
15:25 aberrant: http://dpaste.com/18AEHBG
15:25 aberrant: like that
15:27 vtjnash: no. that declares a local variable inside the type (can be seen by the constructors and other methods in there)
15:27 vtjnash: instead, define `y(::Foo) = 6`
15:28 aberrant: is that mutable?
15:29 aberrant: hm, yeah, that’s not what I want though.
15:29 aberrant: but I guess I can use it.
15:30 vtjnash: not what you want, or not what other languages do?
15:31 vtjnash: multiple dispatch in julia allows you to collapse 4 or 5 or more different constructs needed by other OO languages into one abstraction
15:33 aberrant: oh, I see how it works.
15:33 aberrant: well, it’s a function and therefore more overhead
15:33 aberrant: basically, I want to set the “bitwidth” of an IPv4 address to be 32, and the “bitwidth” of an IPv6 address to be 128, and then be able to write a function that takes ::IPAddr and uses the appropriate bitwidth.
15:34 aberrant: I can do this with the function, but it seems like overhead to have a function return a constant.
15:35 aberrant: e.g., http://dpaste.com/3RXRCAG
15:36 vtjnash: don't assume that a function has more overhead
15:36 vtjnash: in this case, it would actually have less overhead
15:54 aberrant: wow, ok
15:54 aberrant: I don’t see how, but I’ll take your word for it :)
15:59 vtjnash: inlining
...
18:04 aberrant: there’s no way to associate a constant inside a type?
18:04 aberrant: it would make my life a whole lot easier.
18:04 mlubin: aberrant: t.constant or constant(t) is just a syntax difference
18:04 mlubin: julia uses the latter
18:05 aberrant: mlubin: the issue is that you have to instantiate the type first.
18:05 aberrant: mlubin: I need the equivalent of a class property.
18:05 mlubin: constant(::Type{Int32}) = 10
18:05 mlubin: constant(Int32)
18:05 aberrant: oh. wow.
18:06 Travisty: The only member of Type{T} is T, which is why this works
18:06 mlubin: mind=blown? ;)
18:06 aberrant: yeah
18:06 aberrant: that’s jacked up
18:07 aberrant: there’s NO WAY I would have ever thought of that on my own :(
18:07 mlubin: once you see it for the first time it becomes a lot more intuitive
18:07 aberrant: ipaddrwidth(::Type{IPv4}) = uint8(32)
18:08 aberrant: w00t
18:10 aberrant: can I do a const in front of that?
18:11 Travisty: I don’t think so, but usually when julia generates code, it should be inlined so that just the constant uint8(32) appears, instead of a function call

if you're looking for more examples: #7291

Net code reduction is nice from 6K C++ to about 1K Julia. Initial performance benchmarks show it's just under 2x the native C++.

how many languages do you know that can claim implementation of printf, from the operators (+-*/, Int, Float) to the numerical output formatting, in the language itself, and benchmark within a small margin of the libc versions? Maybe C++? C can't even claim this (it doesn't have operator overloading).

Python/MATLAB/etc. might be able to claim bits of this, but have you ever tried to use the string operators in MATLAB?

Member

vtjnash commented Dec 20, 2014

aberrant had some good questions on IRC along these lines. I've tried to extract just the relevant bits of comments (from among the unrelated conversations and notifications) below:

2014-12-10 (EST)
11:41 aberrant: “Organizing methods into function objects rather than having named bags of methods “inside” each object ends up being a highly beneficial aspect of the language design.”
11:41 aberrant: why?
12:20 Travisty: aberrant: I can’t speak for them, but I imagine that the argument is that it’s a nice separation of concerns. I have data (which I will represent with types) and routines for operating on that data (which I will represent as functions), and rather than having some routines belong to specific types, they are kept separate
12:21 aberrant: Travisty: I sort of understand the argument, but I’m not sure I agree with it :)
12:22 Travisty: aberrant: Yeah, sure. This is the sort of thing that may be hard to argue about from first principles, and it may be useful to look at examples. I think one place where this design simplified things was in impementing the standard mathematical functions on all of the numeric types, and dealing with conversion
12:22 Travisty: I’m not sure, but I think the solution in julia is quite elegant because of this design and it would be a bit trickier to do it in the traditional OOP setting
12:23 aberrant: Travisty: perhaps. I need to think about it some more. I really like pure OO, and this is a bit of a change that I need to wrap my head around.
...
12:54 vtjnash: julia has a convention that a method name will end in a ! to signify that the method will mutate one of it's arguments
12:56 aberrant: that’s one thing I sorely miss in python. foo.sort() vs foo.sorted() always confused me.
12:57 vtjnash: except that in python, isn't it sort(foo) vs sorted(foo) ?
12:57 aberrant: it might be :)
12:58 aberrant: no
12:58 aberrant: it’s foo.sort vs sorted(foo)
12:58 vtjnash: ah
12:58 aberrant: foo.sort modifies foo in place.
12:58 aberrant: see?
12:58 aberrant: that’s what I mean.
12:58 vtjnash: well, anyways, that's an unintentional example of why . oriented programming is a pain
12:58 aberrant: sort(foo) vs sort!(foo) makes much more sense.
12:59 vtjnash: python made a reasonable choice there
12:59 vtjnash: and tries to help you remember
12:59 vtjnash: but it still was forced to make some decision
2014-12-14 (EST)
15:25 aberrant: there’s no way to do type constants, I guess?
15:25 aberrant: http://dpaste.com/18AEHBG
15:25 aberrant: like that
15:27 vtjnash: no. that declares a local variable inside the type (can be seen by the constructors and other methods in there)
15:27 vtjnash: instead, define `y(::Foo) = 6`
15:28 aberrant: is that mutable?
15:29 aberrant: hm, yeah, that’s not what I want though.
15:29 aberrant: but I guess I can use it.
15:30 vtjnash: not what you want, or not what other languages do?
15:31 vtjnash: multiple dispatch in julia allows you to collapse 4 or 5 or more different constructs needed by other OO languages into one abstraction
15:33 aberrant: oh, I see how it works.
15:33 aberrant: well, it’s a function and therefore more overhead
15:33 aberrant: basically, I want to set the “bitwidth” of an IPv4 address to be 32, and the “bitwidth” of an IPv6 address to be 128, and then be able to write a function that takes ::IPAddr and uses the appropriate bitwidth.
15:34 aberrant: I can do this with the function, but it seems like overhead to have a function return a constant.
15:35 aberrant: e.g., http://dpaste.com/3RXRCAG
15:36 vtjnash: don't assume that a function has more overhead
15:36 vtjnash: in this case, it would actually have less overhead
15:54 aberrant: wow, ok
15:54 aberrant: I don’t see how, but I’ll take your word for it :)
15:59 vtjnash: inlining
...
18:04 aberrant: there’s no way to associate a constant inside a type?
18:04 aberrant: it would make my life a whole lot easier.
18:04 mlubin: aberrant: t.constant or constant(t) is just a syntax difference
18:04 mlubin: julia uses the latter
18:05 aberrant: mlubin: the issue is that you have to instantiate the type first.
18:05 aberrant: mlubin: I need the equivalent of a class property.
18:05 mlubin: constant(::Type{Int32}) = 10
18:05 mlubin: constant(Int32)
18:05 aberrant: oh. wow.
18:06 Travisty: The only member of Type{T} is T, which is why this works
18:06 mlubin: mind=blown? ;)
18:06 aberrant: yeah
18:06 aberrant: that’s jacked up
18:07 aberrant: there’s NO WAY I would have ever thought of that on my own :(
18:07 mlubin: once you see it for the first time it becomes a lot more intuitive
18:07 aberrant: ipaddrwidth(::Type{IPv4}) = uint8(32)
18:08 aberrant: w00t
18:10 aberrant: can I do a const in front of that?
18:11 Travisty: I don’t think so, but usually when julia generates code, it should be inlined so that just the constant uint8(32) appears, instead of a function call

if you're looking for more examples: #7291

Net code reduction is nice from 6K C++ to about 1K Julia. Initial performance benchmarks show it's just under 2x the native C++.

how many languages do you know that can claim implementation of printf, from the operators (+-*/, Int, Float) to the numerical output formatting, in the language itself, and benchmark within a small margin of the libc versions? Maybe C++? C can't even claim this (it doesn't have operator overloading).

Python/MATLAB/etc. might be able to claim bits of this, but have you ever tried to use the string operators in MATLAB?

@stepchowfun

This comment has been minimized.

Show comment
Hide comment

Congrats @JeffBezanson!

@dustinvtran

This comment has been minimized.

Show comment
Hide comment
@dustinvtran

dustinvtran May 16, 2015

congratulations :)

congratulations :)

@interhive

This comment has been minimized.

Show comment
Hide comment

👍

@StefanKarpinski

This comment has been minimized.

Show comment
Hide comment
@StefanKarpinski

StefanKarpinski May 16, 2015

Member

@boyers! Long time no see!

Member

StefanKarpinski commented May 16, 2015

@boyers! Long time no see!

@stepchowfun

This comment has been minimized.

Show comment
Hide comment
@stepchowfun

stepchowfun May 16, 2015

miss you guys :)

miss you guys :)

@nicola-gigante

This comment has been minimized.

Show comment
Hide comment
@nicola-gigante

nicola-gigante May 16, 2015

Congratulations!

Just a question: the PDF does not have links in the ToC nor an browsable index in the pdf metadata.
Why is it so difficult for a MIT-graduated compiler-writer to add \usepackage{hyperref} in his preamble?

Congratulations!

Just a question: the PDF does not have links in the ToC nor an browsable index in the pdf metadata.
Why is it so difficult for a MIT-graduated compiler-writer to add \usepackage{hyperref} in his preamble?

@ViralBShah

This comment has been minimized.

Show comment
Hide comment
@ViralBShah

ViralBShah May 16, 2015

Member

That is because you are supposed to read the whole thing and not just skip around. ;-)

But yes, hyperref would make this a lot more accessible.

Member

ViralBShah commented May 16, 2015

That is because you are supposed to read the whole thing and not just skip around. ;-)

But yes, hyperref would make this a lot more accessible.

@nicola-gigante

This comment has been minimized.

Show comment
Hide comment
@nicola-gigante

nicola-gigante May 16, 2015

I promise you to read the whole thing if you add the links :P

I promise you to read the whole thing if you add the links :P

@rtoip

This comment has been minimized.

Show comment
Hide comment
@rtoip

rtoip May 16, 2015

Congratulations. Freedom awaits.

rtoip commented May 16, 2015

Congratulations. Freedom awaits.

@nlazarevic

This comment has been minimized.

Show comment
Hide comment
@nlazarevic

nlazarevic May 16, 2015

Congrats, Dr. Bezanson!

Congrats, Dr. Bezanson!

@timholy

This comment has been minimized.

Show comment
Hide comment
@timholy

timholy May 16, 2015

Member

@nicola-gigante, you can make a pull request 😄.

Member

timholy commented May 16, 2015

@nicola-gigante, you can make a pull request 😄.

@jpfairbanks

This comment has been minimized.

Show comment
Hide comment
@jpfairbanks

jpfairbanks May 16, 2015

Contributor

can we lobby for a best dissertation award?

http://awards.acm.org/doctoral_dissertation/nominations.cfm

Contributor

jpfairbanks commented May 16, 2015

can we lobby for a best dissertation award?

http://awards.acm.org/doctoral_dissertation/nominations.cfm

@mseri

This comment has been minimized.

Show comment
Hide comment
@mseri

mseri May 16, 2015

Congratulation!!!

mseri commented May 16, 2015

Congratulation!!!

@ScottPJones

This comment has been minimized.

Show comment
Hide comment
@ScottPJones

ScottPJones May 16, 2015

Contributor

@jpfairbanks - good idea! It has to be submitted by his thesis advisor though... pester Alan Edelman, I think...

Contributor

ScottPJones commented May 16, 2015

@jpfairbanks - good idea! It has to be submitted by his thesis advisor though... pester Alan Edelman, I think...

@jpfairbanks

This comment has been minimized.

Show comment
Hide comment
@jpfairbanks

jpfairbanks May 16, 2015

Contributor
Contributor

jpfairbanks commented May 16, 2015

@ScottPJones

This comment has been minimized.

Show comment
Hide comment
@ScottPJones

ScottPJones May 16, 2015

Contributor

Is it limited to 5 letters of support? Also, the real number of people who think he deserves it is at least a few orders of magnitude larger!

Contributor

ScottPJones commented May 16, 2015

Is it limited to 5 letters of support? Also, the real number of people who think he deserves it is at least a few orders of magnitude larger!

@ninjin

This comment has been minimized.

Show comment
Hide comment
@ninjin

ninjin May 16, 2015

Contributor

@JeffBezanson: Congratulations!

@alanedelman: I think @jpfairbanks has a good point, Jeff should get nominated for the ACM Doctoral Dissertation Award.

Contributor

ninjin commented May 16, 2015

@JeffBezanson: Congratulations!

@alanedelman: I think @jpfairbanks has a good point, Jeff should get nominated for the ACM Doctoral Dissertation Award.

@hayd

This comment has been minimized.

Show comment
Hide comment
@hayd

hayd May 16, 2015

Member

@JeffBezanson Well done and well deserved!

@ScottPJones "In addition, at least 3, and not more than 5, supporting letters should be included from experts in the field who can provide additional insights or evidence of the dissertation’s impact."

Member

hayd commented May 16, 2015

@JeffBezanson Well done and well deserved!

@ScottPJones "In addition, at least 3, and not more than 5, supporting letters should be included from experts in the field who can provide additional insights or evidence of the dissertation’s impact."

@ScottPJones

This comment has been minimized.

Show comment
Hide comment
@ScottPJones

ScottPJones May 16, 2015

Contributor

Maybe Gerry will write him one (after he's added the s-expr mode!) 😀

Contributor

ScottPJones commented May 16, 2015

Maybe Gerry will write him one (after he's added the s-expr mode!) 😀

@fabianlischka

This comment has been minimized.

Show comment
Hide comment
@fabianlischka

fabianlischka May 16, 2015

Contributor

Hacker News front page :-) Congratulations, Jeff.

Contributor

fabianlischka commented May 16, 2015

Hacker News front page :-) Congratulations, Jeff.

@JeffBezanson

This comment has been minimized.

Show comment
Hide comment
@JeffBezanson

JeffBezanson May 16, 2015

Member

@nicola-gigante You're right, I will add hyperref.

Thank you to everybody again. All of your appreciation is the ultimate prize.

Member

JeffBezanson commented May 16, 2015

@nicola-gigante You're right, I will add hyperref.

Thank you to everybody again. All of your appreciation is the ultimate prize.

@owenversteeg

This comment has been minimized.

Show comment
Hide comment
@owenversteeg

owenversteeg May 16, 2015

@jiahao It's because they have EXIF rotation data which browsers don't care about. Most of the time. Chrome only cares about EXIF data if the picture is its own window. Right click and "Open in new tab" to see them the correct orientation.

You can use an EXIF metadata stripper to take that off and rotate them the "proper" way.

@jiahao It's because they have EXIF rotation data which browsers don't care about. Most of the time. Chrome only cares about EXIF data if the picture is its own window. Right click and "Open in new tab" to see them the correct orientation.

You can use an EXIF metadata stripper to take that off and rotate them the "proper" way.

@ViralBShah

This comment has been minimized.

Show comment
Hide comment
@ViralBShah

ViralBShah May 17, 2015

Member

+1 for the ACM dissertation award nomination.

Member

ViralBShah commented May 17, 2015

+1 for the ACM dissertation award nomination.

@ViralBShah

This comment has been minimized.

Show comment
Hide comment
@ViralBShah

ViralBShah May 17, 2015

Member

Nomination deadline is Oct 31, 2015.

http://awards.acm.org/doctoral_dissertation/nominations.cfm

I don't like it that ACM requires a copyright transfer to them and exclusive publication rights. It is still valuable and prestigious in any case.

Member

ViralBShah commented May 17, 2015

Nomination deadline is Oct 31, 2015.

http://awards.acm.org/doctoral_dissertation/nominations.cfm

I don't like it that ACM requires a copyright transfer to them and exclusive publication rights. It is still valuable and prestigious in any case.

@Funfun

This comment has been minimized.

Show comment
Hide comment
@Funfun

Funfun May 17, 2015

Congrats!

Funfun commented May 17, 2015

Congrats!

@ScottPJones

This comment has been minimized.

Show comment
Hide comment
@ScottPJones

ScottPJones May 17, 2015

Contributor

Exclusive publication rights!?! I've got dibs on an autographed copy (or two... need one to sell on e-bay in 10-15 years, another to keep for myself 😀)... got to get that before it's locked up by the ACM!
(Of course, that probably means that it would be available on the ACM's digital library for members)

Contributor

ScottPJones commented May 17, 2015

Exclusive publication rights!?! I've got dibs on an autographed copy (or two... need one to sell on e-bay in 10-15 years, another to keep for myself 😀)... got to get that before it's locked up by the ACM!
(Of course, that probably means that it would be available on the ACM's digital library for members)

@alanedelman

This comment has been minimized.

Show comment
Hide comment
@alanedelman

alanedelman May 17, 2015

Contributor

once dissertation is handed to me to sign I have every intention
of nominating the dissertation for various awards :-)

On Sun, May 17, 2015 at 8:49 AM, Scott P. Jones notifications@github.com
wrote:

Exclusive publication rights!?! I've got dibs on an autographed copy (or
two... need one to sell on e-bay in 10-15 years, another to keep for myself [image:
😀])... got to get that before it's locked up by the ACM!
(Of course, that probably means that it would be available on the ACM's
digital library for members)


Reply to this email directly or view it on GitHub
#8839 (comment).

Contributor

alanedelman commented May 17, 2015

once dissertation is handed to me to sign I have every intention
of nominating the dissertation for various awards :-)

On Sun, May 17, 2015 at 8:49 AM, Scott P. Jones notifications@github.com
wrote:

Exclusive publication rights!?! I've got dibs on an autographed copy (or
two... need one to sell on e-bay in 10-15 years, another to keep for myself [image:
😀])... got to get that before it's locked up by the ACM!
(Of course, that probably means that it would be available on the ACM's
digital library for members)


Reply to this email directly or view it on GitHub
#8839 (comment).

@ScottPJones

This comment has been minimized.

Show comment
Hide comment
@ScottPJones

ScottPJones May 17, 2015

Contributor

No comments from @JeffBezanson... I hope he's celebrating (more checking off his last box), and hasn't been locked in a room somewhere by GJS until he gets an s-expr mode working!

Contributor

ScottPJones commented May 17, 2015

No comments from @JeffBezanson... I hope he's celebrating (more checking off his last box), and hasn't been locked in a room somewhere by GJS until he gets an s-expr mode working!

@dikshie

This comment has been minimized.

Show comment
Hide comment
@dikshie

dikshie May 17, 2015

Congratulations!

dikshie commented May 17, 2015

Congratulations!

@mbaz

This comment has been minimized.

Show comment
Hide comment
@mbaz

mbaz May 19, 2015

Contributor

Congratulations, @JeffBezanson!

Contributor

mbaz commented May 19, 2015

Congratulations, @JeffBezanson!

@milktrader

This comment has been minimized.

Show comment
Hide comment
@milktrader

milktrader May 20, 2015

Member

(belated) Congrats!

Member

milktrader commented May 20, 2015

(belated) Congrats!

@JeffBezanson

This comment has been minimized.

Show comment
Hide comment
@JeffBezanson

JeffBezanson May 20, 2015

Member

Update: just submitted the document. The submitted version is https://github.com/JeffBezanson/phdthesis/tree/876be73a5aab9b034fac3eb9ea9d8f96713f786f .

I'm sure it's deficient in many ways. Oh well. Hopefully there is nothing really bad in there.

Member

JeffBezanson commented May 20, 2015

Update: just submitted the document. The submitted version is https://github.com/JeffBezanson/phdthesis/tree/876be73a5aab9b034fac3eb9ea9d8f96713f786f .

I'm sure it's deficient in many ways. Oh well. Hopefully there is nothing really bad in there.

@johnmyleswhite

This comment has been minimized.

Show comment
Hide comment
@johnmyleswhite

johnmyleswhite May 20, 2015

Member

Nice. Congrats on truly finishing your PhD.

Member

johnmyleswhite commented May 20, 2015

Nice. Congrats on truly finishing your PhD.

@Keno

This comment has been minimized.

Show comment
Hide comment
@Keno

Keno May 20, 2015

Member

Congratulations, Jeff! Great accomplishment. I'm sure you're glad it's over.

Member

Keno commented May 20, 2015

Congratulations, Jeff! Great accomplishment. I'm sure you're glad it's over.

@StefanKarpinski

This comment has been minimized.

Show comment
Hide comment
Member

StefanKarpinski commented May 20, 2015

party

@timholy

This comment has been minimized.

Show comment
Hide comment
@timholy

timholy May 20, 2015

Member

I've already found your thesis fills some holes in Julia's documentation, so it's clearly going to be quite useful. All documents come with flaws; the rest of us are impressed by the strengths! Congrats!

Member

timholy commented May 20, 2015

I've already found your thesis fills some holes in Julia's documentation, so it's clearly going to be quite useful. All documents come with flaws; the rest of us are impressed by the strengths! Congrats!

@milktrader

This comment has been minimized.

Show comment
Hide comment
@milktrader

milktrader May 20, 2015

Member

And thank you for sharing it!

Member

milktrader commented May 20, 2015

And thank you for sharing it!

@ssfrr

This comment has been minimized.

Show comment
Hide comment
@ssfrr

ssfrr May 20, 2015

Contributor

Woot! Congratulations on finishing the defense and thesis, and all the other work that they signify and represent. It's nice to have this milestone to recognize all the things you've accomplished. I hope you're proud!

Contributor

ssfrr commented May 20, 2015

Woot! Congratulations on finishing the defense and thesis, and all the other work that they signify and represent. It's nice to have this milestone to recognize all the things you've accomplished. I hope you're proud!

@ViralBShah

This comment has been minimized.

Show comment
Hide comment
@ViralBShah

ViralBShah May 21, 2015

Member

@JeffBezanson I hope you are planning to take a few days off to chill and celebrate, or perhaps you are planning to celebrate with type system overhaul or something. :-)

Nice that the new pdf has hyperref - for those wanting to browse. We should also get it up on the julia publications list.

Member

ViralBShah commented May 21, 2015

@JeffBezanson I hope you are planning to take a few days off to chill and celebrate, or perhaps you are planning to celebrate with type system overhaul or something. :-)

Nice that the new pdf has hyperref - for those wanting to browse. We should also get it up on the julia publications list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment