Re: Dconf - lightning talk: Excel add-ins in D
On Wednesday, 17 May 2017 at 21:17:37 UTC, jmh530 wrote: On Wednesday, 17 May 2017 at 20:58:05 UTC, Laeeth Isharc wrote: https://www.reddit.com/r/programming/comments/6brj2x/dconf_lighting_talk_excel_addins_in_d/?ref=share&ref_source=link (submitted to Hacker News - news.ycombinator.com too) The header says it's for the lightning talk on excel add-ins, but the link goes to Walter's talk. For me the link goes to the lightning talk, but Reddit displays inline Walter's talk. Strange.
Re: DMD now has colorized syntax highlighting in error messages
On Tuesday, 16 May 2017 at 14:17:41 UTC, Adam D. Ruppe wrote: Similarly, what I want to see in the future is highlighting of specific parts of code where the error applies. Fear me. I combined Walter's code with my own to form some kind of Voltron! https://github.com/dlang/dmd/pull/6806
Re: Dconf - lightning talk: Excel add-ins in D
On Wednesday, 17 May 2017 at 20:58:05 UTC, Laeeth Isharc wrote: https://www.reddit.com/r/programming/comments/6brj2x/dconf_lighting_talk_excel_addins_in_d/?ref=share&ref_source=link (submitted to Hacker News - news.ycombinator.com too) The header says it's for the lightning talk on excel add-ins, but the link goes to Walter's talk.
Dconf - lightning talk: Excel add-ins in D
https://www.reddit.com/r/programming/comments/6brj2x/dconf_lighting_talk_excel_addins_in_d/?ref=share&ref_source=link (submitted to Hacker News - news.ycombinator.com too)
Re: llvm-d 2.2 Dynamic loading (yet again)
On Wednesday, 17 May 2017 at 14:55:12 UTC, Moritz Maxeiner wrote: In response to a DConf 2017 request regarding this, llvm-d again supports dynamic loading. The API is essentially the same as is was for llvm 1.x, though you have to enable it with D versions. [...] Many Thanks.
llvm-d 2.2 Dynamic loading (yet again)
In response to a DConf 2017 request regarding this, llvm-d again supports dynamic loading. The API is essentially the same as is was for llvm 1.x, though you have to enable it with D versions. - Single shared library only (e.g. libLLVM-X.Y.Z.so) - Switch from (dynamic/static) linking to dynamic loading by setting the D version LLVM_Load. - Use LLVM.load / LLVM.unload for manual control over which shared library to use - Additionally set D version LLVM_Autoload to try to load a platform appropriate default shared library for LLVM - As compile time introspection is used to generate function pointers dynamic loading has increased compilation time. Special thanks to everyone who provided feedback[1] on how to optimize the cost for the dynamic introspection https://github.com/Calrama/llvm-d/releases/v2.2.0 https://code.dlang.org/packages/llvm-d/2.2.0 - Moritz [1] http://forum.dlang.org/thread/fennfzjwzdlzcbtsj...@forum.dlang.org
dubmore: Support of local and remote archive dependencies
Hi, I want to share with you a little application I wrote. With the following application you can add local and remote archive dependencies to your dub configuration. /+ dub.json: { "name":"test" "dependencies":{ "sample1":{"path":"C:\\D\\projects\\test2\\sample1.zip", "sample2":{"url":"http://localhost:8080/sample2.zip"; }, } +/ void main() {} Place the dubmore executable into the same folder as dub and use dubmore instead of dub. Remarks: - Only json is supported - You need to have the console application unzip in your system path -- module dubmore; import std.file, std.path, std.exception, std.process, std.array, std.json, std.net.curl, std.experimental.logger, std.algorithm, std.getopt, std.string; void main(string[] args) { globalLogLevel = LogLevel.all; string dubFile; scope(exit) if (exists(dubFile~".old")) rename(dubFile~".old", dubFile); string[] dubArgs; string packagesFolder = buildPath(getcwd(), "packages"); if (args.canFind("--force") && exists(packagesFolder)) rmdirRecurse(packagesFolder); if (!exists(packagesFolder)) mkdir(packagesFolder); if (exists(buildPath(getcwd(), "dub.json"))) { dubFile = buildPath(getcwd(), "dub.json"); dubArgs = args[1..$]; auto jsRoot = parseJSON(readText(dubFile)); if (processJson(jsRoot, packagesFolder)) { copy(dubFile, dubFile~".old"); writeTextFile(dubFile, jsRoot.toString); } } else if (args.length > 1 && buildPath(getcwd(), args[1].stripExtension~".d").exists) { enum marker = "dub.json:"; dubFile = buildPath(getcwd(), args[1].stripExtension~".d"); dubArgs = dubFile~args[2..$]; string sourceCode = readText(dubFile); auto startPos = sourceCode.indexOf("/+"); auto markerPos = sourceCode.indexOf(marker); auto endPos = sourceCode.indexOf("+/"); if (startPos > -1 && markerPos > startPos && markerPos < endPos) { auto jsRoot = parseJSON(sourceCode[markerPos+marker.length..endPos]); if (processJson(jsRoot, packagesFolder)) { sourceCode = sourceCode[0..markerPos+marker.length]~" "~jsRoot.toString~" "~sourceCode[endPos..$]; copy(dubFile, dubFile~".old"); writeTextFile(dubFile, sourceCode); } } } import std.stdio: writeln; with (execute(["dub"]~dubArgs)) writeln(output); } private bool processJson(JSONValue jsRoot, string packagesFolder) { bool found = processDependencies(jsRoot, packagesFolder); if ("configurations" in jsRoot && jsRoot["configurations"].type == JSON_TYPE.ARRAY) found = jsRoot["configurations"].array.any!(jsConfig => processDependencies(jsConfig, packagesFolder)) || found; return found; } private bool processDependencies(JSONValue js, string packagesFolder) { bool result; if ("dependencies" in js && js["dependencies"].type == JSON_TYPE.OBJECT) { foreach(key; js["dependencies"].object.keys) { auto dep = js["dependencies"].object[key]; if (dep.type == JSON_TYPE.OBJECT && "url" in dep && dep["url"].type == JSON_TYPE.STRING) { string url = dep["url"].str; string fileName = url.split("/").array[$-1]; string destination = buildPath(packagesFolder, fileName); if (exists(destination)) { dep["path"] = buildPath(destination.dirName, destination.stripExtension); } else { try { dep["path"] = downloadAndExtract(url, destination); } catch(Exception e) { error(e.msg); continue; } } dep.object.remove("url"); result = true; } else if (dep.type == JSON_TYPE.OBJECT && "path" in dep && dep["path"].type == JSON_TYPE.STRING && dep["path"].str.toLower.endsWith(".zip")) { string filePath = dep["path"].str; string packageFolder = buildPath(packagesFolder, filePath.baseName.stripExten
Re: Harbored-mod 0.2.1 and DYaml 0.6.1 at dlang-community
On Tuesday, 16 May 2017 at 20:46:44 UTC, Basile B. wrote: Following Brian Schott Announce [1] about the migration of his projects to the dlang-community, I'm pleased to announce that the most popular repository from Ferdinand Majerech are now also hosted there. - D-YAML, a YAML parser and emitter for D (native D implementation) is at https://github.com/dlang-community/D-YAML - harbored-mod, a D documentation generator based on harbored is at https://github.com/dlang-community/harbored-mod So far we pushed the commits done in several forks and the two projects are up to date, tested by TravisCI, buildable with either make or DUB. Note about D-Yaml: People who forked D-Yaml for their projects are encouraged to push their change to dlang-community and give up their fork ! [1]: http://forum.dlang.org/post/abbprxuwgqlmuuwdf...@forum.dlang.org BTW, forgot to say: thanks to Ferdinand for giving the ownership to the organization and thanks to those who continued to maintain the forks, notably Sociomantic D developers for harbored-mod and ZombineDev for D-YAml.