Total newbie to D, trying to get it to play nice with Neovim
using ncm2-d and DCD.
Issue: DCD never caches any symbols even when I point it directly
to DMD's include files. Hate to ask for tech support on this
forum but it's all I've got, Googling has brought no luck.
Using dcd version
On Saturday, 2 May 2015 at 13:50:10 UTC, Per Nordlöw wrote:
Have anybody cooked up any range adaptors for on the fly
decoding of bzipped files? Preferable compatible with phobos
standard interfaces for file io.
Should probably be built on top of
http://code.dlang.org/packages/bzip2
i use
On Saturday, 25 April 2015 at 04:01:47 UTC, Jens Bauer wrote:
(still no automatic mirroring, though I've installed
https://github.com/miracle2k/gitolite-simple-mirror)
it should be fairly simple, check the logs.
most probably something failing with authentication.
(btw, for those who don't know
On Friday, 24 April 2015 at 13:12:56 UTC, Jens Bauer wrote:
On Friday, 24 April 2015 at 07:34:55 UTC, tom wrote:
would something like a STM32 NUCLEO-F401RE work?
I forgot to give you a proper answer on this one: I think it
should work, as it's a STM32F401 microcontroller.
ill order
On Thursday, 23 April 2015 at 15:30:18 UTC, Jens Bauer wrote:
The most important thing, though, is that D-programmers now
have a starting point for the STM32F4xx. It should be easy to
adapt the same sources to other MCUs. I'm planning on adding
support for some of the LPC microcontrollers
On Fri, Jun 13, 2014 at 7:59 AM, via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
On Thursday, 12 June 2014 at 21:07:47 UTC, Tom Browder via
Digitalmars-d-learn wrote:
What I was really trying to do was D'ify C expressions like this:
typedef ((struct t*)0) blah
On Fri, Jun 13, 2014 at 10:15 AM, monarch_dodra via
Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
On Friday, 13 June 2014 at 15:05:49 UTC, Tom Browder via Digitalmars-d-learn
wrote:
So I'm not sure how to translate that into D. I do know my first
attempt here doesn't work
be aliased?
Thanks,
Best,
-Tom
On Thu, Jun 12, 2014 at 3:42 PM, H. S. Teoh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
On Thu, Jun 12, 2014 at 03:26:13PM -0500, Tom Browder via Digitalmars-d-learn
wrote:
This will not compile:
alias blah = null;
[...]
'null' is a value, not a type. Try
On Thu, Jun 12, 2014 at 4:17 PM, Ali Çehreli
digitalmars-d-learn@puremagic.com wrote:
On 06/12/2014 02:06 PM, Tom Browder via Digitalmars-d-learn wrote:
...
What I was really trying to do was D'ify C expressions like this:
typedef ((struct t*)0) blah;
...
So, taking your advice, I found
/dstep/issues/26#issuecomment-45435438
Thanks.
Best regards,
-Tom
On Thu, Jun 12, 2014 at 4:58 PM, Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
since null is a value maybe you want
enum blah = null;
That works.
you may also give it a type after the enum word
But I can't get any other variant to work so far.
-Tom
On Thu, Jun 12, 2014 at 5:17 PM, Dicebot via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
confirmed and commmented in that issue
Thank you! That makes me feel better, but I guess Jacob has a valid
bug on his hands. It will be interesting to see the fix.
Best regards,
-Tom
On Sat, Jun 7, 2014 at 10:59 AM, Tom Browder tom.brow...@gmail.com wrote:
Given a single ddoc source file (with no D source), how can one
generate the default html output?
I solved the problem by starting with the build system for the D lang
web site here:
https://github.com/D-Programming
Given a single ddoc source file (with no D source), how can one
generate the default html output?
I have tried: dmd -D -main ddoc.ddoc
and get nothing except __main.* files with no documentation.
Do I have to use CanDyDoc or bootDoc? They seem like overkill for a
first effort.
Thanks.
-Tom
. However, I will appreciate
any thoughts on the directory layout and file and module naming
conventions.
Best regards,
-Tom
, or are these situations legitimate bugs?
Thanks.
Best regards,
-Tom
On Sat, May 17, 2014 at 8:05 AM, via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
On Saturday, 17 May 2014 at 13:01:07 UTC, Tom Browder via
Digitalmars-d-learn wrote:
...
I just found out I can't use dmd switches for file names variable in a
GNU makefile, e.g., see
with that before too long.
Best,
-Tom
On Thu, May 15, 2014 at 9:56 PM, FrankLike via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
...
And use VisualD.
Thanks for the suggestion, Frank, but I don't do windows.
Best,
-Tom
On Fri, May 16, 2014 at 1:17 AM, Jacob Carlborg via
Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
...
On 15/05/14 23:27, Tom Browder via Digitalmars-d-learn wrote:
...
I have been looking for specific information on creating D bindings
from C headers for which there seems
On Fri, May 16, 2014 at 1:19 PM, Alex Herrmann via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
On Friday, 16 May 2014 at 10:10:17 UTC, Tom Browder via
...
Thanks for the suggestion, Frank, but I don't do windows.
...
Monodevelop (open source C# dev platform) has a plugin for D
On Fri, May 16, 2014 at 1:05 PM, Gary Willoughby via
Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
On Thursday, 15 May 2014 at 22:25:47 UTC, Tom Browder via
..
What I have not seen yet is the exact way to build a D program which
uses D bindings and its matching C library. I have
. Is that the
preferred convention? I'm asking because I saw .di used on several
D Wiki pages.
Best,
-Tom
). That's just
my opinion though and to be honest i don't think it matters. :)
Okay, Dicebot and Gary, that makes good sense I think, thanks.
So I should use the .d for the binding source files since there will
almost certainly be implementation code in them.
Best,
-Tom
On Thu, May 15, 2014 at 8:24 PM, Craig Dillabaugh via
Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
On Friday, 16 May 2014 at 01:16:46 UTC, Craig Dillabaugh wrote:
On Thursday, 15 May 2014 at 22:25:47 UTC, Tom Browder via
Digitalmars-d-learn wrote:
...
What I have not seen yet
El 18/03/2011 21:15, Stewart Gordon escribió:
On 16/03/2011 22:17, Tom wrote:
I have a D2 code that writes some stuff to the screen (usually runs in
cmd.exe
pseudo-console). When I print spanish characters they show wrong
(gibberish symbols and
so, wich corresponds to CP-1252 encoding
writeln function (and replacing all its calls)?
TIA,
Tom;
El 16/03/2011 19:27, Andrej Mitrovic escribió:
import std.c.windows.windows;
extern(Windows) BOOL SetConsoleOutputCP(UINT);
SetConsoleOutputCP(65001);
Tried a bunch of values and all yields the same result.
Thanks anyway.
El 16/03/2011 19:27, Andrej Mitrovic escribió:
Otherwise you might be interested in using the WinAPI library from
dsource which has that function prototype and many others:
http://www.dsource.org/projects/bindings/wiki/WindowsApi
Mmh, the whole winapi just for that seems a little too much. :S
El 16/03/2011 20:36, Tom escribió:
El 16/03/2011 19:27, Andrej Mitrovic escribió:
import std.c.windows.windows;
extern(Windows) BOOL SetConsoleOutputCP(UINT);
SetConsoleOutputCP(65001);
Tried a bunch of values and all yields the same result.
Thanks anyway.
Forget it, I'll just use chcp...
El 16/03/2011 21:21, Andrej Mitrovic escribió:
On 3/17/11, Tomt...@nospam.com wrote:
El 16/03/2011 20:36, Tom escribió:
El 16/03/2011 19:27, Andrej Mitrovic escribió:
import std.c.windows.windows;
extern(Windows) BOOL SetConsoleOutputCP(UINT);
SetConsoleOutputCP(65001);
Tried a bunch
What is the most efficient way of implement a rotation of ubyte[4] array?
By rotation I mean: rotateRight([1, 2, 3, 4]) - [4, 1, 2, 3]
TIA,
Tom;
El 08/03/2011 05:32, bearophile escribió:
Tom:
Am I missing something or is this another major bug?
A major bug (that is not recognized as major, I think).
I don't remember its number in bugzilla, sorry (anyone remembers it?).
See also:
http://d.puremagic.com/issues/show_bug.cgi?id=4053
El 08/03/2011 13:05, Steven Schveighoffer escribió:
On Tue, 08 Mar 2011 10:52:38 -0500, Tom t...@nospam.com wrote:
El 08/03/2011 05:32, bearophile escribió:
Tom:
Am I missing something or is this another major bug?
A major bug (that is not recognized as major, I think).
I don't remember
and access violation error).
I need to create a dynamic array of some struct, but don't want defer
contained elements initialization (for performance reasons).
Tom;
El 08/03/2011 19:03, Steven Schveighoffer escribió:
On Tue, 08 Mar 2011 16:53:08 -0500, Ali Çehreli acehr...@yahoo.com wrote:
On 03/08/2011 01:34 PM, Tom wrote:
import std.stdio;
struct S {
int i;
int j;
}
int main(string[] args) {
S[] ss = void;
ss.length = 5;
foreach (ref s; ss)
s = S(1
El 08/03/2011 21:42, Kai Meyer escribió:
On 03/08/2011 02:34 PM, Tom wrote:
import std.stdio;
struct S {
int i;
int j;
}
int main(string[] args) {
S[] ss = void;
ss.length = 5;
foreach (ref s; ss)
s = S(1, 2);
return 0;
}
Is the above code correct? (it doesn't work... it blows away or just
main.main.S.this (int i) is not
callable using argument types (int,int)
src\main.d(12): Error: expected 1 arguments, not 2 for non-variadic
function type ref S(int i)
Am I missing something or is this another major bug?
T.I.A.,
Tom;
El 05/03/2011 20:56, Jonathan M Davis escribió:
On Saturday 05 March 2011 15:37:15 Tom wrote:
I have some kind of a middle-size project written in D2. I've been
compiling always with -debug -unittest switches and, despite having to
workaround two or three bugs since the beginning, I could
El 05/03/2011 22:05, Jonathan M Davis escribió:
On Saturday 05 March 2011 16:40:02 Tom wrote:
Well, I did what you suggested with success (thanks).
Okay. I created a bug report for it:
http://d.puremagic.com/issues/show_bug.cgi?id=5708
In the meantime, I would suggest that you simply
El 01/03/2011 16:05, Ali Çehreli escribió:
On 02/28/2011 07:39 PM, Tom wrote:
foo([[1,2],[3,4],[5,6]]); // ERROR [1]
bar([[1,2],[3,4],[5,6]]); // OK
foo!int([[1,2],[3,4],[5,6]]); // OK
...
void foo(T)(T[2][] t) {
writeln(typeid(t));
}
void bar(T)(T[][] t) {
writeln(typeid(t
the error...
src\main.d(27): Error: *new StructWithConstMember(1,new C) is not mutable
So I can't return a struct that has a const member? Why? Am I missing
something something?
Thanks,
Tom;
El 03/03/2011 03:47, Ali Çehreli escribió:
On 03/02/2011 10:42 PM, Tom wrote:
I have...
int main(string[] args) {
auto s1 = f(); // MH MH
auto s2 = g(); // OK
s2.c = null; // OK
return 0;
}
class C {}
struct StructWithConstMember {
this(int i, C c) { this.i=i; this.c=c; }
int i;
const(C) c
in the
first instantiation?
Thanks in advance,
Tom;
El 24/02/2011 19:40, Tom escribió:
El 24/02/2011 09:51, Jacob Carlborg escribió:
On 2011-02-24 06:48, Tom wrote:
Hi, how can I create an empty element with current D2 std.xml Element
implementation?
stdout.writeln(new Element(foo)); // Shields foo/foo instead of
foo /
Thanks in advance,
Tom
El 25/02/2011 20:07, Jacob Carlborg escribió:
On 2011-02-25 21:11, Tom wrote:
El 24/02/2011 19:40, Tom escribió:
El 24/02/2011 09:51, Jacob Carlborg escribió:
On 2011-02-24 06:48, Tom wrote:
Hi, how can I create an empty element with current D2 std.xml Element
implementation?
stdout.writeln
El 24/02/2011 09:51, Jacob Carlborg escribió:
On 2011-02-24 06:48, Tom wrote:
Hi, how can I create an empty element with current D2 std.xml Element
implementation?
stdout.writeln(new Element(foo)); // Shields foo/foo instead of
foo /
Thanks in advance,
Tom;
http://d.puremagic.com/issues
Hi, how can I create an empty element with current D2 std.xml Element
implementation?
stdout.writeln(new Element(foo)); // Shields foo/foo instead of
foo /
Thanks in advance,
Tom;
Oops, I mean, yields :S
El 24/02/2011 02:48, Tom escribió:
Hi, how can I create an empty element with current D2 std.xml Element
implementation?
stdout.writeln(new Element(foo)); // Shields foo/foo instead of
foo /
Thanks in advance,
Tom;
what with this?:
auto arr = [foo, bar, aaa, zzz];
sort(arr);
assert(canFind(foo));
assert(canFind(aaa));
assert(!canFind(aa));
I had a Error 1 Error: module algorithem is in file 'std\algorithem.d'
which
cannot be read main.d
when I tried to
I would like to thank you for that such a great explanation of the
Template-based
programming in that unary example. I think it's great you have uploaded that to
the wiki4d, and it's definite will help a lot of people that come from other
common languages background (like C, C# and Python) that
Hi,
I am learning D for some time. I come from background of C, C# and Python.
When I saw the ways to use std.algorithem's functions, I have noticed that the
input lambda's can be writen as strings. Somewhat like the pythonic exec. I
went to the source of this feature in functional.d
Hi, I'm trying to override Object's toString. I've noted it isn't a
const method, namely:
string toString() const;
This cause me troubles when using it on a const reference.
Shouldn't it be const?
Thanks,
Tom;
Does D2 have something to check XML against XSD schemas?
Thanks.
Tom;
El 28/11/2010 04:11, Jonathan M Davis escribió:
On Saturday 27 November 2010 22:48:28 Tom wrote:
Hi,
I wonder how to solve this kind of stuff...
void foo(string[] sarray) {
// do something with sarray
}
void bar(int[] iarray) {
auto sarray = map!(to!string)(iarray);
foo
El 28/11/2010 08:19, bearophile escribió:
Tom:
What should I do? Is there some way to get the original array type?
This code shows two ways to solve your problem:
import std.stdio: writeln;
import std.algorithm: map;
import std.conv: to;
import std.traits: ForeachType;
import std.array
El 28/11/2010 20:37, Jonathan M Davis escribió:
On Sunday 28 November 2010 11:37:26 Tom wrote:
El 28/11/2010 04:11, Jonathan M Davis escribió:
On Saturday 27 November 2010 22:48:28 Tom wrote:
Hi,
I wonder how to solve this kind of stuff...
void foo(string[] sarray) {
// do something
El 29/11/2010 01:58, Jonathan M Davis escribió:
On Sunday 28 November 2010 19:53:36 Tom wrote:
I'm not criticizing ddoc color or fonts. I mean, for example, in the
index of symbols at the beginning of every ddoc page, there are
functions, constants, classes, and templates, all mixed and each
should I do? Is there some way to get the original array type?
Thanks in advance,
Tom;
will result in
calling its destructor which will close the file without your
needing to do anything about it.
That are probably the two choices I have, yes. I already have such a
cleanup function and will probably go for that.
Thanks,
Tom
. But anyway, thanks.
Tom
from using it.
Cheers,
Tom
in the destructor a segmentation fault occurs. What is the problem with
that?
Thanks in advance,
Tom
An example class to demonstrate the problem:
import std.stdio;
import std.string;
import std.stream;
class FileReader(T) {
string filename; // the name of the object file
std.stream.File file
Hi,
On 09/26/2010 07:13 PM, bearophile wrote:
Tom Kazimiers:
Do you have any suggestion how I should make
sure that the file gets closed on destruction?
Can you use scope(exit) or the std.stdio.File?
Well, I have no idea. You mentioning scope(exit) was actually the first
time I heard
to do I/O in D. I've got the D Programming Language and Tango books, but
not much there, and as a C/C++ programmer, Tango doesn't seem that appealing
:-). Is there a tutorial anywhere?
in case you did not find some example code yet:
http://www.dprogramming.com/FileTutorial.html
Regards,
Tom
Graham,
On 09/16/2010 05:02 PM, Graham Nicholls wrote:
Is this D 1.0 ? I get errors regarding printf - I understood that writeln was
the
2.0 way.
Yes, I think it's D 1.0. For a D 2.0 version I replaced those printf's
with writeln's, too.
Bye,
Tom
::istringstream ins;
ins.str(line);
ins x y z;
process_vertex(vc,x,y,z);
return;
}
That looks much cleaner to me (besides the operators). So I am
looking for sth. similar in D :-). Maybe a to!float that can cope with
numbers without decimal point.
Cheers,
Tom
.
Cheers,
Tom
On 09/08/2010 06:58 PM, Stanislav Blinov wrote:
08.09.2010 20:46, Tom Kazimiers wrote:
Great! I am looking forward to that release :-). Any idea when it will
be available?
For the mean time I will, as proposed, make a separate function that
checks if there is a dot in it or not. Then I take
to reverse the items once the array is built, you
have to change the algorithm that uses the array a little.
Unfortunately I need the elements to stay in the order I have added
them. But good to know that it would work with backward growing of the
array - do have you an example of that?
Cheers,
Tom
of the array, but only
read from it.
Thanks in advance,
Tom
--
P.s. To put a bit of context around that, here some notes on what I am
working (some questions here as well, but above is the primary one):
My first try-out project in D is an Object file reader (often used in
computer graphics
Tom S wrote:
2) Perhaps a custom-fit Delorian will do.
DeLorean, even.
Max Samukha wrote:
Tom S wrote:
And/or compile some modules without -g. Maybe you don't need debug
symbols everywhere.
And please vote for
http://d.puremagic.com/issues/votes.cgi?action=show_bugbug_id=424.
Something makes Walter think this bug is not critical.
I think he knows
Denis Koroskin wrote:
I was refactoring the following line of code:
foo(rand() % 256); - foo(0);
and that causes Optlink to crash now. Any reason why it does so?
That particular file is just 157 lines long, but the whole project is quite
big, although there are no large files. The biggest
bearophile wrote:
Lars T. Kyllingstad:
I think the compiler should be smart enough to figure this out for
itself, but until that happens you can work around it by suffixing at
least one of the integer literals with LU, so the compiler interprets
the entire expression as an ulong:
To make
76 matches
Mail list logo