Re: in dub single file build how to pass "-J" options?

2022-12-21 Thread rikki cattermole via Digitalmars-d-learn
stringImportPaths

Re: text based file formats

2022-12-18 Thread rikki cattermole via Digitalmars-d-announce
On 19/12/2022 4:56 AM, Robert Schadek wrote: > * xml, there is some code already, the old std.experimental.xml code I've toyed with std.experimental.xml. I'm not convinced that it is a good code base for inclusion. * no return by ref As a bit of a follow up of what we were talking about on

Re: Beerconf for dconf online 2022

2022-12-16 Thread rikki cattermole via Digitalmars-d-announce
Hope everyone got your brews ready! I for one, have some nice cold iced water, in 29 degree temperatures you must stay hydrated! https://meet.jit.si/Dlang2022DConfOnline

Re: Beerconf for dconf online 2022

2022-12-16 Thread rikki cattermole via Digitalmars-d-announce
On 16/12/2022 1:53 AM, rikki cattermole wrote: Reminder this is happening tomorrow! In ~24 hours Will be posting in about an hour. Get your brews if you haven't already!

Re: DConf Online '22 this weekend! Videos are up!

2022-12-15 Thread rikki cattermole via Digitalmars-d-announce
Here is a mailto link that'll setup an email ready to go! mailto:q...@dlang.org?subject=PersonToAsk=Question%0D%0A%0D%0A--%20YourName%20anonymous%3F%0D%0A%0D%0AI%20want%20a%20prize!

Re: Beerconf for dconf online 2022

2022-12-15 Thread rikki cattermole via Digitalmars-d-announce
Reminder this is happening tomorrow! In ~24 hours

Re: How to compiler dlang code on Apple M1?

2022-12-13 Thread rikki cattermole via Digitalmars-d-learn
Which ldc did you install? Was it: ldc2-1.30.0-osx-arm64.tar.xz

Re: Idiomatic D using GC as a library writer

2022-12-04 Thread rikki cattermole via Digitalmars-d-learn
ALl it means is certain memory patterns (such as writes), will tell the GC about it. Its required for pretty much all advanced GC designs, as a result we are pretty much maxing out what we can do. Worth reading:

Re: Why can't D store all UTF-8 code units in char type? (not really understanding explanation)

2022-12-02 Thread rikki cattermole via Digitalmars-d-learn
On 03/12/2022 11:32 AM, Ali Çehreli wrote: On 12/2/22 13:44, rikki cattermole wrote: > Yeah you're right, its code unit not code point. This proves yet again how badly chosen those names are. I must look it up every time before using one or the other. So they are both "co

Re: Why can't D store all UTF-8 code units in char type? (not really understanding explanation)

2022-12-02 Thread rikki cattermole via Digitalmars-d-learn
On 03/12/2022 10:35 AM, Adam D Ruppe wrote: On Friday, 2 December 2022 at 21:26:40 UTC, rikki cattermole wrote: char is always UTF-8 codepoint and therefore exactly 1 byte. wchar is always UTF-16 codepoint and therefore exactly 2 bytes. dchar is always UTF-32 codepoint and therefore exactly 4

Re: Why can't D store all UTF-8 code units in char type? (not really understanding explanation)

2022-12-02 Thread rikki cattermole via Digitalmars-d-learn
char is always UTF-8 codepoint and therefore exactly 1 byte. wchar is always UTF-16 codepoint and therefore exactly 2 bytes. dchar is always UTF-32 codepoint and therefore exactly 4 bytes; 'Ğ' has the value U+011E which is a lot larger than what 1 byte can hold. You need 2 chars or 1

Re: How do you print all Unicode characters in a range - I want the subscripts, can't google a range of Unicode.

2022-12-01 Thread rikki cattermole via Digitalmars-d-learn
The output will be bad because of Windows specific behavior related to not outputting as UTF-16. This will print all the characters in the block "Superscripts and Subscripts". The Unicode database is very out of date (just waiting for merge for update), but should be ok for this example.

Re: Thinking about the difference between fixed and 'dynamic' arrays.

2022-11-29 Thread rikki cattermole via Digitalmars-d-learn
Okay you have misunderstand a lot here. We have two types of arrays: - Static, fixed sized stored on stack. - Dynamic, variable sized, stored on the heap. However dynamic arrays are not actually a distinct type in the type system, its a language extension to use runtime hooks using the GC.

Re: Beerconf Noveber 2022 -- Turkey edition

2022-11-26 Thread rikki cattermole via Digitalmars-d-announce
https://meet.jit.si/Dlang2022NovemberBeerConf

Re: Beerconf Noveber 2022 -- Turkey edition

2022-11-26 Thread rikki cattermole via Digitalmars-d-announce
~T-3 hours Time to go acquire your favorite brews if you haven't already!

Re: D + Qt + QtDesigner

2022-11-23 Thread rikki cattermole via Digitalmars-d-announce
Don't forget about UI automation too! That's a key feature people always seem to forget... (unless you require it).

Re: Beerconf Noveber 2022 -- Turkey edition

2022-11-17 Thread rikki cattermole via Digitalmars-d-announce
On 18/11/2022 2:16 PM, Ethan Watson wrote: On Saturday, 12 November 2022 at 21:51:38 UTC, Steven Schveighoffer wrote: # BEERCONF! Reminding myself to remember this for a change. Don't worry, you won't miss it this time! I'll bug you everywhere I can when I (or someone else) put the link up

Re: Is defining get/set methods for every field overkill?

2022-11-16 Thread rikki cattermole via Digitalmars-d-learn
I wouldn't bother. They are const, they can't change. Nothing to protect, nothing to synchronize.

Re: Release D 2.101.0

2022-11-15 Thread rikki cattermole via Digitalmars-d-announce
On 16/11/2022 2:13 PM, torhu wrote: On Tuesday, 15 November 2022 at 20:54:03 UTC, Iain Buclaw wrote: Glad to announce D 2.101.0, ♥ to the 63 contributors. For some reason my project build fails with this version, but only the x86 release build. Only tried it on Windows. This is the error,

Re: Actual lifetime of static array slices?

2022-11-14 Thread rikki cattermole via Digitalmars-d-learn
On 15/11/2022 5:10 PM, Elfstone wrote: I just checked the DIP list and #1000 is marked superseded. Any idea what supersedes it? The implementation.

Re: Call for action: Easily improve D's ecosystem - DUB documentation improvements

2022-11-14 Thread rikki cattermole via Digitalmars-d-announce
I've filled in some details about shared libraries wrt. plugins the issue for it. Will need compiler specific information CC: Walter, Martin, Iain. Still massive shame that dmd is still a write off for Windows support when using D from D. Wahoo export + ModuleInfo + DLLs. Oh and don't

Re: Drawing a line code

2022-11-07 Thread rikki cattermole via Digitalmars-d-learn
On 07/11/2022 10:29 PM, Joel wrote: Ok, this is working: I'm glad to hear it! Pathing algorithms can be quite fun to mess around with.

Re: Drawing a line code

2022-11-06 Thread rikki cattermole via Digitalmars-d-learn
On 07/11/2022 5:48 AM, Joel wrote: The algorithm is too hard for me to work out and dg2d doesn't help either. I want my code fixed up so that works from any two points. Its not as complex as that page initially looks. ``` plotLine(x0, y0, x1, y1) dx = abs(x1 - x0) sx = x0 < x1 ? 1 :

Re: Linking not working properly Windows 11

2022-11-05 Thread rikki cattermole via Digitalmars-d-learn
I've looked up three of those names, they are all deprecated. I'm wondering if Microsoft have removed them.

Re: Linking not working properly Windows 11

2022-11-05 Thread rikki cattermole via Digitalmars-d-learn
Try ldc, if that works then its just a missing library that needs to be linked against regarding MS CRT.

Re: Makefiles and dub

2022-11-05 Thread rikki cattermole via Digitalmars-d-learn
On 06/11/2022 1:16 AM, Imperatorn wrote: On Saturday, 5 November 2022 at 11:38:09 UTC, rikki cattermole wrote: We have a few build formats that dub can generate for you automatically: ``` visuald - VisualD project files sublimetext - SublimeText project file cmake - CMake build scripts build

Re: Makefiles and dub

2022-11-05 Thread rikki cattermole via Digitalmars-d-learn
We have a few build formats that dub can generate for you automatically: ``` visuald - VisualD project files sublimetext - SublimeText project file cmake - CMake build scripts build - Builds the package directly ``` Unfortunately none of them are make, it would be nice to have that if you are

Re: Unit testing a function returning void

2022-11-03 Thread rikki cattermole via Digitalmars-d-learn
You could redirect stdout to a file of your choosing and test against that. Although ideally you would instead take as an argument to print some sort of output range or Appender. Then you could test against that instead.

Re: Make IN Dlang

2022-11-01 Thread rikki cattermole via Digitalmars-d-learn
Something to consider: dub can be used as a library. You can add your own logic in main to allow using your build specification to generate a dub file (either in memory or in file system).

Re: Beerconf October 2022

2022-11-01 Thread rikki cattermole via Digitalmars-d-announce
On 02/11/2022 4:05 AM, Mike Parker wrote: On Tuesday, 1 November 2022 at 11:54:45 UTC, data pulverizer wrote: It might just be my browser (Chrome) but I've noticed that there's nothing in the events calendar (https://dlang.org/calendar.html). Wouldn't it be helpful to include these sorts of

Re: Beerconf October 2022

2022-10-29 Thread rikki cattermole via Digitalmars-d-announce
And now for some good news! Its almost Halloween, so grab your candy and any spooky brews you may have, and join us for a ghostly chat! https://meet.jit.si/Dlang2022OctoberBeerConf

Re: Replacing tango.text.Ascii.isearch

2022-10-28 Thread rikki cattermole via Digitalmars-d-learn
On 29/10/2022 11:05 AM, Siarhei Siamashka wrote: And as for the D language and Phobos, should "ß" still uppercase to "SS"? Or can we change it to uppercase "ẞ" and remove German from the list of tricky languages at https://dlang.org/library/std/uni/to_upper.html ? Should Turkish be listed

Re: Importing modules under DUB on Windows

2022-10-28 Thread rikki cattermole via Digitalmars-d-learn
On 29/10/2022 4:15 AM, DLearner wrote: However, going forward, I don't want copies of OM anywhere other than UD. If you want your own private library on your system (that will get used a lot), you can create a package and use ``$ dub add-local .`` to add it to the available packages for

Re: Importing modules under DUB on Windows

2022-10-27 Thread rikki cattermole via Digitalmars-d-learn
On 28/10/2022 5:40 AM, DLearner wrote: Maybe fewer people use it under Windows, so Windows constructs don't get exercised so much. I have actively contributed to dub specifically for Windows in the last year :) There is enough of us. Also UNC paths (those with drives and then the slash)

Re: Replacing tango.text.Ascii.isearch

2022-10-26 Thread rikki cattermole via Digitalmars-d-learn
On 26/10/2022 6:49 PM, Siarhei Siamashka wrote: On Wednesday, 26 October 2022 at 05:17:06 UTC, rikki cattermole wrote: if you are able to ignore that Unicode is a thing, I'd recommend it. It is complicated, as we humans are very complicated ;) I can't ignore Unicode, because I frequently have

Re: Replacing tango.text.Ascii.isearch

2022-10-25 Thread rikki cattermole via Digitalmars-d-learn
On 26/10/2022 6:06 PM, Siarhei Siamashka wrote: Should we ignore the `"D should strive to be correct, rather than fast"` comment from bauss for now? Or some actions can be taken to improve the current situation? Bauss is correct. It should be implemented but it does not need to be fast. But

Re: Replacing tango.text.Ascii.isearch

2022-10-25 Thread rikki cattermole via Digitalmars-d-learn
On 25/10/2022 5:17 PM, Siarhei Siamashka wrote: Wow, I didn't expect anything like this and just thought that the nightmares of handling 8-bit codepages for non-English languages ceased to exist nowadays. Too bad. What are the best practices to deal with Turkish text in D language? std.uni

Re: Supporting foreach (k, v; T.init) for a user-defined (container) type

2022-10-24 Thread rikki cattermole via Digitalmars-d-learn
From there down: https://dlang.org/spec/statement.html#foreach_over_struct_and_classes

Re: How to use dub with ldc

2022-10-22 Thread rikki cattermole via Digitalmars-d-learn
If you only have one compiler available, dub will use it (doesn't matter if its dmd/ldc/gdc). rdmd is a tool that wraps dmd/ldc/gdc. https://github.com/dlang/tools/blob/master/rdmd.d If you only have ldc in your PATH variable, rdmd just "just work".

Re: Can someone tell me what the compiler thought I was trying to do?

2022-10-18 Thread rikki cattermole via Digitalmars-d-learn
On 19/10/2022 2:30 PM, H. S. Teoh wrote: On Wed, Oct 19, 2022 at 01:15:37AM +, Adam D Ruppe via Digitalmars-d-learn wrote: On Wednesday, 19 October 2022 at 00:57:31 UTC, H. S. Teoh wrote: Has it really been implemented? I tested the latest git master, the following code doesn't compile:

Re: Can someone tell me what the compiler thought I was trying to do?

2022-10-18 Thread rikki cattermole via Digitalmars-d-learn
https://github.com/dlang/dmd/blob/master/druntime/src/core/attribute.d#L292

Re: Find out what type my class is being converted to for comparisons

2022-10-18 Thread rikki cattermole via Digitalmars-d-learn
Well its not a type system issue. Making u = n, that'll returns true. So the problem almost certainly lies with IEEE-754. They are horrible to compare (float/double). Unfortunately you are stuck calling functions like isClose to compare.

Re: library to solve the system of linear equations

2022-10-17 Thread rikki cattermole via Digitalmars-d-learn
On 18/10/2022 9:37 AM, mw wrote: Maybe Mir should add static check for supported complier versions, rather than let user try and error. Dub has dependency checks for compiler/dub in it. It doesn't need to be in code.

Re: D Language Foundation Meeting September 2022 Monthly Meeting Summary

2022-10-17 Thread rikki cattermole via Digitalmars-d-announce
On 18/10/2022 3:10 AM, Mike Parker wrote: ### Iain Over the preceding month, Iain had little going on with D due to a personal situation. Most of the work he'd done had been on the infrastructure project and not on the compiler. He noted that I had migrated the dlang.org and dlang.io DNS

Re: Is it possible? branching on debug info

2022-10-16 Thread rikki cattermole via Digitalmars-d-learn
There is: D_Optimized https://dlang.org/spec/version.html#predefined-versions But nothing for debug info. I'm afraid I think you'll just have to use a version (unless you want to add it).

Re: How do I correctly install packages for use with Visual Studio?

2022-10-16 Thread rikki cattermole via Digitalmars-d-learn
On 17/10/2022 12:09 AM, Decabytes wrote: I'm trying to set up Visual Studio 2022 with Visual D, and I'm running into issues trying to get my project to build correctly. It's a double whammy because I've never used Visual Studio before (Just an Emacs Guy), but I need to debug my D programming

Re: Replacing tango.text.Ascii.isearch

2022-10-13 Thread rikki cattermole via Digitalmars-d-learn
On 13/10/2022 9:55 PM, bauss wrote: Yeah, text isn't easy :D Indeed! It has me a bit concerned actually, I'm wondering if my string stuff will even work correctly for UI's due to performance issues. My string builder for instance allocates like crazy just to do slicing. But hey, at least

Re: Replacing tango.text.Ascii.isearch

2022-10-13 Thread rikki cattermole via Digitalmars-d-learn
On 13/10/2022 9:42 PM, bauss wrote: Oh and to add onto this, IFF you have to do it the hacky way, then converting to uppercase instead of lowercase should be preferred, because not all lowercase characters can perform round trip, although a small group of characters, then using uppercase fixes

Re: Replacing tango.text.Ascii.isearch

2022-10-13 Thread rikki cattermole via Digitalmars-d-learn
On 13/10/2022 9:27 PM, bauss wrote: This doesn't actually work properly in all languages. It will probably work in most, but it's not entirely correct. Ex. Turkish will not work with it properly. Very interesting article: http://www.moserware.com/2008/02/does-your-code-pass-turkey-test.html

Re: Visual D doesn't work, now Visual Studio Code / D doesn't work!!!! ....

2022-10-02 Thread rikki cattermole via Digitalmars-d-learn
Visual Studio with its c++ components can debug D code, it should not require Visual D to do so. Open executable as project. If this does not work, you have a serious issue in your system/VS install. This may help to narrow down what is going on.

Re: Is there a way to mark a dub package as linux only?

2022-09-27 Thread rikki cattermole via Digitalmars-d-learn
On 28/09/2022 7:18 AM, Alain De Vos wrote: Don't forget there is also BSD Should already be supported. Platform specific settings are supported through the use of field name suffixes. Suffixes are dash separated list of operating system/architecture/compiler identifiers, as defined in the D

Re: Is there a way to mark a dub package as linux only?

2022-09-27 Thread rikki cattermole via Digitalmars-d-learn
Alternatively we could just extend platforms to work in places other than configurations. https://dub.pm/package-format-json.html#configuration-settings

Re: Detect uninitialized class var access

2022-09-26 Thread rikki cattermole via Digitalmars-d-learn
Currently in D you would be forced to create a vtable struct manually. But if we had something like signatures you could do this: ```d struct Foo { //... } struct Bar { InputRange input; } void doIt() { Bar bar; Foo* foo = new Foo; bar.input = foo; }

Re: Beerconf September 2022

2022-09-24 Thread rikki cattermole via Digitalmars-d-announce
Linkity link: https://meet.jit.si/Dlang2022SeptemberBeerConf

Re: Is this a new bug ?

2022-09-24 Thread rikki cattermole via Digitalmars-d-learn
```d version(all) { __gshared: uint test2; } uint test; ``` Output with -vtls: ``` Up to 2.079.1: Success with output: onlineapp.d(9): test is thread local Since 2.080.1: Success with output: onlineapp.d(9): `test` is thread local ``` Looks fine to me.

Re: Meanwhile on the audio front

2022-09-22 Thread rikki cattermole via Digitalmars-d-announce
Very nice and exciting! Congrats everyone.

Re: dub lint

2022-09-15 Thread rikki cattermole via Digitalmars-d-learn
https://github.com/dlang/dub/issues/2483

Re: Introducing alid

2022-09-14 Thread rikki cattermole via Digitalmars-d-announce
On 14/09/2022 8:44 PM, Ali Çehreli wrote: On 9/12/22 09:34, rikki cattermole wrote: > dub.json > errornogc/alid/errornogc.d > circularblocks/alid/circularblocks.d Considering I may want to let the users import the entire package as well with   import alid; how can I achiev

Re: Introducing alid

2022-09-13 Thread rikki cattermole via Digitalmars-d-announce
On 14/09/2022 2:48 PM, Salih Dincer wrote: I'm far from making a solid recommendation.  Immutable with const still doesn't make sense to me.  I claim we can live without them. Immutable confuses me a lot. I think we should take control by creating our own types.  D Language should be

Re: Introducing alid

2022-09-12 Thread rikki cattermole via Digitalmars-d-announce
On 13/09/2022 4:25 AM, Ali Çehreli wrote: On 9/12/22 07:43, rikki cattermole wrote: Looks pretty well tested, nice! Thanks! Proud with 100% coverage. :) I was going to ask about coverage, that is awesome! But in other less nice things, I take it you did not test with GDC? GDC does

Re: Introducing alid

2022-09-12 Thread rikki cattermole via Digitalmars-d-announce
Looks pretty well tested, nice! But in other less nice things, I take it you did not test with GDC? GDC does not support cli args with the same names as dmd. One of these is -mv. The file structure of subPackage/alid/subPackage will not require it and you will not have the cross import

Re: OpenXR library bindings etc

2022-09-09 Thread rikki cattermole via Digitalmars-d-learn
Apart from not linking against OpenXR, I'm not seeing anything obviously wrong in that binding.

Re: Error "Unexpected '\n' when converting from type LockingTextReader to type int"

2022-09-07 Thread rikki cattermole via Digitalmars-d-learn
On 08/09/2022 11:24 AM, Synopsis wrote: On Wednesday, 7 September 2022 at 23:06:44 UTC, rikki cattermole wrote: Text in buffer: "123\n" Read: "123" Text in buffer: "\n" Read: exception, expecting number for "\n" Changing your readf format specifier to

Re: Error "Unexpected '\n' when converting from type LockingTextReader to type int"

2022-09-07 Thread rikki cattermole via Digitalmars-d-learn
Text in buffer: "123\n" Read: "123" Text in buffer: "\n" Read: exception, expecting number for "\n" Changing your readf format specifier to include the new line should work. https://dlang.org/phobos/std_stdio.html#.File.readf

Re: Reference to an unresolved external symbol

2022-09-07 Thread rikki cattermole via Digitalmars-d-learn
On 07/09/2022 10:14 PM, Injeckt wrote: On Wednesday, 7 September 2022 at 10:01:11 UTC, rikki cattermole wrote: You have probably forgotten to link against user32. I guess you right. But I don't know how i gonna link libs when I'm using "dmd main.d". Tell me please.

Re: Reference to an unresolved external symbol

2022-09-07 Thread rikki cattermole via Digitalmars-d-learn
You have probably forgotten to link against user32.

Re: How to link a msvcr120.dll in an inverse recursive way after a Windows .exe binary deployment

2022-09-04 Thread rikki cattermole via Digitalmars-d-learn
I've been reading up fairly recently on RPATH for *nix which does what you want. Unfortunately as far as I've found there is no way to do this on Windows without an extra executable.

Re: Best practice for dub registry package and module names

2022-09-03 Thread rikki cattermole via Digitalmars-d-learn
I cannot recommend looking at how Adam has done it. I've been trying to get him to change it since he originally did it. It has known issues and yes it will still pull in all modules thanks to -I behavior except you get fun things like linker errors. Keep in mind, you are trying to

Re: Best practice for dub registry package and module names

2022-09-03 Thread rikki cattermole via Digitalmars-d-learn
Yeah you're over thinking this. It is a single dub package with a namespacing package directory.

Re: Best practice for dub registry package and module names

2022-09-03 Thread rikki cattermole via Digitalmars-d-learn
This slightly smells, single module dub packages. What does each module do?

Re: Constructors not working

2022-09-02 Thread rikki cattermole via Digitalmars-d-learn
I think you are wanting opAssign not opBinary. Also you made a mistake, since its a struct you don't want to new it when you construct and return it. ```d return new Time(secos / 3600, (secos % 3600) / 60, secos % 60); ``` Would be a ``Time*`` not ``Time`` which is what you returned.

Re: Disk write in a "for" loop with RwMutex never happens

2022-08-29 Thread rikki cattermole via Digitalmars-d-learn
On 30/08/2022 8:16 AM, Gavin Ray wrote: It must have been the "writing at end of file" bit? I don't know. It read like it should work. The offsets were correct, it just didn't work *shrug*.

Re: Disk write in a "for" loop with RwMutex never happens

2022-08-29 Thread rikki cattermole via Digitalmars-d-learn
After a bunch of playing around I managed to determine that it is as simple as the mode. exists(dbFileName) ? "r+" : "w+" Will fix it. Of course you shouldn't delete the file like that method is doing. It should probably reinitialize the FILE* descriptor.

Re: SAOC 2022 Projects

2022-08-29 Thread rikki cattermole via Digitalmars-d-announce
On 29/08/2022 11:46 PM, Mike Parker wrote: ### Lucian Danescu Lucian gave [his first DConf talk this year](https://youtu.be/ksNGwLTe0Ps?t=21650) on the subject of integrating DMD as a library with D-Scanner. And that's the project that he submitted, and that the judges accepted, for SAOC.

Re: Beerconf August 2022

2022-08-27 Thread rikki cattermole via Digitalmars-d-announce
Its live! https://meet.jit.si/Dlang2022AugustBeerConf

Re: How to build DMD/Phobos on Windows

2022-08-24 Thread rikki cattermole via Digitalmars-d-learn
For dmd you use build.d that is in the repository. 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. Beyond that idk, but its starting point (oh and druntime is now in dmd repo, so ugh...

Re: Programs in D are huge

2022-08-18 Thread rikki cattermole via Digitalmars-d-learn
On 19/08/2022 4:56 AM, IGotD- wrote: BetterC means no arrays or strings library and usually in terminal tools you need to process text. Full D is wonderful for such task but betterC would be limited unless you want to write your own array and string functionality. Unicode support in Full D

Re: my d blog has idea of effect system to replace @nogc etc

2022-08-16 Thread rikki cattermole via Digitalmars-d-announce
On 17/08/2022 3:05 AM, Guillaume Piolat wrote: On Tuesday, 16 August 2022 at 15:01:05 UTC, rikki cattermole wrote: But one key difference is it is designed to work with the GC even if it is -betterC @nogc @safe nothrow. How do you do that? Via dub's injectSourceFiles (that I added

Re: my d blog has idea of effect system to replace @nogc etc

2022-08-16 Thread rikki cattermole via Digitalmars-d-announce
And I'm building another. Allocators already working, tons of Unicode stuff implemented. Working on string builders atm. But one key difference is it is designed to work with the GC even if it is -betterC @nogc @safe nothrow.

Re: New WIP DUB documentation

2022-08-15 Thread rikki cattermole via Digitalmars-d-announce
It is pretty awesome, a lot easier to digest and get into!

Re: My programs issues

2022-08-10 Thread rikki cattermole via Digitalmars-d-learn
On 11/08/2022 12:36 AM, pascal111 wrote: 2) I used "goto", I heard from someone before that using "goto" isn't good programming feature. This is mostly a historical debate at this point. Back 40 years ago, goto wasn't typically limited within a procedure and doesn't have any checks in

Re: dirEntries() does not do source files *.d

2022-08-09 Thread rikki cattermole via Digitalmars-d-learn
Its working for me. lpha@DESKTOP-RB97SA4 [/cygdrive/p/ProjectSidero/basic_memory/source/sidero/base/text/unicode$ rdmd --eval=$'import std; writeln(dirEntries(`.`, `*.d`, SpanMode.shallow));' [".\\casefold.d", ".\\casing.d", ".\\comparison.d", ".\\composing.d", ".\\defs.d",

Re: Giving up

2022-08-06 Thread rikki cattermole via Digitalmars-d-announce
On 07/08/2022 10:45 AM, Walter Bright wrote: On 8/6/2022 1:29 PM, Timon Gehr wrote: Seems you should just use a long double/real literal? real x = 0x1p-16383L; // (works) Looks like that settles it. (Why didn't I notice that? Sheesh!) Needs a better error message.

Re: DConf 2022 pre+watch party!

2022-08-01 Thread rikki cattermole via Digitalmars-d-announce
Iain ended up creating a Jitsi room: https://meet.jit.si/Dconf2022OnlineBeerConf

Re: DConf 2022 pre+watch party!

2022-07-31 Thread rikki cattermole via Digitalmars-d-announce
On 01/08/2022 1:04 AM, Iain Buclaw wrote: How did this work out? :-) It has been low turn out so far, but since everything has had low amount of chatter that isn't too surprising. Shall we start a jitsi meet-up? I'm waiting to hear about the IRL beerconf, see if somebody will join in

Re: Obsecure problem 1

2022-07-30 Thread rikki cattermole via Digitalmars-d-learn
It is a pretty straight forward. You tried to access memory out of bounds of the slice. https://github.com/pascal111-fra/D/blob/main/dcollect.d#L34 That for loop is problematic in a number of ways. You should not use int, or uint to index into memory, only size_t should be used. It is an

Re: "strtok" D equivalent

2022-07-28 Thread rikki cattermole via Digitalmars-d-learn
I don't know of a D version, although it should be pretty easy to write up yourself. But you can always use strtok itself. https://github.com/dlang/dmd/blob/09d04945bdbc0cba36f7bb1e19d5bd009d4b0ff2/druntime/src/core/stdc/string.d#L97 Very similar to example given on the docs: ```d void

DConf 2022 pre+watch party!

2022-07-28 Thread Rikki Cattermole via Digitalmars-d-announce
Hello everyone! It is back, DConf IRL. To celebrate we will have a bit of a pre-party over in the Discord voice channel, as well as a bit of a watch party going on during the conference live streams. We may switch over to Jitsi later on depending on how the IRL BeerConf goes and if someone

Re: "string" data type with readln

2022-07-25 Thread rikki cattermole via Digitalmars-d-learn
The version of readln you are using is[0]. This works by taking in a buffer of memory to write out, and returns how many codepoints were stored. Because you are not reusing memory, not using this form you can of course use string[1] instead, rather than ``char[]``. ```d string s =

Re: please help me to reverse a function call order

2022-07-23 Thread rikki cattermole via Digitalmars-d-learn
A bit more d-ified and uses foreach + foreach_reverse without allocating an array. ```d import std.stdio; void main() { doRepetition(4, 3); writeln("=="); doRepetitionReversed(4, 3); } void doRepetition(const int n, const int m) { // combination total number is m,

Re: Beerconf July 2022

2022-07-15 Thread rikki cattermole via Digitalmars-d-announce
I've been getting a few pings about setting this up, so here it is: https://meet.jit.si/Dlang2022JulyBeerConf No password.

Re: Druntime merged into dmd repo

2022-07-09 Thread rikki cattermole via Digitalmars-d-announce
Very well done! I do hope this isn't the end, because things like bindings really shouldn't be in the dmd repository.

Re: The D Programming Language Vision Document

2022-07-05 Thread rikki cattermole via Digitalmars-d-announce
On 05/07/2022 11:49 PM, ryuukk_ wrote: Hopefully that includes proper built in Tagged Union, non OOP people need that otherwise we are stuck in C's era of programming C's era of programming also happens to coincide with ML which had tagged unions ;) The C family has never been very

Re: The D Programming Language Vision Document

2022-07-04 Thread rikki cattermole via Digitalmars-d-announce
On 04/07/2022 7:39 PM, Ola Fosheim Grøstad wrote: Yes, that is a common one that is maintained, but maybe there are BOOST licensed implementations too? One can do an exhaustive test for say two-character normalization against ICU to see if they are compliant.

Re: The D Programming Language Vision Document

2022-07-03 Thread rikki cattermole via Digitalmars-d-announce
On 04/07/2022 5:30 PM, Andrej Mitrovic wrote: Aren't these the polar opposites of each other? The GC is one of D's strengths, yet we should avoid it as much as possible in the standard library. Not necessarily. It could and should most likely mean that it won't do any heap allocations.

Re: The D Programming Language Vision Document

2022-07-03 Thread rikki cattermole via Digitalmars-d-announce
We have a perfectly good Unicode handling library already. (Okay, little out of date and doesn't handle Turkic stuff, but fixable). The standard one is called ICU. Anyway, we are straying from my original point, that limiting ourselves to the string alias and not supporting wstring or dstring

Re: The D Programming Language Vision Document

2022-07-03 Thread rikki cattermole via Digitalmars-d-announce
On 04/07/2022 8:16 AM, Ola Fosheim Grøstad wrote: On Sunday, 3 July 2022 at 19:32:56 UTC, rikki cattermole wrote: It is required for string equivalent comparisons (which is what you should be doing in a LOT more cases! Anything user provided when compared should be normalized first. Well, I

Re: The D Programming Language Vision Document

2022-07-03 Thread rikki cattermole via Digitalmars-d-announce
On 04/07/2022 7:18 AM, Ola Fosheim Grøstad wrote: I hardly ever use anything outside UTF-8, and if I do then I use a well tested unicode library as it has to be correct and up to date to be useful. The utility of going beyond UTF-8 seems to be limited:

Re: The D Programming Language Vision Document

2022-07-03 Thread rikki cattermole via Digitalmars-d-announce
On 04/07/2022 6:10 AM, Ola Fosheim Grøstad wrote: People who are willing to use 4 bytes per code point are probably using third party C-libraries that have their own representation, so you have to convert anyway? If you use Unicode and follow their recommendations, you are going to be

Re: The D Programming Language Vision Document

2022-07-03 Thread rikki cattermole via Digitalmars-d-announce
> Stronger integration with other languages One of the things I judge D's compilers by is how well they can build a shared library. This is crucial for a lot of different applications of D and can be an complete stopper in using D if it doesn't "just work". To be blunt this is

  1   2   3   4   5   6   7   8   9   10   >