freenode/lisp - IRC Chatlog
Search
5:20:18
|3b|
oni-on-ion: for the specific case of glsl, the execution model is different enough from CL that i wouldn't want much more than i have (something that looks like CL but focused on that specific usage style
5:21:06
|3b|
for general GPGPU, you would probably still at least want a specialized library that generated GPU code rather than trying to translate arbitrary CL code
5:21:30
aeth
oni-on-ion: I mean this. If MAP could be single-threaded, multi-threaded, or on the GPU depending on various characteristics (like the input, which function is being used, whether or not the function is pure, etc.) then I wouldn't know what's going on at all.
5:23:26
|3b|
also moderately expensive to send things to/from GPU, so ideally you'd decide in advance that you were doing a bunch of GPU work with particular data
5:23:29
aeth
(Well, GPU-MAP would be fairly tricky, but I'd rather have it as a library than as part of the language as part of MAP.)
5:24:59
|3b|
so something like "add 10 million floats to these other 10 million floats" is fast on GPU, but if you add "copy these 20 million floats to gpu" and "copy these 20 million floats from gpu", it would have been faster to just add them on cpu
5:30:36
aeth
|3b|: I don't know. Is it possible to extend the type of a function to do things like mark functions as pure? (Or do some other declare of pure.)
5:31:44
aeth
Then a function defined in the same file or defined locally (as a lambda or with flet or with labels) or defined with sb-ext:*derive-function-types* set to T (or equivalents in other implementations if they exist, possibly CMUCL has one) could have at least more guarantees about its behavior
5:32:48
jackdaniel
ecl has "pure" proclamations (it has also "side-effect free" proclamataion, what is slightly else)
5:33:30
aeth
Would be nice to have a portability library here and to fill in the gaps where they exist (at least supporting SBCL, CCL, and ECL)
5:33:32
|3b|
(probably most compilers that want to optimize at all, so you can decide if you can completely skip calls if result isn't used, or rearrange them, or whatever)
5:34:43
jackdaniel
https://gitlab.com/embeddable-common-lisp/ecl/blob/develop/src/cmp/proclamations.lsp ←
5:34:54
aeth
|3b|: hence my qualifications of sb-ext:*derive-function-types* or defined locally to the function or defined in the same file (or compilation-unit) or defined in the locked CL package
5:35:38
aeth
Would be nice if every implementation had something like sb-ext:*derive-function-types* so you could just turn on the super optimizations super type derivations super static checking when you're done developing
5:36:17
|3b|
yeah, that's another reason for not doing full CL for dalvik to start with, easier to get small binaries :)
5:37:15
aeth
(The alternative is to put everything in one file but that breaks people's assumptions with using functions in macros because they don't put eval-when around literally everything)
5:37:47
aeth
(Also it's a bit surprising that C-c C-c could break your program because the compiler assumes C-c C-k)
5:46:56
no-defun-allowed
do you think anyone would complain if i added that to cl-vep's package.lisp?
5:52:11
aeth
no-defun-allowed: It's possible there's a way for you to set it to T, have ASDF compile your files, and then restore it to the original value. I don't know ASDF that well.
5:53:55
aeth
(There are probably some other things that are useful for final builds of a program, in various implementations)
5:56:04
no-defun-allowed
didn't seem to do much, probably since i've annotated functions myself to hell
7:19:23
isoraqathedh
You get exactly 1 argument, it must be package qualified (unless it's in cl-user, but you don't put things there anyway).
7:20:43
isoraqathedh
Wasn't there someone who wrote a replacement package for format? If I remember right there was an attempt but the format string format is used in multiple places it ended up going nowhere.
7:21:31
|3b|
it passes stream, argument to print, flags for : and @ modifiers, and any prefix arguments from format string
7:27:01
trittweiler
It's not so bad. I have a define-format-function which puts the symbols into an FMT package, so you use ~/FMT:IPV4/ for example
7:41:12
LdBeth
or backward compatibility, since the original XP used a read macro to compile format spec
7:49:52
|3b|
beach: i think my problem when i originally tried to make my own function info type is that i need a method on cleavir-env::make-info (which isn't exported) for it. otherwise it gets copied to a new global-function-info if i subclass that
8:22:13
no-defun-allowed
the blur at (x, y) is pretty much the blur at (x-1, y) minus everything at the very left column
8:22:17
beach
|3b|: I am not surprised that there are things that ought to be exported, but arten't.
8:23:02
|3b|
beach: yeah, that would require me to know what i'm doing first though, so might take a bit :)
8:23:40
|3b|
ACTION is starting to think i should just treat them as special forms instead (at the ast/IR level, not language level) :p
8:26:11
beach
Once the AST is generated, it will be a "call" AST, so you would have to do some searching and transformation of the AST I would think.
8:26:33
no-defun-allowed
right now the complexity is around O(ns), where n is pixel count and s is blur size
8:27:05
|3b|
for one thing, make-info passes special-operator-info through unmodified, so saves me a method :)
8:27:48
|3b|
but also when i did write the method, seems like most of the things it changes on global-function-info don't really apply to the ffi calls at this point anyway
8:28:33
|3b|
they are always open coded, so inline isn't really applicable, not sure dynamic extent applies, etc
8:35:39
no-defun-allowed
i have an idea for speeding up box blur which requires a diagram, can i link one here please?
8:40:39
no-defun-allowed
ACTION uploaded an image: boxblurspeedup.png (7KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/AcxdHTfXSIajKpCqLFGkdRgq >
8:40:43
no-defun-allowed
i didn't make them using a literate DSL that compiles to UML and LaTeX though so it doesn't look very good though
8:44:03
russellw
(format t "~a~36T~a~%" s) is wrapping at 80 columns. How can I get it to not do that?
11:23:29
no-defun-allowed
Implementing fast box blur can happen some other time, I've got other things to do.
11:23:30
no-defun-allowed
Right now my "feedback" value overflows so I think balancing increments (+right) and decrements (-left) isn't working.
11:30:07
no-defun-allowed
The optimal approach as far as I know is to start at the left with all pixels considered, then move right subtracting leftmost pixels and adding rightmost pixels.
11:31:06
Shinmera
no-defun-allowed: a box blur is a linearly separable convolution kernel, so you can do a horizontal and then a vertical pass. Then for dealing with edge conditions, pad your image on each side by the blur size so you don't need to check for overruns aside from the standard image bounds.
11:31:12
no-defun-allowed
The reason I think it's overflowing is because my edge logic isn't working correctly. It's literally an edge case.
11:31:36
no-defun-allowed
<no-defun-allowed "I uploaded a diagram of this ear"> Shinmera: I have written a box blur to that method but it's very slow
11:33:51
no-defun-allowed
My method doesn't require extension though, it looks at the range [max(left, 0), min(right, width-1)] and uses that size to divide.
11:37:19
no-defun-allowed
I only used that method horizontally and it's gone from 1.5 to 1.0 seconds.
11:37:49
no-defun-allowed
(now it errors with a description of where the overflow happened for testing so no, not really :)
14:53:37
Achylles
how do I get the motivation to learn lisp. I have tried about 2 or 3 times, but then I loose motivation. Learning how to program alone is really hard...
14:54:32
jackdaniel
Achylles: most rewarding way to learn a language is trying to contribute to open source projects along a way
14:55:01
jackdaniel
there are many easy tasks out there, solving them impove your language knowledge and lets you move to more ambitious tasks
14:56:14
Achylles
I have read books on Python, C, C++, (some java, but hate this), prolog, ruby, scala, bashscript and others. I am not a programmer, but I think I have the theory in my mind: variables, constants, strings, functions, etc...
14:57:13
schweers
Achylles: my remark is slightly off-topic, because it’s about elisp, not Common Lisp, but ... Emacs actually did it for me. It enables you to solve very small problems, which are still rewarding.
14:57:56
beach
Achylles: As it turns out, programming is only slightly about getting the logic right, and mostly about communicating your intent to other people reading the code.
14:59:26
beach
Achylles: I am with dlowe. Perhaps that kind of activity is not something you would like to do.
15:01:15
jackdaniel
Achylles: there is relatively easy task for log4cl: https://github.com/sharplispers/log4cl/issues/26
15:01:33
jackdaniel
you may check out other sharplispers projects, all are desperate for contributors ;-)
15:01:39
beach
Achylles: That doesn't ring true to me. Given that programming is about communication, you have very likely missed the most important aspect of it.
15:02:16
beach
Achylles: I suggest you expose your code here or on #clschool for people to comment on.
15:02:39
beach
Achylles: Then you will start learning the communication and maintenance aspect of programming.
15:07:54
scymtym
jackdaniel: i'm not sure i agree regarding sharplispers projects. in my opinion, what they could use more of are experienced maintainers focusing on a single or at most a few projects - not more contributors if that means more pull requests
15:19:06
scymtym
beach: i wouldn't know, i never put any thought into that question. it's just a word that randomly came up in my mind around 20 years ago. it has good uniqueness so i stuck with it
15:56:40
shka_
my idea is to basicly take rrb type vector structure, and install bitmask at each node to store information about emptyness of subtree
16:29:02
cage_
jackdaniel, please can you give some more explanation about the issue on log4cl? I mean, only revert changes on watcher.lisp is needed?
16:35:01
jackdaniel
cage_: not exactly (though close). In the meantime bordeaux-threads gained semaphore implementation. so it would be reverting to using semaphores, but semaphores provided by bt (not by bt-semaphore)
16:39:31
cage_
i have changed all "bt-sem:" to "bt:" and removed all the #(+|-)ecl reader macros, i have tested only on sbcl
16:43:16
pjb
shka_: you could have a look at Numenta HTM and their Sparse Distributed Representation. They have ways to compact them.
16:47:48
shka_
i simply want R style data frame, i want to have batch operations to modify it, and i don't want to wreck it when a condition is signalled
16:48:05
Bike
i've only worked with sparse tensors in matlab, and there i think it's just a linked list
17:07:41
aeth
I guess people who chase the trendiest langauges usually switch every 5 years or so. (Or they're replaced by people who do.)
17:11:31
aeth
Compile-to-JS is the worst for this. Remember CoffeeScript? Only 6 years or so past peak hype and now "no one" uses it. If you're writing something that takes years to write, you'd have an unpopular language by the time you finished if you picked compile-to-JS.
17:12:34
oni-on-ion
julia isnt too young =) its about 10 years old now. and its 1.0 - lots of happy python/matlab/R users gone to it
17:13:23
aeth
shka_: Almost mentioned it too, but I didn't want to turn this channel into a language graveyard. :-)
17:13:41
aeth
oni-on-ion: first time I've seen Dart mentioned in like 2-3 years, and even then it was unpopular
17:15:58
aeth
oni-on-ion: I'm not sure language creation time matters with this, though. If Common Lisp became the #4 most popular language tomorrow, the clock would be ticking, and in 5 years it'd have no more than 1/3 the users, probably. Because the people who make a language very popular move around unless they have no choice (e.g. JS, C, Java, etc.)
17:16:12
pjb
oni-on-ion: they are here: https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/m-expression/index.html
17:16:39
oni-on-ion
its amazing to see julia is actually super performant without going through any low level hoops. those guys have really nailed the low level and high level thing; also david a. moon is contributing to it (the lisp guy.)
17:16:40
aeth
oni-on-ion: In a sense, CL already had a few hype phases, and we're just the leftovers from that, with a few people added every now and then from reading the old literature from that hype phase.
17:17:45
pjb
aeth: it's quite different. CL was standardized in the heart of the AI winter. That calmed quite an amount of hype.
17:18:15
pjb
aeth: then, it was at a time when getting a computer able to run it would cost an arm, of a year of salary…