IRC channel logs

2023-02-21.log

back to list of logs

<cow_2001>the documentation needs more examples. lots and lots of examples. from the most obvious to the mind boggling.
<cow_2001>you know that site learn x in y days? it doesn't talk much and gives lots of examples. kind of like the little book series.
<cow_2001>when the documentation talks about this or that without giving a single code example i am very confused.
<cow_2001>what if i were the one to write a ton of examples? simple dumb examples at first of all the ice-9 stuff?
<haugh>cow_2001, it's definitely a particular style... I feel your pain in some cases but overall I like the rich articulation of core concepts. I've gotten used to it.
<haugh>For things that are not Guile-specific I definitely recommend starting with TSPL4
<cow_2001>haugh: am i a crazyperson for considering compiling a ton of examples into a coherent document? it's one of those obvious personal itch and scratches
<cow_2001>tspl4. will look into that
<cow_2001>ah
<haugh>Not at all crazy. Probably a lot more work than you're imagining. Huge props if you go through with it.
<haugh>Personally I'm a huge hypocrite about it because I like learning by example but hate coming up with examples for my own docs D:
<cow_2001>even if i do a bit, some coherent part, it might be useful. under the right license it is within the commons
<cow_2001>then someone else would merge it or adapt it
<cow_2001>optimism ~_~
<cow_2001>where do i start?
<haugh>syntax-case LOL
<cow_2001>okay, so macros
<cow_2001>ton of macros
<cow_2001>millions of macros
<cow_2001>macros for me
<cow_2001>okay. i have a very useful macro, let's call it useful, (useful proc arg1 arg2) is converted into (proc arg1 arg2). great work, cow_2001!
<cow_2001>the first one should be like identity
<cow_2001>or maybe the second
<cow_2001>the first should just be converted into some atom
<cow_2001>okay, tomorrow.
<gtz_>How can I break into the debugger? In Python I just do "import pdb; pdb.set_trace()" anywhere I want. How do I do the equivalent in guile?
<ArneBab>yewscion: I use inner defines to set properties (like the name) on returned functions: (define (bar) (define foo)(#f) foo)
<ArneBab>cow_2001: more examples in the manual would be great!
<lloda>gtz_: you can try https://github.com/mwette/guile-jtd
<gtz_>lloda, thanks! However, I am surprised that this is not included by default with guile even though it has extensive debugging support. Is the user expected to do everything in the REPL?
<lloda>some people use geiser
<lloda>i do actually do everything in the repl tho
<lloda>you're right that should be a basic feature, but guile has rough spots like that
<lloda>i know there's some people thinking about the debugging features
<gtz_>lloda, I will start doing everything in the REPL then
<gtz_>lloda, looks like the guile devs expect you to do that
<gtz_>lloda, maybe you have help with this: I am developing an application that is in multiple files. The top-level file is main.scm in which other files are loaded as libraries. When I do "(load main.scm)" in the REPL it works but when I subsequently make changes to a file other than main.scm those changes are not taken into account when I next do (load "main.scm")
<gtz_>How do I get the REPL to reload everything?
<abcdw>gtz_: reload everything is a tricky task, I don't think there is a generic solution for that. Personally, in geiser I reload/recompile module with C-c C-k or function definition with C-M-x.
<lloda>i put stuff in modules and reload them with ,re (the module)
<lloda>sometimes you have to go inside a module with ,m (module a) to reload a module from inside there with ,re (module b)
<lloda>i mostly c&p stuff from the editor onto the repl rather than use load
<abcdw>gtz_: If you want to cleanup repl's state for some particular module, you can do (module-clear! (resolve-module '(your module here)))
<ArneBab>wingo: is it OK if I create a WIP branch in the guile repo for different multi-language handling (i.e. being able to import elisp-code from Guile without adding -x to the commandline)?
<jryans>lloda: I'm curious to hear more about debugging features that may be planned... Do you know where I could read more about this?
<lloda>jryans: all i know is https://lists.gnu.org/archive/html/guix-devel/2022-11/msg00283.html
<jryans>Aha, thanks, I'll take a look 🙂
<lloda>👍
<apteryx>how can I access the complete file name of the script the code runs from?
<lloda>current-filename ?
<dsmith-work>cow_2001: Re documentation: https://nick.groenen.me/posts/the-4-types-of-technical-documentation/
<dsmith-work>sneek botsnack
<sneek>:)
<dsmith-work>!uptime
<sneek>I've been running for one month and 19 days
<sneek>This system has been up 16 weeks, 6 days, 14 hours, 34 minutes
<ArneBab>dsmith-work, cow_2001: there’s also a great article on those 4 types of documentation by steve losh: https://stevelosh.com/blog/2013/09/teach-dont-tell/
<dsmith-work>ArneBab, Thanks
<ArneBab>dsmith-work: an aside about the "reading tests" in the article: watching cars crash in computer games (need for speed :-) ) actually saved my life when my car lost grip in a tightening driveway. I realized that I was in the escalating counter-steering that always crashed me in the game and that shocked me out of it enough that I remembered what my driving instructor had said: hand away from the steering wheel. It worked.
<dsmith-work>Nice!
<apteryx>lloda: thanks
<lloda>^^
<dsmith-work>Woah!  197 nicks in here!  I think that's a new record
<cow_2001>mucking about with macros.
<cow_2001> https://0x0.st/Hsj7.scm
<cow_2001>blah
<cow_2001>needs to be a progression from most simple macro
<elevenkb>hey there what is the most instructive program written using GOOPS?