Jump to page: 1 2
Thread overview
Why I need DUB? Will never DMD don't just use import for import packages?
Mar 29
Marcone
Mar 29
Marcone
Mar 29
Marcone
Mar 29
Marcone
4 days ago
Alain De Vos
4 days ago
Kagamin
4 days ago
Alain De Vos
4 days ago
Alain De Vos
3 days ago
evilrat
March 29
Why can't I just use: import vibe.vibe; for import packages like Nim or Python? Why I still use DUB?

March 29
On Monday, 29 March 2021 at 19:06:33 UTC, Marcone wrote:
> Why can't I just use: import vibe.vibe; for import packages like Nim or Python? Why I still use DUB?

In python you also have pip.

It is possible to use vibe.d (any dub package) without dub but you have a few manual steps involved.

Kind regards
Andre
March 29
On Monday, 29 March 2021 at 19:14:41 UTC, Andre Pany wrote:
> On Monday, 29 March 2021 at 19:06:33 UTC, Marcone wrote:
>> Why can't I just use: import vibe.vibe; for import packages like Nim or Python? Why I still use DUB?
>
> In python you also have pip.
>
> It is possible to use vibe.d (any dub package) without dub but you have a few manual steps involved.
>
> Kind regards
> Andre

I just want compile direct with DMD witout DUB.
March 29
On Monday, 29 March 2021 at 19:14:41 UTC, Andre Pany wrote:
> On Monday, 29 March 2021 at 19:06:33 UTC, Marcone wrote:
>> Why can't I just use: import vibe.vibe; for import packages like Nim or Python? Why I still use DUB?
>
> In python you also have pip.
>
> It is possible to use vibe.d (any dub package) without dub but you have a few manual steps involved.
>
> Kind regards
> Andre

Python dont need pip for run script with imported module. Just need call python.
March 29
On Monday, 29 March 2021 at 19:14:41 UTC, Andre Pany wrote:
> On Monday, 29 March 2021 at 19:06:33 UTC, Marcone wrote:
>> Why can't I just use: import vibe.vibe; for import packages like Nim or Python? Why I still use DUB?
>
> In python you also have pip.
>
> It is possible to use vibe.d (any dub package) without dub but you have a few manual steps involved.
>
> Kind regards
> Andre

Why DMD can't make automatic this few steps involved?
March 29
On Monday, 29 March 2021 at 19:06:33 UTC, Marcone wrote:
> Why can't I just use: import vibe.vibe; for import packages like Nim or Python? Why I still use DUB?

I don't use dub. Just dmd -i after you set up the files in the right place.

Not all libraries support that but I only use my own libraries so it is fine.
March 29
On Monday, 29 March 2021 at 19:21:34 UTC, Marcone wrote:
> On Monday, 29 March 2021 at 19:14:41 UTC, Andre Pany wrote:
>> On Monday, 29 March 2021 at 19:06:33 UTC, Marcone wrote:
>>> Why can't I just use: import vibe.vibe; for import packages like Nim or Python? Why I still use DUB?
>>
>> In python you also have pip.
>>
>> It is possible to use vibe.d (any dub package) without dub but you have a few manual steps involved.
>>
>> Kind regards
>> Andre
>
> Python dont need pip for run script with imported module. Just need call python.

Same as for D. You can just use dub for downloading the packages and then use DMD with the correct import paths arguments/ switches / additional arguments.
The analogy here is the setup.py where you configure your dependencies in python.

Kind regards
Andre
March 29
On Monday, 29 March 2021 at 19:25:06 UTC, Marcone wrote:
> On Monday, 29 March 2021 at 19:14:41 UTC, Andre Pany wrote:
>> On Monday, 29 March 2021 at 19:06:33 UTC, Marcone wrote:
>>> Why can't I just use: import vibe.vibe; for import packages like Nim or Python? Why I still use DUB?
>>
>> In python you also have pip.
>>
>> It is possible to use vibe.d (any dub package) without dub but you have a few manual steps involved.
>>
>> Kind regards
>> Andre
>
> Why DMD can't make automatic this few steps involved?

Every dub package is different. Copying files, different script hooks (e.g. before generation...), and many more.
This is not in the responsibility of a compiler, but in a package manager.

Kind regards
Andre
March 30
On Monday, 29 March 2021 at 19:21:34 UTC, Marcone wrote:

>
> Python dont need pip for run script with imported module. Just need call python.

But you need to install the module beforehand. The Pyhton interpreter doesn't fetch modules and install them for you. Neither does dmd.
March 29
On Mon, Mar 29, 2021 at 07:28:23PM +0000, Adam D. Ruppe via Digitalmars-d-learn wrote:
> On Monday, 29 March 2021 at 19:06:33 UTC, Marcone wrote:
> > Why can't I just use: import vibe.vibe; for import packages like Nim or Python? Why I still use DUB?
> 
> I don't use dub. Just dmd -i after you set up the files in the right place.
> 
> Not all libraries support that but I only use my own libraries so it is fine.

I highly recommend Adam's arsd library (or collection of libraries). Mostly just single files, with a few that have one or two dependencies, you just copy the file(s) into your workspace and import them. That's all.  No need for external tools to manage dependencies, no dependency hell, just drop the file into your project and go.

arsd does have a dub thingy for those who want it, but I mostly just git submodule it in my own projects or plain ole copy a couple o' files into my workspace. No fuss, no muss, no hairy NP-complete dependency graphs, the way it should be.


T

-- 
Having a smoking section in a restaurant is like having a peeing section in a swimming pool. -- Edward Burr
« First   ‹ Prev
1 2