Re: Blog post on calling C from Python via D

2020-03-01 Thread Panke via Digitalmars-d-announce

On Wednesday, 26 February 2020 at 17:37:17 UTC, jmh530 wrote:

On Wednesday, 26 February 2020 at 16:17:06 UTC, Panke wrote:

[snip]

If you had an RSS feed, I would subscribe. Wasn't there a 
planet D in the past?


I've been subscribed on feedly without any issues. I can't 
recall what I actually did to subscribe as I can't seem to 
replicate it, but you can try

https://atilaoncode.blog/feed/
Can't say for sure with other RSS readers.


That works great, thanks!


Re: Blog post on calling C from Python via D

2020-02-27 Thread Atila Neves via Digitalmars-d-announce

On Wednesday, 26 February 2020 at 20:57:53 UTC, H. S. Teoh wrote:
On Wed, Feb 26, 2020 at 08:45:31PM +, Atila Neves via 
Digitalmars-d-announce wrote:

On Wednesday, 26 February 2020 at 17:39:14 UTC, jmh530 wrote:
> On Wednesday, 26 February 2020 at 14:51:06 UTC, Atila Neves 
> wrote:

> > [snip]
> > 
> > A lot of the comments were about how stupid I was for not 
> > just using ctypes or cffi. I tried today and both of them 
> > are horrible. As I say in the blog post below, either they 
> > didn't read the article (people on the internet commenting 
> > on things they didn't even read?  Shock! Horror!) or just 
> > aren't lazy enough.
> > 
> > My followup:
> > 
> > https://atilaoncode.blog/2020/02/26/seriously-just-use-d-to-call-c-from-python/
> 
> I basically just ignored any of the comments about ctypes or 
> cffi having looked at them briefly once like 5-10 years ago 
> and throwing up my hands. But I also throw up my hands a lot!


I didn't know anything about them last week, so I didn't think 
I could reply properly. After looking into them today I just 
shook my head a lot. It's incredible the lengths that people 
go to justifying their pre-existing beliefs. At this point, I 
don't know how to convince the masses if "nanomsg in Python in 
4 lines of code" isn't enough!


Perhaps a side-by-side comparison of how clean the D version 
would look vs how lousy the equivalent ctypes/cffi version is?  
Just a thought.


That was exactly what I was going to do yesterday with cffi and I 
even started writing the code. Midway through I realised how much 
work it was going to be and decided that ain't nobody got time 
for that. Then shook my head vigorously that anyone would dare 
suggest this was "easy" and in any way comparable to what I'd 
shown to be possible.






Re: Blog post on calling C from Python via D

2020-02-26 Thread Ali Çehreli via Digitalmars-d-announce

On 2/26/20 6:51 AM, Atila Neves wrote:


My followup:

https://atilaoncode.blog/2020/02/26/seriously-just-use-d-to-call-c-from-python/ 



Could someone please post this on Reddit and Hacker News. Thanks...

Ali


Re: Blog post on calling C from Python via D

2020-02-26 Thread sarn via Digitalmars-d-announce

On Wednesday, 26 February 2020 at 17:23:51 UTC, Meta wrote:

On Wednesday, 26 February 2020 at 17:11:18 UTC, bachmeier wrote:
There needs to be a variant of "mansplaining" modified for 
Python users.


Agreed, and there also needs to be a variant of prison, 
modified for people who post dumb comments on Hacker News.


Whatever the language, I like the "show me the 
code/graphs/benchmarks/disassembly/data/something/anything" 
approach Atila used in his blog post.


When I wrote a blog post about why C const is practically useless 
for optimisation, I lost count of how many people smugly pointed 
out that const "should" go on the other side of the *, as if that 
made all the difference.  If they actually tried it they'd see it 
makes zero difference because "int * const x" is even less useful 
for optimisation.


Re: Blog post on calling C from Python via D

2020-02-26 Thread H. S. Teoh via Digitalmars-d-announce
On Wed, Feb 26, 2020 at 08:45:31PM +, Atila Neves via 
Digitalmars-d-announce wrote:
> On Wednesday, 26 February 2020 at 17:39:14 UTC, jmh530 wrote:
> > On Wednesday, 26 February 2020 at 14:51:06 UTC, Atila Neves wrote:
> > > [snip]
> > > 
> > > A lot of the comments were about how stupid I was for not just
> > > using ctypes or cffi. I tried today and both of them are horrible.
> > > As I say in the blog post below, either they didn't read the
> > > article (people on the internet commenting on things they didn't
> > > even read?  Shock! Horror!) or just aren't lazy enough.
> > > 
> > > My followup:
> > > 
> > > https://atilaoncode.blog/2020/02/26/seriously-just-use-d-to-call-c-from-python/
> > 
> > I basically just ignored any of the comments about ctypes or cffi
> > having looked at them briefly once like 5-10 years ago and throwing
> > up my hands. But I also throw up my hands a lot!
> 
> I didn't know anything about them last week, so I didn't think I could
> reply properly. After looking into them today I just shook my head a
> lot. It's incredible the lengths that people go to justifying their
> pre-existing beliefs. At this point, I don't know how to convince the
> masses if "nanomsg in Python in 4 lines of code" isn't enough!

Perhaps a side-by-side comparison of how clean the D version would look
vs how lousy the equivalent ctypes/cffi version is?  Just a thought.


T

-- 
If it tastes good, it's probably bad for you.


Re: Blog post on calling C from Python via D

2020-02-26 Thread Atila Neves via Digitalmars-d-announce

On Wednesday, 26 February 2020 at 17:39:14 UTC, jmh530 wrote:
On Wednesday, 26 February 2020 at 14:51:06 UTC, Atila Neves 
wrote:

[snip]

A lot of the comments were about how stupid I was for not just 
using ctypes or cffi. I tried today and both of them are 
horrible. As I say in the blog post below, either they didn't 
read the article (people on the internet commenting on things 
they didn't even read? Shock! Horror!) or just aren't lazy 
enough.


My followup:

https://atilaoncode.blog/2020/02/26/seriously-just-use-d-to-call-c-from-python/


I basically just ignored any of the comments about ctypes or 
cffi having looked at them briefly once like 5-10 years ago and 
throwing up my hands. But I also throw up my hands a lot!


I didn't know anything about them last week, so I didn't think I 
could reply properly. After looking into them today I just shook 
my head a lot. It's incredible the lengths that people go to 
justifying their pre-existing beliefs. At this point, I don't 
know how to convince the masses if "nanomsg in Python in 4 lines 
of code" isn't enough!


Re: Blog post on calling C from Python via D

2020-02-26 Thread jmh530 via Digitalmars-d-announce

On Wednesday, 26 February 2020 at 16:17:06 UTC, Panke wrote:

[snip]

If you had an RSS feed, I would subscribe. Wasn't there a 
planet D in the past?


I've been subscribed on feedly without any issues. I can't recall 
what I actually did to subscribe as I can't seem to replicate it, 
but you can try

https://atilaoncode.blog/feed/
Can't say for sure with other RSS readers.


Re: Blog post on calling C from Python via D

2020-02-26 Thread jmh530 via Digitalmars-d-announce

On Wednesday, 26 February 2020 at 14:51:06 UTC, Atila Neves wrote:

[snip]

A lot of the comments were about how stupid I was for not just 
using ctypes or cffi. I tried today and both of them are 
horrible. As I say in the blog post below, either they didn't 
read the article (people on the internet commenting on things 
they didn't even read? Shock! Horror!) or just aren't lazy 
enough.


My followup:

https://atilaoncode.blog/2020/02/26/seriously-just-use-d-to-call-c-from-python/


I basically just ignored any of the comments about ctypes or cffi 
having looked at them briefly once like 5-10 years ago and 
throwing up my hands. But I also throw up my hands a lot!


Re: Blog post on calling C from Python via D

2020-02-26 Thread Meta via Digitalmars-d-announce

On Wednesday, 26 February 2020 at 17:11:18 UTC, bachmeier wrote:
There needs to be a variant of "mansplaining" modified for 
Python users.


Agreed, and there also needs to be a variant of prison, modified 
for people who post dumb comments on Hacker News.


Re: Blog post on calling C from Python via D

2020-02-26 Thread bachmeier via Digitalmars-d-announce

On Wednesday, 26 February 2020 at 14:51:06 UTC, Atila Neves wrote:
On Wednesday, 19 February 2020 at 16:30:04 UTC, Atila Neves 
wrote:

https://atilaoncode.blog/2020/02/19/want-to-call-c-from-python-use-d/

Discussion elsewhere:

https://www.reddit.com/r/programming/comments/f6agvt/want_to_call_c_from_python_use_d/
https://news.ycombinator.com/item?id=22365166


A lot of the comments were about how stupid I was for not just 
using ctypes or cffi. I tried today and both of them are 
horrible. As I say in the blog post below, either they didn't 
read the article (people on the internet commenting on things 
they didn't even read? Shock! Horror!) or just aren't lazy 
enough.


My followup:

https://atilaoncode.blog/2020/02/26/seriously-just-use-d-to-call-c-from-python/


There needs to be a variant of "mansplaining" modified for Python 
users.


Re: Blog post on calling C from Python via D

2020-02-26 Thread Atila Neves via Digitalmars-d-announce

On Wednesday, 26 February 2020 at 16:17:06 UTC, Panke wrote:
On Wednesday, 26 February 2020 at 14:51:06 UTC, Atila Neves 
wrote:

[...]


Very good read. I my opinion your work with integrating 
different languages with D is the most exciting stuff going on 
in the moment.


If you had an RSS feed, I would subscribe. Wasn't there a 
planet D in the past?


Thanks!

I guess you could either follow me on github, the blog itself, or 
Twitter.


Re: Blog post on calling C from Python via D

2020-02-26 Thread Panke via Digitalmars-d-announce

On Wednesday, 26 February 2020 at 14:51:06 UTC, Atila Neves wrote:
On Wednesday, 19 February 2020 at 16:30:04 UTC, Atila Neves 
wrote:

https://atilaoncode.blog/2020/02/19/want-to-call-c-from-python-use-d/

Discussion elsewhere:

https://www.reddit.com/r/programming/comments/f6agvt/want_to_call_c_from_python_use_d/
https://news.ycombinator.com/item?id=22365166


A lot of the comments were about how stupid I was for not just 
using ctypes or cffi. I tried today and both of them are 
horrible. As I say in the blog post below, either they didn't 
read the article (people on the internet commenting on things 
they didn't even read? Shock! Horror!) or just aren't lazy 
enough.


My followup:

https://atilaoncode.blog/2020/02/26/seriously-just-use-d-to-call-c-from-python/


Very good read. I my opinion your work with integrating different 
languages with D is the most exciting stuff going on in the 
moment.


If you had an RSS feed, I would subscribe. Wasn't there a planet 
D in the past?


Re: Blog post on calling C from Python via D

2020-02-26 Thread Atila Neves via Digitalmars-d-announce

On Wednesday, 19 February 2020 at 16:30:04 UTC, Atila Neves wrote:

https://atilaoncode.blog/2020/02/19/want-to-call-c-from-python-use-d/

Discussion elsewhere:

https://www.reddit.com/r/programming/comments/f6agvt/want_to_call_c_from_python_use_d/
https://news.ycombinator.com/item?id=22365166


A lot of the comments were about how stupid I was for not just 
using ctypes or cffi. I tried today and both of them are 
horrible. As I say in the blog post below, either they didn't 
read the article (people on the internet commenting on things 
they didn't even read? Shock! Horror!) or just aren't lazy enough.


My followup:

https://atilaoncode.blog/2020/02/26/seriously-just-use-d-to-call-c-from-python/


Re: Blog post on calling C from Python via D

2020-02-22 Thread Ernesto Castellotti via Digitalmars-d-announce

On Wednesday, 19 February 2020 at 16:30:04 UTC, Atila Neves wrote:

https://atilaoncode.blog/2020/02/19/want-to-call-c-from-python-use-d/

Discussion elsewhere:

https://www.reddit.com/r/programming/comments/f6agvt/want_to_call_c_from_python_use_d/
https://news.ycombinator.com/item?id=22365166



let's do it for c++ ;-)


Re: Blog post on calling C from Python via D

2020-02-21 Thread Walter Bright via Digitalmars-d-announce

Looking forward to your success there!

On 2/21/2020 3:52 PM, stewart wrote:

This is great!

I've been pushing D in my workplace, which is full of Python programmers and 
this is another good example I can use showing why D rocks. I'm going to 
introduce this and then push hard the line "Now you have D in the build mix why 
bother with C and Python at all?"



Thanks,
Stew




Re: Blog post on calling C from Python via D

2020-02-21 Thread stewart via Digitalmars-d-announce

On Wednesday, 19 February 2020 at 16:30:04 UTC, Atila Neves wrote:

https://atilaoncode.blog/2020/02/19/want-to-call-c-from-python-use-d/

Discussion elsewhere:

https://www.reddit.com/r/programming/comments/f6agvt/want_to_call_c_from_python_use_d/
https://news.ycombinator.com/item?id=22365166


This is great!

I've been pushing D in my workplace, which is full of Python 
programmers and this is another good example I can use showing 
why D rocks. I'm going to introduce this and then push hard the 
line "Now you have D in the build mix why bother with C and 
Python at all?"



Thanks,
Stew


Re: Blog post on calling C from Python via D

2020-02-19 Thread Ali Çehreli via Digitalmars-d-announce

On 2/19/20 8:30 AM, Atila Neves wrote:


https://news.ycombinator.com/item?id=22365166



Awesome!

And thanks for linking directly to the article on ycombinator. If 
they're still penalizing articles for direct links, they should realize 
already that links are a thing on the internet.


Ali