freenode/#lisp - IRC Chatlog
Search
3:18:19
aeth
White_Flame: What kind of functions? If they're 'foo instead of #'foo or lambda it should afaik be OK to funcall because it will look it up at runtime
3:21:57
_berke_
hi. I recall reading that there was something like a with-symbols macro but I can't find it
3:28:26
_berke_
now slime question. when you have erroneous code and hit C-c C-k slime asks you if you want to load the fasl. I don't, how can I get slime to STFU in that situation.
3:54:54
aeth
Personally, I use the online quicklisp because I can search it through !l1sp on DuckDuckGo (that's actually one of several supported sites), and I have a local copy as a backup for when the website is down or I am offline.
3:55:03
clintm
I swear there is, or used to be, a ql-installable package that starts a server in whatever image you load it on that has it.
3:57:44
jack_rabbit
hmmmm. (documentation 'package-name t) does not return my docstring... I must be doing something wrong in the defpackage.
3:59:21
beach
jack_rabbit: In the long run, you will save a lot of time by learning how to interpret the (sometimes a bit cryptic) dictionary pages of the Common Lisp HyperSpec.
4:00:00
jack_rabbit
beach, Yes, I need to get better at that. I realized my mistake, but not quick enough.
4:22:28
_berke_
I'm trying some cl-cuda examples and I wrote a simple macro, but as soon as I use quasiquotations I get a ton of SBCL warnings. https://pastebin.com/FMpVhysG (test1 totoro) is fine, (test2 totoro) gives warnings
4:32:41
_berke_
interestingly if I use (intern (symbol-name (gensym))) instead of straight up (gensym) it works, but I have no idea why or if this is correct
6:47:36
pillton
shka: I usually do (assert (typep x type)) to avoid the use-value restart messing with type inference.
7:04:43
pillton
Oh it is checked. The fact that an arbitrary value can be stored in the variable is probably the problem.
11:27:13
jeosol
I did not hear back from Mike Maul yet, and it seems I will proceed with the ML examples later, just start and out and change things based on reviews later.
11:40:38
capitaomorte
Hi there. Is there a MAP* function in CL that APPLYies the function to each element instead of FUNCALLing it?
11:44:16
capitaomorte
the goal is to process an array of JSON objects (converted to plists) using a destructuring lambda spec.
11:52:55
capitaomorte
(mapcar (alexandria:curry #'apply function) (coerce sequence 'list)) should work
11:59:19
flip214
shka: yeah, well, an explizit LOOP seems to be faster than the (MAP (COERCE)).... naturally.
11:59:27
capitaomorte
I don't know. I never tried it, I don't see why it couldn't recognize the MAPCAR/COERCE pattern and turn it into your MAP
11:59:50
flip214
although I'd hoped that this would be simply dispatched to a different MAPCAR function that takes a simple-vector as input.
12:00:49
shka
capitaomorte: well, in theory it could, but why would you implement something like that for such trivial case that can be fixed by writting code properly?
12:02:16
flip214
think a macro that did MAPCAR and the input was a COERCE, because the macro "needs" a list...
12:02:24
capitaomorte
anyway, making garbage is not as bad as people often assume, at least on Allegro
12:03:23
capitaomorte
it's sometimes worse to let objects go into its "oldspace" where the GC has a much harder time finding them.
12:04:52
flip214
shka: that would be slower if the input cannot be proven to be a list, I guess. not sure if there are other drawbacks.
12:11:56
capitaomorte
shka: yeah, but "triggering GC" is more than just a binary thing. In many situations, if i remember that lecture, it's better to trigger it very often.
12:12:41
capitaomorte
shka: and actually better to use non-destructive, garbage-making, list-processing, for example
12:13:44
theemacsshibe[m]
Although we're passed mark and sweep collectors my knowledge resides in, wouldn't there be some constant factor in marking or grouping used data?
12:13:54
jmercouris
I bet the number of objects in the universe is more important than how many need to be cleaned up
12:14:01
capitaomorte
jmercouris: yes, for sure. The lecture compared Allegro with SBCL and results were quite different
12:14:39
flip214
if you manage to work with a fixed amount of memory (preallocated everything), the GC won't be triggered later on
12:14:48
shka
well, we have to distinguish average performance and variance in expected time to finish
12:15:29
jmercouris
what would you prefer, a game that ran at 200fps but dropped to 5 every 10 seconds, or a game that runs at 20 fps?
12:17:02
theemacsshibe[m]
Idea: replace GC algorithms with prediction if the user cares about response time
12:17:37
theemacsshibe[m]
Good times: when you're figuring out how to deal with the cave spiders about to kill you next turn.
12:19:06
theemacsshibe[m]
Not even, I'm saying when the game is quiet a clever engine could GC or reallocate without problems
12:19:45
theemacsshibe[m]
For example, if I'm waiting at site A and everyone's at B, might as well collect since no one's going to rush in and blow me up.
12:21:07
theemacsshibe[m]
It could also be argued using digital bombs to destroy digital models of nice maps could also be a form of GC.
12:21:38
flip214
phoe: sorry, I didn't find the presentation. yeah, the paper is in the PDF as well.
12:22:07
theemacsshibe[m]
Okay I have a new game, I'm selling it for (sqrt -1) dollars on Steam with vim keybinds
12:22:41
theemacsshibe[m]
One team tries to save the thingamabobs and the other tries to break them somehow. Broken thingamabobs are freed on the server.
12:23:37
theemacsshibe[m]
This is like that Doom thing where monsters are Unix processes but more dangerous
12:24:59
flip214
theemacsshibe[m]: so you're thinking about the "all instances" thing[1] and doing randomized CHANGE-CLASS on them on a production system?
12:27:24
theemacsshibe[m]
I'm saying we get rid of the GC and let players decide what should be freed by shooting representations of them.
12:37:14
theemacsshibe[m]
This is Australia, we couldn't do anything with our copper tin can networks.
12:42:24
theemacsshibe[m]
ACTION runs back into #lisp with a handful of steel wool and a Bunnings receipt
12:43:00
theemacsshibe[m]
ACTION gives magic GNU🦄PONUT a vegetable burger she got from the barbeque
12:50:28
theemacsshibe[m]
Why isn't tail recursion something we do a lot in Lisp? (Scheme is pretty much built on it, having no imperative style loops, but CL isn't very good at them.)
12:50:49
theemacsshibe[m]
If I wanted to write some function as a normal maths thing, I'd probably use tail recursion.
12:53:56
p_l
theemacsshibe[m]: it's a matter of style - some code depends a lot on tail calls, especially when wirtten for implementations that do TCO, but generally we enjoy having powerful iteration constructs
12:54:23
p_l
some of the code normally enabled by TCO resurfaces in CL in much, much weirder forms...
13:02:12
shka
p_l: ha! let me show ya! https://github.com/sirherrbatka/cl-data-structures/blob/ee8c3d07e1e2b636b04eaa76abb28ec7e33dfb18/src/utils/macros.lisp#L182