freenode/#lisp - IRC Chatlog
Search
16:17:24
pjb
(loop with n = (random (expt 2 64)) for pos from 0 to 56 by 8 collect (ldb (byte 8 pos) n)) #| --> (205 7 220 165 176 97 6 156) |#
17:36:23
pjb
chimneys: I once considered merging flightgear with ecl, to be able to script it in CL…
17:36:24
beach
chimneys: Common Lisp can generate code with performance comparable to that generated by a C compiler.
17:37:01
beach
chimneys: Furthermore, as I often point out, given the manual memory management of C++, it is impossible to write a C++ program that is both fast and modular.
17:37:38
pjb
chimneys: it shouldn't be too hard to do: first compile flightgear as a library. Then link it with libecl in a single executable. Then add the flightgear API to lisp. Since it's already scriptable in lua IIRC, it shouldn't be too hard.
17:38:30
Xach
beach: on the other hand, games remind me of movie sets a little bit. they are not built to last or to be extensible, but to provide an entertaining brief impression and then be discarded. as long as they are captured once under the right conditions it is ok.
17:38:32
pjb
chimneys: now, IIRC flightgear uses C++, so it may be more indicated to use clasp (an ecl derivative optimized for C++ interaction), but clasp didn't exist at the time.
17:38:55
Xach
Many unacceptable shortcuts in building a place to live are acceptable in other contexts.
17:39:26
pjb
Not all games are games. Realistic simulators like flightgear are in a different category, and used not as games, but as training or study tools amongst other uses.
17:39:30
beach
Xach: I believe you. But the maintenance nightmare must be a problem during development as well, I would imagine.
17:39:54
pjb
For example, you could hook the worldwide flight data into flightgear and see real traffic.
17:40:23
pjb
Pleasantness is reduced by the capitalistic constraints on commercial game development…
17:40:57
Xach
but the upside is you can pretend you are interacting with a space ship, and we can't really make space ships that millions can try yet, so
17:43:41
_death
Xach: this is true, but in recent years some companies put a lot of effort in maintenance of existing games, especially if they have an "online community"
17:47:27
Xach
anyway, it makes me think about how many entertaining illusions are created by unsustainable practices and the magic is from a) not knowing that there's a trick involved or b) not knowing how the trick works or c) not believing that anyone would go to the lengths to make it work
17:49:18
chimneys
lisp is 4 times slower than java and C++ I checked on those benchmarks,so if your desktop is 4 times faster then lisp performance shouldn't matter
17:50:40
beach
chimneys: Most often, the comparison does not involve programs with the same semantics in the different languages involved.
17:52:04
chimneys
https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/sbcl-gpp.html no i believe those benchmarks
17:57:08
_death
when use of (say) _mm_mul_pd is consider valid, the programming language doesn't matter much
18:06:15
HiRE
I think beach hit the nail on the head. You can't be both fast and modular. It's one of those attribute triangle problems.
18:08:13
HiRE
chimneys is missing the GC optimization route. Benchmarks aren't perfect. Lisp is highly compiler dependent.
18:08:43
HiRE
I mean they power space shuttles with it so it's can't be that bad for real time/near real time work
18:09:12
HiRE
I think chimneys is vastly overestimating how optimized games actually are...last one I downloaded was 50GB and ran like garbage...
18:11:23
HiRE
(you could argue real time doesn't imply fast but rather consistent...but you see my point)
18:13:04
pjb
HiRE: it depends. Modularity is in the source. We have compiler to mix and merge and optimize and remove generality.
18:13:56
Xach
The answer to "Can I do X with Lisp?" is always yes, but the question of "Will it be as easy to do X in Lisp as it is in SomeOtherLanguage?" is usually "it depends a lot on X and SomeOtherLanguage"
18:14:12
pjb
eg. if a global analysis of your lisp program demonstrates that 1- the program never evaluates input (ie. it doesn't change at run-time), 2- at a call point, the arguments to a generic function are always of the same class, then it can hardwire the method called without computing anything.
18:15:07
HiRE
yeah. To Xach's point the magic of turing completeness makes "can I do X in Y" vacuously true.
18:15:26
HiRE
Some languages have features that enable better developer interop, nicer structures to help think about things, etc.
18:18:19
chimneys
but still you yourself admitted C isn't faster than a factor of 10 that a good CL code, and processor capacity doubles every year so 2**3 = 8, so the hardware is lagging by only 3 years, and therefore the game too.
18:19:15
chimneys
infact they said numerous times on numerous sites CL generates C-like optimized code
18:20:47
_death
high performance code is never vanilla C, so no need to expect it to be vanilla Lisp either
18:22:31
HiRE
It's getting off topic but I'll leave it at this and clear channel. C++ is likely popular because of the extensive amount of libraries, bandwagoning, and developer interop.
18:33:21
chimneys
I did android phone benchmarks and found 200Mflops desktop 200Gflop , and laptop 50gflops
18:34:05
chimneys
so the phone is thousand times slower, so the factor is 10 shouldn't even matter , even if it's 20, 2**4 = 16 , so you just lag by only 4 years?
18:36:27
chimneys
also companies can save lots of money too, as it's less headache, for example google used Java and lost billion dollar lawsuit to oracle upon copyrights of Java in android
20:05:59
HiRE
are we able to post code here for review? I have some stuff I'm working on and in a few days I'd like experienced eyes to rip it apart and make me cry.
20:27:37
Xach
HiRE: it can be tough sorting out good feedback from bad. it gets easier with practice.
21:02:24
Shinmera
HiRE: there's a new, very fast deflate/zip compressor by |3b|: https://github.com/3b/3bz
0:42:58
smokeink
what is this used for ? https://github.com/sbcl/sbcl/blob/master/src/code/target-package.lisp#L739
0:49:33
smokeink
ok I'll takke a look at that paper. ANy idea why does swank need to handler-bind it?
1:05:31
asarch
If I have this timestamp with time zone enabled in a PostgreSQL record which corresponds to 2020-01-17 12:24:44.809571-06 why (let ((fecha (make-instance 'simple-date:timestamp :days 3788274284 :ms 3788274284))) (simple-date:decode-timestamp fecha)) gives other results: 10373942 11 15 1052 17 54 284
1:12:56
npfaro
I can spawn processes fine with uiop:launch-program, but uiop:terminate-process just doesn't work
1:13:08
asarch
Ok, let's try another angle: how could I convert this 3788274284 (the value stored in the PostgreSQL cluster) into this 2020-01-17 12:24:44.809571-06 using Postmodern?
1:14:16
npfaro
Ok actually it seems like it's working with :urgent t now.... but why doesn't it without
1:39:18
npfaro
When i use uiop:process-alive-p it shows that the process is "not running" but it still is on my system
1:39:52
npfaro
Could it possibly be because the subprocess is also an sbcl process? i wouldn't think that would matter though
1:47:39
npfaro
what's the hotkey to go to the definition of a function? slime-edit-definition just takes me to a blank buffer