Re: GUI library for DMD 2.090 or DMD 2.091

2020-04-27 Thread Antonio Corbi via Digitalmars-d-learn
On Monday, 27 April 2020 at 11:27:57 UTC, Paulo Pinto wrote: On Sunday, 26 April 2020 at 09:09:04 UTC, Antonio Corbi wrote: On Saturday, 25 April 2020 at 09:30:44 UTC, Paulo Pinto wrote: On Friday, 24 April 2020 at 18:52:55 UTC, Russel Winder wrote: [...] Just curious, how do you handle the

Re: GUI library for DMD 2.090 or DMD 2.091

2020-04-26 Thread Antonio Corbi via Digitalmars-d-learn
On Saturday, 25 April 2020 at 09:30:44 UTC, Paulo Pinto wrote: On Friday, 24 April 2020 at 18:52:55 UTC, Russel Winder wrote: [...] Just curious, how do you handle the whole RC> story in Gtk-rs? For me it made the point that languages with tracing GC or implicit reference counting are

Exporting C APIs from Zig, D, and Nim (seen on youtube)

2020-04-17 Thread Antonio Corbi via Digitalmars-d-announce
Hi all, Don't know if this[1] has been posted before, I've just seen it and seemed interesting. Hope you also like it. Antonio [1] https://www.youtube.com/watch?v=4o_tmccinds=youtu.be

Re: Blog Post #0099: A Special Request

2020-01-23 Thread Antonio Corbi via Digitalmars-d-learn
On Thursday, 23 January 2020 at 12:29:11 UTC, Ron Tarrant wrote: On Thursday, 23 January 2020 at 08:33:39 UTC, Antonio Corbi wrote: https://gitlab.com/amcorbi/dmaurerrose I think this is somewhat related to what te OP was asking for. I'm confused. I was the OP, so I'm not sure who you're

Re: Blog Post #0099: A Special Request

2020-01-23 Thread Antonio Corbi via Digitalmars-d-learn
On Wednesday, 22 January 2020 at 21:22:57 UTC, Ron Tarrant wrote: On Tuesday, 21 January 2020 at 22:12:10 UTC, Antonio Corbi wrote: On Tuesday, 21 January 2020 at 22:06:30 UTC, Ron Tarrant wrote: Do you still have the Maurer Rose example? I had to look this up. I'd never heard of it

Re: Blog Post #0099: A Special Request

2020-01-21 Thread Antonio Corbi via Digitalmars-d-learn
On Tuesday, 21 January 2020 at 22:06:30 UTC, Ron Tarrant wrote: On Tuesday, 21 January 2020 at 18:57:47 UTC, Jan Hönig wrote: I would also like to request a future blog post about animation. I know you have done that in the past, but i am thinking of some animation triggered by user input

Re: The Future of the GtkDcoding Blog

2019-11-22 Thread Antonio Corbi via Digitalmars-d-announce
On Friday, 22 November 2019 at 10:42:33 UTC, Ron Tarrant wrote: On Thursday, 21 November 2019 at 18:56:25 UTC, SashaGreat wrote: Second the timing, at least today "everything is WEB APP", and I'm not saying desktop is dead applications is dead, but most of my current work is converting to

Re: Unexpected aliasing

2019-11-11 Thread Antonio Corbi via Digitalmars-d-learn
On Monday, 11 November 2019 at 19:17:37 UTC, Bastiaan Veelo wrote: Recently I got my first surprise with our use of D. The symptom was that two local variables in two different functions appeared to be sharing data. A simplified example is shown below (the original was machine translated

Re: Blog Post #79: Notebook, Part III - Customized Tabs, Part I

2019-10-16 Thread Antonio Corbi via Digitalmars-d-learn
On Tuesday, 15 October 2019 at 22:02:35 UTC, WebFreak001 wrote: On Tuesday, 15 October 2019 at 20:03:00 UTC, Ron Tarrant wrote: ... Do you have links for these? thanks! :p both the packages can simply be found on dub: https://code.dlang.org/search?q=glade Not sure if there are other ways

Re: Abstract classes vs interfaces, casting from void*

2019-08-10 Thread Antonio Corbi via Digitalmars-d-learn
On Saturday, 10 August 2019 at 08:20:46 UTC, John Colvin wrote: On Friday, 9 August 2019 at 13:39:53 UTC, Simen Kjærås wrote: Thanks for the extra detail. Is there a solid reason to ever use an interface over an abstract class? (Other than multiple inheritance). I'm such a noob at

Re: Linux & DMD & GtkD

2019-02-16 Thread Antonio Corbi via Digitalmars-d-learn
On Saturday, 16 February 2019 at 16:28:09 UTC, Ron Tarrant wrote: On Saturday, 16 February 2019 at 14:29:56 UTC, Russel Winder wrote: Pass, sorry. Thanks for the replies, guys... I quoted the above line because it's just about the only thing I understood. Let me explain... It's been

Re: gtkDcoding Blog Post #0007 Now Live

2019-02-08 Thread Antonio Corbi via Digitalmars-d-announce
On Friday, 8 February 2019 at 10:28:36 UTC, Ron Tarrant wrote: On Wednesday, 6 February 2019 at 19:09:57 UTC, Antonio Corbi wrote: The gnome project maintains a 'How Do I do this...' page, it's almost gtk and C related but (thank's to the wonderful binding from Mike Wey) the 'mental mapping'

Re: Submenu Not Responding Until Second Click

2019-02-08 Thread Antonio Corbi via Digitalmars-d-learn
On Friday, 8 February 2019 at 10:03:03 UTC, Ron Tarrant wrote: On Thursday, 7 February 2019 at 08:41:29 UTC, Antonio Corbi wrote: Hi Ron, xrandr (and gui interfaces for it like arandr) are your friends here. xrandr -q -> shows your card outputs and then you can use xrandr + options to

Re: Submenu Not Responding Until Second Click

2019-02-07 Thread Antonio Corbi via Digitalmars-d-learn
On Wednesday, 6 February 2019 at 13:13:44 UTC, Ron Tarrant wrote: On Tuesday, 5 February 2019 at 09:41:06 UTC, Antonio Corbi wrote: It could be so, I'm not using gnome so I can't say. By the way, I'm using gtk3 3.24.5. Yeah, I updated from 3.22 to 3.24, but it made no difference on Windows

Re: Submenu Not Responding Until Second Click

2019-02-05 Thread Antonio Corbi via Digitalmars-d-learn
On Tuesday, 5 February 2019 at 09:31:01 UTC, Ron Tarrant wrote: On Tuesday, 5 February 2019 at 08:51:49 UTC, Antonio Corbi wrote: Have you tweaked your gtk theme? If so, could you try with the default (Adwaita) gtk theme? This is a Linux/Gnome thing, I'm assuming? Still, I'll look into

Re: Submenu Not Responding Until Second Click

2019-02-05 Thread Antonio Corbi via Digitalmars-d-learn
On Monday, 4 February 2019 at 18:34:55 UTC, Ron Tarrant wrote: I posted about this over on the GtkD site, but I suspect no one's home until later in the day. [...] And it still does the same thing. First click, blue line. Second click, menu drops. Hi Ron: It's working OK for me (gtkd

Re: GtkD Blog Now Up and Running

2019-01-30 Thread Antonio Corbi via Digitalmars-d-announce
On Wednesday, 30 January 2019 at 09:48:14 UTC, Ron Tarrant wrote: On Saturday, 26 January 2019 at 16:53:18 UTC, Antonio Corbi wrote: [1] https://sites.google.com/site/gtkdtutorial/ [2] http://britseyeview.com/software/articles/gsgtkd.html [3] https://gitlab.com/csoriano/GtkDApp Took a look

Re: GtkD Blog Now Up and Running

2019-01-26 Thread Antonio Corbi via Digitalmars-d-announce
On Friday, 25 January 2019 at 21:16:59 UTC, Ron Tarrant wrote: Hi y'all, As of January 11, 2019, http://gtkdcoding.com is up. It's a blog, it's a github page, it's simple examples of how to use GtkD for all that GUI stuff. My approach is to lay out a firm foundation for both imperative and

preconditions and interfaces

2019-01-20 Thread Antonio Corbi via Digitalmars-d-learn
Hi all, Playing with interfaces and preconditions in methods I get strange results with dmd-2.0.84.0 but also with dmd-nightly. My code is like this: - import std.stdio; interface Thing2D { void width(int w) in { writeln("Thing2D.width contract w = ",w);

Re: Destructor for struct invoked many times

2019-01-15 Thread Antonio Corbi via Digitalmars-d-learn
On Tuesday, 15 January 2019 at 10:49:17 UTC, rikki cattermole wrote: Because you passed it by value to writeln, which goes on to pass it to many other functions. Thanks Rikki! I was thinking about something like that. Antonio

Destructor for struct invoked many times

2019-01-15 Thread Antonio Corbi via Digitalmars-d-learn
Hi, In this simple example, the destructor for the struct is invoked four more times than expected: import std.stdio; struct Person { string name; int age; ~this() { writefln("%s is gone (0x%x)", name, ); } } int main(string[] args) { Person* p = new Person; writefln

Re: getopt short-options documentation

2018-11-30 Thread Antonio Corbi via Digitalmars-d-learn
On Thursday, 29 November 2018 at 20:55:22 UTC, Daniel Kozak wrote: Are you sure? Can you show me an example? I always forgot on this limitation and somtimes it cause really nesty things :D On Thu, Nov 29, 2018 at 6:05 PM Antonio Corbi via Digitalmars-d-learn < digitalmars-d-le

getopt short-options documentation

2018-11-29 Thread Antonio Corbi via Digitalmars-d-learn
Hi! Reading through the `getopt` documentation at one point it says: "Forms such as -t 5 and -timeout=5 will be not accepted." But I'm able to to use short options like '-t 5' (with spaces between the 't' and the '5'). It seems that this limitation has been eliminated and it

dub + ddoc

2018-11-21 Thread Antonio Corbi via Digitalmars-d-learn
Hi! I'm trying to build the docs for my project with `dub -b docs` and dub also generates the docs for the dependencies of my project. Is it possible to generate the docs *only* for my code? Thx!

Re: Encouraging preliminary results implementing memcpy in D

2018-06-13 Thread Antonio Corbi via Digitalmars-d-announce
On Wednesday, 13 June 2018 at 06:46:43 UTC, Mike Franklin wrote: I had a little fun today kicking the crap out of C's memcpy with a D implementation. https://github.com/JinShil/memcpyD Request for help: I don't have a Linux system running on real hardware at this time, nor do I have a wide

Re: Documentation for any* dub package, any version

2018-02-26 Thread Antonio Corbi via Digitalmars-d-announce
On Monday, 26 February 2018 at 14:59:07 UTC, Adam D. Ruppe wrote: Many of you will already know this from the other thread or from my twitter, but I just added a on-demand downloader to my dpldocs.info domain to fetch and build docs for any* dub package. Hi Adam! Thanks for this superb

Re: Beta 2.078.2

2018-02-02 Thread Antonio Corbi via Digitalmars-d-announce
On Friday, 2 February 2018 at 09:29:15 UTC, Seb wrote: On Friday, 2 February 2018 at 08:34:32 UTC, Antonio Corbi wrote: On Thursday, 1 February 2018 at 18:21:22 UTC, Seb wrote: [...] Wouldn't it be good to include a fix for errors like produced by int.min assigned to a variable

Re: Beta 2.078.2

2018-02-02 Thread Antonio Corbi via Digitalmars-d-announce
On Thursday, 1 February 2018 at 18:21:22 UTC, Seb wrote: On Thursday, 1 February 2018 at 17:32:09 UTC, Andrew Benton wrote: On Thursday, 1 February 2018 at 16:01:18 UTC, Martin Nowak wrote: First beta for the 2.078.2 patch release. Contains a major regression fix for hashtable array

Re: Post about comparing C, C++ and D performance with a real world project

2017-12-07 Thread Antonio Corbi via Digitalmars-d
On Thursday, 7 December 2017 at 10:33:59 UTC, Timothee Cour wrote: is there a link to source code (C++,C,D) nor compile / runtime commands used? hard to reach any conclusion without this On Thu, Dec 7, 2017 at 1:55 AM, Antonio Corbi via Digitalmars-d <digitalmars-d@puremagic.com>

Post about comparing C, C++ and D performance with a real world project

2017-12-07 Thread Antonio Corbi via Digitalmars-d
Hello all, Jussi Pakkanen (one of the meson build system creators) has written a post comparing C, C++ and D. Worth a read. http://nibblestew.blogspot.com.es/2017/12/comparing-c-c-and-d-performance-with.html Antonio.

Re: GtkD help

2017-11-19 Thread Antonio Corbi via Digitalmars-d-learn
On Saturday, 18 November 2017 at 22:31:15 UTC, Ivan Trombley wrote: Any information about using gio.Settings would be really appreciated too. Hi Ivan, I would recommend you to search for information about Gtk under valadoc pages [1]. You'll get Vala syntax but doing the mental-mapping to

Re: core file

2017-11-13 Thread Antonio Corbi via Digitalmars-d-learn
On Monday, 13 November 2017 at 09:49:29 UTC, codephantom wrote: On Monday, 13 November 2017 at 06:25:20 UTC, Tony wrote: I am on Ubuntu 16.04. Thanks, I didn't know that "producing a core file" was configurable, and it appears that it isn't. ok. that's because Ubuntu is not (by default) setup

Re: Working with images

2017-11-01 Thread Antonio Corbi via Digitalmars-d-learn
On Wednesday, 1 November 2017 at 12:02:08 UTC, Alexandre wrote: I have a project written in C++, that I'm thinking to migrating to D, but, what is preventing me from migrating to D, is the part of the system that works with images, where the system generates the image of a payment receipt,

Re: Back to SDL question

2017-10-19 Thread Antonio Corbi via Digitalmars-d
On Thursday, 19 October 2017 at 13:34:31 UTC, Suliman wrote: First of all I would like to say sorry for Ludwig, that 2 years ago I was initiator to making JSON back by default for dub config. It was really my mistake. Only some time later I understand that it was big error. So I would like to

Re: GtkD 3.7.0 released, GTK+ with D.

2017-10-16 Thread Antonio Corbi via Digitalmars-d-announce
On Sunday, 15 October 2017 at 20:18:37 UTC, Mike Wey wrote: GtkD is a D binding and OO wrapper of Gtk+ and is released on the LGPL license. Apart form the biannual update to the latest glib/gtk version, this release adds bindings for Gstreamer Mpegts and Gstreamer AppSink. Full changelog:

Re: Release D 2.076.0

2017-09-07 Thread Antonio Corbi via Digitalmars-d-announce
On Thursday, 7 September 2017 at 00:53:29 UTC, Ali Çehreli wrote: This is the first time I'm trying to install with the install script as shown on the download page but it fails. $ curl -fsS https://dlang.org/install.sh | bash -s dmd Downloading and unpacking

Re: gtkD load images

2017-08-04 Thread Antonio Corbi via Digitalmars-d-learn
On Thursday, 3 August 2017 at 21:06:36 UTC, Johnson Jones wrote: On Thursday, 3 August 2017 at 13:12:03 UTC, Mengu wrote: On Thursday, 3 August 2017 at 03:59:40 UTC, Johnson Jones wrote: How can be use gtkD to load images, I assume through gdkpixbuf? While I am getting errors loading images

Re: How to replace pairs tags with regexp

2017-07-21 Thread Antonio Corbi via Digitalmars-d-learn
On Friday, 21 July 2017 at 07:42:28 UTC, Suliman wrote: On Friday, 21 July 2017 at 07:30:07 UTC, Antonio Corbi wrote: On Friday, 21 July 2017 at 07:08:34 UTC, Suliman wrote: On Friday, 21 July 2017 at 06:19:43 UTC, Suliman wrote: There reason of issue above is spaces before "#". What wrong

Re: How to replace pairs tags with regexp

2017-07-21 Thread Antonio Corbi via Digitalmars-d-learn
On Friday, 21 July 2017 at 07:08:34 UTC, Suliman wrote: On Friday, 21 July 2017 at 06:19:43 UTC, Suliman wrote: There reason of issue above is spaces before "#". What wrong with next regex https://dpaste.dzfl.pl/024a47ed2a56 I expect that it will select: #Header my header text ##SubHeader

Re: replacement for squeeze and removechars.

2017-07-18 Thread Antonio Corbi via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 15:55:00 UTC, Seb wrote: On Tuesday, 18 July 2017 at 15:41:44 UTC, Meta wrote: As Seb somewhat undiplomatically put, there are replacements listed in the changelog. Sorry - it wasn't intended to be an offense or aggressive. I consider(ed) RTFM as common internet

Re: replacement for squeeze and removechars.

2017-07-18 Thread Antonio Corbi via Digitalmars-d-learn
On Tuesday, 18 July 2017 at 15:41:44 UTC, Meta wrote: On Tuesday, 18 July 2017 at 15:28:06 UTC, Antonio Corbi wrote: Hi all, I'm trying dmd-2.075.0-rc1 in one of my projects where I use `squeeze` and `removechars`. Both of them are flagged as obsolete and in the docs we are suggested to use

replacement for squeeze and removechars.

2017-07-18 Thread Antonio Corbi via Digitalmars-d-learn
Hi all, I'm trying dmd-2.075.0-rc1 in one of my projects where I use `squeeze` and `removechars`. Both of them are flagged as obsolete and in the docs we are suggested to use functions from std.regex and/or std.algorithm. Does any one kow a one-liner from std.regex or std.algorithm that

Re: dmd and Archlinux

2017-07-09 Thread Antonio Corbi via Digitalmars-d
On Sunday, 9 July 2017 at 19:21:48 UTC, Seb wrote: On Sunday, 9 July 2017 at 18:35:09 UTC, Antonio Corbi wrote: [...] I think the Arch Linux TUs are in the process of enabling -fPIC by default, see e.g. [1] - it might be releated to this? In any case - building dmd/druntime/phobos with

Re: dmd and Archlinux

2017-07-09 Thread Antonio Corbi via Digitalmars-d
On Sunday, 9 July 2017 at 19:15:15 UTC, Nemanja Boric wrote: On Sunday, 9 July 2017 at 18:35:09 UTC, Antonio Corbi wrote: [...] Hm, I can't reproduce this issue with dmd 2.074.0-1. I've just installed dmd and it works out of the box: ``` ➜ arch tmp% pacman -Q | grep phob libphobos-devel

dmd and Archlinux

2017-07-09 Thread Antonio Corbi via Digitalmars-d
Hi! Are there any news about the status of packaging dmd for archlinux? The last dmd compiler packaged is 2.074.0 and since the last batch of updated packages in archlinux, dmd generated objects fail to link with libphobos with erros like these: /usr/bin/ld:

Re: gdc is in

2017-06-22 Thread Antonio Corbi via Digitalmars-d
On Wednesday, 21 June 2017 at 15:11:39 UTC, Joakim wrote: the gcc tree: https://gcc.gnu.org/ml/gcc/2017-06/msg00111.html Congratulations to Iain and the gdc team. :) I found out because it's on the front page of HN right now, where commenters are asking questions about D. Congrats Iain!

Re: Expressing range constraints in CNF form

2017-06-11 Thread Antonio Corbi via Digitalmars-d
On Sunday, 11 June 2017 at 15:25:11 UTC, Andrei Alexandrescu wrote: On 6/11/17 11:11 AM, Nick Treleaven wrote: On Sunday, 11 June 2017 at 00:28:58 UTC, Andrei Alexandrescu wrote: [...] Great! Thanks. [...] I'm not getting how this works. Ostensibly the function is trivial: bool

Re: std.stdio.stderr

2017-06-10 Thread Antonio Corbi via Digitalmars-d-learn
On Saturday, 10 June 2017 at 16:10:18 UTC, Russel Winder wrote: It appears that std.stdio.stderr does not wor exactly as stdio stderr does. In particular std.stdio.stderr.writef(…) does not work as fprintf(stderr…) does. Some code I am porting from C++ to D makes use of ANSI escape codes to

D is #3 in Github's "The top weekend languages 2016"

2017-02-12 Thread Antonio Corbi via Digitalmars-d-announce
Glad to share this article with you all: https://medium.com/@hoffa/the-top-weekend-languages-according-to-githubs-code-6022ea2e33e8#.vvtcmyh88 A. Corbi

Re: A mini D book: Markdown or LaTeX?

2017-01-24 Thread Antonio Corbi via Digitalmars-d
On Tuesday, 24 January 2017 at 14:27:15 UTC, aberba wrote: Which one works well? I'm more concerned about syntax highlighting and line numbering (in some cases). Support for custom fonts. If you are an emacs user, probably you have heard about org-mode (http://orgmode.org/). With its new

Re: Terminix Year In Review

2017-01-03 Thread Antonio Corbi via Digitalmars-d-announce
On Monday, 2 January 2017 at 18:23:53 UTC, Gerald wrote: Since Terminix is a GTK 3 application, the minimum baseline is that your emulator would have to be a GTK 3 Widget, I have no idea what would be involved in creating a GTK widget in D as I've never tried it myself. Hi Gerald, There's

Re: Switch ignores case (?)

2016-11-24 Thread Antonio Corbi via Digitalmars-d-learn
On Wednesday, 23 November 2016 at 22:13:38 UTC, ketmar wrote: On Wednesday, 23 November 2016 at 22:00:58 UTC, Steven Schveighoffer wrote: I can't see why you need to deal with the glue layer at all -- just tell the glue layer that it's a list of strings and not dstrings ;) 'cause that is how

Re: Nov 16 - Memory Safety and the D Programming Language

2016-11-21 Thread Antonio Corbi via Digitalmars-d-announce
On Monday, 21 November 2016 at 15:20:49 UTC, ixid wrote: On Sunday, 20 November 2016 at 22:34:26 UTC, Walter Bright wrote: On 11/14/2016 1:39 AM, qznc wrote: [...] Unfortunately, the audio was lost 18 minutes in. Looks to be not worth posting. I do have the slides up, though.

Re: CTFE Status

2016-11-08 Thread Antonio Corbi via Digitalmars-d
On Tuesday, 8 November 2016 at 17:12:34 UTC, Nick Sabalausky wrote: On 11/08/2016 11:57 AM, H. S. Teoh via Digitalmars-d wrote: [...] I don't suppose you have a handy link to an "Understanding Git as a DAG manager instead of VCS" document? Hi Nick, Maybe this one is useful for you:

Re: Continued looking at properties in D - interfaces and constraints

2016-10-12 Thread Antonio Corbi via Digitalmars-d-learn
On Wednesday, 12 October 2016 at 06:20:05 UTC, mikey wrote: On Sunday, 9 October 2016 at 14:06:42 UTC, Antonio Corbi wrote: 1. Inheritance with contracts is evaluated in a special way, 'in contracts' in the base and derived method (property) are or-ed, so if one of them passses, the contract

Re: Continued looking at properties in D - interfaces and constraints

2016-10-09 Thread Antonio Corbi via Digitalmars-d-learn
On Sunday, 9 October 2016 at 11:54:50 UTC, mikey wrote: Hi, I'm continuing to look at properties in D and have found another area where I think there may be an issue - or maybe where I'm doing something wrong. I have started trying to use constraints on my properties to constrain which

Re: Learning ddoc

2016-09-29 Thread Antonio Corbi via Digitalmars-d-learn
On Thursday, 29 September 2016 at 11:50:26 UTC, bachmeier wrote: On Thursday, 29 September 2016 at 09:35:56 UTC, Antonio Corbi wrote: [...] They used https://github.com/economicmodeling/harbored Thanks! that's it. Antonio

Learning ddoc

2016-09-29 Thread Antonio Corbi via Digitalmars-d-learn
Hi, I'm in the process of learning how ddoc works. I've successfully created docs for my code and recently learned how to generate it using dub. Related to this and after seeing the announcement of the new release of the emsi-containers library, I had a look at its docs

Re: How to get a screenshot?

2016-09-22 Thread Antonio Corbi via Digitalmars-d-learn
On Thursday, 22 September 2016 at 07:50:07 UTC, Antonio Corbi wrote: On Thursday, 22 September 2016 at 02:21:16 UTC, Konstantin Kutsevalov wrote: On Wednesday, 21 September 2016 at 16:36:32 UTC, Adam D. Ruppe wrote: [...] Hmm, that's good idea as fast solution. Thank you Adam. Hi

Re: How to get a screenshot?

2016-09-22 Thread Antonio Corbi via Digitalmars-d-learn
On Thursday, 22 September 2016 at 02:21:16 UTC, Konstantin Kutsevalov wrote: On Wednesday, 21 September 2016 at 16:36:32 UTC, Adam D. Ruppe wrote: On Wednesday, 21 September 2016 at 16:33:58 UTC, Konstantin Kutsevalov wrote: do anybody know how to get screenshot (for now in Linux only)? May be

Re: Array Copying syntax

2016-09-16 Thread Antonio Corbi via Digitalmars-d-learn
On Friday, 16 September 2016 at 18:12:22 UTC, Steven Schveighoffer wrote: On 9/16/16 2:03 PM, Antonio Corbi wrote: Hi Jonathan! Probably this entry in https://dlang.org/spec/arrays.html#usage confused me a bit. int[3] s; s = ...; // error, since s is a compiled in static

Re: Array Copying syntax

2016-09-16 Thread Antonio Corbi via Digitalmars-d-learn
On Friday, 16 September 2016 at 17:55:59 UTC, Jonathan M Davis wrote: On Friday, September 16, 2016 17:22:41 Antonio Corbi via Digitalmars-d-learn wrote: Shouldn't it be mentioned then in the docs that this works for statically sized arrays and that in that case it copies contents? Well, I

Re: Array Copying syntax

2016-09-16 Thread Antonio Corbi via Digitalmars-d-learn
On Friday, 16 September 2016 at 17:11:54 UTC, Adam D. Ruppe wrote: On Friday, 16 September 2016 at 17:03:20 UTC, Antonio Corbi wrote: Is it safe to use or do I have to use the proposed 's[] = t;' or 's[] = t[]' ? That works for all arrays. `s = t` for dynamically sized arrays (aka slices)

Array Copying syntax

2016-09-16 Thread Antonio Corbi via Digitalmars-d-learn
Hi! I was just playing with array initialization and copying and discovered that this syntax works as expected but it is not referenced under https://dlang.org/spec/arrays.html#array-copying: -8><- int[3] s; int[3] t; s = t; -8><- Is it safe to use or do I have to use the

Re: std.functional.compose compilation error

2016-08-25 Thread Antonio Corbi via Digitalmars-d-learn
On Thursday, 25 August 2016 at 14:30:00 UTC, Meta wrote: On Thursday, 25 August 2016 at 14:06:32 UTC, Antonio Corbi wrote: Hello, Trying to compile this example from Chuck Allison: --- import std.stdio; import std.functional; void main() { auto div3

std.functional.compose compilation error

2016-08-25 Thread Antonio Corbi via Digitalmars-d-learn
Hello, Trying to compile this example from Chuck Allison: --- import std.stdio; import std.functional; void main() { auto div3 = (double x) => x/3.0; auto sq = (double x) => x*x; auto pls1 = (double x) => x+1.0; alias

Re: Caesar Cipher Cracking

2016-08-15 Thread Antonio Corbi via Digitalmars-d-learn
On Sunday, 14 August 2016 at 18:36:02 UTC, Stefan wrote: same code, just a little shorter. usage of ".array" more UFCS replaced cast with ".to" Wow Stefan! Thanks for your time, I'll have a look at it! Antonio

Caesar Cipher Cracking

2016-08-14 Thread Antonio Corbi via Digitalmars-d-learn
Hi folks, I was just following Graham Hutton's excellent book "Programming in Haskell" (http://www.cs.nott.ac.uk/~pszgmh/book.html) and in chapter 5 He implements a Caesar-Cipher cracking algorithm in a few lines of Haskell code (http://www.cs.nott.ac.uk/~pszgmh/cipher.lhs). So, as I'm

Re: [OT] Music to Program Compilers To

2016-07-30 Thread Antonio Corbi via Digitalmars-d
On Friday, 29 July 2016 at 22:44:04 UTC, Walter Bright wrote: http://70sdisconights.com/ Yes, I listen to it while I work. I usually listen to several channels from somafm.com (depending on my mood) but for programming tasks I tend to listen to "sf 10-33" (Ambient music mixed with the

Re: Default implementations in inherited interfaces

2016-07-24 Thread Antonio Corbi via Digitalmars-d-learn
On Sunday, 24 July 2016 at 07:54:11 UTC, Jonathan Marler wrote: On Thursday, 21 July 2016 at 13:37:30 UTC, Saurabh Das wrote: On Thursday, 21 July 2016 at 12:42:14 UTC, Adam D. Ruppe wrote: On Thursday, 21 July 2016 at 09:41:27 UTC, Saurabh Das wrote: Java 8 has a 'default' keyword that allows

Re: Dub recursive build and forcing pre-build commands to run

2016-07-10 Thread Antonio Corbi via Digitalmars-d-learn
On Sunday, 10 July 2016 at 07:00:18 UTC, Meta wrote: On Saturday, 9 July 2016 at 07:52:56 UTC, Antonio Corbi wrote: I use the "preGenerateCommands" and "dependencies" like this: "configurations" : [ { "comment" : "Classic app.", "name"

Re: Dub recursive build and forcing pre-build commands to run

2016-07-09 Thread Antonio Corbi via Digitalmars-d-learn
On Saturday, 9 July 2016 at 00:03:22 UTC, Meta wrote: I have two questions. 1. Is it possible to build subpackages when dub build is invoked for the main package? It's a pain to first do dub build :mysubpackage and then dub build. 2. It seems that when dub detects that no dependencies need

problem using ldc 1.0.0 as D compiler

2016-06-20 Thread Antonio Corbi via Digitalmars-d
Hi folks! I'm using ldc version: LDC - the LLVM D compiler (1.0.0): based on DMD v2.070.2 and LLVM 3.8.0 built with DMD64 D Compiler v2.071.0 Default target: x86_64-unknown-linux-gnu Host CPU: core2 And when trying to run this code (it compiles ok): import std.regex; void

Re: Adventures in D Programming

2016-05-08 Thread Antonio Corbi via Digitalmars-d-announce
On Sunday, 8 May 2016 at 06:05:36 UTC, Iain Buclaw wrote: I was paged about a blog post from an old friend who floats around the circles in the Debian camp. The author, Matthias, should be no stranger around these forums, though I was surprised to discover that I know him on OFTC too (I

Re: DConf 2016 offical presentation template

2016-04-21 Thread Antonio Corbi via Digitalmars-d
On Thursday, 21 April 2016 at 00:55:34 UTC, Andrei Alexandrescu wrote: qznc wrote: On Wednesday, 20 April 2016 at 07:53:53 UTC, Benjamin Thaut wrote: Many programmers (me included) are not good with picking colors and thus presentations usually don't look as good as they could.

Using D in Debian to build AppStream metadata.

2016-04-17 Thread Antonio Corbi via Digitalmars-d-announce
Hello, Just read this post from Matthias Klumpp (http://blog.tenstral.net/2016/04/introducing-appstream-generator.html) in planet.debian.net where he talks about replacing the current appstream metadata generator written in python (dep11-generator). He talks about considering Go, Rust and D

Re: GtkD 3.3.0 released, GTK+ with D.

2016-03-24 Thread Antonio Corbi via Digitalmars-d-announce
On Wednesday, 23 March 2016 at 18:16:02 UTC, Mike Wey wrote: GtkD is a D binding and OO wrapper of Gtk+ and is released on the LGPL license. A new version of GTK was released today, and with that comes a new GtkD release so you can use the new features in D. GtkD 3.3.0 is now available on

Re: Needed return type in static method? bug or feature?

2016-03-08 Thread Antonio Corbi via Digitalmars-d-learn
On Tuesday, 8 March 2016 at 14:13:17 UTC, Adam D. Ruppe wrote: On Tuesday, 8 March 2016 at 13:40:06 UTC, Antonio Corbi wrote: Is it a feature or a bug? It is allowed because the "auto" keyword doesn't actually required for auto functions (or variables), what you need is any one of the

Needed return type in static method? bug or feature?

2016-03-08 Thread Antonio Corbi via Digitalmars-d-learn
Hi all! The following code compiles and works, but the static methods do not have a return type. It also compiles and works if the appropiate (or auto) return type is added to them. -8>< import std.stdio; class B { int foo () { return 1; }