freenode/lisp - IRC Chatlog
Search
7:03:36
athan
I think i understand the notion of prefix operation (I can't remember the correct term) - but like `+ 1 2 == 3` etc
7:04:04
athan
I'm familiar with TemplateHaskell, but I don't think that is the same concept as lisp quoting... right?
7:04:34
halogenandtoast
athan: the best way to think about it, is that at run time you basically have full control over your AST
7:05:20
Bike
it's really pretty simple. (+ 1 2) evaluates to 3. '(+ 1 2) evaluates to a (linked) list of three elements.
7:05:25
beach
athan: Code as data will make sense once you start appreciating macros as a way of extending the syntax of the language, or a way of programming the compiler to understand new syntactic constructs.
7:07:36
athan
Bike: Yeah, that's how haskell treats lambdas - they're immutable, and the only way to reason about them is through application
7:08:04
beach
athan: A Common Lisp macro is a Common Lisp function that takes Common Lisp code (in the form of an internal representation as a data structure) and returns Common Lisp code (again, in the form of an internal representation as a data structure).
7:08:05
Bike
no, that's true in lisp as well. once you have a function you can't do much with it but check that it's a function and call it.
7:08:58
athan
beach: so in that case, it could be an array of terms (free / bound variables) or something?
7:09:58
athan
beach: I think that corrosponds to a morphism in haskell, of the type `AST -> AST`, to the degree that quoting turns code into data, then unqoting AST into actual code
7:10:47
beach
athan: Common Lisp code is represented as a syntax tree in the form of a combination of nested lists, symbols, numbers, and other atoms.
7:11:07
Bike
i think you might be overcomplicating this. lisp is seriously really simple about it. say you have like...
7:12:09
Bike
the first element is the symbol LAMBDA, the second element is a list of one element, the symbol X, and the third element is the symbol X.
7:12:32
Bike
in other words there is an extremely close correspondance between the program text and the data structure.
7:14:30
beach
athan: You may want to take what halogenandtoast says with a grain of salt, until he or she uses the right terminology.
7:14:45
Bike
lambda is an operator. it's not a function, because functions have their arguments evaluated normally.
7:15:12
Bike
i.e. (lambda (x) x) would call the function lambda with two arguments, the first of which is the result of calling the function named x, and the second of which is the value of the variable x. which would be silly
7:16:12
Bike
but i mean, it's like that in haskell too. if you write \x -> x you don't expect the value of x in the surrounding context to matter.
7:19:01
beach
halogenandtoast: (quote (lambda (x) x)), when taken to be a FORM, can be EVALUATED to produce (lambda (x) x).
7:19:39
beach
halogenandtoast: That doesn't mean that (quote (lambda (x) x)) "is the same as" (lambda (x) x).
7:22:38
beach
halogenandtoast: Again, be more careful with terminology. '(lambda (x) x) is a sequence of characters that, when processed by READ usually turns it into the expression (quote (lambda (x) x)).
7:25:02
Bike
there's a little difference in that in haskell, something like 4:5 is banned, but (4 . 5) is ok in lisp. it's called a "dotted list" cos there's a dot. but most lists end normally with ().
7:26:22
halogenandtoast
beach: I'm sorry if I was offensive. It just reminded me of the good ol' "It depends on what your definition of is is?" from Bill Cliton.
7:31:03
halogenandtoast
beach: since you didn't respond to my apology, I'll go a step further and thank you for you assistance. I'm not around enough lispers so my knowledge and application are maybe more topological (and wrong) then it should be if I'm to attempt helping someone.
7:38:05
beach
halogenandtoast: There are a lot of very knowledgeable people here on #lisp, and Bike is one of them, so it is worthwhile paying attention. Getting the terminology right is not trivial, but it is essential for good communication.
7:39:47
halogenandtoast
Right, I understand that. But it's hard to test out whether my terminology is right/wrong without testing it out.
7:51:28
halogenandtoast
beach: Out of curiosity why the two spaces after periods. As far as I knew, that was an artifact of typewritter days.
7:52:37
pjb
2- emacs interprets dot space space as end of sentence, not dot space. It change behavior for cursor moving operations and justification operations.
7:53:41
halogenandtoast
1) Can't we stop doing that and/or not care, 2) Can't emacs be configured to change it's behaviour?
7:55:19
fiddlerwoaroof
As far as (2) goes, treating sentence and word endings differently is _desirable_ behavior in a text editor, so you'd have to come up with an alternative notation, which would be much more distracting.
7:56:23
pjb
halogenandtoast: try: Hello I.B.M. computer builder. I'm fine A.F.A.I.K. Good bye. Hello I.B.M. computer builder. I'm fine A.F.A.I.K. Good bye. C-a M-e M-e M-e
7:58:23
halogenandtoast
"The Complete Manual on Typography (2003) states that "The typewriter tradition of separating sentences with two word spaces after a period has no place in typesetting" and the single space is "standard typographic practice"."
7:58:34
pjb
joga: so if your editor is not able to take them into account, or to ignore them, then bad editor, change editor.
7:59:30
halogenandtoast
"The Elements of Typographic Style (2004) advocates a single space between sentences, noting that "your typing as well as your typesetting will benefit from unlearning this quaint [double spacing] Victorian habit"."
8:00:39
pjb
typography distinguishes spaces of different widths. If you're ready to deal with half-spaces, normal spaces and wide spaces, then you can forget the double space.
8:01:45
joga
I'll just let latex or whatever handle the formatting, but when I type plain text like email or code or whatever, I certainly do not need to care about typography or "half-spaces" or the sorts
8:02:48
pjb
But you don't need to care because your HTML rendering UA will adjust the word spacing in function of the justification and typographic rules, not in function of the actual number of SPC codes in the data.
8:03:01
fiddlerwoaroof
But, if you're writing a paper in Latex, it's useful to have the "jump forward a sentence" command work
8:04:51
pjb
In this context, double spaces are very useful to distinguish end of sentences from random TLA ending dot.
8:06:06
halogenandtoast
I feel like asking 2-spacers why they do it, is like asking some Americans why they supported Trump
8:06:42
parjanya
haven’t heard of emacs interpreting ⟨. ⟩ as the end of a sentence before, interesting
8:07:49
pjb
In the first line, I work with Mister Watson and Bill. In the second line, I work with M.
8:11:51
pjb
See for example: http://www.graphicvertigo.com/elephant/les-regles-typographiques-de-la-ponctuation-francaise-episode-01/
8:12:34
beach
halogenandtoast: I think Emacs might recognize two spaces as being a sentence separator.
8:13:00
pjb
The rules involve 3 different kinds of spaces. The non-breaking space, the justifying space, and the fine space (half space).
8:14:46
halogenandtoast
Basically, writing evolved with the instruments. Except double spaces, some people still do that for weird reasons.
8:15:11
parjanya
loke: our ⟨s⟩ descends from the romana capitalis rustica, the... more official calligraphic hand of the Romans; ſ descends from the roman cursive, which is sloppier
8:15:56
beach
halogenandtoast: What I type to Emacs usually has very little to do with how it is ultimately typeset. Consider it to be some small markup language that allows me to use more Emacs commands than I would otherwise be able to.
8:16:16
parjanya
also I suspect the Romans liked to have two versions of ⟨s⟩ just as the Greeks, and it’s used about the same way: ς at the end, σ everywhere else
8:16:37
pjb
That is, with transversal lines, one side of the quill may hang on the paper, and then splash the ink when released. For vertical lines it's nice. Hence the 𝔤𝔬𝔱𝔥𝔦𝔠 𝔰𝔱𝔶𝔩𝔢.
8:18:05
pjb
parjanya: they used terminal letter variants (in Hebrew too), because they didn't have invented the space yet!
8:18:41
pjb
Also, they didn't want the space, because it was a waste of (expensinve) papyrus or parchment space.
8:19:35
pjb
So you should on the contrary, be very grateful that you have so much resources that you can add any number of spaces you want beween your sentences!
8:20:19
loke
Yeah, that can be seen in cuneiform tablets. They really squeezed in a lot of text there:
8:21:23
parjanya
yours also works by adding something to the unicode codepoint... and it’s definately more comprehensive than mine :))
8:22:12
parjanya
I had a year of Hittite at university, reading cuneiform and all... that was a pain
8:23:26
pjb
halogenandtoast: there's a FAQ in comp.emacs which lists all the emacs clones. There are some nice ones indeed.
8:24:36
beach
athan, halogenandtoast: More terminology: The term "S-expression" (or usually just "expression") sometimes refers to any sequence of characters that the Common Lisp function READ can process, and sometimes to a nested structure made up of CONS cells and ATOMs. The Common Lisp function READ is responsible for taking the first and producing the second.
8:24:43
beach
Sometimes, an expression is meant to be Common Lisp code, or, as we say, meant to be evaluated. Then the expression is said to be a "form" which is usually only used for the data structure. A form can be a literal, a variable, or a compound form. It is a compound form when it is a CONS cell.
8:24:51
beach
A compound form can be a function call, a macro call, or a special form. Special forms and macros have their own syntax restrictions.
8:24:52
beach
It is therefore fair to say that Common Lisp has a two-level syntax. The first level restricts the sequence of characters that READ can handle. The second level is an enumeration of the data structures that are acceptable to special operators, macros, and standard functions.
8:27:23
halogenandtoast
But as such, this definition of S-exp might not apply to non-Common-Lisp lisps.
8:28:29
beach
halogenandtoast: There was a more restricted definition of "S-expression" already when LISP was invented. The definition above is a generalization of that.
8:28:53
beach
halogenandtoast: But since this channel is dedicated to Common Lisp, the more restrictive definition is only of historical interest.
8:30:15
halogenandtoast
The less restrictive definition makes it far harder to talk about. Having to refer to anything as a sequence of characters sounds like nonce to me. I'd at least prefer having a term to generalize it outside of having to talk about READ. But that might just be wishful thinking.
8:32:05
halogenandtoast
A generalization of (function (params) body). That way I can use the correct terminology.
8:32:26
beach
halogenandtoast: Are you saying that "sequence of characters" is problematic? That is typically what a file contains, or at least in some encoded form.
8:33:41
beach
halogenandtoast: The Common Lisp function READ calls the Common Lisp function READ-CHAR. When I say "sequence of characters" I mean the successive results of calling that function.
8:33:57
halogenandtoast
beach: In my perfect world a file either contains Text or Binary. Having to say it contains a sequence of characters sounds clinical or text book. When I sit down and talk with my programming friends in general, I don't want to say "sequence of character" ever in my life. Just a personal preference I guess.
8:35:18
beach
halogenandtoast: Actually, a Unix file (which is what most of us use these days) does not contain text. It contains some encoding (say UTF-8) of a sequence of characters.
8:36:20
halogenandtoast
I'm aware, but again I will never sit my friend down and say, this is a UTF-8 encoded sequence of characters.
8:39:47
halogenandtoast
See, everytime I hear and see lisp, I think. Why isn't this more popular. Why aren't we using this, it's amazing. But the factor now for me is that the people inside seem to care too much about the things that I don't care about. Maybe that means I'm a bad fit for lisp and I should move on elsewhere.
8:40:56
halogenandtoast
And there it is, one less lisper in the world. A chance to help extinguished.
8:45:34
beach
joga: Beats me. I would think that someone new to a community would have more respect for things they care about. I would.
8:47:15
edgar-rft
halogenandtoast: If you extraxt a single character from a text, will the character still contain the encoding? Will this character be different to a character extracted from a string? Will there be text-characters with encoding and string-characters without encoding? Wouldn't this complicate everything? I don't want to annoy you, but I don't see the advantage.
8:47:52
halogenandtoast
edgar-rft: speaking to real human beings is different than referencing standards. Not every conversation has to be in the context of some standard.
8:48:24
halogenandtoast
But I don't want every explaination to be a tome of knowledge I'm not prepaired to understand
8:49:04
fiddlerwoaroof
I've generally found that beach's advice on terminology helps me figure out what's going on behind the scenes better
8:49:24
halogenandtoast
fiddlerwoaroof: Perhaps you have a larger understanding from where I'm sitting.
8:50:05
halogenandtoast
I don't think what beach has said is at all wrong or not useful. It just isn't useful to me right now.
8:52:48
halogenandtoast
parjanya: Sure, and I'm sure my reputation on #lisp is forever tarnished, but at some point there has to be some understand of how to ween someone on to lisp.
8:53:02
fiddlerwoaroof
halogenandtoast: one of the big lies is that there's anything that's "just text"
8:54:13
fiddlerwoaroof
I'm just pointing out that your ideal world where you have text files and binary files is impossible
8:54:33
fiddlerwoaroof
Because a text file is just a binary file that has been interpreted into some useful format
8:54:34
parjanya
I’m a newbie just as you are, I suppose, and all those detais do help me... a lot. I guess you also have this urgency to write something and get on with it, but it seems lisp doesn’t quite work like that
8:54:59
halogenandtoast
parjanya: I'm not currently writing anything in lisp. I dabble in it from time to time.
8:55:07
fiddlerwoaroof
Anyways, if you want a good introduction to writing to lisp, you might check out pcl
8:55:28
minion
halogenandtoast: please look at 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).
8:56:29
fiddlerwoaroof
That's one of the best programming language introductions I've read, along with Leo Brodie's Starting Forth and (a while ago) Real World Haskell/Ocaml
8:56:45
halogenandtoast
fiddlerwoaroof: We have a pretty common joke in the haskell community about monads - "A monad is just a monoid in the category of endofunctors"
8:57:29
fiddlerwoaroof
halogenandtoast: yeah, heard that one before. Haskellers seem to be a bit notorious about complicated terminology ;)
8:59:04
fiddlerwoaroof
Not really, in most of the cases they're just fancy words for simple concepts :)
9:00:02
fiddlerwoaroof
But, also, it's generally important to use words the way the group of people you're talking to uses them
9:00:49
halogenandtoast
fiddlerwoaroof: Sure I agree a common language for describing things is important.
9:04:46
halogenandtoast
Bike: I'm done to be honest, I got frustrated and went about it the wrong way. In my frustration I thought maybe lisp wasn't for me because I wouldn't fit in with the community and beach in his frustration with me was happy to confirm.
9:06:59
halogenandtoast
But I feel like I'm far less likely to get any help now anyways. As it seems you and Beach are fairly knowledgeable and I've essentially "shat where I eat"
9:07:52
Bike
i have very little emotional energy, so i try to spend none of it on arguments about syntax or whatever. if you ask something about lisp i'll answer.
9:09:21
halogenandtoast
Anyways I'm sorry to the channel for essentially creating a toxic environment, at least this isn't #c
9:11:00
antoszka
halogenandtoast: just idle around for a while – this is actually a very on-topic practical and helpful channel.
9:11:57
antoszka
and what's wrong with the GNU one (a lot is wrong with it, but we don't know what bothers you in particular)
9:11:58
halogenandtoast
antoszka: At this point, it's one that doesn't use lisp for configuration :p
9:14:12
antoszka
i'm not a fan of the Photoshop license, but I use it, because it does the job I bought it for :). Not really, most of the stuff we find useful for Lisp programming only works in GNU emacs as far as I know
9:16:14
antoszka
I'd love to have a useful climacs one day (which I think, incidentally, is one of the things beach is working on)
9:16:36
sirkmatija_
maybe a bit offtopic, but what minor/major modes do you use for lisp programming in emacs? I only use slime, paredit and rainbow-delimiters in addition to what gnu emacs uses by default for lisp files.
9:19:50
easye
sirkmatija_: Not really related to Common Lisp editing ipso facto, but having a "fuzzy" completion minor mode like ido for unifying buffers/files is a key part of my Emacs workflow.
9:22:07
antoszka
halogenandtoast: i've actually been enjoying spacemacs more or less since the dawn of the project
9:22:17
easye
Roughly equivalent in functionality, but I have not done a review of helm to compare (I migrated to ido from something else that was being obsoleted that I cannot remember right now)
9:22:39
halogenandtoast
antoszka: I used it for a bit, I liked it, but then I decided I should learn what it's doing for me and configured my own emacs instance
9:24:03
antoszka
halogenandtoast: I don't care as long as it works ;). And I think it works really well. There's also Portacle, an OOTB „portable” emacs + lisp environment.
9:25:22
halogenandtoast
I don't remember why it was crashing, but I also wanted an excuse to do some lisp
9:27:09
antoszka
halogenandtoast: emacs lisp is not the pretties of lisps, I don't touch it unless I badly need to.
9:30:28
antoszka
fukamachi seems to be very proficient at getting code out, but he doesn't seem to document much nor maintain the code
9:32:28
fiddlerwoaroof
The wookie web server also has a pretty good web framework, if you use it directly
9:35:01
sirkmatija_
hey about ningle, how do you serve static files? do you just put them into /www directory like with hunchentoot?
9:37:08
fiddlerwoaroof
sirkmatija_: https://github.com/fiddlerwoaroof/whitespace/blob/master/demo.lisp#L406
9:37:26
fiddlerwoaroof
That project is horrible in several ways, it was my very first biggish lisp project
9:42:40
sirkmatija_
I am at the stage where all my projects are either horrible biggish or horrible smallish projects
9:43:15
fiddlerwoaroof
Yeah, project architecture is surprisingly difficult, even at a fairly small scale
12:12:03
fiddlerwoaroof
Normal climacs does run and I've heard of people that use it, but I don't know how feature-complete it is
12:28:10
parjanya
I’m mostly curious about the GUI... is there anything I can look to see how it works?
14:11:23
beach
(First) Climacs is already a bit better than Emacs, but not enough for people to want to switch.
14:28:21
beach
There is a lot of code factoring in there. It depends on McCLIM and a CLIM library called ESA (for Emacs-Style Application).
14:29:30
beach
And it is not written the way I would write it today. There is a lot of :USE going on, so it is hard to figure out where each symbol comes from, at least by just looking at the code.
14:31:12
beach
So the code in this repository: https://github.com/robert-strandh/Climacs does not work and does not reflect what you get in Quicklisp.
14:33:05
beach
And in https://github.com/robert-strandh/Climacs it is still first Climacs, except a failed attempt to clean it up.
14:33:59
beach
This repository: https://github.com/robert-strandh/Second-Climacs contains a very embryonic version of Second Climacs. It can't easily be installed and executed yet.
14:38:00
beach
An X11 resource is a 32-bit number, but it has a few bits guaranteed to be 0 so that it can be encoded as a Lisp fixnum.
14:40:45
beach
Now, (first) Climacs depends on McCLIM, and currently the CLX backend is the only one truly working for McCLIM, but there is work going on for a Windows backend, and also for a framebuffer backend that could be used with other display servers.
14:43:41
beach
You are in for some work. But we will help you out if you have questions. For stuff like that, you may have better luck in the #clim channel.
14:46:07
beach
The CLX backend for McCLIM can currently work in two different ways. The old way is that each CLIM sheet is mapped to an X11 windows. The new way is that only a top-level window is created, and McCLIM is managing its own nested sheets.
14:49:01
beach
It's the new way, because it is closer to what other display servers would offer, so the code that lets McCLIM control nested sheets needs to work well in order to enable us to created other backends.
14:52:20
beach
The code for CLX is currently maintained by sharplispers: https://github.com/sharplispers/clx
14:53:19
beach
... and this is the current repository for McCLIM: https://github.com/robert-strandh/McCLIM
14:54:56
beach
jackdaniel, who is currently maintaining McCLIM, has done a great job factoring the code, fixing bugs, merging improvements from others, and also fixing CLX problems when they were encountered.
15:20:11
varjag
just the other day i loaded som textbook examples from late 1980s into sbcl, and they worked without modifications
15:28:57
varjag
http://trove.nla.gov.au/work/18000379?q&sort=holdings+desc&_=1487950116513&versionId=39949380