Re: D idioms list

2015-01-08 Thread Foo via Digitalmars-d-announce
I saw recently (at last in this thread: 
http://forum.dlang.org/thread/tdfydchrairigdlgt...@forum.dlang.org#post-qakiogaqvmiwlneimhgu:40forum.dlang.org) 
that many users use


key in aa ? aa[key] : ValueType.init;

instead of

auto ptr = key in aa;
ptr ? *ptr : ValueType.init;

which is more economic.
Maybe you can add it to your list:


import std.stdio;

void main() {
immutable string key = foo;
immutable string[string] arr = [key : bar];

if (auto ptr = key in arr)
writeln(*ptr);
}



Re: DConf 2015 Call for Submissions is now open

2015-01-08 Thread Walter Bright via Digitalmars-d-announce

On 1/8/2015 8:42 AM, Jonathan M Davis via Digitalmars-d-announce wrote:

On Thursday, January 08, 2015 10:31:37 Iain Buclaw via Digitalmars-d-announce 
wrote:

On 6 January 2015 at 23:24, Andrei Alexandrescu via
Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote:

Hello,


Exciting times! DConf 2015 will take place May 27-29 2015 at Utah Valley
University in Orem, UT.



Awesome, that runs over my birthday (28th). My friends and family
won't be too pleased. :-)


Just get them to help chip in for the airfare and hotel costs for your
birthday present. ;)


Or they can come to the conference, too!



Re: We're looking for a Software Developer! (D language)

2015-01-08 Thread John Carter via Digitalmars-d-announce
If you email me at john DOT carter AT taitradio DOT com we can take this
conversation out of the D forum as it is going way off topic.

On Fri, Jan 9, 2015 at 4:05 PM, Rikki Cattermole via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:

 On 9/01/2015 2:53 p.m., John Carter via Digitalmars-d-announce wrote:

 Whilst we are not currently using D at Tait Electronics

 I am certainly trying to make it happen.

 So if this job fits you...
 http://www.taitradio.com/about-us/careers/new-zealand/
 jobs-in-new-zealand/embedded-software-engineer2

 You can help me try!

 Part of the problem  with getting a new language accepted in a company,
 is to develop a critical mass of willing and capable programmers in that
 language.


 On Fri, Jan 9, 2015 at 2:20 AM, Rikki Cattermole via
 Digitalmars-d-announce digitalmars-d-announce@puremagic.com
 mailto:digitalmars-d-announce@puremagic.com wrote:

 On 9/01/2015 12:10 a.m., Johanna Burgos wrote:

 Your Mission

 Support our team in the development of our event-based
 infrastructure
 Development of high-performance applications and services
 Writing applications to work with our distributed DHT database
 system
 You will be coding in the D-language

 Your Track Record

 Degree in Computer Science, or closely-related
 Knowledge of Github
 Strong interest in distributed architectures
 Experienced in C, C++ or D (you’ll be programming in D)
 Fluency in written and spoken English

 Your Style

 You don’t like being thrown in at the deep end. You like to jump
 yourself
 You live and breathe globalization and love to work and travel
 internationally
 You mesmerize people with a friendly and open-minded, yet
 trustworthy
 and reliable personality
 You think in achievements, not in departments, responsibilities or
 hierarchy
 As a quick learner, first mover and fast thinker you can keep
 pace with
 one of the fastest growing technology start ups
 You are driven by curiosity and innovation, and always up for a
 good
 challenge

 Our Promise

 Employment in Berlin, full-time and full of fun challenges, with
 flexible working hours
 Access to a high-profile professional network of international
 Internet
 companies
 Possibility to show your excellent competence and your creative
 ideas to
 a broad audience
 A competitive compensation and incentive plan that rocks when
 you rock
 Personal development and training that will help you evolve from
 the pro
 you are right now to the champ you’re destined to be
 Basic German language courses for non-native speakers
 Help with residence permit processing for non-EU citizens
 Daily adrenalin rushes while working and learning in one of the
 fastest
 growing sectors in online advertising
 Access to an international high-profile network
 A company culture driven by pioneer-thinking and talent that
 exceeds
 departments and hierarchies


 The challenge is on. If you think it’s you we’re looking for,
 send us
 your battle plan along with a certificate of your super powers at
 care...@sociomantic.com mailto:care...@sociomantic.com.
 Alternatively, a motivational cover letter and
 resume in English will do, too. For now.


 Unfortunately I half wish you guys had a New Zealand office.
 As I am in need of a job.




 --
 John Carter
 Phone : (64)(3) 358 6639
 Tait Electronics
 PO Box 1645 Christchurch
 New Zealand


 
 This email, including any attachments, is only for the intended
 recipient. It is subject to copyright, is confidential and may be the
 subject of legal or other privilege, none of which is waived or lost by
 reason of this transmission.
 If you are not an intended recipient, you may not use, disseminate,
 distribute or reproduce such email, any attachments, or any part
 thereof. If you have received a message in error, please notify the
 sender immediately and erase all copies of the message and any
 attachments.
 Unfortunately, we cannot warrant that the email has not been altered or
 corrupted during transmission nor can we guarantee that any email or any
 attachments are free from computer viruses or other conditions which may
 damage or interfere with recipient data, hardware or software. The
 recipient relies upon its own procedures and assumes all risk of use and
 of opening any attachments.
 


 Wow there is actually somebody working right round the corner of me!
 I did not expect this.

 Out of curiosity how do 

Re: We're looking for a Software Developer! (D language)

2015-01-08 Thread Leandro Lucarella via Digitalmars-d-announce
On Thursday, 8 January 2015 at 13:21:05 UTC, Rikki Cattermole 
wrote:
The challenge is on. If you think it’s you we’re looking for, 
send us your battle plan along with a certificate of your 
super powers at care...@sociomantic.com. Alternatively, a 
motivational cover letter and resume in English will do, too. 
For now.


Unfortunately I half wish you guys had a New Zealand office.
As I am in need of a job.


We already have a kiwi in our lines, Ben, they guy organizing the 
Berlin meetup. You can ask him how was moving from NZ to DE. ;-)


Re: We're looking for a Software Developer! (D language)

2015-01-08 Thread Rikki Cattermole via Digitalmars-d-announce

On 9/01/2015 2:53 p.m., John Carter via Digitalmars-d-announce wrote:

Whilst we are not currently using D at Tait Electronics

I am certainly trying to make it happen.

So if this job fits you...
http://www.taitradio.com/about-us/careers/new-zealand/jobs-in-new-zealand/embedded-software-engineer2

You can help me try!

Part of the problem  with getting a new language accepted in a company,
is to develop a critical mass of willing and capable programmers in that
language.


On Fri, Jan 9, 2015 at 2:20 AM, Rikki Cattermole via
Digitalmars-d-announce digitalmars-d-announce@puremagic.com
mailto:digitalmars-d-announce@puremagic.com wrote:

On 9/01/2015 12:10 a.m., Johanna Burgos wrote:

Your Mission

Support our team in the development of our event-based
infrastructure
Development of high-performance applications and services
Writing applications to work with our distributed DHT database
system
You will be coding in the D-language

Your Track Record

Degree in Computer Science, or closely-related
Knowledge of Github
Strong interest in distributed architectures
Experienced in C, C++ or D (you’ll be programming in D)
Fluency in written and spoken English

Your Style

You don’t like being thrown in at the deep end. You like to jump
yourself
You live and breathe globalization and love to work and travel
internationally
You mesmerize people with a friendly and open-minded, yet
trustworthy
and reliable personality
You think in achievements, not in departments, responsibilities or
hierarchy
As a quick learner, first mover and fast thinker you can keep
pace with
one of the fastest growing technology start ups
You are driven by curiosity and innovation, and always up for a good
challenge

Our Promise

Employment in Berlin, full-time and full of fun challenges, with
flexible working hours
Access to a high-profile professional network of international
Internet
companies
Possibility to show your excellent competence and your creative
ideas to
a broad audience
A competitive compensation and incentive plan that rocks when
you rock
Personal development and training that will help you evolve from
the pro
you are right now to the champ you’re destined to be
Basic German language courses for non-native speakers
Help with residence permit processing for non-EU citizens
Daily adrenalin rushes while working and learning in one of the
fastest
growing sectors in online advertising
Access to an international high-profile network
A company culture driven by pioneer-thinking and talent that exceeds
departments and hierarchies


The challenge is on. If you think it’s you we’re looking for,
send us
your battle plan along with a certificate of your super powers at
care...@sociomantic.com mailto:care...@sociomantic.com.
Alternatively, a motivational cover letter and
resume in English will do, too. For now.


Unfortunately I half wish you guys had a New Zealand office.
As I am in need of a job.




--
John Carter
Phone : (64)(3) 358 6639
Tait Electronics
PO Box 1645 Christchurch
New Zealand



This email, including any attachments, is only for the intended
recipient. It is subject to copyright, is confidential and may be the
subject of legal or other privilege, none of which is waived or lost by
reason of this transmission.
If you are not an intended recipient, you may not use, disseminate,
distribute or reproduce such email, any attachments, or any part
thereof. If you have received a message in error, please notify the
sender immediately and erase all copies of the message and any attachments.
Unfortunately, we cannot warrant that the email has not been altered or
corrupted during transmission nor can we guarantee that any email or any
attachments are free from computer viruses or other conditions which may
damage or interfere with recipient data, hardware or software. The
recipient relies upon its own procedures and assumes all risk of use and
of opening any attachments.



Wow there is actually somebody working right round the corner of me!
I did not expect this.

Out of curiosity how do you guys consider CPIT's Degree in ICT keep in 
mind that it doesn't cover c/c++. Well until I pushed for D(native) anyway.


Re: D idioms list

2015-01-08 Thread ketmar via Digitalmars-d-announce
On Thu, 08 Jan 2015 21:22:30 +
ponce via Digitalmars-d-announce digitalmars-d-announce@puremagic.com
wrote:

 On Thursday, 8 January 2015 at 20:23:11 UTC, ketmar via 
 Digitalmars-d-announce wrote:
  i'm not sure, but maybe it worth renaming struct inheritance 
  to
  extending a struct? or even something completely different. 
  what it
  does is actually extending/augmenting the struct, but not
  OO-inheritance, as one cannot pass augmented struct to the 
  function
  which expects original struct. at least without hackery.
 
 Renamed, thanks!
we actually can pass extended struct as original one, as Artur shown,
but i believe that extending is still better.

p.s. you forgot to fix TOC, which still reads struct inheritance.


signature.asc
Description: PGP signature


Re: D idioms list

2015-01-08 Thread ketmar via Digitalmars-d-announce
On Thu, 08 Jan 2015 22:25:11 +0100
Artur Skawina via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:

 On 01/08/15 21:23, ketmar via Digitalmars-d-announce wrote:
  i'm not sure, but maybe it worth renaming struct inheritance to
  extending a struct? or even something completely different. what it
  does is actually extending/augmenting the struct, but not
  OO-inheritance, as one cannot pass augmented struct to the function
  which expects original struct. at least without hackery.
 
 'alias this' is just the D syntax for implicit conversions.
 The feature /is/ crippled, but there's no need for hackery;
 at least not for simple things like that.
 
struct A { int a; }
struct B { A a; alias a this; string b; }
 
int f(A a) { return a.a+1; }
int g(ref A a) { return a.a+1; }
ref A h(ref A a) { return a; }
 
int main() {
   B b;
   return f(b)+g(b)+h(b).a;
}
 
 artur
mea culpa. i completely forgot about that feature of `alias this`, and
was pretty sure that the code above is invalid. i never bothered to
really check it. sorry.


signature.asc
Description: PGP signature


Re: D idioms list

2015-01-08 Thread ketmar via Digitalmars-d-announce
On Thu, 08 Jan 2015 21:22:30 +
ponce via Digitalmars-d-announce digitalmars-d-announce@puremagic.com
wrote:

 On Thursday, 8 January 2015 at 20:23:11 UTC, ketmar via 
 Digitalmars-d-announce wrote:
  i'm not sure, but maybe it worth renaming struct inheritance 
  to
  extending a struct? or even something completely different. 
  what it
  does is actually extending/augmenting the struct, but not
  OO-inheritance, as one cannot pass augmented struct to the 
  function
  which expects original struct. at least without hackery.
 
 Renamed, thanks!
p.p.s. maybe it's worth adding Artur's code sample[1] too, to show that
extended structure can be passed to functions which requires original
one? it's not obvious, at least for me. ;-)

[1] 
http://forum.dlang.org/post/mailman.4332.1420752329.9932.digitalmars-d-annou...@puremagic.com


signature.asc
Description: PGP signature


Re: D idioms list

2015-01-08 Thread weaselcat via Digitalmars-d-announce

On Thursday, 8 January 2015 at 10:21:26 UTC, ponce wrote:
I've started a list of curated D tips and tricks here: 
http://p0nce.github.io/d-idioms/


Anything that you wished you learned earlier at one point in 
the D world is welcome to be added or suggested.


I think the focus should be on stuff that could make you more 
productive, or is just funky but that is up to debate.


Of course the D Cookbook still stays irreplaceable for a 
consistent, in-depth discussion of being D-enabled.


Thoughts?


Not much to add but I enjoy reading 'idiomatic' D content - 
coming from C++, I feel like I'm often not writing my D code like 
I should be. Thanks for the extra resource.


Re: We're looking for a Software Developer! (D language)

2015-01-08 Thread Lukasz Wrzosek via Digitalmars-d-announce

Is there any chance that in the future your company hire D
developers in Warsaw office ?


Re: Sociomantic: We're looking for a Software Developer! (D language)

2015-01-08 Thread FG via Digitalmars-d-announce

On 2015-01-08 14:01 Joseph Rushton Wakeling wrote:

Just to mention that this call is particularly focused on getting
new people for my team at Sociomantic.


There is one important piece of information missing:
Are you still using only D1?
If not, how is your code base currently split into D1 and D2?


We're looking for a Linuy Systems Admin!

2015-01-08 Thread Johanna Burgos via Digitalmars-d-announce

Your Mission

Provide server administration to our data centers
Provisioning new servers, imaging, monitoring, and other daily 
routines

Daily monitoring and maintenance of servers
Perform backup, file replications, and script management for 
servers

Test and apply new software and patches
Complete security audits on a routine basis
Report to the VP Product and Innovations

Your Track Record

5+ years Linux System administration (experience with 
Debian-based distributions (Ubuntu in particular) desired)
Working knowledge of complex web hosting configuration 
components, including firewalls, HA Proxy, web and database 
servers
Ability to deploy, support, and diagnose real (hardware, software 
and network) issues for a production environment
Knowledge of TCP/IP, bash/python scripting, postfix, 
smartmontools, Puppet, LVM, RAID, collectd, cacti, nagios and 
other monitoring solutions is highly appreciated
Experience in nginx web servers, PHP and MySQL configuration, as 
well as deploying custom in-house developed services

Experience in communicating with external suppliers

Your Style

You don’t like being thrown in at the deep end. You like to jump 
yourself
You live and breathe globalization and love to work and travel 
internationally
You mesmerize people with a friendly and open-minded, yet 
trustworthy and reliable personality
You think in achievements, not in departments, responsibilities 
or hierarchies
As a quick learner, first mover and fast thinker you can keep 
pace with one of the fastest growing technology start ups
You are driven by curiosity and innovation, and always up for a 
good challenge
Fluency and strong communication skills in both written and 
spoken English


Our Promise

Employment in Berlin, full-time and full of fun challenges, with 
flexible working hours
A competitive compensation and incentive plan that rocks when you 
rock
Personal development and training that will help you evolve from 
the pro you are right now to the champ you’re destined to be
Daily adrenalin rushes while working and learning in one of the 
fastest growing sectors in online advertising

Access to an international high-profile network
A company culture driven by pioneer-thinking and talent that 
exceeds departments and hierarchies



The challenge is on. If you think it’s you we’re looking for, 
send us your battle plan along with a certificate of your super 
powers at care...@sociomantic.com. Alternatively, a motivational 
cover letter and resume will do, too. For now.


Re: D idioms list

2015-01-08 Thread Szymon Gatner via Digitalmars-d-announce

On Thursday, 8 January 2015 at 10:21:26 UTC, ponce wrote:
I've started a list of curated D tips and tricks here: 
http://p0nce.github.io/d-idioms/


Anything that you wished you learned earlier at one point in 
the D world is welcome to be added or suggested.


I think the focus should be on stuff that could make you more 
productive, or is just funky but that is up to debate.


Of course the D Cookbook still stays irreplaceable for a 
consistent, in-depth discussion of being D-enabled.


Thoughts?


They are really cool, thanks :)

Question:

Where did this syntax came from? It is not documented for 
'import' keyword.(first time I see that D has built-in resource 
compiler):


ubyte[] sdlBytes = cast(ubyte[]) import(SDL2.dll);


Re: D idioms list

2015-01-08 Thread ketmar via Digitalmars-d-announce
On Thu, 08 Jan 2015 11:24:34 +
Szymon Gatner via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:

 On Thursday, 8 January 2015 at 10:21:26 UTC, ponce wrote:
  I've started a list of curated D tips and tricks here: 
  http://p0nce.github.io/d-idioms/
 
  Anything that you wished you learned earlier at one point in 
  the D world is welcome to be added or suggested.
 
  I think the focus should be on stuff that could make you more 
  productive, or is just funky but that is up to debate.
 
  Of course the D Cookbook still stays irreplaceable for a 
  consistent, in-depth discussion of being D-enabled.
 
  Thoughts?
 
 They are really cool, thanks :)
 
 Question:
 
 Where did this syntax came from? It is not documented for 
 'import' keyword.(first time I see that D has built-in resource 
 compiler):
 
 ubyte[] sdlBytes = cast(ubyte[]) import(SDL2.dll);
it is documented: http://dlang.org/expression.html#ImportExpression
it's a nice D habit of overloading keywords.


signature.asc
Description: PGP signature


Re: D idioms list

2015-01-08 Thread ponce via Digitalmars-d-announce

On Thursday, 8 January 2015 at 10:56:00 UTC, bearophile wrote:

ponce:

I'm not familiar with the terse, range-heavy, UFCS style that 
has emerged from Phobos


In Rosettacode I have inserted tons of examples of that coding 
style.


An example, given a tuple of arbitrary length, with items all 
of the same type, how do you compute the total of its items?


The last way I've invented is:

myTuple[].only.sum

It's also @nogc. But it causes a little of template bloat.

Bye,
bearophile


Cool. I will link to the Rosettacode D pages since I've used them 
in the past when time-constrained, especially all things 
regarding text files.


Re: D idioms list

2015-01-08 Thread Szymon Gatner via Digitalmars-d-announce
On Thursday, 8 January 2015 at 11:31:14 UTC, ketmar via 
Digitalmars-d-announce wrote:

On Thu, 08 Jan 2015 11:24:34 +
Szymon Gatner via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:


On Thursday, 8 January 2015 at 10:21:26 UTC, ponce wrote:
 I've started a list of curated D tips and tricks here: 
 http://p0nce.github.io/d-idioms/


 Anything that you wished you learned earlier at one point in 
 the D world is welcome to be added or suggested.


 I think the focus should be on stuff that could make you 
 more productive, or is just funky but that is up to debate.


 Of course the D Cookbook still stays irreplaceable for a 
 consistent, in-depth discussion of being D-enabled.


 Thoughts?

They are really cool, thanks :)

Question:

Where did this syntax came from? It is not documented for 
'import' keyword.(first time I see that D has built-in 
resource compiler):


ubyte[] sdlBytes = cast(ubyte[]) import(SDL2.dll);
it is documented: 
http://dlang.org/expression.html#ImportExpression

it's a nice D habit of overloading keywords.


Ah, thanks. Follow up then: can such imported string be used for 
mixin?


Re: D idioms list

2015-01-08 Thread ponce via Digitalmars-d-announce

On Thursday, 8 January 2015 at 11:41:43 UTC, Szymon Gatner wrote:


Question:

Where did this syntax came from? It is not documented for 
'import' keyword.(first time I see that D has built-in 
resource compiler):


ubyte[] sdlBytes = cast(ubyte[]) import(SDL2.dll);
it is documented: 
http://dlang.org/expression.html#ImportExpression

it's a nice D habit of overloading keywords.


Ah, thanks. Follow up then: can such imported string be used 
for mixin?


Yes.



Re: D idioms list

2015-01-08 Thread Szymon Gatner via Digitalmars-d-announce

On Thursday, 8 January 2015 at 11:43:30 UTC, ponce wrote:
On Thursday, 8 January 2015 at 11:41:43 UTC, Szymon Gatner 
wrote:


Question:

Where did this syntax came from? It is not documented for 
'import' keyword.(first time I see that D has built-in 
resource compiler):


ubyte[] sdlBytes = cast(ubyte[]) import(SDL2.dll);
it is documented: 
http://dlang.org/expression.html#ImportExpression

it's a nice D habit of overloading keywords.


Ah, thanks. Follow up then: can such imported string be used 
for mixin?


Yes.


That is pretty damn cool then.


Re: D idioms list

2015-01-08 Thread ketmar via Digitalmars-d-announce
On Thu, 08 Jan 2015 11:41:42 +
Szymon Gatner via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:

 On Thursday, 8 January 2015 at 11:31:14 UTC, ketmar via 
 Digitalmars-d-announce wrote:
  On Thu, 08 Jan 2015 11:24:34 +
  Szymon Gatner via Digitalmars-d-announce
  digitalmars-d-announce@puremagic.com wrote:
 
  On Thursday, 8 January 2015 at 10:21:26 UTC, ponce wrote:
   I've started a list of curated D tips and tricks here: 
   http://p0nce.github.io/d-idioms/
  
   Anything that you wished you learned earlier at one point in 
   the D world is welcome to be added or suggested.
  
   I think the focus should be on stuff that could make you 
   more productive, or is just funky but that is up to debate.
  
   Of course the D Cookbook still stays irreplaceable for a 
   consistent, in-depth discussion of being D-enabled.
  
   Thoughts?
  
  They are really cool, thanks :)
  
  Question:
  
  Where did this syntax came from? It is not documented for 
  'import' keyword.(first time I see that D has built-in 
  resource compiler):
  
  ubyte[] sdlBytes = cast(ubyte[]) import(SDL2.dll);
  it is documented: 
  http://dlang.org/expression.html#ImportExpression
  it's a nice D habit of overloading keywords.
 
 Ah, thanks. Follow up then: can such imported string be used for 
 mixin?
sure. either directly, or you can use CTFE to parse imported data and
generate code. for now it's somewhat limited, 'cause CTFE parsing eats
alot of memory, but when we'll have 128GB of RAM at bare minimum... i
don't think that i'll be using external preprocessors to generate D
code from various text and binary files.


signature.asc
Description: PGP signature


Sociomantic: We're looking for a Software Developer! (D language)

2015-01-08 Thread Joseph Rushton Wakeling via Digitalmars-d-announce

Hello all,

Just to mention that this call is particularly focused on getting
new people for my team at Sociomantic.  It may be of especial
interest to anyone who wants to work on machine learning problems
(we have lots of fun stuff in the pipeline), but whatever your
background, this is a great opportunity to work full-time with D,
in a great company that has a very extensive and exciting D
codebase.

You can also review the job ad on our company website:
https://www.sociomantic.com/jobs/d-software-developer/#.VK5xsV2YOlM

Best wishes,

 -- Joe (Software Dev @ Sociomantic:-)


Sociomantic: We're looking for a Linux Systems Admin!

2015-01-08 Thread Don via Digitalmars-d-announce
It is probably not obvious why our HR department posted this job 
ad to this newsgroup, particularly to anyone who doesn't know 
Sociomantic's relationship to the D community.


Most of the apps running on our servers, are written in D. The 
role doesn't involve D programming, and the job ad doesn't even 
mention D, but it will involve working very closely with our D 
developers, in supporting the deployment and operation of D code.


You can also review the job ad on our company website:
https://www.sociomantic.com/jobs/linux-system-administrator/#.VK5_XV3ydwE

- Don.



Re: DConf 2015 Call for Submissions is now open

2015-01-08 Thread Iain Buclaw via Digitalmars-d-announce
On 6 January 2015 at 23:24, Andrei Alexandrescu via
Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote:
 Hello,


 Exciting times! DConf 2015 will take place May 27-29 2015 at Utah Valley
 University in Orem, UT.


Awesome, that runs over my birthday (28th). My friends and family
won't be too pleased. :-)

Iain


Re: D idioms list

2015-01-08 Thread ponce via Digitalmars-d-announce

On Thursday, 8 January 2015 at 10:30:38 UTC, uri wrote:


This is great, thanks.

Something I personally would find useful is a comparison 
between the C++ way and idiomatic D with Phobos. I finding 
coming from C/C++ to D very easy but I'm always wondering if 
I'm doing things the D way.


Cheers,
uri


I'm not familiar with the terse, range-heavy, UFCS style that has 
emerged from Phobos so I'm not sure if I can write that.


What could help is a list of tasks for which you asked yourself 
what the D way was. Is there one?


D idioms list

2015-01-08 Thread ponce via Digitalmars-d-announce
I've started a list of curated D tips and tricks here: 
http://p0nce.github.io/d-idioms/


Anything that you wished you learned earlier at one point in the 
D world is welcome to be added or suggested.


I think the focus should be on stuff that could make you more 
productive, or is just funky but that is up to debate.


Of course the D Cookbook still stays irreplaceable for a 
consistent, in-depth discussion of being D-enabled.


Thoughts?


Re: D idioms list

2015-01-08 Thread uri via Digitalmars-d-announce

On Thursday, 8 January 2015 at 10:21:26 UTC, ponce wrote:
I've started a list of curated D tips and tricks here: 
http://p0nce.github.io/d-idioms/


Anything that you wished you learned earlier at one point in 
the D world is welcome to be added or suggested.


I think the focus should be on stuff that could make you more 
productive, or is just funky but that is up to debate.


Of course the D Cookbook still stays irreplaceable for a 
consistent, in-depth discussion of being D-enabled.


Thoughts?


This is great, thanks.

Something I personally would find useful is a comparison between 
the C++ way and idiomatic D with Phobos. I finding coming from 
C/C++ to D very easy but I'm always wondering if I'm doing things 
the D way.


Cheers,
uri


Re: D idioms list

2015-01-08 Thread uri via Digitalmars-d-announce

On Thursday, 8 January 2015 at 10:35:07 UTC, ponce wrote:

On Thursday, 8 January 2015 at 10:30:38 UTC, uri wrote:


This is great, thanks.

Something I personally would find useful is a comparison 
between the C++ way and idiomatic D with Phobos. I finding 
coming from C/C++ to D very easy but I'm always wondering if 
I'm doing things the D way.


Cheers,
uri


I'm not familiar with the terse, range-heavy, UFCS style that 
has emerged from Phobos so I'm not sure if I can write that.


What could help is a list of tasks for which you asked yourself 
what the D way was. Is there one?


No I admit I don't have any real list. It's always an in the 
moment sort of thing and I then just choose a D-ish/C++ style 
and promptly forget the exact details.


I'll start to compile a list each time this comes up. And if I 
find any good D idioms in the process I'll include them in the 
list as well.


Thanks,
uri


Re: D idioms list

2015-01-08 Thread bearophile via Digitalmars-d-announce

ponce:

I'm not familiar with the terse, range-heavy, UFCS style that 
has emerged from Phobos


In Rosettacode I have inserted tons of examples of that coding 
style.


An example, given a tuple of arbitrary length, with items all of 
the same type, how do you compute the total of its items?


The last way I've invented is:

myTuple[].only.sum

It's also @nogc. But it causes a little of template bloat.

Bye,
bearophile


Re: We're looking for a Software Developer! (D language)

2015-01-08 Thread Rikki Cattermole via Digitalmars-d-announce

On 9/01/2015 12:10 a.m., Johanna Burgos wrote:

Your Mission

Support our team in the development of our event-based infrastructure
Development of high-performance applications and services
Writing applications to work with our distributed DHT database system
You will be coding in the D-language

Your Track Record

Degree in Computer Science, or closely-related
Knowledge of Github
Strong interest in distributed architectures
Experienced in C, C++ or D (you’ll be programming in D)
Fluency in written and spoken English

Your Style

You don’t like being thrown in at the deep end. You like to jump yourself
You live and breathe globalization and love to work and travel
internationally
You mesmerize people with a friendly and open-minded, yet trustworthy
and reliable personality
You think in achievements, not in departments, responsibilities or
hierarchy
As a quick learner, first mover and fast thinker you can keep pace with
one of the fastest growing technology start ups
You are driven by curiosity and innovation, and always up for a good
challenge

Our Promise

Employment in Berlin, full-time and full of fun challenges, with
flexible working hours
Access to a high-profile professional network of international Internet
companies
Possibility to show your excellent competence and your creative ideas to
a broad audience
A competitive compensation and incentive plan that rocks when you rock
Personal development and training that will help you evolve from the pro
you are right now to the champ you’re destined to be
Basic German language courses for non-native speakers
Help with residence permit processing for non-EU citizens
Daily adrenalin rushes while working and learning in one of the fastest
growing sectors in online advertising
Access to an international high-profile network
A company culture driven by pioneer-thinking and talent that exceeds
departments and hierarchies


The challenge is on. If you think it’s you we’re looking for, send us
your battle plan along with a certificate of your super powers at
care...@sociomantic.com. Alternatively, a motivational cover letter and
resume in English will do, too. For now.


Unfortunately I half wish you guys had a New Zealand office.
As I am in need of a job.


Re: We're looking for a Software Developer! (D language)

2015-01-08 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Thursday, 8 January 2015 at 13:21:05 UTC, Rikki Cattermole 
wrote:

Unfortunately I half wish you guys had a New Zealand office.
As I am in need of a job.


Sure we can't tempt you to consider crossing the oceans?  Berlin 
is a fun city and you will find many fellow New Zealanders to 
help you feel at home. :-)


Re: D idioms list

2015-01-08 Thread Robert burner Schadek via Digitalmars-d-announce

that a really nice idea, thanks.

substring position, std.string.(last)indexOf(|Any|Neither) may be 
better



btw. this should move to the dlang wiki. Any takers?


Re: We're looking for a Linuy Systems Admin!

2015-01-08 Thread Iain Buclaw via Digitalmars-d-announce
On 8 January 2015 at 11:08, Johanna Burgos via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:
 Your Mission

 Provide server administration to our data centers
 Provisioning new servers, imaging, monitoring, and other daily routines
 Daily monitoring and maintenance of servers
 Perform backup, file replications, and script management for servers
 Test and apply new software and patches
 Complete security audits on a routine basis
 Report to the VP Product and Innovations

 Your Track Record

 5+ years Linux System administration (experience with Debian-based
 distributions (Ubuntu in particular) desired)
 Working knowledge of complex web hosting configuration components, including
 firewalls, HA Proxy, web and database servers
 Ability to deploy, support, and diagnose real (hardware, software and
 network) issues for a production environment
 Knowledge of TCP/IP, bash/python scripting, postfix, smartmontools, Puppet,
 LVM, RAID, collectd, cacti, nagios and other monitoring solutions is highly
 appreciated
 Experience in nginx web servers, PHP and MySQL configuration, as well as
 deploying custom in-house developed services
 Experience in communicating with external suppliers

 Your Style

 You don’t like being thrown in at the deep end. You like to jump yourself
 You live and breathe globalization and love to work and travel
 internationally
 You mesmerize people with a friendly and open-minded, yet trustworthy and
 reliable personality
 You think in achievements, not in departments, responsibilities or
 hierarchies
 As a quick learner, first mover and fast thinker you can keep pace with one
 of the fastest growing technology start ups
 You are driven by curiosity and innovation, and always up for a good
 challenge
 Fluency and strong communication skills in both written and spoken English

 Our Promise

 Employment in Berlin, full-time and full of fun challenges, with flexible
 working hours
 A competitive compensation and incentive plan that rocks when you rock
 Personal development and training that will help you evolve from the pro you
 are right now to the champ you’re destined to be
 Daily adrenalin rushes while working and learning in one of the fastest
 growing sectors in online advertising
 Access to an international high-profile network
 A company culture driven by pioneer-thinking and talent that exceeds
 departments and hierarchies


 The challenge is on. If you think it’s you we’re looking for, send us your
 battle plan along with a certificate of your super powers at
 care...@sociomantic.com. Alternatively, a motivational cover letter and
 resume will do, too. For now.


Tempting, I was wondering if there are any Sysadmin/Devops positions
within Sociomantic... :-)

Iain



Re: D idioms list

2015-01-08 Thread Foo via Digitalmars-d-announce

On Thursday, 8 January 2015 at 20:00:11 UTC, Foo wrote:

On Thursday, 8 January 2015 at 10:21:26 UTC, ponce wrote:
I've started a list of curated D tips and tricks here: 
http://p0nce.github.io/d-idioms/


Anything that you wished you learned earlier at one point in 
the D world is welcome to be added or suggested.


I think the focus should be on stuff that could make you more 
productive, or is just funky but that is up to debate.


Of course the D Cookbook still stays irreplaceable for a 
consistent, in-depth discussion of being D-enabled.


Thoughts?


Struct inheritance with alias this
You are using a class ;)


And the public label is redundant.


Re: D idioms list

2015-01-08 Thread Artur Skawina via Digitalmars-d-announce
On 01/08/15 21:23, ketmar via Digitalmars-d-announce wrote:
 i'm not sure, but maybe it worth renaming struct inheritance to
 extending a struct? or even something completely different. what it
 does is actually extending/augmenting the struct, but not
 OO-inheritance, as one cannot pass augmented struct to the function
 which expects original struct. at least without hackery.

'alias this' is just the D syntax for implicit conversions.
The feature /is/ crippled, but there's no need for hackery;
at least not for simple things like that.

   struct A { int a; }
   struct B { A a; alias a this; string b; }

   int f(A a) { return a.a+1; }
   int g(ref A a) { return a.a+1; }
   ref A h(ref A a) { return a; }

   int main() {
  B b;
  return f(b)+g(b)+h(b).a;
   }

artur