Re: Dynamically Sized Structs

2014-04-17 Thread Kagamin via Digitalmars-d-learn
So you assert that variable length structs can't be allocated on heap and sokoban example is a wrong example of variable length struct usage? And how heap indirection is different from stack indirection? It's still indirection.

Re: Dynamically Sized Structs

2014-04-17 Thread Kagamin via Digitalmars-d-learn
Well, cache locality can be optimized without reducing number of indirections, as long as the data is likely to be in cache. I agree with bearophile that variable size structs reduce number of indirections and have no direct relation to cache locality. One may have no time or no desire to

Re: Dynamically Sized Structs

2014-04-17 Thread Kagamin via Digitalmars-d-learn
Well, it's proof of concept of bound checked variable-size struct, I wrote it in a minute. It even compiles and runs.

Re: Dynamically Sized Structs

2014-04-17 Thread Kagamin via Digitalmars-d-learn
On Wednesday, 16 April 2014 at 23:36:05 UTC, bearophile wrote: Jeroen Bollen: Is it possible to have a structure with a dynamic size? See an usage example I have written here: http://rosettacode.org/wiki/Sokoban#Faster_Version This can illustrate 1. fairly straightforward translation of

Re: Dynamically Sized Structs

2014-04-18 Thread Kagamin via Digitalmars-d-learn
Oh, and I don't believe, that a variable-size struct can be emplaced inside fixed-size struct or class. Only as a smart pointer from the example.

Re: Dynamically Sized Structs

2014-04-18 Thread Kagamin via Digitalmars-d-learn
I mean, it doesn't cover all scenarios, but can be extended to support them. The indexes array does just that: it's emplaced without indirection, but still is bound checked.

Re: Dynamically Sized Structs

2014-04-18 Thread Kagamin via Digitalmars-d-learn
On Friday, 18 April 2014 at 13:10:28 UTC, Steven Schveighoffer wrote: Note, you could probably, with mixin magic, make a version that could be emplaced inside a struct or class without an extra indirection. Speaking about mixin magic, you probably suggest to do it overly generically, though

Re: Throw exception on segmentation fault in GNU/Linux

2014-04-22 Thread Kagamin via Digitalmars-d-learn
You should write and register a signal handler. Implementation for x86-32 was posted here.

Re: On Concurrency

2014-04-25 Thread Kagamin via Digitalmars-d-learn
Fibers are more lightweight, they're not kernel objects. Threads are scheduled by kernel (usually). Fibers are better if you can get better resource usage with manual scheduling - less context switches, or don't want to consume resources need by threads.

Re: AES encryption with openssl bindings

2014-04-26 Thread Kagamin via Digitalmars-d-learn
On Friday, 25 April 2014 at 19:06:33 UTC, brad clawsie wrote: My code compiles and fails silently. How do you want it to fail? C code doesn't throw exceptions.

Re: Messy code in console

2014-05-11 Thread Kagamin via Digitalmars-d-learn
Known bug https://issues.dlang.org/show_bug.cgi?id=2742

Re: Messy code in console

2014-05-11 Thread Kagamin via Digitalmars-d-learn
On Sunday, 11 May 2014 at 08:48:43 UTC, FreeSlave wrote: On Sunday, 11 May 2014 at 07:43:07 UTC, Kagamin wrote: Known bug https://issues.dlang.org/show_bug.cgi?id=2742 It's not bug. Write-functions are designed to output text to stdout, and it's issue of programmer to make sure that expected

Re: How to make sure GC allocated resources stay around when used in C functions?

2014-05-12 Thread Kagamin via Digitalmars-d-learn
AFAIK, addRoot is for memory allocated in GC heap, and addRange is for other types of memory, so you can't add non-gc memory as root (just a guess, see docs). I would allocate whole Args in GC heap and add is as root, yes, it would prevent collection until the root is removed. A better way

Re: Templating everything? One module per function/struct/class/etc, grouped by package?

2014-05-12 Thread Kagamin via Digitalmars-d-learn
You can write a tool, which will construct an amalgamation build of your code.

Re: How to make sure GC allocated resources stay around when used in C functions?

2014-05-12 Thread Kagamin via Digitalmars-d-learn
Why many? I'd say, you typically have 0 subscriptions (label, textbox) per widget, seldom - 1 (button, combobox, checkbox).

Re: How to make sure GC allocated resources stay around when used in C functions?

2014-05-12 Thread Kagamin via Digitalmars-d-learn
combobox and checkbox usually don't require a subscription either. Only button requires a reaction from your code, everything else usually works on its own.

Re: How to make sure GC allocated resources stay around when used in C functions?

2014-05-13 Thread Kagamin via Digitalmars-d-learn
Do you always bind all of them?

Re: How to make sure GC allocated resources stay around when used in C functions?

2014-05-13 Thread Kagamin via Digitalmars-d-learn
Another option is to allocate from pool.

Re: How to make sure GC allocated resources stay around when used in C functions?

2014-05-14 Thread Kagamin via Digitalmars-d-learn
It must be scanned, so you shouldn't specify NO_SCAN attribute, it's for memory blocks, which are guaranteed to not hold pointers to GC memory, like ubyte[] buffers for i/o, so managed blocks can be safely collected without looking at content of NO_SCAN blocks.

Re: How to make sure GC allocated resources stay around when used in C functions?

2014-05-14 Thread Kagamin via Digitalmars-d-learn
On Tuesday, 13 May 2014 at 18:47:45 UTC, Gary Willoughby wrote: They are not bound automatically but may be bound later. So they will be allocated on demand - only if it's bound, Args will be allocated, so widget will have only one Args allocated, or as many as were actually bound. Or do you

Re: RegEx for a simple Lexer

2014-05-14 Thread Kagamin via Digitalmars-d-learn
On Tuesday, 13 May 2014 at 20:02:59 UTC, Tim Holzschuh via Digitalmars-d-learn wrote: Still: Would it be very difficult to write a suitable parser from scratch? See http://forum.dlang.org/post/lbnheh$2ssm$1...@digitalmars.com with duscussion about parsers on reddit.

Re: Seg fault when calling C code

2014-05-16 Thread Kagamin via Digitalmars-d-learn
For example, windows headers do use C++ -references in function signatures and msdn provides code examples using that convention, the equivalent in D is ref.

Re: Seg fault when calling C code

2014-05-20 Thread Kagamin via Digitalmars-d-learn
On Friday, 16 May 2014 at 14:52:17 UTC, Marc Schütz wrote: But that's extern(C++), not extern(C)... That should be a different name mangling, so won't link. Winapi functions are declared as extern C for C++ compiler.

foreach over string

2014-05-24 Thread Kagamin via Digitalmars-d-learn
foreach over string apparently iterates over chars by default instead of dchars. Didn't it prefer dchars? string s=weiß; int i; foreach(c;s)i++; assert(i==5);

Re: foreach over string

2014-05-24 Thread Kagamin via Digitalmars-d-learn
On Saturday, 24 May 2014 at 18:18:37 UTC, John Colvin wrote: if you use foreach(dchar c; s) you will get the iteration by code-point you are looking for. Actually I was trying to prevent decoding :) It just occurred to me it can be tricky in generic code.

Re: How to handle try-catch blocks, nothrow and logfiles

2014-05-24 Thread Kagamin via Digitalmars-d-learn
On Saturday, 24 May 2014 at 17:09:24 UTC, Tim wrote: But doing this in all my methods You shouldn't do it in all methods, only top-level ones, because they are called from 3rd party code, which will do whatever things with the exceptions from nothing to terminating the application. Already

Re: How to declare a library .dll to import functions?

2014-05-25 Thread Kagamin via Digitalmars-d-learn
If it's for 32-bit windows, convert oci import libraries to omf.

Re: How to declare a library .dll to import functions?

2014-05-25 Thread Kagamin via Digitalmars-d-learn
http://forum.dlang.org/thread/dpaolp$1oek$1...@digitaldaemon.com

Re: Building 32bit program with MSVC?

2014-05-30 Thread Kagamin via Digitalmars-d-learn
You can try ldc, which uses mingw toolchain, it's probably compatible with msvc.

Re: Building 32bit program with MSVC?

2014-05-31 Thread Kagamin via Digitalmars-d-learn
They may use different debugging formats, but just linking should be possible, especially with import libraries.

Re: Building 32bit program with MSVC?

2014-05-31 Thread Kagamin via Digitalmars-d-learn
By dynamic linking do you mean LoadLibrary or linking with import library?

Re: Kernel in D

2014-05-31 Thread Kagamin via Digitalmars-d-learn
http://www.xomb.org/ ?

Re: Interfacing to const T or const T* C++ code

2014-06-02 Thread Kagamin via Digitalmars-d-learn
Try to report as a bug.

Re: Different random shuffles generated when compiled with gdc than with dmd

2014-06-02 Thread Kagamin via Digitalmars-d-learn
On Sunday, 1 June 2014 at 12:11:22 UTC, Ivan Kazmenko wrote: I second the thought that reproducibility across different versions is an important feature of any random generation library. Sadly, I didn't use a language yet which supported such a flavor of reproducibility for a significant

Re: Building 32bit program with MSVC?

2014-06-04 Thread Kagamin via Digitalmars-d-learn
LLVM never supported OMF. LDC uses msvcrt runtime, and MS claims that whatever can link with msvcrt, it also can link with later versions of msvcrt.

Re: Kernel in D

2014-06-04 Thread Kagamin via Digitalmars-d-learn
On Saturday, 31 May 2014 at 23:27:45 UTC, Qox wrote: On Saturday, 31 May 2014 at 07:57:18 UTC, Kagamin wrote: http://www.xomb.org/ ? seems to be outdated, but its another OS written in D. It's dead for only a year, the developer have probably graduated.

Re: Writing to file problem (Kernelbase exeption)

2014-06-05 Thread Kagamin via Digitalmars-d-learn
Try to reduce it: remove code from the program piece by piece until you find a fragment, which causes the problem.

Re: Version() for unittest OR debug?

2014-06-11 Thread Kagamin via Digitalmars-d-learn
debug version = DebugOrUnittest; else version(unittest)version = DebugOrUnittest; version(DebugOrUnittest) { static assert(false,DebugOrUnittest); }

Re: How to I call D code from C# Project?

2014-06-19 Thread Kagamin via Digitalmars-d-learn
On Wednesday, 18 June 2014 at 20:55:09 UTC, GoD wrote: D, very fast programming language. But I can not WinForm applications from D. I'm using C# for WinForm applications. DWT and TkD didn't work for you?

Re: Some kind of RPC exists for D?

2014-06-19 Thread Kagamin via Digitalmars-d-learn
On Wednesday, 18 June 2014 at 19:24:03 UTC, Bienlein wrote: Hello, I'm looking for a way to do some kind of RPC in D. Some way of being able to say aFoo.bar(int i, ...) with receiver object and method being marshalled at the sender's site and being unmarshalled and invoked at the receiver's

Re: C structs

2014-06-20 Thread Kagamin via Digitalmars-d-learn
On Friday, 20 June 2014 at 10:51:20 UTC, Johann Lermer wrote: `_D6deimos5cairo5cairo14cairo_matrix_t6__initZ' it's an init value for the struct; in D all data is initialized.

Re: File needs to be closed on Windows but not on Posix, bug?

2014-07-07 Thread Kagamin via Digitalmars-d-learn
See if stdio allows you to specify delete sharing when opening the file.

Re: File needs to be closed on Windows but not on Posix, bug?

2014-07-07 Thread Kagamin via Digitalmars-d-learn
On windows files are traditionally opened without delete sharing, such files can't be deleted until closed, because all sharing options are always honored.

Re: File needs to be closed on Windows but not on Posix, bug?

2014-07-07 Thread Kagamin via Digitalmars-d-learn
It can be also a bad user experience, when delete succeeds only pertially and doesn't free the disk space. Delete-on-close flag should be better in this regard.

Re: File needs to be closed on Windows but not on Posix, bug?

2014-07-07 Thread Kagamin via Digitalmars-d-learn
On Monday, 7 July 2014 at 14:25:54 UTC, Regan Heath wrote: If I had to guess, I would say it would still be possible to access the file. It's documented so. I guess, linux implements file deletion with delete-on-close feature too, if it exists, a separate deletion operation is not needed.

Re: reference to delegates and garbage collection

2014-07-15 Thread Kagamin via Digitalmars-d-learn
Since you access a field through `a` instance, this is usually done by loading the instance address into some register and reading from a location at a certain offset from that register mov esi, [ebp-4] # the instance address mov eax, [esi+8] # first field ... mov [ebp-4], 0 # clear stack

Re: md5 hashing acting strangly?

2014-07-16 Thread Kagamin via Digitalmars-d-learn
On Wednesday, 16 July 2014 at 12:15:34 UTC, bearophile wrote: Such kind of bugs are impossible in Rust. Hopefully we'll eventually remove them from D too. Seems like a popular issue. Is there a bug report for it?

Re: md5 hashing acting strangly?

2014-07-16 Thread Kagamin via Digitalmars-d-learn
Report for the problem when a temporary fixed-size array is assigned to a slice, which is escaped.

Re: md5 hashing acting strangly?

2014-07-16 Thread Kagamin via Digitalmars-d-learn
I have a more pragmatic view. Do you know the issue number?

Re: md5 hashing acting strangly?

2014-07-16 Thread Kagamin via Digitalmars-d-learn
Aren't these your words: fixing as many errors as possible always helps even if we don't fix all errors?

Re: How can I express the type '(int) = int' where it is a function or a delegate

2014-07-16 Thread Kagamin via Digitalmars-d-learn
The compiler would generate calls to toDelegate and toFunction automatically.

Re: md5 hashing acting strangly?

2014-07-17 Thread Kagamin via Digitalmars-d-learn
On Wednesday, 16 July 2014 at 18:17:25 UTC, Ali Çehreli wrote: On 07/16/2014 06:31 AM, Kagamin wrote: I have a more pragmatic view. Do you know the issue number? https://issues.dlang.org/show_bug.cgi?id=8838 This is not about temporary. Well, looks like it's not there.

Re: Calling dynamically bound functions from weakly pure function

2014-07-19 Thread Kagamin via Digitalmars-d-learn
It's ok to deduce opDispatch as pure, but then its purity should be enforced and error reported.

Re: is there any way for an object to make it self no longer usable

2014-07-19 Thread Kagamin via Digitalmars-d-learn
On Saturday, 19 July 2014 at 17:05:27 UTC, Sean Campbell wrote: surely not by writing another class with wrapper methods for the existing one. If you don't want to write the class, you can write a generator for it. See BlackHole wrapper for an example.

Re: is there any way for an object to make it self no longer usable

2014-07-19 Thread Kagamin via Digitalmars-d-learn
On Saturday, 19 July 2014 at 17:28:13 UTC, Frustrated wrote: If you do this you are potentially asking for a lot of access violation errors or undefined behavior. Of course, the object should not be used after destruction. The trick is to reliably diagnose it. If such uses are not

Re: is there any way for an object to make it self no longer usable

2014-07-19 Thread Kagamin via Digitalmars-d-learn
You can also try class invariant.

Re: Extended math library

2014-07-19 Thread Kagamin via Digitalmars-d-learn
On Wednesday, 16 July 2014 at 19:43:26 UTC, Martijn Pot wrote: On Tuesday, 15 July 2014 at 22:09:43 UTC, ponce wrote: On Tuesday, 15 July 2014 at 20:46:32 UTC, Martijn Pot wrote: To make a long story short: Is there any math library with e.g. mean, std, polynomial fitting, ...?

Re: Really nooB question - @property

2014-07-21 Thread Kagamin via Digitalmars-d-learn
On Sunday, 20 July 2014 at 18:14:29 UTC, Eric wrote: Use @property when you want a pseudo-variable or something that might be conceptually considered a property of the object, i.e. to do this: auto blah = thing.someProperty; thing.someProperty = blahblah; This is basically what I

Re: How to know whether a file's encoding is ansi or utf8?

2014-07-24 Thread Kagamin via Digitalmars-d-learn
I first try to load the file as utf8 (or some 8kb at the start of it) with encoding exceptions turned on, if I catch an exception, I reload it as ansi, otherwise I assume it's valid utf8.

Re: D JSON (WAT?!)

2014-07-26 Thread Kagamin via Digitalmars-d-learn
AFAIK, Variant is not transparent. You can't write parsed[field1][field2], it should be parsed[field1].get!(Variant[string])[field2].

Re: D may disappoint in the presence of an alien Garbage Collector?

2014-07-29 Thread Kagamin via Digitalmars-d-learn
Registering a descriptor with moving GC is not enough, you should also fix the pointer so that it's not moved.

Re: D may disappoint in the presence of an alien Garbage Collector?

2014-07-29 Thread Kagamin via Digitalmars-d-learn
The better way would be to interact through a COM interface, which would abstract tricks of the library code. Advanced environments are usually able to generate such interface.

Re: Split class declaration and definition

2014-07-31 Thread Kagamin via Digitalmars-d-learn
On Thursday, 31 July 2014 at 12:02:22 UTC, Kozzi11 wrote: module m; @someUda class C { void someFun(); } @someUda class D { void anotherFun(); } mixin(generateFunDefForClassesWithSomeUda!m); This is usually done by generating functions in the classes directly. class C { mixin

Re: Member access of __gshared global object

2014-08-07 Thread Kagamin via Digitalmars-d-learn
It's an optimization of memory allocation: you can always have a usable AA without allocating anything for it, so when you fill it with data, you may want to assign it back to where it should stay, similar to a slice.

Re: Ropes (concatenation trees) for strings in D ?

2014-08-15 Thread Kagamin via Digitalmars-d-learn
Search gave result enough rope to hang yourself.

Re: core.thread.Fiber --- runtime stack overflow unlike goroutines

2014-08-15 Thread Kagamin via Digitalmars-d-learn
On Thursday, 14 August 2014 at 18:52:00 UTC, Sean Kelly wrote: On 64 bit, reserve a huge chunk of memory, set a SEGV handler and commit more as needed. Basically how kernel thread stacks work. I've been meaning to do this but haven't gotten around to it yet. AFAIK, OS already provides this

Re: core.thread.Fiber --- runtime stack overflow unlike goroutines

2014-08-15 Thread Kagamin via Digitalmars-d-learn
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366887%28v=vs.85%29.aspx Allocates memory charges (from the overall size of memory and the paging files on disk) for the specified reserved memory pages. The function also guarantees that when the caller later initially accesses the

Re: core.thread.Fiber --- runtime stack overflow unlike goroutines

2014-08-15 Thread Kagamin via Digitalmars-d-learn
On Thursday, 14 August 2014 at 07:46:29 UTC, Carl Sturtivant wrote: The default size of the runtime stack for a Fiber is 4*PAGESIZE which is very small, and a quick test shows that a Fiber suffers a stack overflow that doesn't lead to a clean termination when this limit is exceeded. Pass a

Re: core.thread.Fiber --- runtime stack overflow unlike goroutines

2014-08-15 Thread Kagamin via Digitalmars-d-learn
On Friday, 15 August 2014 at 14:26:28 UTC, Sean Kelly wrote: Oh handy, so there's basically no work to be done on Windows. I'll have to check the behavior of mmap on Posix. I heard, calloc behaves this way on linux (COW blank page mapped to the entire range), it was discussed here some time

Re: core.thread.Fiber --- runtime stack overflow unlike goroutines

2014-08-15 Thread Kagamin via Digitalmars-d-learn
On Friday, 15 August 2014 at 14:28:34 UTC, Kagamin wrote: On Friday, 15 August 2014 at 14:26:28 UTC, Sean Kelly wrote: Oh handy, so there's basically no work to be done on Windows. I'll have to check the behavior of mmap on Posix. I heard, calloc behaves this way on linux (COW blank page

Re: core.thread.Fiber --- runtime stack overflow unlike goroutines

2014-08-15 Thread Kagamin via Digitalmars-d-learn
On Friday, 15 August 2014 at 14:28:34 UTC, Dicebot wrote: Won't that kind of kill the purpose of Fiber as low-cost context abstraction? Stack size does add up for thousands of fibers. I didn't measure it.

Re: core.thread.Fiber --- runtime stack overflow unlike goroutines

2014-08-16 Thread Kagamin via Digitalmars-d-learn
On Friday, 15 August 2014 at 22:26:54 UTC, ketmar via Digitalmars-d-learn wrote: and we -- 32-bit addicts -- will run out of address space while 64-bit happy people will laugh looking at us. ;-) You should only choose stack size carefully or keep data in TempAlloc instead of stack.

Re: How to realize isSortedRange?

2014-08-20 Thread Kagamin via Digitalmars-d-learn
http://dlang.org/phobos/std_traits.html#TemplateOf

Re: RAII limitations in D?

2014-08-21 Thread Kagamin via Digitalmars-d-learn
On Friday, 22 August 2014 at 02:22:16 UTC, Timothee Cour via Digitalmars-d-learn wrote: Especially the part mentioning D:{ D’s scope keyword, Python’s with statement and C#’s using declaration all provide limited RAII, by allowing resources to have a scoped lifetime, but none of them readily

Re: unit testing version statements

2014-08-22 Thread Kagamin via Digitalmars-d-learn
Compile and run the tests with different version options.

Re: D with no druntime

2014-08-22 Thread Kagamin via Digitalmars-d-learn
On Thursday, 21 August 2014 at 05:13:34 UTC, uri wrote: _d_arraybounds (new to 2066) This one is very useful, I recommend to implement it. It's just easier to live with it, than try to get rid of it.

Re: COFF32 limitations?

2014-08-22 Thread Kagamin via Digitalmars-d-learn
Which linker do you plan to use?

Re: 'idiomatic' porting of c and or c++ code that does NULL checking

2014-08-23 Thread Kagamin via Digitalmars-d-learn
On Saturday, 23 August 2014 at 11:07:23 UTC, ketmar via Digitalmars-d-learn wrote: and foo is null is nice to read. ;-) Meh, looks like a guest from pascal or basic.

Re: 'idiomatic' porting of c and or c++ code that does NULL checking

2014-08-23 Thread Kagamin via Digitalmars-d-learn
On Saturday, 23 August 2014 at 11:07:23 UTC, ketmar via Digitalmars-d-learn wrote: and foo is null is nice to read. ;-) function bool init begin rem Initialization flag bool success assign true; rem Initialize SDL if execute SDL_Init SDL_INIT_VIDEO lt 0 begin

Re: D1: Error: duplicate union initialization for size

2014-08-24 Thread Kagamin via Digitalmars-d-learn
Mybe, some fields in Size overlap. If you look at it, you may understand, what happens.

Re: How to get nogc to work with manual memory allocation

2014-08-24 Thread Kagamin via Digitalmars-d-learn
On Sunday, 24 August 2014 at 09:29:53 UTC, Jacob Carlborg wrote: On 2014-08-24 10:03, Bienlein wrote: I have omitted the code for the TestClass class to save space. Problem is that the compiler outputs this: Error: @nogc function 'main.nogcNew!(TestClass, ).nogcNew' cannot call non-@nogc

Re: I can ask questions about dmd on windows here in this forum?

2014-09-02 Thread Kagamin via Digitalmars-d-learn
On Sunday, 31 August 2014 at 08:37:40 UTC, Jonathan M Davis via Digitalmars-d-learn wrote: D program should just use string unless it needs random-access, in which case, it should use dstring. Except that dstring is not fool-proof either when one needs to work at grapheme level.

Re: Query Parser Callstack

2014-09-02 Thread Kagamin via Digitalmars-d-learn
You can try to create an exception and get stack trace from it. The functionality is in druntime.

Re: How to get nogc to work with manual memory allocation

2014-09-04 Thread Kagamin via Digitalmars-d-learn
On Sunday, 24 August 2014 at 13:27:01 UTC, Jacob Carlborg wrote: On 2014-08-24 14:18, Kagamin wrote: Shouldn't emplace and destroy infer their attributes instead of strictly annotating them as nogc. If they are templates, I guess they should. I don't know how good the compiler is at

Re: writeln() assertion failed in hybrid x64

2014-09-04 Thread Kagamin via Digitalmars-d-learn
Maybe some module constructor wasn't run due to linking mess. So it remains uninitialized.

Re: writeln() assertion failed in hybrid x64

2014-09-04 Thread Kagamin via Digitalmars-d-learn
https://github.com/D-Programming-Language/druntime/blob/master/src/core/stdc/stdio.d#L457 see? It's null. Hmm... where is it initialized?

Re: writeln() assertion failed in hybrid x64

2014-09-04 Thread Kagamin via Digitalmars-d-learn
https://github.com/D-Programming-Language/druntime/blob/master/src/rt/dmain2.d#L270 well, this sucks.

Re: writeln() assertion failed in hybrid x64

2014-09-05 Thread Kagamin via Digitalmars-d-learn
It's not a module ctor, this code is executed much earlier. You can write a function, which will initialize standard streams, and call it from the C code before rt_init.

Re: Installing LDC on Windows

2014-09-06 Thread Kagamin via Digitalmars-d-learn
SEH was patented, so llvm doesn't support it.

Re: Installing LDC on Windows

2014-09-06 Thread Kagamin via Digitalmars-d-learn
Looks like mingw supports 3 types of exception handling. LDC usually tightly coupled with mingw version, you shouldn't try it blindly, but follow installation instructions instead.

Re: D1: Windows DWORD conversion in D

2014-09-08 Thread Kagamin via Digitalmars-d-learn
cast(DWORD)v

Re: Novice web developer trying to learn D

2014-09-08 Thread Kagamin via Digitalmars-d-learn
On Sunday, 7 September 2014 at 21:06:48 UTC, zuzuleinen wrote: The reason I post this is to ask you what other books do you think I should try in order to become hireable in the next 2 years? See http://forum.dlang.org/thread/sgtnnyvmhxzexupgw...@forum.dlang.org

Re: Novice web developer trying to learn D

2014-09-09 Thread Kagamin via Digitalmars-d-learn
On Monday, 8 September 2014 at 21:17:40 UTC, ketmar via Digitalmars-d-learn wrote: On Mon, 08 Sep 2014 21:05:53 + Gary Willoughby via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I would agree but that little C book is an amazing read and full of valuable lessons. and

Re: Installing LDC on Windows

2014-09-09 Thread Kagamin via Digitalmars-d-learn
On Saturday, 6 September 2014 at 22:06:30 UTC, David Nadlinger wrote: On Saturday, 6 September 2014 at 16:36:38 UTC, Kagamin wrote: Looks like mingw supports 3 types of exception handling. LDC usually tightly coupled with mingw version, you shouldn't try it blindly, but follow installation

Re: spawnShell: how to specify buffering mode (unbuffered, line-buffered, block-buffered)?

2014-09-09 Thread Kagamin via Digitalmars-d-learn
Do you want to customize buffering in child or parent process?

Re: Idiomatic async programming like C# async/await

2014-09-12 Thread Kagamin via Digitalmars-d-learn
async/await is not so much about futures/promises, but optimization of IO-bound operations, i.e. when you wait on network/disk, you don't consume stack, threads and similar resources, an analog in D is vibe.d

Re: Idiomatic async programming like C# async/await

2014-09-13 Thread Kagamin via Digitalmars-d-learn
No, vibe provides synchronous non-blocking interface similar to async/await.

Re: String Theory Questions

2014-09-14 Thread Kagamin via Digitalmars-d-learn
On Sunday, 14 September 2014 at 00:34:56 UTC, WhatMeWorry wrote: So is one form (Empty strings versus null strings) considered better than the other? Or does it depend on the context? For all practical purposes they should be equivalent in D code. I suppose the distinction exists because

Re: Idiomatic async programming like C# async/await

2014-09-14 Thread Kagamin via Digitalmars-d-learn
On Friday, 12 September 2014 at 03:59:58 UTC, Cliff wrote: ...but std.parallelism.Task requires parameterization on the function which the task would execute - that is clearly an implementation detail of the store. I think, you can wrap the Task in a class. abstract class CTask { abstract

Re: Template alias parameters to local variables

2014-09-14 Thread Kagamin via Digitalmars-d-learn
Doesn't this cause infinite recursion?

  1   2   3   4   5   6   7   8   9   >