Re: Scala Spark-like RDD for D?

2016-02-16 Thread Jakob Jenkov via Digitalmars-d-learn
Perhaps the question is too prescriptive. Another way is: Does 
D have a big data strategy? But I tried to anchor it to some 
currently functioning framework which is why I suggested RDD.


I cannot speak on behalf of the D community. In my opinion I 
don't think that it is D that needs a big data strategy. It is 
the users of D that need that strategy.


I am originally a Java developer. Java devs. create all kinds of 
crazy tools all the time. Lots fail, but some survive and grow 
big, like Spark.


D devs need to do the same. Just jump into it. Have it be your 
hobby project in D. Then see where it takes you.




Re: Must I compile on the target architecture?

2015-12-26 Thread Jakob Jenkov via Digitalmars-d-learn
For Linux programs built on Windows... you'll prolly just want 
to copy it to a linux box.


Thanks, both of you.

I guess the easiest would be to compile it on a virtual machine 
with the OS I want to build for. I mean, I could run a Linux VM 
on my Windows box and compile my code there. Or the other way 
around.


Must I compile on the target architecture?

2015-12-25 Thread Jakob Jenkov via Digitalmars-d-learn

Hi, just a quick question:

If I write a program in D and I use Windows for development but 
want it to run on Linux, do I have to copy the source code to the 
target Linux machine and compile it there, to make an executable 
for that machine? What is the standard process for cross platform 
compilation?


Re: Socket - handling large numbers of incoming connections

2015-12-22 Thread Jakob Jenkov via Digitalmars-d-learn

The same as in C [1].
Just change
#include 
to
import core.sys.posix.poll;

[1] http://linux.die.net/man/2/poll



I have a background in Java, so I am a bit handicapped :-)



Re: Socket - handling large numbers of incoming connections

2015-12-22 Thread Jakob Jenkov via Digitalmars-d-learn
Thanks, everyone, I have looked a bit at different frameworks, 
and it seems that libasync might have a decently narrow scope to 
fit what I need.


I have a background in Java, so a lot of this OS-specific stuff 
is new to me (EPoll etc.). In Java that stuff is used under the 
hood for you, without you knowing anything about it. Java just 
chooses the best option for the given OS. This is easy to use, 
but of course gives you less control.


Re: How is D doing?

2015-12-22 Thread Jakob Jenkov via Digitalmars-d-learn

On Tuesday, 22 December 2015 at 03:30:32 UTC, ShinraTensei wrote:
I recently noticed massive increase in new languages for a 
person to jump into(Nim, Rust, Go...etc) but my question is 
weather the D is actually used anywhere or are there chances of 
it dying anytime soon.



Check out Google Trends. Searches for D Tutorial still beats 
searches for Scala Tutorial by a big margin:


https://google.com/trends/explore#q=d%20tutorial%2C%20scala%20tutorial


Socket - handling large numbers of incoming connections

2015-12-21 Thread Jakob Jenkov via Digitalmars-d-learn
What is the fastest / most scalable way to implement a server 
(using a Socket) which can handle large numbers of incoming 
connections? Like, at least 10K, but probably up to 1 million 
connections.


More specifically:

1) How do I efficiently select the connections (client Socket 
instances) which have data which is ready to read?


2) How do I efficiently select the connection that are ready to 
accept data sent to them?

(which are write ready - in other words) ?


I read in the D Cookbook that using the SocketSet is not the 
fastest way to do this, as it has to iterate through all Socket 
instances in it, and check a flag on each Socket.


Re: Socket - handling large numbers of incoming connections

2015-12-21 Thread Jakob Jenkov via Digitalmars-d-learn

On Monday, 21 December 2015 at 20:20:44 UTC, Stefan wrote:
How about https://github.com/dcarp/asynchronous ? Asyncio 
Socket handling is sometimes quite nice. It's performance is 
okay for nearly no effort and the code looks clean.
Details here: 
http://dcarp.github.io/asynchronous/asynchronous/streams/startServer.html


vibe.d also offers a fiber based asyncio way of dealing with 
sockets.

http://vibed.org/docs#tcp-server

Maybe it fits your needs.


Thanks - but I am primarily looking for a solution without 
external frameworks. Frameworks have a way of bloating over time.


Re: Socket - handling large numbers of incoming connections

2015-12-21 Thread Jakob Jenkov via Digitalmars-d-learn

My server uses "poll" for that.


Okay, how does that work? How do I use "poll" in D?

Link?
Code example?



Scope of D packages

2015-12-18 Thread Jakob Jenkov via Digitalmars-d-learn
I'm coming from Java where "packages" are not that much more than 
directories. Each class can be exposed or hidden inside a package 
etc.


In Java it is common that an API consists of many packages and 
subpackages. All classes are simply wrapped up in a JAR (Zip) 
file, and then they can be used as a library.


What is common in D?

Does a library have all its classes inside the same package (same 
directory) ? Or can you have multiple packages / subpackages 
inside the same library *and* same source root?


Re: Scope of D packages

2015-12-18 Thread Jakob Jenkov via Digitalmars-d-learn
To be exact it doesn't need the sources, it needs the function 
signatures and type definitions so the equivalent of C header 
files. If you don't want to share the full sources with your 
library you can generate those header files automatically using 
the -H flag in dmd. It will produce a "D interface" file with a 
"di" extension.


But - if the library was open source, it would be better to just 
share the sources than a compiled file? (In Java we share/use the 
zipped JAR file with compiled classes).




DUB config format: SDLang or JSON?

2015-12-18 Thread Jakob Jenkov via Digitalmars-d-learn
I am just looking at DUB and I can read that there are two config 
formats: SDLang and JSON. Which one is the "new" format? Which 
one is the "future" of DUB?


Re: D programming video tutorial

2015-12-18 Thread Jakob Jenkov via Digitalmars-d-learn

I have written more than 750 tutorials about Java


... and web development and other related stuff. Not only Java.




Re: D programming video tutorial

2015-12-18 Thread Jakob Jenkov via Digitalmars-d-learn

On Sunday, 13 December 2015 at 20:29:47 UTC, Pederator wrote:
Hi. Does anybody who is familair with D consider to make a 
comprehensive D programming video tutorial / training / course? 
This could be encouraging and helpful for people to start with 
D. It could also help in promoting D programming language. This 
is a question for all the community, please comment what do you 
think about this idea, we will know if there is an interest in 
such a training video, or is it just me.


Hi,

I have written more than 750 tutorials about Java, and made 19 
videos. My experience is, that once I have the written tutorial 
then I also have the TOC for the corresponding video. I can 
usually record a screencast in about 0,5 to 2 hours, and then it 
takes about the same time to put the screencast parts together 
into a coherent video. Someone else can normally do that, though.


I have been thinking about writing about D too. Maybe make a few 
videos. But I don't know... I don't know how big the interest is 
in total.