Unfortunately that library has no dub package.
But you can include it in your project.
See info here http://code.dlang.org/package-format
I can't understand how to set in dub that I need to to include in
compilation process other files... Could you help me?
I think it is a bug.
Executing linked code from a mixin statement should not reduce
the scope of the mixin, IMHO.
I will file a bug report.
On Saturday, 25 October 2014 at 21:35:44 UTC, Ali Çehreli wrote:
On 10/25/2014 08:56 AM, Rares Pop wrote:
> Indeed it worked. What is the rationale behi
On Sat, Oct 25, 2014 at 10:54:53PM -0400, Etienne Cimon via Digitalmars-d-learn
wrote:
> On 2014-10-25 21:26, H. S. Teoh via Digitalmars-d-learn wrote:
> >Not sure what nm uses, but a lot of posix tools for manipulating
> >object files are based on binutils, which understands the local
> >system's
On 2014-10-25 21:26, H. S. Teoh via Digitalmars-d-learn wrote:
Not sure what nm uses, but a lot of posix tools for manipulating object
files are based on binutils, which understands the local system's object
file format and deal directly with the binary representation. The
problem is, I don't kno
On Sat, Oct 25, 2014 at 08:05:18PM +, John Colvin via Digitalmars-d-learn
wrote:
> On Saturday, 25 October 2014 at 18:40:23 UTC, H. S. Teoh via
> Digitalmars-d-learn wrote:
> >Actually, the object file (library) itself should already have a list
> >of exported symbols; you could then use core.
On Saturday, 25 October 2014 at 21:52:13 UTC, MachineCode wrote:
Where is a variable declared in a module allocated? is it same
as a C's global?
for example:
module foo;
int myvar;
that is in thread local storage.
__shared, shared or immutable cause the variable to be in classic
global sto
Where is a variable declared in a module allocated? is it same as
a C's global?
for example:
module foo;
int myvar;
On 10/25/2014 08:56 AM, Rares Pop wrote:
> Indeed it worked. What is the rationale behind the mixin(fullName) ?
__traits(getAttributes) requires a symbol but fullName is a string.
Mixing it in as code fulfills the requirement.
> However, in my project the injections function, the @Inject UDA
Another option for html is my dom.d
https://github.com/adamdruppe/arsd
get dom.d and characterencodings.d in your project directory.
compile with dmd yourfile.d dom.d characterencodings.d
here's an example:
import arsd.dom;
void main() {
auto document = new Document();
// The example
On Saturday, 25 October 2014 at 18:40:23 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
Actually, the object file (library) itself should already have
a list of
exported symbols; you could then use core.demangle to extract
the
function signatures from the mangled symbols and construct a
hash of
On Saturday, 25 October 2014 at 19:55:10 UTC, Suliman wrote:
How I can build such App with DUB?
Unfortunately that library has no dub package.
But you can include it in your project.
See info here http://code.dlang.org/package-format
How I can build such App with DUB?
You need to pass a library to compiler as well (all its files
or .lib/.a file) if it is compiled as static library
You can try
dmd find_links.d dhtmlparser.d quote_escaper.d
C:\Users\Dima\Downloads\DHTMLParser-master\DHTMLParser-master>dmd
find_links.d quote_escaper.d
OPTLINK (R) for Win3
On Saturday, 25 October 2014 at 19:51:48 UTC, Suliman wrote:
You need to pass a library to compiler as well (all its files
or .lib/.a file) if it is compiled as static library
You can try
dmd find_links.d dhtmlparser.d quote_escaper.d
C:\Users\Dima\Downloads\DHTMLParser-master\DHTMLParser-
On Saturday, 25 October 2014 at 19:46:01 UTC, MrSmith wrote:
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
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
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-2013 All rights reserved.
http://www.digitalmars.com/ctg/optli
On Saturday, 25 October 2014 at 18:38:12 UTC, John Colvin wrote:
On Saturday, 25 October 2014 at 17:14:51 UTC, Jkpl wrote:
Everything is in the Q. I ask this because those functions are
hidden behind symbols and keywords (+=, ~, in, etc.). It's not
that obvious for a user who would write a cust
On 10/25/14 7:44 AM, Shriramana Sharma via Digitalmars-d-learn wrote:
Hello. Please see the following and say whether they're OK to submit
as bugs for improving the error messages. Thanks.
ref int foo(ref int x) { return x ; }
void main () {
foo(3) ;
// Error: function rvalue_argument.foo
On Sat, Oct 25, 2014 at 12:15:19PM -0400, Etienne Cimon via Digitalmars-d-learn
wrote:
> On 2014-10-25 11:56, Etienne Cimon wrote:
> >That looks like exactly the solution I need, very clever. It'll take
> >some time to wrap my head around it :-P
It's not that complicated, really. It's basically p
On Saturday, 25 October 2014 at 17:14:51 UTC, Jkpl wrote:
Everything is in the Q. I ask this because those functions are
hidden behind symbols and keywords (+=, ~, in, etc.). It's not
that obvious for a user who would write a custom type.
e.g:
---
struct myType
{
@safe nothrow opIn
Everything is in the Q. I ask this because those functions are
hidden behind symbols and keywords (+=, ~, in, etc.). It's not
that obvious for a user who would write a custom type.
e.g:
---
struct myType
{
@safe nothrow opIndexAssign(t1 paramValue,t2 paramIndex){}
}
---
are
On Saturday, 25 October 2014 at 16:01:29 UTC, Rares Pop wrote:
I've uploaded the code here:
https://github.com/fusionbeam/infuse
compiling with ldc2 exhibits the same behaviour.
'Error: undefined identifier B'
On 2014-10-25 11:56, Etienne Cimon wrote:
That looks like exactly the solution I need, very clever. It'll take
some time to wrap my head around it :-P
Just brainstorming here, but I think every dynamic library should hold a
utility container (hash map?) that searches for and returns the mangle
On Sat, Oct 25, 2014 at 8:00 PM, H. S. Teoh via Digitalmars-d-learn
wrote:
>
> I agree with submitting both of these as enhancement requests. Please
> tag them with "diagnostic" in the keywords field.
Done:
https://issues.dlang.org/show_bug.cgi?id=13655
https://issues.dlang.org/show_bug.cgi?id=1
I've uploaded the code here:
https://github.com/fusionbeam/infuse
Ali,
Many thanks for your help.
Indeed it worked. What is the rationale behind the
mixin(fullName) ?
However, in my project the injections function, the @Inject UDA
struct and some other dependencies are defined in a library
(libinfuse).
In this format the compiler gives the undefined ident
That looks like exactly the solution I need, very clever. It'll take
some time to wrap my head around it :-P
Ali,
Many thanks for your help.
What is the rationale for mixin(fullName) ?
On 10/25/2014 07:45 AM, Rares Pop wrote:
On Saturday, 25 October 2014 at 13:53:35 UTC, Adam D. Ruppe wrote:
On Saturday, 25 October 2014 at 13:45:29 UTC, Rares Pop wrote:
What do you mean by copy/pasting ?
I literally copied the code in your post (and fixed a missing
semicolon) and got it to
On Sat, Oct 25, 2014 at 09:20:33AM -0400, Etienne Cimon via Digitalmars-d-learn
wrote:
> I haven't been able to find much about pragma mangle. I'd like to do
> the following:
>
> http://forum.dlang.org/thread/hznsrmviciaeirqkj...@forum.dlang.org#post-zhxnqqubyudteycwudzz:40forum.dlang.org
>
> Th
On Saturday, 25 October 2014 at 13:53:35 UTC, Adam D. Ruppe wrote:
On Saturday, 25 October 2014 at 13:45:29 UTC, Rares Pop wrote:
What do you mean by copy/pasting ?
I literally copied the code in your post (and fixed a missing
semicolon) and got it to compile.
Passing A as an argument to in
On Sat, Oct 25, 2014 at 12:28:39PM +, ixid via Digitalmars-d-learn wrote:
> T shadow(T = int)(T a) {
> alias T = string;
> T b = "hi";
> T c = 1; // Error
>
> writeln(typeof(a).stringof); // int
> writeln(typeof(b).stringof); // string
>
> return a;
> }
>
On Sat, Oct 25, 2014 at 05:14:31PM +0530, Shriramana Sharma via
Digitalmars-d-learn wrote:
> Hello. Please see the following and say whether they're OK to submit
> as bugs for improving the error messages. Thanks.
>
> ref int foo(ref int x) { return x ; }
>
> void main () {
> foo(3) ;
> // E
On Saturday, 25 October 2014 at 13:45:29 UTC, Rares Pop wrote:
What do you mean by copy/pasting ?
I literally copied the code in your post (and fixed a missing
semicolon) and got it to compile.
Passing A as an argument to injections should work. You can also
use this and typeof(this) inside
Thanks for the quick response.
What do you mean by copy/pasting ?
On Saturday, 25 October 2014 at 13:40:56 UTC, Adam D. Ruppe wrote:
On Saturday, 25 October 2014 at 13:37:56 UTC, Rares Pop wrote:
Aiming to generate code based on UDA I wonder if the following
is possible:
Yes, and copy/pasting
On 2014-10-25 13:37:54 +, Rares Pop said:
Hello everyone,
I am trying to understand UDA traits scoping while mixing in code.
Aiming to generate code based on UDA I wonder if the following is possible:
class A
{
@Inject
Logger logger;
@Inject
SomeOtherClass dependency;
On Saturday, 25 October 2014 at 13:37:56 UTC, Rares Pop wrote:
Aiming to generate code based on UDA I wonder if the following
is possible:
Yes, and copy/pasting that works for me...
Hello everyone,
I am trying to understand UDA traits scoping while mixing in code.
Aiming to generate code based on UDA I wonder if the following is
possible:
class A
{
@Inject
Logger logger;
@Inject
SomeOtherClass dependency;
mixin injections!(A)
...
}
In "injections" funct
I haven't been able to find much about pragma mangle. I'd like to do the
following:
http://forum.dlang.org/thread/hznsrmviciaeirqkj...@forum.dlang.org#post-zhxnqqubyudteycwudzz:40forum.dlang.org
The part I find ugly is this:
void* vp = dlsym(lib, "_D6plugin11getInstanceFZC2bc2Bc\0".ptr);
I wa
T shadow(T = int)(T a) {
alias T = string;
T b = "hi";
T c = 1; // Error
writeln(typeof(a).stringof); // int
writeln(typeof(b).stringof); // string
return a;
}
Are there uses for this shadowing of type names? It seems a
little dangerous, for exa
Shriramana Sharma:
int i ;
ref ir = i ;
// Error: variable ref_type.main.ir only parameters or foreach
declarations can be ref
// Comment: add ", return values" after "parameters"
}
I like this.
Bye,
bearophile
// MGW 05.01.14
// We model in D object C ++ QByteArray from Qt.
//
// Windows: dmd st1.d
// Linux: dmd st1.d -L-ldl
import core.runtime; // Load DLL for Win
import std.stdio;// writeln
version(linux) {
import core.sys.posix.dlfcn; /
Hello. Please see the following and say whether they're OK to submit
as bugs for improving the error messages. Thanks.
ref int foo(ref int x) { return x ; }
void main () {
foo(3) ;
// Error: function rvalue_argument.foo (ref int x) is not callable
using argument types (int)
// Comment: "argum
Where I can find compatibility with D online regexp constructor?
45 matches
Mail list logo