freenode/#lisp - IRC Chatlog
Search
10:37:43
schweers
I tried array displacement in a project where performance is really important and it was really horrible. Obviously, YMMV.
10:48:15
ym
Do somebody has "error in process filter: Wrong number of arguments: (0 . 1), 2" messages in emacs 26.1 + slime?
10:54:15
_death
ym: yes, someone mentioned it lately.. the solution was to use slime bleeding edge (clone the repo)
10:56:02
_death
true.. but if you're using bleeding edge emacs, then it's likely that you're doing the same for slime and friends ;)
10:57:29
_death
well, I have patches for slime that fix such issues, and wonder how come no one else had them so they didn't get fixed
11:15:34
jmercouris
I prefer my editor not to crash randomly, I upgraded to 26, but I then upgraded again to 25 :D
11:20:57
schweers
jmercouris: why? did emacs 26.1 crash? I find it to be a tad slow, but seems stable so far.
11:24:05
jmercouris
to be fair, it wasn't a literal crash, but grinding to halt in which C-g repeatedly pressed until I could do something again
11:24:23
schweers
I had a few problems with elfeed, probably due to added records in emacs 26.1, but I could just remove the database. Not perfect, but was good enough for me.
11:39:31
jmercouris
I have an array like this 1,2,3, how might I make an array padded to 6 elements like this, 1,2,3,0,0,0
11:39:44
jmercouris
I tried make-array with initial-element and initial-contents, but you can't use both
11:57:34
shka
so i just ended up using it a lot for code that is supposed to work with both list and arrays
11:57:45
schweers
what I forgot to mention was that I was using simple arrays of a specific type, so a displaced array causes an indirection and possibly bounds-check (I’m speculating her). I expected a mild performance hit, but was quite surprised at how significant it was. I have no idea why it was that much, and sadly don’t have the numbers anymore.
11:59:07
makomo
hm weird. i would expect arrays to just have a dope/stride vector and a pointer to storage (and possibly a reference to the array that owns the underlying storage)
12:01:55
makomo
maybe because i'm just not used to seeing it in other languages (i don't know any language whose standard library comes with such features)
12:02:01
shka
i profiled code with statistical profiler and there was awfull lot of time in functions releated to garbage collection
12:03:13
shka
i suspect that sbcl just ensures that there will be no memory leak on specialized, displaced arrays
12:07:02
shka
well, each value in vector that someone displaces to is potentially about to disappear
12:07:32
shka
if life time of displaced vector is >> to life time of original vector problem may occur
12:16:50
pierpal
doesn't make much sense. a displaced arrays contains a reference to the base array and will prevent the entire array from being collected
12:38:46
pierpal
the content is held there by the fact of being contain e in the array. nothing umusual
13:15:22
xificurC
is using #1= reader macro considered bad taste? This seems to replicate anaphoric macro features in a funny way. (if #1=(+ 2 3) #1# 0)
13:17:13
beach
xificurC: Not very likely. The compiler typically does not take that sharing into account.
13:18:07
beach
But it is traversing it twice, and compiling similar but duplicate code for it each time.
13:19:38
beach
If you are lucky, it could use common sub-expression elimination, but it would do that even if you duplicate the expression.
13:20:05
beach
However, on today's architectures, it is not clear that common sub-expression elimination is worth the effort.
13:47:13
makomo
beach: "If you are lucky, it could use common sub-expression elimination, but it would do that even if you duplicate the expression." -- meaning that this elimination usually happens on some lower form, like IR?
13:50:44
Xof
I just spent 5 minutes trying to find a reference and failed, so my feeling might be wrong
13:52:00
Xof
I mean specifically list structure, but, again, I'm failing to find a reference so I might well be wrong
13:52:24
Xof
(and I use (do ((x #1=(complicated thing) #1#)) ...) all the time, so I'm a hypocrite as well)
13:54:19
schweers
I can’t help but think that its more readable to use a local binding (i.e. with a name) instead, at least in most cases
13:56:31
Bike
infinitely deep or long code is banned somewhere, i think, but i doubt structure sharing is banned in general
13:56:51
Bike
macroexpansion can get you that pretty easily, and e.g. the clhs page on load-time-value talks about the possibliity
14:25:22
beach
makomo: Yes, common sub-expression elimination is usually done on the level of a flow graph.
14:27:18
beach
ym: You can't legally transform proprietary code. It is called "derivative work" and it is subject to the restrictions of copyright law.
14:30:29
ym
What do you mean telling "transform"? I can use the proprietary code as a textbook and write my own free implementation of principals I learned.
14:31:40
Bike
it's "intellectual" property because it's tied to actual ideas, not some kind of physical labor
14:32:28
beach
ym: That's debatable. And that is also the reason why people who write free software avoid looking at proprietary code as much as possible.
14:33:44
flip214
clean-room implementations typically go the route of a description that's surely "different enough"
14:34:28
Bike
i don't think using the leaked code as a textbook would really be clean room reimplementation
14:36:01
flip214
Bike: no, surely not. you'd need a transcription step inbetween, eg. via an english text.
16:15:13
skidd0
I'm looking for a framework that's "lispy" to help me learn lisp, but hopefully without a lot of boilerplate
16:15:50
skidd0
for html/templating, I'd like to stay on the traditional HTML side, so something like Clip
16:16:37
skidd0
i've looked at hunchentoot but that seems to be best as a server, not an app framework
16:18:04
skidd0
from people with experience in them, not just my superficial overviews from project homepages
16:26:14
beach
skidd0: You can ask Shinmera about Radiance, since he wrote it. But he has his own channel I think. Can't remember the name.
16:42:48
on_ion
https://github.com/quakerquickoats/hoovy/blob/master/nova-js/parenscript-additions.lisp
16:52:32
on_ion
skidd0: i forget, that was a few years ago =) it felt like i had puppet strings on top of javascript though, which is my main aim with LISP, do more effect with less cause
16:52:46
on_ion
like setting up a bunch of gears to move the world but only having to turn a little wheel =P
16:53:24
skidd0
i am attracted to the bottom up, top down programming that Paul Graham's talked about in some of his essays
16:53:39
on_ion
human time and effort is precious , may as well get the machine working as we designed them (, prolog too)
16:54:15
on_ion
yes me too, and the idea of starting out prototype dynamically, then working toward (molding/guiding) a static implementation of whatever we are doing
16:56:24
skidd0
it's really nice to just "have an idea" > "make a basic prototype of idea" > "refine that" > "have another idea"
16:58:02
on_ion
yes =) when i pick up a guitar or piano, i just play, realtime improv, no premeditated design tech spec to implement, just let creation happen joyfully
17:13:19
on_ion
skidd0: certainly two sides of the same coin, as creation destroys and destruction creates, but in fun or not may decide which side we are looking at=)
18:09:35
ZigPaw
as I long time ViM user I found doom-emacs config for emacs and sly for common lisp interaction quite sleek and functional (and I can use org-mode as an added bonus).
18:30:08
sukaeto
(granted, there's no requirement to use Djula with caveman2, but it comes along for the ride when you ql:quickload caveman2)
18:32:35
sukaeto
also also: if you really want to get experience with Lisp. Eitaro Fukamachi's (the guy who wrote caveman) documentation tends to be pretty Spartan - usually a simple crash course on possible uses of the library. For the rest of it, you've got to look at his code.
20:47:19
ealfonso
I know it might be silly to ask this here. I want to write a simple web application. I have used clojure (ring, etc) and hunchentoot in CL. why should I prefer one over the other?
20:55:47
ealfonso
It seems that clojure is more 'sophisticated' for web app development, but I liked working with hunchentoot and I haven't used clojure in a while... I guess I'm looking for the lack of a strong reason to use clojure
21:13:49
aeth
Does anyone use unit testing with CI, especially Gitlab CI? Is testing beyond unit testing ever done in CL?
21:45:30
ZigPaw
aeth yes, look at tests in ceramic for example: https://github.com/ceramic/ceramic/tree/master/t there are integration tests there as well (not much sophisticated but they are there). And you can see travis.yml file how they are executed by CI (and it is quite similar I think to yaml file from gitlab).