Re: Is D a good choice for embedding python/octave/julia

2016-03-15 Thread Ellery Newcomer via Digitalmars-d-learn
On 03/13/2016 02:36 PM, Laeeth Isharc wrote: InterpContext context = new InterpContext(); context.py_stmts(outdent(" import numpy a = numpy.eye(2, dtype='complex128') ")); context.a.to_d!(Complex!double[][] )(); nitpicking, but the outdent is unnecessary,

Re: Calling python code from D

2016-02-27 Thread Ellery Newcomer via Digitalmars-d-learn
On Thursday, 25 February 2016 at 21:40:45 UTC, Wyatt wrote: I have a project I started in Python before I realised I really don't enjoy Python. It's been on the back-burner for a few years and I'd like to start again in D, but there's a particular python module (Mutagen) that I outright

Re: Future(s) for D.

2015-06-20 Thread Ellery Newcomer via Digitalmars-d
On 06/20/2015 07:00 AM, Etienne wrote: On Saturday, 20 June 2015 at 13:33:34 UTC, Dragos Carp wrote: On Saturday, 20 June 2015 at 12:35:11 UTC, weaselcat wrote: I recently read this facebook post on their future implementation in their Folly library.

Re: Dlang seems like java now,but why not let d more like C# Style?

2015-03-16 Thread Ellery Newcomer via Digitalmars-d-learn
On Sunday, 15 March 2015 at 14:58:54 UTC, Idan Arye wrote: Even if we can't get the lambdas as syntax tress, the fact that we can send whatever types we want to the delegates and overload operators and stuff means we can still convert the lambdas into SQL. There are limitations on operator

Re: Dlang seems like java now,but why not let d more like C# Style?

2015-03-14 Thread Ellery Newcomer via Digitalmars-d-learn
On Saturday, 14 March 2015 at 23:57:33 UTC, weaselcat wrote: On Saturday, 14 March 2015 at 23:46:28 UTC, Ellery Newcomer wrote: And C# has LINQ, which when combined with the last point is fricken awesome. what does LINQ offer that UFCS-style functional programming does not? LINQ basically

Re: Dlang seems like java now,but why not let d more like C# Style?

2015-03-14 Thread Ellery Newcomer via Digitalmars-d-learn
On Saturday, 14 March 2015 at 13:52:13 UTC, Craig Dillabaugh wrote: I don't have any C# experience so I can't compare those languages much, but I've heard people say their are D / C# similarities. Anyway, this isn't a criticism of your comment, I was just curious what (other than the

Re: embedding Pyd in Windows program

2015-03-14 Thread Ellery Newcomer via Digitalmars-d-learn
On Saturday, 14 March 2015 at 07:28:04 UTC, Matt wrote: Yeah, dub is what I'm using. Actually, I made a mistake regarding the py_eval. I'm including the pyd modules in a module other than the one that has my main() function, so they weren't visible. I feel like a proper idiot for that one..

Re: embedding Pyd in Windows program

2015-03-13 Thread Ellery Newcomer via Digitalmars-d-learn
On Friday, 13 March 2015 at 19:05:59 UTC, Matt wrote: example code, see if I can figure it out, but if you can advise, that would be fantastic. Thank you for all the help so far, it's really been appreciated My penitence for not putting this information on readthedocs. I've tried the

Re: embedding Pyd in Windows program

2015-03-13 Thread Ellery Newcomer via Digitalmars-d-learn
On Friday, 13 March 2015 at 09:38:45 UTC, Matt wrote: I used the ~0.9.4 branch in dub, and I'm not sure how to change configuration. Do you mean I should be using ~master or ~develop? nope. configurations are a different thing. you can set them in your project's dub.json. example:

Re: embedding Pyd in Windows program

2015-03-12 Thread Ellery Newcomer via Digitalmars-d-learn
On 03/11/2015 07:59 PM, Matt wrote: Right, copying site.py into my program's working dir sorts out the missing module error, but I now get a syntax error: file=sys.stderr) ^ SyntaxError: invalid syntax Error executing command run: Program exited with code 1 I googled this, and

Re: PyD-like wrapping for Excel/VBA and Julia?

2014-12-18 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/18/2014 12:41 PM, Laeeth Isharc wrote: I have a bunch of D functions I would like to make available to Excel (and possibly Julia) without having to write wrappers for each function individually. I've thought about refactoring the reflection parts of pyd into a reusable library for e.g.

Re: threading issues with D - C - Python

2014-12-17 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/07/2014 03:12 PM, Michael wrote: now to figure out how to use them in the general case. This is great.. Thank you. I'm looking forward to being able to try the finished result. My build servers are broken at the moment, but I think I have this fixed, on linux at least.

Re: detaching a thread from druntime 2.067

2014-12-16 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/16/2014 10:41 AM, Sean Kelly wrote: On Tuesday, 16 December 2014 at 04:56:10 UTC, Ellery Newcomer wrote: If I have a thread that I need to detach from druntime, I can call thread_detachInstance, but for 2.066, this function does not exist. Is there any way to do this in 2.066? I notice

Re: Travis-CI support for D

2014-12-15 Thread Ellery Newcomer via Digitalmars-d-announce
On 12/14/2014 03:03 PM, Ellery Newcomer wrote: On 12/10/2014 08:50 PM, Martin Nowak wrote: Glad to announce that D support on Travis-CI was launched today. http://blog.travis-ci.com/2014-12-10-community-driven-language-support-comes-to-travis-ci/ trying it out with pyd, and I'm getting

detaching a thread from druntime 2.067

2014-12-15 Thread Ellery Newcomer via Digitalmars-d-learn
If I have a thread that I need to detach from druntime, I can call thread_detachInstance, but for 2.066, this function does not exist. Is there any way to do this in 2.066? I notice there is a thread_detachByAddr, but I'm not sure how to get a ThreadAddr out of a Thread..

Re: Travis-CI support for D

2014-12-14 Thread Ellery Newcomer via Digitalmars-d-announce
On 12/10/2014 08:50 PM, Martin Nowak wrote: Glad to announce that D support on Travis-CI was launched today. http://blog.travis-ci.com/2014-12-10-community-driven-language-support-comes-to-travis-ci/ trying it out with pyd, and I'm getting ImportError: libphobos2.so.0.66: cannot open shared

Re: Travis-CI support for D

2014-12-13 Thread Ellery Newcomer via Digitalmars-d-announce
On 12/10/2014 08:50 PM, Martin Nowak wrote: Glad to announce that D support on Travis-CI was launched today. I'm a noob when it comes to travis, so it isn't readily apparent to me, but given this, would travis support a build that installs a d compiler and also some version of python?

Re: threading issues with D - C - Python

2014-12-07 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/07/2014 03:12 PM, Michael wrote: On Saturday, 6 December 2014 at 00:40:49 UTC, Ellery Newcomer wrote: On 12/04/2014 10:55 PM, Ellery Newcomer wrote: I guess tomorrow I can try messing around with thread_attachThis, as the fullcollect happening in #2 might be screwing with python data

Re: threading issues with D - C - Python

2014-12-05 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/04/2014 10:55 PM, Ellery Newcomer wrote: I guess tomorrow I can try messing around with thread_attachThis, as the fullcollect happening in #2 might be screwing with python data. But you aren't really passing anything from python to d or vice versa, so I'm not sure why the gc would need

Re: threading issues with D - C - Python

2014-12-04 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/04/2014 02:11 PM, Michael wrote: On Thursday, 4 December 2014 at 03:22:05 UTC, Ellery Newcomer wrote: dustmite? Not sure what went wrong with dustmite, but every time I tried it it just started deleting all the files in the directory and setup.py would give errors. I manually deleted

Re: threading issues with D - C - Python

2014-12-03 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/03/2014 04:43 PM, Michael wrote: On Wednesday, 3 December 2014 at 21:35:48 UTC, ketmar via Digitalmars-d-learn wrote: ah, dsource strikes back! that vile site keep biting us again and again. let's hope that new admins will kill it for good. Yeah. I've got the new PyD and it compiles and

Re: threading issues with D - C - Python

2014-12-03 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/03/2014 06:56 PM, Michael wrote: On Thursday, 4 December 2014 at 02:31:51 UTC, Ellery Newcomer wrote: okay. that's not too surprising. If you can get me a minimal example, I'd be happy to have a look since pyd should probably support this case. Cool. Unfortunately most of the times

Re: threading issues with D - C - Python

2014-12-02 Thread Ellery Newcomer via Digitalmars-d-learn
On 12/02/2014 05:07 PM, Michael wrote: Hi. I'm new here and this is my first post. I'm not sure this is the right subforum for it, but wasn't sure where else to put it either. I've written a library to talk to some external hardware using a socket. It uses the std.concurrency threads to send

Re: building shared library from D code to import into cython

2014-10-12 Thread Ellery Newcomer via Digitalmars-d-learn
On Sunday, 12 October 2014 at 16:07:19 UTC, Laeeth Isharc wrote: Any thoughts on speed in 2014 of pyd vs using cython to talk to D directly via C/C++ interface? I saw this old coment here: pyd is basically just a convenience layer on top of the C interface. The part that would most likely

Re: building shared library from D code to import into cython

2014-10-09 Thread Ellery Newcomer via Digitalmars-d-learn
On Wednesday, 8 October 2014 at 00:25:57 UTC, Laeeth Isharc wrote: Hi. Thanks for the quick response. The -defaultlib was left around from trying all kinds of combinations of dmd and gcc. I am not used to gcc, and it will take me some time to become properly acquainted with all the

how to tell if a thing is a template

2014-08-23 Thread Ellery Newcomer via Digitalmars-d-learn
Can't think off the top of my head how you do this template IsTemplate(alias t) { ?? } static assert(IsTemplate!IsTemplate)

Re: Something like Python's psutils for D?

2014-07-12 Thread Ellery Newcomer via Digitalmars-d-learn
On Saturday, 12 July 2014 at 08:34:41 UTC, Thomas Mader wrote: The Subject says it all, is something like psutils available in D? would psutils itself be acceptable? https://bitbucket.org/ariovistus/pyd

Re: readln for tango with d2?

2014-06-23 Thread Ellery Newcomer via Digitalmars-d
On Monday, 23 June 2014 at 10:52:32 UTC, seany wrote: Doese tango come with a readline fucntion for d2? from this site, i was unable to find anything in my search : http://siegelord.github.io/Tango-D2/ tango.io.Console, maybe?

Re: C++'s defaulted comparison operators proposal

2014-06-18 Thread Ellery Newcomer via Digitalmars-d-learn
On Wednesday, 18 June 2014 at 05:49:30 UTC, Ali Çehreli wrote: Can you come up with a D library solution to the following C++11 proposal: http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2014/n3950.html did this years ago (or something similar, at least):

Re: pyd - continuous integration

2014-06-10 Thread Ellery Newcomer via Digitalmars-d
On Tuesday, 10 June 2014 at 14:39:25 UTC, Atila Neves wrote: If you can spare the time / HW resources, I'd probably go with Vagrant and Buildbot, but then again I would since I'm familiar with both. Atila I stumbled on vagrant a few months ago but haven't had a chance to play with it yet.

pyd - continuous integration

2014-06-09 Thread Ellery Newcomer via Digitalmars-d
So pyd is at the point where it really needs some sort of test suite runner. It's kind of complicated since I need to test against * multiple versions of dmd/ldc/gdc * multiple versions of python (2.4 - 3.4, but I'm thinking of dropping 2.4 and 2.5 this year) * redhat, ubuntu, osx, windows,

Re: Fedora DMD package

2014-06-06 Thread Ellery Newcomer via Digitalmars-d
On Friday, 6 June 2014 at 15:24:20 UTC, Russel Winder via Digitalmars-d wrote: OK, I can perhaps see why glibc-devel, but the rest? And why i686 packages on an x86_64 machine? Thanks. to support -m32, probably

cannot allocate memory in static TLS block

2014-06-05 Thread Ellery Newcomer via Digitalmars-d
I have a ubuntu 12.04 spin in which I am running dmd hello.d -shared -defaultlib=libphobos2.so -ofhello.so on an empty hello.d. attempting to use it (python) results in Traceback (most recent call last): File test.py, line 1, in module import hello ImportError:

Re: Linking with C on Windows

2014-06-05 Thread Ellery Newcomer via Digitalmars-d-learn
On Thursday, 5 June 2014 at 23:12:56 UTC, Mark Isaacson wrote: I need to eventually be able to export a dll that can talk with anything. how would using dmc conflict with this goal? dmd/dmc output omf object files, windows infrastructure is all coff object files. linux/mingw/etc are..

Re: Using D static library from C

2014-06-05 Thread Ellery Newcomer via Digitalmars-d-learn
On Thursday, 5 June 2014 at 18:51:25 UTC, George Sapkin wrote: I'm trying to link a simple D static library to C code, but I'm can't figure out how to do it properly without getting a segfault when running it. try this: dmd -lib test.d -defaultlib=libphobos2.a -oflibtest.a gcc main.c

Re: Using D static library from C

2014-06-05 Thread Ellery Newcomer via Digitalmars-d-learn
On Friday, 6 June 2014 at 02:17:50 UTC, George Sapkin wrote: On Friday, 6 June 2014 at 02:13:08 UTC, Ellery Newcomer wrote: On Thursday, 5 June 2014 at 18:51:25 UTC, George Sapkin wrote: I'm trying to link a simple D static library to C code, but I'm can't figure out how to do it properly

Re: dxl (the d port of jexcelapi)

2014-05-22 Thread Ellery Newcomer via Digitalmars-d-learn
On Thursday, 8 May 2014 at 20:57:08 UTC, Taylor Hillegeist wrote: So i was thinking i wonder if anyone has a d library for excel and behold there it was. however, it seems like d has grown since this was written. I'm getting bunches of errors telling me that i can't override a function

string - string literal

2014-04-20 Thread Ellery Newcomer via Digitalmars-d-learn
is there a function in phobos anywhere that takes a string and escapes it into a string literal suitable for string mixins? something like assert (f(abc\ndef) == \abc\\ndef\);

on interfacing w/C++

2014-04-13 Thread Ellery Newcomer
(Putting this out there because it sounds like I'm going to get scooped in the near future) So last week I was dinking around with the idea of a library to support calling C++ functions. So I wrote some ct code to emulate g++ 4.8.2's mangling scheme, and wrote a bit more code to wrap it, and

Re: GDC ARM beta #1 (with binary releases!)

2014-04-01 Thread Ellery Newcomer
On Monday, 17 March 2014 at 14:07:13 UTC, Johannes Pfau wrote: I'm happy to announce the first GDC ARM beta on behalf of the GDC team :) Cool! Just tried building it with crosstools-ng on my poor old laptop, and 90 minutes in it gives me

Re: Interface D with other languages

2014-03-29 Thread Ellery Newcomer
On Wednesday, 26 March 2014 at 14:52:56 UTC, Andrea Fontana wrote: This seems to be a D - python ! https://bitbucket.org/ariovistus/pyd a D - python even! annotations would be a nifty enhancement, something like @python_expose class Foo { @python_expose public void bar() { }

Re: Python calling D

2014-02-06 Thread Ellery Newcomer
On Tuesday, 4 February 2014 at 16:17:30 UTC, Russel Winder wrote: On Tue, 2014-02-04 at 12:45 +, Artem Tarasov wrote: But it does lead to a working system :-) Any particular reason you aren't using CeleriD to build this shared lib? CeleriD uses some hooks to call rt_init when the

Re: Python calling D

2014-02-01 Thread Ellery Newcomer
On Sunday, 26 January 2014 at 14:17:18 UTC, Russel Winder wrote: On Sun, 2014-01-26 at 12:11 +, Russel Winder wrote: […] However with Python 2 the example from: https://bitbucket.org/ariovistus/pyd/wiki/QuickStart leads to: This all sounds suspiciously like stuff I thought I'd

Re: Python calling D

2014-02-01 Thread Ellery Newcomer
On Saturday, 1 February 2014 at 22:02:24 UTC, Russel Winder wrote: My problem of the moment is segmentation faults during execution, and I have no model of how to go about providing useful data to debug this :-(( It wouldn't by any chance be related to

Re: GDC and Fedora 20

2014-01-25 Thread Ellery Newcomer
On Wednesday, 15 January 2014 at 18:34:41 UTC, Dejan Lekic wrote: Russel Winder wrote: 2) As Iain noted, I have made GCC SPEC which basically builds what I call system GCC - a set of GCC packages that are installed in /usr . This package is for those brave enough to replace GCC RPMs with my

Re: Python calling D

2014-01-25 Thread Ellery Newcomer
On Friday, 24 January 2014 at 10:55:34 UTC, Russel Winder wrote: Probably want to use a virtualenv for this rather than install into the base installation you can also do python setup.py build python runtests.py -b hello It needs to work for Python 3.3 as well! try the latest commit

Re: Shared library: loading doesn't call shared static this

2013-12-08 Thread Ellery Newcomer
On Sunday, 8 December 2013 at 10:31:32 UTC, Mathias LANG wrote: Thank you, and yazd, it did the trick. May I ask why I don't want to call it multiple time though ? From the sentence If the runtime was already successfully initialized this returns true., I though this was handled in some way.

Re: how to compose delegate type

2013-12-08 Thread Ellery Newcomer
On Sunday, 8 December 2013 at 00:43:51 UTC, Jesse Phillips wrote: What is wrong with the current template which returns an immutable delegate type? It still store you're immutable member function. It composes the wrong type. It composes a type that has different constness than the target

Re: Shared library: loading doesn't call shared static this

2013-12-07 Thread Ellery Newcomer
On Saturday, 7 December 2013 at 20:11:15 UTC, Mathias LANG wrote: afaik, druntime does not officially support the C main, D shared library use case yet. If you have only 1 D shared library, you can insert calls to rt_init and rt_term into shared lib constructors/dtors with gcc. This has

Re: how to compose delegate type

2013-12-07 Thread Ellery Newcomer
On Saturday, 7 December 2013 at 19:36:50 UTC, Jesse Phillips wrote: This declaration doesn't make sense to me: string a() immutable { return 1; } http://dlang.org/class.html#member-functions

Re: how to compose delegate type

2013-12-06 Thread Ellery Newcomer
On 12/05/2013 09:33 PM, Jesse Phillips wrote: I don't think I understand what you mean: this code illustrates it: class Z { string a() immutable { return 1; } string b() { return 2; } } template F(t) { alias immutable(t) F; } alias typeof(Z.init.a)

how to compose delegate type

2013-12-05 Thread Ellery Newcomer
how do I construct F!(T) to yield void delegate() immutable when T is void delegate() ? [its been a long day]

Re: PyD status on fedora 19?

2013-11-29 Thread Ellery Newcomer
On Wednesday, 27 November 2013 at 16:37:36 UTC, Neal Becker wrote: Just trying PyD on fedora 19 x86_64. I install ldc (and friends) using yum. Then I did hg clone https://bitbucket.org/ariovistus/pyd Now after python setup.py install --user, I go to try hello:  [nbecker@nbecker7 hello]$

Re: PyD status on fedora 19?

2013-11-29 Thread Ellery Newcomer
On Saturday, 30 November 2013 at 05:51:43 UTC, Ellery Newcomer wrote: use dmd. ldc doesn't support building shared libraries. also, use 2.063. I think compilation broke in 2.064 for some reason. I plan on fixing this next week.

Re: Need help making minimal bare metal ARM Cortex-M D program

2013-11-24 Thread Ellery Newcomer
On 11/24/2013 06:21 AM, Johannes Pfau wrote: Am Sun, 24 Nov 2013 14:19:43 +0100 schrieb Mike n...@none.com: On Sunday, 24 November 2013 at 12:53:42 UTC, Iain Buclaw wrote: On Sunday, 24 November 2013 at 12:43:01 UTC, Mike wrote: I am very new to D, but I finally got my toolchain compiled and

core.sys.posix.termios

2013-11-23 Thread Ellery Newcomer
is there any particular reason it is missing B115200 and friends?

Re: Red-Black tree storing color without additional memory requirements

2013-11-20 Thread Ellery Newcomer
On 11/20/2013 06:50 AM, bearophile wrote: safety0ff: Since the GC supports interior pointers, I think you can justify using the least significant bits as long as the size and alignment of the pointed object guarantee that the pointer + tag will always lie inside the memory block. From:

Re: bitwise operation and type

2013-11-20 Thread Ellery Newcomer
On 11/20/2013 11:21 PM, bioinfornatics wrote: why this fail http://www.dpaste.dzfl.pl/a6d6acf4 as with c, most of the integer operators return int for integral types smaller than int. also, this is a case where a += b does something different than a = a + b i guess the former

Re: Fedora RPMs

2013-11-19 Thread Ellery Newcomer
On 11/19/2013 12:14 AM, Dejan Lekic wrote: by gum, I think you did it right too. I can build a shared lib straight out of the box. Well, unittests seem not to be running, and I'm sure they were a release or two ago. we'll see. I did not check unittests to be honest, will do that later.

Re: DIP 50 - AST macros

2013-11-19 Thread Ellery Newcomer
On 11/18/2013 11:21 AM, Kapps wrote: On Monday, 18 November 2013 at 16:03:54 UTC, IgorStepanov wrote: it can't be used to generate new code. Sure it can. Generate lambda expression tree; invoke Compile(). You just can't rewrite existing code.

Re: Fedora RPMs

2013-11-18 Thread Ellery Newcomer
On 11/18/2013 05:11 PM, Dejan Lekic wrote: Hello everybody. I have just committed few changes to https://www.gitorious.org/dejan- fedora that allow you to build functional RPMs on your Fedora 19 systems. I will aim for now to support F19, F20, EL5 and EL6. If someone needs support for something

Re: (Linux) Which compilers should be working now with shared libraries?

2013-11-17 Thread Ellery Newcomer
On 11/16/2013 02:40 PM, qznc wrote: On Saturday, 16 November 2013 at 13:00:54 UTC, Martin Nowak wrote: On Friday, 15 November 2013 at 20:17:38 UTC, Marco Leise wrote: Oops, this was answered with not ready yet a few topics earlier. Ok, then static D libs only for now. That applies only to

Re: DIP 50 - AST macros

2013-11-17 Thread Ellery Newcomer
On 11/17/2013 11:41 AM, Simen Kjærås wrote: Source is attached. I hope God forgives me. I suppose you'd have to do something like x.Where(OR( NOT(Args.thing = thing), Args.sing = sing)) for nesting and negation and all that. I'd wait for walter to relax the restrictions on ==, , etc

Re: DIP 50 - AST macros

2013-11-13 Thread Ellery Newcomer
On Wednesday, 13 November 2013 at 10:51:48 UTC, Simen Kjærås wrote: On 12.11.2013 18:53, Ellery Newcomer wrote: It's perfectly possible in D to make this work: hey, cool impl *comprehends code* I mean Ewww I *can* make that work. I'm not going to. -- Simen I concur with the second

Re: DIP 50 - AST macros

2013-11-12 Thread Ellery Newcomer
On 11/12/2013 06:38 AM, John Colvin wrote: On Tuesday, 12 November 2013 at 13:50:49 UTC, Jacob Carlborg wrote: auto person = Person.where(e = e.name == John); Translates to: select * from person where name = 'John' for those of us entirely unfamiliar with linq, what is this supposed to do?

Re: DIP 50 - AST macros

2013-11-12 Thread Ellery Newcomer
On Tuesday, 12 November 2013 at 16:14:57 UTC, John Colvin wrote: On Tuesday, 12 November 2013 at 15:21:16 UTC, Ellery Newcomer wrote: On 11/12/2013 06:38 AM, John Colvin wrote: On Tuesday, 12 November 2013 at 13:50:49 UTC, Jacob Carlborg wrote: auto person = Person.where(e = e.name == John

Re: bidirectional map

2013-11-12 Thread Ellery Newcomer
On 11/11/2013 05:14 PM, bioinfornatics wrote: Dear, I am looking for a bidirectional map i.e http://en.wikipedia.org/wiki/Bidirectional_map My seach into D documentation seem to said to me that this structure is not implemented. Something like (for primary idea): struct

Re: DIP 50 - AST macros

2013-11-11 Thread Ellery Newcomer
On 11/10/2013 01:20 PM, Jacob Carlborg wrote: I've been thinking quite long of how AST macros could look like in D. I've been posting my vision of AST macros here in the newsgroup a couple of times already. I've now been asked to create a DIP out of it, so here it is:

Re: DIP 50 - AST macros

2013-11-11 Thread Ellery Newcomer
On 11/11/2013 12:06 PM, deadalnix wrote: On Monday, 11 November 2013 at 19:23:21 UTC, Ellery Newcomer wrote: On 11/10/2013 01:20 PM, Jacob Carlborg wrote: I've been thinking quite long of how AST macros could look like in D. I've been posting my vision of AST macros here in the newsgroup

Re: spurious gc allocation

2013-11-09 Thread Ellery Newcomer
On 11/09/2013 12:35 AM, lomereiter wrote: Indeed, disassembly reveals an allocation (with all three compilers = it's the front-end which generates this crap). ouch. I guess the compiler incorrectly treats { node.value; } as a delegate and copies the node to GC heap. void foo() { int*

Re: spurious gc allocation

2013-11-08 Thread Ellery Newcomer
On 11/08/2013 06:19 AM, Timon Gehr wrote: On 11/08/2013 07:12 AM, Benjamin Thaut wrote: The problem is that you define the struct Thing as a inner struct. struct Thing only exists in the decompiled version, not in the original source. So far it looks like a bug to me. I've reduced it to

spurious gc allocation

2013-11-07 Thread Ellery Newcomer
hello all. I have a class member function that essentially looks like this: ThisNode* _InsertAllBut(int value) { ThisNode* node = MallocAllocator.allocate!(ThisNode)(1); node.value = value; node_count++; return node; } I compile it on x86_64 and the compiler inserts a gc

Re: GCD and Fedora

2013-11-06 Thread Ellery Newcomer
On 09/29/2013 01:46 AM, Russel Winder wrote: Is anyone else interested in getting D technologies into Fedora 19 I am

Re: PyD status and tutorials

2013-09-04 Thread Ellery Newcomer
On Saturday, 31 August 2013 at 15:44:03 UTC, Russel Winder wrote: On Sat, 2013-08-31 at 12:56 +0200, Larry wrote: Ok python3-dev was missing. Are you using Python 3.3? Are you using SCons or Tup for the build? I just tried the SCons build OOTB and it fails to build PyD with DMD :-( Ehh,

Re: DLLs: Cleaning up

2013-07-17 Thread Ellery Newcomer
On 07/17/2013 08:13 AM, Chris wrote: with some nasty surprises as regards obtaining (valid) paths on Windows as opposed to Linux / Mac. Do tell. (Any time and life saving advice about linking to other libraries / DLLs?) Thanks everyone! celerid should be up to the task.

Re: DLLs: Cleaning up

2013-07-15 Thread Ellery Newcomer
On 07/15/2013 07:18 AM, Chris wrote: doesn't work with newer versions of dmd does too. (I'm the maintainer) https://bitbucket.org/ariovistus/pyd

getter/setter in one function (almost)

2013-07-15 Thread Ellery Newcomer
unfortunately, dmd doesn't accept the signature as a valid property. import std.stdio; import std.typecons; struct T { int _i; @property int i(Nullable!int derp = Nullable!int.init) { return _i = derp.isNull ? _i : derp.get; } } void main () { T t; t.i = 1;

Re: DLLs: Cleaning up

2013-07-14 Thread Ellery Newcomer
On 07/11/2013 05:58 AM, Chris wrote: I have a DLL written in D I load into a Python application via ctypes like so: lib = CDLL(mydll) The DLL loads and can be used no problem. However, once the DLL is discarded of by the program, the program either doesn't react or crashes. I still haven't

Re: How can i increase max number recursive template expansions?

2013-07-10 Thread Ellery Newcomer
On 07/07/2013 01:22 PM, John Colvin wrote: On Sunday, 7 July 2013 at 19:55:26 UTC, QAston wrote: I have a large enum in my code (opcodes for a protocol) - using std.traits.EnumMembers gives me a recursive template error. How can i increase max number recursive template expansions? I don't

Re: [Question] Could a function return a list of arguments to call another function?

2013-06-28 Thread Ellery Newcomer
On 06/28/2013 11:07 AM, MattCoder wrote: Hi, I would like to know if it's possible to pass the return of a function as argument to another function as below: import std.stdio; auto foo(int x, int y){ writeln(x, y); return 3, 4; } void main(){ foo(foo(1,2)); } I would like to

Re: how to reflect on function attributes

2013-06-05 Thread Ellery Newcomer
On 06/05/2013 12:02 AM, Jonathan M Davis wrote: On Wednesday, June 05, 2013 08:52:35 lomereiter wrote: This doesn't work when the method is marked as @property. Any idea why is that so? On Wednesday, 5 June 2013 at 02:19:38 UTC, Jonathan M Davis wrote: is(typeof(A.func) == const) - Jonathan

how to reflect on function attributes

2013-06-04 Thread Ellery Newcomer
specifically, const, eg. class A { void func() const { blah } } std.traits.FunctionAttributes makes no mention of it

Re: how to reflect on function attributes

2013-06-04 Thread Ellery Newcomer
On 06/04/2013 07:19 PM, Jonathan M Davis wrote: On Tuesday, June 04, 2013 19:03:47 Ellery Newcomer wrote: specifically, const, eg. class A { void func() const { blah } } std.traits.FunctionAttributes makes no mention of it is(typeof(A.func) == const) - Jonathan M Davis I think

Re: how to reflect on function attributes

2013-06-04 Thread Ellery Newcomer
On 06/04/2013 07:43 PM, Jonathan M Davis wrote: On Tuesday, June 04, 2013 19:23:45 Ellery Newcomer wrote: On 06/04/2013 07:19 PM, Jonathan M Davis wrote: On Tuesday, June 04, 2013 19:03:47 Ellery Newcomer wrote: specifically, const, eg. class A { void func() const { blah

Re: how to reflect on function attributes

2013-06-04 Thread Ellery Newcomer
Ah, you're right. don't know how I screwed that up. Yes I do. I was trying to use typeof(A.func)

Re: dmd 2.063 released with 260 bugfixes and enhancements

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 11:48 AM, Russel Winder wrote: On Sun, 2013-06-02 at 11:23 -0700, Ellery Newcomer wrote: […] who packages your dmd? Normally I would use the one from APT-D, but as this not at 2.063 as yet I used the deb downloaded from the D download page. This necessitates removing all

Re: dmd 2.063 released with 260 bugfixes and enhancements

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 12:56 PM, Russel Winder wrote: On Sun, 2013-06-02 at 12:48 -0700, Ellery Newcomer wrote: […] so we are using the same package. ?? oh. dpkg -L just doesn't list it. Symbolic links aren't in the deb, they are created by the post install script once the shared library

Re: Error after installing DMD v2.063

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 06:47 AM, Gary Willoughby wrote: I've just run: sudo ln -s /usr/lib/x86_64-linux-gnu/libphobos2.so /usr/lib/x86_64-linux-gnu/libphobos2.so.0.63 for now but i've never had to do that before. Is this a problem with the installer? same problem with rpm installer.

Re: Error after installing DMD v2.063

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 02:00 PM, Russel Winder wrote: is non-standard and not compliant. The standard structure should be: libphobos2.so.0.63 the file libphobos2.so.0 a symbolic link to libphobos2.so.0.63 libphobos2.so a symbolic link to libphobos2.so.0 what is libphobos2.0

Re: Error after installing DMD v2.063

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 02:20 PM, Jonathan M Davis wrote: he was talking about making it up to the maintainers to create the various symlinks, which IMHO is unacceptable long term why?

Re: Error after installing DMD v2.063

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 02:51 PM, Russel Winder wrote: On Sun, 2013-06-02 at 14:13 -0700, Ellery Newcomer wrote: On 06/02/2013 02:00 PM, Russel Winder wrote: is non-standard and not compliant. The standard structure should be: libphobos2.so.0.63 the file libphobos2.so.0 a symbolic link

Re: Error after installing DMD v2.063

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 04:12 PM, Russel Winder wrote: On Sun, 2013-06-02 at 16:03 -0700, Ellery Newcomer wrote: […] $ objdump -p libphobos2.so | grep SONAME SONAME libphobos2.so.0.63 Exactly, the actual file should have the fully qualified soname and all other filenames should

Re: Error after installing DMD v2.063

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 03:05 PM, Jonathan M Davis wrote: On Sunday, June 02, 2013 22:52:59 Russel Winder wrote: On Sun, 2013-06-02 at 14:20 -0700, Jonathan M Davis wrote: […] Create a bug report for it. I don't think that Walter realizes what's standard. And this whole problem probably stems from the

Re: Error after installing DMD v2.063

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 04:50 PM, Jonathan M Davis wrote: On Sunday, June 02, 2013 16:42:12 Ellery Newcomer wrote: I thought the packages were generated using the scripts at https://github.com/D-Programming-Language/installer/tree/master/linux which pull the zip files from ftp.digitalmars.com

Re: Error after installing DMD v2.063

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 05:08 PM, Jonathan M Davis wrote: On Sunday, June 02, 2013 16:57:08 Ellery Newcomer wrote: where is this mythical autotester, anyways? Mythical? Oh ye of little faith: http://d.puremagic.com/test-results/ dmd, druntime, and Phobos are built are their unit tests run after every

Re: Error after installing DMD v2.063

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 05:15 PM, Jonathan M Davis wrote: On Sunday, June 02, 2013 17:08:41 Walter Bright wrote: Regardless, the symlink issue alone shows that using the zip file format for *nix is a mistake. Any packages released for *nix needs to support symlinks correctly. - Jonathan M Davis Is it

Re: Error after installing DMD v2.063

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 05:29 PM, Jonathan M Davis wrote: On Sunday, June 02, 2013 17:20:37 Ellery Newcomer wrote: what distro are those linux tests performed on? I don't know. You'd probably have to ask Brad Roberts. - Jonathan M Davis just asking because the rpm script in installer is set up

Re: Error after installing DMD v2.063

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 05:29 PM, Jonathan M Davis wrote: On Sunday, June 02, 2013 17:24:47 Ellery Newcomer wrote: On 06/02/2013 05:15 PM, Jonathan M Davis wrote: On Sunday, June 02, 2013 17:08:41 Walter Bright wrote: Regardless, the symlink issue alone shows that using the zip file format for *nix

Re: Error after installing DMD v2.063

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 05:47 PM, Jonathan M Davis wrote: On Sunday, June 02, 2013 17:43:20 Ellery Newcomer wrote: On 06/02/2013 05:29 PM, Jonathan M Davis wrote: On Sunday, June 02, 2013 17:24:47 Ellery Newcomer wrote: On 06/02/2013 05:15 PM, Jonathan M Davis wrote: On Sunday, June 02, 2013 17:08:41

Re: Error after installing DMD v2.063

2013-06-02 Thread Ellery Newcomer
On 06/02/2013 03:25 PM, Nick Sabalausky wrote: On Sun, 02 Jun 2013 22:52:59 +0100 Russel Winder rus...@winder.org.uk wrote: Sounds like the system for creating distributions is broken. Yea, I'm working on a replacement. do tell

  1   2   3   4   5   6   7   8   >