Re: DConf hotel poor QoS

2018-03-12 Thread Mengu via Digitalmars-d

On Monday, 12 March 2018 at 19:30:06 UTC, Luís Marques wrote:

On Friday, 9 March 2018 at 15:26:24 UTC, Luís Marques wrote:
Mar-9: I send them an email saying I continue to await a 
correction to my reservation.


Mar-12: I get an email saying that "the event is fully booked 
for the dates requested" and they suggest an alternative rate 
of 93€. I follow Mike's lead and book it using Expedia for less 
than 64€.


have they refunded you for the previous booking?


Re: Quora: Why hasn't D started to replace C++?

2018-02-09 Thread Mengu via Digitalmars-d
On Thursday, 8 February 2018 at 15:29:08 UTC, Ralph Doncaster 
wrote:
On Wednesday, 7 February 2018 at 22:31:58 UTC, John Gabriele 
wrote:
I'm not sure how long dub has been around, but having an easy 
to use CPAN-alike (online module repo) is HUGE. Dub is great 
for sales. The better dub and the repo gets, the more 
attractive D gets.


I completely agree that the availability of libraries is a huge 
factor.  I almost gave up on D because of the limited amount of 
3rd party libs.

I think just improving the search function would help.
http://code.dlang.org/search?q=keccak
Comes up with nothing, so I started porting a sha3/keccak lib 
from C to D.  Then someone pointed out botan has sha3 support, 
which can be found if you search for "crypto"

http://code.dlang.org/search?q=crypto


i think it is the ecosystem. we do not have a better ecosystem to 
offer and accommodate c++ developers. by ecosystem i mean, things 
that take the pain out of a c++ developer and make them solely 
focus on their code. we don't have an IDE, we don't have one 
perfect, portable GUI library, we don't have a better build 
system, we don't even have a migration guide for them. (d for c++ 
developers page does not count) we only have a better and easier 
language. that's all we have. otherwise i do not think c++ 
developers are sadomasochists that would do this torture to 
themselves. :)


Re: Tuple DIP

2018-01-13 Thread Mengu via Digitalmars-d

On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve 
tuple ergonomics in D:


[...]


how do we vote for / support this DIP?


Re: How do you use D?

2018-01-04 Thread Mengu via Digitalmars-d

On Wednesday, 3 January 2018 at 16:20:48 UTC, Joakim wrote:

On Wednesday, 3 January 2018 at 11:43:35 UTC, Paulo Pinto wrote:

On Wednesday, 3 January 2018 at 11:13:04 UTC, Joakim wrote:
On Wednesday, 3 January 2018 at 10:29:05 UTC, Ola Fosheim 
Grøstad wrote:
On Wednesday, 3 January 2018 at 09:56:48 UTC, Pjotr Prins 
wrote:

[...]


I perceived that there was a lot of hype around Python 15 
years ago or so. Now, universities are replacing Java with 
Python as the introduction language and Python is also 
becoming the defacto language for scientific programming. 
Python is basically getting critical mass and is now managing 
to take on Matlab and perhaps  to some extent even C++/Fortran.


Python has done well in those niches, but when is the last time 
you saw a popular GUI app written in Python?  That is the 
largest segment of the market, and Python has basically no 
uptake there.  Even Java got nowhere in the consumer GUI 
market, other than a few p2p apps like Vuze and the now-defunct 
Limewire, largely for piracy.




you could not be more wrong. there are tons of python gui 
applications. pygtk, pyqt and wxpython are great libraries that 
allows you to create desktop apps very easy and fast. D does not 
even have a good solution except for gtkD which is a one man 
show. if it wasn't for Mike we would not even have it. leadership 
does not care. remember qtd guys stopping everything because a 
bug was not getting fixed?


there's also one other thing: atom, vs code, spotify, slack are 
all running on electron. does it make it a better platform than 
python?


Re: What don't you switch to GitHub issues

2017-12-31 Thread Mengu via Digitalmars-d

On Sunday, 31 December 2017 at 19:49:07 UTC, Meta wrote:

On Sunday, 31 December 2017 at 11:18:26 UTC, Seb wrote:
On Saturday, 30 December 2017 at 02:50:48 UTC, Adam D. Ruppe 
wrote:
Bugzilla was the most well-known solution at the time. Keep 
in mind the D bugzilla has been around since 2006. As far as 
I understand it, migration at this point is deemed a big pain.


No it wouldn't be a big pain. There are many tools for 
automatically migrating issues from Bugzilla. The only thing 
depending on Bugzilla is the changelog generator, but it's API 
calls to Bugzilla can be replaced with GitHub API calls within 
an hour.
So the entire migration could be easily done in a lot less 
than a day.


The only reason we still use Bugzilla is that the core people 
are used to it. Here are a couple of the common arguments:


1) Bugzilla is our, we don't want to depend on GitHub

The D ecosystem already heavily depends on GitHub. Exporting 
the issues from GitHub would be easy. Besides there is only 
one person with access to the Bugzilla server.


2) GitHub only has per registry issues

Bugzilla uses components too, they don't support global issues 
either. Besides if that's required one could easily create a 
meta repository for such global tasks.


3) Bugzilla's issue tracker is more sophisticated

Sure, but does this help when you loose out on many 
contributors?
GitHub even has build tools and sites that let anyone discover 
"easy" issues if they are labeled accordingly. It's free 
marketing.


FYI I asked the same question 1 1/2 years ago: 
https://forum.dlang.org/post/ezldcjzpmsnxvvncn...@forum.dlang.org


Since then, for example, GitHub got voting for issues, but 
Bugzilla lost it.


I wholeheartedly agree. The customer is always right, 
especially when you're trying to get them to donate their time 
to an open source project. It's more essential than ever that 
we lower barriers to participation; if Github issues is the hip 
new thing all the kids like, then we need to switch to that. We 
shouldn't be constantly switching to the shiniest new toy, but 
nor should we stubbornly stick to a piece of software that was 
built (and it looks it) in '90s.


Or at least we should if we're trying to attract the kind of 
people for whom not using Github is a deal breaker. Older 
C++/Java programmers likely don't care, but younger 
Python/Ruby/JS users will.


there are three things that i've noticed:

- in this thread, there is not a single positive post by walter. 
none. nada. zilch. it'd have been much better if he just did not 
post anything.


- d leadership is dusty and so are their tools. we are no js 
community and hope we never become anything like them but 
bugzilla is a hundred years old. i am on github, i am on this ml 
and i also need a bugzilla account? what else do i need to be a 
part of this community? why can't you provide me a seamless 
travel in between? have a forum software, allow me to sign in via 
github and i am a member of the community. but no, they love 
their ugly bugzilla, they love their mailing list.


- has anyone realized we do not attract anyone who has just 
started to learn programming? what are we going to do about it?


Re: Maybe D is right about GC after all !

2017-12-28 Thread Mengu via Digitalmars-d

On Friday, 29 December 2017 at 00:26:04 UTC, codephantom wrote:
On Thursday, 28 December 2017 at 08:53:25 UTC, Russel Winder 
wrote:

[...]


I disagree.

[...]


syntax is not weird at all. it is ML-ish.


Re: D as a betterC a game changer ?

2017-12-27 Thread Mengu via Digitalmars-d
On Wednesday, 27 December 2017 at 14:06:51 UTC, Dan Partelly 
wrote:
On Wednesday, 27 December 2017 at 09:39:22 UTC, codephantom 
wrote:

[...]



Well, C++ had to evolve over a very long period of time, and 
maintain compatibility with C. No other programming language 
had to deal with technical and social issues C++ had to deal 
with.


By comparison, D is young, and had the advantage it had no 
constrains to be compatible (language wise) with another 
language. Evolution time is not an excuse to a mixed 
personality (even if perceived). For all it's evolution time 
and mistakes and idiotic size of the language to pay for C's 
sins and omissions I do not see C++ as mixed personality. I 
never did. It evolved consistently. Also, another language, Ada 
went through 1 standard and 3 major revisions in almost 35 
years and retained it's personality basically unchanged. Too 
bad it was designed with a  Wirthian syntax, which IMO was one 
of the factors it doomed it.


D went GC, but no quite mandatory GC, also not quite able to 
run its in entirety without GC, then in it's old age, went for 
cosmetic surgery to look like slim and sexy miss C. Much like a 
beautiful and capricious women with commitment issues and a 
fear of aging which went through 5 husbands. And it all started 
with a GC and several wrong defaults 




[...]


God knows. All "x" users of D would scream bloody murder, imo.


if that would become the d way and made us write memory safe 
code, why not? rust developers already have to write code under 
compiler dictated terms and nobody's complaining. d developers 
who write d code like java are small in numbers compared to those 
who don't. heck, i'll go even further and wish pure was also 
default.


Re: Maybe D is right about GC after all !

2017-12-19 Thread Mengu via Digitalmars-d

On Tuesday, 19 December 2017 at 10:09:41 UTC, Walter Bright wrote:

On 12/19/2017 2:02 AM, rikki cattermole wrote:

On 19/12/2017 9:54 AM, Walter Bright wrote:

"C, Python, Go, and the Generalized Greenspun Law"

http://esr.ibiblio.org/?p=7804


I must agree, GC is a wonderful fallback.


I tend to write hybrid programs in D, so I wouldn't call it a 
fallback. Just like I might use both structs and classes!


hi walter

i never had a chance to thank you for d, so here it goes: thank 
you very much! been in love with it for so long. despite my 
anger, i keep coming back :)


would you mind writing a tutorial / blog post on this matter for 
dummies such as myself? from what i gather from the forum posts 
is that _in theory_ we can do this but _in reality_ most of us 
don't know how.


Re: Deploying D web servers

2017-12-17 Thread Mengu via Digitalmars-d

On Sunday, 17 December 2017 at 21:07:45 UTC, bauss wrote:

On Sunday, 17 December 2017 at 17:06:32 UTC, cloutiy wrote:

Hi,

In the Javascript world there are services that provide a 
quick and simple means of deploying websites.


I've used things like surge.sh, netlify. I'm sure there are 
many others.


Is there something similar that exists for the D world?

Regards


Map a drive to your server and have DUB build to it.


what does this mean?




Re: Druntime and non-D threads

2017-12-11 Thread Mengu via Digitalmars-d

On Monday, 11 December 2017 at 16:25:42 UTC, Ali Çehreli wrote:

On 12/08/2017 02:54 AM, Nemanja Boric wrote:

[...]


So, in cases where D is just a portable library, the only sane 
thing to do seems to be what Kagamin suggested: create a D 
thread and send requests to it.


That way, we would be in total control of our threads, making 
entry-attach/exit-detach calls unnecessary. Agreed?


Ali


care to explain what exactly that means for the rest of us who 
are n00bs? :-)




Re: Invoking writeln() from a lot of threads running concurrently --> crash

2017-12-10 Thread Mengu via Digitalmars-d

On Saturday, 9 December 2017 at 10:36:08 UTC, Messenger wrote:

On Saturday, 9 December 2017 at 09:38:05 UTC, IM wrote:
For purposes of debugging, I'm using writeln() to print stuff 
out from tasks running concurrently on many threads. At some 
point it crashes with the following stack trace:


Thread 4 received signal SIGUSR1, User defined signal 1.

[...]

Bug in phobos?


Is that a crash or just thread 4 receiving SIGUSR1? (GC signal)

If so you just need to tell gdb not to stop on that. ("handle 
SIGUR1 SIGUSR2 nostop", place it in ~/.gdbinit)


i've been bitten many times by this. thanks to the folks on irc, 
it now lives in gdbinit.


Re: Post about comparing C, C++ and D performance with a real world project

2017-12-08 Thread Mengu via Digitalmars-d
On Friday, 8 December 2017 at 15:40:08 UTC, Steven Schveighoffer 
wrote:

On 12/7/17 8:11 PM, Mengu wrote:
On Thursday, 7 December 2017 at 22:39:44 UTC, Daniel Kozak 
wrote:
The other slowdown is caused by concatenation. Because 
std::string += is more simillar to std.array.(Ref)Appender


wait, i thought appenders performed better than concatenation. 
is that not true or did i just misunderstand your post?




You misunderstood. Appender is faster than ~= to a straight 
array, because it doesn't have to do any opaque lookups in the 
GC to see if it needs to reallocate -- all the information is 
right there.


Daniel's point was that Appender is more akin to std::string 
(which doesn't have the benefit of having language-defined 
array operaions). If the blogger used Appender, he would have 
had better performance.


-Steve


thanks for the explanation steve.



Re: Post about comparing C, C++ and D performance with a real world project

2017-12-07 Thread Mengu via Digitalmars-d

On Thursday, 7 December 2017 at 22:39:44 UTC, Daniel Kozak wrote:
The other slowdown is caused by concatenation. Because 
std::string += is more simillar to std.array.(Ref)Appender


wait, i thought appenders performed better than concatenation. is 
that not true or did i just misunderstand your post?




Re: tour.dlang.org is less than useless

2017-11-28 Thread Mengu via Digitalmars-d

On Tuesday, 28 November 2017 at 02:08:24 UTC, codephantom wrote:

Why do we have this link?

https://tour.dlang.org

I cannot recall it ever working.
(is it just something at my end?)

What is it meant to take us to?


it is most definitely not. it just sometimes fails to load. i 
have no idea why.


Re: A note on troll engagement

2017-11-27 Thread Mengu via Digitalmars-d
On Monday, 27 November 2017 at 17:44:54 UTC, Andrei Alexandrescu 
wrote:
All: we have had an increase in troll posts lately. Please 
avoid engaging them and resist the urge to correct assertions 
no matter how wrong, indignating, etc. The best response to 
troll posts is spending the time that would elsewhere go in 
flamewars, on good work. Feel free to use your newsreader's 
"killfile" feature to filter away posts from aliases you assess 
have a net negative contribution to this forum.


Thanks,

Andrei


we should switch to a forum software. enough is enough. we can't 
edit posts, we can't get rid of spammers and trolls. we don't 
have proper code formatting / syntax highlighting. what is 
holding you guys back?


Re: [OT] Windows dying

2017-10-31 Thread Mengu via Digitalmars-d

On Monday, 30 October 2017 at 13:32:23 UTC, Joakim wrote:


I don't know how intense your data analysis is, but I replaced 
a Win7 ultrabook that had a dual-core i5 and 4 GBs of RAM with 
an Android tablet that has a quad-core ARMv7 and 3 GBs of RAM 
as my daily driver a couple years ago, without skipping a beat.
 I built large mixed C++/D codebases on my ultrabook, now I do 
that on my Android/ARM tablet, which has a slightly weaker chip 
than my smartphone.




how do you program on your tablet? what are your tools? what is 
your setup? i also believe laptops are here to go.


Re: Note from a donor

2017-10-28 Thread Mengu via Digitalmars-d

On Saturday, 28 October 2017 at 02:50:39 UTC, codephantom wrote:

On Saturday, 28 October 2017 at 01:08:57 UTC, Mengu wrote:

looks like d has a long way to go on freebsd as well.


I've had no issues with D in FreeBSD at all...

...and it's been a really smooth transition to D...so far...

I have D, Postgresql, and static C/C++ bindings working just 
fine...and that's really all I need..for now.


btw. The FreeBSD platform isn't even mentioned here:

https://insights.stackoverflow.com/survey/2017#technology-platforms

So I'm just glad it works at all..otherwise I'd have to choose 
between not using D, or using another platform...and neither 
choice is appealing.


my code that worked amazing on linux and mac os x failed 
miserably on freebsd which is my server os whenever and wherever 
possible. i did not have the luxury of days to fix stuff so i 
simply switched to debian.




Re: Note from a donor

2017-10-28 Thread Mengu via Digitalmars-d

On Saturday, 28 October 2017 at 14:43:38 UTC, codephantom wrote:

On Saturday, 28 October 2017 at 14:00:14 UTC, Jerry wrote:
On Saturday, 28 October 2017 at 07:39:21 UTC, codephantom 
wrote:
btw. (and I do realise we've gone way of the topic of this 
original thread)...but...


if it interests anyone, this is the outcome of yesterday, 
where I wasted my whole day trying to get DMD to compile a 
64bit .exe on a fresh install of Windows 7.


Your own incompetence isn't reason enough for everyone else to 
suffer. I've never had a problem installing Visual Studio, or 
getting D to work with it.


Nice one Jerry.

You're so eager to have a go at me, that you completely missed 
the point.


I explicitly mentioned that I did ***NOT*** want VS 
installed.


All I wanted, was to build a 64bit D binary, and wanted to know 
what was the minimum components I had to install in order to be 
able to do that.


I had just wanted VS. I would have just installed that.

The majority of time spent was downloading the damn thing!

Go trawl somewhere else!


but what if that is how you can build 64 bit binary? with mac os 
x, we have to download gbs of command line tools library before 
getting started with any development. if we want to build 
anything for ios or mac we have to download 5gb xcode. with a 
fast internet, you get that in a matter of minutes. i don't 
believe that should be a show stopper or maybe i am missing your 
point.


Re: Note from a donor

2017-10-27 Thread Mengu via Digitalmars-d

On Friday, 27 October 2017 at 11:25:13 UTC, codephantom wrote:

On Friday, 27 October 2017 at 05:20:05 UTC, codephantom wrote:

That's it!
I've had enough!
4 hours wasted!


ok... I must have done something wrong..

But still, I started testing this whole process at 12:04pm 
today.


It's now 10:23PM

All I can say, it thank god I used FreeBSD ;-)


pkg install ldc

(a few seconds later, I can start compiling 64bit D code).


looks like d has a long way to go on freebsd as well.



Re: 350$ Job

2017-10-22 Thread Mengu via Digitalmars-d

On Sunday, 22 October 2017 at 17:43:04 UTC, Suliman wrote:
Man, you are give to low money for too big job. It's not 350$ 
for a projects it's much more. You codebase is very dirty and 
out of date.


It's better to you find money to rewrite all from scratch.


love that how in each post the money increases. i'll wait till 
his 500th post. :-)


Re: D for microservices

2017-10-22 Thread Mengu via Digitalmars-d

On Sunday, 22 October 2017 at 02:48:57 UTC, Joakim wrote:
I just read the following two week-old comment on the ldc issue 
tracker, when someone tried to run D on Alpine linux:


[...]


rock solid, easy, common-dev-proof, huge std lib. like that of 
golang.


Re: D on quora ...

2017-10-06 Thread Mengu via Digitalmars-d

On Friday, 6 October 2017 at 17:14:51 UTC, Rion wrote:

https://www.quora.com/What-is-your-review-of-D-programming-language

It seems that D still has the GC being mentioned up to today.

Maybe its better to move the standard library slower to a non 
gc version in the future...


as a d user, i do not give a single flying fuck about manual 
memory management. i love gc. period. please let gc be my guest 
and clean up everything for me. i have other problems like d / 
dmd / phobos failing me on freebsd; vibe.d working amazing on 
linux and throwing some random shit on freebsd.


d is better than java, let alone c++. they both are crap. 
garbage. incredibly explicit and verbose. yet they get work done 
for other people. and these people, since the inception of d are 
throwing random arguments against d. they never ran out of 
arguments. it was two std libs, it was two d versions, it was 
lack of 3rd party libs, it was lack of giant corp support, it was 
lack of community / resources, it was and it will be something 
for those people. until they decide to shut the fuck up and 
actually give d a try. just like great people we get here 
everyday.


a big problem of d is that it is a play-dough for many people 
here. they don't run into problems with d because they are mostly 
not eating their own dog food or incredible experts at d. 
(remember qtd guys?) if we have 100 wtf moments per hour, they 
probably have like 1-2 per year. they do more abstract stuff 
rather than concrete stuff. (atila & co, manu, sociomantic 
people, jacob and some more are exceptions). they are blind to 
newcomer problems. they also have prejudices like assuming you 
know all the low level stuff beforehand.


when your beloved language (or its toolchain) screws things up 
for the app you wrote and deployed and will be used by millions 
of people per year, you have more problems than you imagined 
earlier and gc is not one of them.


Re: D Tour is down

2017-08-28 Thread Mengu via Digitalmars-d

On Monday, 28 August 2017 at 17:16:59 UTC, Mengu wrote:
On Monday, 28 August 2017 at 08:19:10 UTC, Petar Kirov 
[ZombineDev] wrote:

On Monday, 28 August 2017 at 07:52:00 UTC, Joakim wrote:

On Monday, 28 August 2017 at 07:44:48 UTC, Wulfklaue wrote:

On Sunday, 27 August 2017 at 22:27:45 UTC, Mengu wrote:
d tour page is down for at least a week now. someone please 
fix that.


thanks.


Seems to be active for me ...


It shows a blank page for me.  Also, the wiki seems really 
slow nowadays.


Can you try again? I think that if there was a problem, it is 
gone now.


it works on my android phone rn. i'll post if it doesn't work 
on the mac.


on mac, with chrome version 60.0.3112.90 (64-bit), it renders an 
empty page.




Re: D Tour is down

2017-08-28 Thread Mengu via Digitalmars-d
On Monday, 28 August 2017 at 08:19:10 UTC, Petar Kirov 
[ZombineDev] wrote:

On Monday, 28 August 2017 at 07:52:00 UTC, Joakim wrote:

On Monday, 28 August 2017 at 07:44:48 UTC, Wulfklaue wrote:

On Sunday, 27 August 2017 at 22:27:45 UTC, Mengu wrote:
d tour page is down for at least a week now. someone please 
fix that.


thanks.


Seems to be active for me ...


It shows a blank page for me.  Also, the wiki seems really 
slow nowadays.


Can you try again? I think that if there was a problem, it is 
gone now.


it works on my android phone rn. i'll post if it doesn't work on 
the mac.




D Tour is down

2017-08-27 Thread Mengu via Digitalmars-d
d tour page is down for at least a week now. someone please fix 
that.


thanks.


Re: Need some vibe.d hosting advice

2017-08-11 Thread Mengu via Digitalmars-d

On Friday, 11 August 2017 at 13:06:54 UTC, aberba wrote:
So I'm into this platform with a vibe.d api server + back-end 
and I'm confused/curious to know the hosting package to use. I 
will have a lot of images uploaded by users.


1. For sometime, I've been looking at heroku which is fine with 
its load balancer, easily scaling etc. But the hosting cost for 
a startup is high and (most importantly) requires an external 
storage either s3 or cloudinary which no lib in D currently 
exist for them (stable).


2. Get an EC2 instance from Amazon or Vultr and install 
everything yourself and save images on disc (potentially 
problematic). This can not be scaled easily


3. use a self-hosted PaaS like Flynn (aka self hosted heroku) 
...but you still have to store images in an object storage and 
a D api is needed for this. Which links back to point 1 but 
less costly and more control.



How would you do it if you were using vibe.d?

(With node.js, all these are solved).


heroku is a bit more expensive. for starters, you could have a 
vps on digitalocean and let your application run on there.


google cloud is an excellent platform that i run my company on. 
it is a lot cheaper than aws.


digitalmars-d@puremagic.com

2017-08-10 Thread Mengu via Digitalmars-d

On Thursday, 10 August 2017 at 07:58:55 UTC, Arjan wrote:

On Thursday, 10 August 2017 at 00:32:40 UTC, Mengu wrote:
my second question is: i have no idea what's going on in this 
file: 
https://github.com/whoshuu/cpr/blob/master/include/cpr/body.h 
i'd appreciate some pointers.


A new 'type' named Body which IS-A std::string is defined.


i think we can mimic this with an alias this for a string (or 
const char*) property. is that right?



To construct a Body there are various options:
The ctors 'default': Body(), 'copy': Body(const Body&) and 
'move': Body(Body&&) ctors are using the compiler generated 
default implementation.

The same is true for the assignment operators =


how can i check what compiler generates for default so i can add 
them to my extern C++ clause?


Then a few explicit conversion ctors are defined to construct a 
Body from a const char* string and std::string. Explicit means 
the compiler is not allowed to implicit convert to std::string 
or const char* for provide args not being a const char* or 
std::string but for which a conversion exists.




i'll give these converters a try.


Since the h file also contains the definitions, the compiler 
must inline the code for the Body ctors and assignment 
operator. It also means not C/cpp file is needed since the 
function bodies are already in the h file.


i realized that when i saw the member initialization syntax in 
header files.




HTH


thank you very much for the detailed explanation.



digitalmars-d@puremagic.com

2017-08-09 Thread Mengu via Digitalmars-d

On Tuesday, 8 August 2017 at 21:04:23 UTC, Jacob Carlborg wrote:

On 2017-08-08 20:51, Johan Engelen wrote:

Hi all,
   Currently, it is not possible to call the C++ function "void
foo(Klass&)" when Klass is an extern(C++) _class_ on the D 
side. You
have to declare Klass as a D _struct_, otherwise there is no 
way to get
the correct mangling. When Klass has virtual functions, you're 
hosed.


For more context (involving "const"), see:
https://forum.dlang.org/post/tvohflgtaxlynpzed...@forum.dlang.org

Is this problem on anybody's radar?
What are the ideas to resolve this issue, or are we content 
never to

solve it?


One way to do it, that might be a bit confusing, is to force 
the declaration of the function to explicitly specify a pointer 
or a reference. Currently it looks like it's an implicit 
pointer.


extern (C++) class Klass {}
void foo(Klass*); // ok
void foo(ref Klass); // ok
void foo(Klass); // error

Of course, there's always pragma(mangle) as well.


sorry for hijacking the thread but i have a similar question:

i was wondering if i could write a wrapper for a C++11 library 
called cpr. in one of its header files 
(https://github.com/whoshuu/cpr/blob/master/include/cpr/auth.h#L13) it has a generic constructor that initializes its member fields. i had no idea as to how to do it. then i came up with the following line:


extern (C++, cpr) {
this(UT, PT)(ref UT username, ref PT password) { ... }
}

when i compiled it with the .a lib given, it worked. do you guys 
think i did it right? the &


my second question is: i have no idea what's going on in this 
file: 
https://github.com/whoshuu/cpr/blob/master/include/cpr/body.h i'd 
appreciate some pointers.





Re: Abusive posts

2017-06-19 Thread Mengu via Digitalmars-d

On Monday, 19 June 2017 at 01:06:41 UTC, Meta wrote:

On Sunday, 18 June 2017 at 19:57:26 UTC, Walter Bright wrote:
There have been a handful of abusive posts here lately. These 
are not welcome. If you see one, please forward it to me or 
otherwise let me know, and let me deal with it.


Do not reply to them. And specially, DO NOT QUOTE THEM in your 
reply. That just propagates the problem.


The same goes for spam that appears here now and then.


Just a quick note that I don't think messages can be forwarded 
via the web interface.


it is time that this forum catches the century and move to an 
actual forum software where moderation can actually happen.


Re: dmd download spike

2017-01-08 Thread Mengu via Digitalmars-d

On Saturday, 7 January 2017 at 13:52:12 UTC, Benjiro wrote:
On Saturday, 7 January 2017 at 13:22:02 UTC, rikki cattermole 
wrote:
Btw, I based this mostly off the number of newbies coming on 
to IRC. There has been quite a large number :) At least 
compared to the rest of the yar.


Interesting. Maybe it can be useful to get a poll asking the 
new people how they got introduced to D. Especially if this 
correlates top the release. If the release news draws in 
people, maybe it can be interesting to do more increment 
releases ;)


Btw. IRC ... that is so 1999 :)


1999 times better than slack.


Re: Crazy, sad but ... would you use D for your own facebook or pinterest?

2017-01-03 Thread Mengu via Digitalmars-d

On Monday, 2 January 2017 at 21:49:03 UTC, aberba wrote:
I'm not building Facebook/pinterest but I'm trying to work on a 
platform like "pinterest-like" but on a small scale. I want it 
to be easy to write, fast, ... you know. D is obviously that 
(IMO).


About scalability, would you recommend D(vibe.d initially) for 
long run (techically, generally, currently)? Why? (Brutal 
honesty).


i'd suggest the language that you know the best, the language 
that will not block your way and build barriers so you can focus 
on building your product. maybe later you can port it to D or 
build some new services in D.


Re: asd

2016-07-25 Thread Mengu via Digitalmars-d

On Monday, 25 July 2016 at 09:10:05 UTC, ahahah wrote:

haro


herro


Re: How are you enjoying DConf? And where to go next?

2016-05-10 Thread Mengu via Digitalmars-d

On Monday, 9 May 2016 at 20:08:03 UTC, Iain Buclaw wrote:
On 9 May 2016 at 17:32, wobbles via Digitalmars-d 
 wrote:

On Monday, 9 May 2016 at 15:12:25 UTC, krzaq wrote:

[...]



I also think it should not only be in a decently cheap 
location, but also in a location where there is, by default, a 
high concentration of D users.


Berlin fits that.
Facebook fits that.
Where's the other high concentration of D users?


Europe is fairly accessible for many people, if this year is 
anything
to go by.  I wouldn't mind going to another capital. Paris? 
Bucharest?

 If it must be the US, then I'd pick Boston. :-)


we can also welcome you guys in istanbul :)


IMAP library

2016-02-17 Thread Mengu via Digitalmars-d

hello everyone

i have checked code.dlang.org and github but i have not 
encountered an IMAP library. there's an application at work that 
i want to convert to D and IMAP is an essential part as i read 
emails and download the attachments. so i thought let's give it a 
shot and create the library for D before i convert the 
application.


i'd appreciate it if someone knowledgable jumps in and build the 
library with me or guide my way. also, i am thinking of using 
pegged in this case for parsing as i think it'd make things 
easier.


what do you guys think?


Re: Wannabe contributor frustrations

2016-02-11 Thread Mengu via Digitalmars-d
On Thursday, 11 February 2016 at 05:02:40 UTC, Adam D. Ruppe 
wrote:
On Thursday, 11 February 2016 at 04:37:39 UTC, Jonathan M Davis 
wrote:

And building the documentation is that much worse.



I'm fixing that at least! My docs: 
http://dpldocs.info/experimental-docs/std.stdio.html


are built with a single simple command:

docs path/to/phobos

done. No need to install several repos of crap.


at the beginning i was opposing having alternative docs somewhere 
else but i get to like it. when reading phobos source number of 
wtfs i say is reducing with the help of your docs. thanks adam.


Re: Proposal: Database Engine for D

2016-02-08 Thread Mengu via Digitalmars-d

On Saturday, 6 February 2016 at 13:41:03 UTC, Piotrek wrote:

On Saturday, 6 February 2016 at 00:14:08 UTC, Mengu wrote:
and while we were talking the talk, rust community rolled out 
something good called diesel. check it out at 
http://diesel.rs/.


we need tools that get things done. we do not need tools that 
makes things more complex than they already are.


Almost no one (including me) is interested in ORM for SQL. The 
point is ORM+SQL is limiting and sooner or later you fallback 
to SQL.


Additionally there is no critical mass for this kind of big 
project (combining all the SQL engines - good luck).


Andrei suggested a CTFE sql parser, so people who like SQL (not 
me) can benefit from the D metaprogramming power.


For the rest there is my proposal ;) : a language embedded DB. 
As far as I can tell none of the known PLes has this "killer" 
feature.


Piotrek


i don't mind if it's an ORM or something else. my point was that 
instead of complaining about stuff, we need a safe, stable and 
extendable database library supporting sqlite, mysql, postgresql, 
mssql and oracle dbs and we need it like yesterday. nothing 
fancy. people can get creative and fancy over that standard api 
and users get to choose.


Re: Proposal: Database Engine for D

2016-02-05 Thread Mengu via Digitalmars-d

On Tuesday, 5 January 2016 at 22:12:05 UTC, Mengu wrote:
On Tuesday, 5 January 2016 at 08:26:16 UTC, Jacob Carlborg 
wrote:

[...]


i love how things can become so complex in this community. i am 
a web developer so i am going to talk in terms of simplicity.


as russel said, with SQLAlchemy (python library) operators are 
overloaded and we can do 
DBSession.query(User).filter(User.first_name == "Jacob", 
User.age > 27). this will generate the following query:


"SELECT * FROM users u WHERE u.first_name = 'Jacob' AND u.age > 
27" and will let the DB handle the rest.


but as a web developer, i don't mind if i have to type 
User.where("first_name = ? AND age > 27", 
request.POST.get('name')). this will generate the same query 
above. i added the question mark to say the parameters should 
be escaped properly.


guys, what we need is a DB abstraction supporting PostgreSQL, 
MySQL and other major database systems and we need it 
yesterday. let's not make things more complex than they are and 
build up this thing.


p.s. this is not a reply to jacob, just his post was the one i 
clicked reply for. :-)


and while we were talking the talk, rust community rolled out 
something good called diesel. check it out at http://diesel.rs/.


we need tools that get things done. we do not need tools that 
makes things more complex than they already are.


Re: Pre-alpha D language online tour

2016-01-28 Thread Mengu via Digitalmars-d

On Tuesday, 26 January 2016 at 18:45:55 UTC, André wrote:
On Tuesday, 26 January 2016 at 14:25:33 UTC, CraigDillabaugh 
wrote:


let's put it on github and let everyone contribute and make 
things easier for you. :)


It is on Github (see post #1)


On a related note: because it's on GitHub it's even possible to 
contribute content and examples just through the web interface. 
A quick guide on how the content is structured (all written is 
standard markdown) can be found here: 
https://github.com/stonemaster/dlang-tour/tree/master/public/content. The tour's content files found in that folder can just be edited using the GitHub web interface which will then automagically create a pull request for you without the need to locally pull the repository. And the preview mode of GitHub makes sure the layout isn't broken that much :-) It has never been easier to contribute!


FYI, I've now added content + examples for the templates and  
interface sections.


Thanks,
André


sorry, i must have missed the github link on the first post. 
forked it. here comes the turkish translation for the tour. it 
will follow the english content.


let's get this on people.


Re: Pre-alpha D language online tour

2016-01-26 Thread Mengu via Digitalmars-d

On Tuesday, 26 January 2016 at 10:30:17 UTC, André wrote:
On Monday, 25 January 2016 at 21:53:26 UTC, Guillaume Piolat 
wrote:

[...]


Thank you very much for going through the content! I integrated 
your comments and they will be online very soon. I added a 
paragraph for __gshared in the storage classes section and I 
added a sentence to emphasize that slices and dynamic arrays 
are the same. I am not sure about the latter so I might revise 
it after sleeping some days on it :-) Thanks again! - André


let's put it on github and let everyone contribute and make 
things easier for you. :)


Re: forum.dlang.org is now available via HTTPS

2016-01-22 Thread Mengu via Digitalmars-d
On Wednesday, 20 January 2016 at 18:36:12 UTC, Vladimir Panteleev 
wrote:
It took a while but I finally got around to adapting a Let's 
Encrypt ACME client to my hosting system with automatic 
renewals etc. Enjoy!


https://forum.dlang.org/

Adam, your turn!


on Mac OS X El Capitan Chrome Version 47.0.2526.111 (64-bit), 
everything is fine for the forum.


Re: Proposal: Database Engine for D

2016-01-05 Thread Mengu via Digitalmars-d

On Tuesday, 5 January 2016 at 08:26:16 UTC, Jacob Carlborg wrote:

On 2016-01-05 05:16, Chris Wright wrote:

Not proposing language changes was an intentional feature, not 
a mistake.


Then you obviously can't use the operators. You would have to 
fall back to methods:


Person.where!(e => e.name.eq("John"));


i love how things can become so complex in this community. i am a 
web developer so i am going to talk in terms of simplicity.


as russel said, with SQLAlchemy (python library) operators are 
overloaded and we can do 
DBSession.query(User).filter(User.first_name == "Jacob", User.age 
> 27). this will generate the following query:


"SELECT * FROM users u WHERE u.first_name = 'Jacob' AND u.age > 
27" and will let the DB handle the rest.


but as a web developer, i don't mind if i have to type 
User.where("first_name = ? AND age > 27", 
request.POST.get('name')). this will generate the same query 
above. i added the question mark to say the parameters should be 
escaped properly.


guys, what we need is a DB abstraction supporting PostgreSQL, 
MySQL and other major database systems and we need it yesterday. 
let's not make things more complex than they are and build up 
this thing.


p.s. this is not a reply to jacob, just his post was the one i 
clicked reply for. :-)


Re: I hate new DUB config format

2015-11-25 Thread Mengu via Digitalmars-d

On Wednesday, 25 November 2015 at 11:54:00 UTC, Suliman wrote:

I find the SDLang format much cleaner to use than JSON
But it's dead format! Nobody do not use it. JSON easy to read, 
there is a lot of it's checkers and formating tools.


Yes, it's not perfect, but now it's _standard_. Personally I'd 
prefer yaml, because it's much easier to read for humans.


But what we will do with SDL? Who know how to parse, validate 
it with D, and with another language? Even ini is better, 
because everybody know it.


it can be dead but AFAIK it is complete. if we were to face any 
problems with it, we would fork it and fix it.




Re: Here's looking at you, kid

2015-11-20 Thread Mengu via Digitalmars-d

On Friday, 20 November 2015 at 08:51:13 UTC, Warwick wrote:

On Friday, 20 November 2015 at 01:28:00 UTC, rsw0x wrote:

On Friday, 20 November 2015 at 00:47:17 UTC, Warwick wrote:

[...]


Ali's book is not a tutorial or aimed at absolute beginners, 
it's /the/ material for learning D and in my opinion a great 
reference book.


It says on the website and I quote... "a great starting point 
for absolute beginners"


But the fundamental problem and what everyone seems to be 
refusing to acknowledge is that in spite of what *you think 
people should be doing* many visitors are ending up using 
language reference to learn D.


Or they use that reference to get their first impressions.

It's like going to a restaurant and being given the recipes 
instead of the menu.


But keep burying you heads in the ground.


i agree with warwick. language reference as of now is language 
spec and people will take a look at it before reading any books.


Re: IRC dead?

2015-11-19 Thread Mengu via Digitalmars-d
On Thursday, 19 November 2015 at 14:55:19 UTC, Jonathan M Davis 
wrote:
On Wednesday, 18 November 2015 at 23:24:14 UTC, Chris Wright 
wrote:
#ubuntu, for comparison, is so outrageously active that you 
can log in and see a new message every few seconds.


Wow. That seems like it would be too active to even be useful.

- Jonathan M Davis


somehow people manage to keep up. :)


Re: DConf keynote speaker ideas

2015-11-19 Thread Mengu via Digitalmars-d

On Wednesday, 18 November 2015 at 16:04:11 UTC, Pederator wrote:
On Tuesday, 17 November 2015 at 18:47:58 UTC, Andrei 
Alexandrescu wrote:
I'm thinking of inviting a notable industry luminary to 
deliver a conference keynote. Please reply to this with ideas! 
-- Andrei


Russel Winder


+1 for Russel.

+1 for Erik Meijer.


Re: on std.net.curl high level functions

2015-10-26 Thread Mengu via Digitalmars-d

On Monday, 26 October 2015 at 10:47:20 UTC, tired_eyes wrote:

On Sunday, 25 October 2015 at 00:14:38 UTC, Mengu wrote:

hi all

what do you think about high level functions such as get, 
post, put, delete returning a Request object with status code, 
headers and content as its properties rather than just the 
content? this would make things easier for n00bs and newcomers 
to D as everyone would not have to create their own 
httprequest.d file in order to get the status and headers 
along with the content.


I've tried to use std.net.curl but ended using etc.c.curl and 
arsd due to incompleteness of the current implementaton. 
Currently std.net.curl lacks some trivial things, and this 
topic was discussed before (but AFAIK no clear decision was 
made).


having equivalent of Python's Request lib in Phobos would be 
great imho.


on std.net.curl high level functions

2015-10-24 Thread Mengu via Digitalmars-d

hi all

what do you think about high level functions such as get, post, 
put, delete returning a Request object with status code, headers 
and content as its properties rather than just the content? this 
would make things easier for n00bs and newcomers to D as everyone 
would not have to create their own httprequest.d file in order to 
get the status and headers along with the content.


Re: Will code for master title

2015-10-19 Thread Mengu via Digitalmars-d

On Monday, 19 October 2015 at 19:20:15 UTC, ParticlePeter wrote:

Hello Community,

I am a master student of Computational Visualistics / Computer 
Science shortly before starting my master thesis. This means I 
could (and also would love to) spend about five month 
exclusively working on and writing about a D project.
Unfortunately no professor at my university (OvGU in Magdeburg, 
Germany) can be found who is aware of dlang and would agree to 
supervise such a project.


[...]


hi

in the meanwhile gsoc ist hier und wir haben einige interessante 
Projekte. (my tarzan german)


see http://wiki.dlang.org/GSOC_2015_Ideas. Craig Dillabaugh will 
put up 2016 ideas soon.


Re: D and microservices

2015-10-07 Thread Mengu via Digitalmars-d

On Tuesday, 6 October 2015 at 23:01:43 UTC, Laeeth Isharc wrote:

On Tuesday, 6 October 2015 at 19:31:20 UTC, Mengu wrote:
a half of it is the buzz and other half of is not. remember 
people talking about reactjs, go and rails being buzz? they 
were the same. we have built an online payment gateway and we 
are about to decouple our application and switch to 
microservices architecture. we have an api, a dashboard, a 
checkout page, mobile flow. we have to deal with accounting 
and reporting as well. and there is no way that this 
application will turn into a giant monolith. i don't want 
that. nobody wants that. it will become something we cannot 
handle.


now a question for you.  do you wish you had built it from 
components from day one?  or do you see creating it as a blob 
to start with and then when the right divisions are clear 
factoring these out into micro-services as simply a natural 
part of the design process?  because you know much more by 
having started, and it's not so hard to refactor at this stage.


it's the latter for me. i am glad we have everything coupled 
together. this way we are able to see what parts can live by 
themselves and what parts cannot. and when you're building a 
start-up, i hardly believe designing microservices is the way to 
go. if you have time, if you have resources then go and design 
your microservices architecture. take your time, use your 
resources. but i didn't. i was one man and i did not have the 
time. now we are 4 people. we are not adding new features anymore 
and we know what kind of future is out there for our application. 
right now almost 95% of our application can be decoupled, do not 
depend on each other in terms of code. they can just communicate 
and get things done. also it means more uptime, more developers, 
more resources, etc.


we already have two microservices. one is for card vaulting and 
the other one is for end of day and cash report download/process 
service from the banks and other payment gateways. sometimes the 
industry you are in will push you that way.  and... one of the 
most important things for me with microservices is that now I can 
get Haskell and D in our codebase. :-)




another thing is whenever we do deployments we have to take 
down the whole application and go offline


pretend I'm asking you before it was deployed in production...

nobody suggests starting with microservices architecture 
because you'll never know where things will lead you however 
when it becomes a giant the suggestion is to use microservices.


some people do.  but I would have thought the point I made 
above is the real reason.  it doesn't take very long to write 
it that way from the beginning IFF you know what you want it to 
look like before you start.  and maybe you don't.  but I am 
interested in what your experience has been.


nobody, in their right minds, then. :)


Re: D and microservices

2015-10-06 Thread Mengu via Digitalmars-d

On Tuesday, 6 October 2015 at 19:07:32 UTC, Nick Sabalausky wrote:

On 10/06/2015 01:54 PM, Russel Winder via Digitalmars-d wrote:
On Tue, 2015-10-06 at 16:21 +, Dejan Lekic via 
Digitalmars-d wrote:
On Tuesday, 6 October 2015 at 16:12:12 UTC, Russel Winder 
wrote:

Has anyone got a small example of microservices using D, with
Vibe.d or otherwise, that I can make use of? I need some
examples of small microservices for a session at μCon 2015.


As far as I know, there is no implementation of microservices 
as
we see in the Java world. IMHO, D community should come up 
with a
good microservices architecture. As you pointed out, it could 
be

based on vibed.


Pity, microservices is a very fashionable thing just now, and 
Go is wiping
the floor with Node and Java. Well that bit is opinion but… 
many people are
getting into all this non-blocking, event-driven, shared 
memory stuff and
boiling their brains, whereas the Go folk are doing blocking 
stuff using

dataflow which is much easier to program.



Felt stupid for not being hip to this "microservices" thing you 
say, so just looked it up. But it sounds to me like it's 
basically just a buzz-driven rediscovery of the basic 
principles of proper encapsulation and Unix philosophy ("do one 
thing and do it well").


(Kinda like how "cloud" sounds like a big fancy new revolution 
until you realize it's just the hip new word for "internet" or 
"hosted". Or "Facade design pattern" vs plain old "It's a thin 
wrapper".)


Does that sound about accurate, or am I missing something?


a half of it is the buzz and other half of is not. remember 
people talking about reactjs, go and rails being buzz? they were 
the same. we have built an online payment gateway and we are 
about to decouple our application and switch to microservices 
architecture. we have an api, a dashboard, a checkout page, 
mobile flow. we have to deal with accounting and reporting as 
well. and there is no way that this application will turn into a 
giant monolith. i don't want that. nobody wants that. it will 
become something we cannot handle.


another thing is whenever we do deployments we have to take down 
the whole application and go offline. i know there are other 
workarounds but when we only want to deploy mobile payments or 
the api, other functionalities should continue working and our 
customers should be able to pay.


nobody suggests starting with microservices architecture because 
you'll never know where things will lead you however when it 
becomes a giant the suggestion is to use microservices.


one other benefit of using this microservice is that you don't 
have to look for specific language programmers. you only need to 
hire good programmers as the only requirement  is to do one thing 
and and doing it well. the rest is about communication.


Re: Moving back to .NET

2015-09-30 Thread Mengu via Digitalmars-d

On Wednesday, 30 September 2015 at 15:45:02 UTC, learn wrote:

 working as advertised




libucrtd.lib is still sought and not found after another new 
release.
you guys should get your shit together, otherwise more people 
that try D will "Moving back to .NET" and not tell you about it.


well i guess i leave now too, since i don't have the time and 
patience to wait any longer for the compiler to work.


sincerely yours


what is libucrtd.lib? what kind of application/library were you 
trying to build?


i just wanted to see if i can use dmd without any problems with 
windows 10. downloaded it, installed it and everything just 
worked fine.


Re: Stroustrup is disappointed with D :(

2015-09-23 Thread Mengu via Digitalmars-d
On Tuesday, 22 September 2015 at 19:52:48 UTC, Ola Fosheim 
Grøstad wrote:
On Tuesday, 22 September 2015 at 19:38:35 UTC, Ali Çehreli 
wrote:
C++'s approach is better from the point of view of corretness. 
However, it is slower because the object's vtbl pointer must 
be stamped several times during construction. (I am not aware 
of available compiler optimizations there.)


No dispatch needed if calls it's own functions, so no vtable 
needed for the constructor. But neither approach is good for 
correctness.


(OP: The guidelines have 30 committers or something, I somehow 
doubt Stroustrup wrote all that...)


we can always do a git blame :-D


Re: D casually mentioned and dismissed + a suggestion

2015-05-13 Thread Mengu via Digitalmars-d

On Wednesday, 13 May 2015 at 05:05:54 UTC, Andrei Alexandrescu
wrote:

On 5/12/15 3:57 PM, Max Klyga wrote:

On 2015-05-12 20:02:05 +, Brian Schott said:


On Tuesday, 12 May 2015 at 18:35:10 UTC, FujiBar wrote:

"But there are no vacancies..."


There's at least one:
https://emsi.bamboohr.com/jobs/view.php?id=30


https://arex.recruiterbox.com/jobs/fk0hjlh/


Should we put together a page of "D job openings" on the wiki? 
-- Andrei


that does not belong to the wiki. that belongs to the frontpage.


Re: a "success story for D" ! !!

2015-05-06 Thread Mengu via Digitalmars-d

On Tuesday, 5 May 2015 at 12:04:39 UTC, Alex Ogheri wrote:

Hi guys, did you know this ??

http://vlang.org/


In fact, it gathered quite an enthusiastic appreciation at 
dvcon in Munich!!


some of you might know it, some of you might not but bernard 
helyer of our own, also created a language called Volt. its 
compiler is written in D.


see it in action: https://github.com/VoltLang/Volta


Re: SDC needs you -- redux

2015-04-18 Thread Mengu via Digitalmars-d
On Saturday, 18 April 2015 at 21:21:42 UTC, Andrei Alexandrescu 
wrote:

On 4/18/15 10:21 AM, Shammah Chancellor wrote:
The tooling for golang is a major reason for it's adoption.  
This
tooling looks like gofix, gofmt, govet, etc.  We need this 
tooling to be

able to succeed.


Agreed (as with your entire call to arms - nicely done). 
Where's a complete description of Go's out-of-the-box tooling? 
That's definitely an example we can draw inspiration from. -- 
Andrei


here it is: https://golang.org/cmd/

many of them are also passed to go cmd as an argument. like go 
fmt, go vet, go test, etc.


[OT] PyCon talk on Rust & Python

2015-04-15 Thread Mengu via Digitalmars-d
i was watching an interesting PyCon talk on Rust & Python and I 
wanted to share it here since i know there are people using PyD.


you can watch the talk at 
https://www.youtube.com/watch?v=3CwJ0MH-4MA. it looks really nice 
and easy.




Re: Novel list

2015-03-25 Thread Mengu via Digitalmars-d
On Wednesday, 25 March 2015 at 15:53:34 UTC, Ola Fosheim Grøstad 
wrote:
Ugh, I haven't looked too closely at this, but they apparently 
also ignore those that are undecided? Meaning that numbers like 
90% meant X actually could be 9% meant X and 90% are undecided.


Looks like entertainment.


the list of things that D does poorly is really _stupid_.

http://hammerprinciple.com/therighttool/items/d


Re: From the cycle "Topic of the day" - .gitignore: how big is too big?

2015-03-23 Thread Mengu via Digitalmars-d
bOn Sunday, 22 March 2015 at 21:08:27 UTC, Andrei Alexandrescu 
wrote:

On 3/22/15 1:37 PM, Mengu wrote:

while we're at it, let's add D to this list:
https://github.com/github/gitignore


That's be cool, any takers? -- Andrei


btw, i think it'd be good if dub would automatically include this 
.gitignore file to generated projects.


Re: From the cycle "Topic of the day" - .gitignore: how big is too big?

2015-03-22 Thread Mengu via Digitalmars-d

On Sunday, 22 March 2015 at 22:04:53 UTC, Mathias Lang wrote:

I was wondering how this could be done this afternoon.
Thanks Mengu.

https://github.com/github/gitignore/pull/1444

2015-03-22 22:08 GMT+01:00 Andrei Alexandrescu via 
Digitalmars-d <

digitalmars-d@puremagic.com>:


On 3/22/15 1:37 PM, Mengu wrote:


while we're at it, let's add D to this list:
https://github.com/github/gitignore



That's be cool, any takers? -- Andrei


you're welcome :)


Re: From the cycle "Topic of the day" - .gitignore: how big is too big?

2015-03-22 Thread Mengu via Digitalmars-d
On Sunday, 22 March 2015 at 19:32:51 UTC, Andrei Alexandrescu 
wrote:

On 3/22/15 12:27 PM, Vladimir Panteleev wrote:
On Sunday, 22 March 2015 at 16:08:38 UTC, Andrei Alexandrescu 
wrote:

On 3/22/15 3:17 AM, Vladimir Panteleev wrote:
I thought moving things around was also one of your pet 
peeves :)


Yah but I'm seeing pull requests "yeah there's some more junk 
out
there, let's just add it to .gitignore". It seems to me like 
the wrong

way to address the matter at hand.


It is much easier to add a few lines to .gitignore than to fix 
the
Makefile, then fix Digger, then fix my build scripts, then 
explain why
the change was necessary to anyone who then complains that 
this broke
their build. It is not a matter of which fix is better, but a 
matter of
which is within my threshold of the effort I am ready to exert 
at the
moment. If someone with a higher threshold and who is also 
bothered by
the .gitignore mess comes along, all the better for everyone 
if they

decide to fix the problem in a better way.


Fair enough. I'll drop this. -- Andrei


while we're at it, let's add D to this list: 
https://github.com/github/gitignore


Re: A reason to choose D over Go

2015-03-22 Thread Mengu via Digitalmars-d

On Saturday, 21 March 2015 at 22:16:10 UTC, Martin Nowak wrote:
This blog post describes what to consider when switching from 
python to go.


http://blog.repustate.com/migrating-code-from-python-to-golang-what-you-need-to-know/#tips

It's very interesting, because the long list of things to give 
up for
more efficient go code reads like an argumentation against 
choosing go

from a D perspective.
And given that D is on par with Python's expressiveness, we 
should

really emphasize this aspect.

I recently made a pull request for a go tool and spent about 
half an
hour trying to find some function to test whether an array 
contains a
particular element. I also asked on #go-nuts to confirm I 
didn't miss

anything, but you're really supposed to write an explicit loop.

https://github.com/buger/gor/pull/149/files#diff-b8b346beabeabdf0fca6f0b6893ce82bR42

That's what you would write in other languages.

```py
if "chunked" in request.transfer_encodings:
return
```

```ruby
return if request.transfer_encodings.include? 'chunked'
```

```d
if (request.transferEncodings.canFind("chunked"))
return;
```

```c++
const auto& arr = request.transfer_encodings;
if (find(arr.begin(), arr.end(), string("chunked")) != 
arr.end())

return;
```

There exists some functionality for sorted arrays (only int, 
float, and

string), but that isn't applicable here.
http://golang.org/pkg/sort/

While go will hardly ever have good support for algorithms, 
because of
the lack of overloads and generics, they also choose against 
adding such

trivial, but often needed, algorithms to the basic types.
With a functional programming (or C++ algo) background, I find 
this very

hard to get used to.
Repeatedly writing out such trivial code often mixes different 
levels of
abstraction and is one of the reasons why go code is so noisy, 
manual

error code handling being another one.


trust me, from an undecided but experienced developer's
perspective there are so many reasons to choose D over Go. on the
otherhand same person has a lot more reasons to choose Go over D.

i'm writing a very long blog post about this. if anyone's
interested, i can happily share the draft with them.


Re: A few notes on choosing between Go and D for a quick project

2015-03-15 Thread Mengu via Digitalmars-d
On Friday, 13 March 2015 at 02:00:08 UTC, Vladimir Panteleev 
wrote:
On Friday, 13 March 2015 at 00:20:40 UTC, Andrei Alexandrescu 
wrote:
I'd love us to derive a few action items from this and other 
feedback.


I think the front page focuses too much on the language itself 
at the moment. Perhaps we should continue with the direction 
with forum integration, and devote a good piece of real estate 
for the ecosystem (e.g. latest code.dlang.org updates) and 
maybe an IDE screenshot carousel, OSLT. Making it up-front that 
we have three compilers, a built-in profiler, and tight GDB 
integration might also be worthwhile.


this and reading the rest of the comments here, i have another 
suggestion:


let's have four tabbed examples in the front page.

1) simple example
2) vibe.d example
3) advanced example
4) concurrency example


Re: broken std.md5 link on phobos page

2015-03-14 Thread Mengu via Digitalmars-d

On Saturday, 14 March 2015 at 22:52:28 UTC, Mengu wrote:
the std.md5 link on phobos index page [0] is broken. i did fork 
phobos, did a grep but could not find the link to the lib so 
could not send a PR.


[0] http://dlang.org/phobos/


and i think that's because there's no more an std.md5 lib and its 
content is moved to std.digest.


broken std.md5 link on phobos page

2015-03-14 Thread Mengu via Digitalmars-d
the std.md5 link on phobos index page [0] is broken. i did fork 
phobos, did a grep but could not find the link to the lib so 
could not send a PR.


[0] http://dlang.org/phobos/


Re: Are there any 2D games libraries available for D2?

2015-02-20 Thread Mengu via Digitalmars-d

On Friday, 20 February 2015 at 07:43:42 UTC, Russel Winder wrote:
On Thu, 2015-02-19 at 23:32 +, Kingsley via Digitalmars-d 
wrote:

Hi

I'm looking for a 2D games library in D2 similar to gosu from 
ruby:

 http://www.libgosu.org/or ray:
https://github.com/Mon-Ouie/ray


I got totally confused there for a moment: Gosu is a programming
language for the JVM, and nothing to do with Ruby.


same here. when i first saw the name libgosu i thought "wow, gosu 
guys made a game lib" and then when i went to the libgosu website 
i saw that it has nothing to do with gosu, the jvm programming 
language.


for teh lazy, libgosu website says: "Gosu is a 2D game 
development library for the Ruby and C++ programming languages, 
available for Mac OS X, Windows, and Linux"


Re: Your 02.14

2015-02-14 Thread Mengu via Digitalmars-d

On Saturday, 14 February 2015 at 14:39:34 UTC, FrankLike wrote:

2015-2-14,I build a small program for wife:

module for214;

import std.stdio;
import std.random;

extern(C) int setlocale(int, char*);

static this()
{
import core.stdc.wchar_;
   fwide(core.stdc.stdio.stdout, 1);
   setlocale(0, cast(char*)"china");
}


void main()
{
int i;
   while (1)
   {

int[] a = [ 0, 1, 2, 3, 4, 5, 6, 7, 8,9];
 if(i ==0)
 {
 foreach(p;a)
write(p,",");

   writeln("\n共有10个奖,从现在开始闭上眼睛,过10秒钟,然后随意输个数,开始抽奖:");
}
else
{
break;//若删除,可以连续中3次。
}
 char[] b;
 readln(b);

 if(b[0] =='q') break;

 string[] s 
=["祝节日快乐","中奖300元","老公洗你的衣服","一起看电影(任你选)","一起吃大餐","明天下午老公带孩","老公给你讲笑话","网上看大片,老公带孩","在一起","给孩讲故事"];


foreach (e; randomCover(a))
{
writeln("中的是:",s[e]);
if(e != 0)
break;
else
{
 writeln("不满意? 再来一次:");
 continue;
}
}
i++;
if(i >2)
{
 writeln("恭喜老婆!");
 break;
}
  }
}

-end-
How about you?


i'm not doing valentines day but i did propose my wife with a d 
program i wrote. :-)


Re: Inconsistent coding style in code examples

2015-02-13 Thread Mengu via Digitalmars-d

On Tuesday, 10 February 2015 at 21:00:11 UTC, H. S. Teoh wrote:

This PR:

https://github.com/D-Programming-Language/phobos/pull/2973

introduces a code example with 2-space indentation, whereas the 
rest of

Phobos and dlang.org uses 4-space indentation.

I don't like this. It's inconsistent, and is detracting from the
professional look of D. It's bad enough that we are 
inconsistent from
one page to another, it's even worse that this PR introduces a 
style
inconsistency within a *single* doc page. It makes D look 
amateurish and

unprofessional.

Walter's reason for this is that 4-space indentation makes it 
look bad
on Kindle and other small-screen readers. Which is a good 
point, but it
shouldn't be reason for inconsistent code style throughout 
dlang.org.
If we decide that 4-space indentation is no good, then we 
should switch
*wholesale* to whatever it is we deem good. We should not be 
introducing

arbitrary style differences on an ad hoc basis.

So, what will it be? What coding style should we use for 
official
language docs? Should we use 4-space indentation or 2-space 
indentation?
Should we reduce the maximum line length in code samples so 
that they

don't look horribly on narrow-width readers? Or something else
altogether?

(Note also, that the code example in question is part of a 
ddoc'd
unittest, which means it is also inconsistent with the rest of 
Phobos
code. This is a smaller issue than inconsistency in 
public-facing docs,

but nonetheless, it's an annoying one.)


T


as a ruby dev, i'm fine with 2-space indentation and as a python 
dev i'm fine with 4-space indentation with 80 chars limit.


no tabs please


Re: dlang.org redesign n+2 (the one with the bold red vertical menu)

2015-01-24 Thread Mengu via Digitalmars-d

On Saturday, 24 January 2015 at 02:43:47 UTC, anonymous wrote:
Inspired by the recent developments, and Sebastiaan Koppe's 
version [1] specifically, I gave it a go, too:


http://ag0aep6g-dlang.rhcloud.com/

It's not as radical as other approaches. I didn't start from 
scratch, but tried to improve on what's there. Almost 
everything stayed in its place. The only thing that moved 
significantly is the search box. And I'm not sure about the new 
spot; may be better to put it above #content again.


I worked mostly on the general appearance, not on the content, 
not on the navigation hierarchy, not on styling specific pages. 
I did very minor adjustments to the homepage, though. Like 
fixing the grammar of the slogan ;) And I stole Sebastiaan's 
tables, as can be seen on property.html, for example.


I tried to keep all functionality, not cutting things for the 
sake of looking clean. I did kill two little details though:
* "D 2.066.1" in the menu -- What's the point of that linking 
to the home page? Maybe bring it back as "Home".

* the GitHub ribbon on download.html -- Because I hate it.

The site supposed to scale nicely with window size and font 
size. E.g., try resizing the window, or pressing Ctrl++ until 
the layout switches to 'mobile' (go back to default with 
Ctrl+0).


On that note, I changed the main font size to 1em, period. 
That's a thing I feel kinda strongly about. It's just the right 
thing to do (TM) in my opinion.


I have not been a good committer, so there's lots of cleanup to 
do. But aside from that, this is supposed to mergeable as it is.


Destroy.

[1] 
http://forum.dlang.org/thread/erksyjogigdbhuwpw...@forum.dlang.org


it looks better than the current one however when i expand the 
menus, the sub menus opened don't feel like they are a part of 
(ie.) d reference menu or community menu. guess making it clear 
would be better.


one question for everyone: do we really need 3-col web site?


Re: dlang.org redesign -- general thoughts and issues [part 1]

2015-01-23 Thread Mengu via Digitalmars-d

On Friday, 23 January 2015 at 10:31:45 UTC, aldanor wrote:
Hi all, I've started redesigning dlang.org AGAIN (yea, I 
know...). The front page is mostly done aside from a several 
responsiveness and platform quirks, I will have the full 
landing page + a random sample page from the docs this weekend. 
On the technical side, rapid design + ddoc and working with 
pure css don't work well together, so it's going to be a static 
page or two and if/when everyone/anyone's happy with it, it can 
be pulled apart into those fugly ddoc macros. An easy example 
of why that's the case would be changing the color scheme or 
general styling of multiple components -- in sass/less you can 
just do a "@active-component: darken(@martian-red, 5%);" and 
that will fix all the inherited ones across the stylesheet. 
Same applies to reorganizing content in drastic ways. If using 
node as a dependency to compile assets is acceptable, this 
would sure the preferred way; otherwise, the compiled assets 
could be frozen/minified and checked back in. More about 
design-specific stuff later in another post.


There are several issues with structure and presentation that I 
think will have to be addressed. While compiling these, I also 
had several people that know nothing about D look at the 
website structrure and make independent comments. Please see my 
semi-organized collection of thoughts below.


Top-level link: APPENDICES

... what is that even supposed to mean? It looks more of an 
official D style guide. TODO: rename to D STYLE GUIDE. TODO: 
someone needs to go through it and update it to look more 
official-style-guide-ish. And then again, it may be moved into 
a learning/docs section and not be a top-level item.


Top-level link: FAQ

... looks like a collection of stuff that doesn't belong 
anywhere. The "FAQ" is almost as bad as naming it "MISC". Some 
of the points actually look like they belong to an FAQ ("why 
D?"), other ones belong to an official guide or examples; I 
wouldn't ever guess that the info on anonymous structs/unions 
would be in FAQ, that's just wrong. (there's also Books & 
Articles --> How-tos etc; which makes it even harder).


Top-level link: D1 HOME

... should be buried away somewhere deep as not to scare people 
away. Those who need to find it already know where it is.


Top-level-link: CHANGELOG

... is stale and rarely / randomly updated. This makes it look 
like there is no development on the backend/phobos/runtime 
going on whatsoever. There either needs to be an automated 
aggregator for github pull requests (in which case there will 
need to be a better policy on commit/pr descriptions so it's 
automatable), or a responsibility of whoever's merging it to 
spend 5 seconds of time to update the changelog (e.g. nasty ice 
bug fixed, bugzilla issue #123, github pr #456).


There should also be a friendly way to quickly see a list of 
releases with dates and summaries and navigate to release notes 
for each one without scrolling through 42km of text.


Top-level link: SITEMAP

... should be removed, it's not 1999 anymore. Plus, a 
well-structured website never needs a sitemap.


Top-level-link: VISUAL D

... should move under Downloads & Tools; having this at 
top-level has a Windows smell and may scare people away.


Top-level links: STANDARD LIBRARY, D REFERENCE

... I suggest they are moved back into Documentation section 
(as it is on the forum.dlang.org) which will contain these 
(Language Reference / Standard Library) plus other subsections 
e.g. D Style Guide.


Book->Tutorial link (on forum.dlang.org) and other external 
links:


This is one of many random external links: 
http://www.informit.com/articles/article.aspx?p=1381876. It's 
just a really bad style for an official language website to 
link to an article obscure external website (that is 5 years 
old and probably outdated anyway). I suggest this is removed; 
and, in case any of the information in that tutorial is not 
duplicated in other guides, be manually moved/copied somewhere 
else (or be made a part of the official guide/tutorial).


REVIEW QUEUE:

... has this even changed at all in 6 months? If not, remove it 
from top-level. This gives an impression of stagnation if 
anyone were to follow that link and click "History" (I did).


i think it'd be great if you and sebastiaan koppe worked 
together. you guys can get together and combine your efforts so 
one of the work would not go in vain.


Re: dlang.org redesign n+1

2015-01-22 Thread Mengu via Digitalmars-d

On Thursday, 22 January 2015 at 10:32:19 UTC, Chris wrote:


Why not think outside the box a little? Design trends change
every 3-5 years. I'm sure that users and web designers are
already getting sick and tired of the tablet-friendly layout we
see everywhere and are thinking of ways to improve and change 
it.

We should think about what the D website needs and maybe we'll
come up with an innovative feature (that others may copy). I've
learned that every website needs its own tailor made solution. D
needs a different approach than C++, Go or Rust. The current
approach of presenting code and the three major points
(Efficiency, (Modelling) Power, Convenience) is not bad at all.

Tools like dub and 3rd party software could be more visible 
(e.g.

"Build D apps easily with dub the D package manager"). Topics of
interest like "Using D on Windows" should be visible 
immediately.


Let's first think about the content, what's important and the
ways to structure it properly. The layout can be adapted and
jazzed up later.


i agree with you. also, in the home page, there must be bold call 
to action buttons such as download, learn and get support. that 
big rounded cornered area can be used for that i think.


Re: [DRAFT] This Week in D - Jan 18

2015-01-19 Thread Mengu via Digitalmars-d

On Monday, 19 January 2015 at 16:50:10 UTC, Adam D. Ruppe wrote:

On Monday, 19 January 2015 at 16:46:41 UTC, MattCoder wrote:
Hey Mengu you could share those icons from his demonstration 
(Calendar, statistic): http://i.imgur.com/VRmCwCT.png


And other potential headers too. I could have cut them out of 
the

image but since there's only the two, I figured that would be
inconsistent and just went with none for now.


glad you liked it.

no worries, we will be sharing all of the icons and other objects 
once he's done with the design. i personally think that this 
might be the best good looking proglang newsletter.


he's going to work on typography and good looking code and try to 
provide a smooth reading experience to the readers coming from 
different backgrounds and urge them to act on D. and i believe he 
can do that.


Re: [DRAFT] This Week in D - Jan 18

2015-01-19 Thread Mengu via Digitalmars-d

hello all

yesterday i took the liberty of asking a dear designer friend of 
mine to help us have a better newsletter. luckily, he was able to 
put some design together for it. please see it at 
http://bit.ly/1DTLuPS and let us know what you guys think.


let's have some elegance with rock solid code.



Re: Thanks to p0nce for a nicer DConf logo!

2015-01-18 Thread Mengu via Digitalmars-d

On Sunday, 18 January 2015 at 19:45:10 UTC, ponce wrote:
On Sunday, 18 January 2015 at 19:39:38 UTC, Andrei Alexandrescu 
wrote:
Take a look: http://dconf.org/2015/index.html. PR: 
https://github.com/D-Programming-Language/dconf.org/pull/37. 
-- Andrei


:)

By the way I finds DDoc suprinsingly apt for a static site 
generator. Markdown is great for writing content but without 
macros, no reuse.


looks way cooler. thanks.


Re: Please help me with improving dlang.org

2015-01-18 Thread Mengu via Digitalmars-d
On Sunday, 18 January 2015 at 17:05:28 UTC, Andrei Alexandrescu 
wrote:

On 1/18/15 9:02 AM, aldanor wrote:
This is usually solved by media queries / responsive design / 
grid
frameworks, sorry if I'm stating the obvious :) Try resizing 
the
commonly used websites and see what happens, e.g. for 
ruby-lang you have
at least 3 "versions" which are selected automatically based 
on the

current viewport's settings which the browser provides:
http://imgur.com/a/gE38d

E.g. the menus on the left getting folded into one mobile 
"button" which
expands them on demand and leaves more space for the actual 
content, or
some elements disappearing in smaller viewports altogether 
(like the
twitter feed div). This is quite a pain to manage manually 
without

having an underlying grid framework.


My understanding is there are various simpler way to do this, 
e.g. separate styles for small screen devices, redirection to a 
different URL, setting "hidden" to certain DIVs dynamically 
etc. etc. As you saying there's no way to do this unless we use 
some grid framework I know nothing about and probably need to 
learn? -- Andrei


when not using a css framework like this, then the app for the 
mobile will consist of css and javascript hacks. and mostly one 
would lack the designers' and frontend developers' experience :)


if i may, i'll go and straightly ask a very great designer friend 
of mine to help us out. he'll either design a new interface for 
us or help us make this one better. let me know your call.


Re: css minification

2015-01-17 Thread Mengu via Digitalmars-d
don't know if it's already said but if you are using nginx, 
there's a plugin for minification and builtin support for 
compressing html pages or static assets. therefore, nobody needs 
a third-party dependency for building the docs.


Re: What is the D plan's to become a used language?

2015-01-15 Thread Mengu via Digitalmars-d
On Thursday, 15 January 2015 at 16:53:14 UTC, Andrei Alexandrescu 
wrote:

On 1/15/15 1:42 AM, weaselcat wrote:
On Thursday, 15 January 2015 at 07:58:47 UTC, Andrei 
Alexandrescu wrote:

On 1/14/15 7:19 PM, brian wrote:
My point was that there are fewer examples of *how* to do 
things in D.
This will discourage the new user, which will prevent it 
becoming a more

popular language.


Yes, it would be great if we could crowdsource a cornucopia 
of "how

to" topics in D. -- Andrei


D is the 8th most popular language on Rosetta Code(I think 
most of the
entries are from a single person - Bearophile), it's within 
~25 entries

of C, Ruby, etc.


Way to go bearophile! Could somebody please insert a reference 
to Rosetta Code on dlang.org?



There's also the cookbook on the wiki that's unfinished.
http://wiki.dlang.org/Cookbook
and the tutorial page
http://wiki.dlang.org/Tutorials


Well those need to be finished before we advertise them.


Andrei


bearophile did an awesome job. hats off.

i've noticed there are some code that are not working such as the 
anonymous recursion example. [0] the first example there doesn't 
work but the second one works with DMD64 D Compiler v2.066.


let's get together and find out which examples are working well 
and which are not.


[0] http://rosettacode.org/wiki/Anonymous_recursion#D


Re: NaCl/Emscripten

2015-01-09 Thread Mengu via Digitalmars-d

On Friday, 9 January 2015 at 12:46:41 UTC, Jacob Carlborg wrote:

On 2015-01-09 10:28, Manu via Digitalmars-d wrote:
I'm looking at another potential opportunity to get D into the 
office,

but the target's for this particular project are NaCL and/or
Emscripten.

I was gonna start hacking around to see what the limitations 
are with

Emscripten on D code tonight. Has anyone done any serious
investigation here?

NaCl is a more useful target, but I think that will rely on a 
special
build of LDC... has there been discussion about that before? 
Can any

of the LDC guys chime in on the possibility?



Don't know if there's any interest but Adam D. Ruppe has hacked 
DMD to output JavaScript. You should be able to find it 
somewhere on the newsgroup.


guess you're talking about dtojs: 
https://github.com/adamdruppe/dtojs.


Re: D and Nim

2015-01-04 Thread Mengu via Digitalmars-d

On Sunday, 4 January 2015 at 18:10:52 UTC, Jonathan wrote:

Hey folks,

I've been recently checking out Nim/rod and feel like it takes 
a lot of inspiration from D (I think the creator was in the D 
community too as some point). How do you think it compares? 
What areas does D, in principle, makes it a better choice? To 
give you my background, I like creating games (mostly using SDL 
bindings) using new languages, aiming for the most efficient 
yet concise way to write the engine and game logic.


FYI, this is NOT a language war thread. I'm just curious about 
what separates them from a principle level.


i agree. i first saw nim related threads on HN and they were 
mentioning it has CTFE, UFCS and many things that D already has. 
it got me wondering whether nim was inspired by D.


Re: Worst Phobos documentation evar!

2015-01-03 Thread Mengu via Digitalmars-d

On Friday, 2 January 2015 at 23:03:19 UTC, Walter Bright wrote:

On 12/31/2014 4:39 PM, Adam D. Ruppe wrote:
But the point is translating a module name to a Phobos link 
requires

transformation code too complex for a ddoc macro...


In my C++ compiler library documentation, I made a point in the 
code examples to hyperlink every call to a library function to 
the documentation for that library function.


Yes, it would be nice to make this automatic.


ironically needing something like LUCKY - an external search 
engine - to fix...


LUCKY isn't the only macro I use to make horrific url's 
palatable. I also use them for Amazon links, for example.


by the way, how about a link in the docs to source for methods, 
types and everything?


Re: Worst Phobos documentation evar!

2014-12-30 Thread Mengu via Digitalmars-d
On Tuesday, 30 December 2014 at 13:18:46 UTC, Russel Winder via 
Digitalmars-d wrote:


On Tue, 2014-12-30 at 13:08 +, via Digitalmars-d wrote:
On Tuesday, 30 December 2014 at 05:36:47 UTC, Andrei 
Alexandrescu wrote:

> That should be possible (probably after a few improvements).
> I'm working on a few templates for alternate formats 
> including LaTeX, plain text, and well, now json. -- Andrei


Would it not be easier to just do a raw convert to XML and use 
XSLT to transform into other formats?


And, of course, ASCIIDoc was invented to be a human usable 
input to
such a tool chain. Though now with ASCIIDoctor there is a 
direct to

PDF without using FOP or LaTeX.

Markdown is inadequate for more than single page HTML, XeLaTeX 
is
incorrectly disliked by far too many people, ReStructured Text 
is

perceived to be Python specific,… ASCIIDoc wins.


coming from Python, i'm in favour of rST, markdown and asciidoc.


Re: D game development: a call to action

2014-12-17 Thread Mengu via Digitalmars-d

On Wednesday, 17 December 2014 at 21:26:11 UTC, bitwise wrote:
On Wednesday, 17 December 2014 at 16:18:19 UTC, CraigDillabaugh 
wrote:
On Wednesday, 17 December 2014 at 01:28:55 UTC, Manu via 
Digitalmars-d wrote:

The average gamer today is aged 30.
I for one haven't gotten any money from my mum for games 
recently...


Christmas is right around the corner ... you should reminder 
her :o)


All I want for Christmas is a mobile port of D =/


i'd kill for that.


Re: Lost a new commercial user this week :(

2014-12-17 Thread Mengu via Digitalmars-d
On Wednesday, 17 December 2014 at 09:05:58 UTC, Manu via 
Digitalmars-d wrote:

On 16 December 2014 at 00:04, Kagamin via Digitalmars-d
 wrote:
On Sunday, 14 December 2014 at 08:37:36 UTC, Manu via 
Digitalmars-d wrote:


They then made HUGE noises about the quality of 
documentation. The

prevailing opinion was that the D docs, in the eyes of a
not-a-D-expert, are basically unreadable to them. The 
formatting
didn't help, there's a lot of noise and a lack of structure 
in the
documentation's presentation that makes it hard to see the 
information
through the layout and noise. As senior software engineers, 
they
basically expected that they should be able to read and 
understand the
docs, even if they don't really know the language, after all, 
"what is

the point of documentation if not to teach the language..."
I tend to agree, I find that I can learn most languages to a 
basic
level by skimming the docs, but the D docs are an anomaly in 
this way;
it seems you have to already know D to be able to understand 
it
effectively. They didn't know javascript either, but skimming 
the
node.js docs they got the job done in an hour or so, after 
having

wasted *2 days* trying to force their way through the various
frictions presented but their initial experience with D.



Comparing node.js to D? You probably speak about vibe, not D?


The majority of hours spent were not really related to vibe.d 
so much
as trying to wrangle the tooling, debugging crashes, and 
understand

the docs to get some very basic things done.
These are 'D' experience if you ask me.


very well said. it's not about just the environment, the language 
or phobos. it is about the experience that we provide to a new 
comer to D.


i remember walter said "build it and they will come is a lie." 
well, how about it "give a better experience and they will come?"





One of the take-away quotes I think, was "D seems to be a 
language for
people who actively want to go and look for it, and take the 
time to

learn it. That's never going to be a commercial success."



O_O Huh? Your team really didn't learn C++?


We didn't 'learn' javascript, or python, or html, or whatever 
else you

pick up on the job.
The investment in learning 'programming' is decades behind us, 
and I
think it's a reasonable expectation that a language present 
itself in

such a way that it's intuitive and easy to get some basic things
going.
Leveraging small example snippets from the docs, etc. D is very 
easy
for a C/C++ programmer, but the docs don't make it appear that 
way,

and they give the wrong impression.
The overpowering presence of templates in the docs give a first
impression that reminds people of everything that's wrong with 
C++,

which I suspect most C++ programmers looking into D are actively
trying to escape!

There simply can't be friction on step 1! There can be friction 
on
step 4 or 5 when you've already made some minor achievements, 
and have

a good few hours invested.
Any friction on step 1 or 2 will lead to an almost immediate 
rejection.


i am a python, ruby and groovy developer. D was very easy also 
for a programmer like me. every time i come back, i find comfort 
at D. honestly, D is python on stereoids for me. till i look at 
the docs and see all those things that doesn't mean anything at 
first sight. then i spend some time to understand the signatures, 
the bodies.


maybe, generated docs are not a good idea and hand-written, more 
explanatory docs are better for d?


Re: i want my bounty!

2014-12-15 Thread Mengu via Digitalmars-d

On Monday, 15 December 2014 at 14:44:03 UTC, John Colvin wrote:

On Monday, 15 December 2014 at 11:27:30 UTC, Mengu wrote:
p.s. i know i have your sympathy because of my all lower-case 
writing despite the hate we get. :-)


Ah! That's why I can never parse ketmar's posts at a glance and 
keep getting lost. Full stops followed by capital letters make 
great visual anchors. The whole I v.s. i thing is trivial in 
comparison.


actually with correct punctuation, writings with all lower-case 
letters are a lot easier to read. it just flows.


Re: i want my bounty!

2014-12-15 Thread Mengu via Digitalmars-d
On Monday, 15 December 2014 at 11:09:49 UTC, ketmar via 
Digitalmars-d wrote:

On Mon, 15 Dec 2014 10:47:29 +
John Colvin via Digitalmars-d  
wrote:


The attachment feature is useful (and is used) for listing 
large test-cases, stack traces etc. It is not an exclusive 
feature for patches.
i don't ever talked about disabling attaches. but there is no 
sense to

allow attaching *PATCHES*.

What part of http://wiki.dlang.org/Get_involved and related 
pages weren't clear to you, such that even after being told 
about github being the chosen method you still decided that 
the "(proposed patch, testcase, etc.)" text by the 
issues.dlang.org "Add an attachment" link superseded it all!
that is overall D attitude: "don't look at what we wrote here, 
look at
what we wrote there! sure, you HAVE to go there first, and we 
will not
give you any handly links. and than we'll blame you for using 
our tools
as we wrote in that tools, 'cause you must use that tools as we 
wrote
outside of that tools. and we blame you for don't reading 
something
that is not even linked from inside our tool. and we will not 
fix it
and blame you again, 'cause it's fun and we never fixing 
'cosmetic

issues' anyway."


hey ketmar.

first of all, judging by your language, you don't seem like a guy 
who follows guidelines. why are you even complaining if it's 
written here or there?


secondly, can i please open a github account for you and hand it 
to you? it'll only follow d-programming-language on github. you 
won't be dealing with any shit. [0]


[0] that's also what's gonna happen when you sign up yourself.

p.s. i know i have your sympathy because of my all lower-case 
writing despite the hate we get. :-)


Re: Lost a new commercial user this week :(

2014-12-15 Thread Mengu via Digitalmars-d

On Monday, 15 December 2014 at 10:46:30 UTC, Dicebot wrote:

On Monday, 15 December 2014 at 10:42:26 UTC, Paulo  Pinto wrote:

On Monday, 15 December 2014 at 08:13:33 UTC, Dicebot wrote:
On Monday, 15 December 2014 at 07:48:37 UTC, Paulo  Pinto 
wrote:

Well, lots of Fortune 500 companies do.


I have heard good enough first 9000 times, thanks.


If you want to appeal to those users


No.


So how to you plan to make game developers adopt D?


I don't plan it and don't realistically ever expect it. 
Considering the fact that game development industry is 
traditionally one of the worst in contributing upstream I also 
don't have any motivation to convince them adopt D.


If there ever appears a game development company / community 
interested in _investing_ into programming language that would 
be totally different story but also irrelevant to enterprise 
culture you refer to.


isn't that enterprise culture or communities/companies interested 
in investing in programming languages made java, c#, python and 
ruby mainstream?


Re: D Users Survey: Primary OS?

2014-05-30 Thread Mengu via Digitalmars-d
On Thursday, 29 May 2014 at 18:24:57 UTC, Tom Browder via 
Digitalmars-d wrote:

Has anyone done a survey of the primary OS of D users?

I (a D newbie) use Debian Linux (64-bit), but I get the feeling 
that

many (if not most) users are on some version of Windows.

Thanks.

Best regards,

-Tom


Mac OS X (Mountain Lion)


Re: Steve Yegge on D

2014-05-22 Thread Mengu via Digitalmars-d

On Thursday, 22 May 2014 at 09:52:20 UTC, Joakim wrote:
I was reading Brad Roberts' bio before his upcoming talk today, 
where he mentioned that he first heard of D because of blog 
posts by Steve Yegge, when I remembered that it was likely one 
of Steve Yegge's posts almost a decade ago that first brought D 
to my attention, like this one:


"C++ does need to get replaced someday. It's just horrid, and 
everyone knows it. However, there aren't very many people 
trying to replace it, either. The only contenders I'm aware of 
are Objective C and the D Programming Language.


D's a really beautiful language. By rights it should be the 
next C++. However, C++ programmers won't have it because it's 
garbage collected (even though it can be disabled, and even 
though Stroustroup himself is now advocating adding garbage 
collection to C++). Walter Bright is one hell of a lot smarter 
than the C++ programmers who won't look at his language, and he 
has demonstrated that D is as fast as or faster than C++ and 
nearly as expressive as Ruby or Python. It's a secret weapon 
just waiting to be seized by some smart company or open-source 
project.


But nobody ever accuses programmers of being wise."
http://steve-yegge.blogspot.com/2007/02/next-big-language.html

I wonder, how many others first heard of D through Steve's 
posts, which were pretty popular back then?


i and almost all of turkish d users / wannabes did learn about d 
through ali's initiative on a -back then- very popular turkish 
programming forum. this was way before he started working on his 
book. :)


yet, i did encounter steve's post was through HN much much later. 
it was 2009 or 2010 i guess.


Re: Learn D in x minutes

2014-05-14 Thread Mengu via Digitalmars-d

On Wednesday, 14 May 2014 at 08:11:37 UTC, Martin Nowak wrote:
On Wednesday, 14 May 2014 at 07:36:57 UTC, Joseph Rushton 
Wakeling wrote:

On Wednesday, 14 May 2014 at 07:04:24 UTC, w0rp wrote:
I'm unsure about the "learn x in y minutes" tutorials, but I 
did however think this was very neat. http://tryhaskell.org/


A friend and former colleague of mine wrote that. Great guy. 
:-)


http://drepl.dawg.eu


FYI, it doesn't work with FF 29.0.1 on OS X Mountain Lion. i 
couldn't see the error.


with chrome i got this: WebSocket connection to 
'ws://drepl.dawg.eu/ws/dmd' failed: Error during WebSocket 
handshake: Unexpected response code: 400


Re: D For A Web Developer

2014-04-30 Thread Mengu via Digitalmars-d

On Wednesday, 30 April 2014 at 07:18:49 UTC, Paulo Pinto wrote:

On Wednesday, 30 April 2014 at 05:00:47 UTC, Ola Fosheim Grøstad
wrote:
On Wednesday, 30 April 2014 at 04:19:15 UTC, Russel Winder via 
Digitalmars-d wrote:
Go has gained much of it's traction from provably and 
consistently
producing simpler, faster and more reliable systems that C, 
C++, Python,

etc. and getting articles about the success out there.


Python is simpler than Go for web. There is a reason for why 
Go is still not in production on App Engine, you end up with 
more convoluted code as far as I can tell. Faster, yep.


Only because developers don't reach for PyPy and Cython as much
as they should, rather re-writing everything from scratch and
they stating how they are impressed by Go.


thank god i'm not the only one who thinks like that. rob pike 
mentioned that there are much more conversion of python / ruby 
developers than c / c++ developers. and as we all know the  
reason is the speed and there's a trade off. they're trading 
beauty, elegance, simplicity with ugly speed. i also think many 
go users are caught NIH syndrome. they are re-inventing 
everything. heck, they are even re-inventing nginx, redis, etc. 
because they are _not written_ in go.


on ruby on rails side, it is fairly very easy. i've built apps 
with rails and i've always been happy with it. some apps used 
rails defaults, some apps were very customised. the thing with 
ror is that it is never getting in your way when you open up your 
editor and start building your application and that's what i look 
for in a web framework.


Re: $ for length?

2014-02-20 Thread Mengu

On Thursday, 20 February 2014 at 13:17:37 UTC, w0rp wrote:
On Thursday, 20 February 2014 at 10:28:43 UTC, Steve Teale 
wrote:
How difficult would it be to allow the '$' to be used instead 
of

length in something like:

Thing[] ta;
for (size_t i = 0; i < ta.$; i++)

It can be used in slices, and indexes, so it might well be
unambiguous here.


I don't like it. It's a small difference in the number of 
characters between the two on a line, and .length is much 
easier to read, especially for people new to the language. I 
think given D's smaller userbase, anything which makes a line 
of code easier to read for people coming from other languages 
without getting in the way of other things is a bonus.


well, at least it's not len(ta).


Re: Two Questions

2014-02-13 Thread Mengu

On Tuesday, 4 February 2014 at 16:18:24 UTC, Steve Teale wrote:

Popped into my head today.

What proportion of the D community develops on Linux of some 
sort, and what proportion works with a 64 bit OS?


And why?



I have an 64-bit Mac OS X Mountain Lion.


Re: DConf 2014: LAST CALL for submissions and early registration!

2014-02-01 Thread Mengu

On Thursday, 30 January 2014 at 21:09:27 UTC, Brad Anderson wrote:

On Thursday, 30 January 2014 at 07:30:17 UTC, Mengu wrote:


http://i.imgur.com/tpcI9zv.jpg :)

yes, master. i will talk about 'introduction to d for python, 
ruby programmers' in front of you, andrei, walter and many 
others who are (me^99). :-)


Bear in mind that the talks are recorded and watched by an 
audience much larger than the people in the room (every talk 
has several thousand views on YouTube). I'm sure there are a 
lot of people who aren't attending in person that would enjoy a 
talk on that subject. I'll be there and I'd enjoy that subject.


well, you asked for it so they've got my submission :) thanks for 
the support.


Re: DConf 2014: LAST CALL for submissions and early registration!

2014-01-29 Thread Mengu

On Wednesday, 29 January 2014 at 18:06:48 UTC, Ali Çehreli wrote:

On 01/28/2014 12:32 AM, Mengu wrote:

> Just in case if anyone wants to speak but lacking ideas, here
are some
> for you:
>
> - You can talk about web development with D.
> - You can talk about what are bindings and how to write C/C++
bindings
> with D.
> - You can talk about functional programming with D. (A
clojure/haskell
> vs. D might help)
> - You can talk about D vs. Rust vs. Go.
> - You can talk about templates and ranges.

Mengü, these are great ideas. I wonder what topic you are 
saving for yourself. ;)


Ali


http://i.imgur.com/tpcI9zv.jpg :)

yes, master. i will talk about 'introduction to d for python, 
ruby programmers' in front of you, andrei, walter and many others 
who are (me^99). :-)





Re: DConf 2014: LAST CALL for submissions and early registration!

2014-01-28 Thread Mengu
On Tuesday, 28 January 2014 at 02:53:14 UTC, Andrei Alexandrescu 
wrote:
Don't forget - Friday night is the deadline for both DConf 
submissions and early registrations.


http://dconf.org

It's safe to say we have a quorum already. Also, the proposals 
we got are solid. However, we are having fewer submissions, 
which is a bit of a letdown.


Keep in mind: DConf is literally created in every sense of the 
word by people in this forum. We're counting on our prominent 
participants to submit talk/panel proposals. If you're in doubt 
about your prominence, it's probably bigger than you think! Yes 
I'm talking about you! We also hope that most regulars on this 
forum will be able to attend. This is _the_ event to be at if 
you have an interest in D.


Last but not least, 31 January is not the time to deliver your 
_entire_ material. All we need is the _idea_ and the 
_abstract_. You'll have months to finish your talk after the 
acceptance process.


http://dconf.org


Andrei


Just in case if anyone wants to speak but lacking ideas, here are 
some for you:


- You can talk about web development with D.
- You can talk about what are bindings and how to write C/C++ 
bindings with D.
- You can talk about functional programming with D. (A 
clojure/haskell vs. D might help)

- You can talk about D vs. Rust vs. Go.
- You can talk about templates and ranges.


Re: Mac OS installer

2013-01-08 Thread Mengu

On Monday, 22 October 2012 at 13:45:10 UTC, Adam D. Ruppe wrote:
I was recently involved in a stack overflow question about mac 
os:


http://stackoverflow.com/questions/12832241/cant-install-dmd-2-060-on-os-x-10-6-8/12897850

I gave my usual answer of "just use the zip" which solved the 
problem there, but perhaps there's something we can do to 
improve the installer so people who do use it can have an 
easier time.


I don't know anything about the Mac though, so there's nothing 
more I can do except punt it to someone else... so here I am.


there is a homebrew recipe.

brew install dmd


Re: D in accounting program

2010-11-25 Thread Mengu
Adam D. Ruppe Wrote:

> Mengu asked:
> > are you just using cgi or are you using fastcgi?
> 
> Plain CGI. I haven't had any performance issues* despite
> not even trying so I'm keeping everything simple.
> 
> Just adding an extra constructor for FastCGI should be
> possible (I have an overloaded constructor for raw HTTP
> data already) but since I haven't needed it, I haven't
> bothered.
> 
> * The opposite actually - while plain CGI hello world
>is about 80x slower on my computer than mod_php hello
>world, the actual application has been 40% *faster*
>than comparable projects in PHP on the same computer!

thanks adam. i have another question. how did you handle file uploads and user 
sessions?


Re: D in accounting program

2010-11-24 Thread Mengu
hello adam,

are you just using cgi or are you using fastcgi?


Adam D. Ruppe Wrote:

> sybrandy wrote:
> > Is there any chance we could see the code you wrote?
> 
> The majority of this app is a closed source proprietary thing
> that I don't own the copyright on, but I was allowed to keep
> most the helper libraries.
> 
> You can find most of it in here:
> http://arsdnet.net/dcode/
> 
> cgi.d is for the cgi client applications and httpdconnection.d
> shows a server, although that code is ancient and probably
> doesn't even compile. (It requires the netman.d code - it
> specializes the netman Connection class. Somewhere I have an
> aim.d that works the same way too.)
> 
> cgi.d has two constructors: the default one follows the CGI
> standard. The other one takes some raw data that should be
> a HTTP request. It pulls everything out of it. (The benefit
> of this is using my httpd program, I can construct a CGI object
> and write client code in the same way as a traditional app.
> I figure FastCGI should be able to be implemented in an identical
> fashion but I haven't gotten around to it yet; performance
> has been excellent so far, better than the old PHP was.)
> 
> import arsd.cgi;
> import std.stdio; // required by cgi but not publically imported there
> import std.string; // ditto
> 
> void main() {
>  auto cgi = new Cgi;
>  cgi.write("Hello, world!");
>  cgi.close();
> }
> 
> 
> mysql.d wraps up just enough of the C mysql API for me to use
> it here in a fairly sane fashion. It does queries with self-
> implemented replacement and auto escaping. It returns a ranged
> array of strings by default, or can do an assocative array.
> 
> (That is, it returns a MySql.Result range, where result.front
>  is a string[] or a string[string]).
> 
> The client code is responsible for converting it to other
> types. Pretty trivial thanks to std.conv so I like it this
> way.
> 
> foreach(line; mysql.query("SELECT id, name FROM users")) {
>  int id = to!int(line[0]);
>  string name = line[1];
> }
> 
> Alternatively:
> 
> 
> foreach(line; mysql.query("SELECT id, name FROM users").byAssoc) {
>  int id = to!int(line["id"]);
>  string name = line["name"];
> }
> 
> 
> dom.d is the DOM implementation of course - nothing fancy there,
> implementation wise.
> 
> 
> 
> web.d is a new thing I've been working on. The plan for it is
> to do a stricter model/view separation and to automate a lot
> of drudge work. (Regular cgi.d provides a much simpler interface,
> the resulting code looks more like plain PHP.) You just
> list functions and a fancy template mixin makes them available
> to be called on the web interface. It works but is still too
> incomplete/buggy to use on serious applications. I'm getting
> there though.



Re: Phobos urllib

2010-08-13 Thread Mengu
Adam and Graham,

Thank you for the information. :)


Re: Phobos urllib

2010-08-13 Thread Mengu
Mengu Wrote:

> Hello everyone,
> 
> Python has a library named urllib which can be found at 
> http://docs.python.org/library/urllib2.html. 
> 
> Does Phobos have anything similar to this library? All I need is fetching 
> data from a web site.

Anyone has any idea on this matter?


Phobos urllib

2010-08-12 Thread Mengu
Hello everyone,

Python has a library named urllib which can be found at 
http://docs.python.org/library/urllib2.html. 

Does Phobos have anything similar to this library? All I need is fetching data 
from a web site.


  1   2   >