Re: How does one correct shadowing (hidden by) errors?

2011-07-23 Thread Jesse Phillips
On Sat, 23 Jul 2011 10:51:35 -0400, bearophile wrote: > Jesse Phillips: > >> It is not fixed there, it is missing a number of changes. This is one >> of them and I'm confused on since I thought override was supposed to, >> well override. > > I think we are

Re: Error building dfl on dmd 2.054

2011-07-26 Thread Jesse Phillips
simendsjo Wrote: > I've just added "default: assert(0)" on the switches, but I got an error > I don't know how to solve: > > tabcontrol.d(18): Error: class dfl.tabcontrol.TabPage use of > dfl.control.Control.opEquals(Control ctrl) hidden by TabPage is deprecated > > Any ideas? The best would o

Re: Error building dfl on dmd 2.054

2011-07-26 Thread Jesse Phillips
Jesse Phillips Wrote: > I just made a pull request to fix this in the unofficial repo. But > Bearophile's alias is probably the correct solution. Forgot to give you the quick link: https://github.com/Rayerd/dfl/pull/3

Re: Error building dfl on dmd 2.054

2011-07-26 Thread Jesse Phillips
On Tue, 26 Jul 2011 22:22:39 +0200, simendsjo wrote: > On 26.07.2011 20:49, Jesse Phillips wrote: >> Jesse Phillips Wrote: >> >>> I just made a pull request to fix this in the unofficial repo. But >>> Bearophile's alias is probably the correct solution. &

Re: Error building dfl on dmd 2.054

2011-07-27 Thread Jesse Phillips
simendsjo Wrote: > I agree github is a much better collaboration platform than dsource+svn, > but C.Miller should at least be contacted. It's bad for a project to get > fragmented if it doesn't have to be. > > Off to try the github version then. > I'm pretty sure I contacted him to find out w

Re: Frontend and backend communication

2011-07-29 Thread Jesse Phillips
Dainius (GreatEmerald) Wrote: > So, now my (static) library nearly links in Win32. There is only one > link error, and apparently it's generated by phobos: > > ..\lib\phobos.lib(dmain2) > Error 42: Symbol Undefined __end > > Any clues about what is happening? Admittedly, that phobos.lib

Re: Generate array of random values

2011-08-01 Thread Jesse Phillips
Andrej Mitrovic Wrote: > I'm currently using this: > > import std.algorithm; > import std.array; > import std.random; > import std.range; > > void main() > { > auto arr2 = array(map!( (int){ return uniform(0, 1024); })(iota(0, > 1024))); > } > > Is there a simpler way to do get an array of

Re: Generate array of random values

2011-08-01 Thread Jesse Phillips
On Tue, 02 Aug 2011 03:48:03 +0200, David Nadlinger wrote: > On 8/2/11 3:40 AM, Jesse Phillips wrote: >> Andrej Mitrovic Wrote: >>> Is there a simpler way to do get an array of random values? >> >> Untested: >> >> auto arr = new int[1024]; >> fil

Re: pragma(lib, "name") for .di files

2011-08-12 Thread Jesse Phillips
On Fri, 12 Aug 2011 19:30:29 +, mimocrocodil wrote: > Why pragma(lib, "name"); for .di files does not causes adding -lname to > the linker command line? > > For .d it works. > > (Compiler is DMD) I'm unsure I understand the question. .di files can not be compiled, they only describe what c

Re: undefined reference to symbol '_end'

2011-08-12 Thread Jesse Phillips
On Fri, 12 Aug 2011 20:23:50 +, mimocrocodil wrote: > I am trying to link my program with libpq: > > $ dmd main.d dbwork.d -ofmain -v -L-lpq The important statement: note: '_end' is defined in DSO /lib64/libcom_err.so.2 so try adding it to the linker command line so maybe: $ dmd main.d db

Re: undefined reference to symbol '_end'

2011-08-13 Thread Jesse Phillips
On Sat, 13 Aug 2011 02:13:38 +, mimocrocodil wrote: > Jesse Phillips: > > Bingo! it is compiles and works! > > Many thanks! :) The problem was with the library you were linking with, it expected more symbols. So if excluded it then those symbols were not needed.

Re: object.Exception and object.Error

2011-08-13 Thread Jesse Phillips
On Sat, 13 Aug 2011 17:01:50 +0200, Tobias Pankrath wrote: > http://d-programming-language.org/phobos/core_exception.html mentions > object.Exception and object.Error but I can't find documentation on > those two anywhere. Can someone please point me to it? https://github.com/D-Programming-Langua

Re: help understanding import libraries

2011-08-19 Thread Jesse Phillips
maarten van damme Wrote: > the compiler flags I needed to add was -I for every src directory and -L for > the lib file. The problem with that was that those files in the src dir > don't declare the functions but also define them. They are the real source > code files so I didn't understand why the

Re: help understanding import libraries

2011-08-19 Thread Jesse Phillips
Graham Fawcett Wrote: > On Fri, 19 Aug 2011 12:38:01 -0400, Jesse Phillips wrote: > > > If you wanted (and didn't run out of command line characters) you could > > list all .d files in every library you are using and have dmd compile > > everything for you. Then

Re: gdc & ldc problems

2011-08-19 Thread Jesse Phillips
On Sat, 20 Aug 2011 03:37:52 +0200, maarten van damme wrote: > so I have installed ldc,gdc and dmd on my linux box(debian testing) the > problem now is that when I try to compiler something using gdc or ldc > that imports from core it gives an error (core.* can not be found). the > versions of pho

Re: where is ddoc.

2011-08-21 Thread Jesse Phillips
On Sun, 21 Aug 2011 13:32:08 +0200, maarten van damme wrote: > as with most tools mentioned on the digitalmars homepage I am unable to > find ddoc. CandyDoc is DDoc. Or at least CandyDoc is just a bunch of macros and CSS files for DDoc. DDoc is D's documentation standard. At one time it was its

Re: reading in text files

2011-08-24 Thread Jesse Phillips
Brian Brady Wrote: > but it just hangs there, not doing anything(for a considerable time) so I am > assuming I am doing something wrong. There isn't any actual mention in the > book of *how* reading in the text file should be accomplished, so what is the > best way to do this? Now that you know h

Re: Default libraries by dmd

2011-08-24 Thread Jesse Phillips
On Thu, 25 Aug 2011 04:46:11 +, Cleem wrote: > What libraries are linked by command dmd as linker? I want to use g++ as > linker and link phobos2 and druntime libraries. But there are some > undefined references, for example: > _D3std4conv13ConvException7__ClassZ > _D3std4conv16__T5parseTlTAya

Re: CLI library?

2011-09-13 Thread Jesse Phillips
On Tue, 13 Sep 2011 10:59:27 +0300, Dainius (GreatEmerald) wrote: > Is there any library that would allow me to use the extended terminal > features (like coloured backgrounds and custom/multiple resolution > support) that works with D and is not platform-dependent? Something > similar to ncurses?

Re: Dynamic Array Question

2011-09-20 Thread Jesse Phillips
On Tue, 20 Sep 2011 14:28:54 -0400, Steven Schveighoffer wrote: > You can deallocate the original array. The soon-to-be-deprecated method > (but easiest) is: > > delete t; > > To avoid having to change your other code, I'd do this: > > wchar[] t = ...; > scope(exit) delete t; // add this line

Using pure to create immutable

2011-09-22 Thread Jesse Phillips
The discussion on Reddit brought to my attention that pure functions can return and assign to an immutable. http://www.reddit.com/r/programming/comments/knn5p/thoughts_on_immutability_in_d/c2lsgek I am trying to modify the example request to make use of this, but have failed. http://www.reddit.

Re: Using pure to create immutable

2011-09-22 Thread Jesse Phillips
Dmitry Olshansky Wrote: > Maybe: > -<< > List!T makeFromArray(T)(immutable T[] array) pure { > -- > Dmitry Olshansky Thank you this lets it compile. I think I had that somewhere, but forgot about it. As Steve mentions, it probably should also work for const ar

Re: does "private import" means "static import" to other modules importing it?

2011-10-13 Thread Jesse Phillips
On Thu, 13 Oct 2011 16:21:56 +0200, Andrej Mitrovic wrote: > You can always qualify the full name unless you're importing a specific > symbol, e.g.: No, I'm pretty sure it is just a bug, and one that was recently discussed too. Private imports should not expose their symbols to other modules ev

Re: Looking for documentation of D's lower-level aspects.

2011-10-18 Thread Jesse Phillips
Sean Silva Wrote: > I have just finished reading Alexandrescu's The D Programming Language, but it > doesn't seem to talk at all about how to use D as a stand-in for C/C++ almost > at > all. E.g., the part of D that doesn't depend on a runtime or garbage > collector. There isn't any real docume

Re: xml Bible for conversion for D

2011-10-18 Thread Jesse Phillips
I suggest xmlp http://www.dsource.org/projects/xmlp/ Example: http://www.dsource.org/projects/xmlp/browser/trunk/test/books.d He intends to push for it to be in Phobos so it uses the std namespace. import std.xml2; On Wed, 19 Oct 2011 17:31:06 +1300, Joel Christensen wrote: > I would like a

Re: xml Bible for conversion for D

2011-10-19 Thread Jesse Phillips
On Wed, 19 Oct 2011 18:21:22 +1300, Joel Christensen wrote: > I think I want to stick with the current std xml library for now. > > I think the books example is too different for me to work for what I > want. std.xml has had many bugs, and hasn't had most of them fixed. It might work for your d

Re: opAssign for structs

2011-10-22 Thread Jesse Phillips
On Sat, 22 Oct 2011 03:21:09 +, Sean Silva wrote: > I'm struggling with this on 4 fronts: > > 1. What is `this`, when opAssign is called off of the type? (does it > even make sense to call a member function without an instance?) Please file a bug on http://d.puremagic.com/issues/ The exampl

Re: AI Challenge - Ants

2011-10-22 Thread Jesse Phillips
I downloaded the starter pack last night and everything compiled. 2.055 and 2.054 On Sat, 22 Oct 2011 18:30:55 +0200, maarten van damme wrote: > I just downloaded the starter package and it gives to following errors: > ants.d -line 64: data.splitlines()=>splitlines(data) > -line 65:line.strip().

Random, not so random?

2011-10-23 Thread Jesse Phillips
In this little code example I'm trying to use the same random number generator to produce a randomCover over an array multiple times. I make 4 assertions, the first two pass, the last two fail. One of the benefits for providing a seed to a generator is that you can reproduce the behavior, but a

Re: AI Challenge - Ants

2011-10-23 Thread Jesse Phillips
On Sun, 23 Oct 2011 16:24:09 +0200, maarten van damme wrote: > I'm noticing some problems, there are some methods missing used in the > tutorial like "unocupied", the do_setup part and the visible method. Is > this package complete or am I missing something? > I'm noticing some problems, there are

Re: Random, not so random?

2011-10-23 Thread Jesse Phillips
I'm thinking something like this is appropriate, though I removed the save () feature. https://gist.github.com/1307739

Re: linker errors after upgrade to Ubuntu 11.10

2011-10-23 Thread Jesse Phillips
Ubuntu made some changes to the linker. See if this information helps and report back. This is from a post in digitalmars.D "Changes to gcc or ld in Ubuntu 11.10 require a small addition to prevent linker errors referencing librt. "-L-lphobos2" needs to be added to DFLAGS before "-L-lrt". I spent

Re: Random, not so random?

2011-10-24 Thread Jesse Phillips
Kagamin Wrote: > these fail because Random is a struct an its state is precisely replicated on > copy, so two calls to randomCover accept gen in the same state, so their > outputs are identical. All arr1, arr2, str1 and str2 are equivalent. Yes, I found that. But the question remains, is it a b

Re: Is there an indenter/formatter/prettyprinter for D?

2011-10-25 Thread Jesse Phillips
On Tue, 25 Oct 2011 17:07:31 -0700, Davidson Corry wrote: > Either one dedicated to D (D2 specifically), or a configuration for > 'indent' or some other cross-language prettyprinter? > > Thanks. Not really. indent already mostly works, similarly vim mostly gets it right. Visual D has something

Re: FIFO stack

2011-10-26 Thread Jesse Phillips
Ary Manzana Wrote: > On 10/26/11 1:28 PM, Jonathan M Davis wrote: > > Not exactly. If you want to know more about how arrays work, you should read > > this: http://www.dsource.org/projects/dcollections/wiki/ArrayArticle It's a > > great read. As for using an array as a stack, you can do it with a

Re: Array appending segfaults

2011-10-29 Thread Jesse Phillips
On Sat, 29 Oct 2011 18:37:18 +0200, Artur Skawina wrote: > Tried D today for the very first time, and the first program started > segfaulting soon enough... The simplified version is this: Not of much help, but I'm no reproducing it with DMD 2.056 Debian amd64.

Re: [beginner] Why nothing is printed to stdout ?

2011-10-30 Thread Jesse Phillips
On Sun, 30 Oct 2011 10:00:21 +, Frédéric Galusik wrote: > Hi, > > Can someone give me a clue on why nothing is printed to stdout ? > > I wish a list of files with their size. > > code: > // > import std.stdio; > import std.file; > > void main(string[] args) > { > foreach (DirEntry e;

Re: how to use curl to download a file

2011-11-02 Thread Jesse Phillips
etc.c.curl is meant for those that know curl and wish to use it. etc.curl has been delayed but is intended for those that wish to access the internet.

Compiler should error when goto over initialization?

2012-09-16 Thread Jesse Phillips
I'm thinking I this is supposed to be a compiler error and I should report as a bug: "It is illegal for a GotoStatement to be used to skip initializations." void main() { goto b; int num = 5; b: num = 7; }

Re: Regarding type deduction

2012-09-17 Thread Jesse Phillips
On Monday, 17 September 2012 at 14:54:48 UTC, bearophile wrote: Do you think it's useful and possible to extend the D type inference (deduction) for templates to support something like this (I know there are different ways to do this in D)? struct Tree1 { static struct Node { int x; } } s

Re: Compiler should error when goto over initialization?

2012-09-17 Thread Jesse Phillips
On Sunday, 16 September 2012 at 18:33:22 UTC, Iain Buclaw wrote: On Sunday, 16 September 2012 at 18:20:49 UTC, Jesse Phillips wrote: I'm thinking I this is supposed to be a compiler error and I should report as a bug: "It is illegal for a GotoStatement to be used to skip initi

Re: undefined reference to `_D6deimos6python6Python12__ModuleInfoZ'

2012-09-19 Thread Jesse Phillips
On Tuesday, 18 September 2012 at 04:56:27 UTC, Ellery Newcomer wrote: In a templated function in my header file, I make a call to enforce. When the function is not called [instantiated], all is well. When the function is called, it generates yon undefined reference to __ModuleInfoZ. I guess

Re: std.json: SkipWhitespace = false ?

2012-09-19 Thread Jesse Phillips
On Wednesday, 19 September 2012 at 20:06:31 UTC, Peter Sommerfeld wrote: Hi Everyone! I'm new to :D and have a small problem with std.json. If I use parseJSON() or toJSON() all whitespaces are removed. I would like it to have them preserved for better readability for users. In std.json.d vario

Re: Optional function invocation parentheses

2012-09-20 Thread Jesse Phillips
On Thursday, 20 September 2012 at 13:57:54 UTC, monarch_dodra wrote: On Thursday, 20 September 2012 at 12:59:51 UTC, Will Rubin wrote: Thanks for the detailed reply. It's too early for me to have much of an opinion but I'll take your approach and use @Property without parens (as I would in C# f

Re: GUI development libraries in D?

2012-09-26 Thread Jesse Phillips
On Tuesday, 25 September 2012 at 21:51:40 UTC, Matthew Turner wrote: Hello, I'm wondering if there is any library for making a GUI with D. If not, what would you recommend for that? Could I just use c++ libraries? Thank you, Matt http://www.prowiki.org/wiki4d/wiki.cgi?GuiLibraries Sorry

Something wrong with std.math.pow?

2012-09-27 Thread Jesse Phillips
Am I getting something wrong with this code? import std.conv; import std.math; void main() { pragma(msg, "Number of bits: " ~ to!string(12 * 4)); pragma(msg, "Addressable Bytes: " ~ to!string(pow(2, 12 * 4))); } Number of bits: 48 Addressable Bytes: 0 Linux 64bit dmd 2.060... Speci

Re: Something wrong with std.math.pow?

2012-09-28 Thread Jesse Phillips
On Friday, 28 September 2012 at 05:46:49 UTC, Tim wrote: From what I understand, pragma(msg, ...) prints at compile time. I don't think that it evaluates functions then. In order to print it must have a value to print, so D makes its great attempt to run whatever it can at compile time to get

Re: Something wrong with std.math.pow?

2012-09-28 Thread Jesse Phillips
On Friday, 28 September 2012 at 05:35:13 UTC, Jesse Phillips wrote: Specifically, shouldn't 2^48 be a little bit larger than 0? After heading to bed I realized that I could no longer rely on compile-time type selection since I was calling a function. So obviously the number I was lookin

Re: How to register class member function as lpfnWndProc? Cannot convert delegate to function

2012-09-28 Thread Jesse Phillips
On Friday, 28 September 2012 at 17:53:59 UTC, deed wrote: (Defining wndProc as a global function works, but is not what I want to do...) What is the issue here and how do I make it work? You are interfacing with C, which does not support functions with state (delegate). You must pass it a fu

Troubleshooting Linker error (Symbol Undefined)

2012-09-30 Thread Jesse Phillips
I'm trying to identify what change has resulted in getting the error: Error 42: Symbol Undefined _VarCmp@16 I was doing my not so routine updates for the Juno Class Libraries. This symbol is the VARIANT compare function provided by oleaut32.lib on Windows. It is a very nice function and h

Re: Troubleshooting Linker error (Symbol Undefined)

2012-10-01 Thread Jesse Phillips
On Monday, 1 October 2012 at 05:04:32 UTC, Andrej Mitrovic wrote: Find oleaut32.dll in your Windows folder, and run implib on it: $ implib oleaut32.lib oleaut32.dll /s Thanks, I'll to play with this more because my first attempt did not resolve the issue and instead has resulted in even more

Re: Troubleshooting Linker error (Symbol Undefined)

2012-10-01 Thread Jesse Phillips
On Monday, 1 October 2012 at 05:04:32 UTC, Andrej Mitrovic wrote: Find oleaut32.dll in your Windows folder, and run implib on it: $ implib oleaut32.lib oleaut32.dll /s Put the import lib in the same folder as the project and change linkage to extern(C). It works for me this way. Thank you, mak

Accessing CoInit [is Troubleshooting Linker error]

2012-10-01 Thread Jesse Phillips
I've made the changes needed to get past the linker error, but have run into an Access Violation when using CoInitializeEx Once again I've returned to 2.057 (without changing ole32.lib) and this will compile and run. pragma(lib, "ole32.lib"); extern(Windows) int CoInitializeEx(void*, uint dw

Re: Accessing CoInit [is Troubleshooting Linker error]

2012-10-02 Thread Jesse Phillips
On Tuesday, 2 October 2012 at 09:48:00 UTC, Andrej Mitrovic wrote: I'm sorry, I was completely wrong about STDAPI being extern(C). I saw EXTERN_C and immediately thought this was the calling convention, it's not: #define STDAPI EXTERN_C HRESULT STDAPICALLTYPE #define STDAPICAL

Re: Using inout in delegates

2012-10-04 Thread Jesse Phillips
On Thursday, 4 October 2012 at 13:55:39 UTC, Jacob Carlborg wrote: void foo (inout int[] arr) { auto a = { auto b = arr[0]; }; } void main () { auto a = [3, 4, 5]; foo(a); } Compiling the above code with DMD 2.060 results in the following error message: Error: variable main.foo._

Re: is array an InputRange?

2012-10-05 Thread Jesse Phillips
On Friday, 5 October 2012 at 13:39:56 UTC, ref2401 wrote: import std.range; int[] numbers = [1, 3, 5, 7, 9, 11]; auto rangeObject = inputRangeObject(numbers); auto inputRange = cast(InputRange!(int[]))rangeObject; why does 'inputRange' equal null? On another note to what others said. An arra

Re: std.algorithm.skipOver broken / misbehaving?

2012-10-08 Thread Jesse Phillips
On Friday, 5 October 2012 at 08:53:22 UTC, Era Scarecrow wrote: Mmmm glancing at the notes again, maybe I misread it and it only skips if the beginning equals, rather than if it contains... Kinda annoying since it sounds like what I wanted would work... Pretty sure the semantics you want are

Re: Unable to understand this compiler error

2012-10-10 Thread Jesse Phillips
On Wednesday, 10 October 2012 at 14:52:00 UTC, Lubos Pintes wrote: Hi, I discovered this while playing with DGUI's treeview module. Here is a program that generates exactly the same error that looks weird to me: module a; import std.stdio; alias void* pvoid; enum E : pvoid { a=cast(pvoid)-

COM Example work for anyone?

2012-10-13 Thread Jesse Phillips
The dmd compiler comes with some example code. One of the examples is for COM. Does this work for anyone else? The dll registration code is failing: SetKeyAndValue() failed. Other output looks good: OLE 2 initialized hMod = 268435456 LoadLibraryA() succeeded pfn = 100033E0, fn = 'DllRegister

Re: COM Example work for anyone?

2012-10-14 Thread Jesse Phillips
On Sunday, 14 October 2012 at 19:04:22 UTC, Richard Webb wrote: I haven't tried to run it, but as a random guess, does the user your running it as have permissions to write to HKEY_CLASSES_ROOT ? Guess that would be it. Specifically told the program to run as admin and it works. Should have c

Re: msgpack unresolved question

2012-10-25 Thread Jesse Phillips
On Wednesday, 24 October 2012 at 11:19:08 UTC, Dan wrote: No answer yet, but the errors look very similar to those run into here: http://www.digitalmars.com/d/archives/digitalmars/D/Something_wrong_with_dmd_s_-c_command_162601.html back in March. Wish I knew how that was resolved. When I tried

Re: msgpack unresolved question

2012-10-25 Thread Jesse Phillips
Hmm, I can reproduce. It is caused by the call to pack in function 2. void f2() { unpack(pack(mpObj)); } I get the feeling this may be a compiler bug, I'm not seeing anything used that isn't part of those two files or Phobos.

Re: UTF-8 strings and endianness

2012-10-30 Thread Jesse Phillips
On Monday, 29 October 2012 at 15:22:39 UTC, Adam D. Ruppe wrote: UTF-8 isn't affected by endianness. If this is true why does the BOM have marks for big and little endian? http://en.wikipedia.org/wiki/Byte_order_mark#Representations_of_byte_order_marks_by_encoding

Re: UTF-8 strings and endianness

2012-10-30 Thread Jesse Phillips
On Tuesday, 30 October 2012 at 17:17:36 UTC, Tobias Pankrath wrote: On Tuesday, 30 October 2012 at 17:12:41 UTC, Jesse Phillips wrote: On Monday, 29 October 2012 at 15:22:39 UTC, Adam D. Ruppe wrote: UTF-8 isn't affected by endianness. If this is true why does the BOM have marks for bi

C# implementation of Nullable (May)

2012-12-04 Thread Jesse Phillips
This article goes over a Nullable/Optional/Maybe implementation for C#. http://twistedoakstudios.com/blog/Post1130_when-null-is-not-enough-an-option-type-for-c http://www.reddit.com/r/programming/comments/14930f/when_null_is_not_enough_an_option_type_for_c/ It seems to be similar to that of st

Re: Template return values?

2012-12-10 Thread Jesse Phillips
On Thursday, 6 December 2012 at 00:31:53 UTC, Jonathan M Davis wrote: Pretty much the only kind of situation that I remember running into where I would consider Variant to be a good solution is one where you literally have to return a type from a function where you can't know that type at com

Re: VIM: What wizardry is this?

2012-12-14 Thread Jesse Phillips
On Friday, 14 December 2012 at 20:37:12 UTC, Jace Bennett wrote: Am I getting coolness from janus or from the dmd installer? In short, it's awesome, but wtf? That is the compiler, been there for about 10 releases. Don't know who Janus is.

Re: Enhancing foreach

2013-01-09 Thread Jesse Phillips
On Wednesday, 9 January 2013 at 17:07:50 UTC, ixid wrote: It would be even nicer to be able to write for(i;5) and have it behave as foreach. I hated java's choice to use for as foreach. It does not prepare me for the semantics of what I'm about to read. And when I go to write it and don't rem

Re: Reading Standard Input

2013-01-23 Thread Jesse Phillips
On Wednesday, 23 January 2013 at 18:31:31 UTC, Kenneth Sills wrote: It's a bit hard looking for D stuff, even searches such as "Dlang" or "D Language" don't yield terribly useful results. Mostly because the material isn't there. As more content about D exist the easier it is. Just most of the

Re: Adding more information to exceptions

2013-01-30 Thread Jesse Phillips
On Tuesday, 29 January 2013 at 21:53:46 UTC, Ali Çehreli wrote: On 01/29/2013 12:32 PM, Vladimir Panteleev wrote: > I would like to add some information to any exceptions thrown inside the > loop's body (e.g. whatever std.conv.to may throw), in our case the line > number. Here is a RAII idea th

Re: Can D still compile html files? Seems not.

2013-02-22 Thread Jesse Phillips
Nope, removed. While not the same and may not do anything that you are considering. This was made to compile listings and then put the output of compiler and run into a new tex file. https://github.com/JesseKPhillips/listings-dlang-extractor

Re: Why are commands executing out of order?

2013-02-23 Thread Jesse Phillips
On Wednesday, 13 February 2013 at 15:53:44 UTC, Andrea Fontana wrote: Why Appender has no ~ operator itself? auto app = appender!string(); app.put("a"); // why not app ~= "a"? Because Appender is an output range, using ~= will mean your code will not work with other output ranges.

Re: Can D still compile html files? Seems not.

2013-02-23 Thread Jesse Phillips
On Saturday, 23 February 2013 at 19:07:31 UTC, Charles Hixson wrote: What actually brought this up is that I've gotten so disgusted with ddoc that I was looking for pretty much ANY alternative. ah, then Tex isn't what you want. As for improving DDOC several attempts have been made. CandyDoc

Re: What xml libraries are people using?

2013-03-02 Thread Jesse Phillips
On Saturday, 2 March 2013 at 08:03:08 UTC, simendsjo wrote: Everyone says "Don't use std.xml", and there are several other libraries. Which can you recommend? (I haven't looked closely at any of them, just some links found by googling) https://github.com/adamdruppe/misc-stuff-including-D-progr

Re: What xml libraries are people using?

2013-03-05 Thread Jesse Phillips
On Monday, 4 March 2013 at 04:45:45 UTC, Brad Roberts wrote: Has this implementation been bounced off the w3c xml test suite? I don't know, but the xml tests don't seem to be the those provided by W3C http://bazaar.launchpad.net/~michael-rynn-500/d2-xml/d2-xml-dev/files/head:/test/xmltest/

Re: Variant confusion

2013-03-11 Thread Jesse Phillips
On Monday, 11 March 2013 at 14:23:41 UTC, Peter Sommerfeld wrote: A confusing example: import std.stdio, std.variant, std.conv; alias Value = Variant; alias List = Value[]; alias Map = List[Value]; Oh, the new alias syntax is in? The problem you are

Re: Variant confusion

2013-03-11 Thread Jesse Phillips
On Monday, 11 March 2013 at 15:25:55 UTC, Peter Sommerfeld wrote: Jesse Phillips wrote: Oh, the new alias syntax is in? Hmmm, I'm new to D, why should I use the old one? And I like the new one more too, it is more descriptive IMHO. I just didn't know it made it in yet, so many cha

Re: Is this range behaviour correct?

2013-03-14 Thread Jesse Phillips
On Thursday, 14 March 2013 at 21:40:34 UTC, Ali Çehreli wrote: I had toyed with the idea of making a ForwardRange from an InputRange by caching the elements. Without any guarantees, :) here is the code: http://forum.dlang.org/thread/ifg5ei$2qc7$1...@digitalmars.com Ali I attempted to crea

Re: does GtkD (win7) support opengl?

2013-04-01 Thread Jesse Phillips
On Monday, 1 April 2013 at 14:58:36 UTC, Alexandr Druzhinin wrote: I built GtkD following instructions from https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows. Then I tried to build demo from demos/gl/simple/simplegl.d and failed with undefined symbols http://dpaste.dzfl.pl/ba0c

Re: does GtkD (win7) support opengl?

2013-04-02 Thread Jesse Phillips
On Tuesday, 2 April 2013 at 06:19:23 UTC, Alexandr Druzhinin wrote: 02.04.2013 1:32, Jesse Phillips пишет: Please provide your compile command, it looks like you didn't tell the linker where to find GtkD. cd path/to/GtkD/demos/gl/simple dmd SimpleGL.d -I../../../src -I../../../

Re: does GtkD (win7) support opengl?

2013-04-02 Thread Jesse Phillips
On Tuesday, 2 April 2013 at 16:35:07 UTC, Alexandr Druzhinin wrote: 02.04.2013 21:38, Jesse Phillips пишет: On Tuesday, 2 April 2013 at 06:19:23 UTC, Alexandr Druzhinin wrote: 02.04.2013 1:32, Jesse Phillips пишет: Please provide your compile command, it looks like you didn't tell the l

Re: Opportunity

2013-04-08 Thread Jesse Phillips
On Monday, 8 April 2013 at 14:20:11 UTC, Russel Winder wrote: Given that the entire C++ standards committee will be at ACCU 2013, I've decided to do a lightning talk on why D and Go are better tools for any native coding problem than C++. pigeon[500] pigeons; pigeons[random(500

Re: Range returning an array

2013-04-10 Thread Jesse Phillips
On Tuesday, 9 April 2013 at 23:18:26 UTC, Steven Schveighoffer wrote: On Tue, 09 Apr 2013 18:53:56 -0400, Joseph Rushton Wakeling wrote: By the way: the reason that I rejected the temporary-variable choice was that I couldn't really see the difference cost-wise between doing that, versus retur

Re: Only partial type info for templated classes

2013-04-10 Thread Jesse Phillips
On Monday, 8 April 2013 at 05:12:24 UTC, cal wrote: class C(T){} class CC(T){} struct S(T){} struct SS(T){} void main() { import std.stdio; writeln(typeid(S!(SS!int)).name); // S!(SS!(int)).S writeln(typeid(C!(CC!int)).name); // C!(CC).C } Is there a way to get the full type info in

Re: opIndex operators

2013-04-14 Thread Jesse Phillips
On Sunday, 14 April 2013 at 06:57:34 UTC, gedaiu wrote: Error: function base.Value.Value.opIndex (Value index) is not callable using argument types (string) Error: cannot implicitly convert expression ("string") of type string to Value I have implemented this methods: this(string) Value opCast

Re: Internationalization vs. Unicode

2013-04-29 Thread Jesse Phillips
On Monday, 29 April 2013 at 18:36:32 UTC, Tyro[17] wrote: This might work. Not sure yet. The first thing that caught my eyes is You'll find the ported Java source: https://github.com/d-widget-toolkit/base/tree/master/src

Re: D is totally useless

2013-05-01 Thread Jesse Phillips
On Wednesday, 1 May 2013 at 22:33:40 UTC, John Colvin wrote: On Wednesday, 1 May 2013 at 21:26:32 UTC, Temtaime wrote: Because it's full of a drawing and many other functions. OpenGL is part of WinAPI. Is that strictly speaking true? I didn't think opengl was part of the windows api (WinAPI)

Re: strange runtime error

2013-05-02 Thread Jesse Phillips
On Thursday, 2 May 2013 at 10:30:20 UTC, gedaiu wrote: can anyone help me tu understand this kind of errors? /home/user/workspace/path/project/src(_D4core7runtime18runModuleUnitTestsUZb19unittestSegvHandlerUiPS4core3sys5posix6signal9siginfo_tPvZv+0x3e)[0x485ede] Basic translation: core.runtim

Re: D is totally useless

2013-05-02 Thread Jesse Phillips
On Thursday, 2 May 2013 at 07:39:29 UTC, Andrei Alexandrescu wrote: On 5/1/13 6:20 PM, Jesse Phillips wrote: On Wednesday, 1 May 2013 at 22:33:40 UTC, John Colvin wrote: On Wednesday, 1 May 2013 at 21:26:32 UTC, Temtaime wrote: Because it's full of a drawing and many other functions. O

Re: D is totally useless

2013-05-03 Thread Jesse Phillips
On Thursday, 2 May 2013 at 20:23:53 UTC, Diggory wrote: The wgl*** functions and "SwapBuffers" ARE part of the windows api even though they are implemented in opengl32.dll (they are declared in wingdi.h IIRC) You recalled correctly, and according to MS these describe OpenGL 1.1. Anyway, OpenG

Re: Compiler bug ?

2013-05-17 Thread Jesse Phillips
On Friday, 17 May 2013 at 14:35:35 UTC, Maxim Fomin wrote: If it alwalys a bad idea, compiler should not accept such code. I'm pretty sure the answer is: Compilers can have different extensions, it would be bad for a compiler to reject code which is valid by another compiler. That said, I d

Re: more fun with ubuntu

2013-05-26 Thread Jesse Phillips
On Sunday, 26 May 2013 at 05:01:10 UTC, Ellery Newcomer wrote: I have a project here which fails on link on ubuntu 12.10. It give undefined reference errors for functions in libdl and libutil. For some reason, ld won't cooperate unless you pass -ldl -lutil at the end of the command string. Hol

Re: Why does this snippet print the enum identifiers instead of their values?

2013-05-28 Thread Jesse Phillips
I do not believe this is a bug. You should be able to print the value by casting to string. (to!() will not work as it will provide the same results) Usually enumeration values are not descriptive for how they should be used. And when printing to the screen it is usually for debugging or some

Re: Using in as a parameter qualifier

2013-05-31 Thread Jesse Phillips
On Friday, 31 May 2013 at 17:50:33 UTC, Shriramana Sharma wrote: Sorry but I still don't get it -- if a default constructor is disallowed for struct-s by the language itself, why should I have to *tell* the compiler to disable it? The compiler always provides a default constructor (maybe not

Re: Writing closed source programs in D?

2013-06-03 Thread Jesse Phillips
On Friday, 31 May 2013 at 15:35:54 UTC, Jonathan M Davis wrote: The only problem with auto is that the type can't be inferred without the function body. But all of the information is there. So, all you have to do is make it so that the function doesn't return auto (or so that the variable decla

Re: Global extern(C) in druntime header files?

2013-06-05 Thread Jesse Phillips
Not going to look into the file, but I'm pretty sure bsd_signal is function for an external C library right? If that is the case, it must use C calling convention, so yes this is correct.

Re: Strange output

2013-06-07 Thread Jesse Phillips
On Friday, 7 June 2013 at 19:10:54 UTC, Daemon wrote: The following program is supposed to print out only numbers that are less than 5, yet the number 63 gets printed. You're probably just playing around, but FYI the function is http://dlang.org/phobos/std_algorithm.html#filter While you've c

Re: limits for numeric types

2013-06-21 Thread Jesse Phillips
On Friday, 21 June 2013 at 19:30:28 UTC, Craig Dillabaugh wrote: Thank you very much. Now, is there any way to get Google to find my question/your answer if someone searches for "dlang numeric limits"? Cheers, Craig Yes, get the text, "numeric limits" onto the page. Though, "dlang max int" se

Re: Can call static method with null reference

2013-06-24 Thread Jesse Phillips
On Sunday, 23 June 2013 at 10:09:39 UTC, Jonathan M Davis wrote: Also I don't know why I should call static methods from an instance. What's the purpose? It's stupid and pointless as far as I can tell, but I believe that C++, Java, C#, and D all do it, so as stupid as it is, it's a common stu

Re: Problems building docs

2013-06-25 Thread Jesse Phillips
On Monday, 24 June 2013 at 19:20:44 UTC, H. S. Teoh wrote: For me personally, I find that nesting dmd/druntime/phobos inside the git checkout of d-programming-language.org a tad ugly, so I use this instead: parent/d-programming-language.org parent/d-programming-language.org/web

<    1   2   3   4   5   6   7   8   >