freenode/#lisp - IRC Chatlog
Search
22:33:45
pjb
(mapcar (lambda (path) (list path (make-pathnames :directory '(:relative "_site") :defaults path))) (directory "_posts/*.*"))
22:35:27
sjl
2017-08-13 18:02:26 <pjb> Never touch the files in the current working directory. Always use specifically indicated input and output files.
22:36:49
pjb
sjl: yes, there was multiple points. The most important is about the directory of the sources. But it's also not a good practice to use the current working directory. It'd be better to take an option to tell the program what directory to process.
22:39:46
pjb
Also, in bash scripts, having to cd is always a problem. Either you have to do it in a subshell, or you have to deal with going back to the original working directory (cd - may work, but it's not always what you want or can do), and in all case you have to check for errors (when the directory doesn't exist or is not accessible, and it is particularly painful to do in bash (error handling), so it's rarely done, and so you have so m
22:39:46
pjb
bugs in scripts… Which again shows that it's just not a good idea to process the current directory.
22:41:12
sjl
Ideally you allow both, e.g. ls defaulting to printing the current directory but allowing args, or git defaulting to ./.git but honoring --git-dir
22:43:30
sjl
not providing the current directory as a default even when it would often be useful can be annoying, e.g. always having to use 'find .'
22:43:54
whoman
constructive or destructive operations should be targetted explicitly, noncreative and nondestructive could be implicit
22:45:41
anticrisis
directory is quite useful. I just did this: (mapcar 'delete-file (directory "./*.fasl"))
22:45:58
pjb
(which is nice when you're in your repo, but when you're lost (ie. in scripts), it can be a problem.
22:50:26
pjb
You could prehaps replace the push with a :collect new-image :into result and use :initial-images (nconc result (list (first images))) in the make-data-stream
22:55:25
pjb
As for the (skippy:… image) you can write a macrolet (macrolet ((ref (name) `(,(intern (string name) "SKIPPY") image))) (ref top-position) (ref left-position) …)
22:57:10
pjb
or ∴top-position ∴left-position, you have a lot of esthetic and symbolic choice with unicode characters.
22:57:10
fiddlerwoaroof
pjb: as far as error handling in bash goes, a good rule of thumb is to always start a script with set -o pipefail -eu
22:57:54
anticrisis
ran across this amazing use of loop last night: https://github.com/fare/asdf/blob/1b0a0fd945ade1f341f3b2d3c0596cc4aa5244f3/uiop/package.lisp#L678
22:58:38
Bike
it would be way more convenient if stuff like 'append' was a local macro instead of syntax.
22:59:19
fiddlerwoaroof
I was doing a algorithms course on Coursera, and I found that LOOP's syntax basically let me translate the pseudocode into something executable nearly word for word
22:59:32
pjb
fiddlerwoaroof: -u makes empty arrays signal an error. and -e doesn't apply everywhere anyways. So an erroneous cd in a lot of positions won't break the script.
23:00:27
fiddlerwoaroof
-u is annoying, I grant, especially when you're doing stuff like checking for possibly non-existent command line arguments
23:00:52
pjb
fiddlerwoaroof: and the worst of all #!/bin/bash -eu -o pipefail is useless when people run the script (which is named foo.sh!) with bash foo.sh !
23:01:17
pjb
fiddlerwoaroof: so you need both: #!/bin/bash -eu -o pipefail and set -eu -o pipefail # yes.
23:01:19
sjl
Bike: yeah, being able to define new iteration constructs as macros is the best part of iterate
23:01:37
fiddlerwoaroof
set -eu -o pipefail applies in both cases, so you don't need the options in the shebang line
23:02:05
pjb
fiddlerwoaroof: so it's just yet another turing tarpit. You can have fun and get paid for it, but it's just a silly time waste.
23:02:30
zulu_inuoe_
phoe: You remember how I was complaining about initialize-instance getting called? This is what my genious self was calling.. (shared-initialize (initialize-instance obj) slots-needing-init)
23:03:45
fiddlerwoaroof
anticrisis: here's the merge part of merge sort all in loop: http://paste.lisp.org/+7KP1
23:04:14
fiddlerwoaroof
I think this is conforming lisp code, but the part of the standard that specifies loop is a bit difficult to understand
23:09:36
sjl
I'm pretty sure that's technically non-conforming, but will work in most implementations
23:16:15
fiddlerwoaroof
Yeah, the confusing part is that it says "Termination-test control constructs can be used anywhere within the loop body. The termination tests are used in the order in which they appear. If an until or while clause causes termination, any clauses that precede it in the source are still evaluated. If the until and while constructs cause termination, control is passed to the loop epilogue, where any finally
23:16:42
fiddlerwoaroof
But, it makes sense if you pay attention: for .. in clauses are part of the "loop prologue"
23:18:16
sjl
a (loop ... while ... for) doesn't even parse according to the grammar defined in the spec, so everything else after that would seem irrelevant
0:14:48
yegortimoshenko
pjb: only uiop/filesystem:resolve-symlinks, unfortunately. what does one use to create a symlink, osicat?
0:16:55
yegortimoshenko
they do have make-link, it's just some stuff is absent from osicat and some stuff is absent from uiop...
2:22:40
whoman
"ros use sbcl/system" as recommended, still downloads a new copy of sbcl and quicklisp, which i do not need or want
2:51:21
fiddlerwoaroof
From what I gather, the whole point of ros is to allow it to take care of such things.
2:51:51
fiddlerwoaroof
It works a bit like the various sandbox development environments for other langages (virtualenv, stack, etc.)
4:49:54
anticrisis
whoman: you've tried adding a symlink to your implementation's installation directory in ~/.roswell/impls/...?
6:08:51
muzik
i changed to emacs from vi about a year ago, and thought the lisp channel might be interesting enough for me to follow :)
8:03:14
beach
whoman: Is Emacs Lisp moving in the direction of Common Lisp? And, what is the official FSF opinion about making Emacs Lisp more like Common Lisp?
8:05:57
whoman
especially good news for important things. like ffi (dynamic modules), threading, web server, more realistic record types, lexical scope, and various small bits
8:06:45
beach
I have told this story before, but it might be worth repeating in this context. When RMS announced GNU Emacs (1983 was it?), I answered his email and said I think it was the wrong way to do it, and it would be better to first write a good Lisp system and then to implement Emacs in that Lisp system. He answered "Sounds good. Let me know when you have implemented it."
8:06:45
jackdaniel
aren't they graviting towards adopting guile and maintaining elisp for already written emacs software?
8:07:04
Shinmera
Wasn't it the case that RMS didn't want packages in it and that being the primary reason elisp still doesn't have them even now?
8:08:38
whoman
beach, reminds me of how GNU project began, read this morning; 198..7? "first we should make a kernel.." and then linux 1991
8:09:07
whoman
there is an elisp implementation in guile, but guile emacs development has stalled as far as i know (checked yesterday)
8:09:35
jackdaniel
only thing I can say about "old school elisp" without CL layers is that dynamic scope is very tricky to get it right. I'm fixing bug in slime related to it
8:10:42
beach
whoman: Who said they should start making a kernel? As I recall, when GNU started (around 1983), RMS explicitly started with everything else, like Emacs, GDB, GCC, GAS, etc.
8:11:45
whoman
beach, yeah, sorry; it was slightly reversed situation - they began to make the tools to write a kernel with
8:11:58
dim
but elisp... I agree with beach that having a proper lisp implementation would have been nice
8:13:50
whoman
well, i like it a lot. i should like to test some performance on simple things versus sbcl and rust emacs, though
8:14:00
beach
dim: Slightly off-topic, but what impresses me the most is that RMS was able to choose to clone a system (Unix) that he knew was worse than other systems he knew (Lisp machine OSes) in order to get as many people as possible to help with the project. In his place, I would have been unable to do that, and I would thus have failed.
8:16:08
whoman
https://www.gnu.org/software/emacs/manual/html_node/eieio/CLOS-compatibility.html#CLOS-compatibility
8:23:49
schweers
Shinmera: it now has multiple dispatch, but it’s a little tricky for list based types, if I recall correctly
8:24:18
schweers
but it’s a quite new feature. also as far as I know EIEIO is not fully compatble with CLOS, let alone MOP
8:25:10
schweers
ah, I think one cannot dispatch on functions, as they are just lists which happen to have a particular structure
8:25:14
dim
beach: true that... and to this day I can see that I still failed to attract any pgloader contributor because of choosing CL, so I guess I see what you mean
8:26:32
beach
dim: Oh, I thought pgloader was specifically meant for Common Lisp. I guess I haven't followed the purpose of your project. Sorry!
8:27:30
dim
beach: no worries. the purpose is loading data into PostgreSQL, and now also to migrate whole data set from another RDBMS to PostgreSQL, with MySQL and SQLite and MS SQL already supported, and Sybase and Oracle to come apparently
8:28:23
dim
it makes pgloader somewhat different from lots of CL code talked about in here, in that its typical user doesn't care about CL and just uses the binary image shipped, and seldom build it locally
8:29:32
dim
but really you don't get to use pgloader on a side personnal project, mostly, it's all enterprise time, so I would hope people can spend some time contributing to it to fix their immediate problem
8:42:02
beach
I started a SICL FAQ as shka and vtomole suggested: https://github.com/robert-strandh/SICL/blob/master/FAQ.text
8:42:47
beach
So if anyone has a question, I'll consider adding it. I'll supply the answer, of course.
8:45:42
dim
why do you work on this project, as in what does it provide (to whom) when finished? for how long have you been working on it?
8:45:54
anticrisis
beach: what does success look like? Is it intended to eventually be an alternative to other open source implementations? Will it eventually build executables? (Sorry if these are too basic, i'm not familiar with the history of this project.)
8:47:03
pjb
beach: FAQ should be extracted from the question database after enough of them have been asked enough time to have a clear statistically significant idea of their frequency…
8:47:42
anticrisis
right, i was just going to say that one question from a newbie does not necessarily meet the "F" criteria
8:48:04
dim
beach: you might have heard about Readme Driven Development wherein the first thing you do is explain to a user how to use your code, and to what benefits, I like to do that and I think it helps designing a FAQ too
8:48:53
pjb
In the old times, when they were posted to usenet, they were asked frequently enough to be included in the FAQ…
8:49:24
dim
nowadays they're Marketing material meant to help users figure out if they need to care about your “product”
8:51:45
phoe
beach: for readability, I'd suggest making an additional newline after each answer. This way, question-answer blocks will be more separate optically.
8:52:22
phoe
Or, even, I'd get rid of "Question:" and "Answer:" altogether - I'd ask a question starting with "==", like, "== How can I run SICL?", followed immediately by the answer.
8:53:24
phoe
Or use Markdown to put questions in ## headers. But, judging by what your documentation looks like, I think you're a plaintext kind of person. :)
8:55:38
beach
phoe: I'll contemplate the format later. Right now I want to concentrate on the questions and answers.
9:09:26
dim
I like markdown very much, but when you're not used to it, it's a distraction from the content...
9:11:29
dim
it's supposed to be yes, but I've not found the support for other formats on par with .md
9:12:37
dim
my understanding is that “markdown has won” much like git has won against darcs, mercurial and fossil and others, maybe not in being the best technical candidate around, but in sheer adoption and then, advanced tooling
9:13:38
axion
This is why Shinmera and I hate Markdown and you should too...it's a regex mess (takes a while to load) https://johnmacfarlane.net/babelmark2/?text=a%0A++*+b%0A++*+c
9:17:17
schweers
not trying to start a flame war, I’m honestly curious: does darcs have real advantages over git?
9:18:04
jackdaniel
given migration statistics? no. from practical point of view it probably has some, but none is crucial
9:19:25
schweers
it might have helped that git was introduced by someone famous. Or should I have heard the name David Roundy before?
9:41:28
dim
at the time (2005) darcs had version control semantics and git was a file system abstration layer
9:42:24
dim
to this day, I think git still lacks a formal specification of how it handles revision control, which darcs had, it was the first thing you'd read about it