freenode/lisp - IRC Chatlog
Search
21:28:51
TruePika
On x86-64, declared ftype is (FUNCTION (SEQUENCE) (VALUES (MOD #.(- most-positive-fixnum 2)) &OPTIONAL))
21:38:58
jasom
ACTION think it looks better with every-other letter case-inverted rather than every-other character
21:39:36
Fare
jasom: well, launch-program support was there in hiding, and epipping revealed it and made it useful to everyone --- also squashing many corner case bugs and fixing the windows port on many implementations.
21:40:42
Fare
so I wouldn't really call it a new feature, more like a cleanup and polishing of the existing feature. It can also let me say that so many half-assed run-program libraries can be declared superseded.
21:40:48
TruePika
SOCKET-RECEIVE takes some :ELEMENT-TYPE, and SOCKET-SEND takes some :EXTERNAL-FORMAT
21:41:28
jasom
TruePika: are you discovering that usocket isn't very useful if you need to do more than very simple things with sockets?
21:44:47
TruePika
okay, :EXTERNAL-FORMAT is for sending a STRING; I presume the buffer otherwise needs to have (UNSIGNED-BYTE 8) in it
21:47:01
TruePika
If I open a stream via SOCKET-MAKE-STREAM, what issues can arise if I never CLOSE it?
21:47:44
jasom
I would guess that the underlying socket never goes away, but would have to look at the code
21:48:02
TruePika
"If auto-close is true, the underlying os socket is automatically closed after the stream and the socket have been garbage collected."
22:49:33
Bike
values types as they are are pretty bad, but at least they make sense conceptually. keys would not
22:53:10
fouric
...would anyone happen to know why my cl-launch script can't find lisp-stripper, even though i added its path to asdf:*central-registry* ?
22:57:03
fouric
TruePika: wait, did you mean the ASDF *system's* name or the name of the ASDF itself?
23:09:57
fouric
now i just get#<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {10001CEF83}> fell through ETYPECASE expression. Wanted one of ((OR NULL PATHNAME) STRING).
23:18:20
phoe
I'll most likely be showcasing the completed dictionary (in its beta state) and opening CLUS for contributions and reviews.
23:29:59
fiddlerwoaroof_
fouric: I really like using net.didierverna.clon for writing commandline utilities
23:30:38
Fare
I'm very happy using uiop, inferior-shell, cl-scripting, cl-launch, command-line-arguments for scripting.
23:36:23
Fare
and I don't know how/where you set it, but by default cl-launch won't read personal initialization files.
23:39:42
fouric
Fare: well, i managed to get the script to load lisp-stripper by putting it in ~/.local/share/common-lisp/source/
23:40:37
fouric
Fare: all i'm trying to do is execute the first example at http://cliki.net/cl-launch
1:17:33
akkad
ACTION hunts for any examples of emacs lisp calling out to sbcl repl to crunch data and return to display in emas
2:09:01
drmeister
Bike: I'm getting a lot of apparently spurious warnings on global variable accesses that I think happen on global variables that aren't bound when the forms that access them are compiled.
2:14:57
drmeister
Uh - it's not unbound variables I should be warning about but undefined variables.
2:18:20
drmeister
What is it checking? Is the reader signaling an error that the compiler is catching and reporting that the variable is missing?
2:18:53
drmeister
Whoops - this latest example is what SBCL does. I'm trying to figure out what Clasp should do.
2:22:02
drmeister
I'm getting a couple dozen warnings the first time I ran with the code enabled - maybe it's my code.
2:24:31
drmeister
But I've never had anything in place to check - so maybe it's catching problems that have been there for a while.
2:27:43
drmeister
The first three complaining about SIZEOF-UINTPTR_t are proper warnings and would signal an error if the code that accessed them were ever evaluated.
2:29:55
drmeister
make-load-form is not defined yet. We are bootstrapping out of the primordial ooze.
2:30:40
Bike
what's calling it then? and yep, looks legit https://github.com/drmeister/clasp/blob/testing/src/lisp/kernel/cmp/cmpobj.lsp#L41-L42
2:30:54
Bike
imagine, a compiler that warns when you when something won't work. incredible technology
2:34:09
drmeister
ACTION suffers C++ Stockholm syndrome. segfaults are C++'s way of saying "slow down" (paraphrased from Terry Pratchett RIP)
2:34:44
Bike
what are you talkin bout, c++ gives all /kinds/ of ten line template unification impossibility warnings for your convenience
2:43:36
drmeister
So to extend asdf/quicklisp systems to support Clasp, I'm (1) forking them (2) putting them in quicklisp/local-projects (3) hacking clasp support into them and (4) pushing them back to my fork.
3:32:18
drmeister
Every time a function is looked up it is pushed into a list within a hash table keyed to the name of the function.
3:32:18
Bike
both the no-tr-to-translator-name dupe is legit, maybe it's fine. i just don't want cleavir to be signalling spuriously
3:41:57
drmeister
I don't understand why people rag on Common Lisp having four kinds of equal - it's awesome.
3:43:01
drmeister
I just wrote an equalp(...) method for Clasp's SourcePosInfo object (it tracks source position info). Now I can use PUSHNEW with :test #'equalp and it will recognize equalp SourcePosInfo objects.
3:44:39
Bike
equalp works on structs and hash tables and stuff, but it's supposed to use eq for anything not expliclty listed
3:46:59
White_Flame
of course, this is the age old quirk of CL that not every standard function is generic, and thus can't be extended by the user
3:48:43
drmeister
Really? That's a quirk? That idea blows my mind. That would really be a programmable programming language.
3:53:36
White_Flame
the model of "definitions are actions which mutate the VM" makes things like that problematic
4:02:22
Bike
"The consequences of attempting to use call-next-method outside of a method-defining form are undefined. ", straightforward
4:04:20
Bike
or it could just be the call-next-method in the macroexpansion... which is in defmethod print-object
4:05:12
Bike
these warnings aren't stopping the build, right? do you get a warning from just a regular defmethod with call-next-method in it?
4:07:58
Bike
actually, since call-next-method can't just be defined later like the rest, this would indicate an actual problem
4:14:33
Bike
and it's not supported in a primary method of a build in method combination other than standard, no
4:26:00
drmeister
It's building cclasp right now - so once it's done I'll check or there will be lots of warnings.
5:04:14
fiddlerwoaroof_
Are optimize declarations mostly just binary choices? i.e. do any compilers take account of (speed 2) or (safety 1)?
5:06:16
Bike
on sbcl if you have safety 0, you get no type checks (from declarations). if (and (< safety 2) (< safety speed)) you get weakened type checks
6:09:02
beach
It only indicates symbols that have no package prefix and that are not in CL and not in *package*
6:11:54
loke
I guess I have th rethink the design a bit then. I'll have to inetgrate this thing with the running Lisp runtime. There is a SLIME API for that. This is a good time to learn that API I think. :-)
6:13:28
beach
loke: This was supposed to be a quick thing, and if it no longer is, don't feel you have to do the additional work.
6:20:58
minion
BusFactor1: SICL: SICL is a (perhaps futile) attempt to re-implement Common Lisp from scratch, hopefully using improved programming and bootstrapping techniques. See https://github.com/robert-strandh/SICL
6:22:31
BusFactor1
I started writing a bit about my 'typers' idea that i've been using in my synthesizer: https://github.com/BusFactor1Inc/typers
6:23:21
minion
BusFactor1: Cleavir: A project to create an implementation-independent compilation framework for Common Lisp. Currently Cleavir is part of SICL, but that might change in the future
6:24:37
beach
BusFactor1: Cleavir is currently used in SICL, but also in Clasp. And there are some plans to write a Cleavir-based compiler for ECL.
6:25:14
beach
BusFactor1: I attempted to use a subset, but it was too painful to program, so now I use the full language.
6:36:58
beach
BusFactor1: This idea of using a subset of Common Lisp, or even a language other than Common Lisp, to implement a Common Lisp system made me think about bootstrapping and such. I am still not finished thinking it through, but there is likely to be some interesting conclusions once I am done.
6:39:45
beach
Even a maintained system such as SBCL is written in a subset in some respect. The compiler does not use generic functions and standard classes.
6:40:26
beach
Presumably, this way of doing it is a leftover from the way of creating a Common Lisp system by having a CLtL1 implementation with PCL added to it later on.
6:44:19
beach
Now I am wondering, is there any existing Common Lisp implementation that was entirely written after the standard was published?
6:52:26
beach
Yes, maybe mezzano is a candidate. Also Movitz now that I think about it. Don't know how much they borrowed from others, though.
7:24:23
beach
If an implementation supports positive and negative zeros as distinct values, then (eql 0.0 -0.0) returns false. Otherwise, when the syntax -0.0 is read it is interpreted as the value 0.0, and so (eql 0.0 -0.0) returns true.
7:26:48
TruePika
ACTION feels like the only reason why the signum page uses eql for the -0.0 case is so that implementations without signed zeroes still hold
7:27:26
beach
TruePika: I don't know about CCL, and you are probably right. But everything you said before that is incorrect, as far as I can tell. The Common Lisp HyperSpec does not say that (signum -0.0) should be -0.0.
7:28:49
TruePika
"If an implementation supports positive and negative zeros as distinct values, then (eql 0.0 -0.0) returns false."
7:36:19
TruePika
since (zerop -0.0) is true, (signum -0.0) should be -0.0, if the statement is correct
7:45:08
TruePika
CCL is giving a negative zero, but I'd think it would be a complex with a positive real component
7:52:28
beach
This page says that the class definition is available at compile time, but what would be a good, implementation-independent, way of checking, at compile time, whether the class has been defined?
7:53:23
Bike
"The compiler must make the class definition available to be returned by find-class when its environment argument is a value received as the environment parameter of a macro."
7:53:29
beach
It says that the class definition is available to find-class when given an environment argument that is the environment parameter of a macro.
7:55:14
flip214
beach: a macro can get &environment, and find-class takes an optional environment argument
7:56:19
flip214
so, if I understand correctly, you've got a file with (defclass) and (some-macro-call), and when doing compile-file against that the macro can't see the class?
7:56:21
beach
I tried (eval-when (:compile-toplevel) (macrolet ((mac (&environment env)))) (format *trace-output* "~s" (find-class 'foo nil (mac))))
8:02:31
beach
When I do this: (eval-when (:compile-toplevel) (macrolet ((mac (&environment env) (find-class 'hello nil env))) (format *trace-output* "~s~%" (mac))))
8:02:57
flip214
my (defclass) expands into a (EVAL-WHEN (:COMPILE-TOPLEVEL) (SB-KERNEL::%COMPILER-DEFCLASS 'FOO4 'NIL 'NIL 'NIL))
8:05:45
Bike
and compiler defclass seems to just register it as a type name, rather than touch find-class at all, but i'm not sure there
8:41:50
aeth
Now I have to enable-paredit-mode on slime/etc. after I run ~/quicklisp/slime-helper.el
8:56:17
aeth
Also, unrelatedly, my game engine now hangs while compiling. It takes minutes at 100% single-threaded CPU, which is really strange for SBCL. It hangs on a very small file whose only updated dependency is alexandria. The only change in alexandria is rcurry. It uses curry and lerp.
8:59:15
aeth
This very messy temporary code that I wouldn't even use if it had always taken 1 minute to compile the file. https://gitlab.com/zombie-raptor/zombie-raptor/blob/e839ed04068d57ad2b02d65c2db614fb69d7061d/text/font.lisp