freenode/#lisp - IRC Chatlog
Search
4:47:10
oni-on-ion
LdBeth: the practical way is to have superclass-1 and superclass-2 come from superclass-0 then dispatch on that, i think.
5:14:59
aeth
LdBeth: there's always the ugly, messy, hackish solution of writing a macro to generate two methods, one for superclass-1 and one for superclass-2, with the same body.
5:21:22
aeth
With a macro-generated approach I'd be thinking of something along the lines of this: You would need to make sure that both methods got called if both were valid, and only call the "real" method if both methods got called. Probably messier than the other two approaches.
5:26:18
aeth
e.g. NIL as a member of null has two distinct parent classes (list and symbol) and you can go into both in some order via: (defmethod foobar ((foo symbol)) (format t "symbol ~S~%" foo) (when (next-method-p) (call-next-method))) (defmethod foobar ((foo list)) (format t "list ~S~%" foo) (when (next-method-p) (call-next-method)))
6:09:50
LdBeth
ACTION uploaded an image: 屏幕快照 2018-09-26 下午11.09.13.png (39KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/fOFZzRGdNykCWdETdqweudZU >
7:34:56
shrdlu68
pjb: It occured to me that O(log n) ought not be 10 times slower than 0(1) when n=240
7:39:04
beach
shrdlu68: Different algorithms have different overhead, so different constant factors. Having said that, I should point out that lb(256) = 8 so 10 doesn't sound strange at all.
7:44:10
no-defun-allowed
so if using, say, O(n) lists and O(1) vectors, if vectors are 3 times slower (which is unlikely, just for an example), it's really O(n) and O(3)
7:45:56
no-defun-allowed
to rephrase that, "the relative time taken for each structure would be n and 3" i guess
8:01:49
Demosthenex
so where do you go for lispy news? reddit's /r/common_lisp? y combinator's hacker news?
8:17:16
LdBeth
ACTION uploaded an image: 屏幕快照 2018-09-27 上午1.16.43.png (400KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/DJIrWfVadwmrKqPwZaxYbINN >
8:19:25
adlai
Demosthenex: no matter where i get my news, i have never encountered the journalist lispy enough to try slipping nestted parentheses by the copyeditor
8:23:32
beach
What part do you think might be a bug, and do you think it might be a bug in CCL or something else?
8:31:05
shka_
https://european-lisp-symposium.org/static/2018/heisig.pdf obviously, there ELS presentation
8:34:40
Shinmera
no-defun-allowed: what's your guess on this one? https://github.com/Shinmera/talks/blob/master/els2018-glsl-oop/presentation/static.pdf
8:37:32
no-defun-allowed
and the teacher used the google drive pdf viewer which is all blurry and horrible cause she didn't download it either she just zoomed in the browser
8:38:17
Shinmera
Or in action here https://www.youtube.com/watch?v=od6WI7JIJcQ&list=PLkDl6Irujx9PL5LfhvvkkeMiCiDij8jzM&index=5
8:38:24
no-defun-allowed
i only could tell beamer cause a. duh this is #lisp and b. i recognise the font
8:45:21
no-defun-allowed
(tldr: watched a security conference, saw neat presentation on wpa cracking with fpga, wondered why no one sells these things to skiddies and or pentesters)
8:48:57
Shinmera
I'm still looking into that. I'm meeting with some googlers this Friday to see what we want to do. I'll try contacting the ETH secretary based on what we decide there
8:51:16
francogrex
is there a reason why when I load clsql package, SBCL 1.4.2, recompile most of the already compiled file every time!? for example all files in clsql/uffi/ and clsql/db-oracle/ compiling (IN-PACKAGE #:CLSQL-UFFI)... etc. I though when nothing is changed it just loads the already compile files?
8:53:08
no-defun-allowed
schema is usually used for documents of some kind and i think that's a more appropriate word though
9:15:03
heisig
Ah, I see people demanding more documentation for Petalisp. Well, I am working on it... but I am not willing to document an API that is still under development. Give me a few more weeks.
9:50:05
ggole
(nested-funcall 7 #'list nil) would be cleaner imho, but then you need to write nested-funcall
9:52:55
shka_
heisig: so people could either customize their input to include greek letters, or use pretty lambda in emacs or just stick to plain old ascii
10:07:15
heisig
shka_: Thank you! I hope I get the native code generator working again before the next Quicklisp release. At the moment, Petalisp is extremely slow.
10:14:18
heisig
Yes, but the dependency chain is: 1. Fast single threaded code 2. fast multi-threaded code 3. MPI parallel code 4. A GPU backend.
10:21:42
jackdaniel
many thesis include metaphore of oracle which always returns correct results in no time (as a means of comparison)
10:22:43
dim
I've seen references of “God's algorithm” in some papers too, and used that to show pgloader as the next best thing ;-)
10:23:13
dim
how fast can you sort this huge vector? well if you're God, it's already sorted before you need it that way, right?
10:24:04
dim
in the case of pgloader it was like if you're God then your database is already running with PostgreSQL, no wonder, the next best thing is ./pgloader mysql://localhost/dbname pgsql://localhost/dbname and be done with it already; so that's what pgloader does
10:24:26
dim
was fun, the approach worked very well in the presentation: people did have a laugh and then though about it
10:29:57
razzy
heisig: i very much liked code shattered to graph-structure you are using. forget the name
10:34:51
heisig
razzy: Treating lazy arrays as data flow graph nodes? That works well. It gets somewhat funny once you start supporting functions with multiple return values. That is what I'm working on right now.
10:43:27
heisig
razzy: Well, you get one array of all first values, one array of all second values and so on. But when several of the multiple value arrays are used in the same computation, you want to merge them back to a single call to the multiple valued function. I hope this makes sense.
10:44:35
russellw
suppose you are calling a function with a list, on which you want to apply destructuring. You can take it as a parameter, then use destructuring-bind. But is there a way to make the destructuring happen right there in the function call? A destructuring-defun, so to speak?
10:47:14
heisig
russellw: That would be a different calling convention, so no. But you can have a look at TRIVIA:DEFUN-MATCH.
10:48:55
russellw
also to concatenate several strings, this can be done with (concatenate 'string a b c). But suppose a and b are strings but c is a list of strings, what's the best way?
11:12:07
russellw
to print a list of items comma-separated, (format nil "~{~a~^,~}" '(1 2 3)) can be used. but suppose instead of a hardcoded comma, the separator itself must be a parameter. Can format do this?
11:18:30
heisig
russellw: Since you can call arbitrary functions from a format string via ~/NAME/, the answer to "can format do this?" is always yes. The question is whether it will be aesthetically pleasing. The easiest way for you is probably to use another format call to produce the format string with a separator of choice..
11:20:05
russellw
heisig, I see what you mean. Or maybe instead of overloading format that badly, there might be a reasonably elegant idiom for just doing it with LOOP
11:24:00
|3b|
(with-output-to-string (s) (loop for (i . more) on list do (format s "~a~:[~;~a~]" i more separator))) ?
11:24:58
|3b|
though might be better to just use do (format s "~a" i) when more do (format s "~a" separator)
11:26:09
|3b|
latter is more obvious, and not really enough else happening in the format string to require combining them
11:30:04
|3b|
(i . more) in LOOP destructuring is like (i &rest more) in normal destructuring, and ON binds all of remainder of list each time, so each step gets the car of current part of list in I, and cdr in MORE
11:31:46
|3b|
(well, . also works like that in 'normal' destructuring, but i'd hope not to see it in anything but code golf or really old code :)
12:13:31
frodef
in sbcl/slime, is there any way to inject something that will look like a stack-frame without having an actual function?
12:17:03
frodef
sure. Just thought there might be explicit support, seems like a worthwhile mechanism to me.
12:19:10
pfdietz
So you could implement with-stack-info as a macro that produces a flet with a notinline declaration.
12:20:22
Shinmera
I do something like this in dissect to identify stack caps. https://github.com/Shinmera/dissect/blob/master/interface.lisp#L15-L20
12:40:38
heisig
Ah, not the CL:LOOP. Yes, there is plenty of data flow graph optimization and - most importantly - normalization, so that I can cache and reuse compiled code.