Re: The CAPI Manifesto

2011-10-17 Thread mta`chrono
+1 Let's do it!

Re: Just starting out

2011-10-18 Thread mta`chrono
Feel free to help us porting tango to D2. We've already done a lot and some parts are quite usable. But don't expect to much. https://github.com/SiegeLord/Tango-D2

Re: build system

2011-10-26 Thread mta`chrono
With simple makefiles you can compile .c, .cpp and .d, link them alltogether to a single executable, pass -j 4 to boost it up, strip the result, have different targets for doc generation, yeha :-) But please replace the odd "make.exe" on windows with gnu's version of make!!!

Re: build system

2011-10-26 Thread mta`chrono
Am 27.10.2011 01:43, schrieb Gor Gyolchanyan: > Totally. :-) > > On Thu, Oct 27, 2011 at 3:27 AM, bearophile wrote: >> Jacob Carlborg: >> >>> * The compiler should only do one thing: compile code >> >> Currently DMD "fails" at this, because it also performs profiling, coverage >> analysis, unitt

Re: Native D MySQL Driver

2011-11-03 Thread mta`chrono
> 1) No UNIX Socket support in std.socket. Someone has added unix domain sockets in one of the phobos forks. I even think there's a pending pull request.

Re: DSQLite a libraryri using sqlite

2011-11-07 Thread mta`chrono
Hi bioinfornatics, I recognized you'd used "Variant" as datatype. Did you define your own Variant Type or is that the default one? But neverthenless your code simplyfiecs using sqlite. - mta`chrono

Re: DSQLite a libraryri using sqlite

2011-11-08 Thread mta`chrono
> .I am afraid that Phobos will take another 3 years to consolidate. > std.database is just another indication for that.. > my 2 Euro cents ( pretty weak nowadays :) > Bjoern. Yes, you're right there is no coordination in development. Some are talking about CAPI Manifesto and some others are

Re: [D-Programming-Deimos] Review process?

2011-11-08 Thread mta`chrono
Does anyone know the last state of Deimos? What are we going to use now. This: https://github.com/D-Programming-Language/deimos Or that: https://github.com/D-Programming-Deimos/

Re: Linking Error (WS2_32.LIB)

2011-11-09 Thread mta`chrono
inux world. But maybe you could also use the mingw tools to link ??? - mta`chrono

Re: Linking Error (WS2_32.LIB)

2011-11-10 Thread mta`chrono
Did you try to compile tango and druntime on your own or was that a precompiled package that you've downloaded? Normally make clean and rebuild helps in that case. You could dig the sources of phobos and look if std.socket containts the symbols and then compare them with the symbols of phobos.lib.

Re: Linking Error (WS2_32.LIB)

2011-11-10 Thread mta`chrono
d -m32 main.d ws2_32.lib Usage: main.exe digitalmars.com - mta`chrono import std.socket; import std.stdio; import std.string; import std.conv; int main(string[] args) { // declaration string host; ushort port = 80; // set correct host if(args.length > 1) { hos

Re: Linking Error (WS2_32.LIB)

2011-11-10 Thread mta`chrono
nd you'll see exactly the same errors that he posted. Even tough dmd's error message are a little bit confusing in this case, the problem should be clear. - mta`chrono

Re: Class inheritance bug

2011-11-11 Thread mta`chrono
Hi Tobias, in your last post you'd asked something about sockets and now you're asking about threads which leads me to say: You don't need threads to use thousands of sockets at the same time. There is Socket.select which is some kind of multiplexer doing all the nasty shit for observating multipl

Re: Class inheritance bug

2011-11-11 Thread mta`chrono
Dont understand me wrong. You can subclass it OR you can use it like it is. Two possibilies to use. Use the one that suits your needs. By the way, there is a newsgroup called D.learn which I think is a better place for your questions. - mta`chrono Example 1 import std.stdio; import

Re: Deimos: Consistent structure?

2011-11-21 Thread mta`chrono
; import deimos.mysql_.embed; ... If you are going to import _all_ modules of a deimos lib then use this shortcut: import deimos.ncurses; import deimos.lzma; import deimos.zmq; import deimos.mysql; ... Free for comments! - mta`chrono

Re: Deimos: Consistent structure?

2011-11-21 Thread mta`chrono
> No, I don't think it's any overhead. But I want this to be handled by a > package manager. I want a file that says: "this project depends on these > libraries". Then it's up to the package manager to install and make them > available for the compiler. I think your intention to make use of a pack

Re: Deimos: Consistent structure?

2011-11-22 Thread mta`chrono
> Making "import deimos.ncurses" import everything is just wrong. NCurses > consists of 13 libraries. 4 of them are the most important to the user > (developer): curses, menu, panel and form. Importing panel if you never use > NCurses panels is pointless I think. It is not a big library though..

Re: Discussion on D support in gdb

2011-11-22 Thread mta`chrono
A noob question from my side: What is DWARF? By the way I never touched the sources of gdb. I'm just a friendly user of it.

Re: In my whole life

2011-11-22 Thread mta`chrono
Actually I don't know how you are and additionally I don't understand 100% of what you saied, because I don't know the whole context. And I need to say that normally I don't answer people who start flaming, blaming and insulting others. It leads to nowhere if people start talking unobjective. But

Re: is D ncurses-only language?

2011-11-23 Thread mta`chrono
> It actually needs a tiny patch on windows (nonvirtual_fun is mangled as > static function). Unfortunately I did not find a way to sensibly declare > member "a" in D. There is another bug that a derived class is using a > wrong virtual function table offset, but that should be fixable. It's very

Re: is D ncurses-only language?

2011-11-24 Thread mta`chrono
> It should be possible to simply create smart pointers that wrap > C++ classes in D though. Martin, what needs to be done to use SmartPtrs for every c++ class without using a c-wrapper?

Re: Second Round CURL Wrapper Review

2011-12-02 Thread mta`chrono
> 2. etc.curl, std.curl, or std.net.curl? (We had a vote a while back > but it was buried deep in a thread and a lot of people may have missed > it: http://www.easypolls.net/poll.html?p=4ebd3219011eb0e4518d35ab ) What about: Low Level Part --> deimos High Level Part --> std.curl

Re: How to stop DMD from linking against phobos

2011-12-09 Thread mta`chrono
>> Is there a way to stop dmd from linking against phobos? >> (Most preferred would be some command line parameters to dmd) > > We should fix defaultlib and debuglib to accept empty values. > Can you make a bug report for it. # dmd code.d -v -defaultlib="" gcc code.o -o code -m64 -Xlinker -L/usr

Re: Any plans to make it possible to call C++ functions that reside in a namespace?

2011-12-15 Thread mta`chrono
Adding namespaces to C++ interfacing would be great. AFAIK you could also create a linker file and rename the symbols before linking. -- suggestion: extern(C++, "MyNamespace") interface Foobar { void foo(); void bar(); }

Re: dmd.conf's -L--export-dynamic prevents my compiler from working

2011-12-18 Thread mta`chrono
Your problem seems to be really frustrating. I'm using ubuntu amd64 and everything is fine here. I'd like to reproduce your issue. Can you paste a link to your gentoo installation iso file. I'll setup a VM here. Did you install dmd,druntime,phobos from sources or some kind of packages/repo?

Re: Bridging C++ and C#

2011-12-20 Thread mta`chrono
I like their approach. They're using gcc-xml to parse c++ files and generate approtiated wrapper code. maybe we could write a similar tool for d.

Re: string is rarely useful as a function argument

2011-12-28 Thread mta`chrono
I understand your intention. It was one of the main irritations when I moved to D. Here is a function that unnecessarily uses string. /** * replaces foo by bar within text. */ string replace(string text, string foo, string bar) { // ... } The function is crap because it can't be called with

Re: string is rarely useful as a function argument

2011-12-30 Thread mta`chrono
there are lot of people suggesting to change how string behaves. but remember, d is awesome compared to other languages for not wrapping string in a class or struct. you can use string/char[] without loosing your _nativeness_. programmers targeting embedded systems are really happy because of this

Re: Incompatible libphobos2.a?

2012-01-03 Thread mta`chrono
I just built both 32& 64 bit DMD. The 32 bit works fine, but the 64 bit not. I always get this: /usr/bin/ld: skipping incompatible /home/anta40/Digital-Mars/dmd-dev/lib64/libphobos2.a when searching for -lphobos2 Did you compile druntime for 64 bit, too? As libphobos2.a is just an archive fi

Re: Incompatible libphobos2.a?

2012-01-03 Thread mta`chrono
Am 03.01.2012 12:10, schrieb Trass3r: There's another recent thread about this. The makefile is a mess. it doesn't build separate libs. Here's a Linux patch for druntime: Is this going to be official? I'd like to see that in druntime.

Re: GCC depen issue on linux

2012-01-14 Thread mta`chrono
It seems like you have installed a precompiled version of dmd. Can you post eactly the source where you've downloaded it? dmd seems to require version _2.11_ of glibc. there are a lot of versions installed on your system. 2.0,2.1,2.3,... But not the one dmd requires. In order to solve the problem

Re: Intrusive Makefile for d-programming-language.org

2012-01-15 Thread mta`chrono
> If I had a web dir in my home directory (not exactly uncommon), it would > have been deleted without warning. Luckily, I didn't. I now have it > cloned into a separate dir where it can do no harm. > > Is it normal for Makefiles to be so intrusive? IMO, Makefiles shouldn't > be deleting anything

Re: Use tango.core.Atomic.atomicLoad and atomicStore from Tango

2012-03-29 Thread mta`chrono
Am 26.03.2012 19:26, schrieb Lukasz Durniat: > Problem has been solved by me. > Can you please tell me how you'd solved it?

Re: Creating a shared library in D : undefined symbol: _deh_beg

2012-04-01 Thread mta`chrono
The compiler is able to generater position independant code but as far as I remember, there are still some issues in druntime which make it difficult to create dynamic librarys in D. You need to somehow initialize the runtime.

Re: Shared library in D on Linux

2012-04-08 Thread mta`chrono
I'm interessting in the same stuff. I've a question to _tlsend and _tlsstart. What are they used for? My disputable presumption was that they point to the begin of TLS segment. What is _deh_begin and _deh_end used for?

Re: Can we kill the D calling convention already?

2012-04-24 Thread mta`chrono
As D is more than just C or C++ it may take account for providing it's own calling convention. _BUT_ (That's the point, I agree to Alex), it needs to be consistent across _different compilers for the same plattform_. Maybe someone can point out the benefits of having a different calling conventio

Re: How can D become adopted at my company?

2012-04-24 Thread mta`chrono
Am 24.04.2012 21:53, schrieb Brad Roberts: > Neither Walter (in this case) nor the question asked for re-writting > anything. In fact, that's frequently stated (again, by Walter and others, > including myself) as explicitly a non-goal. Rewriting applications to > another language is an exercis

Re: Can we kill the D calling convention already?

2012-04-25 Thread mta`chrono
Am 24.04.2012 10:42, schrieb Alex Rønne Petersen: > Writing portable code is hard enough as it is. Why do we have to have > some random, D-specialized calling convention (only on Win32 and only in > DMD)? The result of the current state of things is that extern(D) is > essentially useless - it has

Re: Backporting Tango runtime enhancements to druntime

2011-04-15 Thread mta`chrono
ne. I have outcommented nearly half of it to get it run at a minimum. - mta`chrono

Re: Why typedef's shouldn't have been removed :(

2012-05-07 Thread mta`chrono
Am 06.05.2012 14:22, schrieb John Campbell: > On Saturday, 5 May 2012 at 05:02:48 UTC, Mehrdad wrote: >> Now it's impossible to figure out whether a ParameterTypeTuple >> contains an HWND versus an HGDIOBJ or whatever... >> >> this should really be fixed... > > Since I don't see it discussed in th

Re: GSOC Linker project

2012-05-08 Thread mta`chrono
Am 04.05.2012 01:47, schrieb Trass3r: >> I'm interested in starting a project to make a linker besides optlink >> for dmd on windows. > > Imho changing dmd to use COFF (incl. 64 support) instead of that crappy > OMF would be more beneficial than yet another linker. > > >> My vision is to create

Re: Why typedef's shouldn't have been removed :(

2012-05-08 Thread mta`chrono
Am 08.05.2012 16:03, schrieb bearophile: > Steven Schveighoffer: > >> But making std.typecons.TypeDef work *is* a valid path to get what you >> want (typedefs that work like they used to). If that isn't possible, >> let's fix the language constructs that are blocking it! > > Right. > > Bye, > b

Re: Why typedef's shouldn't have been removed :(

2012-05-09 Thread mta`chrono
>> Maybe it's not directly related to this topic, but shouldn't that be >> rather part of druntime? > > Only if something else in druntime needs it, which it doesn't. > > - Jonathan M Davis There is a real trend to purify the language. I also think it's the right decision to replace compiler int

Re: Why typedef's shouldn't have been removed :(

2012-05-09 Thread mta`chrono
Am 09.05.2012 11:53, schrieb Jonathan M Davis: > On Wednesday, May 09, 2012 10:00:37 mta`chrono wrote: >>>> Maybe it's not directly related to this topic, but shouldn't that be >>>> rather part of druntime? >>> >>> Only if something else in dr

Re: Future of D style variadic fuctions

2012-05-09 Thread mta`chrono
Am 09.05.2012 08:10, schrieb SiegeLord: > For the ignorant: I do NOT mean variadic templates as used by std.stdio. > > I note that they are not mentioned in TDPL. What is the deal with them > and their future? I'll be very displeased if I have to recode a good bit > of Tango that uses them if they

Re: UnixSocket

2012-05-12 Thread mta`chrono
Am 12.05.2012 19:32, schrieb Shadow_exe: > He writes that is not supported, but why?? Maybe you shouldn't try using a TcpSocket for opening a UNIX socket. auto socket = new Socket(AddressFamily.UNIX, SocketType.STREAM);

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-03 Thread mta`chrono
Am 30.05.2012 11:11, schrieb deadalnix: > > D already have much better tools that the one java provide > (std.concurency, std.parallelism, TLS by default, transitive type > qualifiers, . . .) that most these thing taken from java don't make any > sense now. > > For instance, what is the point of

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-03 Thread mta`chrono
Am 31.05.2012 08:47, schrieb Jacob Carlborg: > What should have been done is something like this: > > 1. Designing feature X > 2. Show the new feature for the community > 3. Consider the feedback and possible tweak/redesign > 4. Implementing in an experimental branch of the compiler > 5. Release a

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-04 Thread mta`chrono
Am 31.05.2012 17:05, schrieb Regan Heath: > .. but, hang on, can a thread actually lock a and then b? If 'a' cannot > participate in a synchronized statement (which it can't under this > proposal) then no, there is no way to lock 'a' except by calling a > member. So, provided 'a' does not have a

Re: Windows 2000 support

2012-06-05 Thread mta`chrono
Drop support since even Microsoft dropped support. Even if druntime will support Windows 2000, all my the programs I code will at least require Windows XP.

Re: valid uses of shared

2012-06-08 Thread mta`chrono
Would this be legal? class A { private static shared int counter; // shared across all instances this() { auto i = ++counter; pragma(msg, typeof(i)); // prints int } }

Re: static array literal syntax request: auto x=[1,2,3]S;

2012-06-10 Thread mta`chrono
Am 10.06.2012 01:02, schrieb Timon Gehr: > On 06/10/2012 12:34 AM, Jonathan M Davis wrote: >> On Sunday, June 10, 2012 00:15:01 Timon Gehr wrote: >>> D static array literals don't perform a costly heap allocation. It is >>> simply a bug in the implementation. This is not a compelling reason to >>>

Re: Raw binary(to work without OS) in D

2012-06-22 Thread mta`chrono
Am 22.06.2012 19:23, schrieb Walter Bright: > On 6/22/2012 7:11 AM, Mehrdad wrote: >>> One way is to get the library source code for the C compiler and >>> study it. >> By "get" you mean "buy", right? > > For Digital Mars C, yes you can buy it. For gcc, you can look at the C > library source code

Re: dlang.org live examples

2012-06-25 Thread mta`chrono
Hey, that's quite cool what you did! how did you do that? do you use fastcgi or cgi? how do you execute your code? inside some chroot environment or some other kind of virtual maschine. mta`chrono

Re: dlang.org live examples

2012-06-26 Thread mta`chrono
Am 25.06.2012 22:25, schrieb nazriel: > If you want to know more details, let me know > Oh cool. That's great! textarea -> JSON -> AJAX -> PHP Script -> ... -> Load Balancer -> Chroot jail -> D Compiler. How do you perform interation between php and you load balancer?

Re: dlang.org live examples

2012-06-26 Thread mta`chrono
That's crazy shit yeha xD... and php and load balancer do communication via TCP/UNIX socket? some kind of protocol?

Re: Congratulations to the D Team!

2012-07-09 Thread mta`chrono
Great work!!! Thanks guys!

A successful Git branching model

2012-07-29 Thread mta`chrono
Have you seen this? What do you think of it? Maybe we'll use this model in our company in nearest future. http://nvie.com/posts/a-successful-git-branching-model/

Re: Liskov principle and unittest

2011-09-23 Thread mta`chrono
class Superclass { abstract int do_some_stuff(); abstract int do_some_other_stuff(); } class Foo1 : Superclass class Foo2 : Superclass class Foo3 : Superclass unittest { // get an instance of all classes Superclass[] instances = [new Foo1(), new Foo2(), new Foo3

Re: Why do we have transitive const, again?

2011-09-23 Thread mta`chrono
> I don't see why immutability has anything to do with constness... would > you mind clarifying? Why does having transitive immutable also imply > that we /must/ have transitive const? One man's variable is other man's const. foobar(const(char)[] data) { } immutable(char)[] data = "...

Re: phobos config issue

2011-09-24 Thread mta`chrono
Try using "dmd -v file.d" to see what actually going on there.

Re: Overloading static methods

2011-09-24 Thread mta`chrono
Quote: Steven Schveighoffer > An example I gave in the bug report just now is File. Imagine you have > a File struct, and want to have an open method: > > struct File > { >static File open(string fname); > } > > However, now this is valid code: > > File f; // < here's the problem! >

Re: How can I use D to develop web application?

2011-09-25 Thread mta`chrono
> Thank you very much. I think the cgi module is lower effecient. I found > fcgi(http://www.dsource.org/projects/fastcgi4d) and > mango(http://www.dsource.org/projects/mango) which support servlet. But they > don't > support D2, anyone else can merge them to D2? > > zsxxsz I've some D2 code work

Re: Socket.send

2011-09-26 Thread mta`chrono
Am 26.09.2011 18:09, schrieb Andrea Fontana: > I'm working on a simple server written in d. I use a SocketSet to > check requests from clients. > > I have to send back response and close connection. Is there a method > to check if socket sent data or not with an async socket (so i can > close it)?

Re: T[n] a; immutable(T)[n] b = a; // error

2011-10-01 Thread mta`chrono
int[2] a; immutable(int)[2] b = a.idup; Am 01.10.2011 13:00, schrieb Peter Alexander: > int[2] a; > immutable(int)[2] b = a; > > I get "Error: cannot implicitly convert expression (a) of type int[2u] > to immutable(int)[]" > > Is there are reason for disallowing this, or is it a bug?

Re: My ignorance, or a bug - help please

2011-10-07 Thread mta`chrono
-- mysql.d extern (C): struct MYSQL{} MYSQL* mysql_init(MYSQL* mysql); -- main.d - import mysql; struct Connection { MYSQL _mysql; ~this() { } this(int dummy = 0) { mysql_init(&_mysql); } } void main() { C

Re: My ignorance, or a bug - help please

2011-10-07 Thread mta`chrono
If you don't need the internal data of struct MYSQL and you don't want to care about. Then just keep some reference in your program. alias void MYSQL; alias void MYSQL_RES; and then only use MYSQL* and pass it to every function. struct Connection { MYSQL* _mysql; ~this() { } t

Re: foreach(r; requests) { r.concider(); }

2011-10-12 Thread mta`chrono
I understand that you've suggested a different approach. But you can already implement some kind of custom iterations. Just create a function that returns this. class CustomDataClass { public typeof(this) filter(Color col) { // ... return this; }