Re: text based file formats

2022-12-20 Thread Adrian Matoga via Digitalmars-d-announce
On Sunday, 18 December 2022 at 16:12:35 UTC, rikki cattermole wrote: > * make it @safe and pure if possible (and its likely possible) pure is always a worry for me, but yeah @safe and ideally nothrow (if they are forgiving which they absolutely should be, there is no reason to throw an

Re: GCC 12.1 Released (D v2.100-rc.1)

2022-05-11 Thread Adrian Matoga via Digitalmars-d-announce
On Friday, 6 May 2022 at 11:57:47 UTC, Iain Buclaw wrote: Hi, I am proud to announce another major GCC release, 12.1. [...] Thank you for all the great work!

Re: dxml 0.2.0 released

2018-02-14 Thread Adrian Matoga via Digitalmars-d-announce
On Wednesday, 14 February 2018 at 10:57:26 UTC, rikki cattermole wrote: See lines: - Input!IR temp = input; - input = temp; bool commentLine() { Input!IR temp = input; (...) if (!temp.empty) { (...) input = temp;

Re: gRPC in D good idea for GSOC 2018?

2018-01-22 Thread Adrian Matoga 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

Re: Adding Markdown to Ddoc

2017-12-06 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 6 December 2017 at 12:13:56 UTC, Walter Bright wrote: On 12/5/2017 8:11 PM, Walter Bright wrote: (I know this has come up before, and I've been opposed to it, but I've changed my mind.) Part of this change of mind was driven by the bit of markdown that Ddoc already supports -

Re: String import an entire directory

2017-11-14 Thread Adrian Matoga via Digitalmars-d
On Monday, 13 November 2017 at 16:18:06 UTC, Andre Pany wrote: Three is a use case. (...) Yeah, I could probably find more use cases, but from the OP's question it's not clear what would be the benefit of doing it at compile time in OP's case.

Re: mir-linux-kernel 1.0.0: Linux system call numbers for different architectures

2017-11-14 Thread Adrian Matoga via Digitalmars-d-announce
On Saturday, 11 November 2017 at 08:54:54 UTC, Nicholas Wilson wrote: On Saturday, 11 November 2017 at 08:43:32 UTC, Adrian Matoga wrote: On Friday, 10 November 2017 at 18:27:36 UTC, Nathan S. wrote: About package -- Linux system call numbers for different architectures. That's

Re: String import an entire directory

2017-11-13 Thread Adrian Matoga via Digitalmars-d
On Saturday, 11 November 2017 at 14:11:50 UTC, Neia Neutuladh wrote: At my job, I put together a database migration tool for our services. It scans for resources in your JAR file with an appropriate path, interprets them as SQL scripts, and applies them to the database if it hasn't been done

Re: mir-linux-kernel 1.0.0: Linux system call numbers for different architectures

2017-11-11 Thread Adrian Matoga via Digitalmars-d-announce
On Friday, 10 November 2017 at 18:27:36 UTC, Nathan S. wrote: About package -- Linux system call numbers for different architectures. That's all. [...] Was there anything wrong with https://code.dlang.org/packages/syscall-d ?

Re: Is it possible to avoid call to destructor for structs?

2017-09-25 Thread Adrian Matoga via Digitalmars-d-learn
On Sunday, 24 September 2017 at 19:52:52 UTC, bitwise wrote: On Sunday, 24 September 2017 at 17:11:26 UTC, Haridas wrote: In the following code, Bar is an element of struct Foo. Is there a way to avoid a call to ~Bar when ~Foo is getting executed? Don't construct it to begin with. struct

Static initialization of pointers

2017-07-27 Thread Adrian Matoga via Digitalmars-d
The D language specification under "Global and static initializers" [1], says the following: The Initializer for a global or static variable must be evaluatable at compile time. Whether some pointers can be initialized with the addresses of other functions or data is implementation defined.

Re: @safe and null dereferencing

2017-07-27 Thread Adrian Matoga via Digitalmars-d
On Thursday, 27 July 2017 at 17:43:17 UTC, H. S. Teoh wrote: On Thu, Jul 27, 2017 at 05:33:22PM +, Adrian Matoga via Digitalmars-d wrote: [...] Why can't we just make the compiler insert null checks in @safe code? Because not inserting null checks is a sacred cow we inherited from the C

Re: DIP 1012--Attributes--Preliminary Review Round 1

2017-07-27 Thread Adrian Matoga via Digitalmars-d
On Thursday, 27 July 2017 at 14:44:23 UTC, Mike Parker wrote: DIP 1012 is titled "Attributes". https://github.com/dlang/DIPs/blob/master/DIPs/DIP1012.md All review-related feedback on and discussion of the DIP should occur in this thread. The review period will end at 11:59 PM ET on August

Re: @safe and null dereferencing

2017-07-27 Thread Adrian Matoga via Digitalmars-d
On Thursday, 27 July 2017 at 15:03:02 UTC, Steven Schveighoffer wrote: Inside the thread for adding @safe/@trusted attributes to OS functions, it has come to light that @safe has conflicting rules. For the definition of safe, it says: "Safe functions are functions that are statically checked

Re: D easily overlooked?

2017-07-21 Thread Adrian Matoga via Digitalmars-d
On Friday, 14 July 2017 at 13:29:30 UTC, Joakim wrote: Yes, D's compile-time regex are still the fastest in the world. I've been benching it recently for a marketing-oriented blog post I'm preparing for the official D blog, std.regex beats out the top C and Rust entries from the benchmarks

Re: Release D 2.075.0

2017-07-20 Thread Adrian Matoga via Digitalmars-d-announce
On Thursday, 20 July 2017 at 07:19:03 UTC, Patrick Schluter wrote: version 2.067 that still had the C++ frontend took more than 100 seconds. I can hardly believe it. I remember versions 2.05x building in about 11 seconds.

Re: DIP 1010--Static foreach--Formal Review

2017-07-12 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 12 July 2017 at 10:57:37 UTC, Steven Schveighoffer wrote: Perhaps the deprecation path should include a removal of straight foreach over a tuple working (use static foreach explicitly). This would make the distinction even more obvious. I'd also vote for gradual removal of

Re: version=D_16

2017-07-12 Thread Adrian Matoga via Digitalmars-d
On Monday, 10 July 2017 at 21:30:44 UTC, Walter Bright wrote: On 7/10/2017 1:52 PM, Luís Marques wrote: On Monday, 10 July 2017 at 20:19:46 UTC, Walter Bright wrote: On 7/10/2017 12:46 PM, Luís Marques wrote: I'm curious how that implementation addresses the issues I brought up: I'm not

Re: Analysis of D GC

2017-06-25 Thread Adrian Matoga via Digitalmars-d
On Tuesday, 20 June 2017 at 11:49:49 UTC, Jacob Carlborg wrote: You need to move to 64bit. Apple is already deprecating support for 32bit apps and after the next version of macOS (High Sierra) they're going to remove the support for 32bit apps. There are other 32-bit platforms that are going

Re: atomic operations compared to c++

2017-06-14 Thread Adrian Matoga via Digitalmars-d
On Tuesday, 13 June 2017 at 06:12:46 UTC, gzp wrote: (...) There is no consume in D. What do you currently use for in C++? It is temporarily deprecated in C++17.

Re: Compile-Time Sort in D

2017-06-09 Thread Adrian Matoga via Digitalmars-d-announce
On Friday, 9 June 2017 at 12:15:50 UTC, Steven Schveighoffer wrote: On 6/7/17 5:47 PM, John Carter wrote: On Monday, 5 June 2017 at 14:23:34 UTC, Mike Parker wrote: https://dlang.org/blog/2017/06/05/compile-time-sort-in-d/ Seems like you have inspired people...

Re: DIP 1003 Formal Review

2017-05-15 Thread Adrian Matoga via Digitalmars-d
On Friday, 12 May 2017 at 16:17:03 UTC, Mike Parker wrote: ... 3. deprecate, remove, forget. During the deprecation period, it could live as "contextual keyword", or actually with grammar modified to expect an identifier "body" instead of keyword. That would allow using "body" as

Re: Fantastic exchange from DConf

2017-05-14 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 10 May 2017 at 12:18:40 UTC, Patrick Schluter wrote: On Wednesday, 10 May 2017 at 11:16:57 UTC, Atila Neves wrote: [...] The likelihood of a randomly picked C/C++ programmer not even knowing what a profiler is, much less having used one, is extremely high in my experience. I

Re: DConf 2017 Hackathon report

2017-05-10 Thread Adrian Matoga via Digitalmars-d
On Tuesday, 9 May 2017 at 13:19:12 UTC, Steven Schveighoffer wrote: But it was very awesome to be able to go around and find the people to discuss a PR/idea without going through a forum thread. I think there's a psychological barrier that happens when you post a complete argument, and then

Re: DConf 2017 Hackathon report

2017-05-10 Thread Adrian Matoga via Digitalmars-d
On Tuesday, 9 May 2017 at 04:35:40 UTC, Ali Çehreli wrote: Please list what we've achieved during the hackathon, including what is started but is likely to be finished in the coming days or months. For me: - Finished updating "Programming in D" to 2.074.0 (the HTML is now up to date but I

Re: "I made a game using Rust"

2017-05-10 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 10 May 2017 at 15:03:19 UTC, Adam D. Ruppe wrote: On Wednesday, 10 May 2017 at 14:02:38 UTC, Adrian Matoga wrote: Would you mind giving some examples? What bothers me on a regular basis is overloading. Basic case: $ dmd lll lll.d(6): Error: none of the overloads of 'foo' are

Re: "I made a game using Rust"

2017-05-10 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 10 May 2017 at 14:00:08 UTC, Ethan Watson wrote: On Wednesday, 10 May 2017 at 13:22:22 UTC, Adam D. Ruppe wrote: Those of you on IRC know that I've been pushing hard for better error messages. I think that is *the* killer feature clang offered and I see it brought up again and

Re: Fantastic exchange from DConf

2017-05-09 Thread Adrian Matoga via Digitalmars-d
On Tuesday, 9 May 2017 at 09:22:13 UTC, Joakim wrote: On Tuesday, 9 May 2017 at 06:15:12 UTC, H. S. Teoh wrote: On Mon, May 08, 2017 at 06:33:08PM +, Jerry via Digitalmars-d wrote: [...] Is that a subtle joke, or are you being serious? [...] Heh, I saw you wrote the post and knew it

Re: DLang quarterly EU?

2017-05-07 Thread Adrian Matoga via Digitalmars-d
On Sunday, 7 May 2017 at 16:37:02 UTC, Ethan Watson wrote: On Sunday, 7 May 2017 at 11:32:53 UTC, Adam Wilson wrote: On 5/7/17 12:57, Seb wrote: +1 - maybe its worth considering to make it for two days (=one weekend) That can work. It would be two or three days vacation depending on flight

Re: See you soon at dconf

2017-05-03 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 3 May 2017 at 07:42:51 UTC, Luís Marques wrote: On Tuesday, 2 May 2017 at 20:19:02 UTC, Stefan Koch wrote: Hi, I am very happy to see you soon at dconf. And I apologize in advance for my nearly slideless talk. Hope this time there is dmd on the machine! Cheers Stefan Well, I

Re: CTFE Status 2

2017-05-03 Thread Adrian Matoga via Digitalmars-d
On Sunday, 30 April 2017 at 19:52:27 UTC, H. S. Teoh wrote: On Sun, Apr 30, 2017 at 01:26:09PM +, Stefan Koch via Digitalmars-d wrote: On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote: > [ ... ] Big news! The first step to include debug info has been done. Yes this means

Re: CTFE Status 2

2017-05-03 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 3 May 2017 at 04:22:00 UTC, Stefan Koch wrote: On Tuesday, 2 May 2017 at 22:08:31 UTC, Moritz Maxeiner wrote: [...] Using TCP would just remove any potential future headache from the equation. I think any ordering should be done explicitly at the debugging protocol level. for

Re: DConf Hackathon Ideas

2017-04-28 Thread Adrian Matoga via Digitalmars-d
On Thursday, 27 April 2017 at 14:53:02 UTC, Mike Parker wrote: This year, DConf has an extra day tacked on for problem solving in the form of a hackathon. The intent is to work on issues people find frustrating in the D ecosystem. While there will be time given at the event for proposals, and

Re: Compare boost::hana to D

2017-04-24 Thread Adrian Matoga via Digitalmars-d
On Saturday, 22 April 2017 at 07:53:49 UTC, Johannes Pfau wrote: OT but is there any benefit to identify events with strings? As long as you use compile time only events I'd prefer a syntax as in https://github.com/WebFreak001/EventSystem (one benefit is that it's 100% IDE autocomplete

Re: DConf 2017 Berlin - bicycles

2017-04-21 Thread Adrian Matoga via Digitalmars-d
On Friday, 21 April 2017 at 13:37:17 UTC, Steven Schveighoffer wrote: After the bike tour I had last year, I can 100% agree that having a bike is a fabulous way to get around the city quickly. You can ride the subway with your bike (although IIRC, you need to buy a ticket for it), but the

Re: DConf 2017 Berlin - bicycles

2017-04-21 Thread Adrian Matoga via Digitalmars-d
On Friday, 21 April 2017 at 16:49:36 UTC, Iain Buclaw wrote: On 19 April 2017 at 20:22, Adrian Matoga via Digitalmars-d <digitalmars-d@puremagic.com> wrote: I'm arriving at Berlin Ostbahnhof on Wednesday evening and will be heading to Britz Hotel, but last year I learnt that the be

Re: Python : Pythonista / Ruby: Rubyist : / D : ?

2017-04-21 Thread Adrian Matoga via Digitalmars-d
On Friday, 21 April 2017 at 17:20:14 UTC, Vasudev Ram wrote: Hi list, I hope the question is self-evident from the message subject. If not, it means: what are D developers generally called (to indicate that they develop in D)? The question occurred to me somehow while browsing some D posts

Re: Compare boost::hana to D

2017-04-21 Thread Adrian Matoga via Digitalmars-d
On Friday, 21 April 2017 at 13:10:43 UTC, Adam D. Ruppe wrote: On Wednesday, 19 April 2017 at 18:02:46 UTC, Adrian Matoga wrote: [2] https://epi.github.io/2017/03/18/less_fun.html BTW in your D foreach, you could also have done `switch` void trigger(string event) { switch(event) {

Re: Compare boost::hana to D

2017-04-21 Thread Adrian Matoga via Digitalmars-d
On Friday, 21 April 2017 at 12:37:03 UTC, Mike Parker wrote: On Friday, 21 April 2017 at 12:34:53 UTC, Mike Parker wrote: On Thursday, 20 April 2017 at 07:37:17 UTC, Mike Parker wrote: On Thursday, 20 April 2017 at 05:01:17 UTC, Adrian Matoga wrote: On Wednesday, 19 April 2017 at 19:22:11 UTC,

Re: Compare boost::hana to D

2017-04-21 Thread Adrian Matoga via Digitalmars-d
On Friday, 21 April 2017 at 12:34:53 UTC, Mike Parker wrote: On Thursday, 20 April 2017 at 07:37:17 UTC, Mike Parker wrote: On Thursday, 20 April 2017 at 05:01:17 UTC, Adrian Matoga wrote: On Wednesday, 19 April 2017 at 19:22:11 UTC, Ali Çehreli wrote: Thank you. Has this been on Reddit yet?

Re: DConf 2017 Berlin - bicycles

2017-04-19 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 19 April 2017 at 20:13:52 UTC, Walter Bright wrote: On 4/19/2017 11:22 AM, Adrian Matoga wrote: I'm arriving at Berlin Ostbahnhof on Wednesday evening and will be heading to Britz Hotel, but last year I learnt that the best way to get around the city is on a bicycle. Can you

Re: DConf 2017 Berlin - bicycles

2017-04-19 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 19 April 2017 at 19:03:40 UTC, Fool wrote: No personal experience, but http://www.yaambike.de/ sounds like an option. Looks good, thanks.

Re: Compare boost::hana to D

2017-04-19 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 19 April 2017 at 19:22:11 UTC, Ali Çehreli wrote: Thank you. Has this been on Reddit yet? I haven't posted it there, I don't have an account. Two typos: 1) A missing underscore made me believe C++ gained a new keyword (make). :) auto events = make event_system("foo"_s,

Re: Compare boost::hana to D

2017-04-19 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 19 April 2017 at 18:57:19 UTC, David Gileadi wrote: On 4/19/17 11:30 AM, Adrian Matoga wrote: On Wednesday, 19 April 2017 at 18:26:20 UTC, Sebastiaan Koppe wrote: On Wednesday, 19 April 2017 at 18:02:46 UTC, Adrian Matoga wrote: [2] https://epi.github.io/2017/03/18/less_fun.html

Re: Compare boost::hana to D

2017-04-19 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 19 April 2017 at 18:26:20 UTC, Sebastiaan Koppe wrote: 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! Thanks! I should mention I've also got somewhat positive feedback from Louis [1]. [1]

DConf 2017 Berlin - bicycles

2017-04-19 Thread Adrian Matoga via Digitalmars-d
I'm arriving at Berlin Ostbahnhof on Wednesday evening and will be heading to Britz Hotel, but last year I learnt that the best way to get around the city is on a bicycle. Can you recommend a place (preferably near the station) where I could rent a not-so-small bike for 4 days for a reasonable

Re: Compare boost::hana to D

2017-04-19 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 19 April 2017 at 08:19:52 UTC, Ali Çehreli wrote: I'm brushing up on my C++ to prepare for my C++Now 2017 presentation[1]. boost::hana is an impressive library that overlaps with many D features: http://www.boost.org/doc/libs/1_64_0_b2/libs/hana/doc/html/index.html Have you

Re: DConf 2017 Schedule

2017-03-23 Thread Adrian Matoga via Digitalmars-d-announce
On Monday, 20 March 2017 at 13:57:19 UTC, Dukc wrote: If I remember correctly, last year it took perhaps two months or so for the talks to be published on YouTube. Would it be much extra effort to publish unedited versions of them asap, for us who can't wait for the edited versions? Yes,

Re: RAII

2017-02-23 Thread Adrian Matoga via Digitalmars-d-learn
On Thursday, 23 February 2017 at 09:52:26 UTC, Arun Chandrasekaran wrote: I'm trying to write an RAII wrapper on Linux. I understand struct in D doesn't have default constructor (for .init reasons). I don't want to use `scope`. Is there an elegant way to achieve this in D? static opCall()

Re: Mir Random announce - Professional RNGs

2016-11-26 Thread Adrian Matoga via Digitalmars-d-announce
On Friday, 25 November 2016 at 23:14:06 UTC, Ilya Yaroshenko wrote: https://github.com/libmir/mir-random http://docs.random.dlang.io/latest/index.html Cool! I'd only suggest renaming "algorithm" to "range", to better reflect what's inside the module.

Re: PDF generation in D?

2016-11-16 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 16 November 2016 at 01:22:33 UTC, Jot wrote: What's your point? My point is that PS as a textual format can be easily generated without external libraries or tools, and then converted to an identically looking PDF.

Re: PDF generation in D?

2016-11-15 Thread Adrian Matoga via Digitalmars-d
On Tuesday, 15 November 2016 at 11:13:54 UTC, Jot wrote: On Tuesday, 15 November 2016 at 09:39:09 UTC, Adrian Matoga wrote: On Friday, 11 November 2016 at 09:47:21 UTC, Robert burner Schadek wrote: I used text files and LaTeX in the past, it works with everything textfile -> process -> LaTeX

Re: DConf 2017: Bigger, Badder, and Berliner! Call for Submissions now open

2016-11-15 Thread Adrian Matoga via Digitalmars-d-announce
On Monday, 14 November 2016 at 19:49:26 UTC, Andrei Alexandrescu wrote: We're happy to announce that the D Language Foundation is cooperating again with Sociomantic to organize DConf 2017 in Berlin for the second time. Same location, same dates, but of course a whole new experience! (...)

Re: PDF generation in D?

2016-11-15 Thread Adrian Matoga via Digitalmars-d
On Friday, 11 November 2016 at 09:47:21 UTC, Robert burner Schadek wrote: I used text files and LaTeX in the past, it works with everything textfile -> process -> LaTeX -> pdf This. Another (a bit lower-level) option would be to produce a PostScript file and pass it to (e)ps2pdf.

Re: If Statement with Declaration

2016-11-04 Thread Adrian Matoga via Digitalmars-d
On Friday, 4 November 2016 at 15:34:00 UTC, Jerry wrote: On Friday, 4 November 2016 at 14:16:44 UTC, Matthias Bentrup wrote: On Thursday, 3 November 2016 at 22:29:34 UTC, Jerry wrote: if(int i = someFunc(); i >= 0) { // use i } Thoughts on this sort of feature? I would

Re: Why can't static arrays be sorted?

2016-10-06 Thread Adrian Matoga via Digitalmars-d-learn
On Thursday, 6 October 2016 at 09:17:08 UTC, pineapple wrote: On Wednesday, 5 October 2016 at 19:30:01 UTC, Jonathan M Davis wrote: Would just like to point out that this is design weirdness on Phobos' part - the library I've been writing does not have this problem. It doesn't even make

Re: Why can't static arrays be sorted?

2016-10-04 Thread Adrian Matoga via Digitalmars-d-learn
On Tuesday, 4 October 2016 at 20:05:15 UTC, TheGag96 wrote: I was writing some code today and ran into this oddity that I'd never come across before: import std.algorithm : sort; int[10] arr = [0, 3, 4, 6, 2, 1, 1, 4, 6, 9]; thing.sort(); This doesn't compile. Obviously the .sort

Re: Is dmd fast?

2016-06-22 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 22 June 2016 at 14:28:19 UTC, Adam D. Ruppe wrote: BTW this more measures linker speed than compiler. dmd -c -o- just runs the compiler and skips filesystem output... it'd be pretty fast and if there's similar options for other compilers (gcc has -c too at least) it might be

Re: Non movable structs

2016-06-19 Thread Adrian Matoga via Digitalmars-d
On Sunday, 19 June 2016 at 02:06:59 UTC, deadalnix wrote: Long story short, I need structs that do not move. I'm sure there are many other use cases. I needed that for a struct member function to be passed as delegate for a fiber. The easiest way I found was to malloc the struct.

Re: Allowing DConf presentations to be spoken in other languages

2016-06-10 Thread Adrian Matoga via Digitalmars-d
On Friday, 10 June 2016 at 21:31:36 UTC, Jesse Phillips wrote: After this year's DConf I started to wonder if it could be beneficial to provide a slot during the conference where the speaker would do his presentation in a language other than English. I realize that many are like me and would

Re: Parse File at compile time, but not embedded

2016-06-10 Thread Adrian Matoga via Digitalmars-d-learn
On Tuesday, 7 June 2016 at 22:09:58 UTC, Alex Parrill wrote: Not necessarily, You chased that rabbit quite far! The data your reading could contain sensitive information only used at compile time and not meant to embed. For example, the file could contain login and password to an SQL database

Re: Release DUB 0.9.25, new logo and updated website design

2016-05-24 Thread Adrian Matoga via Digitalmars-d-announce
On Tuesday, 24 May 2016 at 22:59:24 UTC, Adrian Matoga wrote: (...) 1. The font is much thinner than on dlang.org main site PR: https://github.com/dlang/dub-registry/pull/156 3. Clicking the top-left dub logo directs to "http://code.dlang.org/packages/; which is 404. PR:

Re: Release DUB 0.9.25, new logo and updated website design

2016-05-24 Thread Adrian Matoga via Digitalmars-d-announce
On Sunday, 22 May 2016 at 19:36:39 UTC, Sönke Ludwig wrote: (...) The new site is cool, except a few annoyances: 1. The font is much thinner than on dlang.org main site (font-weight set to 300 for no good reason), and thus much harder to read. Using #333 for text color instead of pure black

Re: Idea: swap with multiple arguments

2016-05-24 Thread Adrian Matoga via Digitalmars-d
On Tuesday, 24 May 2016 at 02:40:24 UTC, Observer wrote: As for utility, if you're a PostScript programmer, where keeping track of data is done via a stack-oriented model, this capability gets used all the time, to bring relevant arguments to the top of the stack to be operated upon, or to

Re: To all DConf speakers: please upload slides!

2016-05-13 Thread Adrian Matoga via Digitalmars-d-announce
On Wednesday, 11 May 2016 at 17:31:32 UTC, dilkROM wrote: And also, if anyone can identify all lightning speakers, that would be terrific. We do need their slides and their names / desired nicknames / contact info as well. :) I didn't use slides, but only a few code examples, collected in a

Re: DustMite now has -j

2016-05-11 Thread Adrian Matoga via Digitalmars-d-announce
On Wednesday, 11 May 2016 at 19:53:54 UTC, Vladimir Panteleev wrote: By popular demand. https://github.com/CyberShadow/DustMite/compare/e175b95da070d84029f75ba8a15f5d900fb90704...15693cbd5a5c0f47ee9cc68be9dada39b99c3836 Dreams come true. Thank you!

Re: So, About That Official Blog...

2016-05-08 Thread Adrian Matoga via Digitalmars-d
On Friday, 6 May 2016 at 13:47:48 UTC, Adam D. Ruppe wrote: On Friday, 6 May 2016 at 13:34:02 UTC, Jack Stouffer wrote: Using JS for an eye candy feature on the internet is not "outrageous". It's not like with JS turned off the code would be displayed with no formatting and in sans-serif.

Re: Post-DConf brunch?

2016-05-07 Thread Adrian Matoga via Digitalmars-d
On Saturday, 7 May 2016 at 08:55:50 UTC, Joseph Rushton Wakeling wrote: Hello all, For anyone who's still in town and fancies grabbing a nice late breakfast/early lunch in a nice Berlin food place, I'll be doing my usual Saturday morning thing of dropping by this cafe/restaurant Cool! I'll

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

2016-05-06 Thread Adrian Matoga via Digitalmars-d
On Friday, 6 May 2016 at 20:59:29 UTC, John Colvin wrote: On Friday, 6 May 2016 at 14:57:59 UTC, Chris wrote: On Friday, 6 May 2016 at 14:53:15 UTC, Jonathan M Davis wrote: [...] Facebook have their European headquarters in Dublin. Maybe they'd be willing to sponsor DConf2017 (there are

Re: With statement extension

2016-04-28 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 27 April 2016 at 18:34:18 UTC, Artur Skawina wrote: [...] void foo (Matrix matrix, SameType e1, SameType e2) { ref M() { return matrix.rawArr; } ref Ex1() { return e1.someProperties.someModulusX; } ref Ey1() { return e1.someProperties.someModulusY; }

Re: Anonymous structure

2016-04-19 Thread Adrian Matoga via Digitalmars-d-learn
On Monday, 18 April 2016 at 15:59:11 UTC, Steven Schveighoffer wrote: I wonder if it makes a difference for layout. So for example: struct T { struct { int x; ubyte y; } ubyte z; } If there is padding inserted between y and z. There isn't. T.init.z.offsetof -

Re: The day before DConf 2016

2016-04-08 Thread Adrian Matoga via Digitalmars-d
On Thursday, 7 April 2016 at 18:13:16 UTC, Mike Parker wrote: I'm flying in to Berlin late on May 2nd. I'll be staying at the Hotel Ibis, slated to be the "unofficial hangout place" according to the DConf site. I'm curious who else will be in the area on the 3rd. I'm usually an explorer when I

Re: Joining AliasSeq/TypeTuple s

2016-03-30 Thread Adrian Matoga via Digitalmars-d-learn
On Tuesday, 29 March 2016 at 10:06:43 UTC, Adrian Matoga wrote: (...) Another version that doesn't misbehave if first and second are of different lengths: import std.meta : AliasSeq; template RR(A...) { template With(B...) { static if (A.length == 0 || B.length ==

Re: Joining AliasSeq/TypeTuple s

2016-03-29 Thread Adrian Matoga via Digitalmars-d-learn
On Tuesday, 29 March 2016 at 09:33:40 UTC, Voitech wrote: Hi, i want to join two or more tupples in to one, with mixing the indexes like roundRobin but in compile time. unittest{ import std.meta; alias first=AliasSeq!(int, string,bool); alias second=AliasSeq!("abc","def","ghi"); alias

Re: Template mixins and struct constructors

2016-03-03 Thread Adrian Matoga via Digitalmars-d-learn
On Wednesday, 2 March 2016 at 20:39:57 UTC, Adam D. Ruppe wrote: On Wednesday, 2 March 2016 at 12:27:04 UTC, Adrian Matoga wrote: Is it by design or is it a bug? And, if it is by design, what is the reason for that? That's by design. It allows you to override names from a template mixin like

Re: Template mixins and struct constructors

2016-03-02 Thread Adrian Matoga via Digitalmars-d-learn
On Wednesday, 2 March 2016 at 14:36:59 UTC, Daniel Kozak wrote: OK maybe this one: template AddField(T) { T b; this(Args...)(T b, auto ref Args args) { this.b = b; this(args); } this(int a) { this.a = a; } } struct Bar { int a; mixin

Re: Template mixins and struct constructors

2016-03-02 Thread Adrian Matoga via Digitalmars-d-learn
On Wednesday, 2 March 2016 at 12:48:47 UTC, Daniel Kozak wrote: On Wednesday, 2 March 2016 at 12:27:04 UTC, Adrian Matoga wrote: (...) You can use string mixins: template AddField(T) { enum AddField = T.stringof ~ ` b; this(Args...)(` ~ T.stringof ~ ` b, auto ref Args args)

Re: Dconf gets a new logo

2016-03-02 Thread Adrian Matoga via Digitalmars-d-announce
On Wednesday, 2 March 2016 at 03:37:48 UTC, Andrei Alexandrescu wrote: Many thanks to https://github.com/aG0aep6G who contributed the DConf 2016 logo (the Berlin tower https://github.com/D-Programming-Language/dconf.org/pull/95). After discussing it with Sociomantic, they proposed a new one

Template mixins and struct constructors

2016-03-02 Thread Adrian Matoga via Digitalmars-d-learn
I can do this: struct Foo { int a; string b; this(int a) { this.a = a; } this(Args...)(string b, auto ref Args args) { this.b = b; this(args); } } unittest { auto foo1 = Foo(5); auto foo2 = Foo("foo", 15); } However, the following code is invalid:

Re: Member Access Based On A Runtime String

2016-03-01 Thread Adrian Matoga via Digitalmars-d-learn
On Tuesday, 1 March 2016 at 08:53:20 UTC, Adrian Matoga wrote: static if (is(Q : T)) { Oops, should be T : Q

Re: Member Access Based On A Runtime String

2016-03-01 Thread Adrian Matoga via Digitalmars-d-learn
On Tuesday, 1 March 2016 at 05:05:40 UTC, Jack Stouffer wrote: In Python, I can do this: my_obj = Obj() string_from_func = func() setattr(my_obj, string_from_func, 100) Say func() returns "member1" or "member2", the setattr would then set either one of those to 100. Is there any

Re: Can I get more opinions on increasing the logo size on the site please

2016-02-23 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 10 February 2016 at 20:25:05 UTC, anonymous wrote: On 10.02.2016 17:49, Ola Fosheim Grøstad wrote: If you guys are going to create a new logo based on the old one, you probably should clear it with the original creator. On his website he has give us use rights for non-commercial

Re: is(some template instantiation) is true, but the actual instantiation fails

2016-01-30 Thread Adrian Matoga via Digitalmars-d-learn
On Friday, 29 January 2016 at 23:44:56 UTC, Basile B. wrote: Haven't you seen my answer about constraint ? If you put a constraint on your function template then invalid instantiations are rejected. I mean... this language feature is not just ornamental... What do you think constraints are

Re: is(some template instantiation) is true, but the actual instantiation fails

2016-01-30 Thread Adrian Matoga via Digitalmars-d-learn
On Saturday, 30 January 2016 at 00:16:21 UTC, Ali Çehreli wrote: > https://issues.dlang.org/show_bug.cgi?id=15623 As I noted on the bug report, they are work when moved from module scope to inside a function (e.g. main()). At least there's that workaround... Ali Thanks a lot! Now I can

Re: reduce -> fold?

2016-01-29 Thread Adrian Matoga via Digitalmars-d
On Friday, 29 January 2016 at 12:08:01 UTC, Andrei Alexandrescu wrote: As has been discussed before there's been discussion about std.algorithm.reduce taking the "wrong" order of arguments (its definition predates UFCS). I recall the conclusion was there'd be subtle ambiguities if we worked

is(some template instantiation) is true, but the actual instantiation fails

2016-01-29 Thread Adrian Matoga via Digitalmars-d-learn
Code: struct HasFoo { void foo() {} } struct NoFoo {} struct CallsFoo(T) { T t; void bar() { t.foo(); } } static assert(is(CallsFoo!HasFoo)); alias Bar = CallsFoo!HasFoo; static assert(is(CallsFoo!NoFoo)); // (1) //alias Baz = CallsFoo!NoFoo; // (2) This

Re: is(some template instantiation) is true, but the actual instantiation fails

2016-01-29 Thread Adrian Matoga via Digitalmars-d-learn
On Friday, 29 January 2016 at 16:36:01 UTC, Steven Schveighoffer wrote: On 1/29/16 10:28 AM, Adrian Matoga wrote: Code: struct HasFoo { void foo() {} } struct NoFoo {} struct CallsFoo(T) { T t; void bar() { t.foo(); } } static assert(is(CallsFoo!HasFoo)); alias Bar =

Re: GDC Explorer Site Update

2016-01-26 Thread Adrian Matoga via Digitalmars-d-announce
On Monday, 25 January 2016 at 23:08:32 UTC, Iain Buclaw wrote: http://explore.dgnu.org/ Nice! Is there a way to override the default '-Og'? It seems that now Currently I cannot see any difference Now supports 12 different architectures from ARM to SystemZ! (not including -m32 or any

Re: GDC Explorer Site Update

2016-01-26 Thread Adrian Matoga via Digitalmars-d-announce
On Tuesday, 26 January 2016 at 10:17:37 UTC, Adrian Matoga wrote: Nice! Is there a way to override the default '-Og'? It seems that now Currently I cannot see any difference Oops, pressed "Send" too quickly. Should be: I cannot see any difference in the output when I enter various

Re: how to allocate class without gc?

2016-01-26 Thread Adrian Matoga via Digitalmars-d-learn
On Tuesday, 26 January 2016 at 01:09:50 UTC, Igor wrote: Is there any examples that shows how to properly allocate an object of a class type with the new allocators and then release it when desired? There's an example of class object allocation in the std.experimental.allocator docs: //

Re: LDC 0.17.0-beta1 has been released!

2016-01-18 Thread Adrian Matoga via Digitalmars-d-announce
On Thursday, 14 January 2016 at 20:33:30 UTC, Kai Nacke wrote: LDC 0.17.0-beta1, the LLVM-based D compiler, is available for download! This release is based on the 2.068.2 frontend and standard library and supports LLVM 3.5-3.7. Excellent! Works great so far (Linux x86_64). Any chance of

Re: Logo for D

2016-01-18 Thread Adrian Matoga via Digitalmars-d-announce
On Monday, 18 January 2016 at 10:28:48 UTC, Guillaume Piolat wrote: On Saturday, 16 January 2016 at 17:55:13 UTC, karabuta wrote: How do you see it? http://amazingws.0fees.us/wp-content/uploads/2016/01/dlang2.png Many variants are on the way. The current logo is very good and there is value

Re: Distributed Memory implementation

2016-01-18 Thread Adrian Matoga via Digitalmars-d
On Monday, 18 January 2016 at 05:59:15 UTC, tcak wrote: I, due to a need, will start implementation of distributed memory system. Idea is that: Let's say you have allocated 1 GiB space in memory. This memory is blocked into 4 KiB. After some reservation, and free operations, now only the

Re: Hash Tables in D

2016-01-07 Thread Adrian Matoga via Digitalmars-d-announce
On Sunday, 3 January 2016 at 19:29:05 UTC, Martin Nowak wrote: There is a bug. You should never do this b/c of iterator/range invalidation. foreach (key; aa.keys) aa.remove(key); I've recently hit this when trying to remove some of the elements from an AA while iterating over it. It's

Re: Socket - handling large numbers of incoming connections

2015-12-21 Thread Adrian Matoga via Digitalmars-d-learn
On Monday, 21 December 2015 at 21:32:55 UTC, Jakob Jenkov wrote: My server uses "poll" for that. Okay, how does that work? How do I use "poll" in D? Link? Code example? The same as in C [1]. Just change #include to import core.sys.posix.poll; [1] http://linux.die.net/man/2/poll

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

2015-12-21 Thread Adrian Matoga via Digitalmars-d
On Wednesday, 16 December 2015 at 21:05:27 UTC, Andrei Alexandrescu wrote: I was looking at https://github.com/D-Programming-Language/dlang.org/pull/1169 and that bold sans serif proportional text for the code is just... well let's say it's time to replace it. What would be a good code font

Re: Redesign of dlang.org

2015-12-19 Thread Adrian Matoga via Digitalmars-d
On Saturday, 19 December 2015 at 14:33:35 UTC, Jacob Carlborg wrote: Thoughts? Excellent, both for increasing the apparent brand value for newcomers and for reducing frustration of existing users. Minimalistic, modern, professional and consistent look & feel, easy to read and navigate -

Re: We need better documentation for functions with ranges and templates

2015-12-15 Thread Adrian Matoga via Digitalmars-d
On Tuesday, 15 December 2015 at 01:10:01 UTC, Chris Wright wrote: This reminds me of the Tango strategy for this kind of thing. tango.core.Array was arranged like this: version(TangoDoc) { /** Documentation comment. */ bool isSameLangth(Range1, Range2)(Range1 r1, Range2 r2) { return

Re: We need better documentation for functions with ranges and templates

2015-12-15 Thread Adrian Matoga via Digitalmars-d
On Tuesday, 15 December 2015 at 16:12:18 UTC, Chris Wright wrote: On Tue, 15 Dec 2015 09:09:43 +, Adrian Matoga wrote: Fantastic example of why this strategy should be just banned. Just as well I wasn't recommending it as a long-term solution. I was more offering it as additional

Re: How to return user name from vibed session?

2015-12-10 Thread Adrian Matoga via Digitalmars-d-learn
On Thursday, 10 December 2015 at 11:36:20 UTC, Suliman wrote: Vibed have method get for user session http://vibed.org/api/vibe.http.session/SessionStore I set user name for session like this: req.session.set("username", "admin"); But I can't understand how to get user name from it: abstract

  1   2   >