freenode/#lisp - IRC Chatlog
Search
21:58:23
akoana
Fare: (and all who responded) thank you. I understand, got similar feelings with python after trying to do some serious work with it. Confirming I'm not alone with my thoughts about it:)
21:58:43
p_l
Fare: I remember people laying into Ruby for Bundler. Except Python distribution tools make Ruby look like polished gem (pun intended)
21:59:10
Fare
but what do you expect in a language that doesn't have macros so you could write your own OOP
21:59:56
p_l
cause I haven't really worked in Python with classes since around beta releases of Py3k
22:00:08
stylewarning
i remember trying to write a function to tee a stream in python, like I wanted to do something like s = tee(stdout, logger) and write to s; it turns out you have to go copy paste some random stream class on stack overflow (lol duck typing) hoping it has the needed methods, because they're not clearly documented anywhere
22:00:27
Fare
and then the incompetent decisions made while it was a toy are baked into all production software.
22:00:53
Fare
right now I'm using my own object system in Gerbil, instead of Gerbil's builtin object system. No problem, thanks to macros.
22:01:29
Fare
And while it *is* a (nice) toy, there is no pretense and no need to cast it in stone as everyone's only allowed object system for decades to come when using the language.
22:02:18
Fare
paule32: what's wrong is you failed to describe your expectations and how the discrepancy between expectations and reality
22:04:45
drmeister
Anywho - I get a pass on using Python to write a gdb/lldb extension because I'm developing a Common Lisp implementation to avoid using Python in the rest of my life.
22:05:26
p_l
drmeister: you have my honest condolences that you had to deal with it, and well wishes for your work :)
22:06:32
drmeister
I wish I could convince my colleagues though. They think the height of scientific software development is to develop a Python bindings for Fortan code.
8:22:33
remexre
haven't found anything googling around, but figured I'd ask here before writing my own / deciding not to support unicode
8:35:12
remexre
uh, just assuming all characters are one column wide and leaving a comment, "stick to ascii or implement uax11"
9:14:21
pve
Good morning! A terminology question: is it correct to say that a cons is a "persistent data structure", whereas something like a hash table (at least in CL) is not?
9:16:26
flip214
or do you mean that the in-memory layout is fixed for a CONS cell, but a hash table can change in size?
9:17:09
phoe
if it's https://en.wikipedia.org/wiki/Persistent_data_structure then neither conses nor hash tables in CL are like that
9:18:53
phoe
you can treat both of them as functional data structures which means not mutating them; this means consing up new lists and sharing structure wherever possible, and making new hash tables instead of modifying old ones
9:18:56
pve
yeah, I was looking for a name to distinguish between those kinds of data structures, which at least to me, seem different in how they are usually used
9:21:34
phoe
in Lisp, it's more of a contextual question, especially since conses are CDTs and not ADTs
9:21:49
pve
ok, suppose we don't mutate conses, would "functional data structure" be the correct term?
9:26:46
pve
I'm looking at https://en.wikipedia.org/wiki/Persistent_data_structure and also https://en.wikipedia.org/wiki/Purely_functional_data_structure
9:28:33
phoe
a singly linked list is not such a structure because the result of (CDR '(1 2 3)) does not refer to (1 2 3) anywhere
9:33:51
phoe
OK, "preserve" means a different thing in this context; it doesn't mean explicitly refering to them, it means that the previous values are unchanged
9:38:59
phoe
every purely functional data structure is persistent, but is it true that every persistent data structure is also purely functional?
9:45:09
treflip
Persistent data structures may be implemented in imperative style. There is a great book "Purely Functional Data Structures" by Chris Okasaki, it has a clear explanation of these things in its first chapter IIRC.
9:45:27
sm2n
it's a bit odd because these categories kind of cut across both implementation/interface
9:46:33
sm2n
purely functional is a property of the interface, in that the interface doesn't mutate its arguments
9:46:51
sm2n
persistent is basically an optimization, where shared structure is used wherever possible
9:49:56
treflip
In his book Okasaki divides data structures into persistent and ephemeral, meaning that persistent data structures kinda provide access to their previous states, and ephemeral don't.
9:53:35
pve
treflip: you mean that when you add something to a red-black tree, you get a new tree back?
9:56:21
beach
If you can't access the old three, there is no great difference between a functional an imperative data structure.
9:57:20
beach
Imperative: (insert <thing> <tree>) Functional: (let ((tree (insert <thing> <tree>))))