D game engine -- Any suggestions?

2013-11-20 Thread Mineko
Yo, I'm starting off a new game engine designed around D, and I just wanted to know if some of you might be kind enough to review some of my base code and tell me if I need to change anything in it.. While it's small. ;_; I'm still learning D, I quite like it, the power of C++ in some parts,

Re: Linking to a library via the linker on Windows?

2013-11-20 Thread Jeremy DeHaan
On Wednesday, 20 November 2013 at 07:47:39 UTC, Ali Çehreli wrote: On 11/19/2013 11:18 PM, Jeremy DeHaan wrote: Like I said in the title, this is related to Windows. Basically, I'm looking to put a command line together to keep things consistent between Windows, OSX and Linux. On OSX and

Re: D game engine -- Any suggestions?

2013-11-20 Thread ponce
On Wednesday, 20 November 2013 at 07:48:21 UTC, Mineko wrote: Yo, I'm starting off a new game engine designed around D, and I just wanted to know if some of you might be kind enough to review some of my base code and tell me if I need to change anything in it.. While it's small. ;_; I'm

Red-Black tree storing color without additional memory requirements

2013-11-20 Thread simendsjo
Wikipedia states that the color bit can be stored without taking additional space: In many cases the additional bit of information can be stored at no additional memory cost. Looking at the Phobos implementation, it stores it as a regular byte:

Re: D game engine -- Any suggestions?

2013-11-20 Thread simendsjo
On Wednesday, 20 November 2013 at 07:48:21 UTC, Mineko wrote: (...) ..That and if I'm using the GPL right. _ Do you really plan on using 677 lines per file on the license header..?

Re: D game engine -- Any suggestions?

2013-11-20 Thread Paulo Pinto
On Wednesday, 20 November 2013 at 07:48:21 UTC, Mineko wrote: Yo, I'm starting off a new game engine designed around D, and I just wanted to know if some of you might be kind enough to review some of my base code and tell me if I need to change anything in it.. While it's small. ;_; I'm

Re: D game engine -- Any suggestions?

2013-11-20 Thread Rene Zwanenburg
On Wednesday, 20 November 2013 at 07:48:21 UTC, Mineko wrote: Yo, I'm starting off a new game engine designed around D, and I just wanted to know if some of you might be kind enough to review some of my base code and tell me if I need to change anything in it.. While it's small. ;_; I'm

Re: pure-ifying my code

2013-11-20 Thread Kenji Hara
On Monday, 18 November 2013 at 19:52:42 UTC, Jonathan M Davis wrote: On Monday, November 18, 2013 19:16:11 Daniel Davidson wrote: On Sunday, 17 November 2013 at 10:56:16 UTC, Jonathan M Davis wrote: I think that the typical approach at this point is to just drop purity for the moment,

Re: Red-Black tree storing color without additional memory requirements

2013-11-20 Thread bearophile
simendsjo: But I would think this trick would break the GC, If the tree manages its memory manually, using C heap memory, then the pointer tagging becomes possible. Bye, bearophile

Re: returning different types via function

2013-11-20 Thread bearophile
Meta: import std.typecons; Nullable!(string[]) func(string[] zz) pure nothrow { return Nullable!(string[])(); } void main() { //AssertError thrown for trying to get //a value that is null. Might as well //return null at this point auto x = func([test])

Re: D game engine -- Any suggestions?

2013-11-20 Thread Rene Zwanenburg
On Wednesday, 20 November 2013 at 09:15:41 UTC, Rene Zwanenburg wrote: Hi, A few things jumped out at me: Camera.d: ... Oops, I have to run.. Will take a look at the rest later. Still regarding camera.d: - The glfw3 import appears to be unused and can be removed. - the call to

Re: Alocating memory depending of a variable value INT variable

2013-11-20 Thread Namespace
On Wednesday, 20 November 2013 at 00:02:42 UTC, bearophile wrote: Ali Çehreli: That is a VLA. That are currently not present in D. The most common and safe alternatives in D are allocating the memory on the heap with 'new', or over-allocating on the stack a fixed size and then slicing.

Re: pure-ifying my code

2013-11-20 Thread Jonathan M Davis
On Wednesday, November 20, 2013 10:20:35 Kenji Hara wrote: I opened a new pull request to fix the compiler issue. https://github.com/D-Programming-Language/dmd/pull/2832 Yay! Go Kenji. I don't know what we'd do without you. - Jonathan M Davis

typedef '?

2013-11-20 Thread seany
is typedef gone? http://forum.dlang.org/thread/aqsjjrtzfzslcopab...@forum.dlang.org?page=2 so If I want to define a new type as typedef string[] surrealNumber, then it does not work?

Re: typedef '?

2013-11-20 Thread evilrat
On Wednesday, 20 November 2013 at 10:49:19 UTC, seany wrote: is typedef gone? http://forum.dlang.org/thread/aqsjjrtzfzslcopab...@forum.dlang.org?page=2 so If I want to define a new type as typedef string[] surrealNumber, then it does not work? it is replaced with alias. so for ur case this

Entry point pqueue_size in libeay32.dll did not founded

2013-11-20 Thread Suliman
Here is my code: http://www.everfall.com/paste/id.php?1si5bl7yymec It's compile ok, but when I run App. I got next error: Entry point pqueue_size in libeay32.dll did not founded I had download OpenSSL, and put this lib to system32 and App folder. And it's did not help.

mixed type list?

2013-11-20 Thread seany
Is there any way to represent mixed data (of various types) as a single array? In scilab, we have list, and you can do list(integer, stringvar ) etc. Can you do something similar in D? An idea is to use a struct wil all possible data types, but think that is inefficient. Any other

Re: typedef '?

2013-11-20 Thread bearophile
seany: is typedef gone? http://forum.dlang.org/thread/aqsjjrtzfzslcopab...@forum.dlang.org?page=2 Right. so If I want to define a new type as typedef string[] surrealNumber, then it does not work? There is a Typedef implemented in Phobos. In some cases it works, but it's still buggy

Re: mixed type list?

2013-11-20 Thread QAston
On Wednesday, 20 November 2013 at 11:07:27 UTC, seany wrote: Is there any way to represent mixed data (of various types) as a single array? In scilab, we have list, and you can do list(integer, stringvar ) etc. Can you do something similar in D? An idea is to use a struct wil all

Re: mixed type list?

2013-11-20 Thread Jonathan M Davis
On Wednesday, November 20, 2013 12:07:25 seany wrote: Is there any way to represent mixed data (of various types) as a single array? In scilab, we have list, and you can do list(integer, stringvar ) etc. Can you do something similar in D? An idea is to use a struct wil all possible

Re: typedef '?

2013-11-20 Thread Dicebot
On Wednesday, 20 November 2013 at 10:54:31 UTC, evilrat wrote: On Wednesday, 20 November 2013 at 10:49:19 UTC, seany wrote: is typedef gone? http://forum.dlang.org/thread/aqsjjrtzfzslcopab...@forum.dlang.org?page=2 so If I want to define a new type as typedef string[] surrealNumber, then it

Re: D game engine -- Any suggestions?

2013-11-20 Thread Mike Parker
On 11/20/2013 4:48 PM, Mineko wrote: Thanks for helping out a newbie, and if you want to contribute to it, even better! You don't need to list derelict-util as a dependency in your package.json. The other Derelict packages already depend on it so it will be pulled in anyway.

Re: Linking to a library via the linker on Windows?

2013-11-20 Thread Mike Parker
On 11/20/2013 5:01 PM, Jeremy DeHaan wrote: The -L switch is just for sending switches to the linker. On OSX and Linux, it is -L-lLibraryName, like I mention before, where -lLibraryName is what actually gets passed to the linker. Basically I'm wondering of Optlink has a switch that does the

Re: std.json

2013-11-20 Thread Craig Dillabaugh
On Monday, 26 March 2012 at 07:14:50 UTC, Ali Çehreli wrote: On 03/25/2012 08:26 AM, AaronP wrote: Could I get a hello, world example of parsing json? The docs look simple enough, but I could still use an example. For what it's worth, I've just sent the following program to a friend before

Re: std.json

2013-11-20 Thread Dicebot
For tasks that imply conversion between D types and JSON text (alike to serialization), vibe.d module is really much superior because it provides functions like http://vibed.org/api/vibe.data.json/serializeToJson which just work on many user types.

Re: std.json

2013-11-20 Thread Craig Dillabaugh
On Wednesday, 20 November 2013 at 13:20:48 UTC, Dicebot wrote: For tasks that imply conversion between D types and JSON text (alike to serialization), vibe.d module is really much superior because it provides functions like http://vibed.org/api/vibe.data.json/serializeToJson which just work

Re: std.json

2013-11-20 Thread Dicebot
What I mean is that std.json does not seem to be written with such usage mode in mind, it is more about direct DOM manipulation/construction. So probably examples should probably not highlight how bad it is at tasks it is really bad at :P

Re: std.json

2013-11-20 Thread Craig Dillabaugh
On Wednesday, 20 November 2013 at 13:29:54 UTC, Dicebot wrote: What I mean is that std.json does not seem to be written with such usage mode in mind, it is more about direct DOM manipulation/construction. So probably examples should probably not highlight how bad it is at tasks it is really

Re: Red-Black tree storing color without additional memory requirements

2013-11-20 Thread safety0ff
On Wednesday, 20 November 2013 at 08:48:33 UTC, simendsjo wrote: But I would think this trick would break the GC, as well as making code less portable. Since the GC supports interior pointers, I think you can justify using the least significant bits as long as the size and alignment of the

Re: std.json

2013-11-20 Thread Orvid King
On 11/20/13, Craig Dillabaugh cdill...@cg.scs.carleton.ca wrote: On Wednesday, 20 November 2013 at 13:29:54 UTC, Dicebot wrote: What I mean is that std.json does not seem to be written with such usage mode in mind, it is more about direct DOM manipulation/construction. So probably examples

Re: D game engine -- Any suggestions?

2013-11-20 Thread Mineko
Wow! You guys are really helpful, I wouldn't have thought about a lot of that, I'll pounce on all of this right after breakfast! Thanks! :D

Re: Red-Black tree storing color without additional memory requirements

2013-11-20 Thread bearophile
safety0ff: Since the GC supports interior pointers, I think you can justify using the least significant bits as long as the size and alignment of the pointed object guarantee that the pointer + tag will always lie inside the memory block. From: http://dlang.org/garbage.html Do not take

Re: D game engine -- Any suggestions?

2013-11-20 Thread Henning Pohl
Feel free to take a look at https://github.com/hpohl/ext/. Maybe you can find something useful.

Re: Entry point pqueue_size in libeay32.dll did not founded

2013-11-20 Thread Suliman
On Wednesday, 20 November 2013 at 11:00:07 UTC, Suliman wrote: Here is my code: http://www.everfall.com/paste/id.php?1si5bl7yymec It's compile ok, but when I run App. I got next error: Entry point pqueue_size in libeay32.dll did not founded I had download OpenSSL, and put this lib to

Re: D game engine -- Any suggestions?

2013-11-20 Thread Geancarlo Rocha
You should fix your LICENSE following these instructions http://www.gnu.org/licenses/gpl-howto.html. I hope you understand the virality of GPL and why most people won't touch your code for real work. On Wednesday, 20 November 2013 at 07:48:21 UTC, Mineko wrote: Yo, I'm starting off a new

Re: mixed type list?

2013-11-20 Thread seany
On Wednesday, 20 November 2013 at 11:25:24 UTC, Jonathan M Davis wrote: On Wednesday, November 20, 2013 12:07:25 seany wrote: Is there any way to represent mixed data (of various types) as a single array? In scilab, we have list, and you can do list(integer, stringvar ) etc. Can you do

Re: mixed type list?

2013-11-20 Thread bearophile
seany: Now, i was trying the first, i used the std.algorithms.splitter, and the result is of type *Result* and not string[], nonetheless I can cast (how does this work? isn't typedef removed, and alias should preserve underlaying types) cast() should be used only when you know what you are

Re: D game engine -- Any suggestions?

2013-11-20 Thread Paulo Pinto
On Wednesday, 20 November 2013 at 10:20:06 UTC, Rene Zwanenburg wrote: On Wednesday, 20 November 2013 at 09:15:41 UTC, Rene Zwanenburg wrote: Hi, A few things jumped out at me: Camera.d: ... Oops, I have to run.. Will take a look at the rest later. Still regarding camera.d: - The glfw3

Re: MSG_WAITALL for Sockets

2013-11-20 Thread Jeroen Bollen
On Tuesday, 19 November 2013 at 23:36:57 UTC, Rob T wrote: On Tuesday, 19 November 2013 at 18:35:08 UTC, Jeroen Bollen wrote: Is there a way I can call a receive method on a socket with MSG_WAITALL as a flag? There doesn't seem to be an enum for that. module core.sys.posix.sys.socket;

Re: Linking to a library via the linker on Windows?

2013-11-20 Thread Jeremy DeHaan
On Wednesday, 20 November 2013 at 12:02:36 UTC, Mike Parker wrote: On 11/20/2013 5:01 PM, Jeremy DeHaan wrote: The -L switch is just for sending switches to the linker. On OSX and Linux, it is -L-lLibraryName, like I mention before, where -lLibraryName is what actually gets passed to the

Re: Class References

2013-11-20 Thread Jeroen Bollen
On Monday, 18 November 2013 at 19:12:03 UTC, Ali Çehreli wrote: On 11/18/2013 10:28 AM, Jeroen Bollen wrote: Is it possible to do something like: TestInterface testi = new classReferenceList[integer]; We still don't know what the use case is :) but it is possible to store types in a

Re: D game engine -- Any suggestions?

2013-11-20 Thread Mineko
On Wednesday, 20 November 2013 at 15:30:32 UTC, Geancarlo Rocha wrote: You should fix your LICENSE following these instructions http://www.gnu.org/licenses/gpl-howto.html. I hope you understand the virality of GPL and why most people won't touch your code for real work. Yeah I know, have

Encode text as QuotedPrintable

2013-11-20 Thread Andre
Hi, is there a library function for encoding text as QuotedPrintable? I found an old post from 2005: http://forum.dlang.org/thread/cv98ti$1sf8$1...@digitaldaemon.com The used function toHex throws errors. I also not found an alternative way to convert a char to a hex as replacement for the

Re: Encode text as QuotedPrintable

2013-11-20 Thread Adam D. Ruppe
On Wednesday, 20 November 2013 at 16:53:47 UTC, Andre wrote: is there a library function for encoding text as QuotedPrintable? I fixed the function in that post: char[] generateQuotedPrintable(in char[] string, in char[] charset = UTF-8) { char[] output; bool special =

Re: Encode text as QuotedPrintable

2013-11-20 Thread Andre
On Wednesday, 20 November 2013 at 17:04:07 UTC, Adam D. Ruppe wrote: On Wednesday, 20 November 2013 at 16:53:47 UTC, Andre wrote: is there a library function for encoding text as QuotedPrintable? I fixed the function in that post: char[] generateQuotedPrintable(in char[] string, in char[]

Re: typedef '?

2013-11-20 Thread Jesse Phillips
On Wednesday, 20 November 2013 at 10:49:19 UTC, seany wrote: is typedef gone? http://forum.dlang.org/thread/aqsjjrtzfzslcopab...@forum.dlang.org?page=2 so If I want to define a new type as typedef string[] surrealNumber, then it does not work? typedef was removed from the language, there

Re: D game engine -- Any suggestions?

2013-11-20 Thread Mineko
On Wednesday, 20 November 2013 at 10:20:06 UTC, Rene Zwanenburg wrote: On Wednesday, 20 November 2013 at 09:15:41 UTC, Rene Zwanenburg wrote: Hi, A few things jumped out at me: Camera.d: ... Oops, I have to run.. Will take a look at the rest later. Still regarding camera.d: - The glfw3

Class Array in D?

2013-11-20 Thread Jeroen Bollen
is there a way I can pass a TypeTulip to a function? Something like: Can I create a class array in D? Something like: interface A {} class AA: A {} class AB: A {} class AC: A {} ClassList!A list = new ClassList!A {AA, AB, AC}; void testf(ulong testv) { A a = new list[testv]; } I know

Re: Class References

2013-11-20 Thread Ali Çehreli
On 11/20/2013 08:35 AM, Jeroen Bollen wrote: I was more looking for a way to just access a type/class by specifying an index... I don't really get your code. TypeTuple can contain types. Do you know the index at compile time or at run time? Here is a program that demonstrates constructing an

Re: Class Array in D?

2013-11-20 Thread Ali Çehreli
On 11/20/2013 10:12 AM, Jeroen Bollen wrote: is there a way I can pass a TypeTulip to a function? alias TypeTulip = TypeTuple; ;) Something like: Can I create a class array in D? Something like: interface A {} class AA: A {} class AB: A {} class AC: A {} ClassList!A list = new

Re: Class Array in D?

2013-11-20 Thread Jeroen Bollen
On Wednesday, 20 November 2013 at 18:23:37 UTC, Ali Çehreli wrote: On 11/20/2013 10:12 AM, Jeroen Bollen wrote: is there a way I can pass a TypeTulip to a function? alias TypeTulip = TypeTuple; ;) Something like: Can I create a class array in D? Something like: interface A {} class

Re: Class Array in D?

2013-11-20 Thread Adam D. Ruppe
On Wednesday, 20 November 2013 at 18:31:37 UTC, Jeroen Bollen wrote: That doesn't allow specifying a base class all members should be a part of though, or does it? You could write your own tuple template for it, or just let the compile fail on the factory function: the A a = new T(); will

Re: MSG_WAITALL for Sockets

2013-11-20 Thread Jonathan M Davis
On Wednesday, November 20, 2013 17:26:27 Jeroen Bollen wrote: On Tuesday, 19 November 2013 at 23:36:57 UTC, Rob T wrote: On Tuesday, 19 November 2013 at 18:35:08 UTC, Jeroen Bollen wrote: Is there a way I can call a receive method on a socket with MSG_WAITALL as a flag? There doesn't

Re: D game engine -- Any suggestions?

2013-11-20 Thread Paulo Pinto
On Wednesday, 20 November 2013 at 16:40:59 UTC, Mineko wrote: On Wednesday, 20 November 2013 at 15:30:32 UTC, Geancarlo Rocha wrote: You should fix your LICENSE following these instructions http://www.gnu.org/licenses/gpl-howto.html. I hope you understand the virality of GPL and why most

Re: D game engine -- Any suggestions?

2013-11-20 Thread Mineko
On Wednesday, 20 November 2013 at 19:38:09 UTC, Paulo Pinto wrote: I would suggest dual license. GPL for open source projects and something else for commercial projects. It all depends how you see companies using your code, without any kind of retribution or recognition. I see this

Re: D game engine -- Any suggestions?

2013-11-20 Thread Franz
On Wednesday, 20 November 2013 at 20:00:17 UTC, Mineko wrote: On Wednesday, 20 November 2013 at 19:38:09 UTC, Paulo Pinto wrote: as long as the engine itself is free and redistributed intact then everything is fine. Then you are probably looking at a LGPL license. I'm not gonna explain in

Re: D game engine -- Any suggestions?

2013-11-20 Thread Mineko
On Wednesday, 20 November 2013 at 20:57:11 UTC, Franz wrote: On Wednesday, 20 November 2013 at 20:00:17 UTC, Mineko wrote: On Wednesday, 20 November 2013 at 19:38:09 UTC, Paulo Pinto wrote: as long as the engine itself is free and redistributed intact then everything is fine. Then you are

Re: D game engine -- Any suggestions?

2013-11-20 Thread Paulo Pinto
On Wednesday, 20 November 2013 at 21:13:05 UTC, Mineko wrote: On Wednesday, 20 November 2013 at 20:57:11 UTC, Franz wrote: On Wednesday, 20 November 2013 at 20:00:17 UTC, Mineko wrote: On Wednesday, 20 November 2013 at 19:38:09 UTC, Paulo Pinto wrote: as long as the engine itself is free and

Re: D game engine -- Any suggestions?

2013-11-20 Thread Mineko
On Wednesday, 20 November 2013 at 09:15:41 UTC, Rene Zwanenburg wrote: Hi, A few things jumped out at me: Camera.d: - The use of x, y, z and rx, ry, rz. These should really be in some vector struct. Since you're using Dub, you can easily use gl3n [1][2]. While it's still pretty basic,

Accessing mutable data that isn't

2013-11-20 Thread Spott
I've been screwing around with templates lately, and I'm attempting to figure out why the following won't compile: struct value { int a; const auto opBinary(string op, T)(in T rhs) const pure { static if (op == +) return

Re: Class References

2013-11-20 Thread Jared Miller
On Monday, 28 October 2013 at 11:22:03 UTC, Jeroen Bollen wrote: Is it possible in D to create an enum of class references? Something around the lines of: enum ClassReferences : Interface { CLASS1 = ClassOne, CLASS2 = ClassTwo } Here's my solution using an enum as you originally

Re: Class References

2013-11-20 Thread Jared Miller
On Wednesday, 20 November 2013 at 23:06:37 UTC, Jared Miller wrote: Foo getObj(ClassNames name) { // without cast, it converts to the enum member name. return cast(Foo)Object.factory(cast(string)name); } Oops, never mind - you don't need the cast(string) there.

Re: std.json

2013-11-20 Thread Craig Dillabaugh
On Wednesday, 20 November 2013 at 13:48:37 UTC, Orvid King wrote: On 11/20/13, Craig Dillabaugh cdill...@cg.scs.carleton.ca wrote: On Wednesday, 20 November 2013 at 13:29:54 UTC, Dicebot wrote: What I mean is that std.json does not seem to be written with such usage mode in mind, it is more

Re: Red-Black tree storing color without additional memory requirements

2013-11-20 Thread Ellery Newcomer
On 11/20/2013 06:50 AM, bearophile wrote: safety0ff: Since the GC supports interior pointers, I think you can justify using the least significant bits as long as the size and alignment of the pointed object guarantee that the pointer + tag will always lie inside the memory block. From:

Get array of elements the base type from Variant

2013-11-20 Thread RomulT
Hi, help please, how I get array of elements the base type from Variant? http://dpaste.dzfl.pl/6dd70f9b

Re: Get array of elements the base type from Variant

2013-11-20 Thread evilrat
On Thursday, 21 November 2013 at 05:16:10 UTC, RomulT wrote: Hi, help please, how I get array of elements the base type from Variant? http://dpaste.dzfl.pl/6dd70f9b may be there is a way to cast array directly but i doubt. so you need either to do this IXXX[] x = [new XXX(), new

Re: D game engine -- Any suggestions?

2013-11-20 Thread qznc
On Wednesday, 20 November 2013 at 16:40:59 UTC, Mineko wrote: On Wednesday, 20 November 2013 at 15:30:32 UTC, Geancarlo Rocha wrote: You should fix your LICENSE following these instructions http://www.gnu.org/licenses/gpl-howto.html. I hope you understand the virality of GPL and why most

Re: Get array of elements the base type from Variant

2013-11-20 Thread RomulT
On Thursday, 21 November 2013 at 05:44:53 UTC, evilrat wrote: On Thursday, 21 November 2013 at 05:16:10 UTC, RomulT wrote: Hi, help please, how I get array of elements the base type from Variant? http://dpaste.dzfl.pl/6dd70f9b may be there is a way to cast array directly but i doubt. so

Re: Accessing mutable data that isn't

2013-11-20 Thread Jesse Phillips
On Wednesday, 20 November 2013 at 22:49:42 UTC, Spott wrote: I've been screwing around with templates lately, and I'm attempting to figure out why the following won't compile: struct value { int a; const auto opBinary(string op, T)(in T rhs) const pure { static

Re: Accessing mutable data that isn't

2013-11-20 Thread qznc
On Wednesday, 20 November 2013 at 22:49:42 UTC, Spott wrote: I've been screwing around with templates lately, and I'm attempting to figure out why the following won't compile: struct value { int a; const auto opBinary(string op, T)(in T rhs) const pure { static

Re: Get array of elements the base type from Variant

2013-11-20 Thread evilrat
On Thursday, 21 November 2013 at 06:31:54 UTC, RomulT wrote: Yes, it a work, thank you. The problem occurs when, in Variant already recorded XXX[] and it is necessary to extract the IXXX[], because in the place used nothing is known about type XXX. so you need just to cast XXX[] to IXXX[] ?

Re: Accessing mutable data that isn't

2013-11-20 Thread Jonathan M Davis
On Wednesday, November 20, 2013 23:49:42 Spott wrote: I've been screwing around with templates lately, and I'm attempting to figure out why the following won't compile: struct value { int a; const auto opBinary(string op, T)(in T rhs) const pure {

Re: Accessing mutable data that isn't

2013-11-20 Thread Jonathan M Davis
On Thursday, November 21, 2013 07:48:34 qznc wrote: First, use dpaste for such code snippets: http://dpaste.dzfl.pl/f2f39b32 Really? I find it annoying when people do that unless the code is quite long. It's much easier to have it just be in the message IMHO. Also, it has the benefit of not

Re: bitwise operation and type

2013-11-20 Thread Jonathan M Davis
On Thursday, November 21, 2013 08:21:37 bioinfornatics wrote: why this fail http://www.dpaste.dzfl.pl/a6d6acf4 I want to works with ubyte - i do not want use int for manipulating these byte and consume more memory as need! All arithmetic operations on integer types (including

Re: bitwise operation and type

2013-11-20 Thread Ellery Newcomer
On 11/20/2013 11:21 PM, bioinfornatics wrote: why this fail http://www.dpaste.dzfl.pl/a6d6acf4 as with c, most of the integer operators return int for integral types smaller than int. also, this is a case where a += b does something different than a = a + b i guess the former