freenode/#lisp - IRC Chatlog
Search
14:33:56
drmeister
Is the idea that I build a system that depends on a bunch of systems and uses asdf:monolithic-concatenate-source-op and then load that?
14:54:05
drmeister
(asdf:load-asd "/Users/meister/Development/cando/tools/prebuild/jupyter/cando-jupyter.asd")
14:54:42
drmeister
I still get a lot of REPL loading/compiling - and this is what I'm trying to avoid.
14:56:15
drmeister
What I was hoping is that ASDF would bundle up everything as a single fasl file and load that.
15:58:56
jmercouris
When you use a function, or a set of functions from another project with a compatible license, how do you show which pieces of code are from that other project/license?
16:07:31
Shinmera
jmercouris: By "use" I assume you mean copying into your project rather than simply calling?
16:30:17
jmercouris
Let's say I leave only 25% of the "original" implementation, do you think I still have to include the other license and a reference?
16:31:45
jmercouris
I think I'll probably okay, I don't think people in the Lisp community will sue me into oblivion
16:32:06
Shinmera
What I've seen done is include a reference or history of modifications being made by whom.
16:32:25
jmercouris
Shinmera: Can you expand on that? Do you mean per file? or in a master "changes" file?
16:33:27
jmercouris
I know you are not a lawyer, but what do you think of this idea: 1. Create a Licenses folder including all licensees from all projects 2. Create references in the source code to each applicable license
16:34:04
Shinmera
I think that's fine, if you also include a list of authors/contributors in the files that contain the included code.
16:34:54
jmercouris
Seems a little cleaner, and easier than having to break apart their functions into separate files
17:01:37
pjb
jmercouris: let's have fun, take a program under GPL, and write an anagram of it, licensed under BSD.
17:03:10
jmercouris
pjb: Lol, that's just asking for trouble, I prefer to just stay away from GPL sources
17:03:16
pjb
jmercouris: you could write a tool to help, it would add or remove comments to adjust :-)
17:04:03
pjb
jmercouris: and of course you could use that tool to check if two programs are anagram on of the other, and thus demonstrate a CLEAR derivation of your BSD or proprietary code from any GPL program >:->
17:05:13
jmercouris
pjb: I'm pretty sure such a program already exists, it's called moss or something
17:05:21
pjb
Or we could present an expert to the court, a physicist demonstrating that there is only one electron in the whole universe, zig-zapping between the start and end of times, and weaving the universe; therefore all your so called new code is actually reusing the same electron as my GPL code! BAM!
17:33:30
flip214
If a loop gets too long, what's the best way to split a big COND into separate subroutines?
17:34:19
flip214
Having to pass quite a few calculated variables into the functions, using a few specials, and some lambdas (to do COLLECT clauses etc.)
17:38:06
flip214
and moving all the calculated variables to specials so that I don't have to pass them along means they won't show up in stack traces
17:42:43
flip214
pjb: but I can't have FLET within the loop (because of the COLLECT clauses), and I can't have it easily outside (because of the variables)
17:43:49
flip214
beach: yes. but then the function bodies are again _within_ the loop body, and so it becomes quite long...
17:44:02
pjb
Well, either pass them all to functions, or use something else than loop. I mean, if you use local lexical variable defined in a surrounding let, you can have (let (flet (loop)))
17:45:19
flip214
I even pondered having all that calculated state in some struct, and have a macro expand to WITH-SLOTS of that...
17:45:27
pjb
(let ((collected '()) (flet ((collect (x) (push x collected)) (collected () (reverse collected))) (loop … (collect foo) finally (return (collected)))))
17:46:17
flip214
and I prefer (FOR var = (expression)) in the loop (it's an iterate) over (SETF var (expression))
17:47:09
pjb
You have a code complexity problem and it should be resolved with macros. If the loop macro doesn't help, use another or your own macros (and macrolet).
17:52:09
flip214
can I tell ITERATE to use outer bindings in (FOR var = ) forms, or do they need?
17:57:30
flip214
pjb: beach: thanks for the help. do you mind me pasting that conversation into the source file?
18:19:42
jmercouris
if I do (ps:chain -json (stringify some-object)) It'll output Json.stringify(some-object);
18:23:54
|3b|
ACTION thought there was some way to configure specific words to translate like that, but not seeing it in docs... maybe was some other lib
18:24:16
jmercouris
|3b|: There is some discussion here: https://www.mail-archive.com/search?l=parenscript-devel@common-lisp.net&q=subject:%22Re%5C%3A+%5C%5Bparenscript%5C-devel%5C%5D+How+to+call+constructor%5C%3F%22&o=newest&f=1
18:52:01
whaack
so (cddr '("this" . "that")) is going to error while (cddr '("this" "that")) will not
18:55:01
jmercouris
Reccomendations for cl json type lib? I've been personally looking at cl-json (https://github.com/hankhero/cl-json)
18:57:57
jmercouris
Shinmera: Alright, cl-json it is! Seems like my use case is already described in that article. Thanks for the link!
19:02:48
jmercouris
Does there exist an article someone can reccomend that compares and contrasts different common lisp graphical toolkits and bindings? E.g. why might someone choose mcclim over gtk etc
19:36:03
whaack
i'm not trying to append per say i'm trying to pull out the list one level, like loop through and append
19:36:33
pjb
(mapcan (function second) (copy-tree '('(a b c) '(d e f) '(g (h i))))) #| --> (a b c d e f g (h i)) |#
19:37:02
pjb
whaack: Please, go read: Common Lisp: A Gentle Introduction to Symbolic Computation http://www.cs.cmu.edu/~dst/LispBook/ http://www-cgi.cs.cmu.edu/afs/cs.cmu.edu/user/dst/www/LispBook/index.html
19:50:27
aeth
In case anyone's wondering, mapl is similar to mapcan if you want to mess with side effects directly instead of using the automatic nconc.
19:52:14
Bicyclidine
it returns the first list you passed to it. not that this matters to the point.
19:53:35
Bicyclidine
docstrings on sbcl are kind of haphazard, for functions you can just look up in the clhs.
19:54:02
aeth
I use mapl like map nil if I need to look ahead because I can e.g. do something to the car of x unless the cdr of x is endp and otherwise treat it like map nil (except with the restriction that I have to be taking the car, of course)
19:54:33
aeth
I was going off of memory of the docstring that I looked up when I was on my laptop in an area without Internet
20:13:43
drmeister
Then I googled the right word combination and I think ECL doesn't have .fasl extensions. .fasb is a native fasl and .fasc is a portable fasl.
20:14:32
drmeister
I'm working on mimicking the C:BUILDER function in ECL and my version is being called with a .fasb extension and I'm not sure where it's coming from.
20:18:06
scymtym
aeth: documentation strings of CL:MAP* functions were improved recently. it says "... Return LIST." now
20:27:24
dmiles
i mean in that wouldnt implementor end up making a Meta Object Protocol when they are implementing CLOS?
20:32:00
pjb
But if you were to write CLOS in C++, you could very well write it without providing a MOP.
20:34:57
Bicyclidine
like, standardly speaking, standard-class is a standard-class, that's "meta". but there's nothing about compute-effective-method or make-method-lambda.
20:36:59
dmiles
is it anything more than just that ? = reflective exploration and definitions to CLOS
20:37:43
pjb
Well it would allow user code to define their own object system! With their own implementation choices. So it can be quite sophisticated.
20:42:06
drmeister
Shinmera: I was able to get asdf:monolithic-compile-bundle-op to work with Clasp.
20:42:44
drmeister
I had to write some code to get Clasp to fully mimic ECL's C::BUILDER function - which is invoked by ASDF.