possible bug in std.conv.parse

2014-04-26 Thread ketmar via Digitalmars-d
this code: std.conv.parse!byte(-128) throws error: Overflow in integral conversion. but this is obviously not true, as signed byte can hold such value. the question is: is it bug, or it's intended behavior to limit signed integrals to values which can be safely abs()ed?

Re: possible bug in std.conv.parse

2014-04-26 Thread ketmar via Digitalmars-d
ah, sorry, this is my own fault, there is no bug in parser. what i'm doing is parse!byte(128) and then negating the result. silly me.

Re: possible bug in std.conv.parse

2014-04-26 Thread ketmar via Digitalmars-d
On Sunday, 27 April 2014 at 00:04:15 UTC, ketmar wrote: but this is definetely bug, i think: void main() { import std.stdio : writeln; import std.conv : to; writeln(to!int(29a, 16)); // 666 writeln(to!int(+29a, 16)); // Unexpected '+' when converting from type string base 16 to type int

Re: possible bug in std.conv.parse

2014-04-26 Thread ketmar via Digitalmars-d
ah, i see: if (radix == 10) return parse!Target(s); in Target parse(Target, Source)(ref Source s, uint radix) it cheating a little and using 'general' decimal number parser, which accepts '+' and '-'. for other bases it uses another code though, where '+' and '-' threats as digits, which

Re: Explicit default constructor for structs

2014-04-26 Thread ketmar via Digitalmars-d
On Wednesday, 9 April 2014 at 14:59:35 UTC, Benjamin Thaut wrote: E.g. it could look like this (alternative a new keyword explicit could be introduced, but introduction of new keywords is usually avoided if possible, AFAIK): sorry for not reading the whole post and necroposting, but please,

Re: D For A Web Developer

2014-04-29 Thread ketmar via Digitalmars-d
On Tue, 29 Apr 2014 11:55:11 -0400 Etienne via Digitalmars-d digitalmars-d@puremagic.com wrote: That's funny b/c most people say RoR made them love web development. If the D community could organize itself the same way RoR is around web dev, I doubt any other web scripting language could

Re: D For A Web Developer

2014-04-29 Thread ketmar via Digitalmars-d
On Tue, 29 Apr 2014 14:41:17 + James via Digitalmars-d digitalmars-d@puremagic.com wrote: just show him vibe.d. it's what node.js wants to be, but failed. ;-) signature.asc Description: PGP signature

Re: Google definitely biased…

2014-08-11 Thread ketmar via Digitalmars-d
On Mon, 11 Aug 2014 16:23:19 +0100 Russel Winder via Digitalmars-d digitalmars-d@puremagic.com wrote: Google definitely try to push Go :-) so you mean that Go can't walk on it's own and needs to be constantly pushed by Google so other people will think that it's alive? heh. signature.asc

Re: Setting array length to 0 discards reserved allocation?

2014-08-11 Thread ketmar via Digitalmars-d
On Mon, 11 Aug 2014 07:04:41 + Andrew Godfrey via Digitalmars-d digitalmars-d@puremagic.com wrote: Jonathan is right. what this PR does is changing one (somewhat confusing) terminology to another, even more confusing one. signature.asc Description: PGP signature

Re: Google definitely biased…

2014-08-11 Thread ketmar via Digitalmars-d
On Mon, 11 Aug 2014 19:57:47 + Era Scarecrow via Digitalmars-d digitalmars-d@puremagic.com wrote: Honestly Go looks like an _interesting_ language i'm agree. it just don't fit for me. but I already love D and want it over C++. same for me too. back in D1 times i was not really impressed.

Re: Fun with range deprecations

2014-08-11 Thread ketmar via Digitalmars-d
On Mon, 11 Aug 2014 15:57:50 -0700 H. S. Teoh via Digitalmars-d digitalmars-d@puremagic.com wrote: seems that such deprecations hits even rdmd: trying to compile it now spits two warnings about std.algorithm.splitter cannot be iterated backwards. signature.asc Description: PGP signature

Re: Fun with range deprecations

2014-08-11 Thread ketmar via Digitalmars-d
On Mon, 11 Aug 2014 17:30:42 -0700 H. S. Teoh via Digitalmars-d digitalmars-d@puremagic.com wrote: One possible hack is to make is(typeof(...)) return true for deprecated symbols if compiling with -d, but that would mean changing language semantics with compiler flags, which Walter frowns on.

Re: Fun with range deprecations

2014-08-11 Thread ketmar via Digitalmars-d
On Tue, 12 Aug 2014 00:18:26 + Meta via Digitalmars-d digitalmars-d@puremagic.com wrote: What about modifying is(typeof(...)) to return false for deprecated symbols? btw, we can add 'date' arg do deprecated(), so compiler will spit warnings before that date and rejects deprecated code

Re: Google definitely biased…

2014-08-12 Thread ketmar via Digitalmars-d
On Tue, 12 Aug 2014 20:05:26 +0200 Marco Leise via Digitalmars-d digitalmars-d@puremagic.com wrote: Use the literal search instead, which disables synonyms: sorry, i somehow missed that line. mea culpa. signature.asc Description: PGP signature

Re: Google definitely biased…

2014-08-12 Thread ketmar via Digitalmars-d
On Tue, 12 Aug 2014 20:05:26 +0200 Marco Leise via Digitalmars-d digitalmars-d@puremagic.com wrote: https://www.google.de/search?tbs=li%3A1q=dlang+golang+range+OR+ranges+OR+slice+OR+slices there is no need to specify plural forms, engine is clever enough. besides, many (if not all) sites using

Re: Google definitely biased…

2014-08-13 Thread ketmar via Digitalmars-d
On Wed, 13 Aug 2014 12:34:28 + Chris via Digitalmars-d digitalmars-d@puremagic.com wrote: But you can start to program in standard C99 and be sure that in 99% of all cases it will compile and work. only if the author reads the standard. does average C programmer knows the standard and all

Re: FYI - mo' work on std.allocator

2014-08-13 Thread ketmar via Digitalmars-d
On Wed, 13 Aug 2014 21:27:34 + Brian Schott via Digitalmars-d digitalmars-d@puremagic.com wrote: Both sides of the are identical. it's to REALLY check the flag! ;-) signature.asc Description: PGP signature

Re: const int vs. int const

2014-08-15 Thread ketmar via Digitalmars-d
On Fri, 15 Aug 2014 21:08:08 + Jonathan M Davis via Digitalmars-d digitalmars-d@puremagic.com wrote: I still think that we'd be far better off if all attributes which could apply to a function's return type were illegal on the left-hand side of the function. i completely agree. even if

Re: CaseStatement specification issue

2014-08-15 Thread ketmar via Digitalmars-d
On Fri, 15 Aug 2014 19:46:07 + Sergey Kozyr via Digitalmars-d digitalmars-d@puremagic.com wrote: Let's open doc http://dlang.org/statement#CaseStatement and we'll find some more bugs there: CaseStatement: case ArgumentList : ScopeStatementList ArgumentList: AssignExpression

Re: CaseStatement specification issue

2014-08-15 Thread ketmar via Digitalmars-d
On Sat, 16 Aug 2014 01:31:42 +0200 Timon Gehr via Digitalmars-d digitalmars-d@puremagic.com wrote: What is the problem? This passes DMD's parser. that is the problem: it shouldn't. this has no sense, and it's easy to fix this in grammar itself. signature.asc Description: PGP signature

Re: CaseStatement specification issue

2014-08-15 Thread ketmar via Digitalmars-d
On Sat, 16 Aug 2014 02:20:27 +0200 Timon Gehr via Digitalmars-d digitalmars-d@puremagic.com wrote: What is the problem? This passes DMD's parser. that is the problem: it shouldn't. That's not what you said. that's what i mean. ok, i should write it clear. There is nothing to be 'fixed'.

Re: const int vs. int const

2014-08-16 Thread ketmar via Digitalmars-d
On Sat, 16 Aug 2014 12:23:49 -0700 Walter Bright via Digitalmars-d digitalmars-d@puremagic.com wrote: Yes, and for this case it is not worth it. it worth it. we can fix alot of such things while our userbase is relatively small. we will be doomed to live with this legacy when userbase becomes

Re: Setting array length to 0 discards reserved allocation?

2014-08-17 Thread ketmar via Digitalmars-d
On Thu, 14 Aug 2014 06:46:40 + Andrew Godfrey via Digitalmars-d digitalmars-d@puremagic.com wrote: sorry for the late answer. Don't think I'm being flippant, but I have trouble interpreting such feedback, because D's dynamic array semantics ARE complicated. and it will be even more

Re: Setting array length to 0 discards reserved allocation?

2014-08-17 Thread ketmar via Digitalmars-d
On Sun, 17 Aug 2014 10:32:51 +0300 ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: sorry, i meant THIS code: void foo (int[] a) { a ~= 42; } ... int[] arr; arr ~= 666; foo(arr); assert(arr.length == 2 arr[1] == 42); signature.asc Description: PGP

Re: $100 bounty for help with Windows Service code

2014-08-17 Thread ketmar via Digitalmars-d
On Sun, 17 Aug 2014 22:12:06 + Vladimir Panteleev via Digitalmars-d digitalmars-d@puremagic.com wrote: ah! you stole my money! ;-) signature.asc Description: PGP signature

Re: $100 bounty for help with Windows Service code

2014-08-17 Thread ketmar via Digitalmars-d
On Sun, 17 Aug 2014 23:56:54 + Tyler Jensen via Digitalmars-d digitalmars-d@puremagic.com wrote: try to catch and process exceptions where they may arose. any file operation can throw exception (yes, even innocent-looking writeln(), let alone 'auto fl = File(...)'). also, you don't need to

Re: Why does D rely on a GC?

2014-08-18 Thread ketmar via Digitalmars-d
On Mon, 18 Aug 2014 19:43:13 + maik klein via Digitalmars-d digitalmars-d@puremagic.com wrote: My initial question was why D uses the GC for everything. to avoid unnecessary complications in user source code. GC is necessary for some cool D features (it was noted ealier), and GC is

Re: Why does D rely on a GC?

2014-08-19 Thread ketmar via Digitalmars-d
On Tue, 19 Aug 2014 07:14:17 + ponce via Digitalmars-d digitalmars-d@puremagic.com wrote: I work in such an environment and I tend to agree with you. just replace GC with stub doing only allocs (or use GC.disable) and manage resource freeing manually (or with corresponding templated struct

Re: Why does D rely on a GC?

2014-08-19 Thread ketmar via Digitalmars-d
On Tue, 19 Aug 2014 10:24:07 + ponce via Digitalmars-d digitalmars-d@puremagic.com wrote: seems that i misunderstand you. sorry. signature.asc Description: PGP signature

Re: Why does D rely on a GC?

2014-08-19 Thread ketmar via Digitalmars-d
On Tue, 19 Aug 2014 07:13:45 -0700 Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: One issue with this is e.g. hashtables have no primitive for freeing entries. ah, so don't use built-in AAs. templated class/struct can replace 'em, let with less beauty in declaration.

Re: Why does D rely on a GC?

2014-08-19 Thread ketmar via Digitalmars-d
On Tue, 19 Aug 2014 18:13:27 + bachmeier via Digitalmars-d digitalmars-d@puremagic.com wrote: Java or .NET programmer looking at the language. Java devs complain about Scala. I can't imagine what they'd say about Rust. Java devs can speak?! O_O signature.asc Description: PGP signature

Re: auto ref deduction and common type deduction inconsistency

2014-08-19 Thread ketmar via Digitalmars-d
On Tue, 19 Aug 2014 22:28:25 + Peter Alexander via Digitalmars-d digitalmars-d@puremagic.com wrote: The rule in the spec is The lexically first ReturnStatement determines the ref-ness of [an auto ref] function Why is this? I think it would be more consistent and convenient to be: An

Re: Setting array length to 0 discards reserved allocation?

2014-08-19 Thread ketmar via Digitalmars-d
On Tue, 19 Aug 2014 23:58:57 + Andrew Godfrey via Digitalmars-d digitalmars-d@puremagic.com wrote: In either case, we are passing a reference by value. yes. but passing null class will not allow to call it's methods, and passing null array will. i.e. auto foo (MyClass a) { return

Re: Fixing C-style alias declarations.

2014-08-19 Thread ketmar via Digitalmars-d
On Wed, 20 Aug 2014 00:05:04 + Brian Schott via Digitalmars-d digitalmars-d@puremagic.com wrote: i think that it's time to kill both c-like array declarations and old-style aliases w/o '=' (ok, let 'alias this' live for now). this will solve all problems. signature.asc Description: PGP

Re: User data of epoll event is reported abnormally by epoll_wait.

2014-08-20 Thread ketmar via Digitalmars-d
On Wed, 20 Aug 2014 10:01:05 + blake kim via Digitalmars-d digitalmars-d@puremagic.com wrote: fill bugreport, please. and submit PR if you can. signature.asc Description: PGP signature

Re: auto ref deduction and common type deduction inconsistency

2014-08-20 Thread ketmar via Digitalmars-d
On Wed, 20 Aug 2014 14:44:40 + Peter Alexander via Digitalmars-d digitalmars-d@puremagic.com wrote: Well, the return type is already the common type of all return paths no, it's not. the return type will be taken from the first return statement in code. That doesn't help at all. I want

Re: auto ref deduction and common type deduction inconsistency

2014-08-20 Thread ketmar via Digitalmars-d
On Wed, 20 Aug 2014 15:08:48 + Peter Alexander via Digitalmars-d digitalmars-d@puremagic.com wrote: auto foo() { if (1) return 1; return 2.0; } This returns double. Try for yourself. i wasn't talking about integer promotions, but yes, it works here. and i'm sure that is shouldn't

Re: auto ref deduction and common type deduction inconsistency

2014-08-20 Thread ketmar via Digitalmars-d
On Wed, 20 Aug 2014 16:34:40 + via Digitalmars-d digitalmars-d@puremagic.com wrote: No, the type of (cond ? x : 42) is always `int`, the `ref` already gets lost inside the ternary operator. So in this case, it behaves correctly. it's slightly counterintuitive. yes, this is correct, but D

Re: auto ref deduction and common type deduction inconsistency

2014-08-20 Thread ketmar via Digitalmars-d
On Wed, 20 Aug 2014 18:24:29 + via Digitalmars-d digitalmars-d@puremagic.com wrote: What would `cast(int)` do in this case? just clarifying the intentions. remember that programs are written for humans in the first place, and programs should be easy to read for humans. it's not so hard to

Re: Setting array length to 0 discards reserved allocation?

2014-08-20 Thread ketmar via Digitalmars-d
On Thu, 21 Aug 2014 03:24:35 + Andrew Godfrey via Digitalmars-d digitalmars-d@puremagic.com wrote: maybe just call that slice views? ;-) really, uncommon term will (at least it should ;-) make user to read about that slice views, and reference is something like ah, i know what references is,

Re: Setting array length to 0 discards reserved allocation?

2014-08-20 Thread ketmar via Digitalmars-d
On Thu, 21 Aug 2014 06:53:32 +0300 ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: offtopic: damn it! i will read my messages before posting. i will read my messages before posting. i will read my messages before posting. i will... who i'm trying to cheat?! too bad that we can't edit

Re: Automated source translation of C++ to D

2014-08-21 Thread ketmar via Digitalmars-d
On Thu, 21 Aug 2014 06:35:53 + Joakim via Digitalmars-d digitalmars-d@puremagic.com wrote: i believe that all code that using STL/Boost will not be translated (and this is the majority of C++ code, i think). and only very-very primitive templates can be translated automatically. so maybe i'm

Re: Setting array length to 0 discards reserved allocation?

2014-08-21 Thread ketmar via Digitalmars-d
On Thu, 21 Aug 2014 07:23:34 + Andrew Godfrey via Digitalmars-d digitalmars-d@puremagic.com wrote: slice view sounds odd i agree, i just took the first words that came into my head. ;-) Maybe I should have another look at that - maybe introducing slice first and the slice operator later,

Re: [OT] Re: Redesign of dlang.org

2014-08-21 Thread ketmar via Digitalmars-d
On Thu, 21 Aug 2014 12:09:37 + Dicebot via Digitalmars-d digitalmars-d@puremagic.com wrote: It probably looks good as a landing page for a newcomers but I will annoyed with extra forced navigation very quick through daily usage of the web site. It sacrifices productivity in favor of

Re: Shouldn't have IsAlpha() from std.uni has a different name to avoid confusing from std.ascii?

2014-08-21 Thread ketmar via Digitalmars-d
On Thu, 21 Aug 2014 15:27:46 + MacAsm via Digitalmars-d digitalmars-d@puremagic.com wrote: Any thoughts? I don't know if I'm missing something but two functions (and not methods) with same name is very bad. they doing much the same, but for different character sets. two different names

Re: [OT] Re: Redesign of dlang.org

2014-08-21 Thread ketmar via Digitalmars-d
On Thu, 21 Aug 2014 17:12:37 + via Digitalmars-d digitalmars-d@puremagic.com wrote: Don't forget that programmers are hipsters, and we need to take care of our image. i'm glad that i'm not a programmer then. signature.asc Description: PGP signature

Re: Automated source translation of C++ to D

2014-08-22 Thread ketmar via Digitalmars-d
On Fri, 22 Aug 2014 08:29:52 + David Nadlinger via Digitalmars-d digitalmars-d@puremagic.com wrote: Hence the name magicport? magic is not easy, contrary to widespread beliefs. ;-) signature.asc Description: PGP signature

Re: RFC: std.json sucessor

2014-08-22 Thread ketmar via Digitalmars-d
On Sat, 23 Aug 2014 02:23:25 + deadalnix via Digitalmars-d digitalmars-d@puremagic.com wrote: I haven't played with your code yet, so I may be asking for somethign that already exists, but did you had a look to jsvar by Adam ? jsvar using opDispatch, and Sönke wrote: - No opDispatch()

Re: Unused variables and bugs

2014-08-22 Thread ketmar via Digitalmars-d
On Fri, 22 Aug 2014 21:46:44 + bearophile via Digitalmars-d digitalmars-d@puremagic.com wrote: What better alternative do you suggest in practice? don't declare unused variables. really, this is extremely easy. my 15+ years of expirience in writing projects of different scale shows that good

Re: Unused variables and bugs

2014-08-22 Thread ketmar via Digitalmars-d
On Sat, 23 Aug 2014 03:50:13 + via Digitalmars-d digitalmars-d@puremagic.com wrote: - versioning refactor it, so that shared code goes to separate functions. nested functions especially helpful here. i'm used to this GCC extension. - debugging (commenting out debugging code) why comment it

Re: Unused variables and bugs

2014-08-23 Thread ketmar via Digitalmars-d
On Sat, 23 Aug 2014 15:48:03 + Idan Arye via Digitalmars-d digitalmars-d@puremagic.com wrote: How about unused arguments in lambda expressions? also, make compiler accept 'auto' in lambdas. i'm sure it should. and it should accept 'auto' in foreach(). it should also allow foreach like this:

Re: Interfacing D with C and C++

2014-08-23 Thread ketmar via Digitalmars-d
On Sun, 24 Aug 2014 04:31:55 + Scott Wilson via Digitalmars-d digitalmars-d@puremagic.com wrote: there is NO support for instantiating C++ templates in D code. and you can't write C++ template specialization code in D. signature.asc Description: PGP signature

Re: Interfacing D with C and C++

2014-08-23 Thread ketmar via Digitalmars-d
On Sun, 24 Aug 2014 05:15:14 + Scott Wilson via Digitalmars-d digitalmars-d@puremagic.com wrote: The D code is not instantiating (but I may be wrong). sorry, it was my fault. i somehow misread your code. signature.asc Description: PGP signature

Re: Relaxing the definition of isSomeString and isNarrowString

2014-08-24 Thread ketmar via Digitalmars-d
On Sun, 24 Aug 2014 18:28:51 + via Digitalmars-d digitalmars-d@puremagic.com wrote: and D parser unconditionally assumes that source code is in UTF-8 too. which makes great PITA for me: i can't use strings (any string-like literals, actually) in Latin-1 (for example) without ugly

Re: Unused variables and bugs

2014-08-24 Thread ketmar via Digitalmars-d
On Sun, 24 Aug 2014 19:39:31 + Idan Arye via Digitalmars-d digitalmars-d@puremagic.com wrote: Currenly foreach does not accept type-without-argument - `foreach(int; [1,2,3])` is a compiler error - so that's much bigger a change than adding argument-less type inference for lambdas. ah,

Re: Some Notes on 'D for the Win'

2014-08-24 Thread ketmar via Digitalmars-d
On Sun, 24 Aug 2014 23:15:53 -0400 Nick Sabalausky via Digitalmars-d digitalmars-d@puremagic.com wrote: Or even if not, at the very least it would get people to knock it off with the appeal-to-authority language selection arguments ;) yeah, sometimes but look at FB! they using D and hired it's

Re: Relaxing the definition of isSomeString and isNarrowString

2014-08-24 Thread ketmar via Digitalmars-d
On Mon, 25 Aug 2014 01:23:57 +0400 Dmitry Olshansky via Digitalmars-d digitalmars-d@puremagic.com wrote: Just make a function that translates UTF-8 into Latin-1, use ubyte for Latin-1. i don't want ubytes. but there is nothing bad with assigning latin-1 text to ordinary string after conversion.

Re: How D addresses the problem of Extending and/or Embedding other languages ?

2014-08-25 Thread ketmar via Digitalmars-d
On Mon, 25 Aug 2014 07:18:50 + Brost via Digitalmars-d digitalmars-d@puremagic.com wrote: for example how do you correctly expose a given D data structure to a scripting language of your choice ? using LuaD, for example: http://jakobovrum.github.io/LuaD/ signature.asc Description: PGP

Re: How D addresses the problem of Extending and/or Embedding other languages ?

2014-08-25 Thread ketmar via Digitalmars-d
On Mon, 25 Aug 2014 07:18:50 + Brost via Digitalmars-d digitalmars-d@puremagic.com wrote: for example how do you correctly expose a given D data structure to a scripting language of your choice ? or Adam D. Ruppe's script, which is written completely in D:

Re: Some Notes on 'D for the Win'

2014-08-25 Thread ketmar via Digitalmars-d
On Mon, 25 Aug 2014 13:51:22 + via Digitalmars-d digitalmars-d@puremagic.com wrote: discontinued). I wonder how safe it would be to use Go in production (breaking changes, availability / implementation of useful features etc.) Pretty safe! While Go and PhP can be dropped by Gogle

Re: Using D

2014-08-25 Thread ketmar via Digitalmars-d
On Mon, 25 Aug 2014 16:51:23 +0300 Paulo Pinto via Digitalmars-d digitalmars-d@puremagic.com wrote: Since when does C++ does support message passing? since people started to think that OOP was invented in C++. signature.asc Description: PGP signature

Re: Some Notes on 'D for the Win'

2014-08-25 Thread ketmar via Digitalmars-d
On Mon, 25 Aug 2014 14:07:53 + via Digitalmars-d digitalmars-d@puremagic.com wrote: It is. You can use Go on Compute Engine. i can use D in production. i'm pretty sure that current GDC will not rot after five years: i will stil be able to build gcc 4.9.1 and gdc with 2.065 backend, then fix

Re: Using D

2014-08-25 Thread ketmar via Digitalmars-d
On Mon, 25 Aug 2014 14:15:09 + via Digitalmars-d digitalmars-d@puremagic.com wrote: C++ is using the OOP model of SIMULA, which did invent OOP! So I'd say the way C++ does OOP is how it was invented. and Smalltalk does OOP the way it should be done. ;-) signature.asc Description: PGP

Re: Using D

2014-08-25 Thread ketmar via Digitalmars-d
On Mon, 25 Aug 2014 14:41:46 + via Digitalmars-d digitalmars-d@puremagic.com wrote: D does seem to lack type variables? So it is quite static in comparison. the problem with overly dynamic languages like Smalltalk (and especially Self) is that it's insanely hard to write an efficient

Re: Using D

2014-08-25 Thread ketmar via Digitalmars-d
On Mon, 25 Aug 2014 16:08:52 + via Digitalmars-d digitalmars-d@puremagic.com wrote: Beta was static and compiled directly to asm. it's not hard to compile dynamic language to native code. what is hard is to make this code fast. this requires very sofisticated compiler which can eliminate as

Re: Using D

2014-08-25 Thread ketmar via Digitalmars-d
On Mon, 25 Aug 2014 16:33:00 + via Digitalmars-d digitalmars-d@puremagic.com wrote: I think the whole separate compilation idea is going to be old fashioned real soon now. It makes little sense to not have the build system as a service run on a cluster and the program as a database

Re: Using D

2014-08-25 Thread ketmar via Digitalmars-d
On Mon, 25 Aug 2014 14:36:21 -0300 Ary Borenszweig via Digitalmars-d digitalmars-d@puremagic.com wrote: The trick is to not use virtual tables, but do multiple dispatch (or only use virtual tables when needed). If you have: a = Foo.new a.some_method such simple code analysis easily

Re: Using D

2014-08-25 Thread ketmar via Digitalmars-d
On Mon, 25 Aug 2014 17:50:35 + Paulo Pinto via Digitalmars-d digitalmars-d@puremagic.com wrote: May be, but JIT were created thanks to Lisp and Smalltalk. i know that. i'm interested in JIT developement and know about Self, Strongtalk and other strange words. ;-) and i really hate SUN for

Re: Before we implement SDL package format for DUB

2014-08-25 Thread ketmar via Digitalmars-d
On Mon, 25 Aug 2014 19:26:59 + Gary Willoughby via Digitalmars-d digitalmars-d@puremagic.com wrote: Why are comments and non quoted key names needed? 'cause people are not computers. let's think about people first. signature.asc Description: PGP signature

Re: Using D

2014-08-26 Thread ketmar via Digitalmars-d
On Tue, 26 Aug 2014 05:59:45 + Joakim via Digitalmars-d digitalmars-d@puremagic.com wrote: Other than a few devs with privacy and security concerns it's about me. ;-) signature.asc Description: PGP signature

Re: Before we implement SDL package format for DUB

2014-08-26 Thread ketmar via Digitalmars-d
On Tue, 26 Aug 2014 08:53:44 + eles via Digitalmars-d digitalmars-d@puremagic.com wrote: - XML is XML. I find it actually OK. I would support this. Yes, is verbose, we know that. But is a very solid foundation. any homemade format or character soup is better than XML. it's not only

Re: Before we implement SDL package format for DUB

2014-08-26 Thread ketmar via Digitalmars-d
On Tue, 26 Aug 2014 09:32:09 + eles via Digitalmars-d digitalmars-d@puremagic.com wrote: Are the drawbacks of JSON so big? Why to move away from it i don't know too. i think that it's enough to add three features to current json parser to be happy: 1. comments, both '//' and '/* */. 2.

Re: Before we implement SDL package format for DUB

2014-08-26 Thread ketmar via Digitalmars-d
On Tue, 26 Aug 2014 12:20:55 +0200 Sönke Ludwig via Digitalmars-d digitalmars-d@puremagic.com wrote: I agree. Those would be the points with most impacts. However, the outcome would be quite far away from standard JSON, so we would really be talking about something like ASON or SDL already.

Re: Before we implement SDL package format for DUB

2014-08-26 Thread ketmar via Digitalmars-d
On Tue, 26 Aug 2014 10:36:14 + eles via Digitalmars-d digitalmars-d@puremagic.com wrote: Not exactly that, but look here two approaches for introducing comments in standard JSON: they both 'hacks'. and i'm pretty sure that most people who using JSON never bother to read specs, they just

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-26 Thread ketmar via Digitalmars-d
On Tue, 26 Aug 2014 22:37:29 +0300 Max Klyga via Digitalmars-d digitalmars-d@puremagic.com wrote: Microsoft being microsoft again. http://www.freepatentsonline.com/y2014/0196015.html - DECLARATION OF LIFETIME OF RESOURCE REFERENCE This contains description of scoped classes, etc.

Re: Before we implement SDL package format for DUB

2014-08-27 Thread ketmar via Digitalmars-d
On Wed, 27 Aug 2014 16:57:52 + Gary Willoughby via Digitalmars-d digitalmars-d@puremagic.com wrote: D and its tools are crying out for stability right now. there is D1. stable as a doornail. signature.asc Description: PGP signature

Re: Friendly-C

2014-08-28 Thread ketmar via Digitalmars-d
On Thu, 28 Aug 2014 09:12:15 + deadalnix via Digitalmars-d digitalmars-d@puremagic.com wrote: It forces all the load to potentially have side effects, which, in turn, limit dramatically what the optimizer can do. but there is alot code that doesn't need super-speed. it's ok to fallback to

Re: Friendly-C

2014-08-28 Thread ketmar via Digitalmars-d
On Thu, 28 Aug 2014 09:12:15 + deadalnix via Digitalmars-d digitalmars-d@puremagic.com wrote: p.s. code generated by DMD, for example, at least two times slower than code generated by GDC. but most people are ok with it. signature.asc Description: PGP signature

Re: Friendly-C

2014-08-29 Thread ketmar via Digitalmars-d
On Fri, 29 Aug 2014 05:31:00 + deadalnix via Digitalmars-d digitalmars-d@puremagic.com wrote: If the value in unspecified, rather than the behavior undefined, it means that no load or store can be optimized away or reordered, unless the compiler can prove that is won't fault. will it

Re: Destroying structs (literally)

2014-08-29 Thread ketmar via Digitalmars-d
On Thu, 28 Aug 2014 19:21:04 -0700 Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: Dear community, are you ready for this? yes, yes and yes! signature.asc Description: PGP signature

Re: Destroying structs (literally)

2014-08-30 Thread ketmar via Digitalmars-d
On Fri, 29 Aug 2014 09:49:07 -0700 Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: yes, yes and yes! You forgot the Oxford comma :o). -- Andrei yes, yes, and yes! fixed, ready to another round of reviews. ;-) signature.asc Description: PGP signature

code cleanup in druntime and phobos

2014-08-30 Thread ketmar via Digitalmars-d
Hello. there are some c-style array declarations both in druntime and in phobos. i made two patches that fixes 'em: https://issues.dlang.org/show_bug.cgi?id=13401 https://issues.dlang.org/show_bug.cgi?id=13402 signature.asc Description: PGP signature

Re: code cleanup in druntime and phobos

2014-08-30 Thread ketmar via Digitalmars-d
On Sat, 30 Aug 2014 11:31:13 + Jonathan M Davis via Digitalmars-d digitalmars-d@puremagic.com wrote: If you want to contribute, please create pull requests on github: sorry, i'm not using github and not planning to register on github either. i have a personal reason for it. It's doubtful

Re: code cleanup in druntime and phobos

2014-08-30 Thread ketmar via Digitalmars-d
On Sat, 30 Aug 2014 22:25:18 +1000 Daniel Murphy via Digitalmars-d digitalmars-d@puremagic.com wrote: That's your choice, but if you want to contribute patches to the compiler or libraries you will need to get over it and make an account. not *that* much. ok, i got the point and will not make

Re: code cleanup in druntime and phobos

2014-08-30 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 00:09:02 +1000 Daniel Murphy via Digitalmars-d digitalmars-d@puremagic.com wrote: I'm yet to hear an actual reason why taking the 5 minutes to create a github account is too hard. 'cause i don't want to be a part of github. i'd better eat dirt. signature.asc Description:

Re: code cleanup in druntime and phobos

2014-08-30 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 00:32:06 +1000 Daniel Murphy via Digitalmars-d digitalmars-d@puremagic.com wrote: or just not submitting patches. keep complaining about alot of people speaking but not writing the code. good luck with it but i'm off. i'm perfectly comfortable with supporting patches by myself

Re: code cleanup in druntime and phobos

2014-08-30 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 00:38:16 +1000 Daniel Murphy via Digitalmars-d digitalmars-d@puremagic.com wrote: It's a shame that your dislike of github is stronger than your desire to contribute code. i wasn't signed any agreements about i have to eat github if i want make D better. i was thinking that

Re: code cleanup in druntime and phobos

2014-08-30 Thread ketmar via Digitalmars-d
On Sat, 30 Aug 2014 14:50:58 + via Digitalmars-d digitalmars-d@puremagic.com wrote: I hope you keep making your patches available online. I am interested in your patches that fix the syntax issues that D suffer from. I am sure others are too. i'm planning to make website with my patches

Re: code cleanup in druntime and phobos

2014-08-30 Thread ketmar via Digitalmars-d
On Sat, 30 Aug 2014 16:33:12 + David Nadlinger via Digitalmars-d digitalmars-d@puremagic.com wrote: Even though everything submitted to Bugzilla is supposed to be public domain, it would be nice to keep authorship information in the commit messages. in my case -- i don't care. i just

Re: gdmd

2014-08-30 Thread ketmar via Digitalmars-d
On Sat, 30 Aug 2014 17:47:47 +0100 Russel Winder via Digitalmars-d digitalmars-d@puremagic.com wrote: Is gdmd an ex-thing? it is now in it's own repository: https://github.com/D-Programming-GDC/GDMD.git signature.asc Description: PGP signature

Re: gdmd

2014-08-30 Thread ketmar via Digitalmars-d
On Sat, 30 Aug 2014 18:20:42 +0100 Iain Buclaw via Digitalmars-d digitalmars-d@puremagic.com wrote: I had hoped that someone would rewrite it in D, and a start was made, but never completed (I never saw a PR). funny thing is that i made the exact opposite: wrote kdmd which translates dmd args

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 01:53:07 -0400 Nick Sabalausky via Digitalmars-d digitalmars-d@puremagic.com wrote: I know FSF prefers free over the open I've been using. But really, everybody knows what open and open source mean may i ask you: is DMD open and open source? and why the heck i can't fork it

Re: gdmd

2014-08-31 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 00:20:04 +0100 Iain Buclaw via Digitalmars-d digitalmars-d@puremagic.com wrote: That isn't the opposite. That's what gdmd does. Unless you mean translate gdc args to dmd. :) sorry, i must sleep more. ;-) sure, gdc-dmd conversion, to build my projects with dmd (i'm not

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 06:59:34 + Era Scarecrow via Digitalmars-d digitalmars-d@puremagic.com wrote: 'Open' can merely means you can see the source, nothing else. Really comes down to the license it's attached to. that's why i'm using the term Free and Open Source Software instead of Open

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 09:23:24 + Joakim via Digitalmars-d digitalmars-d@puremagic.com wrote: As such, his GPL, which doesn't allow such pragmatic mixing of open and closed source, is ...a great thing to stop invasion of proprietary software. hey, i'm not *renting* my smartphone, i'm *buying*

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 10:23:42 + Joakim via Digitalmars-d digitalmars-d@puremagic.com wrote: Good luck with that, let me know when you find a GPLv3 smartphone to buy. I'll predict when that'll happen: never. keep tolerate permissive licenses, this will greatly help me to find such

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 06:46:15 -0400 Nick Sabalausky via Digitalmars-d digitalmars-d@puremagic.com wrote: So what do they do? Not use the GPL software in the first place. So we end up with second-rate crap (like Bionic) or worse - closed source proprietary - just because GPL scared them away.

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-09-01 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 20:43:23 + Joakim via Digitalmars-d digitalmars-d@puremagic.com wrote: This is what guys like Stallman or ketmar don't seem to get, that mixed-source still leads to _more_ open source which was used to produce vendor-locked smartphone. bwah, what's good in this open

Re: Encapsulating trust

2014-09-01 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 20:36:59 + monarch_dodra via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sunday, 31 August 2014 at 13:47:42 UTC, Dmitry Olshansky wrote: What do you guys think? I'd say add trusted to those function names: trustedCall trustedAddrOf i first think like this

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-09-01 Thread ketmar via Digitalmars-d
On Mon, 01 Sep 2014 04:00:46 -0400 Nick Sabalausky via Digitalmars-d digitalmars-d@puremagic.com wrote: Yea, a vendor-locked smartphone that still gives you far more freedoms than iOS or WinRT ever will. partially pregnant. Go put your software and OS mods on an iPhone or WinRT and *then* try

  1   2   3   4   5   6   7   8   9   10   >