freenode/#lisp - IRC Chatlog
Search
0:22:12
aeth
Oh wow, that was involved. It took quite a bit to get variable support in my HTML macro. https://gitlab.com/mbabich/cl-documents/blob/ab3551f26a4bcfd1ec47532efccc45693cc247b2/generate-html.lisp#L9-47
0:22:27
aeth
I have to manually iterate the lists so it terminates one after the list end instead of at the list end.
0:25:01
aeth
Basically I assume that (code-char 0) is invalid, so when I come across a symbol that's not a keyword (i.e. a variable) then I write (code-char 0) and I push the variable-name to an internal list in write-html, which is returned at the end (in reverse order). Then I write the string, split on (code-char 0)s with calls to (write-html ,variable ...) in between the splits.
0:26:34
aeth
So, effectively, what the macro generates is: if it's not (code-char 0) then it writes the string range up until that point and if it is, then it writes the original symbol it encountered, which is assumed to be a variable.
0:28:00
aeth
If no variables are used, then it just writes a constant string, which is going to be the most efficient. The next most efficient will be to precalculate as much as possible.
3:20:35
aeth
I generally prefer suffixes to prefixes because then they don't affect an alphabetical sort
4:54:46
no-defun-allowed
It's probably an excuse for something else, especially with their type<T<T2> > shenanigans.
4:54:49
beach
Josh_2: If that is what you are being told, I think the person is giving you an excuse that just isn't true.
4:55:17
beach
Josh_2: There are very strong psychological forces at work that make people resist anything new.
4:57:07
beach
Josh_2: Some bad cases will come up with ridicule such as "only bald people use Lisp".
4:58:02
beach
Josh_2: In general, I recommend that you avoid trying to convince people. It is usually a waste of time.
4:58:50
no-defun-allowed
beach: "Bald people" is a new one to me. I've heard about beard length before though.
5:00:51
beach
Josh_2: The only thing I have found to work is to show real result from very productive work.
5:01:10
no-defun-allowed
(For example, http://i.imgur.com/HLp8z11.jpg for GNU/Linux distributions. I think beards are just a general computer science thing.)
5:03:36
beach
All I am saying is that the worst offenders, i.e. the ones with the "closest mind set" (terminology by Carol Dweck), will go to any length to convince their entourage NOT try anything new. Ridicule is one such tactic. And those worst offenders are often "alpha males", so they have great influence on others.
5:04:31
no-defun-allowed
Back to the point, people have excuses and you might be more productive working on your own stuff. Then you can show them, then they might be convinced, else you can laugh at them in your head for willingly wasting their own resources.
5:08:18
beach
Josh_2: I recommend the writings (and YouTube presentations) by Carol Dweck. Once you understand the psychological forces involved, perhaps you can also understand how to work around them.
8:09:51
beach
semz: There is independent research that suggests that expertise requires hard work. I recommend a book entitled "peak" by Anders Ericsson.
8:10:43
beach
Note, though, the direction of the implication arrow. Hard work does not necessarily result in expertise, as we often see in the domain of software development.
8:14:21
schweers
So the question might be: how do we prevent people from doing hard work which does not result in, or otherwise further, expertise?
8:18:30
beach
jackdaniel: The baldness thing was an example of how preposterous the claims of these closed-minded people might be, and how they will do anything (including ridicule) to avoid learning new things. And you are a good example of how preposterous that claim is.
8:18:42
White_Flame
you're not just doing work, but working with somebody, seeing a direct example of how they benefit from the work and tune it to positive effects
8:22:54
jackdaniel
beach: there are many rude people whose behavior doesn't need to be explained with complicated theories, I'm sure that if they have no problem with saying "only bald people use lisp" then leaving lisp of it and saying "bald people are <whatever>" is as likely if they do not like the person in question (and 'baldness' could be replaced by any visible trait of said person)
8:30:50
schweers
I have a quick lisp question. I have a pathname object and want to construct a new one based on it. In UNIX I’d just append "../somedir" to get the directory part. What is the most portable (both concerning lisp implementations and OSes) way of doing so? Using a "/" character is obviously not the best move here. I could use nested MERGE-PATHNAMES, but that just seems wrong and overblown. Is using '(".." "somedir")
8:33:57
Colleen
schweers: About pathname-utils https://shinmera.github.io/pathname-utils#about_pathname-utils
8:37:54
schweers
Shinmera: Thanks. I just took a look at the code and found out that :up can be a directory part. I guess this alone solves my problem.
8:49:42
ralt
I think what you'd want is something like (defun merge (orig &rest pathnames) (reduce #'merge-pathnames pathnames :initial-value orig))
9:02:13
thijso
although you might pick up some less ideal things if you look at code that doesn't follow conventions etc
9:05:26
jackdaniel
if there were no print I would have no guarantee that anything appears on the screen
9:06:09
jackdaniel
sure, still putting just a string would be less ideal, by screen I've meant 'standard output' of course :)
9:10:53
beach
It is easy to understand what it does (it is the Common Lisp READ function with extensions).
9:12:17
schweers
Thank you duckduckgo for telling me about some spaceship in the Marvel Cinematic Universe, before telling me about the lisp project :D
9:21:57
beach
saturn2: And it is actively developed and maintained, so you can ask questions about it. Either here or in #sicl.