On Wednesday, 11 November 2015 at 06:37:44 UTC, Marco de Wild
wrote:
In directory.d:
using style;
This is not D. It should be giving you a compiler error. How are
you compiling? Or did you type 'using' in the post by mistake?
Anyway, what you want is:
import style;
In style.d:
module
On Wednesday, 11 November 2015 at 07:46:31 UTC, Mike Parker wrote:
Text is from the module dsfml.text.graphics, it has an enum
And of course, I meant dsfml.graphics.text.
I'm trying to build a small manga reader application (because why
search the internet if you can build it yourself), using DSFML.
However, I'm getting a weird compilation error that I can't
decrypt.
In directory.d:
using style;
(...)
_text = new Text;
with(_text)
{
setFont(Style.DirectoryF
Hello,
I'm working on native Cocoa backend for DlangUI GUI library under
OSX.
Is there any ready to use bindings for easy accessing Cocoa API?
Probably, there is some HelloWorld program which creates window
and draws something?
Best regards,
Vadim
quoted from the website:
Sets the base name of the output file; type and platform
specific pre- and suffixes are added automatically
- this setting does not support platform suffixes
I must be blind but I can't find the code that adds the 'lib'
prefix on GitHub. I need to check something:
On 11/11/15 5:17 PM, Dustin Walker wrote:
On Monday, 9 November 2015 at 14:42:01 UTC, ref2401 wrote:
Hello
I wrote a small hello world app and imported the
`std.experimental.allocator` module.
I'm getting the following optlink error:
---
OPTLINK (
On Monday, 9 November 2015 at 14:42:01 UTC, ref2401 wrote:
Hello
I wrote a small hello world app and imported the
`std.experimental.allocator` module.
I'm getting the following optlink error:
---
OPTLINK (R) for Win32 Release 8.00.17
Copyright (
On Wednesday, 11 November 2015 at 02:38:19 UTC, puming wrote:
Hi,
If I have multiple ranges, say:
auto a = [1, 2, 3];
auto b = ["a", "b", "c"];
auto c = ["x", "y", "z"];
I'd like a composition range that enumerate all combinations of
these ranges,
having the same effect as a nested foreach l
On Wednesday, 11 November 2015 at 02:55:25 UTC, cym13 wrote:
On Wednesday, 11 November 2015 at 02:38:19 UTC, puming wrote:
Hi,
If I have multiple ranges, say:
auto a = [1, 2, 3];
auto b = ["a", "b", "c"];
auto c = ["x", "y", "z"];
I'd like a composition range that enumerate all combinations
Hi,
If I have multiple ranges, say:
auto a = [1, 2, 3];
auto b = ["a", "b", "c"];
auto c = ["x", "y", "z"];
I'd like a composition range that enumerate all combinations of
these ranges,
having the same effect as a nested foreach loop:
foreach (i; a) {
foreach (j; b) {
foreach (k; c) {
On 07.11.2015 16:59, anonymous wrote:
Wat. It even compiles with @safe. That's not good.
Filed an issue:
https://issues.dlang.org/show_bug.cgi?id=15315
On Tuesday, 10 November 2015 at 20:37:00 UTC, Fyodor Ustinov
wrote:
assert(false) AKA assert(0) - is a part of this language that I
think it is absolute evil.
WBR,
Fyodor.
I would say it's a minor evil, that create problems by needing an
explanation.
At this point it has been discusse
On Tuesday, 10 November 2015 at 20:46:14 UTC, cym13 wrote:
I don't quite get why you'd like to use -release if you are
paranoid enough to be afraid of assert(0)'s little difference
in behaviour. Could you give a realistic use case? At the very
least seeing why it is important to you can only b
On Tuesday, 10 November 2015 at 13:09:09 UTC, Fyodor Ustinov
wrote:
Hi!
Is it possible when using the "-release" indicate that this one
in/out/invariant/assert should not to be disabled?
WBR,
Fyodor.
I don't quite get why you'd like to use -release if you are
paranoid enough to be afra
On Tuesday, 10 November 2015 at 15:44:26 UTC, ponce wrote:
Since assert(false) is special (cf.
http://p0nce.github.io/d-idioms/#assert%28false%29-is-special)
you can use the following construct to have always-on
assert(false) AKA assert(0) - is a part of this language that I
think it is abso
On Monday, 9 November 2015 at 22:41:50 UTC, Brian Schott wrote:
Given the following code:
```
import std.meta;
static assert(is(char : dchar));
static assert(is(AliasSeq!(int, char) : AliasSeq!(int, char)));
static assert(is(AliasSeq!(int, char) : AliasSeq!(int, dchar)));
```
The third static a
On Tuesday, 10 November 2015 at 13:47:23 UTC, Brian Schott wrote:
On Tuesday, 10 November 2015 at 10:28:45 UTC, Marc Schütz wrote:
This fails, too:
static assert(is(AliasSeq!(char) : AliasSeq!(dchar)));
Which makes sense IMO, because it can be thought of as an
unnamed struct, cp. the following
On Tuesday, 10 November 2015 at 11:57:03 UTC, Jonathan M Davis
wrote:
...
building blocks rather than kitchen sinks. And most range-based
...
I still can't really see why byChunk and byLine are part of the
File API? Especially byLine, I'll get byChunk go for now.
I think what I am trying to
On Tuesday, 10 November 2015 at 13:09:09 UTC, Fyodor Ustinov
wrote:
Hi!
Is it possible when using the "-release" indicate that this one
in/out/invariant/assert should not to be disabled?
WBR,
Fyodor.
Since assert(false) is special (cf.
http://p0nce.github.io/d-idioms/#assert%28false%29
I wouldn't recommend release mode to paranoids. I personally use
`debug invariant` and `debug assert` for purely debugging code.
On Tuesday, 10 November 2015 at 14:22:49 UTC, Gary Willoughby
wrote:
On Tuesday, 10 November 2015 at 14:14:33 UTC, DlangLearner
wrote:
Please enlighten me if this can be done, thanks.
If i understand you, you could use a templated function:
import std.stdio;
void foo(alias a)()
{
writefl
On Tuesday, 10 November 2015 at 05:14:29 UTC, lobo wrote:
On Tuesday, 10 November 2015 at 04:34:22 UTC, Cauterite wrote:
Here's the output I get (DMD v2.068.2):
[1, 3, 10, 12, 21, 30, 100, 102, 111, 120, 201, 210]
core.exception.AssertError@std\range\package.d(4603):
Assertion failure
iota.f
On Tuesday, 10 November 2015 at 14:14:33 UTC, DlangLearner wrote:
Please enlighten me if this can be done, thanks.
If i understand you, you could use a templated function:
import std.stdio;
void foo(alias a)()
{
writefln("%s was passed in.", a.stringof);
}
void main(string[] args)
{
Here is what I want to know: when a function is called, does this
function can recovery the information about which variables pass
their values into this function's arguments. I use the following
example to show what I want to know.
void main(){
int a = 1;
writeln(fun(a.stringo
On Tuesday, 10 November 2015 at 10:28:45 UTC, Marc Schütz wrote:
This fails, too:
static assert(is(AliasSeq!(char) : AliasSeq!(dchar)));
Which makes sense IMO, because it can be thought of as an
unnamed struct, cp. the following:
struct A { char c; }
struct B { dchar c; }
static assert(is(A :
On Tuesday, 10 November 2015 at 12:40:07 UTC, Márcio Martins
wrote:
writeln(interp!"The number #{a} is less than #{b}");
Quite pleasant syntax this way :)
Not sure if it's feasible to do this on the language side.
Yes. Here a (stupid!) proof of concept:
http://dpaste.dzfl.pl/74b1a4e3c8c6
Hi!
Is it possible when using the "-release" indicate that this one
in/out/invariant/assert should not to be disabled?
WBR,
Fyodor.
On Tuesday, 10 November 2015 at 11:29:32 UTC, TheFlyingFiddle
wrote:
On Tuesday, 10 November 2015 at 10:41:52 UTC, tired_eyes wrote:
On Tuesday, 10 November 2015 at 10:33:30 UTC, Tobias Pankrath
wrote:
Ruby:
a = 1
b = 4
puts "The number #{a} is less than #{b}"
PHP:
$a = 1;
$b = 4;
echo "The nu
On Tuesday, 10 November 2015 at 11:29:32 UTC, TheFlyingFiddle
wrote:
On Tuesday, 10 November 2015 at 10:41:52 UTC, tired_eyes wrote:
On Tuesday, 10 November 2015 at 10:33:30 UTC, Tobias Pankrath
wrote:
Ruby:
a = 1
b = 4
puts "The number #{a} is less than #{b}"
PHP:
$a = 1;
$b = 4;
echo "The nu
On Tuesday, November 10, 2015 09:53:42 Gary Willoughby via Digitalmars-d-learn
wrote:
> On Monday, 9 November 2015 at 22:42:16 UTC, Fyodor Ustinov wrote:
> > If this feature will be removed, it will be very lacking code,
> > like:
> >
> > writeln = "Hello, world!";
> >
> > :)
> > WBR,
> > Fyod
On Tuesday, 10 November 2015 at 11:22:56 UTC, wobbles wrote:
On Tuesday, 10 November 2015 at 10:41:52 UTC, tired_eyes wrote:
On Tuesday, 10 November 2015 at 10:33:30 UTC, Tobias Pankrath
wrote:
On Tuesday, 10 November 2015 at 10:21:32 UTC, tired_eyes
wrote:
[...]
std.string.format and std.fo
On Sunday, November 08, 2015 14:41:05 Spacen Jasset via Digitalmars-d-learn
wrote:
> This looks the simplest solution at the moment:
>
> >> auto inputRange = File(__FILE__).byChunk(1024).joiner;
> >> Foo foo = Foo(inputRange);
>
> But it doesn't seem efficient and strays off the conceptual
I wrote up a small PyQt app to help me do quick coding of snippets in D to
help me learn how D works.
https://github.com/jamadagni/dhee
I wish there was (a working) QtD so I wouldn't need to use Python, but
well... Looked into GtkD a bit, but somehow Gtk never clicked with me...
P.S.: I only c
On 11/11/15 12:05 AM, uiop wrote:
On Tuesday, 10 November 2015 at 10:34:56 UTC, ref2401 wrote:
On Tuesday, 10 November 2015 at 08:48:37 UTC, ref2401 wrote:
On Tuesday, 10 November 2015 at 01:04:16 UTC, uiop wrote:
Can you find the sources in your setup ? Any chance that that
phobos.lib is stil
On Tuesday, 10 November 2015 at 10:41:52 UTC, tired_eyes wrote:
On Tuesday, 10 November 2015 at 10:33:30 UTC, Tobias Pankrath
wrote:
Ruby:
a = 1
b = 4
puts "The number #{a} is less than #{b}"
PHP:
$a = 1;
$b = 4;
echo "The number $a is less than $b";
D:
???
int a = 1, b = 4;
writefln("The nu
On Tuesday, 10 November 2015 at 10:41:52 UTC, tired_eyes wrote:
On Tuesday, 10 November 2015 at 10:33:30 UTC, Tobias Pankrath
wrote:
On Tuesday, 10 November 2015 at 10:21:32 UTC, tired_eyes wrote:
[...]
std.string.format and std.format are the standard options.
What are you missing?
Ruby:
On Tuesday, 10 November 2015 at 10:34:56 UTC, ref2401 wrote:
On Tuesday, 10 November 2015 at 08:48:37 UTC, ref2401 wrote:
On Tuesday, 10 November 2015 at 01:04:16 UTC, uiop wrote:
Can you find the sources in your setup ? Any chance that that
phobos.lib is still the the one distributed with dmd
On Tuesday, 10 November 2015 at 10:33:30 UTC, Tobias Pankrath
wrote:
On Tuesday, 10 November 2015 at 10:21:32 UTC, tired_eyes wrote:
Hi,
The only example of string interpolation I've found so far is
on Rosetta Code:
void main() {
import std.stdio, std.string;
"Mary had a %s lamb.".fo
On Tuesday, 10 November 2015 at 08:48:37 UTC, ref2401 wrote:
On Tuesday, 10 November 2015 at 01:04:16 UTC, uiop wrote:
Can you find the sources in your setup ? Any chance that that
phobos.lib is still the the one distributed with dmd 2.068 ?
How can I do that?
When you setup dmd 2.069, did y
On Tuesday, 10 November 2015 at 10:21:32 UTC, tired_eyes wrote:
Hi,
The only example of string interpolation I've found so far is
on Rosetta Code:
void main() {
import std.stdio, std.string;
"Mary had a %s lamb.".format("little").writeln;
"Mary had a %2$s %1$s lamb.".format("littl
On Tuesday, 10 November 2015 at 10:21:32 UTC, tired_eyes wrote:
Hi,
The only example of string interpolation I've found so far is
on Rosetta Code:
void main() {
import std.stdio, std.string;
"Mary had a %s lamb.".format("little").writeln;
"Mary had a %2$s %1$s lamb.".format("littl
On Monday, 9 November 2015 at 22:41:50 UTC, Brian Schott wrote:
Given the following code:
```
import std.meta;
static assert(is(char : dchar));
static assert(is(AliasSeq!(int, char) : AliasSeq!(int, char)));
static assert(is(AliasSeq!(int, char) : AliasSeq!(int, dchar)));
```
The third static a
Hi,
The only example of string interpolation I've found so far is on
Rosetta Code:
void main() {
import std.stdio, std.string;
"Mary had a %s lamb.".format("little").writeln;
"Mary had a %2$s %1$s lamb.".format("little",
"white").writeln;
}
Is this a "proper" way of string inter
On Monday, 9 November 2015 at 19:42:53 UTC, J.Frank wrote:
- Can you flush() a range?
- Can you use select() on a range?
Maybe you should factor out a function that does pure data
processing on arbitrary ranges and manage sources of the ranges -
opening, flushing and closing files - in the c
On Monday, 9 November 2015 at 22:42:16 UTC, Fyodor Ustinov wrote:
If this feature will be removed, it will be very lacking code,
like:
writeln = "Hello, world!";
:)
WBR,
Fyodor.
The feature is not being removed. Only the @property attribute
and compiler check is being removed.
It was intended for stricter properties. See
http://dlang.org/changelog/2.069.0.html#property-switch-deprecated Last iteration on it was http://wiki.dlang.org/DIP23
On Tuesday, 10 November 2015 at 01:04:16 UTC, uiop wrote:
Can you find the sources in your setup ? Any chance that that
phobos.lib is still the the one distributed with dmd 2.068 ?
When you setup dmd 2.069, did you use the 7z or installer ?
i have the same issue. i used the installer. i only h
On Tuesday, 10 November 2015 at 01:04:16 UTC, uiop wrote:
Can you find the sources in your setup ? Any chance that that
phobos.lib is still the the one distributed with dmd 2.068 ?
How can I do that?
When you setup dmd 2.069, did you use the 7z or installer ?
Installer always
btw. Thanks f
48 matches
Mail list logo