Re: Python and D (PyD)

2017-12-05 Thread Fat_Umpalumpa via Digitalmars-d-learn
Omg this was working a few days ago just fine! Now I can't even 
start the histogram example! I haven't changed the code and I 
know this worked a week ago.


dub still builds the program, however now when running the 
program, I get an error


object.Exception@../../../.dub/packages/pyd-0.9.9/pyd/infrastructure/pyd/extra.d(74):
 numpy is not available

and then many more errors as if I have a problem with python or 
numpy... Crap I was installing random things with pip and may 
have ruined something.


I'll post a few more errors but I think the problem is on line 
(74) of the extra.d script


4   matplot_d   0x00010c2f5262 pure 
@safe void 
std.exception.bailOut!(Exception).bailOut(immutable(char)[], 
ulong, const(char[])) + 126
5   matplot_d   0x00010c2f51d6 pure 
@safe deimos.python.object.PyTypeObject* 
std.exception.enforce!(Exception, 
deimos.python.object.PyTypeObject*).enforce(deimos.python.object.PyTypeObject*, lazy const(char)[], immutable(char)[], ulong) + 106
6   matplot_d   0x00010c31065a 
deimos.python.object.PyObject* 
pyd.extra.d_to_python_numpy_ndarray!(long[]).d_to_python_numpy_ndarray(long[]) + 70
7   matplot_d   0x00010c2e8429 _Dmain 
+ 73


Re: Python and D (PyD)

2017-11-28 Thread Fat_Umpalumpa via Digitalmars-d-learn
you need to tell the compiler where to look to find pyd (which 
it can't find in '/Library/D/dmd/src/phobos' or 
'/Library/D/dmd/src/druntime/import').
If you are invoking the compiler yourself use the `-I` switch 
(`-Ipath/to/pyd`).
Or if you are using dub (I recommend this) make sure that is is 
in your list of dependencies.


Ahhh thank you! I'm still new to the d language and dub worked 
fine.





Python and D (PyD)

2017-11-28 Thread Fat_Umpalumpa via Digitalmars-d-learn
Hello, I have searched these forums a bit to see if it is 
possible to use python libraries such as matplotlib which I have 
enough experience with, and wish to continue using this wonderful 
library within D. Maybe there are great D graphing libraries, but 
I have zero experience with them.


I cam across PyD and found an example from "Welcome to Quick 
Start with D!"

http://d.readthedocs.io/en/latest/examples.html#plotting-with-matplotlib-python

I have tried to understand the example here and thoroughly as 
possible, to the point of downloading the Github example 
https://github.com/andralex/thenextafterc/tree/master/examples/matplotlib


When I try to compile the app.d script with dmd I get the 
following error


app.d(1): Error: module pyd is in file 'pyd/pyd.d' which cannot 
be read

import path[0] = /Library/D/dmd/src/phobos
import path[1] = /Library/D/dmd/src/druntime/import

I have tried to install PyD with pip and installed version 0.10 
which I think is the same as

https://pypi.python.org/pypi/pyd

But according to dlang https://code.dlang.org/packages/pyd only 
up to version 0.9.9 is supported?


Re: Tango + D2 + Mac

2017-10-16 Thread Fat_Umpalumpa via Digitalmars-d-learn

On Tuesday, 17 October 2017 at 03:25:53 UTC, Neia Neutuladh wrote:

I take it you're using https://github.com/SiegeLord/Tango-D2 ?

I tried it out about a year ago and it worked, but your mileage 
may vary. For the most part, Phobos and various Dub packages 
have superseded it. Tango's main benefit was that it was code 
that was well maintained over the course of several years, and 
that's no longer true.


Yeah I tried installing Tango-D2 but the installation page is 
throwing me off... too many steps that don't work for me.


Do you by any chance know anything that replaced std.xml?
Everything I look up on it suggests not to use it.


Tango + D2 + Mac

2017-10-16 Thread Fat_Umpalumpa via Digitalmars-d-learn
I am having a lot of trouble trying to install Tango to use with 
D2 on my mac os Sierra. Is this even possible? Thanks!