OpenBSD LDC package

2021-10-20 Thread Brian via Digitalmars-d-announce

Hello D Community --

I'm happy to announce that I have posted a preliminary LDC 
package for review to OpenBSD: 
https://marc.info/?l=openbsd-ports=163477542025020=2


With the already shipping GDC and DMD packages, all 3 D compilers 
are now easily available to OpenBSD users.


~Brian


Re: OpenBSD DMD package

2021-10-14 Thread Brian via Digitalmars-d-announce
On Thursday, 14 October 2021 at 14:51:57 UTC, Jacob Carlborg 
wrote:

On Tuesday, 12 October 2021 at 12:42:09 UTC, Brian wrote:


I don't think any of the free ones support OpenBSD yet :)
There is SourceHut, which does support OpenBSD CI, but I don't 
think it is free to use.


You can use my GitHub action: 
https://github.com/marketplace/actions/cross-platform-action.


--
/Jacob Carlborg


Awesome! I will spend some time soon figuring it out.

~Brian


Re: OpenBSD DMD package

2021-10-13 Thread Brian via Digitalmars-d-announce

On Wednesday, 13 October 2021 at 07:43:49 UTC, jfondren wrote:


A fresh build of dub (with gdc) is still segfaulting, and looks 
to be related to SDL:


```
$ dub -q init -n -f=json; dub -q run
Edit source/app.d to start your project.
$ rm -rf dub.{sdl,json} source
$ dub -q init -n -f=sdl; dub -q run
Segmentation fault (core dumped)
```

I'll check out the new ports when they're available. Thanks!


You didn't update your gdc compiler. See gkoehler@'s patch on 
ports@.


~Brian


Re: OpenBSD DMD package

2021-10-13 Thread Brian via Digitalmars-d-announce

On Wednesday, 13 October 2021 at 05:47:48 UTC, jfondren wrote:

On Wednesday, 13 October 2021 at 04:46:06 UTC, Brian wrote:

Hello D community --

I am pleased and excited to announce that I have committed a 
package of DMD to the OpenBSD package repository: 
https://marc.info/?l=openbsd-ports-cvs=163409989017870=2


OpenBSD -current users should be able to run `pkg_add dmd` 
sometime tomorrow to get a binary package of DMD.




Cool. My OpenBSD box is on fritz so I haven't kept done more, 
but I have a short [gdc-on-OpenBSD 
guide](https://d.minimaltype.com/index.cgi/wiki?name=D%20on%20OpenBSD).


The login.conf step likely applies to dmd as well.


It does.

But you're going to have to further update your guide: I just 
posted ports of dub and gdmd to ports@. Please test and report 
back to ports@.


Also, does dub+gdmd actually work for you at runtime? I am 
getting this issue: https://issues.dlang.org/show_bug.cgi?id=22381


Re: OpenBSD DMD package

2021-10-13 Thread Brian via Digitalmars-d-announce

On Wednesday, 13 October 2021 at 06:00:57 UTC, Brian wrote:


It does.

But you're going to have to further update your guide: I just 
posted ports of dub and gdmd to ports@. Please test and report 
back to ports@.


Also, does dub+gdmd actually work for you at runtime? I am 
getting this issue: 
https://issues.dlang.org/show_bug.cgi?id=22381


Also, all the segfaults with dub should be fixed. If not, 
definitely let me know.


A port of the D tools will be sent tomorrow once I clean it up.


Re: OpenBSD DMD package

2021-10-12 Thread Brian via Digitalmars-d-announce

Hello D community --

I am pleased and excited to announce that I have committed a 
package of DMD to the OpenBSD package repository: 
https://marc.info/?l=openbsd-ports-cvs=163409989017870=2


OpenBSD -current users should be able to run `pkg_add dmd` 
sometime tomorrow to get a binary package of DMD.


Unfortunately, the timing of DMD 2.098.0 just missed the deadline 
to be included in OpenBSD 7.0. However, because -current and 7.0 
are effectively the same in terms of libraries that matter for 
DMD, I will personally support OpenBSD 7.0 users who use the 
dmd-2.098.0 package until OpenBSD 7.1 is released (6 months from 
now).


~Brian


Re: OpenBSD DMD package

2021-10-12 Thread Brian via Digitalmars-d-announce
On Tuesday, 12 October 2021 at 12:02:42 UTC, Nicholas Wilson 
wrote:

On Monday, 11 October 2021 at 15:07:59 UTC, Brian wrote:

Hi all --

I am in the process of getting a DMD package shipped in the 
OpenBSD package repository.
If you are an OpenBSD user, please test and report back (on 
the OpenBSD mailing list, please) how it went for you. The 
more users test, the faster I can commit the package :)


~Brian

https://marc.info/?l=openbsd-ports=163396364901247=2


Cool, do you know anything about setting up OpenBSD CI 
pipelines for DMD/druntime/phobos so we don't break that 
accidentally?


I don't think any of the free ones support OpenBSD yet :)
There is SourceHut, which does support OpenBSD CI, but I don't 
think it is free to use.


~Brian


OpenBSD DMD package

2021-10-11 Thread Brian via Digitalmars-d-announce

Hi all --

I am in the process of getting a DMD package shipped in the 
OpenBSD package repository.
If you are an OpenBSD user, please test and report back (on the 
OpenBSD mailing list, please) how it went for you. The more users 
test, the faster I can commit the package :)


~Brian

https://marc.info/?l=openbsd-ports=163396364901247=2


Re: Beerconf September 2021

2021-09-26 Thread Brian via Digitalmars-d-announce

On Saturday, 25 September 2021 at 07:14:58 UTC, Iain Buclaw wrote:


**What is Beefconf?**


What is Beefconf, indeed. Are we getting an additional online 
meetup this month? :)


~Brian


Re: trash-d: Replacement for rm that uses the trash bin

2021-08-24 Thread Brian via Digitalmars-d-announce

On Tuesday, 24 August 2021 at 02:19:58 UTC, rushsteve1 wrote:

https://github.com/rushsteve1/trash-d

A near drop-in replacement for `rm` that uses the Freedesktop 
trash bin. Started because an acquaintance `rm -rf`'d his music 
folder and I thought there had to be a better way.


It's pretty simple and only uses the D stdlib. Been working on 
it in my spare time for a bit over a week and I figure it's 
good enough to show people.


I started this project in Bash originally but switched to D 
since I thought it would be a good way to learn some more (also 
Bash is scary). Ended up being a great choice!


Pretty new to D so feedback welcome!


Funny seeing you here!


Re: Keep up with ImportC using hashtag #ImportC

2021-06-09 Thread Brian via Digitalmars-d-announce

On Tuesday, 8 June 2021 at 06:39:51 UTC, Walter Bright wrote:

https://twitter.com/hashtag/ImportC?src=hashtag_click

There are a couple ancient tweets there, just ignore them.


Nice car collection you've got there :)

~Brian


Re: [Semi-OT] Cross-Platform GitHub Action

2021-06-09 Thread Brian via Digitalmars-d-announce

On Tuesday, 8 June 2021 at 19:10:41 UTC, Jacob Carlborg wrote:

# Cross-Platform GitHub Action

I would like to announce the first version of a project I've 
been working on for a while. It's not anything D specific or 
implemented in D, but it can be used with D projects. This 
project provides a GitHub action for running GitHub Action 
workflows on multiple platforms. This includes platforms that 
GitHub Actions don't natively support. It currently supports 
FreeBSD and OpenBSD.


[...]


Neat.

~Brian


Re: GCC 11.1 Released

2021-05-27 Thread Brian via Digitalmars-d-announce
Thank you for your work. It has been a good experience so far 
running gdc on OpenBSD.


Re: Dr Callahan ports D compiler to OpenBSD

2021-03-22 Thread Brian via Digitalmars-d-announce

On Monday, 22 March 2021 at 07:27:22 UTC, Iain Buclaw wrote:
I think it would be a fair attribute Kai and I for the 95% that 
was enough to get ldc and gdc working respectively.


Sounds good to me!


Re: Dr Callahan ports D compiler to OpenBSD

2021-03-21 Thread Brian via Digitalmars-d-announce

On Sunday, 21 March 2021 at 23:56:15 UTC, Johan wrote:
Seeing that pledge/unveil are declared in unistd.d, your work 
should probably land here:

https://github.com/dlang/druntime/blob/master/src/core/sys/posix/unistd.d#L2556


Yes, I think so. People who program on OpenBSD expect pledge and 
unveil to always be available, and so having them in druntime is 
better than a separate module.


Re: Dr Callahan ports D compiler to OpenBSD

2021-03-21 Thread Brian via Digitalmars-d-announce

On Sunday, 21 March 2021 at 22:41:36 UTC, Walter Bright wrote:

https://briancallahan.net/blog/20210320.html

https://news.ycombinator.com/item?id=26520996#26531423

https://reddit.com/r/programming/comments/m9xu8s/a_working_d_compiler_on_openbsd/

Thanks to Dr Brian Callahan!


I don't have an HN or Reddit account so I'll reply here.

First, thanks. But second, all I really did was the last mile 
stuff. Lots of people did nearly all of the work before I came 
along, which I hope I made enough mention of in my blog post.


I've also opened a bug report for GDC: 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99691
But it looks like Iain was already on it, so I suspect we really 
want to thank him more than me for the GDC parts!


(You also don't have to call me Dr. -- it's there just because 
it's my personal/professional website and I happen to be employed 
as an academic.)


Re: GtkD Blog Now Up and Running

2019-01-25 Thread Brian via Digitalmars-d-announce

Thank you :)


Re: hunt-grpc 0.1.1 released! (Google gRPC for D)

2019-01-25 Thread Brian via Digitalmars-d-announce

On Thursday, 24 January 2019 at 21:17:24 UTC, viniarck wrote:

On Thursday, 17 January 2019 at 04:19:27 UTC, Brian wrote:
Google gRPC is A high performance, open-source universal RPC 
framework.


[...]


Cool. Thanks for contributing. I look forward to using it in a 
future project with microservices.


Yes, we use it for a lot of projects :)


Re: Top Five World’s Most Underrated Programming Languages

2019-01-17 Thread Brian via Digitalmars-d-announce
On Monday, 14 January 2019 at 20:21:25 UTC, Andrei Alexandrescu 
wrote:

Of possible interest:

https://www.technotification.com/2019/01/most-underrated-programming-languages.html


Because no software can use it.

examples:
1. Docker use golang.
2. Middleware system use java.
3. Shell use python.
4. AI use python and R.
5. Desktop application use QT / C#.
6. Web framework & database use php's laravel and java's 
sprint-boot.

7. Web use Javascript / typescript.




hunt-grpc 0.1.1 released! (Google gRPC for D)

2019-01-16 Thread Brian via Digitalmars-d-announce
Google gRPC is A high performance, open-source universal RPC 
framework.


You can find it here:
https://grpc.io/

hunt-grpc is a GRPC framework developed in D language. The new 
version mainly supports two-way communication and fixes some 
known errors.


Example for server:
```D
  import helloworld.helloworld;
  import helloworld.helloworldrpc;
  import grpc;

  class GreeterImpl : GreeterBase
  {
  override Status SayHello(HelloRequest request , ref 
HelloReply reply)

  {
  reply.message = "hello " ~ request.name;
  return Status.OK;
  }
  }

  string host = "0.0.0.0";
  ushort port = 50051;

  Server server = new Server();
  server.listen(host , port);
  server.register( new GreeterImpl());
  server.start();
```

Example for client:
```D
  import helloworld.helloworld;
  import helloworld.helloworldrpc;
  import grpc;
  import std.stdio;

  auto channel = new Channel("127.0.0.1" , 50051);
  GreeterClient client = new GreeterClient(channel);

  HelloRequest request = new HelloRequest();
  HelloReply reply = new HelloReply();
  request.name = "test";
  auto status = client.SayHello(request , reply);
  if(status.ok())
  {
 writeln(reply.message);
  }
```

Example for streaming:

We implemented the offical example RouteGuide

offical 
link:https://github.com/grpc/grpc/blob/master/examples/cpp/cpptutorial.md



More support in hunt-grpc github repo:
https://github.com/huntlabs/hunt-grpc


Re: hunt library 1.0.0 released!

2019-01-16 Thread Brian via Digitalmars-d-announce

On Wednesday, 16 January 2019 at 15:04:55 UTC, bauss wrote:

On Wednesday, 16 January 2019 at 06:57:13 UTC, Brian wrote:


we found that the performance of vibed was not as good as that 
of other programming languages.


Chances are you've used it wrong then.

To me at least it performs better than any alternatives.


We will not compare with vibed, because vibed cannot meet our use 
needs.


Re: hunt library 1.0.0 released!

2019-01-15 Thread Brian via Digitalmars-d-announce

On Tuesday, 15 January 2019 at 16:25:04 UTC, WebFreak001 wrote:

On Tuesday, 15 January 2019 at 14:58:01 UTC, Brian wrote:

A refined core library for D programming language.

Core modules:

[...]


nice! Always cool seeing new frameworks for existing stuff. How 
does this compare to vibe.d?


We need to compare this with other popular programming languages, 
examples are rust and golang.


There is no comparison with vibed, which is popluar in D. In 
other tests, we found that the performance of vibed was not as 
good as that of other programming languages.


Re: hunt library 1.0.0 released!

2019-01-15 Thread Brian via Digitalmars-d-announce

On Tuesday, 15 January 2019 at 16:12:24 UTC, Aldo wrote:

On Tuesday, 15 January 2019 at 14:58:01 UTC, Brian wrote:

A refined core library for D programming language.

Core modules:

[...]


Hello Brian,

thats a good lib, thanks for the work.


Thank you for supported :)


Re: hunt library 1.0.0 released!

2019-01-15 Thread Brian via Digitalmars-d-announce

On Tuesday, 15 January 2019 at 18:57:55 UTC, Johannes Loher wrote:

On Tuesday, 15 January 2019 at 14:58:01 UTC, Brian wrote:

[...]


Thanks for the great work!

I had already been planning on playing around with hunt for a 
bit. What has been holding me back until now is the fact that 
part of the documentation still is only available in Chinese, 
which I unfortunately am not able to read. Are there any plans 
on translating the remaining parts of the documentation?


We will write the documenation for hunt library :)

Please look forward to it!


hunt library 1.0.0 released!

2019-01-15 Thread Brian via Digitalmars-d-announce

A refined core library for D programming language.

Core modules:

hunt.concurrency
hunt.collection
hunt.event
hunt.io
hunt.logging
hunt.text
hunt.util

Supported platforms:

FreeBSD
Windows
macOS
Linux

Example for hunt.io echo server:

```D
void main()
{
auto loop = new EventLoop();
auto listener = new TcpListener(loop, AddressFamily.INET, 
512);



listener.bind(8080).listen(1024).onConnectionAccepted((TcpListener sender, TcpStream client) {


client.onDataReceived((in ubyte[] data) {
const(ubyte)[] sentData = data;
client.write(sentData, (in ubyte[] wdata, size_t 
nBytes) {
debug writefln("thread: %s, sent bytes: %d", 
getTid(), nBytes);


if (sentData.length > nBytes)
writefln("remaining bytes: ", sentData.length 
- nBytes);

});

});
}).start();

writeln("Listening on: ", listener.bindingAddress.toString());
loop.run();
}
```
sample code link: 
https://github.com/huntlabs/hunt/blob/master/examples/TcpDemo/source/server.d



Example for HashMap:
```D
void main()
{

HashMap!(string, string) hm = new HashMap!(string, 
string)();


//add key-value pair to hashmap
hm.put("first", "FIRST INSERTED");
hm.put("second", "SECOND INSERTED");
hm.put("third","THIRD INSERTED");

writeln(hm);
}
```


About for performance VS rust / golang you can look this pictrue, 
have benchmark result:

https://raw.githubusercontent.com/huntlabs/hunt/master/docs/images/benchmark.png

You can find more information in github repo:

https://github.com/huntlabs/hunt




Re: hunt entity v2.1.0 released!

2019-01-09 Thread Brian via Digitalmars-d-announce
On Wednesday, 9 January 2019 at 14:12:06 UTC, Martin Tschierschke 
wrote:

On Wednesday, 9 January 2019 at 11:34:07 UTC, Brian wrote:

Fix example code:
https://github.com/huntlabs/hunt-entity/wiki/Pagination

Github repo:
https://github.com/huntlabs/hunt-entity


Is your work related to shark?
https://code.dlang.org/packages/shark

Regards mt.


No, shark library "Entity" define looks like hunt-entity history 
version.


We team has hunt-database and hunt-sql support hunt-entity to 
work.


hunt-entity is so powerfull ORM.

shark is very simple, now.


Re: hunt entity v2.1.0 released!

2019-01-09 Thread Brian via Digitalmars-d-announce

Fix example code:
https://github.com/huntlabs/hunt-entity/wiki/Pagination

Github repo:
https://github.com/huntlabs/hunt-entity


hunt entity v2.1.0 released!

2019-01-09 Thread Brian via Digitalmars-d-announce
Hunt Entity is an object-relational mapping (ORM) framework for 
dlang's database, support PostgreSQL / MySQL / SQLite.


This version added pagination for EQL's createQuery();

Example 1 for pagination:

```D

class User
{
mixin MakeModel;

@AutoIncrement
@PrimaryKey
int id;

string name;
}

auto query = em.createQuery!User("SELECT * FROM User", new 
Pageable(0, 10));

auto page = query.getPageResult();

logDebug("Page NO: %s, size of Page: %s, Total Pages: %s, Total: 
%s".format(page.getNumber(), page.getSize(), 
page.getTotalPages(), page.getTotalElements()));


foreach (user; page.getContent())
{
logDebug("User[%s] is: %s".format(user.id, user.name));
}

```


Example 2 for limit && offset :


```D

class User
{
mixin MakeModel;

@AutoIncrement
@PrimaryKey
int id;

string name;
}

auto query = em.createQuery!User("SELECT * FROM 
User").setFirstResult(10).setMaxResults(20);


foreach (user; query.getResultList())
{
logDebug("User[%s] is: %s".format(user.id, user.name));
}

```



Re: hunt-entity v2.0.0 released!

2018-11-02 Thread Brian via Digitalmars-d-announce

On Friday, 2 November 2018 at 14:49:00 UTC, Suliman wrote:

Entity Query Lanuage

Can't understand difference with SQL...


You can look JPQL & DQL.

EQL use Entity Object to query result.


hunt-database v1.0.0 released!

2018-11-02 Thread Brian via Digitalmars-d-announce
hunt-database is a database abstraction layer for D programming 
language. Support PostgreSQL / MySQL / SQLite.


The main features of this version:
1. Add Query module and new QueryBuilder
2. Remove old SqlBuilder
3. Use hunt liked code style
4. Some bugs fixed




Github repository:
https://github.com/huntlabs/hunt-database




hunt-entity v2.0.0 released!

2018-11-02 Thread Brian via Digitalmars-d-announce

entity rename to hunt-entity.

hunt-entity is an ORM for D programming language, Like java's JPA 
and PHP's Doctrine2.


The main features of this release:
1. Support EQL (Entity Query Lanuage)
2. Support for ManyToMany
3. Replace SqlBuilder with QueryBuilder
4. Update hunt-database version to v1.0.0
5. Fix some bugs


## Use EQL

```D

auto q = em.createQuery!User("SELECT u FROM User u WHERE u.age > 
18 AND u.status = 1 ;");

foreach(u ; q.getResultList())
{
logDebug("User id: %s , name: %s, age: %s".format(u.id, 
u.name, u.age));

}


```


Repository:
https://github.com/huntlabs/hunt-entity



Re: gRPC for D is released.

2018-10-12 Thread Brian via Digitalmars-d-announce

On Thursday, 11 October 2018 at 16:19:07 UTC, April Nassi wrote:
Hi! I'm the community manager for gRPC and this is awesome! 
Would love to add this to our ecosystem repo. Would also be 
great to have you talk about this on an upcoming community call!


Thanks,
e-mail: zoujiaq...@gmail.com


gRPC for D is released.

2018-10-11 Thread Brian via Digitalmars-d-announce
hunt-grpc is Grpc for D programming language, hunt-http library 
based.






example server code:

  import helloworld.helloworld;
  import helloworld.helloworldrpc;
  import grpc;

  class GreeterImpl : GreeterBase
  {
  override HelloReply SayHello(HelloRequest request)
  {
  HelloReply reply = new HelloReply();
  reply.message = "hello " ~ request.name;
  return reply;
  }
  }

  string host = "0.0.0.0";
  ushort port = 50051;

  Server server = new Server();
  server.listen(host , port);
  server.register( new GreeterImpl());
  server.start();





example client code:

  import helloworld.helloworld;
  import helloworld.helloworldrpc;
  import grpc;

  auto channel = new Channel("127.0.0.1" , 50051);
  GreeterClient client = new GreeterClient(channel);

  HelloRequest request = new HelloRequest();
  request.name = "test";
  HelloReply reply = client.SayHello(request);





build for library:

dub build -v





build for example:

dub build -c=example -v




hunt-grpc project:
https://github.com/huntlabs/hunt-grpc



hunt-http support http 2.0 protocol.

2018-09-14 Thread Brian via Digitalmars-d-announce
hunt-http is a http library, support http 1.1 / http 2.0 / 
websocket server and client, support SSL / TLS channel( use 
boringssl ).


1. Implement http 1.1 parser and server/client
2. Implement http 2.0 protocol(h2 / h2c) and server/client
3. Implement WebSocket protocol and server/client
4. H2C Demo
5. WebSocket Demo
6. SimpleHttp Demo
7. TLS Demo

project source code:
https://github.com/huntlabs/hunt-http



Re: LDC 1.11.0

2018-08-23 Thread Brian via Digitalmars-d-announce

On Tuesday, 21 August 2018 at 15:31:16 UTC, Joakim wrote:

On Sunday, 19 August 2018 at 10:11:42 UTC, 鲜卑拓跋枫 wrote:

Many thanks for your effort!
And hope the subsequent LDC releases with LLVM 7.0 will be 
mature enough on AArch64 and RISC-V for production environment.


Who is actually running AArch64 or RISC-V in a "production 
environment?" Maybe a few for AArch64, but pretty much nobody 
for RISC-V. I tried looking for a RISC-V VPS or dev board 
recently and found basically nothing, just two boards from 
SiFive that are too small or too expensive.


We need support AArch64 :)


Re: Hunt framework 1.2.0 released

2018-07-17 Thread Brian via Digitalmars-d-announce

On Tuesday, 17 July 2018 at 11:10:07 UTC, Suliman wrote:

On Tuesday, 17 July 2018 at 09:27:26 UTC, Brian wrote:

Hello, hunt framework fix bugs version release.

Major updates:
1. Add simplify functions
2. You can use createUrl() to create link url from 
module.controller.action

3. support date() / url() function for template engine
4. fix multi-domain use other port
5. use portgresql / mysql / sqlite on default config
6. upgrade dependencies package version to latest
7. release stabled skeleton project

hunt-framework source code:
https://github.com/huntlabs/hunt

hunt-skeleton source code:
https://github.com/huntlabs/hunt-skeleton


Could you explain what your vision about benefits Hunt over 
Vibed?


Vibe.d is very cool and fast network and data management library.

but, we need a web framework like spring boot, django, laravel, 
rails.


It's so easy to use, so simple to configuration and quickly for 
development.


My team develop the Entity(Like java's JPA & PHP's doctrine2), 
cache(Like ehcache), Collie(Like netty), entity-repository(Like 
spring-data) to development people are more familiar with the 
hunt-framework.


Hunt framework 1.2.0 released

2018-07-17 Thread Brian via Digitalmars-d-announce

Hello, hunt framework fix bugs version release.

Major updates:
1. Add simplify functions
2. You can use createUrl() to create link url from 
module.controller.action

3. support date() / url() function for template engine
4. fix multi-domain use other port
5. use portgresql / mysql / sqlite on default config
6. upgrade dependencies package version to latest
7. release stabled skeleton project

hunt-framework source code:
https://github.com/huntlabs/hunt

hunt-skeleton source code:
https://github.com/huntlabs/hunt-skeleton



Re: Visual D 0.47.0 released

2018-06-24 Thread Brian via Digitalmars-d-announce

On Sunday, 24 June 2018 at 13:08:53 UTC, Rainer Schuetze wrote:

Hi,

a new release of Visual D has just been uploaded. Major changes 
are


* improved Visual C++ project integration: better dependencies,
  automatic libraries, name demangling
* new project wizard
* mago debugger: show vtable, dynamic type of interfaces,
  symbol names of pointer address

See 
http://rainers.github.io/visuald/visuald/VersionHistory.html 
for the full version history.


Visual D is a Visual Studio extension that adds D language 
support to VS2008-2017. It is written in D, its source code can 
be found on github: 
https://github.com/D-Programming-Language/visuald, pull 
requests welcome.


An installer can be found at 
http://rainers.github.io/visuald/visuald/StartPage.html


Happy coding,
Rainer


Thanks!

Can use dub.json to manager project?


Hunt framework 1.1.0 released

2018-06-21 Thread Brian via Digitalmars-d-announce

huntframework v1.1.0 is released.

Features:
 * Add Task worker
 * Support parameters for Acion
 * Imprevo Template engine
 * Imprevo entity options
 * Upgrade kiss version to latest
 * Upgrade Entity version to latest
 * Fix bugs

source code:
https://github.com/huntlabs/hunt

hunt skeleton project:
https://github.com/huntlabs/hunt-skeleton


Re: LDC 1.10.0

2018-06-21 Thread Brian via Digitalmars-d-announce

On Tuesday, 19 June 2018 at 22:10:38 UTC, kinke wrote:

Hi everyone,

on behalf of the LDC team, I'm glad to announce LDC 1.10. The 
highlights of this version in a nutshell:


* Based on D 2.080.1.
* Win64: Breaking ABI change by passing vectors efficiently in 
registers.

* Config file extensions for cross-compilation.
* Support for DragonFly BSD.
* Various fixes, most notably wrt. exception stack traces on 
Linux.


Full release log and downloads: 
https://github.com/ldc-developers/ldc/releases/tag/v1.10.0


Thanks to all contributors!


So cool :)

I'd like to be concerned about its improvements to iOS & Android 
support.


Re: Hunt framework 1.0.0 released

2018-06-05 Thread Brian via Digitalmars-d-announce
On Tuesday, 5 June 2018 at 13:54:25 UTC, Steven Schveighoffer 
wrote:

On 6/5/18 3:25 AM, Brian wrote:


source code in github https://github.com/huntlabs/hunt/
documents in wiki https://github.com/huntlabs/hunt/wiki/
hunt framework website http://www.huntframework.com/


Is there a way to view your website in English? I found a popup 
on the bottom that has "English" as a selection, but it doesn't 
do anything.


-Steve


We're going to rebuild site with hunt 1.0, use English as the 
default language.


Re: Hunt framework 1.0.0 released

2018-06-05 Thread Brian via Digitalmars-d-announce

On Tuesday, 5 June 2018 at 08:17:30 UTC, Per Nordlöw wrote:

On Tuesday, 5 June 2018 at 07:25:33 UTC, Brian wrote:

We are pleased to announce an official version of hunt 1.0 ,


How is Hunt different from Vibe?


Thanks your question :)

Vibe.d like vert.x in java! It's an library.
Hunt like spring boot in java! Hunt is an web framework.



Re: Hunt framework 1.0.0 released

2018-06-05 Thread Brian via Digitalmars-d-announce

On Tuesday, 5 June 2018 at 07:54:49 UTC, WebFreak001 wrote:

On Tuesday, 5 June 2018 at 07:25:33 UTC, Brian wrote:
We are pleased to announce an official version of hunt 1.0 , 
This is an important milestone release!


[...]


cool! Is the hunt-skeleton always stable? I can add it as 
template to the code-d templates, I think it will make it a lot 
easier to get into.


Very cool! We keep the hunt-skeleton stable :)


Hunt framework 1.0.0 released

2018-06-05 Thread Brian via Digitalmars-d-announce
We are pleased to announce an official version of hunt 1.0 , This 
is an important milestone release!


Features:
 * enhancement Action & Controller
 * rebuild application config
 * support static wwwroot/ path, config item is hunt.http.path
 * redefine Route regex rule
 * upgrade Entity to 1.4.2
 * add Repository module, like spring boot 2 Repository
 * add second level cache
 * enhancement collie http api
 * redesign template engine ( like Django jinja2 & Symfony twig )
 * improvement Session module
 * improvement Cookie module
 * improvement Request API
 * improvement Response API
 * improvement Middleware
 * use kiss.logger module
 * use kiss.net module

source code in github https://github.com/huntlabs/hunt/
documents in wiki https://github.com/huntlabs/hunt/wiki/
hunt framework website http://www.huntframework.com/


use hunt framework:
```bash
git clone https://github.com/huntlabs/hunt-skeleton.git
cd hunt-skeleton/
dub run -v
```

look for your browser:
http://localhost:8080/


Re: SecureD moving to GitLab

2018-06-05 Thread Brian via Digitalmars-d-announce

On Tuesday, 5 June 2018 at 06:55:42 UTC, Joakim wrote:

On Tuesday, 5 June 2018 at 06:45:48 UTC, Adam Wilson wrote:

Hello Fellow D'ers,

As some of you know I work for Microsoft. And as a result of 
the recent acquisition of GitHub by Microsoft, I have decided, 
out of an abundance of caution, to move all of my projects 
that currently reside on GitHub to GitLab.


[...]


This reads like a joke, why would it matter if you contributed 
to open source projects on an open platform that your employer 
runs?


Yes!
We support Github.


Entity 1.3.1 released, stable APIs and enhancements.

2018-05-04 Thread Brian via Digitalmars-d-announce
Entity is an object-relational mapping tool for the D programming 
language. Referring to the design idea of JPA. support PostgreSQL 
/ MySQL / SQLite.


## Support databases

PostgreSQL 9.0+
MySQL 5.1+
SQLite 3.7.11+

## Depends

database

## Simple code

import entity;

@Table("user")
class User : Entity
{
@PrimaryKey
@AutoIncrement
int id;

string name;
double money;
string email;
bool status;
}

void main()
{
DatabaseOption options = new 
DatabaseOption("mysql://root:123456@localhost:3306/huntblog?charset=utf-8");
EntityManagerFactory entityManagerFactory = 
Persistence.createEntityManagerFactory("default", options);

EntityManager em = entityManagerFactory.createEntityManager();

// begin transaction
em.getTransaction().begin();

// define your database existing row id in here
int id = 10;

auto user = em.find!User(id);
log("User name is: ", user.name);

// commit transaction
em.getTransaction().commit();

em.close();
entityManagerFactory.close();
}

## Insert row

auto user = new User();
user.name = "Brian";
user.email = "br...@huntlabs.cn";
user.money = 99.9;

// insert user
em.persist(user);
log("User id is: ", user.id);

## Delete row

int n = em.remove!User(id);
log("The member of users deleted is: ", n);

## Update row

auto user = em.find!User(id);
log("User name is: ", user.name);
user.name = "zoujiaqing";
em.merge!User(user);
log("The number of users updated is: ", n);

## Use CriteriaQuery to find

// create CriteriaBuilder object from em
CriteriaBuilder builder = em.getCriteriaBuilder();

CriteriaQuery!User criteriaQuery = builder.createQuery!User;
Root!User root = criteriaQuery.from();
Predicate p1 = builder.equal(root.User.id, id);
TypedQuery!User typedQuery = 
em.createQuery(criteriaQuery.select(root).where(p1));


auto user =  cast(User)(typedQuery.getSingleResult());

log("User name is: ", user.name);

## Use CriteriaQuery to Multi-condition find

// create CriteriaBuilder object from em
CriteriaBuilder builder = em.getCriteriaBuilder();

CriteriaQuery!User criteriaQuery = builder.createQuery!User;
Root!User root = criteriaQuery.from();

Predicate p1 = builder.lt(root.User.id, 1000);  // User id is 
less than 1000.
Predicate p2 = builder.gt(root.User.money, 0);  // User money 
is greater than 0.
Predicate p3 = builder.like(root.User.name, "z%");  // User 
name prefix is z.


TypedQuery!User typedQuery = 
em.createQuery(criteriaQuery.select(root).where(builder.and(p1, 
p2), p3));

User[] users typedQuery.getResultList();

log("The number of users found is: ", users.length);

## Links

http://code.dlang.org/packages/entity
https://github.com/huntlabs/entity



Re: Official Dub package for DWT

2018-02-08 Thread Brian via Digitalmars-d-announce

Thanks!

But, How to use x64?


Re: LDC 1.6.0-beta1

2017-11-12 Thread Brian via Digitalmars-d-announce

On Sunday, 12 November 2017 at 15:57:19 UTC, kinke wrote:

Hi everyone,

on behalf of the LDC team, I'm glad to announce the first beta 
for LDC 1.6. The highlights of this version in a nutshell:


* Based on D 2.076.1.
* Experimental support for dynamic codegen at runtime ('manual 
JIT').

* Many std.math functions are now CTFE-able.

Full release log and downloads: 
https://github.com/ldc-developers/ldc/releases/tag/v1.6.0-beta1


Thanks to all contributors!


Fast update, thank you!

There is no version for FreeBSD?



Re: database 0.0.8 released

2017-09-13 Thread Brian via Digitalmars-d-announce
On Wednesday, 13 September 2017 at 04:30:24 UTC, Vadim Lopatin 
wrote:

On Tuesday, 12 September 2017 at 17:14:27 UTC, Brian wrote:
dlang database library: Database abstraction layer for D 
programing language, support PostgreSQL / MySQL / SQLite.


Project:
https://github.com/huntlabs/database


Did you see DDBC project?
It supports postgres, mysql, and sqlite, too.
API is similar to Java JDBC.


Yes, thanks your project DDBC :)

database is similar to PHP PDO library, no deps, api easy to use.


database 0.0.8 released

2017-09-12 Thread Brian via Digitalmars-d-announce
dlang database library: Database abstraction layer for D 
programing language, support PostgreSQL / MySQL / SQLite.


Project:
https://github.com/huntlabs/database

## Database
Database abstraction layer for D programing language, support 
PostgreSQL / MySQL / SQLite.


## Example
```D

import std.stdio;
import std.experimental.logger;

import database;

void main()
{
writeln("run database MySQL demo.");

auto db = new 
Database("mysql://root:123456@localhost:3306/test?charset=utf-8");


int result = db.execute(`INSERT INTO user(username) 
VALUES("test")`);

writeln(result);

foreach(row; db.query("SELECT * FROM user LIMIT 10"))
{
writeln(row["username"]);
}

db.close();
}

```

## Use DatabaseOption to instantiate a Database object
```D
auto options = new 
DatabaseOption("mysql://root:123456@localhost:3306/test");

options.setMaximumConnection(5);

auto db = new Database(options);

db.execute("SET NAMES utf8");
```

## API

-  int Database.execute(string sql)  Return number of execute 
result.

```D
int result = db.execute('INSERT INTO user(username) 
VALUES("Brian")');

// if execute error ,db will throw an DatabaseException
```
-  ResultSet Database.query(sql) Return ResultSet object for 
query(SELECT).

```D
ResultSet rs = db.query("SELECT * FROM user LIMIT 10");
```
-  Statement Database.prepare(sql) Create a prepared Statement 
object.

```D
   Statement stmt = db.prepare("SELECT * FROM user where username 
= :username and age = :age LIMIT 10");

```
- Statement.setParameter(param, value) : bind param's value to 
:param for sql.

```D
   stmt.setParameter("username", "viile");
   stmt.setParameter("age", 18);
```
- ResultSet Statement.query()  Return ResultSet
```D
ResultSet rs = stmt.query();
foreach(row; rs)
{
writeln(row["username"]);
}
```
- Row Statement.fetch()  Return Row
```D
Row row = stmt.fetch();
writeln(row["username"]);
```
- int Statement.execute() : return execute status for prepared 
Statement object.

```D
int result = stmt.execute();
```
- Statement.lastInsertId() : Statement.execute() for insert sql, 
return lastInsertId.




Re: [OT] LLVM 5.0 released - LDC mentioned in release notes

2017-09-08 Thread Brian via Digitalmars-d-announce

On Thursday, 7 September 2017 at 21:14:24 UTC, bpr wrote:

On Thursday, 7 September 2017 at 20:55:22 UTC, Nordlöw wrote:
Are there any new code-generation features in LLVM 5.0 that 
LDC will make use of?


Given that LLVM has direct support for coroutines since 4.0 
(https://llvm.org/docs/Coroutines.html) I've wondered if D 
(even just LDC D for starters) could use that to implement 
async/await or a similar feature.


C++17 is supported it?


Re: Vision document for H1 2017

2017-01-08 Thread Brian via Digitalmars-d-announce
On Wednesday, 4 January 2017 at 19:22:33 UTC, Andrei Alexandrescu 
wrote:
We release a brief Vision document summarizing the main goals 
we plan to pursue in the coming six months. This half we are 
focusing on three things: safety, lifetime management, and 
static introspection.


https://wiki.dlang.org/Vision/2017H1


Andrei


Dlang should strive to improve the standard library, such as 
Python, go, rust.


Melbourne Meetup

2015-11-25 Thread brian via Digitalmars-d-announce

So I have foolishly started my first meetup, which is for D.

http://www.meetup.com/D-Programming/

I'm still pretty much a newb at D, and the more I read the forums 
the more overwhelmed I am, but I thought it'd be good to catch up 
with any locals and see what people do.


I'll probably try and get the first meetup going in the New Year, 
so any suggestions of topics will be greatly appreciated. :P


Brian