Re: Dgame revived

2015-02-22 Thread Namespace via Digitalmars-d-announce

On Sunday, 22 February 2015 at 09:05:16 UTC, Mike Parker wrote:

On 2/22/2015 2:43 PM, Gan wrote:





dub.json:
{
name: game,
description: game,
dependencies:
{
dgame: ~master
}
}


First, you need to change your dependency to something like 
this:


dependencies:
  {
  dgame: ~0.4.0
  }

Or you can use ==0.4.0, or =0.4.0. Just don't use branch-based 
dependencies anymore (like ~master) as those are deprecated.


Second, there's a bug in Dgame's dub.json, which is causing 
compilation to error out. I'll post a PR for it.


I have the PR merged, the problem should be fixed now. Thanks to 
you and growlercab.


Re: quick-and-dirty minimalistic LISP engine

2015-02-22 Thread MrSmith via Digitalmars-d-announce

With master dmd I'm getting

milf.d(2): Error: ';' expected following module declaration 
instead of is

milf.d(2): Error: no identifier for declarator aliced
milf.d(99): Deprecation: typedef is removed
milf.d(223): Error: basic type expected, not ;
milf.d(223): Error: no identifier for declarator int
milf.d(352): Error: no identifier for declarator CellCons
milf.d(352): Error: declaration expected, not 'body'
milf.d(359): Error: found 'body' instead of statement
milf.d(374): Error: expression expected, not 'body'
milf.d(380): Error: expression expected, not 'body'
milf.d(760): Error: expression expected, not 'auto'
milf.d(760): Error: found 's' when expecting ')'
milf.d(760): Error: found '=' instead of statement
milf.d(795): Error: declaration expected, not 'if'
milf.d(796): Error: declaration expected, not 'if'
milf.d(799): Error: declaration expected, not 'for'
milf.d(799): Error: declaration expected, not ')'
milf.d(801): Error: declaration expected, not 'if'
milf.d(802): Error: no identifier for declarator stloc
milf.d(802): Error: declaration expected, not '='
milf.d(804): Error: function declaration without return type. 
(Note that constructors are always named 'this')


Also, there was no alias usize = size_t;
There is no typedef and body is reserved word.

Here is what I got: 
https://gist.github.com/MrSmith33/9bedde7b0721a6b40666


Re: dfmt 0.1.0

2015-02-22 Thread Daniel Murphy via Digitalmars-d-announce
Brian Schott  wrote in message 
news:updwbngwrilngxhun...@forum.dlang.org...



dfmt is a D source code formatting tool.

https://github.com/Hackerpilot/dfmt/
https://github.com/Hackerpilot/dfmt/releases/tag/v0.1.0


Is this on code.dlang.org?  I can't find it. 



Re: dfmt 0.1.0

2015-02-22 Thread via Digitalmars-d-announce

On Sunday, 22 February 2015 at 09:07:16 UTC, Brian Schott wrote:

On Sunday, 22 February 2015 at 08:48:16 UTC, Brian Schott wrote:
On Friday, 20 February 2015 at 02:21:01 UTC, Brian Schott 
wrote:

dfmt is a D source code formatting tool.

https://github.com/Hackerpilot/dfmt/
https://github.com/Hackerpilot/dfmt/releases/tag/v0.1.0


I just tagged 0.1.1. The only change is a bug fix for a case 
where certain long lines with parenthesis wouldn't wrap 
properly.


v0.1.2 is tagged... Move fast: things are broken, or 
something like that.


Just submitted a PR to include pesky braces a la
https://twitter.com/thedirtycoder/status/569339014085517312


Re: Reloaded for dub

2015-02-22 Thread qznc via Digitalmars-d-announce

On Friday, 20 February 2015 at 14:00:33 UTC, Kingsley wrote:

Hi

Just thought I would share this in case anyone else finds it 
useful. I wrote a tiny utility that detects changes to D files 
and then rebuilds and re-executes the main binary using dub.


I use for developing with vibe.d and other dub D project that 
have an executable binary.


The code is here:   https://github.com/kingsleyh/reloaded

essentially you just run dub in the root and it builds the 
reloaded binary. Then you just copy that binary to the root of 
your dub project and ./reloaded and then as soon as you make a 
change to a D file your code will be built and executed.


You seem to especially target Vibe.d and your approach is based 
on *restarting* the server. It should be possible to do even 
better. Reload the server without stopping.


Basic idea: Compile your server application as a shared library. 
Run a small wrapper, which uses the shared library. If a file 
changes, recompile the library and load it into the wrapper.




Re: dfmt 0.1.0

2015-02-22 Thread qznc via Digitalmars-d-announce

On Sunday, 22 February 2015 at 09:07:16 UTC, Brian Schott wrote:

On Sunday, 22 February 2015 at 08:48:16 UTC, Brian Schott wrote:
On Friday, 20 February 2015 at 02:21:01 UTC, Brian Schott 
wrote:

dfmt is a D source code formatting tool.

https://github.com/Hackerpilot/dfmt/
https://github.com/Hackerpilot/dfmt/releases/tag/v0.1.0


I just tagged 0.1.1. The only change is a bug fix for a case 
where certain long lines with parenthesis wouldn't wrap 
properly.


v0.1.2 is tagged... Move fast: things are broken, or 
something like that.


Congratulations to releasing. :)

For the record, I think using a D parser in dfmt is a dead end. 
Surely, for certain cases the additional information is 
necessary. However, it restricts dfmt to only format 
syntactically valid snippets. This means you cannot (in general) 
format parts of a file, e.g. within a diff or editor.


Example where parsing helps: foo : bar or foo: bar depending 
on the context. The former within import statements, the latter 
within switch statements.


Example for a snippet you cannot parse: The body of a switch 
statement without the switch. The 'case' keyword would be an 
error.


Effectively, you want to parse, but not with a normal parser. 
Great formatting seems to require a special (more flexible, less 
correct) parser. This is what clang-format does.


Re: dfmt 0.1.0

2015-02-22 Thread Brian Schott via Digitalmars-d-announce

On Friday, 20 February 2015 at 02:21:01 UTC, Brian Schott wrote:

dfmt is a D source code formatting tool.

https://github.com/Hackerpilot/dfmt/
https://github.com/Hackerpilot/dfmt/releases/tag/v0.1.0


I just tagged 0.1.1. The only change is a bug fix for a case 
where certain long lines with parenthesis wouldn't wrap properly.


Re: dfmt 0.1.0

2015-02-22 Thread Brian Schott via Digitalmars-d-announce

On Sunday, 22 February 2015 at 08:48:16 UTC, Brian Schott wrote:

On Friday, 20 February 2015 at 02:21:01 UTC, Brian Schott wrote:

dfmt is a D source code formatting tool.

https://github.com/Hackerpilot/dfmt/
https://github.com/Hackerpilot/dfmt/releases/tag/v0.1.0


I just tagged 0.1.1. The only change is a bug fix for a case 
where certain long lines with parenthesis wouldn't wrap 
properly.


v0.1.2 is tagged... Move fast: things are broken, or something 
like that.


Re: Dgame revived

2015-02-22 Thread Mike Parker via Digitalmars-d-announce

On 2/22/2015 2:43 PM, Gan wrote:





dub.json:
{
 name: game,
 description: game,
 dependencies:
 {
 dgame: ~master
 }
}


First, you need to change your dependency to something like this:

dependencies:
  {
  dgame: ~0.4.0
  }

Or you can use ==0.4.0, or =0.4.0. Just don't use branch-based 
dependencies anymore (like ~master) as those are deprecated.


Second, there's a bug in Dgame's dub.json, which is causing compilation 
to error out. I'll post a PR for it.


Re: Dgame revived

2015-02-22 Thread Jack via Digitalmars-d-announce

On Sunday, 22 February 2015 at 05:43:19 UTC, Gan wrote:

On Sunday, 22 February 2015 at 01:56:59 UTC, amber wrote:

On Saturday, 21 February 2015 at 14:43:57 UTC, Namespace wrote:
Today I registered Dgame on DUB. Since I do not currently 
have much time (I'm currently in my exams period) I hope I 
did everything right. Let me know if not and what could be 
improved.


Since I left D a while ago, Dgame was also not maintained, 
but thanks to your demand I will maintain Dgame again. The 
current goal is to register Dgame successful on DUB. The next 
goal would be to adapt the webpage and the installation 
chapter and to re-register the domain dgame.dev.de
After that (and after my hopefully successful exams) I will 
rebuild Dgame from scratch with the goal of a more consistent 
and better structure and with the idea in mind to use @nogc 
wherever possible.


Cool, thanks for Dgame.


I can't seem to build a program with just the main method with 
DGame on DUB.

Error:
Building: game (Default)
Performing main compilation...
/usr/local/bin/dub build game --build=debug
Building package spacecraft in /Users/Matt/DGame Test/
Package dsfml can be installed with version ~master.
Package dgame can be upgraded from ~master to 0.4.0.
Use dub upgrade to perform those changes.
WARNING: A deprecated branch based version specification is 
used for the dependency dgame. Please use numbered versions 
instead. Also note that you can still use the 
dub.selections.json file to override a certain dependency to 
use a branch instead.
Building derelict-util 1.9.1 configuration library, build 
type debug.

Running dmd...
Error: unrecognized switch '-version=0.4.0'
FAIL 
../.dub/packages/derelict-util-1.9.1/.dub/build/library-debug-posix.osx-x86_64-dmd_2066-E0DFCC872C8A9F5E0383C82BBC088A37/ 
DerelictUtil staticLibrary

Error executing command build: dmd failed with exit code 1.

Exit code 2
Build complete -- 1 error, 0 warnings

-- Done --

Build: 1 error, 0 warnings



dub.json:
{
name: game,
description: game,
dependencies:
{
dgame: ~master
}
}


Having this problem too.

dub.json:
{
name: game,
description: game,
dependencies: {
dgame: ~0.4.0
}
}




Re: Dgame revived

2015-02-22 Thread amber via Digitalmars-d-announce

On Sunday, 22 February 2015 at 08:26:16 UTC, Jack wrote:

On Sunday, 22 February 2015 at 05:43:19 UTC, Gan wrote:

On Sunday, 22 February 2015 at 01:56:59 UTC, amber wrote:
On Saturday, 21 February 2015 at 14:43:57 UTC, Namespace 
wrote:
Today I registered Dgame on DUB. Since I do not currently 
have much time (I'm currently in my exams period) I hope I 
did everything right. Let me know if not and what could be 
improved.


Since I left D a while ago, Dgame was also not maintained, 
but thanks to your demand I will maintain Dgame again. The 
current goal is to register Dgame successful on DUB. The 
next goal would be to adapt the webpage and the installation 
chapter and to re-register the domain dgame.dev.de
After that (and after my hopefully successful exams) I will 
rebuild Dgame from scratch with the goal of a more 
consistent and better structure and with the idea in mind to 
use @nogc wherever possible.


Cool, thanks for Dgame.


I can't seem to build a program with just the main method with 
DGame on DUB.

Error:
Building: game (Default)
Performing main compilation...
/usr/local/bin/dub build game --build=debug
Building package spacecraft in /Users/Matt/DGame Test/
Package dsfml can be installed with version ~master.
Package dgame can be upgraded from ~master to 0.4.0.
Use dub upgrade to perform those changes.
WARNING: A deprecated branch based version specification is 
used for the dependency dgame. Please use numbered versions 
instead. Also note that you can still use the 
dub.selections.json file to override a certain dependency to 
use a branch instead.
Building derelict-util 1.9.1 configuration library, build 
type debug.

Running dmd...
Error: unrecognized switch '-version=0.4.0'
FAIL 
../.dub/packages/derelict-util-1.9.1/.dub/build/library-debug-posix.osx-x86_64-dmd_2066-E0DFCC872C8A9F5E0383C82BBC088A37/ 
DerelictUtil staticLibrary

Error executing command build: dmd failed with exit code 1.

Exit code 2
Build complete -- 1 error, 0 warnings

-- Done --

Build: 1 error, 0 warnings



dub.json:
{
   name: game,
   description: game,
   dependencies:
   {
   dgame: ~master
   }
}


Having this problem too.

dub.json:
{
name: game,
description: game,
dependencies: {
dgame: ~0.4.0
}
}


I tried to post this earlier but it didn't go through for some 
reason...


I had the same problem and went to github to report the issue but 
it's already there with a PR pending. It's a one-line fix. so I 
manually copied what the PR does and it is now working for me.


I had to edit the dub.json file in the Dgame package (under 
~/.dub/packages) and remove the versions:[0.4.0] line. Saved 
the file and rebuilt my own app. All good :)


/amber


Re: Dgame revived

2015-02-22 Thread Gan via Digitalmars-d-announce

On Sunday, 22 February 2015 at 22:29:53 UTC, Namespace wrote:

On Sunday, 22 February 2015 at 22:24:59 UTC, Gan wrote:

On Sunday, 22 February 2015 at 21:58:13 UTC, John Colvin wrote:

On Sunday, 22 February 2015 at 21:34:03 UTC, Foo wrote:
I think you need to install the ogg libraries. Derelict, 
which Dgame uses, only provides bindings to the C/C++ 
libraries. You still need to get the those libraries for 
things to work.


Sorry I cannot help more. On linux it's just a matter of 
using the pkg manager (apt, pacman, yum etc.) On MAC I have 
not idea.



I can confirm Dgame 0.4.1 is now working on Linux (Debian 
x86_64) after I did a dub upgrade.


Thanks,
amber


That is nice to hear. It works for me on Windows 8.1. 
Someone with a Mac here?


I'll try tomorrow if no-one else has.


I have a Mac. OS Yosemite 10.10. Macbook Pro 2011. Intel HD 
3000, 16gb of ram, i5 CPU.


When I run one of your Dgame tutorials I get this error:
Derelict loaded GL version: GL21 (GL21), available GL version: 
2.1 INTEL-10.0.22
object.Exception@../.dub/packages/dgame-0.4.1/Window/Window.d(144): 
Your OpenGL version (21) is too low. Need at least GL 3.0.


That is strange. Every PC should be be capable to launch at 
least OpenGL 3.0. Did you try to update your graphic driver?


You can't really upgrade your graphics driver on a mac.


Re: Dgame revived

2015-02-22 Thread Gan via Digitalmars-d-announce

On Sunday, 22 February 2015 at 22:32:44 UTC, Gan wrote:

On Sunday, 22 February 2015 at 22:29:53 UTC, Namespace wrote:

On Sunday, 22 February 2015 at 22:24:59 UTC, Gan wrote:
On Sunday, 22 February 2015 at 21:58:13 UTC, John Colvin 
wrote:

On Sunday, 22 February 2015 at 21:34:03 UTC, Foo wrote:
I think you need to install the ogg libraries. Derelict, 
which Dgame uses, only provides bindings to the C/C++ 
libraries. You still need to get the those libraries for 
things to work.


Sorry I cannot help more. On linux it's just a matter of 
using the pkg manager (apt, pacman, yum etc.) On MAC I 
have not idea.



I can confirm Dgame 0.4.1 is now working on Linux (Debian 
x86_64) after I did a dub upgrade.


Thanks,
amber


That is nice to hear. It works for me on Windows 8.1. 
Someone with a Mac here?


I'll try tomorrow if no-one else has.


I have a Mac. OS Yosemite 10.10. Macbook Pro 2011. Intel HD 
3000, 16gb of ram, i5 CPU.


When I run one of your Dgame tutorials I get this error:
Derelict loaded GL version: GL21 (GL21), available GL 
version: 2.1 INTEL-10.0.22
object.Exception@../.dub/packages/dgame-0.4.1/Window/Window.d(144): 
Your OpenGL version (21) is too low. Need at least GL 3.0.


That is strange. Every PC should be be capable to launch at 
least OpenGL 3.0. Did you try to update your graphic driver?


You can't really upgrade your graphics driver on a mac.


Stackoverflow says it is possible. One guy's fix was something 
like:

glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);

Cause apparently it supports it.


Re: Dgame revived

2015-02-22 Thread Gan via Digitalmars-d-announce

On Sunday, 22 February 2015 at 09:30:10 UTC, Namespace wrote:

On Sunday, 22 February 2015 at 09:05:16 UTC, Mike Parker wrote:

On 2/22/2015 2:43 PM, Gan wrote:





dub.json:
{
   name: game,
   description: game,
   dependencies:
   {
   dgame: ~master
   }
}


First, you need to change your dependency to something like 
this:


dependencies:
 {
 dgame: ~0.4.0
 }

Or you can use ==0.4.0, or =0.4.0. Just don't use 
branch-based dependencies anymore (like ~master) as those are 
deprecated.


Second, there's a bug in Dgame's dub.json, which is causing 
compilation to error out. I'll post a PR for it.


I have the PR merged, the problem should be fixed now. Thanks 
to you and growlercab.


Now it builds though crashes on run with this error:

init openAL
derelict.util.exception.SharedLibLoadException@../../.dub/packages/derelict-util-1.9.1/source/derelict/util/exception.d(35): 
Failed to load one or more shared libraries:

libogg.dylib - dlopen(libogg.dylib, 2): image not found
libogg.0.dylib - dlopen(libogg.0.dylib, 2): image not found
Error executing command run: Program exited with code 1


Press any key to continue...


Re: Dgame revived

2015-02-22 Thread Namespace via Digitalmars-d-announce

Now it builds though crashes on run with this error:

init openAL
derelict.util.exception.SharedLibLoadException@../../.dub/packages/derelict-util-1.9.1/source/derelict/util/exception.d(35): 
Failed to load one or more shared libraries:

libogg.dylib - dlopen(libogg.dylib, 2): image not found
libogg.0.dylib - dlopen(libogg.0.dylib, 2): image not found
Error executing command run: Program exited with code 1


Press any key to continue...


That sounds strange. Have you already tried to update the 
libraries?

BTW: The domain is back in action: http://dgame-dev.de/
But I still need to update the installations chapter.


Re: Dgame revived

2015-02-22 Thread John Colvin via Digitalmars-d-announce

On Sunday, 22 February 2015 at 21:34:03 UTC, Foo wrote:
I think you need to install the ogg libraries. Derelict, which 
Dgame uses, only provides bindings to the C/C++ libraries. You 
still need to get the those libraries for things to work.


Sorry I cannot help more. On linux it's just a matter of using 
the pkg manager (apt, pacman, yum etc.) On MAC I have not idea.



I can confirm Dgame 0.4.1 is now working on Linux (Debian 
x86_64) after I did a dub upgrade.


Thanks,
amber


That is nice to hear. It works for me on Windows 8.1. Someone 
with a Mac here?


I'll try tomorrow if no-one else has.


Re: Dgame revived

2015-02-22 Thread Namespace via Digitalmars-d-announce

On Sunday, 22 February 2015 at 22:32:44 UTC, Gan wrote:

On Sunday, 22 February 2015 at 22:29:53 UTC, Namespace wrote:

On Sunday, 22 February 2015 at 22:24:59 UTC, Gan wrote:
On Sunday, 22 February 2015 at 21:58:13 UTC, John Colvin 
wrote:

On Sunday, 22 February 2015 at 21:34:03 UTC, Foo wrote:
I think you need to install the ogg libraries. Derelict, 
which Dgame uses, only provides bindings to the C/C++ 
libraries. You still need to get the those libraries for 
things to work.


Sorry I cannot help more. On linux it's just a matter of 
using the pkg manager (apt, pacman, yum etc.) On MAC I 
have not idea.



I can confirm Dgame 0.4.1 is now working on Linux (Debian 
x86_64) after I did a dub upgrade.


Thanks,
amber


That is nice to hear. It works for me on Windows 8.1. 
Someone with a Mac here?


I'll try tomorrow if no-one else has.


I have a Mac. OS Yosemite 10.10. Macbook Pro 2011. Intel HD 
3000, 16gb of ram, i5 CPU.


When I run one of your Dgame tutorials I get this error:
Derelict loaded GL version: GL21 (GL21), available GL 
version: 2.1 INTEL-10.0.22
object.Exception@../.dub/packages/dgame-0.4.1/Window/Window.d(144): 
Your OpenGL version (21) is too low. Need at least GL 3.0.


That is strange. Every PC should be be capable to launch at 
least OpenGL 3.0. Did you try to update your graphic driver?


You can't really upgrade your graphics driver on a mac.


This sounds similar: 
http://stackoverflow.com/questions/5294295/how-to-do-opengl-3-programming-on-os-x-with-a-geforce-9400
I'm sorry, in my next upgrade I will use GLEW, that should solve 
the problem. Maybe I can start the upgrade before end of march.


Re: quick-and-dirty minimalistic LISP engine

2015-02-22 Thread ketmar via Digitalmars-d-announce
On Sun, 22 Feb 2015 10:40:24 +, MrSmith wrote:

p.s. do you know that `macro` is a keyword? and that it does nothing and 
TOKmacro is not used anywhere? ah, the hidden joys of D!

signature.asc
Description: PGP signature


Re: quick-and-dirty minimalistic LISP engine

2015-02-22 Thread ketmar via Digitalmars-d-announce
On Sun, 22 Feb 2015 10:40:24 +, MrSmith wrote:

 With master dmd I'm getting
 
 milf.d(2): Error: ';' expected following module declaration instead of
 is

that is exactly what i wanted. the only vanilla version is that in zip, 
the aliced version will not compile by vanilla DMD. didn't the line
`module milf is aliced;` rings the bell? Aliced is still D, but with 
additions i found right for me. so you are right: Aliced doesn't need 
alias for `size_t`, it has `typedef`, `body` is not keyword in it and so 
on.

signature.asc
Description: PGP signature


Re: Dgame revived

2015-02-22 Thread Namespace via Digitalmars-d-announce

On Sunday, 22 February 2015 at 22:24:59 UTC, Gan wrote:

On Sunday, 22 February 2015 at 21:58:13 UTC, John Colvin wrote:

On Sunday, 22 February 2015 at 21:34:03 UTC, Foo wrote:
I think you need to install the ogg libraries. Derelict, 
which Dgame uses, only provides bindings to the C/C++ 
libraries. You still need to get the those libraries for 
things to work.


Sorry I cannot help more. On linux it's just a matter of 
using the pkg manager (apt, pacman, yum etc.) On MAC I have 
not idea.



I can confirm Dgame 0.4.1 is now working on Linux (Debian 
x86_64) after I did a dub upgrade.


Thanks,
amber


That is nice to hear. It works for me on Windows 8.1. Someone 
with a Mac here?


I'll try tomorrow if no-one else has.


I have a Mac. OS Yosemite 10.10. Macbook Pro 2011. Intel HD 
3000, 16gb of ram, i5 CPU.


When I run one of your Dgame tutorials I get this error:
Derelict loaded GL version: GL21 (GL21), available GL version: 
2.1 INTEL-10.0.22
object.Exception@../.dub/packages/dgame-0.4.1/Window/Window.d(144): 
Your OpenGL version (21) is too low. Need at least GL 3.0.


That is strange. Every PC should be be capable to launch at least 
OpenGL 3.0. Did you try to update your graphic driver?


Re: Dgame revived

2015-02-22 Thread Gan via Digitalmars-d-announce

On Sunday, 22 February 2015 at 22:49:16 UTC, Namespace wrote:
Stackoverflow says it is possible. One guy's fix was something 
like:

glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);

Cause apparently it supports it.


Ok, you could try to use something identical in the Window 
constructor: 
https://github.com/Dgame/Dgame/blob/master/Window/Window.d#L124



SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);



Adding these lines before window creation make it load up to 
OpenGL 3.3:


SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
	SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, 
SDL_GL_CONTEXT_PROFILE_CORE);



It runs now except it only displays a white screen. I'm testing 
your shapes tutorial.


Re: Dgame revived

2015-02-22 Thread amber via Digitalmars-d-announce

On Sunday, 22 February 2015 at 20:42:20 UTC, Gan wrote:

On Sunday, 22 February 2015 at 09:30:10 UTC, Namespace wrote:

On Sunday, 22 February 2015 at 09:05:16 UTC, Mike Parker wrote:

On 2/22/2015 2:43 PM, Gan wrote:





dub.json:
{
  name: game,
  description: game,
  dependencies:
  {
  dgame: ~master
  }
}


First, you need to change your dependency to something like 
this:


dependencies:
{
dgame: ~0.4.0
}

Or you can use ==0.4.0, or =0.4.0. Just don't use 
branch-based dependencies anymore (like ~master) as those are 
deprecated.


Second, there's a bug in Dgame's dub.json, which is causing 
compilation to error out. I'll post a PR for it.


I have the PR merged, the problem should be fixed now. Thanks 
to you and growlercab.


Now it builds though crashes on run with this error:

init openAL
derelict.util.exception.SharedLibLoadException@../../.dub/packages/derelict-util-1.9.1/source/derelict/util/exception.d(35): 
Failed to load one or more shared libraries:

libogg.dylib - dlopen(libogg.dylib, 2): image not found
libogg.0.dylib - dlopen(libogg.0.dylib, 2): image not found
Error executing command run: Program exited with code 1


Press any key to continue...


I think you need to install the ogg libraries. Derelict, which 
Dgame uses, only provides bindings to the C/C++ libraries. You 
still need to get the those libraries for things to work.


Sorry I cannot help more. On linux it's just a matter of using 
the pkg manager (apt, pacman, yum etc.) On MAC I have not idea.



I can confirm Dgame 0.4.1 is now working on Linux (Debian x86_64) 
after I did a dub upgrade.


Thanks,
amber



Re: Dgame revived

2015-02-22 Thread Namespace via Digitalmars-d-announce
On OSX you can load either legacy version of OpenGL so 
1.x/2.x or 3.x+. Not both. I found this out for 
Devisualization.Window. Most likely dgame by default is 
loading it in legacy mode.


Text tutorial doesn't work either on Mac. Just a blank white 
screen.


I will look into it this evening.


Re: Dgame revived

2015-02-22 Thread Namespace via Digitalmars-d-announce
On OSX you can load either legacy version of OpenGL so 
1.x/2.x or 3.x+. Not both. I found this out for 
Devisualization.Window. Most likely dgame by default is loading 
it in legacy mode.


Derelict GL is loading in legacy mode. You have to call 'reload' 
after creating a valid GL Context to update your OpenGL to the 
highest possible version. Maybe that doesn't work on Mac?


Re: dfmt 0.1.0

2015-02-22 Thread Jacob Carlborg via Digitalmars-d-announce

On 2015-02-22 19:52, qznc wrote:


Congratulations to releasing. :)

For the record, I think using a D parser in dfmt is a dead end. Surely,
for certain cases the additional information is necessary. However, it
restricts dfmt to only format syntactically valid snippets. This means
you cannot (in general) format parts of a file, e.g. within a diff or
editor.

Example where parsing helps: foo : bar or foo: bar depending on the
context. The former within import statements, the latter within switch
statements.

Example for a snippet you cannot parse: The body of a switch statement
without the switch. The 'case' keyword would be an error.


It depends on how the parser is implemented. For example, the Eclipse 
Java parser is very flexible when it comes to this. You can choose to 
either parse a complete file or just a fragment of code.



Effectively, you want to parse, but not with a normal parser. Great
formatting seems to require a special (more flexible, less correct)
parser. This is what clang-format does.


clang-format uses the lexer with the help of the parser. It only changes 
whitespace. At least according to the talk I watched, which is a couple 
of years old.


--
/Jacob Carlborg


Re: Dgame revived

2015-02-22 Thread Rikki Cattermole via Digitalmars-d-announce

On 23/02/2015 8:01 p.m., Namespace wrote:

On OSX you can load either legacy version of OpenGL so 1.x/2.x or
3.x+. Not both. I found this out for Devisualization.Window. Most
likely dgame by default is loading it in legacy mode.


Derelict GL is loading in legacy mode. You have to call 'reload' after
creating a valid GL Context to update your OpenGL to the highest
possible version. Maybe that doesn't work on Mac?


This does work on OSX. Again Devisualization.Window supports OpenGL 
context creation for both legacy and non legacy. It is just 
dependent upon what you specify as the version to load when creating the 
context that matters.


Re: Dgame revived

2015-02-22 Thread Rikki Cattermole via Digitalmars-d-announce

On 23/02/2015 11:33 a.m., Gan wrote:

On Sunday, 22 February 2015 at 22:32:44 UTC, Gan wrote:

On Sunday, 22 February 2015 at 22:29:53 UTC, Namespace wrote:

On Sunday, 22 February 2015 at 22:24:59 UTC, Gan wrote:

On Sunday, 22 February 2015 at 21:58:13 UTC, John Colvin wrote:

On Sunday, 22 February 2015 at 21:34:03 UTC, Foo wrote:

I think you need to install the ogg libraries. Derelict, which
Dgame uses, only provides bindings to the C/C++ libraries. You
still need to get the those libraries for things to work.

Sorry I cannot help more. On linux it's just a matter of using
the pkg manager (apt, pacman, yum etc.) On MAC I have not idea.


I can confirm Dgame 0.4.1 is now working on Linux (Debian x86_64)
after I did a dub upgrade.

Thanks,
amber


That is nice to hear. It works for me on Windows 8.1. Someone with
a Mac here?


I'll try tomorrow if no-one else has.


I have a Mac. OS Yosemite 10.10. Macbook Pro 2011. Intel HD 3000,
16gb of ram, i5 CPU.

When I run one of your Dgame tutorials I get this error:
Derelict loaded GL version: GL21 (GL21), available GL version: 2.1
INTEL-10.0.22
object.Exception@../.dub/packages/dgame-0.4.1/Window/Window.d(144):
Your OpenGL version (21) is too low. Need at least GL 3.0.


That is strange. Every PC should be be capable to launch at least
OpenGL 3.0. Did you try to update your graphic driver?


You can't really upgrade your graphics driver on a mac.


Stackoverflow says it is possible. One guy's fix was something like:
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);

Cause apparently it supports it.


On OSX you can load either legacy version of OpenGL so 1.x/2.x or 
3.x+. Not both. I found this out for Devisualization.Window. Most likely 
dgame by default is loading it in legacy mode.


This Week in D, issue 6 - DConf, ddmd, dmd beta, return ref, install tip

2015-02-22 Thread Adam D. Ruppe via Digitalmars-d-announce
Here's the newest This Week in D, the big news being ddmd and the 
dmd beta.


http://arsdnet.net/this-week-in-d/feb-22.html

The tip of this week has to do with installation: as a Slackware 
user, the new download page made me feel left out, but the zip 
still works the same, so I decided to call that out so people who 
want to try the new version will know too.


Also on Reddit, hopefully we can get some more dconf attention:
http://www.reddit.com/r/programming/comments/2wtkgz/this_week_in_d_6_dconf_ddmd_dmd_beta_return_ref/


Re: Dgame revived

2015-02-22 Thread stewarth via Digitalmars-d-announce

On Monday, 23 February 2015 at 03:03:01 UTC, stewarth wrote:



And I can confirm Dgame 0.4.1 is also working with DMD 2.067-b2 
on arch linux x86_64.


Cheers,
stew


and the same on Debian x86_64 I'm just told :)

/stew


Re: Dgame revived

2015-02-22 Thread stewarth via Digitalmars-d-announce

On Sunday, 22 February 2015 at 20:55:04 UTC, amber wrote:

On Sunday, 22 February 2015 at 20:42:20 UTC, Gan wrote:

On Sunday, 22 February 2015 at 09:30:10 UTC, Namespace wrote:
On Sunday, 22 February 2015 at 09:05:16 UTC, Mike Parker 
wrote:

On 2/22/2015 2:43 PM, Gan wrote:





dub.json:
{
 name: game,
 description: game,
 dependencies:
 {
 dgame: ~master
 }
}


First, you need to change your dependency to something like 
this:


dependencies:
   {
   dgame: ~0.4.0
   }

Or you can use ==0.4.0, or =0.4.0. Just don't use 
branch-based dependencies anymore (like ~master) as those 
are deprecated.


Second, there's a bug in Dgame's dub.json, which is causing 
compilation to error out. I'll post a PR for it.


I have the PR merged, the problem should be fixed now. Thanks 
to you and growlercab.


Now it builds though crashes on run with this error:

init openAL
derelict.util.exception.SharedLibLoadException@../../.dub/packages/derelict-util-1.9.1/source/derelict/util/exception.d(35): 
Failed to load one or more shared libraries:

libogg.dylib - dlopen(libogg.dylib, 2): image not found
libogg.0.dylib - dlopen(libogg.0.dylib, 2): image not found
Error executing command run: Program exited with code 1


Press any key to continue...


I think you need to install the ogg libraries. Derelict, which 
Dgame uses, only provides bindings to the C/C++ libraries. You 
still need to get the those libraries for things to work.


Sorry I cannot help more. On linux it's just a matter of using 
the pkg manager (apt, pacman, yum etc.) On MAC I have not idea.



I can confirm Dgame 0.4.1 is now working on Linux (Debian 
x86_64) after I did a dub upgrade.


Thanks,
amber


And I can confirm Dgame 0.4.1 is also working with DMD 2.067-b2 
on arch linux x86_64.


Cheers,
stew


Re: This Week in D, issue 6 - DConf, ddmd, dmd beta, return ref, install tip

2015-02-22 Thread Joakim via Digitalmars-d-announce

On Monday, 23 February 2015 at 01:14:29 UTC, Adam D. Ruppe wrote:
Here's the newest This Week in D, the big news being ddmd and 
the dmd beta.


http://arsdnet.net/this-week-in-d/feb-22.html

The tip of this week has to do with installation: as a 
Slackware user, the new download page made me feel left out, 
but the zip still works the same, so I decided to call that out 
so people who want to try the new version will know too.


Also on Reddit, hopefully we can get some more dconf attention:
http://www.reddit.com/r/programming/comments/2wtkgz/this_week_in_d_6_dconf_ddmd_dmd_beta_return_ref/


I think you should note that ddmd only ports the dmd frontend to 
D, not any of the backends.  The way you describe the port now 
might mislead some into thinking the entire compiler has been 
ported.


Re: Dgame revived

2015-02-22 Thread Gan via Digitalmars-d-announce
On Monday, 23 February 2015 at 00:36:49 UTC, Rikki Cattermole 
wrote:

On 23/02/2015 11:33 a.m., Gan wrote:

On Sunday, 22 February 2015 at 22:32:44 UTC, Gan wrote:

On Sunday, 22 February 2015 at 22:29:53 UTC, Namespace wrote:

On Sunday, 22 February 2015 at 22:24:59 UTC, Gan wrote:
On Sunday, 22 February 2015 at 21:58:13 UTC, John Colvin 
wrote:

On Sunday, 22 February 2015 at 21:34:03 UTC, Foo wrote:
I think you need to install the ogg libraries. Derelict, 
which
Dgame uses, only provides bindings to the C/C++ 
libraries. You

still need to get the those libraries for things to work.

Sorry I cannot help more. On linux it's just a matter of 
using
the pkg manager (apt, pacman, yum etc.) On MAC I have 
not idea.



I can confirm Dgame 0.4.1 is now working on Linux 
(Debian x86_64)

after I did a dub upgrade.

Thanks,
amber


That is nice to hear. It works for me on Windows 8.1. 
Someone with

a Mac here?


I'll try tomorrow if no-one else has.


I have a Mac. OS Yosemite 10.10. Macbook Pro 2011. Intel HD 
3000,

16gb of ram, i5 CPU.

When I run one of your Dgame tutorials I get this error:
Derelict loaded GL version: GL21 (GL21), available GL 
version: 2.1

INTEL-10.0.22
object.Exception@../.dub/packages/dgame-0.4.1/Window/Window.d(144):
Your OpenGL version (21) is too low. Need at least GL 3.0.


That is strange. Every PC should be be capable to launch at 
least

OpenGL 3.0. Did you try to update your graphic driver?


You can't really upgrade your graphics driver on a mac.


Stackoverflow says it is possible. One guy's fix was something 
like:

glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);

Cause apparently it supports it.


On OSX you can load either legacy version of OpenGL so 
1.x/2.x or 3.x+. Not both. I found this out for 
Devisualization.Window. Most likely dgame by default is loading 
it in legacy mode.


Text tutorial doesn't work either on Mac. Just a blank white 
screen.