freenode/lisp - IRC Chatlog
Search
23:23:14
aeth
I'm using a 16 year old web browser, a 19 year old IRC client, a (probably) 12 year old terminal, a 38 year old compiler (if you count the original branch), a 33 year old editor, etc.
23:24:02
aeth
All the software I'm using except maybe the terminal (it's lxterminal and LXDE is moving everything to Qt) has a very good chance to make it past 20 if it's not already past 20
23:25:29
jasom
we are using different definitions of "last" then since I suspect most of that software has changes made in the past year or two.
23:26:45
aeth
jasom: My point is, if something's going to be around for decades anyway, you should optimize for the multi-decade maintenance period, not the first few years of rapid development
23:27:12
aeth
And a lot of website code is probably already at or approaching this 20 year point now in 2018.
23:27:57
aeth
Of course, a language that's mostly compatible with things written 59 years ago is a good choice to write multi-decade software in.
23:28:35
jasom
a core argument was that if you didn't optimize for being successful now, you will be starved of resources by those that do
23:35:38
aeth
jasom: on the other hand, that essay was refuted a few years later in Worse is Better is Worse by Richard P Gabriel
23:40:22
jasom
"And in preparation for this panel, the organizer, Martine Devos, asked me to write a position paper, which I did, called "Back to the Future: Is Worse (Still) Better?" In this short paper, I came out against worse is better. But a month or so later, I wrote a second one, called "Back to the Future: Worse (Still) is Better!" which was in favor of it. I still can’t decide."
1:01:36
definite
Blackbeard: I was considering installing GuixSD, but everything is difficult with free drivers. I suppose I could use the package manager alone (I've heard that suggestion before, more commonly for Nix + Haskell).
1:02:40
definite
Speaking of Guix, why is there a Scheme distro and no Common Lisp one (AFAIK, I'd be happy to be corrected) if CL is always advertised as the "full-featured systems language" of the two?
1:04:06
aeth
definite: What really makes a distro is the package manager and its software respositories... So I guess the only thing is that people haven't written a Unix package manager in CL (or at least not one that has any major adoption)
1:04:29
aeth
A modern package manager would need encryption, probably through https://github.com/sharplispers/ironclad if that's mature enough
1:04:32
definite
aeth: No, my Thinkpad has a whitelist of available WiFi cards and the one that I got to replace the old one isn't on it. I'm looking into bypassing it, but the only guide I've found which promises not to brick my computer is really old. Blackbeard: More of a question for the CL people.
1:07:19
definite
no-defun-allowed: Which Thinkpad is that? I got a T400 just to Libreboot it, but apparently you have to take apart the entire thing. I'm considering getting an X200 (only have to take off casing next to keyboard to access flashchip) and relegating this one to server duty.
7:01:59
Demosthenex
i was just reading https://stackoverflow.com/questions/1403717/how-do-i-iterate-through-a-directory-in-common-lisp where someone says cl-fad doesn't handle symlinks, but the cl-fad docs i was browsing says it can optionally follow them...
7:07:34
jackdaniel
osicat is another solution (it is also ffi based, but it doesn't libfixposix) which behaves thesame on all implementations
7:30:52
jackdaniel
ffi gives you uniform behavior, because you aim directly at your operating system interfaces
7:31:19
jackdaniel
so there are divergencies on how these chapters are interpreted by different CL vendors
7:32:36
jackdaniel
iolib uses library called libfixposix which fixes some inconsistencies between POSIX implementations (hah!)
7:33:39
Demosthenex
i'd have used the default or cl-fad, but i don't do much with files atm, still learning
7:33:56
Demosthenex
it only came up because i was discussing finding files in a dir via wildcard with Blackbeard
7:34:48
Demosthenex
cheap plug: i'm loving stumpwm. its so cool to be able to connect slime to my WM and update it live
7:36:49
Demosthenex
and being able to port over several pages of lua code for awesomewm for my window management into a single function was enlightening
7:51:06
|3b|
trying to make a large file smaller, currently saves ~50MB with normal *print-circle* on individual forms, but still lots of repeated keywords
7:53:57
heisig
Just for fun, have you tried converting the data to a single quoted literal in a file and compile it to a fasl? Then the compiler would coalesce the shared structure for you :)
7:54:09
|3b|
maybe i should just leave it as 108MB of readable source instead of 50MB of line noise :p
7:54:34
|3b|
fasl isn't really suitable for checking into git repo though, particularly if i ever want to upgrade my lisp :)
7:55:52
|3b|
ACTION could also try to combine circularity between forms, but that would probably require writing it out and reading back in, which would lose formatting
7:56:46
Shinmera
|3b|: Still not as big as the fasl qtools generates if you precompile all qt method wrappers
7:57:10
|3b|
something like 4.5k defpackage forms + same # of forms to specify how to call the methods named by the packages
7:59:18
|3b|
ggole: i'm writing a cl-like compiler targeting dalvik bytecode, and this is the FFI definitions for the android APIs
7:59:48
|3b|
Shinmera: maybe i should just generate the .fasl directly from the .jar file and check that in instead
8:01:01
|3b|
though probably a bit slower to load jar, parse it and generate package defs than to read and compile the generated lisp file
8:02:54
|3b|
compiler has exactly enough to compile calls to a superclass, or to methods of arbitrary class, passing either arguments to the method being defined or literal integers, assuming all have type declarations :p
8:04:01
|3b|
which is enough to define an onCreate method that sets the view to a hello world screen defined as a resource
8:05:56
Shinmera
what's your ultimate end-goal? The Android API is so unbearable that I don't know if even writing Lisp could fix that
8:08:29
|3b|
few small utilities, like scanning a barcode and sending to a web server, and also playing with the android AR stuff
8:12:11
|3b|
don't really /need/ the barcode thing, and the AR stuff is as much for fun as anything, so if i'm having similar fun writing compilers i might as well :)
8:12:49
|3b|
hmm, parsing the .jar file is only ~2sec if it doesn't spam debug prints, that isn't too bad
8:13:05
Shinmera
I was just having horror flashbacks to writing Ocelot, an Android client for the Lichat protocol
8:13:28
|3b|
ACTION wonders how hard it would be to build the defpackage and ffi info directly from it instead of printing it to a file
8:14:39
|3b|
not sure how hard it would be to get a monitor running on android that i could send chunks of code to for interactive dev from slime
8:16:24
|3b|
ACTION things it has an API for runtime loading from memory, but not sure how it interacts with attempts at redefinition. might need a dev mode where stuff calls stubs i can redefine or something
9:53:19
phoe
I have a protocol class named MESSAGE. It's going to be subclassed many times to create concrete classes representing different kinds of the messages in my system.
9:53:58
phoe
Messages are also going to have responses - if there's a message named HELLO, then there are going to be responses named (OK HELLO) and (ERROR HELLO).
9:55:34
no-defun-allowed
well i want to create a class programatically, so i can take a netfarm schema and create an equivalent CLOS class
9:56:15
phoe
I kind of want a dual inheritance scheme, where each message can be named after its class - HELLO, LOGIN, LOGOUT, SEND, ... and so on
9:57:00
phoe
But I also want each message to have this "state" - it can either be a normal message (NIL), be a confirmation to an earlier message (OK) or an error reply (ERROR)
9:58:35
phoe
Shinmera: did I? DEFCLASS makes a new instance of the CLASS object and gives it a global name
9:59:34
no-defun-allowed
i can make an anonymous function with lambda, is there a similar thing for classes?
9:59:39
beach
no-defun-allowed: http://metamodular.com/CLOS-MOP/initialization-of-class-metaobjects2.html
9:59:57
shka_
phoe: i think that you can simply create operation class and then have generic function called message that will simply dispatch on operation and accept &rest arguments
10:00:04
phoe
Anyway - in my use case, I'll have messsages named HELLO, (OK HELLO), (ERROR HELLO), LOGIN, (OK LOGIN), (ERROR LOGIN), ...
10:00:58
phoe
Anyway - it makes sense to me to have mixins for MESSAGE, OK-MESSAGE and ERROR-MESSAGE, and then the hierarchy HELLO, LOGIN, LOGOUT, SEND, ...
10:01:46
heisig
shka_: I am not sure whether I will use lparallel for managing my threads or not. It is certainly a great library. I use it mostly for its utilities, like queues and promises.
10:01:53
phoe
But this means that I'll need to define classes like HELLO, OK-HELLO, ERROR-HELLO, ..., which causes me to define 3*n classes in total. This looks like combinatorial explosion to me.
10:02:47
Shinmera
phoe: what I do in Lichat is I define error classes for specific circumstances and tag every message with a unique id that others can reference
10:03:46
beach
no-defun-allowed: It is a bit involved to do that. You need to read that page and a few more to understand what you need to do.
10:04:36
phoe
To avoid creating statuses, I could use keywords and EQL specializers, methinks. (NIL :OK :ERROR) sound like a good choice.
10:06:02
phoe
shka_: my status would be a very dumb object though, it's literally a member of (NIL :OK :ERROR).
10:07:16
shka_
anyway, you can simply abstract this in make-message where you are accepting operation and status symbol
10:09:31
shka_
because :error appears to be something that should contain some sort of description of what wen wrong
10:10:21
no-defun-allowed
i might need to do more reading but to make the slot you need the class definition and to make the class you need the slot definition
10:10:44
phoe
no-defun-allowed: you might want to read AMOP, where a CLOS-like object system is implemented in raw CLOS-less Common Lisp
10:11:14
phoe
basically, you can go from a CLOS-less Common Lisp to a CLOS-ful Common Lisp using nothing but the facilities embedded in the language
10:11:42
shka_
it has it's default implementation and it is really nice, but it is not the only possible
10:13:36
beach
no-defun-allowed: I am in the middle of implementing CLOS, so I have much of that relatively fresh in my head. So let me know if you need help.
10:14:10
beach
no-defun-allowed: If you had read up on that, you would have seen that they are just lists.
10:15:32
beach
"Each canonicalized slot specification is formed from the corresponding slot specification as follows: ..."
10:15:33
no-defun-allowed
the example on http://metamodular.com/CLOS-MOP/initialization-of-class-metaobjects.html is handy
10:21:00
Demosthenex
so anyone here using sly? worth trying as a n00b, or functional enough to get by?
10:21:58
jackdaniel
some people are using it (here included) and they seem to like it more than slime
10:21:59
Xach
Demosthenex: it has a lot of cool features and is probably easier to try for someone new than someone with a lot of slime muscle memory
10:22:28
Xach
I want to use sly more but I have a tension between wanting to be as productive as I am with slime and learning a different way
10:24:47
phoe
Is there any way to print only N first characters of an object's printed representation?
10:25:29
phoe
For (1234567890) if I want to print only five chars, I'd like to get "(1234.." or something similar
10:27:47
jackdaniel
four riders of the apocalypse: loop, format, clos and clim, none intelligible (half joking ;)
10:32:48
jackdaniel
phoe: if you make something of your own, take into account, that if it fits it sits. if you'd like to have at most 5 characters, then it would be "(12.."; but for (123) you should have full "(123)"
10:36:50
jackdaniel
McCLIM has quite elaborate transformations api which as everything one would need (given we take only transformations into account)
10:37:54
Xach
Shinmera: oh, that is so easy you could almost accidentally write it from scratch every time!
10:38:41
Shinmera
yea, which is why there's already so many matrix-y libs out there (plus innumerable ad-hoc ones, I'm sure)
10:50:05
jackdaniel
currently software renderer uses cl-vectors, but vecto api looks like a hit for it
10:50:51
cods
Xach: hi. Is someone maintaining cl-vectors these days? I doubt it was perfect as is :)
10:51:35
cods
I was supposed to convert the documentation to something more usual at some point, but never took the time to do it.
11:07:02
Xach
jackdaniel: http://report.quicklisp.org/2018-09-27/failure-report/mcclim.html#mcclim-raster-image fyi
11:12:20
Xach
jackdaniel: how about mcclim-clx-fb? http://report.quicklisp.org/2018-09-27/failure-report/mcclim.html#mcclim-clx-fb