freenode/#lisp - IRC Chatlog
Search
10:02:33
LdBeth
ACTION uploaded an image: ima_0bf4f93.jpeg (556KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/UiBpynCyqVhBNvKlbIJnRXZo >
11:06:25
minion
arkaros: 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
11:06:37
minion
arkaros: 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
11:08:11
beach
arkaros: I am also working on Second Climacs: https://github.com/robert-strandh/Second-Climacs
11:10:53
beach
arkaros: If so, here is a list of suggested projects (suggested by me): http://metamodular.com/Common-Lisp/suggested-projects.html
11:12:41
arkaros
Cool i will make sure to look in to it. I'm mostly looking for some lisp code to read and play around with. Im just getting in to lisp. Have some clojure experience but not much
11:13:45
minion
arkaros: direct your attention towards pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
11:14:06
jackdaniel
it shows many important aspects of the language (it is a bit clos-centric though)
11:14:37
jackdaniel
for a different perspective you may take a look at ANSI Common Lisp by Paul Graham (you need to pay for this one though)
11:14:37
beach
arkaros: This project is fairly complete and uses CLOS a lot: https://github.com/robert-strandh/Cluffer
11:14:37
arkaros
Yeah i looked at that a bit. Do you know if it is possible to get that one in a mobi format. Would love to read it on my kindle
11:15:33
jackdaniel
recently PAIP was released in a dead tree form, that should be possible to compile to mobi I think
11:19:37
arkaros
Thanks you guys have been really nice. I would love to get in to lisp a bit more since I really like the simplicity (but at the same time complexity) of the language
11:20:36
beach
arkaros: You can come here for advice when you start producing code. Also, before deciding on what to install and how, you should ask advice.
11:27:15
arkaros
I used to use emacs actually but i prefer vim since i think that it integrates better in my current work flow
11:30:45
arkaros
But at the moment I work as an android developer so i spend most of the time in android studio and use vim mostly for quick edits for git commits and README files
11:33:03
jackdaniel
it is a shame that the only way to be productive in CL is to use emacs, which is pretty awkward editor if you ask me
11:34:02
arkaros
I quite liked emacs. Especially since i used spacemacs that had most of the config premade for me
11:35:39
arkaros
The main issue for me is that I use the reminal quite heavily and the terminal emulator in emacs just wasn't that good imo and tmux+vim just made more sense to me
11:37:35
LdBeth
That’s to say, they just happen to share a fair amount of keybindings, and they all use a dialect of lisp as config language.
11:43:19
dim
jackdaniel: I prefer M-x shell over M-x term, and I've reduced my use of a terminal to almost nil these days
11:47:38
arkaros
But i actually prefer the terminal to almost any tool i have used so far. For instance git integration is mostly just a wrapper around the command line git client. Quite often i find my self needing to to something custom and need to jump back in to the terminal and run git from there so I though why no use it directly
11:51:52
dim
the terminal is not the same thing as the shell, what you're talking about seems to be a shell, and M-x shell provides a very nice environment wherein to run shell commands
11:52:08
dim
then there's M-x eshell too, but I'm yet to play with that, even though I hear it's pretty awesome
12:00:05
devon
(loop with a = (list 1 2 3) for b on a when (evenp (car b)) do (push -1 (cdr b)) finally (return a)) ; result specified or unspecified?
12:03:03
specbot
Traversal Rules and Side Effects: http://www.lispworks.com/reference/HyperSpec/Body/03_f.htm
12:05:09
beach
LdBeth: What happens in a particular implementation does not determine what is specified or unspecified by the Common Lisp HyperSpec.
12:07:11
beach
devon: (loop with a = (list 1 2 3) for b = a then (cdr b) until (null b) when (evenp (car b)) do (push -1 (cdr b)) finally (return a))
12:08:35
beach
devon: Oh, sorry, perhaps you weren't interested in doing this at all, just in knowing the relevant section in the Common Lisp HyperSpec.
12:11:03
devon
Perhaps I should not hack before breakfast, I forget essential things like where to look in the spec - but I did want to know whether to use ON vs. = a then (cdr b)
12:17:15
jackdaniel
beach: sorry, didn't have this terminal open. for once, the way buffers jump into each other is incomprehensible - it is impossible to have a static frame layout for me. other than that, it is a tool impossible to master for me – I know less than 5% of it despite exclusive use for around 8 years (and getting it to usable state as a text editor took me > month, so the learning curve is not quite steep)
12:18:36
jackdaniel
I could think of many other things, but the first one is the most annoying (and I'm sure there is some magic combo of settings and elisp scripts which solves that); second one is a dreadful blocker for many people I try to convince to use CL (and I really don't like emacs myself, despite said exclusive use)
12:38:25
dim
popwin is pretty good at maintaining your layout, and worst case, C-g gets you back to the one you like in many situations
12:39:05
dim
but we're shifting to Emacs topic rather than CL here, sorry about that, I guess it's still relevant as it helps with using SLIME…
13:04:11
jmercouris
if several people in the channel know about it, it must be a pretty consistent pattern
13:05:13
dim
well it's always the same thing, it begins with a single simple enough use case than reusing known tricks is good, and then you take it to the next level, with a couple of API calls abstracted over the technique, and... soon enough you reinvented the lib you didn't want to import
13:05:53
dim
so it's not easy to differienciate NIH from reusing known techniques on your own code, in my opinion
13:06:19
dim
I prefer to say that it's the same thing, and not call NIH bad per-se, but only most occurences of it
13:07:20
jmercouris
I'm weary, lisp may be a new language to me, but I've been a developer for many years
13:08:12
jmercouris
I therefore understand and appreciate your advice, but given my context, and my application this problem, I think dlowes approach is sufficient
13:08:14
dim
lisp is very different than most other languages in that a lib that has received no commit in the last 5 years is pretty good news, usually means it just works
13:14:04
random-nick
if you're only going to use it for writing iteration in functional style then you should use something like SERIES
13:14:10
jmercouris
No need to do all of the expensive operations at once, since the expensive operation is also I/O blocked
13:49:52
kuribas
if I make an array with (make-array 8 :element-type '(signed-byte 8)), does it use efficient storage?
13:51:24
trittweiler
kuribas: (upgraded-array-element-type '(signed-byte 8)) will tell you the actual element-type that your implementation uses
13:53:41
trittweiler
kuribas: So that should mean that it will use a byte to store the elements. You can play with upgraded-array-element-type, e.g. try '(signed-byte 11) or '(signed-byte 65)
13:58:25
beach
kuribas: Fixnum means a number that will fit in a pointer. As I recall, SBCL has a single tag bit for fixnums, so a fixnum contains 63 significant bits.
13:58:28
trittweiler
kuribas: Lisps usually uses tagged pointers. This means that some bits of each pointer are used to represent types (the "tag"). A fixnum is a pointer where non-tag bits represent a number
14:00:22
beach
kuribas: But it probably doesn't have to. In a dynamically typed language like Common Lisp, objects must be tagged so that the type can be determined at run time.
14:06:06
kuribas
beach: values in haskell can be unevaluated, and the compiler must be able to check for that.
14:07:37
xificurC
https://en.wikibooks.org/wiki/Haskell/A_Miscellany_of_Types - "Int" is the more common 32 or 64 bit integer. Implementations vary, although it is guaranteed to be at least 30 bits.
14:08:58
beach
Anyway, tagging in GHC is explained here: https://ghc.haskell.org/trac/ghc/wiki/Commentary/Rts/HaskellExecution/PointerTagging
14:15:22
xificurC
kuribas: you mean the only implementation that survived and has so many non-standardized but useful extensions that noone is considering any other options?
14:17:16
xificurC
kuribas: I think jhc was very good too, not sure what happened to it. But we're getting off topic now
14:19:33
kuribas
beach: it seems that Int and Int64 are the same. So I suppose the two reserved bits are intended for tagging, but not used in ghc...
17:41:38
makomo
what would be the difference between: (1) an accessor, (2) a place and (3) a generalized reference? i suppose (2) == (3) but (1) is the name of the operator within *some* of the places (some places might not use an accessor). is this right?
17:43:36
Bike
according to the glossary, an accessor is an operator that performs an access, and an access is to read or write a place.
17:47:00
Inline
otherwise there are read-only acessors, in which case you don't call them acessors or so
17:50:29
makomo
so places == generalized references, but accessors are a thing of their own and could be used within places
17:51:30
Inline
maybe i should have said, it's an operator, defined in the context of a slot (but the slot can name it's acessors name, so it's independent of it) and it can fiddle with anything it's designed to
17:53:26
Inline
if the accessors name happens to be referencing a function (i.e. pointing to it) then it will be a function, otherwise it can be anything
17:59:26
makomo
Inline: an accessor doesn't necessarily have anything to do with slots. DEFCLASS has the option of defining accessor for your slots for you, but all it does is define a function of the same name that sets the object's slot
18:01:38
makomo
also, in the context of DEFCLASS, they're not plain functions but generic functions/methods
21:00:55
edgar-rft
dtornabene, maybe because nobody can tell what time it is in outer space right now