Re: Proposal for porting D runtime to WebAssembly

2019-11-25 Thread thedeemon via Digitalmars-d-announce
On Saturday, 23 November 2019 at 09:51:13 UTC, Sebastiaan Koppe wrote: This is my proposal for porting D runtime to WebAssembly. I would like to ask you to review it. You can find it here: https://gist.github.com/skoppe/7617ceba6afd67b2e20c6be4f922725d On the GC part. It says "The only

Re: GC page and block metadata storage

2018-10-02 Thread thedeemon via Digitalmars-d-learn
On Tuesday, 2 October 2018 at 07:25:36 UTC, Per Nordlöw wrote: Should a new fresh GC for D store block metadata inside the page itself or in a (pool) structure separate from the page? I'm already aware of Dmitry's suggestion to separate value-type pools from pools of types possibly containing

Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-19 Thread thedeemon via Digitalmars-d-announce
On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: I was envious of std::sync::Mutex from Rust and thought: can I use DIP1000 to make this work in D and be @safe? Turns out, yes. Nice! I spent a few minutes playing with the example and trying to break it, make the pointer

Re: New abstraction: Layout

2018-02-17 Thread thedeemon via Digitalmars-d
On Saturday, 17 February 2018 at 00:04:16 UTC, Andrei Alexandrescu wrote: The implementation turned out to be quite compact - 81 lines including a compile-time mergesort. Destroy! Off-topic: I've just realized Andrei puts "Destroy!" at the end of his messages because it's the end of scope and

Re: How to proceed with learning to code Windows desktop applications?

2018-01-31 Thread thedeemon via Digitalmars-d-learn
On Tuesday, 30 January 2018 at 18:52:18 UTC, I Lindström wrote: I've been looking into C# and VS2017 today along with VisualD. Reading through all this it looks like the simplest path is to learn C# and VS and go from there. I've found a pile of courses on LinkedIn that seem to build up to

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread thedeemon via Digitalmars-d
On Tuesday, 30 January 2018 at 22:38:20 UTC, Andrei Alexandrescu wrote: https://www.quora.com/Why-hasnt-D-started-to-replace-C++ [...] At best responses would go on Quora, not here. Thanks! -- Andrei That's a question from 2014. I wonder if anybody would see those answers.

Re: How to proceed with learning to code Windows desktop applications?

2018-01-29 Thread thedeemon via Digitalmars-d-learn
On Tuesday, 30 January 2018 at 03:07:38 UTC, rikki cattermole wrote: But since Windows is the only platform mentioned or desired for, everything you need is in WinAPI! It's like saying "everything you need is assembly language" when talking about languages and compilers. Pure WinAPI is a

Re: parallelism

2018-01-27 Thread thedeemon via Digitalmars-d-learn
On Saturday, 27 January 2018 at 20:49:43 UTC, Arun Chandrasekaran wrote: Error: must use labeled break within static foreach Just follow the compiler suggestion: void main(string[] args) { auto op = Operation.a; foreach (_; 0 .. args.length) { ops: final switch (op) {

Re: parallelism

2018-01-27 Thread thedeemon via Digitalmars-d-learn
On Saturday, 27 January 2018 at 11:19:37 UTC, Arun Chandrasekaran wrote: Simplified test case that still errors: You got really close here. Here's a working version: enum Operation { a, b } import std.traits, std.conv, std.stdio; void main(string[] args) { auto op = Operation.a;

Re: Strange compiler error. Whose bug is that?

2018-01-27 Thread thedeemon via Digitalmars-d-learn
On Friday, 26 January 2018 at 21:17:14 UTC, Oleksii Skidan wrote: struct Game { Triangle player = new Triangle; When you initialize a struct member like this, compiler tries to calculate the initial value and remember it as data, so each time such struct is constructed the data is just

Re: getting member functions of a struct and Error: identifier expected following ., not this

2018-01-23 Thread thedeemon via Digitalmars-d-learn
On Tuesday, 23 January 2018 at 00:00:38 UTC, aliak wrote: Hi, I'm trying to get a list of only member functions of a struct. I've found that if you do not declare a struct as static inside a scope, then there's a hidden "this" member as part of the struct. Can someone explain the logic there?

Re: Release D 2.078.1

2018-01-23 Thread thedeemon via Digitalmars-d-announce
On Monday, 22 January 2018 at 20:43:56 UTC, Martin Nowak wrote: Glad to announce D 2.078.1. The Windows 7z archive version now has much simpler sc.ini, in fact too simple. With Visual C++ 2015 x64 Native Build Tools now trying to run dmd -m64 hi.d I get LINK : fatal error LNK1104: cannot

Re: Get largest heap object at runtime? ...tracking the leak

2018-01-22 Thread thedeemon via Digitalmars-d-learn
On Monday, 22 January 2018 at 16:37:19 UTC, Andres Clari wrote: All threads withing a process share the same heap, so whatever one thread allocated in that heap is not freed or reclaimed automatically when thread dies, it stays in the heap. Well the destructor of some Json objects and strings

Re: Get largest heap object at runtime? ...tracking the leak

2018-01-22 Thread thedeemon via Digitalmars-d-learn
On Monday, 22 January 2018 at 06:48:00 UTC, Andres Clari wrote: Not sure why "spawn" would leak like that tho. I would assume that once the thread exits, it would get destroyed and it's resources reclaimed, specially when I have calls to "GC.collect and GC.minimize". All threads withing a

Re: class initialization

2018-01-16 Thread thedeemon via Digitalmars-d-learn
On Tuesday, 16 January 2018 at 03:23:20 UTC, Marc wrote: But can't figure out if D does have that for classes. I believe there's no such thing for classes, you're supposed to use constructors. Class objects are in many aspects more abstract things than POD structs: instead of accessing

Re: [theory] What is a type?

2018-01-15 Thread thedeemon via Digitalmars-d
On Monday, 15 January 2018 at 20:46:19 UTC, Ali wrote: If you want to learns the ins and outs of types, this books comes highly recommended https://www.cis.upenn.edu/~bcpierce/tapl/ +1, TAPL is a must read for anyone in CS, I believe. Also recommended: "Type Theory & Functional Programming"

Re: Interfacing with webcam

2018-01-11 Thread thedeemon via Digitalmars-d-learn
On Thursday, 11 January 2018 at 17:02:58 UTC, Amorphorious wrote: Looking for something similar. I simply need to show the video of a camera and be able to do to basics like rotation, crop, etc. On which platform? On Windows I've successfully used DirectShow, I can show an example of

Re: Storing struct in a array

2018-01-09 Thread thedeemon via Digitalmars-d-learn
On Tuesday, 9 January 2018 at 18:09:58 UTC, Vino wrote: It is possible to store struct in a array ans use the same in csvReader Sure, you can just pass the type of your struct to csvReader: Array!T1 T1s; reader(fName, T1s); // pass the array Type as a function parameter First you write

Re: Storing struct in a array

2018-01-09 Thread thedeemon via Digitalmars-d-learn
On Tuesday, 9 January 2018 at 13:49:41 UTC, Vino wrote: Hi All, It is possible to store struct in a array ans use the same in csvReader Sure, you can just pass the type of your struct to csvReader: struct Layout { string name; int value; double other; } auto readArrayOfStructs(string

Re: Error: variable i cannot be read at compile time

2018-01-08 Thread thedeemon via Digitalmars-d-learn
On Monday, 8 January 2018 at 07:37:31 UTC, Vino wrote: I tried to manipulate the writeln's as below but the output is not as expected as it prints the data in row wise, where as we need it in column wise. Ah, sorry, now I think I get it. Your problem is you get output like ["a","b","c"] and

Re: Error: variable i cannot be read at compile time

2018-01-08 Thread thedeemon via Digitalmars-d-learn
On Monday, 8 January 2018 at 07:37:31 UTC, Vino wrote: I tried to manipulate the writeln's as below but the output is not as expected as it prints the data in row wise, where as we need it in column wise. ... Using the function countUntil find the keys for each of the column and store the

Re: ArithEval v0.5.0 released

2018-01-07 Thread thedeemon via Digitalmars-d-announce
On Sunday, 7 January 2018 at 20:41:57 UTC, Dechcaudron wrote: It allows the runtime evaluation of simple math expressions like `1 + 2 * 3` or `1 ^ foo`, with foo being given values at run time. That's a nice exercise in using Pegged. Reminds me of another Pegged-based calculator with

Re: Error: variable i cannot be read at compile time

2018-01-07 Thread thedeemon via Digitalmars-d-learn
On Sunday, 7 January 2018 at 17:30:26 UTC, Vino wrote: I tried to manipulate the writeln's as below but the output is not as expected as it prints the data in row wise, where as we need it in column wise. You've said before you need 6 different files, not some tables. Also, after the

Re: Error: variable i cannot be read at compile time

2018-01-07 Thread thedeemon via Digitalmars-d-learn
On Sunday, 7 January 2018 at 12:59:10 UTC, Vino wrote: Just noticed that the output writes the data and key as 2 values , but the requirnment is to write to six files, e.g That's the part you can implement yourself. Just replace those writelns with writing to corresponding files.

Re: Error: variable i cannot be read at compile time

2018-01-06 Thread thedeemon via Digitalmars-d-learn
On Saturday, 6 January 2018 at 06:47:33 UTC, Vino wrote: On Friday, 5 January 2018 at 18:00:34 UTC, thedeemon wrote: On Friday, 5 January 2018 at 17:59:32 UTC, thedeemon wrote: Tuple!( staticMap!(Arr, ColumnTypes) ) res; // array of tuples Sorry, I meant tuple of arrays, of course. Hi

Re: Error: variable i cannot be read at compile time

2018-01-05 Thread thedeemon via Digitalmars-d-learn
On Friday, 5 January 2018 at 17:59:32 UTC, thedeemon wrote: Tuple!( staticMap!(Arr, ColumnTypes) ) res; // array of tuples Sorry, I meant tuple of arrays, of course.

Re: Error: variable i cannot be read at compile time

2018-01-05 Thread thedeemon via Digitalmars-d-learn
On Friday, 5 January 2018 at 17:50:13 UTC, thedeemon wrote: Here's my version of solution. I've used ordinary arrays instead of std.container.array, since the data itself is in GC'ed heap anyway. I used csv file separated by tabs, so told csvReader to use '\t' for delimiter. And since lines

Re: Error: variable i cannot be read at compile time

2018-01-05 Thread thedeemon via Digitalmars-d-learn
On Friday, 5 January 2018 at 13:09:25 UTC, Vino wrote: Sorry, I'm asking what problem are you solving, what the program should do, what is its idea. Not what code you have written. Hi, I am trying to implement data dictionary compression, and below is the function of the program, Function

Re: Error: variable i cannot be read at compile time

2018-01-05 Thread thedeemon via Digitalmars-d-learn
On Friday, 5 January 2018 at 12:40:41 UTC, Vino wrote: What exactly are you trying to do in Master()? Please find the full code, Sorry, I'm asking what problem are you solving, what the program should do, what is its idea. Not what code you have written.

Re: I want to transmit the class name and the member name in the method

2018-01-05 Thread thedeemon via Digitalmars-d-learn
On Friday, 5 January 2018 at 07:40:14 UTC, Brian wrote: I think code style like: db.select(User).where(email.like("*@hotmail.com")).limit(10); You need to read about templates in D, here's a good guide: https://github.com/PhilippeSigaud/D-templates-tutorial Basically you can write a function

Re: Error: variable i cannot be read at compile time

2018-01-05 Thread thedeemon via Digitalmars-d-learn
On Friday, 5 January 2018 at 09:09:00 UTC, Vino wrote: Thank you very much, can you suggest the best way around this issue. What exactly are you trying to do in Master()? The code seems very broken. Each time you write read[i] is will call read() and read the whole file, you're going to

Re: Release D 2.078.0

2018-01-04 Thread thedeemon via Digitalmars-d-announce
On Thursday, 4 January 2018 at 08:15:50 UTC, Rainer Schuetze wrote: What's missing is probably legacy_stdio_definition.lib that has to be added to the linker command line for VS2015 or later. Yes, that is the case! Using -v flag I can see that dmd 2.077 invokes C:\Program Files

Re: Gc/D_runtime prevents dangling pointers?

2018-01-04 Thread thedeemon via Digitalmars-d-learn
On Thursday, 4 January 2018 at 11:05:25 UTC, tipdbmp wrote: What is your definition of a dangling pointer? A pointer pointing to freed memory, which presumably '[0]' should be because it reallocates. It allocates a larger array, but the old version is not freed up front. Right because there

Re: Release D 2.078.0

2018-01-03 Thread thedeemon via Digitalmars-d-announce
On Wednesday, 3 January 2018 at 17:43:36 UTC, Martin Nowak wrote: Glad to announce D 2.078.0. This release comes with runtime detection of Visual Studio installation paths I've got a problem with linking phobos64.lib now. I run "Visual C++ 2015 x64 Native Build Tools Command Prompt", i.e.

Re: Gc/D_runtime prevents dangling pointers?

2018-01-03 Thread thedeemon via Digitalmars-d-learn
On Wednesday, 3 January 2018 at 22:22:06 UTC, tipdbmp wrote: x doesn't seem to be a dangling pointer, how come? What is your definition of a dangling pointer? In the shown example we have a reference to a piece of memory containing 'x', so this memory is not freed, it's used by the program.

Re: how to localize console and GUI apps in Windows

2018-01-03 Thread thedeemon via Digitalmars-d-learn
On Wednesday, 3 January 2018 at 09:11:32 UTC, thedeemon wrote: you need to use TextOutW that accepts 16-bit Unicode, so just convert your UTF-8 D strings to 16-bit Unicode wstrings, there are appropriate conversion functions in Phobos. Some details: import std.utf : toUTF16z; ... string s

Re: how to localize console and GUI apps in Windows

2018-01-03 Thread thedeemon via Digitalmars-d-learn
On Wednesday, 3 January 2018 at 06:42:42 UTC, Andrei wrote: AFAIK, Windows GUI have no ANSI/OEM problem. You can use Unicode. Partly, yes. Just for a test I tried to "russify" the example Windows GUI program that comes with D installation pack (samples\d\winsamp.d). Window captions, button

Re: structs inheriting from and implementing interfaces

2017-12-29 Thread thedeemon via Digitalmars-d-learn
On Friday, 29 December 2017 at 12:03:59 UTC, Mike Franklin wrote: Is that simply because it hasn't been implemented or suggested yet for D, or was there a deliberate design decision? It's a design decision. Look carefully at structs vs. classes here: https://dlang.org/spec/struct.html There

Re: D needs to publicize its speed of compilation

2017-12-22 Thread thedeemon via Digitalmars-d
On Friday, 22 December 2017 at 11:39:48 UTC, user1234 wrote: If benchmarks based on DMD are published, the article will be subject to the criticism that is that the shorter build time is due to the optimization pass, since it's known not to be super deep in DMD backend. Well, Go folks don't

Re: D needs to publicize its speed of compilation

2017-12-22 Thread thedeemon via Digitalmars-d
On Friday, 22 December 2017 at 11:46:49 UTC, Chris wrote: http://benchmarksgame.alioth.debian.org/ No D there? Performance must be bad because its not listed at all ( for a language that exist 20 years )? D is not there for the only reason of that benchmark maintainer unwilling to include

Re: Maybe D is right about GC after all !

2017-12-21 Thread thedeemon via Digitalmars-d
On Thursday, 21 December 2017 at 22:45:23 UTC, Neia Neutuladh wrote: You can use mprotect(2) for write barriers, and that doesn't require compiler support. It's relatively inefficient, though. As I understand it's prohibitively inefficient, that's why this approach is not used by any real

Re: Maybe D is right about GC after all !

2017-12-21 Thread thedeemon via Digitalmars-d
On Thursday, 21 December 2017 at 22:11:26 UTC, Thomas Mader wrote: D compiler also doesn't insert that bookkeeping code, so running code is fast as C but GC is slow and sloppy. But for D it's planned to rewrite the GC to become something like the Go GC right? The last attempt to do this was

Re: Maybe D is right about GC after all !

2017-12-21 Thread thedeemon via Digitalmars-d
On Wednesday, 20 December 2017 at 11:21:59 UTC, Thomas Mader wrote: What I don't get is why he doesn't believe in good GC for C (my previous post) but at the same time praising Go for it's GC. What makes it easier to have a good GC in Go vs. in C? I guess the GC in D has the same problems as a

Re: Write native GUI applications for Windows

2017-12-19 Thread thedeemon via Digitalmars-d-learn
widgets. Links statically, no dependencies, no code bloat. Examples: http://www.infognition.com/VideoEnhancer/autovideoenhance.png http://www.infognition.com/blogsort/blogsort500.jpg https://bitbucket.org/thedeemon/autovideoenhance https://bitbucket.org/infognition/bsort There are several forks

Re: My two cents on what D needs to be more successful...

2017-05-22 Thread thedeemon via Digitalmars-d
On Sunday, 21 May 2017 at 19:33:35 UTC, Ecstatic Coder wrote: I would have to evaluate several libraries from github, after having searches on forums whether some regular expression libraries are better or more successful, or better maintained than other, etc. No need to trawl github, just

Re: Fantastic exchange from DConf

2017-05-06 Thread thedeemon via Digitalmars-d
On Saturday, 6 May 2017 at 06:26:29 UTC, Joakim wrote: Walter: I believe memory safety will kill C. And then null safety will kill D. ;)

Re: GC: Understanding potential sources of false pointers

2017-04-20 Thread thedeemon via Digitalmars-d-learn
On Thursday, 20 April 2017 at 02:27:37 UTC, Nick Sabalausky (Abscissa) wrote: According to : "Registers, the stack, and any other memory locations added through the GC.addRange function are always scanned conservatively." 1. Can that be safely

Re: Thoughts from newcommer

2017-04-18 Thread thedeemon via Digitalmars-d
On Tuesday, 18 April 2017 at 02:57:59 UTC, prdan wrote: I've written multi-threaded regex-redux benchmark for D language and made some tests. Nice! Rust version 1.16 (newest stable) GCC ver 4.9.2 (newest debian 8 stable) Which compiler did you use for D? C was the fastest (1.32) but used

Re: Thoughts from newcommer

2017-04-13 Thread thedeemon via Digitalmars-d
On Thursday, 13 April 2017 at 08:08:04 UTC, Russel Winder wrote: It is Isaac's game, he runs it, he chooses which languages are up there. It is not an official Debian thing as far as I know. So what the problem? I think Piotr stated the problem in the original post. If a language is missing

Re: Thoughts from newcommer

2017-04-12 Thread thedeemon via Digitalmars-d
On Tuesday, 11 April 2017 at 19:57:19 UTC, Piotr Kowalski wrote: http://benchmarksgame.alioth.debian.org/ Why D is not there? Because maintainer of that site doesn't want D there, as I remember from previous discussions. At some point (years ago) D was present there, then removed. C and

Re: List Comprehension equivalent

2017-03-18 Thread thedeemon via Digitalmars-d-learn
On Saturday, 18 March 2017 at 11:09:34 UTC, Russel Winder wrote: Is this foldr or foldl' ? It's a left fold of course, having foldr by default in eager language would be awkward.

Re: Sorting Assosiative Arrays and Finding Largest Common Substring

2017-03-16 Thread thedeemon via Digitalmars-d-learn
On Thursday, 16 March 2017 at 16:02:13 UTC, helxi wrote: I was looking for ways to find the largest common substring between two given substrings and have learnt 1. .length is of type ulong Only when compiling to 64 bits. On 32-bit target it's different. 2. writing string[int] will not give

Re: scope(~this)

2017-03-15 Thread thedeemon via Digitalmars-d-learn
On Wednesday, 15 March 2017 at 12:56:10 UTC, Inquie wrote: If it is trivial, can you write up a quick solution. I don't see how to accomplish it easily. Here it is, source and output: https://dpaste.dzfl.pl/bbf162529c6c

Re: scope(~this)

2017-03-15 Thread thedeemon via Digitalmars-d-learn
On Tuesday, 14 March 2017 at 14:35:11 UTC, Inquie wrote: There is really no any arrays to keep track of or anything like that matter you stated. ... 3 steps: ... 3. The compiler calls all the delegates on destruction. Here you are. "All the delegates" - where are they stored? This is the

Re: scope(~this)

2017-03-13 Thread thedeemon via Digitalmars-d-learn
On Monday, 13 March 2017 at 14:28:01 UTC, Inquie wrote: On Monday, 13 March 2017 at 05:18:18 UTC, Nicholas Wilson wrote: On Sunday, 12 March 2017 at 21:38:44 UTC, Inquie wrote: Is there any easy way to create a scope for termination of the object? I have a template method that takes a type

Re: Clarification on D.

2017-03-09 Thread thedeemon via Digitalmars-d
On Wednesday, 8 March 2017 at 20:00:54 UTC, aberba wrote: From a technical and experience point of view (those with experience in large D code-base), how is only D's GC & optional MMM a significant production-use blocker? This is mostly a psychological effect of C++ folks having aversion to

Re: Spotted on twitter: Rust user enthusiastically blogs about moving to D

2017-03-07 Thread thedeemon via Digitalmars-d
On Tuesday, 7 March 2017 at 19:09:11 UTC, bachmeier wrote: Yep. If you want to give someone enough rope to get maximum performance, you have to give them enough rope to shoot themselves in the foot. Once you've moved into this territory, you've made a decision to throw away safety and

Re: Why don't you advertise more your language on Quora etc ?

2017-03-02 Thread thedeemon via Digitalmars-d
On Wednesday, 1 March 2017 at 13:53:17 UTC, Mike Parker wrote: Plenty of people do, particularly on reddit, StackOverflow, Hacker News, and whatever forums & communities they tend to hang out at (e.g. gamedev.net). If there's an absence of such at Quora, it's just because none of the vocal D

Re: What about this logo ":D" to advertise the D language ?

2017-03-02 Thread thedeemon via Digitalmars-d
On Thursday, 2 March 2017 at 12:31:27 UTC, qznc wrote: D is really good at this, hence the logo :D I like it! +1! Isn't it :C => :C++ => :D Yep, that nails it!

Re: Recommend: IDE and GUI library

2017-03-01 Thread thedeemon via Digitalmars-d-learn
On Wednesday, 1 March 2017 at 23:44:47 UTC, XavierAP wrote: Still I want to be able to be able to work and debug from Visual Studio. The way I did on Windows: 1) get dlangui via dub 2) go to its folder in AppData\roaming\dub\packages and edit dub.json: * find "minimal" configuration * add

Re: Recommend: IDE and GUI library

2017-03-01 Thread thedeemon via Digitalmars-d-learn
On Wednesday, 1 March 2017 at 17:37:02 UTC, XavierAP wrote: I'm trying now DlangUI on Visual D. I'm getting different errors from missing Derelict library dependencies... If you're building your app with VisualD (as opposed to invoking dub externally), make sure you've set up import paths in

Re: Recommend: IDE and GUI library

2017-02-27 Thread thedeemon via Digitalmars-d-learn
On Friday, 24 February 2017 at 22:44:55 UTC, XavierAP wrote: Hi I've looked at wiki.dlang.org/IDEs, and I see that Visual D is linked from dlang.org/download.html. Still I was looking for personal opinions and experiences beyond hard specs, I wonder if one of the IDEs is already dominant at

Re: Serializer class

2017-02-22 Thread thedeemon via Digitalmars-d-learn
On Wednesday, 22 February 2017 at 18:34:26 UTC, houdoux09 wrote: void Read(T)(T value) { foreach(i, mm; value.tupleof) { writeln(__traits(identifier, value.tupleof[i]), " = ", mm); if(isArray!(typeof(mm))) { Read(mm[0]); //Error } } } You need to

Re: GC question

2017-02-04 Thread thedeemon via Digitalmars-d-learn
On Saturday, 4 February 2017 at 12:56:55 UTC, osa1 wrote: - Automatic but conservative. Can leak at any time. You have to implement manual management (managed heaps) to avoid leaks. Leaks are hard to find as any heap value may be causing it. By "managed heap" I just meant the GC heap, the one

Re: GC question

2017-02-04 Thread thedeemon via Digitalmars-d-learn
On Wednesday, 1 February 2017 at 06:58:43 UTC, osa1 wrote: I'm wondering what are the implications of the fact that current GC is a Boehm-style conservative GC rather than a precise one, I've never worked with a conservative GC before. Are there any disallowed memory operations? Can I break

Re: vibe.d 0.8.0 and 0.7.31 beta releases

2017-01-31 Thread thedeemon via Digitalmars-d-announce
On Tuesday, 31 January 2017 at 13:27:31 UTC, Sönke Ludwig wrote: 0.7.31 will work with 2.069-2.073 and 0.8.0 will work with 2.070-2.073. This is especially interesting because GDC master is still on 2.069.x. Thanks!

Re: vibe.d 0.8.0 and 0.7.31 beta releases

2017-01-31 Thread thedeemon via Digitalmars-d-announce
On Tuesday, 31 January 2017 at 11:11:28 UTC, Sönke Ludwig wrote: For anyone who does not depend on old D frontends, it is strongly recommended to switch to the 0.8.x branch What do you mean here by "old D frontends"? What are minimal dmd versions for 0.7 and 0.8 branches?

Re: Thread will get garbage collected?

2017-01-17 Thread thedeemon via Digitalmars-d-learn
On Monday, 16 January 2017 at 22:08:56 UTC, JN wrote: Am I correctly understanding, that after going out of scope, it's possible for GC to destroy my thread before the file finishes loading? How to prevent GC from destroying my thread before it finishes and make sure the file is loaded

Re: writeln and ~

2017-01-14 Thread thedeemon via Digitalmars-d-learn
On Saturday, 14 January 2017 at 17:42:05 UTC, Ignacious wrote: writeln(x ~ " ok"); Just write writeln(x, " ok"); Any number of arguments, no unnecessary allocations. Do you really need ~?

Re: Auto recursive function

2017-01-12 Thread thedeemon via Digitalmars-d-learn
On Wednesday, 11 January 2017 at 19:23:10 UTC, Razvan Nitu wrote: Hi, I am currently trying to create a function makeMultidimensionalArray which allocates memory for a multidimensional array. You were very close to the answer: auto makeMultidimensionalArray(int N, T, Allocator)(auto ref

Re: Gui in D: I miss this project

2017-01-11 Thread thedeemon via Digitalmars-d
On Wednesday, 11 January 2017 at 15:56:46 UTC, Chris Wright wrote: On Wed, 11 Jan 2017 07:21:22 +, thedeemon wrote: If you need some GUI, DLangUI is just a "dub build" away. How does DLangUI do with screen readers and magnifiers? Very poorly, I guess. It does not use nativ

Re: Gui in D: I miss this project

2017-01-10 Thread thedeemon via Digitalmars-d
On Monday, 9 January 2017 at 21:41:37 UTC, aberba wrote: This seemed to be an effort (among others) to bring GUI cross platform to standard D but some language/compiler/Phobos/Deimos/manpower issues were the drag. https://github.com/Devisualization We now have DLangUI. I wonder what the

Re: Project Highlight: Voxelman

2017-01-01 Thread thedeemon via Digitalmars-d-announce
On Saturday, 31 December 2016 at 14:22:40 UTC, jkpl wrote: What I mean is that there's a compilation error related to dlib: What's your compiler version? Many libraries and projects are not building with dmd 2.072 yet, but they build fine with dmd 2.071.

Re: D future ...

2016-12-21 Thread thedeemon via Digitalmars-d
On Thursday, 22 December 2016 at 03:57:10 UTC, Chris Wright wrote: You can implement write barriers as runtime calls, but omit them in @nogc code. That means redefining what @nogc means. Currently it basically means "does not GC-allocate" and you want to change it to "does not mutate

Re: D future ...

2016-12-21 Thread thedeemon via Digitalmars-d
On Wednesday, 21 December 2016 at 11:54:35 UTC, Ilya Yaroshenko wrote: On Wednesday, 21 December 2016 at 11:36:14 UTC, thedeemon wrote: On Tuesday, 20 December 2016 at 10:18:12 UTC, Kelly Sommers wrote: [...] Bad news: without complete redesign of the language and turning into one more C

Re: D future ...

2016-12-21 Thread thedeemon via Digitalmars-d
On Tuesday, 20 December 2016 at 10:18:12 UTC, Kelly Sommers wrote: What I really want is what C++ wanted to deliver but it doesn't. I want something better than writing C but with the same performance as C and the ability to interface with C without the performance loss and with easily

Re: unDE 0.1.0: original file manager, image and text viewer

2016-12-17 Thread thedeemon via Digitalmars-d-announce
On Thursday, 15 December 2016 at 20:16:10 UTC, unDEFER wrote: Hello, my dear friends! So many days you answers on many my questions. And today I glad to present my work: unDE 0.1.0. It is very original file manager, image and text viewer. More information:

Re: Impressed with Appender - Is there design/implementation description?

2016-12-06 Thread thedeemon via Digitalmars-d-learn
On Sunday, 4 December 2016 at 20:03:37 UTC, Jon Degenhardt wrote: I've been using Appender quite a bit recently, typically when I need append-only arrays with variable and unknown final sizes. I had been prepared to write a custom data structure when I started using it with large amounts of

Re: Memory allocation failed. Why?

2016-11-21 Thread thedeemon via Digitalmars-d-learn
On Sunday, 20 November 2016 at 17:47:50 UTC, MGW wrote: core.exception.OutOfMemoryError@src\core\exception.d(693): Memory allocation failed Simple program and error. Why? Windows 7 (32) dmd 2.072.0 Making a 100 million bytes array by appending one byte at

Re: TechEmpower Web Framework Performance Comparison Round 13 -- vibe.d non-starter?

2016-11-20 Thread thedeemon via Digitalmars-d
On Saturday, 19 November 2016 at 22:19:58 UTC, deadalnix wrote: Err.. I mean, what is PIE and what kind of problems with D are there? DMD emit relocation data that linker can't make sense of, that's what happens. So you can't link anything that wasn't compiled with -fPIC, even if you aren't

Re: TechEmpower Web Framework Performance Comparison Round 13 -- vibe.d non-starter?

2016-11-19 Thread thedeemon via Digitalmars-d
On Friday, 18 November 2016 at 11:02:20 UTC, Daniel Kozak wrote: Ubuntu 12.04 to 16.04 which has PIE enabled now, and there are problems with D on it. Where can I learn more about it? It has been typo, it should not be 16.04 but 16.10. Err.. I mean, what is PIE and what kind of problems

Re: TechEmpower Web Framework Performance Comparison Round 13 -- vibe.d non-starter?

2016-11-18 Thread thedeemon via Digitalmars-d
On Thursday, 17 November 2016 at 18:24:05 UTC, Daniel Kozak wrote: Dne 17.11.2016 v 18:49 sanjayss via Digitalmars-d napsal(a): Ubuntu 12.04 to 16.04 which has PIE enabled now, and there are problems with D on it. Where can I learn more about it?

Re: D Lang installation on Windows, dependency on Visual Studio?

2016-11-14 Thread thedeemon via Digitalmars-d
On Monday, 14 November 2016 at 13:44:29 UTC, Patrick Schluter wrote: Extremely annoying when you only want to install an otherwise extremely lean development tool (dmd) to test 100 liners. But you most probably don't need all that stuff for testing your 100-liners. By default DMD on Windows

Re: Article: Running D without its runtime

2016-11-09 Thread thedeemon via Digitalmars-d-announce
On Thursday, 10 November 2016 at 00:56:02 UTC, Guillaume Piolat wrote: https://www.auburnsounds.com/blog/2016-11-10_Running-D-without-its-runtime.html Great post and useful pieces of code, thanks! "every class object's destructor is assumed to throw exceptions and use the GC by default."

Re: Release D 2.072.0

2016-11-07 Thread thedeemon via Digitalmars-d-announce
On Monday, 7 November 2016 at 18:55:29 UTC, Anonymous wrote: To be honest, I know that the D world existed before me, and I know that it'll still exist if I leave. Between, 2.072 is the worst release I've ever seen. Yep. I tried 2.072 on a current DLangUI project under Win32. Compiled fine,

Re: how to debug memory errors

2016-11-07 Thread thedeemon via Digitalmars-d-learn
On Tuesday, 8 November 2016 at 05:36:22 UTC, Era Scarecrow wrote: Hmmm.. I had the impression that if something was referenced by another object, then it couldn't be collected, Another *live* object, i.e. reachable from globals and stack. If you have a big tree and it becomes unreachable

Re: how to debug memory errors

2016-11-07 Thread thedeemon via Digitalmars-d-learn
On Monday, 7 November 2016 at 02:22:35 UTC, Steven Schveighoffer wrote: OP: it's not legal to destroy or even access GC allocated members in a destructor. The GC may have already destroyed that data. Isn't destroy() fine there? It doesn't call destructors for already destroyed objects, so I

Re: The DLang UPB Languages and Systems Research Scholarship

2016-10-28 Thread thedeemon via Digitalmars-d-announce
On Wednesday, 26 October 2016 at 01:11:05 UTC, Mike Parker wrote: For anyone tempted to share this on /r/programming, please wait! I hope to do a blog post about this on Friday, so I'll post to reddit then. Thanks! Please don't. This is a total offtopic for /r/programming, don't create the

Re: D code optimization

2016-09-22 Thread thedeemon via Digitalmars-d-learn
On Thursday, 22 September 2016 at 16:09:49 UTC, Sandu wrote: const int n = 252; double[] call = new double[n+1]; ... //delete call; // since D is has a garbage collector, explicit deallocation of arrays is not necessary. If you care about speed, better

Re: [GSoC] Precise GC

2016-09-07 Thread thedeemon via Digitalmars-d-announce
On Tuesday, 6 September 2016 at 14:56:15 UTC, jmh530 wrote: GC (and runtime in general) has no idea what code is safe and what code is system. GC works with data at run-time. All @safe-related stuff is about code (not data!) and happens at compile-time. They are completely orthogonal and

Re: [GSoC] Precise GC

2016-09-03 Thread thedeemon via Digitalmars-d-announce
On Friday, 2 September 2016 at 14:55:26 UTC, jmh530 wrote: Anyway, with @safe unions, my thinking is that it would mean that the garbage collector can be made precise in @safe code in a way that it can't in @system code (assuming unions with pointers aren't snuck in through @trusted). GC

Re: [GSoC] Precise GC

2016-09-01 Thread thedeemon via Digitalmars-d-announce
On Friday, 2 September 2016 at 03:25:33 UTC, Jeremy DeHaan wrote: Hi everyone, I know I'm super late to the party for this, and sorry for that. While my work on the precise GC didn't go as planned, it is closer than it was to be getting merged. My open PR for the actual inclusion of the

Re: Go's march to low-latency GC

2016-07-16 Thread thedeemon via Digitalmars-d
On Thursday, 14 July 2016 at 10:58:47 UTC, Istvan Dobos wrote: I was thinking, okay, so D's GC seems to turned out not that great. But how about the idea of transplanting Rust's ownership system instead of trying to make the GC better? This requires drastically changing 99% of the language

Re: Is dmd fast?

2016-07-06 Thread thedeemon via Digitalmars-d
On Wednesday, 6 July 2016 at 05:46:20 UTC, ketmar wrote: On Wednesday, 6 July 2016 at 05:38:25 UTC, Tofu Ninja wrote: dmd seems pretty fast to me. add "-O -inline" and go to bed. ;-) Nah, in my multi-KLOC project the difference between debug (-g) and release (-O -inline) is like 6 vs. 8

Re: Commit size and Page fault's very large for simple program

2016-07-04 Thread thedeemon via Digitalmars-d-learn
On Monday, 4 July 2016 at 11:56:14 UTC, Rene Zwanenburg wrote: On Monday, 4 July 2016 at 11:42:40 UTC, Rene Zwanenburg wrote: ... I forgot to mention: If you're on Windows compilation defaults to 32 bit, false pointers can be a problem with D's current GC in 32 bit applications. This isn't

Re: Hooking into GC

2016-06-28 Thread thedeemon via Digitalmars-d-learn
On Wednesday, 29 June 2016 at 02:18:27 UTC, MMJones wrote: I read somewhere that one can modify the D files from phobos and runtime to supply a stub for the GC. I would like to add some logging features to the GC. You don't need to recompile anything, a stub can be installed from your

Re: Registration-free COM client

2016-06-27 Thread thedeemon via Digitalmars-d-learn
On Monday, 27 June 2016 at 21:17:52 UTC, Thalamus wrote: Hi everyone, I've succeeded in using D as a client for regular (registered) COM servers in the past, but in this case, I'm building the server as well. I would like to avoid registering it if possible so XCOPY-like deployment remains

Re: Garbage Collector

2016-06-16 Thread thedeemon via Digitalmars-d
On Wednesday, 15 June 2016 at 13:19:31 UTC, Konstantin wrote: Has anyone thought about taking GC from .NET and reusing it in D? One significant point has been already mentioned: cost of write barriers. I'd like to mention another factor: .NET GC is a copying one, it moves data around. One

Re: Accessing COM Objects

2016-06-16 Thread thedeemon via Digitalmars-d-learn
On Wednesday, 15 June 2016 at 21:06:01 UTC, Joerg Joergonson wrote: Ok, I've tried things like uncommenting Document Open(BSTR Document, VARIANT As, VARIANT AsSmartObject); void Load(BSTR Document); /*[id(0x70537673)]*/ BSTR get_ScriptingVersion(); /*[id(0x70464D4D)]*/

Re: ARSD PNG memory usage

2016-06-16 Thread thedeemon via Digitalmars-d-learn
On Friday, 17 June 2016 at 01:51:41 UTC, Joerg Joergonson wrote: Hi, so, do you have any idea why when I load an image with png.d it takes a ton of memory? I've bumped into this previously. It allocates a lot of temporary arrays for decoded chunks of data, and I managed to reduce those

  1   2   3   4   >