freenode/lisp - IRC Chatlog
Search
1:00:06
fiddlerwoaroof
It's just implemented in terms of the native os guis and it's easy to abstract over
1:01:11
jcowan
The Web is perfectly usable for documents. 90% of my interactions with it are with the document web.
1:01:26
Odin-
Something like the web model would be a good solution. You know, if it was properly designed for the role, with proper communications channels available right from the start. *cough*
1:02:56
p_l
White_Flame: the issue is that project like CAPI requires significant time investment to handle not just the 80% that one needs for current project
1:04:24
Odin-
jcowan: I was exaggerating for effect, although I'd also note that HTML doesn't seem to be anyone's choice of authoring format.
1:05:45
p_l
that is, CLIM is very interesting system but also totally alien to pretty much all systems (curiously enough it might look the least weird in classic X11 environment and among software from such era)
1:06:19
White_Flame
from what little I've heard of it, CLIM might be more akin to HTML than anything else
1:06:32
White_Flame
given that the objects it renders are more "live" from a programmign perspective
1:09:19
p_l
VSCode is an example of what can you do if the people you send to chisel in shit are masterclass
1:10:02
Odin-
p_l: I was surprised by how usable it seems to be as an editor, but holy crap is that thing insane in so many ways.
1:12:47
Odin-
And I know people who use Atom who ten years ago mentioned memory use as a reason not to use emacs.
1:14:27
p_l
Odin-: Atom is less egregious than Slack, but I'd still consider it part of EGACS class :)
1:26:09
White_Flame
I think that any new GUI system should also offer backends for VNC server and web-hosted
1:26:51
White_Flame
hmm, nah, VNC is kind of redundant, as something still needs to convert GUI elements ot pixels
1:27:27
fiddlerwoaroof
Oh, maybe Pharo Smalltalk's morphic system could be good if they stopped pretending to be a vm
1:28:31
White_Flame
yeah, I did a couple of fake desktop multi-window systems in my early programming, and it is Not A Good Idea™
1:30:31
fiddlerwoaroof
The little experiments I've done with mcclim are enough to convince me that it would be much nicer than emacs
1:33:06
White_Flame
ugh, reading the CAPI docs, they specifically declare coordinates are integers. That's not a good sign
1:35:23
White_Flame
yes you can, especially when dealing with rotated/transformed placements and vector drawing objects
1:39:50
fiddlerwoaroof
Are the coordinates specified to be pixels? I haven't really looked at the drawing apis
1:40:23
White_Flame
the more I think about GUIs, the more I just want to defer all the fiddly bits to HTML. It takes care of transforming anything, animating anything, antialiasing anything, and tries to make it fast.
1:43:50
fiddlerwoaroof
Sure, but at some point you're just standing on top of a teetering pile of junk
1:44:30
White_Flame
fiddlerwoaroof: it's not a stability issue, and it does pull off dynamic layout better than anything else in terms of flexibility and options
1:45:39
fiddlerwoaroof
It's not stability, strictly speaking, it's that you need 16GB of memory to run a modern web browser
1:46:19
White_Flame
with lots of tabs, yes, but that's the cost of having truly flexible, dynamic, fast (for what it does), and high quality layout/text/vector rendering
1:46:43
fiddlerwoaroof
Know, it's the cost of implementing things like privilege separation 5 or six times between the application and the cpu
1:48:21
fiddlerwoaroof
... I can't type: Chrome's memory usage is the cost of the nested runtimes that come between your web app (each of which looks however it wants to, with no regard for what the user wants it to look like) and the cpu
1:50:28
fiddlerwoaroof
Yeah, Apple didn't want to license display postscript, if I remember correctly
1:50:50
Odin-
Hm. I was under the impression it used the same drawing model, but dropped the Turing-completeness.
1:50:51
White_Flame
Odin-: I need to look into display postscript and how it dealt with dynamic changes. I have done a lot of postscript as a programming language and static 2d printing, however
1:51:10
p_l
fiddlerwoaroof: they found the cost too high back in the yellowbox era, then later they dropped yellowbox after having redone the graphics layer anyway
1:51:29
White_Flame
and regarding memory footprint, certainly using blink/gecko/etc should be lighter than the full browser
1:52:36
LdBeth
In the old days when the bandwidth was low they preferred to transmit drawing algorithms rather data structures to drawing clients
1:53:12
fiddlerwoaroof
White_Flame: maybe if you excluded javascript you could reduce the footprint, but spinning up a simple webkit app takes like 4G memory
1:53:18
Odin-
White_Flame: Yeah, but the rendering is entirely dependent on DOM, which is deeply linked with JS, so you can't really get it out of there.
1:54:05
fiddlerwoaroof
Yeah, but when I've experimented to just launch a simple web-view, the memory cost was still pretty high
1:54:33
fiddlerwoaroof
it's been a while, but I pygtk app that contains a webkit pane took 1-4G memory last I checked
1:57:37
White_Flame
that seems awfully whacked, given that my current FFs & chromiums that are open with lots of stuff are "only" taking a few GBs each
2:01:15
White_Flame
my running tor browser, which presumably keeps everything in RAM as to not leave traces between identities, is taking 588MB
2:44:41
jcowan
speculative question: what could be done that cannot be (beautifully) done now if dynamic variables were first-class?
2:54:09
aeth
jcowan: Do you mean what does CL do with dynamically scoped variables that couldn't otherwise be done in a nice way?
2:58:38
jcowan
No. I mean that if dynamically bindable objects were first-class rather than being attached permanently to indefinite-scope variables, what could be achieved with this relaxation?
3:00:28
LdBeth
What static scope do is simply make lisp behaves more close to call bye value lambda calculus
3:00:56
jcowan
Do you mean that you can't think of anything (neither can I) or that you can show that first-class status would not add either power or expressivity?
3:02:39
LdBeth
and building a more expressive call by name lambda calculus is possible with dynamics scoped lisp, i.e. INTERLISP
3:05:29
LdBeth
I think the main contribution is it enables to take advantages of some modern compiler techniques
3:11:43
jcowan
http://readevalprint.tumblr.com/post/145348323128/all-you-need-is-progv is interesting
3:13:47
jcowan
CLtL says "progv is particularly useful for writing interpreters for languages embedded in Lisp", but presumably this is only true if those language use dynamic binding.
3:18:59
White_Flame
I don't understand why compile is considered more valid than eval for runtime-generated sexprs
3:20:23
jcowan
https://codegolf.stackexchange.com/questions/53250/optimizing-ski-compiler is a compiler for SKI machine specifications; the CL version uses progv.
3:21:16
White_Flame
obviously, the article is using COMPILE's sexpr->executable facility as its primary feature, which is generally equivalent to EVAL in "wrongness"
3:25:05
LdBeth
<freenode_jco "claiming that `compile` evades t"> jcowan: you can use closure to avoid compile at run time
3:33:38
LdBeth
White_Flame: that’s like... you want to compile a file and of course one cannot avoid doing actual compilation
3:35:11
White_Flame
yeah, if you just mean CPS with your closure above, that's something I've done before
3:37:57
White_Flame
I mean trace through an AST for an expression, linking up pre-compiled lambdas together with CPS to yield a basic executable form of it
3:41:31
White_Flame
right, the above linked "eval is bad" to the same thing that compile does, in turning data into executables
3:41:56
White_Flame
then an idea of only using closures was presented, but doesn't do the same thing
3:44:41
LdBeth
Well it’s just happened to be calling a lisp compiler to compile sexps but the principle is the same as calling a C program translate SQL strings to a more compact form
3:47:18
White_Flame
depends on if the specific principle distinguishes between software interpreters and compilers :)
3:48:01
copec
It would be cool to have a distribution of typical results per language...like get the students to all implement one of the problems at the end of an algorithms course or something
4:05:23
elderK
I'm writing my own binary-structure kinda thing. Mostly for fun, but also because I found some deficiencies in other ones.
4:05:39
elderK
Anyway, you have some "binary type", which is like a primitive type that can be extracted or read.
4:06:34
elderK
Anywho, The "primitive type" could be anything, say, u128/be or whatever. I want to have a generic function that computes the "lisp type" of that primitive. So, if I had say, u32, I'd get (unsigned-byte 32)
4:07:45
elderK
It's not a header, though. It's just some primitive type that can be extracted. LIke an integer or float say.
4:12:12
LdBeth
Ah, you say it can be a string, so I thought it can have some other structure as type
4:12:45
elderK
You can define "binary structures" that will be parsed from disk, say. Like in PCL. Structures have slots that are other "binary structures" or say, "primitive types." These primitive types are things you define - like u32, u16, whatever. PCL does not generate any type information for the "slots." I will. So, given some "primitive type" (not a Lisp type), I need to generate a "Lisp Type."
4:13:51
elderK
What the mapping is, and how to read / write "primitive types" is set by a macro, define-binary-type, to use PCL's name.
4:15:20
elderK
Another question, is like, what's the deal with error reporting / validation from within macros? say, I want to ensure that someone uses the macros correctly.
4:19:55
pillton
The term, macro, is short for macro function. You can signal errors in macro functions if you like. It is probably best to do so.
4:21:55
LdBeth
About the other question, unfortunately you have to handwrite checking and error reporting, however it might be time to adopt @beach ‘s concrete-syntax-tree lib which has parser utilities for common macro constructions
4:55:52
aeth
Also destructuring-bind. That will catch a bunch of syntax errors that you can't express directly in the macro's lambda-list
4:56:29
aeth
something like this: (dolist (sublist list) (destructuring-bind (foo bar &key baz quux) sublist ...))
6:46:09
elderK
Hmm. I'm trying to unquote several levels. It's weird. Saying something like ,,something results in an expansion of ,whatever
6:59:52
fiddlerwoaroof
One trick that often helps is have your first level of quasiquotation call functions that do the actual parsing/construction of forms.
7:01:07
fiddlerwoaroof
e.g. here I've split the generation of the resulting expression across several functions and let bindings: https://github.com/fiddlerwoaroof/fwoar.lisputils/blob/master/fwoar.lisputils.lisp#L131
7:12:05
elderK
I don't think the way I'm trying this is really working out. I defined a generic function to like, handle the validation and expansion of certain "forms" in my ... macro
7:12:44
elderK
A method, expand-specifier would be executed, keyed on the :reader. It'd check the form was sane, then generate the appropriate expansion
7:38:54
fiddlerwoaroof
It works really well, but I've always been a bit concerned about the implications of this bit of the standard: "defmethod is not required to perform any compile-time side effects. In particular, the methods are not installed for invocation during compilation."
7:39:42
fiddlerwoaroof
I believe this essentially means that your defmethods need to be in a different compilation unit from the use sites of the generic function, if you want your code to be portable
8:01:37
no-defun-allowed
why does SBCL have `&rest args` in the lambda list for POSITION? it's not there in the clhs.
8:07:14
no-defun-allowed
my guess is it eats keywords it doesn't accept, it's present in some other functions too
8:12:43
jackdaniel
having '&rest args &key …' is useful, when you want to pass args further without extra consing
8:15:36
no-defun-allowed
now i realised using lambdas as arguments to a CLOS thing was a Bad Idea and multiple dispatch would have worked better
8:15:49
no-defun-allowed
or something like that. either way i'm wading through funcalls to fix it now :')
8:16:36
jackdaniel
you may want to look into filtered-functions (library written by Pascal Costanza)
9:03:36
elderK
:( Man I know what I want to do, and what I want to generate. But I'm having a really hard time doing it in a way that I feel comfortable with
9:04:32
elderK
Out of curiosity, if a macro is exported from a package, and uses some functions that are defined in that package but not exported, will it still expand correctly if you import that macro into another package?
9:04:46
elderK
Like, the macro is imported. But the things the macro relies on, are "internal" to the package we're importing from.
9:05:15
elderK
I get the feeling it is. I'm pretty sure I read somewhere that the stuff that's in effect at the time the macro was defined, is what is used when it is expanded.
9:07:49
elderK
Is it okay to expand to a (progn) in a macro expansion, if say, something is optional and you don't want to include it?
9:08:40
elderK
Like say, the macro proper makes a bunch of calls to helper functions, to actually generate expansions. But maybe one such helper detects that an optional element of the macro isn't present. Ah, thanks jackdaniel.
9:12:59
no-defun-allowed
my reading of the clhs says "no using it outside the dynamic extent" which i think is outside that part of the stack, so "no" but idk
9:13:22
fiddlerwoaroof
For a lot of places where you would walk the body like a tree, you can just use macrolet to define a local macro that handles the car of the subform you're interested in
9:14:52
shka_
what you can even do is to generate both flet form and symbol-macrolet that will expand into call
9:18:16
fiddlerwoaroof
because the forms you don't generate a symbol-macrolet for don't turn into function variables
9:20:23
shka_
trick is that symbol-macrolet maps to labels, labels ensure that let is initialized and let form store actual value
9:20:27
elderK
fiddlerwoaroof: I'm not sure I really understand at this point. But it sounds very useful.
9:20:58
elderK
Gosh, I wonder how long it will take until I feel comfortable :( I guess I'll finish what I'm working on now, it'll probably be pretty horrible. But at least then, I can get feedback and iterate on it
9:58:17
dim
elderK: well I would say that the point about macrolet usage in macros is pretty advanced stuff, maybe the call-with- trick is a better way to get starting with macros
9:58:40
oni-on-ion
i am wondering to myself why lisp-1 would be annoying where lisp-2 is nice, because who names functions and variables the same without introducing obfuscation? and is that actually a more frequent requirement than working with functions without special [fun]calls?
9:58:52
elderK
dim: I'm not sure if what I'm trying to make is considered "more than what a newcomer could do" or not D:
9:59:06
elderK
Life would be made a lot easier if I used alexandria, but I would like to stick to the core language for now.
9:59:31
dim
well if you're having to use macros, it qualifies at more than what a newcomer is expected to play with I would gather
9:59:53
fiddlerwoaroof
oni-on-ion: honestly, something like (swap (list) (list* (cadr list) (car list) (cddr list))) reads just fine
10:00:22
fiddlerwoaroof
For it mirrors noun/verb ambiguity which generally isn't a cause of misunderstanding
10:01:34
fiddlerwoaroof
The compiler can check the symbol's function cell to see if a function has been defined
10:01:37
oni-on-ion
i asked schemers "why is t #t and not t?" and they say "because you might want to call a variable t" . cringe
10:02:12
aeth
oni-on-ion: Implement <insert formula from physics here> and you probably want to use the variable name t
10:02:24
fiddlerwoaroof
Also, there's plenty of ways to avoid funcall: FLET/LABELS or write a bunch of combinators that take functions and return lambdas
10:02:30
aeth
oni-on-ion: And even worse, if it's from mathematics closely related to physics, it is just t, it isn't time
10:03:02
oni-on-ion
aeth: thats a real reason? i use t all the time. but there are other letters. it feels like you could be suggesting "why not have a (varcall x)" then !
10:03:16
fiddlerwoaroof
e.g. (funcall (over (juxt #'car #'cadr)) '((1 2 3) (2 3 4))) ;; => '((1 2) (2 3))
10:03:23
oni-on-ion
or; why are functions especially-accessed instead of variables ? what if it were the other way around?
10:04:35
aeth
oni-on-ion: It's more like if a language used both "pi" and the actual greek letter "π" to mean something unrelated to the constant. I mean, sure, you could call 3.1415... something else, but the clearest name is probably pi.
10:05:10
aeth
alexandria:lerp uses v but literally all material everywhere else will use t here: https://gitlab.common-lisp.net/alexandria/alexandria/blob/e5c54bc30b0887c237bde2827036d17315f88737/numbers.lisp#L89-100
10:05:50
fiddlerwoaroof
Anyways, I can say that everytime I write javacript or clojure, I miss lisp-2s
10:06:31
aeth
oni-on-ion: t is basically the one place where Scheme has an advantage over CL against name collisions (usually Scheme's the language with the problem there)
10:07:20
fiddlerwoaroof
Also, a lisp-1 needs a hygenic macrosystem more than a lisp-2, especially if it doesn't also have something like packages
10:19:47
LdBeth
Then you should notice PLT’s macro operates on the “syntax” which automatically provides error checking
11:45:24
minion
progv: PROGV is a testament to the success of synthetic methamphetamines in the rearing and education of the inveterately brain-damaged contributors to the X3J13 standardisation proceedings
12:01:02
ogamita
Yes, harsh. At least for the California side of the comitee. They learned to use LSD creatively there. To wit, Steve Jobs, etc.
12:31:33
larsb
Just wanted to say we do have Muddle running on ITS on a PDP-10 emulator. Come over to #PDP-10 if you want to know more.
12:44:38
jcowan
A more principled Scheme answer would be "Scheme doesn't restrict which identifiers can be lexically bound."