DCD 0 symbols cached?

2019-04-10 Thread Tom via Digitalmars-d-learn
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 v0

Re: Reading bzipped files

2015-05-02 Thread tom via Digitalmars-d-learn
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 St

Re: Startup files for STM32F4xx

2015-04-24 Thread tom via Digitalmars-d-learn
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

Re: Startup files for STM32F4xx

2015-04-24 Thread tom via Digitalmars-d-learn
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 or

Re: Startup files for STM32F4xx

2015-04-24 Thread tom via Digitalmars-d-learn
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 mysel

Re: Cannot alias null

2014-06-13 Thread Tom Browder via Digitalmars-d-learn
On Fri, Jun 13, 2014 at 10:15 AM, monarch_dodra via Digitalmars-d-learn 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 doe

Re: Cannot alias null

2014-06-13 Thread Tom Browder via Digitalmars-d-learn
On Fri, Jun 13, 2014 at 7:59 AM, via Digitalmars-d-learn 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

Re: Core dump with dstep on 64-bit Linux (Debian 7): testers needed

2014-06-12 Thread Tom Browder via Digitalmars-d-learn
On Thu, Jun 12, 2014 at 5:17 PM, Dicebot via Digitalmars-d-learn 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

Re: Cannot alias null

2014-06-12 Thread Tom Browder via Digitalmars-d-learn
On Thu, Jun 12, 2014 at 4:58 PM, Adam D. Ruppe via Digitalmars-d-learn 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

Core dump with dstep on 64-bit Linux (Debian 7): testers needed

2014-06-12 Thread Tom Browder via Digitalmars-d-learn
b-carlborg/dstep/issues/26#issuecomment-45435438 Thanks. Best regards, -Tom

Re: Cannot alias null

2014-06-12 Thread Tom Browder via Digitalmars-d-learn
On Thu, Jun 12, 2014 at 4:17 PM, Ali Çehreli 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

Re: Cannot alias null

2014-06-12 Thread Tom Browder via Digitalmars-d-learn
On Thu, Jun 12, 2014 at 3:42 PM, H. S. Teoh via Digitalmars-d-learn 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

Cannot alias null

2014-06-12 Thread Tom Browder via Digitalmars-d-learn
cannot be aliased? Thanks, Best, -Tom

D aliases vs. C typedefs

2014-06-10 Thread Tom Browder via Digitalmars-d-learn
) ? I have marked with question marks the ones I'm not sure how to interpret, although I have given my somewhat educated guess. Confirmation or correction would be very helpful. If we get a consensus, I'll update the wiki. Thanks, Best regards, -Tom

Re: Building any stand-alone ddoc [SOLVED]

2014-06-08 Thread Tom Browder via Digitalmars-d-learn
On Sat, Jun 7, 2014 at 10:59 AM, Tom Browder 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-Language/dla

Building any stand-alone ddoc

2014-06-07 Thread Tom Browder via Digitalmars-d-learn
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

Re: Seeking Advice on D Bindings for Large C Library Collection

2014-05-20 Thread Tom Browder via Digitalmars-d-learn
On Tue, May 20, 2014 at 6:10 AM, Rikki Cattermole via Digitalmars-d-learn wrote: > On 20/05/2014 10:36 p.m., Tom Browder via Digitalmars-d-learn wrote: >> I am working on a project to provide D binding files for the C/C++ >> FOSS BRL-CAD project: ... >> (also with sub-dirs

Seeking Advice on D Bindings for Large C Library Collection

2014-05-20 Thread Tom Browder via Digitalmars-d-learn
e dependency-graveyard here, but it's been an interesting walk so far. However, I will appreciate any thoughts on the directory layout and file and module naming conventions. Best regards, -Tom

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-17 Thread Tom Browder via Digitalmars-d-learn
or help with that before too long. Best, -Tom

Re: Problems with dmd Switches in Makefiles

2014-05-17 Thread Tom Browder via Digitalmars-d-learn
On Sat, May 17, 2014 at 8:05 AM, via Digitalmars-d-learn 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 this fragm

Problems with dmd Switches in Makefiles

2014-05-17 Thread Tom Browder via Digitalmars-d-learn
an apt package management system). Am I missing something, or are these situations legitimate bugs? Thanks. Best regards, -Tom

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-16 Thread Tom Browder via Digitalmars-d-learn
-H compiler switch). 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

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-16 Thread Tom Browder via Digitalmars-d-learn
the preferred convention? I'm asking because I saw ".di" used on several D Wiki pages. Best, -Tom

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-16 Thread Tom Browder via Digitalmars-d-learn
On Fri, May 16, 2014 at 1:05 PM, Gary Willoughby via Digitalmars-d-learn 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 just create

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-16 Thread Tom Browder via Digitalmars-d-learn
On Fri, May 16, 2014 at 1:19 PM, Alex Herrmann via Digitalmars-d-learn 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 by ..

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-16 Thread Tom Browder via Digitalmars-d-learn
On Fri, May 16, 2014 at 1:17 AM, Jacob Carlborg via Digitalmars-d-learn 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 to be suffici

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-16 Thread Tom Browder via Digitalmars-d-learn
On Thu, May 15, 2014 at 9:56 PM, FrankLike via Digitalmars-d-learn wrote: ... > And use VisualD. Thanks for the suggestion, Frank, but I don't do windows. Best, -Tom

Re: D Newbie Trying to Use D with Major C Libraries

2014-05-15 Thread Tom Browder via Digitalmars-d-learn
On Thu, May 15, 2014 at 8:24 PM, Craig Dillabaugh via Digitalmars-d-learn 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 i

D Newbie Trying to Use D with Major C Libraries

2014-05-15 Thread Tom Browder via Digitalmars-d-learn
ject. The page link is here: http://wiki.dlang.org/Using_C_libraries_for_a_D_program I would appreciate it if an experienced D user would correct that recipe so it should compile the desired binary source correctly (assuming no errors in the input files). Thanks for any help. Best regards, -Tom

Re: Unicode -> Windows 1252

2011-03-21 Thread Tom
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). Is

Re: Unicode -> Windows 1252

2011-03-16 Thread Tom
El 16/03/2011 21:21, Andrej Mitrovic escribió: On 3/17/11, Tom 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 of values and all

Re: Unicode -> Windows 1252

2011-03-16 Thread Tom
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...

Re: Unicode -> Windows 1252

2011-03-16 Thread Tom
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

Re: Unicode -> Windows 1252

2011-03-16 Thread 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.

Unicode -> Windows 1252

2011-03-16 Thread Tom
writeln function (and replacing all its calls)? TIA, Tom;

Re: Best way in D2 to rotate a ubyte[4] array

2011-03-09 Thread Tom
El 09/03/2011 20:25, bearophile escribió: Tom: 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] Two versions, I have done no benchmarks so far: import std.c.stdio: printf; union Four { ubyte[4

Best way in D2 to rotate a ubyte[4] array

2011-03-09 Thread Tom
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;

Re: Dynamic array void initialization

2011-03-08 Thread Tom
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

Re: Dynamic array void initialization

2011-03-08 Thread Tom
El 08/03/2011 19:03, Steven Schveighoffer escribió: On Tue, 08 Mar 2011 16:53:08 -0500, Ali Çehreli 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, 2); return 0

Dynamic array void initialization

2011-03-08 Thread Tom
e 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;

Re: Struct constructor and opCall confussion

2011-03-08 Thread Tom
El 08/03/2011 13:05, Steven Schveighoffer escribió: On Tue, 08 Mar 2011 10:52:38 -0500, Tom 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 its numb

Re: Struct constructor and opCall confussion

2011-03-08 Thread 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

Struct constructor and opCall confussion

2011-03-07 Thread Tom
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;

Re: Release build headache: -inline

2011-03-05 Thread Tom
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 not

Re: Release build headache: -inline

2011-03-05 Thread 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

Release build headache: -inline

2011-03-05 Thread Tom
ntifier for declarator Identity!(field[Identity!(field[Identity!(field[Identity!(field[Identity!(field[0])])])])]) E:\d\dmd2\windows\bin\..\..\src\phobos\std\typecons.d(364): semicolon expected, not 'EOF' If I remove -inline, it compiles, but I need performance and to track this DMD bug at this point is too damn hard. Any suggestions? :'( Sometimes I have sinful thoughts and I regret having done this in D... But now is too late. Thanks in advance, Tom;

Re: Struct reference returning function and const members

2011-03-02 Thread 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

Struct reference returning function and const members

2011-03-02 Thread Tom
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;

Re: Template argument deduction

2011-03-02 Thread Tom
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(

Template argument deduction

2011-02-28 Thread Tom
n the first instantiation? Thanks in advance, Tom;

Re: std.xml empty element

2011-02-25 Thread 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

Re: std.xml empty element

2011-02-25 Thread 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 instead of Thanks in advance, T

Re: std.xml empty element

2011-02-24 Thread Tom
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 instead of Thanks in advance, Tom; http://d.puremagic.com/issues/sh

Re: std.xml empty element

2011-02-23 Thread 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 instead of Thanks in advance, Tom;

std.xml empty element

2011-02-23 Thread Tom
Hi, how can I create an empty element with current D2 std.xml Element implementation? stdout.writeln(new Element("foo")); // Shields instead of Thanks in advance, Tom;

How to call binary functions on primitive on runtime?

2011-02-12 Thread Tom
how can I make an implementation of some thing like Foo: >> assert(Foo("+", 1, 2) == 1+2); >> assert(Foo("*", 3, 2) == 3*2); without writing a long switch with case for each operator like: >> switch (oper) { >> case "+": return a+b; >> .. >> } I know how to implementation a compile-time equival

Re: using a binary tree container

2011-02-11 Thread 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

Re: How can you read and understand the source of *naryFun in functional.d?

2011-01-30 Thread Tom
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 do

How can you read and understand the source of *naryFun in functional.d?

2011-01-29 Thread Tom
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 ("https://gi

toString why not const

2011-01-21 Thread Tom
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;

XSDs?

2010-12-11 Thread Tom
Does D2 have something to check XML against XSD schemas? Thanks. Tom;

Re: Map and arrays

2010-11-28 Thread Tom
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

Re: Map and arrays

2010-11-28 Thread Tom
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

Re: Map and arrays

2010-11-28 Thread Tom
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

Re: Map and arrays

2010-11-28 Thread 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

Map and arrays

2010-11-27 Thread Tom
should I do? Is there some way to get the original array type? Thanks in advance, Tom;

Re: BufferedFile.write

2010-11-19 Thread Tom
El 20/11/2010 02:52, Tom escribió: Hi, In D2: Stream file = new BufferedFile("sample.txt"); file.write("hello"); file.close(); Produces... src\gie2\main.d(11): Error: function std.stream.Stream.write called with argument types: ((string)) matches both: std.stream.Stream.w

BufferedFile.write

2010-11-19 Thread Tom
Hi, In D2: Stream file = new BufferedFile("sample.txt"); file.write("hello"); file.close(); Produces... src\gie2\main.d(11): Error: function std.stream.Stream.write called with argument types: ((string)) matches both: std.stream.Stream.write(const(char)[] s) and: std.

Re: Segmentation fault on closing file in destructor

2010-09-28 Thread Tom Kazimiers
only be opened if in use or if one wants to prevent others from using it. Cheers, Tom

Re: Segmentation fault on closing file in destructor

2010-09-28 Thread Tom Kazimiers
estrution of the class, so this will no be working. But anyway, thanks. Tom

Re: Segmentation fault on closing file in destructor

2010-09-28 Thread Tom Kazimiers
entually the GC > will collect the std.stream.File instance which 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

Re: Segmentation fault on closing file in destructor

2010-09-26 Thread Tom Kazimiers
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 a

Re: Segmentation fault on closing file in destructor

2010-09-26 Thread Tom Kazimiers
ow I should make sure that the file gets closed on destruction? Cheers, Tom

Segmentation fault on closing file in destructor

2010-09-26 Thread Tom Kazimiers
all 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.s

Re: FIle I/O

2010-09-16 Thread Tom Kazimiers
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

Re: FIle I/O

2010-09-16 Thread Tom Kazimiers
some example code yet: http://www.dprogramming.com/FileTutorial.html Regards, Tom

Re: Convert strings with different format to float

2010-09-08 Thread Tom Kazimiers
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 >> chec

Re: Convert strings with different format to float

2010-09-08 Thread Tom Kazimiers
e of weeks (in svn). In the meantime (of waiting for upcoming release) I will, as Jonathan suggested, create a wrapper function. Cheers, Tom

Re: Convert strings with different format to float

2010-09-08 Thread Tom Kazimiers
Hi, On 09/08/2010 05:38 PM, Don wrote: > Pelle wrote: >> On 09/08/2010 09:23 AM, Tom Kazimiers wrote: >>> [ ..] >>> Maybe a to!float that can cope with >>> numbers without decimal point. >> >> You seem to have found a bug in to!float :-) >>

Convert strings with different format to float

2010-09-08 Thread Tom Kazimiers
king for sth. similar in D :-). Maybe a to!float that can cope with numbers without decimal point. Cheers, Tom

Re: Fast temporary dynamic arrays? (And slicing of them)

2010-09-07 Thread Tom Kazimiers
ple of that? Cheers, Tom

Re: Fast temporary dynamic arrays? (And slicing of them)

2010-09-07 Thread Tom Kazimiers
> > Passing dynamic arrays to functions passes the reference. Thanks for your clarification and examples, that made the whole array handling clearer to me. On 09/07/2010 02:56 PM, Steven Schveighoffer wrote: > On Sun, 05 Sep 2010 22:41:50 -0400, bearophile wrote: >> Tom Kazimiers: &g

Fast temporary dynamic arrays? (And slicing of them)

2010-09-05 Thread Tom Kazimiers
ill not modifiy contents 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 co

Re: Access original data from array [OT]

2009-09-30 Thread Tom S
Tom S wrote: 2) Perhaps a custom-fit Delorian will do. DeLorean, even.

Re: Access original data from array

2009-09-30 Thread Tom S
Moritz Warning wrote: Hi, how can I access the original value for xs? I assume that xs is allocated at program start, because I don't get an access violation on gnu/linux when I reassign values. But how can I access the original value? Do I have to keep a copy before xs is modified? import ta

Re: looking for an IDE

2009-09-30 Thread Tom S
Phil Deets wrote: What's with the exceptions? Am I doing something wrong? I am using D 2.032 Looks like running with "-?" caused it to create an empty ".deps" file and later trying to access it yields this exception. I'll look into it in a spare moment. Deleting the ".deps" file fixes the iss

Re: What if gc.disable at all

2009-09-24 Thread Tom S
BCS wrote: Hello Sam, Greeting to everybody, If this is too silly a question,please just ignore it. I was wondering what if GC is turned off during the lifetime of the application?Just as if D is a better,safer/unsafer C with class?Can't work?Or some special stuff need to handle? There are

Re: Any way to workaround Optlink crash?

2009-09-01 Thread Tom S
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_bug&bug_id=424. Something makes Walter think this bug is not critical. I think he kno

Re: Any way to workaround Optlink crash?

2009-08-31 Thread Tom S
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

Re: Strange calculation problem

2009-08-25 Thread Tom S
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 thi

Re: How to release memory? (D2.0.30)

2009-07-05 Thread Tom S
AxelS wrote: @downs: That's what I even had beforejust allocate and release memory is not difficult - just if you want to access the data the GC copies all the memory into its heap... Can you recommend a good crack dealer? ;) Seriously, there are no GC calls associated with memory acces