On Thursday, 16 November 2017 at 07:12:16 UTC, Ola Fosheim
Grostad wrote:
But I guess what you are saying is that many people arent good
at modelling...
I just want to add to this that I believe most people are much
better at OO modelling than other modelling strategies (ER, SA,
NIAM etc). Si
On Thursday, 16 November 2017 at 06:51:58 UTC, rikki cattermole
wrote:
On 16/11/2017 6:35 AM, Ola Fosheim Grostad wrote:
Thing is, it is a failure, the way most people use it.
You can say that about most things: exceptions, arrays, pointers,
memory, structs with public fields... But I guess wh
On 16/11/2017 6:35 AM, Ola Fosheim Grostad wrote:
On Thursday, 16 November 2017 at 02:12:10 UTC, codephantom wrote:
Perhaps the mistake C++ made, was concluding that 'classes' were the
"proper primary focus of program design" (chp1. The Design and
Evolution of C++).
No, classes is a powerful
On Thursday, 16 November 2017 at 02:12:10 UTC, codephantom wrote:
Perhaps the mistake C++ made, was concluding that 'classes'
were the "proper primary focus of program design" (chp1. The
Design and Evolution of C++).
No, classes is a powerful modelling primitive. C++ got that
right. C++ is al
On Thursday, 16 November 2017 at 02:12:10 UTC, codephantom wrote:
On Tuesday, 14 November 2017 at 11:55:17 UTC, codephantom wrote:
[...]
Actually, I got that wrong.
Perhaps the mistake C++ made, was concluding that 'classes'
were the "proper primary focus of program design" (chp1. The
Desig
On Wednesday, 15 November 2017 at 11:20:24 UTC, Biotronic wrote:
Thanks Biotronic! I found this on the html documentation for
templates: "The body of the TemplateDeclaration must be
syntactically correct even if never instantiated. Semantic
analysis is not done until instantiated", and that is
On Tuesday, 14 November 2017 at 11:55:17 UTC, codephantom wrote:
The reason he can dismiss D, so easily, is because of his
starting premise that C is flawed. As soon as you begin with
that premise, you justify searching for C's replacement, which
makes it difficult to envsion something like D.
On Wednesday, 15 November 2017 at 13:31:46 UTC, Daniel Kozak
wrote:
This one works ok for me, but I am on linux:
https://dpaste.dzfl.pl/f54decee45bc
It works, but it does not handle two connects in parallel. STR:
1. start the binary in console 1
2. telnet localhost in console 2
3. telnet
Thanks for the insights everyone, it really helped!
I actually discovered that it wasn't working because one of the
parsing functions used `std.range.take` and, since I was giving
it a slice, `take` decided to save the fwdrange instead of
mutating it. I realised the `take` call was 100% useles
On 15-11-17 20:25, user wrote:
I tried compiling GtkD, I get the error message:
rdmd Build.d
Error: more than 32767 symbols in object file
1. How to work around this?
2. Is D still unfriendly to newbies? I am disappoint :-(
Using:
DMD 2.077
GtkD 3.7.1
gtk3-runtime_3.22.24-1, 32bit
It loo
On 11/15/2017 01:02 PM, Jonathan M Davis wrote:
> On Wednesday, November 15, 2017 20:53:39 unleashy via Digitalmars-d-learn
>> ubyte[] slice;
>> ...
>> int a = readInt(slice);
>> double b = readDouble(slice);
>>
>> Ends up failing, because readInt properly reads an int, but the
>> slice is not mu
On 11/15/17 3:53 PM, unleashy wrote:
So my question is, is there a way to treat a slice strictly as an
InputRange, so that it is mutated no matter what? Or is there another
way to do what I'm trying to do?
I'd model your functions after the std.conv.parse functions:
https://dlang.org/phobos/
On Wednesday, November 15, 2017 20:53:39 unleashy via Digitalmars-d-learn
wrote:
> Hello,
>
> I'm writing a small parser for a specific binary format. The
> format is parsed by way of a sequence of functions, each
> deserializing a small portion of the format into a D type such as
> int, double, s
Hello,
I'm writing a small parser for a specific binary format. The
format is parsed by way of a sequence of functions, each
deserializing a small portion of the format into a D type such as
int, double, string, etc., operating on a single InputRange. The
problem is, if I pass a slice to each
On Wednesday, 15 November 2017 at 14:22:51 UTC, Daniel Kozak
wrote:
And this one
https://paste.ofcode.org/KNqxcrmACLZLseB45MvwC
I thrash your code with two shell processes
```
while true; do curl 127.0.0.1: -o /dev/null; done
```
running parallel. Using strace -fFeclose on the binary
On Wednesday, 15 November 2017 at 19:54:20 UTC, Enjoys Math wrote:
I had it working in an earlier program.
Now I have:
main.d
--
import std.json;
import std.file;
int main() {
JSONValue settings;
settings = parseJSON("settings.txt");
auto intList = cast(int[]) settings["int lis
I had it working in an earlier program.
Now I have:
main.d
--
import std.json;
import std.file;
int main() {
JSONValue settings;
settings = parseJSON("settings.txt");
auto intList = cast(int[]) settings["int list"].array;
writeln(intList);
readln();
}
for input:
setti
I tried compiling GtkD, I get the error message:
rdmd Build.d
Error: more than 32767 symbols in object file
1. How to work around this?
2. Is D still unfriendly to newbies? I am disappoint :-(
Using:
DMD 2.077
GtkD 3.7.1
gtk3-runtime_3.22.24-1, 32bit
On Wednesday, November 15, 2017 11:21:16 Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 11/15/17 11:19 AM, Steven Schveighoffer wrote:
> > But what doesn't make a lot of sense is the inability to declare the
> > inheritance of the current in-contract situation. If you have a complex
> >
On 11/15/17 11:19 AM, Steven Schveighoffer wrote:
But what doesn't make a lot of sense is the inability to declare the
inheritance of the current in-contract situation. If you have a complex
contract, then having to repeat it on every class seems unnecessarily
verbose. It's very easy to just sa
On 11/15/17 10:39 AM, Jonathan M Davis wrote:
Well, the rules do make sense when you consider that it can make sense for a
function to allow arguments that the base class didn't. The in contract is
essentially saying what the function can validly operate on, and there's no
reason why a derived c
On Wednesday, November 15, 2017 10:33:50 Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 11/15/17 10:14 AM, Jonathan M Davis wrote:
> > So, it's pointless to put an in contract on an
> >
> > interface's function unless you're trying to ensure that nothing in
> > derived contracts is any
On Wednesday, 15 November 2017 at 13:30:14 UTC, Adam D. Ruppe
wrote:
On Wednesday, 15 November 2017 at 13:24:02 UTC, Chirs Forest
wrote:
class Audio {
Audio a;
writeln(&a); // 281478
&class is usually wrong. That's the address of the reference,
not of the actual object. You might want `ca
On Wednesday, November 15, 2017 10:14:32 Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 11/15/17 9:43 AM, Dr. Assembly wrote:
> > I'm learning to use interface with contracts. In below code, in isn't
> > being "called". Can someone point out why? what am I doing wrong?
> >
> > void main(
On 11/15/17 10:14 AM, Jonathan M Davis wrote:
So, it's pointless to put an in contract on an
interface's function unless you're trying to ensure that nothing in derived
contracts is any stricter than that contract, which in practice likely means
that it's pointless to put an in contract on an i
On Wednesday, November 15, 2017 14:43:33 Dr. Assembly via Digitalmars-d-
learn wrote:
> I'm learning to use interface with contracts. In below code, in
> isn't being "called". Can someone point out why? what am I doing
> wrong?
>
> void main() {
> C c = new C();
> writeln(c.foo(1));
> }
>
> int
On 11/15/17 9:43 AM, Dr. Assembly wrote:
I'm learning to use interface with contracts. In below code, in isn't
being "called". Can someone point out why? what am I doing wrong?
void main() {
C c = new C();
writeln(c.foo(1));
}
interface I
{
int foo(int i)
in { assert(i
out(result) {}
run fine, if foo() return 0, an exception is throw by assert()
but in doesn't work. I don't know what I'm missing. It' my first
time using contracts
I'm learning to use interface with contracts. In below code, in
isn't being "called". Can someone point out why? what am I doing
wrong?
void main() {
C c = new C();
writeln(c.foo(1));
}
interface I
{
int foo(int i)
in { assert(i > 2); }
o
On Wednesday, 15 November 2017 at 11:57:25 UTC, Vladimirs
Nordholm wrote:
Hello people from D-land.
To summarise my problem: I have a program in the terminal
(Posix) with two threads: one which my main program is run on,
and a second one which polls input via `poll(...)` and
`read(...)`.
[.
And this one
https://paste.ofcode.org/KNqxcrmACLZLseB45MvwC
Here you can test if threads makes difference
when compile with:
dmd -O -release -version=SINGLE_THREAD xxx.d
it will use only one thread
when compile with:
dmd -O -release xxx.d
it will use thread pool
On Wed, Nov 15, 2017 at 2:
On Wednesday, 15 November 2017 at 13:24:02 UTC, Chirs Forest
wrote:
class Audio {
Audio a;
writeln(&a); // 281478
&class is usually wrong. That's the address of the reference, not
of the actual object. You might want `cast(void*) a` instead to
print the address of the object itself.
This one works ok for me, but I am on linux:
https://dpaste.dzfl.pl/f54decee45bc
On Wed, Nov 15, 2017 at 12:46 PM, Daniel Kozak wrote:
> Do not use your own taskPool, just use global taskPool proerty (import
> std.parallelism: taskPool).
>
> You should not set blocking to false. And dont use Thr
I'm using the derelict fmod bindings to handle sounds in my
application and I'm running into a weird bug... If I put calls to
fmod in a function inside a class, upon calling those functions
the instance of that class will be null, or otherwise changed. I
obviously get an access violation if I t
On 11/15/17 6:46 AM, Jonathan M Davis wrote:
On Wednesday, November 15, 2017 09:49:56 helxi via Digitalmars-d-learn
wrote:
On Wednesday, 15 November 2017 at 09:34:32 UTC, helxi wrote:
On Wednesday, 15 November 2017 at 09:23:53 UTC, Jonathan M
Davis wrote:
On Wednesday, November 15, 2017 09:04
On Wednesday, 15 November 2017 at 11:57:25 UTC, Vladimirs
Nordholm wrote:
Hello people from D-land.
To summarise my problem: I have a program in the terminal
(Posix) with two threads: one which my main program is run on,
and a second one which polls input via `poll(...)` and
`read(...)`.
Le
On Wednesday, November 15, 2017 11:57:25 Vladimirs Nordholm via Digitalmars-
d-learn wrote:
> Hello people from D-land.
>
> To summarise my problem: I have a program in the terminal (Posix)
> with two threads: one which my main program is run on, and a
> second one which polls input via `poll(...)`
On 15/11/2017 11:57 AM, Vladimirs Nordholm wrote:
Hello people from D-land.
To summarise my problem: I have a program in the terminal (Posix) with
two threads: one which my main program is run on, and a second one which
polls input via `poll(...)` and `read(...)`.
Let's call main thread T1,
Hello people from D-land.
To summarise my problem: I have a program in the terminal (Posix)
with two threads: one which my main program is run on, and a
second one which polls input via `poll(...)` and `read(...)`.
Let's call main thread T1, and a semi-blocking input-thread T2.
Every second
Do not use your own taskPool, just use global taskPool proerty (import
std.parallelism: taskPool).
You should not set blocking to false. And dont use Thread here. There is
no reason to do that. Just move that code into the main
Dne 15. 11. 2017 12:15 odp. napsal uživatel "ade90036 via
Digitalma
On Wednesday, November 15, 2017 09:49:56 helxi via Digitalmars-d-learn
wrote:
> On Wednesday, 15 November 2017 at 09:34:32 UTC, helxi wrote:
> > On Wednesday, 15 November 2017 at 09:23:53 UTC, Jonathan M
> >
> > Davis wrote:
> >> On Wednesday, November 15, 2017 09:04:50 helxi via
> >>
> >> Digital
On Wednesday, 15 November 2017 at 10:40:50 UTC, codephantom wrote:
On Wednesday, 15 November 2017 at 09:26:49 UTC, Ola Fosheim
Grøstad wrote:
I don't think Go is much affected by the corporate…
Umm
"We made the language to help make google more productive and
helpful internally" - Rob P
On Wednesday, 15 November 2017 at 08:43:01 UTC, Tony wrote:
Error: function test_warnings.MyClass.SomeMethod has no return
statement, but is expected to return a value of type int
but if I make it a template class:
class MyClass(T) {
there is no compile error. I don't know why the error isn't
So thanks for the suggestions, i have fixed HTTP response not
postman cal also parse the headers correctly!! happy days.
I have removed the duration from the Socket.select but the
application seems to process a bunch or requests and then it
stalls for several seconds (3/5) and then it resumes
On Wednesday, 15 November 2017 at 09:26:49 UTC, Ola Fosheim
Grøstad wrote:
I don't think Go is much affected by the corporate…
Umm
"We made the language to help make google more productive and
helpful internally" - Rob Pike
https://www.youtube.com/watch?v=sln-gJaURzk
2min:55sec
To be
On Wednesday, 15 November 2017 at 09:34:32 UTC, helxi wrote:
On Wednesday, 15 November 2017 at 09:23:53 UTC, Jonathan M
Davis wrote:
On Wednesday, November 15, 2017 09:04:50 helxi via
Digitalmars-d-learn wrote:
Hi. What function signature should I use for receiving a
constant
reference of an r/
On Wednesday, 15 November 2017 at 09:00:38 UTC, Joakim wrote:
problems; I want something that helps with apps that are big,
distributed, concurrent, and efficient because those are the
more important problems people are solving today and in the
future."
http://esr.ibiblio.org/?p=7724&cpage=1#c
On Wednesday, 15 November 2017 at 09:23:53 UTC, Jonathan M Davis
wrote:
On Wednesday, November 15, 2017 09:04:50 helxi via
Digitalmars-d-learn wrote:
Hi. What function signature should I use for receiving a
constant
reference of an r/l value object? Is it auto fn(inout ref const
myClass obj)?
I
On Wednesday, 15 November 2017 at 02:05:27 UTC, codephantom wrote:
On Tuesday, 14 November 2017 at 16:38:58 UTC, Ola Fosheim
Grostad wrote:
It [C]is flawed... ESR got that right, not sure how anyone can
disagree.
Well I 'can' disagree ;-)
Right… :-)
Languages are just part of an evolutiona
On Wednesday, November 15, 2017 09:04:50 helxi via Digitalmars-d-learn
wrote:
> Hi. What function signature should I use for receiving a constant
> reference of an r/l value object? Is it auto fn(inout ref const
> myClass obj)?
> I want to:
> 1. Take a constant reference of the object, not copy th
On Wednesday, 15 November 2017 at 02:05:27 UTC, codephantom wrote:
On Tuesday, 14 November 2017 at 16:38:58 UTC, Ola Fosheim
Grostad wrote:
It [C]is flawed... ESR got that right, not sure how anyone can
disagree.
Well I 'can' disagree ;-)
Is a scalpel flawed because someone tried to use it to
On Tuesday, 14 November 2017 at 21:09:40 UTC, kdevel wrote:
On Tuesday, 14 November 2017 at 19:57:54 UTC, ade90036 wrote:
while(true) {
listeningSet.add(listener);
if (Socket.select(listeningSet, null, null,
dur!"nsecs"(150)) > 0) {
Why do you ever timeout? Th
Hi. What function signature should I use for receiving a constant
reference of an r/l value object? Is it auto fn(inout ref const
myClass obj)?
I want to:
1. Take a constant reference of the object, not copy them
2. The object itself may be const or non const.
On Tuesday, 14 November 2017 at 19:48:07 UTC, Joakim wrote:
On Tuesday, 14 November 2017 at 04:31:43 UTC, Laeeth Isharc
wrote:
He mentions D, a bit dismissively.
http://esr.ibiblio.org/?p=7724&cpage=1#comment-1912717
Eh, he parrots decade-old anti-D talking points about
non-technical, organiz
On Wednesday, 15 November 2017 at 08:43:01 UTC, Tony wrote:
This code:
class MyClass {
public:
int SomeMethod ()
{
}
}
void main()
{
}
gets a compile error:
Error: function test_warnings.MyClass.SomeMethod has no return
statement, but is expected to return a value of type int
b
This code:
class MyClass {
public:
int SomeMethod ()
{
}
}
void main()
{
}
gets a compile error:
Error: function test_warnings.MyClass.SomeMethod has no return
statement, but is expected to return a value of type int
but if I make it a template class:
class MyClass(T) {
there
56 matches
Mail list logo