Re: Error: function std.stdio.setmode is not accessible from module a

2016-11-03 Thread Kirill Kryukov via Digitalmars-d-learn
On Thursday, 3 November 2016 at 08:04:45 UTC, Jonathan M Davis wrote: [...] Thank you for a detailed clarification about setmode availability. I'll think more about how to proceed with it, and whether I should request it in druntime. I will try to make a bug report about deprecation. Thank

Re: not callable error

2016-11-03 Thread Paul Backus via Digitalmars-d-learn
On Friday, 4 November 2016 at 02:28:17 UTC, bluphantom91 wrote: Hello, I am trying to finish up a group project but I am running into a small problem. I keep getting an error about fgetc not being callable. The purpose of my program is to count the number of characters in a file. Any bit of h

Calling std.variant.visit from a pure function

2016-11-03 Thread Paul Backus via Digitalmars-d-learn
As a learning exercise, I'm writing a simple AST evaluator for arithmetic expressions in D. (See https://gist.github.com/ckirkendall/2934374) In order to get a feel for functional programming in D, I decided to try and implement my solution in a functional style, using algebraic data types and

not callable error

2016-11-03 Thread bluphantom91 via Digitalmars-d-learn
Hello, I am trying to finish up a group project but I am running into a small problem. I keep getting an error about fgetc not being callable. The purpose of my program is to count the number of characters in a file. Any bit of help is appreciated! Here's my code: import std.stdio; import s

Re: fPIC Error

2016-11-03 Thread dlang user via Digitalmars-d-learn
On Thursday, 3 November 2016 at 06:11:48 UTC, rikki cattermole wrote: Took me a while to replicate your build environment but it looks like a false alarm. rikki@debian:/tmp/test$ dmd test.d rikki@debian:/tmp/test$ file test test: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamica

Re: What is the simplest way of doing @nogc string concatenation?

2016-11-03 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/3/16 2:54 PM, Gary Willoughby wrote: What is the simplest way of doing @nogc string concatenation? Where does it go? For instance, this should work: auto newstr = "hello, ".chain("world"); -Steve

Re: What is the simplest way of doing @nogc string concatenation?

2016-11-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, November 03, 2016 18:54:14 Gary Willoughby via Digitalmars-d- learn wrote: > What is the simplest way of doing @nogc string concatenation? std.range.chain is the closest that you're going to get with actual strings. Dynamic arrays require the GC to do concatenation, because they have

What is the simplest way of doing @nogc string concatenation?

2016-11-03 Thread Gary Willoughby via Digitalmars-d-learn
What is the simplest way of doing @nogc string concatenation?

Re: is there "this"?

2016-11-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, November 03, 2016 09:40:11 Steven Schveighoffer via Digitalmars-d-learn wrote: > On 11/2/16 4:43 AM, Jonathan M Davis via Digitalmars-d-learn wrote: > > On Wednesday, November 02, 2016 02:42:01 Konstantin Kutsevalov via > > > > Digitalmars-d-learn wrote: > >> I tested already and it r

Re: Compilation phobos errors with DMD 2.071,2.072 or dub

2016-11-03 Thread kozzi11 via Digitalmars-d-learn
Really? This issue is here on forum many times, can you pleas read last few post? Just by name. Sent from my Samsung device.  Original message From: Ozan (ONS) via Digitalmars-d-learn Sent: 03/11/2016 15:55:24 To: digitalmars-d-learn@puremagic.com Subject: Compilation phobos error

Compilation phobos errors with DMD 2.071,2.072 or dub

2016-11-03 Thread Ozan (ONS) via Digitalmars-d-learn
Hi, with a fresh Ubuntu 16.10 installation using "Hello, World" I got a list of following errors like: /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(thread_256_713.o): relocation R_X86_64_32 against symbol `_D6object9Throwable7__ClassZ' can not be used when making a shared object; reco

Re: is there "this"?

2016-11-03 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/2/16 4:43 AM, Jonathan M Davis via Digitalmars-d-learn wrote: On Wednesday, November 02, 2016 02:42:01 Konstantin Kutsevalov via Digitalmars-d-learn wrote: I tested already and it really works, thank you. I asked that because I tried once to use "this" in past but I got error. So I asked o

Re: Benchmarking Time Unit

2016-11-03 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/3/16 9:03 AM, Steven Schveighoffer wrote: On 11/1/16 6:55 PM, Nordlöw wrote: On Tuesday, 1 November 2016 at 20:54:34 UTC, Steven Schveighoffer wrote: MonoTime has about 5-10 % fluctuations on my laptop. Is this as good as it gets? This is not clear. What is this a percentage of? It pe

Re: Benchmarking Time Unit

2016-11-03 Thread Steven Schveighoffer via Digitalmars-d-learn
On 11/1/16 6:55 PM, Nordlöw wrote: On Tuesday, 1 November 2016 at 20:54:34 UTC, Steven Schveighoffer wrote: MonoTime has about 5-10 % fluctuations on my laptop. Is this as good as it gets? This is not clear. What is this a percentage of? It percentage of execution time. 15 ms +- 2 ms 2ms

Re: Error: function std.stdio.setmode is not accessible from module a

2016-11-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, November 03, 2016 03:25:31 Kirill Kryukov via Digitalmars-d- learn wrote: > Thanks for the explanation, Jonathan! OK, I'll try adding my own > binding for the time being, and submit a feature request. > > I guess this does not count as regression since it was > undocumented, as you say