freenode/#lisp - IRC Chatlog
Search
9:45:18
francogrex
hi is there a link that shows how to cross compile build sbcl for windows on a linux (from linux to make win64 executable sbcl)? I have problems building directly on windows (with mingw)
9:52:36
Shinmera
Download an SBCL from sourceforge, then use MSYS 2's MinGW console. Works just fine
10:02:40
jackdaniel
and all I had to do was to type "cltl2 ansi common lisp differences" in the search engine! :-)
10:05:14
jackdaniel
careful reader would notice "ANSI deleted the functions variable-information, function-information, declaration-information, augment-environment, parse-macro, and enclose as well as the macro define-declaration. This
10:05:47
jackdaniel
even more careful reader would find in the first paragraph: "In fact, this FAQ has many known but minor omissions that are too awkward to add with pencil to CLTL2."
10:59:46
no-defun-allowed
tbh environment information would have been really nice to see in the ansi spec
11:00:36
jackdaniel
sbcl and ccl have it, ecl will have it next release (I have written regression tests already)
11:01:06
jackdaniel
(in a form suggested in CLtL2) - I believe there is even a portability library for that
11:02:52
beach
If I may guess, the reason it didn't make it is that it is insufficient, distinctly non-CLOS-y and can not be extended.
11:03:47
jackdaniel
otoh if it were standarized it would make code walkers easier to implement (and provide better compiler macros)
11:04:55
beach
I would much rather see a compatibility protocol based on generic functions. TRIVIAL-ENVIRONMENTS or something.
11:07:28
jackdaniel
no-defun-allowed: either way, here it goes: https://github.com/alex-gutev/cl-environments/tree/master
11:08:27
jackdaniel
I've found some problems with sbcl which I've used as a reference for testing CLtL2 api (I don't quite remember what they were, but SBCL doesn't conform in some edge cases)
11:21:08
scymtym
i wonder why https://common-lisp.net/downloads mentions allegro but not lispworks. that would have been the obvious choice given that the two most popular open source implementations are listed
11:28:58
scymtym
i mean, i'm not saying every implementation should be listed, but those two are pretty obvious omissions
12:23:13
hjudt
does anyone know this -> if i fork a project that is under apache 2 license, do i really need to add a notification to every modified file stating that it has been changed? There is actually no copyright information included in (most of) the files. Or is meta-information from vcs enough?
12:39:49
ogamita
hjudt: 4. b) is clear: "You must cause any modified files to carry prominent notices stating that You changed the files;".
12:40:20
ogamita
hjudt: I think that "prominent notices" can be implemented in a separate file, but must not be hidden in a database such as git logs.
12:40:46
ogamita
hjudt: Of course, you can generate this PROMINENT-NOTICE.txt file from the git logs; write a script!
12:44:43
hjudt
ogamita: thanks. if i add a new section in the readme stating that the project has been forked from another project and provide the reference and download location of that will it be enough?
12:46:34
ogamita
It depends on each license. You need to read them to know what the requirements are, when you distribute modified forks. https://www.apache.org/licenses/LICENSE-2.0
12:47:51
ogamita
Giving credit to the original author is not a requirement of the Apache v2. (but 4.d is an approximation).
12:48:44
ogamita
Giving the reference and download location is not a requirement either of Apache v2.
13:58:57
jcowan
The point of marking files as modified by you is reputational: the original author does not want to be blamed for bugs you introduced into them!
14:04:52
drdo
I don't even want to try to understand how this works in a project with several tens or hundreds of contributors
17:03:41
stylewarning
(Echoing in here from #sbcl): We are running into a problem where we compile and load an entire system (a vanilla ASD), and we get some performance baseline of the application, then we do (load (compile-file X)), performance improves by about 20%, then (load (compile-file Y)), performance regresses back to normal. Y depends on X, and X precedes Y in the system definition. I looked for compiler policy leakage and that
17:06:05
stylewarning
(It might also help to know neither X nor Y were modified between compilations/loading, cache has been cleared, and X just contains structures+functions, Y just contains variables and functions)
17:06:47
phoe
beach: also, I think that Shinmera has done work that is superior to mine - he has done some work on something he calls a wire protocol that is usable for serializing data over the network into S-expressions.
17:07:10
phoe
His implementation is much better than mine and I would recommend to base any Eclector-related code on his work.
17:07:41
Bike
if you had function definitions before structure definitions and the functions use parts of the structure definitions i can imagine that on the second compile it will incorporate inline structure accessors etc that it didn't know about the first time and that could speed it up
17:08:04
phoe
Also the first part of the protocol specification at https://shirakumo.github.io/lichat-protocol/
17:09:27
stylewarning
Bike: that was my first thought as well, but doesn’t explain why loading Y again makes things slower
17:12:08
jackdaniel
stylewarning: and what if both files are in the same compilation unit? (i.e files are appended)
17:22:49
Bike
i figured if y defines methods it could mess up caches but that would only be a transient performance drop
17:23:29
jackdaniel
what if sbcl has a slot in the discriminating function which holds the last defined method?
17:23:52
jackdaniel
I'm not saying it has, but I can imagine such optimization, that could be done for instance for accessors
17:48:41
shrdlu68
How do I convince SBCL that I'm doing fixnum arithmetic here: https://imgur.com/a/LQOlHm2
17:52:24
pfdietz
You might try not assigning the smaller value into RES, but using a temporary? Also, what is the type of MASK-START? If it could be very negative, FIRST-LEN could be arbitrarily large.
17:55:41
pfdietz
(truncate -61 62) ==> 0, -61, so (- 61 mask-start) could be as large as 122, and the ASH does not give a fixnum.
17:58:40
pfdietz
I suggest tightening some of the ranges from FIXNUM, as allowed by correctness. Like (integer 0 61) for some of those, if that's right? Then remove declarations until it can't figure it out.
18:00:04
pjb
shrdlu68: don't worry, I've started writing an OCR software in Common Lisp. As soon as it's debugged, …
18:19:02
sjl
If you want modulo-62 arithmetic, consider defining arithmetic functions that do that explicitly, rather than using fixnum and hoping the compiler will let it overflow like you want.
18:20:18
sjl
that way if you run on a machine/compiler where fixnums don't happen to be 62 bits you'll get slow results instead of completely bonkers ones
18:28:57
warweasle
Is there a human readable version of circular lists/graphs? I'd like something like #1=(1 2 3 . #1#) but with human names like #beginning=(1 2 3 . #beginning#)
18:36:33
Bike
implementing #n# completely is tricky because you need to be able to iterate over structures and stuff.
18:39:31
sjl
Could you implement your own function that kept a map of symbol -> integer and funcalled (get-dispatch-macro-character #\# #\=) to do the actual work?
18:40:19
warweasle
I'm trying to get a non-programmer to enter formatted lisp...so I can do almost nothing and looks like I'm doing work.
19:42:10
anamorphic
Would it make much of a difference at runtime if I had compiled all the ASDF systems my code depended on, along with my own code from one, large, concatenated source file?
20:02:36
jasom
anamorphic: the compiler is allowd to inline functions that are defined in the same source file as they are called in without an inline declaration.
20:04:10
jasom
also when you load a file, it rebinds certain dynamic variables, so it's not 100% the same if you are modifying state at load-time.
20:22:03
anamorphic
So I've been looking at some CFFI-based projects, and sometimes the project will defined a file "reload.lisp" which includes only (define-foreign-library ...) and (use-foreign-library) calls and then in a separate file, the project will have all the CFFI (defcfun ...) forms. Is there a reason for the separate "reload.lisp" file?
20:24:01
Bike
i think so that if you load the project and then save image, it's easy for a restored image to dlopen the thing again.