freenode/#lisp - IRC Chatlog
Search
12:47:06
easye
Cymew: thanks for the docs on ASDF. Definitely a better starting place than existed before for users to get useful information.
14:13:09
pfdietz
I could use a javascript in CL. There's an implemenetation described in cliki, but it's like nine years old.
14:18:18
p_l
parenscript is about easy writing of JS from CL. There's also JSCL which attempts to implement a proper CL in JS
14:36:44
Cymew
easye: I need that myself sometimes, and fare was kind enought to provide some debug suggestions which Robert has now put in the manual. That is good, as I will forget my note about it... ;)
17:36:42
anlsh
Hi, can anyone tell me how exactly I can submit a patch to the Alexandria gitlab? I went over to the merge requests tab, saw the "email new merge request" tab, clicked it, and it gave me an email.
17:37:30
anlsh
It seems like I need to send an email to the generated address with a subject of the url to my branch
17:38:14
anlsh
But also the "fork" button on the project is disabled, so do I just need to create a bare repo to push it up?
17:38:35
_phoe
anish: the fork button is disabled if you have hit the max project limit on your account
17:45:04
anlsh
alexandria's readme should also be updated too, since it still says to submit patches to the mailing list
17:56:07
anlsh
More of a lisp question in general, are you not supposed to export new symbols when updating a package?
17:57:15
refusenick
The "cells" library has me thinking: would it make sense to have a graph database consisting of queries to a network of CLOS objects?
17:57:29
refusenick
I suppose it's more interesting as a thought experiment than something practical.
17:59:50
Xach
Hmm, I'll have to dig a little. I can't find it from a quick googling. It's on my bookshelf somewhere.
18:00:21
Xach
Joe Marshall also wrote a series of blog posts about versioned persistent CLOS objects in a project called ChangeSafe. I think the code (not finished?) is public for that, too.
18:00:41
refusenick
Lisp is a compiled language, but for the kind of long-running, distributed systems becoming more and more common, a homoiconic representation seems ideal for runtime optimization. Is there any work on CLOS and partial evaluation?
18:02:45
refusenick
Xach. Yeah. Automatically tracking versioned objects and picking up on optimizations missed by the programmer could be a good way to compete with static languages.
18:03:50
refusenick
I know I'll get flak for this, but I can't see CL being the language of the future because it doesn't have security.
18:04:26
refusenick
I know there's ongoing work to support it via first class environments, but it might be easier from the ground up, with support for CL built atop.
18:04:58
_phoe
this is a big sore point, correct, and first-class global environments are meant to solve exactly this.
18:06:43
refusenick
Might it be easier to build a language wholely out of first class environments a la Kernel or Io and provide a compiler to this from a minimal core of CL (tagbodies and other primitives) to compile each module into its own proper sandbox and fix interop issues as they arise?
18:07:35
_phoe
Or rather, you don't need to build a language wholely out of FCE - you simply need a way to chroot like in all unices.
18:09:38
Xach
I am also not especially persuaded by "if you don't do X lisp will die", because Lisp has been dead for a while.
18:09:47
Shinmera
This is probably gonna get drowned out in the current debate, but I made some good progress with Alloy and am really starting to like the widget system I came up with. https://www.youtube.com/watch?v=8-NJrJqDkrQ
18:12:00
Shinmera
It's a chain of Alloy -> Simple -> SimpleGL -> Trial (my game engine). You can also use an independent GLFW backend for the last part, or implement the Simple interface for different renderers.
18:13:24
Shinmera
The GLFW backend allows making multiple top-level windows, but Trial does not (because I don't need it there)
18:13:42
refusenick
Shinmera: I was about to dive into learning everything about CEPL to make an animation backend for Maxima, but now I'm conflicted!
18:15:44
Shinmera
The SimpleGL extension it provides and I use directly uses GL though, whereas CEPL wraps all GL access in a lispy framework
18:16:03
refusenick
CEPL is probably what I'm looking for, then. Maxima is perfect for me until I want to animate something.
18:16:46
refusenick
(kind of a problem since I want to study dynamical systems, plus I'm taking a class on differential equations next semester)
18:18:30
refusenick
A lot of Lisp projects seem to work out of the box with SLIME. I use Sly, though, because I like the defaults. I remember having some issues connecting to Stumpwm when I used that. Anyone here live-program Maxima with SLIME or Sly?
18:23:09
refusenick
I might use Alloy if the Haskell animation I'm working on doesn't pan out. I briefly tried to animate things in a Jupyter notebook with Python as a backup, but it didn't work. Maybe I've just gotten used to Emacs, but Lisp works correctly on first tries than most other languages. I didn't go for it this time because I wasn't aware of a ready-made high level visualization library!
18:36:55
refusenick
If a Lisp program restricted itself to CLOS objects (no non-object primitives like car and cdr - not everything is CLOS, right?), could it be 1-to-1 mapped to a pure OO language like Dylan?
18:38:41
refusenick
A more relevant question, I suppose, is whether CLOS and related systems have a equational theory.
18:42:25
refusenick
Shinmera: For what it's worth, unrestricted message passing also appears to be in a rut equationally - Io's semantics are equivalent to Kernel's, IIRC, and we still don't know how to AOT compile that (mostly because there's no incentive to study it)
18:43:00
refusenick
More restricted message passing systems like the pi calculus have equational theories and can be compiled though, IIRC
18:43:36
refusenick
Are the capabilities of reflective multiple dispatch OO systems a strict superset of message passing objects?
18:47:59
refusenick
I remember reading that Shutt proved that unrestricted reflection a la 3 Lisp (the real target of Wand's paper against fexprs) truly does have a trivial equational theory because the ability to jump between levels exceeds what continuations can represent, or something like that.
18:48:35
refusenick
Clearly, CLOS is compiled, though, and I even remember seeing papers on optimizing it.
19:03:21
beach
refusenick: There is no reason to construct the full language from a subset of it. You can still have first-class global environments with appropriate sandboxing.
19:03:58
beach
refusenick: Also, CLOS is neither compiled nor interpreted. It is a specification of a bunch of protocols.
19:06:34
beach
refusenick: I use SICL first-class global environments for bootstrapping right now. That way I can isolate the host Common Lisp system from the SICL code that I am building. But in the final system, I plan to use first-class global environments to restrict access to internal code that could make the entire system unsafe.
19:06:36
beach
For example, the default environment will not let the user have access to the code generator of the compiler.
19:07:03
refusenick
beach: Doesn't it make optimization and reasoning about your code easier if it's built from a few composable core components?
19:07:23
refusenick
I'm not a functional programming zealot, but I appreciated Backus's line of argument.
19:08:49
beach
refusenick: That might be true, but it turns out to be extremely painful to restrict oneself to a language subset. I can't do it myself. And it makes maintenance very delicate because every module must have documentation about what subset it is allowed to be written in.
19:09:30
beach
refusenick: I am betting that the metacircular aspect of Common Lisp can be exploited in order to increase confidence in its correction.
19:09:35
refusenick
beach: You have much more experience with this than me (I have almost none - I've just read about it for now). Do tell.
19:10:32
beach
I am not sure what else to tell you. But there are two examples in our ELS paper on bootstrapping that shows the twisted code that is required if you must start with a subset.
19:10:42
refusenick
To me, Lisp's killer feature is how its semantic uniformity allows boilerplate composition to be conveniently hidden while still mapping surface syntax to operational semantics in a 1-to-1 fashion.
19:10:57
beach
It has to do with defining classes if you don't already have their metaclasses available.
19:11:33
refusenick
What about a prototype-based system? I've read about multiple dispatch systems built on prototypical objects.
19:12:13
beach
ebrasca: Doing it the other way is worse. Then you will very likely have the same information duplicated, so you have to make sure every occurrence is in sync.
19:12:54
beach
refusenick: Yes, that's me. But I don't recall having written anything about prototype systems.
19:14:19
refusenick
I think there was an academic paper, but it's been over 2 years since I seriously read into this.
19:14:33
beach
refusenick: I can write (defclass t () (:metaclass built-in-class)) in SICL. That is very metacircular, but on the other hand, the meaning is clear, and it is my job to make it operational, which is what the boot procedure is for.
19:15:31
refusenick
Would it make sense to define the image itself as a directed graph database of definitional dependencies on other objects, with restrictions on circularity?
19:16:58
beach
refusenick: But during bootstrapping, I build an acyclic graph, and then "tie the knot" (which is a paper I am working on).
19:19:04
beach
Not really. The thing is that the graph is best described as the result of the execution of Common Lisp code. Hence the bootstrapping procedure. Otherwise, one might have imagined just describing the graph as such. But that's not practical.
19:19:52
refusenick
If one has a graph of CLOS objects at runtime, can the set of them be separated into equivalence classes based on their relations to one another?
19:20:16
refusenick
There are optimization techniques such as supercompilation which symbolically execute code to optimize it. That might be a good fit.
19:20:33
beach
If you want to add a slot to a class, if you have a direct description of the graph, it would be impractical to edit it with confidence. But you can add a slot to a DEFCLASS form and rerun the boot procedure.
19:21:20
refusenick
It sounds like it's inching closer and closer to a database's functionality for maintaining consistency and such
19:21:24
beach
You can always define equivalence classes. But I doubt they would be semantically meaningful, other than the trivial relations.
19:21:46
refusenick
I don't know a terrible lot about CS and programming, certainly not databases, so feel free to correct me.
19:22:29
beach
I don't know much about databases either, other than the ones that are commonly used and that in my opinion do something that I absolutely do not want.
19:24:01
beach
Anyway, I'm off to spend time with my (admittedly small) family. I'll be back tomorrow morning (UTC+1). Feel free to join #sicl for more technical discussions about my design choices.
19:50:49
alandipert
refusenick i too perceive a lot of overlap with OOP/type systems and databases fwiw, i also find it an interesting thing to think about
20:10:10
scymtym
refusenick: https://github.com/sbcl/specializable/tree/master/src/prototype-specializer is one example of making a prototype-based system with (a slight superset of) CLOS. example is here: https://github.com/sbcl/specializable/blob/master/examples/prototype-specializer.lisp
20:24:44
lottaquestions
Hi all, I am new to lisp, and was going through someone else's code, and he appears to be instantiating an object of a class in a list without using the make-instance function. How does that work? I thought make-instance was mandatory when instantiating objects in CLOS
20:28:44
lottaquestions
Check out https://github.com/wzrdsappr/trading-core/blob/master/examples/backtesting-simulation.lisp
20:29:52
lottaquestions
(defparameter *agent-specs* `((simple-model :L 89) (channel-breakout-trend-following :fast-period 89 :slow-period 211) (envelope-moving-avg-trend-following :N 89 :width 3.2) (adaptive-moving-avg-trend-following :min-period 59 :max-period 126 :width-factor 3.2 :snr-factor 0.5) (fractal-ama-trend-following :max-period 200 :min-period
20:29:53
lottaquestions
10 :fractal-length 126) (opening-range-breakout :volatility-limit 1.5 :N 21) (range-projection-mean-reversion :N 34 :projection-interval :week) (swing-breakout :event-count 21 :expected-width 1.5 :price-extension 2.0) (swing-mean-reversion :event-count 21 :expected-width 2.0 :max-allowed-breakout 1.5)))
20:31:29
sjl_
https://github.com/wzrdsappr/trading-core/blob/master/examples/backtesting-simulation.lisp#L46 is where make-instance is called
20:42:40
jackdaniel
copec: it seems that imgui runs in the same process as ecl while emacs provides only swank connection
20:43:03
_death
copec: it's a C++ program that embeds ECL and has imgui and bindings for it.. it loads a lisp file, and the first thing that's done is to start a swank server, so I can connect using slime
20:43:40
_death
copec: it wouldn't be difficult to add a text editor and be "self contained" but for development emacs/slime is just too convenient :)
20:49:43
copec
I haven't attempted anything but simple FFI, how difficult was it to get ecl+imgui going?
20:49:44
_death
previously I used it with tic-80, if you want to see how easy it is to embed.. https://github.com/death/TIC-80
20:56:49
_death
copec: it's not difficult, but writing bindings by hand can be a bit boring so progress is slow.. a few functions every now and then, and it's about 80% complete now, I'd say