freenode/#lisp - IRC Chatlog
Search
7:04:43
pillton
Oh it is checked. The fact that an arbitrary value can be stored in the variable is probably the problem.
11:27:13
jeosol
I did not hear back from Mike Maul yet, and it seems I will proceed with the ML examples later, just start and out and change things based on reviews later.
11:40:38
capitaomorte
Hi there. Is there a MAP* function in CL that APPLYies the function to each element instead of FUNCALLing it?
11:44:16
capitaomorte
the goal is to process an array of JSON objects (converted to plists) using a destructuring lambda spec.
11:52:55
capitaomorte
(mapcar (alexandria:curry #'apply function) (coerce sequence 'list)) should work
11:59:19
flip214
shka: yeah, well, an explizit LOOP seems to be faster than the (MAP (COERCE)).... naturally.
11:59:27
capitaomorte
I don't know. I never tried it, I don't see why it couldn't recognize the MAPCAR/COERCE pattern and turn it into your MAP
11:59:50
flip214
although I'd hoped that this would be simply dispatched to a different MAPCAR function that takes a simple-vector as input.
12:00:49
shka
capitaomorte: well, in theory it could, but why would you implement something like that for such trivial case that can be fixed by writting code properly?
12:02:16
flip214
think a macro that did MAPCAR and the input was a COERCE, because the macro "needs" a list...
12:02:24
capitaomorte
anyway, making garbage is not as bad as people often assume, at least on Allegro
12:03:23
capitaomorte
it's sometimes worse to let objects go into its "oldspace" where the GC has a much harder time finding them.
12:04:52
flip214
shka: that would be slower if the input cannot be proven to be a list, I guess. not sure if there are other drawbacks.
12:11:56
capitaomorte
shka: yeah, but "triggering GC" is more than just a binary thing. In many situations, if i remember that lecture, it's better to trigger it very often.
12:12:41
capitaomorte
shka: and actually better to use non-destructive, garbage-making, list-processing, for example
12:13:44
theemacsshibe[m]
Although we're passed mark and sweep collectors my knowledge resides in, wouldn't there be some constant factor in marking or grouping used data?
12:13:54
jmercouris
I bet the number of objects in the universe is more important than how many need to be cleaned up
12:14:01
capitaomorte
jmercouris: yes, for sure. The lecture compared Allegro with SBCL and results were quite different
12:14:39
flip214
if you manage to work with a fixed amount of memory (preallocated everything), the GC won't be triggered later on
12:14:48
shka
well, we have to distinguish average performance and variance in expected time to finish
12:15:29
jmercouris
what would you prefer, a game that ran at 200fps but dropped to 5 every 10 seconds, or a game that runs at 20 fps?
12:17:02
theemacsshibe[m]
Idea: replace GC algorithms with prediction if the user cares about response time
12:17:37
theemacsshibe[m]
Good times: when you're figuring out how to deal with the cave spiders about to kill you next turn.
12:19:06
theemacsshibe[m]
Not even, I'm saying when the game is quiet a clever engine could GC or reallocate without problems
12:19:45
theemacsshibe[m]
For example, if I'm waiting at site A and everyone's at B, might as well collect since no one's going to rush in and blow me up.
12:21:07
theemacsshibe[m]
It could also be argued using digital bombs to destroy digital models of nice maps could also be a form of GC.
12:21:38
flip214
phoe: sorry, I didn't find the presentation. yeah, the paper is in the PDF as well.
12:22:07
theemacsshibe[m]
Okay I have a new game, I'm selling it for (sqrt -1) dollars on Steam with vim keybinds
12:22:41
theemacsshibe[m]
One team tries to save the thingamabobs and the other tries to break them somehow. Broken thingamabobs are freed on the server.
12:23:37
theemacsshibe[m]
This is like that Doom thing where monsters are Unix processes but more dangerous
12:24:59
flip214
theemacsshibe[m]: so you're thinking about the "all instances" thing[1] and doing randomized CHANGE-CLASS on them on a production system?
12:27:24
theemacsshibe[m]
I'm saying we get rid of the GC and let players decide what should be freed by shooting representations of them.
12:37:14
theemacsshibe[m]
This is Australia, we couldn't do anything with our copper tin can networks.
12:42:24
theemacsshibe[m]
ACTION runs back into #lisp with a handful of steel wool and a Bunnings receipt
12:43:00
theemacsshibe[m]
ACTION gives magic GNU🦄PONUT a vegetable burger she got from the barbeque
12:50:28
theemacsshibe[m]
Why isn't tail recursion something we do a lot in Lisp? (Scheme is pretty much built on it, having no imperative style loops, but CL isn't very good at them.)
12:50:49
theemacsshibe[m]
If I wanted to write some function as a normal maths thing, I'd probably use tail recursion.
12:53:56
p_l
theemacsshibe[m]: it's a matter of style - some code depends a lot on tail calls, especially when wirtten for implementations that do TCO, but generally we enjoy having powerful iteration constructs
12:54:23
p_l
some of the code normally enabled by TCO resurfaces in CL in much, much weirder forms...
13:02:12
shka
p_l: ha! let me show ya! https://github.com/sirherrbatka/cl-data-structures/blob/ee8c3d07e1e2b636b04eaa76abb28ec7e33dfb18/src/utils/macros.lisp#L182
15:06:55
jeosol
jmercouris: I will work start working the machine learning example applications and update them over time. What I mean is, could start with simple data structures, and eventually replace with libraries after I make additional research
15:08:35
jeosol
I will find some domain to put the examples over time. I think I saw some blas related info in the array chapter on CL cookbook.
16:16:06
jeosol
jmercouris: BLAS and LAPACK and algebra libraries for solving things like eigen-value problems, solving for x in Ax=b type of problems.
16:17:15
jeosol
For instance, if I do, linear regression problem, I could solve the problem with matrix inversion (small problems) or go with conjugate gradient descent.
16:17:56
jeosol
My plan is to start raw, e.g., use loop for the conjugate gradient descent calculations
16:18:26
jeosol
and then later, I can replace functionalities with existing libraries like CLML and MGL
16:19:26
jmercouris
You are probably thinking about other data sets / models as well, or are you only interested in linear regressions?
16:27:58
jeosol
jmercouris: No, it is general, I am trying to show that CL can be use for these ML problems.
16:28:40
jeosol
my plan is to reproduce the problems in the cousera machine learning course for instance. It is lot of problems, but I could do it over time.
16:29:37
jeosol
the problems conver different algorithms linear regression, logsitic regression, neural nets, SVM's, PCA, etc. With such effort, we can start aggregating CL resources for these applications.
16:29:51
obi-cons-cdrobi
jeosol: more traditional algorithms (like decision tree, etc.) have very nice Lisp implementations. I've been thinking about throwing together some NN library, but haven't had time. I hacked together a decision tree implementation that I wouldn't mind sharing, if you're interested
16:31:16
jeosol
I recently looked at Gabor Melis code for the Higgs Boson project, I was able to bring to compile with latest SBCL, but lack of GPU makes the training take more than 24 hours Gabor mentioned
16:32:29
jeosol
I used C4.5 decision tree algorithm through lisp via system call for a project a while ago.
16:34:19
obi-cons-cdrobi
jeosol: https://github.com/obicons/decision-tree. It's a little rough, I hacked it together for a uni project a year ago or so. But it does work and adequately demonstrates why symbolic computation is good for solving a specific subset of AI problems
16:34:47
obi-cons-cdrobi
It needs some small modifications to support continuous data types, but as-is supports discrete values quite well
16:37:36
obi-cons-cdrobi
yep. I played around with this a lot in SBCL to get it to generate somewhat efficient machine-code (hence the generous usage of symbolic identifiers). By the time that I was done, the disassembled code was actually informative.
16:39:54
jmercouris
well, an organization to work on the code, maybe a github organization, or some gitlab page
16:40:11
jmercouris
but if you'd like to collaborate/merge resources from several places, might become uesful
16:41:37
jeosol
I can work through those examples, I want to make sure it is clear and logical. The course goes through different realistic applications. Eventually, I will have to pull a lot of resources, change libraries, functionalities, etc
16:42:01
jeosol
this was why I wanted reviewers, that will look at things, make suggestions, etc. Seems I got two so far.
16:43:25
jeosol
I also sent an email to Gabor about using his code, didn't get any reply. I assume his was busy. Since he put it in public domain, may be he didn't matter, but I wanted to pick his brain on where he thinks work needs to be done
16:45:35
jeosol
jmercouris: I think the organization part is important. I will think of where to make the posts for instance. I will also need to know that people use when they intersperse code and write up. I have seen some CL-jupyter or notebook
16:52:34
jmercouris
jeosol: maybe a good start would be to take his project, and finish documenting it
16:52:38
jeosol
there is a lot of algorithms there already, blas/lapack wrappers, pca, etc. I will reach out again, possibly another avenue.
16:53:24
jeosol
They have good starting base already, and it will make sense to work off that and collaborate with them.
16:54:46
jmercouris
random-nick: because it's so easy to build off of another package compared to other languages, and license restrictions incompatibilties can be a huge mess
16:55:36
jmercouris
when developing applications, GPL is okay, but when developing libs, I learn towards BSD
16:57:06
jmercouris
random-nick: what if somebody wishes to use the lib in a *viable commercial product?
16:57:27
jmercouris
I can count the amount of succesful open source companies on one hand, but anyways, this is off-topic and the war I did not wish to start
16:59:01
jeosol
My plan is to document the examples and put it in public domain, and since they have stuff going, it seem reasonable to align with them
17:02:38
jeosol
Well, if it is frozen, and they want to hand it over to another maintainer or sth, that will be fine.
17:03:03
jmercouris
yeah, just won't be able to necessarily merge things upstream, which is fine, since development has ceased
17:03:34
jeosol
eventually have a way to merge it with gabor's mgl library and viola, we have one big ML lib
17:04:26
jmercouris
probably isn't too hard to put the two systems into one, the harder part will be making the API uniform
17:06:38
jeosol
I looked at Gabor's code in some a bit of detail. Excellent features with flexibility to take advantage of CUDA if available
17:07:34
jeosol
btw, pardon guys, I think Mike Maul was a maintainer for that code and his activity is frozen. The library was forked from a company in Japan. Mathematical Systems Inc. mathematical-systems
17:10:37
jeosol
So I am back to Mike again. I will contact him, ask about the license issue and get back.
17:17:23
jeosol
jmercouris: I sent an email to one of the Asian guys. Hopefully, I hear back, if not, I will just go ahead like you suggested. Hopefully, it doesn't bring any issues.
17:33:40
jeosol
jmercouris: Hope so. I will wait, see if he replies, before starting to work on the examples.