Re: [neovim/vim] ncm2/ncm2-d autocompletion source for d

2018-12-28 Thread David via Digitalmars-d-announce

On Friday, 28 December 2018 at 12:41:27 UTC, David wrote:

On Thursday, 27 December 2018 at 21:50:04 UTC, David wrote:

sorry - I was wrong! It works as expected :-) - very nice! It 
probably conflicted with deoplete (or something else) which may 
still have been in the cache ...


Now, I am wondering how I can trigger "completion" for the 
signature which doesn't pop up


got it :-) The caveat is that also using ncm2-ultisnips

inoremap
ncm2_ultisnips#expand_or("\", 'n')


needs to be set after

inoremap   (pumvisible() ? "\\" : "\")

which was a bit random in my case with lazily loading plugins ...






Re: DLS (D Language Server) v0.20

2018-12-28 Thread Laurent Tréguier via Digitalmars-d-announce

On Friday, 28 December 2018 at 20:44:30 UTC, Per Nordlöw wrote:

Nice! Great work!


Thanks!


How does DLS compare to the features of DCD?


DLS actually uses DCD as a library. There is some custom handling 
to be able to find multiple declarations for methods with 
multiple overloads and such (DCD will only send one), and some 
code to try to find all references to a symbol in a project 
(which is also used for symbol renaming).


However, it doesn't use the latest DCD 0.10 version yet, so 
standalone DCD is probably still the best regarding 
autocompletion.


I'm using DCD through my beloved Emacs. Is there a more 
powerful Emacs+DLS-solution ready for use?


I don't know.
There seems to be 2 language client extensions for Emacs : 
lsp-mode [1] and eglot [2]. I'm not sure how Emacs' packages are 
configured since I've never used Emacs; but it looks like 
lsp-mode would require a small custom package to glue everything 
together, while eglot, according to its README, can be configured 
to add more servers manually, with a line like:
`(add-to-list 'eglot-server-programs '(foo-mode . 
("foo-language-server" "--args")))`
I haven't looked into Emacs yet, maybe I'll do that in the coming 
days.



[1] https://github.com/emacs-lsp/lsp-mode
[2] https://github.com/joaotavora/eglot


Re: DConf 2019: Shepherd's Pie Edition

2018-12-28 Thread Steven Schveighoffer via Digitalmars-d-announce

On 12/28/18 11:31 AM, Adam D. Ruppe wrote:

But I'm telling you, DConf can learn from this stuff. Joakim is doing 
the community a service by trying to get you all to try some changes. 
Even baby step compromises can yield results at low risk.


Note that the proposals always ask for format (talk, panel, contest, 
interpretive dance).


So you can always propose a presentation that takes on a format that you 
think will be more useful.


I think the biggest problem with Joakim's post was simply that it was 
phrased like `why do you want to have such a stupid ritual, when your 
money can be better spent doing something else?` Things went downhill 
from there.


-Steve


Re: DLS (D Language Server) v0.20

2018-12-28 Thread Per Nordlöw via Digitalmars-d-announce
On Friday, 28 December 2018 at 11:14:01 UTC, Laurent Tréguier 
wrote:

Hello, and merry Christmas! (a bit late, but whatever)
https://forum.dlang.org/post/jytsaamhiglkmeixx...@forum.dlang.org
[2] https://github.com/d-language-server/dls
[3] https://github.com/Pure-D/serve-d


Nice! Great work!

How does DLS compare to the features of DCD?

I'm using DCD through my beloved Emacs. Is there a more powerful 
Emacs+DLS-solution ready for use?


Re: DConf 2019: Shepherd's Pie Edition

2018-12-28 Thread Sebastiaan Koppe via Digitalmars-d-announce

On Friday, 28 December 2018 at 16:31:01 UTC, Adam D. Ruppe wrote:
For last year's meeting, my manager (the team I'm on has done 
our meetings differently for a while) convinced the CEO to try 
a more interactive approach for the org-wide meeting too. We 
did that speaker intro, small random group work, whole group 
conclusion pattern.


It was a success. Everyone was more engaged, we had more 
cross-team collaboration (which has continued throughout the 
year as people are more comfortable with each other!), and 
people have shown better retention of the material. Staff 
surveys about subjective feelings about this meeting were up, 
too, people said it is more enjoyable.


Nice! I have seen this work as well and it is amazing to see it 
when it happens. Great that your team could be that catalyst.


In my experience it works great in trainings and workshops, but 
it might as well be very enjoyable and productive on dconf. 
Although I would keep at least 60% talks.


Re: DLS (D Language Server) v0.20

2018-12-28 Thread Paolo Invernizzi via Digitalmars-d-announce

On Friday, 28 December 2018 at 18:50:39 UTC, David Gileadi wrote:

On 12/28/18 4:14 AM, Laurent Tréguier wrote:

Hello, and merry Christmas! (a bit late, but whatever)


This is an excellent update--the update Just Works™ with VSCode 
on my mac, and functions very nicely too. Thanks!


I might suggest that you perhaps rename the VSCode extension to 
remove "VSCode" from the name (as it's redundant) and add "D 
Language" (because the current name makes it a bit hard to 
discover).


+1, It's a great piece of software, so thank you.

I'm using it  on Mac also, when I'm not using vim: works like a 
charm!


--- Paolo


ldexp and frexp benchmark between Mir, C and Phobos

2018-12-28 Thread 9il via Digitalmars-d-announce
ldexp and frexp are base building blocks for a lot of math 
functions.


Here is a small benchmark that compares Mir, C and Phobos 
implementations:


https://github.com/libmir/mir-core/blob/master/bench_ldexp_frexp.d

Mir ldexp is 2.5 (5.5 - dmd) times faster for double and float.

=
LDC, macos x64:
---
 float 
ldexp (Phobos time / Mir time) = 2.55584
ldexp (  stdc time / Mir time) = 0.773019
frexp (Phobos time / Mir time) = 1.04093
frexp (  stdc time / Mir time) = 1.748
---
 double 
ldexp (Phobos time / Mir time) = 2.49162
ldexp (  stdc time / Mir time) = 1.31868
frexp (Phobos time / Mir time) = 0.937906
frexp (  stdc time / Mir time) = 1.82241
---
 real 
ldexp (Phobos time / Mir time) = 0.999327 (LDC Phobos uses C func 
for real)
ldexp (  stdc time / Mir time) = 0.969467 (LDC Mir uses C func 
for real)

frexp (Phobos time / Mir time) = 1.02512
frexp (  stdc time / Mir time) = 1.77901

=
DMD, macos x64:
---
 float 
ldexp (Phobos time / Mir time) = 5.53172
ldexp (  stdc time / Mir time) = 0.535711
frexp (Phobos time / Mir time) = 2.06024
frexp (  stdc time / Mir time) = 0.739571
---
 double 
ldexp (Phobos time / Mir time) = 5.32189
ldexp (  stdc time / Mir time) = 0.772949
frexp (Phobos time / Mir time) = 2.02758
frexp (  stdc time / Mir time) = 0.637328
---
 real 
ldexp (Phobos time / Mir time) = 2.61905
ldexp (  stdc time / Mir time) = 0.803806
frexp (Phobos time / Mir time) = 1.22398
frexp (  stdc time / Mir time) = 1.08659

Best,
Ilya


This work has been sponsored by Symmetry Investments and Kaleidic 
Associates.


http://symmetryinvestments.com/
https://github.com/kaleidicassociates/





Re: DLS (D Language Server) v0.20

2018-12-28 Thread Laurent Tréguier via Digitalmars-d-announce

On Friday, 28 December 2018 at 18:50:39 UTC, David Gileadi wrote:
This is an excellent update--the update Just Works™ with VSCode 
on my mac, and functions very nicely too. Thanks!


You're welcome; it's a relief to hear that, as I don't have a mac 
to actually test it on macOS!


I might suggest that you perhaps rename the VSCode extension to 
remove "VSCode" from the name (as it's redundant) and add "D 
Language" (because the current name makes it a bit hard to 
discover).


Yes, I'll probably do that in its next release.


Re: now it's possible! printing floating point numbers at compile-time

2018-12-28 Thread ketmar via Digitalmars-d-announce

Stefan Koch wrote:


Hi Guys,

during my research on floating point numbers I came across a short and 
efficient implementation[0] of the grisu2 algorithm for converting 
floating point numbers into strings.


Which I then ported into CTFEable D code.
Thus enabling you to convert doubles into strings at compiletime.

Cheers

Stefan Koch

P.S. You can find it at my fork of fpconv[1].


[0] https://github.com/night-shift/fpconv
[1] https://github.com/UplinkCoder/fpconv/blob/master/src/fpconv_ctfe.d


of course, it is not all that fancy, but i ported STB converter quite a 
long time ago, and it is ctfe-able too. ;-)


[0] https://repo.or.cz/iv.d.git/blob_plain/HEAD:/ctfefloat.d


Re: DLS (D Language Server) v0.20

2018-12-28 Thread David Gileadi via Digitalmars-d-announce

On 12/28/18 4:14 AM, Laurent Tréguier wrote:

Hello, and merry Christmas! (a bit late, but whatever)


This is an excellent update--the update Just Works™ with VSCode on my 
mac, and functions very nicely too. Thanks!


I might suggest that you perhaps rename the VSCode extension to remove 
"VSCode" from the name (as it's redundant) and add "D Language" (because 
the current name makes it a bit hard to discover).


Re: DConf 2019: Shepherd's Pie Edition

2018-12-28 Thread Adam D. Ruppe via Digitalmars-d-announce

On Friday, 28 December 2018 at 07:08:19 UTC, Dejan Lekic wrote:
While I admire your persistence I fail to understand why you 
simply don't ignore stuff you do not like. If you do not like 
conferences fine - do not go there, and let us who do like them 
and think they are useful have some fun!


Some of us want to improve things for everyone else, too.

Isn't that what open source is all about? We do it initially 
because it works for us, but then share it because it helps the 
community as well.


If you actually tried these improvements, you'd probably like 
them. Even our conservative managers at the day job have 
responded positively to similar changes we made over the last 
year.


We're a predominately remote organization and used to have 
org-wide in-person meetings that worked very much like dconf does 
now - someone would be designated to rattle off about a 
powerpoint while everyone else passively watches.


For last year's meeting, my manager (the team I'm on has done our 
meetings differently for a while) convinced the CEO to try a more 
interactive approach for the org-wide meeting too. We did that 
speaker intro, small random group work, whole group conclusion 
pattern.


It was a success. Everyone was more engaged, we had more 
cross-team collaboration (which has continued throughout the year 
as people are more comfortable with each other!), and people have 
shown better retention of the material. Staff surveys about 
subjective feelings about this meeting were up, too, people said 
it is more enjoyable.


And this shouldn't be a surprise! We find in education that using 
a variety of teaching strategies and getting students hands-on 
and working together almost always leads to better outcomes.



Of course, most people STILL say their favorite part was the 
after-hours chats... but I say that's because the in-hours stuff 
was still basically work :P


But I'm telling you, DConf can learn from this stuff. Joakim is 
doing the community a service by trying to get you all to try 
some changes. Even baby step compromises can yield results at low 
risk.


Re: [neovim/vim] ncm2/ncm2-d autocompletion source for d

2018-12-28 Thread David via Digitalmars-d-announce

On Thursday, 27 December 2018 at 21:50:04 UTC, David wrote:

On Wednesday, 26 December 2018 at 00:42:25 UTC, viniarck wrote:

[...]


looks nice but the behavior is a bit strange, as it suggest 
also functions which are not imported. E.g.


import std.stdio: writeln;

completion for "wri" also brings up "writef" and all other 
functions from std.stdio starting with wri ...


sorry - I was wrong! It works as expected :-) - very nice! It 
probably conflicted with deoplete (or something else) which may 
still have been in the cache ...


Now, I am wondering how I can trigger "completion" for the 
signature which doesn't pop up


DLS (D Language Server) v0.20

2018-12-28 Thread Laurent Tréguier via Digitalmars-d-announce

Hello, and merry Christmas! (a bit late, but whatever)

At the end of March of this year, I had made a post [1] about 
this project, aimed at helping with D development on various 
editors (VSCode, Atom, Sublime text, vim...) [2].
In a nutshell, it's a bit like serve-d [3], albeit with fewer 
features, and focused more on being 'plug and play': a single 
binary with no dependencies, can be installed without being 
compiled on most OS's, automatically updates itself and tries to 
adapt to different dmd/ldc installations.


At the end of March it was at v0.1.5, which was primitive, and 
quite terrible in a lot of ways. I've recently released v0.20.1, 
and after 19 minor versions, it is certainly in better shape (or 
less terrible shape, depending on how you see it) than it used to 
be.
If anyone was curious about it at the time, but put off by its 
numerous flaws and lack of features, it should be more usable by 
now.


Some of its most notable changes since then include:
- Binary releases for the update system, replacing the previous 
method of recompiling itself and creating a black hole swallowing 
your RAM
- Tweaks to make it usable on FreeBSD with the Linux 
compatibility module
- Better integration with DFMT, D-Scanner and DCD, leading to new 
features and enhancements such as: linting, finding definitions, 
finding references, symbol renaming, listing module and workspace 
symbols, formatting without replacing the whole document, range 
formatting, local variable highlighting
- Better support for projects that don't use Dub, with detection 
of folders named `source` or `src`, and automatic importing of a 
project's git submodules

- Better detection of drumtime and phobos installation paths
- Fewer crashes

Happy coding!

[1] 
https://forum.dlang.org/post/jytsaamhiglkmeixx...@forum.dlang.org

[2] https://github.com/d-language-server/dls
[3] https://github.com/Pure-D/serve-d


Re: Beta 2.084.0

2018-12-28 Thread Basile B. via Digitalmars-d-announce

On Tuesday, 25 December 2018 at 18:26:16 UTC, Andre Pany wrote:

On Monday, 24 December 2018 at 22:33:27 UTC, Martin Nowak wrote:

On 12/17/18 10:38 PM, Martin Nowak wrote:

Second beta live now.


Basile B. solved the spurious NOLOGO bug. Can you include it in 
2.084?

https://github.com/dlang/dmd/pull/9142


He doesn't have to include it because the fix has been merged in 
the stable branch, which is the one used to build the releases.