Okay. If you call until like so
str.until('\')
you get a Until!(pred,string,char). I want to turn that into a string.
array() doesn't seem to do the trick right now. It used to work, but now it
gives me
main.d(47): Error: template std.array.array(Range) if (isForwardRange!
(Range)) does not
On Tue, Jun 22, 2010 at 08:38, Jonathan M Davis jmdavisp...@gmail.comwrote:
Jonathan M Davis wrote:
Okay. If you call until like so
str.until('\')
you get a Until!(pred,string,char). I want to turn that into a string.
array() doesn't seem to do the trick right now. It used to work,
On 2010-06-21 23:32, Byron Heads wrote:
When I use fork I am getting a core.thread.ThreadException: Unable to
load thread state exception.
This is dmd 2.047 on OS X
I am trying to convert a small C application.
module fork;
import core.sys.posix.unistd,
std.stdio;
void main()
{
when I run without valgrind of course, it runs faster so I don't need 4 minutes
...
in less than 1 minute, it went from ~ 64 Mbytes to ~ 400 Mbytes
--- trying with GC.collect() and GC.minimize() in main loop ... : Same result.
hmm..
Philippe Sigaud wrote:
I got this error also while installing 2.047. I think the new definition
of a forward range asks for a .save() member. And I guess some ranges
where not converted. std.range.repeat is one, like cycle. It seems like
Until is another.
Maybe for repeat/cycle that was a
On 22/06/2010 07:29, Jonathan M Davis wrote:
Okay. If you call until like so
str.until('\')
you get a Until!(pred,string,char). I want to turn that into a string.
array() doesn't seem to do the trick right now. It used to work, but now it
gives me
main.d(47): Error: template
div0 wrote:
On 22/06/2010 07:29, Jonathan M Davis wrote:
Okay. If you call until like so
str.until('\')
you get a Until!(pred,string,char). I want to turn that into a string.
array() doesn't seem to do the trick right now. It used to work, but now
it gives me
main.d(47): Error: template
On 22/06/2010 19:26, Jonathan M Davis wrote:
div0 wrote:
On 22/06/2010 07:29, Jonathan M Davis wrote:
Okay. If you call until like so
str.until('\')
you get a Until!(pred,string,char). I want to turn that into a string.
array() doesn't seem to do the trick right now. It used to work, but
Yes, why? It could be implemented in object.d in a similar fashion as
std.contracts.enforce. Does it do anything special that a library function
couldn't?
Tomek
On Tue, 22 Jun 2010 17:07:02 -0400, Tomek Sowiński j...@ask.me wrote:
Yes, why? It could be implemented in object.d in a similar fashion as
std.contracts.enforce. Does it do anything special that a library
function couldn't?
all calls to assert are removed by the compiler in release mode.
Sorry, I forgot to put some compiler output:
For the declaration: uint[string] mywords = [ Hello : 1, World : 1, Cat :
1,
Dog : 1 ];
I get:
$ dmd test_01.d
test_01.d(3): Error: non-constant expression
[Hello:1u,World:1u,Cat:1u,Dog:1u]
On Tue, 22 Jun 2010 17:30:23 -0400, Steven Schveighoffer wrote:
On Tue, 22 Jun 2010 17:07:02 -0400, Tomek Sowiński j...@ask.me wrote:
Yes, why? It could be implemented in object.d in a similar fashion as
std.contracts.enforce. Does it do anything special that a library
function couldn't?
div0 wrote:
[... snip of UTF-8 stuff ...]
The UTF char stuff is all painfully complicated, and I _think_ that I more
or less understand it, but I suspect that I don't understand it all that
well. It would be nice if the there were a page in the docs somewhere that
really explained it well.
Bernard Helyer:
AAs can't be assigned to at compile time (:[).
You can define enum ones, this works:
import std.stdio;
enum int[string] aa = [foo: 10];
void main() {
writeln(cast(bool)(foo in aa));
writeln(aa[foo]);
writeln(cast(bool)(hello in aa));
}
But this code:
import
hello,
I develop in many language such C/C++ Java etc.. and i want try with D
in c++ for example i use boost::program_option for parse command line. I search
the same thing for D language.
thanks
On 22/06/10 23:15, bioinfornatics wrote:
hello,
I develop in many language such C/C++ Java etc.. and i want try with D
in c++ for example i use boost::program_option for parse command line. I search
the same thing for D language.
thanks
If you're using D1/tango you can use
dcoder wrote:
So, I moved the initialization to inside the main function, and now
it works.
Great. I think we need to put this question in the FAQ.
For future reference, if it really needs to be global:
uint[string] mywords;
static this()
{
mywords = [ Hello : 1, World : 1, Cat : 1,
great :-)
sorry for this sutpid question i want try one project with D and i think is
hard to find the good information for D programming (yea i need buy a book too)
big thanks
Jonathan M Davis wrote:
Steven Schveighoffer wrote:
all calls to assert are removed by the compiler in release mode. I
don't
think there's a way to implement that via a library (it would be nice
though!)
Also IIRC, the compiler uses assert(0) to ensure that functions blow
up at
On Tue, 22 Jun 2010 06:32:21 +0900, Byron Heads wyverex.cyp...@gmail.com
wrote:
When I use fork I am getting a core.thread.ThreadException: Unable to
load thread state exception.
This is dmd 2.047 on OS X
I am trying to convert a small C application.
module fork;
import
On 06/22/2010 05:36 PM, Ali Çehreli wrote:
Jonathan M Davis wrote:
Steven Schveighoffer wrote:
all calls to assert are removed by the compiler in release mode. I
don't
think there's a way to implement that via a library (it would be nice
though!)
Also IIRC, the compiler uses
Am 22.06.2010 23:07, schrieb Tomek Sowiñski:
Yes, why? It could be implemented in object.d in a similar fashion as
std.contracts.enforce. Does it do anything special that a library function
couldn't?
Tomek
what about static assert?
22 matches
Mail list logo