libera/#commonlisp - IRC Chatlog
Search
14:07:13
pve
Hi, intrigued by White_Flame's "dot" macro suggestion, I tried implementing a version of it. I think it turned out alright, although I'm still unsure if it could be used to create truly readable code. Maybe in certain situations..
14:10:55
beach
Using operations is a much better idea that names of slots. But of course, I need to be careful with what I say, or else it will be branded as "oop nonsense".
14:11:30
pve
There's one thing I'm wondering: should the default placement of the "current input value" to the chain of operations be first, or last. I.e. (+ _ 1 2 3) or (+ 1 2 3 _)
14:13:56
pve
many functions have keyword or rest parameters, which could mean that "first" is a better default
14:14:00
hayley
I think "arrow" libraries have multiple macros, one macro for either case, and one which allows using a (rather unhygenic) name like <> to specify where the value should go.
14:17:58
hayley
As an aside I'm not a big fan of access-esque accessors, since you can write accidentally quadratic code when provided with lists rather than vectors, or perhaps alists rather than hash tables here.
14:21:41
hayley
Anyways; underscore-predicate might be better written with AND rather than WHEN, and I like to use a pattern matching library for parsing list structure.
14:28:41
pjb
pve: http://groups.google.com/group/comp.lang.lisp/msg/1bab4b5bae1fdca3 http://groups.google.com/group/comp.lang.lisp/msg/190d771c0e033a1c
14:32:14
White_Flame
really I consider such path traversal operations to be most appopriate for regulard datastructures, not general objects
14:32:49
hayley
beach: A fun word to use is "anti-modular". (Reading logs - what is a "class" if not an "OOP class"?)
14:34:03
beach
hayley: Honestly, I did not read what cedb had to say after those initial "nonsense" comments.
14:39:06
beach
If I felt like arguing, I might have spent more time, but those initial comments gave me the distinct impression that it would have been a waste of time, and that the exchange would have been painful.
14:40:12
beach
It is scary to think that there are people with that attitude working as professionals in the software industry, creating applications for us all.
14:41:51
hayley
Nowadays I get told off for arguing about things that I should "just let people enjoy"; i.e. they're doing whatever they're doing for kicks, but often they have "reasons" they argue for themselves, and those reasons conveniently disappear whenever one argues against them.
14:42:44
hayley
Off topic for #commonlisp, but yes, I would not recommend arguing. (Not that you need my advice.)
14:49:21
beach
Yes, I see what you mean about those "reasons". I just don't handle such exchanges very well anymore.
14:55:16
hayley
It's happened twice when I try writing; though maybe I shouldn't be surprised, as I published the second quite close to two years after the first. I try not to think about it too much; if they aren't working as well, in theory I can out-perform them.
14:57:32
hayley
That theory is still optimistic, to say the last. It doesn't help me feel better about response I saw, even though there's little reason for me to. And there is the sense that changing someone's mind is hard; I am necessarily at a "disadvantage" in convincing them of anything.
15:02:12
beach
I understand from various research I have learned about lately, that, especially in the USA, there is now a tendency to consider every opinion as "valid" or "true", as documented in the book "The Death of Expertise". It is entirely possible that this movement has spread to other countries. Or, it is possible that cedb is from the US and part of that movement.
15:02:50
beach
And I just realized that such a movement could have some very negative effects on the software industry.
15:04:40
Bike
i don't think you need to read much into it. cedb presumably didn't think every opinion is true, given that they were denigrating OOP as nonsense or whatever. they were just uninterested in other ideas is all.
15:07:29
hayley
I can't say anything on expertise; but I have observed a general sort of response that "experimentation" of some sort is good, even when the results are easily predicted. I'd rather "experiment" with situations where results are much harder to predict.
15:09:01
hayley
Ironically, I've also been accused of only being able to think about how programming works for large companies, when I've only had one job related to programming in my life.
15:18:59
hayley
I would not frame it as anti-intellectually (is that a word?) as a name like "the death of expertise" would suggest, but their argument did end up using "professional programming" as a sort of "other" that I was somehow a part of, so my arguments should not apply to them.
15:22:26
beach
A word that is frequently used in these situations is "elitist", and I have frequently been accused of being that in the past. What is often meant is that I am accused of holding this shocking view that programmers should actually know something about the accumulated wisdom of the field.
15:24:44
hayley
Some people said they were upset because they disliked my writing so much, yet they learnt about some implementation techniques (like inline caching) from the references.
15:26:25
pjb
Yeah, lisp is not elitist enough, we should make several circles of ever more elit lispers.
15:28:19
hayley
pjb: On the contrary, when I first joined #lisp on Freenode I was pleasantly surprised that I could meet people like beach and other implementers; a group which I thought I'd be too lame to meet. Granted, I probably was.
15:31:59
beach
So to get closer to the topic, the other day, someone suggested a tool for making it easier to submit a WSCL issue. I think that would be a good idea.
15:33:46
yitzi
And maybe include the ability to automatically generate current implementation practices section.
15:36:01
Bike
what was scymtym working on exactly? i mean, i know he has a lot on his plate, but i thought some kind of web rendering of WSCL or the standard was involved
15:37:44
beach
Yes, one thing he did was a rendering of the standard where hovering over some relevant section would display an issue. It could be an X3J13 issue or a WSCL issue.
16:51:00
jmes
Let's say I write (loop for x upto 100 do (sleep 10)) in a REPL, am I able to inspect the value of x as that's running? If so, how would I do that?
16:52:02
jmes
My issue is the loop blocks the REPL so I can't just ask it what x is. I'm guessing there's an obvious answer, but I just don't know it.
16:56:02
White_Flame
you can interrupt it and inspect it in the debugger, you can (setf *x* x) to be able to read its updated value assuming you're threading
17:00:02
jmes
White_Flame: okay so if I make *x* global and I spawn the loop in a thread, I should be able to read *x* without interupting. Let me give it a shot
17:06:00
jmes
I don't know what I was thinking before. It's obvious that I can only get at stuff in non-global scopes via the debugger so this doesn't help much. But at least I know the obvious now. Thanks again White_Flame
17:10:07
Shinmera
jmes: fwiw you can share local things with a thread via closures. Eg: (let ((x 0)) (bt:make-thread (lambda () (dotimes (i 10) (incf x) (sleep 1)))) (dotimes (i 20) (print x) (sleep 1)))
17:13:39
jmes
Shinmera: that's cool! I assumed threads didn't close over variables for whatever reason.
17:21:02
White_Flame
you could give that same lambda to multiple threads, and have them all unsafely bang on that same X
18:31:30
pve
White_Flame: Could you please elaborate a bit on what you meant earlier by "regular data structures"? Did you mean situations like (dot binary-tree left right left value) or (dot nested-arrays 0 1 2 0) where you know the type(s) of what you're accessing?
18:57:21
White_Flame
where there's a regularity and thus a notion of "path" to it, not just a random hodgepodge of accessors, functions, and arbitrarily interconnected heap objects
20:15:54
pve
I suppose it would be difficult to have one single general "dot" construct offer convenient path traversal for every case out of the box. Instead, I guess one could define, say, "tree-dot" on top of dot that simply translates the somewhat "nicer" path (tree-dot tree left right value) into the actual accessors (dot tree tree-left tree-right tree-value).
20:16:26
pve
although writing tree-dot directly without any general path-traversal construct is probably just as easy
20:19:19
White_Flame
right, that's because the core function dispatch in CL isn't owned by any singular object to 'dot' from
21:17:53
jcowan
it was exhilarating to point out that for the last four days, every time I said "What should I do now?" the answer was "nothing", and this was because it was assumed there was no point in assigning me any job since I obviously couldn't finish it.
21:18:46
jcowan
However, the "process experts" decided I should just do nothing today, though I had to press them to actually _make a decision_ rather than saying "If you want, you don't have to do anything."
21:19:10
jcowan
I had to point out that on that basis they could sue me for fraudulently claiming today as a working day when I hadn't worked.
21:19:53
jcowan
So in terms of productive output, I did nothing this week, but in terms of stress, it was definitely a workweek, so I don't feel bad about having been paid.
0:18:57
jeosol
jcowan: congrats. leaving a job is never easy. Most who are there see you are a traitor. It can be a difficult experience. For some others, it can be worse. I have heard of people's badge and laptop access being disable the moment the give notice.
0:20:28
jcowan
basically AT&T runs out of money every August and lets go a lot of contractors, and then hires a new set (or the same set, whichever) in January.