freenode/#lisp - IRC Chatlog
Search
18:58:35
vms14
did you play with images and lisp? I'm looking at cliki, there are a lot of libraries to choose
19:00:58
aeth
although technically speaking since that's true any implementation is free to build it in :-p
19:02:11
vms14
CL-PNG depends on libpng (your operating system distribution may have a separate package, called libpng-dev or
19:03:51
aeth
vms14: pngload was written to replace pngread in opticl and other places according to the readme, I think. https://github.com/HackerTheory/pngload
19:03:56
pjb
And sometimes you want to read jpeg, but cl-jpeg can't read JPEG format C2 (and others).
19:06:20
aeth
ImageMagick is nice on Unix in general. I use import all of the time as my main screenshot program for stumpwm since stumpwm afaik doesn't come with one. Using all-in-CL libraries reduces headaches, though.
19:07:01
pjb
If you keep using FFI, you're not putting pressure on the lisp ecosystem (implementations, libraries) to improve!
19:07:49
Xach
vms14: when i was running a server that did a lot of image stuff, i wound up using sb-ext:run-program with imagemagick tools. i wrapped it up with functions so it looked like lisp code rather than shell code. i processed tens of thousands of files per day, worked fine for me.
19:07:53
jackdaniel
(or implementations which operate in FFI land! - that leaves movitz and mezzano)
19:07:59
aeth
pjb: You generally have to eventually use FFI somewhere for input/output unless it's built into the particular implementation. clx is quite possibly the only exception there due to how X works.
19:08:18
vms14
Xach: xD I was thinking on doing that, but I thought meh, better if I just use a library from lisp
19:08:59
Xach
e.g. i would do something like (combine (make-caption-file "Hello!" "caption.png") (scale-base-image "original.jpg" "scaled.jpg")) or some nonsense like that!
19:09:07
aeth
pjb: hence "unless it's built in". You don't need to use FFI to be part of a Unix pipe, for instance.
19:13:15
aeth
although a full unix-philosophy OS where everything's a file wouldn't need FFI either, I guess, if that's what you meant
19:16:57
aeth
I prefer function-level/module-level composition to program-level composition like Unix or, more recently, microservices
19:17:17
vms14
so having imagemagick which handles image stuff I have yet something that does "one" thing, not one really,
19:17:55
White_Flame
it's generally impossible to "make one thing well", because different usage cases want different access styles & prioritization of its feature sets
19:18:43
aeth
White_Flame: There's only a finite amount, though. So what if different people need 10 PNG libraries with different use cases? There's room for them as long as their names are unique.
19:19:21
White_Flame
vms14: push vs pull semantics are an example of function-level impedance mismatches
19:20:32
aeth
Somewhat tangentially, https://news.ycombinator.com/item?id=20689932 about Amiga was on HN recently and it referred to https://news.ycombinator.com/item?id=9935892 about how Amiga handled images through an OS-level abstraction called "datatypes"
19:21:36
aeth
beach: I wonder what your thoughts on that are, and if something similar could work for Lisp, since you're the OS expert here
19:23:34
aeth
Essentially, it made programs forwards compatible so proprietary Amiga programs that haven't been touched in decades can handle things like PNG, apparently.
19:23:53
White_Flame
aeth: well, it also introduced a lowest common denominator that you access stuff through as well
19:24:31
White_Flame
afaik, datatypes were more about generic display than actual data processing, but I'm not sure
19:24:37
aeth
White_Flame: If you're saying that as a disadvantage, I don't see how. Nothing stops an application from also supporting other things.
19:24:54
jackdaniel
vms14: you need to differentiate html/js/css (which is input for a browser) from a language it is written in
19:25:41
vms14
jackdaniel: xD yeah, but in a browser written in lisp we would be able to implement this stuff quicker
19:25:48
aeth
I know Firefox can't be written in HTML, but I'm not sure why Firefox isn't written in XML. You can program with XML! It definitely was a mistake to (mostly) kill XHTML.
19:26:35
jackdaniel
I think I'm lost and I'm sure I don't want to follow anyway ,) I can only say that we are getting into offtopic
19:28:41
White_Flame
aeth: re-googling the topic, yeah it was basically for showing pictures, playing sounds, and displaying some documents, with minimal program interaction with the data
19:28:53
jackdaniel
you can't have lisp browser, but what about lisp checkers, hmm? https://imgur.com/XvjBCp3 ;-)
19:29:40
White_Flame
certainly handy for generic presentation use, but it's not a programmatical data access mechanism for program code to be able to process arbitrary file contents
19:30:01
aeth
White_Flame: I think you could also convert it to the standard IFF format? at least according to a reply to https://news.ycombinator.com/item?id=20690995 if I'm reading it correctly
19:30:40
aeth
White_Flame: and no need to wait for a LispOS, it could be added to something like CLIM (if it's not already there)
19:35:14
semz
vms14: lynx can display images if you install xli (read: make a shell script of that name that calls your favorite image viewer). it's not a bad browser
19:39:31
vms14
but never tried, just showed them to the people to say lisp makes you able to write stuff you couldn't write in other languages
19:41:04
vms14
pjb pointed that we shouldn't use ffi in order to increase the number of lisp libraries instead of relying the existing ones
19:42:18
ebrasca
vms14: It is alive , I have add fat12/16/32 read and write , ext2/3/4 only read and more.
19:43:40
semz
why is mass adoption a goal in itself? i'd definitely not want it if that means rotten compromises like lots of libraries that rely on C blobs
19:44:51
vms14
also, I think lisp is a very powerful language and I'd like to make others realize that
19:45:00
aeth
semz: even if 90% of every library is garbage, then more users => more developers => more libraries => more non-garbage options that can save you time
19:47:12
aeth
ebrasca: afaik, what was going on is that AmigaOS had a library that could handle the presentation of multimedia formats, and possibly even (not sure here) convert that to a standard format on demand, in a way where an application wouldn't need to be recompiled to support a new file format
19:48:10
aeth
This means that any application that used that, at least as a fallback, would be forwards compatible
19:48:42
semz
aeth: this did not happen in many popular languages though. PHP and JS come to mind as particularly offensive examples. polemicizing a bit here, but if the ecosystem's full of shit this fact also drowns any effort to counteract that and causes the users to expect more of the same
19:49:34
minion
The URL https://gitlab.common-lisp.net/users/sign_in?secret=523128fa will be valid until 20:00 UTC.
19:51:11
White_Flame
it's crazy seeing the C version cobble together asm instructions, compared to lisp's solution
19:52:28
jackdaniel
native lisp checkers game, that's what we need in the ecosystem if you ask me ;-) (sorry, I had to, I'll keep quiet about checkers for a few days)
19:55:01
aeth
semz: JS is a unique case because (1) it's (or was) a tiny language and (2) because of the way it's distributed, microlibraries make sense because you don't want to load what you're not using because that will directly add to page load times.
19:55:29
aeth
semz: A lot of other popular languages (e.g. Java) prefer to have (or at least do have) gigantic frameworks
19:56:59
aeth
dlowe: I'm not actually sure if that would break (or at least wouldn't break *everything*) because I think the programs were giving control to the OS for the rendering of the image
19:59:17
vms14
btw about images, do you know if there is a library which will let me convert images to xlib images?
20:46:56
pjb
vms14: you right, the first priority is to make programs the users want to use. Given the choice between no program and a program using FFI, the later is better. But given the choice between a program using FFI and a program using pure lisp code, the later is better too!
20:49:20
ebrasca
Yea mezano can start bare metal , it can see images , videos , probably audio and it support mcclim.
21:09:31
whartung
I’ve forked to imagemagick in the past. It’s great if you can handle the overhead of the fork and the copying of the data. It would work fine. Given that, you can instead of using imagemagick, just go straight to Postscript and render using that (since someone mentioned writing text on images). I honestly don’t know if there is a “postscript” server (that is, something besides a printer which IS a postscript server) that you can connect to more
21:10:00
whartung
I don’t know if there’s a standalone SVG renderer avaliable or not either, but that may be another option.
21:11:09
whartung
as for not using FFI, it’s all a matter of timing and whether you can wait for a native CL implementation of a functionality.
21:11:59
whartung
In java, I avoid JNI in general simply because most of my work is with app servers and an NPE in Java is an exception, but an NPE in a .so is a core dump — not a happy state for an app server.
21:12:44
whartung
That siad, I have exec’d imagemagick from Java in teh past, as I was getting better results from it than native java code. I could have JNId and use the imagemagick directly in Java, but see my previous comment about JNI
21:23:51
whartung
I’m casually working on an ecad board layout to in CL…pretty sure nobody wants that. Especially being it’ll be command driven vs a GUI.
21:24:25
whartung
but, hey, I actaully saw someone the other day ask for a CLI based ecad program, so, who know what niche I may tap in to.
21:52:17
aeth
What makes people run Windows are games and random niche professional tools which are different for every profession
23:04:52
vms14
it's also nice to have it online since you could download it with wget -R and I can read it with lynx, like the author took care of text browsers
4:09:16
beach
aeth: I have always heard good things about Amiga. I am not sure there is much to say about "datatypes" other than that it looks like someone thought about what we would call a protocol and implemented it consistently. That's good.