Re: Symmetry Investments and the D Language Foundation are Hiring

2020-08-31 Thread Tove via Digitalmars-d-announce

On Sunday, 30 August 2020 at 20:12:41 UTC, Arjan wrote:

On Sunday, 30 August 2020 at 14:13:36 UTC, Mike Parker wrote:
Looking for a full-time or part-time gig? Not only is Symmetry 
Investments hiring D programmers, they are also generously 
funding two positions for ecosystem work under the D Language 
Foundation. And they've put up a bounty for a new DUB feature. 
Read all about it here:


https://dlang.org/blog/2020/08/30/symmetry-investments-and-the-d-language-foundation-are-hiring/


Fantastic! Thanks Symmetry!


Epic, this is a gamechanger!



Re: From the D Blog: A Pattern for Head-mutable Structures

2020-06-28 Thread Tove via Digitalmars-d-announce

On Sunday, 28 June 2020 at 16:31:35 UTC, Avrina wrote:

On Sunday, 28 June 2020 at 02:52:03 UTC, Mike Parker wrote:


If that's not good enough for you, then I have nothing else to 
say on the matter.


Replies like this one and andrei are why.

You are directing a community around a topic to an article 
about that topic. What do you think they are going to do? 
There's a reason why votes don't count when an article is 
linked directly. They didn't do it by mistake.


No worries, I'll post the direct link for you in the future. I 
got you covered.


I have a feature request to the forum engine, automatically 
delete all posts with hn deeplinks, problem solved.









Re: Release D 2.067.0

2015-03-24 Thread Tove via Digitalmars-d-announce

On Tuesday, 24 March 2015 at 17:08:03 UTC, Martin Nowak wrote:

Glad to announce D 2.067.0.

https://dlang.dawg.eu/downloads/dmd.2.067.0/

-Martin


Congrats! Although, I must admit, I was a little saddened to see 
that multiple alias this didn't make the release, I thought it 
was finalized... I should have kept a closer watch.


https://github.com/D-Programming-Language/dmd/pull/3998


Re: DMD 2.066 Alpha

2014-06-15 Thread Tove via Digitalmars-d-announce
On Friday, 13 June 2014 at 16:49:26 UTC, Andrei Alexandrescu 
wrote:


Virtual by default will not change. Being able to negate the 
final: label is nice to have but not a must. Adding a keyword 
for that doesn't scale - it would mean we'd need to add one 
keyword to undo each label.



Andrei


Just to try and establish a clear path forwards,
if a pull request existed which added support for...
final!true
final!false
... would it be accepted?

Or would a generic negate-x-DIP be required?
const!false
noexcept!false
etc.


Re: warp: a fast C and C++ preprocessor

2014-03-31 Thread Tove

On Monday, 31 March 2014 at 17:11:48 UTC, dennis luehring wrote:

Am 28.03.2014 19:27, schrieb Andrei Alexandrescu:
Facebook is open-sourcing warp, a fast C and C++ preprocessor 
written by

Walter Bright.


currently any ideas why clang could be 40% faster?

https://news.ycombinator.com/item?id=7489724


SIMD and virtual-file-system?


Re: warp: a fast C and C++ preprocessor

2014-03-31 Thread Tove

On Monday, 31 March 2014 at 21:16:47 UTC, Walter Bright wrote:

On 3/31/2014 2:06 PM, bearophile wrote:

Walter Bright:

Since then, I've fixed a handful of bugs, but that didn't 
amount to much time.


Have you kept a list of such bugs/mistakes of yours for warp? 
It is an

interesting list.


It's on github, though currently in a private repository. They 
were the usual mix of stupid coding mistakes and adjustments 
needed to match cpp's behavior.


I gave it a whirl on OSX Mavericks, Xcode 5.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)

a.cc contains only:
#include stdlib.h

$ ./warpdrive_clang3_4 -I /usr/include a.cc ~/a.pp
/usr/include/stdlib.h(92) : identifier expected after 'defined'

#if !__DARWIN_NO_LONG_LONG -- line 92
typedef struct {
long long quot;
long long rem;
} lldiv_t;
#endif /* !__DARWIN_NO_LONG_LONG */


Re: Scott Meyers will deliver a keynote talk at DConf 2014

2014-02-04 Thread Tove
On Tuesday, 4 February 2014 at 20:34:29 UTC, Andrei Alexandrescu 
wrote:
I'm happy to announce that Scott Meyers will deliver a keynote 
talk at the upcoming DConf 2014. Details of the talk are 
forthcoming.




wow, this is fantastic news! *cheer*



Re: Range-Based Graph Search in D (blog post)

2014-01-21 Thread Tove
On Saturday, 11 January 2014 at 09:51:57 UTC, Peter Alexander 
wrote:

On Thursday, 9 January 2014 at 22:53:02 UTC, qznc wrote:
For the visitation API design: Your map approach (bool[Vertex] 
m_visited) is probably the most generic one.


A variant, where the nodes store the flag internally is more 
efficient, though.


Unless the graph is infinite ;-)

But yes, for most graphs that would likely be more efficient 
than a hash lookup. I'll keep note of that. Thanks!


I love the design, only some few minor tweaks needed(as already 
highlighted in this thread).


Even without any changes, it fits my current needs and I'd like 
to use it already, am I right in assuming that it's Boost 
licensed?


Re: dmd 2.064.2

2013-11-07 Thread Tove

On Thursday, 7 November 2013 at 16:25:47 UTC, Brad Anderson wrote:

On Thursday, 7 November 2013 at 08:58:50 UTC, tester wrote:

how do make that comiler work?
[Issue 11457] New: Cannot compile 64bit apps with Visual 
Studio 2013


this is a desaster for me. was that release tested? if i amand 
the pathes and run as admin or not - it will not find the libs 
(user32)


windoes8.1, visual studio2013, 64bit


This never worked automatically before so I don't know how this 
could suddenly be a disaster. In this release the installer 
makes an attempt to detect your VC++ and SDK installation and 
fix up sc.ini to point to them.  It's brand new and only a few 
people responded to my call for help testing it. Post your 
sc.ini and the paths to your Windows 8.1 SDK and Visual C++ 
2013 installation.


I run 32bit win7 with VS2013 so I normally do not test 
cross-compiling with -m64.


The installer correctly found my installation directories:
VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio 12.0\VC\
WindowsSdkDir=C:\Program Files\Windows Kits\8.1\

But I needed to add the follwing to PATH(in order to find 
mspdb120.dll)

%VCINSTALLDIR%\bin

And the following to LIB, in order to find shell32.lib
LIB=%LIB%;%WindowsSdkDir%\Lib\winv6.3\um\x64

Hope it helps.



Re: Programming in D book is about 95% translated

2013-11-03 Thread Tove
On Sunday, 3 November 2013 at 21:21:04 UTC, Joseph Rushton 
Wakeling wrote:

On Saturday, 2 November 2013 at 22:45:13 UTC, Ali Çehreli wrote:
I spent considerable amount of time on those names. Like you, 
I am not happy with Inverse. :)




I'm not a native English speaker, but FWIW I would have chosen:

http://en.wiktionary.org/wiki/numeric_complement



Re: VisualD now on github.com/d-programming-language

2013-09-10 Thread Tove
On Tuesday, 10 September 2013 at 06:42:06 UTC, Walter Bright 
wrote:

https://github.com/D-Programming-Language/visuald

Congratulations to Rainer Schuetze and collaborators for this 
great work!


Horray! Great news.

Some initial nit-picking:

According to 
http://www.dsource.org/projects/visuald/wiki/Installation

Visual Studio Shell 2012 is supported.

But https://github.com/D-Programming-Language/visuald only 
mentions:

* Supported Visual Studio versions
  - VS.NET 2003 (some limitations apply)
  - VS 2005
  - VS 2008
  - VS 2010

1) I assume that the full non express 2012 is supported also?

2) VS Shell 2010 link @ 
http://www.dsource.org/projects/visuald/wiki/Installation is 
broken.


3) Preferably the two links to The Visual Studio Shell 2012 
should be visible in the github readme.


Re: VisualD now on github.com/d-programming-language

2013-09-10 Thread Tove
On Tuesday, 10 September 2013 at 18:10:33 UTC, Rainer Schuetze 
wrote:


Thanks for pointing these out. The README didn't receive a lot 
of attention lately, most of the documentation and news is on 
the web site. I agree, with it being displayed on the front 
github page it should be updated.


No problem, I thought of one additional idea to enhance first 
impressions...


Is this stable enough to be made default enabled in future 
releases?

Use Alexander Bothe's D parsing engine for semantic analysis
writing '.'

I only found it because I remember reading about it on this very 
forum, it is my fear that other new users won't find it and hence 
consider the intellisense-experience lacking.


After enabling this tiny checkbox,... wow, I love it! Thanks 
again!


Re: [OT] Three Optimization Tips for C++

2012-12-24 Thread Tove
On Friday, 21 December 2012 at 16:28:35 UTC, Andrei Alexandrescu 
wrote:

use text based formats for performance sensitive data!

Of course, maybe the 15% claim was pure exaggeration. I really 
hope

that's the case.


Text representation has its own advantages.


Andrei


interesting, does it have to be base 10? would it not be feasible 
to use hex strings in some scenarios? possible with bswap, or 
bitscan etc?


Re: User Defined Attributes

2012-11-16 Thread Tove
On Thursday, 15 November 2012 at 22:04:27 UTC, David Nadlinger 
wrote:

On Thursday, 15 November 2012 at 08:45:49 UTC, Tove wrote:
I disagree, you can always fallback to using user defined 
types... but it _allows_ for native types also, i.e. more 
flexible.


You are missing the point: In your proposal, if you want to use 
two libraries together which are expecting you to provide e.g. 
'int' annotations, you are screwed. This is a big, BIG problem.


David


no, I implied the solution already... actually there are many 
different ways to solve it... some possible today, some require 
new minor support features(like sending the annotated symbol as a 
template alias parameter to the annotation)... but could give us 
compile time errors when ambiguity is detected.


In the common case there are no collisions, so most of the time 
we can use the nice user-friendly syntax!


[lib1.x]
struct User
{
  [1] int uid;
}

But we _can_ disambiguate when needed...
[lib1.x, lib2.y]
struct User
{
  [lib!1, lib2!2] int uid; // ok
  [1, lib2!2] int uid; // ok
  [lib1!1, 2] int uid; // ok
  [1,2] int uid; // not supported
  [1]   int uid; // not supported
}

lib2 doesn't have to know about lib1.
lib1 doesn't have to know about lib2.
Because they just have to check the annotation in _prioritized_ 
order.


1. find my unique lib2.y symbol
2. if there is a lib2!uint on a nested symbol, use it...
3. if not check for a native int.



Re: User Defined Attributes

2012-11-16 Thread Tove

On Friday, 16 November 2012 at 10:41:44 UTC, Walter Bright wrote:
The whole point of my example was no, you do not necessarily 
know the meaning of a user-defined type that is used as an 
attribute.


Agree. Imagine we have 3 generic libs/modules...
Optimized CTFE Polygon Primitive Lib, Math, Gfx
... and then the end user, creates a program.

Both Math and Gfx, want to use the optimized Polygon in their 
modules...


[Polygon(...)]
struct SpaceShip
{
}

This is just as ambiguous as if you had used a built-in int:s... 
and it can be solved in the exact same way which I outlined in 
the other thread.




Re: User Defined Attributes

2012-11-15 Thread Tove
On Wednesday, 14 November 2012 at 23:57:38 UTC, David Nadlinger 
wrote:
Also, your solution is more complex than simply using types, 
yet less flexible: What if you want to use uint attributes 
from two libraries on the same type?


David


I disagree, you can always fallback to using user defined 
types... but it _allows_ for native types also, i.e. more 
flexible.




Re: User Defined Attributes

2012-11-14 Thread Tove
On Wednesday, 14 November 2012 at 11:08:04 UTC, Leandro Lucarella 
wrote:


Can you provide one concrete case where it makes sense NOT to 
restrict UDAs to
types and it's different from restricting exception to classes 
derived from

Exception?

Thank you.


There was the example with Thrift...

  struct UserProfile {
1: i32 uid,
2: string name,
3: string blurb
  }
  service UserStorage {
void store(1: UserProfile user),
UserProfile retrieve(1: i32 uid)
  }

You could use a user defined type for the struct... but for the 
members it would make sense to use the native type directly... 
and if you traverse the annotation in sequence rather than as 
standalone entities.. it's perfectly safe to use 1,2,3 as 
annotation...


i.e. first scan for the Thrift symbol, then scan for native typed 
int:s...




Re: User Defined Attributes

2012-11-14 Thread Tove
On Wednesday, 14 November 2012 at 12:33:58 UTC, Jacob Carlborg 
wrote:


I assume you mean something like:

struct UserProfile {
[1] i32 uid;
[2] string name;
[3] string blurb;
}

In that case I would much rather prefer this:

struct UserProfile {
@Id(1) i32 uid;
@Id(2) string name;
@Id(3) string blurb;
}

Where Id is thrift.attributes.Id or something similar.


well, similar... but beginning with a symbol...

[thrift.attributes.Definition]
struct UserProfile
{
  [1] i32 uid;
  [2] string name;
  [3] string blurb;
}



Re: User Defined Attributes

2012-11-14 Thread Tove
On Wednesday, 14 November 2012 at 13:03:18 UTC, David Nadlinger 
wrote:

On Wednesday, 14 November 2012 at 11:18:28 UTC, Tove wrote:

There was the example with Thrift...

 struct UserProfile {
   1: i32 uid,
   2: string name,
   3: string blurb
 }
 service UserStorage {
   void store(1: UserProfile user),
   UserProfile retrieve(1: i32 uid)
 }

You could use a user defined type for the struct... but for 
the members it would make sense to use the native type 
directly... and if you traverse the annotation in sequence 
rather than as standalone entities.. it's perfectly safe to 
use 1,2,3 as annotation...


But what if you want to use that struct with another library as 
well, for which you might also want to tack some ids on the 
fields? I'm the author of the current D implementation in 
Thrift, and if/when user defined attributes become stable and 
I'll amend it to take advantage of UDAs, I'll definitely not go 
for raw literals…


David


// in this nested scope, all uints are interpreted as belonging 
to the thrift module.

[std.attributes(uint, thrift)]
struct UserProfile
...

// error detected at compile-time
[std.attributes(uint, thrift), std.attributes(uint, thrift2)]
struct UserProfile
...



Re: User Defined Attributes

2012-11-08 Thread Tove
On Wednesday, 7 November 2012 at 08:41:48 UTC, Walter Bright 
wrote:
New version up now with a couple reported problems with UDA 
fixed.


I may have found a little glitch...?

mixin([1] int a;);
[[2] int b;] int c;
mixin(__traits(getAttributes, c)[0]);

pragma(msg, __traits(getAttributes, a)); = tuple()
pragma(msg, __traits(getAttributes, b)); = tuple()


The use-case for this is parsing a foreign language which will be 
compiled to  mixed in d-code.




Re: User Defined Attributes

2012-11-06 Thread Tove

On Tuesday, 6 November 2012 at 07:55:51 UTC, Walter Bright wrote:

References:

http://www.digitalmars.com/d/archives/digitalmars/D/Custom_attributes_again_163042.html

http://www.digitalmars.com/d/archives/digitalmars/D/custom_attribute_proposal_yeah_another_one_163246.html

Inspired by a gallon of coffee, I decided to get it 
implemented. It's simple, based on what D already does (CTFE


[*drool*, totally perfect awesomeness] Thanks!



Re: User Defined Attributes

2012-11-06 Thread Tove

Tooo much fun! Argh, _must_ _stop_ _playing_ and actually work ;(

[int a;]
class A
{
}

class B : A
{
  mixin(__traits(getAttributes, typeof(super))[0]);
}

can't wait to see all the creative uses this will enable!



Re: User Defined Attributes

2012-11-06 Thread Tove

On Tuesday, 6 November 2012 at 13:14:50 UTC, Adam D. Ruppe wrote:
On Tuesday, 6 November 2012 at 07:55:51 UTC, Walter Bright 
wrote:
User Defined Attributes (UDA) are compile time expressions 
that can be attached to a declaration.


Hmmm, it didn't work on the most important place for my use 
case, function parameters:


void a([test] int foo) {
pragma(msg, __traits(getAttributes, foo));
}



Hmmm, actually it doesn't work in plain function/block scope 
either.


void a()
{
  [test] int foo;
  pragma(msg, __traits(getAttributes, foo));
}
Error: found 'int' when expecting ';' following statement



Re: User Defined Attributes

2012-11-06 Thread Tove

On Tuesday, 6 November 2012 at 15:19:53 UTC, Walter Bright wrote:

On 11/6/2012 7:14 AM, Tove wrote:
Hmmm, actually it doesn't work in plain function/block scope 
either.


Right, I don't see a compelling purpose for that, either.


Hmm, what about library based GC annotations?

[GC.NoScan] int* local_p;



Re: Remus

2012-10-07 Thread Tove

On Sunday, 7 October 2012 at 19:41:30 UTC, Jacob Carlborg wrote:

On 2012-10-07 19:32, Namespace wrote:


amazing, good work...! what license is this under, is it allowed 
to be used commercially?





Re: DCT: D compiler as a collection of libraries

2012-05-14 Thread Tove

On Monday, 14 May 2012 at 16:58:42 UTC, Roman D. Boiko wrote:

You are over engineering the whole stuff.

I'm trying to solve this and other tradeoffs. I'd like to
simplify but satisfy my design goals.


What if there were two different lex:er modes... with different 
struct:s.


1. For an IDE with on the fly lexing:
  Assumption, the error rate is high.(need to keep much info)

2. For the compiler
Assumption, the error rate is non existent, and if there is an 
error it really doesn't matter if it's slow.


So... when choosing the compiler mode... and there actually is 
an error, then just lex it again, to produce a pretty error 
message ;)


try
{
  lex(mode.compiler);
}
catch
{
  lex(mode.ide); // calculates column etc. what ever info it 
needs.

}



Re: Introducing synd

2012-04-29 Thread Tove

On Sunday, 29 April 2012 at 19:38:38 UTC, Timo Westkämper wrote:
I'd like to announce that I am working on synd, a partial port 
of the STK library (https://ccrma.stanford.edu/software/stk/) 
to D.


synd provides basic building blocks for synth design such as 
envelopes, oscillators, delays and a few effects.


I do this while waiting for Linux shared library support to 
become available in D;)


like the name, 'synd' is swedish for 'sin' (biblical sense, not 
math). ;)




Re: Introducing vibe.d!

2012-04-27 Thread Tove

On Friday, 27 April 2012 at 19:40:53 UTC, F i L wrote:
vibe.d as the project name is great, but why have module 
vibe.d and not simply vibe? Or, why prefix all the types with


More complicated projects/frameworks ontop of vibe which 
implements it's own main is free to use vibe.all.


But I think...
  import vibe.d;
... makes perfect sense because it contains main()!



Re: avgtime - Small D util for your everyday benchmarking needs

2012-03-21 Thread Tove
On Thursday, 22 March 2012 at 00:32:31 UTC, Juan Manuel Cabo 
wrote:

This is a small util I wrote in D which is like the unix
'time' command but can repeat the command N times and show
median, average, standard deviation, minimum and maximum.

As you all know, it is not proper to conclude that
a program is faster than another program by running
them just once.

It's BOOST and is in github:

https://github.com/jmcabo/avgtime

Example:


avgtime -r 10 -q ls -lR /etc


Total time (ms): 933.742
Repetitions: 10
Median time: 90.505
Avg time   : 93.3742
Std dev.   : 4.66808
Minimum: 88.732
Maximum: 101.225

The -q argument pipes stderr and stdout of the program
under test to /dev/null

I put more info in the github page.


HAVE FUN!!

--jm


Awesome, I do have a tiny feature request for the next version... 
a commandline switch to enable automatically discarding the first 
run as an outlier.


/Tove