Re: D GPU execution module: A survey of requirements.

2018-05-09 Thread Henry Gouk via Digitalmars-d

On Wednesday, 9 May 2018 at 23:26:19 UTC, H Paterson wrote:

Hello,

I'm interested in writing a module for executing D code on 
GPUs. I'd like to bounce some ideas off D community members to 
see what this module needs do.


[...]


Check out https://github.com/libmir/dcompute


Re: Linking to static libraries with a local DMD install

2016-08-20 Thread Henry GOuk via Digitalmars-d-learn

On Sunday, 21 August 2016 at 04:32:29 UTC, rikki cattermole wrote:

On 21/08/2016 3:54 PM, Henry GOuk wrote:

Please post the error message, without it we're guessing.


$ dub build
Performing "debug" build using dmd for x86_64.
vibe-d:utils 0.7.29: target for configuration "library" is up to 
date.
vibe-d:data 0.7.29: target for configuration "library" is up to 
date.
vibe-d:core 0.7.29: target for configuration "libevent" is up to 
date.
vibe-d:http 0.7.29: target for configuration "library" is up to 
date.
vibe-d:diet 0.7.29: target for configuration "library" is up to 
date.
vibe-d:mail 0.7.29: target for configuration "library" is up to 
date.
vibe-d:mongodb 0.7.29: target for configuration "library" is up 
to date.
vibe-d:redis 0.7.29: target for configuration "library" is up to 
date.
vibe-d:web 0.7.29: target for configuration "library" is up to 
date.

vibe-d 0.7.29: target for configuration "libevent" is up to date.
test ~master: building configuration "application"...
Linking...
../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_core.a(openssl_22ad_4f0.o): 
In function 
`_D4vibe6stream7openssl13OpenSSLStream6__ctorMFC4vibe4core6stream6StreamC4vibe6stream7openssl14OpenSSLContextE4vibe6stream3tls14TLSStreamStateAyaS4vibe4core3net14NetworkAddressAAyaZC4vibe6stream7openssl13OpenSSLStream':
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:78:
 undefined reference to `BIO_new'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:84:
 undefined reference to `SSL_set_bio'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:93:
 undefined reference to `SSL_set_ex_data'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:99:
 undefined reference to `SSL_accept'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:105:
 undefined reference to `SSL_ctrl'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:107:
 undefined reference to `SSL_connect'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:116:
 undefined reference to `SSL_get_peer_certificate'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:120:
 undefined reference to `SSL_get_verify_result'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:117:
 undefined reference to `X509_free'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:114:
 undefined reference to `SSL_shutdown'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:94:
 undefined reference to `SSL_set_ex_data'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:74:
 undefined reference to `SSL_free'
../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_core.a(openssl_22ad_4f0.o): 
In function 
`_D4vibe6stream7openssl13OpenSSLStream16readPeerCertInfoMFPS6deimos7openssl4x5097x509_stZv':
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:158:
 undefined reference to `X509_get_subject_name'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:158:
 undefined reference to `X509_NAME_entry_count'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:162:
 undefined reference to `X509_NAME_get_entry'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:162:
 undefined reference to `X509_NAME_ENTRY_get_object'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:162:
 undefined reference to `X509_NAME_ENTRY_get_data'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:164:
 undefined reference to `OBJ_obj2nid'
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:164:
 undefined reference to `OBJ_nid2ln'
../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_core.a(openssl_22ad_4f0.o): 
In function `_D4vibe6stream7openssl13OpenSSLStream6__dtorMFZv':
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:176:
 undefined reference to `SSL_free'
../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_core.a(openssl_22ad_4f0.o): 
In function `_D4vibe6stream7openssl13OpenSSLStream9leastSizeMFNdZm':
/home/hgrg1/Projects/stream2vec/../../.dub/packages/vibe-d-0.7.29/vibe-d/source/vibe/stream/openssl.d:186:
 undefined reference to `SSL_pending'
../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_core.a(openssl_22ad_4f0.o): 
In 

Linking to static libraries with a local DMD install

2016-08-20 Thread Henry GOuk via Digitalmars-d-learn

Hi,

Due to some security limitations, I've had to install DMD in my 
home folder on one of my university computers.


When trying to build a basic vibe.d application (i.e., the one 
created by dub init test --type=vibe.d), linking fails with a 
large number of undefined references to functions in libssl, 
libcrypto, etc.


Running dub with -v shows that the command which is failing is:

dmd 
-of.dub/build/application-debug-linux.posix-x86_64-dmd_2071-9C38B44F3C839608CC3543300CB92D81/test .dub/build/application-debug-linux.posix-x86_64-dmd_2071-9C38B44F3C839608CC3543300CB92D81/test.o ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_mail.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_mongodb.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_redis.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_web.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_diet.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_http.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_core.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_data.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_utils.a -L--no-as-needed -L-levent -L-levent_pthreads -L-lssl -L-lcrypto -g


If I then execute this command manually, with -v, then I can see 
that this command is failing:


cc 
.dub/build/application-debug-linux.posix-x86_64-dmd_2071-9C38B44F3C839608CC3543300CB92D81/test.o -o .dub/build/application-debug-linux.posix-x86_64-dmd_2071-9C38B44F3C839608CC3543300CB92D81/test -g -m64 -Xlinker --no-as-needed -levent -levent_pthreads -lssl -lcrypto -L/home/hgrg1/localroot/usr/bin/../lib -Xlinker --export-dynamic ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_mail.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_mongodb.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_redis.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_web.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_diet.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_http.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_core.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_data.a ../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_utils.a -Xlinker -Bstatic -lphobos2 -Xlinker -Bdynamic -lpthread -lm -lrt -ldl


Once again, with -v:

/usr/lib/gcc/x86_64-linux-gnu/4.8/collect2 --sysroot=/ --build-id 
--eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed 
-dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o 
.dub/build/application-debug-linux.posix-x86_64-dmd_2071-9C38B44F3C839608CC3543300CB92D81/test /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o -L/home/hgrg1/localroot/usr/bin/../lib -L/home/hgrg1/localroot/lib/../lib -L/home/hgrg1/localroot/usr/lib/../lib -L/home/hgrg1/localroot/usr/local/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/home/hgrg1/localroot/lib -L/home/hgrg1/localroot/usr/lib -L/home/hgrg1/localroot/usr/local/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. .dub/build/application-debug-linux.posix-x86_64-dmd_2071-9C38B44F3C839608CC3543300CB92D81/stream2vec.o --no-as-needed -levent -levent_pthreads -lssl -lcrypto --export-dynamic ../..!

/.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d.a 
../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_mail.a 
../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_mongodb.a 
../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_redis.a 
../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_web.a 
../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_diet.a 
../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_http.a 
../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_core.a 
../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_data.a 
../../.dub/packages/vibe-d-0.7.29/vibe-d/libvibe-d_utils.a -Bstatic -lphobos2 
-Bdynamic -lpthread -lm -lrt -ldl -lgcc --as-needed -lgcc_s --no-as-needed -lc 
-lgcc --as-needed -lgcc_s --no-as-needed 
/usr/lib/gcc/x86_64-linux-gnu/4.8/crtend.o 
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o


If I try to build the same project, initialised the same way, on 
a machine with DMD and libssl, libevent, etc installed in a 
system-wide location then everything works as expected. Does 
anyone know what I've missed out when setting up DMD and the 
vibe.d dependencies?


Thanks,
Henry


Re: Researcher question – what's the point of semicolons and curly braces?

2016-05-03 Thread Henry Gouk via Digitalmars-d

On Tuesday, 3 May 2016 at 04:23:48 UTC, Walter Bright wrote:
1. Redundancy in specification means the compiler can catch 
more 'typo' mistakes rather than having them compile 
successfully and then behave mysteriously. If a language has 0 
redundancy, then any 8745b48%%&* string would be a valid 
program. Redundancy is a critical feature of high reliability 
languages.


Many languages have removed redundancy only to put it back in 
after bitter experience. The classic is implicit declaration of 
variables.


An example of this would be that Apple SSL bug that has largely 
been blamed on optional curly braces for if statements with one 
line in the body.


Re: Computer Vision Library in D

2016-04-19 Thread Henry Gouk via Digitalmars-d-announce
On Tuesday, 19 April 2016 at 17:01:12 UTC, Relja Ljubobratovic 
wrote:

Hi everyone!

For a while I was looking for a computer vision library in D on 
the web, but haven't found any. There were few libraries I 
found, providing some basic image processing functionality, but 
none that could be remotely compared to opencv or other similar 
open source computer vision toolkits present for other 
languages. Surely for a year, even maybe two, this has been 
stopping me to switch completely to D from C/C++.


[...]


I'm interested in contributing towards parts that involve machine 
learning/numerical optimisation. I have written some of my own 
CV/ML programs with D in the past, but none of them are 
particularly well engineered since they were all intended for 
just my own use.


Re: What are you planning for 2016?

2016-01-06 Thread Henry Gouk via Digitalmars-d
On Tuesday, 5 January 2016 at 12:27:12 UTC, Ola Fosheim Grøstad 
wrote:

2. integrate with numerical solutions like TensorFlow?


I'm currently working on something along the same lines as 
TensorFlow -- I started work on this before TensorFlow was 
announced. I haven't thought too much about writing a distributed 
backend, but currently there are some reasonably inefficient 
proof-of-concept CPU and CUDA backends.


It's still fairly early on in development, and I'm more of an 
academic than an engineer. That said, I've managed to train some 
modestly sized convolutional networks without trouble.


I'll open source it at some point, but I haven't got a time-frame 
for that.


Re: Natural language parsing (NLP) with D

2015-10-21 Thread Henry Gouk via Digitalmars-d

On Wednesday, 21 October 2015 at 09:09:27 UTC, Chris wrote:


What exactly is sentiment analysis and how do you go about it?


Determining whether the sentiment of a piece of text is positive, 
neutral, or negative. Currently twitter is a pretty popular 
source of data in academia, as emoticons can be used as 
sufficiently accurate proxies for labels. Using psuedo-labelled 
tweets, one can then come up with a feature representation (e.g. 
bag of words, tf-idf) and use some sort of classifier (e.g. 
linear SVM or softmax regression) to determine the sentiment of 
novel tweets. This is a pretty simple approach, and probably not 
hard to improve on.


Re: D ranked as #25 by IEEE spectrum

2015-09-23 Thread Henry Gouk via Digitalmars-d

On Thursday, 24 September 2015 at 00:16:27 UTC, Idan Arye wrote:

On Wednesday, 23 September 2015 at 22:20:35 UTC, Meta wrote:
On Wednesday, 23 September 2015 at 19:28:00 UTC, Ola Fosheim 
Grøstad wrote:

http://spectrum.ieee.org/static/interactive-the-top-programming-languages-2015


They list D as useful for web development and embedded, but 
not desktop apps... And they list Rust was useful for desktop 
apps and web development. Something's fishy here.


They list TCL for embedded. This is behind ridiculous...


A lot of EDA tools use TCL as a scripting language for automating 
tasks. It's not quite embedded programming, but it is related.