freenode/#lisp - IRC Chatlog
Search
8:48:14
makomo
elderK: one professor who does pretty much all of his stuff in java said that lisp is a relic of the past, when talking with a collegue of mine who mentioned lisp to him
8:52:18
makomo
hajovonta: that professor teaches design patterns btw, which is really just a disguise for java
8:56:24
verisimilitude
Koans are good for communicating very little, but in a very condescending manner.
8:57:58
verisimilitude
``This C programmer is good because he's a C programmer. He meets a higher level programmer who tells him that undefined behavior is bad. The C programmer farts and the other programmer realizes the error of his ways. The other programmer then commits suicide for daring to transgress against the ghost of Dennis Ritchie.''
8:58:14
verisimilitude
This is more colorful, but communicates the general message behind most C koans I've seen.
9:01:59
hajovonta
and it's a shame because those other environments impose limits on what they can do
9:02:37
verisimilitude
The modern languages say: ``Here, put on these cool shackles and be hip like me.''
9:02:50
makomo
one of the more important things when arguing about languages is to have examples ready imo
9:03:06
verisimilitude
``Everyone knows the cool way to extend a language is to let the cabal do it for you; if they don't, then you don't really need it.''
9:03:09
makomo
and also to get past the hate for whichever language you have and take time to understand how exactly it differs from lisp
9:04:49
makomo
that's why you have to be the one who will think of them and show them when arguing for lisp
9:06:17
makomo
i remember a talk by bjarne stroustrup once where someone asked "how do you get the void* guy to switch over to modern c++"
9:06:41
hajovonta
I have a colleague who tries to write a math expression parser that could simplify the expressions (in python)
9:07:13
hajovonta
I showed him that when writing in lisp, you instantly work in the AST and it's easy to do transformations
9:08:26
makomo
so getting into lisp is like stepping into a space shuttle if you've never used tools like emacs
9:08:43
elderK
I don't know. To me, I don't really care what language they use to teach students. What I care about is that the standards of teachign seem to have dropped, the enthusiasm is lacking and the students seem to be apathetic to what they are learning about.
9:09:16
makomo
elderK: i agree, but it seems that java is somehow connected to that whole problem imo
9:09:34
elderK
There is this one friend that got excited, a new coder, but he went away and spent a week hacking up something based on that idea in Java.
9:10:09
elderK
Instead, I see people say "I don't need to learn about trees and ADTs because it's all done and if It wasn't, someone else in a company would do it for me."
9:10:18
elderK
"I don't need to learn about graphics and stuff because Unity does it all and I'm a gamedev."
9:11:15
elderK
I don't care that they don't care about the low-level. But they should have passion about what htey are doing! I mean, Unity will not let them express everything.
9:11:20
makomo
i mean, you surely aren't going to hate them or similar, but seeing how apathetic they are is just lame
9:12:30
elderK
We're talking 19-24 year olds. I'm 30. When I was their age, I had already written my first kernel and a set of drivers and the like. When I was 19, I lived and breathed it all.
9:13:45
elderK
People have to realize, the more vantage points you have to examine a problem, the more solutions there are. The more freedom you have. And the potential to build a much greater system, a much... more elegant system. In any language.
9:14:10
makomo
i've also told them about Shinmera's (thanks!) little game engine and how he made a presentation in it
9:14:33
makomo
and the presentation is fully interactive, the teapot is spinning right in front of you
9:15:07
makomo
elderK: yup, but they can't do that until they learn more languages. they don't see how important it is at that level.
9:15:21
makomo
once they learn more and more languages and compare their features, they'll be able to see the "essence" of programming
9:16:13
makomo
and that's why concrete examples/comparisons, when arguing for any language, is essential i think
9:16:13
elderK
makomo: I don't know. I appreciated the variety of things even before I learned of Lisp, even when I used a single language only. That may, however, be due to my focus on kernels and the like.
9:16:55
makomo
elderK: yeah, some people just have the natural tendency to explore and see many different ways how to do something
9:17:56
makomo
one thing i don't like is how modern languages keep reinventing the wheel with regards to naming stuff
9:18:41
makomo
sealed classes (really just variants (the adt) from what i've understood, also called enums in rust)
9:18:58
makomo
extension methods (just a special name for a certain type of normal functions, but i can get past this one i guess)
9:21:02
hajovonta
when I learnt from Let over lambda that objects are not fundamental, I felt something similar
9:24:46
makomo
but if you take a look at a macro system like lisp, you will instantly see the problems
9:25:32
makomo
the fear that came through fearmongering will disappear, because now you'll know what exactly is the difference
9:25:42
hajovonta
yes, because you have knowledge about it. But the other guy has something else in his mind about macros
9:26:07
hajovonta
it's unfortunate that the same word is used for these completely different concepts
9:26:10
makomo
now this might or might not always be possible, but at least describe to him what the gist is
9:26:51
makomo
another very interesting thing is that, once you see what lisp can do, the difference between compile-time and run-time is basically non-existent
9:28:13
hajovonta
makomo: when I showed how an expression is evaluated, I instantly created an expression that lisp is an interpreted language.
9:28:44
hajovonta
and then we unconsciously jumped to the conclusion that lisp is slow because it's interpreted
9:29:33
makomo
it's just something that languages like C/C++ can't do, unless they write a compiler on the side to do it
9:29:52
makomo
(i'm referring to implementing regexes as VMs and then compiling that bytecode to native code)
9:30:46
makomo
i guess, but you have to be ready to tell them they're wrong so that they won't get the wrong picture about lisp :-)
9:31:22
hajovonta
well I usually just point out that their code in C++ does much less than mine in Lisp
9:32:11
makomo
hajovonta: also showing them the example from PCL is pretty nice, how a generic + operation can be compiled into just 3-4 instructions with proper optimizations
9:34:02
hajovonta
jack_rabbit: then I just say, aha, do you have the overflow thing? You must include an overflow protection to your C++ program
9:34:26
makomo
which is a macro which binds the symbols you give it to the captured groups of the regex
9:34:40
hajovonta
and then: do you check and change type when it's too small to accomodate your number?
9:35:20
jack_rabbit
hajovonta, Yes, having unbounded ints is a great leisure in CL. I'm very grateful to have them. :)
9:35:23
makomo
hajovonta: i've avoided the whole bignum thing most of the time because it's not that special imo. python has bignums too for example
9:36:00
jack_rabbit
makomo, are python's ints big by default, though? I thought it was a special type.
9:36:20
makomo
jack_rabbit: i think so? i remember computing huge fibonacci numbers and everything was fine
9:37:36
hajovonta
last time I asked my colleague, what does he think, "5.0" is an integer or a floating-point number?
9:40:26
hajovonta
I just used the example to show the difference between a number representation and the actual number
9:42:05
jack_rabbit
hajovonta, Yep. But the numbers do have different types. It just allows us to compare them.
9:42:18
makomo
*another* great thing are conditions, i.e. "resumable exceptions" as they're called in other circles
9:42:56
makomo
most of the people who i mention CLOS to can't believe how a method can not belong to a class
9:43:12
jack_rabbit
makomo, yeah, restarts are another thing I consistently miss when not writing CL.
9:44:03
jack_rabbit
makomo, I rarely use them, but when I do, they're indespensible. That's true of many tools CL provides.
9:45:48
jack_rabbit
Yeah. I chuckle when someone tells me about their favorite lanugage's "new feature" and how genius it is.
9:46:41
makomo
i like to refer to lisp in general as the knowledge of the ancients, the ancient scrolls
9:46:54
hajovonta
and when you say "I implemented this new feature into my language", that's completely alien to them
9:46:54
makomo
most people can't believe when i tell them i'm reading/learning about some language that was made 60 years ago
9:47:29
makomo
in general i think that the it industry doesn't have very much appreciation for the past
9:48:27
makomo
yep, and lisp has taught me to get rid of this feeling and appreciate the old papers, the old articles, the old code
9:51:10
TMA
well, most code is crap (because it is written by humans), the practitioners are (unconsiously) aware of that. The desire to rewrite is (a) there are bugs for sure, it is easier to rewrite than to fix (b) at least it will somewhat work for my use case
9:52:07
makomo
TMA: sometimes it makes sense, i agree. but for example when you mention Emacs to most people, they all go "eww, why would you use such an old editor?? use something modern like intellij, look at all of the cool features i has!"
9:52:48
makomo
i loved the moment a few days ago where, after all of the buildup from my CL stories, i showed the guy that Emacs itself is just a huge lisp system
9:55:13
makomo
i use spacemacs which some consider to be bloated, but i like the ease of configuration (when it works) + the default vim keybinds
9:57:30
makomo
(it marries eclipse and emacs, basically runs eclipse in the background in headless mode and provides completions for emacs)
9:58:22
makomo
most of the stuff that another friend was telling me about, how cool all of these features are in intellij and how eclipse doens't have them, was plain wrong
9:58:33
makomo
eclipse had all of them, he just never even tried to use them because intellij is new and better
9:58:47
TMA
makomo: it is a natural feeling, most people consider themselves young _and_ better than anyone else (it is a well established fact of human psychology). they just mistake their own personal bias/delusions with natural laws
10:00:48
jack_rabbit
I began writing some tools for Java editing in emacs, but got frustrated, and decided just not to write Java anymore.
10:01:01
TMA
when editing java, I routinely use all three big ides -- eclipse, netbeans and intellij.
10:02:11
jack_rabbit
makomo, I gave eclim a fair shot, but found it unintuitive. It seemed to get in the way more than it was helpful.
10:03:29
jack_rabbit
makomo, It seemed inconsistent. There were also some features that seemed to require a fixed window layout. I'm not sure how they hacked emacs to behave that way, but it was very strange.
10:04:13
jack_rabbit
makomo, Basically instead of providing tools and such to use with my regular work flow, it seemed to require me to conform to its rigid rules.
10:05:56
jack_rabbit
I ended up just going back to my sed and grep scripts for finding classes and stuff. :)
10:06:47
makomo
in conclusion, i consider CL/Lisp to be one of the most important discoveries i've made
10:07:08
makomo
it has opened my eyes to many things, and allowed me to see the essence of many language features
10:08:51
jack_rabbit
I have written a couple of import-related emacs functions for Java: https://gist.github.com/knusbaum/a0934a7a6de986420e683704a38bf58f
10:10:35
makomo
i have to learn more of the emacs api to be able to do anything non-trivial with emacs
10:11:06
makomo
learning emacs lisp is easy. it's the emacs ideas/internals/apis you need to really learn
10:12:16
makomo
sometimes it's a bit confusing, even more so since i'm using spacemacs and then some stuff doens't really work as described
10:13:06
makomo
it allowed me to get a quick start on emacs and make me feel at home with its vim keybinds
10:13:37
makomo
the greatest thing about vim are its keybinds and the whole concept of modal editing imo
10:14:20
makomo
so i'm glad something like spacemacs exists, and it's good to introduce newbies too because of the familiar vim keybinds/modes
10:15:02
makomo
now when i know more about lisp, i'm considering going back to raw emacs and trying to do it myself, but we'll see about that
10:16:13
jack_rabbit
I've never found it that useful. I just hold down Ctrl and issue commands. I guess it's sort of like a rapid mode switch.
10:17:09
makomo
when you start out you're in "normal mode", to enter insert mode you just press "i", and then "ESC" to go back to normal mode
10:33:34
TMA
the problem with the default emacs keybinding for me is my supershort pinky finger. that and the left ctrl being too far, the right too awkwardly positioned.
10:57:05
dim
is it possible to build SBCL in a way that the sbcl binary then contains extra .so dependencies, such as openssl.so or sqlite.so?
11:03:31
dim
yeah, to avoid having to dlopen from the image when it's possible that the symbol found at dlopen won't match the symbols found at image creation time
11:04:38
dim
now that I had to write this, I wonder if having the .so in the binary header rather than used with dlopen() is going to have an impact on the problem...
11:05:51
p_l
dim: you might want to write a hook before save-lisp-and-die, which dumps a list of shared objects, copies them to where the image is to be saved, and rewrites the list to contain image-relative paths
13:17:23
pierpal
ebrasca: http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/tools/xref/0.html
14:30:35
puchacz
I know they can have names, but names are not unique and they exist only for threads I create.
14:33:32
puchacz
I am not sure about semantics of special variables; (let ((*special-var* (random-string))) ....) for example ?
14:36:06
puchacz
shka: yes, it will work. however I was hoping I could have a mechanism that works for all threads I can encounter, not only these I create or control somehow
14:36:43
puchacz
for truly ThreadLocal variables, I could just (unless (threadlocal :name) (setf (threadlocal :name) (gensym))
14:39:13
shka
anyway, i don't run into thread issues, mostly because i am really good at avoiding explicit synchronization :P
14:40:54
shka
everybody is, just don't try to be smart, keep things simple and separated and you are fine
14:42:04
shka
so share very little between threads (mutable stuff), and explicitly mark those things
17:28:13
puchacz
hi, in unwind-protect, will cleanup body be executed even if return-from the whole function?
18:08:21
makomo
i would like to use conses as keys into my hashtable but i would like a special equality test for them
18:32:31
sjl
If you want to use vectors as keys based on their contents, you need to use #'equalp, but that will also make strings ignore case
18:35:37
shka_
sjl: actually, if you want to be so anal about sxhash, standard allows returning same number for every string as well
18:37:44
shka_
there is plenty of use cases for custom hashtables, but it is not worth to use it if you can simply use equal
18:38:43
makomo
i mean, it would definitely be overkill, but using the chance to explore other options is always nice
19:48:19
Baggers
doesthiswork: a bit quiet here today, maybe due to ELS. If you have time it could be worth reporting this on the mailing list.