Re: DConf 2019 Livestream

2019-05-08 Thread Laeeth Isharc via Digitalmars-d-announce

On Wednesday, 8 May 2019 at 08:04:08 UTC, Mike Parker wrote:

On Wednesday, 8 May 2019 at 08:00:15 UTC, Andrej Mitrovic wrote:

On Wednesday, 8 May 2019 at 07:57:40 UTC, Mike Parker wrote:
The venue uses WebEx for livestreaming. All the information 
is available in this PDF:


https://drive.google.com/open?id=1yekllbfOmxHqJNuuWIVeP9vNeROmfp1I


"When joining: Please connect using Internet Explorer, not 
Google Chrome or another web

browser."

You guys can't be serious, you're using WebEx?


Not us. The venue.


Sorry about that.  It was supposed to be streaming to YouTube, 
but it fell through the cracks.  We are looking into it now.



Laeeth



my first kernel in betterC D

2019-06-16 Thread Laeeth Isharc via Digitalmars-d-announce

https://github.com/kaleidicforks/mkernel-d

I spent a few minutes on just turning the C code to betterC D - 
was curious to see if it would work.  It seems to.  I didn't try 
loading with GRUB.  The dub.sdl isn't quite right, so best run 
./build.sh


Cannot push to code.dlang.org - it complains about registering a 
forked package, even after renaming.


Re: my first kernel in betterC D

2019-06-19 Thread Laeeth Isharc via Digitalmars-d-announce

On Wednesday, 19 June 2019 at 13:45:45 UTC, matheus wrote:

On Sunday, 16 June 2019 at 16:14:26 UTC, Laeeth Isharc wrote:

...


Nice indeed, maybe you should mention this on reddit?

Matheus.


Feel free to.  But I didn't do any work - I changed a few lines 
in the C code and of course it just worked.  So I would feel 
embarrassed posting to Reddit because the original author did the 
hard bit and I just made trivial changes.


You know I think Atila is right about social factors and 
integration being everything.   The objections to using D are 
just that - it's not really about what people say mostly, but 
those are excuses to rationalize how they feel.


One aspect of that is just showing something is possible.  Adam 
Ruppe's talk at dconf a while back has had a lasting influence on 
how we approach things, mostly for giving me permission to do 
what I'm naturally inclined to do anyway.  If you're not sure 
then bet a little time to try - the worst thing that can happen 
in user code is a segfault and so what.


For example our business is not primarily about network 
programming at a lowish level.  But when people say file 
transfers to Asia are slow because of the speed of light and 
latency one doesn't need to accept that.  It's quite a similar 
problem - latency and packet loss - to the days of 300 baud 
models and XModem and there's an obvious solution.  But before 
doing it myself I figured someone must have solved it and I found 
UDT.  I spent half a Saturday wrapping it so it built but 
wouldn't work and Robert Schadek finished the job in a day or 
two.  What's a decent performance improvement these days?  Well 
I'm pretty happy with a 300 times (not 300%) improvement in file 
transfer speed between regions!  And we can pull that plus libzfs 
in D plus our little language to have a tool for managing zfs 
snapshots and replication that makes everything simple because 
it's coherently designed and integrated.


Anyway I think sometimes a barrier to adoption is sometimes just 
nobody has yet shown the problem is easily solved using D in your 
domain.  We are in an age that's short on daring and ambition, 
which means a little bit of courage goes a long way.  Nobody 
could break the four minute mile.  One guy did it and then lots 
of people followed.


Most people closest to using D that aren't I guess will have a 
decent size C or C++ code base.  DPP keeps getting better in 
relation to
C++ and we want to get it to a stage where it can be used to 
expose an internal library that's still got a C++ interface but 
is being replaced step by step with D.  Thanks, Daniel Murphy for 
showing the way there, though we aren't able to do the 
translation programmatically.  DPP has paid for the modest 
support we provided many times over already even just considering 
direct benefits.


I wonder a bit about translation from C.  Rust 2C was a multi 
million DoD project.  We could steal the front end that dumps out 
the libclang C AST as CBOR.  I suppose it shouldn't be hard to 
translate that to C-style D programmatically.  It "adds nothing" 
to libclang in theory but it saves a lot of time as libclang is 
not the most complete or pleasant API I have seen.


If we had something dependable it would be much easier to move a 
C codebase incrementally to D because you could just do what you 
can manage at that time and you don't need that much imagination 
or courage because it doesn't end up being a big binary bet.  I 
guess translating C++ programmatically is a much harder, maybe 
almost impossible problem.  But C would be a start.


I have my hands full right now but I would play with doing it 
myself if I had more time...



Laeeth


Re: Autonomous driving company is looking for D software engineers

2019-06-23 Thread Laeeth Isharc via Digitalmars-d-announce

On Tuesday, 18 June 2019 at 19:05:05 UTC, Dragos Carp wrote:
AID GmbH (https://aid-driving.eu) a subsidiary of AUDI AG is 
looking for experienced D-evelopers in Munich.


If you want to employ your D expertise and be part of the 
autonomous driving revolution, apply under: 
https://jobs.lever.co/aid-driving/c4b243bd-c106-47ae-9aec-e34d5bbe0ce1?lever-via=vcPRnEaCR3


Nice work.

Could somebody perhaps check with AID and if it's okay add their 
name to the list of companies using D.





Re: Autonomous driving company is looking for D software engineers

2019-06-23 Thread Laeeth Isharc via Digitalmars-d-announce

On Sunday, 23 June 2019 at 12:22:18 UTC, XavierAP wrote:

On Tuesday, 18 June 2019 at 19:05:05 UTC, Dragos Carp wrote:
AID GmbH (https://aid-driving.eu) a subsidiary of AUDI AG is 
looking for experienced D-evelopers in Munich.


If you want to employ your D expertise and be part of the 
autonomous driving revolution, apply under: 
https://jobs.lever.co/aid-driving/c4b243bd-c106-47ae-9aec-e34d5bbe0ce1?lever-via=vcPRnEaCR3


Thank you very much for sharing.

You work at AID? As Laeeth says, could you let us know whether 
it would be ok to add a mention to AID to the Dlang website?


https://dlang.org/orgs-using-d.html


https://www.reddit.com/r/programming/comments/c4f1hu/dlang_being_used_for_autonomous_driving_research?sort=confidence





PoC: Runtime Reflection in D on C++ code

2019-07-08 Thread Laeeth Isharc via Digitalmars-d-announce
It's rough and ready - no proper build and not at all 
well-tested.  But it will definitely work in time since it uses 
the fork of libcling for cppyy that's used at scale for CERN. 
cppyy generates python bindings for C++ code on the fly using the 
cling interpreter (it handles templates by doing the 
specialisation at python runtime).


I'm a bit short of time, so putting this out here in case it's 
useful for anyone - might be some months before I get to look at 
it again.


https://github.com/kaleidicassociates/cpp-reflect-d

ROOT:
https://github.com/root-project/root

https://cppyy.readthedocs.io/en/latest/

http://wlav.web.cern.ch/wlav/Cppyy_LavrijsenDutta_PyHPC16.pdf



Re: Five Projects Selected for SAOC 2019

2019-09-04 Thread Laeeth Isharc via Digitalmars-d-announce

On Tuesday, 27 August 2019 at 17:32:30 UTC, Max Haughton wrote:
On Monday, 26 August 2019 at 18:51:54 UTC, Vladimir Panteleev 
wrote:

On Sunday, 25 August 2019 at 13:38:24 UTC, Mike Parker wrote:
The Symmetry Autumn of Code 2019 application selection 
process has come to an end. This year, we've got five 
projects instead of three. Congratulations to everyone who 
was selected! You can read about them and their projects over 
at the D Blog:


https://dlang.org/blog/2019/08/25/saoc-2019-projects-and-participants/


Sorry, I haven't been following. Don't we already have an 
implementation of the "Create a CI or other infrastructure for 
measuring D’s progress and performance" project? I just 
haven't been maintaining it because there hasn't been a lot of 
interest in it while it was being maintained.


Here's the original blog post:

https://blog.thecybershadow.net/2015/05/05/is-d-slim-yet/

I'll give it a kick and get it back online if there is 
interest. Seems wasteful to reimplement it from scratch, 
though.


I was aware of the site when i wrote the proposal, but the idea 
is to create the infrastructure to add more measurements too, 
e.g. profiling the compiler or testing it under limited memory 
(I found out how much memory my CTFE thing was using the other 
day!). Assuming I can get it to work I'd also like to throw the 
Linux perf system in there too,


Take a look at BPF.  Might be some work to wrap and if I recall 
right some of the C headers are a bit gnarly.  But it's pretty 
powerful.


https://github.com/brendangregg/bpf-docs



Re: LDC 1.18.0

2019-10-25 Thread Laeeth Isharc via Digitalmars-d-announce

On Wednesday, 23 October 2019 at 02:22:56 UTC, zoujiaqing wrote:

On Thursday, 17 October 2019 at 04:04:41 UTC, Newbie2019 wrote:

On Wednesday, 16 October 2019 at 22:31:41 UTC, kinke wrote:

Thanks for keep up the good work.

Android CI is really a great for mobile users, I wish some day 
there also include IOS cross build binary package.


Yes, I wish it too.
LDC for iOS needed.


We use iOS.  If somebody were willing to do the work of bringing 
LDC up to date and maintaining it maybe we could support the 
work, or at least contribute to it.




Re: Article about D in the iX magazine

2019-12-22 Thread Laeeth Isharc via Digitalmars-d-announce
On Sunday, 22 December 2019 at 13:05:02 UTC, Robert M. Münch 
wrote:

On 2019-12-20 21:26:00 +, Andre Pany said:

In the new iX (1 Januar 2020) there is also a Leserbrief for 
the article;)


Even there are only few comments, every comment helps.

It's very hard to convince programmers to give something else a 
try and stay to it long enough to see the light. Most of the 
time, evangelizing is very frustrating. The better strategy 
from my experience is: Deliver a cool product and than tell 
everyone "we are 10 times more productive than our competitors 
while delivering a better product." You can be sure, everyone 
wants to know how you do it.


I think it's much better to spend most time on those receptive to 
it anyway, which is a very small proportion of the programmers 
many people might know in real life.  The beauty of being the 
challenger is you can keep growing by persuading only a small 
proportion of people who were already poised on the edge or would 
be if they knew of D.


Yes - I agree that delivering value speaks the loudest.  But of 
course in a competitive market it's not necessarily going to be 
something people discuss.  It's outside the reality of many 
others, what can be achieved with D, and at the same time you 
don't necessarily want to actually make it vivid to your 
competitors how they could do what you did.


I think also that enthusiasm and working code might be more 
effective than logic and feature comparison.


The biggest asset the D community has might be the calibre of 
people that are drawn to it and that stick with it...





Re: My Android project nearing beta

2020-01-06 Thread Laeeth Isharc via Digitalmars-d-announce

On Monday, 6 January 2020 at 14:37:54 UTC, Adam D. Ruppe wrote:

On Sunday, 5 January 2020 at 03:56:37 UTC, visitor wrote:

Not a single line of java!


so i got kinda excited for creating a class 100% in D as well, 
but.


https://developer.android.com/training/articles/perf-jni.html

"DefineClass is not implemented. Android does not use Java 
bytecodes or class files, so passing in binary class data 
doesn't work."




I haven't tried, but:

https://github.com/linkedin/dexmaker


Re: FeedSpot Recognizes the GtkDcoding Blog

2020-02-08 Thread Laeeth Isharc via Digitalmars-d-announce

On Friday, 7 February 2020 at 16:00:07 UTC, bachmeier wrote:

On Friday, 7 February 2020 at 15:05:13 UTC, Russel Winder wrote:
True companies have convinced themselves that only licences 
that allow stealing of others' intellectual work are 
acceptable to business, but then that is the point, they can 
steal the intellectual work with impugnity.


A rant of my own:

The push against the GPL is mostly by those who want free 
software to mean "free labor". GPL software can be dual 
licensed. Companies can pay for an alternative licensing 
arrangement if it's that valuable to them. Instead they want 
"free" software that allows them to avoid payment while 
imposing restrictions on how others use the software.


How do you pay for an alternative licensing arrangement when 
there are a gazillion contributors some of whom are untraceable 
and when in practical terms any one of those saying no might make 
it in practical terms impossible? Software can be dual licensed, 
but it often isn't, particularly with community developed 
software.


Most software is internal software I think.  But a company needs 
to make decisions strategically in the face of uncertainty.  
Suppose you are considering a library for internal use and not 
planning to redistribute.  But business is uncertain.  Maybe it 
could be you want to redistribute your software to a future 
partner.  Now if you use a viral license library that doesn't 
give you an option to pay for it then you are shutting off that 
option.





Talk before Compiler Research Group at IRIS-HEP Princeton on SIL-cling

2021-02-23 Thread Laeeth Isharc via Digitalmars-d-announce

https://youtu.be/7teqrCNzrD8

https://t.co/2iAWdO9cXA

Alexandru Militaru speaks to Compiler Research Group, IRIS-HEP at 
Princeton about his work at @SymmetryInvest  using CERN's cling 
to compile and call C++ from our internal domain specific 
language, SIL.


#dlang #cling


Semi - OT: LLVM blog on calling most of C++ from a DSL written in D

2021-03-27 Thread Laeeth Isharc via Digitalmars-d-announce

https://blog.llvm.org/posts/2021-03-25-cling-beyond-just-interpreting-cpp/


New beginnings - looking for part-time D programming help

2023-03-23 Thread Laeeth Isharc via Digitalmars-d-announce

Hi.

For those that didn't hear, I resigned from Symmetry in September 
and my last day was a couple of weeks back.


I don't have any concrete plans yet, but I've agreed not to do 
anything in the hedge fund world for quite some time and I've 
also agreed not to hire anyone that's an employee or consultant 
for Symmetry.


Out of little acorns do great oaks grow and the best beginnings 
are often not much, just a little hobby project.  I sat down in 
early 2014 and wrote down what I called hedge fund in a box - 
what are the things I am going to need to build so I never have 
to worry about them again.  Not always quite in that form, but 
it's remarkable how many of those little beginnings ended up 
coming to fruition in what was an 11bn hedge fund by the time I 
left.


With that said for now I don't have much, just a few ideas about 
how to solve some of my own problems, knowing there's just a 
chance they might be useful down the line to others.


I'm paying out of my own pocket and my budget is modest for now 
so this isn't going to be an opportunity interesting for someone 
currently embedded in big tech !


You can speak to some of the people I hired at Symmetry - if this 
ever becomes anything then I will pay well to very well over 
time.  But you shouldn't bet on it becoming anything at all.  If 
you do good work but nothing comes of it and you're interested in 
getting a job in finance I can help you navigate that world and 
the experience may help you achieve your goals.  But I am not 
sure I would recommend most jobs in finance.


What kind of work?  Initially some scripting in D to integrate 
things and a little bit of work with LLM embeddings and fine 
tuning, STT transcription, classifiers, parsing.  Some 
presentation work - gui or web I don't mind.


What kind of person?  You need to be a talented hacker that's 
interested in learning and accomplishing things.  You don't need 
an impressive CV - my best documentation Dev hire was a Spanish 
baker with no enterprise experience.  (Just the kernel, lol).


What's the vision?  Well I will say more when I can but how 
people do work today in organisations is broken and it's 
miserable and I would like to play a part in transforming that.


Full remote is ideal as I live on an island.  If you happen to 
live near Rennes, Saint Malo or Amsterdam then it's easier for me 
to visit you.


Let me know any questions.


laeeth+reboot at laeeth.com





porting nanomsg bindings to dlang

2014-11-05 Thread Laeeth Isharc via Digitalmars-d-announce

Hi.

Everyone has heard of ZeroMQ, but the creator (or one of the main 
guys) has been working on a successor framework written in C.  
(He has an interesting paper on why using C++ was a mistake - 
perhaps we should get him to look at D if he has not done so 
already).


In any case, I could not see a set of D bindings so I wrote a 
very rough first draft of them last night.  I only picked up D a 
couple of months back, and it's been about twenty years since I 
wrote much C (I am not a developer by trade), so be kind if the 
results are not yet quite up to scratch.


Link to the repository is here - not even worthy of alpha status:
https://github.com/Laeeth/d-nanomsg/tree/master

So far I have tried the first example from here (which works), 
and am working my way down to test the others:


http://tim.dysinger.net/posts/2013-09-16-getting-started-with-nanomsg.html



porting nanomsg bindings to dlang

2014-11-05 Thread Laeeth Isharc via Digitalmars-d-announce

examples here all work:
https://github.com/dysinger/nanomsg-examples/blob/master/README.org

but I have not tried any larger projects.



Re: porting nanomsg bindings to dlang

2014-11-05 Thread Laeeth Isharc via Digitalmars-d-announce

Thanks.

I am slowly getting to grips with all these post-stone age 
innovations...


On Wednesday, 5 November 2014 at 20:24:41 UTC, Matt Soucy wrote:

On 11/05/2014 01:12 PM, Laeeth Isharc wrote:

Hi.

Everyone has heard of ZeroMQ, but the creator (or one of the 
main guys) has been working on a successor framework written 
in C.  (He has an interesting paper on why using C++ was a 
mistake - perhaps we should get him to look at D if he has not 
done so already).


In any case, I could not see a set of D bindings so I wrote a 
very rough first draft of them last night.  I only picked up D 
a couple of months back, and it's been about twenty years 
since I wrote much C (I am not a developer by trade), so be 
kind if the results are not yet quite up to scratch.


Link to the repository is here - not even worthy of alpha 
status:

https://github.com/Laeeth/d-nanomsg/tree/master

So far I have tried the first example from here (which works), 
and am working my way down to test the others:


http://tim.dysinger.net/posts/2013-09-16-getting-started-with-nanomsg.html



A few small suggestions:

Use a .gitignore so you're not tracking the objects and 
executables
Convert to a dub package to make it easier for other people to 
incorporate into their projects

Split out the "test" code from the "library" code




Project to port Bloomberg API to D

2014-11-09 Thread Laeeth Isharc via Digitalmars-d-announce

About Bloomberg
--
Bloomberg provides a platform for market data, news, analytics, 
and messaging to financial services firms and other organisations 
with an interest in markets.  There are some interesting 
developments on the horizon but, for the time being, for 
investment banks and hedge funds it remains the standard platform 
for such.


Their API is public, and they provide implementations for C++, C, 
Python, Java, and .Net amongst others.


Interesting for D?
--
The financial services space might be an interesting domain for D 
because it's an economically important area where performance, 
safety and productivity all matter, and none of the existing 
solutions (mostly C, C++, Java, Python) are particularly 
satisfactory. At the same time, people in finance do not tend to 
be in the business of taking big technology risks with a product 
not yet widely seen as industry standard because the costs of 
messing up may be especially high (and messing up for creative 
reasons is much less acceptable than if you follow the herd).


Perhaps in the face of new emerging realities regarding data set 
sizes, memory speed, and single core processing power that 
creates opportunity for more entrepreneurial participants to use 
the best tool for the job.  I certainly hope so.


People often want to see results quickly, so even if it's not 
really much work to do the port, there might be a big difference 
in the chance someone might consider trying (and then learning to 
appreciate) D.


Beyond a mature numpy/pandas equivalent, the other missing piece 
is an analytical library for derivative pricing and risk 
management.  QuantLib is the main open source project - it is 
written in C++ but has D SWIG wrappers.  (There is the Java 
Opengamma too, but I am not so familiar with it).  SWIG is not 
great though, and I don't think the wrappers cover all the 
functionality.  (There was a project to port QuantLib to D but I 
am not sure it ever got started, and it is now defunct).


It is super appealing to be able to rapidly prototype and explore 
ideas about largeish data sets and have the results be fast, 
knowing also that the code one has written can serve as the basis 
for something used in production (thanks to strong typing, 
elegant language design, etc).  So I think there is a chance for 
D to take off within finance for some uses.




Project status
--
So for my own purposes - but I hope they might benefit others - I 
have ported the C headers and C examples to D.  It's pre-alpha 
status - everything compiles, but I need to start up a Windows 
machine with Bloomberg to get it linking and get any bugs out of 
the port.


I thought of holding back posting till they were perfect, but 
decided to just post what I have in case anyone else should have 
an interest.  It may be that the C++ headers create a more 
appealing interface, but I do not know the current status of C++ 
vs D interface as the dlang.org docs are stale.  For the time 
being the examples are just an ugly direct translation, with lots 
of casts and not much attention paid to beauty and elegance.  But 
it's something, and a start.



Link

https://github.com/Laeeth/d-bloombergapi



Laeeth.


Quandl API ported to D

2014-12-10 Thread Laeeth Isharc via Digitalmars-d-announce
Embarassingly trivial, and I don't claim it is well-written.  But 
perhaps it will save somebody a few minutes.


Quandl is "The largest, most usable collection of free open data 
in the world".


They offer a bunch of predominantly financial and economic data 
from different sources for free (with a pretty generous API 
allowance) and plan to earn a buck down the line selling 
commercial data and being a platform for distribution.  Given the 
situation with Bloomberg (the banks are not terribly happy 
following the JPM whale/Bloomberg journalism revelations) and 
structural change in the market for data, this is an intriguing 
platform.


In any case, I ported the sample C++ API to D, which was more a 
question of deleting redundant lines and using std.net.curl then 
anything else.  Perhaps someone will find it useful.


https://github.com/Laeeth/d-quandl



Laeeth.


Re: Quandl API ported to D

2014-12-11 Thread Laeeth Isharc via Digitalmars-d-announce
On Thursday, 11 December 2014 at 10:26:47 UTC, Gary Willoughby 
wrote:
On Thursday, 11 December 2014 at 01:25:32 UTC, Laeeth Isharc 
wrote:
Embarassingly trivial, and I don't claim it is well-written.  
But perhaps it will save somebody a few minutes.


Quandl is "The largest, most usable collection of free open 
data in the world".


They offer a bunch of predominantly financial and economic 
data from different sources for free (with a pretty generous 
API allowance) and plan to earn a buck down the line selling 
commercial data and being a platform for distribution.  Given 
the situation with Bloomberg (the banks are not terribly happy 
following the JPM whale/Bloomberg journalism revelations) and 
structural change in the market for data, this is an 
intriguing platform.


In any case, I ported the sample C++ API to D, which was more 
a question of deleting redundant lines and using std.net.curl 
then anything else.  Perhaps someone will find it useful.


https://github.com/Laeeth/d-quandl



Laeeth.


Interesting. Why not also add it to the dub registry?

http://code.dlang.org/

You can find more information here: http://code.dlang.org/about
and more about the package format here: 
http://code.dlang.org/package-format


Thanks for the suggestion.  I hope to do so when a bit more time 
(I am still not yet that comfortable with dub myself).


Laeeth.


HDF5 bindings for D

2014-12-21 Thread Laeeth Isharc via Digitalmars-d-announce

https://github.com/Laeeth/d_hdf5

HDF5 is a very valuable tool for those working with large data 
sets.


From HDF5group.org

HDF5 is a unique technology suite that makes possible the 
management of extremely large and complex data collections. The 
HDF5 technology suite includes:


* A versatile data model that can represent very complex data 
objects and a wide variety of metadata.
* A completely portable file format with no limit on the number 
or size of data objects in the collection.
* A software library that runs on a range of computational 
platforms, from laptops to massively parallel systems, and 
implements a high-level API with C, C++, Fortran 90, and Java 
interfaces.
* A rich set of integrated performance features that allow for 
access time and storage space optimizations.
* Tools and applications for managing, manipulating, viewing, and 
analyzing the data in the collection.
* The HDF5 data model, file format, API, library, and tools are 
open and distributed without charge.


From h5py.org:
[HDF5] lets you store huge amounts of numerical data, and easily 
manipulate that data from NumPy. For example, you can slice into 
multi-terabyte datasets stored on disk, as if they were real 
NumPy arrays. Thousands of datasets can be stored in a single 
file, categorized and tagged however you want.


H5py uses straightforward NumPy and Python metaphors, like 
dictionary and NumPy array syntax. For example, you can iterate 
over datasets in a file, or check out the .shape or .dtype 
attributes of datasets. You don't need to know anything special 
about HDF5 to get started.


In addition to the easy-to-use high level interface, h5py rests 
on a object-oriented Cython wrapping of the HDF5 C API. Almost 
anything you can do from C in HDF5, you can do from h5py.


Best of all, the files you create are in a widely-used standard 
binary format, which you can exchange with other people, 
including those who use programs like IDL and MATLAB.


===
As far as I know there has not really been a complete set of HDF5 
bindings for D yet.


Bindings should have three levels:
1. pure C API declaration
2. 'nice' D wrapper around C API (eg that knows about strings, 
not just char*)

3. idiomatic D interface that uses CTFE/templates

I borrowed Stefan Frijter's work on (1) above to get started.  I 
cannot keep track of things when split over too many source 
files, so I put everything in one file - hdf5.d.


Have implemented a basic version of 2.  Includes throwOnError 
rather than forcing checking status C style, but the exception 
code is not very good/complete (time + lack of experience with D 
exceptions).


(3) will have to come later.

It's more or less complete, and the examples I have translated so 
far mostly work.  But still a work in progress.  Any 
help/suggestions appreciated.  [I am doing this for myself, so 
project is not as pretty as I would like in an ideal world].



https://github.com/Laeeth/d_hdf5


Re: HDF5 bindings for D

2014-12-22 Thread Laeeth Isharc via Digitalmars-d-announce
On Monday, 22 December 2014 at 05:04:10 UTC, Rikki Cattermole 
wrote:
You seem to be missing your dub file. Would be rather hard to 
get it onto dub repository without it ;)
Oh and keep the bindings separate from wrappers in terms of 
subpackages.


Thanks - added now.

Will work on separating out bindings when have a bit more time, 
but it should be easy enough.


Swiss Ephemeris / Nelder-Mead simplex

2014-12-22 Thread Laeeth Isharc via Digitalmars-d-announce
Last one for a while, I think.  I wish you all a very peaceful 
Christmas and New Year, and let's hope 2015 brings some more 
positive energy to the world.


Links here:
https://github.com/Laeeth/d_simplex
https://github.com/Laeeth/d_swisseph



1. D bindings/wrappers for the swiss ephemeris

http://www.astro.com/swisseph/swephinfo_e.htm
"The SWISS EPHEMERIS is the high precision ephemeris developed by 
Astrodienst, largely based upon the DExxx ephemerides from NASA's 
JPL . The original release in 1997 was based on the DE405/406 
ephemeris. Since release 2.00 in February 2014, it is based on 
the DE431 ephemeris released by JPL in September 2013".


NB - Swiss Ephemeris is not free for commercial use.

2. D port of simple Nelder-Mead simplex minimisation (written by 
Michael F. Hutt in original C version) here.  With constraints.  
From Wiki:


https://en.wikipedia.org/wiki/Nelder-Mead_method
"The Nelder–Mead method or downhill simplex method or amoeba 
method is a commonly used nonlinear optimization technique, which 
is a well-defined numerical method for problems for which 
derivatives may not be known. However, the Nelder–Mead technique 
is a heuristic search method that can converge to non-stationary 
points[1] on problems that can be solved by alternative methods".



Links here:
https://github.com/Laeeth/d_simplex
https://github.com/Laeeth/d_swisseph


Re: Swiss Ephemeris / Nelder-Mead simplex

2014-12-22 Thread Laeeth Isharc via Digitalmars-d-announce

On Monday, 22 December 2014 at 21:39:08 UTC, Marc Schütz wrote:

On Monday, 22 December 2014 at 20:46:23 UTC, bachmeier wrote:
It's been ages since I read the paper, but there is a parallel 
version of Nelder-Mead that is supposed to give very large 
performance improvements, even when used on a single processor:


http://www.cs.ucsb.edu/~kyleklein/publications/neldermead.pdf

It is not difficult to implement. I may look into modifying 
your code to implement it when I get some time.


It will certainly also be advantageous to pass the functions as 
aliases, so that they can get inlined.


Thanks, Marc.  I appreciate the pointer, and if you do have time 
to look at the code.  I confess that it can't really be called my 
own implementation as I simply ported it to D.  There is some 
more clever stuff within quantlib (c++ project), but I quite 
liked the idea of starting with this one as it is simple, and 
speed is not yet vital at this stage.



Laeeth.



Re: D is one if Wired's 10 Most Hardcore Tech Stories of 2014

2014-12-27 Thread Laeeth Isharc via Digitalmars-d-announce
On Saturday, 27 December 2014 at 11:15:11 UTC, Walter Bright 
wrote:

On 12/26/2014 10:25 PM, Walter Bright wrote:

http://www.wired.com/2014/12/wired-enterprise-year/


https://www.reddit.com/r/programming/comments/2qioj8/dlang_story_makes_wireds_10_most_hardcore_tech/


Congratulations, Walter.  It's very satifying to see emerging 
mainstream recognition of something so solid and whose advantages 
are based in real advantages rather than marketing hype.


I am personally very glad you decided on 'retirement' that you 
were not after all the daytime TV kind of guy, and I wanted to 
thank you for everything you have contributed to D and its users.


I wish you a great start to the new year.


Laeeth.



d_etpan: project to write bindings and wrappers for the libetpan email / IMAP library

2014-12-31 Thread Laeeth Isharc via Digitalmars-d-announce

https://github.com/Laeeth/d_etpan

http://www.etpan.org/libetpan.html
https://github.com/dinhviethoa/libetpan

LibEtPan

The purpose of this mail library is to provide a portable, 
efficient framework for different kinds of mail access: IMAP, 
SMTP, POP and NNTP.


It provides an API for C language.

Who uses LibEtPan?

Almost all email app in Mac and iOS AppStore: see Mailcore
Cisco Mobile for iPhone
Claws Mail
Filemaker Pro
Google Apps Migration for Microsoft Exchange
Playstation Vita Email Application
reMail (Acquired by Google in 2010)
Sparrow (Acquired by Google in 2012)

Status
==
Pre-alpha bindings only.  They compile without errors, but 
probably need some fixes and some key functions missing.  I have 
not yet finished porting the demos.


Later when time I will add D style wrappers.


Bindings for libmRSS: for parsing, writing and creating RSS/ATOM files or streams.

2015-01-04 Thread Laeeth Isharc via Digitalmars-d-announce

https://github.com/Laeeth/d_rss/

d_rss: D Programming Language bindings for libmRSS.
http://www.autistici.org/bakunin/libmrss/doc/

mRss is a C library written by Andrea Marchesini for parsing, 
writing and

creating RSS/ATOM files or streams.

This library supports:

RSS 0.91 - 
http://my.netscape.com/publish/formats/rss-spec-0.91.html

RSS 0.92 - http://backend.userland.com/rss092
RSS 1.0 - http://web.resource.org/rss/1.0/
RSS 2.0 - http://www.rssboard.org/rss-specification
ATOM 0.3 - 
http://www.mnot.net/drafts/draft-nottingham-atom-format-02.html

ATOM 1.0 - http://tools.ietf.org/html/rfc4287


Re: DMD's lexer available on code.dlang.org

2015-01-04 Thread Laeeth Isharc via Digitalmars-d-announce
I've created a dub package for the D version of DMD's lexer, 
generated automatically from the C++ source.


very cool.

on a related note, have you considered sharing your translation 
tool (c++ -> D)?  I completely understand if you would rather not 
of course.




Laeeth.


Re: DMD's lexer available on code.dlang.org

2015-01-04 Thread Laeeth Isharc via Digitalmars-d-announce

On Monday, 5 January 2015 at 02:51:17 UTC, Daniel Murphy wrote:
"Laeeth Isharc"  wrote in message 
news:yzmwemaevaltcmkyw...@forum.dlang.org...


on a related note, have you considered sharing your 
translation tool (c++ -> D)?  I completely understand if you 
would rather not of course.


The translation tool is available on github and is boost 
licensed.


This pull request contains the latest version in src/magicport 
- https://github.com/D-Programming-Language/dmd/pull/3410


Please keep in mind that the tool makes a lot of assumptions 
about the C++ source that may not be valid for projects other 
than dmd.  It's fairly easy to adapt to other projects, but it 
won't work on them out of the box.


Thanks v much - this will be very helpful indeed.



Re: I'll be presenting at NWCPP on Jan 21 at Microsoft

2015-01-05 Thread Laeeth Isharc via Digitalmars-d-announce

On Monday, 5 January 2015 at 07:46:20 UTC, Walter Bright wrote:

http://nwcpp.org/

All are invited.

Now I just have to write the presentation :-(


Congratulations.  I hope the talk goes well.

Will audio be available afterwards?

At a slight tangent, has anything more recent been written on the 
C++ interface?  I understand it is more complete than what is 
described on the Wiki/at dlang.org and have not been able to find 
a write-up of this.



Thanks.


Laeeth.





Re: I'll be presenting at NWCPP on Jan 21 at Microsoft

2015-01-06 Thread Laeeth Isharc via Digitalmars-d-announce

On Monday, 5 January 2015 at 21:07:04 UTC, Walter Bright wrote:

On 1/5/2015 5:31 AM, Laeeth Isharc wrote:

Will audio be available afterwards?


NWCPP usually will post the video afterwards.


At a slight tangent, has anything more recent been written on 
the C++
interface?  I understand it is more complete than what is 
described on the
Wiki/at dlang.org and have not been able to find a write-up of 
this.


Sorry, nothing yet. It's a work in progress.


Thanks, Walter.


D bindings and high level wrapper for systemd journal

2015-01-06 Thread Laeeth Isharc via Digitalmars-d-announce
D Language bindings and high level wrapper for the systemd 
journal logging service (journalctl)


https://github.com/Laeeth/d_sysdlog

alpha status

rather than grep /var/log/messages, systemd interface makes it 
easy to filter by field and period of interest. metadata is 
stored along with regular log messages, which reduces the ability 
of bad actors to spoof logs


Link to C API here: 
http://www.freedesktop.org/software/systemd/man/sd-journal.html


Description

systemd-journald is a system service that collects and stores 
logging data. It creates and maintains structured, indexed 
journals based on logging information that is received from a 
variety of sources:


Kernel log messages, via kmsg

Simple system log messages, via the libc syslog(3) call

Structured system log messages via the native Journal API, see 
sd_journal_print(4)


Standard output and standard error of system services

Audit records, via the audit subsystem
The daemon will implicitly collect numerous metadata fields for 
each log messages in a secure and unfakeable way. See 
systemd.journal-fields(7) for more information about the 
collected metadata.


Log data collected by the journal is primarily text-based but can 
also include binary data where necessary. All objects stored in 
the journal can be up to 2^64-1 bytes in size.


Re: Binutils 2.25 Released - New D demangling support

2015-01-20 Thread Laeeth Isharc via Digitalmars-d-announce

How do I get it?
---

The release itself is a source package, however a safer choice 
is to get the release binaries through your Linux distributor.  
Fortunately, there have been distributions who have been 
shipping it as early as three weeks ago.


In case it saves someone else a few minutes: for Fedora 21 (and 
probably others).  (At your own risk if new version of binutils 
breaks something else).


yum install fedora-repos-rawhide
yum install binutils --enablerepo rawhide
objdump -v


Re: Binutils 2.25 Released - New D demangling support

2015-01-20 Thread Laeeth Isharc via Digitalmars-d-announce

yum install fedora-repos-rawhide
yum install binutils --enablerepo rawhide
objdump -v


sorry.  should be:

yum install fedora-release-rawhide
yum install binutils --enablerepo rawhide
objdump -v


Re: New D tutorial found, with broken web compilation

2015-01-26 Thread Laeeth Isharc via Digitalmars-d-announce

I sent your post to them:
 Address: 388-A , Road no 22, Jubilee Hills, Hyderabad AP, 
INDIA-500033


 Email: cont...@tutorialspoint.com

 Website: www.tutorialspoint.com


On Monday, 26 January 2015 at 18:12:59 UTC, Carl Sturtivant wrote:


Go to
http://www.tutorialspoint.com/d_programming/d_programming_environment.htm

and click "Try It!" on the upper right hand corner of the 
sample code to compile it. Their D compiler installation is 
defective. The same is true for all such in that tutorial that 
I tried. I am also posting this to dlang.org as they ignored my 
earlier attempt to communicate about this. Here's what happens 
in the browser. Maybe someone else can get through to them.


Compiling the source code
$dmd -I./ main.d -ofdemo.amx 2>&1

Error: cannot find source code for runtime library file 
'object.d'
   dmd might not be correctly installed. Run 'dmd -man' for 
installation instructions.

import path[0] = ./
import path[1] = /usr/local/dmd2/druntime/import
import path[2] = /usr/local/dmd2/phobos
import path[3] = /usr/bin/../../src/phobos
import path[4] = /usr/bin/../../src/druntime/import




Re: Calypso: Direct and full interfacing to C++

2015-01-29 Thread Laeeth Isharc via Digitalmars-d-announce

On Saturday, 24 January 2015 at 00:51:49 UTC, Elie Morisse wrote:
Nevermind it's just that CodeGen is ambiguous with 
clang::CodeGen although my compiler doesn't complain. Fixed.


Hi Elie.

We are really excited about your project, as it really opens up 
new possibilities and will certainly save many months of time.


I have struggled with building Calypso and tried various 
different recent release versions of clang to no avail.  
(LDC/LLVM/clang build without problem).  I will post build errors 
shortly


Would there be any chance you could fork a version of clang that 
works with Calypso, and then link to it in the instructions?


Later it might also be worth using the D port of the dlang 
update.sh tool that I wrote so one can automate the process of 
downloading and building the various different pieces.  So many 
moving parts that it is easy for something to break.




Laeeth.


Re: London D Programmers MeetUp

2015-02-04 Thread Laeeth Isharc via Digitalmars-d-announce
Thank you, Kingsley, for a very well organized and 
thought-through event.  I was impressed by the calibre of people 
that attended, and look forward to attending future meetups.


Re: London D Programmers MeetUp

2015-02-04 Thread Laeeth Isharc via Digitalmars-d-announce
One interesting anecdote: somebody in a financial services 
company gave an account of giving D a try as a way to prototype 
something quickly, intending to rewrite it later in a more 
conventional language.  The prototype went straight into 
production, and they are happy with it.  The C interop was 
important for them to have made this possible.


It was interesting, because it is a serious company where people 
don't by any means have a hacker mentality, and it was one more 
point at variance with the "I am a java programmer but do all my 
personal projects in D" narrative, and also because this 
particular kind of company is exactly the sort of second wave 
early adopter one wants to have.


(I hope I represented this accurately, and tried to make this as 
vague as possible whilst still keeping it useful since people 
might not want the details of what they do being public).


Re: London D Programmers MeetUp

2015-02-05 Thread Laeeth Isharc via Digitalmars-d-announce

On Thursday, 5 February 2015 at 12:06:31 UTC, Russel Winder wrote:
On Wed, 2015-02-04 at 21:35 +, Iain Buclaw via 
Digitalmars-d-announce wrote:

[…]

That pretty much sums up my understanding of it too.


I recollect the "banter" including (paraphrased): "if the 
prototype

works, just put it into production, it's standard practice."


Shhh...  We have investors to keep happy.


Re: London D Programmers MeetUp

2015-02-05 Thread Laeeth Isharc via Digitalmars-d-announce

On Thursday, 5 February 2015 at 20:40:52 UTC, Laeeth Isharc wrote:
On Thursday, 5 February 2015 at 12:06:31 UTC, Russel Winder 
wrote:
On Wed, 2015-02-04 at 21:35 +, Iain Buclaw via 
Digitalmars-d-announce wrote:

[…]

That pretty much sums up my understanding of it too.


I recollect the "banter" including (paraphrased): "if the 
prototype

works, just put it into production, it's standard practice."


Shhh...  We have investors to keep happy.


half-jest


Re: London D Programmers MeetUp

2015-02-12 Thread Laeeth Isharc via Digitalmars-d-announce
On Wednesday, 11 February 2015 at 22:28:03 UTC, Walter Bright 
wrote:

On 2/4/2015 1:17 PM, Laeeth Isharc wrote:
One interesting anecdote: somebody in a financial services 
company gave an
account of giving D a try as a way to prototype something 
quickly, intending to
rewrite it later in a more conventional language.  The 
prototype went straight
into production, and they are happy with it.  The C interop 
was important for

them to have made this possible.

It was interesting, because it is a serious company where 
people don't by any
means have a hacker mentality, and it was one more point at 
variance with the "I
am a java programmer but do all my personal projects in D" 
narrative, and also
because this particular kind of company is exactly the sort of 
second wave early

adopter one wants to have.

(I hope I represented this accurately, and tried to make this 
as vague as
possible whilst still keeping it useful since people might not 
want the details

of what they do being public).


I'd like to invite this fellow to propose a case study 
presentation at Dconf 2015. Can someone please forward this to 
him, or put him in contact with myself or Andrei?


I will dig his card out unless Kingsley gets there first.  (Let 
me know if so).  Laeeth


Re: London D Programmers MeetUp

2015-02-13 Thread Laeeth Isharc via Digitalmars-d-announce

done.  and gave him headsup too.  is your email no
spam
o
n
e
at yourfullname.com ?

if not what should the first part be?  or you can email me at 
myfirstn...@myfirstname.com



On Friday, 13 February 2015 at 07:31:52 UTC, Laeeth Isharc wrote:
On Wednesday, 11 February 2015 at 22:28:03 UTC, Walter Bright 
wrote:

On 2/4/2015 1:17 PM, Laeeth Isharc wrote:
One interesting anecdote: somebody in a financial services 
company gave an
account of giving D a try as a way to prototype something 
quickly, intending to
rewrite it later in a more conventional language.  The 
prototype went straight
into production, and they are happy with it.  The C interop 
was important for

them to have made this possible.

It was interesting, because it is a serious company where 
people don't by any
means have a hacker mentality, and it was one more point at 
variance with the "I
am a java programmer but do all my personal projects in D" 
narrative, and also
because this particular kind of company is exactly the sort 
of second wave early

adopter one wants to have.

(I hope I represented this accurately, and tried to make this 
as vague as
possible whilst still keeping it useful since people might 
not want the details

of what they do being public).


I'd like to invite this fellow to propose a case study 
presentation at Dconf 2015. Can someone please forward this to 
him, or put him in contact with myself or Andrei?


I will dig his card out unless Kingsley gets there first.  (Let 
me know if so).  Laeeth




Re: Alexa Skill written in D

2017-02-11 Thread Laeeth Isharc via Digitalmars-d-announce

On Wednesday, 11 January 2017 at 12:16:06 UTC, extrawurst wrote:
On Tuesday, 10 January 2017 at 11:46:22 UTC, Laeeth Isharc 
wrote:

On Saturday, 7 January 2017 at 13:17:35 UTC, extrawurst wrote:


Thank you for doing this - really happy about it.  A perfect 
open source moment - I was wondering about how to go about 
getting Alexa working.  But I had shared the AWS Lambda stuff 
which proved useful for you, and now you solved the problem 
for me and helped others on top.



Laeeth.


Hi Laeeth, thanks again for your post about aws lambda + D - 
wouldn't have thought about this whole thing otherwise.


I wanted to ask you if you thought about using another platform 
but nodejs wrap the D exe in lambda. They support java and C# 
aswell. I was wondering if it is a performance difference to 
use them instead ?!

Looking forward to your input.

Cheers,
Stephan


Hi Stephan.

I think at the time C# was not possible, and not sure if java 
was.  I don't know those languages so well, but if someone would 
like to try and see if it makes a difference, I would be happy to 
grant them rights to co-maintain the repo and add those as 
options.


If I recall right, there shouldn't be a performance difference - 
just a question of latency to start.  Will Java or C# be better 
in those respects given time needed to start the VM?



Laeeth.



Re: DConf 2017 Hotel - book now!

2017-03-20 Thread Laeeth Isharc via Digitalmars-d-announce
On Thursday, 16 March 2017 at 19:35:31 UTC, Steven Schveighoffer 
wrote:

On 3/14/17 12:39 PM, Bastiaan Veelo wrote:
On Saturday, 4 March 2017 at 20:08:39 UTC, Vladimir Panteleev 
wrote:
On Thursday, 2 March 2017 at 02:24:50 UTC, Walter Bright 
wrote:

http://www.ibis.com/gb/hotel-5694-ibis-berlin-neukoelln/index.shtml

Last year, some people booked late and it was full and they 
had to

stay at another hotel.


Aaand it's sold out. 2 months before the conference. Wow :)


I just booked Erlanger Hof. It too is filling up fast.


That was booked when I tried. Anyone else staying at the Hotel 
Ludwig Van Beethoven (just booked that one)?


-Steve


I'm there too.  Laeeth.


Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-20 Thread Laeeth Isharc via Digitalmars-d-announce
On Tuesday, 21 March 2017 at 00:25:46 UTC, Steven Schveighoffer 
wrote:

On 3/20/17 4:09 PM, Atila Neves wrote:

http://code.dlang.org/packages/excel-d

This dub package allows D code to be called from Excel. It uses
compile-time reflection to register the user's code in an XLL 
(a DLL
loaded by Excel) so no boilerplate is necessary. Not even 
`DllMain`! It

works like this:


If I wanted to replace our horrifying web queries from Excel 
with this, I'm assuming I could? That would be awesome.


-Steve


Yes - you could, provided the function is nogc.  Have done some 
work on using std.experimental.allocator (well I had a working 
version, but was trimmed a bit), and will publish a revised 
version when we get time, but it wouldn't be hard to add directly 
yourself.  PRs welcome.  If you allocate memory just make sure 
that you hook into  the xlautofree callback (or whatever it's 
called - long time since I touched this) to free it.


I try to keep the excel functions as simple as possible, because 
I don't want to crash a trader's spreadsheet.  So we end up with 
a little local server running as a windows service that does the 
work.  (We use nanomsg tcp/ip on localhost as struggled with IPC 
on windows, but you could talk to it however is convenient).


Look forward to catching up at dconf in Berlin.  Atila will be 
there too (and Stefan of course).  I'm staying at the Beethoven 
too.



Laeeth.


Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-20 Thread Laeeth Isharc via Digitalmars-d-announce

On Monday, 20 March 2017 at 20:32:20 UTC, Stefan Koch wrote:

On Monday, 20 March 2017 at 20:09:58 UTC, Atila Neves wrote:

http://code.dlang.org/packages/excel-d

This dub package allows D code to be called from Excel. It 
uses compile-time reflection to register the user's code in an 
XLL (a DLL loaded by Excel) so no boilerplate is necessary. 
Not even `DllMain`! It works like this:


[...]


Ah Interesting to see how this turned out.


Thanks for your help on this, Stefan.  I'll publish Bloomberg API 
too when we have had time to tidy it up a bit more.


Reddit link here:

https://www.reddit.com/r/programming/comments/60koa6/dlang_wrapper_to_write_excel_functions_ctfe_magic/


Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-20 Thread Laeeth Isharc via Digitalmars-d-announce
On Tuesday, 21 March 2017 at 00:25:46 UTC, Steven Schveighoffer 
wrote:

On 3/20/17 4:09 PM, Atila Neves wrote:

http://code.dlang.org/packages/excel-d

This dub package allows D code to be called from Excel. It uses
compile-time reflection to register the user's code in an XLL 
(a DLL
loaded by Excel) so no boilerplate is necessary. Not even 
`DllMain`! It

works like this:


If I wanted to replace our horrifying web queries from Excel 
with this, I'm assuming I could? That would be awesome.


-Steve


so calling curl c bindings should definitely work, or there might 
be some nogc curl type library on code.dlang.org.





Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-21 Thread Laeeth Isharc via Digitalmars-d-announce

On Tuesday, 21 March 2017 at 13:59:56 UTC, Jacob Carlborg wrote:

On 2017-03-20 21:09, Atila Neves wrote:

http://code.dlang.org/packages/excel-d

This dub package allows D code to be called from Excel. It uses
compile-time reflection to register the user's code in an XLL 
(a DLL
loaded by Excel) so no boilerplate is necessary. Not even 
`DllMain`! It

works like this:


It's cool that this is possible to do in D, but I feel sorry 
for anyone that has a reason :)


It's the current year, but for the time being for many 
practitioners in the investment world there is no better 
alternative to using a spreadsheet as one window onto server side 
processes used for certain things.  Not the only window.  I'd 
personally be thrilled to say goodbye both to spreadsheets and to 
Windows, but one also has to be somewhat pragmatic.


And actually it's by far better to be able to write things for 
spreadsheets in D quickly versus the conceivable alternatives...!





Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-22 Thread Laeeth Isharc via Digitalmars-d-announce

On Wednesday, 22 March 2017 at 02:30:50 UTC, Saurabh Das wrote:

On Monday, 20 March 2017 at 20:09:58 UTC, Atila Neves wrote:

http://code.dlang.org/packages/excel-d

This dub package allows D code to be called from Excel. It 
uses compile-time reflection to register the user's code in an 
XLL (a DLL loaded by Excel) so no boilerplate is necessary. 
Not even `DllMain`! It works like this:


[...]


This is too good. We already use a cobbled-together Excel 
runner type thing. It will be so much better to use excel-d.


Thanks so much Atila!


Glad it's helpful.  Pull requests welcomed :)




Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-04-24 Thread Laeeth Isharc via Digitalmars-d-announce

On Monday, 24 April 2017 at 21:59:34 UTC, Atila Neves wrote:

Now with more `@nogc`. Before, this worked fine:

double func(double d) @nogc nothrow { return d * 2; }

The function is `@nogc`, the wrapper function (i.e. the 
function that Excel actually calls) is also `@nogc` via the 
magic of compile-time reflection. So far, so good. But what if 
you want to return a string or an array back to Excel. Oh, oh...


Enter the `@Dispose` UDA:

And Bob's your uncle.

Atila


Very nice.
On reddit here since it's a pretty nice example of how you don't 
need to use dark magic to write code in D without depending on 
the GC:

https://www.reddit.com/r/programming/comments/67dogy/writing_excel_addins_in_d_without_using_the/


Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-04-24 Thread Laeeth Isharc via Digitalmars-d-announce

C++ example for XLW:

 LPXLFOPER EXCEL_EXPORT xlStats(LPXLFOPER inTargetRange) {
EXCEL_BEGIN;
XlfOper xlTargetRange(inTargetRange);

// Temporary variables.
double averageTmp = 0.0;
double varianceTmp = 0.0;

// Iterate over the cells in the incoming matrix.
for (RW i = 0; i < xlTargetRange.rows(); ++i)
{
for (RW j = 0; j < xlTargetRange.columns(); ++j)
{
// sums the values.
double value(xlTargetRange(i,j).AsDouble());
averageTmp += value;
// sums the squared values.
varianceTmp += value * value;
}
}
size_t popSize = xlTargetRange.rows() * 
xlTargetRange.columns();


// avoid divide by zero
if(popSize == 0)
{
THROW_XLW("Can't calculate stats on empty range");
}

// Initialization of the results Array oper.
XlfOper result(1, 2);
// compute average.
double average = averageTmp / popSize;
result(0, 0) = average;
// compute variance
result(0, 1) = varianceTmp / popSize - average * average;
return result;
EXCEL_END;
}

D example (didn't get time to test, but something like this) is a 
little bit more concise! :

import std.algorithm:map,sum;
import std.range:front;

@Register(ArgumentText("input range to calculate statistics 
for"),

HelpTopic("excel-d"),
FunctionHelp("calculates mean and variance for input 
array"),

ArgumentHelp(["input range to calculate statistics for"]))
auto xlStats(double[][] inTargetRange)
{
auto numCells = (inTargetRange.length > 0) ?
 inTargetRange.length * 
inTargetRange.front.length : 0;
auto means = inTargetRange.map!(row => row.sum).sum / 
numCells;
auto sumSquares = inTargetRange.map!( row => 
row.map!(cell => cell*cell).sum).sum;

return [means, sumSquares / numCells - means];
}




Dconf - lightning talk: Excel add-ins in D

2017-05-17 Thread Laeeth Isharc via Digitalmars-d-announce

https://www.reddit.com/r/programming/comments/6brj2x/dconf_lighting_talk_excel_addins_in_d/?ref=share&ref_source=link

(submitted to Hacker News - news.ycombinator.com too)



Re: Dconf - lightning talk: Excel add-ins in D

2017-05-17 Thread Laeeth Isharc via Digitalmars-d-announce

On Wednesday, 17 May 2017 at 21:17:37 UTC, jmh530 wrote:

On Wednesday, 17 May 2017 at 20:58:05 UTC, Laeeth Isharc wrote:

https://www.reddit.com/r/programming/comments/6brj2x/dconf_lighting_talk_excel_addins_in_d/?ref=share&ref_source=link

(submitted to Hacker News - news.ycombinator.com too)


The header says it's for the lightning talk on excel add-ins, 
but the link goes to Walter's talk.


For me the link goes to the lightning talk, but Reddit displays 
inline Walter's talk.  Strange.





Re: Trip notes from Israel

2017-05-27 Thread Laeeth Isharc via Digitalmars-d-announce

On Friday, 26 May 2017 at 16:55:44 UTC, Joakim wrote:
On Friday, 26 May 2017 at 11:32:21 UTC, Andrei Alexandrescu 
wrote:
Documentation of vibe.d was also mentioned as an important 
problem. More precisely, it's the contrast between the quality 
of the project and that of the documentation - someone said 
his team ended up with a different (and arguably inferior) 
product that was better documented. Literally they had the 
same engineer try each for a day. Reportedly it was very 
difficult to even figure whether vibe.d does some specific 
thing, let alone tutorials and examples of how to do it.


Eh, documentation is going to be sparse for a non-corporate OSS 
project.  If they're building products with vibe.d, presumably 
they can throw some consulting dollars Sonke's way and get him 
to help.


A reasonable presumption, but I do not know if Sonke himself has 
capacity for such as he seems quite busy.


So it might be worth thinking about alternative ways to move 
towards better docs for vibe.d (in collaboration with Sonke).


Re: D for Android beta

2017-06-01 Thread Laeeth Isharc via Digitalmars-d-announce

On Thursday, 1 June 2017 at 19:31:28 UTC, Joakim wrote:
The beta release of ldc 1.3, the llvm-based D compiler, is now 
out:


https://github.com/joakim-noah/android/releases

It is accompanied by a non-trivial sample app from the Android 
NDK, ported from C++ to about 1.2 klocs of D: the classic Utah 
Teapot (https://en.wikipedia.org/wiki/Utah_teapot), updated 
with mobile touch controls.  This app also demonstrates calling 
Java functions from your D code through JNI, though most of it 
is written in D.


There are two builds of ldc, a cross-compiler that you can use 
from a linux/x64 shell to compile to Android/ARM, and a native 
compiler that you can run on your Android device itself.  As I 
pointed out last year, not only is ldc a large mixed D/C++ 
codebase that just worked on ARM, but it is possible to build 
arbitrarily large Android apps on your Android device itself, a 
first for any mobile platform:


http://forum.dlang.org/thread/ovkhtsdzlfzqrqneo...@forum.dlang.org

This is the way the next generation of coders will get into 
coding, by tinkering with their Android devices like we did 
with Macs and PCs decades ago, and D is one the few languages 
that is already there.


I will write up instructions on how to write an Android app in 
D _on_ your Android device by using ldc and the Termux app, and 
get ldc into the Termux packages, a package repository for 
Android:


https://play.google.com/store/apps/details?id=com.termux&hl=en


Congratulations, Joakim!
https://www.reddit.com/r/programming/comments/6eqv46/write_mixed_dc_android_apps_even_build_them/
and news.ycombinator.com

Looking forward to termux.




Re: Dynamic binding to the Mono runtime API

2017-06-03 Thread Laeeth Isharc via Digitalmars-d-announce

On Saturday, 3 June 2017 at 17:30:05 UTC, Jakub Szewczyk wrote:
Mono runtime is a cross-platform, open-source alternative to 
Microsoft's .NET framework [1], and it can be embedded in other 
applications as a "scripting" VM, but with JIT-compilation 
enhanced performance and support of many languages such as C#, 
F# or IronPython [2].
It provides a C API, so I've bound it to D as a Derelict-based 
project, available at https://github.com/kubasz/derelict-mono, 
and as a DUB package 
(http://code.dlang.org/packages/derelict-mono). It currently 
wraps the Mono 5.0 API.
There's also a simple example of calling a C# main from D code, 
and C# code calling a native function implemented in D.


PS: Because I don't own a Mac I have no idea what the correct 
paths to the Mono shared library are, so it'd be great if 
someone could post/create a PR of them.


[1] http://www.mono-project.com/
[2] 
http://www.mono-project.com/docs/advanced/embedding/scripting/



This is very cool - thank you for doing this.  It could prove 
very helpful.


Have you thought of/any interest in looking at automatically 
generating C# wrapper and bindings for D code?  (I'm interested 
myself mostly in nested templated structs/arrays rather than 
classes).  It may not be relevant for you, but if it is please 
drop me an email on laeeth


... at kaleidic.io

Thanks.


Laeeth.



Re: static foreach is now in github master

2017-07-26 Thread Laeeth Isharc via Digitalmars-d-announce
On Monday, 17 July 2017 at 18:14:35 UTC, Andrei Alexandrescu 
wrote:
For those who want to play with our new static foreach feature 
and are willing to take the steps to building their own dmd, 
the feature is now merged in master: 
https://github.com/dlang/dmd/pull/6760


Happy hacking!

Andrei


Maybe good subject for an AMA (though not many upvoted so far). 
It's pretty cool that it was added on an afternoon during the 
hackathon.


 
https://www.reddit.com/r/programming/comments/6pn257/static_foreach_added_to_d_compiler_nightly/


Could someone post to Hacker News - I don't have enough rep there 
for stories to propagate.


Can always post another story later on explaining the practical 
benefits of static foreach (good topic for a D blog post) - 
marketing is about repetition.





Re: Update to Bare Metal STM32F4 (ARM Cortex-M4) LCD Demo Proof of Concept

2017-07-26 Thread Laeeth Isharc via Digitalmars-d-announce

On Thursday, 20 July 2017 at 12:23:31 UTC, Mike wrote:
A few years ago I created a bare metal demo on an ARM Cortex-M4 
microcontroller entirely in D.  It was just a demonstration 
that one could do bare metal programming for microcontrollers 
in D without any dependencies on C or assembly.  It was also a 
proof of some ideas I had about leveraging compile-time 
features of D to generate highly-optimized code (both small and 
fast) for these resource constrained systems.  I hit a wall, 
however, with Issue 14758[0], and ultimately abandoned D for 
other alternatives.


Well, that issue was recently fixed in GDC [1].  In addition, 
he GDC developers did some work to reduce the number of phony 
stubs one had to add to the runtime to get a build [2], removed 
the "shared is volatile" hack, and implemented the 
`volatileLoad/Store` intrinsics so I no longer need to do 
volatile access in assembly.  So, I decided to give it another 
try, and updated that demo. You can see the results at 
https://github.com/JinShil/stm32f42_discovery_demo


Congratulations, Mike.

https://www.reddit.com/r/programming/comments/6pn31c/d_on_bare_metal_stm32f4_redux/

Could someone post to Hacker News?  I don't have enough rep for 
it to propagate.


Re: Netflix opensources its first D library: Vectorflow

2017-08-02 Thread Laeeth Isharc via Digitalmars-d-announce

On Thursday, 3 August 2017 at 03:46:11 UTC, Matt wrote:
On Wednesday, 2 August 2017 at 21:31:19 UTC, Walter Bright 
wrote:

https://www.reddit.com/r/programming/comments/6r6dwp/netflix_opensources_its_first_d_library_vectorflow/


Speakng of D in data science (where I think it can get 
traction), is there a standardized linear algebra library in D? 
Perhaps some hooks to Eigen?


I saw a few upstarts LA libraries, but none that I would 
consider "the one to use in D", like numpy in python or Eigen 
in C++


We're using D in finance.  D libraries are far from the maturity 
of Python, but they are developing quickly.


https://github.com/kaleidicassociates/lubeck Library we have 
open-sourced

https://github.com/libmir/mir-algorithm Mir library we sponsor

Other mir libraries:
https://github.com/libmir/mir-lapack
https://github.com/libmir/mir-blas
https://github.com/libmir/lapack
https://github.com/DlangScience/cblas

Performance matters:
http://blog.mir.dlang.io/glas/benchmark/openblas/2016/09/23/glas-gemm-benchmark.html




London senior DevOps job and two London [D-ish] developer roles

2017-10-19 Thread Laeeth Isharc via Digitalmars-d-announce

Hi.

Symmetry Investments is looking to hire one senior platform 
engineering / devops person in London (and also looking for two 
developers - one for building native/Jupyter GUI front-end of 
tools, and the other to work with our research team).


So far, I've only had time to write and post the job description 
for the devops role (I'll do the others shortly).  You can see 
that one here:


https://jobs.github.com/positions/8e98eac8-b504-11e7-9da8-0737a3dcef18

We would consider someone with less formal experience/seniority.

Some stuff about the firm here:
  http://symmetryinvestments.com/about-us/
  https://stackoverflow.com/jobs/companies/symmetry-investments

Please feel free to drop me a line if you're interested or know 
of someone who might be - for this role or for the others.


How much of this work can be in D?  It very much depends on the 
person, and what's sensible for the job.  Potentially quite a 
lot, probably not all of it.


Thanks.



Laeeth.


Re: London senior DevOps job and two London [D-ish] developer roles

2017-10-20 Thread Laeeth Isharc via Digitalmars-d-announce

On Friday, 20 October 2017 at 09:11:17 UTC, Arjan wrote:
On Thursday, 19 October 2017 at 20:01:20 UTC, Laeeth Isharc 
wrote:

Hi.

Symmetry Investments is looking to hire ...
Please feel free to drop me a line if you're interested or 
know of someone who might be - for this role or for the others.


How would one contact you?


devops.hiring

at

symmetryinvestments.io


Re: excel-d v0.2.16 - now with more @Async

2017-12-23 Thread Laeeth Isharc via Digitalmars-d-announce

On Friday, 22 December 2017 at 22:08:23 UTC, Mengu wrote:

On Friday, 22 December 2017 at 00:41:31 UTC, Atila Neves wrote:
excel-d lets you write plain D code that can be run from Excel 
unmodified via the magic of compile-time reflection.


[...]


can we use excel-d with office for mac?


I don't think so but I am not familiar with the Excel API on Mac 
so it's possible not too many changes required.  Pull requests 
welcomed :)




Re: Vision document for H1 2018

2018-03-11 Thread Laeeth Isharc via Digitalmars-d-announce

On Sunday, 11 March 2018 at 16:15:22 UTC, rumbu wrote:

On Sunday, 11 March 2018 at 14:37:28 UTC, bachmeier wrote:
And this clarifies the source of your confusion. The D 
programming language is an open source project, not a 
for-profit company. D is not the language you're looking for.


There are 3 years since C# is also open source project. Last 
week 72 pull requests form 24 contributors were merged on 
~master. And this is only for Roslyn (the C# compiler).


The difference (at least for me) is that contributing to C# is 
a no-brainer. Contributing to D needs an advanced degree in 
computer science. Using the information on the D wiki didn't 
helped me until now to successfully compile and test a fresh 
copy of dmd or phobos.


Funnily enough, becoming a significant contributor to the 
ecosystem - compiler or Phobos - demonstrably does not require 
even a complete graduation from high school or any industrial 
programming experience.  I know of what I speak, but I don't say 
who as it's not for me to say.


I was in Munich over new year and I asked someone else who has 
been a star contributor how he got involved.  It was really easy 
for him to start contributing, so he did.  But different people 
find different things easy.


You don't need to have subsystem for Linux to use bash.  Just the 
standard git client for Windows is enough.


I agree the Windows experience could be easier upfront.  Still, 
it's better than it used to be and next year it will be better 
again.


You can't really compare the C# ecosystem to the D ecosystem 
because they are organised around different principles.  Yes, the 
pain is upfront with D, and it's not for everyone.  However on 
the basis of rational calculation the pain in learning something 
new is a small part of the total cost of the technology choice 
and for some people by far not the most relevant question.


And it's an advantage in hiring because the D community filters 
for people who have a tolerance for discomfort upfront.


It would be wonderful to be able to wave a wand and make all of 
life's little frustrations disappear.  But in my experience, 
that's not what is possible - one picks from the choices 
available and the new ones one thinks up.  People have a tendency 
to think that leadership has more power to just change things 
then is actually the case.


I'm going to be building standard developer images from scratch 
programmatically.  Transform froma Windows  ISO into  a VM 
image.Maybe I could open source those scripts and then it's 
easier to get to the bottom of any install and build problems and 
one can replicate difficulties.





Re: Vision document for H1 2018

2018-03-11 Thread Laeeth Isharc via Digitalmars-d-announce

On Sunday, 11 March 2018 at 07:59:53 UTC, rumbu wrote:

On Sunday, 11 March 2018 at 01:10:28 UTC, psychoticRabbit wrote:

On Sunday, 11 March 2018 at 00:36:19 UTC, Dylan Graham wrote:


And personally, depending on the problem, C# is better to 
program in than D. I still don't know why C# programmers are 
willing to give up C# and prefer to use D.

C# is vastly surperior for what it does.



Because, even the language creators seem to not recognize this, 
D looks like C# with *native compilation*, the syntax is 95% 
identical. Basically, if my source code doesn't use any .NET 
framework function, it will compile successfully with dmd 
without any (major) change.


I suppose that every C# programmer is enthusiastic on the first 
contact with the D language, but fails to keep his enthusiasm 
when he sees Phobos. C# programmer's mind is locked in the OOP 
world and Phobos looks like a mess from his point of view.


The problem is that D stagnates and in the same time C# 
evolves. Sometimes I feel like the C# language team is using D 
as inspiration for the new features, starting with C# 7.0, a 
lot of D concepts were introduced in the language: local 
functions, '_' as digit separator, binary literals, ref 
returns, tuples, templates, immutability. Guess what the next 
version of C# has on the table: slices.


In the same time, D delegates new features (and sometime 
existing ones) to library implementation, instead of assume 
them in the language syntax.


My opinion is that the day when C# will compile to native (on 
any platform), the C# developer interest in D will drop 
instantly.


It's a good thing not bad that other languages are inspired by 
what works.  Languages aren't in a vicious battle to the death, a 
Hobbesian war of all against all.  If C# gets better, that's 
great!


I don't think D is stagnating at all - on the contrary, it's 
amazing to see the ecosystem flourishing, no matter where you 
look - documentation, adoption, libraries, commercial adoption.


I think it's reasonable to disagree with the strategic decision 
made to move capabilities from compiler to libraries.  But you 
really have to make an argument about why you disagree if you are 
you expect to be persuasive because there is a thought-through 
argument for the choices made, which I am sure you must be 
familiar with.


I don't think it matters much whether you are right about what 
happens to C# programmer interest in D dies as soon as C# native 
cross-platform is ready because D is quite an ambitious language 
and doesn't need to depend on adoption from any one community to 
continue growing at an impressive rate.  As it happens though, as 
an empirical matter I doubt it.


C# slices look great.  I wanted to use them for generating 
wrappers for our analytics.  Not that easy for that purpose, from 
what I could see.  Looks like the primitives are stack only, and 
I tried to figure out how to use them elsewhere and gave up 
because it wasn't that easy.


If Phobos looks like a mess to C# programmers, so much the worse 
for C# programmers.  However I doubt they this is true in the 
general case.  It's better in many ways, but different and 
unfamiliar and everything unfamiliar is disconcerting in the 
beginning.









Re: Vision document for H1 2018

2018-03-11 Thread Laeeth Isharc via Digitalmars-d-announce

On Sunday, 11 March 2018 at 19:58:51 UTC, rumbu wrote:

On Sunday, 11 March 2018 at 17:15:28 UTC, Seb wrote:

[...]


Yes, I'm the typical lazy convenient Windows user scared of the 
terminal window.



[...]


I am happy for Posix users. Theoretically the process is the 
same on Windows.



[...]


This will need Linux subsystem as a Windows feature installed. 
Bash scripts do not work on Windows. Or other third party 
applications that are not listed as prerequisites on wiki.



[...]


make -fwin32.mak release
Error: don't know how to make 'release'

Ok, let's skip this, make it without "release".

Now test it:

cd test
make all -j8
Command error: undefined switch '-j8'


Why are you adding -j8 ? Does it say to do so in the instructions 
? Try without it.  (I can't test here as typing from my phone).




Re: Who says we can't call C++ constructors?

2018-04-23 Thread Laeeth Isharc via Digitalmars-d-announce

On Saturday, 21 April 2018 at 12:41:02 UTC, Atila Neves wrote:

From https://dlang.org/spec/cpp_interface.html:

"C++ constructors, copy constructors, move constructors and 
destructors cannot be called directly in D code".


O RLY?
Atila


https://www.reddit.com/r/programming/comments/8eat5o/calling_c_constructors_from_d/
https://github.com/atilaneves/dpp


Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-04-23 Thread Laeeth Isharc via Digitalmars-d-announce

On Wednesday, 18 April 2018 at 15:28:07 UTC, Atila Neves wrote:

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

This came out of the need at work to take existing D code and 
make it available for both Excel and Python.


Both pyd and excel-d make the reasonable assumption that one is 
using them to write code specifically for those environments. 
That breaks when there's existing production D code one wants 
to wrap.




https://www.reddit.com/r/programming/comments/8eb12m/autowrap_v001_automatically_wrap_existing_d_code/


Re: Announcing Mecca

2018-05-04 Thread Laeeth Isharc via Digitalmars-d-announce

On Friday, 4 May 2018 at 05:23:51 UTC, Shachar Shemesh wrote:

Hello everybody,

I am very happy to announce that Mecca version 0.0.1 (sorry, no 
more zeros than that) is now officially available. You can get 
the source code at https://github.com/weka-io/mecca. The API 
documentation is at https://weka-io.github.com/mecca/docs.


[...]


https://www.reddit.com/r/programming/comments/8gxrkg/wekaio_open_sources_mecca_dlang_library_for_nogc?sort=new


Re: A bit more Emscripten

2018-05-08 Thread Laeeth Isharc via Digitalmars-d-announce

On Tuesday, 8 May 2018 at 18:44:06 UTC, Vladimir Panteleev wrote:

On Tuesday, 8 May 2018 at 09:51:11 UTC, Mike Franklin wrote:
I've been recently assigned the task of building a web-based 
Ladder Logic editor/compiler 
(https://en.wikipedia.org/wiki/Ladder_logic). This would not 
be a short-lived application, however.


Hmm, sounds like this would be an interactive application that 
would need access to the HTML DOM. Currently, this isn't 
directly possible - when running in an asm.js VM, there is no D 
type to represent a JavaScript object. It is possible to call 
out to / eval JavaScript, though, so perhaps it could be 
possible using a shim, where a JavaScript array holds 
JavaScript/DOM objects, and D refers to them by index.


Maybe we could port something like this to D.  Or wait till 
someday dpp can #include the STL.


https://github.com/mbasso/asm-dom/blob/master/README.md



Re: A bit more Emscripten

2018-05-10 Thread Laeeth Isharc via Digitalmars-d-announce
On Thursday, 10 May 2018 at 08:32:07 UTC, Vladimir Panteleev 
wrote:
On Tuesday, 8 May 2018 at 08:53:36 UTC, Vladimir Panteleev 
wrote:

https://github.com/CyberShadow/dscripten-tools


Progress update:

- std.stdio.writeln() works
- Using a D main() works (though unittests and static 
constructors still don't)

- WebAssembly output works!
- std.allocator works (at least, Mallocator + building-blocks 
do)


Very cool, Vladimir.  When I get time we will try to see if it's 
useful for some internal prototype tools.


Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-05-10 Thread Laeeth Isharc via Digitalmars-d-announce

On Thursday, 10 May 2018 at 19:50:40 UTC, Nikos wrote:

In my dub.sdl file I have


configuration "python35" {
 subConfiguration "autowrap" "python35"
}


and I run


dub build --config=python35


which still tries to find python36. Why doesn't it look for 3.5?


Hi.  On my phone so can't copy paste.  Edit your dub.sdl under 
the python35 subconfiguration and change python 36 to python35.


Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-05-13 Thread Laeeth Isharc via Digitalmars-d-announce

On Sunday, 13 May 2018 at 16:23:49 UTC, Nikos wrote:
I'm trying to wrap drepl 
(https://github.com/dlang-community/drepl)


My dub.sdl files is


import autowrap.python;
mixin(
   wrapAll(
   LibraryName("drepl"),
   Modules("drepl.interpreter"),
   )
);


I also flagged `export` the interpreter function

export Interpreter!Engine interpreter(Engine)(return scope 
Engine e) if (isEngine!Engine)

{
   // workaround Issue 18540
   return Interpreter!Engine(() @trusted { return move(e); 
}());

}


I build the library with python35, but when I import it from 
python idle, I cannot access the `interpreter` function at all.
I have the feeling I miss something essential here, but I don't 
know what it is.

Any ideas?


It won't wrap a templated type or function.  You will have to 
make a little shim that instantiates the templated function with 
a particular type.





Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-05-13 Thread Laeeth Isharc via Digitalmars-d-announce

On Sunday, 13 May 2018 at 16:23:49 UTC, Nikos wrote:
I'm trying to wrap drepl 
(https://github.com/dlang-community/drepl)


My dub.sdl files is


import autowrap.python;
mixin(
   wrapAll(
   LibraryName("drepl"),
   Modules("drepl.interpreter"),
   )
);


I also flagged `export` the interpreter function

export Interpreter!Engine interpreter(Engine)(return scope 
Engine e) if (isEngine!Engine)

{
   // workaround Issue 18540
   return Interpreter!Engine(() @trusted { return move(e); 
}());

}


I build the library with python35, but when I import it from 
python idle, I cannot access the `interpreter` function at all.
I have the feeling I miss something essential here, but I don't 
know what it is.

Any ideas?


Eg turn this into a function and try wrapping this instead:

auto intp = interpreter(dmdEngine());





Symmetry Investments is recruiting developers in London and Hong Kong

2018-05-22 Thread Laeeth Isharc via Digitalmars-d-announce

Hi.

Walter+Andrei said this was okay to post here since it relates to 
D.  This is for one role working with our analytics and research 
groups; more in the pipeline.  Feel free to ping me directly if 
you are involved with the community already.



Laeeth.

Symmetry

About Us:

At Symmetry Investments, we seek to engage in intelligent 
risk-taking to create value for our clients, partners and 
employees.


Symmetry Investments is a global investment company with offices 
in Hong Kong and London. We have been in business since 2014 
after successfully spinning off from a major New York-based hedge 
fund. Currently we have about 110 full time employees and manage 
approximately US$4.2 billion of capital.


We derive our edge from our capacity to generate Win-Wins – in 
the broadest sense. Win-Win is our fundamental ethical and 
strategic principle. By generating Win-Wins, we can create unique 
solutions that reconcile perspectives that are usually seen as 
incompatible or opposites, and encompass the best that each side 
has to offer. We integrate fixed-income arbitrage with global 
macro strategies in a novel way. We invent and develop technology 
that focuses on the potential of human-machine integration. We 
build systems where machines do what they do best, supporting 
people to do what people do best. We are creating a collaborative 
meritocracy: a culture where individual contribution serves both 
personal and collective goals - and is rewarded accordingly. We 
value both ownership thinking AND cooperative team spirit, 
self-realization AND community.




D/C++ Quantitative Developer

This is an outstanding opportunity for the right person in terms 
of the intrinsic challenges of the role, the responsibility, the 
exposure to senior management, the opportunity to shape the 
development of something new, and over time the compensation.


Whilst we are a commercial enterprise, we highly value deep 
technical expertise and the cultivation of craft. You will be 
working closely with the Partner in charge of technology, who is 
a contributor to the open source community and a change agent for 
adopting modern development practices within the company.


https://github.com/symmetryinvestments/overview
https://github.com/atilaneves/dpp
https://dlang.org/blog/2017/05/31/project-highlight-excel-d/
https://github.com/libmir/mir-algorithm


As a D/C++ Quantitative developer you will work closely with the 
analytics and research groups to develop analytics and tools to 
support the investment and research processes of Symmetry.



Hard Requirements:

We are looking for mature hackers with a moral compass and sense 
of responsibility who have kept their imaginativeness. We value 
interest and capabilities as much as formal experience. Academic 
credentials are not a requirement if you can demonstrate 
outstanding capabilities, but for this role you should have a 
strong knowledge of quantitative techniques and computer science 
- data structures and algorithms.  You should also have strong 
knowledge of declarative programming.


You should be comfortable with the finer points of D and C++, and 
you should be ready and able to go deep when necessary to 
identify and address the root cause of problems.  You are able to 
write and develop domain-specific languages where they are an 
appropriate solution to a business challenge.


You will be working in a creative, often less-structured 
environment, with a high degree of autonomy to implement 
solutions. You are comfortable asking for help when you need it. 
You are capable of accepting direction should the longer-term 
strategic goals of the firm favour a particular solution fit.


You are able to communicate both at the level of ideas and 
concretely either in writing or in person/by telephone. The 
ability to be diplomatic is valuable, but not absolutely required.


You have a pragmatic devotion to excellence: the ability to 
recognize and evaluate interim solutions, while not being 
satisfied about retaining a hack in the long run.  You should 
recognise the costs of boilerplate and appreciate the aesthetic 
and commercial benefits of designs that involve writing as little 
code as possible.  You should care deeply about design and code 
quality, and recognise that performance matters more often than 
not.


You are able to think about problems in a generic, high-level way 
AND pragmatically use common sense. You can think associatively 
and hold a complex mental picture in your head as well as work 
sequentially.


An ability to think clearly and to act decisively in occasional 
high-pressure moments is desirable.



Soft Requirements:

Knowledge of the below will be helpful:

Languages: 5 years or more experience with D and C++; Python 
and Haskell or Ocaml



Location:

We currently work with certain remote developers as consultants.  
We view remote work as a way to collaborate with outstanding 
talent beyond the locations where we curre

dpp now compiles julia.h headers

2018-07-13 Thread Laeeth Isharc via Digitalmars-d-announce
Atila Neves' d++ now compiles julia.h.  Modulo bugs this makes it 
possible to embed Julia in D (and probably the other way around, 
but I have not tried).


https://github.com/kaleidicassociates/juliad



Re: dpp now compiles julia.h headers

2018-07-13 Thread Laeeth Isharc via Digitalmars-d-announce

On Friday, 13 July 2018 at 19:42:56 UTC, bachmeier wrote:

On Friday, 13 July 2018 at 19:02:56 UTC, Laeeth Isharc wrote:
Atila Neves' d++ now compiles julia.h.  Modulo bugs this makes 
it possible to embed Julia in D (and probably the other way 
around, but I have not tried).


https://github.com/kaleidicassociates/juliad


This is great news for me. A lot of new Julia code is being 
written by economists. I was going to work on this once I had a 
block of time.


Glad to return the favour.  We started using embedr to call R 
libraries from D - thanks for that.


I guess the next stage would be to work on autowrapping Julia -> 
D and viceversa.


Re: Symmetry Autumn of Code

2018-07-14 Thread Laeeth Isharc via Digitalmars-d-announce

On Saturday, 14 July 2018 at 07:30:26 UTC, Joakim wrote:

On Saturday, 14 July 2018 at 06:02:37 UTC, Mike Parker wrote:
Thanks to the sponsorship of Symmetry Investments, the D 
Language Foundation is happy to announce the Symmetry Autumn 
of Code!


We're looking for three university students to hack on D this 
autumn, from September - January. We're also in search of 
potential mentors and ideas for student projects. Head to the 
Symmetry Autumn of Code page for the details.


Spread the word!

https://dlang.org/blog/symmetry-autumn-of-code/


"join us" for
"submit an application" -> apply (confusing otherwise)

Maybe sum up and make clear that each student can earn between 
$3000-4000, instead of capped at $1k.


Why limit it to students? If the goal is to have a youth 
injection, just use an age limit- say 18-25- I see no reason 
for the stupid college bias.


Hi Joakim.

Thanks for suggestions.

I don't know what legal aspects there are relating to targeting 
age in different countries.  We are definitely targeting people 
earlier in their careers.  I agree with you that talent isn't 
only found amongst students, and I've in the past hired someone 
that didn't even finish high school and has gone on to do good 
work for the D community.  So as far as Symmetry goes we are very 
open to unusual talent.  A degree is just one piece of 
interesting information.


https://symmetryinvestments.com/careers/

There's quite a lot of work involved in organising something like 
this, and I'm very grateful to the D Foundation for doing such an 
excellent job.


We can refine this for next year, but I wanted to make a start.


Laeeth


Re: Symmetry Autumn of Code

2018-07-14 Thread Laeeth Isharc via Digitalmars-d-announce

On Saturday, 14 July 2018 at 07:09:21 UTC, Timoses wrote:

On Saturday, 14 July 2018 at 06:02:37 UTC, Mike Parker wrote:
Thanks to the sponsorship of Symmetry Investments, the D 
Language Foundation is happy to announce the Symmetry Autumn 
of Code!


We're looking for three university students to hack on D this 
autumn, from September - January. We're also in search of 
potential mentors and ideas for student projects. Head to the 
Symmetry Autumn of Code page for the details.


Spread the word!

https://dlang.org/blog/symmetry-autumn-of-code/



Typos
 "D programming lagnauge" (looks a bit french) : D
 "accept yor offer."


Thanks for corrections.


Great! Wish I was a student still : D.


Me too !  Kidding aside, if you would be interested in a job 
programming mostly or partly in D please see our website.  Lots 
of roles we haven't yet had time to post.





Re: dpp now compiles julia.h headers

2018-07-14 Thread Laeeth Isharc via Digitalmars-d-announce

On Friday, 13 July 2018 at 22:22:25 UTC, Meta wrote:

On Friday, 13 July 2018 at 19:02:56 UTC, Laeeth Isharc wrote:
Atila Neves' d++ now compiles julia.h.  Modulo bugs this makes 
it possible to embed Julia in D (and probably the other way 
around, but I have not tried).


https://github.com/kaleidicassociates/juliad


Very cool. It's awesome to be able to directly #include C++ 
headers.


C++ headers with all basic features are not yet there.  Atila 
thought it might be a couple of months work full-time to be able 
to do


 #include 

It's not out of the question to make that investment, but we need 
to hire a few more programmers locally first.


Re: Symmetry Autumn of Code

2018-07-23 Thread Laeeth Isharc via Digitalmars-d-announce

On Wednesday, 18 July 2018 at 10:42:04 UTC, Andre Pany wrote:

On Saturday, 14 July 2018 at 06:02:37 UTC, Mike Parker wrote:
Thanks to the sponsorship of Symmetry Investments, the D 
Language Foundation is happy to announce the Symmetry Autumn 
of Code!


We're looking for three university students to hack on D this 
autumn, from September - January. We're also in search of 
potential mentors and ideas for student projects. Head to the 
Symmetry Autumn of Code page for the details.


Spread the word!

https://dlang.org/blog/symmetry-autumn-of-code/


Another proposal: Adding D support to gRPC

I started to add D support to gRPC but paused it due to lack of 
knowledge and time.
One solution would be to add a D wrapper to 
https://github.com/grpc/grpc/tree/master/src by making use of 
the C interface of gRPC 
(https://github.com/grpc/grpc/tree/master/include/grpc).


As template e.g. C++ or python could be used 
(https://github.com/grpc/grpc/tree/master/src).


Kind regards
André


Juniper have an alpha C higher interface on top of the low level 
C core grpc API.  It didn't look too bad, but I didn't have time 
to finish what I started (making a crude D grpc API).


https://github.com/Juniper/grpc-c




Dpp on run.dlang.io

2018-08-03 Thread Laeeth Isharc via Digitalmars-d-announce
Thanks to Seb and Atila it is now very easy to show  a D program 
just #includeing C headers.  If just works.  Modulo bugs.  In 
time I am hopeful Atila will start to have more of C++ headers 
working too.


https://run.dlang.io/is/JlH3Th


Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-08-05 Thread Laeeth Isharc via Digitalmars-d-announce

On Sunday, 5 August 2018 at 20:01:22 UTC, Nikos wrote:

On Tuesday, 31 July 2018 at 09:09:11 UTC, Nicholas Wilson wrote:

On Sunday, 29 July 2018 at 18:14:31 UTC, Nikos wrote:

But when I try to export the whole dmdEngine


export:

   auto engine(char[] txt) {
   return interpreter(dmdEngine());
   }





Can you export an instance of `interpreter(dmdEngine())`?

e.g.

__gshared auto dmdi = interpreter(dmdEngine());

export ref dmd()
{
return dmdi;
}

or if that doesn't work, proxy it

__gshared auto dmdi = interpreter(dmdEngine());

struct Dmd
{
mixin Proxy!dmdi;
}
export auto dmd()
{
Dmd d;
return d;
}

That is pretty much required if you want to maintain state 
across.


Also I'm working on a D kernel for Jupyter notebook which 
should be done soon.



Thank you very much for your feedback. Unfortunately, none of 
the above worked.
By the way, the reason I'm trying all this is to create a 
Jupyter notebook. I've already made a simple version of it some 
time ago 
(https://github.com/nikoskaragiannakis/d-jupyter-kernel). Since 
you are also working on a D kernel, maybe we could work 
together?


Working example of Python calling D Repl is here.

https://github.com/kaleidicassociates/pydrepl




Re: Dpp on run.dlang.io

2018-08-05 Thread Laeeth Isharc via Digitalmars-d-announce

On Saturday, 4 August 2018 at 13:15:24 UTC, Seb wrote:

On Saturday, 4 August 2018 at 01:27:49 UTC, Laeeth Isharc wrote:
Thanks to Seb and Atila it is now very easy to show  a D 
program just #includeing C headers.  If just works.  Modulo 
bugs.  In time I am hopeful Atila will start to have more of 
C++ headers working too.


https://run.dlang.io/is/JlH3Th


It now also supports multiple files (and compiling C files) 
with the Har format [1]:


https://run.dlang.io/is/WwpvhT

This should hopefully make it even more useful.

[1] https://github.com/marler8997/har


Thanks v much for this.

One benefit of D is as a better glue language that integrates 
well with other languages and ecosystems.  Many people who know a 
bit about D have no idea that interop can work so easily or well.


So it might be worth mentioning this benefit as one link from 
main page and then linking from that to new page that mentions 
and has runnable examples (using HAR) for:


Python (via autowrap:python and pyd)
C (via dpp)
C++ (extern(C++) for now)
R (via embedr)
Julia (via C interface, including julia.h via dpp)
Lua (if LuaD stable enough)

with just screenshot for:
Excel (via autowrap excel / excel-d)
C# via Binderoo
Jupyter via pydmagic

and just link for web assembly.
Obviously a lot of work, but if you think a good idea we could 
work away at over time.







Re: Dpp on run.dlang.io

2018-08-06 Thread Laeeth Isharc via Digitalmars-d-announce

On Monday, 6 August 2018 at 13:32:23 UTC, bachmeier wrote:

On Sunday, 5 August 2018 at 22:43:42 UTC, Laeeth Isharc wrote:

One benefit of D is as a better glue language that integrates 
well with other languages and ecosystems.  Many people who 
know a bit about D have no idea that interop can work so 
easily or well.


So it might be worth mentioning this benefit as one link from 
main page and then linking from that to new page that mentions 
and has runnable examples (using HAR) for:


Python (via autowrap:python and pyd)
C (via dpp)
C++ (extern(C++) for now)
R (via embedr)
Julia (via C interface, including julia.h via dpp)
Lua (if LuaD stable enough)


And Octave (via the .mex interface) - this one's important 
because it opens the door to using D as an extension language 
to Matlab


If an Octave extension written in D works, do you have anywhere 
to point me to on what's needed to make it work with Matlab?  (Is 
it usually drop-in compatible?)





D kernel for Jupyter notebook

2018-08-19 Thread Laeeth Isharc via Digitalmars-d-announce
Proof of concept works, but it requires some further development 
to be useful to do work in.


https://github.com/kaleidicassociates/jupyterd

It uses D repl currently - this was written for a console 
interface and probably you will encounter difficulties running it 
in a notebook environment.  I guess one would like to treat all 
functions defined in a single notebook as part of the same 
session and to execute immediate statements as part of a main 
specific to that cell.


The kernel is a bit flakey - takes time to come on line and you 
might need to reconnect to it sometimes.


To Do:

1.Add HTML and markdown table output to display arrays of 
structs or of dicts in a useful manner

2.Integrate with mir and other numeric libraries
3.Integrate with charting
4.Consider adding to Dlang tour and run.dlang.io when stable
5.Integrate with dpp
6.Integrate with dub


1 and 3 should be quite simple.  One wouldn't want to write a 
large program in Jupyter, but it's helpful for exploratory data 
analysis and programming where the code that does the work is 
already in D.


Re: D kernel for Jupyter notebook

2018-09-05 Thread Laeeth Isharc via Digitalmars-d-announce
On Tuesday, 4 September 2018 at 04:58:41 UTC, Shigeki Karita 
wrote:

On Monday, 20 August 2018 at 00:14:03 UTC, Shigeki Karita wrote:

On Sunday, 19 August 2018 at 20:33:45 UTC, Laeeth Isharc wrote:
Proof of concept works, but it requires some further 
development to be useful to do work in.


[...]


Great. I have tried DUB integration. It seems to work. 
https://github.com/ShigekiKarita/grain/blob/master/example/repl.d


I'm making a jupyter based tutorial for my library. It might be 
the first example for jupyterd.


https://github.com/ShigekiKarita/grain/blob/master/tutorial.ipynb


Very cool.  Thank you.

I was looking into Jupyter widgets. I ported over some of it and 
had to add the extension to protocol for widgets into the 
notebook.  It's not that bad and might be pretty useful to be 
able to access widgets from D.


Half-finished code right now that doesn't even build but I don't 
have so much time and won't for a couple of months.




Re: New Initiative for Donations

2018-10-28 Thread Laeeth Isharc via Digitalmars-d-announce
On Saturday, 27 October 2018 at 14:33:43 UTC, Neia Neutuladh 
wrote:

On Sat, 27 Oct 2018 10:54:30 +, Joakim wrote:
I see, so you want other taxpayers to bail you out for your 
mistakes, interesting.


One of the major points of having a government is to create 
these regulations that make it less likely for individuals to 
suffer from the actions of other people and organizations.


Another major point is to help people in need using the 
collective efforts of society.


Programs like FDIC in the United States exist to serve both of 
these: it's an extra set of regulations for banks, and 
compliant banks will be bailed out if circumstances require. If 
I choose an FDIC bank and the owners run off with my money, I 
didn't make an avoidable mistake, any more than being mugged in 
the street is me making a mistake.


If you oppose that, you're gunning for an eventual repeat of 
the Great Depression.


Banks are special because of the payments system and because of 
lending.  In October 2008 Gordon Brown was within two hours of 
shutting down the banking system and declaring a state of 
emergency.  If that had happened nobody would have been able to 
make payments and new lending would have come to a halt.


In 2038 you won't need banks to make payments because 
cryptocurrencies will be a viable alternative.  And lending is 
already being provided by asset managers.  So the justification 
for the combination of leverage and the mismatch in liquidity and 
risk of banks deposit liabilities and their assets will 
disappear.  The component of TARP that constituted aid to the 
financial system made a profit, but nonetheless there will be 
very little public appetite for a repeat the next time around.


At the request of the UK debt management office, I met the 
representative of the IMF financial stability review in early 
2005.  He had a bee in his bonnet about the dollar yen carry 
trade and hedge funds: generals always fighting the last war.  I 
told him to worry about the banks and what they were buying.  He 
didn't listen.  So regulators have little skill when it comes to 
understanding systemic risk posed by the asset and liability 
decisions of banks and so it will be good to make that function 
redundant.


So cryptocurrencies matter.  They are far from mature right now 
though and it's not the most important thing if you have limited 
resources to accept them.  The best way to get the Foundation to 
accept them might be to do the work to help...








Re: New Initiative for Donations

2018-10-28 Thread Laeeth Isharc via Digitalmars-d-announce

On Friday, 26 October 2018 at 06:19:29 UTC, Joakim wrote:
On Friday, 26 October 2018 at 05:47:05 UTC, Neia Neutuladh 
wrote:

On Fri, 26 Oct 2018 02:38:08 +, Joakim wrote:
As with D, sometimes the new _is_ better, so perhaps you 
shouldn't assume old is better either.


There's no assuming going on. Cryptocurrencies are worse than 
credit cards for everything that normal people care about,


Such as? I already noted that they're easier and cheaper, you 
simply flatly state that "normal people" find them worse.



and they're better than credit cards for illegal transactions.


Yes, just like cash, and have other benefits that come with 
cash too.



This might eventually change, and we can re-evaluate then.

If for some reason cryptocurrencies become popular and 
sufficiently stable to be used as currency, I have no doubt 
that existing credit card companies will start offering 
automatic currency exchange, so you can have an account in USD 
and pay a vendor who accepts only Ethereum, or vice versa. As 
such, accepting credit card payments is good enough.


I don't know what we'd be waiting for, the tokens I mentioned 
are all worth billions and widely used, particularly by techies:


https://coinmarketcap.com

Why would I wait for antiquated credit-card companies to accept 
these tokens? The whole point of these new tokens is to 
obsolete the credit card companies.


Cryptocurrencies are worse is better for some people in some 
contexts.  HSBC started the process of shutting down my company 
bank account because payments to programmers in Russia triggered 
some alerts and you get caught up in this Kafkaesque maze where 
there is nobody reasonable to talk to.  I wrote to the Chairman 
in Hong Kong and only then could I get them to see reason and 
apologize.  So for making payments to Russia, yes if the other 
side accepts them, worse is better in this case.  For Venezuela 
or some African countries worse is obviously better quite a lot 
of the time. For making smaller payments overseas 
cryptocurrencies with low fees like BCH can be more efficient 
than a bank wire, even in the West.


As regards particular currencies, deadalnix, member of the D 
community and creator of SDC compiler project is the man behind 
Bitcoin ABC, the largest Bitcoin Cash client, and one of the key 
people technically for Bitcoin Cash overall.





Re: Wed Oct 17 - Avoiding Code Smells by Walter Bright

2018-11-02 Thread Laeeth Isharc via Digitalmars-d-announce
On Thursday, 1 November 2018 at 22:37:59 UTC, unprotected-entity 
wrote:

On Thursday, 1 November 2018 at 03:10:22 UTC, H. S. Teoh wrote:


Actually, code within a module *should* be tightly coupled and 
cohesive -- that's the whole reason to put that code inside a 
single module in the first place.  If two pieces of code 
inside a module are only weakly coupled or completely 
decoupled, that's a sign that they should not be in the same 
module at all.  Or at the very least, they should belong in 
separate submodules that are isolated from each other.


How does one determine, whether a 10,000 line module, is 
tightly coupled and cohesive?



You take a look through it and make a judgement.

Only the author can make that statement - which they naturally 
will, even if it's not true.


?

An outsider, seeking to verify that statement, has a hell of a 
job on their hands...(I for one, think code smell immediately).


There is a basic question in life.  Do you believe in discernment 
(if possible informed by data) or are you someone who makes 
decisions on the basis of evidence and believes that anything 
else is completely arbitrary and nothing more than a matter of 
opinion.


My impression is that the values of the D community tend more in 
the direction of recognising the importance of discernment. If 
someone is somebody who believes more in 'evidence', policy and 
rules then it probably isn't going to be satisfying expecting 
one's values to be shared on a wide scale here.


People also differ in their working memory and the degree to 
which they naturally think associatively.  Chopping up everything 
into small pieces favours those who have a smaller working memory 
and who think more analytically but it's a disadvantage for those 
who have a large working memory and think associatively.  For a 
private project that's something to be resolved between the 
relevant people, but I don't think it's reasonable to say that 
large files per se are wrong, just because they aren't your cup 
of tea personally.


I think that lots of things seem clear in theory but the 
difference between theory and practice is often quite large.


In practice Phobos is very readable.

And on the other hand, I have seen an experienced and capable C# 
programmer struggle to understand an intranet site written in the 
approved way by an experienced person who was well-trained at 
Microsoft.  I couldn't understand it either so I concatenated all 
the little itty bitty files, pulled out the data structures and 
then it was easy.


I don't use a particular language. I'm more interested in 
design and architecture.


Can one really speak of that kind of design in the abstract ?  
Language features shape your choices and lead to large shifts in 
the optimum.  If you don't have design by introspection as a 
possibility you are going to pick something else.


In the age of 'lock-down-everything', increased modularity is 
becoming more important. A monolithic module approach, is 
already outdated, and risky, in terms of developing secure, 
maintainable software


If you can't understand the program does that make you more or 
less secure?  Security requires also to understand the behaviour 
of the system as a coherent whole.  I think D programs are pretty 
easy from that perspective.


Is that really such a bad idea? Are there no programmers out 
there in the D world that might think this could be a good, 
additional tool, to give programmers, so they can better 
architect their solution?


Burden of proof is on you to write a DIP and make an argument for 
it.  I am not sure you would find it easier to get a change into 
C++.  Look at how difficult it is for Walter sometimes ; and he 
has just a little earned credibility.  Same thing for Guido - he 
had such little fun with a recent PEP he decided to retire from 
BDFL of python.


The amount of push back in the D community on this idea, is 
really odd to me. I'm still trying to understand why that is.


Persuading people isn't easy even if it's a good idea.  Look at 
the pushback from C++ over static if.  They crippled it when they 
finally did relent.  It's a bit entitled to think that if you 
can't persuade people without having written a DIP that it's them 
not you!


Are D programmers just hackers, insterested in getting their 
code to work, no matter what? Are their not enough Java/C# 
programmers coming to D - and bringing their design skills with 
them?


Would you mind explaining why you think that people from mass 
communities have design skills by virtue of having come from a 
mass community?  Walter and Andrei are just a little bit known 
for their design capabilities so the bar is quite high.  I think 
it's possible you might have things topsy turvy.


Making D code work is rarely a problem.

Every nation has its own strengths and weaknesses and the same is 
true of language communities.


Having worked with D professionally since 2015 and with a decent 
size codebase in re

Re: xlsxd: A Excel xlsx writer

2018-11-09 Thread Laeeth Isharc via Digitalmars-d-announce

On Wednesday, 7 November 2018 at 16:49:58 UTC, H. S. Teoh wrote:
On Wed, Nov 07, 2018 at 04:41:39PM +, Robert Schadek via 
Digitalmars-d-announce wrote:

https://code.dlang.org/packages/xlsxd

Announcing xlsxd a OO wrapper for the C library libxlsxwriter 
[1].


Run:

import libxlsxd;
auto workbook  = newWorkbook("demo.xlsx");
auto worksheet = workbook.addWorksheet("a_worksheet");
worksheet.write(0, 0, "Hello to Excel from D");


and you have created a Excel spreadsheet in the xlsx format 
with name

demo.xlsx
that contains the string "Hello to Excel from D" in row 0, 
column 0.


[1] https://github.com/jmcnamara/libxlsxwriter


Is there support for reading xlsx files too?


T


There are various C libraries.you could just use DPP to call 
them..




Re: D compilation is too slow and I am forking the compiler

2018-11-28 Thread Laeeth Isharc via Digitalmars-d-announce
On Monday, 26 November 2018 at 16:00:36 UTC, Guillaume Piolat 
wrote:
On Thursday, 22 November 2018 at 04:48:09 UTC, Vladimir 
Panteleev wrote:
On Wednesday, 21 November 2018 at 20:51:17 UTC, Walter Bright 
wrote:
Unfortunately, you're right. The title will leave the 
impression "D is slow at compiling". You have to carefully 
read the article to see otherwise, and few will do that.


Sorry about that. I'll have to think of two titles next time, 
one for the D community and one for everyone else.


If it's of any consolation, the top comments in both 
discussion threads point out that the title is inaccurate on 
purpose.


Please don't get me wrong, it's an excellent article, a 
provocative title, and fantastic work going on. I didn't meant 
to hurt!


In my opinion language adoption is a seduction/sales process 
very much like business-to-consumer is, the way I see it it's 
strikingly similar to marketing B2C apps, unless there will be 
no "impulse buy".


I think that there are different strategies - decent appeal to a 
broad market and having a very high appeal to a small market (but 
there has better be something good about your potential customer 
base ie 'D, if you find VBA too difficult' is probably not a good 
strategy!).  And you probably don't get to pick which situation 
you are in, and then one had better realise it and play the game 
you're in.  The particular kind of market will shape what works - 
in my business you approach a retail client base differently from 
regular institutional investors and then the worlds' largest 
pools of money involved something else again.


D isn't really marketed and it's definitely not sold.  That's an 
implicit strategy in itself.


Nassim Taleb raises the question of how do you choose between two 
surgeons, both recommended.  One looks the part and hangs his 
many certificates on his office wall.  The other looks scruffy 
with the appearance of a tradesman.  Who do you pick?  Taleb says 
pick the guy who doesn't look the part because if he got there 
without signalling he must have something going for him.


But in general you can appeal on merits mostly to an audience 
that is highly discerning and very capable.  If you haven't got 
any money to appeal to an audience that judges based on 
heuristics and social factors well then you can try to avoid 
accidentally putting people off, you can be creative with 
guerilla marketing but the key thing is to make the most of what 
you got.  If everyone else does things a certain way then if for 
some reason that's closed off to you for now then if you look 
closely, with active perception,you may well see opportunities 
that are neglected to approach the problem another way.


Actually no less than 3 programmer friends came to (I'm the 
weirdo-using-D and people are _always_ in disbelief and invent 
all sorts of reasons not to try) saying they saw an article on 
D on HN, with "D compilation is slow", and on further 
examination they didn't read or at best the first paragraph. 
But they did remember the title. They may rationally think 
their opinion of D hasn't changed: aren't we highly capable 
people?


It doesn't matter what most people think.  It matters what people 
who are on the fence or using D already a bit think.  Or people 
who have a lot of problems to which D is in part a solution only 
they didn't know about or think of D yet.


The messenger matters too.  If someone you trust and rate highly 
tells you something based on their experience that counts for a 
lot more than all the blog posts in the world.  And working code 
and lived experience dominates the social talk about it.


I've talked about D with the CTO of Bloomberg, the outgoing COO 
of Barclays investment bank, the number two guy at a 30bn hedge 
fund, the COO of the largest hedge fund in the world (depending 
on how you count) and more.  That's not going to change anything 
tomorrow but in time those kinds of conversations matter much 
more than what people might say on Reddit. It's not either /or of 
course, but it's just not worth sweating your reviews.


Finally the reasons people buy things are not what you might 
reasonably think!  Ask Walter how he was able to compete 
successfully for so long as a one man band with Microsoft.  I 
don't think his edge was in the beginning something calculated.



Reasonable people may think marketing and biases don't apply to 
them but they do, it works without your consent.


The thing is that we had a bubble in synthetic manufactured 
marketing.  And now increasingly people are tired of that and 
seek what's authentic, real and that doesn't pretend to be 
perfect.


That doesn't mean a bit of thought is a bad idea,just that it 
might matter less than you think that the D community isn't 
particularly interested in marketing.  Sometimes one can see that 
hidden in what superficially seems to be a weakness is a strength.





Re: D compilation is too slow and I am forking the compiler

2018-11-29 Thread Laeeth isharc via Digitalmars-d-announce
On Wednesday, 28 November 2018 at 13:05:34 UTC, Guillaume Piolat 
wrote:
On Wednesday, 28 November 2018 at 12:48:46 UTC, Laeeth Isharc 
wrote:


D isn't really marketed and it's definitely not sold.  That's 
an implicit strategy in itself.



What I see in my (absurdly competitive) market is that the 
people that truly do no-marketing tend to close shop, sometimes 
despite very competitive offerings.


It colors my perception of course, since it can be very 
tempting to appeal to a limited pool of discerning customers; 
but that would mean death.


What is the ratio of expenditure of your best customer to an 
average customer?   Not much.  That's one main reason why your 
intuition developed by organising your emotions according to your 
business domain fits this domain less.


What is the ratio of expenditure of the biggest 'customer' of 
Python to the average 'customer'?  Measured by resources lent to 
the community directly or indirectly, or by the wage bill of 
programmers at that firm working in Python this ratio is enormous.





Re: D compilation is too slow and I am forking the compiler

2018-11-29 Thread Laeeth isharc via Digitalmars-d-announce
On Wednesday, 28 November 2018 at 13:30:37 UTC, Guillaume Piolat 
wrote:
On Wednesday, 28 November 2018 at 12:48:46 UTC, Laeeth Isharc 
wrote:


Nassim Taleb raises the question of how do you choose between 
two surgeons, both recommended.  One looks the part and hangs 
his many certificates on his office wall.  The other looks 
scruffy with the appearance of a tradesman.  Who do you pick?  
Taleb says pick the guy who doesn't look the part because if 
he got there without signalling he must have something going 
for him.



It's definately the kind of surgeon one should choose - 
programmers that are not necessarily well groomed etc.. - but 
is it the kind of surgeon people will actually recommend? I'm 
doubtful.


If X has the social signalling then people will recommend X 
even without trying, because it's socially safe.


If one doesn't have the signalling, I've found the hard way 
even supporters will hesitate a bit before making 
recommendations, because of the social standing _cost_ it may 
have.


But then, perhaps recommendations don't matter, because 
opinions don't matter much? I think they matter to be even 
heard on public places.


And I think early adopters need a nudge, the influent need to 
be bothered by less influents (influencers are not especially 
on the lookout for new options, as they are already influent). 
Above all I think the niche of early-adopters is smaller than 
the larger market for languages, and the early-adopters are 
going elsewhere.


The innovator's dilemma, which is really an insight that dates 
back to Toynbee, and before that Ibn Khaldun, is not so obvious.  
I am not sure that you have understood it.  I suggest reading the 
book if you are interested, but otherwise I unfortunately don't 
have so much time at the moment to try to persuade you of what 
this phenomenon is like and there's limited value to talking 
about talking rather than having a discussion based on a shared 
understanding of what this is about.




Re: DConf 2019: Shepherd's Pie Edition

2018-12-22 Thread Laeeth Isharc via Digitalmars-d-announce
On Saturday, 22 December 2018 at 18:47:40 UTC, Robert M. Münch 
wrote:

On 2018-12-22 12:18:25 +, Mike Parker said:

Thanks to Symmetry Investments, DConf is heading to London! 
We're still ironing out the details, but I've been sitting on 
this for weeks and, now that we have a venue, I just can't 
keep quiet about it any longer.


Hi, you should consider the upcoming Brexit chaos, which is 
expect to have a high impact on all airlines. Currently I 
wouldn't bet that all parties involved get things sorted out 
until May...


I would be happy to bet they do.  The EU and US are already 
agreed.


https://www.bbc.co.uk/news/business-46380463





Re: DConf 2019: Shepherd's Pie Edition

2018-12-27 Thread Laeeth Isharc via Digitalmars-d-announce
On Thursday, 27 December 2018 at 17:00:05 UTC, Robert M. Münch 
wrote:

On 2018-12-22 21:38:42 +, Laeeth Isharc said:

On Saturday, 22 December 2018 at 18:47:40 UTC, Robert M. Münch 
wrote:

On 2018-12-22 12:18:25 +, Mike Parker said:

Thanks to Symmetry Investments, DConf is heading to London! 
We're still ironing out the details, but I've been sitting 
on this for weeks and, now that we have a venue, I just 
can't keep quiet about it any longer.


Hi, you should consider the upcoming Brexit chaos, which is 
expect to have a high impact on all airlines. Currently I 
wouldn't bet that all parties involved get things sorted out 
until May...


I would be happy to bet they do. The EU and US are already 
agreed.


https://www.bbc.co.uk/news/business-46380463


Well, we will see. But it's not the EU and US, but UK and US 
that agreed after your reference. Since I'm not from the US 
this information doesn't help a lot. And the significant part 
of your reference is this: "Theresa May's Brexit agreement with 
Brussels says that the UK and EU have agreed to negotiate a 
"comprehensive air transport agreement" for UK-EU flights 
during the planned transition period but it would not apply if 
the UK left the EU without a deal. In September the government 
warned a no-deal Brexit could cause disruption to air travel 
between the UK and European Union countries."


You might be aware that the "No Deal Scenario" is currently 
much more likely... but again, everyone is free to do what they 
want.


In the event of no-deal, flights will continue as before except 
UK operators flying _within_ Europe on domestic or intra-EU 
flights will need to get a license.  UK operators can continue to 
fly to Europe, and we already said the European operators can fly 
here.  This is a relatively recent official confirmation of what 
was always fairly obvious - a negotiating position is not quite 
the same thing as the position in actuality.


http://www.travelweekly.co.uk/articles/319768/updated-european-commission-reiterates-flights-will-go-ahead-post-brexit

You can read the technical guidance if you wish.  Naturally it 
comes with the spin you would expect.


And since flights to and from the EU will continue to operate, I 
doubt very much that flights between Britain and anywhere else 
will cease to operate.


Britain has a current account deficit with every European nation 
bar Ireland and I think Malta, meaning we import more than we 
export.  The wilder scenarios painted assume that one of the two 
parties would deliberately sabotage their own economy.  I don't 
think so.


I had lunch with a lawyer who advised Cameron and Osborne in 
their negotiations with the EU.  He has written five books on 
Brexit, approaching it from a technical rather than political 
perspective.  He pioneered the suggestion of enhanced equivalence 
which will likely be the roadmap for financial services.  He says 
Brexit consists of a multitude of small problems which will have 
to be overcome by the people closest to them.  But a no-deal 
Brexit would be fine and quite quickly rather positive.


All of this stuff "if there is a no-deal Brexit, Theresa May 
_could_ run out of insulin" - that word could is like nasal 
demons in UB with C.  It's a funny use of the word could - the 
lawyer called the insulin suggestion an insult to the 
intelligence.  And my sister in law is a partner in a 
pharmaceutical regulatory firm here in Germany where I write 
from, and she agrees the suggestion is nonsense.


There's a lot of such stuff about, generated for partisan 
reasons.  The track record of such suggestions is pretty dire - 
both Mervyn King, former Governor of the Bank of England,and Paul 
Krugman, a former trade economist, haha, suggested that the Bank 
was damaging its reputation by making such political arguments.


So it's best to go to the primary sources and technical 
documentation.  There are more entertaining ways to scare oneself 
if that's what one wants.


But flights will be running as good or bad as they ever do,as 
best I can tell.




Re: SDC-32bit

2015-03-20 Thread Laeeth Isharc via Digitalmars-d-announce

On Friday, 17 October 2014 at 18:47:54 UTC, Stefan Koch wrote:

On Friday, 17 October 2014 at 10:39:15 UTC, Temtaime wrote:

New backend why ?


Because I want to code a backend.
I want output C or maybe even Cool ...
generating UML via a backend would also be nice.


Congrats on the project - v impressive.

How about Javascript or JSASM?  So we can write D on the browser?


Re: Gary Willoughby: "Why Go's design is a disservice to intelligent programmers"

2015-03-25 Thread Laeeth Isharc via Digitalmars-d-announce

On Thursday, 26 March 2015 at 00:19:44 UTC, Jakob Ovrum wrote:
As I know Gary is sometimes (often?) on these forums I'll post 
some critique here. Misrepresenting Go in a comparison with D 
doesn't reflect well on the D community, so please have a look 
at the following issues:


You describe these as issues forming part of a critique and 
suggesting the substance of what he wrote is wrong, but are these 
substantive in the context of a quick blog post (where it is more 
important to say something generative than to be perfect in its 
expression).


I don't claim to know Go, but is his basic point off the mark?

In the first code example, the Go version returns 1 on failure 
and 0 on success, while the D version always returns 0. Also, 
the Go version correctly uses stderr for error messages while 
the D version uses stdout for everything.


   stderr.writeln(text);
   return 1;
correctness is important, but does this change much?


In the second example maybe you should print four lists to be 
equivalent of the Go code. I think it's misrepresentative to 
shorten the D example by making it do less work.


surely people can see beyond a difference of three lines ?  would 
this change his point?



auto text   = source.byLine.join.to!(string);


This is not safe as byLine reuses the same buffer for every 
line. It may or may not work depending on join's 
implementation. Also, it's idiomatic to omit parantheses when a 
template argument list consists of a single token: 
source.byLine.join.to!string;


fair point if true (I will let others who know better say whether 
.array. or something is needed).


With all that said, I honestly think Go’s design a disservice 
to intelligent programmers.


s/design a disservice/design is a disservice/


What he wrote is correct English, and he is an Englishman living 
in England.


I guess by now Go programmers reading this will be frothing at 
the mouth >>shouting “Your doing it wrong!”.
That could be misconstrued as a jab at the intelligence of Go 
programmers, which I don't think serves your cause.


Again, nobody English would think this was more than mildly 
humorous (and by no means insulting).  To suggest somebody is 
rabid is not to insult their intelligence, but merely to tease 
them about their likely strong emotional reaction.


But what is one to do when making the trade-off between being 
blandly corporate and acceptable to everyone, versus writing with 
some character and spirit and offending the sensitive.  It's a 
personal choice, but not easy to criticize another for theirs.


I personally find the world too bland these days.  One cannot 
police the forms of expression of people who do not speak for a 
community or claim to be acting as such (apologies if I am 
mistaken and he does have an official position within D).  And 
perhaps one ought not to try.



Laeeth.


Re: Gary Willoughby: "Why Go's design is a disservice to intelligent programmers"

2015-03-26 Thread Laeeth Isharc via Digitalmars-d-announce

That kind of articles are bad for the image of the D community


Nick S:

No. Just...no.

I'm honestly *really* tired of general society's (seemingly?) 
increasing intolerance FOR intolerance.


Some things ARE bad. Some ideas are dumb ideas (ie without 
merit). Some features are bad features. Some products really 
are crappy products. Calling it out when you see it, using a 
frank explanation of your reasoning, isn't bad, it's productive.


Excellence is incompatible with tolerating mediocrity or what is 
appalling, and what I have seen is that there are aesthetic 
aspects to creative endeavours not conventionally thought of as 
having an aesthetic element, and it is in the nature of such 
things that one cannot and should not tolerate what one perceives 
to be ugly in a creative endeavour.  If one is driven mostly by 
ROI rather than high feelings, one doesn't get to excellence.  So 
it is my belief that dealing with creative people means dealing 
with a certain ... intensity.


That (on the aesthetic aspects of technical fields) is not just 
my opinion, but also (I think) that of a certain Mr W Bright, 
judging by his comments on how good code should look and on good 
aircraft design, although he presented this in his usual low-key 
manner.  I was looking for a language that was beautiful, as well 
as powerful, and for whatever it is worth, this was a factor of 
high appeal with D.


It's also the view of Feynman, not to mention many great minds of 
the past.  Ie it is limiting to insist on data before forming a 
strong opinion about something (which is not to say that one may 
not change one's mind in the face of contrary data).


"You can recognize truth by its beauty and simplicity. When you 
get it right, it is obvious that it is right—at least if you have 
any experience—because usually what happens is that more comes 
out than goes in. ...The inexperienced, the crackpots, and people 
like that, make guesses that are simple, but you can immediately 
see that they are wrong, so that does not count. Others, the 
inexperienced students, make guesses that are very complicated, 
and it sort of looks as if it is all right, but I know it is not 
true because the truth always turns out to be simpler than you 
thought." - Feynman via Wikiquote (but the same idea comes across 
in his books).


To discourage dissent, objections, or complaints is to rob 
ourselves of potential improvement. *That's* what critique and 
complaints and objections ARE: Recognition of the potential for 
improvement. There *cannot* be progress and improvement without 
first identifying existing faults. If nobody ever identified 
and voiced criticism of punchcards, for example, we'd all still 
be stuck in the world of 1950's computing.


Excellently put.   (And, I would add, a constructive draw towards 
what is generative - not just fault-finding).


It's not as if "the D crowd" doesn't critique itself and it's 
own language just plenty, so it's not like there's any 
hypocrisy here. And I'm certainly not willing to accept that 
programmers should be viewed as being part of distinct 
mutually-exclusive factions based on some single-language 
allegiance. I'm a D guy. I also happen to be a fan of Nemerle. 
And both languages have things I hate. So scratch the "it's the 
D crowd" idea.


Interesting - what should I read about Nemerle, and what is it 
best at ?


And seriously, the article in question barely mentions D at all.

So no, this is NOT some sort of "D community piece attacking 
another language" as some comments seem to imply. It is merely 
an isolated critique of one language by someone who happens to 
be *using* the given language.


There are some very interesting psychological dynamics in the 
reaction to this kind of piece.  For me it was key that although 
it was clearly written in a humorous tone, and hurriedly, he 
seemed to speak from the heart - it is refreshing to see such 
work even when one doesn't agree with it.


BTW since when has linking to something been an endorsement of it?


Re: Gary Willoughby: "Why Go's design is a disservice to intelligent programmers"

2015-03-26 Thread Laeeth Isharc via Digitalmars-d-announce
On Thursday, 26 March 2015 at 19:37:30 UTC, Ola Fosheim Grøstad 
wrote:

On Thursday, 26 March 2015 at 19:16:54 UTC, bachmeier wrote:
You're making a big assumption about which programmers and 
projects count and which don't. I wonder if outside of Google


It doesn't matter what the programmers think, what matters is 
how the development environment affects the project in 
measurable terms. Having all kinds of features does not 
necessarily benefit projects. That's the difference between a 
fun toy language and one aiming for production and maintenance.


Programming is - for now - still a human activity, and what is 
important in human activities may not always be measured, and 
what may be easily measured is not always important.  That 
doesn't mean one should throw away the profiler and go back to 
guessing, but it does suggest caution about adopting the 
prestigious techniques of the natural sciences and applying them 
to a domain where they don't necessarily fully belong.


I say this as someone coming from the financial markets, where we 
have all experienced quite recently the effects of mistaking 
being quantitative for thinking soundly - what happened ought not 
to have been a surprise, and of those who saw 2008 coming and 
spoke publicly about it, I don't think a single one based their 
view on the quant especially.  Yet the field of macroeconomics is 
much more fully developed than that of assessing programmer 
productivity and quality of output.


It is not scientific to depend on an approach that has not yet 
proven itself in practical terms over the course of time and in 
different environments.



http://en.wikipedia.org/wiki/Scientism

http://plato.stanford.edu/entries/feyerabend/



Laeeth.


Re: Gary Willoughby: "Why Go's design is a disservice to intelligent programmers"

2015-03-26 Thread Laeeth Isharc via Digitalmars-d-announce

On Friday, 27 March 2015 at 04:35:17 UTC, Walter Bright wrote:

On 3/26/2015 8:53 PM, Laeeth Isharc wrote:
It's also the view of Feynman, not to mention many great minds 
of the past.  Ie
it is limiting to insist on data before forming a strong 
opinion about something
(which is not to say that one may not change one's mind in the 
face of contrary

data).


Feynman's books are all worth reading, even if you have no 
interest in physics. His attitude about things is just a marvel.


I once had a roundtable discussion with the question "if you 
could resurrect any historical figure, who would it be?" I 
nominated Feynman, and that pretty much ended the discussion 
:-) nobody could think of anyone more appropriate.


So yeah, I definitely take inspiration from him.


Richard P. Feynman
“Well, Mr. Frankel, who started this program, began to suffer 
from the computer disease that anybody who works with computers 
now knows about. It's a very serious disease and it interferes 
completely with the work. The trouble with computers is you 
*play* with them. They are so wonderful. You have these switches 
- if it's an even number you do this, if it's an odd number you 
do that - and pretty soon you can do more and more elaborate 
things if you are clever enough, on one machine.


After a while the whole system broke down. Frankel wasn't paying 
any attention; he wasn't supervising anybody. The system was 
going very, very slowly - while he was sitting in a room figuring 
out how to make one tabulator automatically print arc-tangent X, 
and then it would start and it would print columns and then 
bitsi, bitsi, bitsi, and calculate the arc-tangent automatically 
by integrating as it went along and make a whole table in one 
operation.


Absolutely useless. We *had* tables of arc-tangents. But if 
you've ever worked with computers, you understand the disease - 
the *delight* in being able to see how much you can do. But he 
got the disease for the first time, the poor fellow who invented 
the thing.”



― Richard P. Feynman, Surely You're Joking, Mr. Feynman!: 
Adventures of a Curious Character

tags: computers, humor, programming

;)


  1   2   >