freenode/#lisp - IRC Chatlog
Search
6:10:58
no-defun-allowed
i would not suggest buying 27 machines for 27 combos, maybe do one OS per box and run VMs on those
6:10:59
gendl
European commission. We got sucked into a euro research project. ("we" being Genworks BV, a Dutch subsidiary we formed to avoid tax issues with foreign bank account for U.S. citizen).
6:11:50
gendl
but the Dutch partners of this EU research project ("Agile"), decided to switch to our Python-based competitor near the beginning of the project
6:12:33
no-defun-allowed
if macOS is in the testing system, the mac will easily cost more than the other two boxes combined so glhf
6:12:39
gendl
so we ended up (with almost no feedback) doing essentially what we wanted to do, for this project.
6:35:01
gendl
No other major wine region placed their top estates in 5, simple, easy to understand categories with those results being officially certified by the French Government.
7:12:20
elderK
Hey guys, I'm trying some IO Stuff. Parsing something form a string. I was wondering if it's possible to like, include a literal newline in a string, such that read-line (when using with-input-from-string) will consider them individual lines
7:14:45
jackdaniel
this yields only first line: (with-input-from-string (s (format nil "hellow~%daniel")) (read-line s)); "hellow"
8:12:29
no-defun-allowed
idk why you have to buy the end of let over lambda to implement forth in lisp, just use -> and ->> as much as possible
8:24:18
no-defun-allowed
in an attempt to escape the parens they do not know the powers of, lisp newbies -- i mean clojure users -- made arrows a thing to describe steps in a "linear" computation without the parens
8:24:19
no-defun-allowed
only problem is it's postfix notation for the most part, which i don't like
8:25:54
no-defun-allowed
for example, (-> link children (aref 0) text) is how i'm extracting the link text from a plump-dom element. notice it's backwards compared to the rest of lisp?
8:27:15
elderK
Hey guys, any idea on how I could like, do read-universe better? https://bitbucket.org/elderK/epidemic/src/default/universe.lisp
8:27:50
elderK
It's kind of annoying thing to read, because I don't know the dimensions of a "universe" when I start reading. The width is determined by the length of the first line in a "universe." Universe "descriptions" are terminated by a blank line, or EOF.
8:29:17
elderK
beach: Is this formatting of Loop (with the do in particular) more standard? https://bitbucket.org/elderK/epidemic/src/default/splitter.lisp
9:22:28
no-defun-allowed
also FOR WIDTH = LINE-LENGTH THEN WIDTH could be improved on but i'm not sure how to do that. i understand you want to keep the original LINE-LENGTH and WITH may not go after FOR but i'll have to check.
9:23:24
no-defun-allowed
i can't read the loop grammar specification that well but clisp and sbcl are fine with it
9:34:03
elderK
Like, the Universe format the teachers had. It would have been better to have a specification first, then the data.
9:35:00
elderK
:) I still need to learn how to make like, a program from my source code. And what's equivalent to C's main, etc.
9:38:10
beach
elderK: WITH does not have to come before FOR, but it would be strange if it isn't. If you are trying to assign the variable in each iteration, WITH is not the construct. Just do FOR.
9:40:41
elderK
Ideally, I'd not initialize width and stuff in the loop at all. But, having to read the line first, then do stuff, then loop for all the rest, well. It was pretty nasty.
9:42:03
makomo
no-defun-allowed: i was reading (carefully this time) the forth chapter in LoL just 2 days ago
9:43:43
elderK
How do you write like, "proper programs" with CL? Say, I want to make a tool that runs, accepts command line options, etc.
9:43:53
shrdlu68
elderK: Creating an executable is implementation-dependent. If you're going to be using CL in the real world, you'll have to keep your implementation's manual close by.
9:44:02
elderK
From my cursory look at SBCL's save-image-and-die, you can tell it what function to give control to?
9:44:28
makomo
no-defun-allowed: i was expecting he would develop the forth2lisp compiler further and somehow use to write a macro which allows you to write forth but then compiles fully into lisp, or something
9:47:16
elderK
I mean, to me, there's a difference between say, a utility that you use, and something you load up and interact with through Lisp.
9:47:32
elderK
Like sure, in a sense, you are using the Lisp REPL as a CLI for your program. That's cool.
9:49:57
elderK
One thing that I need to learn about, too, is like, the licensing issues around creating a binary, say. It really seems that unless you want to do everything yourself, you kind of need to be open source since there is some confusion about Babel's licensing. At least, from some stuff I read on Reddit.
9:59:52
elderK
Even if we dynamically link to whatever we need, if I use say, CFFI, it will be in the image I save and distribute, right?
10:00:48
makomo
i've never deployed anything that used CFFI, but i'm not sure that the dumped image will contain any code of the library you were calling into
10:08:30
elderK
This seems to be a gold mine :) https://gitlab.common-lisp.net/asdf/asdf/blob/master/doc/best_practices.md
11:11:01
jackdaniel
otherwise than you have to be specefic what you do not understand about the license
11:11:28
jackdaniel
(unless the question is: please tell me what is agpl license, but there are better sources to learn that part)
11:13:11
no-defun-allowed
AGPL is the normal GPL but it also requires distribution to be available if used over a network.
11:57:04
ogamita
Here is an opportunity to write a libcl linux syscall API. there's dissatisfaction with glibc… https://lwn.net/SubscriberLink/771441/96f587a2dec5ba1a/
12:20:06
jackdaniel
in a way beach suggested: by providing bindings from CL library for system calls of Linux kernel
12:22:14
shka_
so essentially the link between the article and lisp is that we should not use FFI because glibc is incomplete anyway
12:27:10
scymtym
invoking syscalls directly can also be more efficient since work done by the C library can be skipped. same for shuffling registers around to conform to the C calling convention (see https://github.com/xach/cmucl-direct-syscalls/blob/master/src/compiler/x86/syscall-linux.lisp#L21 for an illustration of the latter aspect)
12:27:47
ogamita
Not on more efficiently, but also safer, since we would convert between kernel ABI and lisp objects directly.
12:29:32
scymtym
well, you would lose any workarounds for kernel bugs and papering over incompatibilities applied by the C library (i don't know how big a deal that actually is)
12:29:42
shka_
ok, so from what i understand you all advocate for making something like trivial-linux with pure lisp API to linux syscalls, correct?
12:30:26
jackdaniel
merely pointing you at a right direction isn't the same thing as advocacy. but yes, such possibility seems to be discussed
12:31:27
ogamita
I'm noting that some people are dissatisfied with glibc too. If we could provide a libcl that would track more readily the linux kernel new syscalls as they are added, perhaps some people would like to switch to CL to write linux client code? (*.*)
12:32:12
ogamita
But foremost, for the lisp side, having a "native" syscall without going thru C data type for the libc, would be a safety and speed win.
12:32:50
ogamita
I guess, write a little tool that would process the syscall table from the linux kernel, and generate the VOP or similar for a few CL implementations.
12:32:53
shka_
is there already a way to abstract different ways to invoke syscalls accross implementations?
12:33:14
jebes
hrm, i've done quite a bit of linux asm, i'd be willing if someone points to the right direction
12:34:34
ogamita
That's the first thing I abstract away around C functions when I do a FFI wrapper, converting error code into lisp conditions…
12:36:25
ogamita
beach: notice the scopes of posix and linux syscall are different. They have a big common intersection however. So yes, it'd be similar.
12:37:42
beach
shka_: I don't think there are such portable abstractions. Hence the project of the link I showed.
12:39:43
beach
I would definitely like to see an implementation-independent protocol. Whether some implementations realize it with some FFI code or directly in their Common Lisp code is unimportant, at least initially.
12:40:38
beach
Many standard Common Lisp functions could then be implemented, using this protocol, in a portable way.
12:46:27
beach
Yes, yes, I know. I am always looking for ways to decrease the total maintenance burden for FLOSS Common Lisp implementations.
13:27:20
heisig
jebes: yYou could try McCLIM. Even in its unfinished state, it seems much more pleasant than GTK or Qt.
13:27:50
TMA
jebes: the best gui framework for lisp is not a settled question as of 2018. Great many people prefer McCLIM that is native lisp gui framework, while some prefer interfacing with C toolkits. It needs to be pointed out that McCLIM has its rough edges. But those are being fixed
13:31:51
jebes
that's no big deal, this is more to flex the ol' lispy muscles than make a practical product
13:46:51
smokeink
why not improve on this one directly? https://github.com/robert-strandh/Second-Climacs
13:49:42
smokeink
it looks pretty neat in the screenshots at least https://common-lisp.net/project/climacs/
13:53:06
jackdaniel
fwiw "well text rendering" is not merged yet (no kerning, transformations etc), but PR will be made in a matter of days
13:54:09
jackdaniel
I like the shift of mood from "McCLIM is abandoned" to "many people prefer McCLIM … despite it having rough edges" (comparing to a state from a not that long ago :)
13:55:09
jackdaniel
nb: same thing happened with ecl a few years bag, from "floating dead" to "maintained" or "third preferred"
13:56:11
beach
jebes: In that case, don't work on (first) Climacs. I fully intend to make Second Climacs a much better editor.
14:01:31
beach
carmack: Do you have any particular reason for using CLISP? There are three other Common Lisp implementations that are better supported, and whose maintainers come here regularly.
14:01:41
shrdlu68
Are you using "clisp" as an abbreviation for "Common Lisp"? That creates some confusion.
14:02:14
beach
carmack: Then you need to tell us which of a dozen or so implementations you are using.
14:03:07
minion
carmack: 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).
14:03:43
beach
carmack: Do you have any particular reason for using CLISP? There are three other Common Lisp implementations that are better supported, and whose maintainers come here regularly.
14:04:36
beach
carmack: If you are new to Common Lisp, you should probably try a better implementation of it.
14:05:12
beach
carmack: Perhaps you don't realize that the Common Lisp language has more than one implementation, and CLISP is not one of the better maintained ones.
14:06:07
beach
carmack: If you want to learn Common Lisp, then there are better implementations than CLISP, so you should try one of the better ones.
14:07:53
jackdaniel
I'm afraid he got hopped with too many answers (competing with each other) and now it is hard to put things together :)
14:08:06
shrdlu68
This conversation is like one of those surreal comedic ones in Alice's Adventures in Wonderland.
14:09:22
minion
carmack: 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).
14:11:11
carmack
minion: I read that a while ago. Not one example of a more complicated "hello word" I have not worked.
14:11:12
minion
I read that a while ago. Not one example of a more complicated "hello word" I have not worked: An error was encountered in lookup: Parse error:URI "https://www.cliki.net/I%20read%20that%20a%20while%20ago.%20Not%20one%20example%20of%20a%20more%20complicated%20\"hello%20word\"%20I%20have%20not%20worked?source" contains illegal character #\" at position 111..
14:14:12
beach
carmack: One is an implementation of a language. The other one is a language (i.e. a specification of the syntax and semantics of conforming programs).
14:14:23
carmack
Thank you all for your help, I think I will have to make more effort to start writing something in Common Lisp
14:20:29
shrdlu68
Could you record something like that? You'll get concrete help with a concrete demo.
14:33:48
pfdietz
Various kinds of random testing, these days. There's also a conformance test but I don't run that much (others have copies that they use.)
14:34:34
ggole
I assume it's something like generating random expressions and seeing if they produce different results in different implementations or with (speed 3), that sort of thing.
14:34:49
pfdietz
Right now, I have eight threads running with SBCL random compiler tests, about 16 core-days, close to 40M tests.
14:35:16
jcowan
Clisp seems not to need a maintainer so much as a release manager, which is considerably less of a time suck.
14:38:37
pfdietz
I've wanted to compile SBCL with some sort of coverage enabled, but I'm not clear on how to do that. I do want to couple random test generation/minimization to coverage (Waters' COVER package, in particular) to automatically generate minimal coverage-improving test cases for things.
14:40:01
pfdietz
The change to COVER would be to allow coverage info to be checkpointed and rolled back, so tests that improve coverage could be minimized while still improving coverage.
14:40:14
ggole
I've only some experience with random testing, but my experience so far is that it is very easy to lose track of what has been well tested and what has not (and what work to do to bridge the gap)
14:40:57
shrdlu68
carmack: Did you follow the quicklisp set-up guide? https://www.quicklisp.org/beta/#installation
14:41:02
pfdietz
The main purpose of random testing on SBCL is to catch bugs in new development. Older bugs have mostly been mined out, at least in the space that the random tester can see.
14:48:04
shrdlu68
That's because you're running the wrong thing, there's no "(quicklisp-quickstart:setup)" in that doc.
14:51:10
ogamita
carmack: you would need to add (load #P"~/quicklisp/setup.lisp") in your ~/.sbclrc.lisp file.
14:51:56
carmack
I can't figure out what changes have happened. And what is important now. There are old books from 2005. Advise them to read. However, there is also outdated information. In General, somehow it's all depressing.
14:52:39
jackdaniel
carmack: I've suggested you at least twice portacle as a working pre-configured environment
14:54:07
shrdlu68
It appears the book/tutorial you are reading is based on an old version of quicklisp.
14:55:30
jackdaniel
that's what I've meant when I said that too many people jumped in with help ,) I'll back off now. ftr: there is #clschool channel if you want to ask questions in less strict environment (keeping in mind, that my use of word "strict" is vague, snh snh)
14:56:03
shka_
is it acceptable to use #'identity as default that is supposed to do nothing for a &key argument?
14:56:34
ogamita
shka_: nothing prevents you to write a compiler-macro to optimize this case, if that bothers you.
14:56:49
shrdlu68
carmack: Quicklisp is not part of the language, it's a library. Of course it has changed in 8 years.
14:57:22
ogamita
carmack: see: http://informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/aim-8/index.html
14:57:46
shka_
ogamita: it does not bother me, i simply like to see defaults of key arguments as they tend to show valuable information
15:03:23
shka_
difference exists, but i decided that i would rather avoid adding extra code for maintaining this
15:04:11
shka_
also i discovered that sbcl can inline funcall if it knows what function you are trying to call
15:04:33
shka_
so one strategy to handle this is to use trick beach showed for sequences some time ago
15:06:32
jackdaniel
I mean: what did you measure: two versions of the same code one using funcall one not using it? or you have tried to profile funcall itself?
15:09:08
shka_
jackdaniel: i tested different versions of few of my various functions, trying to figure out how much i can save by eliminate needless calls to identity set as :key
15:10:30
shka_
as i said, difference exists, but for "normal" code it is not significant enough to justify extra code to mitigate that
15:13:03
shrdlu68
Xach: Can you figure out carmack's error? He seems to be on sbcl 1.4.11 and just installed quicklisp.
15:13:58
jackdaniel
use one shipped with quicklisp-slime-helper (or check out github for the latest slime)
15:14:16
jackdaniel
slime is emacs mode, swank is lisp server slime talks with (part of the same software)
15:15:28
shrdlu68
Ahh. Christ, someone make a docker image or something for people trying CL out. Shouldn't be this hard.
15:18:31
shrdlu68
jackdaniel: Well he has to get rid of this mysterious /usr/share/emacs swank, right?
15:19:56
jackdaniel
if he insists on configuring things himself, then yes. and after that quicklisp-slime-helper should be quickloaded and .emacs should be adjusted
15:22:07
shrdlu68
carmack: Grab sbcl from github, compile it, then completely uninstall your distro's SBCL.
15:25:47
pfdietz
I always keep several versions of sbcl around. A release one to build with, and a current one built off master.
15:28:09
shrdlu68
carmack: Yeah, remove it and follow portacle's installation guide. That should work.
15:28:23
ogamita
Common Lisp has several implementations. ccl, sbcl, abcl, clisp, cmu cl, corman lisp, allegro common lisp, lispworks, mocl, etc.
15:30:01
Xach
carmack: I worry about that, too, but I've found that even very popular systems have similar issues of getting and properly using the right things to get started.
15:31:27
carmack
shrdlu68: I really hope so, because so far I get negative emotions from the process. But I'll try to handle it.
15:32:12
ogamita
Actually, in the seventies, software system came to newbies all setup by an IT team, or hardwired in a ROM.
15:33:34
shrdlu68
Anyone know of a tutorial that would've made this process more pleasant for carmack?
15:35:23
ogamita
carmack: I've never used portacle. I wasn't a newbie for a long time when it appeared. Tell us, what do you get from portacle?
15:42:25
carmack
(Portacle:12945): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
15:42:28
carmack
(Portacle:12945): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
15:42:31
carmack
(Portacle:12945): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_pixels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
15:44:49
ogamita
yeah, that's the problem with portacle and this kind of IDE: they rely on too many dependencies, including GUIs…
15:45:10
ogamita
You'd need a VM image with everything included, and even with that, either it boots or not.
15:46:15
ogamita
to learn how to do (car '(1 2 3)), you just need sbcl, in a terminal. No need for quicklisp and IDEs. At most, add rlwrap.
15:51:24
carmack
ok, so. you guys pretty cool, but it seems to me that I was left alone with his problem
16:02:37
jkordani
https://stackoverflow.com/questions/11869705/gdkpixbuf-critical-gdk-pixbuf-get-width-assertion-gdk-is-pixbuf-pixbuf
16:03:56
jkordani
I mean, the answer suggests that either portacle needs to be built differently, or the supporting libraries it depends on need to be installed differently on the user system
16:06:15
ogamita
carmack: IMO, the problem comes from the fact that you were told to use systems that try to do things automatically for you. Unfortunately, they break (general bit-rot, dependencies version compatibility, etc).
16:06:39
ogamita
carmack: the only solution is that you install yourself the component, by hand, one by one, and that you understand what and why you install them.
16:22:06
kyby64
hi everybody.i want use caveman2 but after create project when i load it with quicklisp i get this error https://0x0.st/slU8.png
16:26:35
Xach
kyby64: that can happen if you use a new version of sbcl with an old version of ironclad/nibbles, I think
16:29:21
kyby64
sorry i dont know what you mean,i'm using sbcl-1.4.13 and i'm reading caveman2 github page
16:30:28
Xach
kyby64: no worries. but i can help troubleshoot if you type the command i gave and tell me what it shows.
16:32:51
Xach
kyby64: ok! that is too old. you can get a new one by using (ql:update-dist "quicklisp")
16:36:01
kyby64
ok after update quicklisp when i want load caveman2 i get this: "NINGLE.CONTEXT" is a package name, so it cannot be a nickname for "NINGLE/CONTEXT".
17:02:44
dim
maybe there are? some companies want solutions that work and are easy to maintain and don't care so much about the programming language that's used to deliver the solution
17:26:03
anamorphic
Is there a loop clause that works for things that are sequences? I found "for foo being the elements of fooseq" works, but I think it's a loop impl specific
17:28:13
anamorphic
So something like (loop with length = (length myseq) for i below length do ... (elt myseq i)) would be the way to go?
17:52:12
aeth
anamorphic: Never use length more than once, ideally on something known to be small. It's O(n) on lists.
17:57:08
aeth
If your loop is simple enough you could have a macro use for ... in ... when it's a list or for ... across ... when it's a vector. If you need to set, you would have to set the car on for ... across if it's a list (if that's not undefined behavior) and use indices for vectors
17:57:55
aeth
anamorphic: Iterate is problematic imo. It is not just a strict superset of loop with s-expressions for clauses
17:59:10
aeth
You would have to learn it (and it has a 40+ page PDF manual) and expect the reader to know it. You also would, apparently, have to use iterate:foo symbols for its clauses instead of keywords
17:59:57
sjl_
You can use keywords with iterate, except for the first symbol. (iterate (for x :from 0))
17:59:58
aeth
I have added writing something like iterate but readable by people who only know loop to my macro todo list
18:00:57
aeth
sjl_: That means that you need to :use iterate if it isn't a symbol in CL (never :use packages) or prefix always or explicitly import those symbols one-by-one
18:02:18
aeth
I'm perfectly happy to start with a keyword in a DSL and, in fact, it helps hint that it is a DSL and not a Lisp macro/function.
18:02:21
sjl_
Sure. That's the point of the package system -- if I extend iterate with an iteration construct (foo ...) and someone else extends it with a different (foo ...), the names don't clash.
18:03:56
aeth
sjl_: One possible solution is to do the extensible part in a clause that begins with keyword and then is followed by a symbol
18:04:20
pjb
(defmacro while …) (defmacro for …) and with do dolist and dotimes, you don't need anything lese.
18:04:35
Bike
saying extensibility is overrated now, in the midst of "how can i use this LOOP extension", is a little odd
18:05:37
sjl_
aeth: ... I'd rather use the package system than invent some kind of inheritance system for loops.