extend pragma(msg) with writing to file

TheGag96 thegag96 at gmail.com
Sat Oct 8 23:53:56 UTC 2022


On Saturday, 8 October 2022 at 07:33:42 UTC, Araq wrote:
> Fwiw Nim supports that since about a decade now... It's of 
> course harder to be excited about something that already 
> actually exists and works. ;-)

Wow - I've kept my eye on Nim a bit over the years, but I didn't 
realize that it already does do things like reading files at 
compile-time out of the box. Very cool. However, there are some 
limitations still:

```nim
import std/httpclient

proc doCrazyStuff(): string =
   var client = newHttpClient()
   let content = 
client.getContent("https://forum.dlang.org/thread/ijvehaanfbuhywaziqns@forum.dlang.org")
   echo content

const stuff = doCrazyStuff()
```

```
/usr/lib/nim/pure/httpclient.nim(335, 12) Error: cannot evaluate 
at compile time: defaultSslContext
```

Jai should already be capable of this, seeing as how it can load 
a window, play sounds, etc. Hopefully competition ramps up in 
this area. :o)


More information about the Digitalmars-d mailing list