On Mon, Mar 29, 2021 at 07:28:23PM +, 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
On Tue, Mar 30, 2021 at 12:32:36AM +, mw via Digitalmars-d-learn wrote:
> On Monday, 19 November 2018 at 22:32:55 UTC, H. S. Teoh wrote:
> > Actually, the case is unnecessary, because arrays implicitly convert
> > to void[], and pointers are sliceable. So all you need is:
> >
> > SomeStru
I would like to use an updated version of the Termbox library
(written in C) with D. I have the .h file. This is new
territory for me (why try something easy - right?). I think I
need to create a .di file that corresponds to the .h file. I
also suspect that I need to put the library file (C
On 3/29/21 1:44 PM, drug wrote:
I use asdf https://code.dlang.org/packages/asdf
Also vibe-d https://code.dlang.org/packages/vibe-d has
vibe-d:data subpackage
Also a happy `asdf` user
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.
On Monday, 19 November 2018 at 22:32:55 UTC, H. S. Teoh wrote:
Actually, the case is unnecessary, because arrays implicitly
convert to void[], and pointers are sliceable. So all you need
is:
SomeStruct myStruct;
fd.rawRead((&myStruct)[0 .. 1]);
This works for all POD types.
On Monday, 29 March 2021 at 11:53:32 UTC, Adam D. Ruppe wrote:
On Monday, 29 March 2021 at 02:12:57 UTC, Brad wrote:
[...]
You can still import std.stdio and use other functions with
just the one overridden.
D handles name lookups by just ... well, looking up lol. It
starts in the current
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
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
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 libra
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)
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)
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)
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.
Kin
On Sunday, 28 March 2021 at 15:52:43 UTC, Zardoz wrote:
So, we get this dub.json :
{
"name": "example",
"configurations": [
{
"name": "example",
"targetType": "library"
},
{
"name": "unittest",
"targetType": "library",
"importPaths": ["source", "test
Why can't I just use: import vibe.vibe; for import packages like
Nim or Python? Why I still use DUB?
On Monday, 29 March 2021 at 17:52:13 UTC, Gavin Ray wrote:
Trying to read this function signature:
void my_func(T, XS)(string a, string b, string c, lazy T
function(XS)[] t...)
Does this say "Generic void function 'my_func', which takes two
generic/type params "T" and "XS", and is a func
On 3/29/21 1:48 PM, Imperatorn wrote:
On Monday, 29 March 2021 at 17:21:25 UTC, tastyminerals wrote:
We need to parse a bunch of JSON files. What does D have? It has
std.json which is strangely slower than Python json :(
Ok, we go to dub repository and search for something that is faster.
There
On Monday, 29 March 2021 at 17:02:40 UTC, evilrat wrote:
Also with delegates (lazy), you get the type checks however you
must have to declare parameters on call site, which can be PITA
in the future when doing refactoring will be necessary.
Better plan ahead as the number of changes will exp
On Monday, 29 March 2021 at 16:31:49 UTC, Paul Backus wrote:
On Monday, 29 March 2021 at 16:20:59 UTC, Ali Çehreli wrote:
auto myFunc(F)(string name, F func)
{
// This condition could be a template constraint but they
don't
// support error messages.
static assert (is (Parameters!func ==
On Monday, 29 March 2021 at 17:21:25 UTC, tastyminerals wrote:
We need to parse a bunch of JSON files. What does D have? It
has std.json which is strangely slower than Python json :(
Ok, we go to dub repository and search for something that is
faster. There are basically two implementations fast
I use asdf https://code.dlang.org/packages/asdf
Also vibe-d https://code.dlang.org/packages/vibe-d has
vibe-d:data subpackage
On Monday, 29 March 2021 at 17:21:25 UTC, tastyminerals wrote:
We need to parse a bunch of JSON files. What does D have? It
has std.json which is strangely slower than Python json :(
Ok, we go to dub repository and search for something that is
faster. There are basically two implementations fast
We need to parse a bunch of JSON files. What does D have? It has
std.json which is strangely slower than Python json :(
Ok, we go to dub repository and search for something that is
faster. There are basically two implementations fast.json and
stdx.data.json. The first one refuses to work on Mac
On Monday, 29 March 2021 at 15:13:04 UTC, Gavin Ray wrote:
Brief question, is it possible to write this so that the "alias
fn" here appears as the final argument?
auto my_func(alias fn)(string name, string description, auto
otherthing)
The above seems to work, since the type of "fn" can va
On Monday, 29 March 2021 at 16:20:59 UTC, Ali Çehreli wrote:
auto myFunc(F)(string name, F func)
{
// This condition could be a template constraint but they
don't
// support error messages.
static assert (is (Parameters!func == AliasSeq!(string)),
"'func' must be a callab
On 3/29/21 8:13 AM, Gavin Ray wrote:
> Brief question, is it possible to write this so that the "alias fn" here
> appears as the final argument?
>
>auto my_func(alias fn)(string name, string description, auto
otherthing)
Yes, as a type template parameter but you would have to constrain the
On Friday, 26 March 2021 at 22:41:08 UTC, dan wrote:
On Friday, 26 March 2021 at 21:54:20 UTC, rikki cattermole
wrote:
On 27/03/2021 10:51 AM, dan wrote:
Are there any d compilers that run natively on the Mac Mini
with an M1 chip?
If so, does anybody here have any experience with them that
c
Brief question, is it possible to write this so that the "alias
fn" here appears as the final argument?
auto my_func(alias fn)(string name, string description, auto
otherthing)
The above seems to work, since the type of "fn" can vary and it
gets called inside of "my_func", but from an ergo
On Monday, 29 March 2021 at 02:12:57 UTC, Brad wrote:
a custom implementation for writeln rather than use the one in
stdout module (package?) that would mean any other functions
from that package I would want to leverage I would need to
include by name.
You can still import std.stdio and use
30 matches
Mail list logo