Re: Dynamic Bindings to libui (x-platform GUI)

2018-01-08 Thread rikki cattermole via Digitalmars-d-announce

On 09/01/2018 1:32 AM, helxi wrote:

On Tuesday, 24 May 2016 at 20:52:54 UTC, extrawurst wrote:

Hey folks,

libui is a crossplatform GUI lib written in C. This makes it a perfect 
candidate to be used in D!


What they say about libui on their site:
"Simple and portable (but not inflexible) GUI library in C that uses 
the native GUI technologies of each platform it supports."


find libui on github:
https://github.com/andlabs/libui

So here are the inofficial Derelict Bindings to it: 
https://github.com/Extrawurst/DerelictLibui


I tested them on both windows and mac osx so far. Any linux user is 
welcome to test it on there aswell.


Let me know if you find any issues.

-Stephan


Hi, I'm on Arch Linux (64-bit). `dub --config=test` gives me the 
following error: (Please be noted that I have libui installed in my 
system already)


$ dub --config=test
Performing "debug" build using /usr/bin/dmd for x86_64.
derelict-util 2.1.0: target for configuration "library" is up to date.
derelict-libui 0.3.0+commit.2.g079a15e: target for configuration "test" 
is up to date.

To force a rebuild of up-to-date targets, run again with --force.
Running ./lib/DerelictLibui
derelict.util.exception.SymbolLoadException@../../.dub/packages/derelict-util-2.1.0/derelict-util/source/derelict/util/sharedlib.d(177): 
Failed to load symbol uiControlVerifyDestroy from shared library libui.so.0


??:? void* 
derelict.util.sharedlib.SharedLib.loadSymbol(immutable(char)[], bool) 
[0xd457b00a]
??:? void* 
derelict.util.loader.SharedLibLoader.loadSymbol(immutable(char)[], bool) 
[0xd45792aa]
??:? void derelict.util.loader.SharedLibLoader.bindFunc(void**, 
immutable(char)[], bool) [0xd4579300]
??:? void derelict.libui.libui.DerelictLibuiLoader.loadSymbols() 
[0xd4576983]
??:? void derelict.util.loader.SharedLibLoader.load(immutable(char)[][]) 
[0xd457912a]
??:? void derelict.util.loader.SharedLibLoader.load(immutable(char)[]) 
[0xd45790a4]

??:? void derelict.util.loader.SharedLibLoader.load() [0xd4578f87]
??:? _Dmain [0xd45783a4]
Program exited with code 1



https://github.com/Extrawurst/DerelictLibui/issues/7


Re: Dynamic Bindings to libui (x-platform GUI)

2018-01-08 Thread helxi via Digitalmars-d-announce

On Tuesday, 24 May 2016 at 20:52:54 UTC, extrawurst wrote:

Hey folks,

libui is a crossplatform GUI lib written in C. This makes it a 
perfect candidate to be used in D!


What they say about libui on their site:
"Simple and portable (but not inflexible) GUI library in C that 
uses the native GUI technologies of each platform it supports."


find libui on github:
https://github.com/andlabs/libui

So here are the inofficial Derelict Bindings to it: 
https://github.com/Extrawurst/DerelictLibui


I tested them on both windows and mac osx so far. Any linux 
user is welcome to test it on there aswell.


Let me know if you find any issues.

-Stephan


Hi, I'm on Arch Linux (64-bit). `dub --config=test` gives me the 
following error: (Please be noted that I have libui installed in 
my system already)


$ dub --config=test
Performing "debug" build using /usr/bin/dmd for x86_64.
derelict-util 2.1.0: target for configuration "library" is up to 
date.
derelict-libui 0.3.0+commit.2.g079a15e: target for configuration 
"test" is up to date.

To force a rebuild of up-to-date targets, run again with --force.
Running ./lib/DerelictLibui
derelict.util.exception.SymbolLoadException@../../.dub/packages/derelict-util-2.1.0/derelict-util/source/derelict/util/sharedlib.d(177):
 Failed to load symbol uiControlVerifyDestroy from shared library libui.so.0

??:? void* 
derelict.util.sharedlib.SharedLib.loadSymbol(immutable(char)[], 
bool) [0xd457b00a]
??:? void* 
derelict.util.loader.SharedLibLoader.loadSymbol(immutable(char)[], bool) [0xd45792aa]
??:? void derelict.util.loader.SharedLibLoader.bindFunc(void**, 
immutable(char)[], bool) [0xd4579300]
??:? void derelict.libui.libui.DerelictLibuiLoader.loadSymbols() 
[0xd4576983]
??:? void 
derelict.util.loader.SharedLibLoader.load(immutable(char)[][]) 
[0xd457912a]
??:? void 
derelict.util.loader.SharedLibLoader.load(immutable(char)[]) 
[0xd45790a4]

??:? void derelict.util.loader.SharedLibLoader.load() [0xd4578f87]
??:? _Dmain [0xd45783a4]
Program exited with code 1



Re: [howto] Serve ddox documentation on github.io deployed by Travis CI

2018-01-08 Thread Bastiaan Veelo via Digitalmars-d-announce

On Monday, 8 January 2018 at 23:06:04 UTC, Seb wrote:

On Monday, 8 January 2018 at 22:20:37 UTC, Bastiaan Veelo wrote:

On Monday, 8 January 2018 at 22:12:17 UTC, Seb wrote:
On Monday, 8 January 2018 at 22:06:44 UTC, Bastiaan Veelo 
wrote:
Here's how: 
https://gist.github.com/veelo/f7668510bad2e8c9212ab66104541fcc


FYI: You could reduce the size of the `travis.yml`.
See e.g.:

https://github.com/thaven/oauth/pull/12


That moves a simple section from `.travis.yml` to a more 
complicated script `travis.sh`.


I was talking about e.g. `libssl-dev`, but I saw you already 
adjusted that.


OK that's what I noticed from your reference :-)

Note that with the next vibe.d release (0.8.3), you can also 
drop libevent-dev as vibe-core will become the default.
You could already do this today with `dub build -b ddox 
--override-config="vibe-d:core/vibe-core"`, but Ddox that might 
require the latest vibe.d and vibe-core.


dub is great!


Anyways, great document - thanks a lot for sharing!


My pleasure.


Re: Another take on decimal data types

2018-01-08 Thread Daniel Kozak via Digitalmars-d-announce
Wow awesome, it would be nice if you could add it as a dub package (
http://code.dlang.org/publish) to dub repository (http://code.dlang.org)

On Mon, Jan 8, 2018 at 11:16 PM, rumbu via Digitalmars-d-announce <
digitalmars-d-announce@puremagic.com> wrote:

> This is my first D finalized project (+16k loc).
>
> I know that there are other two projects intended to provide a decimal
> data type for D, but I consider mine the most complete and most compliant
> to the standards (at least until now).
>
> There are two years of since I'm working on it (and learning D in the same
> time), but I concentrated most of the efforts in the last two months.
>
> It was a nice exercise because I was happy to remember the math I learn
> through my college years (trigonometry, logarithms, Taylor series,
> derivatives, etc). Unfortunately I'm not using the same math during my
> day-to day job.
>
> Maybe in another post I will share my struggles I encountered during the
> development (plenty of). But a big thank you goes to Rainer Schuetze:
> without Visual Studio and without the integrated debugger this project was
> impossible to maintain.
>
> Now on topic:
>
> - fully IEEE-754-2008 compliant;
> - one flat file;
> - using Intel's binary decimal enconding;
> - three decimal data types: decimal32, decimal64 and decimal128
> - all D operators supported for all numeric types (left and right side
> integrals, floats, chars);
> - conversion supported from/to integrals, floats, bools, chars
> - conversion to/from other decimal formats (Microsoft Currency, Microsoft
> Decimal, IBM Densely Packed Decimal)
> - all std.math functions implemented (even logarithms and trigonometry);
> - all format specifiers implemented (%f, %e, %g, %a);
> - integrated with phobos format and conversion functions (to, format,
> writef);
> - thread local precision (from 1 to 34 decimal digits);
> - new rounding mode - Europe's most used - tiesToAway;
> - alternate exception handling (through flags);
> - minimal dependencies (some traits and some floating point functions);
> - comprehensive documentation;
>
> Source code: https://github.com/rumbu13/decimal/blob/master/src/decimal.d
>
> Documentation: http://rumbu13.github.io/decimal/doc/decimal.html
>
> The project is more than in an alpha state, all operations were tested but
> not exhaustively.
>
> What's next:
> - more tests;
> - benchmarks;
>
>
>


Re: [howto] Serve ddox documentation on github.io deployed by Travis CI

2018-01-08 Thread Seb via Digitalmars-d-announce

On Monday, 8 January 2018 at 22:20:37 UTC, Bastiaan Veelo wrote:

On Monday, 8 January 2018 at 22:12:17 UTC, Seb wrote:
On Monday, 8 January 2018 at 22:06:44 UTC, Bastiaan Veelo 
wrote:
Here's how: 
https://gist.github.com/veelo/f7668510bad2e8c9212ab66104541fcc


FYI: You could reduce the size of the `travis.yml`.
See e.g.:

https://github.com/thaven/oauth/pull/12


That moves a simple section from `.travis.yml` to a more 
complicated script `travis.sh`.


I was talking about e.g. `libssl-dev`, but I saw you already 
adjusted that.


Note that with the next vibe.d release (0.8.3), you can also drop 
libevent-dev as vibe-core will become the default.
You could already do this today with `dub build -b ddox 
--override-config="vibe-d:core/vibe-core"`, but Ddox that might 
require the latest vibe.d and vibe-core.


Anyways, great document - thanks a lot for sharing!


Re: Another take on decimal data types

2018-01-08 Thread rikki cattermole via Digitalmars-d-announce

Great job.

1) Assembly
2) That file needs to be split up. I can feel the lag as I scroll it.


Re: Release D 2.078.0

2018-01-08 Thread Rainer Schuetze via Digitalmars-d-announce



On 08.01.2018 08:56, Andre Pany wrote:

On Wednesday, 3 January 2018 at 17:43:36 UTC, Martin Nowak wrote:

Glad to announce D 2.078.0.

This release comes with runtime detection of Visual Studio 
installation paths, an integral promotion transition for unary 
operations on byte and short sized integers, more -betterC features, 
and a couple of language and library tweaks.


Thanks to everyone involved in this 👏 
https://dlang.org/contributors.html.


http://downloads.dlang.org/releases/2.x/2.078.0/ 
http://dlang.org/changelog/2.078.0.html


- -Martin


It seems vs-auto-detection does not work with the Visual Studio 2017 
Community version:


I executed "vcvars64.bat". After that environment variable PATH contains 
following

entries:
C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64;
C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\Common7\IDE\VC\VCPackages;
C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;

C:\Program Files (x86)\Microsoft Visual
...

dmd app.d -m64
Error: can't run 'C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\\bin\link.exe', check PATH


I checked the location and link.exe is available in the very first 
element of PATH environment variable:
C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\Hostx64\x64


Could you check?

Kind regards
André




Unfortunately the corresponding installer PRs didn't make it into the 
release, so you still have to remove most options of section 
Environment64 from sc.ini yourself. This should be enough


[Environment64]
LIB=%@P%\..\lib64
DFLAGS=%DFLAGS% -L/OPT:NOICF

When using the 7z dmd file, the most harmful setting is LINKCMD, that 
doesn't work for VS2017.


Re: [howto] Serve ddox documentation on github.io deployed by Travis CI

2018-01-08 Thread Bastiaan Veelo via Digitalmars-d-announce

On Monday, 8 January 2018 at 22:12:17 UTC, Seb wrote:

On Monday, 8 January 2018 at 22:06:44 UTC, Bastiaan Veelo wrote:
Here's how: 
https://gist.github.com/veelo/f7668510bad2e8c9212ab66104541fcc


FYI: You could reduce the size of the `travis.yml`.
See e.g.:

https://github.com/thaven/oauth/pull/12


That moves a simple section from `.travis.yml` to a more 
complicated script `travis.sh`.


Another take on decimal data types

2018-01-08 Thread rumbu via Digitalmars-d-announce

This is my first D finalized project (+16k loc).

I know that there are other two projects intended to provide a 
decimal data type for D, but I consider mine the most complete 
and most compliant to the standards (at least until now).


There are two years of since I'm working on it (and learning D in 
the same time), but I concentrated most of the efforts in the 
last two months.


It was a nice exercise because I was happy to remember the math I 
learn through my college years (trigonometry, logarithms, Taylor 
series, derivatives, etc). Unfortunately I'm not using the same 
math during my day-to day job.


Maybe in another post I will share my struggles I encountered 
during the development (plenty of). But a big thank you goes to 
Rainer Schuetze: without Visual Studio and without the integrated 
debugger this project was impossible to maintain.


Now on topic:

- fully IEEE-754-2008 compliant;
- one flat file;
- using Intel's binary decimal enconding;
- three decimal data types: decimal32, decimal64 and decimal128
- all D operators supported for all numeric types (left and right 
side integrals, floats, chars);

- conversion supported from/to integrals, floats, bools, chars
- conversion to/from other decimal formats (Microsoft Currency, 
Microsoft Decimal, IBM Densely Packed Decimal)
- all std.math functions implemented (even logarithms and 
trigonometry);

- all format specifiers implemented (%f, %e, %g, %a);
- integrated with phobos format and conversion functions (to, 
format, writef);

- thread local precision (from 1 to 34 decimal digits);
- new rounding mode - Europe's most used - tiesToAway;
- alternate exception handling (through flags);
- minimal dependencies (some traits and some floating point 
functions);

- comprehensive documentation;

Source code: 
https://github.com/rumbu13/decimal/blob/master/src/decimal.d


Documentation: http://rumbu13.github.io/decimal/doc/decimal.html

The project is more than in an alpha state, all operations were 
tested but not exhaustively.


What's next:
- more tests;
- benchmarks;




Re: [howto] Serve ddox documentation on github.io deployed by Travis CI

2018-01-08 Thread Seb via Digitalmars-d-announce

On Monday, 8 January 2018 at 22:06:44 UTC, Bastiaan Veelo wrote:

I was looking for this, it wasn't there, so I wrote it myself.

- You have a D poject on GitHub?
- You want your documentation online? For free?
- You think it should always be up to date without you lifting 
a finger?

- You wonder how?

Here's how: 
https://gist.github.com/veelo/f7668510bad2e8c9212ab66104541fcc


I'm looking forward to see lots of well written documentation!

Cheers,
Bastiaan.

(It turned out as a gist. I don't mind it being recycled on 
wiki's, blog's or elsewhere.)


FYI: You could reduce the size of the `travis.yml`.
See e.g.:

https://github.com/thaven/oauth/pull/12


[howto] Serve ddox documentation on github.io deployed by Travis CI

2018-01-08 Thread Bastiaan Veelo via Digitalmars-d-announce

I was looking for this, it wasn't there, so I wrote it myself.

- You have a D poject on GitHub?
- You want your documentation online? For free?
- You think it should always be up to date without you lifting a 
finger?

- You wonder how?

Here's how: 
https://gist.github.com/veelo/f7668510bad2e8c9212ab66104541fcc


I'm looking forward to see lots of well written documentation!

Cheers,
Bastiaan.

(It turned out as a gist. I don't mind it being recycled on 
wiki's, blog's or elsewhere.)


Re: ArithEval v0.5.0 released

2018-01-08 Thread rjframe via Digitalmars-d-announce
On Mon, 08 Jan 2018 09:53:22 +, Dechcaudron wrote:

> I guess it would not hurt
> to change the license to MIT. Would that encourage use by the community?

Choosing the license really comes down to what you want to see with the 
code; if you want to maintain control and ensure that people modifying it 
make those changes available, the GPL is fine (but yes, it will reduce the 
number of people willing to use it). If you primarily just want to know 
that people who would find it useful might pick it up and use it, a more 
permissive license would help.

But don't let anyone peer-pressure you into changing licenses. Figure out 
your goals and license your code accordingly.


Re: ArithEval v0.5.0 released

2018-01-08 Thread Dechcaudron via Digitalmars-d-announce

On Monday, 8 January 2018 at 06:02:35 UTC, thedeemon wrote:

On Sunday, 7 January 2018 at 20:41:57 UTC, Dechcaudron wrote:
It allows the runtime evaluation of simple math expressions 
like `1 + 2 * 3` or `1 ^ foo`, with foo being given values at 
run time.


That's a nice exercise in using Pegged.
Reminds me of another Pegged-based calculator with variables, 
more operations, more precision and more permissive license:

http://code.dlang.org/packages/pc

It hasn't been updated in 4 years but still can be built by Dub 
automatically, that's how stable D is these days!


From what I can see (documentation appears to be scarce) pc 
strived to be more like a Matlab-style program. ArithEval is to 
be used as a library to help deal with user input. But the former 
definitely supports many more operations, you are right. I guess 
it would not hurt to change the license to MIT. Would that 
encourage use by the community?


Re: Release D 2.078.0

2018-01-08 Thread Nicholas Wilson via Digitalmars-d-announce

On Monday, 8 January 2018 at 07:56:18 UTC, Andre Pany wrote:
On Wednesday, 3 January 2018 at 17:43:36 UTC, Martin Nowak 
wrote:

Glad to announce D 2.078.0.

This release comes with runtime detection of Visual Studio 
installation paths, an integral promotion transition for unary 
operations on byte and short sized integers, more -betterC 
features, and a couple of language and library tweaks.


Thanks to everyone involved in this 👏 
https://dlang.org/contributors.html.


http://downloads.dlang.org/releases/2.x/2.078.0/ 
http://dlang.org/changelog/2.078.0.html


- -Martin


It seems vs-auto-detection does not work with the Visual Studio 
2017 Community version:


I executed "vcvars64.bat". After that environment variable PATH 
contains following

entries:
C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64;
C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\Common7\IDE\VC\VCPackages;
C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;

C:\Program Files (x86)\Microsoft Visual
...

dmd app.d -m64
Error: can't run 'C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\\bin\link.exe', check PATH




Note the double backslash, its getting confused.



Re: Release D 2.078.0

2018-01-08 Thread Andre Pany via Digitalmars-d-announce

On Wednesday, 3 January 2018 at 17:43:36 UTC, Martin Nowak wrote:

Glad to announce D 2.078.0.

This release comes with runtime detection of Visual Studio 
installation paths, an integral promotion transition for unary 
operations on byte and short sized integers, more -betterC 
features, and a couple of language and library tweaks.


Thanks to everyone involved in this 👏 
https://dlang.org/contributors.html.


http://downloads.dlang.org/releases/2.x/2.078.0/ 
http://dlang.org/changelog/2.078.0.html


- -Martin


It seems vs-auto-detection does not work with the Visual Studio 
2017 Community version:


I executed "vcvars64.bat". After that environment variable PATH 
contains following

entries:
C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64;
C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\Common7\IDE\VC\VCPackages;
C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;

C:\Program Files (x86)\Microsoft Visual
...

dmd app.d -m64
Error: can't run 'C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\\bin\link.exe', check PATH


I checked the location and link.exe is available in the very 
first element of PATH environment variable:
C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\Hostx64\x64


Could you check?

Kind regards
André