Re: Shared library: loading doesn't call shared static this

2013-12-07 Thread yazd
On Saturday, 7 December 2013 at 20:11:15 UTC, Mathias LANG wrote: Hello, I'm in the process of creating a PAM module using D. First step, I ported and the included pam/_types.h> to D, pretty straightforward. Then I created a simple D source, which looks like: extern(C) int pam_sm_open_

Re: libdl issues with DUB

2013-12-17 Thread yazd
On Tuesday, 17 December 2013 at 12:41:16 UTC, Flamaros wrote: When I build our project with DUB under linux I get some link errors about libdl, that is messing. In my main I have the following lines : version(Posix) { pragma(lib, "dl"); } This works well with MonoD, so it seems like versio

Re: Getting backtrace

2014-01-08 Thread yazd
On Wednesday, 8 January 2014 at 20:25:28 UTC, Xavier Bigand wrote: Is there a way to get backtrace outside exceptions? If you're on Linux, you can try this library: https://github.com/yazd/backtrace-d

Re: Why CTFE is context-sensitive?

2014-01-26 Thread yazd
On Sunday, 26 January 2014 at 09:59:01 UTC, Pierre Talbot wrote: Hi, I was wondering why CTFE is context sensitive, why don't we check every expressions and run the CTFE if it applies? The halting problem possibly?

Re: Mutexes and locking

2014-03-03 Thread yazd
On Monday, 3 March 2014 at 08:18:04 UTC, alexhairyman wrote: On Monday, 3 March 2014 at 07:38:05 UTC, Ali Çehreli wrote: On 03/02/2014 10:38 PM, alexhairyman wrote: > I think I'm missing something big, but I'm having troubles with mutexes > (using in a parallel foreach loop somewhere else); Why

Re: Benchmark Dlang vs Node vs Ruby

2016-05-27 Thread yazd via Digitalmars-d-learn
On Friday, 27 May 2016 at 13:45:23 UTC, llaine wrote: Hi guys, In my journey of learning about D I tried to benchmark D with Vibe.d vs node with express and Ruby with Sinatra. And the results are pretty surprising. I have to admit that I though D was more faster than that. How is this even p

Re: Benchmark Dlang vs Node vs Ruby

2016-05-27 Thread yazd via Digitalmars-d-learn
On Friday, 27 May 2016 at 14:46:47 UTC, llaine wrote: On Friday, 27 May 2016 at 14:17:16 UTC, Adam D. Ruppe wrote: On Friday, 27 May 2016 at 13:45:23 UTC, llaine wrote: I am doing something wrong ? So, the benchmark, the Ruby, and the JS all use the path to be / the D seems to use /compa

Re: Writing to stdin of a process

2014-04-26 Thread yazd via Digitalmars-d-learn
On Saturday, 26 April 2014 at 08:45:59 UTC, Craig Dillabaugh wrote: I want to be able to write to the stdin stream of an external process using std.process. I have the following small test app. myecho.d -- import std.stdio; void

Re: Reading ELF Files

2014-05-01 Thread yazd via Digitalmars-d-learn
On Thursday, 1 May 2014 at 11:38:50 UTC, Nordlöw wrote: Have anybody put together some D code for reading out tables from ELF files? A range/slice based version would be nice. I have some simple proof of concept code. It is currently able to read elf64 (can be easily adjusted to read elf32 t

Re: Reading ELF Files

2014-05-01 Thread yazd via Digitalmars-d-learn
On Thursday, 1 May 2014 at 13:10:33 UTC, Nordlöw wrote: again, it is quite simplistic). If you specify what you need a bit more, I might be able to provide that. Please, post :) Here you go, https://github.com/yazd/elf-d.

Re: Reading ELF Files

2014-05-02 Thread yazd via Digitalmars-d-learn
On Thursday, 1 May 2014 at 17:31:52 UTC, Nordlöw wrote: Here you go, https://github.com/yazd/elf-d. Thanks! Anytime. By the way, if you need more stuff out of it or help, post an issue on github. I think I'll be able to help a bit more. But if this library is to move forward, the API

Re: Reading ELF Files

2014-05-04 Thread yazd via Digitalmars-d-learn
On Friday, 2 May 2014 at 15:25:55 UTC, Nordlöw wrote: On Friday, 2 May 2014 at 10:42:40 UTC, yazd wrote: On Thursday, 1 May 2014 at 17:31:52 UTC, Nordlöw wrote: Here you go, https://github.com/yazd/elf-d. Thanks! Anytime. By the way, if you need more stuff out of it or help, post an issue

Re: Building library

2014-08-29 Thread yazd via Digitalmars-d-learn
On Thursday, 28 August 2014 at 19:29:40 UTC, papaboo wrote: Hey I've just started getting into D and so far I'm just messing around with it in a small math library. However I've run into an issue while trying to build a library and linking it with my main file. My current file and module layout

Re: line numbers in linux stack traces?

2014-10-07 Thread yazd via Digitalmars-d-learn
e runtime, or to see stack traces of crashes inside the runtime/phobos, you may need to rebuild Phobos and Druntime with -gs. Don't use -gc, it is no longer relevant. Btw, I have some code that parses elf/dwarf and maps addresses to file/line information here: https://github.com/yazd/elf-

Re: std.container.Array deep-copy?

2014-10-09 Thread yazd via Digitalmars-d-learn
On Thursday, 9 October 2014 at 21:24:55 UTC, qznc wrote: On Thursday, 9 October 2014 at 21:14:46 UTC, qznc wrote: How can you deep-copy a std.container.Array instance? Ok, the deep-copy problem already got resolved on reddit: Use dup. However, the error is still open. You cannot give an Arr

Re: std.container.Array deep-copy?

2014-10-10 Thread yazd via Digitalmars-d-learn
Like the following? That did not work. Array!Foo y = Array!Foo(x[]); How does it not work? It compiles successfully: http://dpaste.dzfl.pl/583d20e426a0

Re: HTML Parsing lib

2014-10-26 Thread yazd via Digitalmars-d-learn
On Saturday, 25 October 2014 at 19:44:25 UTC, Suliman wrote: I found only https://github.com/Bystroushaak/DHTMLParser But I can't get it work: C:\Users\Dima\Downloads\DHTMLParser-master\DHTMLParser-master>dmd find_links.d OPTLINK (R) for Win32 Release 8.00.15 Copyright (C) Digital Mars 1989-2

Re: std.file.readText() extra Line Feed character

2014-12-18 Thread yazd via Digitalmars-d-learn
On Thursday, 18 December 2014 at 10:16:38 UTC, Colin wrote: On Thursday, 18 December 2014 at 09:25:47 UTC, ketmar via Digitalmars-d-learn wrote: On Thu, 18 Dec 2014 09:18:35 + Colin via Digitalmars-d-learn wrote: Why does std.file.readText() append a Line Feed char onto the end of the s

Re: What does dmd 2.066 want from me?

2015-01-07 Thread yazd via Digitalmars-d-learn
If you have just installed a newer compiler and trying to link with older compiled code, then linking and other things can get wrong. I suggest recompiling all of your code using the new compiler.

Re: getting started with std.csv

2015-04-06 Thread yazd via Digitalmars-d-learn
I got this to work with: ``` import std.stdio, std.file, std.csv, std.range; void main() { std.file.write("test.csv", "0,1,abc\n2,3,def"); scope(exit) std.file.remove("test.csv"); static struct Rec { int a, b; char[] c; } auto file = File("test.csv", "r");

Re: getting started with std.csv

2015-04-06 Thread yazd via Digitalmars-d-learn
On Tuesday, 7 April 2015 at 05:49:48 UTC, yazd wrote: I got this to work with: ``` import std.stdio, std.file, std.csv, std.range; void main() { std.file.write("test.csv", "0,1,abc\n2,3,def"); scope(exit) std.file.remove("test.csv"); stat

Re: getting started with std.csv

2015-04-07 Thread yazd via Digitalmars-d-learn
On Tuesday, 7 April 2015 at 05:51:33 UTC, yazd wrote: On Tuesday, 7 April 2015 at 05:49:48 UTC, yazd wrote: I got this to work with: ``` import std.stdio, std.file, std.csv, std.range; void main() { std.file.write("test.csv", "0,1,abc\n2,3,def"); scope(e