News for hackers. Stuff that matters.
Re:Julia Package Ecosystem Pulse by transfire on Friday November 21, 2014 @10:40AM (#8641716)
I've written a few small Julia programs and have found it to be a very productive language, in most respects. Unfortunately its module system is horrid. If you look at almost all Julia programs, they are essentially one big file. Any secondary files just get included into a main file wholeclothe. It's like working with archaic PHP all over again.
Re:Julia Package Ecosystem Pulse by Fede_V on Friday November 21, 2014 @11:14AM (#8641866)
I agree with this. I think in large part this is because the developers decided to try as much as possible to 'decouple' the concept of module from the filesystem.

I think this is clever in the abstract, but in practice, it's a lot of headache for very, very little gain and a lot of added confusion.

The main Julia team is a bunch of incredibly smart and dedicated guys who know a lot more about designing language than I do, but I think this was a case of trying to be too clever for your own good.

Re:Julia Package Ecosystem Pulse by CyberDildonics on Friday November 21, 2014 @12:53PM (#8642364)
So what are the module systems you like and what do you like about them?
Re:Julia Package Ecosystem Pulse by Fede_V on Friday November 21, 2014 @02:12PM (#8642763)
I really like Python - I think forcing people into using a certain directory structure is nice, and it makes browsing code easy.

I think it's largely a matter of taste though! I just think that having a directory layout that reflects the code structure makes it easy to browse things at a glance, provided there's not too much magic in the __init__ files.

Re:Julia Package Ecosystem Pulse by StefanKarpinski on Friday November 21, 2014 @04:52PM (#8643581)
That structure makes sense in class-based single-dispatch o.o. languages like Python and Java. It does not make sense in a classless multiple dispatch language like Julia.
Re:Julia Package Ecosystem Pulse by one-more-minute on Friday November 21, 2014 @12:35PM (#8642290)
Personally I really like Julia's module system. It's certainly not dogmatic, which (as in any flexible system) means it's easy to write bad code, but there's nothing stopping you from being as organised as you want to be.

Then there's the pattern of having a few large modules as opposed to many small ones; I can see how that would seem strange if you're used to a more object-oriented style, but it's pretty common in more functional languages.

Re:Julia Package Ecosystem Pulse by asg on Friday November 21, 2014 @03:53PM (#8643322)
Well, that is just one way of doing it. As other commenters say below, julia decouples the concepts of namespaces, and files. Which means there are many ways of organising your code.

You're right in that most projects include files into one large modules. Not every body like a it, but it does work for many codebases.

If you want however, nothing prevents you from having separate modules per files.You could also create hierarchical modules, and store the files in a matching heirarchy of directories.

As a young language, some programming patterns are still being experimented on by the purveyors of the language. But I don't think the module system is fundamentally weak in this respect.

Re:Julia Package Ecosystem Pulse by cschmidt on Friday November 21, 2014 @10:53AM (#8641765)
Don't people used Module in practice?

http://julia.readthedocs.org/en/latest/manual/modules/?highl...

I haven't read up on Julia yet, so I'm curious.

Re:Julia Package Ecosystem Pulse by sgt101 on Friday November 21, 2014 @11:44AM (#8642010)
I've only played, but a few hours into it I wanted to partition up my project into separate places in order to separate concerns . I found modules to be a good way to do that once I realised that it's Pascal/modular 2 / ada again and not objects. I think that the problem may be that people are tripped up by the separation of type and modularity when they are used to that being coupled in c++ and java.
Re:Julia Package Ecosystem Pulse by msravi on Friday November 21, 2014 @12:03PM (#8642099)
The application I work on is fairly complex and I've had no trouble at all building and organizing my code into separate modules.
Re:Julia Package Ecosystem Pulse by tlmr on Friday November 21, 2014 @12:07PM (#8642121)
Is this going to hamper it from being the next python for both general and data science programming? Do you think I should invest in learning julia, or continue with python?
Re:Julia Package Ecosystem Pulse by johnmyleswhite on Friday November 21, 2014 @04:21PM (#8643435)
I often say this, but I think if you have doubts about whether you should learn Julia or Python, then you should certainly learn Python.
Re:Julia Package Ecosystem Pulse by sgt101 on Friday November 21, 2014 @11:41AM (#8641992)
Hangon - I thought a module was a separate namespace; and a way of partitioning programs into files. Can you be more specific in your criticisms?
Re:Julia Package Ecosystem Pulse by rspeer on Friday November 21, 2014 @03:53PM (#8643323)
You and I might expect a module to be both of those things, probably based on experience with languages such as Python.

Julia's position so far has been that files and modules are entirely unrelated to one another. Modules are namespaces, and files are messy things on a disk. Hooray! You can organize your code however you want!

The problem is that I don't want to decide how to organize my code. I want to write the code to some best practices that have been thought up by someone who deeply understands their implications. Julia doesn't have these yet. I hope that it does one day.