On 2011-05-08 23:22, Russel Winder wrote:
> On Mon, 2011-05-09 at 01:33 -0400, Nick Sabalausky wrote:
> > "Jonathan M Davis" wrote in message
>
> [ . . . ]
>
> > This is great info, and very helpful. Perhaps it could be summarized into
> > a general overview at the top of std.datetime's document
On Mon, 2011-05-09 at 01:33 -0400, Nick Sabalausky wrote:
> "Jonathan M Davis" wrote in message
[ . . . ]
>
> This is great info, and very helpful. Perhaps it could be summarized into a
> general overview at the top of std.datetime's documentation page?
My reaction was very much "This material
On 2011-05-08 22:33, Nick Sabalausky wrote:
> "Jonathan M Davis" wrote in message
> news:mailman.74.1304905547.14074.digitalmars-d-le...@puremagic.com...
>
> > On 2011-05-08 17:46, Adam D. Ruppe wrote:
> >> I decided to update my compiler today, and regret it for a lot of
> >> reasons, but meh.
>
"Jonathan M Davis" wrote in message
news:mailman.74.1304905547.14074.digitalmars-d-le...@puremagic.com...
> On 2011-05-08 17:46, Adam D. Ruppe wrote:
>> I decided to update my compiler today, and regret it for a lot of
>> reasons, but meh.
>>
>> One of the things is std.datetime. A lot of my code
On 2011-05-08 21:29, Adam D. Ruppe wrote:
> Jonathan M Davis wrote:
> > I would point out though that'll be a while before std.date and its
> > related functions actually go away, so any code which needs to be
> > converted to std.datetime definitely has time to be reworked
> > however is appropria
Jonathan M Davis wrote:
> I would point out though that'll be a while before std.date and its
> related functions actually go away, so any code which needs to be
> converted to std.datetime definitely has time to be reworked
> however is appropriate.
Yeah, but I figure it's better to do it sooner
I guess this should do it:
const(wchar)* toUTF16z(in dchar[] s)
{
return (toUTF16(s) ~ "\000").ptr;
}
toUTF16 can take a char[], wchar[] or dchar[].
But toUTF16z can only take a char[]. Why?
I'm storing some text as dchar[] internally and have to pass it to WinAPI
Unicode functions which expect null-terminated UTF16 strings. But toUTF16z only
works with char[] for some reason.
I would point out though that'll be a while before std.date and its related
functions actually go away, so any code which needs to be converted to
std.datetime definitely has time to be reworked however is appropriate.
Currently, they're scheduled for deprecation, which just results in the
comp
On 2011-05-08 17:46, Adam D. Ruppe wrote:
> I decided to update my compiler today, and regret it for a lot of
> reasons, but meh.
>
> One of the things is std.datetime. A lot of my code uses std.date. It
> works very, very well for me and I like it.
>
> But, the compile process is nagging me abou
import std.stdio;
import std.array;
import std.range;
import std.algorithm;
void main()
{
auto arr = [64, 64, 64, 32, 31, 16, 32, 33, 64];
auto newarr = arr[];
bool state = true;
while (arr.length)
{
newarr = state ? array(until!("a < 32")(arr))
I decided to update my compiler today, and regret it for a lot of
reasons, but meh.
One of the things is std.datetime. A lot of my code uses std.date. It
works very, very well for me and I like it.
But, the compile process is nagging me about it. I want it to shut up.
However, I'm not even sure
On 08/05/2011 19:19, Lutger Blijdestijn wrote:
test also doesn't compile normally on my box, dmd errors on Foo.tupleof. Not
sure if this is illegal or not. I think you want the allMembers trait or
something similar. Something like this:
import std.traits;
string test(T)()
{
string str = "s
On 08/05/2011 20:42, Nick Sabalausky wrote:
"Spacen Jasset" wrote in message
news:iq69q1$1ack$1...@digitalmars.com...
It should work,but again is depends what your target platform is. It's
quite important that - Even on windows. At the company I am now
contracting for we compile the software a
> On 5/8/2011 4:05 AM, Jonathan M Davis wrote:
> >> Sean Cavanaugh:
> >>> So I was learning how to make a module of mine very strict with
> >>> private
> >>>
> >>> parts, and was surprised I could only do this with global variables and
> >>> functions. Enums, structs, and classes are fully v
"Spacen Jasset" wrote in message
news:iq69q1$1ack$1...@digitalmars.com...
>
> It should work,but again is depends what your target platform is. It's
> quite important that - Even on windows. At the company I am now
> contracting for we compile the software agents using visual studio 2003
> bec
"Jacob Carlborg" wrote in message
news:iq6llk$20ch$1...@digitalmars.com...
> On 2011-05-08 19:50, Jacob Carlborg wrote:
>> On 2011-04-29 22:02, Nick Sabalausky wrote:
>>> I'm having a rediculously hard time trying to find a CentOS 3
>>> installation
>>> disc image (or any other version before 5.6
"Adam D. Ruppe" wrote in message
news:iq6osh$25di$1...@digitalmars.com...
> Nick Sabalausky wrote:
>> Actually, I did have to remove the HTTP status code output from my
>> little hello world cgi test in forder for Apache to not throw up a
>> 500.
>
> HTTP status is normally done with a Status: he
Nick Sabalausky wrote:
> Actually, I did have to remove the HTTP status code output from my
> little hello world cgi test in forder for Apache to not throw up a
> 500.
HTTP status is normally done with a Status: header in cgi. (Actually
writing the line works too but only with certain settings.)
Robert Clipsham wrote:
> Hey all,
>
> I was wondering if anyone could enlighten me as to why the following
> code does not compile (dmd2, latest release or the beta):
>
> struct Foo
> {
> int a;
> }
>
> string test()
> {
> string str = "struct " ~ Foo.stringof ~ "_{";
>
Thanks, group seems to work fine too.
On 2011-05-08 19:50, Jacob Carlborg wrote:
On 2011-04-29 22:02, Nick Sabalausky wrote:
I'm having a rediculously hard time trying to find a CentOS 3
installation
disc image (or any other version before 5.6). This is the closest I've
been
able to find:
Have a look at this: http://vault.centos.o
On 2011-04-29 22:02, Nick Sabalausky wrote:
I'm having a rediculously hard time trying to find a CentOS 3 installation
disc image (or any other version before 5.6). This is the closest I've been
able to find:
Have a look at this: http://vault.centos.org/
--
/Jacob Carlborg
On 2011-05-06 21:05, Robert Clipsham wrote:
On 06/05/2011 19:40, Jacob Carlborg wrote:
No, D implicitly casts string literals to zero-terminated const(char)*.
That part is fine.
-Steve
Since when?
Since const was introduced, before then they implicitly casted to char*
instead. And that has
On 07/05/2011 18:09, %u wrote:
In Patterns of Human Error, the slide 31 point that you should replce int with
size_t
why that consider an error ?
For those who aren't sure what this is on about:
http://www.slideshare.net/dcacm/patterns-of-human-error
But the short answer is because dim is a si
On 08/05/2011 09:41, bearophile wrote:
Andrej Mitrovic:
I think the compiler should check catch these mistakes at compile-time.
I suggest to add an enhancement request in Bugzilla. Bugzilla entries are a form of
"voting" by themselves too.
One should not file stuff in Bugzilla without fir
Sean Cavanaugh:
> With the language the way it is now, it is nonsensical to have the
> attributes public/protected/package/private/export precede the keyword
> struct, class, or enum.
It's an implementation bug or a design bug. If it's not already in Bugzilla
then it deserves to be there.
Bye
On 08/05/2011 12:59, Nick Sabalausky wrote:
"Nick Sabalausky" wrote in message
news:iq2g72$ngp$1...@digitalmars.com...
Aggg!!! God damnnit, I officially fucking hate linux now... (not that
I'm a win, mac or bsd fan, but whatever...)
I temporarily gave up trying to actually get ahold of an
On 5/8/2011 4:05 AM, Jonathan M Davis wrote:
Sean Cavanaugh:
So I was learning how to make a module of mine very strict with private
parts, and was surprised I could only do this with global variables and
functions. Enums, structs, and classes are fully visible outside the
module rega
"Nick Sabalausky" wrote in message
news:iq60qt$pm0$1...@digitalmars.com...
>
> I downloaded 4.2 (picked pretty much at random), installed it in
> VirtualBox, compiled a trivial test C program in the included GCC,
> uploaded that to the server, and it worked! :)
>
Actually, I did have to remove
"Nick Sabalausky" wrote in message
news:iq2g72$ngp$1...@digitalmars.com...
>
> Aggg!!! God damnnit, I officially fucking hate linux now... (not that
> I'm a win, mac or bsd fan, but whatever...)
>
> I temporarily gave up trying to actually get ahold of an old distro, so I
> tried the other
> Jonathan M Davis:
> > They're private _access_ but still visible.
>
> In my opinion this is not good, it looks like a messy special case.
>
> > I believe that it's necessary for stuff like
> > where various functions in std.algorithm return auto and return a private
> > struct which you cannot
Jonathan M Davis:
> They're private _access_ but still visible.
In my opinion this is not good, it looks like a messy special case.
> I believe that it's necessary for stuff like
> where various functions in std.algorithm return auto and return a private
> struct which you cannot construct yo
> Sean Cavanaugh:
> > So I was learning how to make a module of mine very strict with private
> >
> > parts, and was surprised I could only do this with global variables and
> > functions. Enums, structs, and classes are fully visible outside the
> > module regardless of being wrapped in a p
Andrej M.:
> I want to turn this:
> auto arr = [1, 1, 2, 3, 4, 4];
>
> into this:
> auto arr2 = [[1, 1], [2], [3], [4, 4]];
>
> I want an array of arrays of the same elements. Lazy or not, I don't care.
Currently if you use group like this:
writeln(arr.group());
You get:
[Tuple!(int,uint)(1, 2
Sean Cavanaugh:
> So I was learning how to make a module of mine very strict with private
> parts, and was surprised I could only do this with global variables and
> functions. Enums, structs, and classes are fully visible outside the
> module regardless of being wrapped in a private{}
Andrej Mitrovic:
> I think the compiler should check catch these mistakes at compile-time.
I suggest to add an enhancement request in Bugzilla. Bugzilla entries are a
form of "voting" by themselves too.
Bye,
bearophile
So I was learning how to make a module of mine very strict with private
parts, and was surprised I could only do this with global variables and
functions. Enums, structs, and classes are fully visible outside the
module regardless of being wrapped in a private{} or prefixed with
private. Am
38 matches
Mail list logo