IRC channel logs

2022-07-04.log

back to list of logs

***dostoevsky7 is now known as dostoevsky
***X-Scale` is now known as X-Scale
***X-Scale` is now known as X-Scale
<nerthus>scrub question incoming: if you do (map (command-line)) how do you iterate over the arguments and pass them to something else?
<drakonis>well, map works on a list and passes each element of that list as an argument for that function
<drakonis>also apply might be what you want instead?
<nerthus>so if map <func> can be any function I define, and it receives each argument
<nerthus>eh, I'll look at apply
<drakonis>but map is for iterating on a list
<drakonis>apply is for passing a list as arguments afaik?
<nerthus>ye but iterating over a list is pointless if you cant do anything with what it yields
<nerthus>(I am new at Scheme btw, hehe)
<drakonis>ah so you want to get a list with the resulting data?
<nerthus>well to break it down to the basics
<nerthus>I want every argument passed printed out on a newline
<drakonis>right, so that would be map?
<nerthus>doing something like write/display after map just displays ALL arguments on a single line
<drakonis>it will print out each argument on a new line
<drakonis>you want format instead of display
<drakonis>as it uses a new line
<drakonis> https://www.gnu.org/software/guile/manual/guile.html#Hello-Scheme_0021
<drakonis>this may or may not help?
<nerthus>so the formatted output section is the one that is relevant here?
<drakonis>sure
<drakonis>generally speaking, familiarize yourself with the language
<nerthus>that's a friendly way of saying RTFM, but you are right. I am not that familiar with how and where you can call which procedure
<nerthus>ty for the respone tho
<drakonis>i'll be here all day
<drakonis>scheme itself is an easy language to pick up
<nerthus>well, finding all procedures/functions is not that easy I have found, hehe
<nerthus>too used to having a LSP where you can hover over an identifier and get a docstring explanation
<drakonis>hah
<drakonis>you might like geiser then!
<drakonis>there is also a project to build a LSP for guile
<drakonis>you need emacs for geiser though, so i take you're going to be in for a rough ride for a while
<nerthus>I feel that just ends up with me yak-shaving going through emacs lisp
<drakonis>eh
<drakonis>its not particularly difficult to install geiser
<drakonis>you can just use something like doom emacs or spacemacs to save the effort of setting it up
<isamert>Hello everyone! How do I both write to and read from the same process? I tried something like this https://termbin.com/zttar but it does not work and I can't understand why with-output-to-string can not capture the output from the process created by open-pipe* as documentation clearly states that an input open-pipe* has current-output-port as it's std out and with-output-to-string should be able to capture it's output. What am I missing
<isamert>here?
<isamert>sorry if my last message is duplicate, my irc client is misbehaving