Re: photon v0.9.0 with Go-style D-flavored channels!

2024-05-10 Thread Dmitry Olshansky via Digitalmars-d-announce

On Friday, 3 May 2024 at 17:12:40 UTC, Dmitry Olshansky wrote:
On Monday, 29 April 2024 at 20:50:59 UTC, Dmitry Olshansky 
wrote:
On Monday, 29 April 2024 at 20:50:24 UTC, Dmitry Olshansky 
wrote:
Photon is a minimalistic multi-threaded fiber scheduler and 
event loop that works transparently with traditional blocking 
I/O C/C++/D/Rust libraries w/o degrading performance.




And now we have Channels, gentelmen. The only missing bit is 
`select` function to multiplex on a bunch of channels.


And the wait is over! Now there is a select function to multiplex 
on read side of a bunch of channels. This also fixes a bug in the 
poll syscall override with multiple events on posix systems


https://github.com/DmitryOlshansky/photon/blob/master/examples/select.d

```d
module examples.select;

import std.range, std.datetime, std.stdio;

import photon;

void main() {
startloop();
auto first = channel!(int)(2);
auto second = channel!(string)(1);
go({
delay(500.msecs);
first.put(0);
first.put(1);
delay(500.msecs);
second.put("ping");
});
go({
foreach ( _; 0..3) {
select(
first, {
writefln("Got first %s", first.take(1));
},
second, {
writefln("Got second %s", second.take(1));
}
);
}
});
runFibers();
}

```


---
Dmitry Olshansky
CEO @ [Glow labs](https://glow-labs.pro)
https://olshansky.me/about/





Re: Turning fixed sized array into tuple

2024-05-04 Thread Dmitry Olshansky via Digitalmars-d-learn

On Saturday, 4 May 2024 at 19:11:14 UTC, Nick Treleaven wrote:

On Saturday, 4 May 2024 at 16:58:00 UTC, Dmitry Olshansky wrote:

So I have a function:

```d
size_t awaitAny(T...)(T args) { ... }
```

And I have:
``d
Event*[4] events;
``

How do I pass all 4 of events to awaitAny as tuple of 
arguments?


Use `awaitAny(events.tupleof)`?
https://dlang.org/spec/arrays.html#array-properties


Thanks, totally missed it!

—
Dmitry Olshansky
CEO @ [Glow labs](https://glow-labs.pro)
https://olshansky.me




Turning fixed sized array into tuple

2024-05-04 Thread Dmitry Olshansky via Digitalmars-d-learn

So I have a function:

```d
size_t awaitAny(T...)(T args) { ... }
```

And I have:
``d
Event*[4] events;
``

How do I pass all 4 of events to awaitAny as tuple of arguments?

--
Dmitry Olshansky
CEO @ [Glow labs](https://glow-labs.pro)
https://olshansky.me/about/



photon v0.9.0 with Go-style D-flavored channels!

2024-05-03 Thread Dmitry Olshansky via Digitalmars-d-announce

On Monday, 29 April 2024 at 20:50:59 UTC, Dmitry Olshansky wrote:
On Monday, 29 April 2024 at 20:50:24 UTC, Dmitry Olshansky 
wrote:
Photon is a minimalistic multi-threaded fiber scheduler and 
event loop that works transparently with traditional blocking 
I/O C/C++/D/Rust libraries w/o degrading performance.




And now we have Channels, gentelmen. The only missing bit is 
`select` function to multiplex on a bunch of channels.


So here is example of Go-style, D-flavored channels:

```d

import std.algorithm, std.datetime, std.range, std.stdio;
import photon;

void first(shared Channel!string work, shared Channel!int 
completion) {

delay(2.msecs);
work.put("first #1");
delay(2.msecs);
work.put("first #2");
delay(2.msecs);
work.put("first #3");
completion.put(1);
}

void second(shared Channel!string work, shared Channel!int 
completion) {

delay(3.msecs);
work.put("second #1");
delay(3.msecs);
work.put("second #2");
completion.put(2);
}

void main() {
startloop();
auto jobQueue = channel!string(2);
auto finishQueue = channel!int(1);
go({
first(jobQueue, finishQueue);
});
go({ // producer # 2
second(jobQueue, finishQueue);
});
go({ // consumer
foreach (item; jobQueue) {
delay(1.seconds);
writeln(item);
}
});
go({ // closer
auto completions = finishQueue.take(2).array;
assert(completions.length == 2);
jobQueue.close(); // all producers are done
});
runFibers();
}


```



Obligatory link:
https://github.com/DmitryOlshansky/photon



---
Dmitry Olshansky
CEO @ [Glow labs](https://glow-labs.pro)
https://olshansky.me/about/



Re: photon v0.8.0 with Events, Semaphores and Timers

2024-04-29 Thread Dmitry Olshansky via Digitalmars-d-announce

On Monday, 29 April 2024 at 20:50:24 UTC, Dmitry Olshansky wrote:
Photon is a minimalistic multi-threaded fiber scheduler and 
event loop that works transparently with traditional blocking 
I/O C/C++/D/Rust libraries w/o degrading performance.


This release brings in new APIs for Events, Semaphores and 
Timers, on all 3 supported platforms (Windows, Linux and 
MacOS)! For now, only fibers can use the primitives but in the 
next version sharing of Event or Semaphore between fibers and 
plain threads is planned.




Obligatory link:
https://github.com/DmitryOlshansky/photon


--
Dmitry Olshansky
CEO @ [Glow Labs](https://glow-labs.pro)
https://olshansky.me/about/





photon v0.8.0 with Events, Semaphores and Timers

2024-04-29 Thread Dmitry Olshansky via Digitalmars-d-announce
Photon is a minimalistic multi-threaded fiber scheduler and event 
loop that works transparently with traditional blocking I/O 
C/C++/D/Rust libraries w/o degrading performance.


This release brings in new APIs for Events, Semaphores and 
Timers, on all 3 supported platforms (Windows, Linux and MacOS)! 
For now, only fibers can use the primitives but in the next 
version sharing of Event or Semaphore between fibers and plain 
threads is planned.


--
Dmitry Olshansky
CEO @ [Glow Labs](https://glow-labs.pro)
https://olshansky.me/about/





Re: photon v0.7.0 with Windows support(!)

2024-04-24 Thread Dmitry Olshansky via Digitalmars-d-announce
On Wednesday, 24 April 2024 at 14:40:40 UTC, Steven Schveighoffer 
wrote:
On Tuesday, 23 April 2024 at 19:05:48 UTC, Dmitry Olshansky 
wrote:

On Tuesday, 23 April 2024 at 17:15:13 UTC, Sönke Ludwig wrote:
I guess that the Darwin support will be restricted to freely 
distributed macOS applications, as calling `__syscall` surely 
is a private API that cannot be used in any AppStore 
application, right?


You tell me;)
API looks just like any other libc function.


I can tell you right off that this will not be allowed in 
approved apps. Not just for the `__syscall`, but for overriding 
the normal system calls of all libraries. I can't imagine Apple 
will be OK with that.


How would they know? The whole thing happens at the link time.

—
Dmitry Olshansky
CEO @ Glowlabs
https://olshansky.me


Re: photon v0.7.0 with Windows support(!)

2024-04-23 Thread Dmitry Olshansky via Digitalmars-d-announce

On Tuesday, 23 April 2024 at 17:15:13 UTC, Sönke Ludwig wrote:

Am 21.04.2024 um 21:01 schrieb Dmitry Olshansky:
Photon is a minimalistic multi-threaded fiber scheduler and 
event loop that works transparently with traditional blocking 
I/O C/C++/D/Rust libraries w/o degrading performance.


It took somewhat longer than I wanted but I'm pleased to 
announce that Photon now supports Windows. In particular basic 
socket API that is used by the likes of std.socket is 
transparently converted to overlapped I/O with I/O completion 
port event loop. The last obstacle was, of course, accept 
syscall that is only blocking on Windows. Now that 
transparently goes to a dedicated Windows's native threadpool 
so as to not block our precious fibers.


Explore some basic examples here (not all examples can be run 
on Windows): 
https://github.com/DmitryOlshansky/photon/tree/master/tests


--
Dmitry Olshansky
CEO @ Glowlabs
https://olshansky.me


That's really nice! How would you judge supporting other kinds 
of handles, such as files or events, on Windows?


Going to be tricky but timers for one thing should work with the 
threadpool I got in there.


I guess that the Darwin support will be restricted to freely 
distributed macOS applications, as calling `__syscall` surely 
is a private API that cannot be used in any AppStore 
application, right?


You tell me;)
API looks just like any other libc function.

In that case it would inevitably put it in a non-consumer 
application niche, but certainly wouldn't make it any less 
interesting for more server oriented tasks.


My main angle is being able to develop servers / clients on MacOS 
deploying to other platforms such as Linux server.


—
Dmitry Olshansky
CEO @ Glowlabs
https://olshansky.me



Re: photon v0.7.0 with Windows support(!)

2024-04-21 Thread Dmitry Olshansky via Digitalmars-d-announce

On Sunday, 21 April 2024 at 19:32:20 UTC, Dmitry Olshansky wrote:
On Sunday, 21 April 2024 at 19:01:04 UTC, Dmitry Olshansky 
wrote:

[...]


It gets better, now with hotfixed HTTP hello world example:

https://github.com/DmitryOlshansky/photon/blob/master/bench/static_http/hello.d



Messed things up with hotfix leaving debug tracing enabled even 
in production builds, please use v0.7.2.



--
Dmitry Olshansky
CEO @ GLowlabs
https://olshansky.me




Re: photon v0.7.0 with Windows support(!)

2024-04-21 Thread Dmitry Olshansky via Digitalmars-d-announce

On Sunday, 21 April 2024 at 19:01:04 UTC, Dmitry Olshansky wrote:
Photon is a minimalistic multi-threaded fiber scheduler and 
event loop that works transparently with traditional blocking 
I/O C/C++/D/Rust libraries w/o degrading performance.


It took somewhat longer than I wanted but I'm pleased to 
announce that Photon now supports Windows. In particular basic 
socket API that is used by the likes of std.socket is 
transparently converted to overlapped I/O with I/O completion 
port event loop. The last obstacle was, of course, accept 
syscall that is only blocking on Windows. Now that 
transparently goes to a dedicated Windows's native threadpool 
so as to not block our precious fibers.


Explore some basic examples here (not all examples can be run 
on Windows): 
https://github.com/DmitryOlshansky/photon/tree/master/tests


--
Dmitry Olshansky
CEO @ Glowlabs
https://olshansky.me


It gets better, now with hotfixed HTTP hello world example:

https://github.com/DmitryOlshansky/photon/blob/master/bench/static_http/hello.d

--
Dmitry Olshansky
CEO @ GLowlabs
https://olshansky.me



Re: photon v0.6.0 with MacOS support

2024-04-12 Thread Dmitry Olshansky via Digitalmars-d-announce
On Friday, 12 April 2024 at 17:04:33 UTC, Richard (Rikki) Andrew 
Cattermole wrote:

On 13/04/2024 4:57 AM, Dmitry Olshansky wrote:

Next on schedule is Windows support.


I see that you left the hard one for last.

Good luck! Happy book buying.


I had an intriguing implementation for it running on top of User 
Mode Scheduling, sadly Windows folks deprecated User Mode 
Scheduling thus leaving me with a bunch of work and likely a 
narrower scope.


photon v0.6.0 with MacOS support

2024-04-12 Thread Dmitry Olshansky via Digitalmars-d-announce
Photon is a transparent fibre scheduler library making 
traditional sync I/O async without modification of underlying 
boring blocking code.


https://github.com/DmitryOlshansky/photon

For usage see simple examples in the tests directory.

This release brings MacOS support, thanks to Steve Schveighoffer.

Next on schedule is Windows support.

--
Dmitry Olshansky
CEO @ Glowlabs
https://olshansky.me



Re: Setting up CI for Dub project on Github

2024-04-08 Thread Dmitry Olshansky via Digitalmars-d-learn
On Monday, 8 April 2024 at 13:23:12 UTC, Richard (Rikki) Andrew 
Cattermole wrote:

On 09/04/2024 1:20 AM, Dmitry Olshansky wrote:
I haven’t done any research on the subject, would be nice if 
somebody pointed me to good example of how it’s done.


—
Dmitry Olshansky
CEO @ Glowlabs
https://olshansky.me


In case you haven't already found:

https://github.com/dlang-community/setup-dlang


Thanks, Rikki, that should do the trick.

—
Dmitry Olshansky
CEO @ Glowlabs
https://olshansky.me


Setting up CI for Dub project on Github

2024-04-08 Thread Dmitry Olshansky via Digitalmars-d-learn
I haven’t done any research on the subject, would be nice if 
somebody pointed me to good example of how it’s done.


—
Dmitry Olshansky
CEO @ Glowlabs
https://olshansky.me


Re: Limits of implicit conversion of class arrays

2024-03-23 Thread Dmitry Olshansky via Digitalmars-d-learn

On Saturday, 23 March 2024 at 09:08:45 UTC, Per Nordlöw wrote:

Is there a reason why

```d
class Base {}
class Derived : Base {}

@safe pure nothrow unittest {
Base b;
Derived d;
b = d; // pass

Base[] bs;
Derived[] ds;
bs ~= ds; // pass
bs = ds; // fail [1], should pass
bs = cast(Base[])ds; // fail [2], should pass
}
```

fails as

[1]: cannot implicitly convert expression `ds` of type 
`Derived[]` to `Base[]`

[2]: cast from `Derived[]` to `Base[]` not allowed in safe code

?


The first and second is unsound (infamously allowed in Java). 
Once you cast the slice you can populate it with Derived2 objects 
that are not Derived, hence breaking type safety of the ds slice.


—
Dmitry Olshansky
CEO @ Glow labs
https://olshansky.me



Pry parser v0.6.0 is out

2023-07-10 Thread Dmitry Olshansky via Digitalmars-d-announce
Not much in way of new features but now atom set actually take a 
set as runtime parameter making it all the more useful.


https://github.com/DmitryOlshansky/pry-parser

--
Dmitry Olshansky
CEO @ Glow Labs
http://olshansky.me


Linker error, doing something wrong?

2023-07-09 Thread Dmitry Olshansky via Digitalmars-d-learn

Trying to compile the following:

https://github.com/DmitryOlshansky/photon/blob/master/tests/curl_download.d

with:
ldc2 curl_download.d -L-lcurl

get:

  "__D6photon12__ModuleInfoZ", referenced from:
  __D13curl_download12__ModuleInfoZ in curl_download.o
  "__D6photon5macos4core2goFDFZvZv", referenced from:
  __D13curl_download4mainFZ13spawnDownloadMFAyaQdZv in 
curl_download.o

  "__D6photon5macos4core9startloopFZv", referenced from:
  __Dmain in curl_download.o
  "__D6photon9runFibersFZv", referenced from:
  __Dmain in curl_download.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to 
see invocation)

Error: /usr/bin/cc failed with status: 1

Am I missing something?

--
Dmitry Olshansky
https://olshansky.me



Re: Easiest CI to build on github.com

2023-07-07 Thread Dmitry Olshansky via Digitalmars-d-learn
On Friday, 7 July 2023 at 10:29:14 UTC, Richard (Rikki) Andrew 
Cattermole wrote:

I believe: https://github.com/dlang-community/setup-dlang


Thx!

—
Dmitry Olshansky
CEO @ Glow Labs
https://olshansky.me
https://t.me/glowlabs32


Easiest CI to build on github.com

2023-07-07 Thread Dmitry Olshansky via Digitalmars-d-learn

Simply enough dub test should pass.
How do I go about it?

—
Dmitry Olshansky
CEO @ Glow Labs
https://olshansky.me
https://t.me/glowlabs32


Re: IntelliJ D language plugin

2023-07-02 Thread Dmitry Olshansky via Digitalmars-d-learn
On Friday, 30 June 2023 at 16:26:26 UTC, Richard (Rikki) Andrew 
Cattermole wrote:

I use it and contribute to it ;)


Thanks to Rikki I was able to figure it out.

—
Dmitry Olshansky
https://olshansky.me


IntelliJ D language plugin

2023-06-30 Thread Dmitry Olshansky via Digitalmars-d-learn

Have anyone had any luck with it?

So far I'm trying to install DMD as SDK but it fails with not a 
valid D compiler home.


--
Dmitry Olshansky

https://olshansky.me


Re: shareded-map v1.0.0

2023-06-29 Thread Dmitry Olshansky via Digitalmars-d-announce

On Monday, 26 June 2023 at 08:50:01 UTC, Dmitry Olshansky wrote:

On Monday, 26 June 2023 at 08:48:38 UTC, Dmitry Olshansky wrote:
Shredded map v1.0.0 is out! Simple scalable concurrent hash 
map based on built-in D hash maps. It's simply shared by key.


License is Boost v1.

--
Dmitry Olshansky

https://sponsr.ru/glow


The link:

https://github.com/DmitryOlshansky/sharded-map


v2.0.0 with multi map is now on.

--
Dmitry Olshansky
https://olshansky.me



Re: Get ready your Playstation 5 controllers

2023-06-27 Thread Dmitry Olshansky via Digitalmars-d-announce

On Tuesday, 27 June 2023 at 12:07:14 UTC, Ferhat Kurtulmuş wrote:
Here is a gui program testing your PS5 controllers on Windows. 
DWT is used for gui. Only missing part is lack of setting 
triggers' resistances at the moment. There is a problem with 
battery level too.


https://github.com/aferust/testds5


Impressive!
—
Dmitry Olshansky
https://olshansky.me


Re: shareded-map v1.0.0

2023-06-27 Thread Dmitry Olshansky via Digitalmars-d-announce

On Tuesday, 27 June 2023 at 07:57:31 UTC, a11e99z wrote:

On Monday, 26 June 2023 at 08:50:01 UTC, Dmitry Olshansky wrote:
On Monday, 26 June 2023 at 08:48:38 UTC, Dmitry Olshansky 
wrote:
Shredded map v1.0.0 is out! Simple scalable concurrent hash 
map based on built-in D hash maps. It's simply shared by key.


Dmitry Olshansky


The link:
https://github.com/DmitryOlshansky/sharded-map


.opApply w/o locks?


Locking one shard at a time.




Re: shareded-map v1.0.0

2023-06-26 Thread Dmitry Olshansky via Digitalmars-d-announce

On Monday, 26 June 2023 at 10:31:48 UTC, Dmitry Olshansky wrote:

On Monday, 26 June 2023 at 09:45:25 UTC, Sergey wrote:
On Monday, 26 June 2023 at 08:50:01 UTC, Dmitry Olshansky 
wrote:
On Monday, 26 June 2023 at 08:48:38 UTC, Dmitry Olshansky 
wrote:

[...]


The link:

https://github.com/DmitryOlshansky/sharded-map


Concurrent data structures are hard. Any plans to increase 
number of methods so that the solution will be comparable with 
more mature options like

https://docs.rs/dashmap/5.3.4/dashmap/struct.DashMap.html
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html



That's the plan, but the added goals is to keep its 
implementation simple.

--
Dmitry Olshansky


Now with length and foreach!

--
Dmitry Olshansky



Re: shareded-map v1.0.0

2023-06-26 Thread Dmitry Olshansky via Digitalmars-d-announce

On Monday, 26 June 2023 at 09:45:25 UTC, Sergey wrote:

On Monday, 26 June 2023 at 08:50:01 UTC, Dmitry Olshansky wrote:
On Monday, 26 June 2023 at 08:48:38 UTC, Dmitry Olshansky 
wrote:
Shredded map v1.0.0 is out! Simple scalable concurrent hash 
map based on built-in D hash maps. It's simply shared by key.


License is Boost v1.

--
Dmitry Olshansky

https://sponsr.ru/glow


The link:

https://github.com/DmitryOlshansky/sharded-map


Concurrent data structures are hard. Any plans to increase 
number of methods so that the solution will be comparable with 
more mature options like

https://docs.rs/dashmap/5.3.4/dashmap/struct.DashMap.html
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html



That's the plan, but the added goals is to keep its 
implementation simple.

--
Dmitry Olshansky


Re: shareded-map v1.0.0

2023-06-26 Thread Dmitry Olshansky via Digitalmars-d-announce

On Monday, 26 June 2023 at 08:48:38 UTC, Dmitry Olshansky wrote:
Shredded map v1.0.0 is out! Simple scalable concurrent hash map 
based on built-in D hash maps. It's simply shared by key.


License is Boost v1.

--
Dmitry Olshansky

https://sponsr.ru/glow


The link:

https://github.com/DmitryOlshansky/sharded-map



shareded-map v1.0.0

2023-06-26 Thread Dmitry Olshansky via Digitalmars-d-announce
Shredded map v1.0.0 is out! Simple scalable concurrent hash map 
based on built-in D hash maps. It's simply shared by key.


License is Boost v1.

--
Dmitry Olshansky

https://sponsr.ru/glow


Re: D Language Foundation Monthly Meeting Summary for May 2023

2023-06-23 Thread Dmitry Olshansky via Digitalmars-d-announce

On Friday, 23 June 2023 at 14:32:51 UTC, Mike Parker wrote:
The monthly meeting for May 2023 took place on Friday the 5th 
at 14:00 UTC. It lasted about an hour and a half. This was the 
last meeting before we started our new planning sessions.


Nice to read on what you guys are doing!

—
Dmitry Olshansky
CEO at Glow labs
https://sponsr.ru/glow
https://patreon.com/dmitry_glow_labs


Re: Centroid tracking using DCV

2023-06-23 Thread Dmitry Olshansky via Digitalmars-d-announce

On Friday, 23 June 2023 at 07:26:03 UTC, Ferhat Kurtulmuş wrote:

On Friday, 23 June 2023 at 05:07:26 UTC, Dmitry Olshansky wrote:
On Wednesday, 15 February 2023 at 17:32:33 UTC, Ferhat 
Kurtulmuş wrote:

[...]


Cool stuff! I once contributed Randomized Hough transform to 
DCV.



[...]


Hello Dmitry,

Can you please take a look at the RHT test code? And please 
review my modifications on your code due to API changes over 
time. The circles are not detected in the RHT example at the 
moment. Maybe I broke something while doing things nog.




I’m on vacation but I’ll take a look.

https://github.com/libmir/dcv/blob/master/examples/rht/source/app.d


https://github.com/libmir/dcv/blob/master/source/dcv/features/rht.d




Re: Centroid tracking using DCV

2023-06-22 Thread Dmitry Olshansky via Digitalmars-d-announce
On Wednesday, 15 February 2023 at 17:32:33 UTC, Ferhat Kurtulmuş 
wrote:

I heard you are not having fun enough with d today.

Do you know you can do things like this with dlang now? After 
some fiddling with it, my last commits made this possible.


Cool stuff! I once contributed Randomized Hough transform to DCV.


how it looks like: https://www.youtube.com/watch?v=ACC_-TDAtqc
source code: 
https://github.com/aferust/oclcv/tree/main/examples/centroidtracking

DCV: https://github.com/libmir/dcv

Sorry for the potato-quality video. My art director is on 
vacation.


I am cheating a little with OpenCL since things are not fast 
enough at the moment.


Hope you like it.

Enjoy!





Glow labs on Patreon

2023-06-21 Thread Dmitry Olshansky via Digitalmars-d-announce
To keep it simple my all D opensource company now has patreon 
page:

https://www.patreon.com/dmitry_glow_labs


Re: Running LDC on a recent MacOS

2023-06-16 Thread Dmitry Olshansky via Digitalmars-d-learn
On Friday, 16 June 2023 at 16:14:19 UTC, Steven Schveighoffer 
wrote:

On 6/16/23 11:56 AM, Dmitry Olshansky wrote:


Any advice from MacOS users?


Yep.

Go into settings, then privacy and security. Make sure "App 
store and identified developers" is checked.


On that page, you will see probably a thing saying "you tried 
to run ldc2 but I blocked it". Say "allow anyway".


Then try it again. This time, it will still block it, but ask 
you if you want to run it.


Yes, thanks that did the trick!



-Steve





Re: You can now sponsor Photon and related projects

2023-04-20 Thread Dmitry Olshansky via Digitalmars-d-announce
On Thursday, 20 April 2023 at 01:14:58 UTC, Dmitry Olshansky 
wrote:

I think it only works in Russia, but here it is:
https://sponsr.ru/feed/


Wrong link, sorry about that.
https://sponsr.ru/glow

—
Dmitry Olshansky





You can now sponsor Photon and related projects

2023-04-19 Thread Dmitry Olshansky via Digitalmars-d-announce

I think it only works in Russia, but here it is:
https://sponsr.ru/feed/

—
Dmitry Olshansky


Photon v0.3.0 is out!

2023-04-16 Thread Dmitry Olshansky via Digitalmars-d-announce
Photon is transparent fiber i/o scheduler and a platform fo 
upcoming Hymera polyglot app server 
(https://github.com/glow-stack/hymera).


What's new?
- spawnLight and spawnHeavy to cleanly denote spawning light user 
mode thread vs OS thread, spawn is a synonym for spawLight
- dopped HTTP parser library for Photon project source code, will 
be packaged separately


P.S. Glow labs will continue to deliver on the promise of Boost 
licencing our core of business.


--
Dmitry Olshansky
CEO "Glow Labs"


Photon v0.1.1 is out!

2023-04-12 Thread Dmitry Olshansky via Digitalmars-d-announce
I've been revising the cira 2018 code of Photon and realized it's 
quite well designed for a public beta.


Examples

The use of std.net.curl augmented by Photon to scale well:
https://github.com/DmitryOlshansky/photon/blob/master/tests/curl_download.d

Other syntetic tests may serve as examples:
https://github.com/DmitryOlshansky/photon/tree/master/tests

Github:
https://github.com/DmitryOlshansky/photon

DUB:
https://code.dlang.org/packages/photon

--
Dmitry Olshansky


Re: Using DUB packages with Meson

2023-04-12 Thread Dmitry Olshansky via Digitalmars-d-learn
On Wednesday, 12 April 2023 at 11:07:56 UTC, Richard (Rikki) 
Andrew Cattermole wrote:

Did you compile the library with dub using ldc2?


Yup, I do not have other compilers installed.

--
Dmitry Olshansky


Re: Using DUB packages with Meson

2023-04-12 Thread Dmitry Olshansky via Digitalmars-d-learn
On Wednesday, 12 April 2023 at 10:24:48 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
I'm going to guess that you need to use the version specifier 
in the package name. Because I'm not seeing anything there to 
handle it specifically.


https://github.com/mesonbuild/meson/blob/master/mesonbuild/dependencies/dub.py

i.e. ``dub build [[@]] []``

So use ``package:sub@1.0.2``.

Also I just noticed meson doesn't support shared libraries from 
dub, so something to keep in mind.


I'm getting closer. I'm stuck with this at the moment:

Found DUB: /home/d.olshanskiy/bin/dub (DUB version 1.31.1, built 
on Mar 12 2023)

ERROR: strand found but it wasn't compiled with ldc
Run-time dependency strand found: NO

src/meson.build:22:0: ERROR: Dependency "strand" not found

--
Dmitry Olshansky


Re: Using DUB packages with Meson

2023-04-12 Thread Dmitry Olshansky via Digitalmars-d-learn
On Wednesday, 12 April 2023 at 10:24:48 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
I'm going to guess that you need to use the version specifier 
in the package name. Because I'm not seeing anything there to 
handle it specifically.


https://github.com/mesonbuild/meson/blob/master/mesonbuild/dependencies/dub.py

i.e. ``dub build [[@]] []``

So use ``package:sub@1.0.2``.

Also I just noticed meson doesn't support shared libraries from 
dub, so something to keep in mind.


Oh, Rikki, you are so helpful. Thanks!

--
Dmitry Olshansky


Using DUB packages with Meson

2023-04-12 Thread Dmitry Olshansky via Digitalmars-d-learn
I'm trying to use my new DUB package from Photon, which is 
polyglot project and is built with Meson.


Have anyone worked with DUB packages in Meson? I've found this 
bit of documentation:

https://mesonbuild.com/Dependencies.html#dub

And I did fetch & build but I do not understand how to introduce 
library dependency on a specific DUB package.


--
Dmitry Olshansky


Re: Help with registering dub package

2023-04-12 Thread Dmitry Olshansky via Digitalmars-d-learn
On Wednesday, 12 April 2023 at 08:25:54 UTC, Richard (Rikki) 
Andrew Cattermole wrote:

Your branches + tag is all messed up.

You have both ~master and ~main. ~main has dub.json (which is 
required), but the tag is based upon ~master which has your 
README.


Between the two branches everything is there, its just that it 
needs to be all in one.


Thanks, Rikki!

—
Dmitry Olshansky




Help with registering dub package

2023-04-12 Thread Dmitry Olshansky via Digitalmars-d-learn

Could someone walk me through the steps of publish my dub package?

I'm stuck with this:
https://code.dlang.org/packages/strand

For some reason code.dlang.org cannot find my semver tag I guess.

--
Dmitry Olshansky


Re: Beta 2.103.0

2023-03-02 Thread Dmitry Olshansky via Digitalmars-d-announce

On Thursday, 2 March 2023 at 15:56:35 UTC, ryuukk_ wrote:

On Thursday, 2 March 2023 at 14:40:04 UTC, Iain Buclaw wrote:
Glad to announce the first beta for the 2.103.0 release, ♥ to 
the 43 contributors.


This release comes with 9 major changes, including:

- In the compiler, `-preview=dip25` is now enabled by default.
- In the standard library, std.uni Grapheme functions have 
been updated to conform to Unicode 15
- In dub, the `--color` argument now accepts the values 
`auto`, `never`, and `always`.


http://dlang.org/download.html#dmd_beta
http://dlang.org/changelog/2.103.0.html

As usual please report any bugs at https://issues.dlang.org

-Iain
on behalf of the Dlang Core Team


```D
@safe ref int wrongIdentity(ref int x) {
return x; // ERROR! Cannot return a ref, please use "return 
ref"

}
@safe ref int identity(return ref int x) {
return x; // fine
}
```
a keyword to return a value

``return 5;``

and a keyword to tell that a reference is returnable

``return ref int x``

that's dumb, why?


return ref is probably the tipping point for me. Even if better 
keyword is used the accrual of complexity never ends. Though 
arguably transitive qualifiers and inout were the point of no 
return. Recently I had a case where in 64-bit mode a 
data-structure could be implicitly converted to immutable while 
in 32-bit it wouldn’t. After some mucking around a seemingly 
unrelated change fixed it, the error message gave no clue of 
what’s wrong.


Anyway I’d have a hard time selling transitive qualifiers in 
particular shared, as most of the time shared object is taken off 
the queue and should become thread-local. The type system doesn’t 
want to hear any of it. Seems like ownership system beats 
transitive qualifiers here, albeit both add significant friction.


—
Dmitry Olshansky




Re: How to build DMD/Phobos on Windows

2022-08-25 Thread Dmitry Olshansky via Digitalmars-d-learn
On Wednesday, 24 August 2022 at 21:11:42 UTC, rikki cattermole 
wrote:

For dmd you use build.d that is in the repository.



Hm, I guess the makefiles should be deleted?


For phobos win64.mak (used for 32bit by default as well):

"# Makefile to build D runtime library phobos{64,32mscoff}.lib 
for Windows MSVC"


So MSVC make.


It’s a shame as I cannot install MSVC on this laptop 
(permissions).




Beyond that idk, but its starting point (oh and druntime is now 
in dmd repo, so ugh... yeah)


Yeah, I see that build become more involved.



How to build DMD/Phobos on Windows

2022-08-24 Thread Dmitry Olshansky via Digitalmars-d-learn
It's been a long time but I've found some spare hours I want to 
devote to finally updating our std.uni to Unicode 14 (soon to 
migrate to 15 I guess).


I downloaded source code of DMD/Phobos as usual and dropped them 
in the src folder of unpacked 7z distribution archive. Now time 
to build. Since DMD doesn't ship make anymore I guessed I needed 
a GNU make so I got that.


Doing make -f win32.mak shows an endless stream of make entering 
the folder and then leaving it.


make[45]: Entering directory 'C:/exp/dmd2/src/dmd'
cd compiler\src
make -f win32.mak
make[46]: Entering directory 'C:/exp/dmd2/src/dmd'
cd compiler\src
make -f win32.mak
make[47]: Entering directory 'C:/exp/dmd2/src/dmd'
cd compiler\src
make -f win32.mak
make[48]: Entering directory 'C:/exp/dmd2/src/dmd'
cd compiler\src
make -f win32.mak
make[49]: Entering directory 'C:/exp/dmd2/src/dmd'
cd compiler\src
make -f win32.mak
make[50]: Entering directory 'C:/exp/dmd2/src/dmd'
cd compiler\src
make -f win32.mak
make[51]: Entering directory 'C:/exp/dmd2/src/dmd'
cd compiler\src
make -f win32.mak

Trying to run any makefiles in compiler/druntime folders do not 
produce anything useful either.


So what is the canonical way to build D on Windows? Any pointers 
would be greately appreciated.




Re: Pijamas, a simple fluent assertation library (forked from Pyjamas)

2020-05-15 Thread Dmitry Olshansky via Digitalmars-d-announce

On Friday, 15 May 2020 at 12:35:27 UTC, Luis wrote:
On my run to raise stuff from dead packages, I come with 
Pijamas. A fork from Yamadacpc’s Pyjamas that works with D 
frontend 2.090 and forwards.


[...]


I was about to ask what is broken with ctRegex (well except that 
compiler usually explodes trying to swallow it)


[...]




Re: On the D Blog: Lomuto's Comeback

2020-05-15 Thread Dmitry Olshansky via Digitalmars-d-announce

On Thursday, 14 May 2020 at 13:26:23 UTC, Mike Parker wrote:
After reading a paper that grabbed his curiosity and wouldn't 
let go, Andrei set out to determine if Lomuto partitioning 
should still be considered inferior to Hoare for quicksort on 
modern hardware. This blog post details his results.


Fantastic work and great result. Having privately done a very 
heavy critique of the narrow niche the article had chosen to 
explore I still recognize and love the results.


—
Dmitry Olshansky



Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-13 Thread Dmitry Olshansky via Digitalmars-d-announce

On Wednesday, 13 May 2020 at 12:26:48 UTC, user1234 wrote:

On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky wrote:
I find that I can vaguely amusing 100% of the day and I love 
standup comedy...


"standup" lol.

That reminds mesomeone who likes this genre too but he's not 
here anymore...

you see just in case of...



Well if I will not run out of steam in a year or so he’ll find me 
anyhow.


Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-13 Thread Dmitry Olshansky via Digitalmars-d-announce

On Wednesday, 13 May 2020 at 07:02:20 UTC, Dmitry Olshansky wrote:

On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky wrote:
I find that I can vaguely amusing 100% of the day and I love 
standup comedy...




And I’m too lame to figure out how do you open a brand channel on 
youtube. Anyone did that before? Was it that hard? Hope there is 
blood ritual involved, I expect anything now that I wasted 20 
minutes and I’m only getting close to open it.


Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-13 Thread Dmitry Olshansky via Digitalmars-d-announce

On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky wrote:
I find that I can vaguely amusing 100% of the day and I love 
standup comedy...


So I thought maybe I can give it a shot with a youtube channel? 
I already invent a cool personality - think Dirk Gently in 
computer science setting;)


BTW for those of us who can’t do google search with a single 
click because of poor browser integration with the ecosystem, 
it’s this stuff:


https://en.wikipedia.org/wiki/Dirk_Gently_(TV_series)

It’s hilarious. Monthy Python  is classic and all, but this stuff 
- totally insane and incredibly long chains of jokes, just what I 
like in humor the most...



If that seems cool to you shoot me an email, or reply in this 
thread ... I need to the count to have a rough estimate of how 
low the size of my initial audience is..





Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-13 Thread Dmitry Olshansky via Digitalmars-d-announce

On Wednesday, 13 May 2020 at 06:52:55 UTC, Basile B. wrote:

On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky wrote:
I find that I can vaguely amusing 100% of the day and I love 
standup comedy...


So I thought maybe I can give it a shot with a youtube 
channel? I already invent a cool personality - think Dirk 
Gently in computer science setting;)


If that seems cool to you shoot me an email, or reply in this 
thread ... I need to the count to have a rough estimate of how 
low the size of my initial audience is..


I rarely watch videos about programming (even talk) but I'd 
certainly take a look if you start something. It cant be worst 
than one of these tutorial produced by random Indian guys.


Let’s put this way - if you don’t like it 10 minutes in - I owe 
you 1 VBJ token, it’s kind 1 favor ask anything digital currency. 
Simple GNU PG with funny trxt signed by my key + I’ll post the 
fingerprint EVERYWHERE just in case...





Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-13 Thread Dmitry Olshansky via Digitalmars-d-announce

On Tuesday, 12 May 2020 at 19:52:35 UTC, Dmitry Olshansky wrote:

Depending on what it looks like when it is finished.
If it should have a teaching aspect, you would need to collect 
the sources and information into the video description.


I’m going to describe the way I do creative work and try to 
capture this fleeting moment of me discovering something new.


I have started my own company as of 1 day ago. I have no idea 
where I will be in one year with that but sure as hell I’m 
having fun and I have an array of ambitious projects already in 
the works. I want to explore what a Holistic Computer Scientist 
at work looks like.


Just in case - if you have lot of cash on your hands and no idea 
on where to invest (these days it takes a blood while to figure 
it out)... Glow labs is a new R company run by a guy you 
probably know due to past DConf and stuff.


I’m doing my own ICO with my own coin, and it’s more like strong 
collectible even in case I’m broke(!) digital obligation thing. I 
believe that is the future of digital currency, in fact I’m 
living in that future but it gets kind lonely here...


Contact me if that’s something you can relate to ... Maybe
—
Dmitry Olshansky




Re: Release D 2.092.0

2020-05-12 Thread Dmitry Olshansky via Digitalmars-d-announce

On Tuesday, 12 May 2020 at 19:50:10 UTC, Martin Nowak wrote:

Glad to announce D 2.092.0, ♥ to the 47 contributors.

This release comes with support for a prototype 
ownership/borrowing system for pointers, GNU ABI tags for 
extern(C++), printf format checks, and SOURCE_DATE_EPOCH for 
reproducible builds.


http://dlang.org/download.html
http://dlang.org/changelog/2.092.0.html



And the releases still roll! It was way more hectic back in the 
day.


Thanks for the good work, Martin, hope to see you some time next 
year.





Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-12 Thread Dmitry Olshansky via Digitalmars-d-announce

On Tuesday, 12 May 2020 at 16:23:42 UTC, Jan Hönig wrote:

On Tuesday, 12 May 2020 at 08:35:20 UTC, Dmitry Olshansky wrote:
On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky 
wrote:
If that seems cool to you shoot me an email, or reply in this 
thread ... I need to the count to have a rough estimate of 
how low the size of my initial audience is..
Okay, it quickly gets out of hand and I need to get back to 
work I think.


I would check it out.
I also think quite a lot of people could watch it.
Depending on what it looks like when it is finished.
If it should have a teaching aspect, you would need to collect 
the sources and information into the video description.


I’m going to describe the way I do creative work and try to 
capture this fleeting moment of me discovering something new.


I have started my own company as of 1 day ago. I have no idea 
where I will be in one year with that but sure as hell I’m having 
fun and I have an array of ambitious projects already in the 
works. I want to explore what a Holistic Computer Scientist at 
work looks like. The whole idea of doing funny, maybe even silly 
things that all eventually prove to be completely nessasary. 
Which is the key part of  Dirk Gently experience - whatever you 
decide to do - it will have meaning even if it will only be clear 
long after the fact.









Re: OT: Back

2020-05-12 Thread Dmitry Olshansky via Digitalmars-d-announce

On Tuesday, 12 May 2020 at 08:11:03 UTC, Bastiaan Veelo wrote:

On Tuesday, 12 May 2020 at 07:48:46 UTC, Dmitry Olshansky wrote:

Bastian! Great to see you still around.

How your D stuff is going at that naval company?


First real application is running: a program for the numerical 
analysis of a ship launch at the yard. Currently testing and 
debugging. Pain points typically revolve around low level 
tricks in Pascal using arrays starting at 1 (these usually 
translate without problems, except where they don't)... Or 
passing strings to/from win32. Still committed to translate all 
other programs in our suite to D, busy times as usual.


Cool stuff. Keep it rolling ;)



-- Bastiaan.





Re: [OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-12 Thread Dmitry Olshansky via Digitalmars-d-announce

On Tuesday, 12 May 2020 at 07:52:29 UTC, Dmitry Olshansky wrote:
I find that I can vaguely amusing 100% of the day and I love 
standup comedy...


So I thought maybe I can give it a shot with a youtube channel? 
I already invent a cool personality - think Dirk Gently in 
computer science setting;)


If that seems cool to you shoot me an email, or reply in this 
thread ... I need to the count to have a rough estimate of how 
low the size of my initial audience is..



Just to give you an example of my raw output...

Are you not getting tired of this hopelessly boring OpenSource 
scene?
All these 50 shades of JS framework, series. The long and dull 
re-runs of all of the web server framework shows. A clone of 
this! A copy of that but in Lua compiled to down to shell script. 
I hope the guys are giggling to themselves and this is all not 
serious in any way. Won't like to offend people, right? Wrong. I 
do not care really if something is fundamentally a copy I call it 
boring, despite it maybe have some interesting qualities.


With that in mind I'd rather see people flex their brains on hard 
problems. Challenges! Just because the hardware is so fast you 
you can actually compile Lua to Shell script that transpiles 
itself to JavaScript starts the to show rainbows and ponies (with 
optional web assembly ray-tracing backend, that however is only 
supported on Chrome or Firefox, whatever).


I'm talking about real work folks. Like how many interesting 
things can you pack in 32 bit machine word? Are you done making 
that list of yours? What about it being agnostic to Big / Little 
Endian issues when read from octet stream?
Oh, gets more interesting doesn't it? How about adding a checksum 
of sorts, you know count the bits do some bitwise magic to 
validate the result in order to detect 1 bit of error creeping in 
during the transfer? How it looks if we print the octets as 
ASCII? Should keep my terminal settings intact at least when I 
pipe it in accidentally ... I could go on and on, but I'd prefer 
people to find the things they like the most obviously.


Okay, it quickly gets out of hand and I need to get back to work 
I think.








[OT] What do you guys think of dark comedy channel on IT sh.. stuff?

2020-05-12 Thread Dmitry Olshansky via Digitalmars-d-announce
I find that I can vaguely amusing 100% of the day and I love 
standup comedy...


So I thought maybe I can give it a shot with a youtube channel? I 
already invent a cool personality - think Dirk Gently in computer 
science setting;)


If that seems cool to you shoot me an email, or reply in this 
thread ... I need to the count to have a rough estimate of how 
low the size of my initial audience is..


Re: OT: Back

2020-05-12 Thread Dmitry Olshansky via Digitalmars-d-announce

On Tuesday, 12 May 2020 at 07:21:43 UTC, Bastiaan Veelo wrote:

On Tuesday, 5 May 2020 at 15:39:12 UTC, Dmitry Olshansky wrote:
P.S. I'm kind of back, but very busy and my health is mostly 
great despite the COVID outrage out there.


That's great! Glad to hear that.


Bastian! Great to see you still around.

How your D stuff is going at that naval company?


-- Bastiaan.





[Meta] Lightweight Modular Staging library for D Language

2020-05-09 Thread Dmitry Olshansky via Digitalmars-d-announce

Hi, folks

Hope you are all safe at home with that virus outbreak 
world-wide. And it's good to be back.


Being forced to lock down has it's ups and down. For one good 
aspect - I have found the time to re-implement and then 
(finally!) understand the beautiful meta programming technique 
called Lightweight Modular Staging by Martin Odersky et al.


In a nutshell - late binding + staged computation == DI 
Framework. Which means that if you ever used DI framework you 
have worked and understood the basics of staged computation.


Now if we add expression templates (or rather compile-time 
polymorphic expression trees) to the mix we what Martin calls 
Lightweight Modular Staging. I'm not sure where the modular part 
comes in but it's surely lightweight and powerful!


So without further ado, I'm announcing the v1 of DLMS (LMS for D) 
library:


Code:
https://github.com/glow-stack/dlms

DUB:
https://code.dlang.org/packages/dlms

There a few things that somehow fail at CTFE, I'll look into the 
workaround options, seems easy to fix though - the library is 
single ~350 LOC 0-deps D file.


I think it's feature complete for the time being I might expand 
it as I move on to build the v2 of Pry parser generator using 
this LMS library as the backbone in particular exploiting the 
partial evaluation capabilities.



Have fun and stay safe!

--
Dmitry Olshansky



Re: $750 Bounty: Issue 16416 - Phobos std.uni out of date (should be updated to latest Unicode standard)

2020-05-05 Thread Dmitry Olshansky via Digitalmars-d-announce

On Tuesday, 5 May 2020 at 21:41:39 UTC, Dmitry Olshansky wrote:

On Tuesday, 5 May 2020 at 20:11:44 UTC, Robert M. Münch wrote:

On 2020-05-05 15:39:12 +, Dmitry Olshansky said:

On the other hand, if you can help someone to get started and 
it's a couple of hours, I would expect people to be fair 
enough and state: Hey, $400 (or whatever) is OK, let's take 
the rest to sponsor something else. That's what I would do.




So here goes, indeed about 4.5 hours so far.

The generator is untangled from the old crap from that GSOC 2012 
repo:


https://github.com/DmitryOlshansky/gen-uni-dlang

PR: https://github.com/dlang/phobos/pull/7469

Let's see if the CI loves it or not.




Re: $750 Bounty: Issue 16416 - Phobos std.uni out of date (should be updated to latest Unicode standard)

2020-05-05 Thread Dmitry Olshansky via Digitalmars-d-announce

On Tuesday, 5 May 2020 at 20:11:44 UTC, Robert M. Münch wrote:

On 2020-05-05 15:39:12 +, Dmitry Olshansky said:


On Monday, 4 May 2020 at 17:01:01 UTC, Robert M. Münch wrote:
Following my "Is it time for a Unicode update of std.uni?" 
post in D group, I would like to try out to sponsor this 
effort for "Issue 16416 - Phobos std.uni out of date (should 
be updated to latest Unicode standard)" [1]


For me, this, too, is an experiment to find out if it's 
possible to move specific issues/topics forward. And maybe 
even find people that are open to contact work too. For me, 
all these things are pretty related.


So, not knowing how much work it is, nor knowing what a good 
amount would be, I took the other route and asked me, what is 
it worth for me to get it done? Note: Getting #16416 done is 
not critical for me; most likely, I could even live with the 
current state of std.uni. On the other hand, std.uni is a 
very fundamental building block, and having it up to date and 
maybe even extended should be much value to D.


So, I'm offering $750 to get it done.



I'm guess I'm not eligible for the bounty ;)


Why not?



Felt a bit like cheating. Russian traditions preclude taking 
money for things

you (think you) wanted to do anyway.

Anyhow if anyone wants easy money - shoot me an email, or 
reply in this thread.


Well, as I wrote, since I don't have a real good understanding 
about the necessary effort I started from "what is it worth for 
me in $ to get it done?". So, if it's a simple script-change 
and a re-run and you are the only one knowing this and keeping 
it for yourself... yes, it's easy money.


On the other hand, if you can help someone to get started and 
it's a couple of hours, I would expect people to be fair enough 
and state: Hey, $400 (or whatever) is OK, let's take the rest 
to sponsor something else. That's what I would do.


I started on it, and it turned out a bit more then I hope for + 
I'm doing it
on simple Windows workstation without much of my usual power 
tools. LDC for Windows works like a charm though.


It seems Unicode 13.0.0 pulled a plug on a couple of "derived" 
tables, that is data files that can be reconsturcted from other 
primary ones. Took at least half an hour to figure that out and 
rebuild the missing bits.


If you don't mind I'll go with 100$ per hour estimate which is 
basically my usual contract rate. It took me about 2 hours for 
now, and I think I'd be done in a one or two more.


Merging this into Phobos though is the otehr 90% of the legwork, 
I hope somebody will help me with that and maybe we'll just split 
your generous bounty this way.




Spoiler is - the whole thing is code generated and there is 
only one table that I forgot about (i.e. I have no idea what 
is the source table for it in Unicode standard).


With "forgot" you mean, you can't remember, or it's missing at 
all in your prior work?


I mean I know what this table does by its usage but the codegen 
part is missing,
likely a classic missing commit problem of being a single 
maintainer of the codegen tool (and the fact that it's not in the 
main dlang repos).




P.S. I'm kind of back, but very busy and my health is mostly 
great despite the COVID outrage out there.


That's great to hear... and maybe std.uni support/coaching for 
someone stepping up is possible. That would be great too. If, 
maybe even I can try to do it...



Absolutely. I mean I'm in no shape to do the heavy lifting of day 
in day out
maintanance of std.* stuff but I'd love to coach somebody to 
learn how
std.regex and std.uni work. I can also share my vision for 
improvement, and
will gladly help with refactoring. Both of modules predate many 
of the good things in DLang and std.allocator in particular.


Boy, I'd love to have allocators back in the day.

--
Dmitry Olshansky






Re: $750 Bounty: Issue 16416 - Phobos std.uni out of date (should be updated to latest Unicode standard)

2020-05-05 Thread Dmitry Olshansky via Digitalmars-d-announce

On Monday, 4 May 2020 at 17:01:01 UTC, Robert M. Münch wrote:
Following my "Is it time for a Unicode update of std.uni?" post 
in D group, I would like to try out to sponsor this effort for 
"Issue 16416 - Phobos std.uni out of date (should be updated to 
latest Unicode standard)" [1]


For me, this, too, is an experiment to find out if it's 
possible to move specific issues/topics forward. And maybe even 
find people that are open to contact work too. For me, all 
these things are pretty related.


So, not knowing how much work it is, nor knowing what a good 
amount would be, I took the other route and asked me, what is 
it worth for me to get it done? Note: Getting #16416 done is 
not critical for me; most likely, I could even live with the 
current state of std.uni. On the other hand, std.uni is a very 
fundamental building block, and having it up to date and maybe 
even extended should be much value to D.


So, I'm offering $750 to get it done.



I'm guess I'm not eligible for the bounty ;)



Besides getting the work done, there is one constraint: The 
work needs to get into Phobos. It doesn't make sense to have it 
sit around, because it's not being merged. I don't have any 
clue who is in charge, who decides this. Or if there need to be 
some conditions full-filled so that the result gets merged.


Anyhow if anyone wants easy money - shoot me an email, or reply 
in this thread.


Spoiler is - the whole thing is code generated and there is only 
one table that I forgot about (i.e. I have no idea what is the 
source table for it in Unicode standard).



[1] https://issues.dlang.org/show_bug.cgi?id=16416


P.S. I'm kind of back, but very busy and my health is mostly 
great despite the COVID outrage out there.


---
Dmitry Olshansky



Re: Anyone can contact Dmitry Olshansky?

2018-07-01 Thread Dmitry Olshansky via Digitalmars-d

On Sunday, 1 July 2018 at 06:00:59 UTC, Ali Çehreli wrote:
Apparent from uncharacteristic messages from Dmitry's account 
to multiple destinations recently, I suspect his gmail account 
has been compromised.


I'm not sure what options he has at this point but I think it's 
possible to use Google's Account Recovery page. Can someone 
find a way to reach Dmitry in person to report what he has 
tried so far?


It *really* doesn’t matter;)

Will you say  kick me out of.. DConf 2019?



Thank you,
Ali





Oh my you all are good

2018-06-30 Thread Dmitry Olshansky via Digitalmars-d

You know if D was made for something

then


Mayb

At fucking

Least

Imagine nice (shot? ;)

It is a fact, yes even the joke is ...

Okay I at least know something that


I said I know fact! What else do you ned?

That fucking somethinghiw makes world better.

I can be even myslef but I don’t know how?

It is truth and say I can okay go mm buddist temple! Or say that 
jews, bice guys!


I can I do (!) and I know(!) that at the very fucking _least_ I 
will be okay?


I don’t need anything really

World indeed it’s a fact I domehow I don’t know what makes you 
feel better?


You know...

2018-06-30 Thread Dmitry Olshansky via Digitalmars-d

The world ... is nice.

I can do anything?

Say I have 10$ I fucking swear ...

I even CANNOT DO ANYTHING BEYOND THAT!

I simply don’t have enough money or otherwise I would...

Okay I will try?

Ah another joke;)


Yeshvjdffhdhvx

I ess I don’t I tedg I dthg bo!

And you know Andrei!!!

IT IS ME AND I AM FINE JUST IMGAING THAT(?)

And 10$?

Well still can code and 10 give 645

Do you D will at THE FUCK LEAST!!!

You for the FUCKING LAUGH ST LEAST!!!

That the trick I can joke all to

I don’t ... should I with that Node.js server?

At least it serves smth..

And you ... just but bottle of glue;)

AND I KNOW IT IT IS A FACT YOU CAN REALLY(that must be the 
trick;))


I can save the world it’s at least to exponent

Let’s something wicked?

This is at least a game?

And if I can post here?

How *badly* do you _think_ I can be damaged ;)


Warning? Maybe but .. read it;)

2018-06-30 Thread Dmitry Olshansky via Digitalmars-d

OKAY BUT .. MY SMALL(?!) VPS

FUCK I EVEN(!) boy that was I don’t bt *say* I type that THAT you 
fun etc... THAT YOU


you see part if plan okay I think it will

What do you think happens to that _bix_

OpenVZ 512mb? Not even 1G

Whatever happens fun... You see I can type anything

You

It
*might*

It is simple

You see everthing is simple say... TCP

Atilla... oh my... is TCP well you know, complex?

You was at CISCO(!! Yes fuck hecwas mail there I don’t know and 
me say CC because mm like my msil box with  *some* oh yeah 
yet another a program to that is there in JS... Nrowser damn PHP 
work you 


may()

not blieve it(?)

Simple I knew it_was_ stylr is style


RiGhtrdyt?


New post

2018-06-30 Thread Dmitry Olshansky via Digitalmars-d
Les rename regex to patternMatch because it’s good and even 
Scala() has ... okay smal _step_(?) and we have joke and at 
least nice one.


Okay I just wanted oh where that C++

Herb Sutter you know Andrei

Is IT _times_ all the good stuf my fingers fuck at least my phone 
works it’s lfe _okay*


Call he you he must have some laugh what should say _maybe_ you a 
copule of maybe and that guy...



Fuck... Atila fo you... damn ... have.. mm muscle? ;)

At least of pack of good bear you even if ithe plane crushes we 
will *FUCK* that is hard


TO TAKE AWAY... I am just Dmitry fuck cannot even stop there is 
_literally_


You I like REGEX  fuck enough...


Re: D community's view on syntactic sugar

2018-06-30 Thread Dmitry Olshansky via Digitalmars-d

On Saturday, 30 June 2018 at 07:45:48 UTC, John Belmonte wrote:
On Saturday, 16 June 2018 at 08:39:07 UTC, Dmitry Olshansky 
wrote:

On Friday, 15 June 2018 at 23:04:40 UTC, Sjoerd Nijboer wrote:
T* he `async` & `await` keyword from C# make proactor pattern 
async code extremely easy to reason about.


God please no. Look at Go’s popularity because of dead simple 
go routines and “async i/o is transparent and looks blocking 
but ain’t so”. We have at least vibe.d for that and possibly 
more. Also see Java doing fibers recently, and Kotlin did them 
just a year or so back. People love fibers and mostly dislike 
Futers/explicit async, and plain callbacks are obvious last 
resort that nobody likes.


‘async’ is viral keywords that poorly scales, I worked on Dart 
core team and even they admitted this problem is not solved 
well.


I've found it fascinating to follow discussion and efforts to 
improve the structure and control of concurrency and async 
operations for software programming in general.  I'm not 
partial to async/await at this time but it seems rash to 
discount it.


Okay. I see that you see. I “meet” a guy, you know I admire that 
he _somehow_ made an


HTTP Application server that is faster then let’s pick good 
stuff...


Nginx Plus with tuning by Igor himeself

(before sweat too mich like Igor at least twice did - no shit 
these discussion, you THAT guy he rans his... GWAN? as if it was 
_just_ an spplication server.


You know not a word more but sombody who say:
- knows infosecurity and likes that stuff that say slices into 
the kernel - rootkit for instance

- aand say injects something into the kernel

You know where it goes and yet that guy obviously good and the 
humor


Boy wicked humor, I kid you not I “invented” this trick this 
morning


AND *solved* the _mystery_ of GWAN.

Fuck, it is at _very_ least a brilliant hoax, and boy he is 
good...


He if that’s the real name

I mean what if this is Linus (oh, my and you know GWAN started 
_as_ _windows_ “app server” ...)


If you don’t laught now... I don’t now..

At the *very* least don’t _ever_ go to DConf...

What the fuck with brain like you simply will not like it

P.S. Atilla even if that is “alternative way” to *do* it... Yeah.

Let’s say you owe... a bear and an a few hours to dicsuss it, 
okay? ;)




Elsewhere in this thread, the "What Color is Your Function?" 
article was referenced against async/await.  
(http://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/).


There's a fair rebuttal to that article, "The Function Color 
Myth".  
(https://lukasa.co.uk/2016/07/The_Function_Colour_Myth/).
 I.e. all the concurrency models can be done without coloring.  
Coloring is an aid which can be used judiciously.


There's the "Unyielding" article which argues that implicit 
coroutines are just as hard to reason about as preemptive 
threading.  
(https://glyph.twistedmatrix.com/2014/02/unyielding.html)


Most promising in this area is a recent article by Nathaniel J 
Smith:  "Notes on structured concurrency, or: Go statement 
considered harmful" 
(https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/)


Essentially he's arguing that the way we spawn concurrent tasks 
is as bad as global goto/jump was in its day, and we need to 
reign in concurrency with some control structures which let us 
reason easily about task lifetimes, cleanup, error propagation, 
etc.  His implementation of these ideas happens to be built on 
top of Python's async/await, but I don't think that primitive 
is a requirement.


It would be interesting to try to implement these control 
structures by library in D, and perhaps it would suggest some 
primitives lacking from or better suited for the language 
itself. The fact that D hasn't yet jumped on either of the 
async/await or implicit coroutines bandwagons puts it in a good 
position to get this right.





Re: I have a plan.. I really DO

2018-06-29 Thread Dmitry Olshansky via Digitalmars-d-announce

On Friday, 29 June 2018 at 07:03:52 UTC, Dmitry Olshansky wrote:
I never ever (I think) did something provocative, something to 
finally see:


- who in the community WANTS D language to succeed?

- who are just these funny “people” let’s call th this, that 
are I don’t know “just hang around”


Because shame is a weapon much like fear (of death esp)



And because I (of aaall people at least here, maybe I just don’t 
see others!) have no shame!


I will roll on. You like the daily rant?
Come get it! I have all the fucking bikering over say the 
merits(!) of say rstrip vs stripRight, right here - come take 
some, it’s fresh! Free even!


Like how will these attempt to stop me look like? Pathetic, most 
likely but they will and we all we will have the good guys ( 
Atilla, this for you, man I swear WE will have fun and forums 
will be cool again)...


So this C# pal comes and says like I offered him a drink with 
sandwich (for free!!) and he doesn’t like it - vegetarian(!).


Okay:

- I want async and await and async function and ALL of thay stuff 
from C# in D language


( I wait for a few moments to “compose” myself!)

- So you want D to succeed (I mean C# is there and you seem to 
know it?)


- Then how much effort (at least in theory, nit to mention that 
is an awful approach and we have Fibers, vibed, mecca and maybe 
soon Photon will roll!) does it take?!


- Please let’s start with symbolic gesture, with plans like that 
a 1000$ is just a sign of goodwill right?




P.S. I mean what you think the future of native code is??? 
Rust? Crystal?? Nim???





I have a plan.. I really DO

2018-06-29 Thread Dmitry Olshansky via Digitalmars-d-announce
I never ever (I think) did something provocative, something to 
finally see:


- who in the community WANTS D language to succeed?

- who are just these funny “people” let’s call th this, that are 
I don’t know “just hang around”


Because shame is a weapon much like fear (of death esp), pride 
can be used as weapon but ehm better shame the bastard...


And so on.

So - until we all understand that these donations are not because 
we are begging fir money.


I will send ~ 10$ each day _specifically_ to see who WANTS D TO 
SUCCED and WILL NOT BE SHAMED LIKE THAT FOR ONCE!


It is because it’s (soon) your last chance to invest into the 
Future.


P.S. I mean what you think the future of native code is??? Rust? 
Crystal?? Nim???




Re: D community's view on syntactic sugar

2018-06-19 Thread Dmitry Olshansky via Digitalmars-d

On Tuesday, 19 June 2018 at 13:39:51 UTC, 12345swordy wrote:
On Tuesday, 19 June 2018 at 07:14:11 UTC, Dmitry Olshansky 
wrote:




To hell with that!
I have actually seen and worked (not directly) on code **cking 
does make async stack traces tolerable (google for causal 
stack traces, Dart).


Again sorry to hurt your feelings but unless I see deep 
technical good reason to go for async, I’ll die fighting 
against it. Let’s bot cargocult for once, especially 
considering the interplay with just about any bloody language 
feature to get “shugar”.


P.S. Damn, it really pusses me off. No offence was meant.

—
Dmitry Olshansky


Yesh. To me, it sounds like you had to work with a bunch of bad 
programmers rather than the faults with async.


Not a single thing I said had to do with people except me 
describing how JS (probably) came to intriduce async.


To put specifically: no my argument is completly orthogonal to 
that. I hope you can see it after a while.




Alexander





Re: D community's view on syntactic sugar

2018-06-19 Thread Dmitry Olshansky via Digitalmars-d

On Monday, 18 June 2018 at 20:54:22 UTC, aberba wrote:
On Saturday, 16 June 2018 at 08:39:07 UTC, Dmitry Olshansky 
wrote:

On Friday, 15 June 2018 at 23:04:40 UTC, Sjoerd Nijboer wrote:
For someone coming from a C# background there is some 
seemingly simple syntactic sugar missing from D.




T* he `async` & `await` keyword from C# make proactor pattern 
async code extremely easy to reason about.


God please no. Look at Go’s popularity because of dead simple 
go routines and “async i/o is transparent and looks blocking 
but ain’t so”. We have at least vibe.d for that and possibly 
more. Also see Java doing fibers recently, and Kotlin did them 
just a year or so back. People love fibers and mostly dislike 
Futers/explicit async, and plain callbacks are obvious last 
resort that nobody likes.


async/await make asynchronous code in C# and JavaScript look 
clean and easy to wrap ones head around it. Solution to aka. 
callback hell. If popularity is what you're looking at, it 
JavaScript not Go. And async/await is all over the place...it 
more that a syntactic sugar, it a pattern.


I look at popularity but I prefer crutical thinking.

Nothing beats simple non-async code in understamdability save for 
declarative stuff or no code. Really no code is best but 
obviously not always an option.


So why async in JS?
That is because it’s their last choice to make things at least 
_look_ better.


To give you a picture of how JS got to async you have to 
understand that they started (and still in many ways are) as


Practically all of today’s JS execution environments are single 
threaded process with integrated eventloop for events such as 
timers and clicks.


They introduced APIs back in 199x that used callbacks 
exclusively. Then people constructed Futures (Deferred etc.) on 
top.
But it’s a JavaScript (popular, just like you said) so it has to 
make it more builtin and simple. Because *some* (many) would 
think that say jQuery Deffered is slow, you’d better use plain 
callbacks. All of that stupidity sqaured is a day in day out talk 
in JS world, because well popularity.


So being wise they decided to not destroy the excecution model 
(but extend with workers, which are isolated process btw) but 
cheaply extend it with syntax shugar.


And they succeeded because now you come and say that’s basically 
the best thing to do.


It is not though, and I believe I’ve seen enough to act against 
it. I use Scala everyday, and there Futures and Monads all the 
way down in I/O, and no it’s not simpler nor faster model. It’s 
okayish but that’s about it.


Compared to proper scheduler with integrated eventloop:

async is not fast - same as futures, could use a bit less RAM per 
connection etc., but same or worse speed (and if you need say.. 
stacktrace;))


async is not convenient because it splits functions into “red” 
and “green”, and you can mix them anymore



async is best effort attempt to make imperatice programmers write 
future-based, monadic code (essentially). It was great success in 
that, but no, please let’s pick the better model (in general, 
ofc, special needs are special).







‘async’ is viral keywords that poorly scales, I worked on Dart 
core team and even they admitted this problem is not solved 
well.



Doesn't scales for what?

Try C# or JavaScript and experience the true power of 
async/await.


Oh kid. I tried all of that and more. Like 4 years ago. Pardon 
for my temper but no I know what I’m talking about and it’s not 
“I tried it for a week and now I see async is nice”.


To hell with that!
I have actually seen and worked (not directly) on code **cking 
does make async stack traces tolerable (google for causal stack 
traces, Dart).


Again sorry to hurt your feelings but unless I see deep technical 
good reason to go for async, I’ll die fighting against it. Let’s 
bot cargocult for once, especially considering the interplay with 
just about any bloody language feature to get “shugar”.


P.S. Damn, it really pusses me off. No offence was meant.

—
Dmitry Olshansky




Re: iopipe v0.1.0 - now with Windows support!

2018-06-18 Thread Dmitry Olshansky via Digitalmars-d-announce

On Sunday, 17 June 2018 at 04:52:07 UTC, Martin Nowak wrote:

On 06/10/2018 10:10 PM, Steven Schveighoffer wrote:
Note that the new io library also supports sockets, which 
IODev did not have support for, AND has a pluggable driver 
system, so you could potentially use fiber-based async io 
without rebuilding. It just makes a lot of sense for D to have 
a standard low-level io library that everything can use 
without having to kludge together multiple types of io 
libraries.


Note that the WIP std.io library is fully @nogc @safe, so it's 
a bit
edgy on using latest features. Soon want to move to use 
DIP10008 instead

of preallocated exceptions.


This is very encouraging. I’d like to see it working well with 
Photon (though my time is very limited atm). Any thoughts on what 
set of syscalls I need to support?


Maybe I could just provide my own “native” driver that fits your 
concept of I/O driver in io library.


With that and @nogc in the Driver interface¹ it's still to be 
seen

whether we can adapt this well with vibe.d or need to adjust the
low-level design.

-Martin

¹: https://martinnowak.github.io/io/std/io/driver/Driver.html





Re: D community's view on syntactic sugar

2018-06-16 Thread Dmitry Olshansky via Digitalmars-d

On Friday, 15 June 2018 at 23:04:40 UTC, Sjoerd Nijboer wrote:
For someone coming from a C# background there is some seemingly 
simple syntactic sugar missing from D.




First of all, it’s not missing but deliberately not added for 
many reason, which I’m sure other folks from core team will 
provide and correct me where applicable.



* The null conditional operator `?.`


Might be interesting but we need to try more principled approach 
alng the line of Option!T type with nice accessors and maybe even 
make non-null a default. The latter will take not a single year 
though. But peppering language with more built-in magic is not 
our direction, I’m pretty certain of that.



* Something like a `yield return` statement for coroutines.


That was on the radar actually, and would encode stackless 
automation wrapped as InputRange. Problem is how to get it to be 
say forward range (i.e. state saving would really be nice to 
include). For stackfull we have std.concurrency.Generator in 
library code just fine (IIRC).


T* he `async` & `await` keyword from C# make proactor pattern 
async code extremely easy to reason about.


God please no. Look at Go’s popularity because of dead simple go 
routines and “async i/o is transparent and looks blocking but 
ain’t so”. We have at least vibe.d for that and possibly more. 
Also see Java doing fibers recently, and Kotlin did them just a 
year or so back. People love fibers and mostly dislike 
Futers/explicit async, and plain callbacks are obvious last 
resort that nobody likes.


‘async’ is viral keywords that poorly scales, I worked on Dart 
core team and even they admitted this problem is not solved well.



* a good syntax for properties so there's less code bloat.
* replacing `Allocator.make()` with `new!Allocator`. After all 
`new` can be concidered as just a wrapper around the standard 
GC allocator. Why can't we just have a special template of it?


Is  a good idea, but syntactic sugar is smallest part of this 
problem if at all.




I have realized that I have become quite dependant on syntactic 
sugar to the point that it severely impacts my productivity 
when I work whitout. And these ones are my biggest obstacles 
when I try to work with D from a C# experience.


Yeah it won’t be smooth then I could see.

I think that C# really nailed down some of these particular 
examples except the last one of course.
And I also think D could do a better job of embracing 
productivity through supporting syntax of common tasks and 
borrow from other languages in that regard.


But the most important question is how other people feel about 
that.
If people hate syntactic sugar D will never become that gem for 
me that I would like it to be. But if key people want it, it 
one day might.





Re: GitHub could be acquired by Microsoft

2018-06-03 Thread Dmitry Olshansky via Digitalmars-d-announce

On Monday, 4 June 2018 at 03:51:15 UTC, Anton Fediushin wrote:
This is still just a rumour, we'll know the truth on Monday 
(which is today).


Some articles about the topic:

https://fossbytes.com/microsoft-github-aquisition-report/
https://www.theverge.com/2018/6/3/17422752/microsoft-github-acquisition-rumors

What's your opinion about that? Will you continue using GitHub?


Well, MS already contributes big time to many open-source 
projects, including Git.

I do not see immanent  problem with them buying it.



Both GitLab and Bitbucket can be used instead to host your D 
projects - dub registry supported them for a while now.


Both are fine, though Gitlab seems more sexy now.

IMHO Microsoft isn't the type of company I want to see behind 
the GitHub. Maybe I am wrong since Microsoft has both money and 
programmers to improve it further, I just don't trust them too 
much which is the right thing to do when dealing with companies.


Would you trust Google? Me, I’m not.
In fact if we were to place trust, comercial IT companies would 
be pretty down on my list of “trust” in any case.


This means that I will move my repositories elsewhere and use 
GitHub just to contribute to other projects.





Re: Nice code.dlang.org

2018-06-02 Thread Dmitry Olshansky via Digitalmars-d

On Saturday, 2 June 2018 at 21:13:59 UTC, Bastiaan Veelo wrote:
I don't know since when https://code.dlang.org/ looks the way 
it does, with the top most popular, most recently updated and 
most recently added packages on the front page, but I like it a 
lot!


Very nice!


I believe that was part of D hackaton on D Conf 2018. At least 
Seb and folks presented it at the end of day.


P.S. It’s a shame you couldn’t come this time, it was a blast! 
And better code.dlang.org is just one of gems.





Re: stride in slices

2018-06-02 Thread Dmitry Olshansky via Digitalmars-d

On Saturday, 2 June 2018 at 18:49:51 UTC, DigitalDesigns wrote:

Proposal:

[a..b;m]

m is the stride, if ; is not a good char then |, :, !, or # 
could be good chars.


Ranges work for this and don’t need special syntax. Just saying.



Re: Remember the Vasa! by Bjarne Stroustrup

2018-05-28 Thread Dmitry Olshansky via Digitalmars-d

On Tuesday, 29 May 2018 at 04:41:33 UTC, Komplex wrote:

On Tuesday, 29 May 2018 at 03:56:05 UTC, Dmitry Olshansky wrote:


It seems C++ is following the road of PL/I, which is growing 
language way beyond the point anyone can understand or 
implement all of it.


but that happened to the linux kernel too, long ago?


Not really.
First - Linux (for the scale) is architectured wuite well.
Second - language are way more composable and complex beasts then 
systems. I bet I can understand most of Linux kernel in a couple 
of years (w/o drivers and arch specifics beyond x86). Abstraction 
and components/interfaces is time-proven technique that actually 
works for the most part.


 In contradt I will likely never understand or have a good 
picture of C++20 as a (semi-)coherent whole, not that I really 
wanted to.


D is probably at the edge of what I can tollerate 
complexity-wise. And we’ll get to simplify a few things soon I 
believe.


and yet...it's everywhere..and increasingly so...



It has evolved a lot. Yet I believe we can get better things done 
w/o years upon years of churn. But that’s just a point of view.


we need to move away from this concept that we need to 
understand it all, or otherwise.. it must be bad.





Re: Remember the Vasa! by Bjarne Stroustrup

2018-05-28 Thread Dmitry Olshansky via Digitalmars-d

On Tuesday, 29 May 2018 at 01:46:47 UTC, Walter Bright wrote:

A cautionary tale we should all keep in mind.

http://open-std.org/JTC1/SC22/WG21/docs/papers/2018/p0977r0.pdf

https://www.reddit.com/r/programming/comments/8mq10v/bjarne_stroustroup_remeber_the_vasa_critique_of/

https://news.ycombinator.com/item?id=17172057


It seems C++ is following the road of PL/I, which is growing 
language way beyond the point anyone can understand or implement 
all of it.


Re: SecureD Futures (v2.0)

2018-05-27 Thread Dmitry Olshansky via Digitalmars-d

On Sunday, 27 May 2018 at 10:27:45 UTC, Adam Wilson wrote:
Now that SecureD v1 is in the books I thought it would be 
worthwhile to explore what a second version could like. I 
specifically want to focus on expanding compatibility with 
other systems.


[...]



No, it’s not. Look at IOpipe and no further it provides the exact 
abstraction that works for any form buffered I/O doing stream 
processing at top speeds. I’m doing IOpipe regex, it looks to be 
just what the doctor ordered.


 But that means pulling in Vibe.D for a simple cryptography 
library. At this point that doesn't seem like the right idea. 
If someone is willing to step-up and do the work I'd be willing 
to look at it, but for now I want to wait on this, preferably 
for a standard/generic streams interface to be made available.


[...]




Re: Looks like Digital Mars C++ is on the front page of HN at the moment!

2018-05-22 Thread Dmitry Olshansky via Digitalmars-d-announce

On Wednesday, 23 May 2018 at 01:18:43 UTC, Walter Bright wrote:


DigitalMars C/C++ Compiler (github.com)
56 points by tomcam 3 hours ago | unvote | flag | hide | 10 
comments


Yay! Any thoughts about opening runtime library?



https://news.ycombinator.com/news


And it’s beyond 100+ now. Also I see that you have quite a 
reputation in compilers ;)





Re: A pattern I'd like to see more of - Parsing template parameter tuples

2018-05-20 Thread Dmitry Olshansky via Digitalmars-d

On Monday, 21 May 2018 at 01:53:20 UTC, Manu wrote:
I don't really like that SomeObject() will be instantiated a 
crap load of times for every possible combination and order of 
options that a user might want to supply. How do you control 
the bloat in a way that people won't mess up frequently?


Just sort types by .stringof in a thin forwarding template, we 
have sort in std.meta now.




On 20 May 2018 at 17:58, Neia Neutuladh via Digitalmars-d 
 wrote:

[...]




Re: Of possible interest: fast UTF8 validation

2018-05-17 Thread Dmitry Olshansky via Digitalmars-d

On Thursday, 17 May 2018 at 17:16:03 UTC, Walter Bright wrote:

On 5/16/2018 10:01 PM, Joakim wrote:
Unicode was a standardization of all the existing code pages 
and then added these new transfer formats, but I have long 
thought that they'd have been better off going with a 
header-based format that kept most languages in a single-byte 
scheme, as they mostly were except for obviously the Asian CJK 
languages. That way, you optimize for the common string, ie 
one that contains a single language or at least no CJK, rather 
than pessimizing every non-ASCII language by doubling its 
character width, as UTF-8 does. This UTF-8 issue is one of the 
first topics I raised in this forum, but as you noted at the 
time nobody agreed and I don't want to dredge that all up 
again.


It sounds like the main issue is that a header based encoding 
would take less size?


If that's correct, then I hypothesize that adding an LZW 
compression layer would achieve the same or better result.


Indeed, and some other compression/deduplication options that 
would allow limited random access / slicing (by decoding a single 
“block” to access an element for instance).


Anything that depends on external information and is not 
self-sync is awful for interchange. Internally the application 
can do some smarts though, but even then things like interning 
(partial interning) might be more valuable approach. TCP being 
reliable just plain doesn’t cut it. Corruption of single bit is 
very real.




Re: Of possible interest: fast UTF8 validation

2018-05-16 Thread Dmitry Olshansky via Digitalmars-d

On Wednesday, 16 May 2018 at 15:48:09 UTC, Joakim wrote:
On Wednesday, 16 May 2018 at 11:18:54 UTC, Andrei Alexandrescu 
wrote:

https://www.reddit.com/r/programming/comments/8js69n/validating_utf8_strings_using_as_little_as_07/


Sigh, this reminds me of the old quote about people spending a 
bunch of time making more efficient what shouldn't be done at 
all.


Validating UTF-8 is super common, most text protocols and files 
these days would use it, other would have an option to do so.


I’d like our validateUtf to be fast, since right now we do 
validation every time we decode string. And THAT is slow. Trying 
to not validate on decode means most things should be validated 
on input...






Re: Why is 64-bit dmd not built as part of the Windows release?

2018-05-15 Thread Dmitry Olshansky via Digitalmars-d

On Tuesday, 15 May 2018 at 16:01:28 UTC, Atila Neves wrote:
I don't know why even bother with 32-bit dmd to begin with, but 
at least there should be an option.


[...]


Far as I know VS project shoukd build x64 version just fine with 
MS C++ compiler. Used to be that way a couple years ago.



As it turns out, trying to build dmd yourself from the released 
tag and replacing the .exe from the installer by the one you 
created works, unless:


[...]




Re: LDC 1.10.0 beta

2018-05-14 Thread Dmitry Olshansky via Digitalmars-d-announce

On Sunday, 13 May 2018 at 18:12:51 UTC, kinke wrote:

Hi everyone,

on behalf of the LDC team, I'm glad to announce the first beta 
for LDC 1.10. The highlights of this version in a nutshell:


* Based on D 2.080.0.
* Supports DragonFly BSD.
* Some fixes, most notably wrt. exception stack traces on Linux.


Fantastic!
And the time flies, wasn’t it 1.4 just recently? ;)



Full release log and downloads: 
https://github.com/ldc-developers/ldc/releases/tag/v1.10.0-beta1


Thanks to all contributors!





Re: iopipe v0.0.4 - RingBuffers!

2018-05-12 Thread Dmitry Olshansky via Digitalmars-d-announce

On Saturday, 12 May 2018 at 14:48:58 UTC, Joakim wrote:
On Saturday, 12 May 2018 at 12:45:16 UTC, Dmitry Olshansky 
wrote:
On Saturday, 12 May 2018 at 12:14:28 UTC, Steven Schveighoffer 
wrote:

[...]


I could offer a few tricks to fix that w/o getting too dirty. 
GNU grep is fast, but std.regex is faster then that in raw 
speed on a significant class of quite common patterns. But I 
loaded file at once.



[...]


As such initiative goes it’s either now or never. Please get 
in touch directly over Slack or smth, let’s make it roll. I 
wanted to do grep-like utility since 2012. Now at long last we 
have all the building blocks.


If you're talking about writing a grep prototype in D, that's a 
great idea, especially for publicizing D. :)


For shaming others to beat us using some other language. Making 
life better for everyone. Taking a DMD to a gun fight ;)





Re: iopipe v0.0.4 - RingBuffers!

2018-05-12 Thread Dmitry Olshansky via Digitalmars-d-announce
On Saturday, 12 May 2018 at 12:14:28 UTC, Steven Schveighoffer 
wrote:

On 5/11/18 5:42 PM, Joakim wrote:
On Friday, 11 May 2018 at 16:07:26 UTC, Steven Schveighoffer 
wrote:

[...]


What stops you from downloading a linux release from here?

https://github.com/ldc-developers/ldc/releases


So I did that, it's not much faster, a few milliseconds. Still 
about half as fast as GNU grep.


But I am not expecting any miracles here. GNU grep does pretty 
much everything it can to achieve performance -- including 
eschewing the standard library buffering system as I am doing. 
I can probably match the performance at some point, but I doubt 
it's worth worrying about. It's still really really fast 
without trying to do anything crazy.




I could offer a few tricks to fix that w/o getting too dirty. GNU 
grep is fast, but std.regex is faster then that in raw speed on a 
significant class of quite common patterns. But I loaded file at 
once.


I hope at some point, however, to work with Dmitry to add 
iopipe-based regex engine so we can see how much better we can 
make regex.


As such initiative goes it’s either now or never. Please get in 
touch directly over Slack or smth, let’s make it roll. I wanted 
to do grep-like utility since 2012. Now at long last we have all 
the building blocks.




-Steve




Re: iopipe v0.0.4 - RingBuffers!

2018-05-11 Thread Dmitry Olshansky via Digitalmars-d-announce
On Friday, 11 May 2018 at 13:28:58 UTC, Steven Schveighoffer 
wrote:

On 5/11/18 1:30 AM, Dmitry Olshansky wrote:
On Thursday, 10 May 2018 at 23:22:02 UTC, Steven Schveighoffer 
wrote:
OK, so at dconf I spoke with a few very smart guys about how 
I can use mmap to make a zero-copy buffer. And I implemented 
this on the plane ride home.


However, I am struggling to find a use case for this that 
showcases why you would want to use it. While it does work, 
and works beautifully, it doesn't show any measurable 
difference vs. the array allocated buffer that copies data 
when it needs to extend.


I’d start with something clinicaly synthetic.
Say your record size is exactly half of buffer + 1 byte. If 
you were to extend the size of buffer, it would amortize.


Hm.. this wouldn't work, because the idea is to keep some of 
the buffer full. What will happen here is that the buffer will 
extend to be able to accomodate the extra byte, and then you 
are back to having less of the buffer full at once. Iopipe is 
not afraid to increase the buffer :)


Then you cannot test it in such way.





Basically:
16 Mb buffer fixed
vs
16 Mb mmap-ed ring

Where you read pieces in 8M+1 blocks.Yes, we are aiming to 
blow the CPU cache there. Otherwise CPU cache is so fast that 
ocasional copy is zilch, once we hit primary memory it’s not. 
Adjust sizes for your CPU.


This isn't how it will work. The system looks at the buffer and 
says "oh, I can just read 8MB - 1 byte," which gives you 2 
bytes less than you need. Then you need the extra 2 bytes, so 
it will increase the buffer to hold at least 2 records.


I do get the point of having to go outside the cache. I'll look 
and see if maybe specifying a 1000 line context helps ;)


Nope. Consider reading binary records where you know length in 
advance and skip over it w/o need to touch every byte. There it 
might help. If you touch every byte and do something the cost of 
copying the tail is zilch.


One example is net string which is:

13,Hello, world!

Basically length in ascii digits ‘,’ followed by tgat much UTF-8 
codeunits.

No decoding nessary.

Torrent files use that I think, maybe other files. Is a nice 
example that avoids scans to find delimiters.




Update: nope, still pretty much the same.

The amount of work done per byte though has to be minimal to 
actually see anything.


Right, this is another part of the problem -- if copying is so 
rare compared to the other operations, then the difference is 
going to be lost in the noise.


What I have learned here is:

1. Ring buffers are really cool (I still love how it works) and 
perform as well as normal buffers


This is also good. Normal ring buffers usually suck  in speed 
department.



2. The use cases are much smaller than I thought
3. In most real-world applications, they are a wash, and not 
worth the OS tricks needed to use it.
4. iopipe makes testing with a different kind of buffer really 
easy, which was one of my original goals. So I'm glad that 
works!


I'm going to (obviously) leave them there, hoping that someone 
finds a good use case, but I can say that my extreme excitement 
at getting it to work was depressed quite a bit when I found it 
didn't really gain much in terms of performance for the use 
cases I have been doing.
Should be mostly trivial in fact. I mean our first designs for 
IOpipe is where I wanted regex to work with it.


Basically - if we started a match, extend window until we get 
it or lose it. Then release up to the next point of potential 
start.


I'm thinking it's even simpler than that. All matches are dead 
on a line break (it's how grep normally works), so you simply 
have to parse the lines and run each one via regex. What I 
don't know is how much it costs regex to startup and run on an 
individual line.


It is malloc/free/addRange/removeRange for each call. I optimized 
2.080 to reuse last recently used engine w/o these costs but I’ll 
have to check if it covers all cases.




One thing I could do to amortize is keep 2N lines in the 
buffer, and run the regex on a whole context's worth of lines, 
then dump them all.


I believe integrating iopipe awareness it in regex will easily 
make it 50% faster. A guestimate though.




I don't get why grep is so bad at this, since it is supposedly


grep on Mac is a piece of sheat, sadly and I don’t know why 
exactly (too old?). Use some 3-rd party thing like ‘sift’ written 
in Go.




-Steve




Re: iopipe v0.0.4 - RingBuffers!

2018-05-11 Thread Dmitry Olshansky via Digitalmars-d-announce

On Friday, 11 May 2018 at 09:55:10 UTC, Kagamin wrote:
On Thursday, 10 May 2018 at 23:22:02 UTC, Steven Schveighoffer 
wrote:
However, I am struggling to find a use case for this that 
showcases why you would want to use it. While it does work, 
and works beautifully, it doesn't show any measurable 
difference vs. the array allocated buffer that copies data 
when it needs to extend.


Depends on OS and hardware. I would expect mmap implementation 
to be slower as it reads file in chunks of 4kb and relies on 
page faults.


It doesn’t. Instead it has a buffer mmaped twice side by side. 
Therefore you can avoid copy at the end when it wraps around.


Otherwise it’s the same buffering as usual.



Re: iopipe v0.0.4 - RingBuffers!

2018-05-10 Thread Dmitry Olshansky via Digitalmars-d-announce
On Thursday, 10 May 2018 at 23:22:02 UTC, Steven Schveighoffer 
wrote:
OK, so at dconf I spoke with a few very smart guys about how I 
can use mmap to make a zero-copy buffer. And I implemented this 
on the plane ride home.


However, I am struggling to find a use case for this that 
showcases why you would want to use it. While it does work, and 
works beautifully, it doesn't show any measurable difference 
vs. the array allocated buffer that copies data when it needs 
to extend.


I’d start with something clinicaly synthetic.
Say your record size is exactly half of buffer + 1 byte. If you 
were to extend the size of buffer, it would amortize.


Basically:
16 Mb buffer fixed
vs
16 Mb mmap-ed ring

Where you read pieces in 8M+1 blocks.Yes, we are aiming to blow 
the CPU cache there. Otherwise CPU cache is so fast that 
ocasional copy is zilch, once we hit primary memory it’s not. 
Adjust sizes for your CPU.


The amount of work done per byte though has to be minimal to 
actually see anything.





in the buffer. But alas, it's roughly the same, even with large 
number of lines for context (like 200).


However, this example *does* show the power of iopipe -- it 
handles all flavors of unicode with one template function, is 
quite straightforward (though I want to abstract the line 
tracking code, that stuff is really tricky to get right). Oh, 
and it's roughly 10x faster than grep, and a bunch faster than 
fgrep, at least on my machine ;) I'm tempted to add regex 
processing to see if it still beats grep.


Should be mostly trivial in fact. I mean our first designs for 
IOpipe is where I wanted regex to work with it.


Basically - if we started a match, extend window until we get it 
or lose it. Then release up to the next point of potential start.




Next up (when my bug fix for dmd is merged, see 
https://issues.dlang.org/show_bug.cgi?id=17968) I will be 
migrating iopipe to depend on 
https://github.com/MartinNowak/io, which should unlock Windows 
support (and I will add RingBuffer Windows support at that 
point).


Enjoy!

https://github.com/schveiguy/iopipe
https://code.dlang.org/packages/iopipe
http://schveiguy.github.io/iopipe/

-Steve





Re: D GPU execution module: A survey of requirements.

2018-05-10 Thread Dmitry Olshansky via Digitalmars-d

On Thursday, 10 May 2018 at 00:10:07 UTC, H Paterson wrote:

On Wednesday, 9 May 2018 at 23:37:14 UTC, Henry Gouk wrote:

On Wednesday, 9 May 2018 at 23:26:19 UTC, H Paterson wrote:

Hello,

I'm interested in writing a module for executing D code on 
GPUs. I'd like to bounce some ideas off D community members 
to see what this module needs do.


[...]


Check out https://github.com/libmir/dcompute


Welp... It's not quite what I would have envisioned, but seems 
to fill the role.


With most heavy lifting done (SPIRV backend, things like that) 
you can join and contribute your vision.


Last time I looked it was way better then plain OpenCL and 
friends but still had a long way to improve on the initial idea 
IMHO. That was 1 year ago though.




Thanks for pointing Dcompute out to me - I only found it 
mentioned in a dead link on the D wiki.


Please, please, fix it! Or post the page here at the very least.


Time to find a new project...





Re: D GPU execution module: A survey of requirements.

2018-05-09 Thread Dmitry Olshansky via Digitalmars-d

On Wednesday, 9 May 2018 at 23:26:19 UTC, H Paterson wrote:

Hello,

I'm interested in writing a module for executing D code on 
GPUs. I'd like to bounce some ideas off D community members to 
see what this module needs do.



What about DCompute project?



[...]




Re: Why The D Style constants are written in camelCase?

2018-05-09 Thread Dmitry Olshansky via Digitalmars-d-learn

On Wednesday, 9 May 2018 at 09:38:14 UTC, BoQsc wrote:
The D Style suggest to camelCase constants, while Java naming 
conventions always promoted uppercase letter.


Is there an explanation why D Style chose to use camelCase 
instead of all UPPERCASE for constants, was there any technical 
problem that would appear while writing in all UPPERCASE?


It is D style for standard library. It is mostly arbitrary but in 
general sensible.

That’s it.





Re: Wait-free MPSC and MPMC implement in D

2018-05-08 Thread Dmitry Olshansky via Digitalmars-d

On Tuesday, 8 May 2018 at 04:00:03 UTC, manumaster wrote:

Is there some implement like this in D ?

https://github.com/pramalhe/ConcurrencyFreaks/blob/master/papers/multilist-2017.pdf


Look for Mecca by Wekka.io team.  It has great idustry-grade 
lock-free implementations for both. Not very flexible but these 
things usually are.


Can’t comment on wait-free property (source doesn’t claim it and 
I haven’t looked close enough to prove either way).


https://github.com/weka-io/mecca



Re: serialport v1.0.0

2018-05-07 Thread Dmitry Olshansky via Digitalmars-d-announce

On Sunday, 6 May 2018 at 22:02:05 UTC, Oleg B wrote:

Stable version of serialport package

* Blocking `SerialPortBlk` for classic usage

* Non-blocking `SerialPortNonBlk` and `SerialPortFR` for usage 
in fibers or in vibe-d


These 3 versions of the same API is precisely the reason for me 
starting the Photon project.


Otherwise - great to see serial ports library and I'd be glad to 
one day test it for compatibility with my approach.




* Variative initialization and configuration

* Hardware flow control config flag

Doc: http://serialport.dpldocs.info/v1.0.0/serialport.html
Dub: http://code.dlang.org/packages/serialport
Git: https://github.com/deviator/serialport





Re: std.regex horribly broken in 2.080?

2018-05-04 Thread Dmitry Olshansky via Digitalmars-d

On Friday, 4 May 2018 at 14:33:09 UTC, Dmitry Olshansky wrote:

On Friday, 4 May 2018 at 11:39:18 UTC, WebFreak wrote:
I am currently working on workspace-d/serve-d but I am 
continously running into segfaults with std.regex ctRegex with 
the captures in dub and dscanner. I can't provide any other 
information really because my internet is dead right now. This 
issue is happening all the time there, yet I can't reproduce 
it. Can someone with internet maybe check where that issue 
might come from?


I think I see the code where the trace comes from. Might take a 
shot at hackathon.




I could take a look. Any chance to have the exact reproduction 
steps?


By the look of it something is wrong with Captures struct being 
destroyed twice or something. Could also be compiler issue.


Another thing is to disable inlining and I could at least see 
detailed stack trace.




[...]





Re: std.regex horribly broken in 2.080?

2018-05-04 Thread Dmitry Olshansky via Digitalmars-d

On Friday, 4 May 2018 at 11:39:18 UTC, WebFreak wrote:
I am currently working on workspace-d/serve-d but I am 
continously running into segfaults with std.regex ctRegex with 
the captures in dub and dscanner. I can't provide any other 
information really because my internet is dead right now. This 
issue is happening all the time there, yet I can't reproduce 
it. Can someone with internet maybe check where that issue 
might come from?


I could take a look. Any chance to have the exact reproduction 
steps?


By the look of it something is wrong with Captures struct being 
destroyed twice or something. Could also be compiler issue.


Another thing is to disable inlining and I could at least see 
detailed stack trace.




[...]




Re: Profiling with LDC

2018-04-26 Thread Dmitry Olshansky via Digitalmars-d

On Wednesday, 25 April 2018 at 17:31:06 UTC, H. S. Teoh wrote:
I'm trying to figure out how to do a traditional instrumented 
profile with LDC.  All docs that I've managed to find so far 
say to use -fprofile-instr-generate, but when I try that, I get 
a ton of linker errors complaining of undefined reference to 
the symbol:


__llvm_profile_instrument_target

What gives?  I'm guessing I need to specify some additional 
LLVM libraries for this?


I’d suggest perf if you are on Linux. It also tracks kernel-land 
calls if you have permissions.


Just compile with debug symbols and run:

perf record -g ./app ...
perf report

Works for both DMD and LDC. It is sampling, so might not be 
accurate for short lived stuff.




I'm using the official Debian ldc package, btw.  Is there 
possibly a missing dependency on some llvm libraries?



T





  1   2   3   4   5   6   7   8   >