Re: BetterC and CTFE mismatch

2018-09-26 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 26 September 2018 at 12:51:57 UTC, Steven Schveighoffer wrote: I'd suggest a bug report if one hasn't been made. -Steve I found https://issues.dlang.org/show_bug.cgi?id=19268 and I have appended my case there.

Re: BetterC and CTFE mismatch

2018-09-26 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 26 September 2018 at 08:22:26 UTC, Simen Kjærås wrote: This is essentially an arbitrary restriction. The basic reason is if a function is compiled (even just for CTFE), it ends up in the object files, and you've asked for only betterC functions to end up in the object files. --

BetterC and CTFE mismatch

2018-09-26 Thread Sebastiaan Koppe via Digitalmars-d
Right now I am building a betterC application and I would have expected to be able to use the D standard library in CTFE. It seems this is not the case. Can anyone explain why? It seems to be an arbitrary limitation. example: https://run.dlang.io/gist/8ee9456bfae061eba81c931999183e49?args=-b

Re: Special Code String for mixins

2018-03-14 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 14 March 2018 at 15:50:13 UTC, Jonathan Marler wrote: I've got a PR for dmd (https://github.com/dlang/dmd/pull/7988) that implements "interpolated strings" which makes generating code with strings MUCH nicer, i.e. Really nice. :thumbs-up:

Re: Embedded Linux really needs Dlang for the IOT market

2018-03-09 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 9 March 2018 at 07:56:12 UTC, Jacob Carlborg wrote: LDC can cross-compile to various platforms, you just need a cross-linker and the system libraries. There's a Docker image that provides cross-compilers for various targets [1]. That image will provide a cross-linker and system libra

Re: Audio to text files

2017-09-07 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 6 September 2017 at 15:54:41 UTC, Justin Gray wrote: Is there a resource that explains how to create a file that stores a response to a question. say I want to introduce a program like this "Hi, my name is "", what's yours"? I want to generate an audio profile that's interactive a

Re: HTOD

2017-08-23 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 22 August 2017 at 22:50:46 UTC, Walter Bright wrote: On 8/22/2017 2:50 PM, Steven Schveighoffer wrote: But it is generating D code, no? Sure. And the C subset of D has been very stable, too. Used the tool 2 years ago. Worked like a charm.

Re: Need some vibe.d hosting advice

2017-08-12 Thread Sebastiaan Koppe 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. I would definitely outsource the storage. AzureBlob, S3, Wasabi, i

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

2017-08-08 Thread Sebastiaan Koppe via Digitalmars-d
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 "this library is highly alpha and mostly untested. use at your o

Re: Advertise D's great compatibilty with JavaScript

2017-06-18 Thread Sebastiaan Koppe via Digitalmars-d
On Sunday, 18 June 2017 at 18:06:50 UTC, Joakim wrote: Of course, once webasm takes off, everyone will simply compile their server code to webasm and ditch javascript altogether. Although there are proposals to access the dom directly from webasm [1], right now you'll still need js. And I doub

Re: Help compiling discord bot from dub, vibe.d linker errors

2017-06-15 Thread Sebastiaan Koppe via Digitalmars-d
On Thursday, 15 June 2017 at 15:50:06 UTC, Anonymouse wrote: I wanted to make a Hello World discord bot, and I found dscord[1] on dub. It even has an example bot Jeff[2], but it won't build. The machine is running Manjaro/Arch linux x64. Is that vibe.d not linking with openssl? There are more

Re: Expressing range constraints in CNF form

2017-06-12 Thread Sebastiaan Koppe via Digitalmars-d
On Monday, 12 June 2017 at 17:35:59 UTC, David Gileadi wrote: On 6/11/17 1:32 PM, Sebastiaan Koppe wrote: What about using ddoc? enum bool isInputRange(R) = is(typeof((ref R r) => r)) /// must be copyable && is(ReturnType!((R r) => r.empty) == bool) /// must support bool empty

Re: Expressing range constraints in CNF form

2017-06-11 Thread Sebastiaan Koppe via Digitalmars-d
On Sunday, 11 June 2017 at 00:28:58 UTC, Andrei Alexandrescu wrote: // Also possible (no change to the language) enum bool isInputRange(R) = is(typeof((ref R r) => r)) && msg("must be copyable") && is(ReturnType!((R r) => r.empty) == bool) && msg("must support bool empty") && is(typ

Idea: Reverse Type Inference

2017-05-22 Thread Sebastiaan Koppe via Digitalmars-d
I work with Scala professionally. I often feel its type inference for generics/templates is better than D's; as long as it can find a type _anywhere_ it will use that, no matter where it needs to pull it from. Over the past weeks I have been noticing a specific case where it happens. I call i

Re: Interesting PRs: bringing type system legitimacy to shared allocators

2017-05-01 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 28 April 2017 at 22:18:54 UTC, Atila Neves wrote: Done. I also added to the README that it has its own versions of the range constraints from Phobos that can be used with `@models`. Atila Example of an error message in the README would be great too.

Re: Compare boost::hana to D

2017-04-19 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 19 April 2017 at 18:02:46 UTC, Adrian Matoga wrote: [2] https://epi.github.io/2017/03/18/less_fun.html Great article!

Re: Compare boost::hana to D

2017-04-19 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 19 April 2017 at 08:19:52 UTC, Ali Çehreli wrote: Have you used boost::hana? What are your thoughts on it? And please share your ideas for the presentation. There has been threads here about C++ closing the gap. Does D still bring competitive advantage or is it becoming irrelevan

Re: ranges of characters and the overabundance of traits that go with them

2017-03-17 Thread Sebastiaan Koppe via Digitalmars-d
On Thursday, 16 March 2017 at 22:42:21 UTC, Jonathan M Davis wrote: On Thursday, March 16, 2017 21:50:18 Sebastiaan Koppe via The problem is that that then catches when an enum is passed to isSomeString, not when the template constraint or static if that isSomeString is being used in should hav

Re: ranges of characters and the overabundance of traits that go with them

2017-03-16 Thread Sebastiaan Koppe via Digitalmars-d
On Thursday, 16 March 2017 at 17:12:05 UTC, Jonathan M Davis wrote: Unfortunately, the nature of traits is such that altering them in a fashion that includes a deprecation cycle really doesn't work. You can deprecate the whole trait, but you really can't change its behavior without risking code

Re: ranges of characters and the overabundance of traits that go with them

2017-03-16 Thread Sebastiaan Koppe via Digitalmars-d
On Thursday, 16 March 2017 at 07:44:59 UTC, Jonathan M Davis wrote: So, if we deprecated isSomeString, we'd be telling a lot of folks to change their code when it's perfectly fine as-is. I agree that it would be nice to fix isSomeString, but I just don't think that it's reasonable to deprecate

Re: So no one is using Amazon S3 with D, why?

2017-03-15 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 15 March 2017 at 09:57:52 UTC, aberba wrote: There are several options: 1. Heroku Paas with s3 2. Docker Datacenter with your own image with dlanguage/dmd image as base. 3. Or hosting yourself on AWS or linode or digitaloceon. AWS is generally safe for small team with less resour

Re: [OT] cheap hosting

2017-03-15 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 15 March 2017 at 09:02:54 UTC, Jonathan M Davis wrote: https://www.digitalocean.com/ You can run whatever you want on there quite easily. It's what I use when I want to spin up a server for something online. - Jonathan M Davis or for $2,50 on https://www.vultr.com/

Re: dpldocs: xlinking and Documented destructors and postblits

2017-03-01 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 1 March 2017 at 05:18:59 UTC, Adam D. Ruppe wrote: Contrast to the official docs: http://dlang.org/phobos/std_typecons.html#.RefCounted http://dlang.org/library-prerelease/std/typecons/ref_counted.html my 2 cents: The officials docs has too much grey and the information is not w

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 14 February 2017 at 09:55:51 UTC, Jacob Carlborg wrote: Why? It looks awful. The signatures we already have in Phobos is quite ridiculous, this will not improve. Isn't this and the whole idea of DIP 1005 just a workaround for the compiler not lazily analyzing the symbols. This.

Re: Codecov and CyberShadow failure

2017-02-13 Thread Sebastiaan Koppe via Digitalmars-d
On Sunday, 12 February 2017 at 15:30:40 UTC, Vladimir Panteleev wrote: I accept that this shouldn't have taken a week to fix, and the initial change in question (tmpfs move) would have been better done in a test environment. FWIW, in parallel I've been working on a full-disk backup strategy to

Re: Tuple enhancement

2016-10-17 Thread Sebastiaan Koppe via Digitalmars-d
On Sunday, 16 October 2016 at 20:11:01 UTC, Chris Wright wrote: On Sun, 16 Oct 2016 18:51:06 +, Sebastiaan Koppe wrote: That would mean that tuple then needs to keep the strings around - taking up space. It doesn't change Tuple.sizeof. Sure, but it still takes up space in the executable.

Re: Tuple enhancement

2016-10-16 Thread Sebastiaan Koppe via Digitalmars-d
On Sunday, 16 October 2016 at 13:58:51 UTC, Andrei Alexandrescu wrote: I was thinking it would be handy if tuples had a way to access a field by name at runtime. E.g.: Tuple!(int, "a", double, "b") t; string x = condition ? "a" : "b"; double v = t.get!string(x, 3.14); That would mean that tup

Re: [OT] Punctuation of "Params:" and "Returns:"

2016-09-22 Thread Sebastiaan Koppe via Digitalmars-d
On Thursday, 22 September 2016 at 18:27:01 UTC, H. S. Teoh wrote: On Thu, Sep 22, 2016 at 02:26:15PM -0400, Andrei Alexandrescu via Digitalmars-d wrote: [...] Parameters: r | The range subject to partitioning. Returns: Something awesome. I personally prefer this version. I don't think

Re: Falcor Router in D

2016-09-22 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 21 September 2016 at 20:12:56 UTC, Robert burner Schadek wrote: Is anybody working on a falcor-router [1] written in D? [1] https://github.com/Netflix/falcor I thought about doing a GraphQL - which is a similar concept. But I think most of it will be superseded by http2

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread Sebastiaan Koppe via Digitalmars-d
On Saturday, 17 September 2016 at 05:03:17 UTC, Chris Wright wrote: someObject.someField.someLongMethodName( arg1, arg2, arg3); There are no semicolons in an ArgumentList. You might look into how javascript does it and what weirdness ensues as a result. Its weird and uncomfortable at fir

Re: [OT] of [OT] I am a developer and I hate documentation

2016-08-19 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 19 August 2016 at 02:52:54 UTC, Adam D. Ruppe wrote: Yeah. I'm being a bit facetious there: I actually already did it and the result is on my dpldocs.info site. There's still a few rough edges that I'm working on slowly but surely, but the bulk of the work has been done for a while.

Re: broken urls in library reference

2016-05-06 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 6 May 2016 at 13:18:18 UTC, Adam D. Ruppe wrote: On Friday, 6 May 2016 at 12:31:33 UTC, Sebastiaan Koppe wrote: I came from https://dlang.org/library/std/algorithm.html and clicked the std.algorithm.searching submodule. There's a lot of hard-coded links in the Phobos source. We have

broken urls in library reference

2016-05-06 Thread Sebastiaan Koppe via Digitalmars-d
I came from https://dlang.org/library/std/algorithm.html and clicked the std.algorithm.searching submodule. This directed me to https://dlang.org/library/std/std_algorithm_searching.html, which returned 404.

Re: Simple and effective approaches to constraint error messages

2016-04-25 Thread Sebastiaan Koppe via Digitalmars-d
On Monday, 25 April 2016 at 17:52:58 UTC, Andrei Alexandrescu wrote: Destroy! Andrei What about overloaded functions with complex constraints? How would the errors look when none of the overloaded constraints fully match? auto fun(T)(T t) if (hasWheels!T && canFly!T) {} auto fun(T)(T t)

Re: [DUB] Does anyone have some time to look at PR #785?

2016-04-19 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 19 April 2016 at 06:31:13 UTC, Sönke Ludwig wrote: This is a rather important pull request and the last big milestone for the 1.0.0 release. I'd like to get the next version out shortly, but this PR is sitting idle for over a month now and partially blocks development. It consists

Re: dub coverage analysis weirdness

2016-03-22 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 22 March 2016 at 08:56:16 UTC, FreeSlave wrote: Then why does it show that unittest of dependency runs too? Every line is marked as executed once in the unittest of dependency. You are right. Now I don't understand either... Btw: I am using codecov.io and it does get the coverage

Re: dub coverage analysis weirdness

2016-03-22 Thread Sebastiaan Koppe via Digitalmars-d
On Monday, 21 March 2016 at 22:34:50 UTC, FreeSlave wrote: I made example and described issue in github repository: https://github.com/MyLittleRobo/dub-coverage-test When doing -b unittest-cov dub only builds the current package in unittest-cov mode, all the dependencies are just build in the

Re: std.database

2016-03-05 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 4 March 2016 at 23:55:55 UTC, Erik Smith wrote: I think some basic object serialization capabilities would be great although I'm not sure how the bare names can be accessed like that through the rowSet How would that work? I did a project a while back using mysql-native (see code.d

Re: std.database

2016-03-04 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 4 March 2016 at 18:42:45 UTC, Erik Smith wrote: auto db = createDatabase("file:///testdb"); auto rowSet = db.connection().statement("select name,score from score").execute; foreach (r; rowSet) writeln(r[0].as!string,",",r[1].as!int); You'll want to have some types in th

Re: A suggestion for dub

2016-02-29 Thread Sebastiaan Koppe via Digitalmars-d
On Monday, 29 February 2016 at 17:07:39 UTC, Sönke Ludwig wrote: That would be great! The public repo is at https://github.com/D-Programming-Language/dub-registry Will have a look. So the behavior that Mike outlined is generally correct. Although it has to be said that there were times where

Re: A suggestion for dub

2016-02-29 Thread Sebastiaan Koppe via Digitalmars-d
On Monday, 29 February 2016 at 10:07:56 UTC, Sönke Ludwig wrote: We will at some point have to implement the use of push notifications for changes, but that requires some work (supporting GitHub-OAuth and implementing the push endpoint) and it requires the repositories to be re-registered with

Re: A suggestion for dub

2016-02-29 Thread Sebastiaan Koppe via Digitalmars-d
On Monday, 29 February 2016 at 09:27:50 UTC, sigod wrote: On Monday, 29 February 2016 at 08:02:51 UTC, mahdi wrote: On Monday, 29 February 2016 at 06:10:17 UTC, Chris Wright wrote: [...] The aim is to make package distribution easier and more straightforward. If someone has done some develop

Re: Proposal: Database Engine for D

2016-02-06 Thread Sebastiaan Koppe via Digitalmars-d
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 ar

Re: WebTesting library

2016-01-22 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 22 January 2016 at 20:16:12 UTC, Kingsley wrote: Hi, I don't know if this is of interest to anyone but I've created a webtesting library that is basically a phantomjs driver. It looks similar to Webdriver/Selenium but its in D. I have been using it to functionally test my web apps

Re: Idea: limited template expansion

2016-01-21 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 20 January 2016 at 21:44:06 UTC, David Nadlinger wrote: Can't you just write a wrapper function that takes the template function as a compile-time argument and generates the switch for you by iterating over the std.traits.EnumMembers of said compile-time parameter? Something lik

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

2016-01-21 Thread Sebastiaan Koppe 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! Any reason for not forcing https?

Re: [dlang.org] new forum design - preview

2016-01-13 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 13 January 2016 at 06:01:41 UTC, Vladimir Panteleev wrote: http://beta.forum.dlang.org/ https://github.com/CyberShadow/DFeed/pull/51 I like the fact that the header is consistent with the other design. It could use less white though. Although I understand that you just copied

Re: "Good PR" mechanical check

2016-01-12 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 12 January 2016 at 21:04:33 UTC, Jacob Carlborg wrote: On 2016-01-12 15:53, Adam D. Ruppe wrote: I'm not sure if git supports this but I think it should be done fully automatically. Not even something the user runs, just when they open the pull request, it reformats the code. Th

Re: Proposal: Database Engine for D

2016-01-04 Thread Sebastiaan Koppe via Digitalmars-d
On Monday, 4 January 2016 at 07:48:14 UTC, Jacob Carlborg wrote: Perhaps I'm missing something obvious but there are several problems with this: 1. What happens when you use more than one query for the same table at the same scope? In the above case, "Person" is already defined the second tim

Re: Proposal: Database Engine for D

2016-01-03 Thread Sebastiaan Koppe via Digitalmars-d
On Sunday, 3 January 2016 at 14:32:48 UTC, Jacob Carlborg wrote: On 2016-01-02 21:48, Sebastiaan Koppe wrote: I meant that you generate the struct from the DSL, and then migration code from that struct. I don't think I understand, it seems complicated. Suppose you have this: mixin(db(` En

Re: Proposal: Database Engine for D

2016-01-02 Thread Sebastiaan Koppe via Digitalmars-d
On Saturday, 2 January 2016 at 19:48:26 UTC, Jacob Carlborg wrote: I would rather to the opposite. Generate the necessary SQL for a migration based on a struct, not the other way around. I meant that you generate the struct from the DSL, and then migration code from that struct.

Re: Proposal: Database Engine for D

2016-01-02 Thread Sebastiaan Koppe via Digitalmars-d
On Saturday, 2 January 2016 at 12:23:30 UTC, Jacob Carlborg wrote: The core developers are making a big deal out of being able to have DSL's as string literals and process them at compile time. Although that's kind of pointless with SQL, since one still needs to send to string to the database t

Re: vibe.d benchmarks

2016-01-02 Thread Sebastiaan Koppe via Digitalmars-d
On Saturday, 2 January 2016 at 03:00:19 UTC, Etienne Cimon wrote: With libasync, you can run multiple instances of your vibe.d server and the linux kernel will round robin the incoming connections. That is nice. Didn't know that. That would enable zero-downtime-updates right? I use docker a

Re: Redesign of dlang.org

2015-12-21 Thread Sebastiaan Koppe via Digitalmars-d
On Monday, 21 December 2015 at 19:43:35 UTC, Jack Stouffer wrote: IMO we should stay away from trans-plied languages like SCSS, Less, and CoffeeScript, for several reasons CoffeeScript is a no-no now that Babel (ES6) is around. But you probably don't need all that since dlang is a pretty simpl

Re: Error message improvement ideas

2015-12-20 Thread Sebastiaan Koppe via Digitalmars-d
It seems like a small effort with a big return. I definitely support this. Nice idea.

Re: We need a good code font for the function signatures on dlang.org

2015-12-18 Thread Sebastiaan Koppe via Digitalmars-d
On Thursday, 17 December 2015 at 21:30:21 UTC, Eric Scrivner wrote: In the interest of "Show Don't Tell", here's what the homepage looks like using the following font string: font-family: Consolas, "Liberation Mono", Courier, monospace Consolas + 1. Hack is too vertical to my taste.

Re: Some feedback on the website.

2015-12-17 Thread Sebastiaan Koppe via Digitalmars-d
On Thursday, 17 December 2015 at 08:15:49 UTC, wobbles wrote: That would be a whole re-write of the website though. We could of course also use ddoc and write a generator to whatever template language we like. The rest is peanuts.

Re: And yet another cool project: fetching multiple URLs at once

2015-12-16 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 16 December 2015 at 21:00:55 UTC, Andrei Alexandrescu wrote: On 12/16/2015 03:09 PM, Sebastiaan Koppe wrote: But do you really want to put a ODBC client in there, as an example? Or a grayscale filter? ODBC maybe, grayscale filter probably not. I should add I've argued for inclu

Re: And yet another cool project: fetching multiple URLs at once

2015-12-16 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 16 December 2015 at 19:32:36 UTC, Andrei Alexandrescu wrote: On 12/16/2015 02:12 PM, Sebastiaan Koppe wrote: I think what I am trying to say is that a lot of stuff is already available on code.dlang.org, just not in phobos. Which begs the question, should it be? And if it does, sh

Re: Some feedback on the website.

2015-12-16 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 16 December 2015 at 18:47:26 UTC, deadalnix wrote: On Wednesday, 16 December 2015 at 13:52:05 UTC, Andrei Alexandrescu wrote: What would you have done instead? Honestly for D code itself, ddoc does just fine, but for the website, plain html or some known template format like . T

Re: And yet another cool project: fetching multiple URLs at once

2015-12-16 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 16 December 2015 at 15:54:09 UTC, Andrei Alexandrescu wrote: Right now we can nicely stream an URL as an input range. A great extension would be to fetch several URLs at once. When accessing r.front for that range, the user gets a pair of URL and data chunk. Of course the point

Re: Need DUB pull request reviewers

2015-12-15 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 15 December 2015 at 08:12:59 UTC, Sönke Ludwig wrote: We have a current shortage of reviewers for the DUB repository [1]. Martin is more or less the only one apart from me, but we are both currently too busy to get this done in a timely manner. If anyone can spare a few minutes (may

Re: Another cool mini-project: advance a range within n steps from its end

2015-12-05 Thread Sebastiaan Koppe via Digitalmars-d
On Saturday, 5 December 2015 at 20:52:23 UTC, Andrei Alexandrescu wrote: On 12/05/2015 11:22 AM, Sebastiaan Koppe wrote: What about using a rangified circular buffer of the same size you want the tail to be, and lazily fill it? That's O(n) space :o). -- Andrei I know, but it makes half th

Re: Another cool mini-project: advance a range within n steps from its end

2015-12-05 Thread Sebastiaan Koppe via Digitalmars-d
On Saturday, 5 December 2015 at 01:03:05 UTC, Andrei Alexandrescu wrote: What exactly doesn't work? Forward ranges. I see; retro requires a bidirectional range. I was thinking about void main() { import std.algorithm : count; import std.range : drop; import std.stdio

Re: Another cool mini-project: advance a range within n steps from its end

2015-12-04 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 4 December 2015 at 22:53:01 UTC, Andrei Alexandrescu wrote: Doesn't work. Try it! void main() { import std.range : retro, take; import std.stdio : writeln; assert([1,2,3,4,5].retro.take(3).retro == [3,4,5]); } What exactly doesn't work?

Re: Collections question

2015-11-28 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 27 November 2015 at 20:14:21 UTC, Andrei Alexandrescu wrote: 1. Factory function: 2. The opCall trick: 1. Factory Shouldn't opCall be used when you want something to (only) behave as a function? E.g. functors.

Re: I love any DUB config format

2015-11-26 Thread Sebastiaan Koppe via Digitalmars-d
On Thursday, 26 November 2015 at 08:50:42 UTC, Sönke Ludwig wrote: Thanks, Sönke Thank you (and others) for your time developing dub. I don't understand any feelings for or against the configuration's format. From a maintainability perspective JSON wins, from readability SDL wins. Pick _one

Re: Under 1000 opened bugs for Phobos

2015-11-06 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 6 November 2015 at 11:07:10 UTC, Gerald Jansen wrote: Model A: Model B: (recommended if you are planning to create PRs from the outset?) Go with Model B, it gets the origin/upstream naming right. Besides that, potatoes potatoes. Of course there are many possible workflows with g

Re: Under 1000 opened bugs for Phobos

2015-11-05 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 3 November 2015 at 14:35:08 UTC, Andrei Alexandrescu wrote: https://goo.gl/r24Izw Some of them are D1 only; I'll make an executive decision about those soon. Some of them have been fixed or obviated by recent improvements. And finally the bulk of them need a little work each to ge

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

2015-11-03 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 3 November 2015 at 08:08:28 UTC, yawniek wrote: 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. For end-users it is always good to

Re: Second CT-Parameter of isRange Predicates

2015-11-02 Thread Sebastiaan Koppe via Digitalmars-d
On Monday, 2 November 2015 at 14:43:00 UTC, Nordlöw wrote: Why not extend existing traits with a second `E`-parameter instead of adding a new one? What will E be when you only care whether R is an InputRange and not about its ElementType?

Re: Ready for testing: vibe.d 0.7.26-alpha.3

2015-11-01 Thread Sebastiaan Koppe via Digitalmars-d
On Sunday, 1 November 2015 at 19:44:12 UTC, Ola Fosheim Grøstad wrote: Keep in mind that javascript frameworks die after ~2 years. They may die young, but every framework is an improvement upon the last. So in a way the reasoning and principles behind them continue. In that sense it follows t

Re: Ready for testing: vibe.d 0.7.26-alpha.3

2015-10-31 Thread Sebastiaan Koppe via Digitalmars-d
On Saturday, 31 October 2015 at 07:57:06 UTC, Brad Anderson wrote: On Saturday, 31 October 2015 at 03:07:35 UTC, Sebastiaan Koppe wrote: In frontend development people are likely to use the same framework/library they used last time, in order to speed up development. Besides know-how, most of t

Re: Collection, why COW collection are important

2015-10-31 Thread Sebastiaan Koppe via Digitalmars-d
On Saturday, 31 October 2015 at 23:02:12 UTC, deadalnix wrote: The hack team recently released project to add COW collection to hack in addition to current, reference type, collections. You can find explanation here : http://hhvm.com/blog/10649/improving-arrays-in-hack As collection are discu

Re: Ready for testing: vibe.d 0.7.26-alpha.3

2015-10-30 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 30 October 2015 at 21:03:21 UTC, Brad Anderson wrote: On Friday, 30 October 2015 at 16:16:11 UTC, Sebastiaan Koppe I really have to say I fail to see any value in that JS interface generation feature. The idea is nice, but it needs adapters to common ajax libraries, instead of homegr

Re: Ready for testing: vibe.d 0.7.26-alpha.3

2015-10-30 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 14 October 2015 at 06:23:38 UTC, Brad Anderson wrote: Trying out the new JS interface generation on a little toy project I'm getting: [...] Really cool feature though. I really have to say I fail to see any value in that JS interface generation feature. The idea is nice, but i

Re: Safe reference counting cannot be implemented as a library

2015-10-27 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 27 October 2015 at 11:41:52 UTC, Andrei Alexandrescu wrote: The crux of the matter is modular typechecking. Consider the following example: // module widget.d @safe class Widget { void fun() { g_widget = this; } } static Widget g_widget; // end of module widget.d Now, once

Re: Downoads stats page is back up

2015-10-21 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 21 October 2015 at 17:38:14 UTC, Jacob Carlborg wrote: You can have a look at Grafana [1]. Then you can have a real time graph, if that's of interest. In addition to that the graphs are a lot nicer :) I prefer andrei's graphics. - no bells or whistles - no 2mb javascript to down

Re: D 2015/2016 Vision?

2015-10-07 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 7 October 2015 at 02:41:12 UTC, Walter Bright wrote: On 10/6/2015 7:04 PM, bitwise wrote: On Wednesday, 7 October 2015 at 01:27:27 UTC, Walter Bright wrote: On 10/4/2015 11:02 AM, bitwise wrote: For example, streams. No streams. InputRanges. This is too vague to really respon

Re: std.data.json formal review

2015-10-06 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 6 October 2015 at 10:05:46 UTC, Alex wrote: I wonder if it would be better to write a more abstract serialisation/persistance module that could use either json,xml,some binary format and future formats. I think there are too many particulars making an abstract (de)serialization mo

Re: Moving back to .NET

2015-09-25 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 25 September 2015 at 05:55:08 UTC, jdeath wrote: you guys are nuts. instead of thinking about this shit, you should think about how to make D usable for windows programmers. I also write D on windows. don't think about linux crutsches. in my company people are not even willing to

Re: Moving back to .NET

2015-09-24 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 25 September 2015 at 03:00:12 UTC, Jonathan M Davis wrote: I do kind of wonder though what MS would do if the majority of Windows programmers really got a taste of how great the command line is and started complaining to MS en masse about how MS needs to have a proper command line -

Re: Moving back to .NET

2015-09-21 Thread Sebastiaan Koppe via Digitalmars-d
On Monday, 21 September 2015 at 13:03:20 UTC, default0 wrote: On Monday, 21 September 2015 at 00:01:01 UTC, Temtaime wrote: I also hate errors when a lambda contains some errors. [ 1 ].countUntil!(a => a == undeclared_something); Error: template std.algorithm.searching.countUntil cannot deduc

Re: Operator overloading or alternatives to expression templates

2015-09-14 Thread Sebastiaan Koppe via Digitalmars-d
On Monday, 14 September 2015 at 18:17:05 UTC, Adam D. Ruppe wrote: On Monday, 14 September 2015 at 13:47:10 UTC, Sebastiaan Koppe wrote: `auto q = query.builder!Person.age!">"(20).name("Peter");` I confess that I'm not really paying attention to this thread, but I can't help but think plain o

Re: Operator overloading or alternatives to expression templates

2015-09-14 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 11 September 2015 at 19:41:41 UTC, Martin Nowak wrote: Does anyone have a different idea how to make a nice query language? db.get!Person.where!(p => p.age > 21 && p.name == "Peter") In our last project we took the following approach: `auto q = query.builder!Person.age!">"(20).name

Re: Reasons to use D

2015-09-12 Thread Sebastiaan Koppe via Digitalmars-d
On Saturday, 12 September 2015 at 04:05:44 UTC, Adam D. Ruppe wrote: On Saturday, 12 September 2015 at 03:52:11 UTC, skoppe wrote: That is not the only way it behaves differently. jQuery's html() will actually execute inline script, whereas innerHTML won't. I'm pretty sure it is the other way

Re: Reasons to use D

2015-09-11 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 11 September 2015 at 15:37:45 UTC, Ola Fosheim Grøstad wrote: In the JavaScript world you have various versions of JavaScript, TypeScript, TypeScript+React, TypeScript+Angular, they coexists. So, as long as you can easily interface between languages it is ok. I think language desig

Re: Reasons to use D

2015-09-11 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 11 September 2015 at 13:51:55 UTC, Adam D. Ruppe wrote: jQuery has burned me in the past. Take this page for example: http://api.jquery.com/html/ Tell me what it doesn't tell you... well, unless you know, you'll fail. Does it have to do with char encodings?

Re: Compile all-of-dub?

2015-09-09 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 9 September 2015 at 08:26:59 UTC, qznc wrote: The Rust people have this Crater [0,1] tool, which essentially builds all Rust libraries with two compiler versions and compares for regressions. Since D has a central library repository as well, it would make sense to do this broad

Re: When you find a solution to a weird problem, post it!

2015-09-07 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 8 September 2015 at 02:07:04 UTC, Walter Bright wrote: Some great advice: http://rentes.github.io/programming/stackoverflow/2015/09/03/Wisdom-of-the-Ancients/ Totally agree. Just posted a solution to my own problem: http://forum.dlang.org/thread/ldtjxbyhxclfinkaj...@forum.dlang.or

Re: Interesting user mistake

2015-09-05 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 4 September 2015 at 23:08:21 UTC, Andrei Alexandrescu wrote: On 09/04/2015 12:39 PM, skoppe wrote: On Thursday, 3 September 2015 at 16:46:30 UTC, Andrei Alexandrescu wrote: http://stackoverflow.com/questions/32369114/leap-years-not-working-in-date-and-time-program-in-dlang The gist

Re: GC-proof resource classes

2015-08-31 Thread Sebastiaan Koppe via Digitalmars-d
On Monday, 31 August 2015 at 11:29:21 UTC, ponce wrote: On Saturday, 29 August 2015 at 13:14:26 UTC, ponce wrote: Looks ugly? Yes, but it makes the GC acts as a cheap leak detector, giving accurate messages for still opened resources. So, let me tell a little success story while using the "

Re: std.data.json formal review

2015-08-25 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 25 August 2015 at 06:56:23 UTC, Sönke Ludwig wrote: If I have a string variable and I want to store the upper case version of another string, the direct mental translation is "dst = toUpper(src);" - and not "dst = toUpper(src).array;". One can also say the problem is that you have

Re: Where the F*** is phobos on OSX nowadays ?

2015-08-11 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 11 August 2015 at 08:01:53 UTC, John Colvin wrote: On Tuesday, 11 August 2015 at 04:51:03 UTC, deadalnix wrote: And why does it keep moving ? Why isn't it in some place where linker will find it ? Is that really worth it to have every build system to have to jump through hoops to

Re: D for Game Development

2015-08-02 Thread Sebastiaan Koppe via Digitalmars-d
On Monday, 3 August 2015 at 03:28:26 UTC, Rikki Cattermole wrote: On 3/08/2015 1:35 p.m., Sebastiaan Koppe wrote: On Sunday, 2 August 2015 at 14:03:50 UTC, Rikki Cattermole wrote: Some of things that goes on in the modding world is truely amazing. For every item/block with a recipe and vanill

Re: D for Game Development

2015-08-02 Thread Sebastiaan Koppe via Digitalmars-d
On Sunday, 2 August 2015 at 14:03:50 UTC, Rikki Cattermole wrote: Some of things that goes on in the modding world is truely amazing. For every item/block with a recipe and vanilla items/blocks hardcoded. It'll calculate at the start of runtime an EMC value in EE3. It does it ridiculously fas

Re: D for Game Development

2015-08-02 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 31 July 2015 at 03:29:59 UTC, Brandon Ragland wrote: People see minecraft as "terrible graphics, pixellated" but each block represents 16 triangles I really hope they don't render a block with 16 triangles. and there could be thousands of blocks on screen. You're easily looking at

Re: Interfaces, traits, concepts, and my idea for a DIP

2015-07-31 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 31 July 2015 at 14:23:28 UTC, Atila Neves wrote: On Friday, 31 July 2015 at 11:16:48 UTC, Biotronic wrote: Why can't another template use the very same concept information to check if a type implements the concept? e.g.: @satisfies!(myConcept, MyStruct) struct MyStruct { /* ... */

Re: D Web Services Application Potential?

2015-07-30 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 29 July 2015 at 17:25:17 UTC, Etienne wrote: I can't share source but the idea is simple. You configure a DNS subdomain my.domain.com => 127.0.0.1, and test that address with javascript when a logins to the public website, if it doesn't work you show a message "plugin required". T

Re: D Web Services Application Potential?

2015-07-29 Thread Sebastiaan Koppe via Digitalmars-d
On Wednesday, 29 July 2015 at 13:22:43 UTC, Etienne Cimon wrote: I actually use the size of a vibe.d application (2mb) to my advantage to produce a plugin that will overload certain requests on the client's computer (via a windows service or launchd daemon and reverse proxy). This allows much m

  1   2   >