freenode/#lisp - IRC Chatlog
Search
11:26:17
jmercouris
LdBeth: I think your claim is unsubstantiated, if you don't know something for certain, its best to stay mum lest you spread misinformation
11:27:16
fm4d
jmercouris I am also curious about that. To me lists feels a lot like dictionaries in Python. You simply use them for nearly everything thats not complicated enough to use OOP.
11:27:26
LdBeth
jmercouris: I think at the beginning of J for C Programmer there’s a good example, C people implement a poor file scanner by hand, while in J a more efficient build in parallelized form can be used
11:30:47
jmercouris
LdBeth: I suspect there may be truth to what you say, but without evidence, it is not worth saying, or it should be phrased in a way that indicates its uncertainty
11:30:57
RemoteFox
right now I do mostly python (job, my own projects), but I am trying to build a self interpreter
11:31:24
fm4d
jmercouris Yes, you can always turn struct/dict/etc into class later, if you need to bind data with behaviour or to inherit it etc.
11:31:44
pjb
jmercouris: using anything only stunts your growth as a programmer (or anything). When you have a hammer, everything looks like nails!
11:31:58
fm4d
I've always believed that from simple to complicated is a proper pattern of development (at least for rapid prototyping and bottom-up approach)
11:32:44
fm4d
RemoteFox you should mention that 'self' is a language, 'building self interpreter' can be understood in a weird manner.
11:33:21
pjb
fm4d: yeah but actually all way are good ways: bottom-up, top-down, inside-out, outside-in. What matters, is iterative and interactive programming.
11:34:24
pjb
fm4d: mostly, programming is a discovery process, so you can progress in any direction you like or can, starting from known, and discovering the unknown. Otherwise you just use libraries.
11:34:33
fm4d
pjb: That remind me of how wonderful is SLIME, the interactive and reflective capabilities.
11:35:23
pjb
jmercouris: not necessarily. You can have an overview of each tool before going deeper and deeper in each. Since some tools must be used in combination, it's better to do it this way.
11:37:41
jmercouris
pjb: I'm not sure what is better or worse, I've done both and it is hard to tell
11:37:54
jmercouris
for Lisp I started with a very shallow view of everything, and I forgot so many things
11:38:06
jmercouris
it is only now that I am going through a textbook to actually learn the language
11:38:28
jmercouris
if I had done this from the beginning I would be "using a hammer" for everything in the start, but I feel like it would be better
11:38:43
Lauven
For those of you who have read "Structure and interpretation of computer programs" would you recomend it to someone with just couple of years of javascript experience or should I wait until I get a grasp of scheme and lisp before I dive into it and get more experience in general?
11:40:06
jackdaniel
Lauven: SICP is a great book and it is fine to read it without prior scheme / lisp experience
14:31:28
ted_wroclaw
Hi guys. Has anyone tried to build cltl2 from the latex source? I checked github and didn't find anything...
14:52:38
ted_wroclaw
I want to resize it so that it looks a little better when printed on A4 (or us letter) paper
15:04:47
beach
It looks like it is written in an old version of LaTeX and the compatibility mode can not fix it.
15:11:24
beach
ted_wroclaw: No, I was just using pslatex because there seem to be PostScript file for the pictures.
15:14:20
ted_wroclaw
Okay. I got the same error. I'm not a latex guru, but I'll see if I can find something on repairing it. I've always regretted not becoming more proficient with latex.
15:23:03
ted_wroclaw
Me neither. I usually just hack around until I get whatever I'm working on to look nice and leave it at that. Then I forget how I did it. My template document header is an enormous collection of commented out packages. Shameful, really.
18:11:41
skidd0
one of these flags allows the creation of an object by prompting for a name and other info
18:13:08
jackdaniel
normally in the terminal lines are buffered, so you need to end your prompt with a new line (this may be changed, but I don't remember the specifities - it is a terminal emulator setting)
18:17:31
skidd0
has anyone done any work with object persistence? like cl-prevalance, where the objects are serialized and use transactions for updates. Or, another question, what's a common method for saving objects to disk?
18:18:40
skidd0
see, i feel like taking my objects and converting them to sql models is unneccessary
18:21:06
phoe
You should be able to use some kind of simple object store. BKNR.DATASTORE should be a good tool for the job.
19:25:17
flip214
is there some special like *print-base* that says how many digits a float number should be printed with?
19:41:53
flip214
pjb: no, in this case I only care about the first two digits (and the exponent, if not 0)
19:58:41
flip214
pjb: sorry, I'm doing electronic engineering right now... you know, using +-20% capacitors and so on....
20:11:02
pjb
flip214: perhaps it's possible to do something with the pretty printer. Otherwise, wrap your floats in a clos object, and define a print-object method for them.
20:11:36
Bike
right want to do that anyway, so you can have components with the same nominal value but different tolerqances
20:21:50
pjb
flip214: (set-pprint-dispatch (quote float) (lambda (stream value) (format stream "~,2F" value))); seems to work, for: (let ((*print-pretty* t)) (print (list pi 0.12000001d0 0.12999999d0)))
20:28:33
didi
We should decide if we want to deprecate structs or not. /me votes for no, but he is not very bright
20:34:19
buffergn0me
Structs are really useful apart from generic functions and objects. For example with the :type options to generate accessors for lists/vectors returned by various things
20:37:18
Bike
if you give defstruct :type, it mostly just defines a bunch of functions to do (aref x 0) or whatever.
20:37:27
buffergn0me
Yup. See the :type option 2/3rds of the way down the page http://www.lispworks.com/documentation/lw70/CLHS/Body/m_defstr.htm
21:37:55
aeth
:type in defstruct is a lot more widely respected than :type in defclass, and is probably more optimizable where it is respected