Re: Handling arbitrary char ranges

2016-04-20 Thread ag0aep6g via Digitalmars-d-learn
On 21.04.2016 04:35, Alex Parrill wrote: On Wednesday, 20 April 2016 at 22:44:37 UTC, ag0aep6g wrote: On 20.04.2016 23:59, Alex Parrill wrote: [...] That's not assigning the elements of a void[]; it's just changing what the slice points to and adjusting the length, like doing `void* ptr =

Re: Computer Vision Library in D

2016-04-20 Thread rikki cattermole via Digitalmars-d-announce
On 20/04/2016 7:46 PM, Relja Ljubobratovic wrote: On Wednesday, 20 April 2016 at 06:14:58 UTC, rikki cattermole wrote: I was thinking std.math.linalg kinda seems like the right place once std.math is split up. There is an isolated one other than gfm.math. gl3n but I don't have permission to

Re: std.experimental.allocator.make should throw on out-of-memory

2016-04-20 Thread Era Scarecrow via Digitalmars-d
On Wednesday, 20 April 2016 at 21:26:12 UTC, Alex Parrill wrote: This would be best implemented in a "building block" allocator that wraps a different allocator and uses the 'allocate' function, making it truly optional. It would also need a timeout to fail eventually, or else you possibly

Re: Changelog entries as folder or in wiki

2016-04-20 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 20 April 2016 at 23:51:41 UTC, Seb wrote: Honestly I prefer 1) - the changelog entry can be approved & checked during the code review on Github and the reviewers can check that such an addition is provided in the PR. On a new release we can just cat the files and remove them -

Re: Handling arbitrary char ranges

2016-04-20 Thread Alex Parrill via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 22:44:37 UTC, ag0aep6g wrote: On 20.04.2016 23:59, Alex Parrill wrote: On Wednesday, 20 April 2016 at 17:09:29 UTC, Matt Kline wrote: [...] First, you can't assign anything to a void[], for the same reason you can't dereference a void*. This includes the slice

Re: Compiler or Interpreter or Hybrid

2016-04-20 Thread thedeemon via Digitalmars-d-learn
On Thursday, 21 April 2016 at 02:06:00 UTC, newB wrote: How is D implemented? (Compiler, Interpreter and Hybrid). Can you please explain why? Generally D is a compiled language: you give the compiler some source code and it produces executable binary with native machine code. Then you

Re: Adding a float with all four elements of a float4

2016-04-20 Thread Straivers via Digitalmars-d-learn
On Thursday, 21 April 2016 at 01:49:19 UTC, Nicholas Wilson wrote: [...] you want to broadcast the rhs to a float4 and then adds them. Can you post the errors (if any) you get during compilation. Urgh, autocorrect. That should be addps them. I get a "Error: floating point constant

Compiler or Interpreter or Hybrid

2016-04-20 Thread newBeeee via Digitalmars-d-learn
How is D implemented? (Compiler, Interpreter and Hybrid). Can you please explain why?

Re: Adding a float with all four elements of a float4

2016-04-20 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 21 April 2016 at 01:48:15 UTC, Nicholas Wilson wrote: On Thursday, 21 April 2016 at 00:14:53 UTC, Straivers wrote: Hi, I want to make a utility wrapper around a core.simd.float4, and have been trying to make the following code work, but have been met with no success. [...]

Re: Adding a float with all four elements of a float4

2016-04-20 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 21 April 2016 at 00:14:53 UTC, Straivers wrote: Hi, I want to make a utility wrapper around a core.simd.float4, and have been trying to make the following code work, but have been met with no success. [...] you want to broadcast the rhs to a float4 and then adds them. Can

Re: Linker error for d.o: relocation R_X86_64_32 against `__dmd_personality_v0'

2016-04-20 Thread rcorre via Digitalmars-d-learn
On Thursday, 21 April 2016 at 01:18:14 UTC, rcorre wrote: On Wednesday, 20 April 2016 at 19:24:49 UTC, Chris wrote: On Wednesday, 20 April 2016 at 12:04:45 UTC, rcorre wrote: === $ dmd /tmp/d.d /usr/bin/ld: d.o: relocation R_X86_64_32 against `__dmd_personality_v0' can not be used when making

Re: Linker error for d.o: relocation R_X86_64_32 against `__dmd_personality_v0'

2016-04-20 Thread rcorre via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 19:24:49 UTC, Chris wrote: On Wednesday, 20 April 2016 at 12:04:45 UTC, rcorre wrote: === $ dmd /tmp/d.d /usr/bin/ld: d.o: relocation R_X86_64_32 against `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC d.o: error adding

Distributor's whishlist and questions for D

2016-04-20 Thread Matthias Klumpp via Digitalmars-d
Hello! Me bringing dub to Debian (and subsequently Ubuntu) has sparked quite some interest in getting more D applications shipped in Linux distributions. Since I think D is a great language, I would welcome that - in order to get more D code into distributions though, it would be awesome to

Re: DConf 2016 offical presentation template

2016-04-20 Thread Andrei Alexandrescu via Digitalmars-d
qznc wrote: > On Wednesday, 20 April 2016 at 07:53:53 UTC, Benjamin Thaut wrote: >> Many programmers (me included) are not good with picking colors >> and thus presentations usually don't look as good as they could. > > My advice for "graphical-design-challenged" presenters would

Re: DConf 2016 Berlin - Live Streaming ?

2016-04-20 Thread Dicebot via Digitalmars-d
On Thursday, 21 April 2016 at 00:21:30 UTC, Nick B wrote: Hi. Can anyone advise if there will be live streaming of this event ? cheers Nick Almost certainly yes. I will make announcement as soon as some last details are figured out (expect it within 24 hours ;)).

DConf 2016 Berlin - Live Streaming ?

2016-04-20 Thread Nick B via Digitalmars-d
Hi. Can anyone advise if there will be live streaming of this event ? cheers Nick

Adding a float with all four elements of a float4

2016-04-20 Thread Straivers via Digitalmars-d-learn
Hi, I want to make a utility wrapper around a core.simd.float4, and have been trying to make the following code work, but have been met with no success. auto add(float rhs) { return __simd(XMM.ADDPS, lhs, rhs); } Then I tried auto add(float4 lhs, float rhs) { float4 tmp = [rhs,

VisualD + ZeroMQ

2016-04-20 Thread Chuck Moore via Digitalmars-d-learn
Hi Everyone, Preamble: We're a Win7+VisualStudio development environment. This question involves integrating the GitHub-based 'D-Programming-Deimos/ZeroMQ' package in a 'D' solution. Short form of issue: If anyone has compiled a D program using (say) zmq_ctx_new(), then I'd appreciate

Changelog entries as folder or in wiki

2016-04-20 Thread Seb via Digitalmars-d
Hi all, I had to rebase a couple of PRs lately due to conflicts with the changelog and I believe I am not the only one, which is why probably people mostly don't include their change(s) in the log anymore. AFAICT they either submit a follow-up PR once it gets merged or sometimes forget to

Re: Handling arbitrary char ranges

2016-04-20 Thread ag0aep6g via Digitalmars-d-learn
On 20.04.2016 23:59, Alex Parrill wrote: On Wednesday, 20 April 2016 at 17:09:29 UTC, Matt Kline wrote: [...] First, you can't assign anything to a void[], for the same reason you can't dereference a void*. This includes the slice assignment that you are trying to do in `buf[0..minLen] =

Re: Compiling with -profile=gc makes program crash - why?

2016-04-20 Thread Ivan Kazmenko via Digitalmars-d
On Wednesday, 20 April 2016 at 22:27:36 UTC, Ivan Kazmenko wrote: I'm trying to use DMD option "-profile=gc". With this option, the following simple program crashes with 2.071.0 down to 2.069.0 but still works on 2.068.2. The command line is "dmd -g -profile=gc prfail1.d" on Windows

Compiling with -profile=gc makes program crash - why?

2016-04-20 Thread Ivan Kazmenko via Digitalmars-d
I'm trying to use DMD option "-profile=gc". With this option, the following simple program crashes with 2.071.0 down to 2.069.0 but still works on 2.068.2. The command line is "dmd -g -profile=gc prfail1.d" on Windows (compiled to 32-bit by default). -prfail1.d- import

Re: Blog post: PGO: Optimizing D's virtual calls

2016-04-20 Thread Marco Leise via Digitalmars-d-announce
Am Fri, 15 Apr 2016 09:04:21 + schrieb Johan Engelen : > On Wednesday, 13 April 2016 at 11:34:26 UTC, Johan Engelen wrote: > > Hi all, > > I've written an article about how I implemented > > profile-guided optimization (PGO) of virtual calls to direct > > calls (a

Re: Handling arbitrary char ranges

2016-04-20 Thread Alex Parrill via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 17:09:29 UTC, Matt Kline wrote: [...] First, you can't assign anything to a void[], for the same reason you can't dereference a void*. This includes the slice assignment that you are trying to do in `buf[0..minLen] = remainingData[0..minLen];`. Cast the

[Issue 10351] [GC] GC deadlocks in thread_suspendAll()

2016-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10351 Aleksei Preobrazhenskii changed: What|Removed |Added See Also|

[Issue 15939] GC.collect causes deadlock in multi-threaded environment

2016-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15939 Aleksei Preobrazhenskii changed: What|Removed |Added See Also|

Re: std.experimental.allocator.make should throw on out-of-memory

2016-04-20 Thread Alex Parrill via Digitalmars-d
On Wednesday, 20 April 2016 at 20:23:53 UTC, Era Scarecrow wrote: The downside though is the requirement to throw may not be necessary. Having a failed attempt at getting memory and sleeping the program for 1-2 seconds before retrying could succeed on a future attempt. For games this would

Re: std.experimental.allocator.make should throw on out-of-memory

2016-04-20 Thread Alex Parrill via Digitalmars-d
On Wednesday, 20 April 2016 at 19:18:58 UTC, Minas Mina wrote: On Tuesday, 19 April 2016 at 22:28:27 UTC, Alex Parrill wrote: I'm proposing that std.experimental.allocator.make, as well as its friends, throw an exception when the allocator cannot satisfy a request instead of returning null.

Re: Handling arbitrary char ranges

2016-04-20 Thread ag0aep6g via Digitalmars-d-learn
On 20.04.2016 22:09, Matt Kline wrote: I'd rather not write my own cURL wrapper. Do you think it would be worthwhile starting a PR for Phobos to get it changed to ubyte[]? A reading of https://dlang.org/spec/arrays.html indicates the main difference is that that GC crawls void[], but I would

Re: Nullable types

2016-04-20 Thread zashi via Digitalmars-d
On Wednesday, 20 June 2012 at 16:31:34 UTC, Mehrdad wrote: I've made my own nullable type, and I think it works a bit more naturally than Phobos's in some cases, since it takes advantage of alias this and typeof(null) and some stuff. [...] Mehrdad, you sir, are a wizard. Hat off to you!

Re: about destroy and delete.

2016-04-20 Thread Marco Leise via Digitalmars-d
The semantics of `delete` from C++ are pretty clear. It is meant for dynamically allocated memory. destroy(…) however is a generic tool that brings the thing you pass in back to an initial state. For pointers, null is assigned, for structs and classes (which are not pointers but references) the

Re: IDE - Coedit 2, update 4 released

2016-04-20 Thread Basile Burg via Digitalmars-d-announce
On Wednesday, 20 April 2016 at 09:47:53 UTC, growlercab wrote: On Wednesday, 20 April 2016 at 09:09:44 UTC, Basile Burg wrote: This is an unfortunate hotfix release, see https://github.com/BBasile/Coedit/releases/tag/2_update_4 With the hope it's the latest version 2 update. This is a great

Re: DConf 2016 offical presentation template

2016-04-20 Thread Benjamin Thaut via Digitalmars-d
On Wednesday, 20 April 2016 at 20:10:56 UTC, qznc wrote: On Wednesday, 20 April 2016 at 07:53:53 UTC, Benjamin Thaut wrote: Is there a official presentation template for Dconf 2016? If not it would be great if someone could create one. Many programmers (me included) are not good with picking

Re: VariantPointer

2016-04-20 Thread Nordlöw via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 18:40:58 UTC, Alex Parrill wrote: As for the GC, you're probably out of luck. Adding a global mask option is unlikely to work well if multiple libraries use it. So we need an optional block-local mask then! ;)

Re: DConf 2016 offical presentation template

2016-04-20 Thread qznc via Digitalmars-d
On Wednesday, 20 April 2016 at 07:53:53 UTC, Benjamin Thaut wrote: Many programmers (me included) are not good with picking colors and thus presentations usually don't look as good as they could. My advice for "graphical-design-challenged" presenters would be * If you feel unsure about

Re: Computer Vision Library in D

2016-04-20 Thread tchaloupka via Digitalmars-d-announce
On Wednesday, 20 April 2016 at 19:53:27 UTC, Jacob Carlborg wrote: On 2016-04-20 06:31, Relja Ljubobratovic wrote: I've given this a lot of thought. I use OpenCV daily on the job, and I'm very familiar with it. I too believe it would probably be smarter, faster and safer to wrap its C

Re: std.experimental.allocator.make should throw on out-of-memory

2016-04-20 Thread Era Scarecrow via Digitalmars-d
On Tuesday, 19 April 2016 at 22:28:27 UTC, Alex Parrill wrote: * It fails faster and safer. It's better to error out immediately with a descriptive "out of memory" message instead of potentially continuing with an invalid pointer and potentially causing an invalid memory access, or worse, a

Re: DConf 2016 offical presentation template

2016-04-20 Thread qznc via Digitalmars-d
On Wednesday, 20 April 2016 at 07:53:53 UTC, Benjamin Thaut wrote: Is there a official presentation template for Dconf 2016? If not it would be great if someone could create one. Many programmers (me included) are not good with picking colors and thus presentations usually don't look as good

Re: Handling arbitrary char ranges

2016-04-20 Thread Matt Kline via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 20:00:58 UTC, ag0aep6g wrote: Maybe I've missed it, but you didn't say where the HTTP type comes from, did you? std.net.curl: https://dlang.org/phobos/std_net_curl.html#.HTTP (Sorry, I assumed that was a given since it's a standard library type. Poor

Re: VariantPointer

2016-04-20 Thread Nordlöw via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 16:08:32 UTC, Lass Safin wrote: core.memory.GC.setAttr can set attributes for a block of memory, with which you can set the attribute NO_SCAN, which as it implies, forces that no scan be done in the particular block of memory. This can be used to insure that the

Re: Shallow copy object when type is know

2016-04-20 Thread Tofu Ninja via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 18:48:58 UTC, Alex Parrill wrote: On Wednesday, 20 April 2016 at 12:32:48 UTC, Tofu Ninja wrote: Is there a way to shallow copy an object when the type is known? I cant seem to figure out if there is a standard way. I can't just implement a copy function for the

[Issue 15939] GC.collect causes deadlock in multi-threaded environment

2016-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15939 --- Comment #6 from Aleksei Preobrazhenskii --- I think I saw the same behaviour in debug builds, I will try to verify it. As of 32-bit question, due to the nature of the program I can't test it in 32-bit environment.

Re: Handling arbitrary char ranges

2016-04-20 Thread ag0aep6g via Digitalmars-d-learn
On 20.04.2016 21:48, Matt Kline wrote: I don't have an option here, do I? I assume HTTP.onSend doesn't take a `delegate size_t(ubyte[])` insetad of a `delegate size_t(void[])`, and that the former isn't implicitly convertible to the latter. Maybe I've missed it, but you didn't say where the

Re: Computer Vision Library in D

2016-04-20 Thread Jacob Carlborg via Digitalmars-d-announce
On 2016-04-20 06:31, Relja Ljubobratovic wrote: I've given this a lot of thought. I use OpenCV daily on the job, and I'm very familiar with it. I too believe it would probably be smarter, faster and safer to wrap its C interface with D, from the user's point of view.

Re: Handling arbitrary char ranges

2016-04-20 Thread Matt Kline via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 19:29:22 UTC, ag0aep6g wrote: Maybe use ubyte[] for the buffer type instead. I don't have an option here, do I? I assume HTTP.onSend doesn't take a `delegate size_t(ubyte[])` insetad of a `delegate size_t(void[])`, and that the former isn't implicitly

Re: std.experimental.allocator.make should throw on out-of-memory

2016-04-20 Thread Basile Burg via Digitalmars-d
On Wednesday, 20 April 2016 at 19:18:58 UTC, Minas Mina wrote: On Tuesday, 19 April 2016 at 22:28:27 UTC, Alex Parrill wrote: I'm proposing that std.experimental.allocator.make, as well as its friends, throw an exception when the allocator cannot satisfy a request instead of returning null.

[Issue 15942] bogus "cannot implicitly convert expression" error when using vector notation to copy from immutable to mutable

2016-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15942 ag0ae...@gmail.com changed: What|Removed |Added Summary|bogus "cannot implicitly|bogus "cannot implicitly

Re: Using D in Debian to build AppStream metadata.

2016-04-20 Thread Chris via Digitalmars-d-announce
On Sunday, 17 April 2016 at 11:10:29 UTC, Antonio Corbi wrote: Hello, Just read this post from Matthias Klumpp (http://blog.tenstral.net/2016/04/introducing-appstream-generator.html) in planet.debian.net where he talks about replacing the current appstream metadata generator written in python

Re: Handling arbitrary char ranges

2016-04-20 Thread ag0aep6g via Digitalmars-d-learn
On 20.04.2016 19:09, Matt Kline wrote: 1. What is the idiomatic way to constrain the function to only take char ranges? One might naïvely add `is(ElementType!T : char)`, but that falls on its face due to strings "auto-decoding" their elements to dchar. (More on that later.) Well, string is not

Re: Linker error for d.o: relocation R_X86_64_32 against `__dmd_personality_v0'

2016-04-20 Thread Chris via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 12:04:45 UTC, rcorre wrote: === $ dmd /tmp/d.d /usr/bin/ld: d.o: relocation R_X86_64_32 against `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC d.o: error adding symbols: Bad value collect2: error: ld returned 1 exit

Re: std.experimental.allocator.make should throw on out-of-memory

2016-04-20 Thread Minas Mina via Digitalmars-d
On Tuesday, 19 April 2016 at 22:28:27 UTC, Alex Parrill wrote: I'm proposing that std.experimental.allocator.make, as well as its friends, throw an exception when the allocator cannot satisfy a request instead of returning null. [...] I believe it was designed this way so that it can be

[Issue 15941] [REG v2.069] rbtree no longer supports classes

2016-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15941 Jack Stouffer changed: What|Removed |Added CC||j...@jackstouffer.com

Re: VariantPointer

2016-04-20 Thread Alex Parrill via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 13:41:27 UTC, Nordlöw wrote: At https://github.com/nordlow/phobos-next/blob/master/src/variant_pointer.d I've implemented a pointer-only version of Variant called VariantPointer. I plan to use it to construct light-weight polymorphism in trie containers for D

Re: Shallow copy object when type is know

2016-04-20 Thread Alex Parrill via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 12:32:48 UTC, Tofu Ninja wrote: Is there a way to shallow copy an object when the type is known? I cant seem to figure out if there is a standard way. I can't just implement a copy function for the class, I need a generic solution. A generic class copy function

Re: Handling arbitrary char ranges

2016-04-20 Thread Alex Parrill via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 17:09:29 UTC, Matt Kline wrote: I'm doing some work with a REST API, and I wrote a simple utility function that sets an HTTP's onSend callback to send a string: [...] IO functions usually work with octets, not characters, so an extra encoding step is needed.

Re: std.experimental.allocator.make should throw on out-of-memory

2016-04-20 Thread Alex Parrill via Digitalmars-d
On Wednesday, 20 April 2016 at 18:07:05 UTC, Alex Parrill wrote: Yes, enforce helps (and I forgot it reruns its argument), but its still boilerplate, and it throws a generic "enforcement failed" exception instead of a more specific "out of memory" exception unless you remember to specify your

Re: std.experimental.allocator.make should throw on out-of-memory

2016-04-20 Thread Alex Parrill via Digitalmars-d
On Wednesday, 20 April 2016 at 01:59:31 UTC, Vladimir Panteleev wrote: On Tuesday, 19 April 2016 at 22:28:27 UTC, Alex Parrill wrote: * It eliminates the incredibly tedious, annoying, and easy-to-forget boilerplate after every allocation to check if the allocation succeeded. FWIW, you can

Re: final switch and straight integers

2016-04-20 Thread Basile Burg via Digitalmars-d
On Wednesday, 20 April 2016 at 10:19:17 UTC, Dominikus Dittes Scherkl wrote: Anyway, something need to be changed. a) allow Range Cases (nice for ints but bad idea for enums) b) require also non-enum types to explicitly state all cases (bad idea for any multi-byte type, even near useless for

Re: Gnome Builder IDE

2016-04-20 Thread Karabuta via Digitalmars-d
On Wednesday, 20 April 2016 at 06:40:38 UTC, Russel Winder wrote: On Tue, 2016-04-19 at 16:29 +, Karabuta via Digitalmars-d wrote: Anyone tried this IDE for D coding? Seems to work pretty well. It deserves some D attention. https://wiki.gnome.org/Apps/Builder I downloaded gnome-builder

Re: Computer Vision Library in D

2016-04-20 Thread tost via Digitalmars-d-announce
On Wednesday, 20 April 2016 at 07:43:01 UTC, Relja Ljubobratovic wrote: Sound great! Although I'm far from implementing methods that use optimization techniques for dcv, I'll be sure to remember this. Maybe you should push the solution to github and have other people take a look? hopefully

Handling arbitrary char ranges

2016-04-20 Thread Matt Kline via Digitalmars-d-learn
I'm doing some work with a REST API, and I wrote a simple utility function that sets an HTTP's onSend callback to send a string: @property outgoingString(ref HTTP request, const(void)[] sendData) { import std.algorithm : min; request.contentLength = sendData.length;

Re: Linker error for d.o: relocation R_X86_64_32 against `__dmd_personality_v0'

2016-04-20 Thread rcorre via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 12:48:46 UTC, rcorre wrote: On Wednesday, 20 April 2016 at 12:04:45 UTC, rcorre wrote: === $ dmd /tmp/d.d /usr/bin/ld: d.o: relocation R_X86_64_32 against `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC d.o: error adding

Re: about destroy and delete.

2016-04-20 Thread Lass Safin via Digitalmars-d
On Wednesday, 20 April 2016 at 08:10:15 UTC, Dsby wrote: I see https://dlang.org/deprecate.html#delete The delete will be removeed, when will be deprecate? and i test destroy/GC.free and delte in struct, the value is difference; struct Struct { string value = "struct"; ~this() {

Re: VariantPointer

2016-04-20 Thread Lass Safin via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 14:36:54 UTC, Nordlöw wrote: On Wednesday, 20 April 2016 at 13:41:27 UTC, Nordlöw wrote: At https://github.com/nordlow/phobos-next/blob/master/src/variant_pointer.d Further: What to do with fact that the GC will fail to scan VariantPointers? Can the GC be

Re: VariantPointer

2016-04-20 Thread Lass Safin via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 13:41:27 UTC, Nordlöw wrote: At https://github.com/nordlow/phobos-next/blob/master/src/variant_pointer.d I've implemented a pointer-only version of Variant called VariantPointer. [...] It safe to assume that `typeBits` most significant bits of a pointer on a

[Issue 15941] New: Regression: rbtree no longer supports classes

2016-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15941 Issue ID: 15941 Summary: Regression: rbtree no longer supports classes Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression

Re: VariantPointer

2016-04-20 Thread Nordlöw via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 13:41:27 UTC, Nordlöw wrote: At https://github.com/nordlow/phobos-next/blob/master/src/variant_pointer.d Further: What to do with fact that the GC will fail to scan VariantPointers? Can the GC be tweaked to mask out the type bits before scanning?

VariantPointer

2016-04-20 Thread Nordlöw via Digitalmars-d-learn
At https://github.com/nordlow/phobos-next/blob/master/src/variant_pointer.d I've implemented a pointer-only version of Variant called VariantPointer. I plan to use it to construct light-weight polymorphism in trie containers for D I'm currently writing. VariantPointer uses the top N-bits

std.experimental.allocator unittest failures on Win32

2016-04-20 Thread Vladimir Panteleev via Digitalmars-d
Hi, When I attempt to run the Phobos tests on my machine, I get the following: core.exception.AssertError@std\experimental\allocator\building_blocks\allocator_list.d(198): Assertion failure 0x010AECF7 in _d_assert 0x00EBF05A in

Re: sorting a mutable array of immutable objects

2016-04-20 Thread Jeff Thompson via Digitalmars-d
On Wednesday, 20 April 2016 at 12:34:28 UTC, Anonymouse wrote: On Wednesday, 20 April 2016 at 10:32:42 UTC, Jeff Thompson wrote: On Wednesday, 20 April 2016 at 09:54:13 UTC, Jeff Thompson wrote: I can create a mutable array of immutable objects, thanks to the answers to my other question

Re: DUB and static libs

2016-04-20 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 10:19:10 UTC, abad wrote: I have a project which is a mixture of D, C++ and C. I have used Make for build automation so far but would like to migrate to DUB. I have hard time figuring out what to do with C / C++ sections of the program. DUB seems to ignore

Re: DUB and static libs

2016-04-20 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 13:12:54 UTC, Mike Parker wrote: "libs": [ "stdc++", "sid.a" ], Oh, if you're using DMD only you can also pass configure it using sourceFiles: "sourceFile": ["/path/to/libsid.a"] The first is the equivalant of: dmd -L-lsid main.d ... And the second: dmd

Re: sorting a mutable array of immutable objects

2016-04-20 Thread Anonymouse via Digitalmars-d
On Wednesday, 20 April 2016 at 12:34:28 UTC, Anonymouse wrote: On Wednesday, 20 April 2016 at 10:32:42 UTC, Jeff Thompson [...] Also note that sort (std.algorithm.sorting : sort) returns a range and doesn't sort in place. (Lastly this is probably more at home in the Learn forum.) It does

Re: Linker error for d.o: relocation R_X86_64_32 against `__dmd_personality_v0'

2016-04-20 Thread rcorre via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 12:04:45 UTC, rcorre wrote: === $ dmd /tmp/d.d /usr/bin/ld: d.o: relocation R_X86_64_32 against `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC d.o: error adding symbols: Bad value collect2: error: ld returned 1 exit

Shallow copy object when type is know

2016-04-20 Thread Tofu Ninja via Digitalmars-d-learn
Is there a way to shallow copy an object when the type is known? I cant seem to figure out if there is a standard way. I can't just implement a copy function for the class, I need a generic solution.

Re: sorting a mutable array of immutable objects

2016-04-20 Thread Anonymouse via Digitalmars-d
On Wednesday, 20 April 2016 at 10:32:42 UTC, Jeff Thompson wrote: On Wednesday, 20 April 2016 at 09:54:13 UTC, Jeff Thompson wrote: I can create a mutable array of immutable objects, thanks to the answers to my other question https://forum.dlang.org/post/nf57f5$e6v$1...@digitalmars.com . Now

Linker error for d.o: relocation R_X86_64_32 against `__dmd_personality_v0'

2016-04-20 Thread rcorre via Digitalmars-d-learn
=== $ dmd /tmp/d.d /usr/bin/ld: d.o: relocation R_X86_64_32 against `__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC d.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status --- errorlevel 1 === I'm seeing the above trying to

DConf Lightning talk submissions

2016-04-20 Thread Atila Neves via Digitalmars-d
I have an idea already, are they being accepted or only in Berlin? Atila

[Issue 13674] ICE(el.c) with simd multiplication of short8

2016-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13674 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/89b765778fa46c1cd7eeb5173dbb6f9a5518176d fix Issue 13674 - ICE(el.c) with simd multiplication of

[Issue 15144] Bad operand size in asm { movdqa ... } produces bogus ubyte16 initializer error elsewhere.

2016-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15144 Walter Bright changed: What|Removed |Added OS|Linux |All --- Comment

Re: sorting a mutable array of immutable objects

2016-04-20 Thread Jeff Thompson via Digitalmars-d
On Wednesday, 20 April 2016 at 09:54:13 UTC, Jeff Thompson wrote: I can create a mutable array of immutable objects, thanks to the answers to my other question https://forum.dlang.org/post/nf57f5$e6v$1...@digitalmars.com . Now I want to sort the array. I found a solution, but I'm not sure

DUB and static libs

2016-04-20 Thread abad via Digitalmars-d-learn
I have a project which is a mixture of D, C++ and C. I have used Make for build automation so far but would like to migrate to DUB. I have hard time figuring out what to do with C / C++ sections of the program. DUB seems to ignore (probably sensibly) everything but D source files. I compiled

Re: final switch and straight integers

2016-04-20 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 20 April 2016 at 07:23:09 UTC, Bastiaan Veelo wrote: On Wednesday, 20 April 2016 at 07:18:55 UTC, Bastiaan Veelo wrote: On Wednesday, 20 April 2016 at 06:36:01 UTC, bearophile wrote: Dominikus Dittes Scherkl: final switch makes no sense on things that are not enumerated. Even

Re: sorting a mutable array of immutable objects

2016-04-20 Thread Jeff Thompson via Digitalmars-d
On Wednesday, 20 April 2016 at 09:54:13 UTC, Jeff Thompson wrote: I can create a mutable array of immutable objects, thanks to the answers to my other question https://forum.dlang.org/post/nf57f5$e6v$1...@digitalmars.com . Now I want to sort the array, but the sort function doesn't "see" the

sorting a mutable array of immutable objects

2016-04-20 Thread Jeff Thompson via Digitalmars-d
I can create a mutable array of immutable objects, thanks to the answers to my other question https://forum.dlang.org/post/nf57f5$e6v$1...@digitalmars.com . Now I want to sort the array, but the sort function doesn't "see" the opCmp in class C. Do I need to define a custom compare function

Re: IDE - Coedit 2, update 4 released

2016-04-20 Thread growlercab via Digitalmars-d-announce
On Wednesday, 20 April 2016 at 09:09:44 UTC, Basile Burg wrote: This is an unfortunate hotfix release, see https://github.com/BBasile/Coedit/releases/tag/2_update_4 With the hope it's the latest version 2 update. This is a great D IDE that is getting better all the time, thanks!

[Issue 15939] GC.collect causes deadlock in multi-threaded environment

2016-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15939 --- Comment #5 from Sobirari Muhomori --- Also what about 32-bit mode? --

[Issue 15939] GC.collect causes deadlock in multi-threaded environment

2016-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15939 --- Comment #4 from Sobirari Muhomori --- (In reply to Aleksei Preobrazhenskii from comment #0) > dmd 2.071.0 with -O -release -inline -boundscheck=off Do these flags affect the hang? --

IDE - Coedit 2, update 4 released

2016-04-20 Thread Basile Burg via Digitalmars-d-announce
This is an unfortunate hotfix release, see https://github.com/BBasile/Coedit/releases/tag/2_update_4 With the hope it's the latest version 2 update.

Re: about destroy and delete.

2016-04-20 Thread Daniel Kozak via Digitalmars-d
On Wednesday, 20 April 2016 at 08:10:15 UTC, Dsby wrote: I see https://dlang.org/deprecate.html#delete ... so, I want to know why don't destroy direct printf ? if you call destroy on struct pointer it is same as assign null to it so destroy(s) is same as s = null; OK it is more like s =

Re: Policy for exposing range structs

2016-04-20 Thread Johan Engelen via Digitalmars-d
On Tuesday, 19 April 2016 at 17:59:48 UTC, Steven Schveighoffer wrote: On 4/19/16 10:44 AM, Johan Engelen wrote: The feature is experimental, and has been tested on Weka.io's codebase. Compilation with -hashthres=1000 results in a binary that is half the size of the original (201MB vs.

Re: DConf 2016 offical presentation template

2016-04-20 Thread Suliman via Digitalmars-d
On Wednesday, 20 April 2016 at 07:53:53 UTC, Benjamin Thaut wrote: Is there a official presentation template for Dconf 2016? If not it would be greate if someone could create one. Many programmers (me included) are not good with picking colors and thus presentations usually don't look as good

Re: about destroy and delete.

2016-04-20 Thread Dsby via Digitalmars-d
And ,will destroy mark the memory in GC to be free?

Re: final switch and straight integers

2016-04-20 Thread Johan Engelen via Digitalmars-d
On Wednesday, 20 April 2016 at 06:36:01 UTC, bearophile wrote: It's easy to cover all the values in a switch, using ranges. Not as easy as you would think: int i; switch(i) { case 0: .. case 9: break; case 10: ..case 1000: break;

about destroy and delete.

2016-04-20 Thread Dsby via Digitalmars-d
I see https://dlang.org/deprecate.html#delete The delete will be removeed, when will be deprecate? and i test destroy/GC.free and delte in struct, the value is difference; struct Struct { string value = "struct"; ~this() { writeln(value); } } void main() { auto

DConf 2016 offical presentation template

2016-04-20 Thread Benjamin Thaut via Digitalmars-d
Is there a official presentation template for Dconf 2016? If not it would be greate if someone could create one. Many programmers (me included) are not good with picking colors and thus presentations usually don't look as good as they could. Kind Regards Benjamin Thaut

Re: final switch and straight integers

2016-04-20 Thread Bastiaan Veelo via Digitalmars-d
On Wednesday, 20 April 2016 at 07:18:55 UTC, Bastiaan Veelo wrote: On Wednesday, 20 April 2016 at 06:36:01 UTC, bearophile wrote: Dominikus Dittes Scherkl: final switch makes no sense on things that are not enumerated. Even on ubyte almost nobody will ever list all 256 cases, not to mention

Re: final switch and straight integers

2016-04-20 Thread Bastiaan Veelo via Digitalmars-d
On Wednesday, 20 April 2016 at 06:36:01 UTC, bearophile wrote: Dominikus Dittes Scherkl: final switch makes no sense on things that are not enumerated. Even on ubyte almost nobody will ever list all 256 cases, not to mention larger types. It's easy to cover all the values in a switch, using

[Issue 15940] New: std.variant.Variant: compilation fails if a value is aliased struct

2016-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15940 Issue ID: 15940 Summary: std.variant.Variant: compilation fails if a value is aliased struct Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: DUB and pragma lib - OSX

2016-04-20 Thread Joel via Digitalmars-d-learn
On Wednesday, 20 April 2016 at 06:16:35 UTC, rikki cattermole wrote: On 20/04/2016 5:53 PM, Joel wrote: [...] Dub does separate compilation and linking. Add them as "libs": ["readline", "curses"] for dub.json (sdl is a bit similar). Yay! Worked, thanks rikki cattermole!

  1   2   >