freenode/lisp - IRC Chatlog
Search
9:17:21
beach
Wow, this discussion reminds me of a student I once had, who moved to Bordeaux to avoid Ada, which was taught at the university of his home town. But after I questioned him, he admitted to knowing nothing about Ada at all. Disliking object-oriented programming while not knowing about encapsulation, polymorphism, or dynamic dispatch seems very similar to me.
9:18:11
beach
charlie770: I think you need to work on your basic programming skills and basic knowledge about software development tools before you can hope to start implementing an interpreter or a compiler.
9:18:21
phoe
it's even easier if you dislike the lack of knowledge itself and then project it onto whatever
9:20:53
charlie770
beach: I don't understand oop. Maybe that's why I dislike it. Maybe also because I could get away with it(using macros).
9:21:13
phoe
the best thing is to acknowledge it and move on with life while trying to fix the ignorance to the best of one's ability, no point in dwelling on it too much
9:22:45
charlie770
beach: do you think learning object-oriented-programming will make me a better programmer?
9:23:00
beach
charlie770: If you dislike things just because you don't understand them, you will be very limited in what you can do in the future.
9:23:08
dim
yeah pgloader can be used to move from Postgres to Postgres, the main use case is to have a alternative to ALTER TABLE foo ALTER COLUMN bar TYPE bigint USING processing_function(bar); but well we didn't solve all of the concurrency issues at the moment
9:23:31
beach
charlie770: Because you will then have an informed opinion about it, and you can make choices based on knowing what you are talking about.
9:23:47
beach
charlie770: That might be to avoid object-oriented programming, but at least you then know why.
9:25:17
beach
charlie770: I don't use traditional object-oriented programming, where encapsulation and abstraction go together. I much prefer CLOS-style programming, whatever you call it, where encapsulation is handled by the package system and the abstraction is done with generic functions.
9:25:41
beach
charlie770: But then, I understand both styles, and I have made my decision based on that knowledge.
9:26:22
dim
also when all you have is object oriented as the only architecture tool, I tend to dislike those programming languages (Java is the main example I can think of)
9:27:43
beach
dim: Right. For example, in order to create an anonymous function, some languages require (or used to require) that you actually create a class with a single method in it.
9:28:25
dim
beach: same with closures being only available within a class construct in Python, I guess?
9:28:38
no-defun-allowed
(And the inspirations for the former, Erlang and Smalltalk, to some extent, allow one to produce closures.)
9:29:47
beach
I also recently realized that, in some object-oriented languages, you defeat encapsulation entirely when you make a subclass. Then it is easy to, by accident, violate the original protocol.
9:30:07
dim
a friend of mine loved closures when he taught himself Clojure (the lisp inspired language in the JVM) but always though he wasn't smart enough for OOP, I showed him a class in Python is the same thing as a closure in Clojure and he was like “wow”, I hope he know realises he's smart enough ;-)
9:31:01
no-defun-allowed
charlie770: Message passing is what most people think of when they think of object-oriented programming, where objects collaborate by sending "messages" to each other.
9:34:21
no-defun-allowed
That's not quite the same as objects calling methods on each other, as messages can also be passed around as objects, allowing one to do a few things that would be tricky otherwise, such as selectively passing on messages to another object.
10:15:22
TMA
speaking of message-passing and OOP, I want to point out the power of reification. reification is an enabler for neat things. in the same vein is reification of computation environments as invented by beach here -- enabler for nifty things
10:44:35
TMA
in a sense it enables the programmer to do something that would otherwise be restricted to the compiler/system
14:56:08
edgar-rft
SICP teaches programming in general using Scheme examples, but it's not necessarily only for Scheme or Lisp
14:57:33
jackdaniel
while they belong loosely to the same family of programming languages, they are very different (both design- and community- wise)
14:57:44
edgar-rft
clockboi: no worries, there's lots of historical quirks in Lisp, don't be afraid to ask :-)
15:02:15
phoe
if you want to, you can do all of SICP in Common Lisp; the most important difference you will encounter is FUNCALL which does not exist in Scheme but is necessary in Common Lisp
15:12:46
beach
clockboi: There are books specifically for Common Lisp, in case you already know the basics of programming in general.
15:20:25
p_l
clockboi: also, consider that the amount of scheme you're supposed to know to finish SICP is quite small
15:39:20
docl
I just did SICP 1.1 in CL, one thing I noticed was define doesn't exist, instead you have to do defun for functions. and the paren structure for that is slightly different.
15:40:15
beach
Also, using DEFUN inside a function means something different from using DEFINE to define a function inside another one in Scheme.
17:21:31
gothnbass
Tracking down a bug relating to `html-template:fill-and-print-template`. Does anybody know of a non-obvious dependency on `pwd`? It works just fine if I'm running from the parent directory of `/templates`, but breaks with a `format` error otherwise.
17:21:32
dim
I like PAIP intro chapter about Common Lisp for people who already know how to write some code
17:31:15
gothnbass
Never mind; I found it. I'm an idiot, and I hard-coded that path into TMPL_INCLUDE statements in the templates.