freenode/#lisp - IRC Chatlog
Search
13:33:53
pve
Hi! I would like to give instances of my generic function class a default "function". Is the correct place to do this in "initialize-instance :after ((gf my-gf-class) ... " using set-funcallable-instance-function?
13:46:28
jackdaniel
so when you add /first/ method and /second/ method, and remove /first/ method.. :-)
13:46:32
phoe
sounds like you either need a general case for 0 methods or that you need to handle both cases, namely, in some sort of initialization code and then in your remove-method
13:47:26
pve
phoe: exactly, I only asked because I'm having some problems getting it to work using initialize-instance :after
13:49:48
pve
Bike: hmm actually if I replace the default function with something simple like (print 'hello) it does work.. so the problem is most likely elsewhere
13:52:40
pve
the point of this is to improve my "does-not-understand" functionality which uses no-applicable-method, but it only seems to work when the gf has at least one method
13:58:40
obnoxious_glenda
ugh, someone in #programming called lisp a broken toy left in the trash, leaving its stench off for ages
14:00:30
jackdaniel
well, that description comes nice with "lisp is not dead, it just smells funny" :)
14:10:22
Demosthenex
ok, so i'm using clsql with sqlite, and trying to use the s expression based sql queries. i'm translating over some sql with subqueries, ie: select * from table1, (select * from tables2...) as subtable ... and can't see how clsql supports subqueries?
15:31:47
phoe
hhdave: I assume yes; you might also post on /r/Lisp and /r/Common_Lisp and optionally ask Xach for publishing on Planet Lisp for more visibility
15:31:54
jackdaniel
generally speaking I'm sure that there are a few, but more details would make this question less vague
15:32:52
phoe
or you can link us here in #lisp towards the details of the job offer and I'll do my best to distribute it across other channels
15:33:07
hhdave
I work for a small Insurance MGA (https://github.com/Virtual-Insurance-Products) in Devon, England and we're in need of another CL programmer (at least 1). The previous guy we had left to do Rust programming.
15:35:20
hhdave
We have a web based CL application which is accessed by many brokers across the country (mostly - we had/have some clients in Ireland and some in Poland too) selling niche insurance products.
15:35:39
jackdaniel
if you won't find someone full time, let me know -- I'm available at smaller capacity as a consultant
15:36:23
hhdave
@jackdaniel: that's great, thanks. Even if we do find someone it could be useful to have you as a standby in case there's suddenly loads of work. I am, in fact, really busy.
15:37:23
hhdave
CLIM knowledge would certainly be relevant, though my 'CLIM' implementation stuff is probably a bit mad compared to proper McCLIM or such
15:40:25
hhdave
I'm using that clim-web stuff for most of the front end bits that I do nowadays. I've still hardly had time to play with real CLIM.
15:40:59
jackdaniel
https://pbs.twimg.com/media/EUsIcSkWAAI4GgA?format=png&name=large <- the first "window" (topmost)
15:41:36
jackdaniel
(this is a matrix I've used for checking various features the verify if they work)
15:41:49
hhdave
Does it, in any way, make sense to have a McCLIM renderer that could generate actual HTML? I know that wouldn't cover everything and a lot of graphical stuff would need the canvas, but would there be any way to make it work do you think? I know you were playing with TUI renderers or something weren't you?
15:43:03
jackdaniel
it would also make sense to write something more interactive, but that would be much more work and would involve javascript
15:44:06
jackdaniel
also scymtym wrote a broadway backend, that works over gtk protocol that is capable of running in the browser (afair), and that one is truly interactive
15:46:38
jackdaniel
so after cleaning up some McCLIM internals it will be much easier to write a backend
15:49:47
jackdaniel
there is not much written, but here is the part about the port: http://turtleware.eu/static/paste/c404b66e-backend.org
15:50:01
hhdave
It's really great that there seems to be so much more interest in McCLIM these days. A few years ago, about the time I discovered it and started looking into it, it seemed all but abandoned.
15:50:39
phoe
hhdave: please ping me with the details - I'll do the cross-posting later today, but I need to disappear now
15:53:17
hhdave
What I would really like to do is to somehow replace (most of?) my 'strange' impementation of sort of CLIM with McCLIM and just make a backend (and whatever else is needed) to make it good for writing normal(ish) looking web applications Really Easily. I have almost no idea as to the feasibility of that though. I started off just adopting some of the ideas into my codebase, but then ended up gradually (and then less gradually) evolving it to be more
15:55:06
jackdaniel
I have more modest wishes - I'd like to have the coordinate swizzling removed soon-ish :)
17:59:32
dbotton
Does anyone know what the built in packages "gray" and "walker" are in ecl? The manual is blank for them?
18:05:48
Alfr
dbotton, Gray Streams is a rejected proposal for the standard, a number of implementations have it tough. http://www.nhplace.com/kent/CL/Issues/stream-definition-by-user.html
18:06:52
White_Flame
usually the walker goes through a source code form, distinguishing what's code vs data, what's a lexical variable name, etc
18:17:40
phoe
http://portability.cl/ lists ABCL, ACL, CCL, Clasp, CLISP, ECL, LW, Mezzano, MOCL, and SBCL under t-g-s
20:08:14
pillton
I have released a new system called data-flow (https://github.com/markcox80/data-flow). It is intended for applications which are composed of small independent components/units which interact with each other via ports or events.
20:12:37
White_Flame
pillton: interesting. We have a pipeline scheme, which is pretty verbose. This might do something similar
20:13:28
White_Flame
and of course, every library has its own threadpooling system. It'd be nice for there to be a central threadpool for everything to compose into
20:16:32
pillton
The system provides a scheduler which executes tasks if their resource requirements are satisfied. This should be fine to use with other systems.
20:18:26
White_Flame
I mean, the entire point of a threadpool is to better gracefully handle the case when there's too much in flight
20:20:11
pillton
You could use the sequential scheduler for the application and use the threadpool of the other systems for the individual computations.
20:21:11
White_Flame
well, that means manual allocation of resources between your libraries & other threadpool domains
20:22:09
White_Flame
(similarly, if all p2p bandwidth controls were centralized into a single system-wide config, as opposed to per application; that's a similar thing that's found in various domains)
20:45:09
_death
pillton: looks interesting.. usually I'd use zmq for that kind of thing, or mailboxes or just queues.. or coroutines and such if single-threaded.. data-flow seems framework-y and lets the user specify a scheduler so I'm wondering what are the use cases..
20:45:20
phantomics
Interesting, I've got some projects coming up that will require dataflow, I'll give this a try
21:01:15
pillton
_death: The factors which "tipped me over the edge" was a project at work and Paul Khuong's article titled "The unscalable, deadlock-prone, thread pool".
21:05:16
White_Flame
yeah, re the article, anything that can block should never be in a fixed-size threadpool
21:06:05
pillton
_death: I hate writing multithreaded software for the most part. What I wanted was something which executed loosely connected computations in parallel without me having to do anything i.e. locally sequential, globally parallel.
21:06:26
aeth
White_Flame: Speaking as a CL game engine author, you're simply not going to get a thread pool that satisfies every use case. You think that having one central thread pool means that libraries can interoperate with each other so more can use thread pools safely, but not really. I'll still have to avoid everything that uses a thread pool.
21:09:12
aeth
The thing is, a game engine is going to have to have its own threading system that handles things to its own requirements which are soft real time rather than batch-oriented. At best, you could just provide a common API and allow different implementations with different trade offs, but even the API is probably not going to really be the same with game engine vs. normal app stuff
21:10:07
aeth
Worse, some things need to synchronize every frame (probably physics, if "frame" means logic frame rather than rendering frame) and some things don't (e.g. AI).
21:10:12
pillton
_death: The project at work involved iterating a map-and-reduce task where each item in the map required performing I/O and then a hefty compute task. A lot of time was wasted waiting for I/O to finish because it wasn't executing in parallel with the compute.
21:10:22
_death
pillton: ok.. in the readme you mentioned non-blocking I/O.. how would you go about doing that with data-flow?
21:11:14
White_Flame
pillton: yeah, one the of the reason to have a grand central threadpool is that the priority, balancing, resource consumption, can ideally be well expressed in one place
21:11:28
pillton
_death: You can ask a scheduler if blocking is allowed using data-flow:blocking-allowed-p.
21:12:11
pillton
_death: All of the operations in the data flow system are non blocking. That predicate is meant for I/O.
21:12:15
aeth
(as an aside: confusingly, both game frameworks and game engines are software frameworks)
21:13:33
aeth
White_Flame: right... in particular, it creates the inversion of control where the flow of control is the responsibility of the framework, rather than the caller, at least by Wikipedia's definition. https://en.wikipedia.org/wiki/Software_framework
21:14:10
White_Flame
if you need external scheduling, because you don't know at the call site if/when/where something should run ... it still seems like a library to me
21:14:20
aeth
A language that does this directly (or that has some de facto standard library that everyone uses to do this, which might be what you're proposing) is one that gives less freedom to the software frameworks that should be micromanaging this sort of thing
21:14:49
aeth
Unless, of course, you go one level more meta and just provide an interface that anyone can implement (which is sort of a C++ or Java way of thinking)
21:16:23
pillton
White_Flame: In my mind there are two types of multi-threaded software 1) same task different data (usually requires barriers for synchronisation) and 2) multiple arbitary tasks. The barrier algorithms I have seen require knowing the number of threads before starting the computation.
21:17:40
aeth
A game engine is kind of the worst case for this type of multithreading (which might be why so many games are still bottlenecked by a main thread even though we've had mainstream quad cores for over a decade now).
21:19:41
aeth
You have to parallelize stuff that's of pretty much every kind of data (even network data, if multiplayer) on the GPU and on the CPU. Some's async (doesn't matter when it finishes, e.g. loading something in the background) and some's with very tight timing requirements.
21:20:23
White_Flame
so it's really "realtime" as you mentioned that's the confounding factor for many throughput systems
21:20:46
aeth
HPC is mostly just linear algebra simulations, which is a subset of what games do, but games just require things to visually look plausible rather than to be actually accurate (with a bit of a caveat that with multiplayer you can't do things too badly or you might desync)
21:22:03
aeth
You can do 100% utilization on a game, if you wanted the simulation to get more realistic the more power you have, but generally games only care about 100% GPU utilization, i.e. just the visual simulation. Multiplayer games really can't let players with better CPUs get a different logic simulation, anyway.
21:23:11
aeth
There are some games where you'll get a harder game if you have a better CPU, though. Most notably, timed chess. (The AI, called the "chess engine", will probably use 100% of everything until time's up, or some other constraint is up.)
21:23:34
White_Flame
I guess the same could be true on the CPU end, if everything's on a frame barrier
21:23:46
aeth
(Not like a slightly harder chess AI in 2020 would make an observable difference to a human...)
21:24:07
White_Flame
but really, those who are doing threadpool stuff are generally not doing hard realtime requirements
21:24:41
White_Flame
while trying to express things reasonably without requiring that level of hand-tuning
21:24:57
aeth
Yes, but... if you get everyone to standardize on a thread pool that isn't designed for hard real time requirements, you're basically forcing users with those requirements to not be able to use any library that uses that thread pool.
21:25:15
aeth
Maybe fine for a scripting language, but I don't think CL should restrict domains like that.
21:26:14
White_Flame
having multiple very customized ones in some situations might, but again I would take "I'm using threadpools" as equivalent to "I'm not doing hard realtime"
21:27:13
aeth
afaik, and I haven't looked into this in detail yet, you can just treat a game engine's thread situation like: "these n threads can return within a reasonable amount of time while these m threads have to synchronize every k frames"
21:27:57
aeth
i.e. the former are basically async but you need an answer of some sort "eventually" (which could be a few seconds, which is like an eternity to the game engine)
21:28:15
aeth
so even if a thread pool doesn't work for real time, well, you can still sort of thread pool the rest
21:29:09
aeth
I guess some of those things should be time limited (e.g. AI) and some of those things shouldn't (e.g. loading the next chunk of the world map in a Minecraft clone)
21:30:46
aeth
(and a game engine isn't hard real time, anyway... missing a frame or two isn't the end of the world)
21:32:10
White_Flame
right, but there's a framerate target, which means budgeting milliseconds for various tasks, as well as polygon/texture budgets, etc. It's still designed as realtime even if it doesn't kill 300 people if it fails its targets
21:42:49
aeth
White_Flame: that just means that the threads must synchronize by a certain amount of time. But if you have, say, 6 physics threads, then the physics work can still be distributed.
21:43:36
White_Flame
measured against the load that the game needs, and affects level design, weapon firing rates, etc
21:44:15
White_Flame
but still, this falls more into the SIMD-ish style processing that pillton brought up
21:53:48
aeth
White_Flame: AMD has been selling 12c24t and 16c32t CPUs to the consumers/mainstream/gamers segment for well over a year now. And anything started now will probably take years to ship.
21:55:02
aeth
Some systems will be "bucket of tasks" systems, such as perhaps the AI system. And when you have 32 real hardware threads to work with, they might be allocated a decent number
21:55:41
White_Flame
or I should better say, the game industry is heavily affected by that, while the rest isn't as much
21:56:33
aeth
The thing about games is that they can do basically everything. And when it does "basically everything", the timing requirements differ, too.
21:57:03
aeth
To the point where some of them are probably best expressed as not really having a requirement. As long as the rest of the world can move on so the game doesn't hang.
21:58:30
aeth
console-first AAA games will probably spend all of the thread budget on rendering threads, but basically just those will, and none of them will be using Common Lisp
22:52:33
pillton_
White_Flame: My primary goal was to enforce "component providers" to not require a particular scheduler in order to function. This should be chosen by the user.
23:19:55
aeth
In case someone's wondering why I brought up game engines... I think any "serious" language should consider a game engine, a web browser, and a database. Big, complicated applications that need some degree of performance and an unbounded number of features limited only by ambition and time.
23:20:18
aeth
Fairly non-overlapping, too, so just those three should span most application development concerns.
23:21:28
aeth
Maybe add something that heavily involves integers, but maybe that's already covered by the cryptography that's needed by networking...
0:13:38
matta
Can anyone tell me what the #+dev in https://github.com/vseloved/cl-agraph/blob/master/cl-agraph.asd is doing? I know that this conditionally includes the subsequent form, but how does this "dev" thing get set, and do conditional :depends-on tricks like this play nice with quicklisp?
0:24:13
pillton
matta: It would be better to define a cl-agraph/test system rather than use the conditional reader.
0:24:32
lotuseater
if the keyword is in *features*it will put the following atom/sexp. otherwise it will comment it out
0:28:23
pillton
matta: Have a look at secion 7.1.1 Predefined operations of ASDF in the ASDF manual https://common-lisp.net/project/asdf/asdf.html
0:34:38
matta
pillton: thanks, I had seen separate foo/test systems defined elsewhere. This #+dev approach was different, so it cought my eye.
0:43:32
fiddlerwoaroof
https://github.com/fiddlerwoaroof/daydreamer/blob/8b29101b298da546bc1555c5c2abc44622ffa980/daydreamer.asd#L35
0:44:36
fiddlerwoaroof
It's better than conditionals in your .asd because ASD can track the features
0:45:52
fiddlerwoaroof
I mostly use it to filter out files that contain code that doesn't work in Lispworks