Re: Stack Space & Ackermann

2017-01-04 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Jan 05, 2017 at 04:50:19AM +, Era Scarecrow via Digitalmars-d-learn wrote: > Well re-watched a video regarding the Ackermann function which is a > heavily recursive code which may or may not ever give a result in our > lifetimes. However relying on the power of memoize I quickly find

Re: Stack Space & Ackermann

2017-01-04 Thread Era Scarecrow via Digitalmars-d-learn
On Thursday, 5 January 2017 at 06:20:28 UTC, rikki cattermole wrote: foreach(i; 0 .. 6) No need for iota. I thought that particular slice/range was depreciated. Still the few k that are lost in the iota doesn't seem to make a difference when i run the code again.

Re: Stack Space & Ackermann

2017-01-04 Thread rikki cattermole via Digitalmars-d-learn
On 05/01/2017 7:03 PM, Era Scarecrow wrote: On Thursday, 5 January 2017 at 04:53:23 UTC, rikki cattermole wrote: Well, you could create a fiber[0]. Fibers allow you to set the stack size at runtime. [0] http://dlang.org/phobos/core_thread.html#.Fiber.this Well that certainly does seem to

Re: Stack Space & Ackermann

2017-01-04 Thread Era Scarecrow via Digitalmars-d-learn
On Thursday, 5 January 2017 at 04:53:23 UTC, rikki cattermole wrote: Well, you could create a fiber[0]. Fibers allow you to set the stack size at runtime. [0] http://dlang.org/phobos/core_thread.html#.Fiber.this Well that certainly does seem to do the trick. Unfortunately I didn't get the

Re: Stack Space & Ackermann

2017-01-04 Thread rikki cattermole via Digitalmars-d-learn
On 05/01/2017 5:50 PM, Era Scarecrow wrote: Well re-watched a video regarding the Ackermann function which is a heavily recursive code which may or may not ever give a result in our lifetimes. However relying on the power of memoize I quickly find that when the program dies (from 5 minutes or

Stack Space & Ackermann

2017-01-04 Thread Era Scarecrow via Digitalmars-d-learn
Well re-watched a video regarding the Ackermann function which is a heavily recursive code which may or may not ever give a result in our lifetimes. However relying on the power of memoize I quickly find that when the program dies (from 5 minutes or so) nearly instantly (and only using 9Mb of

Re: Parsing a UTF-16LE file line by line, BUG?

2017-01-04 Thread Daniel Kozák via Digitalmars-d-learn
Nestor via Digitalmars-d-learn napsal St, led 4, 2017 v 8∶20 : On Wednesday, 4 January 2017 at 18:48:59 UTC, Daniel Kozák wrote: Ok, I've done some testing and you are right byLine is broken, so please fill a bug A bug? I was under the impression that this

Re: Parsing a UTF-16LE file line by line, BUG?

2017-01-04 Thread pineapple via Digitalmars-d-learn
On Wednesday, 4 January 2017 at 19:20:31 UTC, Nestor wrote: On Wednesday, 4 January 2017 at 18:48:59 UTC, Daniel Kozák wrote: Ok, I've done some testing and you are right byLine is broken, so please fill a bug A bug? I was under the impression that this function was *intended* to work only

Re: Parsing a UTF-16LE file line by line, BUG?

2017-01-04 Thread Nestor via Digitalmars-d-learn
On Wednesday, 4 January 2017 at 18:48:59 UTC, Daniel Kozák wrote: Ok, I've done some testing and you are right byLine is broken, so please fill a bug A bug? I was under the impression that this function was *intended* to work only with UTF-8 encoded files.

Re: Does anyone know of an sdl-mode for Emacs?

2017-01-04 Thread Russel Winder via Digitalmars-d-learn
On Wed, 2017-01-04 at 17:24 +, Atila Neves via Digitalmars-d-learn wrote: > It's getting tedious editing dub.sdl files with no editor  > support. If nobody's written one, I will. > Emacs has an sdlang-mode. It's on MELPA so installable via packages. -- Russel.

Re: Parsing a UTF-16LE file line by line?

2017-01-04 Thread Daniel Kozák via Digitalmars-d-learn
Daniel Kozák napsal St, led 4, 2017 v 6∶33 : Nestor via Digitalmars-d-learn napsal St, led 4, 2017 v 12∶03 : Hi, I was just trying to parse a UTF-16LE file using byLine, but apparently this function doesn't work with anything other

Re: Parsing a UTF-16LE file line by line?

2017-01-04 Thread Daniel Kozák via Digitalmars-d-learn
Nestor via Digitalmars-d-learn napsal St, led 4, 2017 v 12∶03 : Hi, I was just trying to parse a UTF-16LE file using byLine, but apparently this function doesn't work with anything other than UTF-8, because I get this error: "Invalid UTF-8 sequence (at

Does anyone know of an sdl-mode for Emacs?

2017-01-04 Thread Atila Neves via Digitalmars-d-learn
It's getting tedious editing dub.sdl files with no editor support. If nobody's written one, I will. Atila

Parsing a UTF-16LE file line by line?

2017-01-04 Thread Nestor via Digitalmars-d-learn
Hi, I was just trying to parse a UTF-16LE file using byLine, but apparently this function doesn't work with anything other than UTF-8, because I get this error: "Invalid UTF-8 sequence (at index 1)" How can I achieve what I want, without loading the entire file into memory? Thanks in

Re: String characters not extended

2017-01-04 Thread Anonymouse via Digitalmars-d-learn
On Tuesday, 3 January 2017 at 19:40:20 UTC, Daniel Kozák wrote: Why do not use CP_UTF8 constant instead of 65001? It is safer, easier to read and understand I have no reason to back it up with. I'm literally just copy/pasting what others have suggested I use.