freenode/lisp - IRC Chatlog
Search
22:40:50
aeth
It would be hilariously meta if some of these languages had acceptable performance in ECL... because then you're embedding languages... in an embedded language. But that's actually what Guile was supposed to do when GNU initially pitched it as the standard GNU scripting language in the 1990s (still waiting on that)
22:41:05
dmiles
oh well think the best analogy is i cam up with is "imagine taking an assembly language program that twiddles bitmasks and using bignum math to emulate the registers of the Intel-4930k CPU. You might just see some performance differences? "
22:43:00
dmiles
do this can be an example of where one outsmarted theemselves.. they might be better of just using a bitarray
22:44:12
aeth
jmercouris: Ideally, the embedded languages system will run on SBCL, CCL, and ECL acceptably, and in that order of performance (but ECL surprises me all the time when compared to CCL, so there might be a contest for 2nd place in performance). CLISP will probably never run them performantly and ABCL wouldn't be a priority because it can interface with JVM languages.
22:44:29
aeth
But I'm going to just start with a Scheme because it doesn't need a JIT, unlike most of the other interesting scripting languages.
22:45:12
jmercouris
What is your end goal in doing this? Do you enjoy the project or do you have some product in mind?
22:46:16
aeth
My primary focus right now is making a game engine that can run in Common Lisp. A long term goal of making implementations of other, potentially more popular, languages that very easily interface with Common Lisp helps that primary objective.
22:47:48
jmercouris
I'm just saying, instead of 5 or 6 engines, if you all focused your efforts, you might have a very powerful engine
22:48:11
jmercouris
of course the different engines will have different strengths, paradigms, philosophies, etc
22:48:14
aeth
jmercouris: I started before any other game engines existed except for dto's 2D engines. Also, my approach is very different. e.g. My goal is to have a no-consing game loop so a user of the library could do a call to the GC, disable the GC, and run it between levels on loading screens or whatever, if they choose to (or they can cons in their own code if they choose to, giving them more space on the heap before problems pop up)
22:49:02
aeth
My goal for no-consing has required me to reinvent the wheel quite a bit... and I am going to have to eventually replace cl-sdl2 if I am going to reach 0 consing in my game loop. (All of my own code doesn't cons in the game loop)
22:49:53
aeth
(Note that any implementations of scripting languages will probably cons by their semantics, so the no-consing won't apply to any design of those. And the GC would probably have to be run if you use those.)
22:50:44
aeth
jmercouris: I'm not sure if I have the highest performing code, but it performs pretty fast and makes some unusual decisions in the name of no consing, e.g. I use multiple return values for vectors of size 3 and quaternions. (It'd be a bit too much to use those for 4x4 matrices, so I just declare those dynamic extent and hope for a stack allocation.)
22:51:12
aeth
i.e. during my game loop, I do almost no allocations, except the few cases where I need to do stack allocations (and when I use cl-sdl2 to handle input, which conses, unfortunately)
22:52:35
jmercouris
of course all assets beforehand, and as much pooling as possible, but nonetheless always some allocation somewhere
22:53:19
aeth
The event system is going to be tricky. I'm thinking of using a custom stream that uses a fixed-size byte buffer. So that means I'm *not* going to have the fastest engine if I do that, since there'll be a serialization/deserialization cost. But, on the plus side, that make eventually breaking the code up over the network trivial.
22:53:41
aeth
Also, I'm not sure if I cons in CCL and ECL. I don't think they provide enough profiling information as SBCL.
22:54:06
aeth
With SBCL, I can be pretty sure that if I didn't accidentally introduce new consing, all of my game loop consing right now is in the cl-sdl2 library, which I will probably have to replace eventually.
22:55:37
aeth
I'm not sure if my double-float hack will work on all implementations. In SBCL, I can just work with arrays of double float and as long as I only have constant double floats, double float values stored in an array, or coerce the double floats to something else, then those double floats don't cons! It's surprising to me, actually.
22:56:14
aeth
I don't use double floats in many places, and I can't generalize my vector math to doubles because I use multiple return values to avoid consing with single-floats, and that won't work with double floats.
22:56:43
aeth
Unless I extend my multiple return value system to have stack-allocated "registers" of double-floats
22:59:44
aeth
One other place that will be tricky, probably is text for the UI. I can't preallocate everything there. Maybe I'll have to use some buffer system.
0:18:28
pillton
jasom: Specialization-store can inline calls to "methods" if there is sufficient type information available.
0:19:59
pillton
jasom: https://github.com/markcox80/specialization-store/wiki/Tutorial-3:-Compile-Time-Support
1:27:57
jasom
anyone know if cl-sqlite is still being developed, and if so, where to report bugs? The mailing-list link on the webpage is broken...
2:53:06
myrkraverk
My very first asdf system has a name conflict whenever I re-compile it, when I load it with (ql:quickload) however, on subsequent loads, it succeeds.
2:54:23
myrkraverk
That is, I have a name conflict in :common-lisp-user and :my-package when I load it with (ql:quickload :my-package) and it needs to compile source file again.
3:34:56
Fare
asarch, he hasn't been in #lisp in many years. Not sure he uses it much if at all these days.
4:08:29
asarch
A book that you can use as a reference manual (how to open files, how to list directories, etc)
4:09:35
aeth
PCL is more of an introduction. Common Lisp Recipes (same publisher, different author) is more of a reference. I don't think it's online. The ebook was on sale for $10 on Black Friday. So... you'd have to wait almost a year
4:16:50
aeth
The core language features of Common Lisp haven't been changed in over two decades. The language extensions are a mix between just as old as the language (things that didn't get in the standard, but could have) and fairly new things. They still move fairly slowly. But everything else is just like any other programming language, and it changes over time.
4:50:09
pierpa
The best reference manual for CL is CLTLII + checking CLHS to be sure particular things haven't changed.
6:04:52
asarch
One stupid question: I start sblc and then type a few expressions, is it possible to save them into a file?
6:19:12
myrkraverk
For example I have it configured with :history #p"~/.sbcl.history" ; in my .sbclrc
7:17:17
smokeink
Is there any easy/idiomatic way to find all symbols that are fbound to some function ?
7:29:19
loke
Does anyone know of a nice library that can parse infix expressions as strings and evaluate them?
7:32:12
myrkraverk
It's basically the tutorial in most compiler books, but I don't know about a library for it.
7:33:28
myrkraverk
As in, flag1 flag2 flag3 are meant to be mutually exclusive and so far, each is a simple parameter.
7:33:48
myrkraverk
For two, I can just use (and flag1 flag2) but it gets harder when there are 3 or more.
7:35:19
myrkraverk
Of course there's something simple to do it. I was thinking about rolling my own with LOOP.
7:35:56
loke
If you have lots of flags, LOOP witll be more efficient as it will allow you to exit early.
10:19:18
specbot
Processing of Top Level Forms: http://www.lispworks.com/reference/HyperSpec/Body/03_bca.htm