Re: DConf 2017 Videos

2020-04-25 Thread Walter Bright via Digitalmars-d-learn

On 4/25/2020 4:11 AM, Jacob Carlborg wrote:
I have previously downloaded the DConf videos. I sent them to Mike for him to 
upload.


Thank you! You have certainly saved the day here!



Re: Allocate more space for fiber if gardpage hit?

2020-04-25 Thread Crayo List via Digitalmars-d-learn

On Friday, 24 April 2020 at 04:58:52 UTC, Kaitlyn Emmons wrote:

On Friday, 24 April 2020 at 04:50:12 UTC, Kaitlyn Emmons wrote:

Is it possible on windows to dynamically size fibers?


follow up question, if i allocate way more space for a bunch of 
fibers then they need, will the space just get reserved? EG if 
i have a fiber that never goes beyond 4 pages but i create it 
with 32... will the later pages ever get assigned physical 
memory?


It looks like it will allocate all.
https://github.com/dlang/druntime/blob/e71d88ca4eff9fafeba4438301158b0c0fafa284/src/core/thread/fiber.d#L974


Re: Can't get dub dustmite to work

2020-04-25 Thread Anonymouse via Digitalmars-d-learn

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 zero luck with dustmite via dub. I would honestly 
recommend that you create a shell script that does `dub test 2>&1 
| grep "never matches"`, and just use that as a tester with 
dustmite directly.


Re: Can't get dub dustmite to work

2020-04-25 Thread Andre Pany via Digitalmars-d-learn

On Saturday, 25 April 2020 at 09:38:59 UTC, aliak wrote:
Trying to get dub dustmite to work, but I keep getting "initial 
test fails"


This is the error from a vanilla dub test:

```
result ~wip: building configuration "result-test-unittest"...
inout(SumType!(int, FailureContainer))
../../.dub/packages/sumtype-0.9.4/sumtype/src/sumtype.d(1322,4): Error: static assert:  
"handler #1 of type Optional!(Exception) function(FailureContainer container) pure 
nothrow @nogc @safe never matches"
../../.dub/packages/sumtype-0.9.4/sumtype/src/sumtype.d(1165,14):
   instantiated from here: matchImpl!(inout(SumType!(int, 
FailureContainer)))
source/result/result.d(136,20):instantiated from here: 
match!(inout(SumType!(int, FailureContainer)))
tests/result.d(20,20):instantiated from here: 
Result!(int, Exception)

dmd failed with exit code 1.
```

Then I run this dub dustmite command:

dub dustmite -b unittest ../dubdust --compiler-regex="never 
matches"


And I get:

```
...
Loading /Users/aliak/dev/dubdust/vibe-d/web/vibe/web/web.d
None => No
Hint: use --no-redirect to see test script output
Hint: read 
https://github.com/CyberShadow/DustMite/wiki#initial-test-fails
object.Exception@DustMite/dustmite.d(295): Initial test fails: 
Test script "/usr/local/Cellar/dub/1.20.0/bin/dub dustmite 
--vquiet --test-package=result --build=unittest 
--config=library \"--compiler=dmd\" \"--compiler-regex=never 
matches\"" exited with exit code 3 (failure)

```

* --no-redirect doesn't work in dub dustmite.
* I tried adding --compiler-status=1 with the same result
* I tired --combined with the same result

My dub.json for the unittest configuration is (incase that 
matters):

{
"name": "unittest",
"importPaths": [
"./tests"
],
"sourcePaths": [
"./tests"
]
},

Thanks for any help!


How do you call dub test causing the issue? Maybe there is a 
difference in the configuration/build type.


Also a side remark. You cannot use the output of dmd when 
colouring is on. Dmd lies because the backticks used for 
colouring are not shown. But without them, regex search is 
failing.


I also wonder whether dub Dustmite should be enhanced to search 
for a plain text too. Because while using regex search there 
might be characters which have a regex meaning while user just 
want a simple text search. This could also cause issues.


Kind regards
Andre



Re: GUI library for DMD 2.090 or DMD 2.091

2020-04-25 Thread Murilo via Digitalmars-d-learn

On Friday, 24 April 2020 at 13:45:22 UTC, Phrozen wrote:
I'm too new to DLang and I have a lot to learn. Probably that's 
why I have a lot of difficulties. Has anyone tried using a GUI 
library to the latest DMD 2.090 or DMD 2.091? I plan to use 
this language for a specific Thermal calculator application for 
Windows, but for two days I've been struggling with dub and 
elementary examples in GUI libraries. I need something simple - 
a modal window with 3 buttons and a two text boxes. So far I 
have tested DWT, TKD, DFL, dlangui without success.
Can anyone help me with advice or some more recent tutorial. 
Thank you!


Here is everything you need to know: 
https://madscientisthaven.blogspot.com/2020/01/beginning-multimedia-with-arsd.html


Re: DConf 2017 Videos

2020-04-25 Thread matheus via Digitalmars-d-learn

On Saturday, 25 April 2020 at 11:11:07 UTC, Jacob Carlborg wrote:
I have previously downloaded the DConf videos. I sent them to 
Mike for him to upload.


Thank you very much for this.


Re: GUI library for DMD 2.090 or DMD 2.091

2020-04-25 Thread Marcone via Digitalmars-d-learn

On Friday, 24 April 2020 at 13:45:22 UTC, Phrozen wrote:
I'm too new to DLang and I have a lot to learn. Probably that's 
why I have a lot of difficulties. Has anyone tried using a GUI 
library to the latest DMD 2.090 or DMD 2.091? I plan to use 
this language for a specific Thermal calculator application for 
Windows, but for two days I've been struggling with dub and 
elementary examples in GUI libraries. I need something simple - 
a modal window with 3 buttons and a two text boxes. So far I 
have tested DWT, TKD, DFL, dlangui without success.
Can anyone help me with advice or some more recent tutorial. 
Thank you!


You can create easy GUI using Qt or Win32Api.
See step-by-step easy vides:

GUI Qt: https://www.youtube.com/watch?v=Es9Qs9_1ipk
GUI Win32Api: https://www.youtube.com/watch?v=_QqyPTLbgHU


Re: DConf 2017 Videos

2020-04-25 Thread Jacob Carlborg via Digitalmars-d-learn

On 2020-04-24 22:24, matheus wrote:

Hi, please could someone tell me where can I find videos from DConf 2017?

I pretty sure I watched them on Youtube sometime ago, but I can't find 
anymore.


By the way, I'm looking from one video where someone shows some "C 
flaws" and how to D as Better C could solve that.


I think it was the second talk in this list: 
https://dconf.org/2017/schedule/


Any idea?


I have previously downloaded the DConf videos. I sent them to Mike for 
him to upload.


--
/Jacob Carlborg


Re: GUI library for DMD 2.090 or DMD 2.091

2020-04-25 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2020-04-25 at 09:30 +, Paulo Pinto via Digitalmars-d-learn
wrote:
[…]
> 
> Just curious, how do you handle the whole RC> story in 
> Gtk-rs?
> 
> For me it made the point that languages with tracing GC or 
> implicit reference counting are much better solution for doing 
> GUI programming.
> 

I am still not sure I have truly come to terms with the whole Rc/Arc
and RefCell stuff. It isn't so much the using them, it is trying to
decide what is the right combination for a given situation.

Big D win here due to garbage collection.

-- 
Russel.
===
Dr Russel Winder  t: +44 20 7585 2200
41 Buckmaster Roadm: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk



signature.asc
Description: This is a digitally signed message part


Can't get dub dustmite to work

2020-04-25 Thread aliak via Digitalmars-d-learn
Trying to get dub dustmite to work, but I keep getting "initial 
test fails"


This is the error from a vanilla dub test:

```
result ~wip: building configuration "result-test-unittest"...
inout(SumType!(int, FailureContainer))
../../.dub/packages/sumtype-0.9.4/sumtype/src/sumtype.d(1322,4): 
Error: static assert:  "handler #1 of type Optional!(Exception) 
function(FailureContainer container) pure nothrow @nogc @safe 
never matches"
../../.dub/packages/sumtype-0.9.4/sumtype/src/sumtype.d(1165,14): 
   instantiated from here: matchImpl!(inout(SumType!(int, 
FailureContainer)))
source/result/result.d(136,20):instantiated from here: 
match!(inout(SumType!(int, FailureContainer)))
tests/result.d(20,20):instantiated from here: 
Result!(int, Exception)

dmd failed with exit code 1.
```

Then I run this dub dustmite command:

dub dustmite -b unittest ../dubdust --compiler-regex="never 
matches"


And I get:

```
...
Loading /Users/aliak/dev/dubdust/vibe-d/web/vibe/web/web.d
None => No
Hint: use --no-redirect to see test script output
Hint: read 
https://github.com/CyberShadow/DustMite/wiki#initial-test-fails
object.Exception@DustMite/dustmite.d(295): Initial test fails: 
Test script "/usr/local/Cellar/dub/1.20.0/bin/dub dustmite 
--vquiet --test-package=result --build=unittest --config=library 
\"--compiler=dmd\" \"--compiler-regex=never matches\"" exited 
with exit code 3 (failure)

```

* --no-redirect doesn't work in dub dustmite.
* I tried adding --compiler-status=1 with the same result
* I tired --combined with the same result

My dub.json for the unittest configuration is (incase that 
matters):

{
"name": "unittest",
"importPaths": [
"./tests"
],
"sourcePaths": [
"./tests"
]
},

Thanks for any help!



Re: What is the best way to refer to itself when obtaining Substring of a literal?

2020-04-25 Thread Marcone via Digitalmars-d-learn

On Saturday, 25 April 2020 at 01:32:54 UTC, 9il wrote:

On Friday, 24 April 2020 at 22:24:34 UTC, Marcone wrote:

I don't want to use lambda.
I don't want create variable.

What is the best way to refer to itself when obtaining 
Substring withou using lambda and without create variable?



example:

writeln("Hello Word!"[x.indexOf(" "), $]);


no way


What a pity! If Dlang have $ to indicate end of string. I think 
that is good some keyword to indicate the string itself.


Re: GUI library for DMD 2.090 or DMD 2.091

2020-04-25 Thread Paulo Pinto via Digitalmars-d-learn

On Friday, 24 April 2020 at 18:52:55 UTC, Russel Winder wrote:
On Fri, 2020-04-24 at 15:50 +, Phrozen via 
Digitalmars-d-learn wrote:



[…]
@Basile B., thanks for the suggestion. I'll try this library 
too.




Just a bit of confirmation: I am a fan of D and GtkD for 
desktop UI work.


GTK+ is just a UI framework unlike Qt (which is UI and 
networking,
database, etc.) and is fairly straightforward to work with 
after the
initial learning hump – which is the same between GTK+ and Qt. 
Qt is
really C++ and Python only though many languages have bindings 
to QML.
GTK+ has many bindings, C++, Go, Rust, and D to name just the 
obvious
native code languages. C++ (gtkmm) and Go (gotk3) bindings are 
manuals
ones, Rust (gtk-rs) and D (GtkD) bindings are generated from 
the API
specification (GIR files). I believe this makes gtk-rs and GtkD 
far

superior to gtkmm and gotk3.

I have done a number of projects in Rust/gtk-rs and D/GtkD. 
Overall I prefer the code of D/GtkD over Rust/gtk-rs *but* 
there is much more IDE and editor support for Rust compared to 
D. This makes Rust code easier to write than the equivalent  D 
code, even if that Rust code is more ugly than the equivalent D 
code.


So whilst I keep wanting to do D/GtkD, I keep getting pulled to 
Rust/gtk-rs simply because CLion (and Emacs) support for Rust 
is so much nicer than the D support.


I must laud Samael's efforts on the IntelliJ IDEA/CLion D 
support, it is magnificent, but the project needs more resource 
to get the CLion D plugin somewhere near as good as the Rust 
CLion plugin. I am sure VisualStudio fans, indeed any other IDE 
users, will say the same about their IDE, I am a CLion user so 
try to push CLion support.


Just curious, how do you handle the whole RC> story in 
Gtk-rs?


For me it made the point that languages with tracing GC or 
implicit reference counting are much better solution for doing 
GUI programming.





Re: What is the best way to refer to itself when obtaining Substring of a literal?

2020-04-25 Thread Marcone via Digitalmars-d-learn

On Saturday, 25 April 2020 at 03:47:33 UTC, SrMordred wrote:

On Friday, 24 April 2020 at 22:24:34 UTC, Marcone wrote:

I don't want to use lambda.
I don't want create variable.

What is the best way to refer to itself when obtaining 
Substring withou using lambda and without create variable?



example:

writeln("Hello Word!"[x.indexOf(" "), $]);


Maybe u want this?

import std.algorithm: find;
import std.stdio: writeln;

"Hello World".find(" ").writeln;


I don't want this, I just make a simple example.