freenode/#lisp - IRC Chatlog
Search
13:22:51
xificurC
well this was fun to read. not. Let me ask something more on topic. I've seen people link to the OUT macro from ytools several times. However I don't see the package (ytools) in quicklisp. Is anyone using it? Is there a fork with a different name where the OUT macro is available? Or does everyone just stick to FORMAT?
13:26:35
xificurC
this is a link (pdf) to the docs if someone doesn't know what the heck am I talking about - http://cs-www.cs.yale.edu/homes/dvm/papers/ytdoc.pdf
13:29:04
xificurC
_death: link? Do you have some accompanying docs? Do you know of other FORMAT alternatives?
13:32:05
_death
it's also extensible, for example https://gist.github.com/death/4e273d14e671a3c64f3be10cab2aa1b2
13:56:01
elderK
_death: Also, unrelated: When I see your name, I think of Death, The Grim Reaper from Terry Pratchett's Discworld series :)
13:57:26
elderK
On another tangent: I wonder how many CL / Scheme programmers there are in the world. Like, those capable of writing CL / Scheme in a professional capacity.
13:58:00
elderK
I have specified "CL" and "Scheme" rather than "Lisp", because I don't want to include say, AutoLisp or Emacs Lisp :P
14:00:45
elderK
"Perhaps there is some Great Filter, that extinguishes most programmers before they become truly enlightened?" :P
14:01:08
elderK
Or perhaps the majority of the Lisp programmers are hidden somewhere, sleeping. Hibernating maybe :P
14:01:54
elderK
Or perhaps, the majority of programmers in the world are simply too young, too naive, too immature? And the Great Lispers are waiting for us to wisen before bestowing us with their knowledge? :D
14:11:12
dlowe
It's a somewhat unpopular opinion but I think the mystique of lisp is misplaced and actively harmful to its popularity
14:12:18
_death
there are some quantities that could help estimating.. e.g., number of quicklisp installs (Xach publishes quicklisp data every now and then.. guess he could log IP addresses or User-Agent for better estimates..), number of github users with CL repos, or committers to CL repos, number of lisp subreddit subscribers, number of stackoverflow users asking/answering CL questions, etc.
14:14:17
ogamita
xificurC: the only criterial for quicklisp is that it should have an asd file and compile without error on sbcl.
14:14:42
elderK
It would be interesting to get like some hard numbers on: How many people say, install some CL implementation, tinker with it for a little, then leave it behind. Of the number that do, you know, play for awhile and leave it behind, some fraction of them will have taken something neat from the language, from whatever dialect they may have used. Then the other, I assume the larger fraction, will simply leave it behind with nary another thought.
14:15:47
elderK
It's like recently I learned that one of the people who inspired me originally to look into Lisp, actually doesn't seem to think it's useful for day-to-day stuff. That amazes me. Instead, he believes that it has a lot of lessons to offer, things to learn and take from.
14:16:20
ogamita
elderK: in a professional capacity, is the strong criteria in your question. Not lisp…
14:17:40
elderK
dlowe: I'm not sure it's necessarily a Lisp problem - but more an FP one. Languages such as Standard ML or Haskell have "mystique" too. Although, I'd imagine Haskell is somewhat more popular than Lisp. Of course, that's just my intuition - I have nothing to support that claim.
14:18:05
ogamita
elderK: given the statistics on the age pyramid of lisp programmers, we could assume that you need 20 years experience in programming to become a professional lisper. That's about the age when a lot of programmers switch to something else.
14:18:22
shka__
i heared some time ago advice to avoid using print-object for printing unreadable stuff, however, it is ok if implementaiton is wrapped in the print-unreadable-object macro, isn't it?
14:18:38
beach
ACTION was going to say that it doesn't seem to be the case that any great knowledge is required in order to program professionally, but he won't because he will surely be contradicted.
14:18:45
ogamita
elderK: otherwise, given that half the programmers are newbies with less than 5 years, yes, the majority are simply too young.
14:18:59
elderK
Well, that's perhaps one reason I've been investing so much time over the past month. I've been investigating / playing with Lisp on and off for damn near ten years - but never made the "jump." But, I've been getting more and more... not sick of - something else - of C and C++.
14:19:23
elderK
I've always figured: If I was going to move to something other than C or C++, I'd move to Lisp rather than something like Python or Scala or *shudder* Java.
14:19:32
pfdietz
I'm not sure it takes more time to master Lisp than it does to master C++. The latter seems to be rather complex these days.
14:20:33
ogamita
elderK: I think he's misdirected. you can verify it yourself, by translating some non-trivial lisp program you wrote, into Java or C. Try to keep the lisp style.
14:20:44
elderK
pfdietz: I agree with you - I think CL is much smaller and much more understandible as a language these days compared to C++. That being said, it's one thing to "understand the language" and another to apply it well.
14:21:18
elderK
ogamita: For many years, I wrote C and C++ code in a way that could construed as "more functional than average"
14:22:33
ogamita
You can do something. It certainly gives better C programs IMO. But it's hard for the author, because so much infrastructure is lacking (no GC, no conditions, etc). And coworkers are always complaining…
14:22:39
elderK
dlowe: Iono. "Idiomatic" C++ changes with every revision. More and more, it involves making good use of TMP, too, in some capacity. You don't need TMP and stuff to deliver a good product, of course. And what is "idiomatic" differs depending on who you speak to, but, by and large, it seems to be heading in that direction. And has been, for quite some time.
14:24:59
elderK
Iono. I spent a lot of time last year and earlier this year, "modernizing" my C++ capabilities. I spent a /massive/ amount of time experimenting with template metaprogramming and studying a vast number of libraries involving it, as well as others generally thought of as representing "great modern C++." I completed that process with an increased appreciation for CL and Lisp in general.
14:25:31
elderK
I mean, I've appreciated Lisp's qualities for a long time. But, learning and tinkering with C++ TMP for /real/ work, well, it left me desperately wanting to do such metaprogramming in something like CL.
14:28:46
PuercoPop
I want to prefix with 0s a number. From reading 22.3.2.2 my understanding is that (format nil "~2,0D" 1) should work. However I get 0 is not a character
14:52:39
pfdietz
Using cl-string-match right now, although I wish it was on a git site I could do pull requests on.
15:36:05
ogamita
Wild guess: reduce the --dynamic-space-size parameter? Nah! I don't think that'll work.
15:36:19
heisig
beach: That happens when you have too many funcallable-instances. These are allocated in immobile pages.
15:36:26
ogamita
I would have thought sbcl was able to lock down pages. Perhaps there's an OS limit on the locked down pages.
15:37:16
heisig
As of how to fix it - I don't know. I stopped making my most frequently used objects funcallable. But in your case that won't work.
15:45:30
dim
I want to ask if it works in CCL, as a reference point, but it might be that you're working on something that is tightly coupled with SBCL at the moment?
15:47:14
dim
my current trick is to develop interactively using one and build images and run tests with the other, and I've got used to using CCL interactively in the SLIME REPL by default, and SBCL for saving images and running tests
15:48:12
dim
of course using (sb-ext:restrict-compiler-policy 'debug 3) in ~/.sbclrc makes the experience of interactive development almost the same using either one of those, I still have a slight preference for CCL in interactive mode
15:48:42
dim
I like using defstruct, for instance, because I'm lazy, and CCL knows how to redefine them on the fly in a way that mostly works
15:52:26
dim
v1.11.5 from memory, unless you're using Macos Mojave, then v1.12-dev.4 as published on https://github.com/Clozure/ccl/releases
16:05:33
beach
With CCL I get an error that I am calling a standard reader method with one argument, but it requires two. :(
16:10:58
dim
I've read that rebuilding CCL from sources is fast and easy, all done from the CCL REPL ;-)
16:13:33
dim
rme from CCL mentionned that they have projects to make their compiler smarter, because it's quite dumb to this day, and maybe, maybe SICL would help, longer term
16:14:35
dim
anyway I'm having too many ideas, and I'm playing with your time here, sorry about that, I'll go back to fixing bugs in my job's software written in C now :/
16:18:33
dim
yeah I know... I don't think that in this instance I could have convinced the team to use CL instead, even Python was out the picture because not everyone there knows how to program in Python... and in truth our main software (an extension to PostgreSQL, named Citus, providing distributed query planning etc) has to be written in C anyway
16:20:01
dim
I considered building PL/CL (we have PL/Python, PL/C, PL/...) a couple times, but I'm not knowlegeable enough yet to make that happen: we would need a background worker running the CL image and then lighter CL processes in the PostgreSQL backends where you could run local things and communicate with the central image, I guess
16:27:02
ogamita
I don't think you'd need a backgroud worker (unless that's how pl languages are made).
16:35:46
dim
yeah a PL doesn't need that, I was more thinking in terms of the developer experience of running CL code, usually you expect a long-lived CL image where you can host things that outlive a PostgreSQL transaction
17:33:18
elderK
ogamita: I wish there was like, an embeddable CL where it was easy to like, disable certain functionality. Not just by say, providing a REPL that itself provided less functionality but by actually fundamentally disabling certain stuff.
17:33:51
elderK
My inexperience is showing here, as I imagine you can achieve the same without actually requiring the ability to like, "disable parts of CL"
17:42:30
dim
sandboxing CL might be a nice byproduct of beach work of first class environments, if I'm following/understanding correctly what he's doing here
17:44:38
pjb
elderK: I guess you could take ecl sources, and #ifndef each functionality you want to be able to disable.
19:09:45
meepdeew
Most seem to "specify font changes in the printed manual and (where possible) in the HTML output."
19:11:15
meepdeew
I know there's @emph, which surrounds text with underscores, which I am using, but I'm looking for an alternative to @strong{..}, which puts asterisks around text because it could collide with ear-muffed CL variable names.
20:24:05
dim
yeah exactly, it's pretty visual, and I'm playing around with McCLIM these days, so I though I would do something
20:36:57
dim
yeah sorry not there yet, I like the idea of distributed social networks though, so someday I'll have a deeper look at it
20:37:36
jackdaniel
no-defun-allowed: I find central entities processing my data way more exciting too :)
20:38:24
dim
jackdaniel: thanks! well (clim:compose-in clim:+green3+ (clim:make-opacity 0.3)) is doing the trick for me, overlapping is pretty obvious given that
20:39:14
no-defun-allowed
Mastodon is about as distributed as email is. You can send a message from server A to server B but if you only have an account on A and A goes down you can't transfer it to B.
20:39:19
jackdaniel
no-defun-allowed: me niether, just saying it is more exciting (like plain email is boring but gmail is exciting etc)
20:39:59
dim
jackdaniel: the code for the presentation is at https://github.com/dimitri/AdventOfCode/blob/master/2018/d03viz.lisp if you want to play with it / improve it / optimize it (it's a tad slow, like more than a second to reach full display for me)
20:46:53
phoe
Sigh - I really "enjoy" the feeling that I finally sit down to write some Lisp again, start tweaking my old game project again, and I end up noticing that I need to yak shave again to get that one more thing from the language that I need.
20:47:56
dim
well stupid me it takes about that time to compute the numbers that are displayed, so I don't think the drawing actually has anything to do about the lag here, sorry about that jackdaniel
20:59:49
phoe
MOP question: I have a method and a list of arguments. How can I check if the list of arguments I have suits the method specializers?
21:02:03
Bike
probably something annoying then. i don't think mop exposes a "does this method work" function for you.
21:02:37
phoe
Well, that behavior is a required part of generic function dispatch, so I expect it would be available somewhere.
21:02:58
fortitude
phoe: what about using COMPUTE-APPLICABLE-METHODS and seeing if the method in question is a member of the result?
21:03:18
Bike
compute-applicable-method is what does it. that particular solution sounds mildly annoying though.
21:04:04
Bike
(every (lambda (arg spec) (etypecase spec (eql-specializer (eql arg (eql-specializer-object spec))) (class (typep arg spec)))) args specs)
21:10:54
phoe
I've made a moptilities ticket for including that predicate. I think it's a good idea to add it there.
21:11:52
Bike
there's also a small possibility of other kinds of specializers. someone was working on that in sbcl i think.
21:16:22
phoe
I think I might safely treat these as very implementation-defined experimental stuff then.
21:24:17
eminhi
Are there any style rules for using check-* and assert-* for naming? They are very visibly highlighted.
21:26:20
phoe
eminhi: a common rule I've found is to place them as high in function bodies as possible.
21:26:47
phoe
They are used for validation of function inputs, and are often also used as typechecks in modern implementations.
21:27:43
phoe
Or even (defun foo (x) (assert (typep x 'integer)) ...) that is very roughly equivalent to the former.
21:28:39
phoe
The compiler can infer that if control reaches ..., it must have been because X was an integer, so it can generate code optimized for integers.
21:29:39
fortitude
phoe: AMOP has SPECIALIZER-DIRECT-METHODS/ADD-DIRECT-METHOD & co defined for specializer metaobjects
21:30:24
pfdietz
Internally, SBCL uses "aver" instead of assert. The difference is assert has some baggage involving restarts that imposes an implementation overhead.
21:31:28
pfdietz
I think. The condition had better be there so the compiler can propagate it forward.
21:35:58
Bike
fortitude: there's not enough to use them widely. things in mop that are based on specializers are like that just so classes and eql specializers both work.
21:36:41
pfdietz
And sb-impl::%failed-aver has return type NIL, which means it cannot return, and the compiler takes advantage of that.
22:03:50
emaczen
I can't remember 100% if it was just disabling the low level debugger or if it was completely removing immobile code
22:25:54
v0|d
dim: (car (reduce (lambda (acc atom) (if (> (cdr atom) (cdr acc)) atom acc)) lst :initial-value '(not-found 0)))
22:41:49
pjb
(let ((transposed-list '(((nil . 1) . 4) . 2))) (loop :for current = transposed-list :then (car current) :while current :maximize (cdr current))) #| --> 4 |#
0:09:43
aeth
A lot of good discussions in https://old.reddit.com/r/lisp/comments/a2yvuz/5_reasons_why_lisp_games_suffer_and_proposed/