freenode/lisp - IRC Chatlog
Search
15:56:01
pjb
Vityok: You're assuming crashes are not the responsibility of some human. Be it a programmer or a micro-electronician?
15:57:06
pjb
Vityok: but granted, you can ask what to do once you've had your quota of exercise for today.
16:00:28
|3b|
pjb: you are assuming the log wasn't part of the process of detecting and/or diagnosing the crash by said human
16:04:41
jackdaniel
ehu: or you may just redirect common-lisp.net/project/translate to /home/dkochmanski/public_html/translate and I'll just work from there
16:15:49
Vityok
|3b|: actually the read-ascii-string (hello pjb ) wasn't working as expected on Clozure CL.
16:16:23
Vityok
so yes, being able to deal with corrupt logs is a precondition to debug and fix crashing applications. No need to excercise.
16:18:40
downloadico
Hello! What is the "best" way to write output to the bit bucket? I have some code that uses QuickLisp to load some libraries and I don't want to see the information about loading those libraries. Should I use (with-open-file (*standard-output* "/dev/null" ... ) ... ) or is there something more standard to do?
16:50:33
Fare
Ahem, is anyone willing to preview/proofread ch. 5 of my blog: https://github.com/Ngnghm/ngnghm.github.io/blob/master/_src/posts/5005-05-05-chapter-5.md ?
16:55:42
jackdaniel
Fare: my english isn't good enough to proofread anything, but I'll gladly read this chapter, I really enjoy this serie :-)
16:56:01
Fare
renamed: make that https://github.com/Ngnghm/ngnghm.github.io/blob/master/_src/posts/2015-09-08-chapter-5.md
16:56:19
pjb
minion: memo for Vityok: either the data is binary or it's well encoded text. Taking binary data as well encoded text is a typing error. Typing errors can come either from the reader, using the wrong type (why don't you use a binary stream?), or from the writer, generating the data of the wrong type (hence the unicode standard hiting the head of the writer).
16:56:34
Fare
jackdaniel, thanks. I tried the double-wait, btw, and it still has the race condition.
16:58:17
jackdaniel
hm, as wrote in issue thread, it's undoubtely a bug, but I have no particular clue how it can leak. I'll give it another try on friday
17:00:26
jackdaniel
it's your call, whatever you consider better option. If you could wait till saturday, then we'll know for sure
17:01:37
Fare
OK. I won't disable it for now, but if I release ASDF before you make a fix, I'll try to remember to disable it.
17:03:35
Fare
(version<= "16.0.1" (lisp-implementation-version)) is fine with me... as long as lisp-implementation-version is guaranteed to follow ASDF conventions.
18:08:54
thenextaynounamu
Hi... I don't want to start a flame war! So if you don't have something good to say don't reply. I have been using VIM for about 5 years now... I am very comfortable with if and very productive! I have tried Emacs but VIM is more productive for me because it is ENGRAINED! Is there anybody who has a good vim setup that integrates well with Lisp? Evil mode is also not a solution for me. Any help would be greatly appreciate
18:10:22
fiddlerwoaroof
slimv is a little quirky here and there, but it's a much better programming environment than most other programming languages have.
18:12:07
thenextaynounamu
Any other suggestions... I want to try as much as I can -- to see what works best.
18:13:15
sjl
thenextaynounamu: I used slimv for a while but found it too quirky. now I use a few simple mappings with neovim and use a repl inside it
18:13:35
sjl
I have thought about writing an nrepl server in common lisp and trying to get fireplace.vim working with it, but haven't had the time
18:14:52
flip214
you can have eg. sbcl connect to swank to another lisp, and "control" vim via the rpc
18:15:34
flip214
I even thought about running slime in an emacs lisp interpreter (via LUA) within neovim, directly
18:16:05
sjl
it's been a year or two since I last used it, but the repl would constantly get into weird broken states
18:17:35
sjl
I looked at writing an nrepl server for CL but nrepl is a clojure thing so there's basically no docs
18:18:09
thenextaynounamu
@flip214 and @sjl... can you share your dotfiles... I may pick up some useful stuff there!
18:18:31
sjl
thenextaynounamu: https://bitbucket.org/sjl/dotfiles/src abandon all hope ye who enter here
18:19:29
thenextaynounamu
yes the nvim code is as jou say to "hairy", but I am getting off topic! Thanks for the help I will check if out!
18:20:46
thenextaynounamu
I know a bit of vimscript but not enough to write a plugin like that for nvim!
19:07:30
Xof
"Many but not all of the predefined type specifiers have a corresponding class with the same proper name as the type. These type specifiers are listed in Figure 4-8."
19:10:52
jasom
sjl, flip214: emacs has asynchronous buffers as a first-class abstraction, getting it right in vim is *really* hard. I ended up giving up and using emcas with evil-mode
19:11:23
sjl
yeah getting it right in vim is impossible. I have hope for neovim, but it's still really new
19:12:31
jasom
neovim is a *huge* step in the right direction, but it's still a bit of a pain to do something like the slime-fancy REPL where you have a buffer both accepting user input and showing remote output
19:12:49
jasom
I have confidence that neovim is flexible enough that someone can write a library to manage that though
19:13:50
sjl
yeah. I have considered something like, when you go into insert mode in a neovim repl buffer it opens a split beneath the repl that's just a separate buffer with ft=lisp, with a keymap to "send to repl and close this"
19:14:21
jasom
I do wish that we could replace slime/swank with something less strongly coupled. It's really a single program split into two parts rather than a client/server using a well established protocol
19:15:59
jasom
but swank has so much knowledge baked into the code, that replacing it is non-trivial
19:16:23
francogrex
does not make sense. if one cannot use (find-class 'fixnum) then one cannot also write: (defmethod node ((index fixnum) ...
19:17:39
sjl
jasom: yeah. I think nrepl is the clojure community's version, and it does seem less tightly coupled, in principle
19:17:57
sjl
in practice clojure people never document anything so the protocol is locked in the brains of the nrepl implementors
19:23:55
jasom
http://lxr.mozilla.org/mozilla/source/js2/semantics/ <-- there it is. cl-js will almost certainly generate better code though.
19:24:30
PuercoPop
is there something like boundp for 'places'? I want to check if an accessor is bound.
20:17:32
ghost_runner
I ask because it seems a lot of Lispers recommend the book having not read it themselves, out of mere bandwagoning.
20:20:00
ghost_runner
I thought grade school had started up again myself, but that doesn't seem to be the case.
20:32:35
francogrex
while debugging a package (cl-bayesnet) I traced an error to this call: (apply #'aref #0A#(0.7D0 0.3D0 0.7D0 0.3D0 0.7D0 0.3D0 0.6D0) '(0 0 0))
20:32:48
Xach
DeadTrickster: you can see the history from "greenbean" and "snatch" in the logs. it is not sincere curiosity.
20:35:46
Bicyclidine
or i guess a zero dimensional array with a one-dimensional array as its only elemnt, which is pretty weir
20:40:16
DeadTrickster
Xach, have you seen him on #lisp? Also https://github.com/lisp/de.setf.amqp still there and I still can't build it :-(
20:40:42
jasom
Bicyclidine: I know, I just discovered that a couple of months ago, but it makes sense as the degenerative case
20:56:57
Ober
when doing a join on bordeaux/pcall of all the workers/threads you've registered, getting a invalid-array-index-error index 262144 our of bounce, for (simple-array (unsigned-byte 64) (262144) should be nonnegative and <262144. Is this a case of a dangling reference to a dead thread in the list?
21:16:43
pjb
francogrex: don't get misled by the fact that some implementations have as an extension a FIXNUM class. It's not conforming to rely on it.
21:20:00
pjb
PuercoPop: the only places that can be unbound are CLOS slots. there's slot-boundp and slot-makunbound.
21:24:23
francogrex
for asdf 'experts', for debugging purposes, is it possible to load an asdf system without having it compiled first?
21:30:10
pjb
So: you can indeed write: (when (and (loop for i from 0 to 127 always (char= (com.informatimago.common-lisp.cesarum.ascii:code-ascii i) (code-char i))) (loop for c across com.informatimago.common-lisp.cesarum.ascii:*ascii-characters* always (= (com.informatimago.common-lisp.cesarum.ascii:ascii-code c) (char-code c)))) (char-code ch)) instead of (char-code ch).
21:30:25
pjb
assuming ch ins in com.informatimago.common-lisp.cesarum.ascii:*ascii-characters* in the first place.
21:30:37
pjb
But I find it much simplier to just write (com.informatimago.common-lisp.cesarum.ascii:ascii-code ch).
21:37:20
pjb
mprelude: the point is that when implementing protocols, I much prefer to do the decoding explicitely myself than rely on the language. This way, your protocol layer won't break silently when you port your program.
21:43:11
jasom
mprelude: ah, found the answer; at the tiem SCRAM was written SRP was patent encumbered
21:46:29
mprelude
pjb: Unfortunately I'm not familiar enough with a) the protocol or b) the language to know *I'm* doing that right.
21:47:14
mprelude
https://www.github.com/mprelude/cl-scram -- This is the WIP I have, but it's generating the wrong response, probably because of a failed conversion or wrong conversion.
21:51:05
mprelude
Wonder if someone more familiar can see what I'm doing wrong, but it seems like very few people are familiar with both the lang and the rfc.
22:02:19
fiddlerwoaroof
Basically, a way to define a schema for an S-Expression and automatically map it onto the appropriate tables in a database
22:03:03
jasom
fiddlerwoaroof: something like https://github.com/eudoxia0/crane or https://github.com/fukamachi/integral ?
22:03:08
fiddlerwoaroof
I'm thinking of something like an ORM, except that it doesn't map objects to a database but S-Expressions of a known type
22:04:48
jasom
fiddlerwoaroof: well there is no type in lisp called an "s-expression" do you mean a tree of cons-cells?
22:05:40
fiddlerwoaroof
I want to be able to do something like this: (schematize ((:title text) (:phone-number text) &rest (tags '(text))) and have it automatically generate the appropriate tables and foreign keys.
22:06:12
fiddlerwoaroof
Then, I'd run (store '("Some thing" "333-222-4444" "whatever" "something else"))
22:07:48
fiddlerwoaroof
(I haven't really worked out all the details of how it would work, I just thought it up recently and wondered if there was anythign like it already
22:10:48
pjb
fiddlerwoaroof: you need one table per type of atom you want, plus one table for cons cells.
22:11:19
jasom
I don't see how your example is significantly different than (deftable use () (title :type text) (phone-number :type text) (tags :type multiset))
22:16:02
fiddlerwoaroof
jasom: well, one difference would be that you could store any appropriately structured list without having to first create an instance of the appropriate CLOS class
22:16:57
Fare
I worked on one at ITA not that I recommend that anyone should use it, unless you specifically want Oracle support.
22:18:06
fiddlerwoaroof
jasom: maybe that would be the only advantage of what I'm describing, I haven't really thought it through.
22:18:55
fiddlerwoaroof
My idea would be to make something that's more like a shorthand syntax for sql queries necessary to store and load the lists.
22:20:38
jasom
fiddlerwoaroof: I could see something like that working. Perhaps Fare can comment on how using his was?
22:21:51
Fare
QUAKE (source available in the qitab quux tarball, though not in a very usable state) was a classic CLOS-based ORM.
22:30:45
pjb
fiddlerwoaroof: now, of course, you'd have to implement a garbage collector on those tables :-)
22:31:13
pjb
The easiest would be a copying garbage collector. Just take your root set and copy it to new tables.
22:32:28
pjb
fiddlerwoaroof: of course, instead genid incrementing a lisp counter, you would use a sql sequence.
22:36:26
fiddlerwoaroof
pjb: I was thinking that it basically map a lambda-list onto each row of the table, with &rest args standing in for referred to by a foreign key and &optional args standing in for nullable columns.
22:37:42
fiddlerwoaroof
But, your code helped me realize that you don't necessarily need to declare the types of the various items in the list, just generate a bunch of prefixed tables.
22:53:12
pillton
Last night I encountered some differences in the way implementations handle EQL types. http://paste.lisp.org/display/154916
22:55:35
pillton
My (possibly incorrect) mental model of EQL types is that (subtypep `(eql ,x) some-type) is equivalent to (typep x some-type).
22:56:56
pillton
After reading the hyperpsec entry on EQL type specifiers it seems that an implementation may be required construct a type representing x.
22:57:20
Bicyclidine
subtypep's entry explains that it's allowed to give up on eql specifiers (god knows why)
23:00:21
Bicyclidine
i can't think of any circumstance in which (subtypep (list 'eql x) y) isn't the same as (typep x y), if subtypep is perfect
23:01:39
pillton
I was thinking that (type-of object) is a supertype (list 'eql object) in this example.
23:10:42
mprelude
http://stackoverflow.com/questions/32468600/implementing-scram-sha1-client-getting-it-wrong-somewhere
23:12:04
pillton
Bicyclidine: I thought the "Represents" in the sentence above implied that (eql 1), for example, would be converted to (integer 1 1) and then subtypep would proceed.
1:07:34
pjb
minion: memo for mprelude: your datatypes are all wrong. the RFC keeps repeating all over the place that the data shall be UTF-8 encoded octets. Why do you use strings? ASCII codes are not (integer 0 255), they're (integer 0 127)! The result of HMAC shall be a (vector octet *) and this is what shall be passed to base64. Then why do you write-to-string your ClientProof??? This is crazy.
1:16:11
pjb
minion: memo for mprelude: and you don't have to convert bit vectors to integer to xor them, you can use BIT-XOR. On the other hand, you need to convert those bit-vectors to octet vectors, or even better, convert the bit-vectors directly to base64.
2:28:03
loke
Some time ago, I ran a microbenchmark on the javascript engine in Chrome (I think I computet fibonacci numbers using the naïve implementation) and the performance was almost exactly on-par with that of cl-js running on SBCL. I'd like to run a better test case to do this comparison, so do you know of any Javascript benchmarks?
2:34:06
Zhivago
Microbenchmarks on v8 are problematic, since it uses a profile based dynamic optimization.
3:41:27
jasom
well DeadTrickster is idling in here now, so if he checks his logs, he'll get that at least