Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-03 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 4 September 2018 at 02:24:25 UTC, Manu wrote: On Mon, 3 Sep 2018 at 18:45, Laeeth Isharc via Digitalmars-d wrote: On Monday, 3 September 2018 at 17:15:03 UTC, Laurent Tréguier wrote: > On Monday, 3 September 2018 at 16:55:10 UTC, Jonathan M > Davis wrote: >> Most

Re: D is dead (was: Dicebot on leaving D: It is anarchy driven development in all its glory.)

2018-09-04 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 4 September 2018 at 05:38:49 UTC, Iain Buclaw wrote: On 4 September 2018 at 04:19, Laeeth Isharc via Digitalmars-d wrote: On Monday, 3 September 2018 at 16:07:21 UTC, RhyS wrote: A good example being the resources going into DMD, LDC, GDC... 3 Compilers for one language, when

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

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

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

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

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

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

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

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

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

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.

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

beginner's pyd question - exporting structs to python

2014-08-18 Thread Laeeth Isharc via Digitalmars-d-learn
Hi there. Brief introduction, and a beginner's question. I just started playing with D a couple of weeks ago. I have been programming in C on and off since the late 80s, but I do finance for a living and my programming skills grew rusty. I have a bit more time now to catch up with

Re: beginner's pyd question - exporting structs to python

2014-08-18 Thread Laeeth Isharc via Digitalmars-d-learn
Thank to jwhear on irc who solved it for me despite claiming not to be a pyd guru. In case it's of benefit, here is what works: module hellostruct; import pyd.pyd; import std.stdio; import std.conv; struct t_mystruct { int i; string s; }; t_mystruct hellostruct(int[] inp) { int i;

Re: beginner's pyd question - exporting structs to python

2014-08-18 Thread Laeeth Isharc via Digitalmars-d-learn
All the cool folk doing data analysis and visualization using Python no longer bother with hand written C (*) for when pure Python won't cut the mustard. If Numba can't do the job, then Cython gets used. I have all my computational pure Python source codes running as fast as C these days

Re: beginner's pyd question - exporting structs to python

2014-08-18 Thread Laeeth Isharc via Digitalmars-d-learn
On Monday, 18 August 2014 at 18:08:59 UTC, Russel Winder via Digitalmars-d-learn wrote: […] distutils.util.get_platform(), […] Does os.uname() not provide sufficient information? This was boilerplate generated by pyd.

Re: beginner's pyd question - exporting structs to python

2014-08-18 Thread Laeeth Isharc via Digitalmars-d-learn
On Monday, 18 August 2014 at 19:28:55 UTC, Russel Winder via Digitalmars-d-learn wrote: On Mon, 2014-08-18 at 19:00 +, Laeeth Isharc via Digitalmars-d-learn wrote: On Monday, 18 August 2014 at 18:08:59 UTC, Russel Winder via Digitalmars-d-learn wrote

Re: beginner's pyd question - exporting structs to python

2014-08-18 Thread Laeeth Isharc via Digitalmars-d-learn
Whilst the hardcore Pythonistas remain Pythonistas, some of the periphery has jumped ship to Go. Sadly D did not capture these folk, it perhaps should have done. It would be easy to blame fadism, but I think the actual reasons are far less superficial. So I gather that you agree that what

Re: beginner's pyd question - exporting structs to python

2014-08-18 Thread Laeeth Isharc via Digitalmars-d-learn
Dr Russel Winder 41 Buckmaster Road London SW11 1EN, UK Are there any D users groups/meetups in London? I see you are not far away (I am in Barnes). Laeeth

building shared library from D code to import into cython

2014-10-07 Thread Laeeth Isharc via Digitalmars-d-learn
Hi. I am trying to create a shared library in D linked against phobos so that I may use this in a cython extension module for Python. Ultimately I would like to be able to use a D class or struct (via the C++ interface) and call it from within cython, since cython classes cannot be

Re: building shared library from D code to import into cython

2014-10-07 Thread Laeeth Isharc via Digitalmars-d-learn
Hi. Thanks for the quick response. The -defaultlib was left around from trying all kinds of combinations of dmd and gcc. I am not used to gcc, and it will take me some time to become properly acquainted with all the options. I simply could not get it to recognize libphobos no matter what

Re: building shared library from D code to import into cython

2014-10-12 Thread Laeeth Isharc via Digitalmars-d-learn
Thanks for this. I am aware of pyd and will take a look at source/build process. Any thoughts on speed in 2014 of pyd vs using cython to talk to D directly via C/C++ interface? I saw this old coment here: prabhuramachandran.blogspot.co.uk/2008/09/python-vs-cython-vs-d-pyd-vs-c-swig

Returning multiple arrays from function - struct or byref the only option?

2014-10-15 Thread Laeeth Isharc via Digitalmars-d-learn
Hi. I have to write a bunch of functions that operate on input arrays to return multiple output arrays. In case helpful the inputs are price bars or economic data points (datetime, ohlc) and the outputs are nx1 arrays (I won't say vectors) of doubles or structs. What is the best way to

Re: Returning multiple arrays from function - struct or byref the only option?

2014-10-15 Thread Laeeth Isharc via Digitalmars-d-learn
Here is byref: import std.typecons; import std.stdio; void myfunction(double x, ref double[] a, ref double[] b) { a~=x+1.0; a~=x+9.0; b~=x+2.0; b~=x+11.0; return; } void main() { double[] a; double[] b; myfunction(99.0,a,b);

Re: Returning multiple arrays from function - struct or byref the only option?

2014-10-18 Thread Laeeth Isharc via Digitalmars-d-learn
Thanks for the thoughts Meta and Ali. Laeeth. On Wednesday, 15 October 2014 at 17:56:06 UTC, Ali Çehreli wrote: On 10/15/2014 09:48 AM, Laeeth Isharc wrote: struct RetStruct { double[] a; double[] b; } RetStruct myfunction(double x) That's my preference. Tuples would work

Re: Issue with WIKI example Win32_DLLs_in_D

2014-10-21 Thread Laeeth Isharc via Digitalmars-d-learn
Funnily enough I was just playing with this last night trying to get Excel to talk to dlang DLL. I borrowed a C example elsewhere on web and used a different .def file. Something like this: LIBRARY dprop DESCRIPTION 'My DLL written in D' EXETYPE NT CODE

Dart bindings for D?

2014-10-29 Thread Laeeth Isharc via Digitalmars-d-learn
Hi. I have had a look around for these, but was not able to see them. It looks perhaps like dart_api.h is the main file to convert - I will have a crack at starting this unless anyone knows of any already in existence. Rationale for using Dart in combination with D is that I am not

Re: Dart bindings for D?

2014-10-30 Thread Laeeth Isharc via Digitalmars-d-learn
Hi. Thanks for all the thoughts, and sorry it has taken me a little while to reply. Adam - I liked your book very much: it really complemented the other resources out there, especially in communicating a refreshing spirit of enthusiasm and fearless exploration. ketmar - I took a look at

alias and extern(C)

2014-10-30 Thread Laeeth Isharc via Digitalmars-d-learn
Hi. I am trying to translate the following from the Dart header: typedef void (*Dart_MessageNotifyCallback)(Dart_Isolate dest_isolate); So I made a little simple test to understand callbacks in D. The code below works fine if you remove the extern(C). But I get the error

Re: alias and extern(C)

2014-10-30 Thread Laeeth Isharc via Digitalmars-d-learn
The code below works fine if you remove the extern(C). But I get the error functionpointertest.d(6): Error: basic type expected, not extern with the code as it is. How do I use alias with extern ? [...] alias Callback= extern(C) void function(int); Compiles as is with dmd 2.066. For

Re: Dart bindings for D?

2014-10-30 Thread Laeeth Isharc via Digitalmars-d-learn
Ah - makes sense. It is satisfyingly fast... On Thursday, 30 October 2014 at 21:33:59 UTC, ketmar via Digitalmars-d-learn wrote: On Thu, 30 Oct 2014 17:39:13 + Laeeth Isharc via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: BTW what was the story behind dscript? It seems

simd and dmd compiler v 2.066 and 2.067.0-b1

2014-11-03 Thread Laeeth Isharc via Digitalmars-d-learn
Hi. Not sure if my code is correct - I wanted to build the simplest working example of simd use. The following compiles and works under ldc (I have not disassessembled the result to see if it is using simd instructions), but generates a compiler error under dmd (2.066 and 2.067.0-b1 running

Re: simd and dmd compiler v 2.066 and 2.067.0-b1

2014-11-03 Thread Laeeth Isharc via Digitalmars-d-learn
On Monday, 3 November 2014 at 21:23:50 UTC, Marc Schütz wrote: Reduced testcase: import core.simd; void main() { short8 vec; vec=vec*3; } I've filed a bug report: https://issues.dlang.org/show_bug.cgi?id=13674 Thanks - appreciate it. Laeeth.

rndtonl

2014-11-04 Thread Laeeth Isharc via Digitalmars-d-learn
what am I doing wrong here? import std.math; import std.stdio; void main() { real fac; fac=1.2; fac=rndtonl(fac); } [root@fedorabox util]# dmd bug.d bug.o: In function `_Dmain': bug.d:(.text._Dmain+0x3b): undefined reference to `rndtonl' collect2: error: ld returned 1

Re: rndtonl

2014-11-05 Thread Laeeth Isharc via Digitalmars-d-learn
Thanks, Adam. Should we perhaps make a pull to suggest updating the docs/wiki? As the point below is not what one would infer from the dlang.org library reference page. (If I say we, it's because I don't know what the protocol is, or whether my perception is right). On Tuesday, 4

status of D optimizers benefiting from contracts ?

2014-11-09 Thread Laeeth Isharc via Digitalmars-d-learn
https://www.youtube.com/watch?v=e2F2pqeMLuwlist=PL4EvMyUrlAJmEfs8l6oW2BlnALiDu7kGy 31 minutes in, Walter Bright suggests that a supplementary benefit of using contrats is helping the compiler make optimisations. He uses the example of being able to do faster 32 bit arithmetic when the

Re: status of D optimizers benefiting from contracts ?

2014-11-09 Thread Laeeth Isharc via Digitalmars-d-learn
Thanks. Laeeth.

PyD-like wrapping for Excel/VBA and Julia?

2014-12-18 Thread Laeeth Isharc via Digitalmars-d-learn
I have a bunch of D functions I would like to make available to Excel (and possibly Julia) without having to write wrappers for each function individually. For Excel, I think one needs two levels of wrapper - one is to create a C style interface [using extern(Windows) calling convention, and

Re: PyD-like wrapping for Excel/VBA and Julia?

2014-12-19 Thread Laeeth Isharc via Digitalmars-d-learn
On Friday, 19 December 2014 at 01:59:05 UTC, Ellery Newcomer wrote: On 12/18/2014 12:41 PM, Laeeth Isharc wrote: I have a bunch of D functions I would like to make available to Excel (and possibly Julia) without having to write wrappers for each function individually. I've thought about

optimization / benchmark tips a good topic for wiki ?

2014-12-22 Thread Laeeth Isharc via Digitalmars-d-learn
Replacing import core.stdc.math with import std.math in the D example increases the avg runtime from 19.64 to 23.87 seconds (~20% slower) which is consistent with OP's statement. + GDC/LDC vs DMD + nobounds, release Do you think we should start a topic on D wiki front page for

Data frames in D?

2014-12-26 Thread Laeeth Isharc via Digitalmars-d-learn
I thought about it once but quickly abandoned the idea. The primary reason was that D doesn't have REPL and is thus not suitable for interactive data exploration. The quick compile times could allow interactive data exploration I agree with other posters that a D REPL and

Re: Data frames in D?

2014-12-26 Thread Laeeth Isharc via Digitalmars-d-learn
REPLs are over-hyped and have become a fashion touchstone that few dare argue against for fear of being denounced as un-hip. REPLs have their place, but in the main are nowhere near as useful as people claim. IPython Notebooks on the other hand are a balance between editor/execution

Data Frames in D - let's not wait for linear algebra; useful today in finance and Internet of Things

2014-12-26 Thread Laeeth Isharc via Digitalmars-d-learn
On Friday, 26 December 2014 at 21:31:00 UTC, aldanor wrote: On Wednesday, 25 September 2013 at 03:41:36 UTC, Jay Norwood wrote: I've been playing with the python pandas app enables interactive manipulation of tables of data in their dataframe structure, which they say is similar to the

Re: Data Frames in D - let's not wait for linear algebra; useful today in finance and Internet of Things

2014-12-27 Thread Laeeth Isharc via Digitalmars-d-learn
Russell: I think we are agreeing. Very lightweight editor and executor of code fragments is as good, if not better, that the one line REPL. Yes - the key for me is that the absence of a shell is by no means a reason to say that D is not suited to this task. One may wish to refine what

Re: Data Frames in D - let's not wait for linear algebra; useful today in finance and Internet of Things

2014-12-27 Thread Laeeth Isharc via Digitalmars-d-learn
On Saturday, 27 December 2014 at 16:41:04 UTC, Russel Winder via Digitalmars-d-learn wrote: On Sat, 2014-12-27 at 15:33 +, Laeeth Isharc via Digitalmars-d-learn wrote: […lots of agreed uncontentious stuff :-) …] You write as if Christensen's book The Innovator's Dilemma had never been

Re: Data Frames in D - let's not wait for linear algebra; useful today in finance and Internet of Things

2014-12-29 Thread Laeeth Isharc via Digitalmars-d-learn
On Monday, 29 December 2014 at 04:08:58 UTC, Vlad Levenfeld wrote: Laeeth - I am not sure exactly what your needs are but I have a fairly complete solution for generic multidimensional interfaces (template-based, bounds checked, RAII-ready, non-integer indices, the whole shebang) that I have

Re: Passing string literals to C

2014-12-31 Thread Laeeth Isharc via Digitalmars-d-learn
Argh - no way to edit. What's best practice here? D strings are not null-terminated. === cpling.c char* cpling(char *s) { s[0]='!'; return s; } === dcaller.d extern(C) char* cpling(char* s); void callC() { writefln(%s,fromStringz(cpling(hello\0))); } or void callC() {

Passing string literals to C

2014-12-31 Thread Laeeth Isharc via Digitalmars-d-learn
What's best practice here? D strings are not null-terminated. char* cpling(char *s) { So toString(This i

Checking C return results against NULL

2014-12-31 Thread Laeeth Isharc via Digitalmars-d-learn
Am I missing a more agreeable way to check the return value of a C function against NULL. It's fine if it's a char*, but if it returns a pointer to some kind of struct, one has to go through and convert each instance of NULL to a cast of the appropriate return type. Eg cast(funnystruct*)0

Re: Passing string literals to C

2014-12-31 Thread Laeeth Isharc via Digitalmars-d-learn
Thanks for the help. Laeeth

Re: Checking C return results against NULL

2014-12-31 Thread Laeeth Isharc via Digitalmars-d-learn
Thanks for the help. Laeeth

Re: Can the order in associative array change when keys are not midified?

2015-01-01 Thread Laeeth Isharc via Digitalmars-d-learn
On Thursday, 1 January 2015 at 18:58:04 UTC, Andrej Mitrovic via Digitalmars-d-learn wrote: On 1/1/15, Tobias Pankrath via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: You could implement an OrderedMap!(Key, Value) via RedBlackTree!(Tuple!(Key, Value), (a,b) = a[0] b[0]). We

Re: simple question about using dub to import CyberShadow's aeutils

2015-01-03 Thread Laeeth Isharc via Digitalmars-d-learn
On Saturday, 3 January 2015 at 12:08:16 UTC, Vladimir Panteleev wrote: On Saturday, 3 January 2015 at 11:58:48 UTC, Laeeth Isharc wrote: import ae.utils; ae.utils is a package, perhaps you meant to import ae.utils.xml? aha. schoolboy error on my part. thank you for your help, and

simple question about using dub to import CyberShadow's aeutils

2015-01-03 Thread Laeeth Isharc via Digitalmars-d-learn
Hi. I would like to use the XML parser from CyberShadow's ae.utils - I am building a tool to index RSS feeds in elasticsearch (something like rssriver but with more complete functionality). I am using dub to build the code. So far I just have an empty boilerplate app.d with the line import

Other libraries - web site link, and other thoughts

2015-01-26 Thread Laeeth Isharc via Digitalmars-d-learn
At the moment it goes straight go code.dlang.org, which may be a bit overwhelming if you have just arrived at dlang.org and want to see what it can do. Is it worth changing to the library wiki write up page on libraries? And making sure link to code.dlang.org is prominent, saying

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

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

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

Re: D Beginner Trying Manual Memory Management

2015-01-14 Thread Laeeth Isharc via Digitalmars-d-learn
I don't think you've read h5py source in enough detail :) You're right - I haven't done more than browsed it. It's based HEAVILY on duck typing. There is a question here about what to do in D. On the one hand, the flexibility of being able to open a foreign HDF5 file where you don't know

Re: idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-14 Thread Laeeth Isharc via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 17:41:53 UTC, Tobias Pankrath wrote: On Tuesday, 13 January 2015 at 17:19:42 UTC, Laeeth Isharc wrote: The GC is allowed to move structs around, as I undestand it. Under what circumstances do I get into trouble having a pointer to them? None, a GC that moves

Re: vibe.d Subdirectory?

2015-01-15 Thread Laeeth Isharc via Digitalmars-d-learn
On Thursday, 15 January 2015 at 14:38:16 UTC, Steven Schveighoffer wrote: On 1/14/15 11:31 AM, Laeeth Isharc wrote: To be very clear: in the simple case when you compile your vibe application from multiple source files and diet templates etc, and you will end up with an executable. This can

Re: Getting a safe path for a temporary file

2015-01-17 Thread Laeeth Isharc via Digitalmars-d-learn
On Saturday, 17 January 2015 at 13:47:39 UTC, Marc Schütz wrote: Is it currently possible to get the path to a safe temporary file, i.e. one that is guaranteed to be freshly created and will not override another existing file? There's `std.file.tempDir`, which doesn't create a unique file.

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:

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: Getting a safe path for a temporary file

2015-01-17 Thread Laeeth Isharc via Digitalmars-d-learn
On Saturday, 17 January 2015 at 16:55:42 UTC, Marc Schütz wrote: On Saturday, 17 January 2015 at 14:37:00 UTC, Laeeth Isharc wrote: On Saturday, 17 January 2015 at 13:47:39 UTC, Marc Schütz wrote: Is it currently possible to get the path to a safe temporary file, i.e. one that is guaranteed to

Re: casting SysTime to ubyte[]

2015-01-14 Thread Laeeth Isharc via Digitalmars-d-learn
I really wouldn't advise doing that. SysTime contains a long which represents the time in hnsecs since midnight, January 1st, 1 A.D., and that could be written to a file quite easily. But it also contains a reference to a TimeZone object, so what you're doing would just be writing its

Re: vibe.d Subdirectory?

2015-01-14 Thread Laeeth Isharc via Digitalmars-d-learn
Actually I want to serve some JSON packed weather data (heck I also wrote my Global Climate Model partially in D and in C) - so I guess, I can use vibe.d to build a cgi. Cool. Do you incorporate the influence of solar activity via galactic rays / cloud formation and via volcanic activity?

Re: D Beginner Trying Manual Memory Management

2015-01-14 Thread Laeeth Isharc via Digitalmars-d-learn
In the hierarchy example above (c++ hdf hierarchy link), by using UFCS to implement the shared methods (which are achieved by multiple inheritance in the c++ counterpart) did you mean something like this? // id.d struct ID { int id; ... } // location.d struct Location { ID _id; alias _id

Re: D Beginner Trying Manual Memory Management

2015-01-14 Thread Laeeth Isharc via Digitalmars-d-learn
struct File { Location _location; alias _location this; ... } // group.d public import commonfg; struct File { Location _location; alias _location this; ... } // commonfg.d { ... } enum isContainer(T) = is(T: File) || is(T : Group); auto method1(T)(T obj, args) if (isContainer!T) { ... } auto

Re: vibe.d Subdirectory?

2015-01-14 Thread Laeeth Isharc via Digitalmars-d-learn
On Wednesday, 14 January 2015 at 11:40:26 UTC, seany wrote: I am new to vibe.d and plying a bit with it. I notice, that in case of Apache, there is a root directory, often by default under /var/www or /srv/http (resp. ftp) if you are using linux, and then every time the client sends a

Re: Explicit Slicing of std.container.Array

2015-01-24 Thread Laeeth Isharc via Digitalmars-d-learn
On Saturday, 24 January 2015 at 13:11:33 UTC, Nordlöw wrote: Is there a reason why std.container.Array have to be explicitly sliced before being processed by range algorithms such as filter typically as import std.container: Array; Array!int a; foreach (e; a[].filter!true) {} ?

Re: Turning Executable into Application?

2015-01-25 Thread Laeeth Isharc via Digitalmars-d-learn
On Monday, 26 January 2015 at 03:36:32 UTC, Gan wrote: With Xamarin Studio I create a D project and run it. It runs an Executable Unix file through the terminal. How can I turn that into an Application that doesn't open the Terminal? Thanks. Have you tried running your executable from the

Re: BitArray - incomplete implementation?

2015-01-23 Thread Laeeth Isharc via Digitalmars-d-learn
To avoid confusion, the below is the code that fits the error message: import std.bitmanip; import std.stdio; import std.array; import std.range:chain; void test() { int[] a=[1,2,3,4,5]; int[] b=[5,4,3,2,1]; int[] c = chain(a,b).array; // chain two arrays of int

BitArray - incomplete implementation?

2015-01-23 Thread Laeeth Isharc via Digitalmars-d-learn
Hi. Should the following code work? import std.bitmanip; import std.stdio; import std.array; import std.range:chain; void test() { int[] a=[1,2,3,4,5]; int[] b=[5,4,3,2,1]; int[] c = chain(a,b).array; // chain two arrays of int writefln(%s,c); } void test2() {

Re: BitArray - incomplete implementation?

2015-01-23 Thread Laeeth Isharc via Digitalmars-d-learn
Yes, that error is caused by a bug of BitArray(https://issues.dlang.org/show_bug.cgi?id=13806). Having init function broke template constraints of chain(and must break dozen of other templates). pragma(msg, ElementType!(BitArray[])) // prints 'pure nothrow void(bool[] ba)' - ElementType uses

Re: foreach - premature optimization vs cultivating good habits

2015-02-01 Thread Laeeth Isharc via Digitalmars-d-learn
Thank you Adam, Bbaz and Ola for the helpful thoughts. I dumped them in a wiki page off the sandbox but needs editing and refining.

Re: foreach - premature optimization vs cultivating good habits

2015-01-30 Thread Laeeth Isharc via Digitalmars-d-learn
On Friday, 30 January 2015 at 12:55:20 UTC, Adam D. Ruppe wrote: On Friday, 30 January 2015 at 11:55:16 UTC, Laeeth Isharc wrote: As I understand it, foreach allocates when a simple C-style for using an array index would not. foreach is just syntax sugar over a for loop. If there's any

Re: simple dub question - avoiding creating a vibed project

2015-01-05 Thread Laeeth Isharc via Digitalmars-d-learn
On Monday, 5 January 2015 at 10:46:17 UTC, Rikki Cattermole wrote: On 5/01/2015 11:42 p.m., Laeeth Isharc wrote: Figured out a fix: versions: [VibeCustomMain], It is still mysterious as to why it is pulling in vibed though (I don't import it, and I didn't think ddbc did).

simple dub question - avoiding creating a vibed project

2015-01-05 Thread Laeeth Isharc via Digitalmars-d-learn
Hi. I am building an example for hibernated (I put a main around the sample code extract from the website). How do I stop dub trying to build a vibed project? Here is my dub.json { name: ddbc example, description: example for DB Connector for D language, similar to JDBC,

Re: simple dub question - avoiding creating a vibed project

2015-01-05 Thread Laeeth Isharc via Digitalmars-d-learn
Figured out a fix: versions: [VibeCustomMain], It is still mysterious as to why it is pulling in vibed though (I don't import it, and I didn't think ddbc did).

Re: simple dub question - avoiding creating a vibed project

2015-01-05 Thread Laeeth Isharc via Digitalmars-d-learn
I opened an issue about this last year: https://github.com/mysql-d/mysql-native/issues/44 Thanks. Laeeth.

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

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

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

Any chance of a linux dtoh?

2015-01-06 Thread Laeeth Isharc via Digitalmars-d-learn
I realize Walter has far better things to work on, but value of having a translation tool is considerable, since it opens up easy access to an enormous range of libraries. It is not much work to do the translation oneself, but in the world as it is small frictions cumulatively have large

Re: Any chance of a linux dtoh?

2015-01-06 Thread Laeeth Isharc via Digitalmars-d-learn
On Tuesday, 6 January 2015 at 14:11:19 UTC, Dicebot wrote: dstep is your only realistic chance currently. htod is completely unmaintained, even on Windows. Please report any issues found with it in relevant issue tracker. I got it the wrong way around - yes, I meant htod. I have reported the

Re: idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-10 Thread Laeeth Isharc via Digitalmars-d-learn
Small recommendation (apart from the reserved word issue which you fixed): it's generally considered good D style to give structs and classes names that start with capital letters, JustLikeThis. So, I suggest Node rather than node. Very minor point, and of course, your code is yours to style

Re: Wrapping a C library with its own GC + classes vs refcounted structs

2015-01-10 Thread Laeeth Isharc via Digitalmars-d-learn
Hi Aldanor. I wrote a slightly longer reply, but mislaid the file somewhere. I guess your question might relate to wrapping the HDF5 library - something that I have already done in a basic way, although I welcome your project, as no doubt we will get to a higher quality eventual solution

endsWith - for a string vs an array of strings

2015-01-10 Thread Laeeth Isharc via Digitalmars-d-learn
I understand from previous discussion there is some difficulty over immutability. I did not quite figure out what the solution was in this case: import std.array; import std.string; import std.stdio; void main(string[] args) { string[] test=[1,two,three!]; auto

casting SysTime to ubyte[]

2015-01-12 Thread Laeeth Isharc via Digitalmars-d-learn
import std.datetime; import std.stdio; import std.conv; void main(string[] arg) { auto a=Clock.currTime(); auto b=cast(ubyte[])a; writefln(%s,b); } how do i get the time as a binary representation I can write to a file? Thanks.

Re: endsWith - for a string vs an array of strings

2015-01-12 Thread Laeeth Isharc via Digitalmars-d-learn
Thanks for the help to everyone. It seems a common thing to want to check an array as one may not know the variables at compile time. Not that it's more than a few lines to do in D. But in terms of language adoption, small frictions can have large consequences over time. (Modern people

Re: Wrapping a C library with its own GC + classes vs refcounted structs

2015-01-12 Thread Laeeth Isharc via Digitalmars-d-learn
Laeeth. Thanks for the reply. Yes, this concerns my HDF5 wrapper project; the main concern is not that the memory consumption of course, but rather explicitly controlling lifetimes of the objects (especially objects like files -- so you are can be sure there are no zombie handles floating

Re: How to prevent sensitive information is displayed when the extension 'exe' is modified to 'txt' on windows?

2015-01-07 Thread Laeeth Isharc via Digitalmars-d-learn
What you want is some kind of code obfuscation. The easiest thing for you is to use exe compression. It is not going to stop a dedicated attacker, but ordinary people will not be able to extract any information from it. And I guess as an alternative to the utility you linked to, you

Re: D Beginner Trying Manual Memory Management

2015-01-13 Thread Laeeth Isharc via Digitalmars-d-learn
I see, thanks! :) I've started liking structs more and more recently as well and been pondering on how to convert a class-based code that looks like this (only the base class has any data): it's hard to tell by brief description. but having multiple inheritance immediately rings an

Re: idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-13 Thread Laeeth Isharc via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 14:59:58 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Wed, Jan 07, 2015 at 02:52:51PM +, Laeeth Isharc via Digitalmars-d-learn wrote: Another schoolboy question. Suppose I am constructing a tree (in this case it is an AST). In C I would have a pointer

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,

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 -

<    1   2   3   4   5   6   7   8   9   10   >