On Monday, 28 January 2013 at 20:21:19 UTC, Philippe Sigaud wrote:
Just testing whether t.M can be assigned to something (ie, is
it a value?)
I use '_' as a variable name to indicate I don't care for
it's precise
name/value. It's just a placeholder.
Ok, I must be missing something, why "t.D"
On Tuesday, 29 January 2013 at 06:37:11 UTC, H. S. Teoh wrote:
On Tue, Jan 29, 2013 at 05:46:49AM +0100, nazriel wrote:
On Tuesday, 29 January 2013 at 00:49:07 UTC, bioinfornatics
wrote:
>I missed to show the code
>
>$ cat test_mmap.d
>import std.stdio;
>import std.mmfile;
>
>void main(string[]
Are there any build in function or must I resort to winapi ?
If I do the following... :
foreach(string foo ; bigFilesList)
{
string file = cast(string)std.file.read(foo);
}
...I run out of memory because the garbage collector apparently does not
free previously loaded files, even though there isn't any reference left
to them. ( I'm using D2.59,
On Tuesday, 29 January 2013 at 15:33:29 UTC, rsk82 wrote:
Are there any build in function or must I resort to winapi ?
args[0]?
//
import std.stdio;
void main(string[] args)
{
stdout.writeln(args[0]);
}
//
Le 29/01/2013 10:33, rsk82 a écrit :
Are there any build in function or must I resort to winapi ?
int main(string[] argv)
{
writeln(argv[0] ~ " is what you are looking for");
}
^^
On Tuesday, 29 January 2013 at 15:46:40 UTC, monarch_dodra wrote:
stdout.writeln(args[0]);
It doesn't work while I have WinMain function that then calls
myWinMain, as it is winsamp.d
Error: undefined identifier args, did you mean struct CArgs?
On Tuesday, 29 January 2013 at 15:43:00 UTC, n00b wrote:
If I do the following... :
foreach(string foo ; bigFilesList)
{
string file = cast(string)std.file.read(foo);
}
...I run out of memory because the garbage collector apparently
does not free previously loaded files, even though th
On Tue, 29 Jan 2013 15:51:08 -, rsk82 wrote:
On Tuesday, 29 January 2013 at 15:46:40 UTC, monarch_dodra wrote:
stdout.writeln(args[0]);
It doesn't work while I have WinMain function that then calls myWinMain,
as it is winsamp.d
Error: undefined identifier args, did you mean struc
On Wednesday, 17 October 2012 at 20:38:03 UTC, bearophile wrote:
Jonathan M Davis:
there's no way for the compiler to always catch it for you.<
I think there are type systems able to always catch this kind
of bug (conservative region analysis, it means that if it can't
demonstrate the memor
On Tuesday, 29 January 2013 at 05:49:37 UTC, SaltySugar wrote:
On Monday, 28 January 2013 at 21:50:24 UTC, Mike Wey wrote:
On Monday, 28 January 2013 at 19:20:00 UTC, Mike Wey wrote:
There seems to be a small bug in the code so that it fails is
the
GTK_BASEPATH doesn't end with a backslash, you
On Mon, 28 Jan 2013 05:18:26 -0500, Chris wrote:
I am sure this has been asked before, but I couldn't find a solution or
a hint via Google: I use a separate thread to play a sound file.
Everything works fine, except that I cannot tell the thread to stop what
it is doing. It refuses to rece
I have to run my program on the other computer. How to compile my
program to do that?
SaltySugar wrote:
Can someone help me? I compiled WxWidgets succesfully but when I try to
compile wxD it shows me an error:
dmc -D__DMD__ -mn -g -o+none -D -D__WXDEBUG__ -IC:\Program
Files\WxWidgets\
include -IC:\Program Files\WxWidgets\lib\dmc_lib\mswd -w- -I. -WA
-DNOPCH -HP90
-Ar -Ae -c -
On Mon, Jan 28, 2013 at 10:14 PM, H. S. Teoh wrote:
> On Mon, Jan 28, 2013 at 09:24:46PM +0100, Philippe Sigaud wrote:
>> >> Besides the wiki, see:
>> >> https://xtzgzorex.wordpress.com/2011/07/31/d-building-dmd-and-phobos-on-linux/
>> >
>> > Would you kindly add this info to the wiki? :-)
>>
>> W
Let's say I have some code that parses some text file:
int[] numbers;
foreach (lineNumber, line; lines)
numbers ~= to!int(line);
I would like to add some information to any exceptions thrown
inside the loop's body (e.g. whatever std.conv.to may throw), in
our case the line number.
Previou
On 1/29/13, Vladimir Panteleev wrote:
> foreach (lineNumber, line; lines)
> try
>numbers ~= to!int(line);
> catch (Exception e)
>throw new Exception(format("Error on line %d: %s",
> lineNumber, e.msg));
>
> Of course, this has the problem that all information (except the
>
On 01/29/2013 08:24 PM, SaltySugar wrote:
I have to run my program on the other computer. How to compile my
program to do that?
Install the Gtk+ runtime on the other machine, other than that just
copying the executable should work.
I'm assuming both machines run windows, based on you previou
On 01/29/2013 12:32 PM, Vladimir Panteleev wrote:
> I would like to add some information to any exceptions thrown inside the
> loop's body (e.g. whatever std.conv.to may throw), in our case the line
> number.
Here is a RAII idea that takes advantage of exception chaining without
directly using
I have found a performance problem on abs() that I don't
understand:
http://codepad.org/guZyeFOK
In that little program core.stdc.stdlib.abs leads to a much
faster (11 or 12 times faster with DMD on Windows32, compiling
with -O -release -inline -noboundscheck) program compared to
using std.m
On 01/29/2013 05:37 PM, Damian wrote:
> public string remove(string str, size_t start, size_t n) { }
>
> I need something like this, similar to .Net, does Phobos have this?
> I have looked at removechars in std.string and this is not suitable
for me.
> Do I need to roll my own?
Yes but it's ext
I've read more than once now that 'protected' is considered useless in
D. Why is this?
Am 27.01.2013 15:08, schrieb Namespace:
You mean the Visual Studio solution? I tried it also, but for me
only the solution above works fine.
I asked for that problem here:
http://forum.dlang.org/thread/rzvaprvvgdtwrnoto...@forum.dlang.org?page=2#post-ehulzblzddasvyxncvdb:40forum.dlang.org
can
On Tuesday, January 29, 2013 22:38:39 Chad Joan wrote:
> I've read more than once now that 'protected' is considered useless in
> D. Why is this?
I've heard some people say it (though not many), but I have no idea why anyone
would think that. You need protected if you ever want to override inter
I've been reading TDPL book and was also reading some posts on
these forums about the GC, but I wanted to clarify a few things
to make sure I am understanding correctly.
From what I understand, when an object is recovered by the GC,
the destructor may or may not be called. Why is that? Is it f
On Tuesday, 29 January 2013 at 15:51:09 UTC, rsk82 wrote:
On Tuesday, 29 January 2013 at 15:46:40 UTC, monarch_dodra
wrote:
stdout.writeln(args[0]);
It doesn't work while I have WinMain function that then calls
myWinMain, as it is winsamp.d
Error: undefined identifier args, did you mean
26 matches
Mail list logo