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; }
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
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
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
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
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
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"
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
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
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
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
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
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
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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);
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
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
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!
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
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
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
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
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
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
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
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
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
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
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
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
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
49 matches
Mail list logo