On Sunday, 29 January 2017 at 04:13:17 UTC, Nestor wrote:
On Sunday, 29 January 2017 at 03:11:34 UTC, Stefan Koch wrote:
On Sunday, 29 January 2017 at 02:59:12 UTC, Nestor wrote:
On Sunday, 29 January 2017 at 02:55:04 UTC, Adam D. Ruppe
wrote:
[...]
In the case of Windows, where libraries ar
On Sunday, 29 January 2017 at 03:11:34 UTC, Stefan Koch wrote:
On Sunday, 29 January 2017 at 02:59:12 UTC, Nestor wrote:
On Sunday, 29 January 2017 at 02:55:04 UTC, Adam D. Ruppe
wrote:
On Sunday, 29 January 2017 at 00:36:34 UTC, Nestor wrote:
Well, native implementations are useful at least fo
On Sunday, 29 January 2017 at 02:59:12 UTC, Nestor wrote:
On Sunday, 29 January 2017 at 02:55:04 UTC, Adam D. Ruppe wrote:
On Sunday, 29 January 2017 at 00:36:34 UTC, Nestor wrote:
Well, native implementations are useful at least for building
self-contained applications.
Sometimes true, but s
On Sunday, 29 January 2017 at 02:55:04 UTC, Adam D. Ruppe wrote:
On Sunday, 29 January 2017 at 00:36:34 UTC, Nestor wrote:
Well, native implementations are useful at least for building
self-contained applications.
Sometimes true, but sqlite can be easily embedded and
statically linked, so you
On Sunday, 29 January 2017 at 00:36:34 UTC, Nestor wrote:
Well, native implementations are useful at least for building
self-contained applications.
Sometimes true, but sqlite can be easily embedded and statically
linked, so your binary is still self-contained, there's just a
small compile ti
On Sunday, 29 January 2017 at 01:02:07 UTC, Ali Çehreli wrote:
Agreed but there can be happy surprises. :) Just because it's
fresh in my mind: Jon Degenhardt implemented D versions of
existing C, Go, and Rust tool kits in D and saw 3 to 10 times
performance increase in many cases (not all).
Y
On Sunday, 29 January 2017 at 01:53:30 UTC, Stefan Koch wrote:
On Sunday, 29 January 2017 at 01:47:44 UTC, Nestor wrote:
On Saturday, 28 January 2017 at 21:09:25 UTC, Stefan Koch
wrote:
On Saturday, 28 January 2017 at 12:09:35 UTC, Nestor wrote:
On Friday, 27 January 2017 at 12:55:55 UTC, Stefa
On Sunday, 29 January 2017 at 01:47:44 UTC, Nestor wrote:
On Saturday, 28 January 2017 at 21:09:25 UTC, Stefan Koch wrote:
On Saturday, 28 January 2017 at 12:09:35 UTC, Nestor wrote:
On Friday, 27 January 2017 at 12:55:55 UTC, Stefan Koch wrote:
[...]
Thanks. It did compile using dub, though
Hi,
Is anyone using Oracle's Pro*C with D?
Thanks,
KP
On Saturday, 28 January 2017 at 21:09:25 UTC, Stefan Koch wrote:
On Saturday, 28 January 2017 at 12:09:35 UTC, Nestor wrote:
On Friday, 27 January 2017 at 12:55:55 UTC, Stefan Koch wrote:
[...]
Thanks. It did compile using dub, though I had a couple of
issues with dub, by the way.
[...]
On 01/28/2017 04:14 PM, Adam D. Ruppe wrote:
On Saturday, 28 January 2017 at 21:03:08 UTC, Stefan Koch wrote:
It's not native though.
It's a mistake to ask for native D implementations of mature C
libraries, especially a public domain one like sqlite. There's just no
advantage in production us
On Saturday, 28 January 2017 at 19:09:01 UTC, ag0aep6g wrote:
In D, a `char` is a UTF-8 code unit. Its size is one byte,
exactly and always.
A `char` is not a "character" in the common meaning of the
word. There's a more specialized word for "character" as a
visual unit: grapheme. For example
On Sunday, 29 January 2017 at 00:14:02 UTC, Adam D. Ruppe wrote:
On Saturday, 28 January 2017 at 21:03:08 UTC, Stefan Koch wrote:
It's not native though.
It's a mistake to ask for native D implementations of mature C
libraries, especially a public domain one like sqlite. There's
just no adva
On Saturday, 28 January 2017 at 21:03:08 UTC, Stefan Koch wrote:
It's not native though.
It's a mistake to ask for native D implementations of mature C
libraries, especially a public domain one like sqlite. There's
just no advantage in production use to rewrite it.
On Saturday, 28 January 2017 at 12:09:35 UTC, Nestor wrote:
On Friday, 27 January 2017 at 12:55:55 UTC, Stefan Koch wrote:
[...]
Thanks. It did compile using dub, though I had a couple of
issues with dub, by the way.
[...]
I think you have to remove the app.d that comes with sqlite-d
fil
On Saturday, 28 January 2017 at 19:01:48 UTC, Adam D. Ruppe wrote:
On Friday, 27 January 2017 at 12:01:30 UTC, Nestor wrote:
Is there any other native D implementation of sqlite reader?
My sqlite.d and database.d from here can do it too:
https://github.com/adamdruppe/arsd
Just download those
thank you, the second method works perfectly.
I have one last problem, I start thread and in thread
Protocol.GetInstance(id) return null while in main thread it
works.
My class :
class ProtocolMessageManager
{
private static TypeInfo_Class[uint] m_types;
shared static this()
On Saturday, 28 January 2017 at 07:10:27 UTC, medhi558 wrote:
I have a last question, currently i use :
if(lc.name.indexOf("protocol.messages") != -1)
If they're all in the same module, you can also use the compile
time reflection to scan the module for classes. That's
foreach(memberName; __
On Saturday, 28 January 2017 at 18:04:58 UTC, Nestor wrote:
I believe I saw somewhere that in D a char was not neccesarrily
the same as an ubyte because chars sometimes take more than one
byte,
In D, a `char` is a UTF-8 code unit. Its size is one byte,
exactly and always.
A `char` is not a
On Friday, 27 January 2017 at 12:01:30 UTC, Nestor wrote:
Is there any other native D implementation of sqlite reader?
My sqlite.d and database.d from here can do it too:
https://github.com/adamdruppe/arsd
Just download those two files and compile them together with your
file:
dmd yourfile.
On Saturday, 28 January 2017 at 18:04:58 UTC, Nestor wrote:
I believe I saw somewhere that in D a char was not neccesarrily
the same as an ubyte because chars sometimes take more than
Not true in the language, but the Phobos library does treat char
and ubyte differently because of the multi-ch
On Saturday, 28 January 2017 at 16:01:38 UTC, Ivan Kazmenko wrote:
As said, the byte count is indeed string.length.
The number of code points can be found by std.range.walkLength,
but be aware it takes O(answer) time to compute.
Example:
-
import std.range, std.stdio;
void main () {
On Saturday, 28 January 2017 at 15:32:33 UTC, Nestor wrote:
I want to know variable size in memory. For example, say I have
an UTF-8 string of only 2 characters, but each of them takes 2
bytes. string length would be 2, but the content of the string
would take 4 bytes in memory (excluding overh
On 29/01/2017 4:32 AM, Nestor wrote:
On Saturday, 28 January 2017 at 14:56:03 UTC, rikki cattermole wrote:
On 29/01/2017 3:51 AM, Nestor wrote:
Hi,
One can get the length of a string easily, however since strings are
UTF-8, sometimes characters take more than one byte. I would like to
know the
On Sat, Jan 28, 2017 at 03:32:33PM +, Nestor via Digitalmars-d-learn wrote:
[...]
> I do not want string lenth or code points. Perhaps I didn't explain
> myselft.
The .length property of a string is the number of bytes used to store
the string.
> I want to know variable size in memory. For e
On Friday, 27 January 2017 at 04:26:31 UTC, Era Scarecrow wrote:
Skipping the BOM is just a matter of skipping the first two
bytes identifying it...
AFAIK in some cases the BOM takes up to 4 bytes (FOR UTF-32), so
when input encoding is unknown one must perform some kind of
detection in orde
On Saturday, 28 January 2017 at 14:56:03 UTC, rikki cattermole
wrote:
On 29/01/2017 3:51 AM, Nestor wrote:
Hi,
One can get the length of a string easily, however since
strings are
UTF-8, sometimes characters take more than one byte. I would
like to
know then how many bytes does a string take,
On 29/01/2017 3:51 AM, Nestor wrote:
Hi,
One can get the length of a string easily, however since strings are
UTF-8, sometimes characters take more than one byte. I would like to
know then how many bytes does a string take, but this code didn't work
as I expected:
import std.stdio;
void main()
Hi,
One can get the length of a string easily, however since strings
are UTF-8, sometimes characters take more than one byte. I would
like to know then how many bytes does a string take, but this
code didn't work as I expected:
import std.stdio;
void main() {
string mystring1;
string mys
On Friday, 27 January 2017 at 11:03:15 UTC, aberba wrote:
Are there any dub package for compressing images uploaded
through web forms? Cropping/resizing may also come in handy.
I want one for a vibe.d project.
I read Flickr and others use GraphicsMagick but here again heroku
doesn't help.
On Friday, 27 January 2017 at 11:03:15 UTC, aberba wrote:
Are there any dub package for compressing images uploaded
through web forms? Cropping/resizing may also come in handy.
I want one for a vibe.d project.
Currently, there are RIP and Daffodil dor image related
operations. I think suppor
On Friday, 27 January 2017 at 12:55:55 UTC, Stefan Koch wrote:
You have to compile the library with your app.
or better yet use dub
replace app.d with your app.d and run dub
Thanks. It did compile using dub, though I had a couple of issues
with dub, by the way.
The first occured because I am
On Saturday, 28 January 2017 at 10:46:29 UTC, albert-j wrote:
On Friday, 27 January 2017 at 08:15:56 UTC, Dukc wrote:
void main()
{ import std.stdio, std.algorithm, std.range, std.array,
std.datetime;
int[] a = [1, 2, 3, 4, 5, 6, 7, 4].cycle.take(2000).array;
int[] b = [3, 4, 6].cyc
On Friday, 27 January 2017 at 11:56:02 UTC, Dukc wrote:
On Friday, 27 January 2017 at 10:20:19 UTC, albert-j wrote:
I am also wondering why the standard library doesn't have
convenience functions for this, e.g. like Java's removeAll?
Now there's more typing than necessary for a relatively commo
On Friday, 27 January 2017 at 08:15:56 UTC, Dukc wrote:
void main()
{ import std.stdio, std.algorithm, std.range, std.array,
std.datetime;
int[] a = [1, 2, 3, 4, 5, 6, 7, 4].cycle.take(2000).array;
int[] b = [3, 4, 6].cycle.take(2000).array;
void originalMethod()
{ auto c
On Saturday, 28 January 2017 at 09:05:13 UTC, rumbu wrote:
As long as your class has a default constructor, you can use
directly Object.factory(id):
public static NetworkMessage GetInstance(string id)
{
return cast(NetworkMessage)(Object.factory(id));
}
It isn't possible. My function when I
abstract class NetworkMessage
{
uint MessageId;
//
}
override class QueueStatusUpdateMessage : NetworkMessage
{
uint MessageId = 1;
//
}
override class Message2 : NetworkMessage
{
uint MessageId = 2;
//
}
override class Message3 : NetworkMessage
{
uint Me
On Saturday, 28 January 2017 at 07:03:51 UTC, medhi558 wrote:
public static NetworkMessage GetInstance(string id)
{
auto v = (id in ProtocolMessageManager.m_types);
if (v !is null)
return
cast(NetworkMessage)ProtocolMessageManager.m_types[id].create();
else
On Saturday, 28 January 2017 at 08:18:15 UTC, medhi558 wrote:
On Saturday, 28 January 2017 at 07:39:51 UTC, rumbu wrote:
On Saturday, 28 January 2017 at 07:10:27 UTC, medhi558 wrote:
I have a last question, currently i use :
if(lc.name.indexOf("protocol.messages") != -1)
To know if the class i
On Saturday, 28 January 2017 at 00:09:45 UTC, Arun Chandrasekaran
wrote:
Does phobos offer concurrent containers?
I couldn't find one at
http://dlang.org/phobos/std_container.html
Any other in the D land?
You can always search here http://code.dlang.org/
On Saturday, 28 January 2017 at 07:39:51 UTC, rumbu wrote:
On Saturday, 28 January 2017 at 07:10:27 UTC, medhi558 wrote:
I have a last question, currently i use :
if(lc.name.indexOf("protocol.messages") != -1)
To know if the class is a NetworkMessage, Would be possible to
do this
if(lc is Ne
41 matches
Mail list logo