freenode/#lisp - IRC Chatlog
Search
12:14:46
attila_lendvai
it doesn't depend on the length so much as on readability. look at macros as a thin layer of syntax sugar. i.e. you should implement most of the functionality as functions, and if the syntax of that API is cumbersome (e.g. you need to create many (lambda () ...) wrappers), *then* create a thin layer of macro(s) that smoothen out the syntax
12:47:19
Xach
porky11: there is more than one way. i think the easiest is with the easy-handler system. But a file response is mostly the same as any other response - you load the data from the file and send it as the response.
12:47:20
porky11
I have set something to "image" instead of "text/html" and just read the file char by char and write it into a string
12:48:03
Xach
porky11: When I was faced with a similar issue, I used a dedicated server for images (nginx) because it is more efficient.
14:08:34
dim
depending on the project I like have a self-contained lisp image that embeds all the static resources (css, js, html, images) and serve from memory, and then for efficiency you can add nginx/varnish in front of hunchentoot
14:09:21
dim
see https://github.com/dimitri/pgcharts/blob/master/src/utils/cache.lisp for the hunchentoot implementation of serving files content from memory
14:10:41
dim
https://github.com/dimitri/pgcharts/blob/master/src/resources.lisp is the other file that you might want to have a look at
14:13:05
dim
the ability to deploy a single binary file that is self-contained, even for web based projects, is still something that I really like
14:58:02
jmercouris
Shinmera: when evaluating trivial-indent:define-indentation, I should be able to just M-q and it will use that new indentation right?
15:23:55
Shinmera
jmercouris: Also check if slime notes something in the minibuffer when you indent. It'll say something about an invalid structure if the indentation hint is malformed.
15:24:17
jmercouris
Interestingly enough, I was taking the default form for a defun, and applying it
15:24:42
jmercouris
though, I don't think this is an issue with trivial indent, but somehow with emacs, or my lisp installation
15:25:40
jmercouris
Just simply this: (trivial-indent:define-indentation defcommand (4 &lambda &body))
15:31:43
jmercouris
but no change when I run: (trivial-indent:define-indentation defcommand (10 &lambda &body))
15:37:53
jmercouris
Don't bring logical solutions into this discussion, I was just lighting up the torches
15:38:46
jmercouris
Shinmera: Yeah, it really is, the macro indents properly on other people's computers
15:41:51
killerstorm
Hi, is anybody interested in a tiny gig, paid in cryptocurrency? I need a parser for a certain language. Might be like a hour of work if you have experience with parsing.
15:42:38
killerstorm
Here's an example of input and expected result: https://gist.github.com/killerstorm/6f125482f50fba847763f42ead365f7b
15:46:14
jmercouris
Shinmera: emacs -q indents properly, seems like it is time to painfully comb through my emacs config
15:47:00
dlowe
killerstorm: are libraries allowed? Using a parser generator library like esrap would make it pretty easy.
15:48:03
killerstorm
dlowe: DSL for blockchain application programming. I'd love to use Lisp but custom syntax probably looks more impressive.
15:48:25
Shinmera
It looks troubling enough because that snippet doesn't even come close to properly defining the syntax.
15:49:34
killerstorm
Hey guys thanks for your advice but I already have DSL in Lisp. I want to try DSL which is not Lisp. For commercial reasons.
15:49:44
dim
a self-contained micro-service, either in a binary image or a container or something...
15:52:02
dlowe
killerstorm: https://github.com/dlowe-net/orcabot/blob/master/src/calc.lisp has some sample esrap code
15:52:07
Shinmera
If sample code is all you want here's an example grammar implementation for GLSL, which is C-like. https://github.com/Shirakumo/glsl-toolkit/blob/master/grammar.lisp
16:15:07
killerstorm
dlowe: Thx for example. Does esrap generate some nice error messages? Or at least a point where error happens...
16:16:28
killerstorm
My offer stands, by the way. I'm short on time and would rather save myself a bit of effort.
16:17:36
dlowe
killerstorm: good error messages are hard - the usual way is to write more grammar rules that cover the entire input space that generate errors.
16:20:50
killerstorm
Well currently I have Lisp-base DSL which doesn't even point to a line of code where error happened. So I guess anything would be an improvement...
16:23:55
jmercouris
probably not that much, as there is not many "legacy" lisp projects that require maintenance
16:24:17
beach
dim: Oh, yes, you would know, right? At least judging from your stories from your domain.
16:25:22
dim
C is ok, because it's meant to run within PostgreSQL code space and PostgreSQL is a very old C program (20+ years) so it comes with all the high-level abstractions you actually need
16:25:38
beach
jmercouris: I.e. people spending way more energy using a language that is not adapted to their problem just in order to avoid learning and using Lisp.
16:26:07
dim
other than that, most of the stories I follow are where people are re-inventing SQL in their application language
16:26:55
dim
I'm not sure about Lisp itself apart from re-inventing it poorly in so called “modern” programming languages, and with what I could achieve with pgloader on my free time, I'd rather do CL
16:29:47
jmercouris
beach: Ah okay, yeah, that would be interesting to know indeed, I'm sure it happens quite often as lisp is "intimidating"
16:30:08
jmercouris
I guess it would be akin to learning a non-latin language, not necessarily more complex, just unfamiliar, and that is why it scares users
16:31:16
dim
learning Common Lisp means questioning some of the things you took for granted and some of the well-known trivia such as “lisp is old and useless”, “there are no libs in lisp”, “you can't do XXX in lisp”, etc
16:31:48
jmercouris
speed is definitely an issue in python, which amazes me, as so many people spend their time on a single implementation
16:32:10
dim
and then when you get to it you're like what? how come there are so many control operators, what is this OO model, handler-bind and restart-value what? packages are only about symbols? what's a system? etc
16:32:15
jmercouris
I was having GIL problems in so many of my projects, now you might say "you are the weakest link", and sure, maybe I am :P
16:32:49
dim
so I can't blame people for not wanting to put in the effort, unless they just don't feel like it for the wrong reasons without having had a curious look first
16:33:01
jmercouris
dim: Yes, there were lots of times where I THOUGHT I knew, but didn't, and still all the time as I am learning new lisp I am having to "relearn" concpets
16:33:30
jmercouris
It is hard decision to make because learning lisp basically will not put food on the table for you, with any degree of ease another language will
16:34:25
beach
dim: True, one can't blame the lone programmer for not wanting to invest in a new language with unknown benefits. But one CAN (and I DO) blame project leaders in industry who don't even bother doing the math to see whether Common Lisp would be a better choice for their projects and products.
16:35:53
beach
I think at this point, I could just have a few abbreviations, one for each rant, and most #lisp participants would know what I mean.
16:36:22
dim
beach: we used to have the same rant in the PostgreSQL community, and it boils down to “you're never going to be fired for using XXX”, with XXX being IBM, then Microsoft, then Java, then many other things, but PostgreSQL and Common-Lisp kind of never made it to the list
16:36:47
dim
so rather than complaining about that beach (which I do too), how to we have Common Lisp enter that “never going to be fired for picking it” list?
16:49:32
dim
maybe we should build some important piece of infrastructure in common lisp and have it flexible and very reliable and have people depend on it
16:50:56
dim
that's how C and Unix got there I think, and Go with docker and the family around it nowadays, and Python I'm not sure it's just because it was easy to hack code in the language I guess; Java got a lot of infra project I believe, nowadays maybe Kafka and Zookeeper would be on the top list?
16:51:36
dim
Erlang has RabbitMQ and people hate it but still run it because it does the job, mostly, and in a good enough fashion and not too much competition in this space I presume
16:52:15
dim
what's a good Common Lisp “infrastructure” project that non-CL people could rely on in their production architecture, and discover later that it's actually been developped in CL, to a great benefits
16:53:18
beach
Not really. I do several things in parallel. Editor, debugger, GUI library, compiler, etc.
16:54:28
jmercouris
you could also increase common lisp traction by writing a popular tool in it, you know, like a browser ;)
16:54:48
beach
dim: I have done some applications in the past. And I do want to make better versions of some of them. In particular Gsharp which is an editor for standard music notation.
16:56:55
beach
jmercouris: Yes, McCLIM was a result of my needing a pure Common Lisp GUI library for Gsharp.
16:58:10
dim
that's quite nice! I think I've looked at Gsharp and found it cool in the past, but as a guitar player well, chords and tabs :/
16:58:52
dim
anyway, Gsharp and McCLIM or a browser or pgloader even won't be a crucial part of a production infrastructure that people would deploy without feeling like they need to be able to hack the product
16:59:37
jmercouris
there is yet another question to ask though, does popular support mean a better future for CL?
17:00:06
dim
Kafka, Varnish, Docker, PostgreSQL of course, Memcache, Redis, etc are examples of what I mean by infra-with-an-api
17:00:09
jmercouris
on one hand, python has a ton of users, but what has that done for python? some machine learning bindings?
17:00:54
jmercouris
dim: I guess you could write yet another provisioning system like salt, chef etc
17:01:15
jmercouris
and it could use sexp to represent the state of the system instead of awkward yaml files
17:01:35
dim
I'm thinking maybe a non-ACID memory database system with a producer/consumer mechanism would be good
17:01:50
beach
dim: I don't think Common Lisp will ever be on that list of yours. But I think one can hope for some highly-educated project leaders in industry understanding that Common Lisp might be a better choice for some of their projects. For that to be the case, I think we need much better programming tools.
17:01:58
dim
the thing that sits in the middle of the infra and allow the other pieces to seamlessly work independantly
17:02:34
dim
beach: I understand your position, I don't think that's the best option/leverage we can have, though
17:03:05
beach
dim: Maybe not. But that's the domain where I feel I have the competence to pitch in.
17:04:23
beach
Also, in order to put in as much work as possible, I need to justify it as research, and this domain fits well with that goal.
17:04:47
dim
that's a PostgreSQL “proxy” that implements the PostgreSQL protocol and does some connection pooling / admission control, but it doesn't know how to support prepared statements and people who've been trying to add that feature failed, because the C code is intricate to work with
17:06:38
dim
(also pgbouncer is 1-core only by design, with event-loop based processing, and when doing lots of traffic that's a bottleneck)
17:06:55
Xach
I was hoping to write a configurable DNS server so I could do some dynamic DNS without much hassle
17:08:05
Xach
I have many of the pieces to make what I want, though. I wrote a packet parser long ago.
17:08:39
Xach
Oh, I am not looking for a packaged solution, but a project that would be a fun hobby and result in something useful to me :)
17:09:57
dim
etcd & zookeeper and the like are used to register alternative resource providers (web servers, db servers, you name it) and guarantee that a single provider is elected at all time, and allows to then connect to the current “leader” easily ; I don't think they handle DNS changes when a new leader is elected
17:48:02
Shinmera
Other things that will automatically be highlighted are with-foo, check-foo, and do-foo.
17:50:25
Shinmera
The reason deffoo doesn't highlight is because def* is ambiguous. Consider stuff like default.
17:51:03
jmercouris
I see the ambiguity, but if I have my system and macros loaded, emacs should be aware of them
18:01:39
kini
dumb question - I'm looking at some code containing (load "foo.lisp"), and I'd like to add a form after that LOAD which looks like (setq bar:baz 'xyzzy), but the bar package is defined in foo.lisp so the function containing the LOAD fails to compile because package bar doesn't exist (at compile time). How do I get around this? Or is it not possible?
18:03:22
jmercouris
having said that, this feels like an x-y problem, can you please describe on a high level what the situation is?
18:05:04
Xach
kini: one common workaround involves using read-from-string, but it's something to avoid, usually
18:07:11
kini
Er, I don't quite follow -- both the existing LOAD and the SETQ I'm trying to add are inside a function body, not at the top level. (Or maybe that's not what you meant?)
18:07:11
kini
The situation: I have a program whose purpose is to figure out the dependencies of a quicklisp package; it does this by installing quicklisp in a tempdir, pulling in the package, and looking to see what else gets pulled in. To do this, it LOADs quicklisp's setup.lisp at runtime. I'm trying to make it work behind a proxy by setting ql-http:*proxy-url* right after that setup.lisp is loaded.
18:07:22
kini
I should add that I really don't know much about common lisp :) I don't know what a system is for example...
18:07:57
dlowe
kini: we call them systems instead of packages because the word "package" already meant something in CL
18:08:37
jmercouris
shka: I can't conjure a situation in which it makes sense, but there must be one :D
18:09:13
kini
I'm not trying to write the logic for quicklisp dependency detection or anything, just trying to one-line hack this existing program so that it will work behind a proxy :)
18:09:49
Xach
kini: you can (setf (ql-config:config-value "proxy-url") <something>) and it will remember it between sessions.
18:10:17
kini
remembering stuff between sessions probably won't work because this program runs in a sandbox
18:10:38
kini
jmercouris: not sure what you mean by "incorrectly" -- I have it in all the traditional environment variables, if you mean
18:11:18
jmercouris
kini: I was imagining a machine where you've setup a proxy because somehow the quicklisp servers are inaccessible in your country or something, I misunderstood the situation, my apologies
18:13:51
kini
if you're curious about the code I'm looking at, it's here: https://github.com/NixOS/nixpkgs/blob/8818546d/pkgs/development/lisp-modules/quicklisp-to-nix/quicklisp-bootstrap.lisp#L56
18:20:29
jmercouris
and let's say that as soon as (a) is invoked, in between the invokation and the actual printing, *some-global* is changed somewhere else, perhaps in another thread
18:21:28
jmercouris
it was a setf at first, and then I changed it to print without removing the string
18:43:44
_death
jmercouris: if it's a special variable, it's likely the implementation has per-thread storage for it
18:44:50
jmercouris
_death: Maybe this is a stupid question, but is the lambda of a function body a closure?
18:46:35
jackdaniel
funciton body is a function body. function may be a closure, if it closes over some variables
18:46:47
_death
jmercouris: if it's the global binding, then there's a race condition, and you could use synchronization primitives
18:48:08
jmercouris
When I pass an argument to a function, let's say I pass a var to a variable, and that var changes somewhere else, what happens to that variable?
18:49:52
jmercouris
I guess I was imagining a "closure" over the variables that are passed in as args
18:50:18
_death
jmercouris: most values are references, though, so people like KMP call it pass-by-identity
18:54:58
random-nick
if you take a car of a cons and then rplaca it, the old value you took doesn't change
18:54:58
_death
jmercouris: I mean references.. you can think of them as pointers that are implicitly dereferenced and that can't be changed, I guess
18:56:11
_death
jmercouris: and not everything requires a pointer, e.g. fixnums or characters may simply be copied
19:04:16
dlowe
So I have a style question to present. ASDF 3 allows you to check for features before loading a file. This is great, because #+/#- is insufficient to account for implementation differences.
19:04:50
dlowe
so now for each implementation, I can have a source file, gated by an :if-feature :implementation
19:07:27
_death
dlowe: I think that makes sense if you don't need more than one file per implementation
19:11:57
dlowe
jackdaniel: implementations differ on how they handle unpackaged symbols and symbol macros inside a #-
19:14:09
dlowe
similarly, ccl uses #_systemcallname pervasively, but symbol macros aren't ignored in lispworks
19:15:26
jackdaniel
I mean: how #+abcl(:file "foo") less sufficient than (:file "foo" :if-feature "abcl")
19:15:28
_death
well, #+abcl (java:...) won't break anything on an implementation that doesn't have an abcl feature
19:16:22
_death
jackdaniel: like I said, such dependencies can be taken notice of without readtable hacks
19:16:31
jackdaniel
I'm referring to < dlowe> So I have a style question to present. ASDF 3 allows you to check for features before loading a file. This is great, because #+/#- is insufficient to account for implementation differences.
19:19:05
beach
rme: No, unfortunately not. But we are very proud to have managed to do it for 15 years or more.
19:21:05
jackdaniel
well, I've presented you argument where :if-feature is clearly worse than #+foo and you say "then don't do that"
19:23:52
_death
jackdaniel: maybe the questions are which convention should be used by default, and what are the cases where it may be broken
19:23:55
dlowe
jackdaniel: okay, assuming you're trying to make a valid point then, your example would break with #+abcl too
19:25:04
dlowe
jackdaniel: implementations differ how they treat unfound packages within an unread #+ or #- expression
19:27:46
jackdaniel
I don't think it is a valid point, you will break many many things binding *read-suppres* to t when you read files (and I'm not talking only about asd definitions)
19:27:57
rumbler31
if i understand correctly, the discussion is between an asdf feature that can be used to conditionally load a file, vs placing #+/#- forms in source files for implementation specific behavior?
19:28:55
jackdaniel
it's the same as if I had argued, that software which has #+nil foo is invalid, because nil may be pushed to features. in theory it is, in practice it doesn't matter (because many systems do that to comment blocks of code)
19:29:15
dlowe
rumbler31: then jackdaniel pointed out correctly that I could have used the #+/- in the system definition to do the same thing
19:29:58
_death
jackdaniel: I linked it because #+ and #- may bind it to T, where it may be used to skip invalid package markers (i.e. it should be OK to have them)
19:31:58
jackdaniel
jmercouris: one way to look at it is that it was introduced quite late to the party (so your lib will break on clisp), second is example of using package:foo notation (where package is guaranteed to exist when bar is in features). Only benefit I can see for if-feature is when you want to scrap information about how system definition would behave on other implementations
19:32:42
jackdaniel
I'm not sure if any software uses that possibility (I remember that when if-feature was introduced it was argued, that it could be used for archive-op or doc-op to name two examples)
19:33:19
jmercouris
jackdaniel: all valid points, but I generally do want diffrent system definition behavior on other implementations, at least in my example where ccl and sbcl are radically different
19:33:44
jmercouris
or rather, my system that runs on ccl is radically different than my system that runs on sbcl
19:34:06
jackdaniel
jmercouris: I think you miss the point. we discuss which notation of such conditionalization is better
19:36:14
rme
beach: Congratulations on having taught CL for so long. I was thinking that your university might be a source of possibly-enthusiastic junior Lisp hackers for my imaginary CL startup in Bordeaux.
19:36:51
jmercouris
rme: why do they have to be junior devs? so they can work longer hours for less pay :D?
19:41:19
sjl
I've been fully remote for 4+ years now and don't think I'll ever want to go back to meatspace work
19:41:56
rme
I've worked remotely for years, but I am finding that I really enjoy and need some social interaction as well.
19:42:57
rme
Maybe I need to develop a better non-work life somehow, but I don't think I can just stay in my own little office by myself any more.
19:43:27
phoe
I know that feeling and I wish remote work allowed for better human-human interfacing.
19:44:28
rme
I asked about students in Bordeaux because if I end up living there I thought that I could organize some lisp meetups or workshops or something, and that they'd be a potential audience.
19:44:57
rme
Knowning students, however, most of them probably just learn enough to pass the course and then forget it all anyway.
19:45:39
rme
I just slandered all students. Sorry about that; I'm sure that's just my cynicism talking.
19:46:25
phoe
rme: I understand the sentiment as someone who attempted to popularize Lisp in my region.
19:47:14
phoe
So far, I ended up having a 100% growth of Lispers in my direct circles. That is, I have inspired KZiemian to pick up Lisp for good.
19:48:00
phoe
So do I. I sometimes wish I could have a worse taste and stand doing C# and Java like everyone around.
19:50:04
phoe
I am working in enterprise right because it pays decently, and I can spend a portion of my sanity for the money that it gives me.
19:57:45
didi
You know what would be cool? If we could change the value of `multiple-value-bind' variables in the vars list.
20:04:25
dlowe
I like it like I like series and iterate. I can see how it's cool and then I don't use it.
20:09:55
Petit_Dejeuner
Hi, I've been trying to get lib-cffi to load, but I get a "Unable to load any of the alternatives ("libffi.so.6" "libffi32.so.6" "libffi.so.5" "libffi32.so.5")". libffi is installed, but it's in the directory "/usr/lib/x86_64-linux-gnu/" instead of something like "/lib/" or "/usr/lib/". I tried copying the libraries into /usr/lib/ to see if maybe cffi just wasn't searching the right place, but I still get the same e
20:10:16
aeth
phoe: if you want a really arrogant Lisp startup channel name, call it #startups-easy-mode and make it clear in the topic that only Lisp is allowed.
20:11:21
phoe
First question: are you sure that libffi matches your architecture? 64-bit ffi for 64-bit Lisp image?
20:17:17
Petit_Dejeuner
Yeah, that was it. I installed sbcl through the website since my package manager's version was outdated and I installed the 32bit instead of the 64bit.
20:18:08
Petit_Dejeuner
I've had this happen several times now, but it's always when I start to use Lisp again after a long break.
20:20:05
Mqrius
If only everyone had stuck with 8 bit punchcards then we wouldn't have had this problem!
20:26:37
aeth
(1+ (integer-length most-positive-fixnum)) should be the first thing everyone does on a fresh Lisp install. If it's < 32, it's probably 32-bit. Elseif it's < 64, it's probably 64-bit. If it's >= 64, I'm jealous of your computer and/or your Lisp.
20:29:28
aeth
Hmm, that doesn't actually work as universally as I thought it would. The ABCL I have installed gives "32" when I do that.
20:29:55
aeth
_death: There is a most-positive-bignum, and you'll find out when you try to get past it.
20:39:33
phoe
though that is for a simpler case, "https://github.com/phoe/cl-furcadia/blob/master/date-parser/date-parser.lisp"
20:42:31
Xach
https://github.com/xach/usenet-legend/blob/master/date-parser.lisp is what I just copied.
20:45:14
dlowe
rebol has a parser generator built-in to the language, and I'm starting to think that's admirable. So many problems are parsing problems.
20:49:26
didi
dlowe: So much of what we do is dealing with ourselves. I think of it like an expanding sphere: the volume grows faster than the surface.
20:49:58
Petit_Dejeuner
lol, even the Chinese come in here to ask about the future/popularity of lisp
20:51:43
random-nick
also, how did that chinese person get here in the first place without knowledge of english?
20:55:10
aeth
I'm on Fedora and Fedora basically updates it with the distro and never again (so currently 1.4.2 because Fedora is roughly every 6 months and the upgrade was recent).
20:55:21
aeth
Fedora does that sort of thing with some languages (perl, python, ruby), but not with Lisp (yet)
20:55:52
aeth
The most annoying one is with LaTeX, whose package manager apparently is set up to prefer hundreds/thousands of tiny packages
20:56:01
Petit_Dejeuner
cl-split-sequence, cl-sql, cl-sqlite, cl-trivial-backtrace, cl-trivial-garbage, cl-uffi, cl-uffi-tests, cl-unicode, etc
20:56:26
cgay
I'm not an expert but those do look like traditional Chinese characters, so maybe Taiwan.
20:57:22
phoe
didi: I don't doubt they're nice, I don't doubt that some people who do Linux more than they do Lisp find them useful
20:57:30
Petit_Dejeuner
There's some old airport passenger routing algorithm running on an old debian server that uses apt-get for cl-split-sequence or something.
20:59:38
aeth
I think any properly-run distro is probably going to essentially never update the Lisp installations except during new distro releases (well, unless it's a rolling release distro). Especially SBCL. They tend to have a lot of "minor incompatible change"s, but I guess a good packager would update until the first one. http://www.sbcl.org/all-news.html
21:01:17
aeth
I'm not sure that's very feasible when you start pulling in Lisp, Python, Ruby, Perl, etc., packages from the language package managers, though.
21:07:02
rme
I have the impression that it is usual in python to use a virtualenv (and pip) to isolate yourself from the system python libraries installed by the system package manager.
21:08:16
aeth
Distribution-packaged libraries should basically just be there to handle dependencies for distribution-packaged applications that are written in that language.
21:27:19
rme
where "stuff" is a substitute for another word that starts with "sh" and ends with "t" and has an "i" in the middle.
21:30:28
pjb
rme: the problem with python is different; there is not a single python, but 3 or 6 different pythons. Different languages. They use the same name and same library names, mostly.
21:32:37
aeth
pjb: The big problem with Python is 2 vs 3. It's finally now being resolved 10 years later, but I still run into issues with it. e.g. A program I used to compile with scons now no longer compiles with scons because the scons in my distro is now using Python 3, but the program's stable branch hasn't been (and afaik won't be) updated for that scons.
21:33:23
aeth
Python would probably have been word-dominatingly popular (its strategy of being the newbie language is a good one) if it wasn't for 2 vs 3 issues for literally 10 years now.
21:36:11
Rawriful
I still think in terms of popularity. Java has the right approach with backcompat. Purely due to the fact that business prefers it. A business has nothing to gain from having to port it's application to a new version of a lang.
21:36:53
aeth
pjb: Right, but Python 2.7 code probably won't run in Python 3. Python 3.4 code will run in 3.6, it's just that they want to use 3.6 features. Afaik.
21:38:00
Rawriful
phoe: imo yes, if there was an initial significant commercial hold with cl it would be a lot stronger. But the other thing about java is that it's quite difficult to make bad code *really* bad due to it's lack of expressionality.
21:38:16
aeth
Although, actually, it's not that big of a deal in CL. CL *could* have breaking changes because of how it's structured. e.g. Just have new programs (:use #:cl2019) or something instead of (:use #:cl) and there you go. Problem solved.
21:39:54
phoe
companies prefer dumb languages because it seems that it's harder to write unmaintainable code in them
21:41:03
aeth
phoe: Well, I think what they want is replacable, cheap employees even if they need more. The Common Lisp approach is aiming more for smaller teams that are paid more per person.
21:41:31
Rawriful
phoe: I think yes but I think how bad that gets is more limited in java. and sort of what aeth said as well.
21:41:45
White_Flame
I've been reading some 1960s LISP code (yes, all-caps to be time-appropriate), and man it's a tangle of GO and COND
21:42:21
aeth
(Of course, you can write Java in any language, and you can definitely do that in CL if you ban a few things like defmacro.)
21:42:30
phoe
Rawriful: except if you write unmaintainable code in Java, people might not notice and might even get used to it, and it may even pass reviews beacuse it's so huge and so God damn tangled with all the files, classes and classes of classes.
21:42:51
phoe
it's harder with Lisp because you have much less code to begin with and it's harder to hide shit in there.
21:43:29
Rawriful
phoe: Oh I'm totally not saying it's impossible, but I've seen some shit and one of my reactions have basically been. "I am so glad that this person did not know about macros"
21:43:35
phoe
and if you do really weird shit like readtable modification, it immediately catches a reviewer's eye.
21:44:02
phoe
Rawriful: I've seen some Lisp shit too. (Un)luckily it was just a person trying to write C in Lisp.
21:44:27
phoe
But it is also nice to ask the person if it works, and then, if it works, show them how this can be reduced to idiomatic Lisp.
21:44:29
Rawriful
phoe: I work in scala and maintain a codebase that is basically written like it's js.
21:44:43
aeth
Petit_Dejeuner: Universities are like giant enterprises in their tech choices and move about as slowly as them.
21:45:08
aeth
(I wonder what percent of university tuition money goes to overpaying for Oracle stuff.)
21:45:59
Petit_Dejeuner
aeth: That's my point. For every open source code base ported to 3, there's several university courses, internal software at a corporation, and research numpy/scipy scripts in 2 that will never be ported.
21:46:42
aeth
Petit_Dejeuner: Yes, but it has finally, after 10 years, gotten to the point where 3 is inevitable. Perl 5 will probably never be replaced by Perl 6. They're even more different.
21:47:39
aeth
Petit_Dejeuner: Meanwhile in CL, a new breaking specification *would* just require (:use #:cl2019) instead of (:use #:cl) unless they changed how packages or the reader worked.
21:48:04
phoe
Why JSON schemas? This could have been done more enterprisefully by using XSLT transforms and SOAP.
21:49:01
phoe
are people who write code like this doing, uh, what, are they trying to ensure a job for life or something
21:49:01
Rawriful
it is, but in a static language, you don't need json schemas to validate your types.
21:49:05
White_Flame
aeth: in theory, it could swap out reader macros or whatever on toplevel (in-package ...)s as well
21:50:28
White_Flame
XML just has that stupid child vs attribute problem, though, which isn't very sexpr-like
21:50:35
phoe
aeth: I know, but XML is way too verbose. We don't need each closing paren to state which opening paren it closes.
21:50:47
Rawriful
I actually quite like xml, I think some of the biggest problems with it were the parsers people generating for schemas had bad error warnings where that really shouldn't be the case.
21:51:25
White_Flame
and XML has no native datatypes besides text, either. And supports mixing of "body text" with tags
21:51:26
Rawriful
that and people started to try and program in xml which is obviously not going to end well
21:52:00
Rawriful
White_Flame: I thought you could specify numbers in schemas and date patterns etc?
21:58:05
aeth
White_Flame: I think the most difficult but potentially desirable change in a hypothetical future CL would be case sensitivity instead of upcasing, but that would break a lot of code that assumes 'foo is the symbol represented by the string "FOO", and that "-BAR" would generate 'foo-bar and not 'foo-BAR
21:59:07
White_Flame
in our communications platform, we even explicitly made symbols case-insensitive
21:59:31
aeth
White_Flame: I'm just using this as an example of something that can't be easily fixed just by using a package other than CL
21:59:31
White_Flame
they should be simple keywords, not carry meaning in their character-by-character syntax
21:59:37
phoe
the above would mean that people would come in and start coding things in caseLikeThis or CaseLikeThis instead of traditional-kebab-case
22:00:58
phoe
"don't warn me about code that I broke purposefully to ensure myself a maintenance job for life"
22:03:47
aeth
You can program Java in any language. I've seen a Java program written in Python before.
22:08:01
aeth
phoe: If Common Lisp ever became popular, there would probably be an Eternal September moment where the community could no longer keep up with the influx of new users, and we'd see things like camelCase and )s on their own line.
22:09:04
Mqrius
Ah, but then we'll let them have their Commoner Lisp, and we'll write proper ANSI Common Lisp
22:10:11
aeth
Shinmera: Sorry, I mean, we'd see things like that as the *majority* rather than an outlier
22:11:13
aeth
The only large community I know of that has a very uniform style is Python's, with their PEP 8 that they constantly point to and that even Python linters can check for.
22:14:18
aeth
Code with tabs is imo archaic. These days, most code is read online without ever being downloaded, via websites that have terrible tab settings (8 spaces and other ridiculous things like that)
22:15:25
aeth
So people don't get the indentation level they want with tabs, they get pretty much the worst (too much indentation) with tabs
22:16:51
yggdrasil_core
I always used spaces because most of what I write is C and I like to align things, and a proper editor makes navigating groups of spaces work like tabs
22:17:24
aeth
Emacs's default for languages like C iirc is to mix tabs and spaces. Tabs for indentation level, and then spaces for the final alignment.
22:21:48
aeth
One of the few style disputes I've seen is ";;;;" vs ";;;" for in-file comment headings. The top of the file heading is ";;;;" and top level comments for things like defun are ";;;" and internal line comments are ";;" and end of line comments are ";". But ";;;; Foo Section" vs. ";;; Foo Section" in the middle of a file is an area where you can have a style argument.
22:23:16
Shinmera
The great thing about standards is that the only good ones are the ones you choose
22:27:37
Shinmera
According to https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-update "Whether or not to put a pin on the exact coordinates a Tweet has been sent from."
22:33:45
Mqrius
Let's make a true final universal lisp style though. I mean, lisp is great and all, but there's so many brackets! If we just move them away a little, everything will look much cleaner, like python! Take for example this fibonnaci function. Isn't it beautiful? https://pastebin.com/5YkNS2Da
22:37:17
Mqrius
Hmmm yes, and the style should probably be enforced rigorously. I'm thinking the compiler deletes your file if it's wrong, and tells you to do it over.
22:38:22
jasom
we should obvioulsy abandon s-expressions in favor of the more flexible yaml notation for lists
23:54:40
stacksmith
Great. I am having trouble figuring out the standard about arguments that are not symbols.
23:55:24
Bike
arguments can be anything, of course. in (+ 2 3) the arguments are numbers. do you mean parameter names?
23:58:28
stacksmith
By parameter I mean lambda-list description in the definition. So if I have (blah &key q &allow-other-keys), there is what I refer to as a keyword parameter :q. However, when I later call this function, the argument q may be actual :q (blah :q 1) or something like (blah (some-function-that-returns :q) 1)
23:59:32
stacksmith
So I was getting SBCL warnings about non-symbol arguments weakening checking... But now I can't. So I tried to figure out what the standard says, but got even more confused.
0:00:03
White_Flame
because of APPLY, keyword values need to be able to be runtime scanned from a generic argument list
0:00:12
Bike
indeed you can have the keys be returned from calls or whatever. it's just very unusual to do so, so sbcl complains a little.
0:06:25
White_Flame
oh, I wasn't referring to a specific part of the spec, just what it would take to APPLY a function that took keyword args
0:07:25
White_Flame
if you use DISASSEMBLE in SBCL, you'll often see something like "non-keyword parsing entry"
0:07:56
White_Flame
so there's another path that walks through the arguments one by one at runtime, seeing where in the keyword list things match up
0:08:41
White_Flame
so that needs to be resilient to dynamically passed argument lists (like APPLY) as well as computed keywords, by necessity
0:10:13
stacksmith
That is entirely sensible. If I could only figure out how I got this warning before, I'd feel a whole lot better.