freenode/#lisp - IRC Chatlog
Search
11:42:22
ecraven
is there any lisp development environment where I can say "show me all calls to function `layout' where the fourth parameter is nil"?
11:47:08
ecraven
phoe: that won't work, this is a web app, I cannot make a call to all places where it appears
11:47:42
ecraven
it occurs some 100 times in my code, and I want to change those places where the last parameter is nil. not urgent, just thought there might be some good way.. I'll just look at all the places where it is called, and go through them by hand
11:50:27
Bike
well, i don't think the implementation is going to retain that much information about calls, so i think you're out of luck, then
12:29:19
phoe
at the moment there are no native video decoders or players in Common Lisp, so your only option is interfacing with any kind of foreign library designed for this.
12:52:15
jackdaniel
I was referring to phoe's statement about "no native video decoders or players in Common Lisp"
15:56:48
Shinmera
We'll see how many people use the opportunity to go to the beach instead of watching the talks
15:57:14
beach
As long as they have some other participant to discuss with, that's part of the purpose.
16:00:44
Xach
92 is the banquet count according to a recent email. i am sure some, like me, are bringing an extra person who will not be at the conference
16:02:32
flip214
well, the talk could be given via the internets or some cheap off-shoring substitute as well, right?
16:03:45
Xach
I am extremely nervous because my spanish is subpar and my experience with transport in madrid was poor (due to my language barrier). But I think things will work out somehow.
16:05:34
Shinmera
dim: There was an option for the banquet on the registration page. It should have been ticked by default while it was still available.
16:05:48
Shinmera
dim: If you did have it, your receipt should include "ELS-2018-banquet" in the items listing
16:07:53
flip214
Xach: having a (highlighted) printout and pointing to the next POI has always worked for me. At least I got some general directions out of people ;)
16:36:10
johnnymacs
I am looking for a really good and complete cheat sheet of the ski combinator calculus
17:01:45
verisimilitude
It takes Common Lisp and then lets you play around with C interfaces like it's Python or some garbage.
17:02:44
verisimilitude
I hold to the opinion that everything that can be implemented in Common Lisp should be.
17:03:31
fourier
a lot of times the implementation will be 1) not performant enough 2) just not feature rick
17:03:35
verisimilitude
It's typically bothersome to download a program that uses the CFFI, fourier; there's usually some shared library garbage missing.
17:04:56
verisimilitude
I seek to replace Ncurses in the Common Lisp ecosystem and I'm inclined to believe my solution is already faster, if only because it's smaller and whatnot.
17:06:03
verisimilitude
Similarly, there's no reason performant XML parsing can't clearly be done in portable Common Lisp.
17:07:22
verisimilitude
I already implemented the ECMA-48 standard, optimized, and have an abstract terminal controlling library built from that.
17:08:50
verisimilitude
I'm strongly considering writing programs that copy the interfaces of the Curses bindings, such as CL-CHARMS and CROATOAN.
17:10:06
fourier
they are missing high-level constructions which hides ncurses completely and allows to build easy-to-use text based UIs
17:10:27
verisimilitude
Part of the reason I wouldn't do it is because it's not clear which of these interfaces are popular; I wouldn't want to waste my time.
17:10:47
fourier
some high-level UI to build beautiful textmode interfaces a-la Turbo Vision is missing in all languages though (not only in CL)
17:14:06
slyrus1
I don't suppose anyone's written a json-builder for cxml have they? It would be great if i could get a JSON document back from my cxml document.
17:30:47
jackdaniel
speaking of ncurses, I wrote a small tutorial on it recently http://turtleware.eu/posts/cl-charms-crash-course.html
17:32:00
fourier
then i've tried it couple of years ago, cl-ncurses was more complete and easy to use
17:39:09
verisimilitude
I'm curious as to what you think of CL-CHARMS, et al., to my ACUTE-TERMINAL-CONTROL, jackdaniel.
17:40:34
jackdaniel
I don't understand second part of the sentence: "cl-charms *to my acute-terminal-control*"? do you mean your idea of providing library in CL which allows creating TUI?
17:41:07
jackdaniel
cl-charms is just a set of bindings and some syntactic sugar on top. this high level interfaces needs some love
17:41:58
jackdaniel
if you ask me whenever we should rewrite all software in Lisp, I'd say it'd be a waste of time - there is some software which is well written and it is not written in Lisp
17:42:31
jackdaniel
rewriting libraries just for a sake of having it all in Lisp never was a sound idea to me
17:43:24
jackdaniel
rewriting them for a sake of better interoperability sounds better, but if you create a decent layer using cffi bindings it is fine too
17:44:56
pjb`
jackdaniel: you're not wrong, there is at least one software not written in lisp that is well written.
17:45:24
pjb`
jackdaniel: but I would still say that you'd better rewrite everything in lisp, because finding the one that is well written will be a daunting task!
17:46:27
jackdaniel
I'd even say that Lisp encourages bad code-writing, because it extends your idea reach - if you have mess in your head it just magnifies it
17:46:33
pjb`
Let's take for example freerdp. Seems to work nicely enough (much progress has been done in the latest years). But when you look a the code (in C), it's rather horrible. Code duplication everywhere, horrible style, etc.
17:47:00
pjb`
jackdaniel: well right, it's not the language, it's the programmer. What we mean is: have it rewritten by lispers! :-)
17:47:45
verisimilitude
The interface is quite brief, for now: http://verisimilitudes.net/2018-04-04
17:47:46
jackdaniel
I'm lost, but I have this itching urge to disagree despite not understanding the above ;-)
17:47:57
pjb`
jackdaniel: almost all functions in freerdp are longer than one screen height (and you know the size of screens we have nowadays, even in 16:9, you go over 2000 pixels high!).
17:49:05
pjb`
Now, of course, perhaps it's even not the lisper vs. C or java programmer that matters. Just that Lispers are usually just more experimented. Given that half the programmers have fewer than 5 years of experience…
17:50:25
verisimilitude
Metaprogramming encourages better and more resilient design and Lisp has good metaprogramming.
17:51:13
jackdaniel
I don't agree, but I have better things to do than to defend my position :) I'll just accept the fact our opinions differ
17:51:22
pjb`
yes, but even without metaprogramming, you can still write functional abstractions. Instead of copy-and-pasting the same multi-line code structure tens of times…
17:51:44
verisimilitude
Instead of just solving the problem, you encode your thoughts into the program in a way that permits solving variations of the problem not specifically tackled by you.
17:51:55
jackdaniel
verisimilitude: there is hardly enything to compare (looking at the link you have pasted)
17:52:51
verisimilitude
I'm giving your article a read, jackdaniel; I'll make certain to look at the functionality and see what's good.
17:52:51
jackdaniel
cl-charms is a complete library, this looks like a raw sketch of something you may start developing some day into real library
17:54:55
jcowan_
My instinct is to say "Explicit renaming FTW", but I'd like to know what people think
17:55:55
jcowan_
Just suppose that I had persuaded you that hygienic macros were a good thing to add to the language.
17:56:57
jackdaniel
jcowan_: I'd add them with an interface which is as close to original as it is practical
18:03:08
jackdaniel
I doubt many people will have opinions about most feasible syntax for such half-sterile macros - such constructs are not very popular among CL programmers. you could propose some syntax in a form of a library and promote your idea, then more awareness may be born
18:06:48
BoopBeep
I have a byte array, and I want to grab a few places and convert it to an integer. Is there a way to do this without shifting each byte into a number?
18:09:55
pjb`
This is why lisp is a lower level programming language than C, and better suited for system programming.
18:09:56
verisimilitude
I should be using those two, but I've a mess of this; I may correct it later.
18:11:34
verisimilitude
I don't know, pjb`; how easily can you segfault in Common Lisp; everyone knows the true mark of a low level language is the ability to irreparably fuck things up.
18:12:03
pjb`
verisimilitude: with a good implementation, you can't, and this is why it's a good language to write sturdy systems.
18:12:47
pjb`
But anyways, you have implementation specific extensions, like in C. Linux is not written in ANSI C. It's written in GCC C.
18:56:26
rpg
This is a stupid question, but I'm blanking on the answer: what's the best way to print a list *completely* (i.e., without ellipsis, etc.) but also without package qualifiers?
18:57:43
rpg
Xach: in this case it's a list of symbols, but it might (someday) have numbers in it, or sublists, as well. But no structured data like CLOS objects, structs, etc.
18:59:08
rpg
It's symbolic data that needs to be read by a non-Lisp program that won't understand my namespaces...
19:01:42
rpg
dim: It's not my other program -- it reads s-expressions -- and I can't rewrite this enormous C++ snotball to accept JSON. Plus I'd still have the "decode the symbol" problem.
19:03:22
rpg
pierpa_: Will PRINC avoid issues with *print-length*, *print-circle*, *print-level*, yadda yadda yadda?
19:04:15
rpg
actually, I don't know if it's length or right-margin that's tripping me up using format ~a
19:08:22
rpg
pierpa_: That seems to have solved my problem. So it was probably *print-length* causing my issue.
19:11:58
pierpa_
I guess you are not using weird symbol names, but in case, remember that (princ '|foo bar|) prints: foo bar
19:26:52
ecraven
how is access to displaced arrays implemented? does it always go through one additional indirection?
19:28:10
ecraven
something like get the indirection pointer once, then use that instead of going to pointer + index?
19:30:06
rpg
pierpa_: No, ok symbol names. The language I'm working with is quite restricted (and specified to be case insensitive).
19:50:46
Xof
I do have a talk to give, about use of Lisp to keep me from going insane while teaching
19:53:04
FareTower
Sorry I can't come to ELS this year :-( I hope you all have lots of fun in Marbella!
19:57:53
d3j
if anyone has a moment to spare for a newb... where can I set the paths for /includes and dll for when g++ is called in quicklisp installs... having trouble with antik / gsll install.
20:30:34
k-hos
you can set search directories with the -L flag in gcc, how you would tell quicklisp this I don't know
20:31:46
Shinmera
you also are not telling cffi, as I do not believe it handles invocation of gcc/etc.
20:38:59
rpg
Shinmera: You are right -- I think there are a number of one-off solutions to driving a C compiler, or make through ASDF, but no standardized extension for that.
20:48:46
rpg
Shinmera: Right, but I think you can set variables to influence it. How one is to do that before the creation of the package that the variable names live in is left as an exercise to the reader! ;-)
20:51:15
Shinmera
Unfortunately that often doesn't entirely do what you expect it to, since the loading of dependencies isn't done by cffi and the system probably doesn't know about the directories in that list.
20:58:38
rpg
Ah, so if CFFI asks to load library x.so in that directory, all's well, but if x depends on y.so in that directory, you lose.
20:59:04
Shinmera
Well, you might lose in a subtle way if y is on the system, but has a different version.
21:00:19
Shinmera
If you have x and y in a directory that the system does not know about and you tell cffi to load x, it'll first check that directory, see it there, then load it.
21:00:43
Shinmera
on Linux, doing so means looking in the ld.so.cache and whatever, which likely won't include that directory.
21:01:06
Shinmera
on OS X it depends on the library -- you can have library entries with explicit relative paths.
21:04:13
Shinmera
Which is part of the reason why CFFI does not advise using *foreign-library-directories* in the first place
21:05:11
Shinmera
In fact, things are such a mess that, if you want to be 100% certain things are loaded right you need to rename your libraries to unique variants that cannot be on the system otherwise, and reproduce the dependency load order yourself manually.
21:07:11
rpg
So basically, if you are using a non-system library, just make sure it contains all of its dependencies.
21:07:47
Shinmera
Well, except for things like libc, since including that will make things crash real hard
21:08:46
rpg
Shinmera: Sorry, what I really meant was "don't try to load a system that comes as multiple shared objects (unless it's installed at the OS level).
21:13:39
rpg
phoe: Was looking over your tools library and liking it. One question -- why did you make PRINT-OBJECT-READABLY be a DEFUN instead of a generic?
21:29:56
LdBeth
Common Lisp Music uses macros to generate C libraries and corresponding loading routines so foreign libraries can be loaded as if they’re compiled Lisp files
21:40:08
Shinmera
What I think is actually neat is: clx' automatically generated protocol functions based on the X spec.
21:43:24
Shinmera
Also neat: Baggers meticulously translated the GLSL spec into a machine-readable format, which is then used to generate functions in his compiler.
21:45:25
LdBeth
So maybe I can grub Intel 64 manual and auto generate instruction sets for assembler
22:00:54
LdBeth
Well it’s a little hard without an exact name. And search ARM’s ASL Specification Language gives me little results.
22:03:56
slyrus1
is there an easy way to get a type of a string -- without the length? e.g. (type-of "foo") gives me (simple-array character (3)). And I want (simple-array character *).
22:10:37
verisimilitude
If you need the particular list, (SIMPLE-ARRAY CHARACTER *), simply build it with these in, say, a backquoted expression.
22:12:09
slyrus1
I have some code that's building some cxml-stp data structures and I occasionally run into corner cases with rod/rune types, etc...
22:15:21
mfiano
(type-of "foo") gives 4 different results across 6 implementations. It's not guaranteed to give a portable result.
22:18:25
mfiano
Sure, but that's a bit out of context. However, Edi Weitz mentions in his book to not ever use it programmatically.
22:19:36
verisimilitude
Now, arrays have all of these specialized functions for dealing with them, but that's not a good reason to disregard TYPE-OF.
22:25:10
aeth
Well... a typed cons is still necessary, so you can tell just by type checking the car the type of every element in a list
22:25:44
aeth
I don't think you can do that with the existing cons, since a cons could hold anything
22:26:37
pierpa_
you can declare a variable to hold a (cons integer list) then it's your responsibility to ensure this is true
22:27:35
aeth
Or you could have a struct called kons where kar is of type foo (e.g. fixnum or integer) and kons is of type (or kons null)
22:28:30
aeth
Unfortunately, implementations are wildly inconsistent on struct type checking. Afaik, SBCL always checks, but one of CCL or ECL only checks in the constructor and one only checks in the setter.
22:31:26
pierpa_
the following is not working (deftype integer-list () '(cons integer integer-list)) /me wonders why...
22:31:57
aeth
pierpa_: That wouldn't be a good idea, though. That would be O(n) checking if it worked.
22:33:32
aeth
And if it's a struct, SBCL and possibly others will efficiently allocate the typed cons where it's possible, e.g. the double-float members will be unboxed.
22:36:39
verisimilitude
I never bothered to look, but I'd figured a CONS would usually be implemented identically, regardless of type, even in SBCL.
22:46:56
aeth
Of course, you would have to override the accessors and constructor on an implementation-specific basis to get the desired behavior, inserting check-type's and the's where needed
22:47:36
aeth
You'd also probably want to write a typed-list as well as some list related operations, such as do-typed-list
22:48:58
aeth
I'm probably going to use a variation of that in one of my programs because it turns O(n) type checking into O(1), and there isn't much more than type checking done to items of the list.
22:52:46
aeth
The accessors are wrong, too. Atm they're fixnum-cons-fixnum-car, but that's just a simple (:conc-name nil)
23:20:51
rpg
phoe: I think so. On my way out of the office right now. I'll try to remember to do that when I get home.
23:21:59
phoe
minion: memo for rpg: could you submit an issue with a proposal for making that function generic?