Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 17 14:22
    antoine-levitt commented #527
  • Sep 17 14:16
    umbriquse commented #527
  • Sep 17 10:45
    antoine-levitt commented #527
  • Sep 17 10:19
    antoine-levitt commented #527
  • Sep 16 18:41
    umbriquse opened #527
  • Sep 16 08:08
    antoine-levitt commented #526
  • Sep 16 07:59
    Harrykjg-physics opened #526
  • Sep 05 12:13
    LaurentVidal95 synchronize #518
  • Aug 31 08:21
    LaurentVidal95 synchronize #518
  • Aug 30 15:29
    mfherbst synchronize #524
  • Aug 30 15:29

    mfherbst on printing

    Split up model and basis (compare)

  • Aug 30 14:41
    LaurentVidal95 synchronize #518
  • Aug 30 13:59
    mfherbst synchronize #524
  • Aug 30 13:59

    mfherbst on printing

    Review 1 (compare)

  • Aug 29 20:08
    mfherbst synchronize #525
  • Aug 29 20:08

    mfherbst on periodic-problems-docs

    Fixes (compare)

  • Aug 29 19:55
    mfherbst labeled #525
  • Aug 29 19:54
    mfherbst opened #525
  • Aug 29 19:53

    mfherbst on periodic-problems-docs

    Wrote notes, untested Some fixes (compare)

  • Aug 28 20:13
    mfherbst synchronize #524
Michael F. Herbst
@mfherbst
or the documentation
but in DFTK we also follow the philosophy that our code should be an open book
so we actually expect and encourage people to read the code in order to understand what is going on
also we follow conventions in the argument names (or we try to)
so that it is clear just from the argument name what sort of thing is expected
Louis Ponet
@louisponet
on the first point I'd say that then the user probably should be subtyping AbstractArray anyway
Michael F. Herbst
@mfherbst
not neccessarily
Louis Ponet
@louisponet
hmm yea I mean I can see both sides
Michael F. Herbst
@mfherbst
in my opinion what makes julia more flexible than C++ or python is exactly that the interfaces are not set in stone
rather they are conventions
and if I just want to quickly try something quick and dirty
I do not want to spend 30min to look up and satisfy the interface
so without type annotations I don't have to fully do an AbstractArray
I just implement what is needed and I am ready to go
to do it properly in library code of course you should follow the convention
but that's the second step from my point of view
first get it to work, then get it fast and clean ;)
Louis Ponet
@louisponet
Yea, that's the idea but in reality often I get errors at some part of the code because I didn't throw in the thing that the code expected
Michael F. Herbst
@mfherbst
sure but then you just implement that extra bit
eventually you will have the full interface
but on the way you already got at least some stuff to work
I agree that it is two sides of the coin
Louis Ponet
@louisponet
Okay, then I'll follow that idea for other things I may implement :) but personally I still think just having types on the arguments is like a part of documentation on it's own almost
Michael F. Herbst
@mfherbst
I often had it the other way round with strongly object-oriented code that I needed my object to satisfy two interfaces to work with certain codes, but there were conflicts ...
Louis Ponet
@louisponet
but indeed if the argument's name makes clear what is expected that ofcourse also works
I see
well I'd say that's just shit code then ;D
Michael F. Herbst
@mfherbst
Agree, but sometimes you don't have a choice in science
Louis Ponet
@louisponet
true
Michael F. Herbst
@mfherbst
and better you can hack something and get a PhD, rather than rewrite a library for that reason
Louis Ponet
@louisponet
haha agreed
Michael F. Herbst
@mfherbst
actually I think what is most important is that the philosophy of the code agrees with the philosophy of the language
and julia definitely went the route of "only type when needed"
Louis Ponet
@louisponet
But isn't the philosophy of Julia exactly to type as strong as needed but not stronger?
Michael F. Herbst
@mfherbst
just look at the standard library
exactly
and if you only have one version of a function, why add types for dispatch?
(ok that's pushing it to the extreme of course)
Louis Ponet
@louisponet
I mean usually a numerical function will not be happy with Strings right?
Michael F. Herbst
@mfherbst
and?
so it just breaks during compilation
Louis Ponet
@louisponet
so then if I throw in a string and I get an error that the type of my argument is not right, I know
but getting an error from somewhere inside the function body I think have to open an editor find the body and what it's trying to do to know what I'm supposed to throw in
Michael F. Herbst
@mfherbst
again it's a bit the question of what you want.
yes I agree
I mean we check a bit more strongly on the real high-level interfaces (I think)
well on the other hand you have examples to see what is the right way to do stuff and other documentation
Louis Ponet
@louisponet
One example of something like this I actually ran into while doing the spglib was this darned Int32 vs Int64 in the symops for getting the stabilized kmesh
Michael F. Herbst
@mfherbst
my point is: Either you do low-level hacking and then you have to look at the code or you stay on the surface and then you follow examples to see what should be done
Ok what happened?