Search
Sunday, 28th of May 2017, 13:20:19 UTC
13:20:25
SAL9000
I imagine that some of the trivial-foo libraries can double as examples
13:20:29
beach
ebrasca: Take this page for example:
13:20:34
specbot
http://www.lispworks.com/reference/HyperSpec/Body/f_aref.htm
13:20:58
beach
ebrasca: What happens if the ARRAY argument is not an array?
13:22:15
specbot
The ``Arguments and Values'' Section of a Dictionary Entry: http://www.lispworks.com/reference/HyperSpec/Body/01_ddc.htm
13:22:28
beach
"Except as explicitly specified otherwise, the consequences are undefined if these type restrictions are violated."
13:22:30
shka
SAL9000: usually, in practice…
13:22:35
ebrasca
beach: i can't read it in this link .
13:22:41
shka
but in theory anything can happen
13:23:13
SAL9000
I can't stop alternating between laughing and crying
13:23:19
beach
ebrasca: Believe me, I chose that page on AREF completely randomly.
13:23:29
shka
beach: I really wish we could have something to write and manipulate markup directly from CL
13:23:37
ebrasca
beach: I am not. Now i don't know what to think.
13:24:03
shka
so it would be more like: make objects that represent paragraphs, join together, output to pdf
13:24:16
SAL9000
so... a LaTeX implementation in Lisp?
13:24:24
shka
you could also throw in some unit tests for each paragraph
13:24:33
shka
SAL9000: not exactly latex
13:24:39
ebrasca
beach: I always think lisp is perfect.
13:24:50
shka
i don't think we really need full blown typesetting system
13:25:00
beach
shka: Yes, that's a different project: https://github.com/robert-strandh/Doclang
13:25:02
shka
just solid document preparation tool
13:25:12
SAL9000
shka: why not? I always end up missing the full power of LaTeX when I'm writing, say, HTML
13:25:24
beach
I totally agree with SAL9000.
13:25:37
ebrasca
I like more .org files.
13:26:01
shka
SAL9000: honestly, I am just really disappointed by current status of lisp ecosystem when it comes to document preparation tools
13:26:21
shka
so i would rather have something that i can use to document my library now
13:26:38
SAL9000
there's a half-dozen different docstring-extraction things I've seen in use already
13:26:39
shka
then wait year or so for ULTIMATE TYPESETTING SYSTEM
13:26:53
shka
SAL9000: yeah, all half-baked
13:27:08
shka
but it has set of problems
13:27:11
SAL9000
no argument about the half-bakedness
13:27:31
beach
Half-baked and misguided too.
13:27:40
shka
racket scribble is just nice and simple
13:28:11
SAL9000
shka: https://shinmera.github.io/staple/
13:28:43
ebrasca
I think org-mode from emacs is good.
13:28:55
beach
AND... here we are again in the eternal debate of the advantages over one markup language over another.
13:29:05
shka
SAL9000: is it just docstring dump?
13:29:06
SAL9000
all we need now is an emacs vs vi vs * debate
13:29:33
SAL9000
shka: iirc, formatted docstrings + README
13:29:49
SAL9000
ebrasca: okay, bare emacs vs emacs+evil-mode
13:30:08
shka
SAL9000: nah, this won't cut it for me
13:30:27
SAL9000
in that case I'll second ebrasca's recommendation of org-mode
13:30:33
SAL9000
heck, I used it to write my Honours thesis
13:31:18
shka
i need something that i can use to blend doc strings, drawnings, tables, and paragraphs
13:31:44
beach
ebrasca: By "Satisfied?" I meant "Are you convinced that I am right that Common Lisp is not sufficiently well specified, thereby justifying the need for something like WSCL?".
13:32:33
shka
i almost think that i should start cloning scribble in CL
13:33:11
shka
we just need backend to generate docs
13:33:36
beach
ACTION goes back to doing productive work.
13:33:47
shka
and codex is already using scibble syntax so i wouldn't have to change my docs
13:33:52
ebrasca
beach: I like to have new cl. There is cl21 , rutils and now WSCL
13:33:56
JuanDaugherty
yeah the cl nazis will be all over that
13:34:10
shka
JuanDaugherty: love your nick, also i love Joni Mitchell ;-)
13:34:31
beach
ebrasca: If at some point you take the time to read the description of WSCL, you will see how totally different it is from cl21.
13:34:32
shka
ebrasca: nah, it is not like that
13:34:52
shka
ebrasca: WSCL is not about modernization
13:35:06
shka
it does not add new features
13:35:10
beach
ebrasca: For one thing, I mainly plan to specify what most Common Lisp implementations already do.
13:35:12
shka
it just fixes specification
13:35:18
shka
which is a good idea overall
13:35:31
beach
It the minimum that everyone can agree upon.
13:35:44
shka
no idea how much work would that require though
13:35:45
JuanDaugherty
wrt to my earlier query, I realized cliki+ql is the equiv of hackage in hs
13:35:49
beach
Anything more ambitious will be rejected by a majority of the community.
13:36:04
shka
and what is required at the start
13:36:19
ebrasca
what with http://phoe.tymoon.eu/clus/doku.php ?
13:36:30
shka
ebrasca: that whole different story
13:36:31
beach
ebrasca: But thanks. Once I get things started, I'll let you and everyone else know what there is to be done.
13:37:06
shka
ebrasca: phoe put this thing together so we can have independent documentation from hyper spec
13:37:19
shka
that is (mind you) copy righted
13:37:30
beach
ebrasca: CLUS is an improved specification of Common Lisp, whereas WSCL is a specification of an improved Common Lisp.
13:38:37
ebrasca
why CLUS and WSCL can't be in one page?
13:38:38
shka
beach: it sounds like a reasonable thing to do
13:38:49
shka
ebrasca: because WCSL does not exist (yet)
13:39:28
shka
i have no idea how much time it would require
13:40:10
shka
also, it would be nice to get unit tests to test implementations against WSCL
13:40:21
shka
overall, seems to be quite a lot of work
13:40:49
shka
*sigh* ok, time to get back to my docstrings
13:43:46
beach
ym: Could you be more specific?
13:44:05
beach
ym: Do you mean something like Cliki?
13:47:04
ym
Cliki seems fine since it has article editing form.
13:47:23
ym
I thought it's statically-paged.
13:52:32
ebrasca
how I can make lisp friends?
13:58:20
beach
Go to ELS next year and be sociable.
13:58:56
ebrasca
where i can find money to go here?
14:00:01
ebrasca
beach: what do you mean with ELS?
14:00:57
loke
ACTION needs to go to els next year
14:01:10
loke
Me wishes there was an AES
14:01:13
beach
ebrasca: http://www.european-lisp-symposium.org/
14:01:45
beach
loke: That's easy to fix. Just create it.
14:01:57
shka
somehow i knew beach will say that :P
14:02:10
loke
beach: Takes a lot of effort, and also not sure you guys would attend :-(
14:02:43
beach
I can even help you organize it.
14:03:37
ebrasca
beach: help me to organize 1 in Poland
14:03:53
beach
ebrasca: It was in Poland this year.
14:04:07
beach
ebrasca: I can't believe you missed it.
14:04:17
loke
The biggest event I'm part of here is the Emacs Meetup. Usually finds around 10 participants.
14:04:35
loke
beach: Wasn't ELS in Brussels?
14:04:47
beach
Er, sorry last year, I meant.
14:05:05
beach
ebrasca: http://www.european-lisp-symposium.org/2016/index.html
14:13:26
ebrasca
maybe I have time to get to 2017
14:14:59
beach
You would have to wait until 2018.
14:15:13
ebrasca
ACTION need to learn months of the year.
14:15:46
beach
Also to interpret phrases such as "The conference is over!"
14:17:33
splittist
"Long live the conference!"
14:22:46
ebrasca
where is video from conference?
14:25:08
beach
Videos typically take some time before being posted. It is all done by volunteers, after all. And those people tend to be the same ones that are busy with tons of other stuff.
14:25:36
beach
If you haven't been to ELS before, you can start with videos from previous conferences.
14:27:09
ebrasca
beach: I can't find videos.
16:06:31
Posterdati
please help, how can I match a lisp integer type with the corresponding foreign type? Thanks!
16:07:54
Posterdati
for example (unsigned-byte 8) corresponds to :uint8
16:08:17
Posterdati
for example (unsigned-byte 10) corresponds to :uint16
16:10:02
Bicyclidine
hm, i suppose you could have a fixed ctype->lisptype map (like :uint8 is (unsigned-byte 8)) and then to do the other way, find the smallest mapped type that a given lisp type is a subtype of
16:10:55
Bicyclidine
assuming you just want the stdint types and not the old variable ones
16:13:16
Posterdati
I did a loop over bit word sizes and match the type-p result
16:14:13
Bicyclidine
oh, you just have a value? typep instead of subtypep then, yeah.
16:15:25
pjb
Posterdati: you could define the foreign types as lisp types, and then use subtypep to match the lisp types to them.
16:15:36
pjb
(or typep if you have a value).
16:16:15
pjb
Same thing as what Bicyclidine said.
17:54:40
oystewh
is there an idiom for finding the index for which an element in an array is maximized?
17:59:05
beach
oystewh: Can the array have an arbitrary number of dimensions?
17:59:51
beach
... or is it always a vector?
18:03:21
oystewh
actually, think sequence -- ie flat list of numbers, vector of numbers..
18:03:56
beach
(position (loop for element across array maximize element) array)
18:07:16
beach
It might do two traversals. If you want to avoid that, I think you have to do it "manually", by traversing the sequence and assigning to an index every time you find a larger element.
18:08:47
beach
(let ((index 0) (max (aref array 0))) (loop for i from 1 below (length array) when (> (aref array i) max) do (setf index i) (setf max (aref array i)) finally (return index))) something like that.
18:09:47
beach
The performance issue is typically not the traversal per se, but the application of the :KEY function which is often non-trivial.
18:11:30
beach
... as in when (> (length (name (first-child (spouse (father (aref i)))))) max) ...
19:38:58
mrottenkolber
is changing the element-type of *standard-input/output* a thing?
19:39:51
Bicyclidine
changing the element type of a stream is impossible, as far as i know, but you can bind a stream with a different element-type to those variables
19:40:22
mrottenkolber
what if I want my standard input in (unsigned-byte 60) chunks?
19:42:17
Bicyclidine
(let ((*standard-input* (open wherever :element-type '(unsigned-byte 60)))) ...) is fine
19:45:14
mrottenkolber
right and wherever can be a stream
19:47:29
mrottenkolber
hmm no because *standard-input* is not a file-stream
20:00:22
pjb
mrottenkolber: however, some implementations let you do that, with some implementation specific mean. Otherwise, you may try with flexi-streams.
20:14:15
mrottenkolber
I think flexi streams is only for character I/O?
21:20:47
paule32
are oldschool latex gurus there?
21:23:31
paule32
http://kallup.net/SAM/book/
21:24:13
paule32
the cyan rectangle will not plot to all pages
22:05:22
attila_lendvai1
** NICK attila_lendvai
22:55:59
marvin2
someone remind me please what do I have to add before defmacro to use it in the same file it is defined?
22:57:47
Bicyclidine
you don't need anything for defmacro.
22:57:55
Bicyclidine
for defun you'd need eval-when, you probably mean
22:58:12
Bicyclidine
if the define function is used at compile time
23:26:00
parjanya
where can I find functions to find prime numbers and test if it’s a prime number? I’ve searched on quicklisp but I couldn’t find what’s on the maths related packages...
23:26:57
pjb
com.informatimago.common-lisp.arithmetic.primes
23:28:50
parjanya
pjb: did you write it?
23:29:46
parjanya
pjb: thanks, then :) what would be the best way to chase this kind of thing?
23:30:35
pjb
normally, it should be in quicklisp. I hope to have it back there in July.
23:38:46
parjanya
I even started writing it myself, but reinventing the wheel like this isn’t much fun, unless one really wants to do it
0:24:59
antonv
in SLIME, how to go "Back"
0:25:12
antonv
the sortcut was "something L"
0:25:24
antonv
I can't remember how to do that
0:29:23
parjanya
the previous command, you mean?
0:30:49
antonv
parjanya: for example I did "go to definition" natigated to some source code. After reading the definition I want to return where I was before that.
0:32:01
parjanya
uh, that I don’t know... q? C-<left>?
0:47:19
antonv
But I used another shortcut..., something with L
0:47:44
Bicyclidine
If you do C-h k C-, you'll get the help for the function, which will list the keys it's bound to
0:47:49
Bicyclidine
(and of course you can change those if you want)
0:49:21
pjb
antonv: use C-h m to see all the bindings in the current mode.
0:50:24
antonv
Bicyclidine: pjb: thanks
0:50:41
antonv
C-, turns out to be "return from definition"
0:50:46
antonv
My command was more generic
0:50:59
antonv
not only for definition navigation
0:51:05
antonv
just returned to previous buffer and line
0:51:43
Bicyclidine
oh, i wouldn't know that then. probably in emacs help somewhere if it's not obvious from the list of bindings.
0:54:47
antonv
not obvious... Ok, maybe I will remember it next time
0:54:52
antonv
Another question, about CFFI
0:55:10
antonv
I want to have binding for a foreignt function which was renamed
0:56:26
antonv
Previous this OpenSSL function was called SSLeay and now it is called OpenSSL_version_num
0:57:16
Bicyclidine
renamed as in between versions, not some magical DLthing?
0:57:22
antonv
How to correctly do CFFI declaration to dynamically check what symbol exists and use it?
0:57:34
antonv
Bicyclidine: renamed between versions
0:58:17
antonv
The irony is that this function returns library version.
0:58:49
pjb
declare both and try both. The one that doesn't signal an error is the good one.
1:00:00
antonv
pjb: is it correct to wrap (cffi:defcfun ...) into an exception handler?
1:00:22
pjb
it is correct to wrap anything in a condition handler.
1:00:32
antonv
I don't know when (cffi:defcfun ...) does actual work: at compile time, load time
1:00:36
pjb
There are no exception in lisp: every behavior is normal!
1:01:43
Bicyclidine
antonv: i think it depends on the implementation actually.
1:01:52
antonv
Bicyclidine: exactly
1:02:53
Bicyclidine
but i don't think cffi has enough to query whether a symbol has a function. hell i don't know if C does off the top of my head
1:03:13
Bicyclidine
i guess dlsym can tell you whether there's a memory location for it.
1:03:54
antonv
Bicyclidine: CFFI has such feature, but it's not guaranteed to work on any impl (all impls have it except for Corman)
1:04:45
antonv
pjb: on some implementations (cffi:defcfun ...) doesn't fail whaterver foreign name you use, event non-existing
1:04:49
Bicyclidine
oh. well... do that then?
1:05:11
antonv
Bicyclidine: I want portable thing, 100 correct
1:05:27
pjb
then use dlopen yourself.
1:05:34
Bicyclidine
you're not gonna get it from cffi
1:05:45
Bicyclidine
nobody uses corman anyway
1:05:48
antonv
pjb: dlopen doesn't work on Windows, I want portable
1:06:01
pjb
then install linux on your windows box!
1:06:04
Bicyclidine
actually half of cffi doesn't work on corman as i remember. doesn't it not have defcfun?
1:08:20
antonv
BTW, this thing is called foreign-funcall in CFFI
1:08:23
antonv
https://common-lisp.net/project/cffi/manual/cffi-manual.html#Functions
1:09:58
antonv
pjb: the box is not mine :)
1:14:01
Bicyclidine
so i got it backwards.
Monday, 29th of May 2017, 1:20:19 UTC