Re: Quick C bindings

2018-10-01 Thread yawniek via Digitalmars-d
On Friday, 28 September 2018 at 16:39:14 UTC, Márcio Martins wrote: Hi y'all! If you'd be so kind and help me out here with a few questions/opinions: I would like to generate decent D bindings for https://github.com/libuv/libuv with as little pain as possible. What are you guys using

Re: asdf json library moved to libmir

2018-07-13 Thread yawniek via Digitalmars-d-announce
On Wednesday, 11 July 2018 at 21:58:29 UTC, WebFreak001 wrote: cool to hear that you don't let that library die. I like asdf but I never really had a usecase for it. When using vibe.d I just parse my json using their serializer. Additionally I never have the case of my input being line

Re: asdf json library moved to libmir

2018-07-13 Thread yawniek via Digitalmars-d-announce
On Wednesday, 11 July 2018 at 22:21:32 UTC, Daniel Kozak wrote: I have tried it few days ago and it does not work for me at first. Because I always read only "Simple Example". One of my problem was that I have a struct with little different name that was attribute name used in json

dynamically compile and load glue logic

2018-03-30 Thread yawniek via Digitalmars-d-learn
in how far is it or would the following be possible: dynamically compile and execute some glue logic that is also written in D under linux? and what happens if that code uses phobos or other dub libs that are available in the host binary? especially the 2nd point is important as i would

Re: D for microservices

2018-02-25 Thread yawniek via Digitalmars-d
On Saturday, 24 February 2018 at 10:03:07 UTC, Joakim wrote: I've updated ldc master to use Yuxuan's druntime port, which means the upcoming ldc 1.8 release will likely be a viable Alpine/Musl cross-compiler out of the box, provided you give it a C/Musl cross-compiler/linker to work with, by

Re: gRPC in D good idea for GSOC 2018?

2018-01-20 Thread yawniek via Digitalmars-d
On Friday, 19 January 2018 at 18:34:31 UTC, Ali Çehreli wrote: On 01/19/2018 02:14 AM, yawniek wrote: Could you please summarize what needs to be done and in what order. I would be happy to take active part in this effort. well, my personal opinion this should be designed/decided on a green

Re: gRPC in D good idea for GSOC 2018?

2018-01-19 Thread yawniek via Digitalmars-d
On Monday, 15 January 2018 at 19:28:08 UTC, Ali Çehreli wrote: I know a project where D could benefit from gRPC in D, which is not among the supported languages: https://grpc.io/docs/ Do you think gRPC support is worth adding to GSOC 2018 ideas? https://wiki.dlang.org/GSOC_2018_Ideas

tooling/help for rewriting C projects with betterC

2017-12-27 Thread yawniek via Digitalmars-d
is there any tooling or tutorials on how one would approach a (partial) rewrite for bigger C projects that use e.g. cmake ? is there a way parts of it could be automated (if so which parts) ? this might help D a lot if people that want to learn/rewrite a library would get support and

OT: red-lang doing fundraising via DAO

2017-12-25 Thread yawniek via Digitalmars-d
interesting idea: http://www.red-lang.org/2017/12/leaping-into-future-red-goes-blockchain.html

Re: D as a Better C

2017-08-23 Thread yawniek via Digitalmars-d-announce
On Wednesday, 23 August 2017 at 13:12:04 UTC, Mike Parker wrote: To coincide with the improvements to -betterC in the upcoming DMD 2.076, Walter has published a new article on the D blog about what it is and why to use it. A fun read. And I'm personally happy to see the love this feature is

Re: Who here uses vibe-s3 from code.dlang.org?

2017-08-17 Thread yawniek via Digitalmars-d
On Monday, 14 August 2017 at 19:07:07 UTC, aberba wrote: On Sunday, 13 August 2017 at 21:38:37 UTC, yawniek wrote: On Tuesday, 8 August 2017 at 08:49:33 UTC, Andre Pany wrote: [...] the original goal of vibe-s3 was to allow streaming uploads of large files so that no memory/disk needs to be

Re: Who here uses vibe-s3 from code.dlang.org?

2017-08-13 Thread yawniek via Digitalmars-d
On Tuesday, 8 August 2017 at 08:49:33 UTC, Andre Pany wrote: On Monday, 7 August 2017 at 22:46:57 UTC, aberba wrote: vibe-s3 (https://code.dlang.org/packages/vibe-s3) is an Amazon s3 object storage API for D. Has anyone here used or tested it? What was your experiences? It has the tagline

Re: Vibe.d - very low performance

2017-07-14 Thread yawniek via Digitalmars-d
On Thursday, 6 July 2017 at 07:27:24 UTC, Marek wrote: https://www.techempower.com/benchmarks/#section=data-r14=ph=plaintext C++, Java and Go frameworks have very high performance. Vibe.d is supposed to have similar performance, but in fact vibe.d performance is very low. Why? these tests

Re: anyone using msgpackrpc-d ? it's currently broken and doesn't seem maintained

2017-06-14 Thread Yawniek via Digitalmars-d
On Monday, 12 June 2017 at 18:12:38 UTC, Timothee Cour wrote: any help on this would be most welcome: https://github.com/msgpack-rpc/msgpack-rpc-d/issues/16 Unfortunately I find the RPC support in D lacking. Having a good RPC integration for D is key for production use of D where one wants

Re: Persistent key-value-store for D?

2017-04-28 Thread yawniek via Digitalmars-d-learn
On Wednesday, 26 April 2017 at 17:06:52 UTC, krylon wrote: I looked at the DUB package registry and asked Google quite a bit now, but I did not found such a package for D. So my first question is - did I not look hard enough? I found a reimplentation of QDBM [1] (the spiritual ancestor of

Re: A betterC modular standard library?

2016-12-19 Thread yawniek via Digitalmars-d
On Monday, 19 December 2016 at 05:59:07 UTC, Ilya Yaroshenko wrote: D - ??? awesome what ? What do we have better then Scala? Performance? NO. BRandomAccessRanges makes our performance less then C/C++. Clean and clever API in standard library? NO. We are placing our Range API whenever possible

automatically adding rust/cargo libs as dependencies in dub

2016-10-04 Thread yawniek via Digitalmars-d
in how far would it be possible to integrate and statically link rust libraries within dub projects? this could give a huge boost to the library ecosystem if it would be as easy (or easier) as statically linking against other .a files.

Re: The XML and JSON library

2016-10-01 Thread yawniek via Digitalmars-d
On Friday, 30 September 2016 at 09:41:55 UTC, Chris wrote: On Thursday, 29 September 2016 at 21:32:03 UTC, cym13 wrote: It's not as if it were the only json library though, asdf for example isn't linked to any web framework https://github.com/tamediadigital/asdf I like the name `asdf`

Re: SQLite-D goes beta!

2016-09-21 Thread yawniek via Digitalmars-d-announce
On Tuesday, 20 September 2016 at 20:37:33 UTC, Stefan Koch wrote: On Tuesday, 20 September 2016 at 20:34:19 UTC, Karabuta wrote: Great work! Can't wait to see sample code :) It's in app.d also see test.d very elegant! congrats!

Re: Project Highlight: Timur Gafarov

2016-09-16 Thread yawniek via Digitalmars-d-announce
On Friday, 16 September 2016 at 14:12:49 UTC, c-v-i wrote: On Friday, 16 September 2016 at 12:53:44 UTC, Mike Parker wrote: What started out as a highlight of Timur's open source game, Atrium, turned into an introduction to several of his D projects. And it looks like I've managed to make this

Re: new XML and JSON libs and replacement of std.net.curl

2016-08-16 Thread yawniek via Digitalmars-d-learn
On Tuesday, 16 August 2016 at 10:06:05 UTC, ikod wrote: On Tuesday, 16 August 2016 at 09:16:40 UTC, yawniek wrote: There is common http message parser that used in nginx and nodejs. I think it can be ported from C to D. that is pico, see: https://github.com/nodejs/http-parser/pull/200

Re: new XML and JSON libs and replacement of std.net.curl

2016-08-16 Thread yawniek via Digitalmars-d-learn
imo things should be modularized. so there should be (fast) protocol parsers first, something like https://github.com/h2o/picohttpparser or https://github.com/seanmonstar/httparse then a very simple eventloop that has abstractions and range based interfaces for reading/writing data into

Re: JSON Serialization with runtime filtering.

2016-07-23 Thread yawniek via Digitalmars-d-learn
On Friday, 22 July 2016 at 12:36:31 UTC, Alexander Milushev wrote: I there any json serialization library which allow to make decision about ignoring fields in runtime? I trying to write rest client but server accept either 'cmd' or 'args' field for example and I need to find solution. can

Zurich D Meetup

2016-07-11 Thread yawniek via Digitalmars-d-announce
sorry for the short notice, but i'm glad to host Ilya with a talk on scientific computing with D. more infos here: http://www.meetup.com/de-DE/Zurich-D-Programming-Language-Meetup/events/232534480/?eventId=232534480

Re: Singleton Pattern

2016-07-10 Thread yawniek via Digitalmars-d-learn
On Thursday, 5 January 2012 at 22:15:32 UTC, asm wrote: how can i implementing the singleton pattern in D? https://p0nce.github.io/d-idioms/#Leveraging-TLS-for-a-fast-thread-safe-singleton

Re: How to get current time as long or ulong?

2016-07-06 Thread yawniek via Digitalmars-d-learn
On Tuesday, 5 July 2016 at 18:16:31 UTC, Charles Hixson wrote: What I'm looking for is the opposite of the "FromUnixTime" function. i often use long toNsUnixTime(SysTime t) { return (t.stdTime - 621_355_968_000_000_000L)*100; } as a helper. any chance that something like this can be put

Re: AWS SDK

2016-06-27 Thread yawniek via Digitalmars-d
On Sunday, 26 June 2016 at 23:06:02 UTC, Jadbox wrote: Is there an AWS library in the works for D? It's seriously the main blocker for me to push adoption of the language internally. If not, I can try to invest time into making one, but I could use help. (fyi, there's one in the works for

Re: problem using ldc 1.0.0 as D compiler

2016-06-21 Thread yawniek via Digitalmars-d
On Tuesday, 21 June 2016 at 16:26:14 UTC, Satoshi wrote: On Monday, 20 June 2016 at 11:28:58 UTC, Antonio Corbi wrote: Hi folks! I'm using ldc version: LDC - the LLVM D compiler (1.0.0): based on DMD v2.070.2 and LLVM 3.8.0 built with DMD64 D Compiler v2.071.0 Default target:

Re: Areas of D usage

2016-06-17 Thread yawniek via Digitalmars-d
On Thursday, 2 June 2016 at 13:59:13 UTC, Seb wrote: [1] Overview: http://dlang.org/overview.html [2] Preview: http://dtest.thecybershadow.net/artifact/website-915b9bd5028d67e186487141083523937b417cd7-32649b6cb8d58891a4c66946a8f75141/web/areas-of-d-usage.html [3] PR:

Re: Linux and htod

2016-06-16 Thread yawniek via Digitalmars-d-learn
On Thursday, 16 June 2016 at 19:04:38 UTC, bachmeier wrote: On Thursday, 16 June 2016 at 12:23:09 UTC, fbmac wrote: How people use it on Linux, if htod is required to import C libraries and windows only?f Just to clarify, so as to prevent confusion by someone that randomly stumbles across

Re: I'd love to see DScript one day ...

2016-06-14 Thread yawniek via Digitalmars-d
On Tuesday, 14 June 2016 at 01:36:48 UTC, Yuxuan Shui wrote: On Tuesday, 14 June 2016 at 00:55:52 UTC, Walter Bright wrote: On 6/13/2016 5:13 PM, H. S. Teoh via Digitalmars-d wrote: My *real* dream is for D (or some suitable subset thereof) to replace Javascript in browsers. But that's a very

Re: interfacing with C: strings and byte vectors

2016-06-11 Thread yawniek via Digitalmars-d-learn
On Saturday, 11 June 2016 at 10:26:17 UTC, Mike Parker wrote: On Saturday, 11 June 2016 at 09:32:54 UTC, yawniek wrote: thanks mike for the in depth answer. i forgot to add a few important points: - the strings in vec_t are not c strings - vec_t might contain other data than strings the

Re: I'd love to see DScript one day ...

2016-06-11 Thread yawniek via Digitalmars-d
On Friday, 10 June 2016 at 22:01:53 UTC, Walter Bright wrote: On 6/10/2016 3:55 AM, Chris wrote: > Cool. I'd love to see `DScript` one day - and replace JS once and for all ... > well ... just day dreaming ... Dreams are reality: https://github.com/DigitalMars/DMDScript unfortunately this is

interfacing with C: strings and byte vectors

2016-06-11 Thread yawniek via Digitalmars-d-learn
my C library works a lot with strings defined in C as: struct vec_t { char *base; size_t len; } is there a easy way to feed regular D strings to functions that accept vec_t* without creating a vec_t every time or do i write wrappers for these functions and if so, what is the most

Re: [OT] Do you see a problem in this serialization format ?

2016-06-07 Thread yawniek via Digitalmars-d
On Tuesday, 7 June 2016 at 11:22:55 UTC, Basile B. wrote: On Tuesday, 7 June 2016 at 10:24:56 UTC, WebFreak001 wrote: On Tuesday, 7 June 2016 at 02:11:55 UTC, Basile B. wrote: I had to make a custom format because SDL would have the same problem as JSON. I need to store the type, so key =

Re: Benchmark Dlang vs Node vs Ruby

2016-05-28 Thread yawniek via Digitalmars-d-learn
On Friday, 27 May 2016 at 16:47:19 UTC, Daniel Kozak wrote: Why not to use distribute oprion? Dne 27. 5. 2016 17:35 napsal uživatel "yawniek via Digitalmars-d-learn" < digitalmars-d-learn@puremagic.com>: it its a flawed strategy. what you should do is let the kernel handl

Re: Benchmark Dlang vs Node vs Ruby

2016-05-27 Thread yawniek via Digitalmars-d-learn
On Friday, 27 May 2016 at 13:45:23 UTC, llaine wrote: Hi guys, In my journey of learning about D I tried to benchmark D with Vibe.d vs node with express and Ruby with Sinatra. And the results are pretty surprising. I have to admit that I though D was more faster than that. How is this even

Re: Async or event library

2016-05-12 Thread yawniek via Digitalmars-d-learn
On Tuesday, 10 May 2016 at 13:34:36 UTC, chmike wrote: vibed uses libevent, a C library. The discussion is regarding a possible pure D equivalent of libevent. libasync is an interesting proposal but it is apparently slower than libevent. I don't know the current status because vibed improved

Re: The end of curl (in phobos)

2016-05-07 Thread yawniek via Digitalmars-d
On Saturday, 7 May 2016 at 09:46:36 UTC, ikod wrote: What do you mean under re-licensing? you added GPL to requests, this is incompatible with phobos and your code can not be included. could it be changed to boost licence?

Re: The end of curl (in phobos)

2016-05-06 Thread yawniek via Digitalmars-d
On Friday, 6 May 2016 at 09:21:43 UTC, Andrei Alexandrescu wrote: On 5/6/16 10:32 AM, Robert burner Schadek wrote: As discussed yesterday at DConf, curl in phobos must go. The plan is as follows. 1. undocument everything curl related in may 2016 2. deprecate everything curl related in may

vibe-s3: vibe compatible s3 client

2016-05-02 Thread yawniek via Digitalmars-d-announce
vibe compatible s3 client that supports chunked uploads. pretty rough around the edges, but basic things work. supports chunked uploads and thus needs at least vibe 0.7.28. https://github.com/tamediadigital/vibe-s3 http://code.dlang.org/packages/vibe-s3 cheers yannick

lldb on os x: can't display stack variable

2016-05-01 Thread yawniek via Digitalmars-d-debugger
is there a way to make lldb work on os x? if i set breakpoints lldb stops but i can't display anything with `stack variables`.

Re: vibe.d is blocking threads

2016-04-27 Thread yawniek via Digitalmars-d-learn
On Wednesday, 27 April 2016 at 13:00:29 UTC, RuZzz wrote: Code: import std.concurrency; import core.thread; //import vibe.http.client; // If uncommented this line, the thread "worker" does not start void worker() { foreach (i; 0 .. 5) {

Re: Proposed: start DConf days one hour later

2016-04-27 Thread yawniek via Digitalmars-d-announce
On Wednesday, 27 April 2016 at 18:36:54 UTC, Andrei Alexandrescu wrote: The folks at Sociomantic suggested to start at 10:00 AM instead of 9:00 AM, therefore shifting the end time by one as well. Please reply with thoughts on this! We're particularly concerned about folks who need to take off

Re: vibe.d kafka driver & probabilistic linear counting

2016-04-12 Thread Yawniek via Digitalmars-d-announce
On Monday, 11 April 2016 at 09:08:34 UTC, André wrote: On Sunday, 10 April 2016 at 10:51:38 UTC, yawniek wrote: we pushed 2 new projects: a native kafka driver to work with the vibe.d eventloop http://code.dlang.org/packages/kafka-d it's not full featured yet (no zookeeper) but the basic use

Re: how to parse a string into a phobos datatype with additional logic

2016-04-07 Thread yawniek via Digitalmars-d-learn
On Thursday, 7 April 2016 at 18:29:19 UTC, Jonathan M Davis wrote: On Thursday, April 07, 2016 07:45:06 yawniek via Digitalmars-d-learn wrote: So, while I understand your frustration, I just don't see any other sane way to approach this problem than what you've done. Putting it all

Re: VibeCustomMain not working

2016-04-07 Thread yawniek via Digitalmars-d-learn
On Thursday, 7 April 2016 at 13:40:17 UTC, Rene Zwanenburg wrote: On Thursday, 7 April 2016 at 13:25:29 UTC, Jerry wrote: I generated a visuald project and tried that. Now suddenly it is working as expected. So I guess it's a bug in dub. That's possible of course, but I'd expect something so

Re: how to parse a string into a phobos datatype with additional logic

2016-04-07 Thread yawniek via Digitalmars-d-learn
On Thursday, 7 April 2016 at 08:03:34 UTC, Edwin van Leeuwen wrote: You can try this library: https://code.dlang.org/packages/dateparser nope this will not work and the question is broader: i want to have a standard datatype parsed in a specific way and so that i can use other std library

how to parse a string into a phobos datatype with additional logic

2016-04-07 Thread yawniek via Digitalmars-d-learn
what is the way one is supposed to parse e.g. a double of unixtime (as delived by nginx logs) into a SysTime? currently i'm creating a wrapper struct around SysTime with alias this as: https://gist.github.com/yannick/6caf5a5184beea0c24f35d9d4a4c7783 really ugly imho. is there a better way

Re: BitArray: count the number of bits set

2016-03-01 Thread yawniek via Digitalmars-d-learn
On Tuesday, 1 March 2016 at 09:32:20 UTC, Andrea Fontana wrote: Maybe you should look for "hamming weight" :) maybe. and here is a snowman for you: ☃ the question was if it exists for BitArray in phobos. https://issues.dlang.org/show_bug.cgi?id=10239 so apparently its really missing in

BitArray: count the number of bits set

2016-03-01 Thread yawniek via Digitalmars-d-learn
i figured i can count the number of bits set for a BitArray with std.algorithm : count: BitArray([0,0,1]).bitsSet.count() but this seems not very optimal, is there a faster way directly accessible trough phobos? ideally something that is optimized by the compiler.

[OT] Why C++ sucks (2016.02 edition)

2016-02-21 Thread yawniek via Digitalmars-d
via HN: http://dorinlazar.ro/why-c-sucks-2016-02-edition/

Re: Alternate databases

2016-02-20 Thread yawniek via Digitalmars-d-learn
On Saturday, 20 February 2016 at 13:09:53 UTC, Andrew Edwards wrote: I'm searching for client drivers for the following databases. Are the any available? https://rethinkdb.com/docs/install-drivers/ http://docs.basho.com/riak/latest/dev/references/client-implementation/ Thanks, Andrew none

Re: Another new io library

2016-02-17 Thread yawniek via Digitalmars-d
On Wednesday, 17 February 2016 at 07:15:01 UTC, Steven Schveighoffer wrote: On 2/17/16 1:58 AM, Rikki Cattermole wrote: What would be the benefit of having it an input range by default? -Steve https://en.wikipedia.org/wiki/Principle_of_least_astonishment something the D community is lacking

Re: TIOBE February 2016.... 15 ?!

2016-02-03 Thread yawniek via Digitalmars-d
On Wednesday, 3 February 2016 at 18:36:35 UTC, Andrei Alexandrescu wrote: On 02/03/2016 02:06 AM, cym13 wrote: It's all true, D rose up 6 positions: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html I don't quite know what the leading factor for that change was but it sure

Re: Getting the body of a HTTP Request

2016-01-28 Thread yawniek via Digitalmars-d-learn
On Wednesday, 27 January 2016 at 23:42:54 UTC, brian wrote: Anyone able to shed some light on what the structure of the response is, and how I can read/output it all? Regards Brian its unlikely that vibe client misses something. for debugging i would try to go trough all requests with curl

Re: [dlang.org] new forum design

2016-01-19 Thread yawniek via Digitalmars-d
i really like the new design, congratulations! the only thing missing is proper code formatting with highlighting

Re: Are there any D scripting engines for use with D?

2016-01-04 Thread yawniek via Digitalmars-d-learn
On Monday, 4 January 2016 at 19:04:48 UTC, Max Klyga wrote: On 2016-01-04 18:40:03 +, Jason Jeffory said: The fastest one would probably be Lua - http://code.dlang.org/search?q=lua But there are other options: Python - http://code.dlang.org/packages/pyd Javascript -

Re: vibe.d benchmarks

2015-12-31 Thread yawniek via Digitalmars-d
On Thursday, 31 December 2015 at 08:23:26 UTC, Laeeth Isharc wrote: Isn't there a decent chance the bottleneck is vibe.d's JSON implementation rather than the framework as such ? We know from Atila's MQTT project that vibe.D can be significantly faster than Go, and we also know that its JSON

Re: DUB problems

2015-12-31 Thread yawniek via Digitalmars-d-learn
On Thursday, 31 December 2015 at 08:51:42 UTC, Daniel Kozak wrote: I try to build vibe-d Hello world app with dub, but I have many problems with dub, nothing works at all Error: Output file 'client.o' for module 'vibe.http.client' collides with previous module 'vibe.db.mongo.client'. See the

Re: vibe.d benchmarks

2015-12-31 Thread yawniek via Digitalmars-d
On Thursday, 31 December 2015 at 12:09:30 UTC, Etienne Cimon wrote: On Thursday, 31 December 2015 at 08:51:31 UTC, yawniek wrote: the libasync problem seem seems to be because of TCP_NODELAY not being deactivated for local connection. That would be the other way around. TCP_NODELAY is not

Re: vibe.d benchmarks

2015-12-31 Thread yawniek via Digitalmars-d
On Thursday, 31 December 2015 at 15:35:45 UTC, Ola Fosheim Grøstad wrote: I don't know how the benchmarks are set up, but I would assume that they don't use a local socket. I wonder if they run the database on the same machine, maybe they do, but that's not realistic, so they really should

Re: vibe.d benchmarks

2015-12-30 Thread yawniek via Digitalmars-d
On Wednesday, 30 December 2015 at 20:38:58 UTC, Daniel Kozak wrote: V Wed, 30 Dec 2015 20:32:08 + yawniek via Digitalmars-d <digitalmars-d@puremagic.com> napsáno: Which async library you use for vibed? libevent? libev? or libasync? Which compilation switches you used? Without thi

Re: vibe.d benchmarks

2015-12-30 Thread yawniek via Digitalmars-d
Sönke is already on it. http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/post/29110 i guess its not enough, there are still things that make vibe.d slow. i quickly tried https://github.com/nanoant/WebFrameworkBenchmark.git which is really a very simple benchmark but it shows

Re: D could catch this wave: web assembly

2015-12-17 Thread yawniek via Digitalmars-d
https://hacks.mozilla.org/2015/12/compiling-to-webassembly-its-happening/

grpc

2015-11-30 Thread yawniek via Digitalmars-d
would anyone be interested in doing the work for adding D / vibe.d to https://github.com/grpc/grpc ? we currently lack the manpower but would be able to sponsor it (or parts, depending on the effort needed). grpc is probably going to be the dominant rpc system for building a microsrvices

failing regex

2015-11-23 Thread yawniek via Digitalmars-d-learn
regex from https://github.com/ua-parser/uap-core/blob/master/regexes.yaml#L38 seems to work in other languages, not so in D: auto r2 = r"(?:\/[A-Za-z0-9\.]+)? *([A-Za-z0-9 _\!\[\]:]*(?:[Aa]rchiver|[Ii]ndexer|[Ss]craper|[Bb]ot|[Ss]pider|[Cc]rawl[a-z]*)) (\d+)(?:\.(\d+)(?:\.(\d+))?)?".regex();

Re: regex format string problem

2015-11-23 Thread yawniek via Digitalmars-d-learn
Hi Rikki, On Monday, 23 November 2015 at 03:57:06 UTC, Rikki Cattermole wrote: I take it that browscap[0] does it not do what you want? I have an generator at [1]. Feel free to steal. This looks interesting, thanks for the hint. However it might be a bit limited, i have 15M+ different User

regex format string problem

2015-11-22 Thread yawniek via Digitalmars-d-learn
hi! how can i format a string with captures from a regular expression? basically make this pass: https://gist.github.com/f17647fb2f8ff2261d42 context: i'm trying to write a implementation for https://github.com/ua-parser where the regular expression as well as the format strings are

Building the Docs with checked out code downoads old dmd

2015-11-21 Thread yawniek via Digitalmars-d-learn
i'm trying to build the docs as per http://wiki.dlang.org/Building_DMD#Building_the_Docs i have a working setup to build the latest dmd/druntime/phobos but somehow the makefile tries to download an old dmd version and my bandwith currently is a bit restricted and i want an offline version.

Re: Release vibe.d 0.7.26

2015-11-04 Thread yawniek via Digitalmars-d-announce
On Wednesday, 4 November 2015 at 07:41:34 UTC, Sönke Ludwig wrote: http://vibed.org/blog/posts/vibe-release-0.7.26 congrats and thanks! its exciting to see vibe moving so fast

Re: Please vote for the DConf logo

2015-11-04 Thread yawniek via Digitalmars-d-announce
On Wednesday, 4 November 2015 at 09:30:30 UTC, Andrei Alexandrescu wrote: Reply to this with 1.1, 1.2, 2, or 3: 1) by ponce: Variant 1: https://github.com/p0nce/dconf.org/blob/master/2016/images/logo-sample.png Variant 2:

why to (not) support "older" compiler versions

2015-11-03 Thread yawniek via Digitalmars-d
i have seen many PR's and also Forum entries that deal with the problem of newer features of the compiler not being able and then patching or working around that to support older compiler versions. since it is really easy to keep up with compiler versions and even switch (and not many

Re: why to (not) support "older" compiler versions

2015-11-03 Thread yawniek via Digitalmars-d
On Tuesday, 3 November 2015 at 08:22:37 UTC, Johannes Pfau wrote: I guess it's to be compatible with the latest DMD, LDC and GDC. GDC currently only provides the 2.066.1 frontend. this makes sense. unfortunately often it happens that i pull in one or the other library that just happens not

Re: LuaD: creating a flexible data filter system

2015-10-17 Thread yawniek via Digitalmars-d-learn
many thanks for the valuable insights. so far i made a simple prototype with LuaD and classes, works nicely for when my niput what so far is not 100% clear is if there is a way to have a parsed msgpack or json documents being exposed in my lua code in a way so it behaves like a lua object.

LuaD: creating a flexible data filter system

2015-10-16 Thread yawniek via Digitalmars-d-learn
hi, i'm reading in a stream of data that is deserialized into individual frames. a frame is either of: a) a specific D datastructure ( struct with a few ulong,string,string[string] etc members), known at compile time b) json (preferably stdx.data.json) i now want to implement something

Re: AWS API Dlang, hmac sha256 function.

2015-10-03 Thread yawniek via Digitalmars-d-learn
On Saturday, 3 October 2015 at 03:11:06 UTC, holo wrote: Hello I'm trying to contact AWS API with D according to documentation: [...] check https://github.com/yannick/vibe-aws it has v4 implemented

Re: "if sting in string"

2015-09-18 Thread yawniek via Digitalmars-d-learn
On Friday, 18 September 2015 at 09:42:05 UTC, smadus wrote: Ok i have rewrite :) Now: http://dpaste.dzfl.pl/cf8bb54b1390 The Problem is: http://www.directupload.net/file/d/4114/9zryku49_png.htm but i dont understand this, because, the exception should be "Something wrong" ?!? But, thanks

how does vibe's PrivateAccessProxy work

2015-08-30 Thread yawniek via Digitalmars-d-learn
can someone explain a bit how the @before hooks works in detail, i mainly have problems understanding why ensureAuth in belows example refers to SampleService. as an instance:

Re: most elegant functional way to make a histogram

2015-08-24 Thread yawniek via Digitalmars-d-learn
On Friday, 21 August 2015 at 21:08:25 UTC, Laeeth Isharc wrote: I guess this kind of thing will do: upRangeHighs.each!((ref a)=(++histogram[a][0])); int[] arr = [5,1,2,2,3,4,5,5,5]; int[int] histo; arr.each!( a = ++histo[a] ); writeln(histo); this works

Re: Presentation Intro to D: What works?

2015-08-20 Thread yawniek via Digitalmars-d
On Wednesday, 19 August 2015 at 20:15:48 UTC, qznc wrote: On Thursday, 25 June 2015 at 12:39:11 UTC, qznc wrote: If you are interested in my slides: http://beza1e1.tuxen.de/stuff/FunctionalD.odp http://beza1e1.tuxen.de/stuff/FunctionalD.pdf I spent some time on D history and philosophy. Mostly

Re: Programming in D paper book is available for purchase

2015-08-19 Thread yawniek via Digitalmars-d-announce
On Wednesday, 19 August 2015 at 07:57:17 UTC, Daniel Kozák wrote: V Tue, 18 Aug 2015 17:57:31 -0700 Ali Çehreli via Digitalmars-d-announce digitalmars-d-announce@puremagic.com napsáno: Ali Sometimes I hate I am from Czech Republic. I must wait whole week until this awesome book will be

Re: std.net.curl

2015-08-17 Thread yawniek via Digitalmars-d-learn
On Monday, 17 August 2015 at 13:04:31 UTC, tired_eyes wrote: On Monday, 17 August 2015 at 12:58:54 UTC, Adam D. Ruppe wrote: On Monday, 17 August 2015 at 12:52:37 UTC, tired_eyes wrote: Hovewer, dmd app.d spits a whole bunch of strange error messages: try dmd -lcurl app.d and see if that

dub and subpackages

2015-08-14 Thread yawniek via Digitalmars-d-learn
i'm trying to have my own versions of my dependencies as git submodules. problem: i include a local version of vibe.d and then i add other local versions of packages that themselves include vibe.d somehow my version of vibe isn't picked up by the other dependencies and it results in an

Re: dub and subpackages

2015-08-14 Thread yawniek via Digitalmars-d-learn
On Friday, 14 August 2015 at 08:09:18 UTC, Edwin van Leeuwen wrote: On Friday, 14 August 2015 at 08:06:15 UTC, yawniek wrote: dub add-local allows you to add local copy of a package. This will be system wide though, not only for the current package. i actually tried this, somehow did't work

format of trace.log

2015-08-10 Thread yawniek via Digitalmars-d-learn
is there a reason the trace log is a bit weirdly formatted? a) different tables within one file b) column separation is something like (fill with space until it exceeds 7 digits could this be improved to use a standard format (e.g. tsv) or are there some legacy reasons? also it would be

zlib performance

2015-08-07 Thread yawniek via Digitalmars-d-learn
hi, unpacking files is kinda slow, probably i'm doing something wrong. below code is about half the speed of gnu zcat on my os x machine. why? why do i need to .dup the buffer? can i get rid of the casts? the chunk size has only a marginal influence. https://github.com/yannick/zcatd import

Re: zlib performance

2015-08-07 Thread yawniek via Digitalmars-d-learn
On Friday, 7 August 2015 at 08:50:11 UTC, Daniel Kozák wrote: ldc[2] -O -release -boundscheck=off -singleobj app.d ldc 0.15.2 beta2 2.86s user 0.55s system 77% cpu 4.392 total v2.068-devel-8f81ffc 2.86s user 0.67s system 78% cpu 4.476 total v2.067 2.88s user 0.67s system 78% cpu 4.529

Re: zlib performance

2015-08-07 Thread yawniek via Digitalmars-d-learn
On Friday, 7 August 2015 at 07:29:15 UTC, Daniel Kozák wrote: Which compiler and version. There has been some performance problem with IO on OSX, it should be fixed in 2.068 release i'm on master. v2.068-devel-8f81ffc also changed file read mode to rb. i don't understand why the program

Re: zlib performance

2015-08-07 Thread yawniek via Digitalmars-d-learn
On Friday, 7 August 2015 at 07:43:25 UTC, Daniel Kozák wrote: i don't understand why the program crashes when i do not do the .dup This is weird. I would say it should not crash exactely. but try it yourself. the fastest version i could come up so far is below. std.conv slows it down. going

Re: zlib performance

2015-08-07 Thread yawniek via Digitalmars-d-learn
On Friday, 7 August 2015 at 07:48:25 UTC, yawniek wrote: On Friday, 7 August 2015 at 07:43:25 UTC, Daniel Kozák wrote: the fastest version i could come up so far is below. std.conv slows it down. going from a 4kb to a 4mb buffer helped. now i'm within 30% of gzcat's performance. ok maybe not,

Re: zlib performance

2015-08-07 Thread yawniek via Digitalmars-d-learn
On Friday, 7 August 2015 at 08:05:01 UTC, Daniel Kozák wrote: import std.zlib, std.file, std.stdio, std.conv; void main(string[] args) { auto f = File(args[1], rb); auto uncompressor = new UnCompress(HeaderFormat.gzip); foreach (buffer; f.byChunk(4096)) { auto

Re: zlib performance

2015-08-07 Thread yawniek via Digitalmars-d-learn
On Friday, 7 August 2015 at 08:24:11 UTC, Daniel Kozák wrote: can you try it with ldc? ldc[2] -O -release -boundscheck=off -singleobj app.d ldc 0.15.2 beta2 2.86s user 0.55s system 77% cpu 4.392 total v2.068-devel-8f81ffc 2.86s user 0.67s system 78% cpu 4.476 total v2.067 2.88s user

Re: zlib performance

2015-08-07 Thread yawniek via Digitalmars-d-learn
On Friday, 7 August 2015 at 11:45:00 UTC, Daniel Kozak wrote: On Friday, 7 August 2015 at 09:12:32 UTC, yawniek wrote: [...] Can you try it without write operation (comment out all write)? And than try it without uncompression? // without compression: void main(string[] args) { auto f

Re: DUB RC 0.9.24-rc.1 ready for testing

2015-08-06 Thread yawniek via Digitalmars-d
On Tuesday, 21 July 2015 at 13:17:36 UTC, Andrei Alexandrescu wrote: At the first D meetup in the Silicon Valley, Vic (an accomplished entrepreneur who has been following up D'd path) discussed some ideas for improving D's adoption. He mentioned some other languages have improved adoption by

Re: D for project in computational chemistry

2015-08-03 Thread yawniek via Digitalmars-d
On Sunday, 2 August 2015 at 16:25:18 UTC, Yura wrote: While it is easy to code in Python there are two things I do not like: 1) Python is slow for nested loops (much slower comparing to C) 2) Python is not compiled. However, I want to work with a code which can be compiled and distributed as

Re: D Web Services Application Potential?

2015-07-29 Thread yawniek via Digitalmars-d
On Wednesday, 29 July 2015 at 14:17:34 UTC, Sebastiaan Koppe wrote: On Wednesday, 29 July 2015 at 07:30:50 UTC, yawniek wrote: In times of reactive frameworks it makes no sense anymore to render html in the backend. Nowadays with the many client-side dom manipulations it is tempting to just

Re: extern(C) with function returning user type

2015-07-29 Thread yawniek via Digitalmars-d-learn
On Wednesday, 29 July 2015 at 17:59:26 UTC, Kyoji Klyden wrote: How would I use a C function that's returning a struct? auto doesn't work here, and from what I can tell D can't import C headers. (If it really can't then, that would be a very welcome feature) I do have the required libs but I

Re: D Web Services Application Potential?

2015-07-29 Thread yawniek via Digitalmars-d
On Monday, 27 July 2015 at 06:10:29 UTC, Sebastiaan Koppe wrote: For instance, for rendering pages I would rather front the D backend with some (stateless) node app that fetches the data from the D backend and uses something like React to render server/client side. If the D backend could

Re: D Web Services Application Potential?

2015-07-29 Thread yawniek via Digitalmars-d
On Wednesday, 29 July 2015 at 09:22:44 UTC, Ola Fosheim Grøstad wrote: On Wednesday, 29 July 2015 at 07:30:50 UTC, yawniek wrote: in my opinion also the REST style apis will come to an end as we can easily have stateless apis these days ( 86.62%of browsers have websockets already according to

  1   2   >