Re: Silicon Valley D Meetup - September 28, 2017 - "Open Methods: From C++ to D" by Jean-Louis Leroy

2017-09-27 Thread Ali Çehreli via Digitalmars-d-announce

On 09/26/2017 09:27 PM, Ali Çehreli wrote:

> As always, I will post the Google Meet link here.

The Google Meet link is (will be)

  https://meet.google.com/zie-vuec-jao

but the meeting is in about 26 hours from this posting. You may want to 
make sure Google Meet works with your browser; I had to install Google 
Chrome.


Ali



Re: goinsu - Switch user, group and execute a program - a tiny betterC program

2017-09-27 Thread Anton Fediushin via Digitalmars-d-announce

On Wednesday, 27 September 2017 at 12:49:16 UTC, jamonahn wrote:
On Saturday, 16 September 2017 at 19:56:14 UTC, Anton Fediushin 
wrote:
Hey-hey-hey, I am so excited to announce a brand-new program I 
just wrote: goinsu!


Just built on my Raspberry Pi 3.  Kudos - very fast, not even a 
warning!  Now to get some Docker images and go crazy.


Hooray!



BTW, I got a 14,116 byte executable image with LDC but 
1,958,892 with GDC.  The GDC image (stripped) is 324,492.  I 
installed reggae on my laptop (debian) and did a "reggae 
--export".  Then using make (with ldc2) I got image of 13,088.  
Using "dub -b release --compiler=ldc2" (same build as on 
Raspbian) I get image of 381,928.


Reggae builds goinsu in betterC mode, which removes dependency on 
the druntime and phobos.


Dub can also build betterC programs, but I decided not to add 
such flag to dub.json, because betterC is a new thing which can 
cause problems.


LDC and GDC could have very limited betterC support, so results 
may vary.


How do I do a static linkage using LDC?  I need a static 
because I want to try and run this with an Alpine (arm) Docker 
image and Alpine is using muslib-c.  I once built an Alpine 
Docker image by hand that built ldc, but it couldn't survive D 
version/Alpine Os updates.


You don't have to compile LDC for this. It is possible to compile 
a static musl and link it together with the goinsu. Take a look 
at `.travis.yml`, since this is exactly what I am doing to build 
releases.


Also, do not forget the `errnofix.c`, which is important for 
static linking.


Reggae does this automatically, you just have to specify static 
libc you want to link to. Maybe it won't work for RPi though.


I've ordered Raspberry Pi recently, so as soon as I get it I can 
start hacking on it as well)




Thank you so much for this tool!


You're welcome!




Re: DlangIDE v0.8.0 released

2017-09-27 Thread bitwise via Digitalmars-d-announce
On Wednesday, 27 September 2017 at 13:22:20 UTC, Vadim Lopatin 
wrote:

On Tuesday, 26 September 2017 at 22:35:09 UTC, bitwise wrote:
On Tuesday, 26 September 2017 at 15:20:54 UTC, Vadim Lopatin 
wrote:

New DlangIDE version is released.


I've only had time to take a quick look, but this IDE seems 
pretty good. I was surprised at how fast it loaded up, and how 
it downloaded the dependencies for the sample project on it's 
own.


The text rendering needs work though. Honestly, I passed this 
editor up the first time I came across it because of the way 
the text looks. It reminds me of Visual Studio 2005. I 
couldn't help but assume the IDE was outdated and probably be 
abandon-ware.


I would definitely change the default font to the platform-IDE 
defaults:


Visual Studio: Consolas
XCode: Menlo Regular

Also, FreeType has made improvements lately, and now does a 
much better job of rendering fonts at small sizes(no so 
blurry). In particular 2.8.1, which just came out, implements 
a patent-free substitute for MS style clear-type 
rendering[1][2].


[1] http://i.imgur.com/nK8Xu.png
[2] 
https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_LOAD_TARGET_LCD


The thick bezels and deep 3D shading make it look retro as 
well.


For Windows, added libfreetype 2.8.1 dlls.

Made additional fixes for better font rendering.

Win32 binaries are uploaded to
https://github.com/buggins/dlangide/releases/tag/v0.8.2

To disable freetype, delete libfreetype-6.dll

Consolas/Menlo are already selected if "Default" font is chosen 
for editors.


Hey, thanks!
Looks good.

One small thing though - when you use the LCD/BGR style fonts, 
you get a mismatch between the font metrics and bitmap size.


So if you're using FT_LOAD_TARGET_LCD, then some of these may be 
true:


glyph.bitmap_left != (glyph.metrics.horiBearingX >> 6);
glyph.bitmap_top != (glyph.metrics.horiBearingY >> 6);
glyph.bitmap.width != (glyph.metrics.width >> 6);
glyph.bitmap.rows != (glyph.metrics.height >> 6);

The result could be a crash, clipping, or misalignment of glyphs, 
depending on the assumptions made by your blitting code.


I asked about this on the FT mailing list, and unfortunately, 
they don't believe that the 1 or 2 pixels of padding added to the 
bitmap to accommodate the LCD rendering belongs in metrics.


The fix is simply using bitmap_left, bitmap_top, bitmap.width, 
bitmap.height, instead of the metrics.


I was looking at the commits and saw that you added kerning, so 
was wondering if you hit this problem.





Re: mir-random: major additions

2017-09-27 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 27 September 2017 at 12:21:24 UTC, Ilya Yaroshenko 
wrote:


Thanks! And looking forward to find you PR in Lubeck! --Ilya


It's what prompted eachLower/eachUpper. I was like, there's gotta 
be a pretty way of doing this and got completely distracted from 
cholesky!


Re: DlangIDE v0.8.0 released

2017-09-27 Thread Vadim Lopatin via Digitalmars-d-announce
On Wednesday, 27 September 2017 at 08:00:21 UTC, Traktor Toni 
wrote:
Code completion isnt working for me on windows, no clue what's 
missing.


Did you try Ctrl+Space?


Re: DlangIDE v0.8.0 released

2017-09-27 Thread Vadim Lopatin via Digitalmars-d-announce

On Tuesday, 26 September 2017 at 22:35:09 UTC, bitwise wrote:
On Tuesday, 26 September 2017 at 15:20:54 UTC, Vadim Lopatin 
wrote:

New DlangIDE version is released.


I've only had time to take a quick look, but this IDE seems 
pretty good. I was surprised at how fast it loaded up, and how 
it downloaded the dependencies for the sample project on it's 
own.


The text rendering needs work though. Honestly, I passed this 
editor up the first time I came across it because of the way 
the text looks. It reminds me of Visual Studio 2005. I couldn't 
help but assume the IDE was outdated and probably be 
abandon-ware.


I would definitely change the default font to the platform-IDE 
defaults:


Visual Studio: Consolas
XCode: Menlo Regular

Also, FreeType has made improvements lately, and now does a 
much better job of rendering fonts at small sizes(no so 
blurry). In particular 2.8.1, which just came out, implements a 
patent-free substitute for MS style clear-type rendering[1][2].


[1] http://i.imgur.com/nK8Xu.png
[2] 
https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_LOAD_TARGET_LCD


The thick bezels and deep 3D shading make it look retro as well.


For Windows, added libfreetype 2.8.1 dlls.

Made additional fixes for better font rendering.

Win32 binaries are uploaded to
https://github.com/buggins/dlangide/releases/tag/v0.8.2

To disable freetype, delete libfreetype-6.dll

Consolas/Menlo are already selected if "Default" font is chosen 
for editors.




Re: goinsu - Switch user, group and execute a program - a tiny betterC program

2017-09-27 Thread jamonahn via Digitalmars-d-announce
On Saturday, 16 September 2017 at 19:56:14 UTC, Anton Fediushin 
wrote:
Hey-hey-hey, I am so excited to announce a brand-new program I 
just wrote: goinsu!


Just built on my Raspberry Pi 3.  Kudos - very fast, not even a 
warning!  Now to get some Docker images and go crazy.


BTW, I got a 14,116 byte executable image with LDC but 1,958,892 
with GDC.  The GDC image (stripped) is 324,492.  I installed 
reggae on my laptop (debian) and did a "reggae --export".  Then 
using make (with ldc2) I got image of 13,088.  Using "dub -b 
release --compiler=ldc2" (same build as on Raspbian) I get image 
of 381,928.


How do I do a static linkage using LDC?  I need a static because 
I want to try and run this with an Alpine (arm) Docker image and 
Alpine is using muslib-c.  I once built an Alpine Docker image by 
hand that built ldc, but it couldn't survive D version/Alpine Os 
updates.


Thank you so much for this tool!



Re: DlangIDE v0.8.0 released

2017-09-27 Thread Dmitry via Digitalmars-d-announce
On Wednesday, 27 September 2017 at 08:00:21 UTC, Traktor Toni 
wrote:
The shortcuts should be identical to Visual Studio, anything 
else is a waste of time to learn and configure.
Visual Studio? Why not Vim? Why not Xamarin Studio? Why not IDEA? 
Why not Sublime or tons of other popular configurations? If you 
want Visual Studio, then just use Visual Studio.



The IDE should contain the compiler for convenience

No.


Re: mir-random: major additions

2017-09-27 Thread Ilya Yaroshenko via Digitalmars-d-announce

On Wednesday, 27 September 2017 at 11:52:32 UTC, jmh530 wrote:
On Wednesday, 27 September 2017 at 05:24:50 UTC, Ilya 
Yaroshenko wrote:


private Cholesky decomposition, which has not unittests yet. 
PRs are welcome.




My fork of lubeck has a branch where I was doing some work on 
adding cholesky that has some unittests if you want to borrow 
them (probably needs some adjustments).

https://github.com/jmh530/lubeck/blob/f012582871c0cde8d7dc18d7f833f513a06cfaca/source/lubeck.d#L1377


Thanks! And looking forward to find you PR in Lubeck! --Ilya


Re: mir-random: major additions

2017-09-27 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 27 September 2017 at 05:24:50 UTC, Ilya Yaroshenko 
wrote:


private Cholesky decomposition, which has not unittests yet. 
PRs are welcome.




My fork of lubeck has a branch where I was doing some work on 
adding cholesky that has some unittests if you want to borrow 
them (probably needs some adjustments).

https://github.com/jmh530/lubeck/blob/f012582871c0cde8d7dc18d7f833f513a06cfaca/source/lubeck.d#L1377


Re: DlangIDE v0.8.0 released

2017-09-27 Thread Traktor Toni via Digitalmars-d-announce
On Wednesday, 27 September 2017 at 07:23:30 UTC, Vadim Lopatin 
wrote:
1. Ctrl+F5 does. You can change shortcuts in 
~/.dlangide/shortcuts.json (on Windows - in 
currentUser/AppData/.dlangide/shortcuts.json
2. Why should IDE include compiler. It's easy to download it 
from official site.
3. Is Code completion/GoToDefinition/Call tips/Doc comments 
enough? If so, it's present. No refactoring support.


The shortcuts should be identical to Visual Studio, anything else 
is a waste of time to learn and configure.
The IDE should contain the compiler for convenience, this way 
dlang.org can point to your download and say "install and press 
run"
Code completion isnt working for me on windows, no clue what's 
missing.


Re: DlangIDE v0.8.0 released

2017-09-27 Thread Vadim Lopatin via Digitalmars-d-announce
On Wednesday, 27 September 2017 at 02:37:41 UTC, Traktor Toni 
wrote:
On Tuesday, 26 September 2017 at 15:20:54 UTC, Vadim Lopatin 
wrote:

New DlangIDE version is released.
Now I'm considering DlangIDE as mostly usable.


well don't. I just tested the windows build.

1. F5 doesnt build+run the application
2. I have to install dmd/D compiler separately
3. no intellisense

This is not usable by any reasonable definition as an IDE.


1. Ctrl+F5 does. You can change shortcuts in 
~/.dlangide/shortcuts.json (on Windows - in 
currentUser/AppData/.dlangide/shortcuts.json
2. Why should IDE include compiler. It's easy to download it from 
official site.
3. Is Code completion/GoToDefinition/Call tips/Doc comments 
enough? If so, it's present. No refactoring support.