libera/#commonlisp - IRC Chatlog
Search
8:35:10
ulfvonbelow
so I know for iterating over an arbitrary sequence (list or vector) I can use (map nil function seq1 ...), is there a standard way to iterate over a particular subsequence? So like (map nil ...) but with :start and :end arguments?
8:49:18
heisig
What is the rationale behind forge? Is it to overcome some problems of ASDF, and if so, which ones?
8:50:38
Shinmera
ASDF doesn't deal with version constraints, is by necessity in-process, can't distribute the build, and can only deal with Lisp, not other languages. It also has some other design problems that I don't like.
8:52:39
heisig
I agree with almost all these points. Except the one that ASDF can only deal with Lisp. I cheerfully build my C libraries with ASDF :)
8:53:42
Shinmera
the design, especially it forcing the cache of operation objects, is just not meant for it
8:54:30
heisig
If Forge is somewhat language agnostic, it would make an excellent replacement for CMake and the like. C++ is in dire need of a non-broken build system.
8:56:00
Shinmera
The lisp language module is about 100 lines at the moment. https://github.com/Shinmera/forge/blob/master/modules/lisp/lisp.lisp
8:57:09
Shinmera
I mean, eventually I'd like it to do everything, but we'll have to first see whether it scales at all
8:58:16
heisig
Ooh, there will be mods? That sounds awesome. Good luck with everything - I hear writing a reasonable build system is a breeze :)
9:05:12
hayley
(By the way, I took another stab at optimizing the table and it's within 15% or so of Java. But one of the things is to declare (safety 0), and I'd rather see what I need to remove from (safety 1) to make it safer.)
9:05:54
hayley
(No, I still don't have a proper way of testing tables, and I think my permission to use university servers is gone.)
9:06:51
hayley
I...have not factored in such a thing, but hypothetically it shouldn't cons unless resizing, and I don't think the benchmark provided with NBHM causes resizes that often?
9:08:54
hayley
Yes, right. And the Java compiler probably is a bit smarter when it warms up. FWIW I had to disable bounds checks on 42nd-at-threadmill, as SBCL didn't spot that (LOGAND INDEX (1- LENGTH)) closes INDEX under LENGTH.
9:09:31
Shinmera
Portacle is a project that has caused me a lot of pain, and I no longer have the mental strength to sustain more of it, so it stands unmaintained.
9:13:42
Qwnavery
I didn't even know you existed until now and your presence in the lisp community is huge. :/
9:15:43
Shinmera
Personally I think that's a far more impressive thing than the stuff I clobber together :)
9:16:42
hayley
Shinmera: From someone who was told not to be so hard on themselves yesterday: don't be so hard on yourself.
9:16:51
jackdaniel
as much as I agree with all the praise Shinmera receives, I feel obligated to remind about the channel topic
9:17:44
heisig
Praising Shinmera is very much on topic for this channel, isn't it? Then again, we can also carry our praises to #shirakumo :)
9:18:20
Shinmera
hayley: Actually I'm fairly certain SBCL does do bounds check elimination in some cases, eg when the vector length and index bounds are known.
10:16:48
akater[m]
dolist and other similar constructs are wrapped into (block nil ..). Why not (block dolist ..) ?
10:16:48
akater[m]
I'm asking because I write similar macros and I tend to use specific names. But I also want to follow conventions. Anything wrong with (block dolist ..) and such?
10:19:45
jackdaniel
also (reason-wise) DO is the basic lisp iteration construct, so if you build your own iteration macros they will likely expand to do
10:20:18
jackdaniel
and do already introduces a block nil scope, adding one on top of that is of course a possiblity but quite unnecessary
10:21:45
heisig
The implicit (block nil ...) convention is just to have RETURN do the 'obvious' thing.
10:25:16
akater[m]
At least when loops have different names, it's better to have distinct block names. So overall it's marginally better to have them rather than not. And I don't expand to do (never actually learned it, and have very little motivation to). I expand to block-let-tagbody — to prog, basically.
10:33:59
akater[m]
Given that block-let-tagbody is prog, it is certain that I do what prog does. Meanwhile,
10:33:59
akater[m]
— That doesn't sound like what prog does. But anyway, I just don't find do intuitive.
10:34:18
akater[m]
BTW does anybody know of an implementation of a “cons tree” walker that detects cycles and offers implicit tagbody? I couldn't find any and wrote one but I have a hard time believing it's not there already.
10:59:57
pjb
akater[m]: note that blocks are lexical, ie. compilation-time constructs; normally (block foo (block bar (block nil (something (return-from bar result))))) should cost the same as (block bar (something (return-from bar result))); using block nil let us use (return result) instead of the more verbose (return-from name result).
11:00:44
pjb
akater[m]: in your own macros, you can let the user specify the name of the block. cf (loop named foo do (return-from foo))
11:06:18
akater[m]
pjb: “named” syntax is not present in standard dosmth macros the interface of which my stuff mimics most often.
11:14:20
jackdaniel
result is usually optional, so adding one more variable at the end doesn't hurt I think
11:19:30
jackdaniel
http://www.lispworks.com/documentation/HyperSpec/Body/03_dd.htm also speaks of parameters (not parameter variables)
13:01:03
_death
ordinary job posting sites would be nice as well.. so that if I search "lisp" I get at least one posting :)
13:04:35
jackdaniel
ACTION expects of some brave lisp hacker developing 90%-feature-complete job posting and browsing engine after reading this exchange
13:34:34
etimmons
Shinmera: Very nice :). If you're going where I think you're going with the list of module names passed to define-project I'm very excited.
13:34:44
etimmons
Shinmera: ASDF's single :class argument has annoyed me a couple times in the past.
13:35:55
Shinmera
parsing is still done by the first listed module, but yes you can list several. one extra module I already have is to allow specifying versions based on git repo state.
13:40:30
etimmons
Yeah, I saw a git module in the repo! It currently looks like any module but the first does nothing (other than being loaded), but I figured that's because it's still being developed
13:42:13
madnificent
Is there any good infrastructure for managing processes? Thinking of moving some heavy-hit components from Elixir to Common Lisp due to processing constraints on the former.
13:42:20
etimmons
Yeah, I imagine that's tricky. But I was referring to the full list of modules not being attached to the project instance. Or are they and I'm missing something?
13:44:21
etimmons
Shinmera: In https://github.com/Shinmera/forge/blob/master/project.lisp#L143, only the first module is used; the rest are load-module'd and then discarded.
13:44:42
etimmons
I was expecting all modules to either influence the project class or be shoved into a slot for the project
13:45:08
Shinmera
Once the project has been parsed I'm not sure what the purpose of the modules would be
13:49:31
Shinmera
etimmons: right. auxiliar modules so far were intended to provide extensions somewhere in the system that don't directly affect project parse behaviour.
13:50:30
mfiano
Shinmera, etimmons: Is there a reason you both are independently developing similar tools? Do the ideas not overlap in many ways or something? I just thought it might be better to create a suite of tools like the SICL project that can be used by anyone wishing to create a build tool.
13:50:46
etimmons
Shinmera: I was assuming those methods would be specialized on the project class and you would do some sort of dynamic mixins stuff to have all the modules influence the project class
13:51:19
Shinmera
madnificent: unfortunately to my knowledge there's no current implementation with support for lightweight threads, and doing it manually is a pain.
13:51:25
madnificent
jackdaniel: Looking for higher abstractions like asynchronous messenger abstractions.
13:52:53
Shinmera
mfiano: etimmons is working on a ql replacement. I'm working on an ASDF replacement. We're already talking about integrating the two.
13:53:08
madnificent
Shinmera: Perhaps I got dragged away with it being closer than jackdaniel's idea. We can work with worker pools. We currently process ~5k queries per second. The many threads in the BEAM VM have their cost for our type of workloads in terms of immutable data structures anyway. We probably don't need over 20k open connections anyhow so I think we should be able to work with dedicated threads if need be.
13:54:01
madnificent
We certainly need multithreading for the processing load. We currently scale 24cores with 48threads very linearly and I don't see why we wouldn't be able to replicate that in Lisp when I look at the workload.
13:54:04
Shinmera
madnificent: Good luck! I rewrote my chat server thing in elixir since I couldn't get it stable in Lisp, but that's saying more about me than anything I imagine :)
13:54:29
mfiano
I've been using CLPM for a couple months and have been happy. Having an ASDF alternative too would be even more welcome :)
13:57:31
etimmons
mfiano: Yeah, I'm pretty excited about Forge. Both it and CLPM take the approach of doing the heavy lifting outside of the development image.
13:59:11
Shinmera
One of Forge's main goals is to allow building in the current image with no trace left behind of the build operation itself.
14:00:06
jackdaniel
etimmons: while mere a prototype -- https://gitlab.common-lisp.net/dkochmanski/esdf (it even has asdf compat layer, I've made ql work with it)
14:00:47
mfiano
A software eternity ago. I must jump to Python in time for the 4.x compatibility disaster
14:01:04
jackdaniel
Shinmera: I had a sour exchange on #lisp a few minutes ago about that ,) either way, time for me - laters
14:01:54
jackdaniel
etimmons: dont' take it too seriously, it didn't pass to a "usable" stage and my projects are already time-starved as they are
14:04:25
etimmons
Xach: Total change of subject, but can you make sure Planet Lisp is pulling its feed from https://www.timmons.dev/tag/common-lisp-rss.xml ? Some day I'll probably blog about something other than Common Lisp :)
14:09:19
madnificent
Shinmera: problem with Elixir is that you can't mutate objects. We parse and transform SPARQL queries and the AST becomes fairly large. Transforming that means transforming many tiny things. I am a bit in doubt as the BEAM knows it can throw away a thread, where the Lisp runtime has to execute GC across threads once everything has been processed.
14:09:51
madnificent
Shinmera: Do you know of good queues and/or mailboxes libraries? If anything has a good name, I'd love to know about it.
14:10:10
Shinmera
Haven't used anything myself so I can't say, I just remember hearing of Erlang-inspired libraries.
14:16:22
etimmons
Xach: Thanks! Also, not sure if you saw, but I did open a PR for a compressing stream in salza2.
14:17:24
etimmons
Xach: I also opened a PR on QL controller to try and improve dependency extraction for package-inferred-systems
14:37:57
mfiano
madnificent: I remember. Though sexml is the library of yours I used the most back then :)
15:00:22
Josh_2
Okay MOP question. I have a library that heavily relies on a metaclass I have made, however when I first load the library I have to make an instance of a class that uses my metaclass 3 times before the slots are initialize properly
15:03:05
Josh_2
Man I get some weird behaviour with MOP until I go and recompile that specific class
15:16:45
Josh_2
Okay now I'm really confused. When I make-instance my my repl and check the slot-values in its superclass they all look how I expect them
15:17:04
Josh_2
however when I make an instance of the same class within a function call none of the slot-values exist
15:24:03
Josh_2
well my execution function is getting double called, I'll have to figure that one out
15:25:20
madnificent
Any benchmark comparisons including Common Lisp (SBCL preferably) containing many threads and if possible containing GC intensive workloads?
16:04:02
madnificent
Related to netfarm perhaps? Anything is welcome hayley and I should see DMs arrive too.
16:07:46
Shinmera
I don't know the broader context. I wrote the initial lockless hash table implementation, and she's been hammering away at it for a while.
16:34:09
madnificent
Shinmera: was that incompatible with later SBCL releases? I checked something about it but dismissed it for some reason.
16:51:23
Gnuxie
she will explain it when she wakes up, but as i understand it Threadmill only works with older versions of SBCL, and she doesn't recommend her portable hash table library over luckless yet.
16:52:52
Shinmera
If anyone wants to pick up the slack and document the library + add some more small useful primitives like a queue and a stack, that would be great
16:58:16
Gnuxie
Also madnificent, if you need a portable mailbox and queue library "safe-queue" by deadtrickster is good, but it isn't lockless or anything fancy iirc.
19:14:02
Josh_2
I am trying to (setf (slot-value <instance with my own superclass> 'txn) 0) and I keep getting the condition that slot is missing. I have checked both the direct and effective slots
19:14:14
Josh_2
its not missing. Do I have to provide a method for something like slot-value-using-class?