freenode/#lisp - IRC Chatlog
Search
7:28:51
aeth
I personally have a define-function macro, so in my game engine I would write it as (define-function foo ((x (integer 0 10))) (+ (- most-positive-fixnum 10) x))
7:29:45
aeth
Usually SBCL does a good job at deriving the return type and I don't think the other implementations have an ftype so I don't care about supporting return types. At some point I'd support it as an option
7:30:36
aeth
But I think that would require a third generated defun so I have been procrastinating that
7:35:24
sthalik
now that I think of, the argument-environment bits for a walker aren't even necessary
7:37:17
aeth
sthalik: Personally, I preallocate everything that I can and use dynamic-extent on the rest. This is a bit... eccentric and no one else in #lispgames has a game loop style remotely as restrictive as this.
7:38:20
aeth
This is for the engine's game loop only, though. I don't think I'd ever finish anything if I tried to use this style for the whole program.
7:40:32
aeth
Everything called from zombie-raptor/core/window::game-loop doesn't cons in SBCL. It's too hard to profile other implementations for this, and possibly impossible even if I could profile them.
7:41:14
aeth
(Obviously if I loaded assets while the game loop was running I wouldn't be able to keep this restriction to this extreme anymore.)
7:44:07
aeth
The way my engine is structured, it doesn't even load images! I have loaded images before in some of my unpublished tests, but I feed in the texture assets to the make-window function.
7:48:04
sthalik
in multiple C++ projects I've hit a roadblock where there's a decent amount of top-down design that can't go away
7:53:20
sthalik
even at this point there's no remote equivalent of lexical non-local return in fancy static languages
7:54:16
sthalik
aeth, what good are games if they're just iterative improvements? if it's ever done, it must transgress boundaries and do what was thought to be not feasible
7:55:06
sthalik
aeth, Falcon 4.0 included a persistent ground/air war simulation. post-mortem interviews explained "we didn't know any better"
7:57:24
aeth
I think the limiting factor is normally art. When the game devs don't care about art (e.g. Dwarf Fortress) they can do ridiculous things
7:58:03
aeth
On the other hand, when something's AAA photorealistic, everything is so expensive to make *and* you don't want to increase the risk by venturing too far from the formula
8:00:32
aeth
I plan on doing space games, at least for now. Space is mostly empty. No, even more empty than that.
8:01:50
sthalik
there's a modern maintained F4 derivative based on stolen code. current copyright holders allow it as a gentleman's agreement.
9:49:07
aeth
p_l: Well, #lispcafe does a very bad job at enforcing off-topicness and is often about Lisp.
10:46:46
thekolb
Xach: I have this weird situation where a dependency wants asdf3 but my quicklisp has asdf2? I did update-client but that didn’t upgrade asdf?
10:47:20
thekolb
(don’t ask me how I ended up with a dependency that wants asdf3 in the first place, good question though)
10:52:22
Shinmera
Also lots of dependencies require ASDF3 nowadays (for instance: all of my libraries)
11:00:42
jackdaniel
thekolb: asdf is not part of the standard (given how it constantly changes that would mean that our standard is progressing!). You may download lastest asdf relase, compile it and put (load …) in your .cclrc before loading quicklisp
11:19:36
thekolb
MichaelRaskin: the ccl package on NixOS is broken (doesn’t set CCL_DEFAULT_DIRECTORY)
11:22:20
thekolb
MichaelRaskin: CCL_RUNTIME has no effect on ccl whatsoever and seems to be a variable introduced by the Nix expression for referencing the kernel
11:23:00
thekolb
MichaelRaskin: CCL_DEFAULT_DIRECTORY is a variable used by ccl to refer t its installation destination
11:24:55
thekolb
MichaelRaskin: Not really, you should make sure that $(which ccl) sets CCL_DEFAULT_DIRECTORY appropriately and execs the kernel
11:25:57
thekolb
I.e., set CCL_DEFAULT_DIRECTORY in https://github.com/NixOS/nixpkgs/blob/release-18.03/pkgs/development/compilers/ccl/default.nix#L79
11:31:50
MichaelRaskin
env -i $(test-build -test ccl)/bin/ccl -e "(require :asdf)" -e "(print (find :asdf3 *features*))" -e "(quit)"
11:33:15
MichaelRaskin
If I don't pre-require :asdf, it is not found — again, with or without CCL_DEFAULT_DIRECTORY
11:35:52
MichaelRaskin
CCL 1.11.5 in master includes ASDF3 (even without CCL_DEFAULT_DIRECTORY variable set), maybe stable has an older one?
11:39:19
MichaelRaskin
Yes, and I have the change and I want to test one of these things before pushing to master
11:49:02
unanimousarc
Hello, new person here, if I invoke (ql:quickload x) will that package remain installed for future sessions?
11:49:11
thekolb
MichaelRaskin: I did nix-env -f https://github.com/NixOS/nixpkgs/archive/master.tar.gz -i ccl and ccl -n -e "(ignore-errors (require 'asdf))" -e "(quit (or (find :asdf3 *features*) 1))"; echo $?
11:49:50
MichaelRaskin
thekolb: I think CCL defaults to the image location if CCL_DEFAULT_DIRECTORY is unset; given the details of the Nix package that seems to mean the variable is irrelevant
11:49:55
phoe
unanimousarc: quicklisp fetches the dependencies from the network and then invokes ASDF to load the system into memory.
11:50:10
phoe
the former is persistent, the latter needs to be done after each reload of the Lisp image.
11:50:36
phoe
you can theoretically save the resulting Lisp image and then reload that one, but it's not commonly done during development - better to just #'ql:quickload things again.
11:57:06
MichaelRaskin
If you run «which ccl», do you actually get the version in the profile? If you just run CCL, what version is reported?
12:06:06
MichaelRaskin
Well, in a fresh test account I use your installation command (well, with -p, I have a complicated non-default setup) — it gives CCL which loads ASDF3
12:10:13
MichaelRaskin
Well, I could try to pastebin a nix-expression that imports from a fixed revision and checks CCL in build-time — failure-or-success of Nix builds is less environment-dependent than installation
12:13:27
MichaelRaskin
Does this also error: env -i /nix/store/32xnrnrf399nxf616fxihx00qi6xb4mv-ccl-1.11.5/bin/ccl -n -e '(require :asdf)'
13:12:56
AeroNotix
What's the cheapest / easiest way to represent infinity that allows me to compare it with numbers.
13:13:20
AeroNotix
I.e. I want to have a representation of infinite that I can do things like (< 123 +infinity+)
13:16:11
Shinmera
In Trial I've been doing https://github.com/Shirakumo/trial/blob/master/toolkit.lisp#L32-L38 so far
13:23:36
AeroNotix
v0|d: I used the sb-ext ones for now. I'll find something more portable later. It's only for a debugging thing right now anyway
13:54:36
Shinmera
unanimousarc: It's not a recommendation, but here's mine. http://blog.tymoon.eu/tagged/common%20lisp
14:15:26
LiamH
AeroNotix: If you don't mind loading a foreign library, GSLL has it: (< 1.0 gsl:+positive-infinity+) => T
14:44:58
Shinmera
Speaking of twitter, there were some API deprecations regarding direct messages that I haven't had time to fix in Chirp.
15:00:27
drmeister
With asdf - is there a way to get a tree of dependencies from a system? I have a groveler that I use for finding all files required by a system in the order that they need to be loaded.
15:00:44
Shinmera
Ha ha, oh boy the CCL source for infinity-p has a comment: ; not sure this is right
15:01:00
drmeister
The groveler has a function that says it returns all of the systems required by given list of systems. I think this may be what I need.
15:01:30
drmeister
I want to parallelize the building of the tree - so I need to know what it looks like first.
15:02:18
drmeister
If it's a linear sequence - well - then I need to put some work into splitting things out a bit to make it a tree.
15:02:48
drmeister
Shinmera: Thank you - I'll keep spitting out what I'm looking for - maybe someone will have some thoughts on it.
15:03:10
pjb
AeroNotix: if you want to compare with numbers, you have a big problem: numbers are not ordered!
15:03:22
drmeister
Then I'll need to time how long each system needs to build it - then I want to organize the build so that it takes as little time as possible using multiple processes.
15:03:30
pjb
AeroNotix: in lisp, numbers include complex numbers, and complex numbers are not ordered.
15:03:54
Shinmera
drmeister: https://github.com/Shirakumo/radiance/blob/22cdcde8be60f5e49e90a59f7375ceea130358c7/migrate.lisp#L131-L150
15:04:13
drmeister
Basically - I want to parallelize the building of a large collection of asdf systems so they build as quickly as possible. Given that POIU is MIA for current versions of ASDF.
15:04:30
pjb
AeroNotix: then if you want to restrict yourself to real, then in lisp we have most-positive-long-float that is bigger than all floats, but not to all integers.
15:07:01
pjb
AeroNotix: at a given time, there's a maximum representable integer, but since it may depend on the available memory, it may grow later.
15:12:08
pjb
AeroNotix: you may also shadow < <= etc. calling cl:< cl:<= etc when you only have numbers.
15:13:02
pjb
See for example: https://github.com/informatimago/lisp/blob/master/common-lisp/invoice/invoice.lisp#L366
15:24:09
drmeister
Shinmera: Is the information about system dependencies available after I load-asd - or do I need to load-system everything?
15:25:30
jackdaniel
drmeister: you need to load all asd file (i.e by find-system), but there is no need to load systems into the image
15:26:13
jackdaniel
it is quite problematic as it is anyway, because asd files are programs, but not as bad as being forced to load all libraries to learn their dependencies
15:26:44
Shinmera
jackdaniel: Does ECL have something similar to sb-int:with-float-traps-masked that allows you to mask which floating point traps signal conditions?
15:27:41
Shinmera
drmeister: It only loads a system file if it has to due to :defsystem-depends-on or due to find-system
15:44:44
drmeister
How does one redirect the ~/.cache directory so that quicklisp/asdf drop the generated code somewhere else?
15:47:16
jackdaniel
"A specification as per RESOLVE-LOCATION of where the user keeps his FASL cache")(defvar *user-cache* nil
15:47:19
jackdaniel
"A specification as per RESOLVE-LOCATION of where the user keeps his FASL cache")
16:54:18
theseb
You can really define the entire lang in terms of about 8 primitives? Why does that seem impossible to me? Think of how complex common lisp is
16:58:16
Shinmera
The semantics, yes. But an implementation still needs to do a lot more -- like handling OPEN, I/O, etc.
16:59:03
theseb
Shinmera: aha! yes..i knew something was missing!!! All the //side effects// were not mentioned like I/O!
16:59:55
MichaelRaskin
Well, if you target Plan9 you don't need many I/O primitives, and then they cover all the OS interaction…
17:00:03
pjb
theseb: with lambda calculus, you can implement state and I/O by simulating the whole universe!
17:02:38
pjb
theseb: there's a "desire", or "universal love" or "god" that makes kinds of quantum fluctuations in the mathematical world generate random mathemathical objects. Functions and lambda calculus are actually very simple mathematical objects, and thus appear naturally, and "develop" (are "created") by themselves, until find this god lambda calculus program that decides to simulate the whole universe and to reproduce little simulatio
17:09:34
pjb
theseb: also, it's not very hard to implement a hardware simulation to do I/O in pure lambda calculus.
17:11:50
theseb
pjb: imho..i think it best to just punt and define an abstract "input" and "output" primitive
17:12:40
pjb
theseb: of course, if you want to hook to other universes, such as ours, you can always branch out to primitives implemented in another system, eg. in electrons and silicium atoms.
17:13:28
pjb
(but notice the funny nature of fermions and bosons that are both just probability wave functions, ie. not any more real than lambda calculus functions).
17:13:38
theseb
pjb: what the #$@#$? why are you making this so complicated? i'm suggesting a simple input and output primitive while you want to hook up to other universes!?!!? am i missing something?
17:16:25
pjb
Primives, like axioms, are your own totally and entirely subjective and arbitrary choice.
17:18:42
theseb
pjb: i like that link....avoid english and use lispy mini-langs instead to bootstrap
17:19:36
pjb
or realize that lisp was created 50 years ago, and that we don't need to bootstrap anymore: just write CL in CL.
17:20:09
pjb
You might need to bootstrap again if you go to Mars, and a meteor destroys all computing equipment.
17:20:33
pjb
Then you will have to mine metals, build a new computer, and program it, bootstrapping, hopefully, a new lisp system.
17:20:58
theseb
pjb: actually...imagine we worked in a sector where security was paramount.....i wonder if defining layers of langs somehow avoids potential security holes
18:27:45
drmeister
Within clasp I am going (require :asdf) --> loads clasps shiped 3.3.1.2 version of ASDF
18:29:08
drmeister
Why is it telling me I have an older one registered at sys:modules;asdf;asdf.asd ?
18:36:45
pjb
drmeister: it helps testing for a version, or higher, since in general releases are backward compatible.
18:36:55
drmeister
Probably not - I don't know what all those features are for - they may not be related to the warning.
18:37:17
pjb
drmeister: ie. ASDF 4.0 will probably be compatible with asdf 3.3, asdf 3 and asdf 2, so all those features will have to be present.
18:38:13
drmeister
Do you know why the warning is being generated? I cloned quicklisp-client.git from github and I'm using that. When I load the quicklisp:setup.lisp I get that warning even after I've loaded an asdf.
18:51:01
jackdaniel
it is a logical pathname to something like /usr/lib/clasp-x.x.x/modules/asdf2.fasl
18:51:56
jackdaniel
and warning is being generated from ASDF itself, it doesn't like its previous incarnations. it is not about asdf2 being loaded, but mere about being present in the path