freenode/#lisp - IRC Chatlog
Search
20:04:34
phoe
Because https://github.com/rpav/cl-autowrap/issues/77#issuecomment-315454280 is what I get.
20:05:40
knobo
clhs says that a vector may or may not be simple after delete. But cltl2 says the vector is of same kind.
20:13:57
knobo
Because I did. Because I thought it was creating problems for me, but it turns out it does not after all.
20:14:00
aeth
If it relies on non-standard behavior in SBCL that could break on other CLs that that project supports, it is a bug.
20:14:09
Bike
i think it's a bad idea to rely on the return value being adjustable, but if implementations do actually return an adjustable array then it's kind of low priority.
20:14:29
aeth
I limit the amount of CLs that I officially support in my documentation, to limit the amount of bugs that way.
20:15:14
aeth
If all supported CLs behave like SBCL, there is no bug in my projects. But if projects implicitly spport all CLs and don't, then perhaps the bug is their lack of documentation.
20:16:18
aeth
In practice, most large projects don't actually support all CLs already. e.g. if they rely on a library that relies on CFFI
20:20:36
knobo
Anyway, I think that if there is a lot of delete/vector-push-extend maybe a list is more appropriate.
20:21:29
aeth
I don't think there's enough information to see which one is better with just that description.
20:22:23
aeth
I personally think that lists are the data structure that always should have to be justified (except in macros, of course, where there's no choice), especially because traditional Lisp culture overly relies on them.
20:30:49
knobo
Arrays are great. But it would be grater if delete would also set the deleted positions to nil or 0 or something approperiate, so that data could be garbage collected
20:32:11
knobo
And it would be greater with certainty that adjustable-array-p would be the same after delete.
20:54:12
knobo
So the more I think about arrays vs lists I think I'll go for lists as default then rather use array if I can justify that.
22:31:13
tetero
Quick (and likely stupid) question: What's the difference between (in-package :something) and (in-package something)?
22:35:45
|3b|
where the symbol is interned (which in practice probably means "not much" unless you modify packages at runtime, with for example IMPORT)
22:37:19
tetero
I was wondering because they seem to have the same result for me, in what I'm doing, (not doing what you're describing), but I figured that in Common Lisp it's there for a reason
22:38:10
|3b|
other options are (in-package #:something) which doesn't intern at all, and (in-package "SOMETHING") which also doesn't intern, but may get confused when people run with non-default readtable case (and/or 'modern mode' lisps)
22:38:49
|3b|
IN-PACKAGE is a macro, and the package name isn't evaluated, which is why you don't need to quote the non-keyword symbols
22:39:55
|3b|
the package name is a "string designator", which means it can be a string, character (representing a string containing that character), or a symbol (representing the string naming the symbol)
22:40:55
|3b|
symbols in CL are converted to uppercase by default, so :something, something, and #:something are all symbols named "SOMETHING", so when used as a string designator all designate the same string "SOMETHING"
22:42:40
|3b|
"designators" are mostly in CL just for convenience, since in most cases you could use a string directly or convert it explicitly.
22:43:51
|3b|
the various syntax for symbols (keywords, normal symbols and uninterned symbols) are there for reasons, but those reasons mostly unrelated to use of symbols as designators
22:45:20
tetero
Aye. My spontaneous reaction when dealing with Common Lisp is that things are thought through and aren't arbitrary
22:45:21
|3b|
if you only use defpackage, and never IMPORT, USE-PACKAGE, etc to modify existing packages, you usually won't notice the problems caused by interning extra symbols
22:45:57
|3b|
(aside from possibly seeing a few extra options when you try to complete symbol names in slime)
22:48:45
|3b|
if you IMPORT a symbol into a package, and that package already has a symbol by that name, you will get a conflict. Similarly when using USE-PACKAGE, you will get conflicts if any of the symbols in the used package already exist in the other package
22:51:43
|3b|
and a less serious problem (if at all), is that INTERNing the symbol prevents it from being GCd, so using :foo or foo instead of #:foo potentially wastes a few bytes
0:17:20
krwq
is there some good example how to use ironclad with aes in cbc mode? i tried simply doing encrypt-in-place and when i pass a plaintext which is shorter than one block it doesn't do anything which suggests that it does something else what i thought it does
0:21:39
krwq
i took my current example from http://gihnius.net/2014/09/68-secure-your-cookies-of-hunchentoot-in-common-lisp/ but this is simply wrong
1:58:17
jasom
krwq: I haven't inspected it for correctness, but https://github.com/Shinmera/crypto-shortcuts wraps ironclad with easier-to-use functions
2:24:55
Bike
you can treat numbers (actually integers) _sort of like_ vectors, but they're not actually vectors, in lisp terms
2:27:23
krwq
ok, i would forget about negative, they have conventions for bits, but non-negative should be interchangable with bit vectors imo
2:43:46
Bike
well one chapter is called "numbers, characters, and strings" so there's three right there
2:55:01
Bike
okay, okay, what? "some random name from a class"? "some random places"? do you have some concreate examples of what's confusing you, maybe?
3:02:09
Bike
there's no limit on N for (unsigned-byte N), for instance. (I mean, you'll run out of memory at some point)
3:03:51
|3b|
ACTION was about to paste http://www.lispworks.com/documentation/HyperSpec/Body/04_bc.htm
3:04:50
|3b|
4-3 is the list of ones that can have parameters, 4-4 is ones that have to have parameters
3:13:25
|3b|
http://www.lispworks.com/documentation/HyperSpec/Body/04_cg.htm#classtypecorrespondence 4-8 has a list of types that are also classes
6:54:09
elderK
Hey guys, I recently felt like tinkering with Lisp again and did some reading of the CLHS.
6:54:37
elderK
The specs say that it's up to the implementation whether a slot accessor is setfable?
7:04:41
elderK
dmh: I get the feeling this CLHS page was rushed or is kinda... wrong. If you follow the syntax spec for defstruct, you'd think they you can only specify a *single* option for slots.
7:06:21
elderK
dmh: I'm not even sure how you'd go about implementing a setf for defstruct. I mean, structures are different from objects, right? They're not just some "cut down" version of CLOS classes?
7:08:12
dmh
installing something from planet and finishing a project in a day and then not touching either for a month :-)
7:10:29
elderK
Which, of course, complicates things a fair bit if you want to make your RT things reasonably efficient.
7:12:46
elderK
(I figured I'm make a minimal binding for SDL2 and make a simple 2D 'game' where you just move yer dude around the screen. Nothing complex.)
7:13:44
elderK
CFFI seems pretty nice - I played with it a couple years back, the groveller and stuff.
7:13:55
dmh
i was causing something to greatly fuck up and couldnt figure itout. lost those sources to a like 10 year old SSD pooping out
7:14:56
elderK
I've lost track of how much time I spent creating my own implementation of records and objects and stuff in Scheme.
7:15:43
elderK
Years and years ago, I was scheming in a big way - reading tons of whitepapers and stuff. But, whenever I tried to do something *real*, like say, write a program to analyze ELF binaries, I just... found it very painful.