digitalmars.D.learn - Dub package with C code
- Sebastiaan Koppe (16/16) Sep 23 2015 I have just created bindings for libxlsxwriter, an c library for
- Rikki Cattermole (4/20) Sep 23 2015 Is libxlsxwriter available in the systems package manager?
- Sebastiaan Koppe (4/6) Sep 23 2015 Pacman says no.
- Rikki Cattermole (3/8) Sep 23 2015 I've taken a look at it.
- Sebastiaan Koppe (4/17) Sep 23 2015 Because I want to focus on the product I am building right now,
- Edwin van Leeuwen (5/7) Sep 24 2015 You could try including the c source in your repo and add
- Sebastiaan Koppe (7/11) Sep 24 2015 I want to use dub.
- Atila Neves (4/10) Sep 24 2015 Yes.
- Sebastiaan Koppe (7/11) Sep 24 2015 That is nice.
- Adam D. Ruppe (5/7) Sep 24 2015 We should write a C to D converter. We have htod but I'm talking
- Sebastiaan Koppe (7/15) Sep 24 2015 It would be really cool to have that. But aren't there a lot of
- Laeeth Isharc (5/21) Sep 24 2015 nice work!
- Sebastiaan Koppe (5/8) Sep 24 2015 To be honest it took me 2 hours, starting from git clone
- Laeeth Isharc (13/21) Sep 24 2015 Great! I think it's clear more blog posts will be something that
- Sebastiaan Koppe (5/12) Sep 24 2015 I meant if there is already a place where I can upload my post
- tired_eyes (4/6) Sep 25 2015 OT:
- bachmeier (3/9) Sep 25 2015 I've long agreed with that. Now that we have "This Week in D" we
- Adam D. Ruppe (6/12) Sep 25 2015 FYI, if you guys want to set something up for multiple
- bachmeier (11/16) Sep 25 2015 That's a possibility too, but I like the idea of you continuing
- bachmeier (2/4) Sep 25 2015 Should I create a new thread to open discussion on the topic?
- Laeeth Isharc (2/6) Sep 25 2015 yes!
- Laeeth Isharc (9/15) Sep 25 2015 +1
- Andre Polykanine via Digitalmars-d-learn (8/8) Sep 25 2015 Hello tired_eyes,
- bachmeier (6/33) Sep 25 2015 It seems this would be good content for the wiki. If we put this
I have just created bindings for libxlsxwriter, an c library for creating excel files. Used the htod tool to do most of the work, and only had to adjust some things - mainly because libxlsxwriter uses data structures written in macro's. Right now I am making a dub package and I would like to aim for convenience for end-users (read: me). Therefor I decided to include the compiled static library inside the package. I only use Linux 64-bit myself, but this is obviously limiting for other people. The other option I had was to include the whole c code, depend on gcc or clang, and have dub (somehow) first build libxlsxwriter. But that seemed a bit too much... Another option would be to require end-users to build libxlsxwriter themselves. What do you guys recommend?
Sep 23 2015
On 24/09/15 2:43 PM, Sebastiaan Koppe wrote:I have just created bindings for libxlsxwriter, an c library for creating excel files. Used the htod tool to do most of the work, and only had to adjust some things - mainly because libxlsxwriter uses data structures written in macro's. Right now I am making a dub package and I would like to aim for convenience for end-users (read: me). Therefor I decided to include the compiled static library inside the package. I only use Linux 64-bit myself, but this is obviously limiting for other people. The other option I had was to include the whole c code, depend on gcc or clang, and have dub (somehow) first build libxlsxwriter. But that seemed a bit too much... Another option would be to require end-users to build libxlsxwriter themselves. What do you guys recommend?Is libxlsxwriter available in the systems package manager? If so, I would just link against that. Preferably the shared library. Let e.g. Windows users figure theirs out.
Sep 23 2015
On Thursday, 24 September 2015 at 04:17:14 UTC, Rikki Cattermole wrote:Is libxlsxwriter available in the systems package manager?Pacman says no.Let e.g. Windows users figure theirs out.libxlsxwriter is not supported on windows. Which is kind-of funny.
Sep 23 2015
On 24/09/15 5:51 PM, Sebastiaan Koppe wrote:On Thursday, 24 September 2015 at 04:17:14 UTC, Rikki Cattermole wrote:I've taken a look at it. Why not just port it?Is libxlsxwriter available in the systems package manager?Pacman says no.Let e.g. Windows users figure theirs out.libxlsxwriter is not supported on windows. Which is kind-of funny.
Sep 23 2015
On Thursday, 24 September 2015 at 06:00:50 UTC, Rikki Cattermole wrote:On 24/09/15 5:51 PM, Sebastiaan Koppe wrote:Because I want to focus on the product I am building right now, not on side-projects.On Thursday, 24 September 2015 at 04:17:14 UTC, Rikki Cattermole wrote:I've taken a look at it. Why not just port it?Is libxlsxwriter available in the systems package manager?Pacman says no.Let e.g. Windows users figure theirs out.libxlsxwriter is not supported on windows. Which is kind-of funny.
Sep 23 2015
On Thursday, 24 September 2015 at 06:21:02 UTC, Sebastiaan Koppe wrote:Because I want to focus on the product I am building right now, not on side-projects.You could try including the c source in your repo and add preBuildCommands to the dub config which builds the static library. Alternatively you could use reggea to build both.
Sep 24 2015
On Thursday, 24 September 2015 at 08:35:40 UTC, Edwin van Leeuwen wrote:Alternatively you could use reggea to build both.I want to use dub. Simply because of code.dlang.org. Or can reggae also pull packages from there?You could try including the c source in your repo and add preBuildCommands to the dub config which builds the static library.preBuildCommands seems to be the way to go. Thank you all.
Sep 24 2015
On Thursday, 24 September 2015 at 11:38:08 UTC, Sebastiaan Koppe wrote:On Thursday, 24 September 2015 at 08:35:40 UTC, Edwin van Leeuwen wrote:Yes. AtilaAlternatively you could use reggea to build both.I want to use dub. Simply because of code.dlang.org. Or can reggae also pull packages from there?
Sep 24 2015
On Friday, 25 September 2015 at 01:36:11 UTC, Atila Neves wrote:On Thursday, 24 September 2015 at 11:38:08 UTC, Sebastiaan Koppe wrote:That is nice. I look at reggae once or twice. It looked like a lot of bootstrapping vs. `dub init && dub build`. And to be honest, I couldn't make immediate sense of the api. Is there any small example that builds some d code (including pulling deps)?Or can reggae also pull packages from there?Yes.
Sep 24 2015
On Thursday, 24 September 2015 at 06:21:02 UTC, Sebastiaan Koppe wrote:Because I want to focus on the product I am building right now, not on side-projects.We should write a C to D converter. We have htod but I'm talking the whole source of it. That might be useful for times like this. But I have other things to do too...
Sep 24 2015
On Thursday, 24 September 2015 at 12:55:12 UTC, Adam D. Ruppe wrote:On Thursday, 24 September 2015 at 06:21:02 UTC, Sebastiaan Koppe wrote:It would be really cool to have that. But aren't there a lot of corner cases that require manual intervention? Having said that, htod has been invaluable. And if I decide to port it, ctod will be invaluable as well, even though it won't get it 100% right.Because I want to focus on the product I am building right now, not on side-projects.We should write a C to D converter. We have htod but I'm talking the whole source of it. That might be useful for times like this. But I have other things to do too...
Sep 24 2015
On Thursday, 24 September 2015 at 02:43:20 UTC, Sebastiaan Koppe wrote:I have just created bindings for libxlsxwriter, an c library for creating excel files. Used the htod tool to do most of the work, and only had to adjust some things - mainly because libxlsxwriter uses data structures written in macro's. Right now I am making a dub package and I would like to aim for convenience for end-users (read: me). Therefor I decided to include the compiled static library inside the package. I only use Linux 64-bit myself, but this is obviously limiting for other people. The other option I had was to include the whole c code, depend on gcc or clang, and have dub (somehow) first build libxlsxwriter. But that seemed a bit too much... Another option would be to require end-users to build libxlsxwriter themselves. What do you guys recommend?nice work! worth a little blog post on the experience so others can be inspired by and benefit from yours?
Sep 24 2015
On Thursday, 24 September 2015 at 18:19:49 UTC, Laeeth Isharc wrote:nice work!To be honest it took me 2 hours, starting from git cloneworth a little blog post on the experience so others can be inspired by and benefit from yours?I would be happy to write something. Any particular blog platform? Or do I first have to roll out my own?
Sep 24 2015
On Friday, 25 September 2015 at 01:48:57 UTC, Sebastiaan Koppe wrote:On Thursday, 24 September 2015 at 18:19:49 UTC, Laeeth Isharc wrote:Great! I think it's clear more blog posts will be something that helps open up awareness to value of D. Little things cumulatively make a big difference, and you'll more than get back the effort invested one way and another over time. Blog platform - I guess nothing wrong with wordpress etc. I am between platforms right now. I just don't want to deal with wordpress any more, and haven't yet picked something I like better. Something like Nikola and dicebot's mood with an nginx proxy seems appealing. Mood is v nice but not quite mature / stable yet. I like idea of everything in D so it's easy to understand and extend as you wish.nice work!To be honest it took me 2 hours, starting from git cloneworth a little blog post on the experience so others can be inspired by and benefit from yours?I would be happy to write something. Any particular blog platform? Or do I first have to roll out my own?
Sep 24 2015
On Friday, 25 September 2015 at 06:04:09 UTC, Laeeth Isharc wrote:Blog platform - I guess nothing wrong with wordpress etc. I am between platforms right now. I just don't want to deal with wordpress any more, and haven't yet picked something I like better. Something like Nikola and dicebot's mood with an nginx proxy seems appealing. Mood is v nice but not quite mature / stable yet. I like idea of everything in D so it's easy to understand and extend as you wish.I meant if there is already a place where I can upload my post to. Something like blog.dlang.org I might go with mood. But I would probably dockerize it and run it behind jwilder/nginx-proxy.
Sep 24 2015
I meant if there is already a place where I can upload my post to. Something like blog.dlang.orgOT: Once again, I'm absolutely sure tha D should have an official blog! Forums can't replace blogs, forums are for discussions, not for content presentation.
Sep 25 2015
On Friday, 25 September 2015 at 12:25:52 UTC, tired_eyes wrote:I've long agreed with that. Now that we have "This Week in D" we have a regular source for content.I meant if there is already a place where I can upload my post to. Something like blog.dlang.orgOT: Once again, I'm absolutely sure tha D should have an official blog! Forums can't replace blogs, forums are for discussions, not for content presentation.
Sep 25 2015
On Friday, 25 September 2015 at 14:15:20 UTC, bachmeier wrote:On Friday, 25 September 2015 at 12:25:52 UTC, tired_eyes wrote:FYI, if you guys want to set something up for multiple contributors like a traditional blog, I'm willing to move TWID do it. I've been kinda wanting to do a blog thing but I just haven't brought myself to set anything up.Once again, I'm absolutely sure tha D should have an official blog! Forums can't replace blogs, forums are for discussions, not for content presentation.I've long agreed with that. Now that we have "This Week in D" we have a regular source for content.
Sep 25 2015
On Friday, 25 September 2015 at 14:24:36 UTC, Adam D. Ruppe wrote:FYI, if you guys want to set something up for multiple contributors like a traditional blog, I'm willing to move TWID do it. I've been kinda wanting to do a blog thing but I just haven't brought myself to set anything up.That's a possibility too, but I like the idea of you continuing to do what you've been doing, and then on the blog there is an announcement of the new issue of TWID along with a short discussion and a link to the whole thing. d.announce is pretty busy these days. I've always felt those posts were more appropriate for an official blog. As would things like the subject of this thread, rather than letting it get buried in the forum. First issue would be getting approval from Walter and Andrei. Second would be finding someone that knows how to do it.
Sep 25 2015
On Friday, 25 September 2015 at 15:06:41 UTC, bachmeier wrote:First issue would be getting approval from Walter and Andrei. Second would be finding someone that knows how to do it.Should I create a new thread to open discussion on the topic?
Sep 25 2015
On Friday, 25 September 2015 at 15:08:00 UTC, bachmeier wrote:On Friday, 25 September 2015 at 15:06:41 UTC, bachmeier wrote:yes!First issue would be getting approval from Walter and Andrei. Second would be finding someone that knows how to do it.Should I create a new thread to open discussion on the topic?
Sep 25 2015
On Friday, 25 September 2015 at 12:25:52 UTC, tired_eyes wrote:+1 It also encourages people to write guest pieces, because you know the work is not wasted as it reaches a broader audience. Also, as regards existing D blogs - Planet D was a great start but is a little bit tired. Some blogs are now defunct and haven't been updated for years. It would be great to still have a link to them, but they shouldn't be all mixed up - current and stale.I meant if there is already a place where I can upload my post to. Something like blog.dlang.orgOT: Once again, I'm absolutely sure tha D should have an official blog! Forums can't replace blogs, forums are for discussions, not for content presentation.
Sep 25 2015
Hello tired_eyes, tevDdl> Once again, I'm absolutely sure tha D should have an official tevDdl> blog! Forums can't replace blogs, forums are for discussions, not tevDdl> for content presentation. +1 on this. -- With best regards from Ukraine, Andre
Sep 25 2015
On Thursday, 24 September 2015 at 18:19:49 UTC, Laeeth Isharc wrote:On Thursday, 24 September 2015 at 02:43:20 UTC, Sebastiaan Koppe wrote:It seems this would be good content for the wiki. If we put this sort of thing there, others will start to look at the wiki, and Google will send them there. That wouldn't prevent anyone from also posting the same content on their own blog.I have just created bindings for libxlsxwriter, an c library for creating excel files. Used the htod tool to do most of the work, and only had to adjust some things - mainly because libxlsxwriter uses data structures written in macro's. Right now I am making a dub package and I would like to aim for convenience for end-users (read: me). Therefor I decided to include the compiled static library inside the package. I only use Linux 64-bit myself, but this is obviously limiting for other people. The other option I had was to include the whole c code, depend on gcc or clang, and have dub (somehow) first build libxlsxwriter. But that seemed a bit too much... Another option would be to require end-users to build libxlsxwriter themselves. What do you guys recommend?nice work! worth a little blog post on the experience so others can be inspired by and benefit from yours?
Sep 25 2015