freenode/#lisp - IRC Chatlog
Search
16:26:11
dim
Shinmera: I like the RDD approach (http://tom.preston-werner.com/2010/08/23/readme-driven-development.html), do you know about it?
16:27:23
Shinmera
I don't follow it however because my design changes too much during development. Maintaining separate documentation would be too much overhead.
16:28:00
dim
that's what I like about the README first approach, you don't detail the design, but the end result: how to use what you're building as a user
16:28:20
Shinmera
I do brainstorming first on paper or in my mind to figure out a basic architecture, and then I implement it. Iterate on that a few times until it fits. Then I write documentation on it to shake out the last remaining problems.
16:29:07
Shinmera
I just don't write it down in a README because again, it might change quite a bit while I face the harsh reality :)
16:29:11
dim
yeah, so that's what you put in the README right? what problem you're solving and how, as a user, what you're doing make sense
16:29:50
Shinmera
Mh, in my readmes I describe what the library is, how to use it briefly, and if needed what the internal organisation is.
16:30:02
dim
my main problem with RDD is that I tend to not re-read the README often enough, unfortunately
16:30:39
dim
I think the README should be a conversation with the potential user, why would they be interested into what you did in the first place?
17:08:49
krwq
Hello, has anyone used cl-who? I'm having some issues with the simplest examples: https://pastebin.com/u0Zq1Cm5
17:17:09
krwq
drmeister: I think you can just use the pointer with cffi's aref equivalent (forgot the name)
17:20:14
_death
https://edicl.github.io/cl-who/#syntax .. personally I prefer yaclml (<:a :href foo (<:ah bar))
17:22:50
krwq
_death: to ensure they are link and not something like "\"><script>alert(...)</script>\""
17:26:45
mood
krwq: There is also spinneret, which has cl-who-like syntax but is, imo, a little more convenient
17:28:54
krwq
thanks guys, the non-escaping attributes seem to have worked correctly, I'll leave cl-who for now as I like that it writes to stream directly, if I have more issues and become too annoyed I'll try yaclml and spinnernet
17:29:56
_death
yaclml needs html5 upgrades.. fortunately I've not really dealt with web stuff for years
17:31:02
krwq
_death: I just need that to generate simple e-mail - I've started with just cl-template which works ok but when I added some html this started to look really ugly
17:32:31
mood
krwq: spinneret can also write to a stream (though always *standard-output*), but cl-who is certainly a fine choice
17:33:31
krwq
mood: stdout is fine considering it's a non-issue in common lisp :) I don't want to spend too much time on learning it since I've already got it working and already spent like and hour or cl-who
17:34:37
krwq
it has it's things that it sometimes generates not what i mean but I think I can live with that as long as it is fixable
17:35:11
krwq
+ in most of the cases I'll likely wrap the codegen anyway and can add a simple testcase/assert
17:40:52
krwq
pjb: I wanted to add just <ul><li><a href="foo">bar</a></li>...</ul> - I did text gen first but it started getting ugly and I'm planning to add more complex html later
18:17:11
HighMemoryDaemon
I have a pathnames package defined in another file. When I use Slime and try to compile, I get the error "The name "PATHNAMES" does not designate any package." However, when if I compile that load line separately and then compile the file, it works fine. My basic code: https://hastebin.com/duzaxajimi.lisp
18:18:21
Xach
HighMemoryDaemon: better: define a system file and let asdf load things in the right order for hou
18:24:33
Xach
like, you could have something like myproject.asd containing: (defsystem #:myproject :serial t :components ((:file "pathname") (:file "spam-filter"))) and then use (asdf:load-system "myproject") will compile and load them in order of appearance
18:26:26
HighMemoryDaemon
That is pretty easy. Was just checking out this guide: https://common-lisp.net/~mmommer/asdf-howto.shtml
18:28:19
Xach
HighMemoryDaemon: oh, here's something i made to help get started with stuff that requires other libraries: https://www.xach.com/tmp/quickstart.html
21:15:09
dim
Xach: BTW there's now https://github.com/slyrus/abcl/tree/master/contrib/asdf-jar (which I'm yet to try), so that might be something for you to have a look at in the context of quicklisp bundles when using ABCL?
21:39:54
mood
The most confusing thing when writing macros must be double backquotes. I just don't have any intuition for them
21:41:59
mood
pjb: I'm writing a macro-defining macro, and using list, append and friends would obscure just how simple what's happening actually is. Except for the fact that double backquotes are even more confusing, so I guess I'll just do that.
21:42:37
pjb
macros are functions like any other, don't forget to use abstractions and factorization.
21:42:41
mood
AeroNotix: Sure, but when you're two levels deep, how do you get back to the outer level? ,, produces all kinds of weird effects
21:49:48
mood
Shinmera: That does work, but I don't *understand* it. My brain wants to just write ,,(when has-thing '(print "bar"))
21:50:23
Shinmera
Well first you need the ,@ in order to splice in a list that won't leave a NIL if your test is false
21:50:48
Shinmera
Then, since you don't want the code to be evaluated when the inner macro is called, you need the quote
21:51:50
Shinmera
Basically since each level of unquoting is going to try to evaluate the thing, you need to stop that from happening by intermittently adding quotes.
21:51:52
AeroNotix
But pjb is right, probably could turn the inner-macro into a function that returns that form
21:56:40
mood
AeroNotix: I could generate the body of the inner macro using a function, yes. I'll see if that makes things clearer
22:03:01
equwal
Paul Graham has an interesting take on double quoted macros in On Lisp. He compares them to integrating (something you do in calculus). Essentially the reason it is difficult isn't because of the notation, it is because it is just a really complex problem. Just like integration though, there are tricks you can learn to make it easier. For example, when writing a macro-writing macro, you can write the inner macro separately, then write
22:03:01
equwal
the outer macro into it. You can then substitute in the code for the inner macro. The analogy is strong: substitution is one method of integration. There are other tricks you learn as you go along.
22:11:17
mood
Shinmera: It looks quite alright in the logs: https://irclog.tymoon.eu/freenode/%23lisp?around=1534111681#1534111681
22:15:57
no-defun-allowed
should i still put #' before my lambda expressions? sbcl doesn't seem to care and it feels old
22:16:47
mood
no-defun-allowed: There is a macro named LAMBDA that expands to #'(lambda ...), so you don't have to, except in some circumstances
22:18:21
Shinmera
mood: Funnily enough #'(lambda ..) also doesn't work in some situations, like the :report of a condition.
22:18:47
Shinmera
In fact, in which situation do you think you have to add #', because I can't think of one
22:19:54
mood
Hmm, good question. I seem to remember finding something in the past, but I'm drawing a blank
22:20:12
Shinmera
Anyway, the short is: save yourself the two characters and the visual noise, and just use lambda.
23:05:27
pjb
aeth: #+genera (defmacro lambda ((&rest bindings) &body body) `(cl:function (cl:lambda ,bindings ,@body)))
23:15:34
aeth
pjb: I think it was Genera. I'm not sure because it has been a few years. I think the proper way of doing it, though, is pushing it to *features* iirc.
1:04:00
slyrus1
scymtym: if you've got a moment, can you take a look at https://github.com/sharplispers/closure-common/pull/2 ? thanks!
3:12:30
kenster
Streaming some epic lisp and C++ programming: https://youtu.be/lEL0Nly2CE0 or https://www.twitch.tv/kingherring
3:13:27
asarch
If I have a git directory, how could I know the full address of it on the GitHub server?
3:14:00
Colleen
Bike: karlosz said 20 hours, 59 minutes ago: I found a possible cause. Code like this (let ((*x* (or ... ...)))) can introduce a lexical location that is defined in two branches. Thus, we have our no dominating definer case we were looking for. I generalized the code to handle placing it in the lowest common ancestor node in the dominance tree.
3:14:01
Colleen
Bike: karlosz said 20 hours, 57 minutes ago: i meant that the let can introduce a lexical location which can be captured and has no dominating definer.
3:39:33
ym
There is a paper by Jogn Alan McDonald called "Object-oriented programming for linear algebra." and dated July 10, 1989. It tells about "a system for numerical linear algebra and optimization, implemented in Common Lisp[l3] and CLOS[l], called Cactus.". Cannot google this Cactus system location in the Internets.
3:41:44
asarch
One stupid question, does Scheme have an ANSI standard just like Common Lisp has (ANSI X3J13)?
3:53:13
beach
asarch: There are several standards organizations in the world. Each country typically has at least one. Then you have IEEE, ISO, ECMA, etc.
3:56:26
beach
asarch: It is important to understand that a standards organization is not necessarily appointed by anyone in particular. It can be an association, or it can be a for-profit company. The important role of a standards organization, as far as programming languages are concerned, is that it is independent of the organizations that provide the implementations.
4:05:50
beach
Sure. It's an important concept that is, unfortunately, often unknown to software developers. In fact, it is often unknown even to project leaders whose task it is to choose a programming language. The result is that they often choose programming languages that do not have an independent standard, with potentially dire consequences to the projects they are leaders of.
4:08:13
drmeister
If an array of unsigned byte8's only contains values between 0x01 and 0x7f inclusive - then it can be stored in a simple-base-string - correct?
4:10:44
drmeister
I thought that might be the answer - so I asked. What about printable ascii characters? 0x20 to 0x7f?
4:12:51
drmeister
Right - it says nothing about the encoding of characters. I need to decide if an array of bytes can be coerced into a simple-base-string.
4:13:52
drmeister
I could coerce those to arrays of bytes - I was looking for some other way of testing rather than failing utf-8 encoding.
4:14:08
White_Flame
" Whether a character is a base character depends on the way that an implementation represents strings, and not any other properties of the implementation or the host operating system."
4:14:27
beach
As far as I know, a UTF-8 string with bytes only between 0 and 127 contains only ASCII characters.