freenode/lisp - IRC Chatlog
Search
0:40:20
Thorondor[m]
I think postmodern doesn't have anything for doing that, you will have to do it yourself.
1:21:18
Xach
skidd0: yes, to load the alterations. i like using SQL directly with postgres whenever possible.
1:35:02
Xach
dim wrote a book on postgres. and he wrote a very great <whatever>-to-postgres converter, pgloader.
1:48:05
skidd0
also Xach, and anyone else, do you have anything you remember when first learning lisp that you wish you knew sooner?
1:52:58
Xach
start making stuff, keep trying to do it better, ask for people to look at what you've done and suggest improvements or make you aware of stuff that would make life easier, interact with people and show your work
1:54:44
skidd0
I'm going to put my "learn lisp" to-do program on github once i've got a working version
1:57:18
jeosol
I agree with start to build stuff and refine as you go. I was able to build a very large system follow this, but I have done a lot of refactoring since.
2:02:02
skidd0
I got really into web-dev with Flask (python) because of Miguel's well-structured Flask Mega Tutorial. I've looked at PCL, but are there other examples of project based learning for Common Lisp?
2:21:19
sabrac
skidd0: I expect to be dropping a roadmap for potential postmodern development in another 24 hours or so. Migration support is on the roadmap
2:23:10
jeosol
nice, I wanted to say this. I did benefit from your postmodern tutorials when I started, used that lib and clsql but mostly with postgresql
2:25:58
sabrac
Thank you. I want to find the time to write some tutorials that do not assume the reader already knows sql, but life gets in the way.
2:46:44
jeosol
hahaha, that's funny. The reminders about the library comparison. Those where useful for sure. The ones on Json, time libraries, and csv business
3:54:02
skidd0
sabrac: i see create-all-tables and create-package-tables, but neither seem to create the tables i identify when i (defclass something .. :table-name somethings)
4:10:27
beach
asarch: Yes, the Common Lisp HyperSpec has only minor differences compared to the ANSI standard.
4:13:49
beach
The book is too thin to mention every function, every macro, every class, every special form.
4:15:48
asarch
Since I already know Kung-Fu, I was thinking to get a book about, for example, "how would I parse a file reading only...?" to check those functions related
4:17:02
asarch
The Common Lisp HyperSpec (TM) from LispWorks Ltd. The Common Lisp HyperSpec is a hypertext version of the ANSI Common Lisp
4:18:26
beach
Almost, but not quite. The standard is owned by ANSI and not even LispWorks has the right to create a derived work from it. However, the draft standard is available for everyone to use, and there are only very minor differences between the draft and the final standard.
4:20:11
beach
For all practical purposes, the Common Lisp HyperSpec is the reference. Except if you want to include it in the bibliography of a paper or a book. Then you need to refer to the standard.
4:22:05
asarch
Just the same I did with the PCL web: to get a hard copy and then read it every time I want to know something specific
4:24:36
beach
The contents is identical to that of the Common Lisp HyperSpec, because LispWorks used the draft to create the Common Lisp HyperSpec.
4:51:17
beach
minion: memo for asarch: Here is a site that has a full PDF of the standard: http://cvberry.com/tech_writings/notes/common_lisp_standard_draft.html and it contains 1360 pages (rather than the 1000 I was guessing).
5:16:33
LdBeth
The ANSI standard can be obtained for $60, but I don’t see there’s much difference in contents, and it’s a photo scanned PDF.
6:15:55
minion
asarch, memo from beach: Here is a site that has a full PDF of the standard: http://cvberry.com/tech_writings/notes/common_lisp_standard_draft.html and it contains 1360 pages (rather than the 1000 I was guessing).
6:17:34
asarch
"Many people apparently use the Common Lisp Hyperspec, but I personally find this document highly confusing and difficult to learn from in any meaningful way." <- I thought I was the only one
6:20:36
beach
The Common Lisp HyperSpec is not meant to be learned from. It is meant for people who implement Common Lisp systems.
6:37:17
asarch
Here is the document in Dropbox: https://www.dropbox.com/s/2swg57jeouwd5w0/The%20Meta%20Class%20System%20MCS-%20A%20Portable%20Object%20System%20for%20Common%20Lisp.pdf?dl=0
9:50:17
puchacz
hi, will sorting be faster if I am only interested in top N elements? and have we got library for it?
9:59:27
_death
if you're interest in the top N elements, then you don't need a full sort.. I'm not sure what a displaced vector has to do with it
10:01:08
_death
beach: suppose you have #(1 3 2 4) and you need the two largest elements.. how would that work?
10:01:49
Guest24137
_death: you would have to implement your own algorithm to drop the elements you don't want.
10:04:14
pjb
Actually, you can collect the N biggest elements in O(M). then sort them in O(N*log(N)).
10:06:31
shka1
puchacz: https://github.com/sirherrbatka/cl-data-structures/blob/6ae7362c0828a2e3eb4e8c9fcff1268e1221d0fc/src/utils/ordered-algorithms.lisp#L18 just limit the number of iterations in the main loop starting at line 44
10:28:47
johnnymacs
Then the satement "lisp is not suitable for kernel writing because it has garbage collection" iis objectively false.
10:29:10
johnnymacs
However if you said "sbcl is..." then it is techincally true unless you edit sbcl to not have garbage collection
10:29:32
beach
Yes, the person who uttered that would have to come up with a reason why kernels could not have garbage collectors as well.
10:30:19
johnnymacs
One could argue because it is so expensive to port all linux software to a new and radically different kernel and because it is also so expensive to add garbage collection to the linux that they refuse to accept it
10:31:08
jackdaniel
johnnymacs: I think that what the claim really is (as in sense - means) is that language without manual memory managament is not suitable to write kernels. I don't have opinion on that, just pointing out that taking causal claims verbatim and 'disproving' them is not especially ahrd
10:31:30
johnnymacs
thoughough that particular argument has to do with real world logistics thus making it more complicated than abstract things like the hyperspec
10:31:37
beach
johnnymacs: While garbage collection is not in the specification, in practice you must have it.
10:32:58
johnnymacs
What would you say to someone who thinks a kernel should not have garbage collection
10:33:33
beach
johnnymacs: That he or she would have to make an argument for it, and that argument would be easy to poke holes in.
10:33:33
johnnymacs
Well I don't know why they think that because I am not a kernel writer. I was hoping you would have a guess as to why they think that
10:34:10
beach
johnnymacs: Many people think that GC is slower than manual memory management, or that it must have long pauses. Neither is true.
10:34:25
jackdaniel
johnnymacs: one argument could be GC pauses; another could be overhead (and kernel must be as fast as it can) etc. of course these are arguable
10:35:04
johnnymacs
True but when I argue with them they will call me ignorant and their friends will be convinced they are right and all gang up on me asking me for evidence
10:35:55
johnnymacs
The thing is i am really strongly convinced that SBCL is a superior language than most languages but it is hard to convince others of it.
10:35:57
jackdaniel
beach: could be, I'm not familiar with the subject enough to argue. I could guess, that some tradeoff exists, i.e long pauses OR moderate overhead
10:36:51
johnnymacs
I still do not think I am at the point where no matter what answer they give I will have a comeback demonstrating gc is just as suited
10:37:14
johnnymacs
You can ask that question because you possess the knowledge to poke holes in their argument
10:37:22
pjb
Basically, it's like you're comparing two 400 m runners. They argue whether you're taking the inside lane or the outside line, and whether you have crocheted shoes or not. But lisp just cut straight thru the grass toward the finish line.
10:38:23
johnnymacs
beach: invariably if I do not fully undestand or not if the reference proves garabge collection is bad I will have to come hear for your evidence for why it is a hole in thair argument
10:39:33
beach
johnnymacs: I strongly advise against arguing. Just ask them to justify. In the end you can accept the argument if you like, or come back later with a pointer to an article that says the contrary.
10:40:08
beach
johnnymacs: Like if they say "real-time GC is not possible", you show them (later) the chapter from the book or an article about it.
10:40:13
johnnymacs
I consider it worth my time to convince the world of the speriority of languages which are written in compliance and according to the philosophy of the common lisp hyperspec until more efficient yet equally capable hyperspec comes along.
10:40:51
johnnymacs
Or even a more capable hyperspec which is unlikely unless we invent a new kind of computer.
10:40:54
beach
johnnymacs: You are wasting your time. People won't let themselves be convinced that easily.
10:41:18
jackdaniel
ACTION doesn't believe in superiority among incomparable (in sense of aesthetics, functionality, hackability etc) languages
10:42:12
jackdaniel
also this may be a bad strategy to convert people to the language you like: your language sucks because mine is better (in essence!) ;-)
10:42:32
johnnymacs
brainfuck is as superior as lisp because you can use brainfuck to write a lisp compliant with the common lisp hyperspec and run it. However it takes more work to do that in brainfuck than it takes to do it in sbcl thus making sbcl the victor. And if you are in braknfuck and you don't add in the capabilities of common lisp it objectively is worse thanc common lisp.
10:42:36
beach
johnnymacs: The psychological barriers are just way too great. You are asking people who spent many years of their life investing time and energy into a particular technology to admit that they made the wrong choice. Our brains have very strong mechanisms preventing that.
10:43:08
johnnymacs
First of all I think anyone who is willing to listen to evidenc and has the capacity to understand lisp will given enough tiem see the truth about lisp if explained to them with the right algorithm.
10:43:27
johnnymacs
Second of all I find humans to be a resource which should be allocated to lisp instead of python whenever possible.
10:43:29
pjb
Most languages are not intrinsically bad (thinking of C here). But people using them may be bad (or ignorant). Trying to convince them using a better programming language won't necessarily make them better, just bring bad programmers to the good language…
10:44:09
jackdaniel
"brainfuck is objectively worse than CL" – I throw at you argument: if someone is amused with using brainfuck (for fun), and tired with writing CL, then given "fun" criteria CL is *worse* than brainfuck for that particular person
10:46:24
beach
I have already said what I think. There are strong psychological forces that will make it very hard for you.
10:47:22
jackdaniel
well, it might be the attitude. I really believe that "your language is inferior to my because"
10:47:32
johnnymacs
I often tout langauges which fall more closely to the paradigms fo lisp: javascript, c#
10:47:48
beach
johnnymacs: I consider myself fairly knowledgeable in these domains, but I gave up trying to argue with people a long time ago.
10:48:51
johnnymacs
Here is how I see it. My goal in life is to improve computers as much as possible before I die. I see every line in languages such as python or php for example to be wasted because there is a near guarantee that there are such flaws in the designs of these langauges that they have no choice but to retire their respective compiler projects at some point.
10:49:07
johnnymacs
Thus humanity's man hours are wasted and makes us more vulnerable agaisnt alien attack because our computers advance more slowly
10:49:32
beach
johnnymacs: The only strategy that I have found that works is to do good work in the language that you prefer, and hope that people can see that it is better than theirs.
10:49:46
JuanDaugherty
given the generational turnover/attrition rate it's especially pointless, dumb
10:50:12
johnnymacs
I find it easier these days to move people to languages closer and closer to lisp. I go online and post as random people and say lisp ideas.
10:51:54
jackdaniel
you can never predict which language will be a stepping stone for progress. Let's imagine C and UNIX were never invented, and that PC idea never took off. That'd lead to less tinkerers and programmers; also that'd lead to no SBCL ;)
10:52:18
johnnymacs
The other thing is that yes we are writing in all these langauges that will be thrown away. And the objectively best languages, schem and lisp, are both langauges for writing languages inside of.
10:54:29
johnnymacs
Heck maybe I would even do whatever I wanted and then when I was done give the world to the ceo of ibm
10:54:31
beach
ACTION goes to take a nap and hopes this discussion will be over by the time he wakes up.
10:59:24
JuanDaugherty
http://www.softwarepreservation.org/projects/LISP/ibm/SH20_2076_0-LISP_370_Program_Description-1978.pdf
11:02:22
puchacz
beach: sorry, is realtime gc possible ;)? not trolling, just curious - despite 2 decades of java in the mainstream, and major companies backing it, it did not happen....
11:03:35
JuanDaugherty
people with little experience charge off on tangents without bothering to find shit out because they heard this or that
11:04:24
JuanDaugherty
try actually observing how much time a well behaved sbcl system using the ordinary generational gc spends in gc
11:04:58
JuanDaugherty
and nobody is proposing or shouldn't be, writing device drivers in common lisp
11:06:08
jackdaniel
JuanDaugherty: RT is about deadline guarantees, not about throughput; as of drivers, I don't see a reason why they couldn't be written in CL (or other high level language)
11:08:08
JuanDaugherty
the burroughs machines did use algol for everything including device drivers but that's a special case
11:08:54
JuanDaugherty
not sure what lisp machines did but imagine they used some machine lang some lisp
11:11:07
jackdaniel
puchacz: there are at least two commercial RT GC for JVM according to https://en.wikipedia.org/wiki/Tracing_garbage_collection#Real-time_garbage_collection
11:21:34
jmercouris
+1 on what jackdaniel it is possible to write a driver in Lisp, it would just probably be a bit harder, from my understanding, most drivers are copy/pasta'd forks of old drivers with modifications depending on how the device has changed
11:21:57
jmercouris
so in Lisp you wouldn't have the advantage of all the previous code you could copy/pasta
11:26:26
jmercouris
beach: I've noticed its been several months since any progress on climacs, is that because you are focusing on SICL's GC?
11:40:50
jackdaniel
ftr, it is McCLIM; as of writing drivers, it is more about support from the underlying operating system
11:41:29
jackdaniel
I was writing Linux drivers and it's far from copy-paste, it is mostly about using: a) exisitng abstractions; b) datasheets; c) other documentation
11:42:05
jackdaniel
to part a) is crucial wrt writing drivers in Lisp. I think all Mezzano drivers are written in Common Lisp
11:46:08
jackdaniel
I'm working on a set of gadgets following material design guidelines if that's what you talk about
11:46:46
jackdaniel
https://files.mastodon.social/media_attachments/files/005/005/502/original/7331eec572c7081d.png screencap from week ago
11:48:11
jmercouris
if you are interested in making a set of graphics that look good, I'm willing to help
11:48:29
jmercouris
unfortunately the intersection of graphics that look good, and material design have no overlap
11:50:14
jackdaniel
portable gadget set will follow what I've said above for a good reason: there is specification for it - not opinionated "I think that looks better" metodology
11:50:36
jmercouris
the material design specification is not the only design specification in the world
11:51:01
jackdaniel
but nothing prevents you from adding your own gadget set; I'll do my best to guide you with techinicalities in McCLIM
11:51:36
jackdaniel
if it is good and complete I see no problem with including it, I have other interesting projects too, so I don't feel a great urge to force my idea here
11:52:11
jackdaniel
*but* if you are only willing to complain, that what I'm working on doesn't look good to you, then it is a different story
11:52:43
jmercouris
jackdaniel: I am only willing to complain? I've released a large amount of software and patches on the internet, complaining is just one of the things I do
11:53:04
jackdaniel
jmercouris: http://bauhh.dyndns.org:8000/clim-spec/8-4.html#_429 ; http://bauhh.dyndns.org:8000/clim-spec/30-3.html#_1712 ; http://bauhh.dyndns.org:8000/clim-spec/28-5.html#_1553
11:53:05
random-nick
jmercouris: "gadgets" in McCLIM are things like buttons, sliders, text input fields and such
11:53:31
jackdaniel
I've just provided a disclaimer, that I'm not interested in debunking your own convictions, but if you are willing to create a portable set of gadgets for McCLIM I can help
11:54:11
jackdaniel
and I really thing, that anyone who claims that something is *objectively* best/terrible/whatever when taken in terms of aesthetics, or a preference, is not very competent or honest
11:54:23
jackdaniel
I'm not interested in assets and specifications, I'm interested in code which works
11:54:57
jmercouris
Anyways, sounds like you want to someone implement the actual gadgets, which means there does not exist a current way to theme McCLIM
11:55:16
jmercouris
which also leads me to believe that the current gadgets are implemented in code, and not really composed of bitmaps or anything that can be modified
11:55:19
jackdaniel
I've linked you a few starting points, then there is #clim channel. the gist of it is to inherit from existing gadget and define handle-repaint method
11:58:27
jmercouris
Most certainly, that's why designers the world over are using google products, and hailing them for their fantastic interfaces
12:03:22
random-nick
jmercouris: well, the idea is to have the backends provide gadgets from the platform's native widget toolkit
12:04:04
random-nick
and then to have fallback portable gadgets implemented in lisp using clim functions
12:04:53
jackdaniel
there are three layers of it. portable toolkit should be possible to use on any backend and adaptive toolkit (optional) is backend specific
12:05:28
jackdaniel
there are three layers of it. portable toolkit should be possible to use on any backend and adaptive toolkit (optional) is backend specific
12:06:18
jackdaniel
backends are for different platforms (display servers): Xserver, Wayland, GTK, Cocoa, WinAPI etc
12:07:49
jmercouris
I see, and how do you deal with differences in the specifications of those widgets?
12:08:31
jmercouris
Okay, but for example, let's say a specific type of callback exists in one implementation, but not another
12:09:27
jackdaniel
abstract gadgets in CLIM specification have limited protocol of things which happen
12:09:42
jmercouris
and that protocol is limited enough that it encompasses all GUI toolkits without gaps?
12:09:43
jackdaniel
which should work on all platforms. you have all abstract gadgets listed in the specification I've linked about
12:10:31
jackdaniel
it is possible that some existing toolkit doesn't support some of it, or that it supports more of it
12:16:27
pjb
puchacz: real time java garbage collection happened several times. Here is the one by IBM, but other company propose other RTGC implementations for the JVM.
12:19:29
jeosol
syntax question: do you guys use '/' in variable (slot) names for example, I have a numeric quantity that a ratio of current value over initial value, then the variable name will be current/initial. Good/bad/doesn't matter
12:20:56
jeosol
current-inital-ratio seems a bit long, but current/initial seems shorter. not sure if others code this way.
12:23:49
pjb
jeosol: you can also use unicode, all current CL implementations support it. (let ((½mv² (* 1/2 m v v))) … ½mv² …)
12:28:10
jeosol
pjb: Thanks for the info especially with unicode. The code reads more natural that way. My variable names are numeric quantities in equations.
12:29:35
pjb
jeosol: if your code has a lot of formula, you could implement a reader macro to let you format your code like in HAL/S.
12:30:48
pjb
An alternative would be to use a reader macro just as a marker for emacs, so that it can read the expression, format it with LaTeX, and compose it over the source.
12:32:06
pjb
This means that you would still type or edit sexps, but you would see the nice formated and rendered expression in the emacs buffer.
12:33:15
jeosol
Wow, that would have been very useful. I had to write code to compute volume of arbitrary grid, it was a bit messy due to the many equations.