freenode/#lisp - IRC Chatlog
Search
4:43:52
pjb
JuanDaugherty: remove taxes, overhead, shareholders' share, I'm not even sure you can pay 2 engineers with that…
4:44:38
pjb
And contractors are not cheaper than employeers. The advantage of contractor is that you don't have to pay them when you don't have work for them.
4:49:34
JuanDaugherty
which is why the major firms virtually all supplement their wage slaves with contractors
4:53:24
loke
pjb: WHat kind of buffer do you have? In the sense that if you stopped getting contracts tomorrow, how long would you last before having to look for wage-slavery?
4:53:56
JuanDaugherty
however to directly deal with free labor would be like tolerating the striking of a white man, so they virtually all deal with front firms that actually hire the contractors
4:54:06
pjb
loke: of course it's variable. From a few months to almost one year, depending on the previous project…
4:54:44
pjb
wxie: well, it was so long ago, I don't know if it would still be meaningful. Basically, at that time, there were so few programmers, that just announcing you were one, you'd get calls.
4:55:17
loke
That means I have enough buffer in cash (about a year or two on current burn-rate) to actually go ahead and do what you're doing.
4:55:40
JuanDaugherty
and even in 2018 said firms, which uniformly add nothing to the labor they resell, in general, operate at unknown markups
4:55:44
pjb
JuanDaugherty: And foremost, to deal with the details of the hiring process. Only programmers can hire programmers; customers rarely are in the programming business.
4:56:13
pjb
wxie: it happens some times. But it's not worth it, since being employed is usually being paid less…
4:57:09
pjb
JuanDaugherty: it's not the worst: you may be at the end of a long chain of subcontractors…
4:57:23
JuanDaugherty
the firms that hire contract labor are almost always either as their main line of biz or defacto in IT
4:58:25
JuanDaugherty
uh, that may be one thing that's changed somewhat, more parties than 3, 4 at most
4:58:26
pjb
For example, a bank wouldn't care hiring programmers. Instead they contract with a company to furnish the programmers. This company may be lazy and hire head hunters to find them, and so on.
4:58:54
loke
pjb: Actually, many banks have their own programmers. Some banks have more than others.
4:59:19
loke
pjb: Certain banks have more well-staffed development teams than major banking software makers.
4:59:23
pjb
Also for the bank, if they need to change the work load, or need to replace a programmer, it's simplier for them to delegate the HR problems to the contracted company.
5:00:12
pjb
Of course, a company that realize that software is the core of their know-how would want to have the development done in-house…
5:02:06
pjb
wxie: in general, you can use MIT or BSD -like license, but if you want to contribute back, you have to go thru their legal departments, and you never hear back from them.
5:05:35
pjb
wxie: if you remain the owner of the software, then you can license it as you wish. Very few (ie. none) customers are aware enough of the licensing question to care.
5:07:02
pjb
wxie: basically, if you sell a proprietary license to your software, you can sell cheap a non-exclusive license, but then you can sell copies to their competition!
5:10:24
wxie
pjb: I do not have any software to sell, and would never sell any under non-free license.
5:12:00
wxie
pjb: Maybe we can think over a time-bounded free license: if the customer owns the software, she should agree that you can publish it under free license after a certain time.
5:28:34
Xach
Shinmera: Thanks. I didn't realize that's how it works. The example in the readme didn't drive it home for me.
5:28:56
borei
read some perfomance reports in regards to matrix multiplication and CPU performance. found that what i got now is 1% of possible performance
5:29:56
beach
borei: I think you are working in a highly competitive domain. A lot of smart people with a lot of money have worked on this problem for a very long time.
5:32:05
beach
borei: I don't think such performance is reachable using only the standardized features of any language, Common Lisp included.
5:34:53
beach
Like I said, you have chosen a very competitive domain. You have a lot of reading to do if you want to compete.
5:43:13
pierpa
btw, wikipedia says the best known algorithm for matrix multiplication is O(n^2.3728639)
5:44:38
pjb
It's worth implementing it, it looks like. (/ (expt 1000 2.3728639) (expt 1000 3)) #| --> 0.013139899 |#
5:45:54
rme
IIRC, the magnitude of the constant factor is so high for the O(n^2.4) algorithm that it is totally impractical.
5:46:38
pjb
Of course, if you're doing 4x4 it's probably not worth it. But for 1000 or 1000000, I'd bet any overhead is worth it.
5:49:19
rme
Strassen's algorithm, which is O(n^2.8) IIRC, is actually worth it for relatively small matrices. But I'm remembering this from quite a while ago.
5:50:26
pierpa
I heard Prof Romani (whose algorithm was for a period of time, in the '80s the best known) talk about this topic.
5:51:16
pierpa
his opinion was that algorithms asyntotically faster than Strassen are not usable in practice
5:52:05
pjb
Well, "However, the constant coefficient hidden by the Big O notation is so large that these algorithms are only worthwhile for matrices that are too large to handle on present-day computers." so perhaps we'll have to wait a little ;-)
7:08:26
Shinmera
Xach: Yeah, I realise that should be clarified. I can also see a point to your attempted use-case, but I don't know if it would lead to more or less confusion in the long run.
8:39:37
loginoob
I don't know lisp and javascript and i heard someone in my office saying js is a lot like lisp. Is it true?if it is then how?
8:41:24
Shinmera
Okey: JS is a horrible mess of a language that was born out of a mistake. Common Lisp is a carefully crafted language designed by a committee of experienced and intelligent people.
8:41:37
beach
I don't know JavaScript, but I think I have heard that its object system is prototype based as opposed to that of Common Lisp that is class based.
8:43:10
Shinmera
People like to think that JS is like Lisp because it has closures, but almost every language nowadays has closures, so really that's not an argument.
8:46:56
loginoob
I am new to programming and i trying to learn haskell first and then i will learn lisp
8:50:18
loginoob
Code can be treated as data. Is this ex correct of former?We can add a functionality to emacs by writing lisp macros.
8:51:18
beach
loginoob: Common Lisp macros provide a mechanism for syntactic abstractions that is absent in most other languages.
8:53:51
beach
Macros are used when new syntax is desired. One can view macros as a way of programming the compiler to recognize new special forms.
8:55:38
beach
A "special form" is a form that is typically fixed in most languages, such as WHILE or FOR or IF. In other words, it has an evaluation rule that is different from that of a function call, so it can't be programmed as a function.
8:56:13
beach
In Common Lisp, macros make it possible to create new operators that have a specific evaluation rule.
8:57:29
beach
So in most languages, it would be impossible to create a new operator like for instance IFNOT that reverses the order of the THEN and ELSE branches. But in Common Lisp it is trivial to create such a thing.
8:58:30
beach
loginoob: Also, some languages such as C claim to have macros, but those macros are text transformers, making it very hard to create robust and correct macros.
8:59:32
beach
Common Lisp macros work on code as S-expressions which is how Common Lisp defines the internal representation of code.
9:19:50
aeth
Lisp has syntax made from s-expressions (with lists made from conses; macros follow directly from this), symbols, a read-eval-print-loop, garbage collection, closures, the numeric tower, etc.
9:20:29
aeth
Some things like REPLs, GC, and closures are in most languages now so they're not really notable features anymore.
9:23:18
aeth
A lot of other things are still (afaik) rare outside of Lisp, e.g. the numerical tower. https://en.wikipedia.org/wiki/Numerical_tower
9:24:12
aeth
That's what people were talking about when they said JS just has (double) floats and doesn't have rational numbers.
9:26:26
aeth
In CL (/ 4 3) is 4/3, compared with 4 / 3 producing 1 (e.g. Python 2) or 1.3333333333333333 (most scripting languages, including JavaScript)
9:33:26
loginoob
only fractions with denominator which has power of 2 can be stored finitely in binary form ?
9:34:53
Shinmera
rational numbers require finite storage. irrational numbers require infinite storage.
9:36:28
beach
Since 0.1 and 0.2 do not have exact representations in binary floating point, the sum will not be exactly 0.3.
9:37:22
beach
loginoob: When we say "rational numbers" in relation to Common Lisp, we mean numbers that are stored as such, with exact values, so that 1/3 * 3 = 1 exactly as an integer.
9:37:33
aeth
You can express any rational, as long as you're willing to store it as arbitrarily long data. e.g. (/ (expt 2 320) (1+ (expt 2 320))) produces a very long rational number in CL. Try to convert it to a double float and you'll just get 1.0d0 because it's too big for the finite representation of double float.
11:26:44
JuanDaugherty
ftr, there are a number of famous relations between two integers, so it's not just, it's them and that relation
11:44:01
Shinmera
Xach: I updated the readme with an additional note about it. Hopefully it's clearer now.
13:21:19
Shinmera
Without it it won't know which identifier to use. If it used a default one, your application would clash with others.
13:23:57
Shinmera
The idea is that you use (restore :awesome-xach-app) and someone else would use (restore :my-thingy). If you need separate configurations for separate parts of your project you can also use symbols like (restore 'awesome-xach-app:global) (restore 'awesome-xach-app:secrets) or what.
13:24:26
Colleen
Generic ubiquitous:designator-pathname https://shinmera.github.io/ubiquitous#GENERIC%20UBIQUITOUS%3ADESIGNATOR-PATHNAME
13:25:15
Shinmera
If it's a keyword it doesn't. If it's CL, it's an error. If it's anything else, the package is used as a directory name.
13:28:13
Colleen
Generic ubiquitous:restore https://shinmera.github.io/ubiquitous#GENERIC%20UBIQUITOUS%3ARESTORE
13:28:33
Xach
So it has to be called before every use of value to make sure you're in the right context?
13:29:51
Shinmera
If, in your lisp image, you're the only one using ubiquitous, you can just call RESTORE at load and executable startup time. That's all.
13:30:22
Xach
Well, you mentioned separate parts of my project - those could live in the same image, right?
13:30:57
Shinmera
Yes. In that case you would use WITH-STORAGE (keeping different storage objects in separate variables for instance) or WITH-LOCAL-STORAGE around the value calls.
13:31:52
Shinmera
But if you want to avoid excessive reloading you'd keep the storage in global variables and use that as the :storage argument to WITH-LOCAL-STORAGE
13:34:14
Shinmera
If you use with-local-storage in a library you'll be fine unless someone else purposefully uses the same designator as you.
16:07:45
Xach
Shinmera: https://gist.github.com/xach/5e623744fa4777159719619c9eabb4d5 - is that to be expected?
16:10:41
wallmonitorcable
I like what people have said about Lisp, but then when I looked at the actual syntax of some example programs, it just looks weird to me.
16:11:56
wallmonitorcable
At least these: https://en.wikipedia.org/wiki/Lisp_(programming_language)#Examples
16:11:57
beach
Vietnamese looks weird at first, but when you know it, you see that it is much simpler than most western languages.
16:13:23
beach
wallmonitorcable: If you have any questions, feel free to ask them. But there is no point in trying to convince #lisp participants that it looks weird.
16:13:26
pjb
wallmonitorcable: 1- there is no lisp (as a programming language) syntax. 2- what you see are S-exp = symbolic expression = data, not programs. 3- you can implement your own programming language syntax for lisp. Originally, M-expressions were defined for that. see: https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/m-expression/index.html
16:13:33
scymtym
Shinmera: UIOP:NATIVE-NAMESTRING may be more appropriate when presenting pathnames to users
16:13:34
jackdaniel
usually in natural language you say: "add one and two" (not "one plus two"), so s-expressions are closer to natural language eiter
16:13:59
Shinmera
scymtym: Yeah. I'll change it to just NAMESTRING though, as I don't want to depend on UIOP in Ubiquitous
16:14:40
pjb
wallmonitorcable: but: 4- since we use lisp to manipulate programs, notably in macros, it is more useful to keep the programs represented as data than as code. Also, if you cover it with some program syntax, you will have more difficulty in macros to see the correspondance between source code and the data you manipulate and generate in macros.
16:14:55
pjb
wallmonitorcable: and this is the reason why lispers keep writing data, instead of writing code.
16:15:08
Shinmera
What I'm signalling isn't severe enough for a warning, but isn't about style either, so style-warning seems inappropriate.
16:16:00
Shinmera
You might want to know about it if you want to run something special for a fresh system.
16:18:09
Shinmera
Though, again, since it's not really a problem as you note, having the condition be a warning seems too severe
16:18:54
Xach
Shinmera: one option would be to try to retrieve critical entries and initialize if absent...it seems like knowing the underlying storage system state is not something I want to mess with, much.
16:18:55
pjb
wallmonitorcable: https://codeshare.io/5wO0Yp Notice how the first sexp represents data. Notice how the second sexp has exactly the same structure, but seems to represent code.
16:19:21
wallmonitorcable
If it weren't for the fact that Lisp is one of the earliest programming languages, I would claim that I think it seems "different for the sake of being different", but PHP/C/JS/etc. seems much more "straight-forward" still, for somebody who never has programmed in their life. At least it seems that way to me.
16:19:26
pjb
wallmonitorcable: notice also that you could define functions named person, name, surname and age, and the first sexp which was data, now can be interpred as code!
16:19:41
Shinmera
Xach: Sure, there's other ways to do the same thing. I just see it as a potentially useful piece of information.
16:19:49
Xach
wallmonitorcable: what seems "natural" is generally a condition of what you learn first.
16:20:38
Shinmera
wallmonitorcable: I'm quite sure people from different countries have very different ideas about which natural languages are "straight forward"
16:20:38
Xach
wallmonitorcable: if someone has never programmed in their life, lisp is probably as natural as anything else.
16:22:29
ckonstanski
Programmers must be adaptable. Any programmer who clings to what they learned first is a crappy programmer indeed. (:two-cents)
16:22:42
Shinmera
Xach: I think for now I'll change it from being a warning to just being a condition. How does that sound?
16:23:17
beach
ckonstanski: Unfortunately, crappy programmers are the norm in the software industry.
16:23:21
pjb
wallmonitorcable: notice that the actual lisp source code, is not the textual representation, but the data structures, the cons cells and lisp atoms represented in those diagrams.
16:23:36
wallmonitorcable
I guess what feels so frustrating to me is that if I were to become rich tomorrow, and I hired some Lisp expert and had a Lisp machine doing important work, I couldn't "glance at" or vet the code because it uses a completely different philosophy (from what I can gather) to what I'm used to. Many languages that I don't know still have some sort of obvious "structure" which seems to abstracted away in Lisp. I'm not saying that Lisp is bad -- I'm
16:23:37
wallmonitorcable
merely fascinated with how different and "exotic" programming languages exist and are still in use after many decades.
16:24:09
Xach
wallmonitorcable: I think that is just superificial unfamiliarity that goes away very quickly with study.
16:24:18
pjb
wallmonitorcable: if you were rich, you'd get yourself a lisp teacher to know the language of the rich men (like, eg. Paul Graham).
16:24:31
Shinmera
Haskell, Caml & co. are also very different to C & co and both are in wide use today.
16:24:43
beach
wallmonitorcable: A warning: if you decide to learn it, there is a big risk that you won't want to go back to your previous languages.
16:26:08
beach
wallmonitorcable: That said, if you DO decide you want to learn Common Lisp, then we can give you some advice about the programming tools and some books to read. We can also give you feedback on your code.
16:26:47
ckonstanski
My first book was Practical Common Lisp. As a beginner I found it incredibly helpful. And it's free online.
16:27:34
wallmonitorcable
Well, as much as I can find code beautiful, I've mostly ceased trying to find beauty in (practical) code because of the enormous difficulties of actually making the code in any language actually generate money in the end, so that takes up 99.99999% of my focus/time/energy. I'll admit I'm very familiar with PHP (or my little subset of it, anyway) and while it's almost universally hated, I find that I can theoretically do "anything" with it, but it
16:27:34
wallmonitorcable
doesn't matter as the money issue by far overshadows my urge to achieve "perfect code beauty".
16:31:04
ckonstanski
https://medium.com/@ChallengeRocket/top-10-of-programming-languages-with-the-highest-salaries-in-2017-4390f468256e
16:31:40
ckonstanski
Who knows if they even looked at any lisps (like clojure which is used a lot at Apple).
16:31:59
jmercouris
wallmonitorcable: you won't make any money as a lisp developer, go learn a popular language
16:33:25
wallmonitorcable
I like the idea of a "Lisp machine"; dedicated hardware to run only Lisp programs; no bloated and insecure OS and stuff like that.
16:34:07
beach
wallmonitorcable: You can run Lisp on a bare metal PC. Much faster than dedicated hardware.
16:34:12
Xach
the lisp machines that companies actually used had a pretty big and extensive OS that some people complained about.
16:34:38
ckonstanski
I have not made a study of lisp machines. In my uninformed mind I think that they existed because commodity pc hardware was not powerful enough to run lisp back in the day. Now that it is, there's no market for it.
16:34:54
pjb
wallmonitorcable: That said, there are existance proofs, it's possible to make money with lisp, and even a lot of money.
16:35:26
beach
ckonstanski: Correct, but that has changed. And nowadays any widely used processor can run Lisp very well.
16:35:54
ckonstanski
Or you can get a job where you have a certain amount of freedom in language selection, like in a position where you mostly work alone and write smallish programs. I've snuck a lot of lisp into the workplace this way.
16:37:48
ckonstanski
If you learn clojure (I feel dirty now) it's even easier to sneak in. The packaged runnable is indistinguishable from java (a JAR).
16:39:34
wallmonitorcable
Well, it gives me some what of a cozy feeling just to know that Lisp is still being actively used by people. I like it when old technology and ideas are still in use. Especially if they are superior to some "modern replacement". I can't stand modern computers in general, likely due to being jaded from both Windows and FreeBSD/Linux and how bloated and insecure and inane they are, so I often like to look back to early computer systems where they