Re: early alpha of D REPL

2014-02-13 Thread Asman01

On Tuesday, 11 February 2014 at 04:46:41 UTC, Martin Nowak wrote:

Barely running but already fun and a little useful.

Example:

D> import std.algorithm, std.array, std.file;
=> std
D> auto name(T)(T t) {
 | return t.name;
 | }
=> name
D> dirEntries(".", SpanMode.depth).map!name.join(", ")
=> ./drepl_sandbox
D>

https://github.com/MartinNowak/drepl
http://drepl.dawg.eu/


Very nice! thanks. I tried the following code but it print 
nothing:


auto twice = (int a) => 2*a;
twice(2);

What's wrong with that?


Re: D/Objective-C 64bit

2014-03-11 Thread Asman01

On Tuesday, 11 March 2014 at 18:23:08 UTC, Jacob Carlborg wrote:
I just wanted to let everyone know that I have implemented 
D/Objective-C for 64bit. Everything that worked for 32bit 
should work, except for exceptions, which are not implemented 
yet.


Objective-C on 64bit uses the modern runtime, which is also the 
same used on iOS. This means D/Objective-C should now be 
compatible with iOS as well, at least in theory.


For those how don't know what D/Objective-C is. It is a 
language extension to D making it ABI compatible with 
Objective-C. This means it's possible to use Objective-C 
classes, methods, protocols (interfaces) and so on, directly 
just as it's currently possible to do with regular C functions.


Here's a recap of what's implemented, both for 32 and 64bit 
unless otherwise noticed:


* Classes
* Subclasses
* Instance and class methods
* Protocols (interfaces)
* Properties
* Exceptions (only 32bit)
* Selectors
* Class references
* String literals
* Casts

Some improvements that are really not part of Objective-C but 
are very convenient to have in D :


* Constructors
* Inheriting selectors
* Automatically generated selectors

On the other hand, here a list of what's not implemented yet:

* Blocks (similar to delegates)
* Categories (class extensions)
* Any form of automatic memory management
* Exceptions (64bit)
* Vtable optimization (64bit)

Objective-C exceptions on 64bit is implemented using the same 
mechanism as C++. I'm wondering if it would be possible for D 
(not just for this extension) to adapt this mechanism as well. 
This would make D compatible with both C++ and Objective-C 
exceptions on 64bit.


A DIP is available here [1] and the latest implementation is 
available here [2].


[1] http://wiki.dlang.org/DIP43
[2] https://github.com/jacob-carlborg/dmd/tree/d-objc


It's really awesome. Congratulations! If this DIP is actually 
approved will dmd have "native" integration/support to 
Objective-C language just like we can do with C? I'm not a Obj-C 
programmer but I like the idea. We could still improve this add 
new languages


Re: Experimental win32 OMF linker written in D now on github

2014-03-24 Thread Asman01

On Monday, 24 March 2014 at 22:30:45 UTC, Nick Sabalausky wrote:

On 3/23/2014 4:33 PM, Daniel Murphy wrote:
So a couple of years ago I had too much free time and wrote a 
linker.


It's now on github: https://github.com/yebblies/ylink



Nifty!

I love this Pro:


- Usually produces working executables


:)


Me too. But not more than ">>Written in D" :)