Re: Can't get dub dustmite to work

2020-04-27 Thread Aliak via Digitalmars-d-learn
On Monday, 27 April 2020 at 06:23:08 UTC, Andre Pany wrote: On Sunday, 26 April 2020 at 22:07:56 UTC, aliak wrote: On Saturday, 25 April 2020 at 18:52:45 UTC, Andre Pany wrote: [...] I'm sorry I didn't follow. You mean like: "dub test" ?? I dont pass anything to the -b or -c flag if that'

Re: Can't get dub dustmite to work

2020-04-27 Thread Andre Pany via Digitalmars-d-learn
On Monday, 27 April 2020 at 07:06:03 UTC, Aliak wrote: On Monday, 27 April 2020 at 06:23:08 UTC, Andre Pany wrote: On Sunday, 26 April 2020 at 22:07:56 UTC, aliak wrote: On Saturday, 25 April 2020 at 18:52:45 UTC, Andre Pany wrote: [...] I'm sorry I didn't follow. You mean like: "dub test"

Re: Can't get dub dustmite to work

2020-04-27 Thread Anonymouse via Digitalmars-d-learn
On Sunday, 26 April 2020 at 22:05:20 UTC, aliak wrote: On Saturday, 25 April 2020 at 19:00:55 UTC, Anonymouse wrote: On Saturday, 25 April 2020 at 09:38:59 UTC, aliak wrote: Then I run this dub dustmite command: dub dustmite -b unittest ../dubdust --compiler-regex="never matches" I have had

Rust, D, GTK+, and asynchronous working

2020-04-27 Thread Russel Winder via Digitalmars-d-learn
Hi, Background: I chose to rewrite a Python/PySide2/Qt application in X/GTK+. After much dithering I was pushed to Rust/gtk-rs/GTK+ and set to it. Then I decided to do D/GtkD/GTK+ as well. Totally unscientific, biased, and indeed prejudiced result is that D is a nicer programming language to work

Re: Rust, D, GTK+, and asynchronous working

2020-04-27 Thread Daniel Kozak via Digitalmars-d-learn
On Mon, Apr 27, 2020 at 11:56 AM Russel Winder via Digitalmars-d-learn wrote: > > Hi, > > Background: I chose to rewrite a Python/PySide2/Qt application in > X/GTK+. After much dithering I was pushed to Rust/gtk-rs/GTK+ and set > to it. Then I decided to do D/GtkD/GTK+ as well. > > Totally unscien

Re: GtkD - how to list 0..100K strings

2020-04-27 Thread mark via Digitalmars-d-learn
I've now got it to work but it is unusable! It can show small numbers of rows with no problem. However, if it has to show 100s of rows it expands the tree vertically way beyond the bottom of the screen and is impossible to navigate. However, if it has to show 1000s of rows it goes into an in

Re: GtkD - how to list 0..100K strings [solved]

2020-04-27 Thread mark via Digitalmars-d-learn
I renamed the class shown in my previous post from View to InnerView, then created a new View class: class View : ScrolledWindow { import qtrac.debfind.modelutil: NameAndDescription; InnerView innerView; this() { super(); innerView = new InnerView; addWithVi

Re: GtkD - how to list 0..100K strings: new problem

2020-04-27 Thread mark via Digitalmars-d-learn
With the new code if I have 1000s of rows I get this error: (DebFind:8087): Gdk-ERROR **: 11:50:46.787: The program 'DebFind' received an X Window System error. This probably reflects a bug in the program. The error was 'BadAlloc (insufficient resources for operation)'. (Details: serial 8810

It won't run in gdb...

2020-04-27 Thread mark via Digitalmars-d-learn
: dub build Performing "debug" build using /home/mark/opt/ldc2-1.21.0-linux-x86_64/bin/ldc2 for x86_64. aaset 0.2.5: target for configuration "library" is up to date. gtk-d:gtkd 3.9.0: target for configuration "library" is up to date. debfind ~master: target for configuration "application" is u

Re: GUI library for DMD 2.090 or DMD 2.091

2020-04-27 Thread Paulo Pinto via Digitalmars-d-learn
On Sunday, 26 April 2020 at 09:09:04 UTC, Antonio Corbi wrote: On Saturday, 25 April 2020 at 09:30:44 UTC, Paulo Pinto wrote: On Friday, 24 April 2020 at 18:52:55 UTC, Russel Winder wrote: [...] Just curious, how do you handle the whole RC> story in Gtk-rs? For me it made the point that la

GtkD crash: 'BadAlloc (insufficient resources for operation)'

2020-04-27 Thread mark via Digitalmars-d-learn
I'm getting a crash when I add 1000s of rows to a tree (up to 100s seems to work ok). The source code is here: https://github.com/mark-summerfield/debfind Note that this will only build and run on a Debian or Debian-derived system (e.g., Ubuntu). I am pretty well reaching the point of giving

Re: GUI library for DMD 2.090 or DMD 2.091

2020-04-27 Thread Antonio Corbi via Digitalmars-d-learn
On Monday, 27 April 2020 at 11:27:57 UTC, Paulo Pinto wrote: On Sunday, 26 April 2020 at 09:09:04 UTC, Antonio Corbi wrote: On Saturday, 25 April 2020 at 09:30:44 UTC, Paulo Pinto wrote: On Friday, 24 April 2020 at 18:52:55 UTC, Russel Winder wrote: [...] Just curious, how do you handle the

Re: It won't run in gdb...

2020-04-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Mon, Apr 27, 2020 at 10:56:09AM +, mark via Digitalmars-d-learn wrote: > Thread 1 "DebFind" received signal SIGUSR1, User defined signal 1. The GC sends that signal to pause other threads when it is about to collect. You can tell gdb to just ignore it. handle SIGUSR1 noprint handle SIGUSR2

Help, what is the code mean?

2020-04-27 Thread lilijreey via Digitalmars-d-learn
Hi: In dlang core.thread.osthread has below code, the 654 line code i can understand why write () first, and {m_fn = fn;}() do what? ``` this( void function() fn, size_t sz = 0 ) @safe pure nothrow @nogc 647 in 648 { 649 assert( fn ); 650 } 651 do

Re: Help, what is the code mean?

2020-04-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 27 April 2020 at 13:29:08 UTC, lilijreey wrote: Hi: In dlang core.thread.osthread has below code, the 654 line code i can understand why write () first, and {m_fn = fn;}() do what? The stdlib uses that pattern from time to time to indicate an unsafe block in an otherwise safe

Re: GtkD crash: 'BadAlloc (insufficient resources for operation)'

2020-04-27 Thread Cogitri via Digitalmars-d-learn
Hello, could you try what the error message suggest you to do: On Monday, 27 April 2020 at 12:03:18 UTC, mark wrote: (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with th

Re: GtkD crash: 'BadAlloc (insufficient resources for operation)'

2020-04-27 Thread mark via Digitalmars-d-learn
I took Adam's advice about .gdbinit and now it runs in gdb. When I ran the program I did Find 'memoize' which worked. Then 'memoize python' which also worked. Then said to find 'any word' (which produces 1000s of rows) at which point it crashed. Below is the bt. Does it look like my bug or a G

Re: It won't run in gdb...

2020-04-27 Thread mark via Digitalmars-d-learn
On Monday, 27 April 2020 at 12:26:23 UTC, Adam D. Ruppe wrote: On Mon, Apr 27, 2020 at 10:56:09AM +, mark via Digitalmars-d-learn wrote: Thread 1 "DebFind" received signal SIGUSR1, User defined signal 1. The GC sends that signal to pause other threads when it is about to collect. You can

Re: Help, what is the code mean?

2020-04-27 Thread lilijreey via Digitalmars-d-learn
The stdlib uses that pattern from time to time to indicate an unsafe block in an otherwise safe function. Specifically it is a little trusted inline function being immediately called. It is something that should be avoided whenever you can. Thanks your help. where is unsafe in above code?

Re: Help, what is the code mean?

2020-04-27 Thread data pulverizer via Digitalmars-d-learn
On Monday, 27 April 2020 at 13:36:25 UTC, Adam D. Ruppe wrote: On Monday, 27 April 2020 at 13:29:08 UTC, lilijreey wrote: Hi: In dlang core.thread.osthread has below code, the 654 line code i can understand why write () first, and {m_fn = fn;}() do what? The stdlib uses that pattern from

Re: Help, what is the code mean?

2020-04-27 Thread drug via Digitalmars-d-learn
27.04.2020 18:28, data pulverizer пишет: I'm probably not the first person to say this but. Isn't @trusted an odd label to give unsafe functions and open to abuse by unscrupulous programmers? It almost says "nothing to see, this here piece of code is a-ok". Shouldn't it be explicitly labelled a

Re: Help, what is the code mean?

2020-04-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 27 April 2020 at 15:24:09 UTC, lilijreey wrote: Thanks your help. where is unsafe in above code? It depends on the context but I assume it is because it is storing a reference to the function across thread boundaries, something normally banned, but since it is (I believe) a private

Implicit Function Template Instantiation (IFTI) Question

2020-04-27 Thread jmh530 via Digitalmars-d-learn
When using a template with multiple functions within it, is it possible to access the underlying functions directly? Not sure I am missing anything, but what works when the functions are named differently from the headline template doesn't work when the functions are named the same. import st

Re: Implicit Function Template Instantiation (IFTI) Question

2020-04-27 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/27/20 1:19 PM, jmh530 wrote: When using a template with multiple functions within it, is it possible to access the underlying functions directly? Not sure I am missing anything, but what works when the functions are named differently from the headline template doesn't work when the functio

Re: Implicit Function Template Instantiation (IFTI) Question

2020-04-27 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Apr 27, 2020 at 05:19:35PM +, jmh530 via Digitalmars-d-learn wrote: > When using a template with multiple functions within it, is it > possible to access the underlying functions directly? Yes, but only if the template is not eponymous. > Not sure I am missing anything, but what work

Re: Implicit Function Template Instantiation (IFTI) Question

2020-04-27 Thread jmh530 via Digitalmars-d-learn
On Monday, 27 April 2020 at 17:40:06 UTC, Steven Schveighoffer wrote: [snip] Thanks for that. Very detailed. In terms of a use case, we just added a center function to mir [1]. It can take an alias to a function. I wanted to add a check that the arity of the function was 1, but it turned out