On Monday, 15 August 2022 at 03:19:43 UTC, johntp wrote:
Your solution worked. I guess it is a little unnatural to
ignore the color. I tried overriding the toHash() of Point,
but I don't know enough D to get it to work. I wonder if that
could be a solution.
Depends on what you're trying
On Friday, 8 July 2022 at 15:32:44 UTC, Rob T wrote:
https://forum.dlang.org/post/mailman.10914.1566237225.29801.digitalmars-d-le...@puremagic.com
In case someone comes across this old thread
https://dlang.org/phobos/core_int128.html
There was a discussion on this not long ago. Walter tried
On Thursday, 21 April 2022 at 04:36:13 UTC, Salih Dincer wrote:
My favorite is the struct range. Because it is more
understandable and personalized. Moreover, you can limit it
without using ```take()```.
And it's inherently lazy, so no extra processing/calculation
other than what's
On Saturday, 16 April 2022 at 20:48:15 UTC, Adam Ruppe wrote:
On Saturday, 16 April 2022 at 20:41:25 UTC, WhatMeWorry wrote:
Is virtual memory entering into the equation?
Probably. Memory allocated doesn't physically exist until
written to a lot of the time.
This might be very much an OS
On Tuesday, 19 April 2022 at 13:20:21 UTC, Bastiaan Veelo wrote:
There is nothing that requires enum values to be unique, though:
```d
import std;
void main()
{
enum E {Zero = 0, One = 0, Two = 0}
writeln(E.Two); // Zero!
}
```
True, but if you want it be useful they really need to be
On Sunday, 17 April 2022 at 18:25:32 UTC, Bastiaan Veelo wrote:
On Saturday, 16 April 2022 at 11:39:01 UTC, Manfred Nowak wrote:
In the specs(17) about enums the word "integral" has no match.
But because the default basetype is `int`, which is an
integral type, enums might be integral types
On Friday, 8 April 2022 at 04:54:35 UTC, Era Scarecrow wrote:
Maybe it should be `cast(A*) `?
Confusing HTML entities bit on here. Probably just ignore it.
Maybe you are doing it backwards.
What if you had
```d
struct B {
A* a;
}
A[] arraylist;
```
then in the init append a new item to
On Friday, 8 April 2022 at 04:31:45 UTC, Elvis Zhou wrote:
B b;
init(\);
structs ~= cast(A*)\
//Error: copying `cast(A*)\& b` into allocated memory escapes a
reference to local variable `b`
Maybe it should be `cast(A*) \`?
On Wednesday, 23 March 2022 at 00:51:42 UTC, Era Scarecrow wrote:
On Tuesday, 22 March 2022 at 21:23:43 UTC, H. S. Teoh wrote:
We already have this:
import std.conv : to;
int x;
long y;
y = x.to!long; // equivalent to straight assignment / cast
x =
On Tuesday, 22 March 2022 at 21:23:43 UTC, H. S. Teoh wrote:
On Tue, Mar 22, 2022 at 09:11 PM, Era Scarecrow wrote:
[...]
I'd almost wish D had a more lenient mode and would do
automatic down-casting, then complain if it *would* have
failed to downcast data at runtime.
[...]
We already
On Tuesday, 22 March 2022 at 18:47:19 UTC, Ali Çehreli wrote:
On 3/22/22 11:28, Era Scarecrow wrote:
> So when should you use size_t?
I use size_t for anything that is related to count, index, etc.
However, this is a contested topic because size_t is unsigned.
I don't see a problem with
On Friday, 18 March 2022 at 23:01:05 UTC, Ali Çehreli wrote:
P.S. On a related note, I used to make the mistake of using
size_t for file offsets as well. That is a mistake because even
on a 32-bit system (or build), file sizes can be larger than
uint.max. So, the correct type is long for
On Sunday, 20 March 2022 at 05:44:44 UTC, Salih Dincer wrote:
On Sunday, 20 March 2022 at 01:28:44 UTC, Era Scarecrow wrote:
Inheritance and Polymorphism is one of the hardest things to
grasp mostly because examples they give in other books of
'objects' is so far unrelated to software that it
On Saturday, 19 March 2022 at 12:23:02 UTC, user1234 wrote:
I think OP is learning OOP. His error looks like that for the
least.
True. Looking at the code it shouldn't spaghetti in on itself
infinitely and is basically clean in his intent.
Inheritance and Polymorphism is one of the hardest
On Saturday, 19 March 2022 at 00:16:48 UTC, user1234 wrote:
That crashes because of the creation of `Bar b` member, which
itself has a Bar b member, which itself...
Mhmm... So There's Foo with Bar b, which has Bar b which has Bar
b which... just keeps going over and over again.
It appears
On Tuesday, 8 March 2022 at 22:28:27 UTC, bauss wrote:
What D just needs is a way to specify the entry point, in which
it just defaults to the first main function found, but could be
any function given.
Which is similar to what Java does.
When i was first learning Java in a company i would
On Wednesday, 16 March 2022 at 11:27:20 UTC, user1234 wrote:
assuming the c library takes by reference
My experience all arrays are effectively just pointers, and the
brackets/length is only really applicable to stack allocated
fixed length allocations. In my own C projects i always used
On Tuesday, 15 February 2022 at 22:24:53 UTC, bachmeier wrote:
On Tuesday, 15 February 2022 at 22:02:13 UTC, Adam D Ruppe
wrote:
for(a = v.length; a > cast(size_t) -1, a += -1)
After looking at the documentation and seeing CommonType!(int,
uint) is uint, I have to say that iota's behavior
On Tuesday, 8 February 2022 at 10:17:19 UTC, Ola Fosheim Grøstad
wrote:
I do like the idea that a hacker cannot change the signature
file if gaining access to the web/file hosts, but how to verify
it in secure way?
For Linux sources there's MD5 and SHA-1 hashes i believe. If you
have two or
On Thursday, 10 February 2022 at 01:43:54 UTC, H. S. Teoh wrote:
On Thu, Feb 10, 2022 at 01:32:00AM +, MichaelBi via
Digitalmars-d-learn wrote:
thanks, very helpful! i am using a assocArray now...
Are you sure that's what you need?
Depends. if you do say TYPE[long/int] then you have
On Friday, 11 February 2022 at 02:43:24 UTC, Siarhei Siamashka
wrote:
Though this strange benchmark is testing performance of an LRU
with ... wait for it ... 10 elements, which makes using
hashmap/dict/AA a completely ridiculous idea.
Hmmm... if it's static data i can see maybe a enum
On Monday, 17 January 2022 at 22:28:10 UTC, H. S. Teoh wrote:
This will immediately make whoever reads the code (i.e., myself
after 2 months :D) wonder, "why +1?" And the answer will become
clear and enlightenment ensues. ;-)
In those cases i find myself rewriting said code. Generally to
On Sunday, 16 January 2022 at 18:03:53 UTC, Paul Backus wrote:
On POSIX, you can use the `sigaction` function to install a
signal handler for `SIGINT`, the signal generated by CTRL+C. To
terminate the program with a stack trace, simply have the
signal handler `throw` an `Error`.
I never
On Sunday, 16 January 2022 at 15:32:41 UTC, Salih Dincer wrote:
If count is not equal to 8 I get weird results! The reason of
course, is the free():
// [93947717336544, 1, 2, 3, 4, 5, 6]
I wonder if you're seeing something you're not suppose to as part
of the internals; Typically malloc for
On Wednesday, 5 January 2022 at 08:40:15 UTC, rempas wrote:
I'm trying to use mixins and enums to "expand" code in place
but the results are not what I expected and I'm getting an
weird error. I have created the smallest possible example to
reproduce the error and it is the following:
Back
On Thursday, 30 December 2021 at 09:34:27 UTC, eugene wrote:
The buffer contains (ascii) string terminated with '\n'. In
order to print it not as an array of numbers (buf is 1024 bytes
long), but as usual string I do
Few years ago i asked a similar question, not to do UTF-8 but to
do Ascii.
On Wednesday, 29 December 2021 at 01:11:13 UTC, Stanislav Blinov
wrote:
Because opIndexAssign cannot distinguish at compile time
between initialization and assignment:
```d
Stuff[Key] aa;
aa[key] = Stuff(args); // ostensibly, initialization
aa[key] = otherStuff; // assignment to existing
On Tuesday, 28 December 2021 at 07:51:04 UTC, frame wrote:
On Tuesday, 28 December 2021 at 01:45:42 UTC, Era Scarecrow
wrote:
Success!
So i summarize, either work with a pointer, or drop the
const...
Of course casting the const away was the first thing I did but
I think this is not
On Monday, 27 December 2021 at 19:38:38 UTC, frame wrote:
I feel stupid right now: One cannot assign a struct that
contains const member to AA?
Error: cannot modify struct instance ... of type ... because it
contains `const` or `immutable` members
This is considered a modification?
```d
On Monday, 27 December 2021 at 07:12:24 UTC, rempas wrote:
On Sunday, 26 December 2021 at 21:22:42 UTC, Adam Ruppe wrote:
write just transfers a sequence of bytes. It doesn't know nor
care what they represent - that's for the receiving end to
figure out.
Oh, so it was as I expected :P
On Sunday, 26 December 2021 at 15:36:54 UTC, Bastiaan Veelo wrote:
On Sunday, 26 December 2021 at 15:20:09 UTC, Bastiaan Veelo
wrote:
So if you use `workerLocalStorage` ... you'll get your output
in order without sorting.
Scratch that, I misunderstood the example. It doesn't solve
ordering.
On Wednesday, 22 December 2021 at 16:30:06 UTC, data pulverizer
wrote:
On Wednesday, 22 December 2021 at 16:10:42 UTC, Adam D Ruppe
wrote:
So OUTSIDE a function, static foreach() {{ }} is illegal
because a plain {} is illegal outside a function.
But INSIDE a function, static foreach() {{ }}
On Sunday, 26 December 2021 at 11:24:54 UTC, rikki cattermole
wrote:
I would start by removing the use of stdout in your loop kernel
- I'm not familiar with what you are calculating, but if you
can basically have the (parallel) loop operate from (say) one
array directly into another then you
This is curious. I was up for trying to parallelize my code,
specifically having a block of code calculate some polynomials
(*Related to Reed Solomon stuff*). So I cracked open std.parallel
and looked over how I would manage this all.
To my surprise I found ParallelForEach, which gives the
On Saturday, 7 March 2020 at 20:37:32 UTC, Mike Parker wrote:
I really wish I didn't have to make this announcement, but in
light of the COVID-19 outbreak and with an abundance of
caution, the D Language Foundation and Symmetry Investments
have agreed to cancel DConf 2020.
From what i've
On Saturday, 28 December 2019 at 20:05:46 UTC, Yash Bhambhu wrote:
I am working on issue #20412 which is
std.range.pustd.outputrange.put() misbehave s when defined for
void[] misbehaves when OutputRange.put(void[] exists)
In the case where void[] is passed, could it cast to ubyte[]?
On Saturday, 6 July 2019 at 12:33:00 UTC, berni wrote:
Now I found this:
https://forum.dlang.org/thread/eobdqkkczquxoepst...@forum.dlang.org
Seems to be intentional, that this doesn't work. In my case I'm
able to move d() into the outer struct...
You'll need a pointer to the outer struct,
On Friday, 5 July 2019 at 16:25:10 UTC, Nick Treleaven wrote:
Yes, I was wondering why the compiler doesn't statically
allocate it automatically as an optimization.
Which i would think it could, but silently adds .dup to the end
as it points to a unnamed memory block of N size. Or if it's
On Tuesday, 21 May 2019 at 17:16:05 UTC, Russel Winder wrote:
As far as I can see std.bitmanip only caters for 8, 16, 32, and
64 bit long bitfields.
I worked on/with bitfields in the past, the limit sizes is more
or less for natural int types that D supports.
However this limitation is
On Monday, 20 May 2019 at 12:50:29 UTC, Simen Kjærås wrote:
If you're worried that $92_233_720_368_547_758.07 (long.max) is
not enough money for your game, I'd note that the entire
current world economy is about a thousandth of that. Even so,
there's std.bigint.BigInt, which has no set limit,
On Monday, 20 May 2019 at 11:50:57 UTC, Dennis wrote:
For a simple game, I think it's the easiest to just store an
integer of cents (or the lowest amount of currency possible).
Back in 2003 i did this very thing for when creating my C
program for suggesting and helping with credit card
On Monday, 20 May 2019 at 02:18:51 UTC, Era Scarecrow wrote:
Here's some outputs if you are interested
Noticing how Heapify moves a large portion of areas more or less
in their location, doing heapify before binary insertion sort
lowers how much moving goes on quite a bit. Doing 2 heapify's
On Sunday, 19 May 2019 at 06:13:13 UTC, Era Scarecrow wrote:
Making a struct type/array that visually outputs and displays
compares/mutations of a type. While using the library sorting
functions (which relies on std.algorithm.mutation.swap
Well been having fun with sorting and more of this;
On Sunday, 19 May 2019 at 17:55:10 UTC, Robert M. Münch wrote:
It seems that the debugger has quite some problem when the code
was compiled with optimization and debug-information.
I remember having similar problems in a C program years ago,
ended up just releasing the code unoptimized and
Making a struct type/array that visually outputs and displays
compares/mutations of a type. While using the library sorting
functions (which relies on std.algorithm.mutation.swap) it
doesn't call opAssign and doesn't pass through the struct. (which
also changes the indexes which it shouldn't).
On Tuesday, 4 September 2018 at 03:38:41 UTC, Nick Sabalausky
(Abscissa) wrote:
We have classes and structs:
Classes:
- Default Storage: GC Heap
- Indirection Overhead: Yes
- Semantics: Reference
- Passed By: Copying the Data's Address
Structs:
- Default Storage: Stack
- Indirection Overhead:
On Monday, 5 March 2018 at 05:40:09 UTC, rikki cattermole wrote:
atan should work out to only be a few instructions (inline
assembly) from what I've looked at in the source.
Also you should post the code you used for each.
Should be 3-4 instructions. Load input to the FPU (Optional?
On Sunday, 11 February 2018 at 18:01:20 UTC, Mario wrote:
char[] encrypt(char[] input, char shift)
{
auto result = input.dup;
result[] += shift;
return result;
}
What's wrong? I mean, I know that z is being converted into a
symbol, but how should I fix this?
If you take Z (25)
On Tuesday, 14 November 2017 at 06:32:55 UTC, lobo wrote:
And I fixed it all right – took me two weeks of struggle. After
which I swore a mighty oath never to go near C++ again.
...[snip]"
Reminds me of the last time I touched C++. A friend wanted help
with the Unreal Engine. While
On Monday, 13 November 2017 at 16:26:20 UTC, balddenimhero wrote:
In the course of writing a minimal example I removed more than
necessary in the previous pastebin (the passed IntOrder has not
even been used). Thus here is the corrected one:
https://pastebin.com/SKae08GT. I'm trying to port
On Friday, 21 July 2017 at 21:03:22 UTC, FoxyBrown wrote:
Is there a way to easily find the differences between to struct
instances? I would like to report only the differences
e.g.,
writeln(s1 - s2);
prints only what is different between s1 and s2.
This is entirely dependent on the
On Tuesday, 18 July 2017 at 07:30:30 UTC, Era Scarecrow wrote:
my_array[i]=some calculations(based on constants and n)
i meant: tmp[i]=some calculations(based on constants and n)
On Tuesday, 18 July 2017 at 07:20:48 UTC, Miguel L wrote:
Hi, I need help again. I have an immutable static array and i
need to initialize its contents inside a for loop. Something
like this:
void f(int n)()
{
immutable float[n] my_array;
for(int i=0;i
On Monday, 10 July 2017 at 03:48:17 UTC, FoxyBrown wrote:
static struct S
auto s = // ?!?!?! invalid because S is a struct, but...
basically s = S. So S.x = s.x and s.a = S.a;
Why do I have to do this?
Static has a different meaning for struct. More or less it means
it won't have access
On Saturday, 8 July 2017 at 21:29:10 UTC, Andre Pany wrote:
app.d(17):called from here: test("1234\x0a5678\x0a")
I wrote the source code on windows with a source file with \r\n
file endings.
But the console output has only the character X0a. In addition
not the content of tmp is shown
On Tuesday, 4 July 2017 at 12:32:26 UTC, Patrick Schluter wrote:
In times of lore, BCD floats were very common. The Sharp Pocket
Computer used a BCD float format and writing machine code on
them confronts one with the format. The TI-99/4A home computer
also used a BCD float format in its Basic
On Tuesday, 4 July 2017 at 00:46:36 UTC, Timothee Cour wrote:
How would I disable the following?
```
auto a1=A(1);
auto a2=A(1, "b");
struct A{
int a;
string b;
// @disable default constructors with N(N>=1) arguments
}
```
I'd like to force the user to set fields explicitly, so as to
On Monday, 3 July 2017 at 03:57:25 UTC, Basile B wrote:
6.251 has no perfect double representation. It's real value is:
I almost wonder if a BCD, fixed length or alternative for
floating point should be an option... Either library, or a hook
to change how the FPU works since doubles are
On Monday, 26 June 2017 at 01:55:56 UTC, Matt wrote:
New user here. I know the first 5 minutes experience is
important, just to note that rdmd.exe and executables created
with dmd.exe are flagged as malicious by windows defender. It's
easy to create an exception in the windows defender
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
I would love to hear about your favorite feature(s) in D.
Arrays include length along with the pointer.
Very easy built-in array support with foreach
Ranges, that don't treat their input types as 'pointers' and get
all levels of
On Saturday, 10 June 2017 at 19:40:47 UTC, Andrei Alexandrescu
wrote:
That's cool as long as the assembler is guarded by
version(X_86) and has a portable alternative. Where's the code?
Should i do a pull request and push it under std.experimental?
Also if it's going to get renamed to a
On Monday, 12 June 2017 at 13:41:36 UTC, deadalnix wrote:
You misunderstood. We need cent/ucent supported by the compiler
to get to larger integral types efficiently. There are no ways
around it. There are a ton of operations such as the X86 MUL
which are able to produce a large multiplication
On Sunday, 11 June 2017 at 21:52:40 UTC, Era Scarecrow wrote:
Doing a 10240bit int I ran though 1,000 factorials in 6
seconds (this includes printing the values out). I got to about
400 in 16 minutes using the generic code.
Got the compatible/generic code to run far faster, about 7 times
On Sunday, 11 June 2017 at 21:52:40 UTC, Era Scarecrow wrote:
Also got Cent working (mostly).
It's complete, more or less now. I just a matter of filling in
any missing methods that I haven't programmed for, and probably
adding filler/forwarding functions from ScaledInt to UScaledInt.
On Sunday, 11 June 2017 at 18:01:41 UTC, Era Scarecrow wrote:
And what timing, I just finished getting it working with
assembly and compatible versions. Seems 5x slower rather than
the dreaded 50, but that's from testing factorial up to 100
(200ms vs 1,200ms).
Doing a 10240bit int I ran
On Sunday, 11 June 2017 at 18:01:41 UTC, Era Scarecrow wrote:
Anyways, here's how it is currently, most features are
avaliable, need more tests and find occurrences where it
doesn't work.
I should probably mention that's only for UCent, Cent isn't
fully tested or implemented yet.
On Sunday, 11 June 2017 at 08:52:37 UTC, deadalnix wrote:
I ended up doing my own. There are just no way to do it well
without cent/ucent . Weka is running into the same problem for
error correction.
And what timing, I just finished getting it working with
assembly and compatible versions.
On Saturday, 10 June 2017 at 19:40:47 UTC, Andrei Alexandrescu
wrote:
On 6/10/17 3:28 PM, Era Scarecrow wrote:
Got a possible one. My implementation is heavy on assembly
language to take advantage of x86 features
That's cool as long as the assembler is guarded by
version(X_86) and has a
On Saturday, 9 January 2016 at 20:28:26 UTC, Andrei Alexandrescu
wrote:
Who can champion ONE fixed large integer library for Phobos? --
Andrei
Got a possible one. My implementation is heavy on assembly
language to take advantage of x86 features (like the carry flag,
and giving you 64 &
On Friday, 9 June 2017 at 18:32:06 UTC, Steven Schveighoffer
wrote:
Wow, so that's how D code would look like if it were C++ :)
When dipping my toes into C++ to do a quicksort algorithm, I
quickly got annoyed I'd have to create all the individual
comparison functions rather than just one
On Thursday, 8 June 2017 at 02:19:15 UTC, Andrew Edwards wrote:
Pretty funny. But seriously, this is something that should just
work. There is now to layers of indirection to achieve what I
used to do quite naturally in the language.
Hmmm while working on my recent sudoku solver using
On Wednesday, 7 June 2017 at 18:31:41 UTC, H. S. Teoh wrote:
"Structs" with variable size fields have no direct equivalent
in D's type system, so you'll probably have a hard time mapping
this directly.
What you *could* do, though, is to load the data into a ubyte[]
buffer, then create a
On Saturday, 3 June 2017 at 19:12:46 UTC, Steven Schveighoffer
wrote:
I'd say this deserves a blog post but it would be too short.
Actually i wouldn't mind a vlog or some short presentations on a
variety of subjects. Maybe even continuations of presentations
that could have been at the
On Monday, 5 June 2017 at 16:04:28 UTC, ade90036 wrote:
Unfortunately the struct doesn't know at compile time what the
size of the constant_pool array, or at-least was not able to
specify it dynamically.
It also won't know ahead of time how many fields, methods or
attributes you have
On Thursday, 1 June 2017 at 12:00:45 UTC, Era Scarecrow wrote:
So why is the offset off by 14h (20 bytes)? It's not like we
need a to set a ptr first.
Go figure i probably found a bug...
Well as a side note a simple yet not happy workaround is making
a new array slice of the memory and
On Thursday, 1 June 2017 at 12:04:05 UTC, Daniel Tan Fook Hao
wrote:
If I'm reading this right, in the former, the struct is created
when the function is called in run-time, and the type is then
inferred after that? I don't really understand the behavior
behind this.
The only difference
On Tuesday, 23 May 2017 at 03:33:38 UTC, Era Scarecrow wrote:
From what I'm seeing, it should be 8, 0ch, 10h, then 14h, all
positive. I'm really scratching my head why I'm having this
issue...
What am i missing here?
More experiments and i think it comes down to static arrays.
The
On Tuesday, 30 May 2017 at 11:32:21 UTC, Marco Leise wrote:
Ok, but even then your source material would ideally have to be
encoded with the same codec and parameters. A different
resolution would not work, while a change in frame rate is
tolerable.
I agree, however when VirtualDub barfs,
On Monday, 29 May 2017 at 01:12:53 UTC, Era Scarecrow wrote:
...
Hmm didn't notice the post had split. Otherwise i wouldn't have
replied... That and thinking about the GC state (outside of
allocating memory)...
On Sunday, 28 May 2017 at 23:49:16 UTC, Brad Roberts wrote:
// do something arbitrarily complex with s that doesn't
touch globals or change global state except possibly state of
the heap or gc
Sounds like the basic definition of pure to me; At least in
regards to D. Memory allocation
On Saturday, 27 May 2017 at 22:28:13 UTC, Nick Sabalausky
(Abscissa) wrote:
Good point. Although, AIUI, that does leave you limited to
cutting only on full frames, not on the delta frames. Sometimes
that's an issue, sometimes it isn't.
Well you can cut anywhere (on the tail end anyways),
On Wednesday, 24 May 2017 at 10:04:03 UTC, Wulfklaue wrote:
Working on a compressed video to create another compressed
video, simply result in lower quality video ( and less
professional looking ).
Only if you have to recompress it. Some tools like VirutalDub
allow you to chop and copy
On Wednesday, 15 August 2012 at 20:13:10 UTC, Era Scarecrow wrote:
On Wednesday, 15 August 2012 at 15:39:26 UTC, ixid wrote:
Could you supply your code? Which one are you using as the
hardest? If you're solving the 1400 second one in 12 seconds
that's very impressive, I can't get it below 240
On Thursday, 25 May 2017 at 10:39:01 UTC, Russel Winder wrote:
C++ has std:priority_queue as a wrapper around a heap to create
a sorted queue. Am I right in thinking that D has no direct
equivalent, that you have to build you own wrapper around a
heap?
Do you even need a wrapper?
Glancing
On Wednesday, 11 January 2017 at 17:32:35 UTC, Era Scarecrow
wrote:
Still I think I'll impliment my own version and then if it's
faster I'll submit it.
Decided I'd give my hand at writing a 'ScaledInt' which is
intended to basically allow any larger unsigned type. Coming
across some
On Monday, 15 May 2017 at 22:38:15 UTC, Jonathan M Davis wrote:
Personally, I think that it would be very much worth making
hello world larger, since hello world really doesn't matter,
but because there are plenty of folks checking out D who write
hello world and then look at the executable
On Tuesday, 9 May 2017 at 23:47:46 UTC, Era Scarecrow wrote:
Seems some games they decided the small amount of time spent
decompressing audio and textures was too high since the
console hardware is seriously behind PC hardware.
Found an appropriate articles Regarding Titanfall (a few years
On Tuesday, 9 May 2017 at 02:13:19 UTC, Nick Sabalausky
(Abscissa) wrote:
On 05/08/2017 03:28 PM, Jack Stouffer wrote:
uncompressed audio.
Uncompressed? Seriously? I assume that really means FLAC or
something rather than truly uncompressed, but even still...
Nope, uncompressed. Seems some
On Monday, 1 May 2017 at 21:04:15 UTC, bachmeier wrote:
On Monday, 1 May 2017 at 18:16:48 UTC, Era Scarecrow wrote:
Reminds me... was the unsigned shift >>> ever fixed?
What was wrong with it?
Doing a broad test I'm seeing an issue with short & byte
versions... Course that's probably due
On Monday, 1 May 2017 at 15:53:41 UTC, Basile B. wrote:
It's the same code in D. It extracts consecutive bits in x12
and x13 (and maskxx), put them at the beginning (right shift)
and add them.
Reminds me... was the unsigned shift >>> ever fixed?
On Thursday, 27 April 2017 at 19:36:44 UTC, Ben wrote:
Frankly seeing in this example that the GC was in theory able
to kick in 6 times in a simple 100 item loop, that is not
efficient. I if did my own memory management, the variable
cleanup will have been done in one go, right after the loop.
On Friday, 21 April 2017 at 17:40:03 UTC, Era Scarecrow wrote:
I think I'll just go with full memory compression and make a
quick simple filter to manage the large blocks of 0's to
something more manageable. That will reduce the memory
allocation issues.
Done and I'm happy with the results.
On Friday, 21 April 2017 at 12:57:25 UTC, Adam D. Ruppe wrote:
But I didn't realize your thing was a literal example from the
docs. Ugh, can't even trust that.
Which was a larger portion of why I was confused by it all than
otherwise.
Still, it's much easier to salvage if I knew how the
On Thursday, 20 April 2017 at 20:24:15 UTC, Adam D. Ruppe wrote:
In short, byChunk reuses its buffer, and std.zlib holds on to
the pointer. That combination leads to corrupted data.
Easiest fix is to .dup the chunk...
So that's what's going on. But if I have to dup the blocks then
I have
I took the UnCompress example and tried to make use of it,
however it breaks midway through my program with nothing more
than 'Data Error'.
[code]
//shamelessly taken for experimenting with
UnCompress decmp = new UnCompress;
foreach (chunk; stdin.byChunk(4096).map!(x =>
decmp.uncompress(x)))
On Saturday, 15 April 2017 at 11:10:01 UTC, Stefan Koch wrote:
It would requires an O(n^2) check per declaration.
Even it is never used.
which would make imports that much more expensive.
Seems wrong to me...
If you made a list/array of all the functions (based purely on
signatures) then
On Friday, 7 April 2017 at 20:43:52 UTC, Stefan Koch wrote:
On Thursday, 6 April 2017 at 05:36:52 UTC, Swoorup Joshi wrote:
Self-modifying might be the answer to all sorts of performance
problems due to branching.
No it's not! You are throwing away your i-cache AND mess up the
branch
On Saturday, 18 March 2017 at 20:39:20 UTC, StarGrazer wrote:
I have some CTFE's and meta programming that cause dmd to run
out of memory ;/
I am generating simple classes, but a lot of them. dmd uses
about 2GB before it quits. It also only uses about 12% of cpu.
I've noticed heavy use of
On Tuesday, 14 March 2017 at 10:00:24 UTC, Tetiana wrote:
Build fails with the following error:
Just looking at the Documentation, Generator is an InputRange
and chunks requires a ForwardRange (able to use save
functionality).
So the API doesn't match up more or less.
On Sunday, 12 March 2017 at 18:59:43 UTC, Adam D. Ruppe wrote:
The reason is that access to those local variables needs a
hidden pointer that won't be initialized properly without the
right construction.
While it's the most likely reason for the error; Shouldn't it
detect it never used
1 - 100 of 393 matches
Mail list logo