On Wednesday, 19 February 2014 at 21:55:35 UTC, Brad Anderson
wrote:
On Wednesday, 19 February 2014 at 14:46:57 UTC, simendsjo wrote:
Spam spam
http://youtu.be/ZRUcTJC0D7M
Good stuff. Are you going to upload the older videos to this
same channel?
Is that necessary? The playlist includes the
https://github.com/AlexeyAB/cpp_find_order/blob/06a80340ff403c4693bfe0ff8b80584f029c71a3/main.cpp.
I forgot to say that if you want to compile this program with
help gcc you must use options: -O3 -march=native -std=gnu++11
I would like to understand the request first. Neither
ProccessRow() nor OptimizedProcessTable() take isUseField as
template parameters. Besides, isUseField is generated at
runtime. No, I don't understand. :)
Yes, isUseField is generated at runtime. For example, user can
select the column th
On Wednesday, 19 February 2014 at 15:40:41 UTC, bearophile wrote:
... In generale in D the name of functions and variabiles start
with a lower case
I apologize that I did not checked the style guide. I rewrote my
example according yours recommendation. Thank you.
alias TypeTuple(Types
Simply "import"ing should work; doing that should not bring
definitions to the code. However, one side should also include
the module during its build.
Have you included the module on both the program's and
library's builds?
Ali
Hi Ali, Both of them have normal import for that module. I
On Thursday, 20 February 2014 at 02:10:50 UTC, anonymous wrote:
The foreach is definitely always evaluated at compile time.
That's independent of the values being known statically. It
generates a couple of if statements. But optimizing those if
statements away for static values is not guaranteed
On Thursday, 20 February 2014 at 01:41:25 UTC, Chris Williams
wrote:
On Thursday, 20 February 2014 at 00:36:38 UTC, anonymous wrote:
On Wednesday, 19 February 2014 at 22:46:45 UTC, Chris Williams
wrote:
When the template writes out the definition of the function,
if the parameters can be interp
On Thursday, 20 February 2014 at 00:36:38 UTC, anonymous wrote:
On Wednesday, 19 February 2014 at 22:46:45 UTC, Chris Williams
wrote:
When the template writes out the definition of the function,
if the parameters can be interpreted during compile-time, then
the foreach ( O(n) ) will be run by t
On Wednesday, 19 February 2014 at 22:46:45 UTC, Chris Williams
wrote:
When the template writes out the definition of the function, if
the parameters can be interpreted during compile-time, then the
foreach ( O(n) ) will be run by the compiler to detect the
correct parameter and the function wil
On 2014-02-19 17:15, Craig Dillabaugh wrote:
However, I would still be interested in finding out where I could get a
listing of what the various exit codes mean ... or do I need to delve
into the DMD source code?
That seems to be the SIGKILL signal from linux kernel (-9). DMD didn't
have a ch
On Wednesday, 19 February 2014 at 09:45:41 UTC, Tolga Cakiroglu
wrote:
I have written a programme and a library under Linux. When
programme is run, it tries to load the library. Both the
programme code and the library imports a module as
"apps.common.lib.config". Now, when I run the programme,
On Wednesday, 19 February 2014 at 22:05:49 UTC, Peter Alexander
wrote:
If you want to get even more anal about it, searching an array
is technically O(1) because an array cannot be bigger than
size_t.max, and since size_t.max is a constant, O(size_t.max)
is O(1). Again, completely misleading bu
On Wednesday, 19 February 2014 at 16:23:36 UTC, Bienlein wrote:
Hello,
I was wondering whether it can be done somehow to select on a
delegate in the receive block when spawning a thread:
void spawnedFunc(Tid tid)
{
// Receive a message from the owner thread.
receive(
(int i)
On Wednesday, 19 February 2014 at 22:07:55 UTC, Craig Dillabaugh
wrote:
I am trying to build a small application (I am using DUB) and
when I try to build, I get the following output:
dub build
dub: /usr/lib64/libcurl.so.4: no version information available
(required by dub)
vibe-d: ["vibe-d",
On Wednesday, 19 February 2014 at 09:46:04 UTC, Gopan wrote:
On Wednesday, 19 February 2014 at 09:09:25 UTC, Tobias Pankrath
It's O(k) with k = vals.length, which is the number of
arguments given to the function, which is a compile time
constant and not dependent on any input of the final progr
I am trying to build a small application (I am using DUB) and
when I try to build, I get the following output:
dub build
dub: /usr/lib64/libcurl.so.4: no version information available
(required by dub)
vibe-d: ["vibe-d", "libevent", "openssl"]
vibe-d: ["vibe-d", "libevent", "openssl"]
libd: [
On Wednesday, 19 February 2014 at 14:46:57 UTC, simendsjo wrote:
Spam spam
http://youtu.be/ZRUcTJC0D7M
Good stuff. Are you going to upload the older videos to this same
channel?
On Wednesday, 19 February 2014 at 21:52:06 UTC, anonymous wrote:
Nope. v and vals are runtime parameters, their values are not
known at compile time. What's known at compile time is
vals.length.
While this is correct, note that there is also an overload that
takes `values` as compile-time para
On Wednesday, 19 February 2014 at 19:45:39 UTC, Ali Çehreli wrote:
On 02/19/2014 01:46 AM, Gopan wrote:
[...]
> uint among(T, Us...)(T v, Us vals)
> {
> foreach (i, U; Us)
> {
> writeln("checking ", v, " == ", vals[i]);
> if (v == vals[i])
> return i + 1;
>
On Wednesday, 19 February 2014 at 19:44:12 UTC, Meta wrote:
On Wednesday, 19 February 2014 at 19:10:44 UTC, Frustrated
wrote:
Are there container templates that one can mixin to classes
that
give them container behavior?
e.g.,
instead of
class A
{
Array!int x;
}
I want
class A
{
mix
On 02/19/2014 04:11 AM, bearophile wrote:
Nicolas Sicard:
Are byKey and byValue guaranteed to iterate the associative array in
the same order?
Nope, or not yet, sorry.
Bye,
bearophile
Is there a bug report about that? I can't imagine how they can iterate
in any other order.
Ali
On 02/19/2014 01:45 AM, Tolga Cakiroglu wrote:
> I have written a programme and a library under Linux. When programme is
> run, it tries to load the library. Both the programme code and the
> library imports a module as "apps.common.lib.config". Now, when I run
> the programme, following error is
I don't really understand why foo has to be static to compile.
But this is really nice now :-).
-- Bienlein
A nested function has a context pointer to its outer scope, like
a delegate. static makes it an ordinary function.
On Wednesday, 19 February 2014 at 19:44:12 UTC, Meta wrote:
On Wednesday, 19 February 2014 at 19:10:44 UTC, Frustrated
wrote:
Are there container templates that one can mixin to classes
that
give them container behavior?
e.g.,
instead of
class A
{
Array!int x;
}
I want
class A
{
mix
On Wednesday, 19 February 2014 at 19:44:12 UTC, Meta wrote:
On Wednesday, 19 February 2014 at 19:10:44 UTC, Frustrated
wrote:
Are there container templates that one can mixin to classes
that
give them container behavior?
e.g.,
instead of
class A
{
Array!int x;
}
I want
class A
{
mix
On Wednesday, 19 February 2014 at 17:05:01 UTC, John Colvin wrote:
delegate
isn't a type. try
int delegate()
instead
Thanks for the hint! This works now:
void spawnedFunc(Tid tid)
{
receive(
(int i) { writeln("Received the number ", i);},
(int function() fp) { writeln
On Wednesday, 19 February 2014 at 19:45:39 UTC, Ali Çehreli wrote:
...
This is much better explanation - O(n) compile-time algorithm
which results in O(1) run-time code generated :)
On 02/19/2014 01:46 AM, Gopan wrote:
> On Wednesday, 19 February 2014 at 09:09:25 UTC, Tobias Pankrath wrote:
>> On Wednesday, 19 February 2014 at 08:58:10 UTC, Gopan wrote:
>>> Recently, I came across the following thread
>>> http://forum.dlang.org/thread/l8nocr$1dv5$1...@digitalmars.com?page=2
On Wednesday, 19 February 2014 at 19:10:44 UTC, Frustrated wrote:
Are there container templates that one can mixin to classes that
give them container behavior?
e.g.,
instead of
class A
{
Array!int x;
}
I want
class A
{
mixin Array!int;
}
so that I can do something like a.Add(3) in
On 02/19/2014 07:13 AM, Vladimir wrote:
> I`m learning templates in D language and I want to thank the creators of
> the language for this.
>
> There is an educational task: process table entries, if you know which
> column to use.
[...]
> In c++ I can create in compile-time special vesrion Pro
Are there container templates that one can mixin to classes that
give them container behavior?
e.g.,
instead of
class A
{
Array!int x;
}
I want
class A
{
mixin Array!int;
}
so that I can do something like a.Add(3) instead of a.x.Add(3).
In fact, I do want the first case because I w
On Wednesday, 19 February 2014 at 16:23:36 UTC, Bienlein wrote:
Hello,
I was wondering whether it can be done somehow to select on a
delegate in the receive block when spawning a thread:
void spawnedFunc(Tid tid)
{
// Receive a message from the owner thread.
receive(
(int i)
Hello,
I was wondering whether it can be done somehow to select on a
delegate in the receive block when spawning a thread:
void spawnedFunc(Tid tid)
{
// Receive a message from the owner thread.
receive(
(int i) { writeln("Received the number ", i);}
(delegate d) { wri
Vladimir:
Where I'm wrong? How I can rewrite the program to make effect
more evident? Or may be, this optimization is meaningless in
D...?
The L1 code cache is small and it's easy to create cache misses,
so increasing the code size leads to nonlinear changes in the
run-time.
https://g
On Tuesday, 18 February 2014 at 00:59:24 UTC, ted wrote:
so is:
createDynamicInstance(ClassInfo type) { return
type.create(); }
the correct implementation ?? - it certainly seems to work...
Yeah, that's good as long as you have a no-arg constructor on the
class. (the create function never
I`m learning templates in D language and I want to thank the
creators of the language for this.
There is an educational task: process table entries, if you know
which column to use.
Simple way to do this:
int ProcessTable(.)
{
int result = 0;
foreach (ref row; table)
Spam spam
http://youtu.be/ZRUcTJC0D7M
On Wednesday, 19 February 2014 at 13:11:32 UTC, Dicebot wrote:
On Wednesday, 19 February 2014 at 13:03:38 UTC, Tobias Pankrath
wrote:
On Wednesday, 19 February 2014 at 09:46:04 UTC, Gopan wrote:
Index of 3 in (1,2,5,3) is 4
Or, is my undertanding about Big-O notation of complexity
wrong?
Th
On Wednesday, 19 February 2014 at 13:03:38 UTC, Tobias Pankrath
wrote:
On Wednesday, 19 February 2014 at 09:46:04 UTC, Gopan wrote:
Index of 3 in (1,2,5,3) is 4
Or, is my undertanding about Big-O notation of complexity
wrong?
Thanks,
Gopan
O(1) = O(k) for any constant k.
I don't think it
On Wednesday, 19 February 2014 at 09:46:04 UTC, Gopan wrote:
Index of 3 in (1,2,5,3) is 4
Or, is my undertanding about Big-O notation of complexity wrong?
Thanks,
Gopan
O(1) = O(k) for any constant k.
http://youtu.be/mNQqtauO9IM
The entire playlist:
http://www.youtube.com/playlist?list=PLqABwcsDQUo59iBOM5DFtqbwrMhL4PWcQ
I wont be maintaining the old channel anymore. New videos are
uploaded here:
http://www.youtube.com/channel/UCz3NlrGpjV9NlJAhKJLu_-w
Nicolas Sicard:
Are byKey and byValue guaranteed to iterate the associative
array in the same order?
Nope, or not yet, sorry.
Bye,
bearophile
On Wednesday, 19 February 2014 at 09:28:27 UTC, bearophile wrote:
Tarman:
We're doing some "super computing" "big data" style stuff with
D. We have a system where we're comparing associative arrays
with billions of entries.
Built-in associative arrays were never tested with so many
pairs, s
@bearophile:
Thanks for your suggestion! Yes we've tried this but
unfortunately the performance doesn't work for us, maybe because
all our CPUs are quite saturated.
@simendsjo:
Thanks also for your suggestion, we are using tasks and yield in
our code but in this case we felt that using it j
I have written a programme and a library under Linux. When
programme is run, it tries to load the library. Both the
programme code and the library imports a module as
"apps.common.lib.config". Now, when I run the programme,
following error is seen:
Fatal Error while loading 'dll/lib.so':
The
On Wednesday, 19 February 2014 at 09:09:25 UTC, Tobias Pankrath
wrote:
On Wednesday, 19 February 2014 at 08:58:10 UTC, Gopan wrote:
Recently, I came across the following thread
http://forum.dlang.org/thread/l8nocr$1dv5$1...@digitalmars.com?page=2
On Monday, 16 December 2013 at 22:10:52 UTC, And
On Wednesday, 19 February 2014 at 09:21:48 UTC, Tarman wrote:
Hi,
We're doing some "super computing" "big data" style stuff with
D. We have a system where we're comparing associative arrays
with billions of entries.
However in this system we need to fairly consider possible
solutions for ma
On Wednesday, 19 February 2014 at 09:21:48 UTC, Tarman wrote:
Hi,
We're doing some "super computing" "big data" style stuff with
D. We have a system where we're comparing associative arrays
with billions of entries.
However in this system we need to fairly consider possible
solutions for ma
On Tuesday, 18 February 2014 at 22:59:00 UTC, Mike wrote:
On Tuesday, 18 February 2014 at 18:10:40 UTC, Ruslan
Mullakhmetov wrote:
Hi,
Is it possible to trace GC allocation calls to determine times
of program "death" and have some stats?
So i want the following information:
- garbage colle
Tarman:
We're doing some "super computing" "big data" style stuff with
D. We have a system where we're comparing associative arrays
with billions of entries.
Built-in associative arrays were never tested with so many pairs,
so perform exhaustive performance benchmarks first, and report in
B
I guess what might work here is to allow some kind of argument to
"byKey" that will let us resume so maybe something like:
foreach (item;
massiveAssociativeArray.byKey(indexOfKeyToStartFrom)) {
}
If something like this isn't possible, then would one of our
engineers be able to submit a patch
Hi,
We're doing some "super computing" "big data" style stuff with D.
We have a system where we're comparing associative arrays with
billions of entries.
However in this system we need to fairly consider possible
solutions for many "units" at a time within a single thread.
So we'd like to.
On Wednesday, 19 February 2014 at 08:58:10 UTC, Gopan wrote:
Recently, I came across the following thread
http://forum.dlang.org/thread/l8nocr$1dv5$1...@digitalmars.com?page=2
On Monday, 16 December 2013 at 22:10:52 UTC, Andrei
Alexandrescu wrote:
On 12/16/13 1:45 PM, Walter Bright wrote:
On
Recently, I came across the following thread
http://forum.dlang.org/thread/l8nocr$1dv5$1...@digitalmars.com?page=2
On Monday, 16 December 2013 at 22:10:52 UTC, Andrei Alexandrescu
wrote:
On 12/16/13 1:45 PM, Walter Bright wrote:
On 12/16/2013 12:38 PM, Andrei Alexandrescu wrote:
uint among(T,
54 matches
Mail list logo