www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Why I need DUB? Will never DMD don't just use import for import

reply Marcone <marcone email.com> writes:
Why can't I just use: import vibe.vibe; for import packages like 
Nim or Python? Why I still use DUB?
Mar 29 2021
next sibling parent reply Andre Pany <andre s-e-a-p.de> writes:
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
Mar 29 2021
next sibling parent Marcone <marcone email.com> writes:
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.
Mar 29 2021
prev sibling next sibling parent reply Marcone <marcone email.com> writes:
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.
Mar 29 2021
next sibling parent Andre Pany <andre s-e-a-p.de> writes:
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
Mar 29 2021
prev sibling parent Mike Parker <aldacron gmail.com> writes:
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.
Mar 29 2021
prev sibling parent reply Marcone <marcone email.com> writes:
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?
Mar 29 2021
parent Andre Pany <andre s-e-a-p.de> writes:
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
Mar 29 2021
prev sibling next sibling parent reply Adam D. Ruppe <destructionator gmail.com> writes:
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.
Mar 29 2021
parent reply "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
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
Mar 29 2021
parent Alain De Vos <devosalain71 gmail.com> writes:
Here an example of using gtkd without dub :
ldc2 -I/usr/local/include/d/gtkd-3 -L-lgtkd-3 -L-ldl hello.d
When you run dub with parameters "--verbose" it informs you what 
is going on.

I have not figured out how to use tkd without dub.
It would be nice to know how.
Apr 07 2021
prev sibling parent reply Kagamin <spam here.lot> writes:
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?
Theoretically an rdmd-like tool can automatically infer dependencies from imports (autodub?). But it can also easily expose you to a supply chain attack.
Apr 08 2021
parent reply Alain De Vos <devosalain71 gmail.com> writes:
I think it should always be possible to build "offline".
dub does stuff and I don't now what.
Apr 08 2021
parent reply Alain De Vos <devosalain71 gmail.com> writes:
The most important task is
"give me a list of to include .d files"
"give me a list of the link libraries .a .so"
Apr 08 2021
parent evilrat <evilrat666 gmail.com> writes:
On Thursday, 8 April 2021 at 21:36:02 UTC, Alain De Vos wrote:
 The most important task is
 "give me a list of to include .d files"
 "give me a list of the link libraries .a .so"
sure, use -v flag, this will give you compiler flags and other info ``` dub build -v ``` this will give you extensive build information in json ``` dub describe ``` also if you don't like dub going internet just add this flag ``` --skip-registry=all ```
Apr 08 2021