std.widows.registry

2012-08-22 Thread Kai Meyer
If I try to modify a registry value with 'key.setValue()', I get an error 5, which I think is ERROR_ACCESS_DENIED. Even if I right click my .exe and choose 'run as Administrator'. I am on Windows 7 x64, and dmd 2.060. From my research, I think I have to modify my privilege tokens:

Link against MinGW libraries

2012-08-22 Thread Kai Meyer
There's got to be a way to link against libraries generated by MinGW, right? I'm using CMake to create a very simple 1 method library. If I tell D to link against the .lib (simple ar archive), it complains that it's an invalid library. If I tell D to link against the .dll, it complains that

Re: std.widows.registry

2012-08-22 Thread Kai Meyer
On Wednesday, 22 August 2012 at 14:52:00 UTC, Kai Meyer wrote: If I try to modify a registry value with 'key.setValue()', I get an error 5, which I think is ERROR_ACCESS_DENIED. Even if I right click my .exe and choose 'run as Administrator'. I am on Windows 7 x64, and dmd 2.060. From my

Re: Let's stop parser Hell

2012-08-06 Thread Kai Meyer
On 07/31/2012 03:27 PM, Dmitry Olshansky wrote: On 31-Jul-12 20:10, Kai Meyer wrote: On 07/05/2012 06:11 AM, Denis Shelomovskij wrote: There are more and more projects requiring parsing D code (IDE plugins, DCT and dfmt now). We definitely need a _standard_ fast D parser (suitable

Re: Let's stop parser Hell

2012-07-31 Thread Kai Meyer
haven't tried to build it on Windows yet, but I don't see anything that immediately jumps out as not cross-platform. I've been working on it on both Fedora and CentOS. -Kai Meyer

Re: Segmentation fault hell in D

2012-06-08 Thread Kai Meyer
On 06/08/2012 11:30 AM, Jarl André jarl.an...@gmail.com wrote: Evry single time I encounter them I yawn. It means using the next frickin hour to comment away code, add more log statements and try to eleminate whats creating the hell of bugz, segmantation fault. Why can't the compiler tell me

CMake for D

2012-02-13 Thread Kai Meyer
I have some D code that I would like to integrate into an existing CMake infrastructure. I've seen these two projects: http://www.dsource.org/projects/cmaked http://plplot.svn.sourceforge.net/viewvc/plplot/trunk/cmake/modules/language_support/cmake/Platform/ Both are quite old. Can anybody

Re: Damn C++ and damn D!

2012-02-10 Thread Kai Meyer
lambda instead of macro? On 02/05/2012 07:57 AM, Timon Gehr wrote: On 02/05/2012 03:53 PM, so wrote: On Sunday, 5 February 2012 at 14:24:20 UTC, Timon Gehr wrote: This should work: #define DOTDOTDOT ... templateclass T void fun(T a){ if(condT::value) { auto var = make(a); DOTDOTDOT; }else{

Re: Using in with associative arrays and then indexing them (efficiency)

2012-01-03 Thread Kai Meyer
On 01/03/2012 04:07 AM, Jonathan M Davis wrote: On Tuesday, January 03, 2012 11:52:13 Matej Nanut wrote: Hello everyone, I would like to know whether if (symbol in symbols) return symbols[symbol]; is any less efficient than auto tmp = symbol in symbols;

Re: newbie question: Can D do this?

2011-12-19 Thread Kai Meyer
On 12/19/2011 09:17 AM, clk wrote: Hello, I'm new to this mailing list. I'm trying to learn D to eventually use it in production code. I'm a little bit intimidated by the fact that the topics in the d-learn list look rather advanced to a newbie like me. I have 3 fairly simple questions: 1) Does

Re: DMD 1.072 and DMD 2.057 64bit on Mac OS X

2011-12-14 Thread Kai Meyer
On 12/14/2011 09:51 AM, Alex Rønne Petersen wrote: On 14-12-2011 14:11, Vladimir Panteleev wrote: On Wednesday, 14 December 2011 at 11:07:22 UTC, Alex Rønne Petersen wrote: No point maintaining something that won't be used. I would also imagine that it can't be long before Windows stops

Re: Download file via http

2011-12-13 Thread Kai Meyer
On 12/13/2011 10:39 AM, Vladimir Panteleev wrote: On Tuesday, 13 December 2011 at 17:29:20 UTC, Kai Meyer wrote: I get bytes_needed from the Content-Length header. The I get the correct number of bytes from the Content-Length, bytes_needed gets the right value, but the resulting file isn't

Re: Download file via http

2011-12-13 Thread Kai Meyer
On 12/13/2011 11:10 AM, Regan Heath wrote: On Tue, 13 Dec 2011 17:58:57 -, Kai Meyer k...@unixlords.com wrote: On 12/13/2011 10:39 AM, Vladimir Panteleev wrote: On Tuesday, 13 December 2011 at 17:29:20 UTC, Kai Meyer wrote: I get bytes_needed from the Content-Length header. The I get

Re: Why D const is annoying

2011-12-12 Thread Kai Meyer
On 12/10/2011 03:52 AM, Timon Gehr wrote: On 12/10/2011 11:45 AM, bearophile wrote: Timon Gehr: Just slice the const array to get a range. The specialization for ranges does not have the bug. import std.algorithm; void main() { const arr = [1, 2, 3]; reduce!a*b(arr[]); // It works. }

std.json dynamic initialization of JSONValue

2011-12-06 Thread Kai Meyer
I posted this on D.learn, but got no responses. I'm hoping it's because I'm asking the wrong crowd. I'm finding std.json extremely well written, with one glaring exception. I can't seem to figure out how to do this: JSONValue root = JSONValue(null, JSON_TYPE.OBJECT); root.object[first_object]

Re: std.json dynamic initialization of JSONValue

2011-12-06 Thread Kai Meyer
already exist in std.json? -Kai Meyer

std.json dynamic initialization of JSONValue

2011-12-01 Thread Kai Meyer
I'm finding std.json extremely well written, with one glaring exception. I can't seem to figure out how to do this: JSONValue root = JSONValue(null, JSON_TYPE.OBJECT); root.object[first_object] = JSONValue(null, JSON_TYPE.OBJECT); root.object[first_string] = JSONValue(first_string,

Re: A real Forum for D

2011-11-29 Thread Kai Meyer
On 11/27/2011 10:41 AM, alex wrote: Hi folks, I just wondered why there still is this uncomfortable and obviously outdated newsgroup software in use. Perhaps it'd be more contemporary to have a 'real' browser-based forum to which everyone can register and post D-related questionsanswers.

Re: A real Forum for D

2011-11-29 Thread Kai Meyer
to get serious, they can spend the 10 minutes it takes to configure an NNTP client, and feel it was time worth spent. -Kai Meyer

Re: A real Forum for D

2011-11-29 Thread Kai Meyer
On 11/29/2011 02:34 PM, Jonathan M Davis wrote: On Tuesday, November 29, 2011 14:25:33 Kai Meyer wrote: On 11/29/2011 01:08 PM, Walter Bright wrote: On 11/29/2011 10:52 AM, Jonathan M Davis wrote: On Tuesday, November 29, 2011 08:58:59 Sean Kelly wrote: The iPhone news reader is passable

Re: About File.rawWrite

2011-11-29 Thread Kai Meyer
. Ofcourse my dev machine is an 8 core i7 with 16 GB of ram. -Kai Meyer

Re: Queue thread

2011-11-22 Thread Kai Meyer
On 11/21/2011 11:27 AM, Andrej Mitrovic wrote: How come you don't have any threads per CPU? I guess this is a difference between multi-processor and multi-core machines maybe? I don't know, I'm not much of a hardware guy. Here's the 8th CPU's entry from /proc/cpuinfo. This is a Dell Optiplex

Re: DFastCGI

2011-11-22 Thread Kai Meyer
On 11/22/2011 07:26 AM, bioinfornatics wrote: dear, i started to interface fastcgi to D https://github.com/bioinfornatics/DFastCGI They are a Readme and some example for quick start at this time take example from examples/test3_fcgiapp.d Any help are welcome Thanks I don't see a

Re: Queue thread

2011-11-21 Thread Kai Meyer
On 11/20/2011 02:36 PM, bioinfornatics wrote: Le dimanche 20 novembre 2011 à 03:09 -0800, Jonathan M Davis a écrit : On Sunday, November 20, 2011 11:59:14 bioinfornatics wrote: Dear, I would like to know if they are a way to run run a queue thread an run (nb core * 2 + 1) = nb thread in same

Re: Smartest way to read a number?

2011-11-10 Thread Kai Meyer
I don't get the exception on Linux after a new line, I have to wait until EOF, which is typically the end of the program if reading from STDIN. Not very useful. import std.stdio; T readNumber(T)() { T result; stdin.readf(%s, result); return result; } void main() { try {

Re: Just starting out

2011-10-18 Thread Kai Meyer
On 10/13/2011 01:37 AM, J Arrizza wrote: Thanks for all the replies. Seems straightforward enough: 1) Phobos is it. 2) DMD is the clear winner 3) Eclipse is a hog - knew that. I really only like a couple of things in it. A big one for me is the source formatting. For some reason, having to hit

Re: D in the TIOBE top

2011-09-14 Thread Kai Meyer
On 09/14/2011 11:24 AM, Andrei Alexandrescu wrote: On 09/14/2011 12:18 PM, Marco Leise wrote: Am 14.09.2011, 15:02 Uhr, schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 9/14/11 6:22 AM, bioinfornatics wrote: It is a good news. This news appear in same time where fedora add D2 in

Re: making a really simple dll.

2011-08-18 Thread Kai Meyer
original simple 1 function d file compiles to a dll. Same goes for the Linux side. Default constructor and destructors that initialize and destroy the D runtime if there aren't any defined at the end of the compilation. -Kai Meyer

Re: Thoughts on std.system.OS

2011-08-15 Thread Kai Meyer
On 08/13/2011 04:23 AM, Jonathan M Davis wrote: On Saturday, August 13, 2011 13:18:29 Vladimir Panteleev wrote: On Sat, 13 Aug 2011 08:08:09 +0300, Jonathan M Davisjmdavisp...@gmx.com wrote: Thoughts on std.system.OS? Is there a good reason to leave it? In principle, it's a nice idea, but I

Re: Thoughts on std.system.OS

2011-08-15 Thread Kai Meyer
On 08/13/2011 11:16 AM, Jonathan M Davis wrote: On Saturday, August 13, 2011 14:49:13 Vladimir Panteleev wrote: On Sat, 13 Aug 2011 14:23:35 +0300, Jonathan M Davisjmdavisp...@gmx.com wrote: It does on at least some distros. TIL... Except that you need useful, understandable version

Re: Thoughts on std.system.OS

2011-08-15 Thread Kai Meyer
On 08/14/2011 01:20 PM, Jonathan M Davis wrote: On Sunday, August 14, 2011 19:24:21 Vladimir Panteleev wrote: On Sun, 14 Aug 2011 02:47:21 +0300, Jonathan M Davisjmdavisp...@gmx.com wrote: Personally, I'm inclined to drop the Os enum along with the os and os_major and os_minor variables,

Re: We have slices, do we have Strides?

2011-08-09 Thread Kai Meyer
On 08/08/2011 05:25 PM, Steven Schveighoffer wrote: On Mon, 08 Aug 2011 18:33:55 -0400, Kai Meyer k...@unixlords.com wrote: On 08/08/2011 12:55 PM, Jonathan M Davis wrote: I have a problem I'd really like to use Strides for to simplify my code. Currently, I do this: foreach(n; 0..chunks

Re: We have slices, do we have Strides?

2011-08-09 Thread Kai Meyer
On 08/08/2011 05:25 PM, Steven Schveighoffer wrote: On Mon, 08 Aug 2011 18:33:55 -0400, Kai Meyer k...@unixlords.com wrote: On 08/08/2011 12:55 PM, Jonathan M Davis wrote: I have a problem I'd really like to use Strides for to simplify my code. Currently, I do this: foreach(n; 0..chunks

Re: Modify thread-local storage from parent thread

2011-08-09 Thread Kai Meyer
On 08/08/2011 01:38 PM, Steven Schveighoffer wrote: On Mon, 08 Aug 2011 14:17:28 -0400, Kai Meyer k...@unixlords.com wrote: I am playing with threading, and I am doing something like this: file.rawRead(bytes); auto tmpTask = task!do_something(bytes.idup); task_pool.put(tmpTask); Is there a way

Re: We have slices, do we have Strides?

2011-08-09 Thread Kai Meyer
On 08/09/2011 09:37 AM, Steven Schveighoffer wrote: On Tue, 09 Aug 2011 11:29:52 -0400, Kai Meyer k...@unixlords.com wrote: On 08/08/2011 05:25 PM, Steven Schveighoffer wrote: On Mon, 08 Aug 2011 18:33:55 -0400, Kai Meyer k...@unixlords.com wrote: On 08/08/2011 12:55 PM, Jonathan M Davis

Re: Modify thread-local storage from parent thread

2011-08-09 Thread Kai Meyer
On 08/09/2011 10:27 AM, Steven Schveighoffer wrote: On Tue, 09 Aug 2011 11:36:13 -0400, Kai Meyer k...@unixlords.com wrote: On 08/08/2011 01:38 PM, Steven Schveighoffer wrote: On Mon, 08 Aug 2011 14:17:28 -0400, Kai Meyer k...@unixlords.com wrote: I am playing with threading, and I am doing

Re: Multi-file byte comparison tool. What would you have done differently?

2011-08-08 Thread Kai Meyer
On 08/08/2011 12:33 AM, Pelle wrote: On Fri, 05 Aug 2011 18:43:27 +0200, Kai Meyer k...@unixlords.com wrote: On 08/05/2011 03:02 AM, Pelle wrote: Don't declare variables until you need them, just leave bytes_read and bytes_max here. Is there a performance consideration? Or is it purely

We have slices, do we have Strides?

2011-08-08 Thread Kai Meyer
strides, to be able to do this: if(!all_same(bytes[i..$..step_size]) Meaning, start with i, grab all elements at i + block_size * n until block_size * n bytes.length. Right? -Kai Meyer

Re: We have slices, do we have Strides?

2011-08-08 Thread Kai Meyer
for each time I want strides, to be able to do this: if(!all_same(bytes[i..$..step_size]) Meaning, start with i, grab all elements at i + block_size * n until block_size * n bytes.length. Right? -Kai Meyer Would std.range.stride work for you? - Jonathan M Davis It would, if there was a way to give

Re: DMD with older versions of Linux

2011-08-05 Thread Kai Meyer
be old. :) RHEL 6, just released last November is 2.6.32. -Kai Meyer

Re: Minimum value in a range

2011-08-05 Thread Kai Meyer
On 08/04/2011 07:54 PM, bearophile wrote: Kai Meyer: Looking at std.algorithm, I think what you really want is minCount: http://www.d-programming-language.org/phobos/std_algorithm.html#minCount It's a bad design. Bye, bearophile minCount is, or the usage of minCount in his particular

Re: Multi-file byte comparison tool. What would you have done differently?

2011-08-05 Thread Kai Meyer
On 08/04/2011 05:03 PM, Timon Gehr wrote: Kai Meyer wrote: So the question is, how would you make it more D-ish? (Do we have a term analogous to pythonic for D? :)) An easy first step to improve the D-Factor would be to replace all these for loops with foreach loops and ref foreach loops

Re: Multi-file byte comparison tool. What would you have done differently?

2011-08-05 Thread Kai Meyer
On 08/05/2011 03:02 AM, Pelle wrote: On Fri, 05 Aug 2011 00:25:38 +0200, Kai Meyer k...@unixlords.com wrote: I have a need for detecting incorrect byte sequences in multiple files (2) at a time (as a part of our porting effort to new platforms.) Ideally the files should be identical for all

Re: Multi-file byte comparison tool. What would you have done differently?

2011-08-05 Thread Kai Meyer
On 08/05/2011 11:13 AM, Jonathan M Davis wrote: On 08/05/2011 03:02 AM, Pelle wrote: On Fri, 05 Aug 2011 00:25:38 +0200, Kai Meyerk...@unixlords.com wrote: I have a need for detecting incorrect byte sequences in multiple files (2) at a time (as a part of our porting effort to new platforms.)

Re: Hexadecimal string to integer

2011-08-04 Thread Kai Meyer
On 08/03/2011 10:44 AM, Stijn Herreman wrote: On 3/08/2011 2:32, Johann MacDonagh wrote: On 8/2/2011 8:17 PM, Stijn Herreman wrote: std.conv does not support conversion from a hexadecimal string to an integer. Is there a technical reason for this limitation? This is the best I could do, can

Re: Minimum value in a range

2011-08-04 Thread Kai Meyer
On 08/02/2011 06:03 AM, Andrej Mitrovic wrote: import std.algorithm; void main() { auto x = min([1, 2, 3]); // x would be 1 } min() isn't equipped to do this on a single range. What can I use instead? I haven't had my coffee yet. :) Looking at std.algorithm, I think what you really

Multi-file byte comparison tool. What would you have done differently?

2011-08-04 Thread Kai Meyer
I have a need for detecting incorrect byte sequences in multiple files (2) at a time (as a part of our porting effort to new platforms.) Ideally the files should be identical for all but a handful of byte sequences (in a header section) that I can just skip over. I thought this would be a fun

Re: Frontend and backend communication

2011-07-28 Thread Kai Meyer
On 07/27/2011 04:40 PM, Dainius (GreatEmerald) wrote: No no. It's the other way round. Shuffle() is in the library (backend). PlaySound() is in the executable (frontend). Since I don't want the library to be dependent on any sound libraries, I can't have PlaySound() in it. And there is no other

Re: Frontend and backend communication

2011-07-28 Thread Kai Meyer
(), then you may run into problems. -Kai Meyer

Re: D users on Google+

2011-07-15 Thread Kai Meyer
On 07/13/2011 02:52 AM, simendsjo wrote: Are there any D users on Google+ I can stalk? The only one I found was Andrei Alexandrescu, but as he works at Facebook, I doubt he'll be posting much. I'll take invites from anybody in the D community as well (except you'll probably find me @

Encoding help

2011-07-11 Thread Kai Meyer
I have a need to be able to read/write a win32 UNICODE file from a linux machine. I've heard D has some great encoding libraries. I'm struggling to get some simple reads done. How can I read a line from a UTF-16LE file on a linux box in D? I'm running dmd 2.053 -Kai Meyer

Re: Encoding help

2011-07-11 Thread Kai Meyer
On 07/11/2011 10:56 AM, Kai Meyer wrote: I have a need to be able to read/write a win32 UNICODE file from a linux machine. I've heard D has some great encoding libraries. I'm struggling to get some simple reads done. How can I read a line from a UTF-16LE file on a linux box in D? I'm running dmd

hex string to int?

2011-07-11 Thread Kai Meyer
Is there a built-int ton convert a hex string like 0x0A to the int 10?

Re: Any way to get the name of a function?

2011-07-07 Thread Kai Meyer
On 07/06/2011 08:47 PM, Andrej Mitrovic wrote: void foo(){}; void bar(){}; void main() { auto funcs = [foo,bar]; } I'm using this in a foreach loop and invoking each function with some predefined arguments. But I'd also like to extract the name of each function because each function does

Re: readf with strings

2011-06-23 Thread Kai Meyer
On 06/23/2011 02:27 AM, Dainius (GreatEmerald) wrote: I have a related enhancement request since lot of time: http://d.puremagic.com/issues/show_bug.cgi?id=4716 Bye, bearophile That's exactly what I'd like to see. Voted. After all, D is created with practicality in mind, and doing all that

Re: readf with strings

2011-06-22 Thread Kai Meyer
On 06/22/2011 09:30 AM, Ali Çehreli wrote: On Wed, 22 Jun 2011 14:57:57 +, GreatEmerald wrote: This should be a very elementary question. How do you get a string off stdin? Or an integer, or a boolean, for that matter? If I use this: float MyFloat; string MyString;

Re: An effort at creating a free ebook for learning D

2011-06-20 Thread Kai Meyer
write with the '\n' character? -Kai Meyer

Broken link

2011-06-13 Thread Kai Meyer
-portability.html Preliminary testing showed that the same Porting to 64 Bits is broken on all of the howto pages. -Kai Meyer

Re: Best article vote tally - WE HAVE TWO WINNERS!

2011-06-09 Thread Kai Meyer
On 06/09/2011 01:21 PM, Steven Schveighoffer wrote: On Thu, 09 Jun 2011 15:02:08 -0400, Walter Bright newshou...@digitalmars.com wrote: On 6/9/2011 11:03 AM, Robert Clipsham wrote: So there is going to be a next one? Yes, maybe in 6 months or so. I'm very happy with how this one turned out.

dmd 32bit

2011-06-07 Thread Kai Meyer
How do I generate 32bit binaries with dmd64 (2.053) on Linux? I can't find the flag for it. -Kai Meyer

Re: dmd 32bit

2011-06-07 Thread Kai Meyer
On 06/07/2011 01:39 PM, Kai Meyer wrote: How do I generate 32bit binaries with dmd64 (2.053) on Linux? I can't find the flag for it. -Kai Meyer Nevermind, found it. http://digitalmars.com/d/2.0/dmd-linux.html I kept putting a space between -m and 32 :(

Re: Is it reasonable to learn D

2011-06-07 Thread Kai Meyer
On 06/07/2011 01:47 PM, Fabian wrote: Dear D Community, is it reasonable to learn D? I've found a lot of good points for D but I've found a lot of negative points too. I believe that I needn't to list all the point for D but I want to give a few examples against learning D I've read in some

Re: Building DMD on Linux with Windows Domain Logins

2011-05-24 Thread Kai Meyer
On 05/24/2011 12:34 AM, KennyTM~ wrote: On May 24, 11 12:55, Walter Bright wrote: On 5/23/2011 4:10 PM, KennyTM~ wrote: On May 24, 11 06:37, Kai Meyer wrote: Funny thing happened today. I tried building DMD from source, and got this: dmd: libelf.c:171: void OmToHeader(Header*, ObjModule

Building DMD on Linux with Windows Domain Logins

2011-05-23 Thread Kai Meyer
and GID's that are this big? -Kai Meyer

Re: correct way to create boiler plate code

2011-05-16 Thread Kai Meyer
On 05/16/2011 01:08 PM, dmerrio wrote: I am parsing some formulas from a spreadsheet file. To duplicate the behavior of the spreadsheet functions, I am having to create a lot of boiler plate code that maps from the spreadsheet functions to the built-in functions. Mixin would seem to allow me to

Re: How about a Hash template?

2011-05-02 Thread Kai Meyer
On 04/29/2011 07:13 AM, Jacob Carlborg wrote: On 2011-04-28 21:46, Timon Gehr wrote: Andrei Alexandrescu wrote: On 4/28/11 11:00 AM, Alexander wrote: On 28.04.2011 17:46, Andrej Mitrovic wrote: It works, but it makes the if statement ugly again. :) Well, just a bit - still much better

Re: DSO with DMD 2.052 on Linux?

2011-05-02 Thread Kai Meyer
I thought I saw somewhere that you simply have to have the runtime initialized before calling into the shared library (which is done for you when dmd is supposed to produce an executable): http://www.digitalmars.com/d/2.0/phobos/core_runtime.html I may be incorrect too :) -Kai Meyer

Re: How to get the dang thing to work (Was: Linux: How to statically link against system libs?)

2011-04-27 Thread Kai Meyer
, and help me understand what the first problem was? The one you thought was solvable by statically linking against glibc? -Kai Meyer

Re: How to get the dang thing to work (Was: Linux: How to statically link against system libs?)

2011-04-27 Thread Kai Meyer
On 04/27/2011 11:51 AM, Nick Sabalausky wrote: Kai Meyerk...@unixlords.com wrote in message news:ip9bro$1lak$1...@digitalmars.com... On 04/26/2011 02:28 PM, Nick Sabalausky wrote: Ok, so I guess statically linking against the stuff isn't the way to go, and apparently DLL hell is worse on

Re: OOP, faster data layouts, compilers

2011-04-22 Thread Kai Meyer
On 04/22/2011 02:55 AM, Paulo Pinto wrote: Many thanks for the links, they provide very nice discussions. Specially the link below, that you can follow from your first link, http://c0de517e.blogspot.com/2011/04/2011-current-and-future-programming.html But in what concerns game development, D2

Re: OOP, faster data layouts, compilers

2011-04-22 Thread Kai Meyer
On 04/22/2011 11:05 AM, Daniel Gibson wrote: Am 22.04.2011 18:48, schrieb Kai Meyer: I don't think C# is the next C++; it's impossible for C# to be what C/C++ is. There is a purpose and a place for Interpreted languages like C# and Java, just like there is for C/C++. What language do you think

Re: OOP, faster data layouts, compilers

2011-04-22 Thread Kai Meyer
On 04/22/2011 11:20 AM, Daniel Gibson wrote: Am 22.04.2011 19:11, schrieb Kai Meyer: On 04/22/2011 11:05 AM, Daniel Gibson wrote: Am 22.04.2011 18:48, schrieb Kai Meyer: I don't think C# is the next C++; it's impossible for C# to be what C/C++ is. There is a purpose and a place

Re: std.regex with multiple matches

2011-04-21 Thread Kai Meyer
On 04/21/2011 11:43 AM, David Gileadi wrote: I was using std.regex yesterday, matching a regular expression against a string with the g flag to find multiple matches. As the example from the docs shows (BTW I think the example may be wrong; I think it needs the g flag added to the regex call),

Re: Hidden argument kind antipattern

2011-04-19 Thread Kai Meyer
On 04/19/2011 05:18 PM, dsimcha wrote: == Quote from Vladimir Panteleev (vladi...@thecybershadow.net)'s article To elaborate, I mean allowing code which appears to behave surprisingly different from the at-a-glance interpretation, unless the programmer knows the function's signature. I've

Re: Linux RPM out of date

2011-04-18 Thread Kai Meyer
, feel free to ask here - several contributors are quite familiar with such. Thanks, Andrei I created the pull request, but haven't heard back. I'm happy to be patient if you would confirm the pull request worked as designed. :) -Kai Meyer

Re: compile phobos into 64bit -- error!

2011-04-18 Thread Kai Meyer
=8413runmin=8364 -Kai Meyer

Re: Linux RPM out of date

2011-04-14 Thread Kai Meyer
to start the build. Would we like to have a method that should work something like this? git clone /installer.git cd installer ./this-script-should-result-in-the-rpm Or should we simply provide .patch files and a .spec file? -Kai Meyer

Re: Linux RPM out of date

2011-04-13 Thread Kai Meyer
On 04/12/2011 07:00 PM, Jesse Phillips wrote: Kai Meyer Wrote: On 04/12/2011 05:22 PM, Kai Meyer wrote: On 04/08/2011 10:47 AM, Kai Meyer wrote: I've been waiting patiently for the Linux RPM to be updated (it's currently 2.051). Do I need to continue to wait, or should I volunteer some time

Re: Linux RPM out of date

2011-04-13 Thread Kai Meyer
On 04/13/2011 12:46 PM, Jesse Phillips wrote: Kai Meyer Wrote: Ok, how should I go about this then? -Kai Meyer Send the updated RPMs to Walter after each release. If you have an easy tool to build them you can ask Walter if he would like it. Note he likes bash files because he can review

Re: Linux RPM out of date

2011-04-13 Thread Kai Meyer
On 04/13/2011 01:12 PM, Andrei Alexandrescu wrote: On 4/13/11 2:04 PM, Kai Meyer wrote: On 04/13/2011 12:46 PM, Jesse Phillips wrote: Kai Meyer Wrote: Ok, how should I go about this then? -Kai Meyer Send the updated RPMs to Walter after each release. If you have an easy tool to build them

Re: Semicolon can be left out after do-while

2011-04-13 Thread Kai Meyer
On 04/13/2011 07:44 AM, Emil Madsen wrote: On 13 April 2011 14:36, Steven Schveighoffer schvei...@yahoo.com mailto:schvei...@yahoo.com wrote: On Tue, 12 Apr 2011 18:00:40 -0400, spir denis.s...@gmail.com mailto:denis.s...@gmail.com wrote: On 04/12/2011 11:51 PM, Steven

Re: Linux RPM out of date

2011-04-12 Thread Kai Meyer
On 04/08/2011 10:47 AM, Kai Meyer wrote: I've been waiting patiently for the Linux RPM to be updated (it's currently 2.051). Do I need to continue to wait, or should I volunteer some time to help maintain the RPM packaging? I would be happy to help develop and maintain a DEB package as well

Re: Linux RPM out of date

2011-04-12 Thread Kai Meyer
On 04/12/2011 05:22 PM, Kai Meyer wrote: On 04/08/2011 10:47 AM, Kai Meyer wrote: I've been waiting patiently for the Linux RPM to be updated (it's currently 2.051). Do I need to continue to wait, or should I volunteer some time to help maintain the RPM packaging? I would be happy to help

Re: Linux RPM out of date

2011-04-11 Thread Kai Meyer
could point me to at least where the resources are (ie: source repository). -Kai Meyer On 04/08/2011 03:57 PM, %u wrote: please do

Re: Linux RPM out of date

2011-04-11 Thread Kai Meyer
On 04/11/2011 10:10 AM, Denis Koroskin wrote: On Mon, 11 Apr 2011 18:21:52 +0400, Kai Meyer k...@unixlords.com wrote: Then I suppose I have two options. Do I start where somebody else left off? Or should I start from scratch? If from scratch, should I be re-packaging the .zip file distribution

Re: Linux RPM out of date

2011-04-11 Thread Kai Meyer
On 04/11/2011 11:22 AM, Kai Meyer wrote: On 04/11/2011 10:10 AM, Denis Koroskin wrote: On Mon, 11 Apr 2011 18:21:52 +0400, Kai Meyer k...@unixlords.com wrote: Then I suppose I have two options. Do I start where somebody else left off? Or should I start from scratch? If from scratch, should I

Re: Before and after in contracts?

2011-04-11 Thread Kai Meyer
On 04/11/2011 06:05 AM, Magnus Lie Hetland wrote: I'd like to write a contract for a method to ensure that a given attribute does not decrease when calling the method. In order to do that, I need to store the before value, and compare it to the after value. My first intuition was to declare a

Linux RPM out of date

2011-04-08 Thread Kai Meyer
I've been waiting patiently for the Linux RPM to be updated (it's currently 2.051). Do I need to continue to wait, or should I volunteer some time to help maintain the RPM packaging? I would be happy to help develop and maintain a DEB package as well. -Kai Meyer

time_t to simple date string conversion

2011-04-05 Thread Kai Meyer
I'm reading documentation on std.datetime, and it appears there are added features that I don't have in 2.51 (Linux). Did features like 'SysTime' get added after 2.51? Does anybody have a one-liner to convert a time_t to a date string that should work for me? -Kai Meyer

Re: time_t to simple date string conversion

2011-04-05 Thread Kai Meyer
On 04/05/2011 03:40 PM, Steven Schveighoffer wrote: On Tue, 05 Apr 2011 17:24:11 -0400, Kai Meyer k...@unixlords.com wrote: I'm reading documentation on std.datetime, and it appears there are added features that I don't have in 2.51 (Linux). Did features like 'SysTime' get added after 2.51

Re: How to spawn processes while keeping the parent process open ?

2011-04-04 Thread Kai Meyer
On 04/03/2011 07:31 AM, Tarun Ramakrishna wrote: Hi, Apparently std.process.exec (D2.052/windows) doesn't work the way the documentation describes. It terminates the parent process. Is there a way to keep the parent process open in D ? I also vaguely remember seeing some mails on this list

Re: Array operation doesn't check array bounds

2011-04-04 Thread Kai Meyer
On 04/03/2011 05:06 PM, Jonathan M Davis wrote: On 2011-04-03 04:10, simendsjo wrote: int[] a = [1,2,3]; int[4] b; assert(b == [0,0,0,0]); b = a[] * 3; // oops... a[] * 3 takes element outside a's bounds assert(b[$-1] == 0); // fails.. last element is

Re: Contracts or Exceptions?

2011-03-30 Thread Kai Meyer
On 03/30/2011 08:25 AM, Kagamin wrote: Kai Meyer Wrote: do all the checking before hand. Arrays are a good example. When not in -release mode, array boundaries are checked upon every access to the array, and an exception is thrown if access goes out of bounds. In -release mode, if you go out

Re: Contracts or Exceptions?

2011-03-29 Thread Kai Meyer
On 03/29/2011 12:40 PM, Mike Linford wrote: Hello, So I'm writing a function for a library. It takes a struct as an argument. The struct's fields can't just be any old values, though. The function won't work if some of the fields are weird. It could return an erroneous value, or even crash.

Re: clear()

2011-03-28 Thread Kai Meyer
On 03/25/2011 01:10 PM, Dr.Smith wrote: To empty many arrays of various types, rather than: clear(arr1); clear(arr2); ... clear(arrN); is there something like: clear(ALL); No, but perhaps you can do a: foreach(a; ALL) a.clear() But that would require you having an iterable sequence that

Re: Little quiz

2011-03-28 Thread Kai Meyer
On 03/24/2011 06:50 PM, bearophile wrote: A little quiz for people here: guess the output of this little D2 program (it compiles correctly and doesn't crash at run time, so it's a fair question): import std.typecons: tuple; import std.c.stdio: printf; auto foo() { printf(foo\n);

Re: fun with properties

2011-03-23 Thread Kai Meyer
On 03/23/2011 10:09 AM, teo wrote: On Wed, 23 Mar 2011 08:28:46 -0600, Kai Meyer wrote: On 03/23/2011 06:48 AM, teo wrote: How can I use properties with increment/decrement and +=/-= operators? I did following tests (the errors are from dmd v2.052): class T { private int _x

Re: How do I iteratively replace lines in a file?

2011-03-20 Thread Kai Meyer
On 03/19/2011 05:51 PM, Andrej Mitrovic wrote: I'm trying to do something like the following: File inputfile; foreach (string name; dirEntries(r.\subdir\, SpanMode.shallow)) { if (!(isFile(name) getExt(name) == d)) { continue; } inputfile = File(name, a+);

Re: How do I iteratively replace lines in a file?

2011-03-20 Thread Kai Meyer
On 03/20/2011 09:46 AM, Andrej Mitrovic wrote: Yeah, I've already done exactly as you guys proposed. Note however that `inputfile` and `outputfile` should be declared inside the foreach loop. Either that or you have to call `close()` explicitly. If you don't do that, file handles don't get

Re: Want to help DMD bugfixing? Write a simple utility.

2011-03-20 Thread Kai Meyer
relatively new to D but would like to do something really useful. -Don Is there a copy of the official D grammar somewhere online? I wrote a lexer for my Compiler class and would love to try and apply it to another grammar. -Kai Meyer

  1   2   >