freenode/#lisp - IRC Chatlog
Search
12:37:59
daniel1302
Yes sorry I am reading your posts only and with irssi i just wants to switch windows, but sometimes it paste CRTL+C to the terminal. Its windows terminal error :(
12:58:24
dim
personnaly I still like using RCIRC within Emacs, some use ERC, and I think there's also a McCLIM application for IRC, it's all Common Lisp!
12:59:42
dim
jackdaniel: let's propose that for newcomers and have then hack their way around as a way to learn CL with a “real project”?
13:02:13
dim
franckly, it does not look that bad at https://common-lisp.net/project/beirc/images/beirc.png
13:03:13
jackdaniel
design is raw but acceptable, by ux I've meant things like connecting to a server and such
13:03:50
dim
well they seem to have /connect, but yeah, maybe storing some preferences and auto-connect would be good; sounds easy enough for newbies though?
13:06:30
dim
I spent too much time setting up rcirc, it felt like rewriting ERC at some point... I'm not ready to trash that investment...
13:10:41
jdz
https://bitbucket.org/jdzerins/dot-emacs.d/raw/91039016b61371c9c5171561607c834399ce7a19/site-lisp/setup-irc.el
13:34:54
dim
with 1.5.2 I had to declare the type as ((vector (unsigned-byte 8) 4) data), I first did simple-array and got the error you have
13:36:13
dim
WAIT, here's what I have when using ((simple-array (unsigned-byte 8) 4) data): Derived type of DATA is (VALUES (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (* * * *)) &OPTIONAL), conflicting with its asserted type (VECTOR (UNSIGNED-BYTE 8) 4).
13:38:02
dim
https://travis-ci.org/dimitri/pgloader/jobs/531261798 --- that's a full compile of pgloader with a git clone of cl-db3, done with SBCL 1.5.2, and no complain
13:40:39
Xach
dim: does it build with ql:quickload or something? it does not look like it's using the critical :verbose t option as far as I can tell
13:48:00
Xach
dim: (simple-array (ub8) 4) is a four-dimensional array, (simple-array (ub8) (4)) is a vector of four elements.
13:49:55
dim
what about using a vector instead, so that I can then use svref? does it matter, and if yes, how to go about that?
13:51:26
scymtym
dim: if you are already using nibbles, you could use nibbles:[simple-]octet-vector. if i recall correctly, those do what you want in a less error-prone way
13:52:24
dim
it does not seem like simple-array declaration is compatible with then using svref, and I can of remember that svref can make things faster compared to aref, because it's specialized and doesn't have to deal with the many corner cases of a general array
13:52:28
jackdaniel
specialized vector is a vector with elements of known type (and implementaiton support)
13:53:36
Xach
a type-declared simple-array of unsigned-byte 8s will be better (on sbcl with its useful use of type declarations)
13:54:59
dim
scymtym: that's my whole patch, basically, repeated at several places, some of them being (8) rather than (4)
14:01:33
scymtym
out of curiosity, what was the problem with the original (vector (unsigned-byte 8) 4) declarations?
14:20:51
scymtym
Xach: the warning in the report you linked shows the rank 4 problem which the vector declaration shouldn't cause, so i'm not sure what the original problem was. but it's not important
14:21:02
scymtym
dim: https://github.com/dimitri/cl-db3/blob/master/db3.lisp#L288 should ensure that READ-SEQUENCE returns 11, otherwise NAME may only partially be populated from the stream
14:29:53
dim
yeah I keep having bug reports about it, all to add more features: more DBF variants of file formats to support, more data types, etc
14:30:47
dim
also pgloader http://somehost.tld/foo/somefile.dbf postgres://user@host/dbname and then you can actually work with the data, that's pretty good, right?
17:32:10
__oliverSwift
hey, y'all. I had a thought about the syntax of common lisp. With scheme, function declarations look like (define (foo param)) which is consistent with how a function is called, but in CL it's (defun foo (param)) which made me wonder about how the defun function actually works. Is there some documentation somewhere that explains that? or can i look at it? I feel like that would help me understand macros
17:39:13
makomo
it sets the "function cell" of the symbol that was given as the name of the function
17:39:53
makomo
the function cell is set to a function object generated by that lambda expression (which wraps the body specified within the DEFUN)
17:42:46
__oliverSwift
Thank you guys, this is really helpful. I have to admit I'm a little confused with the terminology, but this is a good starting place.
17:42:47
Bike
scheme's (define (foo ...) body...) is actually just sugar for (define foo (lambda (...) body...))
17:44:28
koenig
I really learned something because I've read SICP and understand the Scheme syntactic sugar for define, so dlowe's expression makes sense too.
17:44:44
__oliverSwift
Well, I thought the scheme syntax was doing something to interpret the (foo …) as a list of symbols. I just wondered how they were breaking the syntax to make it work.
17:45:23
makomo
there's one thing i wonder myself. is it true that just because an operator is a standard function or macro, it doesn't mean that the operator is implementable by the user?
17:46:28
Bike
__oliverSwift: it is. in scheme, "define" is a special operator (i believe), not a function, and the implementation will pull the symbols apart.
17:47:32
Bike
seems trivial, but also works for the sequence and list functions, which you basically just need control structures and car/cdr/aref for
17:48:00
makomo
right. what bugs me a little is the fact that some operators which are not special "kinda are" special
17:50:13
dlowe
makomo: what makes them different is evaluation of their arguments. Functions always evaluate their arguments from left to right at runtime. Macros don't evaluate their arguments at all and run during compile time. Special forms don't do either of these.
17:50:22
makomo
hm, so if you were to start just with the special operators (and related primitives like function objects), you could implement the rest of the system (although inefficiently)?
17:51:05
makomo
so the fact that vector, list, etc. all have their special status within an implementation is just a side thing, needed for performance reasons
17:51:39
Bike
i mean they don't need to have a special status. in beach's SICL project, lists and vectors aren't special
17:52:33
makomo
right, because he's implement CL in CL itself, so his lists are just the host's lists
17:53:10
Bike
it doesn't just use the host for everything except when building the system from source.
17:54:01
makomo
so are lists, etc. represented just like other "general instances" or what the name was
17:55:44
anamorphic
How does one tell if a pathname is a directory or file? is it (null (pathname-name pathname))?
0:10:55
gaze___
I'd be more keen to adopt it for scientific stuff if I could get a gui and some plotting functionality... is that something you've worked on?
0:13:28
gaze___
I should probably bite the bullet and just try and get qtools/commonqt working but the fact that it only builds with older Qt bugs me a little.
0:14:50
stylewarning
gaze___: We use SBCL and have been experimenting with ECL for some things. Perhaps disappointingly, we haven’t tried building a GUI for anything with Lisp, let alone done any plotting. Most folks just grab for Python/matplotlib and don’t attempt any scientific visualization with Lisp.
0:17:04
gaze___
well... the way we run our experiments (I'm also with a QC group) is we have a script that has a DSL for generating microcode for our feedback controller, and right next to it a function that processes and visualizes the data coming off the feedback controller
0:17:44
gaze___
and this has been really useful. It's nice to jump from script to script to tune or to figure out how many averages you need or go "oops I set the frequency wrong let's change that and go again"
0:19:10
gaze___
so you might have one for calibrating your separatrix for state estimation which churns the data and plots a histogram, colored by prep state, and then another that just runs a t2 experiment and knows it should fit a decaying sine-modulated exponential
0:20:07
stylewarning
gaze___: which QC group? For something like that, if it can be simple, I might try McCLIM.
0:20:32
stylewarning
If it has to be “industrial strength”, maybe use LispWorks. (But improving the OSS ecosystem is definitely desirable.)
0:22:49
stylewarning
gaze___: yeah reasonable. You should see what you can manage with McCLIM. I’d love to hear that, esp. if it’s used in the world of QC.
0:23:34
gaze___
I'm nearly done with my PhD so I likely won't be starting something new... but I'm always interested in software in science