freenode/#lisp - IRC Chatlog
Search
19:27:40
pjb
For example, if you were able to say that you wanted to write in your source code the list of words and numbers, and have it magically used to fill a hash-table so that you can query the words or the numbers, then you would have just to write that in lisp instead of English and have your program done.
19:28:50
pjb
(defun magically-fil-hash-table (table pairs) (loop for (a b) on pairs by (function cddr) while a do (setf (gethash a table) b (gethash b table a))))
19:54:03
MrSleepy
I am looking for book recommendations I have already read "practical common lisp" and "land of lisp" I want to get even better and learn the language even deeper. Can anybody recommend me another book? If this is the wrong place to ask just lemme know where I should ask please.
20:11:18
pjb
Sorry, I don't see any documentation there, only violet buttons on some strange web page.
20:17:36
pjb
Yes, but it is amongst the systems that can't put the right spacing before and after lists…
20:24:17
pjb
Revise it and check for syntactical errors susch as this @b (Side Effects) (I assume you don't want the space after @b?)
20:34:38
pjb
This doesn't correspond to any standard lisp literal object. Implementations may interpret as something specific to the implementation. (But none is known to do so, they all signal an error).
20:36:51
pjb
paule32: and when you look at a brick, you could also instead look at the set of atoms composing this brick. And why not even the set of quarks composing the atoms composing the brick!
20:37:38
pjb
The thing that is surprising is that in lisp, we let the abstraction layer leak, so we may pun.
20:38:38
pjb
(cadr (list 1 2 3)) is an example of such punning. It should be (second (list 1 2 3)) or (cadr (cons 1 (cons 2 (cons 3 nil)))) to stay consistent.
20:40:57
shka_
pjb: one more thing, aside from my poor English, do you consider this documentation to be overall useful, would you add something or put additional conventions?
20:41:08
pjb
If you use lists of lists: ((a 1) (b 2) (c 3)) then using (cadar lol) instead of (second (first lol)) is such punning. It may be more efficient (or not, a modern compiler would generate exactly the same code). But the second matches beter the abstraction level of lists.
20:42:12
pjb
shka_: when there are too many typoes or other low-level errors like it has, I'm distracted, and cannot read the documentation. Correct it, and try again later. (But I won't be able to concentrate on it now, perhaps somebody else?).
20:42:55
paule32
may be i realize it wrong, but some things modernizations of same old code, so (list "w" . 1) seems the equal/same as ("w" . 1) <-- here without the (list
20:52:05
aeth
One should learn Latin, French, Spanish, Portuguese, Italian, Romanian, etc. It's the road to impressive multilingualism. No one needs to know that they're so similar.
20:53:42
aeth
It's like knowing Lisp Machine Lisp, Common Lisp, several Schemes, Racket, etc. Close enough that you can just focus on learning the differences.
21:03:30
whoman
one day i was curious to map out programming languages by their most closest natural languages
21:04:09
aeth
Scheme is probably Spanish, with each Scheme being a different country's local dialect.
21:06:17
aeth
No, elisp is liturgical Latin. A relic from a past era, but in its modern form heavily influenced by Italian (i.e. Common Lisp)
21:08:52
aeth
Haskell is probably a Germanic language, since ML is somewhat related to Lisp and Haskell is in that family. (Here, Romance is the Lisp family and Germanic is I guess the ML family)
21:11:23
aeth
whoman: Romance languages are like French, Italian, Spanish, Portuguese, etc. Germanic languages are like German, Swedish, Danish, Dutch, etc. English is a Germanic language with a ton of Romance language vocabulary.
21:12:17
paule32
give it a possibility to get the name that the user type in directly from the hash table?
21:14:22
whoman
aeth, oohhh, i see! i thought it was all bunched up into the same =) is russian and polish and slavik on a different 'category'?
21:15:39
aeth
whoman: Most European languages are distantly related, coming from Proto-Indo-European. Slavic (or is it Balto-Slavic?) is the third big group in Europe. There are more in Asia, too.
21:17:03
aeth
whoman: So in this analogy, Lisp 1.5 is like Latin because it's the dead language that predates all of the Lisp language family, just like Latin comes before the Romance languages.
21:21:01
aeth
whoman: In this analogy, the languages related to C are probably the Sino-Tibetan languages or something. (This includes the Chinese languages.) Very popular, but not related to Lisp.
21:56:41
Bicyclidine
string= operates on "string designators". T is a symbol, but can be used as a shortcut for the string "T".
21:58:25
aeth
They are the same. CL upper-cases things by default. Unless you've changed that, they are the same. If you want the lower case form, you have to use ||
21:59:13
aeth
A lot of your questions can be avoided by trying to think up simple test cases and running them in the REPL.
22:00:51
aeth
paule32: There were two ways CL could have introduced backwards compatibility with historical Lisps without being case-insensitive. They could downcase 'FOO to 'foo or they could upcase 'foo to 'FOO. They chose the latter, which is more compatible but also more confusing.
22:01:17
aeth
Almost all of the ugliness and confusion in CL is for historical, compatibility reasons.
22:03:03
paule32
why? i search internet, show chat, test code .... and make coffee breaks that all in my spare time
22:19:18
pjb
paule32: you could break this loop by reading a good tutorial about CL, or the Hyperspec.
22:24:24
aeth
paule32's native language doesn't seem like English. Maybe there's a tutorial in whatever language paule32 speaks natively?
22:24:56
Lowl3v3l
aeth: english is the bare minimum for a programmer. you can't get around it. So better learn it now ;)
22:25:40
aeth
Fortunately, it's much easier to become literate in a language than it is to speak it. I can read French. I can't hold a conversation in French.
22:25:54
pjb
http://cliki.net/Online+Tutorial also lists tutorials and introduction university courses in French and Portuguese.
22:29:43
aeth
A Spanish speaker could probably follow along with the Portuguese tutorial much more easily than an English one.
22:34:34
aeth
There's probably enough introductory material to get by in French or German or Russian.
22:52:40
aeth
One thing that helped me when I was first starting out was retyping other people's code when going through things like tutorials and books. Some people copy and paste. This is imo bad because you don't build the muscle memory and you don't notice every small detail.
22:53:49
aeth
Written languages are much more conservative than their spoken forms because spelling reforms don't happen anywhere near as often enough as they should (especially in certain languages, like English and French).
23:36:36
edgar-rft
aeth: the problem is that for programming, the multiple amount of shitty material is written down, too
0:25:12
pookleblinky
aeth: There's a Tibetan language that has not changed its written medium through several vowel shifts over the last thousand years
0:30:21
|3b|
english has lots of perfectly reasonable spellings... problem is that they are all mixed together :p
0:30:33
whoman
translations of tibetan texts are some of the most <adjective> english i have ever had the pleasure to read in this whole life
0:31:44
|3b|
(and probably like japanese, also has mixed in a few copies of same reasonable spelling from different time periods)
2:02:16
attila_lendvai
so, I've created one more zlib binding, but this one based on c2ffi: https://github.com/attila-lendvai/hu.dwim.zlib
2:03:06
attila_lendvai
with a random tester that seems to trigger zlib bugs when run in certain configurations... :/
3:30:37
fiddlerwoaroof
I've been reading about the Nimble type inferencer for common lisp, does anyone know if the source code is available anywhere?
3:37:13
beach
We work on the HIR (High-level Intermediate Representation) of the program, and we describe type inference as a data-flow problem.
3:40:33
fiddlerwoaroof
They're working in Racket, but they essentially show how you can use a macroexpander to check types and then erase them
3:45:10
fiddlerwoaroof
I'm still a complete novice to these topics, but I have a friend who's working on a lisp with Haskell's type system implemented as a racket macro
6:37:53
vtomole
How do i generate a random bit with the probability of getting a 0 being .40 and probability of getting a 1 being 0.60?