freenode/#lisp - IRC Chatlog
Search
16:24:10
defunkydrummer
sjr: in truth today we are at ctlt3 level: most implementations implement cltl2 and a lot of extras that are almost portable thanks to portability libs. I don't think the state of the language is a problem at all.
16:49:45
phoe
there's a de facto standard that all modern implementations comply to; it's implemented by c2mop, usocket, bordeaux-threads, lparallel, trivial-gray-streams, trivial-garbage, ASDF, UIOP et cetera
16:56:22
vtomole
How would that work? Is it "If your implementation implements the standard, you can pretty much add anything else you want to it"?
17:00:11
Bike
as long as the extensions follow certain limits, like not putting extra symbols in the CL package
17:12:03
aeth
Well, it's finite, isn't it? A symbol is produced from a string so the maximum length is probably array-total-size-limit. In SBCL, that's 4611686018427387901, which is probably the maximum possible in 64-bit systems
17:13:17
aeth
Or close to it. most-positve-fixnum is 4611686018427387903 in SBCL and SBCL uses (signed-byte 63)
17:14:52
aeth
If you wanted to define all of them, though, the real problem is char-code-limit, which is a lot less straightforward.
17:17:49
warweasle
aeth: I actually like the kitchen sink approach. I usually have to include a ton of libraries to get anything done in other langauges. With lisp, it's just there.
18:52:39
comborico1611
phoe: I was just trying to figure this out. Thanks! I needed the verbose to understand.
18:56:41
aeth
Depending on what you're doing you could also use types. e.g. (let ((x 'foo)) (check-type x (and symbol (not null))) x)
18:57:24
aeth
That would be if you wanted a correctable-at-runtime error if it's not a non-nil symbol
19:04:26
aeth
stylewarning: (multiple-value-bind (value value-present-p) (gethash symbol hash-table-of-all-possible-symbols-except-nil) (declare (ignore value)) value-present-p)
19:06:06
stylewarning
(let ((tbl (make-hash-table))) (do-all-symbols (x tbl) (when x (setf (gethash x tbl) t))))
19:10:12
aeth
stylewarning: now we just need a way to not have to regenerate the hash table each time the function is called (what if someone adds a symbol?)
19:34:32
potatonomicon
is there a way to make sbcl yell at me if it can't do tail recursion optimization? or does it do this by default and I just haven't seen it?
19:36:21
aeth
If it's just SBCL you could parse disassemble (keep in mind that the case of its output depends on the value of *print-case*)
19:37:35
potatonomicon
don't really want to manually check the asm, since I will have a lot of functions that need this
19:37:44
cgay
You could test your function with something that would cause extremely deep recursion. :)
19:39:10
aeth
potatonomicon: well if it's tail on itself you'd just have to look for something like this: ; 9A: B8B84C5120 MOV EAX, #x20514CB8 ; #<FDEFN FOO>
19:39:45
aeth
That's present in this unless I (declare (optimize (speed 3))) in the function: (defun foo (x) (unless (<= x 0) (foo (1- x))))
19:45:45
phoe
potatonomicon: note that the CL standard does not promise you that your code will be tail-optimized. An implementation may decide not to do TCO for any reason, such as (declaim (optimize (debug 3))).
19:46:55
phoe
Okiedokie. Just keep in mind that your code might blow stacks if you ever use tail calls in CL in places that might be called thousands+ of times.
19:47:30
eschulte_
Does anyone know of a way to read a lisp source file to a mix of S-exprs and say strings which would include enough information to rebuild the original source (including whitespace and comments)?
19:54:22
beach
eschulte_: It can wrap the S expressions in the file in standard objects that contain information about the source.
20:06:47
jmercouris
I'm trying to convert the following sql https://gist.github.com/b2259281e4c470a3930c05166c7cb2c0 to sxql
20:08:19
jmercouris
I've got the following: https://gist.github.com/c9c50d181cccea43b26c5388af2ba2d4
20:18:21
jmercouris
keyword args are only: type not-null default auto-increment autoincrement unique primary-key
20:57:14
jeosol
One of them said he is no longer associated with it, referred me to another dude, who said he does not know how to reach the maintainer
20:57:42
jeosol
It is seems it is round and round so far. But I may just pick it up and proceed as discussed
20:58:12
jeosol
I can pick it up, I just don't want to have issues with that maintainer who I can't reach so far
21:00:03
jmercouris
I guess since you will be the author, you may package and license it in different ways
21:00:20
jeosol
that was the plan, as long as they are willing to relax or work around it. One of the dudes said it was possible, but he is not longer involved
21:01:21
jmercouris
it really depends on what you are going for, whether you want to actually get something done or not
21:03:45
jeosol
I actually want to get something done. I have a huge code base in lisp, and have written small codes for KNN, fuzzy clustering, etc. For some other applications, I make calls to Python
21:04:19
jeosol
From the look of the library, they seem to cover a lot of applications already and I would want to start by using it in purely application mode
21:05:30
jeosol
I wrote a python script that does everything writes a file. I do a system call to that script (via run-program ) and read the output file from the lisp side
21:08:17
jeosol
btw, I sent out one last email to the Jap contact explicitly discussing the licensing issue and what I plan to do, and that he should direct me to who has the authority to make decisions.
21:08:21
jmercouris
the http socket support/libs are "ok", they are also not so good compared to other languages (from my perspective of learning them), but they are certainly much better than the unix domain socket support
21:09:12
jmercouris
jeosol: I know you weren't trying to be offensive, but jfyi, in the US "Jap" is considered derogatory, mostly because of it's usage as slang during WW2
21:10:34
jmercouris
also sounds good, hopefully they'll reply back with some sort of acknowledgement or even a new license..
21:10:51
jeosol
To avoid future issues, I would like to pick the library up, clean up any issues and make it open for people to use and contribute
21:11:19
jmercouris
yeah, otherwise, it is like many other efforts in lisp, fragemented into its own ecosystem
21:11:49
jmercouris
that's something that I think may be a pattern, the nature of lisp, the nature of macros, the strong customizability means that people get stuck in their own little silos and ecosystems, they end up wanting to make their own exact libraries
21:13:04
jeosol
I did try to run Gabor Meli's code in the past, but I didn't have GPU so the training of the NN was taking too many days.
21:14:12
jmercouris
the problem space I am most interested in, is one what White_Flame was telling me about, genetic algorithms
21:14:39
jmercouris
I didn't know anything about them really until about a week ago, fascinating stuff, seems like a specialty for Lisp
21:16:51
jeosol
There is actually a code I am trying to clean up that looks into advanced forms of the GA
21:18:15
jeosol
jmercouris: for the GPU part, I mean, I took his problem, and ran it on my linux box. Gabor said with GPU (don't remember the spec) it took 1 day to train
21:19:36
jeosol
Yeah, nothing fancy. I will go back to this blog again and look at the specs. But I should be able to run a small case
21:21:12
jmercouris
jeosol: I'm trying to develop an algorithm that optimizes the packing and shipping of boxes
21:21:35
jmercouris
I've thought about what kinds of things to mutate against, and a couple of things I thought would be good would be packing strategies
21:22:19
jmercouris
of course the packing strategies will be functions, so to be able to mutate them with each other (as code), would be interesting, instead of just tweaking the args passed to some function
21:22:22
jeosol
Ok, you may also thinking about GP -- genetic programming, it is one form that can evolve strategies and new insights
21:25:10
jmercouris
I am writing survey software first, to determine if anyone actually would want this product
21:25:26
jeosol
I came to lisp the first time because of GA I was trying to convert to C++ at the time.
21:26:40
jeosol
the solutions for GP problems are not always clear but when you see the results, you will have the aha moment, like yeah, that makes sense
21:27:05
jmercouris
Yeah, I have no illusions that it will just magically work, I just thought this might be an interesting way to iterate an algorithm
21:27:35
jeosol
Yes, the keys are the objective function and how the variables/features are parameterized
21:28:30
jmercouris
I'm not sure if he would like me to share what he does, you may ask him yourself
21:30:57
jmercouris
but when I started trying to write an algorithm I realized the amount of permutations I would have to test
21:31:08
jmercouris
so I started thinking about greedy algorithms, and even those were way too heavy
21:34:21
jeosol
I will have to get more info regarding your problem, otherwise, a straightforward GA may get you sth albeit limited and can be used to glean more insights
21:35:32
jeosol
I wanted to see that you meant by permutations. For a greedy method, you will need to test many combinations.
21:37:11
jeosol
they are global algorithms and you won't need to test many combinations. As long as each feature's limits are known, e.g., (bounds for continuous variables, number of possibilities for discrete values, ...) it's fine
21:38:00
jmercouris
the complete domain space is this: what is the cheapest way to combine shipping products, and parcels to deliver them somewhere
21:38:22
jmercouris
e.g. if I have 3 parcels to ship, perhaps I should ship two of them grouped together with some USPS product, and the last one with some UPS product to ship it most cheaply somewhere
21:38:46
jmercouris
so I have to solve several problems,how to combine packages together, and how to combine products together
21:39:19
jmercouris
furthermore, for many products, the prices are not discrete, but rather continuous
21:40:06
jeosol
hahaha. But the products are bounded, those are discrete or integer. prices can be encoded as continuous to say 2 decimal places (cents)
21:40:30
jeosol
The algorithm will figure out that combination and permutations, that is what it does.
21:40:56
jmercouris
especially when the products and rules surrounding products are chaning all the time
21:41:07
jmercouris
which is why I was thinking about some generalized solution that can be more easily adapted and understood
21:41:52
jeosol
I think you will have to solve the problem with fixed static inputs, and later make the interface general enough to actually run the GA runs in parallel given new instance values
21:43:33
jeosol
What I mean is that for the GA to run effectively F(X) must not be stochastic for the same X (it can still perform well if things change though).
21:44:28
jeosol
so I mean, first ignore the fact that things are changing, then solve a fixed instance (products and prices), then generalize
21:46:02
jmercouris
though, depending on the results of my survey, maybe nobody cares about shipping cost
21:46:16
jmercouris
maybe they care about box inventory, how many boxes of what types they need to keep
21:47:30
jeosol
cool, will be interested to see what the survey says, but the problem is actually multiobjective, then we are heading into the territory of pareto solutions,
21:51:10
jmercouris
if they are shipping more than one item, perhaps it is only large companies like amazon, in which case, their integration costs would be astronomical
0:24:39
jason_m
I am working on a system and had a compile time error in one of my source files. When I quickload (asdf load) the system, I land in the debugger with a condition of type UIOP/LISP-BUILD:COMPILE-FILE-ERROR.
0:24:41
jason_m
I know I can look at the error in the inspector, but I don't see the actual underlying compile error.
0:27:55
jason_m
If I compile and load the particular file, I get a SB-INT:COMPILED-PROGRAM-ERROR which better directs me to the problem, but to get it, I abort from the debugger, open the file, and load that (or sometimes C-c C-c form by form) to get the more specific message.
3:23:34
beach
Showing specbot replies publicly is useful mostly to tell other people where to look, or to ask people for help on an entry.