freenode/#lisp - IRC Chatlog
Search
5:27:09
flavio81
lambdice: i don't think a symlink of the .asd file would work. I think you'll have to symlink the whole directory containing the asd file (and the rest of your files)
5:29:48
pjb
flavio81: once upon a time symlinks to the .asd worked, I see no reason why it should not still work.
5:35:10
ahungry
if you have a custom project directory, adding something like (pushnew #P"/your/path/here" ql:*local-project-directories*) is useful to include in ~/.sbclrc (assuming you're an SBCL user)
5:38:44
pjb
flavio81: that said, since quicklisp is able to scan directories automatically, it's better nowadays to symlink directories in ~/quicklisp/local-projects/
5:39:32
pjb
symlinking asd files was good when we used asdf directly, simplier than pushing lots of directories on asdf:*central-registry*…
5:41:04
flavio81
lambdice: you can use asdf to compile systems... you can also use quicklisp to load and compile systems; because quicklisp uses asdf too
5:41:11
whoman
fwiw, something that tricked me up a little, was putting defpackage in package.lisp, which the .asd components includes. it may sound abstract but it solved my initial anxiety with asdf
5:43:22
lambdice
whoman: someone on this chan linked me this http://davazp.net/2014/11/26/modern-library-with-asdf-and-package-inferred-system.html
5:45:48
lambdice
yeah i read about just a bit about this, but i would like to understand first how all these things works
5:46:44
flavio81
lambdice: the link looks as an interesting way to define your system, but too much black magic for me
5:48:50
flavio81
lambdice: just start with putting each of your files in its own package (i'd guess this is just a Good Practice), and then creating your .asd; it's basically as simple as that
5:50:40
flavio81
whoman: yes, everybody gets nostalgic about them, however remember that in 2017 we don't need any special expensive hardware nor paying expensive licenses to have Lisp running at blazing speed in our machines. So 2017 is better than the 80s or 70s, i'd say, even if Genera is more powerful than Emacs with SLIME.
5:50:50
whoman
most projects dont need to be systems aside from makefile collections of packages, i believe, where packages are normal human-sized nuggets
5:50:56
pjb
whoman: here are your 1968 hippies: https://chessprogramming.wikispaces.com/file/view/JohnMcCarthy.jpg/398712454/JohnMcCarthy.jpg https://www.princeton.edu/~blogs/archive/aspire/computingFOU17.jpg
5:51:28
flavio81
whoman: things like SBCL are a godsend; i mean, a CL compiler with (optional) static type checks, that generates very fast code, for FREE you say? I'll take two !
5:51:36
whoman
systems more so in the times of changesets inside the lisp images like how smalltalk does versioning and patches. cant be sure aside from knowing the history would help to understand more of everything too beyond asdf lambdice
5:52:26
whoman
it took a long time to set up those selfies. sometimes weeks in advance. photos were quite a big deal back then, remember.
5:54:32
whoman
https://d28dwf34zswvrl.cloudfront.net/wp-content/uploads/2017/08/Richard_Stallman-CC.jpg oh well i guess now
5:56:09
flavio81
shka_: so the world ended up using operating systems that follow the UNIX paradigm rather than the Lisp Machine paradigm
5:59:27
lambdice
well this is a bit cryptic for me.. do we need a special kind of hardware for running an operating system using the lisp machine paradigm?
5:59:52
beach
flavio81: That is one of the most gutsy decisions I have ever seen. If it had been me, I would have chosen the Lisp route, and then failed miserably because people would not go for it. By choosing a mediocre but popular design, RMS changed the world of computing.
6:00:23
flavio81
beach: Agree 100%. Do you think this has been caused by his in-fighting between the two major Lisp Machine companies?
6:00:55
beach
flavio81: No, I just think he is way smarter than most of us. Certainly way smarter than I am.
6:01:21
flavio81
Zhivago: not only processes, also the way the information is shared between application. Unix is mostly sharing text-file or binary (multiple formats) info between processes through pipes or files. This information would better be shared in the form of s-expressions.
6:02:07
flavio81
beach: Smarter as in "steve jobs is smart"? (that is, smart at marketing shit as chocolate, smart regarding distorting the reality for your own purposes) ?
6:03:08
flavio81
Zhivago: they can be represented internally as you want, but the applications should share (and see) s-expressions. We're partly there, curiously, with JSON and APIs; at the end all these mostly interchange information through JSON structures.
6:03:39
Zhivago
flavio: So, what's the issue with sharing text or binary data between processes, then?
6:04:09
pjb
Next time you see RMS in a conference, ask him why he choose to re-implement unix instead of lisp machines. We'd have GNLM instead of GNU :-)
6:05:12
pjb
Zhivago: you have to deserialize them. For an example of shared memory S-exp communication, see com.informatimago.common-lisp.heap.heap
6:05:40
pjb
Zhivago: but then, with com.informatimago.common-lisp.heap.heap we also copy the S-exp between the shared heap, and the native lisp objects…
6:06:10
pjb
Zhivago: for same-implementation communication, one could make a patch to an implementation to be able to move lisp object to a shared area.
6:07:54
pjb
With the number of conference and his celebrity, I wouldn't be surprised if RMS has been in the same room as a majority of programmers having written or contributed to at least one free software.
6:08:03
flavio81
Zhivago: so if information is exchanged between applications as s-expressions, they are uniform; they can be leveraged by any application (potentially); they will be understood by the OS as well, and they can be even shared by more than one application without requiring it to be copied from process to process
6:09:11
aeth
Each Lisp language (and some things that aren't Lisps) has its own definition, sometimes very different.
6:09:17
flavio81
pjb: what about software under GNU license model but running on .NET CLI/CLR runtime ?
6:09:49
Zhivago
flavio: Sure, but there's no obstacle to sharing information structured as s-expressions in the form of text or binary data between processes.
6:11:22
flavio81
Zhivago: yes, there's no obstacle. However, the OS ought to handle serialization to binary data; why should applications do it?
6:12:48
flavio81
pjb: whenever you mention "Real Programmers", i'm tempted to reply: "Real Programmers write FORTRAN in any language". "Real Programmers don't use Pascal" and "Real programmers don't write comments: The code is obvious"
6:13:33
Zhivago
flavio: Presumably what you mean is that the message sending interface should do it. Why does it matter where that's implemented?
6:16:57
Zhivago
flavio: I still think that the only fundamental difference between the models is that posix provides multiple virtual machines, and the LMs didn't.
6:18:59
flavio81
Zhivago: i'll leave beach to reply, he's far far far far more qualified on these topics
6:21:07
flavio81
pjb: look what you've done... now i'm thinking about watching the whole movie again
6:30:25
flavio81
lambdice: also other (very different) alternatives like EQL which is the ECL lisp implementation talking to the QT toolkit
6:46:12
p_l
flavio81: if you want a mutually-understandable data model between OS components, then S-Expressions aren't the choice (as they are to-disk serialization format), but something akin to VMS ABI with its declared common data type library, or CLR/JVM/<Smalltalk VMs>/Lisp-Machine kind where you have high-level constructs embedded in the "VM" the processes run
6:47:55
jack_rabbit
although, some operating systems have been very successful with a to-disk-able data-passing model.
6:58:26
Zhivago
Unless you want to be comparing strings you probably want to reduce that down to a nice integerish form.
7:01:44
Zhivago
On the other hand, they're also very big and it might be expensive to try to share a jpg that way.
7:07:43
flavio81
jack_rabbit: what's silly is having an OS that only understand and deals with byte-streams at the core level, unlike Lisp Machines
7:10:08
Zhivago
Perhaps it might be useful to clarify what 'core level' means. In posix systems, I would say that only the periphery deals with byte-streams.
7:11:26
jack_rabbit
I don't know of a single POSIX interface where the client communicates with the OS using a byte-stream.
7:12:56
Zhivago
Would you consider writing to a socket to be communicating with the OS using a byte-stream?
7:14:23
flavio81
Zhivago: what I mean is, the OS does not implement facilities for dealing with structured data; thus the applications need to implement them in diverse, differing ways. What i claim is that the OS should also provide services for structured data and interchange such structured data between applications, as part of the services provided by the OS.
7:17:13
Zhivago
But it sounds like what you really want is for the OS to prevent communication except via your preferred schema?
7:17:46
Zhivago
(Since it's always possible for applications to communicate structured data over byte sequences)
7:19:06
flavio81
jack_rabbit: That is "manipulating a byte-stream" if you consider that writing Lisp is "manipulating machine language"
7:20:40
flavio81
jack_rabbit, Zhivago: My point is clear: the OS should support a common *structured data*, *standarized* format, giving functions for doing diverse operations with this format, *at a core level* (that is, operations supplied by the OS). This is the only thing I suggest.
7:21:08
Zhivago
If you don't want the OS to enforce it, then this is purely an issue of a consensus between applications.
7:21:44
Zhivago
In which case, you should think carefully about why you think this is an OS level issue rather than a library-and-education issue.
7:22:46
flavio81
Zhivago: i think it's simply that you prefer your OS to stay as low-level as possible, and i don't. It's a philosophical issue, i think.
7:23:05
jack_rabbit
Zhivago, They've tried educating. It doesn't work. People still do different things than what they think they should do.
7:24:33
Zhivago
flavio: Either the OS enforces the schema, or it is a matter of consensus between applications.
9:37:21
dmiles
(defun fib (n) "Naive-recursive Fibonacci number function" (if (or (= n 0) (= n 1)) n (+ (fib (- n 1)) (fib (- n 2))))) ;; example
9:43:20
rtmpdavid
Sounds like something that would cause a lot of that late-night debugging, honestly.
9:44:32
beach
It would be contrary to the model of calculation that Common Lisp gives the programmer.
9:45:58
dmiles
in the case of if was to write : (defun fib (n) (setq foo 'bar) (if (or (= n 0) (= n 1)) n (+ (fib (- n 1)) (fib (- n 2))))) ;; memoization would defiantely be wrong
9:47:03
scymtym
i can imagine the #sbcl questions "why is fib(1) 10 times slower while fib(30) is 10 times faster compared to ccl?"
9:48:27
dmiles
rtmpdavid: *nod* right that is what i meant.. it might not be considered sneaky in the case of the non setq version
10:10:38
scymtym
beach: i was thinking the memo-cache would have been switched to a hash-table at 30 distinct calls, but you are probably right in that 10 times is way off. i guess it also depends on whether we are looking at a cold cache. i'll drop the topic now
12:00:48
Shinmera
ACTION pictures a dystopian future where the "Garbage Collector" is some kinda Terminator-like thing.
12:05:08
knobo
Would be nice if the gc could go back in time and remove the class before I was able to create instances of it.
12:49:48
Shinmera
In other news, I wrote another small webapp over the weekend. Allows you to schedule events and deals with TZ / date repeats and that kinda guff. Here's an example for my Treehouse Sunday event: https://events.tymoon.eu/1
12:53:00
easye
Hmm. Trying to chase down non-Quicklisp resources for Clath <https://github.com/BnMcGn/clath>, but seem to not be finding through the usual search engines a source repository for the 'ps-gadgets' system. Was this part of Garnet?
12:56:03
Xach
easye: one trick i've learned is that if i can't load github.com/user/foo due to missing bar, check for github.com/user/bar
12:57:07
Shinmera
Programmers hate him! Local hacker discovers how to find missing dependencies easily. How? Click here!
13:24:59
shka
but how can I know which one I can actually use, which one have reasonable UI support and so one?
14:14:57
Bike
symbols are a subset of atoms. numbers are not symbols, and there are other atoms that are not symbols.
14:16:26
beach
Some people would probably limit "S-expression" to have only Cons cells, symbols, and literals such as strings, numbers, and characters.
14:18:06
beach
But since just about everything is an atom, like a class, an array, a hash table, etc., those are technically S-expressions as well.
14:19:28
beach
SaganMan: There is some confusion about this terminology. Some people call the sequence of characters in source code S-expressions. I personally don't.
14:19:38
Bike
as beach said, it's not a term defined by the language itself. we just kind of inherited it in a vaguer way
14:20:36
Bike
common lisp text is more complicated than the SEXP := '(' SEXP* ')' | SYMBOL kind of picture
14:20:37
SaganMan
the other lisp like languages make it even more weird by using the same terms of cl to completely different meanings
14:22:53
beach
SaganMan: I advice you to use "expression" and "form" to mean the objects created as a result of READing some source code, and avoid using "expression" for a sequence of characters in a stream or a file.
14:24:10
beach
SaganMan: Though it is common to hear such things as "That's a LET form" by someone pointing to the source code. But that is an abbreviation for, "when that sequence of characters is processed by READ, an LET expression is created".
14:24:26
beach
jmercouris: That may have been what you were looking for, but using it is often a bad idea.
14:25:37
jmercouris
beach: This is for explicitly loading a set of symbols when using a foreign package, it's the only place in the codebase I do it
14:26:31
jmercouris
I thought about prefixing literally every function call, and I had a commit like that, but it was just too messy in the code
14:26:40
jmercouris
beach: This is actually part of some advice you gave me a long time ago about separating the GUI from the actual core of the program, which I've now done
14:26:46
beach
Why not just use :USE in your package definition then? Though that's usually a bad idea for the same reason.
14:27:39
jmercouris
when you load a specific file, aka a specific backend, only then should you load those symbols
14:29:15
jmercouris
hmm now you are making me second guess myself, maybe I should just include all of the items in the prefix..
14:29:17
beach
Then you can't refer to those symbols in your own package either. It sounds like a terrible way of organizing the software. But maybe I am just not understanding it.
14:29:17
jmercouris
I mean, include the package identifier as a prefix for all of the function calls
14:29:47
jmercouris
beach: I'll write a short document explaining it, give me a few minutes, I'm sure there's a better way to do what I'm doing
14:32:25
pjb
In either case, you need an indirection. If you can have only one backend loaded at a time, you can have each backend export the same package and the same symbol, and use that in your clients. If you want to be able to load multiple backends at the same time, they need to have different packages, and then you need a registration mechanism, with a backend object to be passed to or found by the client.
14:32:52
jmercouris
pjb: I don't need multiple at the same time, I only need one, and they should probably export the same symbols
14:33:39
beach
I am wondering whether two backends may define a different set of functions and types. If so, they should not all define a package with one and the same name.
14:33:40
jmercouris
I am trying to abstract the two backends as much as possible so that my core code doesn't have to change
14:33:49
beach
If they export the same symbols, then the package definition should exist before the code is loaded.
14:34:13
jmercouris
Okay, scratch that, I will not write the document because I think the understanding here is pretty clear
14:35:49
jmercouris
Alright, so, to make sure I understand, I will do something like (defpackage :backend (:export #:functiona #:functionb))
14:36:06
jmercouris
and then within any other packages I want to invoke that code, I'll do something like (backend:quit)
14:37:01
jmercouris
Okay, now what about the other situation, in which the backend code needs to call the other code
14:37:52
beach
Yes, a package is a unit of abstraction, so you export the symbols that are part of the interface of that abstraction.
14:37:52
pjb
That said, using the same package for all backends, while quite easy, is a severe case of Singleton pattern. It's probably to be avoided. Reifying the backend into a CLOS object let you specify attributes and provides a more definite interface.
14:37:56
jmercouris
Tangibly though, what are the benefits of packages other than avoiding namespace collisions?
14:38:49
pjb
jmercouris: the question is whether you can resolve the names at compilation time (read time actually), or if more indirection is needed or wanted.
14:38:51
beach
The functionality defined by the exported symbols of a package should form a unit that can be understood by itself.
14:39:38
jmercouris
pjb: I'm not sure I get it, if I took the backend and turned it into a CLOS object, is that not also a singleton?
14:41:16
beach
jmercouris: I am with pjb. I always think in terms of a possible LispOS, so that several backends are present in memory simultaneously. Then each one is represented by some object, and the processing function become generic functions that dispatch on that object. Each file would then contain methods on those generic function with one particular backend being specialized on.
14:42:09
jmercouris
Alright, I finally understand what you mean, there would be a superclass called "interface" or something, and all backends would inherit from it
14:42:15
beach
jmercouris: For example, the Cleavir compiler framework takes a "system" or "client" parameter that my code specializes on, but that can also be overridden by client code.
14:42:47
beach
jmercouris: Yes, and the functions in each file should become methods that specialize on the subclasses.
14:44:22
beach
jmercouris: This organization also allow more factoring. Code that is the same in two or more backends, can be factored to specialize on a common superclass.
14:45:05
jmercouris
Having said that, I don't think that these foreign systems could be run simultaneously
14:46:06
beach
Also, someone who wants to define a backend that is only marginally different from an existing one only has to redefine the methods that differ.
14:46:40
pjb
jmercouris: once you have a CLOS object, you can have multiple instances at the same time. For example, you can have a X11-backend (on my-screen.jmercouris.com:3.0) and two TTY-backend instances (on /dev/ttyp1 and /dev/ttyp4).
14:46:40
jmercouris
beach: Unfortunately there will be basically no code reuse beteween different backends as they are graphical libraries
14:48:03
beach
jmercouris: More generally, you should think about the ways in which CLOS allows you to improve the structure of your code.
14:48:59
jmercouris
I was thinking about interfaces before as well, (which is why we had that conversation about McClim), but I think CLOS is a cleaner way of doing this
15:27:40
rpg
Is there anything I could/should be doing to reset SLIME over time, so it doesn't misplace it's warning tool tips? These seem to start wandering around my buffers, away from their original target, over time.
15:28:38
rpg
phoe_: Sorry: I have completely forgotten what that was about. I've been traveling and off IRC for weeks now.
15:41:40
Shinmera
I'd like to write another paper for ELS, but I don't know if I'll have time this time.
15:43:16
jmercouris
Yeah, stuff like QT conference was 1500 for admission only, that's why I'm asking
15:43:57
Shinmera
Last year cost more due to the co-location, despite the co-location making everything worse than other years.
15:44:54
Shinmera
Should probably work on some of these too, sigh. https://github.com/european-lisp-symposium/els-web/issues
15:45:51
beach
Josh_2: It was decided from the beginning to try to keep it inexpensive. And students are subsidized by the regulars.
15:53:53
beach
Yes, and the attendance confirms it. Lately, there has been close to 100 participants.
15:59:41
larsen
I'd like to consider attending ELS 2018, but I'm not sure I would fit. Is it a grassroot conference in spirit (like YAPCs, if you know them) or more formal/academic ?
16:00:36
Xach
larsen: I found it to be a bit academic the last time I went, but it didn't matter much due to the value of the discussion and face-time with people I would otherwise never see
16:01:17
Shinmera
larsen: There's both kinds of papers being presented. Academic things and demonstrations.
16:01:38
Shinmera
The actual talks can be hit and miss, like with any conference, but getting time to talk to the other people in the breaks is usually what it's all about.
16:03:25
larsen
thank you. I'm not against the academic slant, of course, just afraid that *everything* is above my head. good thing you mentioned the "hallway track" (which is a thing I appreciate a lot in YAPCs)
16:04:18
beach
larsen: Xach and Shinmera are right. It is more about meeting the people and talking to them. You can be selective with the talks.