freenode/#lisp - IRC Chatlog
Search
6:47:16
fouric
Quicklisp is refusing to load any of my local projects, complaining that it can't locate them.
7:51:18
no-defun-allowed
also, checked you can cd into the symlinked directory? i'm pretty bad at ln and i get symlinks which go nowhere
8:01:59
no-defun-allowed
also, is it a nickname? i'm looking for the mapping that makes COMMON-LISP-USER into CL-USER i suppose
8:10:36
White_Flame
package local nicknames aren't in the standard. Standard nicknames are still global
10:44:21
schweers
Given (defvar *foo* ... ), will (multiple-value-bind (*foo*) ... ) do the same as let?
10:45:26
schweers
The hyperspec says that the variable binding created are exical unless special declarations are specified. I’m not sure if that covers DEFVAR, or if I need extra declarations inside the M-V-B.
10:47:47
schweers
I know, I’m just a little confused by the wording in the hyperspec, as to whether that is sufficient.
10:47:48
jackdaniel
so (defvar *foo* 3) (defun bar (*foo*) (call-something-else)) (bar 14) ; ←← bar will bind variable *foo* to 14
10:49:26
jackdaniel
you can, when defvar / defparameter the compiler "must recognize the name has been proclaimed special"
10:53:21
jackdaniel
estabilishing dynamic context saves you from a nutty api with gazzilion arguments carries just to pass to next function
10:55:20
beach
So many things are nutty. Multiple inheritance, multiple dispatch, first-class packages, first-class symbols, closures. You name it.
10:57:38
jackdaniel
imo it is the way someone uses tools in the box defines whenever code is nutty or not (not the tools themself)
10:58:53
Odin-
jackdaniel: Well, sure. But I've also found it causes a bit of friction when you're dealing with other languages and you're used to having all these (crazy) options that suddenly just aren't there. :)
11:00:16
jackdaniel
sure, dropping to use assembler after you are used to have functions may be tedious, same goes for dropping to C after you are used to closures and when dropping to CL when you are used to monads/hygienic macros/whatever common lisp doesn't seem to have
11:46:02
atgreen
good morning.. I'm looking for something like mapcar that only accumulates non-null results - like a filter. Is there something in the language already for that?
11:49:51
beach
Well, if you are not going to process your element, then (remove nil ...) works as otwieracz suggested.
11:54:22
atgreen
beach: I guess I wasn't clear... I should have said "but only" instead of "that only"?
12:10:10
flip214
Can I ask CFFI whether it found a function (during runtime, because of save/load image!), to provide some fallback?
12:25:21
jackdaniel
you can't also depend on a specific condition across implementation (it simply calls underlying implementation thing)
12:27:42
ogamita
Yes, you can look at cffi::%foreign-funcall to see how it finds the function. It's implementation-dependant.
12:54:34
jackdaniel
ANSI C defines only short int, int, long int and long long afair, and how many bits are assigned to each is platform dependent
12:56:13
jackdaniel
flip214: when I was poking cffi api I've found examples tests/ directory very useful
12:56:28
Odin-
jackdaniel: Correct me if I'm wrong, but I do believe ISO 9899 superseded ANSI X3.159...
12:58:04
jackdaniel
c99 has partial support in many compilers (i.e tcc aka tiny c compiler doesn't support complex float type)
12:58:36
Odin-
jackdaniel: That doesn't change the fact that there is a standard set of integer types.
12:58:37
jackdaniel
so we may declare that all that is obsolete and stop caring, but that would be greatly impractical approach
12:59:01
ogamita
There's stdint.h with int32_t uint32_t int_least32_t uint_least32_t int_fast32_t uint_fast32_t intmax_t uintmax_t.
12:59:05
jackdaniel
well, C standard has now for multiprocessing too, yet I still prefer to depend on pthreads
13:00:12
jackdaniel
I doubt people when confronted with wording "standard C" will assume C99 or C11 (C89 is much more probable)
13:00:50
ogamita
So people basically, still use programming languages that were standardized before they were born. They should use ANSI CL…
13:00:52
jackdaniel
at best your wording was sloppy, at worst you are refusing to stand being corrected. not that I care ,p
13:15:30
jackdaniel
neirac: if you pursue simple charts, then https://common-lisp.net/project/adw-charting/ is a very good library to have that
13:17:29
jackdaniel
if you want a toolbox from which you could build whichever chart you desire looking at McCLIM may be a good idea
13:17:53
neirac
jackdaniel awesome lib!, I'll use it and settle for bar charts. I'll check McCLIM out of curiosity
13:18:57
jackdaniel
nb: that would be a nice project to write a library explicitly for plotting in McCLIM (and not overly hard)
13:25:26
neirac
beach McCLIM looks pretty good, I saw also climacs is that discontinued? not able to reach cvs
13:26:15
beach
neirac: But I am not working on (first) Climacs anymore. The plan is for Second Climacs, a significant improvement.
13:33:07
neirac
jackdaniel have you used adw-charting ? I'm trying some examples from there but fails. I'm using quicklisp for loading :adw-charting-google
13:34:57
neirac
I'm trying 4.2.2 but fails with : Undefined function :PIE called with arguments (300 200) . [Condition of type CCL::UNDEFINED-FUNCTION-CALL]
13:41:45
neirac
jackdaniel I'm doing something wrong then, the vecto backend gives me the same error. (ql:quickload '(:cffi :dexador :plump :lquery :lparallel :str :adw-charting-vecto)) it seems to be loading adw but trying the vecto example fails.
13:44:53
jackdaniel
neirac: now when I think about it there could be some api issues, I think I've fixed them as they were encountered looking at the source code
14:03:04
neirac
beach can I export the plot to png ?. I'll check clim vgplot examples are not working
14:17:31
jackdaniel
(in fact, by PNG I mean whole set of supported raster image formats covered by opticl)
14:18:18
jackdaniel
some features are not implemented in all backends (i.e raster has transparency, while two others do not)
14:20:07
flip214
that said, you can eg. cut a rectangle out of another rectangle before painting it, ie. build masks as well
14:22:14
jackdaniel
also what flip214 says, you may first gather output records, compose them on the renderer side and after that create a resulting pdf
15:45:32
esper0s
iam currently going through the book SICP which uses the mit-scheme lisp dialect. I want to find the best way to run mit-scheme through emacs, would that be installing mit-sheme and then as suggested by the manual the XSCHEME library?
15:46:33
shka__
although this may be missleading, this channel is dedicated to the common lisp specificly
16:03:36
beach
I also often hear that the #scheme channel is very quiet, so if you need help, you are better of needing help with Common Lisp than with Scheme.
16:09:35
beach
esper0s: About the differences, modern Common Lisp uses object-oriented programming CLOS-style a lot, and there is nothing equivalent in Scheme, so the idiomatic programming style is very different in the two languages.
16:16:44
heisig
esper0s: I think Geiser (http://www.nongnu.org/geiser/) is quite nice for Scheme programming on Emacs. But, as beach hinted, you should also give Common Lisp a try :)
16:18:08
esper0s
thank you all for your help, i try to keep the learning scope narrow because it is big already as it is, i do plan on learning lisp in general but you gotta crawl before you walk :) thank you all again
16:19:04
ogamita
esper0s: the advantage of CL is that all implementations implement the same CL language. Not so true with scheme.
16:19:52
ogamita
I could not learn scheme beause each time it was with a different implementation, a different language. Once I tried CL, and next time it was the same language, even if the implementation changed. So I could make progress with CL.
16:25:10
jackdaniel
I would go with gnuplot bindings instead of McCLIM. While hacking something with it is fairly easy it requires some initial work. also getting chart things like axis, legend, nice colors etc will take more than a few minutes to implement
16:26:14
jackdaniel
but if you want to try McCLIM join #clim, I'm sure you'll get any help you need to hack your way through
16:41:03
neirac
ogamita, yes I already have gnuplot installed, vgplot works but only the first plot after that it starts failing.
17:01:30
beach
jackdaniel: I am looking at the size of some parts of ECL and Clasp. It looks like almost half the source lines of C code in ECL consist of Unicode stuff. :)
17:02:12
beach
jackdaniel: Does it seem right to you that, excluding Unicode stuff, ECL has around 170kLOC of C?
17:10:10
jackdaniel
yes. libgc is boehm. ecl had its own gc (written in C) and the module had 1200 LOC
17:10:43
jackdaniel
but it was removed around 2007 I think (I have a very vague plans to resurrect it)
17:49:30
francogrex
hi i would like an 'elegant' concise piece of code that allows me to read the last row in a flat file with over a million rows (using i suppose readline and random access file-position)... any ideas?
17:51:39
Xach
because the most elegant is to set a thing to the result of reading a line and when the file is at its end, return that thing.
17:52:29
Xach
francogrex: if i were doing it, and i wanted it to be a little faster, i would read a big binary chunk from the end and scan the chunk for the end-of-line markers i want, then convert the binary data between markers to a string.