When creating a string from a ubyte[], I have an invalid length
and string.strip() doesn't strip off all whitespace. I'm new to
the language. Is this a compiler issue?
import std.string : strip;
import std.stdio : writefln;
int main()
{
const string ATA_STR = " ATA ";
// this works fi
While d can be complex, there's nothing preventing you from starting out
simple and not using all features at first.
I don't understand why it's not suitable for a beginner if you use this
approach...
2014-10-17 6:51 GMT+02:00 via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com>:
> On Fri
On Friday, 17 October 2014 at 01:14:34 UTC, bearophile wrote:
Python is probably a better first language than Java. D is a
little too much complex as first language.
The IDE support is probably a bit better with Java/C# and using a
statically typed language as your first language has advantage
On Thursday, 16 October 2014 at 07:55:24 UTC, Mike Parker wrote:
On 10/16/2014 4:54 PM, Mike Parker wrote:
On 10/16/2014 12:18 PM, dysmondad wrote:
Since I've added this call, my program will sometimes but not
always
either generate a core dump or a seg fault. It seems that the
issue is
with
RBfromME:
I'm a newbie to programming and have been looking into the D
lang as a general purposing language to learn, yet the D
overview indicates that java would be a better language to
learn for your first programming language. Why? Looks like D
is easier than Java...
Python is probably
On Fri, 17 Oct 2014 00:52:14 +
MachineCode via Digitalmars-d-learn
wrote:
> I don't understand. If at least it were C but java? why not D
> itself?
C is *awful* as "beginner's language". never ever let people start with
C if you don't hate 'em.
as for D... current version of D can be used,
On Thursday, 16 October 2014 at 22:42:21 UTC, Ali Çehreli wrote:
On 10/16/2014 03:26 PM, RBfromME wrote:
> I'm a newbie to programming and have been looking into the D
lang as a
> general purposing language to learn, yet the D overview
indicates that
> java would be a better language to learn fo
On Thu, 16 Oct 2014 22:43:11 +
Brad Anderson via Digitalmars-d-learn
wrote:
> also shows just how old the Overview is (where do you even get a
> BASIC compiler these days?).
voila: http://www.freebasic.net/
;-)
signature.asc
Description: PGP signature
On Monday, 25 August 2014 at 18:10:33 UTC, Gary Willoughby wrote:
class Foo
{
private int foo;
mixin Proxy!(foo);
this(int x)
{
this.foo = x;
}
}
Apparently Proxy do
On Thursday, 16 October 2014 at 22:26:51 UTC, RBfromME wrote:
I'm a newbie to programming and have been looking into the D
lang as a general purposing language to learn, yet the D
overview indicates that java would be a better language to
learn for your first programming language. Why? Looks l
On 10/16/2014 03:26 PM, RBfromME wrote:
> I'm a newbie to programming and have been looking into the D lang as a
> general purposing language to learn, yet the D overview indicates that
> java would be a better language to learn for your first programming
> language. Why? Looks like D is easier
I'm a newbie to programming and have been looking into the D lang
as a general purposing language to learn, yet the D overview
indicates that java would be a better language to learn for your
first programming language. Why? Looks like D is easier than
Java...
Any way of using dub (on Windows or OSX). I've been trying it
lately, but not much success.
1. (In the command prompt or Terminal), I create a new folder.
2. Run 'dub init' in the new folder
3. I copy the dependency from a lib/app into the dub.json file.
4. Then I just enter 'dub'
In Windows I
On 10/16/2014 12:43 PM, spir via Digitalmars-d-learn wrote:
denis
spir is back! :)
On 10/16/2014 11:46 AM, Uranuz wrote:
> I have some string *str* of unicode characters. The question is how to
> check if I have valid unicode code point starting at code unit *index*?
It is easy if I underst
On 16/10/14 20:46, Uranuz via Digitalmars-d-learn wrote:
I have some string *str* of unicode characters. The question is how to check if
I have valid unicode code point starting at code unit *index*?
[...]
You cannot do that without decoding. Cheking whether utf-x is valid and decoding
are the
On Tuesday, 14 October 2014 at 20:08:03 UTC, Brad Anderson wrote:
On Tuesday, 14 October 2014 at 20:05:07 UTC, Brad Anderson
wrote:
https://github.com/D-Programming-Language/phobos/blob/master/std/json.d#L579
Oops. Linked the the parser section. I actually don't see any
unicode escape encoder
On Thursday, 16 October 2014 at 18:39:50 UTC, nrgyzer wrote:
Hi,
I'm using structs to describe my functions:
struct example
{
string name;
uint someValue;
}
module mod.example1;
@example("example1", 1)
void myFunction()
{
// do something
}
module mod.example2;
@example("example2", 2)
v
On Thu, 16 Oct 2014 18:39:48 +
nrgyzer via Digitalmars-d-learn
wrote:
> But it always stats that 'cmodule' has no members. Does anyone
> know how to solve the problem?
there is no non-hackish solution, afaik. there is no even hackish, but
reliable one.
signature.asc
Description: PGP signat
I have some string *str* of unicode characters. The question is
how to check if I have valid unicode code point starting at code
unit *index*?
I need it because I try to write parser that operates on string
by *code unit*. If more precisely I trying to write function
*matchWord* that should e
Hi,
I'm using structs to describe my functions:
struct example
{
string name;
uint someValue;
}
module mod.example1;
@example("example1", 1)
void myFunction()
{
// do something
}
module mod.example2;
@example("example2", 2)
void myFunction()
{
// do something
}
I'm using the struct to
On Thursday, 16 October 2014 at 13:56:18 UTC, Robert burner
Schadek wrote:
I'm stuck. Need help.
I will give it a try
Thank you.
On Wednesday, 15 October 2014 at 21:15:14 UTC, Nordlöw wrote:
Comint exited abnormally with code 1 at Wed Oct 15 23:14:37
I'm stuck. Need help.
I will give it a try
On 10/16/14 6:59 AM, Rei Roldan wrote:
On Wednesday, 15 October 2014 at 16:11:22 UTC, Steven Schveighoffer wrote:
*snip*
You might of missed Adam's response up there:
" But the best way is to explicitly pass all the file names to the
compiler:
dmd yourfile.d file2.d folder/file3.d and so on.
On Thursday, 16 October 2014 at 10:59:29 UTC, Rei Roldan wrote:
On Wednesday, 15 October 2014 at 16:11:22 UTC, Steven
Schveighoffer wrote:
*snip*
You might of missed Adam's response up there:
" But the best way is to explicitly pass all the file names to
the compiler:
dmd yourfile.d file2.
On Wednesday, 15 October 2014 at 16:11:22 UTC, Steven
Schveighoffer wrote:
*snip*
You might of missed Adam's response up there:
" But the best way is to explicitly pass all the file names to
the compiler:
dmd yourfile.d file2.d folder/file3.d and so on...
Doing that will serve you best in
On Thursday, 16 October 2014 at 08:18:02 UTC, Atila Neves wrote:
This works:
import std.range;
auto groupBy(alias func, R)(R values)
if (isInputRange!R)
{
alias K = typeof(func(values.front));
alias V = ElementType!R[];
V[K] grouped;
foreach(value; values) grouped[func(valu
This works:
import std.range;
auto groupBy(alias func, R)(R values)
if (isInputRange!R)
{
alias K = typeof(func(values.front));
alias V = ElementType!R[];
V[K] grouped;
foreach(value; values) grouped[func(value)] ~= value;
return grouped;
}
unittest {
struct Test {
On Wednesday, 15 October 2014 at 21:28:05 UTC, Nils Boßung wrote:
On Wednesday 15 October 2014 22:13, John Colvin wrote:
On Wednesday, 15 October 2014 at 19:29:27 UTC, Jack Applegame
wrote:
I don't understand why this code doesn't compile:
http://dpaste.dzfl.pl/dfd8df7f80ad
that should be i
I am trying to implement a groupBy function that groups by the
return type of a predicate. Currently I have to define the
returntype of the predicate for it to compile. Is there a way to
get the return type at compile time and use it.
The code:
V[K] groupBy( alias func, K, V )( V values )
{
On 10/16/2014 4:54 PM, Mike Parker wrote:
On 10/16/2014 12:18 PM, dysmondad wrote:
Since I've added this call, my program will sometimes but not always
either generate a core dump or a seg fault. It seems that the issue is
with the const char * parameter.
I don't have a good grasp of the differ
On 10/16/2014 12:18 PM, dysmondad wrote:
Since I've added this call, my program will sometimes but not always
either generate a core dump or a seg fault. It seems that the issue is
with the const char * parameter.
I don't have a good grasp of the difference between the way D and C work
for char
On 10/15/2014 08:18 PM, dysmondad wrote:
> Since I've added this call, my program will sometimes but not always
> either generate a core dump or a seg fault. It seems that the issue is
> with the const char * parameter.
>
> I don't have a good grasp of the difference between the way D and C work
32 matches
Mail list logo