Re: implementing --version?
On Monday, 21 November 2016 at 19:33:54 UTC, mab-on wrote: I would like to implement a "--version" switch for a command line application. Is there a clever way to do that without using the brain on every build? :) A dub-solution would be nice - but i didnt find it. There is a package in the dub registry called commando (https://code.dlang.org/packages/commando) for that. Example usage can be found at https://github.com/SirTony/commando/tree/master/examples/find. The README file describes the code found in the src folder.
Re: [vibe.d] showing images
On Wednesday, 26 October 2016 at 12:42:09 UTC, Nicholas Wilson wrote: doctype html html body -foreach(s; images) // it doesn't seem to like #{s} or !{s} img(src=s) [...] Inherit from Web interface?
Re: getting started with web server - vibe.d dub giving link error
On Monday, 24 October 2016 at 04:46:34 UTC, aman wrote: On Sunday, 23 October 2016 at 19:23:04 UTC, Karabuta wrote: [...] Oh, I see. Actually it got installed auto-magically during dub installation I guess. Now I installed dmd with the script mention on the dlang download page. curl -fsS https://dlang.org/install.sh | bash -s dmd [...] Make sure you install all the vibe.d dependencies. You can refer to my blog post at https://aberba.github.io/2016/hello-world-app-with-the-vibe.d-web-framework/ under the "Setting up your development environment" section.
Re: getting started with web server - vibe.d dub giving link error
On Sunday, 23 October 2016 at 14:53:48 UTC, aman wrote: On Saturday, 22 October 2016 at 17:23:58 UTC, Karabuta wrote: [...] This time i started out with a fresh Ubuntu server and followed instructions on the blog. Here's output. Please help:- /usr/lib/gcc/x86_64-linux-gnu/5/include/d/core/atomic.d:1381:13: error: static assert "Invalid template type specified." static assert(0, "Invalid template type specified."); ^ ../.dub/packages/vibe-d-0.7.29/source/vibe/http/server.d:1388:51: note: instantiated from here: atomicLoad!(cast(MemoryOrder)5, shared(HTTPServerContext)[]) else return cast(HTTPServerContext[])atomicLoad(g_contexts); ^ gdc failed with exit code 1. I used DMD compiler for the tutorial, you are using GCC which might be the problem. GCC compiler seems too outdated. Try using DMD
Re: getting started with web server - vibe.d dub giving link error
On Saturday, 22 October 2016 at 17:21:45 UTC, Karabuta wrote: On Saturday, 22 October 2016 at 14:50:14 UTC, aman wrote: I just started on vibe.d on fedora and the experience is not pretty getting hello-world running. Please help. Below are the details. [...] I wrote a blog post at https://aberba.gtihub.io which has Fedora users covered. But somehow GitHub pages is not working so you can find it here too https://github.com/aberba/aberba.github.io/blob/master/_posts/2016-08-20-hello-world-app-with-the-vibe.d-web-framework.md Sorry for the typo, blog link is rather https://aberba.github.io/#blog
Re: getting started with web server - vibe.d dub giving link error
On Saturday, 22 October 2016 at 14:50:14 UTC, aman wrote: I just started on vibe.d on fedora and the experience is not pretty getting hello-world running. Please help. Below are the details. [...] I wrote a blog post at https://aberba.gtihub.io which has Fedora users covered. But somehow GitHub pages is not working so you can find it here too https://github.com/aberba/aberba.github.io/blob/master/_posts/2016-08-20-hello-world-app-with-the-vibe.d-web-framework.md
Re: Render SVG To Display And Update Periodically
On Monday, 17 October 2016 at 07:18:40 UTC, ketmar wrote: On Monday, 17 October 2016 at 07:05:24 UTC, ketmar wrote: On Monday, 17 October 2016 at 02:07:47 UTC, rikki cattermole wrote: [...] 'cmon, you know that i have a working port of NanoSVG! and it works on top of NanoVG, so no toolkit is required. ah... oops, forgot to give some links. ;-) nanovg and nanosvg ports: http://repo.or.cz/iv.d.git/tree/HEAD:/nanovg some demos: http://repo.or.cz/iv.d.git/tree/HEAD:/nanovg_demo to make it actually draw something, i'm using Adam's excellect simpledisplay from here: https://github.com/adamdruppe/arsd fetching color.d and simpledisplay.d is enough, you don't need the whole repository. ;-) it works at least in GNU/Linux and Windows. OSX is not tested. This thing really needs a GitHub repo + documentation after all the hardwork.
Re: Easy sockets - don't exist yet?
On Monday, 26 September 2016 at 23:40:10 UTC, Vincent wrote: Hello, guys! I was very surprised that module 'socketstream' was deprecated. Usually if something become obsolete, there is some perfect replacement! But my digging in Inet and forums gave nothing, but "outdated" examples with 'SocketStream' class. So first question is WHAT Phobos has to replace SocketStream? To avoid unnecessary mail bouncing, I write upfront what I expect from normal Socket implementation (kind of interface) : [...] This is how a usable socket in a standard library should be http://dsfml.com/docs/sockets.html. This is using DSFML (a D bindings to SFML).
Re: Using Libraries
On Wednesday, 21 September 2016 at 16:23:35 UTC, Darren wrote: Also I've been making a bit of a mess in dub apparently. I'm getting: Locally registered package gl3n ~master was not found. Please run "dub remove-local C:\Users\Darren\D stuff\opengl\lib". whenever dub gets used. Then if I run what it says I get: "Missing path to package." Is there a way to return this to a default setting? If you have not changed anything in the dub.json file, then run "dub build" to rebuild the packages OR try clearing the dub cache and rebuild. I'm not really familiar with C++ - D bindings (I never wrote C++ code beyond printing a helloworld to the screen). The How To tutorials at https://wiki.dlang.org/Tutorials may help you with bindings and linking process.
Re: Using Libraries
On Tuesday, 20 September 2016 at 15:38:55 UTC, Darren wrote: On Tuesday, 20 September 2016 at 15:07:53 UTC, rikki cattermole wrote: Ok lets start at the very beginning... I think I need to start before that, haha. I might need more of a step-by-step guide. I'm a complete beginner to programming, not just D. I worked through Programming in D, where I was just compiling with dmd, then when I decided to learn OpenGL I seem to be using dub for everything. There have been a few libraries I've wanted to use but couldn't because they didn't have a pre-compiled binary, which is all I've been able to get working through sheer trial and error. Some sites say to use things like CMake and cygwin, but I'm uncomfortable using things I have no idea about. Dub is like a package manager for D (like what npm is to node.js). All dub libraries are hosted at code.dlang.org. When you see a library at code.dlang.org you want to use, you could either type "dub install packagename" whilst in the dub project ROOT or specify dependencies in the dub.json file. You can then run "dub run" which will take care of fetching and building dependencies/libraries from code.dlang.org (including linking and running the binary). For example, there is a web framework called vibe.d. If I want to use vide.d, I can specify dependencies as; dependencies: { "vide-d":"^0.7.29" } In my app.d file (which is available for any dub project created using "dub init projectname") I can import vibe.d using; import vide.d; void main() { ... } I can now compile and run the program with "dub run" or "dub build" to only build and link without running.
Re: What blogs about D do you read?
On Monday, 19 September 2016 at 19:29:25 UTC, A D dev wrote: On Monday, 19 September 2016 at 17:42:51 UTC, A D dev wrote: Hi list, What blogs about D do you read? To be more clear: - what blogs that include posts on D, would you recommend to a D beginner? Thanks. I have one here on Vibe.d for beginners https://laberba.github.io/2016/hello-world-app-with-the-vibe.d-web-framework/ I will be writing more for-beginners blogs in the coming few weeks.
Hosting a vibe.d website
Hello community, I usually host PHP websites for clients using shared hosting services but I'm not familiar with hosting compiled programming language websites. What processes are involved hosting a vibe.d website developed locally on a web server (shared hosting plan). And what hosting services/packages are available for that?
Re: Why D isn't the next "big thing" already
On Tuesday, 26 July 2016 at 15:11:00 UTC, llaine wrote: Hi guys, I'm using D since a few month now and I was wondering why people don't jump onto it that much and why it isn't the "big thing" already. Everybody is into javascript nowadays, but IMO even for doing web I found Vibe.d more interesting and efficient than node.js for example. I agree that you have to be pragmatic and choose the right tools for the right jobs but I would be interested to have other opinion on thoses questions. I think we need more frameworks like vibe.d to build things with them. Currently there is not much so only a class of programmers will find the language useful. Another thing is that the language is not marketed well enough. Someone need to handle marketing of the language, like real marketing. Most people are still unaware of D.
Re: Game Development Using D
On Saturday, 21 May 2016 at 15:53:18 UTC, David wrote: Hi, I want to try to create a game using D. I'm a complete newbie though (other than having C/C++ experience). Where would I start? Does D have an openGL binding? I am assuming I'll need to leverage a good amount C APIs? Any list of these that would be useful it a game setting? Obviously this all depends on *how* much work I want to do. Ideally, I'd like a collection of tools that will get me roughly the equivalent of what XNA provides. If you don't know much OpenGL, go for DSFML https://github.com/Jebbs/DSFML
Re: Where do I learn to use GtkD
On Monday, 14 March 2016 at 03:46:02 UTC, Gerald wrote: On Sunday, 13 March 2016 at 19:53:35 UTC, karabuta wrote: On Sunday, 13 March 2016 at 19:34:36 UTC, WebFreak001 wrote: and in the (not quite complete) documentation you can find widgets you might want to use. Its a great place for getting ideas on which widgets to use imo. http://api.gtkd.org/src/gtk/AboutDialog.html That thing really need some work to make it consumable :) I contributed a script (makeddocs.sh) to generate the documentation in ddox instead of candydocs, ddox is miles better then candydocs and using it is way more efficient IMHO. Where can I find and use?
Using ffmpeg in command line with D
Hi all, I'm trying to convert an array of video filenames to another format using spawnProcess() from std.process. I want to convert all files in sequence with the command "ffmpeg -i filename.mp4 -o outputfile.webm" where process will be run one process after the other. I am new to this kind of multimedia stuff and all this is currently theoretical. Will this work and is it the right approach used by video convertor front-ends?
Re: Where do I learn to use GtkD
On Sunday, 13 March 2016 at 19:34:36 UTC, WebFreak001 wrote: On Sunday, 13 March 2016 at 19:28:57 UTC, karabuta wrote: Any help on where I can get better leaning materials(GtkD)? Repo, blogs post, etc please there isn't much about GtkD specificly, but as a start there is this: https://sites.google.com/site/gtkdtutorial/ Funny thing is that I just found that and was about to post it :) Thanks I think the closest are GTK# and the one for Vala. I will do that right away :) But gtkd is just a nice wrapper for gtk. I'm not really someone who can write tutorials but you or someone else could make some tutorials for it. Might attract more people. Great idea. I thinks I will just keep my code and use it as a guide/tutorial in my repo just like the pygtk book. and in the (not quite complete) documentation you can find widgets you might want to use. Its a great place for getting ideas on which widgets to use imo. http://api.gtkd.org/src/gtk/AboutDialog.html That thing really need some work to make it consumable :)
Where do I learn to use GtkD
Gtk3 from python3 has got I nice book with examples that are not so advanced but enough to get you doing real work(from a beginner point of view). GtkD seem to have changed the API structure compared to python3 Gtk3 and the demo examples just "show-off" IMO :). The documentation is really^ not good :) Any help on where I can get better leaning materials(GtkD)? Repo, blogs post, etc please
Re: Where to go after "Programming in D"
On Wednesday, 2 March 2016 at 01:14:15 UTC, tsbockman wrote: On Tuesday, 1 March 2016 at 17:21:16 UTC, David DeWitt wrote: On Tuesday, 1 March 2016 at 16:50:12 UTC, karabuta wrote: I am aiming to become a hardcore and better coder(quality code) than you :) Please suggest. I'd probably skim thru the Language Reference and Phobos. Just to add to this - the quality and style of the code in Phobos varies greatly from module to module, mostly as a function of age. Many of the older Phobos modules were designed before anyone really knew how to use D2 properly. The newer modules are generally of high quality and reflect a more mature understanding of the language; I strongly suggest surveying the code base as a whole before studying any one module too closely - otherwise you might pick up some bad habits from the more out-dated parts of Phobos. Also, if you're looking for examples of good, idiomatic code, stay away from DMD (which was only recently converted to D, and still contains many artifacts of its C++ heritage) and D runtime, which hasn't benefited from the same high level of attention and continual reworking as Phobos. thanks for the tip :)
Re: Where to go after "Programming in D"
On Tuesday, 1 March 2016 at 17:53:27 UTC, David DeWitt wrote: On Tuesday, 1 March 2016 at 17:21:16 UTC, David DeWitt wrote: On Tuesday, 1 March 2016 at 16:50:12 UTC, karabuta wrote: I am almost done with the "programming in D" book. Where will you suggest a go from there. My current focus is on network programming, database systems, data manipulation and software architectures for database related apps(mostly Linux platforms with D). I am aiming to become a hardcore and better coder(quality code) than you :) Please suggest. Forgot to add: https://github.com/PhilippeSigaud/D-templates-tutorial Big thanks
Where to go after "Programming in D"
I am almost done with the "programming in D" book. Where will you suggest a go from there. My current focus is on network programming, database systems, data manipulation and software architectures for database related apps(mostly Linux platforms with D). I am aiming to become a hardcore and better coder(quality code) than you :) Please suggest.
Compiling DOtherSide
Well, I use Ubuntu 14.04 and I have managed to get qt5.5 at my /opt/qt55 since the default(usr/lib) directory is occupied by qt4. Since DOtherSide looks for qt5 from usr/lib, how do I change it to now point to /opt/qt55? This is the setup in /opt/qt55 karabuta@mx:/opt/qt55$ ls bin icudtl.dat lib phrasebooks qtwebengine_resources.pak doc imports libexec plugins share examples include mkspecs qml translations and DOtherSide is at /home/DOtherSide karabuta@mx:~/DOtherSide$ ls build CHANGELOG.md CMakeLists.txt LICENSE README.md src test
Re: tkd not linking
On Tuesday, 15 September 2015 at 17:46:42 UTC, Adam D. Ruppe wrote: On Tuesday, 15 September 2015 at 17:37:40 UTC, karabuta wrote: Just incase, I have install version 8.6 of the Tcl/Tk libraries Did you get the development version? sudo apt-get install tk-dev or possibly sudo apt-get install tk8.6-dev should do it. I'm not actually sure if that's required for this (I've never used it) but it might be. What is the problem. And how is tcltk different from tkd in the first place? tkd is just a D wrapper for the library. Thanks Adam, sudo apt-get install tk-dev worked. Hurray! lets start GUI programming in D!
tkd not linking
I have tried several times to compile tkd using dub but I keep getting this message: Linking... /usr/bin/ld: cannot find -ltcl /usr/bin/ld: cannot find -ltk collect2: error: ld returned 1 exit status --- errorlevel 1 FAIL .dub/build/application-debug-linux.posix-x86-dmd_2068-4989C12BA459945625492BF92EAC638A/ tkdapps executable Error executing command run: dmd failed with exit code 1. I use Ubuntu 14.04 x32. Here is the dub.json file content { "name": "tkdapps", "description": "A minimal D application.", "copyright": "Copyright © 2015, karabuta", "authors": ["karabuta"], "dependencies": { "tcltk": "8.6.5", "tkd": "1.1.4" } } Just incase, I have install version 8.6 of the Tcl/Tk libraries What is the problem. And how is tcltk different from tkd in the first place?