freenode/lisp - IRC Chatlog
Search
0:21:39
aeth
Does anyone have any idea why something that would perform around 3% CPU in SBCL and around 6% CPU in CCL would struggle at 100% CPU in ECL? I'm guessing something creates a lot of garbage in an inner loop in ECL but not SBCL and CCL, or at least not as much garbage.
0:26:42
jason_m
aeth: Could you get an idea using (time ...) and comparing the number of bytes consed, time spent in gc? i know ccl and sbcl have those things in their time output. Not sure about ecl.
1:05:55
aeth
jason_m: I used to use time, but in SBCL one can just disassemble a function and look for a commented allocation there.
1:09:21
jason_m
aeth: sounds like a more reliable approach. I haven't played with disassembling yet.
1:10:49
aeth
If the function is creating something, there should be one (?) thread.alloc-region and it shouldn't be there if the function is merely modifying something
1:12:45
pillton
The statistical profile in SBCL allows you to profile allocations. (sb-sprof:with-profiling (:mode :alloc) ...)
1:13:39
aeth
Yes, that is one of the things I used to use. Statistical means it misses some tiny allocations, though.
1:14:09
aeth
Disassembling will miss nothing, unless there's some allocation in SBCL that isn't commented in the disassembly
1:27:25
krwq
how do you create a metapackage? what I mean is to create a package - when someone does use-package on that he should automatically also use few other packages
1:29:19
Bike
...and of course you can define a package that's just there to reexport symbols from a bunch of packages.
1:30:33
pillton
The case you specify would be easier if you did (defpackage "FOO.A" (:import-from "FOO" ...)).
1:31:07
Bike
you can have a "metapackage" that imports symbols from other package and then exports them. so like uh...
1:33:07
krwq
Bike: is there some easy way to import all? some function or something? I'm not sure if it would be ok to just put some random code under the defpackage
1:47:10
warweasle
XachX: There were some changes to rtg-math which broke some of clinch's examples. The fix is in master, if you want to include them.
3:00:08
krwq
can you do i.e.: (use-package-symbol 'cl-ppcre:regex-replace) and then just do (regex-replace ...) but without using all symbols from the package?
3:04:09
krwq
Bike: so if this is only making it visible in this package then is there a way to also make it visible in the packages using your package?
5:08:47
pillton
If I read 8.7.2 in the sbcl manual correctly, the C prototype "double fun(double x)" maps to (define-alien-routine fun double-float ((x double-float)))
5:12:34
borei
aha, seems like i forgot to specify type of return, now there is another error, smoking docs :-)
5:14:44
loke
I'd generally recommend using CFFI instead of sb-alien directly. That way your code will work on all CL's.
5:36:30
beach
I'd generally recommend that people program in Common Lisp instead of some other language.
5:57:34
beach
I could use some help. I am thinking that it would be possible to structure the reader as follows: If the character read is not in cases 1, 2, 3, or 4, would it then be feasible to unread the character and call a separate function for all other cases?
6:03:13
beach
I am attempting to break up the reader algorithms into smaller chunks so that I can replace the main algorithm while calling the smaller chunks.
6:09:07
astronavt[m]
im thinking about picking up Guile for my first Lisp. does anyone have any reason i shouldnt do this before i dive in?
6:17:58
astronavt[m]
and lisp just seems appealing. i have a math background, i like the uniformity and generality
6:21:11
aeth
Different things will be easier in different languages and implementations. e.g. For CLI stuff, you shouldn't use a JVM language because of the startup time iirc.
6:21:31
astronavt[m]
yeah so im told. i love the idea of clojure but its basically out because of the JVM
6:21:41
astronavt[m]
im gonna get my functional rocks off with Haskell eventually so it doesnt bother me
6:23:23
flip214
astronavt[m]: scheme is minimal, yes. CL has far more batteries included ;), and a LOT of libraries.
6:23:57
aeth
Lisp is a very different kind of functional than Haskell, when you do functional programming in it.
6:24:24
flip214
astronavt[m]: yeah. dumping an (uncompressed) binary via SBCL and doing the equivalent of --help (so only quick
6:24:31
aeth
Schemes can be large, but they're not portably large. The extensions that make them comparable in size and features to CL are all different in each one.
6:24:46
flip214
command line parsing) gets you a runtime of ~0.03, o similar to C, perl, Python, etc.
6:25:46
astronavt[m]
i guess i never gave it a thought. trying to use CPAN to install miscellaneous CLI tools was a pain and i hated it every step of the way
6:28:28
aeth
astronavt[m]: In Common Lisp, you can work with types if you want to. Like (defun foo (x) (declare (single-float x)) (+ 1.5f0 x)) or even (deftype vec3 () '(simple-array single-float (3))) (defun bar (v) (declare (vec3 v)) (map 'vec #'+ v v))
6:29:54
beach
astronavt[m]: You need to know that this channel is dedicated to Common Lisp, so there will be a significant bias in favor of Common Lisp, as opposed to other languages like Scheme, Guile, Clojure, etc.
6:30:16
flip214
astronavt[m]: well, perl is the other end of the syntax dimension... while lisp has nearly no syntax, perl has _mostly_ syntax ;)
6:31:08
astronavt[m]
i liked it in college when i was learning what a function was, and how to structure a program
6:31:20
flip214
astronavt[m]: scripting still means editing/debugging. if you use emacs, be sure to use slime; for vim there's an equivalent, slimv.
6:33:40
flip214
astronavt[m]: slime resp. slimv provide you with an interactive debugger and data inspector.
6:34:03
flip214
that is, if there's an error, you can see a stacktrace, the local variables, inspect data structures, etc.
6:35:45
minion
astronavt[m]: please see PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
6:36:08
minion
Ansi common lisp: I can't be expected to work when CLiki doesn't respond to me, can I?
6:36:27
minion
on lisp: No definition was found in the first 5 lines of http://www.cliki.net/on%20lisp
6:36:52
astronavt[m]
thats one pain point about python, i end up having to write a script to handle one file and just run it using the GNU Parallel tool
6:37:11
beach
astronavt[m]: There is a compatibility library called Bordeaux Threads that makes it possible to use threads across Common Lisp implementations.
6:37:16
astronavt[m]
which is fine but sometimes doesnt make sense, e.g. if i need to persist data across processes or i wanna use a kind of map-reduce thing
6:37:52
astronavt[m]
is it one of those "it exists but nobody uses it" deals, or is it actually useful
6:40:22
beach
astronavt[m]: Seriously, you are making a big mistake if you attempt to use Common Lisp without an editor that is capable of computing correct indentation, and help you with other debugging tasks.
6:43:52
beach
astronavt[m]: Correct indentation alone is an argument. Common Lisp programmers rely on indentation to understand the structure of the code. If you show some of your code and the person reading your code sees that is incorrectly indented, you basically force that person to count parentheses, and that is not polite.
6:45:26
axion
If you are coming from Vim, you really should get to know Emacs. While it is possible to code CL in Vim, it is not as pleasant, and actually painful at times.
6:53:43
flip214
all my previous attempts at using emacs failed at the first step - installing the evil mode ;)
7:58:06
shrdlu68
I will be releasing my first significant bit of code shortly, and for the first time I've bothered to sit down and read about all the licenses people use.
7:59:42
axion
There are sites which compare the various licenses in human readable terms. All ou really need to know is to use MIT, BSD, or similar if you want something very permissive
7:59:42
shrdlu68
SBCL is mostly public domain. Why don't more people release their code as public domain?
8:00:48
White__Flame
public domain doesn't exist in some jurisdictions, so grabbing a MIT license or something is easier and more clear & comprehensive
8:01:33
jackdaniel
shrdlu68: if you are into free software, go with gpl, if you are after open source, go with bsd ;)
8:02:32
aeth
MIT license seems to be the most common permissive license these days, including in permissively-licensed Common Lisp projects.
8:03:27
aeth
I'd go with the MIT license just for compatibility, but that's just my 2 cents, an idiom that is quite out of date with inflation.
8:04:22
aeth
Whatever you do do not use LLGPL. It is a custom license only used in the Common Lisp community. Good luck if you ever wind up in court.
8:05:02
jackdaniel
shrdlu68: gplv3 is restrictive in a sense, that it disallows mixing it with propietary software
8:06:19
aeth
The main options are MIT, BSD, GPL, and maybe LGPL (note the one L, seriously, do not use custom licenses... and that probably includes public domain dedications, if you must do public domain, use CC0)
8:08:13
jackdaniel
shrdlu68: gplv3 clarifies some terms not clarified in gplv2, and prohibits drm afaik
8:08:58
White__Flame
iirc gpl3 was created to restrict 'tivo-ization' and such loopholes aroung not actually shipping with source
8:09:54
aeth
Iirc, it's also somewhat controversial because GPLv3 is more explicitly ideological rather than just copyleft, which is why e.g. Linux isn't switching to GPLv3 even if they could (they couldn't because they don't have a CLA or a "GPLv2 or later" license)
8:10:32
shrdlu68
What I'm concered with is, if I release code as GPLv3, will the rest of the "community" benefit from it?
8:10:44
aeth
Iirc, macOS ships with the last versions of GNU software that are on GPLv2 (terribly out of date by now)
8:11:50
jdz
shrdlu68: I won't even look at the code lest I learn something and use it in my own code.
8:12:02
aeth
But, really, no one is going to be selling a proprietary fork of your desktop application made in Common Lisp in the year 2017 (or in the year 2027) so the GPL doesn't really make a difference imo, even there.
8:12:34
aeth
Proprietary companies don't even make desktop applications anymore. They just wrap a whole web browser and call it desktop.
8:13:17
jackdaniel
shrdlu68: if you are after widest adoption, go with BSD/MIT/ISC, if you are after empowering users (i.e by supporting free software movement), go after GPL
8:14:06
aeth
shrdlu68: You'd have to ask Xach to be sure, but afaik, the most popular license in the Lisp ecosystem right now is the MIT license. So if you wanted maximum compatibility, you should go with the most popular license. If you really don't want a closed source fork at the expense of not really having many users, use the GPL.
8:15:21
jdz
I'm not also sure what's the deal with contributing to GPL code -- AFAIK FSF requires a signed paper to actually be able to accept "significant" contributions.
8:16:13
aeth
FSF wants copyright assignment. Some other organizations that use the GPL also do this, but probably for less noble reasons than the FSF.
8:16:26
jackdaniel
jdz: GPL is a license, GNU is the operating system. GNU software requires assigning rights to FSF by contributors
8:17:09
aeth
If you don't have copyright assignment, it's harder to sue for GPL violations (the main reason FSF wants it) and it's also harder to relicense if there's an issue with the license (which is why it's basically impossible for Linux to go to GPLv3)
8:19:06
shrdlu68
Wait, my code depends on a bunch of other lisp projects, most notably ironclad, babel, and usocket.
8:20:20
shrdlu68
What restrictions does this impose on the license I can choose (the fact that I have dependencies ^)
8:20:58
aeth
shrdlu68: licenses like the GPL are universal receivers, licenses like the MIT license (which usocket and babel use) are universal donors... practically speaking. The GPL has some licenses it isn't compatible with, but they're usually very unpopular (in part because of that reason) and the MIT license does have *some* restrictions, just not many.
8:21:16
White__Flame
yeah, I'd be quite interested to try it. TLS libs have been a nightmare to set up for a more casual user, so if things like key generation/conversion/registration are part of easy repl utilities, that'd be wonderful
8:21:30
White__Flame
and a new lib generally means it doesn't have all the whizbangies around config that mature implementations do
8:23:12
aeth
just never (declare (optimize (speed 3) (safety 0)) because then you have basically no security advantage over C
8:23:15
jackdaniel
shrdlu68: you may give any license to your software, resulting license of a combined software though depends on dependencies
8:25:53
shrdlu68
One other reason I'm favoring GPLv3 is because no other TLS implementation adopts it. It might prove useful to someone that way.
8:59:14
minion
andrzejku: have a look at PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
8:59:44
beach
shrdlu68: I would love to use some version of the GPL for my projects. Unfortunately, many Common Lisp people are against it. I suppose some of them would just like to use the software and not distribute modifications. Others just really dislike anything that has to do with Stallman and the FSF. For that reason I am using a 2-clause BSD license these days.
9:00:10
beach
andrzejku: That doesn't concern us since Common Lisp is not a "functional language" in that sense.
9:00:27
flip214
beach: AFAIU the problem with GPL (as opposed to LLGPL) is that they can't get money for standalone binaries.
9:01:19
jackdaniel
andrzejku: then here's your answer: it's not ;) question whenever its better than other languages is debatable and prone to opinions
9:03:41
shrdlu68
I guess the FSF raises issues that are too profound for most people when all they want is to share some code.
9:03:46
jackdaniel
I can see merit in that, I'm listening about all the new law proposals pushing for putting "authorized backdoors" in software, not very much encouraging for using prop binaries. but its offtopic, sorry ;)
9:09:00
jackdaniel
flip214: what kind of argument is that? "there's not point on working for change, because things are getting worse anyway (because nobody works for change)"
9:09:43
jackdaniel
or, my vote won't change *anything* – claim of 50% of society in Poland. 50% – 20 million people, if they would vote on anything, it would make a difference
9:10:01
flip214
jackdaniel: no, my point is that requiring GPL (instead of LLGPL, for example) for everything hurts the economy more than the small benefit people would have w.r.t. backdoors
9:11:24
flip214
but if someone wants the source of the software I write, I might want some more $$$ for that. (_might_, remember.)
9:12:54
White__Flame
if there are mandatory back doors, I think more users/customers will start demanding source
9:13:15
White__Flame
or maybe some sort of trusted "Consumer Reports" style service will emerge, analyzing security