digitalmars.D - repls for d
- monkyyy (8/8) Oct 31 So I like repl programming, Im aware of dlang.io and the project
- Stefan Koch (5/13) Oct 31 yeah you can build shared libraries and use them to load new
- monkyyy (6/23) Oct 31 adr also suggested dll hacks, and I still dont understand it
- Lance Bachmeier (7/12) Oct 31 This is the drepl project:
- monkyyy (3/5) Oct 31 I dont think its been compiling for a while, and I didnt care
- =?UTF-8?B?UsOpbXkgTW91w6t6YQ==?= (20/27) Nov 01 I had some issues with the linenoise dependency
- jmh530 (2/23) Nov 01 Would you be able to submit the fix?
- =?UTF-8?B?UsOpbXkgTW91w6t6YQ==?= (3/4) Nov 04 Someone already did it. It's not been merged yet:
So I like repl programming, Im aware of dlang.io and the project on dub; I ussally use dlang.io despite the blind theme, it often being out of date, and slow. But today I needed it to be in the terminal, so I made an another terrible solution https://gist.github.com/crazymonkyyy/bd90fe3e7a9372cbe5c644cce11c1b9e Its an ed like line editer... so terrible, truely awful. Maybe someone else cares tho. Are there other solutions or some travail improvement?
Oct 31
On Thursday, 31 October 2024 at 21:48:24 UTC, monkyyy wrote:So I like repl programming, Im aware of dlang.io and the project on dub; I ussally use dlang.io despite the blind theme, it often being out of date, and slow. But today I needed it to be in the terminal, so I made an another terrible solution https://gist.github.com/crazymonkyyy/bd90fe3e7a9372cbe5c644cce11c1b9e Its an ed like line editer... so terrible, truely awful. Maybe someone else cares tho. Are there other solutions or some travail improvement?yeah you can build shared libraries and use them to load new versions of the code dynamically. There is a drepl project which used this IIRC. However maybe it won't compile anymore?
Oct 31
On Thursday, 31 October 2024 at 22:16:03 UTC, Stefan Koch wrote:On Thursday, 31 October 2024 at 21:48:24 UTC, monkyyy wrote:adr also suggested dll hacks, and I still dont understand it d compiler is fast enough that you can just copy a 100 lines in and out of memory and have it compile effectly instantly; if it didnt Id be blaming the std before the code the copyed such a comparably small stringSo I like repl programming, Im aware of dlang.io and the project on dub; I ussally use dlang.io despite the blind theme, it often being out of date, and slow. But today I needed it to be in the terminal, so I made an another terrible solution https://gist.github.com/crazymonkyyy/bd90fe3e7a9372cbe5c644cce11c1b9e Its an ed like line editer... so terrible, truely awful. Maybe someone else cares tho. Are there other solutions or some travail improvement?yeah you can build shared libraries and use them to load new versions of the code dynamically. There is a drepl project which used this IIRC. However maybe it won't compile anymore?
Oct 31
On Thursday, 31 October 2024 at 23:41:47 UTC, monkyyy wrote:adr also suggested dll hacks, and I still dont understand it d compiler is fast enough that you can just copy a 100 lines in and out of memory and have it compile effectly instantly; if it didnt Id be blaming the std before the code the copyed such a comparably small stringThis is the drepl project: https://github.com/dlang-community/drepl The way I've always written my programs is to make a few changes, recompile with DMD, and fix anything that needs fixing. This works just fine even for projects with tens of thousands of lines of code as long as you avoid anything but the simplest templates.
Oct 31
On Friday, 1 November 2024 at 01:03:44 UTC, Lance Bachmeier wrote:This is the drepl project: https://github.com/dlang-community/dreplI dont think its been compiling for a while, and I didnt care much when it was
Oct 31
On Friday, 1 November 2024 at 01:52:54 UTC, monkyyy wrote:On Friday, 1 November 2024 at 01:03:44 UTC, Lance Bachmeier wrote:I had some issues with the linenoise dependency `preBuildCommands` script, around a year ago. The fix was to use the `$LINENOISE_PACKAGE_DIR` variable instead of `$PACKAGE_DIR` to build drepl. from: ``` "cd $PACKAGE_DIR; [ -f C/linenoise.o ] || cc -c -fPIC -o C/linenoise.o C/linenoise.c" platform="posix" ``` to: ``` "cd $LINENOISE_PACKAGE_DIR; [ -f C/linenoise.o ] || cc -c -fPIC -o C/linenoise.o C/linenoise.c" platform="posix" ``` I changed it directly in the `~/.dub/packages/linenoise/1.1.0+1.0.0/linenoise/dub.json`. The parsing being done by an older libdparse library, short function forms like `int addOne(int i) => i + 1;` or named function argument are not available.This is the drepl project: https://github.com/dlang-community/dreplI dont think its been compiling for a while, and I didnt care much when it was
Nov 01
On Friday, 1 November 2024 at 22:48:25 UTC, Rémy Mouëza wrote:On Friday, 1 November 2024 at 01:52:54 UTC, monkyyy wrote:Would you be able to submit the fix?[...]I had some issues with the linenoise dependency `preBuildCommands` script, around a year ago. The fix was to use the `$LINENOISE_PACKAGE_DIR` variable instead of `$PACKAGE_DIR` to build drepl. from: ``` "cd $PACKAGE_DIR; [ -f C/linenoise.o ] || cc -c -fPIC -o C/linenoise.o C/linenoise.c" platform="posix" ``` to: ``` "cd $LINENOISE_PACKAGE_DIR; [ -f C/linenoise.o ] || cc -c -fPIC -o C/linenoise.o C/linenoise.c" platform="posix" ``` I changed it directly in the `~/.dub/packages/linenoise/1.1.0+1.0.0/linenoise/dub.json`. The parsing being done by an older libdparse library, short function forms like `int addOne(int i) => i + 1;` or named function argument are not available.
Nov 01
On Friday, 1 November 2024 at 23:48:10 UTC, jmh530 wrote:Would you be able to submit the fix?Someone already did it. It's not been merged yet: https://github.com/MartinNowak/linenoise/pull/1/files
Nov 04
On Monday, 4 November 2024 at 19:27:34 UTC, Rémy Mouëza wrote:On Friday, 1 November 2024 at 23:48:10 UTC, jmh530 wrote:Thanks. Only over a year old...Would you be able to submit the fix?Someone already did it. It's not been merged yet: https://github.com/MartinNowak/linenoise/pull/1/files
Nov 04
On Monday, 4 November 2024 at 19:46:59 UTC, jmh530 wrote:On Monday, 4 November 2024 at 19:27:34 UTC, Rémy Mouëza wrote:I dont remeber why I dont care about drepl much, but isnt it overcomplex for what you need? Repl-ish tools shouldnt need to parse d, just that the text editor to compiler maybe more then 1 key press before giving you results, the compiler for sub lets say 500 lines files should be a key press compile time.On Friday, 1 November 2024 at 23:48:10 UTC, jmh530 wrote:Thanks. Only over a year old...Would you be able to submit the fix?Someone already did it. It's not been merged yet: https://github.com/MartinNowak/linenoise/pull/1/files
Nov 04