Re: Vtable for virtual functions in D

2018-04-02 Thread sarn via Digitalmars-d
On Thursday, 8 March 2018 at 22:07:24 UTC, sarn wrote: On Thursday, 8 March 2018 at 04:37:08 UTC, Mike Franklin wrote: Nice! I was thinking about something almost exactly like this recently since 2.079.0 has features to further decouple the language from the runtime. It would be nice to read

Invading^W The Sydney C++ Meetup

2018-04-02 Thread sarn via Digitalmars-d
This feels like a long shot, but I figure it's worth a try. I'll be at the Sydney C++ Meetup this Thursday (and other Thursdays, no promises). If anyone lurking here is in Sydney and wants to talk about D with someone, come say hi. (I'm the guy with long brown hair and should be easy to spot

Re: Invading^W The Sydney C++ Meetup

2018-04-02 Thread sarn via Digitalmars-d
On Monday, 2 April 2018 at 07:46:08 UTC, Nicholas Wilson wrote: We could possibly do what the europeans were considering with a quarterly meet up (btw what happened to that?). I'd be up for an occasional event like that. Maybe it's easier to start with an online event (Google Hangouts or some

Re: Vtable for virtual functions in D

2018-04-03 Thread sarn via Digitalmars-d
On Tuesday, 3 April 2018 at 00:22:52 UTC, Mike Franklin wrote: I'm curious about this comment in the code: Unfortunately, "protected" doesn't work, so a lot of members end up being public. This seems to just be an oversight in the language, so maybe it will change in future versions of D. W

Re: Invading^W The Sydney C++ Meetup

2018-04-03 Thread sarn via Digitalmars-d
On Tuesday, 3 April 2018 at 01:10:45 UTC, finalpatch wrote: I will be presenting the second talk there, so should be even easier to spot. The one about template metaprogramming? Nice, I'm looking forward to that one.

Re: Using D without libphobos

2018-04-26 Thread sarn via Digitalmars-d
On Thursday, 26 April 2018 at 03:04:55 UTC, A. Nicholi wrote: I am not sure if this is possible though I think you've got the technical answer already (just don't link in phobos2) but I'll add my 2c that Phobosless programming isn't just possible but realistically doable. It's a shame to go

Re: Found on proggit: Krug, a new experimental programming language, compiler written in D

2018-04-26 Thread sarn via Digitalmars-d
On Friday, 27 April 2018 at 00:03:34 UTC, H. S. Teoh wrote: Actually, Turing-complete *does* mean it can do anything... well, anything that can be done by a machine, that is. No, it means there's some *abstract mapping* between what a thing can do and what any Turing machine can do. That soun

Re: Found on proggit: Krug, a new experimental programming language, compiler written in D

2018-04-26 Thread sarn via Digitalmars-d
On Friday, 27 April 2018 at 04:06:52 UTC, Nick Sabalausky (Abscissa) wrote: One of the items on my bucket list is to write a "CS Theory for Programmers" book that actually fills in all this stuff, along with going easy on the math-theory syntax that you can't realistically expect programmers to

Re: Using D without libphobos

2018-04-28 Thread sarn via Digitalmars-d
On Saturday, 28 April 2018 at 10:36:03 UTC, A. Nicholi wrote: Right. So there isn’t anything in core.* that would be in libphobos, only D runtime? And std.* depends on both, that is correct? Just want to be sure there aren’t edge cases or exceptions, it would be a handy rule of thumb. That's

D's Destructors are What Scott Meyers Warned Us About

2018-05-22 Thread sarn via Digitalmars-d
(I'm referring to Scott's 2014 DConf talk: https://www.youtube.com/watch?v=KAWA1DuvCnQ) I was actually preparing a DIP about this when Manu posted to the forums about his own related problems with C++ interop. I traced a bug in some of my D code to my own misunderstanding of how D's destruct

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-23 Thread sarn via Digitalmars-d
On Wednesday, 23 May 2018 at 19:28:28 UTC, Paul Backus wrote: On Wednesday, 23 May 2018 at 01:59:50 UTC, sarn wrote: The one other usage of these low-level destructor facilities is checking if a type is a plain old data struct. This is an important special case for some code, but everyone seem

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-23 Thread sarn via Digitalmars-d
On Wednesday, 23 May 2018 at 02:13:13 UTC, rikki cattermole wrote: I would consider the current state with classes a bug. So ticket please, it should not require a DIP to change (although Walter may disagree). Unfortunately, the way __dtor and __xdtor work for classes can't be changed without

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-23 Thread sarn via Digitalmars-d
On Wednesday, 23 May 2018 at 13:12:57 UTC, Steven Schveighoffer wrote: On 5/22/18 9:59 PM, sarn wrote: * Some code uses __dtor as a way to manually run cleanup code on an object that will be used again.  Putting this cleanup code into a normal method will cause fewer headaches. Using __dtor i

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-23 Thread sarn via Digitalmars-d
On Wednesday, 23 May 2018 at 15:43:31 UTC, Steven Schveighoffer wrote: Coincidentally, this JUST changed due to a different reason: https://github.com/dlang/druntime/pull/2178 Please file an enhancement request. I still think it could be better, so I added a further issue: https://issues.dla

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-25 Thread sarn via Digitalmars-d
:18:46 UTC, Manu wrote: On 23 May 2018 at 15:47, sarn via Digitalmars-d wrote: On Wednesday, 23 May 2018 at 02:13:13 UTC, rikki cattermole wrote: I would consider the current state with classes a bug. So ticket please, it should not require a DIP to change (although Walter may disagree

Re: Draft for DIP concerning destroy is up.

2018-05-25 Thread sarn via Digitalmars-d
On Friday, 25 May 2018 at 21:01:16 UTC, Mike Franklin wrote: On Friday, 25 May 2018 at 20:08:23 UTC, 12345swordy wrote: https://github.com/dlang/DIPs/pull/120 Feedback would be very appreciated. I was under the impression that Andrei's ProtoObject was supposed to remedy that: https://forum

Re: Draft for DIP concerning destroy is up.

2018-05-25 Thread sarn via Digitalmars-d
Just had a thought: attributes are inferred for templates, so maybe the ProtoObject could have a templated empty destructor. I don't think this would work with the existing destructor implementation, but it least it could be possible.

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-27 Thread sarn via Digitalmars-d
On Sunday, 27 May 2018 at 21:11:42 UTC, 12345swordy wrote: On Sunday, 27 May 2018 at 18:55:41 UTC, Mike Franklin wrote: And see this talk for a demonstration of the benefits https://www.youtube.com/watch?v=endKC3fDxqs Mike Can you actually reply to me instead of saying "read/watch this"? I'

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-27 Thread sarn via Digitalmars-d
On Sunday, 27 May 2018 at 09:55:56 UTC, Mike Franklin wrote: TypeInfo has become my nemesis. I've been trying to replace runtime hooks that depend on TypeInfo with templates that can get their information at compile-time, but I'm running into all sorts of problems. e.g. Did you know array.len

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

2018-05-27 Thread sarn via Digitalmars-d
On Sunday, 27 May 2018 at 13:44:40 UTC, Mike Franklin wrote: I don't know what's happening with this DIP, but I've recently encountered a real-world problem for which there is no palatable workaround that this DIP would likely solve: https://github.com/dlang/druntime/pull/2184#pullrequestrevie

Re: SecureD Futures (v2.0)

2018-05-27 Thread sarn via Digitalmars-d
On Sunday, 27 May 2018 at 10:27:45 UTC, Adam Wilson wrote: struct cryptoHeader { ubyte hdrVersion; // The version of the header ubyte encAlg; // The encryption algorithm used ubyte hashAlg; // The hash algorithm used uint kdfIters; // The number of PBKDF2 iterati

Re: SecureD Futures (v2.0)

2018-05-27 Thread sarn via Digitalmars-d
On Monday, 28 May 2018 at 02:25:20 UTC, Adam Wilson wrote: I like it. But it does require more space. We need three salts and three lengths in the header. One for the PBKDF2 KDK, one for the MAC key, and one for the encryption key. HKDF-Expand doesn't need a salt. You just need one salt to ma

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-27 Thread sarn via Digitalmars-d
On Sunday, 27 May 2018 at 22:27:52 UTC, sarn wrote: I've been thinking this through a bit, and here's what I've got so far: Here's a tweak that should be implementable without any language changes: Instead of trying to detect an empty destructor, we use a UDA on the class --- call it BaseOb

Re: SecureD Futures (v2.0)

2018-05-28 Thread sarn via Digitalmars-d
On Monday, 28 May 2018 at 06:22:02 UTC, Adam Wilson wrote: On 05/27/2018 08:52 PM, sarn wrote: On Monday, 28 May 2018 at 02:25:20 UTC, Adam Wilson wrote: I like it. But it does require more space. We need three salts and three lengths in the header. One for the PBKDF2 KDK, one for the MAC key,

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-28 Thread sarn via Digitalmars-d
On Monday, 28 May 2018 at 20:13:47 UTC, 12345swordy wrote: How is __vdtor is going to be called, via destroy or via directly? Code using destroy() can still use destroy(). Otherwise, __vdtor would be callable in the same way that __dtor and __xdtor are. The plan is to have a better, safer,

Re: SecureD Futures (v2.0)

2018-05-28 Thread sarn via Digitalmars-d
On Monday, 28 May 2018 at 07:52:43 UTC, Adam Wilson wrote: I understand that. Sorry, not for nothing, but you obviously don't. For starters, if you were familiar with the key derivation tools available 24hrs ago, you wouldn't have come up with PBKDF2 on PBKDF2. I suggest slowing down a lit

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-30 Thread sarn via Digitalmars-d
On Monday, 28 May 2018 at 22:53:03 UTC, 12345swordy wrote: Interesting... You don't mind me asking your assistance on writing DIP on this? I have one set up already, and I needed help as 1.) This is my first time writing a DIP 2.) I don't know what main course of action to take regarding this

Re: Compilation is taking a ton of memory

2018-06-27 Thread sarn via Digitalmars-d
On Wednesday, 27 June 2018 at 16:00:37 UTC, Mario Silva wrote: Any tips on how to code in a way that minimizes both compilation times and memory consumption when compiling? Here are my tips. I'd love to hear more from others. * Try to reduce imports. E.g., say you use a lot of stuff from st

Re: Compilation is taking a ton of memory

2018-06-28 Thread sarn via Digitalmars-d
On Thursday, 28 June 2018 at 16:24:07 UTC, H. S. Teoh wrote: I continue to use SCons for my D projects. For dub dependencies, I just create a fake empty dub project with declared dependencies and run that separately for refreshing dependencies, but the actual compiling and linking is handled b

Re: D's Destructors are What Scott Meyers Warned Us About

2018-07-08 Thread sarn via Digitalmars-d
On Monday, 9 July 2018 at 01:19:28 UTC, Mike Franklin wrote: In the context of your blog post at https://theartofmachinery.com/2018/05/27/cpp_classes_in_betterc.html, I'm wondering if the changes in 2.081 help matters at all: I'm wondering if any of the changes in 2.081 improves the situation he

Re: std.experimental.collections.rcstring and its integration in Phobos

2018-07-18 Thread sarn via Digitalmars-d
On Wednesday, 18 July 2018 at 12:03:02 UTC, Eugene Wissner wrote: Therefore it shouldn't compile at all, but rcstring("ä")[].split("|") or rcstring("ä").byCodePoint.split("|") +1 to requiring an explicit byCodeUnit or whatever. For every "obvious" way to interpret a string as a range, you c

Re: Updating D beyond Unicode 2.0

2018-09-22 Thread sarn via Digitalmars-d
On Saturday, 22 September 2018 at 12:37:09 UTC, Steven Schveighoffer wrote: But aren't some (many?) Chinese/Japanese characters representing whole words? -Steve Kind of hair-splitting, but it's more accurate to say that some Chinese/Japanese words can be written with one character. Like ho

Re: Updating D beyond Unicode 2.0

2018-09-22 Thread sarn via Digitalmars-d
On Sunday, 23 September 2018 at 00:18:06 UTC, Adam D. Ruppe wrote: I have seen Japanese D code before on twitter, but cannot find it now (surely because the search engines also share this bias). You can find a lot more Japanese D code on this blogging platform: https://qiita.com/tags/dlang Her

Re: Updating D beyond Unicode 2.0

2018-09-23 Thread sarn via Digitalmars-d
On Sunday, 23 September 2018 at 06:53:21 UTC, Shachar Shemesh wrote: On 23/09/18 04:29, sarn wrote: You can find a lot more Japanese D code on this blogging platform: https://qiita.com/tags/dlang Here's the most recent post to save you a click: https://qiita.com/ShigekiKarita/items/9b3aa8f7168

Re: Updating D beyond Unicode 2.0

2018-09-27 Thread sarn via Digitalmars-d
On Thursday, 27 September 2018 at 16:34:37 UTC, aliak wrote: On Thursday, 27 September 2018 at 13:59:48 UTC, Shachar Shemesh wrote: On 27/09/18 16:38, aliak wrote: The point was that being able to use non-English in code is demonstrably both helpful and useful to people. Norwegian happens to b

Re: Updating D beyond Unicode 2.0

2018-09-28 Thread sarn via Digitalmars-d
On Friday, 28 September 2018 at 11:37:10 UTC, Dukc wrote: It's easy to miss a part of a post sometimes. That's very true, and it's always good to give people the benefit of the doubt. But most people are able to post constructively here without * Abrasively and condescendingly declaring ot

Re: Quick C bindings

2018-09-28 Thread sarn via Digitalmars-d
On Friday, 28 September 2018 at 16:39:14 UTC, Márcio Martins wrote: What are you guys using these days to generate bindings? Writing them by hand is easy if the library doesn't use the preprocessor much. I often do that for simple jobs. dpp supports preprocessor directives (because it actua

Re: Need some vibe.d hosting advice

2017-08-12 Thread sarn via Digitalmars-d
On Friday, 11 August 2017 at 13:06:54 UTC, aberba wrote: How would you do it if you were using vibe.d? Depends on who wants it built. I do consulting, so let me answer that way. "I don't want to think about ops and scalability and availability at all!" Then you'll have to pay a premium for

Re: D's SwitchStatement accepts statements with ridiculous semantics

2017-09-29 Thread sarn via Digitalmars-d
On Friday, 29 September 2017 at 09:56:17 UTC, Dukc wrote: On Friday, 29 September 2017 at 09:12:54 UTC, Don Clugston wrote: Guess what this prints My guess is it prints "1". By "guess" I mean it, I did not test! Anyway reminds me a lot of very badly used gotos. Yeah, it's a lot like Duff's

Re: Proposal: Object/?? Destruction

2017-10-05 Thread sarn via Digitalmars-d
On Thursday, 5 October 2017 at 15:23:26 UTC, Seb wrote: I think I can state the opinion of many D users here: I don't mind whether it will be curly braces or round parentheses - the important thing is that we will be able to use it in the foreseeable future :) All my +1s. Let's leave syntax de

Re: Multiline string literal improvements

2017-10-10 Thread sarn via Digitalmars-d
On Tuesday, 10 October 2017 at 21:38:41 UTC, captaindet wrote: string a = |q{ firstLine(); if (cond) { secondLine() }   }; you could write your own string processing function according to your needs FWIW

Re: Proposal: Object/?? Destruction

2017-10-14 Thread sarn via Digitalmars-d
On Saturday, 14 October 2017 at 22:20:46 UTC, Q. Schroll wrote: Therefore, and because of brackets, you can distinguish f(1, 2) from f([1, 2]). But in f([1, 2]), it's ambiguous (just by parsing) whether [1, 2] is a tuple literal or a dynamic array literal. You'd need to use a prefix or somet

Re: Proposal: Object/?? Destruction

2017-10-16 Thread sarn via Digitalmars-d
On Sunday, 15 October 2017 at 15:19:21 UTC, Q. Schroll wrote: On Saturday, 14 October 2017 at 23:20:26 UTC, sarn wrote: On Saturday, 14 October 2017 at 22:20:46 UTC, Q. Schroll wrote: Therefore, and because of brackets, you can distinguish f(1, 2) from f([1, 2]). But in f([1, 2]), it's ambigu

Re: Proposal: Support for objects in switch statements

2017-11-07 Thread sarn via Digitalmars-d
On Monday, 6 November 2017 at 10:10:29 UTC, Atila Neves wrote: Checking for types at runtime is a code smell in OOP. Sometimes necessary, especially if doing multiple dispatch, but never done gladly. There's already a way to dispatch on type: virtual functions. Atila More on that: https://w

Re: Looking for a job in USA

2017-11-20 Thread sarn via Digitalmars-d
On Monday, 20 November 2017 at 09:41:16 UTC, codephantom wrote: On Monday, 20 November 2017 at 09:15:15 UTC, Adam Wilson wrote: On 11/17/17 17:31, Indigo wrote: What is your reasoning for coming to the US? You might want to rethink this as America is collapsing. This is news to me, and I liv

Re: TickDuration deprecation

2017-11-22 Thread sarn via Digitalmars-d
On Wednesday, 22 November 2017 at 22:17:05 UTC, Walter Bright wrote: On 11/22/2017 5:45 AM, Steven Schveighoffer wrote: 1. All OS calls with timing requirements use non-floating point to represent how long to sleep. After all a CPU uses discrete math, and the timing implementation is no differe

Re: Alias Vs. Enum?

2018-01-07 Thread sarn via Digitalmars-d
On Sunday, 7 January 2018 at 18:30:17 UTC, Simen Kjærås wrote: Instead of doing that silly dance, alias should simply take values as well. Also, using "enum" for manifest constants makes sense for people familiar with C idiom, but often confuses people coming from different languages.

Re: Memory Dump in D

2018-01-07 Thread sarn via Digitalmars-d
On Sunday, 7 January 2018 at 15:40:36 UTC, H3XT3CH wrote: I need it for windows and linux but primary for windows On *nix this is traditionally called a "core dump". A quick search will get you lots of tutorials. Most distros today disable core dumps with ulimit. Run "help ulimit" and chec

Re: OT: Indexing reordering in the eBay Search Engine

2018-01-21 Thread sarn via Digitalmars-d
On Friday, 19 January 2018 at 23:55:00 UTC, Jon Degenhardt wrote: If anyone is interested in the type of work that goes on in my group at eBay, take a look at this blog post by one of my colleagues: https://www.ebayinc.com/stories/blogs/tech/making-e-commerce-search-faster/ It describes a 25%

Re: Implementing tail-const in D

2018-01-23 Thread sarn via Digitalmars-d
On Tuesday, 23 January 2018 at 09:36:03 UTC, Simen Kjærås wrote: Since tail-const (more correctly called head-mutable) was mentioned here lately (in the 'I closed a very old bug!'[1] thread), I've been racking my brain to figure out what needs doing to make a viable solution. Have you seen Re

Re: Vtable for virtual functions in D

2018-03-06 Thread sarn via Digitalmars-d
On Tuesday, 6 March 2018 at 21:20:22 UTC, Henrik wrote: Does anyone know if D is using the vtable implementation for virtual functions just like most C++ compilers? If yes, can someone explain the advantages of this strategy? A function pointer in C is regarded as expensive because of missing

Re: Vtable for virtual functions in D

2018-03-07 Thread sarn via Digitalmars-d
On Wednesday, 7 March 2018 at 12:49:40 UTC, Guillaume Piolat wrote: If you know enough D maybe you can implement your own virtual functions on top of D structs. It seems no one has made it yet. When I wrote Xanthe a year ago, I rolled my own classes using alias this and explicit vtables: http

Re: Vtable for virtual functions in D

2018-03-08 Thread sarn via Digitalmars-d
On Thursday, 8 March 2018 at 04:37:08 UTC, Mike Franklin wrote: Nice! I was thinking about something almost exactly like this recently since 2.079.0 has features to further decouple the language from the runtime. It would be nice to read a blog post about this technique. Mike I didn't rea

Re: Vtable for virtual functions in D

2018-03-08 Thread sarn via Digitalmars-d
On Thursday, 8 March 2018 at 22:56:27 UTC, Henrik wrote: why do I have to put the @nogc on the constructor and destructor separately? You can make things slightly better by putting @nogc in the struct itself: struct S { @nogc: void member1() { } void member2() { } } But, yea

Re: Multiplayer Game Project

2017-02-09 Thread sarn via Digitalmars-d
I do consulting based in Sydney. Feel free to contact me if you ever need any more help. s...@theartofmachinery.com

Re: Why don't you advertise more your language on Quora etc ?

2017-03-02 Thread sarn via Digitalmars-d
On Thursday, 2 March 2017 at 15:32:26 UTC, bachmeier wrote: On Thursday, 2 March 2017 at 11:10:54 UTC, Martin Tschierschke wrote: I started to learn programming (BASIC) with an traditional home computer in the 80's (Schneider/Amstrad CPC6128). The best thing was, you only needed to switch it o

Re: [NOTABLE PR] First step from traditional to generic runtime

2017-03-02 Thread sarn via Digitalmars-d
On Thursday, 2 March 2017 at 19:32:23 UTC, Andrei Alexandrescu wrote: Worth a look: https://github.com/dlang/druntime/pull/1781. This moves comparison code away from tedious runtime-introspected routines to nice templates. -- Andrei Great news :)

Re: Of the use of unpredictableSeed

2017-03-06 Thread sarn via Digitalmars-d
On Monday, 6 March 2017 at 10:12:09 UTC, Shachar Shemesh wrote: Excuse me if I'm asking a trivial question. Why not just seed it from /dev/urandom? (or equivalent on non-Linux platforms. I know at least Windows has an equivalent). Shachar One reason is that /dev/urandom isn't always availabl

Re: Spotted on twitter: Rust user enthusiastically blogs about moving to D

2017-03-08 Thread sarn via Digitalmars-d
PSA: please don't feed the trolls.

Re: Of the use of unpredictableSeed

2017-03-21 Thread sarn via Digitalmars-d
On Tuesday, 21 March 2017 at 10:27:27 UTC, Andrei Alexandrescu wrote: Thanks Yuxuan, sorry for missing this. Can we have this peer reviewed by 1-2 crypto experts? Thanks! -- Andrei By API, unpredictableSeed() only returns a 32b uint and will never meet crypto standards. Beware of anyone who o

Re: Immovable types

2017-04-18 Thread sarn via Digitalmars-d
On Wednesday, 19 April 2017 at 02:53:18 UTC, Stanislav Blinov wrote: I'd very much like to hear your thoughts on this, good/bad, if it already was proposed, anything. If it's found feasible, I could start a DIP. Destroy, please. I don't have comments about the syntax, but I did want this feat

Re: dmd -betterC

2017-06-20 Thread sarn via Digitalmars-d
On Tuesday, 20 June 2017 at 17:30:43 UTC, Kagamin wrote: You can write a linker wrapper that will do the analysis you want, remove unneeded sections, stub symbols etc, see basic technique at https://theartofmachinery.com/2016/12/18/d_without_runtime.html I keep meaning to write an update to t

Re: Allocation trace

2017-06-26 Thread sarn via Digitalmars-d
On Saturday, 24 June 2017 at 22:15:47 UTC, Andrei Alexandrescu wrote: Hello, does anyone have traces of allocations from real applications? Looking for the sequence of calls to malloc, realloc, and free, e.g.: 0 malloc 128 1 malloc 8192 2 malloc 32 3 free 1 ... Thanks, Andrei On *nix syst

Re: proposed @noreturn attribute

2017-07-08 Thread sarn via Digitalmars-d
On Sunday, 9 July 2017 at 00:16:50 UTC, Walter Bright wrote: We have types that cannot be named (Voldemort types), types that have no type (void), I suppose that types that cannot exist will fill out the edge cases of the menagerie. I assume there is a standard jargon for this - does anyone kn

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

2017-07-27 Thread sarn 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 Like others in this thread have said, it needs more rationale. The rationale only mentions one actual problem: attributes can't be undone

Re: Tristate - wanna?

2016-03-27 Thread sarn via Digitalmars-d
On Saturday, 26 March 2016 at 22:39:58 UTC, Alex Parrill wrote: On Saturday, 26 March 2016 at 22:11:53 UTC, Nordlöw wrote: I can think of many variants of for this. What about { yes, // 1 chance no, // 0 chance likely, // > 1/2 chance unlikely, // < 1/2 chance unknow

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

2016-05-06 Thread sarn via Digitalmars-d
On Friday, 6 May 2016 at 14:53:15 UTC, Jonathan M Davis wrote: Other places would certainly be interesting (e.g. Japan or Australia), and we definitely have devs in such places, but I don't know if we have enough likely attendees in such areas to make them make sense, since picking somewhere wh

Re: The Case Against Autodecode

2016-05-17 Thread sarn via Digitalmars-d
On Tuesday, 17 May 2016 at 09:53:17 UTC, Kagamin wrote: With UTF-8 problems happened on a massive scale in LAMP setups: mysql used latin1 as a default encoding and almost everything worked fine. ^ latin-1 with Swedish collation rules. And even if you set the encoding to "utf8", almost everythi

Re: Preprocessing CSS

2016-05-24 Thread sarn via Digitalmars-d
On Tuesday, 24 May 2016 at 18:47:57 UTC, Andrei Alexandrescu wrote: On 05/24/2016 02:03 PM, Thiez wrote: Does the experience help someone getting a job in the industry? Probably not, again with the same caveat. I speculate experience with one of the other CSS scripting engines would also not

DConf Videos

2016-06-06 Thread sarn via Digitalmars-d
What's the best source of DConf videos at the moment? Are there are any edited versions released? I'd like to share some of my favourite talks.

Re: Google's code ownership

2016-06-30 Thread sarn via Digitalmars-d
On Wednesday, 29 June 2016 at 22:35:03 UTC, qznc wrote: However, I'm not sure if "finding reviewers" is the bottleneck? Not everything applies because Google doesn't host its repo on Github (obviously), but code ownership works very well there. It helps avoid the bystander effect, and encour

Re: Vision for the D language - stabilizing complexity?

2016-07-11 Thread sarn via Digitalmars-d
On Monday, 11 July 2016 at 22:09:11 UTC, Walter Bright wrote: On 7/10/2016 10:07 PM, Ola Fosheim Grøstad wrote: [Snip stuff about Scheme] Scheme is a really nice, elegant language that's fun to hack with, but at the end of the day, if people were writing Nginx, or the Windows kernel, or HFT s

Re: Vision for the D language - stabilizing complexity?

2016-07-13 Thread sarn via Digitalmars-d
On Wednesday, 13 July 2016 at 10:02:58 UTC, Ola Fosheim Grøstad wrote: «Undefined» simply means that such code is not part of the specified language, as in, it is no longer the language covered. The optimizer is an implementation detail, the optimizer is not allowed to change the semantics of t

Re: DConf Videos

2016-07-21 Thread sarn via Digitalmars-d
On Thursday, 21 July 2016 at 13:45:28 UTC, Steven Schveighoffer wrote: On 6/6/16 6:40 AM, sarn wrote: What's the best source of DConf videos at the moment? Are there are any edited versions released? I'd like to share some of my favourite talks. They are starting to arrive! https://twitter

Re: D for competitive programming

2016-07-29 Thread sarn via Digitalmars-d
To add to the list, here are a couple of other online judges that explicitly support D: http://www.spoj.com/ http://judge.u-aizu.ac.jp/onlinejudge/ Of course, if you use a language-agnostic platform like Code Jam, you can do what you like. Project Euler (maths-oriented) and the Matasano Chal

Re: CompileTime performance measurement

2016-09-03 Thread sarn via Digitalmars-d
On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote: I recently implemented __ctfeWriteln. Sounds like pragma msg. How does it compare? https://dlang.org/spec/pragma.html#msg

Re: CompileTime performance measurement

2016-09-03 Thread sarn via Digitalmars-d
On Sunday, 4 September 2016 at 01:53:21 UTC, Stefan Koch wrote: Pragma msg can only print compiletime constants. While __ctfeWriteln can print state while doing CTFE. Thanks, that makes a lot of sense. Just to check, it prints to standard error, right? Also, the issue of non-deterministic c

Re: Critque of Rust's collection types

2016-09-15 Thread sarn via Digitalmars-d
On Thursday, 15 September 2016 at 10:13:47 UTC, cym13 wrote: DoS by collision attack are a form of preimage. The idea is to generate intentional collisions to force heavy computations on serveur side. It only works if finding collisions many collisions for the same hash is cheap which is direct

Re: New encryption block...

2016-10-09 Thread sarn via Digitalmars-d
On Sunday, 9 October 2016 at 20:33:29 UTC, Era Scarecrow wrote: Something coming to mind is the idea of making a small algorithm to be used with other already existing encryption functions to extend the blocksize of encryption with minimal complexity growth. In theory this would extend a block

Re: New encryption block...

2016-10-10 Thread sarn via Digitalmars-d
On Monday, 10 October 2016 at 09:54:32 UTC, Era Scarecrow wrote: The largest portion would be that much like a hash, one small change will change the entire thing rather than a smaller portion (with the original blocksize). The multiple re-arranging and encryption steps is to ensure small chan

Re: Tuple enhancement

2016-10-16 Thread sarn 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); The get method takes the

Re: Linus' idea of "good taste" code

2016-10-26 Thread sarn via Digitalmars-d
On Wednesday, 26 October 2016 at 10:48:34 UTC, Marco Leise wrote: On a more controversial note, I sometimes replace nested blocks of conditionals and loops with flat spaghetti code and goto with verbose labels. There are situations where you can explain straight forward what needs to be done fi

Re: From r/linux: Which language should i use/learn ?

2016-12-11 Thread sarn via Digitalmars-d
On Saturday, 10 December 2016 at 22:55:22 UTC, Chris Wright wrote: It's always a bit weird when people talk about "resources" as a unification of memory, files, sockets, etc. My programs exist to fill memory and then push bits of memory around. At least 99% of my "resource" usage is heap object

Re: Linux Kernel in D?

2016-12-17 Thread sarn via Digitalmars-d
On Friday, 16 December 2016 at 16:12:38 UTC, D.Rex wrote: A D port of the Linux Kernel? https://github.com/whatsthisnow/ProjectD Any thoughts on the project? Depends on how strictly you want to reimplement GNU/Linux, or whether something Posix-y is enough. Anyway, a D "libc" would be reall

Re: Improvement in pure functions specification

2016-12-20 Thread sarn via Digitalmars-d
On Wednesday, 21 December 2016 at 02:27:02 UTC, Andrei Alexandrescu wrote: If it's elidable, it's as good as a bug in the program. Must be either a compile-time error or a special case. -- Andrei I can't see it ending well to make it this kind of special case. For example, one day someone wil