Re: Which language futures make D overcompicated?

2018-02-09 Thread tetyys via Digitalmars-d

On Friday, 9 February 2018 at 13:10:16 UTC, rumbu wrote:


And not a language feature but I hate dub. Just saying.


Why do people hate dub? I think it's a great package manager and 
build tool


Re: Debugging bad requests with vibe

2018-02-09 Thread tetyys via Digitalmars-d-learn

On Friday, 9 February 2018 at 11:46:31 UTC, Nicholas Wilson wrote:

On Friday, 9 February 2018 at 08:06:53 UTC, Seb wrote:
On Thursday, 8 February 2018 at 17:09:44 UTC, Nicholas Wilson 
wrote:
Is there a way I can see/log what requests are being made? I 
can change both the client and server.


-v and -vv


All that gives me is a bunch of
[FAC3BFF6:FAC451F6 dia] Actively closing TCP connection

is there a way to get the JSON being sent?


Try Fiddler, great tool too


Re: How to convert hex string to string or ubytes? Thanks.

2018-02-05 Thread tetyys via Digitalmars-d-learn

On Monday, 5 February 2018 at 08:41:43 UTC, FrankLike wrote:

On Monday, 5 February 2018 at 06:12:22 UTC, H. S. Teoh wrote:

On Mon, Feb 05, 2018 at 05:48:00AM +, FrankLike via



auto input = "48656c6c6f20776f726c6421";
auto str = input.chunks(2)
	.map!(digits => cast(char) 
digits.to!ubyte(16))

.array;


But,if the input come from here:

import std.digest.md;
auto hash =md5Of("Some Words");
auto input = cast(string)hexString(hash);

 auto str = input.chunks(2)
 .map!(digits => cast(char) digits.to!ubyte(16))
 .array;

Then get an error:
core.exception.UnicodeException@src\rt\util\utf.d(292):invalid 
UTF-8 sequence

--
0x0041B8E6
0x00419530
0x0040796F

Thanks.


Casting unknown bytes to string or char is unsafe, and obviously 
some bytes can be invalid UTF8 sequences.


Re: Release candidate vibe.d 0.8.2-rc.2

2017-12-05 Thread tetyys via Digitalmars-d-announce

very nice to see development going strong


Re: Building is slow!

2017-12-02 Thread tetyys via Digitalmars-d
Something must be definitely wrong if compilation takes half an 
hour, unless you're trying to compile it on a toaster. An 
infinite loop?


Re: jai-like CTFE string formating

2017-08-12 Thread tetyys via Digitalmars-d

On Saturday, 12 August 2017 at 11:47:10 UTC, Stefan Koch wrote:

[...]


very nice



Re: New Garbage Collector?

2017-07-22 Thread tetyys via Digitalmars-d

On Saturday, 22 July 2017 at 10:17:49 UTC, Temtaime wrote:

The new precise GC will be never added to druntime.
It is dead, man.


Why?


Re: WebConfig - a vibe.d HTML form generator & validator from D structs

2017-07-21 Thread tetyys via Digitalmars-d-announce

On Thursday, 20 July 2017 at 15:57:55 UTC, WebFreak001 wrote:
I just released a vibe.d library that allows you to turn any D 
struct into an editable HTML5 compatible form with live JS 
updates but also normal no-JS updates with nearly the same 
experience.


that's very nice, thanks


Re: Need help to get OpenSSL 64 work on Windows x64 | I hate D's GC!

2017-07-15 Thread tetyys via Digitalmars-d-learn

On Friday, 14 July 2017 at 17:24:05 UTC, Suliman wrote:

GC on 32-bit machine show a lot of bugs.


such as..?


Re: Released vibe-core 1.0.0 and vibe.d 0.8.0

2017-07-15 Thread tetyys via Digitalmars-d-announce

very nice!

one question about the https://github.com/rejectedsoftware/vibe.d/commit/e4a600f911218c49f9984734b8ba36f193e99c17


wouldn't this 
https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#Image_XSS_using_the_JavaScript_directive pass normally?


Re: Vibe.d - very low performance

2017-07-08 Thread tetyys via Digitalmars-d
these tests are pretty flawed considering that top places are 
taken by event loop libraries that have no other features other 
than 'respond to request'


Re: Release candidates vibe.d 0.8.0-rc.3 and vibe-core 1.0.0-rc.3

2017-07-01 Thread tetyys via Digitalmars-d-announce
Are you planning/Did you consider to support wildcards in @path 
attribure when using registerWebInterface?


Re: mysql-native + vibe.d example

2017-06-30 Thread tetyys via Digitalmars-d-learn

On Friday, 30 June 2017 at 00:52:28 UTC, crimaniak wrote:

Hi!
Moving my project from mysql-lited to mysql-native I faced the 
problem with null pointer error inside of mysql-native:




seems like it's already fixed 
https://github.com/mysql-d/mysql-native/commit/477636ad92a15d504308d1893f987685cd71


Re: Documentation licence

2017-06-30 Thread tetyys via Digitalmars-d

On Friday, 30 June 2017 at 10:10:14 UTC, ANtlord wrote:
Hello! I use service devdocs.io for some technologies. And I 
think that I able to add D to this service. I've read the 
project's wiki 
(https://github.com/Thibaut/devdocs/blob/master/CONTRIBUTING.md) and see the next:


Important: the documentation's license must permit alteration, 
redistribution and commercial use, and the documented software 
must be released under an open source license.


Due to this I get the question. Do the licence of D's 
documentaion and the licence of D allow to add the D's library 
documentation to devdocs.io?


Thanks. Sorry if my english is not clear.


Well as phobos source code comments is the documentation for 
standard library and it's licensed under Boost license 
(https://github.com/dlang/phobos/blob/master/LICENSE_1_0.txt), I 
think yes.


Re: D error messages for function call mismatches

2017-06-27 Thread tetyys via Digitalmars-d

On Tuesday, 27 June 2017 at 14:29:05 UTC, FoxyBrown wrote:
arsd\stb_truetype.d(1246): Error: function 
core.stdc.stdlib.qsort (scope void* base, uint nmemb, uint 
size, extern (C) int function(scope const(void*), scope 
const(void*)) @system compar) is not callable using argument 
types (void*, int, uint, extern (C) int function(const(void*) 
p, const(void*) q))


Find the bug!



well for starters you're passing an int to nmemb paramater


Re: Using array slices with C-style fread() from file

2017-06-21 Thread tetyys via Digitalmars-d-learn

On Wednesday, 21 June 2017 at 18:58:58 UTC, tetyys wrote:

On Wednesday, 21 June 2017 at 18:49:01 UTC, uncorroded wrote:
Is there a way of making this work with D slices? Can they be 
used as C-style pointers?


What about this



Or simpler,

while (left)
left -= fread(buf[n-left .. $].ptr, ubyte.sizeof, left, fp);


Re: Using array slices with C-style fread() from file

2017-06-21 Thread tetyys via Digitalmars-d-learn

On Wednesday, 21 June 2017 at 18:49:01 UTC, uncorroded wrote:
Is there a way of making this work with D slices? Can they be 
used as C-style pointers?


What about this:

@nogc ubyte[n] rand_bytes(uint n)() {
import core.stdc.stdio;
FILE *fp;
fp = fopen("/dev/urandom", "r");
ubyte[n] buf;
uint bread = 0;
while (bread < n) {
auto toread = n - bread;
auto read = fread(buf[bread .. $].ptr, ubyte.sizeof, 
toread, fp);

bread += read;
}
fclose(fp);
return buf;
}

?


Re: Visual D 0.44 released - VC project integration and Concord debugger extension

2017-04-07 Thread tetyys via Digitalmars-d-announce

On Friday, 7 April 2017 at 07:59:46 UTC, Rainer Schuetze wrote:



On 12.03.2017 13:09, Rainer Schuetze wrote:

preliminary support for VS 2017 (no VC project integration yet)


VC project integration is now also available in VS 2017. Check 
out


https://github.com/dlang/visuald/releases/download/v0.44.2/VisualD-v0.44.2.exe

which also includes some bug fixes.


awesome, nice to have fast support for new visual studio version