Re: Why Does Dscanner Warn About a Missing toHash if opEquals is Defined?

2016-08-02 Thread BLM768 via Digitalmars-d-learn
On Sunday, 31 July 2016 at 18:57:50 UTC, Jack Stouffer wrote: Next question: what's the fastest hashing implementation that will provide the least collisions? Is there a hash implementation that's perfered for AAs? I've heard that FNV-1a is a decent general-purpose option, and it's fairly

Re: [OT] Music to Program Compilers To

2016-07-31 Thread BLM768 via Digitalmars-d
On Friday, 29 July 2016 at 22:44:04 UTC, Walter Bright wrote: http://70sdisconights.com/ Yes, I listen to it while I work. For a somewhat more...traditional genre: http://musopen.org/radio

Re: Why Does Dscanner Warn About a Missing toHash if opEquals is Defined?

2016-07-31 Thread BLM768 via Digitalmars-d-learn
On Sunday, 31 July 2016 at 16:39:59 UTC, Jack Stouffer wrote: But D provides a default toHash for every type if it's not defined. I was wondering why not just rely on that version. If two objects are equal, their hashes must also be equal. Consider this example: struct Nullable(T) { bool

Re: Overflows in Phobos

2016-07-28 Thread BLM768 via Digitalmars-d
On Wednesday, 27 July 2016 at 07:59:54 UTC, Walter Bright wrote: "The expression assert(0) is a special case; it signifies code that should be unreachable. If it is reached at runtime, either AssertError is thrown or execution is terminated in an implementation-defined manner. Any code after

Re: Iterate all visible symbols, even from imported modules

2016-07-18 Thread BLM768 via Digitalmars-d-learn
On Monday, 18 July 2016 at 13:00:16 UTC, Lodovico Giaretta wrote: // how do I discover that "std" is a package? I've got a DMD pull request that adds __traits(isPackage, someSymbol), but it's stuck waiting for approval. If and when it gets merged, it could be useful for that.

Re: BulletD needs your help!

2016-07-08 Thread BLM768 via Digitalmars-d-announce
On Friday, 8 July 2016 at 07:59:42 UTC, Dechcaudron wrote: Hey there, I'm sad this post hasn't called anyone's attention so far. While I am defintely interested to have BulletD become a thing, I sadly can't collaborate with it so far. It's been on my mind to give Bullet as a physics engine a

BulletD needs your help!

2016-07-04 Thread BLM768 via Digitalmars-d-announce
A couple of years ago, I started writing some bindings for the Bullet Physics library (bulletphysics.org). This was well before D's new C++ interop features, so I wrote a hacky little chain of build scripts (which generated each other about 3 levels deep!). The thing actually worked to a

Keeping a reference to a linked list element

2016-05-11 Thread BLM768 via Digitalmars-d-learn
I just started working on a project in which it would be convenient to hold a reference to a specific entry in a DList. The interface doesn't seem to provide a way to get a pointer to a raw node struct, so about the best solution I can find is to get a range out of the list, pop elements until

Re: C header file: tagged enumerations

2016-04-27 Thread BLM768 via Digitalmars-d-learn
On Tuesday, 26 April 2016 at 23:40:24 UTC, Adam D. Ruppe wrote: D doesn't handle this C pattern well... you basically have to rewrite the whole thing for each version. Or you can use the technique that's used in llvm-d: build the enumeration from a string mixin which is generated from a

Re: The Sparrow language

2016-04-06 Thread BLM768 via Digitalmars-d
On Wednesday, 6 April 2016 at 20:48:20 UTC, Lucian Radu Teodorescu wrote: Compared to CTFE, in Sparrow you can run at compile-time *any* algorithm you like. No restrictions apply. Not only you can do whatever your run-time code can do, but can also call external programs at compile-time.

Re: The Sparrow language

2016-04-06 Thread BLM768 via Digitalmars-d
On Wednesday, 6 April 2016 at 18:25:11 UTC, BLM768 wrote: Aside from the explicit annotations, I don't see how their solution is more flexible than D's CTFE, but I might be missing something. Never mind. Just saw their language embedding example. Neat!

Re: The Sparrow language

2016-04-06 Thread BLM768 via Digitalmars-d
On Wednesday, 6 April 2016 at 13:15:48 UTC, Andrei Alexandrescu wrote: On the plus side Sparrow has a smoother integration of compile-time vs. run-time computation, which makes it a bit easier to transition from one to another. Aside from the explicit annotations, I don't see how their

Re: Could we reserve void[T] for builtin set of T ?

2016-03-31 Thread BLM768 via Digitalmars-d
On Thursday, 31 March 2016 at 20:51:53 UTC, Jack Stouffer wrote: Wouldn't just be better to use a std.allocator backed set container instead over special casing the AA syntax like this? Syntactically, that makes more sense. Or there's always ubyte[0][T].

Re: Concatenative Programming Languages

2016-03-30 Thread BLM768 via Digitalmars-d
On Wednesday, 30 March 2016 at 22:20:02 UTC, John Colvin wrote: import std.functional : pipe; alias allThree = pipe!(foo, bar, baz); :) Interesting, but I'd call that a concatenative sub-language at most. ;) There's certainly some conceptual overlap between concatenative languages and D

Re: Concatenative Programming Languages

2016-03-30 Thread BLM768 via Digitalmars-d
On Wednesday, 30 March 2016 at 20:53:02 UTC, Shammah Chancellor wrote: I just stumbled on this wikipedia article: https://en.wikipedia.org/wiki/Concatenative_programming_language Seems like D falls under that category? -S. Not really. UFCS allows the syntax "x.foo.bar.baz", which is

Re: Jai - interesting programming language

2016-03-20 Thread BLM768 via Digitalmars-d
On Saturday, 19 March 2016 at 08:38:20 UTC, Basile B. wrote: Otherwise there's something that's pretty in the syntax: Very much so. My own "toy language" project uses (well, _will_ use once I have more than 5% of a parser) a similar syntax, so it could just be my own biases talking, but I

Re: Functions that return type

2016-01-20 Thread BLM768 via Digitalmars-d-learn
On Wednesday, 20 January 2016 at 10:04:03 UTC, burjui wrote: That's alright. Parsing and AST construction are trivial with S-expressions (Lisp-like syntax), so if you use them for the early stages of development, you can focus on the type system. When you're done with types, you can switch to

Re: Functions that return type

2016-01-19 Thread blm768 via Digitalmars-d-learn
On Sunday, 17 January 2016 at 02:08:06 UTC, Timon Gehr wrote: On 01/16/2016 11:50 PM, data pulverizer wrote: I guess the constraints are that of a static language. (This is not true.) I'm playing with the design of such a language myself. Basically, anything can create/use/return type

Re: What are you planning for 2016?

2016-01-06 Thread BLM768 via Digitalmars-d
On Tuesday, 5 January 2016 at 12:27:12 UTC, Ola Fosheim Grøstad wrote: I wonder what kind of programming people plan or _hope_ to use D for in 2016? 8. or something else? The toy language bug has bitten me, too. I'm going for maximum modularity in the compiler to make it easy to hook in

Re: DMD now does Dwarf style exception handling!

2016-01-02 Thread blm768 via Digitalmars-d
On Sunday, 3 January 2016 at 01:51:35 UTC, Jonathan M Davis wrote: So, we have ELF binaries and DWARF exceptions. Are we going to get something related to orcs or goblins next? ;) - Jonathan M Davis I don't know about that, but with better C++ interop, it might be easier to bind to OGRE.

Re: So You Want To Write Your Own Language

2015-12-23 Thread BLM768 via Digitalmars-d-announce
On Thursday, 24 December 2015 at 01:08:38 UTC, Walter Bright wrote: This has resurfaced on Reddit: https://www.reddit.com/r/programming/comments/3xya5v/so_you_want_to_write_your_own_language/ I might end up using this. It seems like there aren't many better ways to really learn about

Re: Redesign of dlang.org

2015-12-21 Thread BLM768 via Digitalmars-d
On Monday, 21 December 2015 at 15:09:06 UTC, Adam D. Ruppe wrote: Dedicated pages is a good idea and can be done trivially with ddoc macros to avoid repetition of the content in the source. It could also be a css :hover dropdown instead of JS, but I hate drop downs on hover so I'd prefer the

Re: Redesign of dlang.org

2015-12-19 Thread BLM768 via Digitalmars-d
On Saturday, 19 December 2015 at 14:33:35 UTC, Jacob Carlborg wrote: Thoughts? The template constraints being on their own line is a nice touch. Overall, the design looks very clean-cut. The only real issue I see is that it could use a bit more contrast. Those light gray lines fade into the

Re: Some feedback on the website.

2015-12-17 Thread BLM768 via Digitalmars-d
On Thursday, 17 December 2015 at 07:51:42 UTC, Jacob Carlborg wrote: On 2015-12-17 00:43, BLM768 wrote: One is to make as much of it as possible in plain old static HTML. Stuff like the articles rarely changes, after all. This is an horrible idea. No sane person would use raw HTML. The only

Re: What is the state of D for game development?

2015-12-17 Thread BLM768 via Digitalmars-d
On Thursday, 17 December 2015 at 17:38:31 UTC, Ali Çehreli wrote: I am stealing HerrDrFaust's question from the following Reddit thread: https://www.reddit.com/r/programming/comments/3wqt3p/programming_in_d_ebook_is_at_major_retailers_and/ Please answer here or there. Thank you, Ali Well,

Re: What is the state of D for game development?

2015-12-17 Thread BLM768 via Digitalmars-d
On Friday, 18 December 2015 at 00:03:06 UTC, extrawurst wrote: What PR is that ? Link ? --Stephan https://github.com/D-Programming-Language/dmd/pull/5290 It adds some __traits that would make it easier for me to introspect my binding modules and generate glue code. Right now, I'm using

Re: Some feedback on the website.

2015-12-17 Thread BLM768 via Digitalmars-d
On Thursday, 17 December 2015 at 19:50:40 UTC, Andrei Alexandrescu wrote: If you have some time and motivation to improve the documentation, there's tremendous opportunity for impact. So much low-hanging fruit, all well before we explore switching to a different way of building the site. And

Re: Some feedback on the website.

2015-12-17 Thread BLM768 via Digitalmars-d
On Thursday, 17 December 2015 at 23:50:34 UTC, Andrei Alexandrescu wrote: * "Examples:" is a historical error. All instances should be "Example:". Just one diff making that change throughout would be a meaningful contribution. Like so?

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

2015-12-16 Thread BLM768 via Digitalmars-d
On Wednesday, 16 December 2015 at 21:00:55 UTC, Andrei Alexandrescu wrote: I should add I've argued for including some of the core vibe.d stuff in Phobos. Sadly nobody is championing such a project for the time being. Andrei Would that include its stream stuff? We've been needing a

Re: Some feedback on the website.

2015-12-16 Thread BLM768 via Digitalmars-d
On Wednesday, 16 December 2015 at 23:01:47 UTC, Walter Bright wrote: Exactly. We'll never get anywhere chasing people who say "I'll help only if you convert to my way of doing things." I've done enough of that in the past, and concluded they're just seeing how long you'll dance to their tune

Re: Some feedback on the website.

2015-12-16 Thread BLM768 via Digitalmars-d
On Wednesday, 16 December 2015 at 23:43:41 UTC, BLM768 wrote: [snip] ...and as I read some older posts, I see that mine is completely redundant. ;) Seriously, though, I'm willing to help prototype something. I've got time before the next semester starts.

Re: Some feedback on the website.

2015-12-16 Thread BLM768 via Digitalmars-d
On Wednesday, 16 December 2015 at 23:49:52 UTC, Andrei Alexandrescu wrote: But I dislike typing HTML. DDoc improves on that significantly. Fair enough. Vibe.d has diet templates, though. They're pretty nice. As long as the pages are mainly static anyway, though, it's all plain boring HTML

Re: How do you create an opengl window with DerelictOrg?

2015-12-07 Thread BLM768 via Digitalmars-d-learn
On Monday, 7 December 2015 at 21:33:57 UTC, Enjoys Math wrote: I've seen these: https://github.com/DerelictOrg?page=1 BUt not sure how to use them, examples? OpenGL itself can't create a window/context, so you'll need to use DerelictGLFW or DerelictSDL. GLFW is lighter-weight. Combine the

Re: Complexity nomenclature

2015-12-05 Thread BLM768 via Digitalmars-d
On Sunday, 6 December 2015 at 03:30:51 UTC, Timon Gehr wrote: log(x^2) = 2 log x. Why do log rules have to make everything so simple? ;)

Re: Complexity nomenclature

2015-12-05 Thread BLM768 via Digitalmars-d
On Saturday, 5 December 2015 at 20:48:16 UTC, Andrei Alexandrescu wrote: On 12/04/2015 10:24 PM, Timon Gehr wrote: In fact I went through the implementation but soon I hit a wall: what's the _relationship_ between the two growths? It may be the sum O(m + n) but also the product O(m * n). So

Re: Complexity nomenclature

2015-12-05 Thread BLM768 via Digitalmars-d
On Saturday, 5 December 2015 at 22:56:23 UTC, H. S. Teoh wrote: Multi-term complexities arise from trivial graph algorithms. They are not limited to the use of multiple containers. More precisely, the multiple terms arise because of the structure of the graph (being composed of nodes and

Re: Complexity nomenclature

2015-12-04 Thread BLM768 via Digitalmars-d
On Friday, 4 December 2015 at 18:21:41 UTC, Walter Bright wrote: I suggested in the pseudo namespaces thread using template parameters to express characteristics, as in: remove!(stable, linear) with sensible defaults so most of the time the user would just use: remove The nice

Re: Complexity nomenclature

2015-12-04 Thread BLM768 via Digitalmars-d
On Friday, 4 December 2015 at 22:17:21 UTC, Jonathan M Davis wrote: Either of those would be better than stableLinearRemove or stable.linear.remove. The UDAs would be more documentation friendly, though being able to pass around template arguments could be valuable for the cases where you're

Re: Complexity nomenclature

2015-12-04 Thread BLM768 via Digitalmars-d
On Saturday, 5 December 2015 at 00:13:02 UTC, BLM768 wrote: list.removeWithComplexity(Complexity.linear, 3); Uh, I mean list.removeWithComplexity!(Complexity.linear)(3).

Re: Three people out of four dislike SDL

2015-12-01 Thread BLM768 via Digitalmars-d
On Tuesday, 1 December 2015 at 17:26:13 UTC, Andrei Alexandrescu wrote: Independent on the topic at hand - wondering what your reasoning is. I just took a look and there are 205 votes. Not a large number, but quite a lot more than any voting we saw in the past (when consensus was proclaimed

Re: Three people out of four dislike SDL

2015-12-01 Thread BLM768 via Digitalmars-d
On Tuesday, 1 December 2015 at 18:25:06 UTC, Bubbasaur wrote: Really, do really believe in what you wrote? So if you take a look right now, the "YES" option for the question: "Do you like new DUB config format?" Is somehow "magically" winning the poll right now! Bubba. Huh. That changed

Re: I hate new DUB config format

2015-11-28 Thread BLM768 via Digitalmars-d
On Friday, 27 November 2015 at 19:29:48 UTC, Jacob Carlborg wrote: Just throwing it out there: CSON [1]. "CoffeeScript-Object-Notation. Same as JSON but for CoffeeScript objects". It's used by the Atom editor. [1] https://github.com/bevry/cson Hmm. Pretty, standardized, similar to JSON. I

Re: New __traits

2015-11-28 Thread BLM768 via Digitalmars-d
On Thursday, 26 November 2015 at 23:16:59 UTC, BLM768 wrote: [snip] It lists a bunch of symbols that most certainly _aren't_ direct ancestors of the "std" package: "object", "core", "std", "KeepTerminator", "GCC_IO", "HAS_GETDELIM", "FSChar", and a bunch of others. That's a bug, right?

Re: I hate new DUB config format

2015-11-28 Thread BLM768 via Digitalmars-d
On Saturday, 28 November 2015 at 18:13:51 UTC, Kagamin wrote: Then XML is clear winner, its support, spread, availability and tooling is unmatched. So is its complexity. ;) Do we even have a good standard XML parser? std.xml has been languishing for years...

Re: Password Storage

2015-11-27 Thread BLM768 via Digitalmars-d-learn
On Friday, 27 November 2015 at 16:14:06 UTC, H. S. Teoh wrote: True, so you'd store hash(password01) in the database, and compute hash(X + hash(password)) during authentication. T Another option is SCRAM: https://en.wikipedia.org/wiki/Salted_Challenge_Response_Authentication_Mechanism

Re: I hate new DUB config format

2015-11-26 Thread BLM768 via Digitalmars-d
On Thursday, 26 November 2015 at 19:57:19 UTC, Jacob Carlborg wrote: Everyone will hate me for saying this, but in that case, just go with Ruby (or some other similar language) That was actually one of my first thoughts. It would be pretty, but we'd have another dependency then. Also, Ruby

Re: New __traits

2015-11-26 Thread BLM768 via Digitalmars-d
On Thursday, 26 November 2015 at 20:56:39 UTC, Jonathan M Davis wrote: Yes, code can forward-reference an import. e.g. this code compiles just fine: void main() { writeln("Where's my import?"); } import std.stdio; Now, when the import is inside of a function, then it

Re: Password Storage

2015-11-26 Thread BLM768 via Digitalmars-d-learn
On Friday, 27 November 2015 at 02:05:49 UTC, H. S. Teoh wrote: For authentication, the password shouldn't even be sent over the wire. Instead, the server (which knows the correct password) should send a challenge to the client (i.e., a large random number produced by a good RNG -- which is

Re: New __traits

2015-11-26 Thread BLM768 via Digitalmars-d
On Thursday, 26 November 2015 at 02:20:43 UTC, Daniel Murphy wrote: Unfortunately I have no idea. You'll have to have a look at what other code that resolves packages is doing. If you can't find it it might be worth emailing Kenji Hara, since he knows everything. Well, expression.d seems

Re: New __traits

2015-11-25 Thread BLM768 via Digitalmars-d
On Wednesday, 25 November 2015 at 15:39:17 UTC, Daniel Murphy wrote: What you're seeing is just an artifact of how dmd's internals work. 'std' is an 'import' (call Dsymbol.kind() for the category of symbol) and you'll have to resolve it to work out which module/package is being imported. It's

Re: I hate new DUB config format

2015-11-25 Thread BLM768 via Digitalmars-d
On Wednesday, 25 November 2015 at 22:20:39 UTC, Andrei Alexandrescu wrote: It's more like "Do this, no need to argue". There's really no need, and we're arguing too much over too little. -- Andrei Is anyone else having flashbacks to Phobos vs. Tango? In this case, as much as I like how the

Re: New __traits

2015-11-25 Thread BLM768 via Digitalmars-d
On Wednesday, 25 November 2015 at 15:39:17 UTC, Daniel Murphy wrote: What you're seeing is just an artifact of how dmd's internals work. 'std' is an 'import' (call Dsymbol.kind() for the category of symbol) and you'll have to resolve it to work out which module/package is being imported.

Re: New __traits

2015-11-24 Thread BLM768 via Digitalmars-d
On Wednesday, 25 November 2015 at 01:06:55 UTC, BLM768 wrote: In other words, "std" isn't a package _or_ module, and std.stdio is both (even though it's just a single D source file). This doesn't seem quite right. I just confirmed that this also applies to other root packages, i.e. "core" or

New __traits

2015-11-24 Thread BLM768 via Digitalmars-d
For a project I've been working on, I found that it would be helpful to have a way to determine whether a symbol represents a module or package. Since I couldn't find an easy way to do it, I forked DMD and made some tweaks. ;) Anyway, I uncovered an interesting issue. According to my test

Re: Something about Chinese Disorder Code

2015-11-24 Thread BLM768 via Digitalmars-d-learn
On Tuesday, 24 November 2015 at 09:48:45 UTC, magicdmer wrote: I display chinese string like: auto str = "你好,世界" writeln(str) and The display is garbled。 some windows api like MessageBoxA ,if string is chinese, it displays disorder code too i think i must use WideCharToMultiByte to convert

Finding packages recursively

2015-11-23 Thread BLM768 via Digitalmars-d-learn
I'm trying to recursively visit a package and all packages/modules within it using metaprogramming. I should be able to use __traits(allMembers, somePackage) recursively to get all symbols within the package, but is there an easy way to determine whether a symbol represents a package, a

Re: Easy and efficient database usage

2015-11-02 Thread BLM768 via Digitalmars-d
On Friday, 23 October 2015 at 12:42:08 UTC, w0rp wrote: Does anyone have any thoughts on this topic? A couple of years ago, I started playing with the idea. The basic concept was to dump DB records into "dumb" (i.e. representing just the basic aspects of the model object) structs, which can