On Friday, 22 June 2012 at 23:01:47 UTC, David wrote:
Am 22.06.2012 23:11, schrieb Namespace:
debugger), but my guess is that Namespace just doesn't know
how to do
that or
that it's even possible - hence his frustration with not
getting any
information.
Exactly.
And I use VisualD and the
On Fri, 22 Jun 2012 13:13:52 -0500, Minas Mina
minas_mina1...@hotmail.co.uk wrote:
I'm sorry, what I meant was how to interface to C code. Sorry for
writing it in a bad way.
Do I just declare the C code as extern and then link together with the C
.lib/.o/.so file? (I'm in Ubuntu)
What
Am 23.06.2012 07:27, schrieb Namespace:
I would prefer NullPointer Exceptions and / or not null types rather
than playing around with the debugger.
That's the first step.
Yeah but not implemented by a library.
On Saturday, 23 June 2012 at 09:53:35 UTC, David wrote:
Am 23.06.2012 07:27, schrieb Namespace:
I would prefer NullPointer Exceptions and / or not null types
rather
than playing around with the debugger.
That's the first step.
Yeah but not implemented by a library.
Not yet. ;)
http://dlang.org/phobos/std_array.html#splitter
The first thing I don't understand is why splitter is in /std.array/ and
yet only works on /strings/. It is defined in terms of whitespace, and
I don't understand how whitespace is well-defined for things besides
text. Why wouldn't it be in
On Sat, 23 Jun 2012 17:19:59 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
http://dlang.org/phobos/std_array.html#splitter
The first thing I don't understand is why splitter is in /std.array/ and
yet only works on /strings/. It is defined in terms of whitespace,
and I don't
I'm realizing that if I want to remove exactly one line from a string of
text and make no assumptions about the type of newline (\n or \r\n
or \r) and without scanning the rest of the text then I'm not sure how
to do this with a single call to phobos functions. I'd have to use
indexOf and do
On 06/23/2012 11:31 AM, simendsjo wrote:
On Sat, 23 Jun 2012 17:19:59 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
http://dlang.org/phobos/std_array.html#splitter
The first thing I don't understand is why splitter is in /std.array/
and yet only works on /strings/. It is defined in
On Sat, 23 Jun 2012 17:39:55 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
On 06/23/2012 11:31 AM, simendsjo wrote:
On Sat, 23 Jun 2012 17:19:59 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
http://dlang.org/phobos/std_array.html#splitter
The first thing I don't
On Sat, 23 Jun 2012 18:05:47 +0200, Minas Mina
minas_mina1...@hotmail.co.uk wrote:
I am using a secondary thread to send messages to it so it can print
those messages.
import std.stdio;
import std.concurrency;
void main()
{
auto low = 0, high = 10;
auto tid =
On 06/23/2012 09:05 AM, Minas Mina wrote:
I am using a secondary thread to send messages to it so it can print
those messages.
std.concurrency.OwnerTerminated@std/concurrency.d(248): Owner terminated
The OwnerTerminated exception is thrown when a worker attempts to
receive a message to
On Sat, 23 Jun 2012 18:29:37 +0200, simendsjo simend...@gmail.com wrote:
auto tid = spawnLinked(writer);
auto tid = spawn(writer); of course
On Sat, 23 Jun 2012 18:29:50 +0200, Ali Çehreli acehr...@yahoo.com wrote:
receive(
(Tid id, int i)
{
writeln(Secondary thread: , i);
},
(OwnerTerminated exc) // - as a message
{
done = true;
On 06/23/2012 11:44 AM, simendsjo wrote:
On Sat, 23 Jun 2012 17:39:55 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
On 06/23/2012 11:31 AM, simendsjo wrote:
On Sat, 23 Jun 2012 17:19:59 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
Thank you very much :)
I like the you are done :) approach!
On Sat, 23 Jun 2012 18:50:05 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
Looking for findSplit?
http://dlang.org/phobos/std_algorithm.html#findSplit
Cool, that's what I want!
Now if I could find the elegant way to remove exactly one line from the
text without scanning the
On Sat, 23 Jun 2012 18:56:24 +0200, simendsjo simend...@gmail.com wrote:
On Sat, 23 Jun 2012 18:50:05 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
Looking for findSplit?
http://dlang.org/phobos/std_algorithm.html#findSplit
Cool, that's what I want!
Now if I could find the
On 06/23/2012 01:02 PM, simendsjo wrote:
On Sat, 23 Jun 2012 18:56:24 +0200, simendsjo simend...@gmail.com wrote:
On Sat, 23 Jun 2012 18:50:05 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
Looking for findSplit?
http://dlang.org/phobos/std_algorithm.html#findSplit
Cool, that's what
On 06/23/2012 01:24 PM, Chad J wrote:
On 06/23/2012 01:02 PM, simendsjo wrote:
On Sat, 23 Jun 2012 18:56:24 +0200, simendsjo simend...@gmail.com
wrote:
On Sat, 23 Jun 2012 18:50:05 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
Looking for findSplit?
On Sat, 23 Jun 2012 19:52:32 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
As an additional note: I could probably do this easily if I had a
function like findSplit where the predicate is used /instead/ of a
delimiter. So like this:
auto findSplit(alias pred = a, R)(R
I'm working on the new design for std.hash and I hit an interesting
problem:
The OOP interface has to take buffers as slices with unknown length, as
the length differs between hashes and I have to put a common function
declaration in a interface. So I have this:
interface Digest
{
On Sat, 23 Jun 2012 20:23:26 +0200, Johannes Pfau nos...@example.com
wrote:
So how to pass a ubyte[] to a function expecting a ref ubyte[16]
without allocating/using any extra memory (Not even stack)?
This seems to work, but it's very ugly:
On Sat, 23 Jun 2012 20:33:09 +0200, simendsjo simend...@gmail.com wrote:
On Sat, 23 Jun 2012 20:23:26 +0200, Johannes Pfau nos...@example.com
wrote:
So how to pass a ubyte[] to a function expecting a ref ubyte[16]
without allocating/using any extra memory (Not even stack)?
This seems to
On 06/23/2012 02:17 PM, simendsjo wrote:
On Sat, 23 Jun 2012 19:52:32 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
As an additional note: I could probably do this easily if I had a
function like findSplit where the predicate is used /instead/ of a
delimiter. So like this:
auto
On Sat, 23 Jun 2012 20:41:29 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
Hey, thanks for doing all of that. I didn't expect you to write all of
that.
np
Once I've established that the issue isn't just a lack of learning on
my part, my subsequent objective is filling any
The learning curve has been from like zero to something. I am
still grasping for some fundamental knowledge that I need to
fully get whats going on. Had to read documentation for sockets
in C to understand anything at all. That says a lot. Coming from
BufferedReader hell in Java and did never
On Sat, 23 Jun 2012 20:41:29 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
IMO the take away a single line thing should be accomplishable with a
single concise expression
This takes a range to match against, so much like startsWith:
auto findSplitAny(Range, Ranges...)(Range data,
On 06/23/2012 02:53 PM, simendsjo wrote:
On Sat, 23 Jun 2012 20:41:29 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
Hey, thanks for doing all of that. I didn't expect you to write all of
that.
np
Once I've established that the issue isn't just a lack of learning on
my part, my
Hi,
Does taking the address of a TLS variable and passing it to other
threads have defined semantics? I would assume it results in a pointer
to the thread's instance of the TLS variable (which makes sense), but is
passing it to other threads OK? Does the language guarantee this?
--
Alex
On 06/23/2012 03:41 PM, simendsjo wrote:
On Sat, 23 Jun 2012 20:41:29 +0200, Chad J
chadjoan@__spam.is.bad__gmail.com wrote:
IMO the take away a single line thing should be accomplishable with
a single concise expression
This takes a range to match against, so much like startsWith:
auto
On 06/23/2012 09:51 PM, Alex Rønne Petersen wrote:
Hi,
Does taking the address of a TLS variable and passing it to other
threads have defined semantics? I would assume it results in a pointer
to the thread's instance of the TLS variable (which makes sense),
I'd assume that it results in a
So here i proudly present my Ref struct (2.0 ;))
http://dpaste.dzfl.pl/905e1d3d
So, any suggestions, further ideas or criticism?
BTW: Any tries to declare
@disable
this(typeof(null)); end with the same message Stack overflow...
On Saturday, June 23, 2012 07:27:56 Namespace wrote:
I would prefer NullPointer Exceptions and / or not null types
rather than playing around with the debugger.
That's the first step.
NullPointerExceptions (well, they'd end up being NullPointersErrors) will
_never_ happen. Walter is
On Saturday, June 23, 2012 20:23:26 Johannes Pfau wrote:
I'm working on the new design for std.hash and I hit an interesting
problem:
The OOP interface has to take buffers as slices with unknown length, as
the length differs between hashes and I have to put a common function
declaration in
this code:
class X{
string[string] s;
this() {
s[s] = S;
}
~this() {
s.remove(s);
}
}
void main() {
X x = new X();
}
produces this:
core.exception.InvalidMemoryOperationError
because the aa is calling gc_free during a collection, apparently.
Should I
I've been having the same problem as well, but I never figured
out the link to the remove() call in the destructor. The only
solution I've found is to use GC.removeRoot() on the table, but
it's an untested and potentially dangerous solution.
37 matches
Mail list logo