+1 Let's do it!
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
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!!!
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
> 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.
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
> .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
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/
inux world. But maybe you
could also use the mingw tools to link ???
- 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.
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
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
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
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
;
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
> 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
> 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..
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.
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
> 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
> 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?
> 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
>> 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
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();
}
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?
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.
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
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
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
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.
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
> 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
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?
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.
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?
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
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
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
ne. I have outcommented nearly
half of it to get it run at a minimum.
- 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
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
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
>> 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
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
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
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);
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
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
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
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.
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
}
}
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
>>>
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
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
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?
That's crazy shit yeha xD... and php and load balancer do communication
via TCP/UNIX socket? some kind of protocol?
Great work!!! Thanks guys!
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/
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
> 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 = "...
Try using "dmd -v file.d" to see what actually going on there.
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!
>
> 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
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)?
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?
-- 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
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
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;
}
68 matches
Mail list logo