Re: llvm-d

2013-03-15 Thread Moritz Maxeiner

On Friday, 15 March 2013 at 21:18:09 UTC, Jens Mueller wrote:

Nice.
Can you make it compatible with Deimos
https://github.com/D-Programming-Deimos/?

Jens


If by compatible you mean "can be used with":

I don't see anything that would prevent you from using llvm-d 
together

with deimos bindings for other libraries.

If by compatible you mean "can be integrated into":

Afaik Deimos projects are linked with the libraries, instead of 
loading
them at runtime. This is something I do not want because of the 
coff/omf
hassle with optlink (on win32), which I can avoid by sidestepping 
the linker.


The next problem would be that afaik deimos is for pure C 
bindings only, but as mentioned under "Planned Features" on the 
github page I do plan on more or less recreating LLVM's OOP 
structure (as much as the C API exposes, anyway) in D around the 
C API as close to the original as sensible and feasible. Keeping 
two seperate projects for that seemed inefficient to me, even 
more so when one of them would only change for bug fixes (if any) 
and for new LLVM versions.


Another pro for using runtime loading is that I can move the 
names of the libraries into llvm-d (which is what I did), so 
someone using llvm-d does not have to worry about library names, 
prefixes and suffixes. The most they have to do it to give -ldl 
to the linker on posix.


These are the main reasons as to why I decided against making 
another deimos project in the first place and I can't think of a 
compelling reason for deviating from that decision right now, 
sorry. Correct me if I'm wrong, though, there's much about D I 
don't know yet.


If, however, there are enough people that *really* want a deimos 
version I could fork the project, strip out the shared lib stuff 
and change a few calls in the code generation to create extern 
functions instead of extern function pointers (The process is 
automated via CTFE, a mixin version of the "map" function and 
associative array enums) and that would be it, although I don't 
really see any real benefit to that (other than it being in 
deimos, which I don't think is a key factor now that we have dub 
with its package registry around).


Re: llvm-d

2013-03-15 Thread Jens Mueller
Moritz Maxeiner wrote:
> Hi, I would like to announce llvm-d, which provides LLVM bindings
> for D.
> 
> It loads LLVM from a dynamic library (so/dylib/dll) and has support
> for LLVM versions 3.1, 3.2 and 3.3 (current svn trunk).
> It has as of now been tested on 64bit versions of Archlinux, OS X
> Mountain Lion and Windows 7.
> 
> The support for multiple versions is achieved via conditional
> compilation (As the LLVM C API sometimes has changes such as
> insertion of new enum items
> in the middle of an enum, changing the values for all succeeding
> enum items), specifically the version system: LLVM version X.Y
> translates to the version identifier "LLVM_X_Y" (without the
> quotes).
> 
> More information (and an example) can be found at llvm-d's location:
> 
> https://github.com/Calrama/llvm-d
> 
> and also has a DUB registry entry at
> 
> http://registry.vibed.org/packages/llvm-d

Nice.
Can you make it compatible with Deimos
https://github.com/D-Programming-Deimos/?

Jens


Re: Mono-D v0.5.1.4 - Bugs 'n' Improvements

2013-03-15 Thread notna
This website is a mess. The "home" still shows v3, following the 
download, you'll reach v4.0 (windows)... which is so ugly and buggy.


The latest for windows, which I found in their forum, is:
http://download.xamarin.com/studio/Windows/XamarinStudio-4.0.1.msi


On 14.03.2013 22:43, alex wrote:

On Thursday, 14 March 2013 at 20:47:57 UTC, Andrej Mitrovic wrote:

On 3/14/13, Nick Sabalausky  wrote:

Wikipedia's MonoDevelop page says
"Xamarin offers a rebranded version of MonoDevlop 4.0 as Xamarin Studio
which now uses platform-specific code in various places to enhance the
look & feel." So sounds good :)


Unfortunately they now forcefully bundle the Android SDK, which I have
no use for, but have to wait downloading 800MB..


800 Megs? My download was only 31 MB large ;)

Please consider downloading the version from
http://monodevelop.com/download
-- you don't have to register to the Xamarin site then.




Three optimization tips for C++

2013-03-15 Thread Andrei Alexandrescu
Destroy (but upvote): 
http://www.reddit.com/r/programming/comments/1adf94/three_optimization_tips_for_c/


Andrei


llvm-d

2013-03-15 Thread Moritz Maxeiner
Hi, I would like to announce llvm-d, which provides LLVM bindings 
for D.


It loads LLVM from a dynamic library (so/dylib/dll) and has 
support

for LLVM versions 3.1, 3.2 and 3.3 (current svn trunk).
It has as of now been tested on 64bit versions of Archlinux, OS X 
Mountain Lion and Windows 7.


The support for multiple versions is achieved via conditional 
compilation (As the LLVM C API sometimes has changes such as 
insertion of new enum items
in the middle of an enum, changing the values for all succeeding 
enum items), specifically the version system: LLVM version X.Y 
translates to the version identifier "LLVM_X_Y" (without the 
quotes).


More information (and an example) can be found at llvm-d's 
location:


https://github.com/Calrama/llvm-d

and also has a DUB registry entry at

http://registry.vibed.org/packages/llvm-d


Re: DUB 0.9.11 released

2013-03-15 Thread Sönke Ludwig
Am 15.03.2013 17:37, schrieb Kagamin:
> On Monday, 11 March 2013 at 06:58:35 UTC, Sönke Ludwig wrote:
>> Somtimes I really wonder what's up with DMDs error messages. This code
>> has been there since ages and never triggered an error here, even on DMD
>> 2.062 (and it rightfully should have triggered one). Anyway, It's fixed
>> now on master.
> 
> Huh? It was platform-specific?

No. I actually completely overlooked that it happened with DMD master
and not on 2.062. So probably it was a recent accepts-invalid fix. But
in the past I actually had incidents where things compiled for me on the
same platform that failed for someone else - that's the original reason
for my reply, sorry for the confusion.


Re: DUB 0.9.11 released

2013-03-15 Thread Kagamin

On Monday, 11 March 2013 at 06:58:35 UTC, Sönke Ludwig wrote:
Somtimes I really wonder what's up with DMDs error messages. 
This code
has been there since ages and never triggered an error here, 
even on DMD
2.062 (and it rightfully should have triggered one). Anyway, 
It's fixed

now on master.


Huh? It was platform-specific?


Re: Mono-D v0.5.1.4 - Bugs 'n' Improvements

2013-03-15 Thread alex

On Friday, 15 March 2013 at 14:33:06 UTC, Nick Sabalausky wrote:

Even ignoring the "disregard my system settings" overdose of
white, the UI is still just generally very difficult to read 
due to what

appears to be a (more or less) buggy theme. Note in particular:

1. Invisible menu items.

2. "Very-light-grey on white" menu items.

3. Generally messed up text on buttons.

4. Overzealous anti-aliasing on the dialog text such as 
"C:\Users..."
and "Always create a backup copy". Not as bad as the first 
three, but

it'll still hurt a guy's eyes after a while.


http://i.imgur.com/nZxJIgO.png

Can't see a problem on my side, literally.


Re: Mono-D v0.5.1.4 - Bugs 'n' Improvements

2013-03-15 Thread Nick Sabalausky
On Fri, 15 Mar 2013 08:38:45 +0100
"alex"  wrote:

> On Friday, 15 March 2013 at 00:50:57 UTC, Nick Sabalausky wrote:
> > On Thu, 14 Mar 2013 23:42:04 +0100
> > "alex"  wrote:
> >
> >> On Thursday, 14 March 2013 at 22:33:38 UTC, Nick Sabalausky 
> >> wrote:
> >> > On Thu, 14 Mar 2013 22:46:43 +0100
> >> > "alex"  wrote:
> >> >> 
> >> >> Nope. You can switch it so some darker schemes. I also 
> >> >> switched it to some darker background because it also was 
> >> >> too bright for me.
> >> >
> >> > I couldn't find any settings for that. Where are they?
> >> 
> >> On Windows, it's Tools -> Options -> Text Editor -> Syntax 
> >> highlighting. Just select an other scheme, close the options 
> >> dlg and you'll see it :)
> >
> > That's only affecting the text editor, not the rest of the UI.
> > Ironically, the text editor is one thing that does display just 
> > fine
> > with the default settings (aside from being very bright).
> 
> Oh noooees. Seriously, the only bright things in the main UI are 
> only a menu bar and the solution pad, by default - Imho a 
> circumstance which one can survive easily ;-D

I think you may be misunderstanding. See this image:

http://semitwist.com/download/img/shots/xamarin_screen.png

Even ignoring the "disregard my system settings" overdose of
white, the UI is still just generally very difficult to read due to what
appears to be a (more or less) buggy theme. Note in particular:

1. Invisible menu items.

2. "Very-light-grey on white" menu items.

3. Generally messed up text on buttons.

4. Overzealous anti-aliasing on the dialog text such as "C:\Users..."
and "Always create a backup copy". Not as bad as the first three, but
it'll still hurt a guy's eyes after a while.




Re: Unmanaged - a D framework on github

2013-03-15 Thread Nick Sabalausky
On Fri, 15 Mar 2013 13:11:13 +0100
"Jakob Ovrum"  wrote:

> On Friday, 15 March 2013 at 10:23:05 UTC, David wrote:
> > Afaik it is deprecated which really sucks imo.
> 
> I don't know why the new operator is so important to some people. 
> If templates had been in C++ before classes, this operator would 
> probably never have existed.
> 

I'm not so sure that it's "new is important" so much as:

1. The custom allocator stuff isn't ready yet.

2. "Meh, 'new' never hurt me, what's with all the hate?"



Re: Unmanaged - a D framework on github

2013-03-15 Thread Jakob Ovrum

On Friday, 15 March 2013 at 10:23:05 UTC, David wrote:

Afaik it is deprecated which really sucks imo.


I don't know why the new operator is so important to some people. 
If templates had been in C++ before classes, this operator would 
probably never have existed.


object.destroy()(UFCS) and clib.free(object) (If it was 
allocated with

malloc/calloc and friends)


A pair of templated functions dealing with C++ style new/delete 
can be trivially composed using malloc-emplace and destroy-free.


Re: Unmanaged - a D framework on github

2013-03-15 Thread David
Am 14.03.2013 03:03, schrieb Ellery Newcomer:
> On 03/13/2013 11:30 AM, D-ratiseur wrote:
> 
>> uppon everything to bypass the garbage
>> collector.
> 
> In that case, I call foul.
> 
> FAddr.length = FAddr.length + 1;
> 
> types.d#L281
> 
> Wait, what? You're using classes everywhere and.. ohhh. you're
> overriding new. Nifty. Don't know if that's been deprecated or not, but
> I'm pretty sure Andrei hates it and wants it to die.

Afaik it is deprecated which really sucks imo.

> The delete statement is deprecated in favor of object.destroy or something.

object.destroy()(UFCS) and clib.free(object) (If it was allocated with
malloc/calloc and friends)


Re: Mono-D v0.5.1.4 - Bugs 'n' Improvements

2013-03-15 Thread alex

On Friday, 15 March 2013 at 00:50:57 UTC, Nick Sabalausky wrote:

On Thu, 14 Mar 2013 23:42:04 +0100
"alex"  wrote:

On Thursday, 14 March 2013 at 22:33:38 UTC, Nick Sabalausky 
wrote:

> On Thu, 14 Mar 2013 22:46:43 +0100
> "alex"  wrote:
>> 
>> Nope. You can switch it so some darker schemes. I also 
>> switched it to some darker background because it also was 
>> too bright for me.

>
> I couldn't find any settings for that. Where are they?

On Windows, it's Tools -> Options -> Text Editor -> Syntax 
highlighting. Just select an other scheme, close the options 
dlg and you'll see it :)


That's only affecting the text editor, not the rest of the UI.
Ironically, the text editor is one thing that does display just 
fine

with the default settings (aside from being very bright).


Oh noooees. Seriously, the only bright things in the main UI are 
only a menu bar and the solution pad, by default - Imho a 
circumstance which one can survive easily ;-D