digitalmars.D.announce - run.dlang.io - a modern way to run D code
- Seb (48/48) Dec 12 2017 After it has been in stealth mode for quite a while, I'm happy to
- rikki cattermole (4/31) Dec 12 2017 s/shorten/permalink/
- Seb (10/21) Dec 12 2017 While it would be rather easier to build more Docker images [1]
- bauss (7/29) Dec 12 2017 What you could do is support the 3 latest versions of the
- rikki cattermole (2/33) Dec 12 2017 Also the older c++ version (2.06x.x).
- Seb (16/52) Dec 12 2017 Shouldn't DMD be stable enough that latest is good enough for
- Jonathan M Davis (6/39) Dec 12 2017 What would be the point of that? That's old enough that no one should re...
- rikki cattermole (2/44) Dec 13 2017 One word, dmd.
- Jonathan M Davis (5/51) Dec 13 2017 wrote:
- rikki cattermole (5/59) Dec 13 2017 It is required to be compiled by (I think) 2.068.2 for bootstrapping
- Jonathan M Davis (12/75) Dec 13 2017 I don't see how that really has anything to do with a website that's use...
- David Nadlinger (6/8) Dec 13 2017 Shouldn't the overhead from that be fairly manageable? After all,
- Seb (23/31) Dec 13 2017 Yes, the docker images aren't too big:
- Mike Franklin (6/8) Dec 13 2017 Allow me to be the first.
- Jacob Carlborg (7/9) Dec 14 2017 There could be a job that cleans up the local Docker images. If a Docker...
- Nicholas Wilson (2/5) Dec 12 2017 Sweet! I will definitely use this for teaching.
- Meta (5/53) Dec 12 2017 This is a real life saver considering dpaste is blocked at work.
- H. S. Teoh (8/14) Dec 12 2017 Can't you just do:
- Meta (5/19) Dec 13 2017 This works for short snippets that are one-off but I usually like
- H. S. Teoh (20/39) Dec 13 2017 If you need to edit the code, you might as well use an editor anyway,
- H. S. Teoh (42/45) Dec 13 2017 [...]
- Ivan Kazmenko (3/8) Dec 14 2017 That sounds powerful!
- H. S. Teoh (12/21) Dec 15 2017 As of this morning, the PR has been merged into git master, and now this
- Seb (5/9) Dec 12 2017 Great to hear that it's useful for you!
- Mike Franklin (11/13) Dec 12 2017 I've actually been using it a lot recently to communicate
- Walter Bright (6/8) Dec 14 2017 Very impressive! Nice work!
- Radu (4/13) Dec 15 2017 You can use this one for nice assembly outputs
- Walter Bright (2/3) Dec 16 2017 That is indeed nice and very useful. It should do dmd, too!
- Iain Buclaw (3/7) Dec 16 2017 However dmd doesn't do assembly output. ;-)
- Walter Bright (3/4) Dec 17 2017 dmd -c test
- Seb (5/9) Dec 17 2017 FYI: There's http://asm.dlang.org which seems to be a bit
- Iain Buclaw (7/19) Dec 18 2017 I couldn't see any way to improve things. You get none of the nice
- Iain Buclaw (5/10) Dec 18 2017 Lacks any form of line number information to let you see clearly which
- Walter Bright (3/6) Dec 18 2017 This is incorrect (if you compile with debug info on).
- Seb (11/20) Jan 13 2018 FYI: run.dlang.io got a few small updates:
After it has been in stealth mode for quite a while, I'm happy to announce that there's https://run.dlang.io === Features === * Color-highlighted DMD errors * Format source code with dfmt * Generate a short URL for link sharing * Import/Export to GitHub Gist * Typical key shortcuts like CTRL+Enter -> Run * Build cache for fast execution of common examples (e.g. the ones on front page of dlang.org) * Usable on your phone * Integrated with dlang.org (you can open any example on dlang.org in run.dlang.io by clicking the right arrow button) * Integrated with tour.dlang.org (you can open any example on the DTour in run.dlang.io by clicking on the "Export" button) === Supported D Compilers === * Latest DMD nightly * Latest DMD beta * Latest DMD * Latest LDC beta * Latest LDC The Docker images are rebuilt every day automatically. === Running DUB packages === Via "Add library" DUB packages can be added to the build. Currently only a whitelist of packages is allowed. Examples: mir: https://run.dlang.io/is/FIc6rd mir-algorithm: https://run.dlang.io/is/3pNRH8 === DReg === When I watched CyberShadow's Bugzilla cruise [1] I spotted this amazing tool dreg [2] and it's not that hard to build a docker image [3] for it and make it available for everyone, s.t. no setup is required. Dreg allows running old versions of the D compiler in parallel and compares their output. However, it's a lot easier to show than to explain: https://run.dlang.io/is/ckNT9i https://run.dlang.io/is/UZhQDh Currently all versions from 2.060 up to the latest greatest 2.077.1 are run, so the execution will take a bit longer than a single run. [1] https://youtu.be/qpUTvMokTCs [2] https://github.com/CyberShadow/misc/blob/master/dreg.d [3] https://github.com/dlang-tour/core-dreg === Source code & report issues === Please don't hesitate to open issues or submit pull requests: -> https://github.com/dlang-tour/core (it uses Vibe.d)
Dec 12 2017
On 12/12/2017 6:37 PM, Seb wrote:After it has been in stealth mode for quite a while, I'm happy to announce that there's https://run.dlang.io === Features === * Color-highlighted DMD errors * Format source code with dfmt * Generate a short URL for link sharings/shorten/permalink/ Or something else more obvious.* Import/Export to GitHub Gist * Typical key shortcuts like CTRL+Enter -> Run * Build cache for fast execution of common examples (e.g. the ones on front page of dlang.org) * Usable on your phone * Integrated with dlang.org (you can open any example on dlang.org in run.dlang.io by clicking the right arrow button) * Integrated with tour.dlang.org (you can open any example on the DTour in run.dlang.io by clicking on the "Export" button) === Supported D Compilers === * Latest DMD nightly * Latest DMD beta * Latest DMD * Latest LDC beta * Latest LDC The Docker images are rebuilt every day automatically.Can we please select a version we want to test against?
Dec 12 2017
On Wednesday, 13 December 2017 at 00:32:11 UTC, rikki cattermole wrote:On 12/12/2017 6:37 PM, Seb wrote:While it would be rather easier to build more Docker images [1] and add them to the tour [2], I fear that this will be too much maintenance overhead and will lead to outdated compiler soon. Also the storage on the machine is limited and we can't drop an unlimited amount of Docker images there. [1] https://github.com/dlang-tour/core-exec [2] https://github.com/dlang-tour/core/blob/master/source/exec/docker.d#L22=== Supported D Compilers === * Latest DMD nightly * Latest DMD beta * Latest DMD * Latest LDC beta * Latest LDC The Docker images are rebuilt every day automatically.Can we please select a version we want to test against?
Dec 12 2017
On Wednesday, 13 December 2017 at 01:14:26 UTC, Seb wrote:On Wednesday, 13 December 2017 at 00:32:11 UTC, rikki cattermole wrote:What you could do is support the 3 latest versions of the compilers. Ex. for DMD you would support: 2.077.1 2.076.1 2.075.1On 12/12/2017 6:37 PM, Seb wrote:While it would be rather easier to build more Docker images [1] and add them to the tour [2], I fear that this will be too much maintenance overhead and will lead to outdated compiler soon. Also the storage on the machine is limited and we can't drop an unlimited amount of Docker images there. [1] https://github.com/dlang-tour/core-exec [2] https://github.com/dlang-tour/core/blob/master/source/exec/docker.d#L22=== Supported D Compilers === * Latest DMD nightly * Latest DMD beta * Latest DMD * Latest LDC beta * Latest LDC The Docker images are rebuilt every day automatically.Can we please select a version we want to test against?
Dec 12 2017
On 13/12/2017 6:46 AM, bauss wrote:On Wednesday, 13 December 2017 at 01:14:26 UTC, Seb wrote:Also the older c++ version (2.06x.x).On Wednesday, 13 December 2017 at 00:32:11 UTC, rikki cattermole wrote:What you could do is support the 3 latest versions of the compilers. Ex. for DMD you would support: 2.077.1 2.076.1 2.075.1On 12/12/2017 6:37 PM, Seb wrote:While it would be rather easier to build more Docker images [1] and add them to the tour [2], I fear that this will be too much maintenance overhead and will lead to outdated compiler soon. Also the storage on the machine is limited and we can't drop an unlimited amount of Docker images there. [1] https://github.com/dlang-tour/core-exec [2] https://github.com/dlang-tour/core/blob/master/source/exec/docker.d#L22=== Supported D Compilers === * Latest DMD nightly * Latest DMD beta * Latest DMD * Latest LDC beta * Latest LDC The Docker images are rebuilt every day automatically.Can we please select a version we want to test against?
Dec 12 2017
On Wednesday, 13 December 2017 at 06:53:02 UTC, rikki cattermole wrote:On 13/12/2017 6:46 AM, bauss wrote:Shouldn't DMD be stable enough that latest is good enough for everyone? As mentioned, I'm afraid that it will look similar like: http://asm.dlang.org And FWIW before I started updating Wikipedia and our DWiki even the versions there got outdated. Anyhow, everything is entirely automated, so if someone volunteers to make the update PRs to: - https://github.com/dlang-tour/core-exec/blob/master/.travis.yml - https://github.com/dlang-tour/core/blob/master/source/exec/docker.d#L22 - https://github.com/dlang-tour/core/blob/master/views/editor.dt#L27 I wouldn't mind.On Wednesday, 13 December 2017 at 01:14:26 UTC, Seb wrote:Also the older c++ version (2.06x.x).On Wednesday, 13 December 2017 at 00:32:11 UTC, rikki cattermole wrote:What you could do is support the 3 latest versions of the compilers. Ex. for DMD you would support: 2.077.1 2.076.1 2.075.1On 12/12/2017 6:37 PM, Seb wrote:While it would be rather easier to build more Docker images [1] and add them to the tour [2], I fear that this will be too much maintenance overhead and will lead to outdated compiler soon. Also the storage on the machine is limited and we can't drop an unlimited amount of Docker images there. [1] https://github.com/dlang-tour/core-exec [2] https://github.com/dlang-tour/core/blob/master/source/exec/docker.d#L22=== Supported D Compilers === * Latest DMD nightly * Latest DMD beta * Latest DMD * Latest LDC beta * Latest LDC The Docker images are rebuilt every day automatically.Can we please select a version we want to test against?
Dec 12 2017
On Wednesday, December 13, 2017 06:53:02 rikki cattermole via Digitalmars-d- announce wrote:On 13/12/2017 6:46 AM, bauss wrote:What would be the point of that? That's old enough that no one should really be using it. Targetting it just runs the risk of your code not working with a recent version of the compiler and standard library. - Jonathan M DavisOn Wednesday, 13 December 2017 at 01:14:26 UTC, Seb wrote:Also the older c++ version (2.06x.x).On Wednesday, 13 December 2017 at 00:32:11 UTC, rikki cattermole wrote:What you could do is support the 3 latest versions of the compilers. Ex. for DMD you would support: 2.077.1 2.076.1 2.075.1On 12/12/2017 6:37 PM, Seb wrote:While it would be rather easier to build more Docker images [1] and add them to the tour [2], I fear that this will be too much maintenance overhead and will lead to outdated compiler soon. Also the storage on the machine is limited and we can't drop an unlimited amount of Docker images there. [1] https://github.com/dlang-tour/core-exec [2] https://github.com/dlang-tour/core/blob/master/source/exec/docker.d#L22=== Supported D Compilers === * Latest DMD nightly * Latest DMD beta * Latest DMD * Latest LDC beta * Latest LDC The Docker images are rebuilt every day automatically.Can we please select a version we want to test against?
Dec 12 2017
On 13/12/2017 7:56 AM, Jonathan M Davis wrote:On Wednesday, December 13, 2017 06:53:02 rikki cattermole via Digitalmars-d- announce wrote:One word, dmd.On 13/12/2017 6:46 AM, bauss wrote:What would be the point of that? That's old enough that no one should really be using it. Targetting it just runs the risk of your code not working with a recent version of the compiler and standard library. - Jonathan M DavisOn Wednesday, 13 December 2017 at 01:14:26 UTC, Seb wrote:Also the older c++ version (2.06x.x).On Wednesday, 13 December 2017 at 00:32:11 UTC, rikki cattermole wrote:What you could do is support the 3 latest versions of the compilers. Ex. for DMD you would support: 2.077.1 2.076.1 2.075.1On 12/12/2017 6:37 PM, Seb wrote:While it would be rather easier to build more Docker images [1] and add them to the tour [2], I fear that this will be too much maintenance overhead and will lead to outdated compiler soon. Also the storage on the machine is limited and we can't drop an unlimited amount of Docker images there. [1] https://github.com/dlang-tour/core-exec [2] https://github.com/dlang-tour/core/blob/master/source/exec/docker.d#L22=== Supported D Compilers === * Latest DMD nightly * Latest DMD beta * Latest DMD * Latest LDC beta * Latest LDC The Docker images are rebuilt every day automatically.Can we please select a version we want to test against?
Dec 13 2017
On Wednesday, December 13, 2017 08:04:19 rikki cattermole via Digitalmars-d- announce wrote:On 13/12/2017 7:56 AM, Jonathan M Davis wrote:wrote:On Wednesday, December 13, 2017 06:53:02 rikki cattermole via Digitalmars-d-> announce wrote:On 13/12/2017 6:46 AM, bauss wrote:On Wednesday, 13 December 2017 at 01:14:26 UTC, Seb wrote:On Wednesday, 13 December 2017 at 00:32:11 UTC, rikki cattermoleWhat about it? - Jonathan M DavisOne word, dmd.What would be the point of that? That's old enough that no one should really be using it. Targetting it just runs the risk of your code not working with a recent version of the compiler and standard library. - Jonathan M DavisAlso the older c++ version (2.06x.x).What you could do is support the 3 latest versions of the compilers. Ex. for DMD you would support: 2.077.1 2.076.1 2.075.1On 12/12/2017 6:37 PM, Seb wrote:While it would be rather easier to build more Docker images [1] and add them to the tour [2], I fear that this will be too much maintenance overhead and will lead to outdated compiler soon. Also the storage on the machine is limited and we can't drop an unlimited amount of Docker images there. [1] https://github.com/dlang-tour/core-exec [2] https://github.com/dlang-tour/core/blob/master/source/exec/docker.d#L 22=== Supported D Compilers === * Latest DMD nightly * Latest DMD beta * Latest DMD * Latest LDC beta * Latest LDC The Docker images are rebuilt every day automatically.Can we please select a version we want to test against?
Dec 13 2017
On 13/12/2017 8:11 AM, Jonathan M Davis wrote:On Wednesday, December 13, 2017 08:04:19 rikki cattermole via Digitalmars-d- announce wrote:It is required to be compiled by (I think) 2.068.2 for bootstrapping purposes. So at the very least there is one code base in very active use by the D community using such an old version. Can't ignore it.On 13/12/2017 7:56 AM, Jonathan M Davis wrote:wrote:On Wednesday, December 13, 2017 06:53:02 rikki cattermole via Digitalmars-d-> announce wrote:On 13/12/2017 6:46 AM, bauss wrote:On Wednesday, 13 December 2017 at 01:14:26 UTC, Seb wrote:On Wednesday, 13 December 2017 at 00:32:11 UTC, rikki cattermoleWhat about it? - Jonathan M DavisOne word, dmd.What would be the point of that? That's old enough that no one should really be using it. Targetting it just runs the risk of your code not working with a recent version of the compiler and standard library. - Jonathan M DavisAlso the older c++ version (2.06x.x).What you could do is support the 3 latest versions of the compilers. Ex. for DMD you would support: 2.077.1 2.076.1 2.075.1On 12/12/2017 6:37 PM, Seb wrote:While it would be rather easier to build more Docker images [1] and add them to the tour [2], I fear that this will be too much maintenance overhead and will lead to outdated compiler soon. Also the storage on the machine is limited and we can't drop an unlimited amount of Docker images there. [1] https://github.com/dlang-tour/core-exec [2] https://github.com/dlang-tour/core/blob/master/source/exec/docker.d#L 22=== Supported D Compilers === * Latest DMD nightly * Latest DMD beta * Latest DMD * Latest LDC beta * Latest LDC The Docker images are rebuilt every day automatically.Can we please select a version we want to test against?
Dec 13 2017
On Wednesday, December 13, 2017 08:33:36 rikki cattermole via Digitalmars-d- announce wrote:On 13/12/2017 8:11 AM, Jonathan M Davis wrote:I don't see how that really has anything to do with a website that's used to test snippets of code, and the reality of the matter is that there's pretty much no way that dmd is going to continue to be compatible with that version of the language forever - especially with all of the stuff that Walter has been doing with scope. At some point, backwards compatibility will be sufficiently broken that dmd won't be able to compile with both 2.068.2 and the most recent version, meaning that bootstrapping will have to be done in more steps, or it will have to be done via cross-compiling. Regardless, it's not like anyone is going to be using run.dlang.io for building dmd. - Jonathan M DavisOn Wednesday, December 13, 2017 08:04:19 rikki cattermole via Digitalmars-d-> announce wrote:It is required to be compiled by (I think) 2.068.2 for bootstrapping purposes. So at the very least there is one code base in very active use by the D community using such an old version. Can't ignore it.On 13/12/2017 7:56 AM, Jonathan M Davis wrote:wrote:On Wednesday, December 13, 2017 06:53:02 rikki cattermole via Digitalmars-d-> announce wrote:On 13/12/2017 6:46 AM, bauss wrote:On Wednesday, 13 December 2017 at 01:14:26 UTC, Seb wrote:On Wednesday, 13 December 2017 at 00:32:11 UTC, rikki cattermoleWhat about it? - Jonathan M DavisOne word, dmd.What would be the point of that? That's old enough that no one should really be using it. Targetting it just runs the risk of your code not working with a recent version of the compiler and standard library. - Jonathan M DavisAlso the older c++ version (2.06x.x).What you could do is support the 3 latest versions of the compilers. Ex. for DMD you would support: 2.077.1 2.076.1 2.075.1On 12/12/2017 6:37 PM, Seb wrote:While it would be rather easier to build more Docker images [1] and add them to the tour [2], I fear that this will be too much maintenance overhead and will lead to outdated compiler soon. Also the storage on the machine is limited and we can't drop an unlimited amount of Docker images there. [1] https://github.com/dlang-tour/core-exec [2] https://github.com/dlang-tour/core/blob/master/source/exec/docker.d #L 22=== Supported D Compilers === * Latest DMD nightly * Latest DMD beta * Latest DMD * Latest LDC beta * Latest LDC The Docker images are rebuilt every day automatically.Can we please select a version we want to test against?
Dec 13 2017
On Wednesday, 13 December 2017 at 01:14:26 UTC, Seb wrote:Also the storage on the machine is limited and we can't drop an unlimited amount of Docker images there.Shouldn't the overhead from that be fairly manageable? After all, the last layer would only be as large as a single DMD/LDC installation. Surely you would have at least a few gigabytes spare on the server? — David
Dec 13 2017
On Thursday, 14 December 2017 at 02:57:42 UTC, David Nadlinger wrote:On Wednesday, 13 December 2017 at 01:14:26 UTC, Seb wrote:Yes, the docker images aren't too big: https://hub.docker.com/r/dlangtour/core-exec/tags FYI for the "import a dub library" feature, we compile a couple of important dub packages and bundle them within the docker image. It's a lot faster this way and allowed to ignore the issues of a common, shared dub package cache folder (parallel writes, growing size, prevent "delete all", ...) for now. Anyhow you are right, spare storage isn't a huge concern, but there isn't much free storage either as it's a rather small instance (I don't even know where the machine is hosted). As mentioned before, no one has mentioned a use case for which he would need an old, ugly compiler on run.dlang.io. A bit of history: the app emerged from the DLang-Tour backend, where small examples can be executed and for those you can't even choose the compiler. After several problems and outages with DPaste, we added it as a backend to the runnable examples on dlang.org, for which again, you can't choice the compiler. (To be technically correct, on the prerelease pages dmd-nightly is automatically selected.) It's interesting to see that no one complained about gdc not being there - I thought that this would be the first comment.Also the storage on the machine is limited and we can't drop an unlimited amount of Docker images there.Shouldn't the overhead from that be fairly manageable? After all, the last layer would only be as large as a single DMD/LDC installation. Surely you would have at least a few gigabytes spare on the server? — David
Dec 13 2017
On Thursday, 14 December 2017 at 06:26:16 UTC, Seb wrote:It's interesting to see that no one complained about gdc not being there - I thought that this would be the first comment.Allow me to be the first. But seriously, considering the use case for run.dlang.io, I don't see the need for hosting any compilers other than dmd-latest and dmd-nightly. Everything else is just gravy. Mike
Dec 13 2017
On Thursday, 14 December 2017 at 06:43:58 UTC, Mike Franklin wrote:On Thursday, 14 December 2017 at 06:26:16 UTC, Seb wrote:rust playground has plenty of choices in that matter but there's something better. it supports the top 100 most used dependencies so they are just an import away. seb, you think this could be added?It's interesting to see that no one complained about gdc not being there - I thought that this would be the first comment.Allow me to be the first. But seriously, considering the use case for run.dlang.io, I don't see the need for hosting any compilers other than dmd-latest and dmd-nightly. Everything else is just gravy. Mike
Dec 14 2017
On Thursday, 14 December 2017 at 13:22:54 UTC, Mengu wrote:On Thursday, 14 December 2017 at 06:43:58 UTC, Mike Franklin wrote:As far as I can judge they also only support latest, beta and nightly as compilers, no?On Thursday, 14 December 2017 at 06:26:16 UTC, Seb wrote:rust playground has plenty of choices in that matter but there's something better.It's interesting to see that no one complained about gdc not being there - I thought that this would be the first comment.Allow me to be the first. But seriously, considering the use case for run.dlang.io, I don't see the need for hosting any compilers other than dmd-latest and dmd-nightly. Everything else is just gravy. Mikeit supports the top 100 most used dependencies so they are just an import away. seb, you think this could be added?If I understand you correctly, we already support this - though the list of supported packages is rather limited for now. Two examples: mir: https://run.dlang.io/is/FIc6rd mir-algorithm: https://run.dlang.io/is/3pNRH8 If you want to add your favorite library to the list -> https://github.com/dlang-tour/core-exec/blob/master/Dockerfile#L43
Dec 14 2017
On 2017-12-13 02:14, Seb wrote:Also the storage on the machine is limited and we can't drop an unlimited amount of Docker images there.There could be a job that cleans up the local Docker images. If a Docker image is needed it will be pulled down again automatically. Of course there can be a few common images that are never cleaned up to reduce the waiting time for pulling down an image. -- /Jacob Carlborg
Dec 14 2017
On Tuesday, 12 December 2017 at 18:37:38 UTC, Seb wrote:After it has been in stealth mode for quite a while, I'm happy to announce that there's https://run.dlang.io [...]Sweet! I will definitely use this for teaching.
Dec 12 2017
On Tuesday, 12 December 2017 at 18:37:38 UTC, Seb wrote:After it has been in stealth mode for quite a while, I'm happy to announce that there's https://run.dlang.io === Features === * Color-highlighted DMD errors * Format source code with dfmt * Generate a short URL for link sharing * Import/Export to GitHub Gist * Typical key shortcuts like CTRL+Enter -> Run * Build cache for fast execution of common examples (e.g. the ones on front page of dlang.org) * Usable on your phone * Integrated with dlang.org (you can open any example on dlang.org in run.dlang.io by clicking the right arrow button) * Integrated with tour.dlang.org (you can open any example on the DTour in run.dlang.io by clicking on the "Export" button) === Supported D Compilers === * Latest DMD nightly * Latest DMD beta * Latest DMD * Latest LDC beta * Latest LDC The Docker images are rebuilt every day automatically. === Running DUB packages === Via "Add library" DUB packages can be added to the build. Currently only a whitelist of packages is allowed. Examples: mir: https://run.dlang.io/is/FIc6rd mir-algorithm: https://run.dlang.io/is/3pNRH8 === DReg === When I watched CyberShadow's Bugzilla cruise [1] I spotted this amazing tool dreg [2] and it's not that hard to build a docker image [3] for it and make it available for everyone, s.t. no setup is required. Dreg allows running old versions of the D compiler in parallel and compares their output. However, it's a lot easier to show than to explain: https://run.dlang.io/is/ckNT9i https://run.dlang.io/is/UZhQDh Currently all versions from 2.060 up to the latest greatest 2.077.1 are run, so the execution will take a bit longer than a single run. [1] https://youtu.be/qpUTvMokTCs [2] https://github.com/CyberShadow/misc/blob/master/dreg.d [3] https://github.com/dlang-tour/core-dreg === Source code & report issues === Please don't hesitate to open issues or submit pull requests: -> https://github.com/dlang-tour/core (it uses Vibe.d)This is a real life saver considering dpaste is blocked at work. It gets very tedious having to create a file, invoke the compiler, and run it in 3 separate steps just to test out some quick snippet.
Dec 12 2017
On Wed, Dec 13, 2017 at 12:50:40AM +0000, Meta via Digitalmars-d-announce wrote:On Tuesday, 12 December 2017 at 18:37:38 UTC, Seb wrote:[...]After it has been in stealth mode for quite a while, I'm happy to announce that there's https://run.dlang.ioThis is a real life saver considering dpaste is blocked at work. It gets very tedious having to create a file, invoke the compiler, and run it in 3 separate steps just to test out some quick snippet.Can't you just do: rdmd --eval='<insert code here>' ? T -- Real Programmers use "cat > a.out".
Dec 12 2017
On Wednesday, 13 December 2017 at 00:54:07 UTC, H. S. Teoh wrote:On Wed, Dec 13, 2017 at 12:50:40AM +0000, Meta via Digitalmars-d-announce wrote:This works for short snippets that are one-off but I usually like to play around with a piece of code and that gets tedious as well trying to edit it on the command line. Not to mention trying to get quotation marks to match up and escape them correctly.On Tuesday, 12 December 2017 at 18:37:38 UTC, Seb wrote:[...]After it has been in stealth mode for quite a while, I'm happy to announce that there's https://run.dlang.ioThis is a real life saver considering dpaste is blocked at work. It gets very tedious having to create a file, invoke the compiler, and run it in 3 separate steps just to test out some quick snippet.Can't you just do: rdmd --eval='<insert code here>' ? T
Dec 13 2017
On Thu, Dec 14, 2017 at 12:22:15AM +0000, Meta via Digitalmars-d-announce wrote:On Wednesday, 13 December 2017 at 00:54:07 UTC, H. S. Teoh wrote:[...]On Wed, Dec 13, 2017 at 12:50:40AM +0000, Meta via Digitalmars-d-announce wrote:On Tuesday, 12 December 2017 at 18:37:38 UTC, Seb wrote:[...]After it has been in stealth mode for quite a while, I'm happy to announce that there's https://run.dlang.ioThis is a real life saver considering dpaste is blocked at work. It gets very tedious having to create a file, invoke the compiler, and run it in 3 separate steps just to test out some quick snippet.Can't you just do: rdmd --eval='<insert code here>'This works for short snippets that are one-off but I usually like to play around with a piece of code and that gets tedious as well trying to edit it on the command line. Not to mention trying to get quotation marks to match up and escape them correctly.If you need to edit the code, you might as well use an editor anyway, and if you use a Real Editor (:-P) like vim or emacs you *could* just bind a single keystroke to invoking `dmd -run`. Or better yet, use the new `dmd -` to compile the code directly from the editor buffer via stdin, with `-of` set to some generic filename (I like to use /tmp/text or /tmp/x, for example), then your keybinding could be something like `| dmd - -of /tmp/test && ./test`. Then you could literally execute the editor buffer with one keystroke. And this works even when you're offline. Sadly, `dmd - -run` currently doesn't quite work just yet. I should look into fixing that. And *then* we wouldn't need to invent a temporary filename for the executable in our keybinding. (Of course, none of this negates the value of run.dlang.io -- I'm not arguing against that. It's just that testing out quick snippets seems to be a flimsy excuse to need to use it. :-P) T -- Heads I win, tails you lose.
Dec 13 2017
On Wed, Dec 13, 2017 at 04:59:00PM -0800, H. S. Teoh via Digitalmars-d-announce wrote: [...]Sadly, `dmd - -run` currently doesn't quite work just yet. I should look into fixing that. And *then* we wouldn't need to invent a temporary filename for the executable in our keybinding.[...] Turns out, the code change to make this happen is trivial: https://github.com/dlang/dmd/pull/7435 With this PR, you can compile and run code in standard input without needing to specify any filenames: $ echo 'import std.stdio; void main() { writeln("Hello, World!"); }' | dmd -run - Hello, World! $ Of course, piping the output of `echo` to dmd isn't a big deal. A more interesting use case is being able to pipe the contents of an editor buffer to dmd as input, and instantly receiving the program output in the editor. For example, I can open a new window in Vim (no filename), and type in the following contents: ------ import std.stdio; void main() { writeln("Instant win!"); } ------ Then type: :0,$!dmd -run - and the buffer contents are now: ------ Instant win! ------ (In English, the vim magic word above means: : Enter command mode 0,$ Take the range of lines from 0 to the end of file ! And filter these lines by a shell command dmd -run - The command to run ) This can, of course, be bound to a custom keybinding, then you'll have your one-stop shop for compiling D snippets without ever seeing (much less typing) any temporary filenames. And without needing an internet connection. Instant win! :-P T -- When solving a problem, take care that you do not become part of the problem.
Dec 13 2017
On Thursday, 14 December 2017 at 01:52:29 UTC, H. S. Teoh wrote:... This can, of course, be bound to a custom keybinding, then you'll have your one-stop shop for compiling D snippets without ever seeing (much less typing) any temporary filenames. And without needing an internet connection.That sounds powerful! Like you said, instant win.
Dec 14 2017
On Thu, Dec 14, 2017 at 02:33:13PM +0000, Ivan Kazmenko via Digitalmars-d-announce wrote:On Thursday, 14 December 2017 at 01:52:29 UTC, H. S. Teoh wrote:As of this morning, the PR has been merged into git master, and now this works: ------ $ echo 'import std.stdio; void main(){ writeln("Instant win!"); }' |dmd -run - Instant win! $ ------ Hooray! T -- Why are you blatanly misspelling "blatant"? -- Branden Robinson... This can, of course, be bound to a custom keybinding, then you'll have your one-stop shop for compiling D snippets without ever seeing (much less typing) any temporary filenames. And without needing an internet connection.That sounds powerful! Like you said, instant win.
Dec 15 2017
On Wednesday, 13 December 2017 at 00:50:40 UTC, Meta wrote:This is a real life saver considering dpaste is blocked at work. It gets very tedious having to create a file, invoke the compiler, and run it in 3 separate steps just to test out some quick snippet.Great to hear that it's useful for you! FYI: another life saver / convenience feature for this online editor is WIP: https://github.com/dlang/phobos/pull/5916
Dec 12 2017
On Tuesday, 12 December 2017 at 18:37:38 UTC, Seb wrote:After it has been in stealth mode for quite a while, I'm happy to announce that there's https://run.dlang.ioI've actually been using it a lot recently to communicate bugs/ideas/patterns with others. Due to the nightlies, I can quickly see if a bug has been addressed in master. I've closed a couple of bugs recently with "worksforme" that way. I also use it to quickly try ideas when I'm out waiting somewhere, or just when an idea occurs to me. It is such a great resource. Thanks to those who put their time into it. Mike
Dec 12 2017
On 12/12/2017 10:37 AM, Seb wrote:After it has been in stealth mode for quite a while, I'm happy to announce that there's https://run.dlang.ioVery impressive! Nice work! Can I add a suggestion? Have an option to show the assembler created. Being able to quickly look at the assembler output is a great way to learn the 'cost' of writing code in various ways. (This is invaluable for someone wanting to be an A-list programmer.)
Dec 14 2017
On Thursday, 14 December 2017 at 15:46:03 UTC, Walter Bright wrote:On 12/12/2017 10:37 AM, Seb wrote:You can use this one for nice assembly outputs https://d.godbolt.org/After it has been in stealth mode for quite a while, I'm happy to announce that there's https://run.dlang.ioVery impressive! Nice work! Can I add a suggestion? Have an option to show the assembler created. Being able to quickly look at the assembler output is a great way to learn the 'cost' of writing code in various ways. (This is invaluable for someone wanting to be an A-list programmer.)
Dec 15 2017
On 12/15/2017 4:10 AM, Radu wrote:You can use this one for nice assembly outputs https://d.godbolt.org/That is indeed nice and very useful. It should do dmd, too!
Dec 16 2017
On 16 December 2017 at 11:01, Walter Bright via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:On 12/15/2017 4:10 AM, Radu wrote:However dmd doesn't do assembly output. ;-)You can use this one for nice assembly outputs https://d.godbolt.org/That is indeed nice and very useful. It should do dmd, too!
Dec 16 2017
On 12/16/2017 2:45 AM, Iain Buclaw wrote:However dmd doesn't do assembly output. ;-)dmd -c test obj2asm test.obj >test.asm
Dec 17 2017
On Sunday, 17 December 2017 at 22:57:58 UTC, Walter Bright wrote:On 12/16/2017 2:45 AM, Iain Buclaw wrote:FYI: There's http://asm.dlang.org which seems to be a bit outdated. Moreover, there's an open issue to add DMD to d.godbolt.org: https://github.com/mattgodbolt/compiler-explorer/issues/306However dmd doesn't do assembly output. ;-)dmd -c test obj2asm test.obj >test.asm
Dec 17 2017
On 18 December 2017 at 04:37, Seb via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:On Sunday, 17 December 2017 at 22:57:58 UTC, Walter Bright wrote:I couldn't see any way to improve things. You get none of the nice features that compiler explorer offers, and supporting dmd requires you to put a sledgehammer in the app to force it to work nicely with a compiler that you can only observe via objdump, so saw no reason to update it.On 12/16/2017 2:45 AM, Iain Buclaw wrote:FYI: There's http://asm.dlang.org which seems to be a bit outdated. Moreover, there's an open issue to add DMD to d.godbolt.org: https://github.com/mattgodbolt/compiler-explorer/issues/306However dmd doesn't do assembly output. ;-)dmd -c test obj2asm test.obj >test.asm
Dec 18 2017
On 17 December 2017 at 23:57, Walter Bright via Digitalmars-d-announce <digitalmars-d-announce puremagic.com> wrote:On 12/16/2017 2:45 AM, Iain Buclaw wrote:Lacks any form of line number information to let you see clearly which set of instructions relates to which expression. i.e: https://explore.dgnu.org/g/7WNiytHowever dmd doesn't do assembly output. ;-)dmd -c test obj2asm test.obj >test.asm
Dec 18 2017
On 12/18/2017 10:11 AM, Iain Buclaw wrote:Lacks any form of line number information to let you see clearly which set of instructions relates to which expression. i.e: https://explore.dgnu.org/g/7WNiytThis is incorrect (if you compile with debug info on). Besides, it's not particularly relevant for the small code examples used there.
Dec 18 2017
On Thursday, 14 December 2017 at 15:46:03 UTC, Walter Bright wrote:On 12/12/2017 10:37 AM, Seb wrote:FYI: run.dlang.io got a few small updates: 1) -asm (DMD only) https://run.dlang.io/is/qtk8Wq 2) -vcg-ast: Dumps the AST tree of DMD (after all semantic analysis) https://run.dlang.io/is/TAHzMZ 3) Stores the latest source file in the persistent localStorage of your browser i.e. the last modified example will be shown once you come back.After it has been in stealth mode for quite a while, I'm happy to announce that there's https://run.dlang.ioVery impressive! Nice work! Can I add a suggestion? Have an option to show the assembler created. Being able to quickly look at the assembler output is a great way to learn the 'cost' of writing code in various ways. (This is invaluable for someone wanting to be an A-list programmer.)
Jan 13 2018