freenode/#lisp - IRC Chatlog
Search
7:16:20
hjek
jackdaniel: application-frame could make sense in postscript though. https://en.wikipedia.org/wiki/Display_PostScript
7:18:54
beach
sunshavi: I am way outside my comfort zone here, but you could check whether :sb-thread is a member of the *features* list.
7:21:12
beach
hjek: A typical application for the PostScript backend (and for the PDF backend as well) would be if you have something like Gsharp (and editor for music scores). The saved PostScript document should then be a printed version of the score. The document should not contain the buttons, the interactor pane, the scroll bars, etc.
7:32:33
beach
Ukari: You export whatever names you want to use from a different package, whether they be the name of the struct, the accessors, the constructors, whatever.
7:34:24
beach
sunshavi: Check with jackdaniel first. He is the maintainer of ECL, and of McCLIM, so he would know whether that is good advice or not.
7:35:18
Ukari
i defstruct a (defstruct iterable-object (value nil) (next nil :type function)), and export by (:export #:make-iterable-object #:iterable-object-next #:iterable-object-value)
7:36:07
beach
Ukari: The Common Lisp implementation can not decide for you what functionality you want to make available to client code.
7:37:20
beach
Ukari: Like I told you, in a typical application you definitely do not want to export the names of the accessors of all the slots. That would be contrary to good software-engineering practice. And, again, the Common Lisp implementation can not decide what kind of protocol you want to suggest to client code.
7:38:12
beach
Ukari: If it so happens that you are not applying any particular modularity concerns in this case, then unfortunately, you are the exception, and you then need to export everything.
7:40:32
fourier
about having to write a lot of manual "exports" for automatically generated functions
7:42:12
beach
fourier: Only in applications that do not respect the slightest software-engineering technique would one want to export the names of all the accessors, and even less so of the slot names.
7:42:17
fourier
yes it makes sense. "I want to export all readers of this class/struct" - it is the applied modularity.
7:42:34
beach
fourier: Common Lisp was not made for people that have absolutely no concern for basic modularity.
7:43:19
beach
fourier: If you find yourself wanting to export the names of all the readers of some class, then there is very likely something wrong with your abstraction.
7:46:15
beach
There could *occasionally* be a need for that, but not often. Therefore, having to export everything is an exceptional situation. For exceptional situations, you then have to deal with the additional work of manually exporting everything. It would not make sense to have a special mechanism in the language for that, because it is, well, exceptional.
7:46:45
fourier
you put it to separate package to avoid name collisions for trivial accessors like "name" "age" etc
7:49:45
beach
Of course. But if the struct is only used as an aggregation of stuff, it would typically be in the same package as the client code. The package boundary is more likely used to define an abstract protocol that is not concerned with how things are stored.
7:50:32
beach
And, again, because they are exceptional, there is no need for a specific mechanism for exporting everything.
7:51:11
beach
So, again, yes, you would then have to manually include all the names in the package definition. Big deal.
7:58:07
Ukari
beach's option is acceptable if treat defstruct into constructors-function and slot-function. but if treat defstruct as static defination of a struct and it need to be use somewhere just like class in java or struct in c header, i thought defstruct should be more combined than spearated into divided functions
8:04:40
puchacz
hi, can salza2:deflate-compressor be passed an argument so it uses "no compression"?
8:05:35
puchacz
I want to let a user download a bunch of media files bundled together, and they are compressed already, so there is no point of wasting CPU (if there is any significant waste) on trying to compress them
8:11:30
Ukari
i use '(make-iterable-object :value nil :next nil)' with the defination '(defstruct iterable-object (value nil) (next nil :type function))', but it tells me :next is a function type and couldn't be nil
8:19:04
Ukari
if there is a system foo, with some packages syntax, util, which naming style is suitable. 'cl-foo-syntax, cl-foo-util' or 'cl-foo.syntax, cl-foo.util'
9:16:47
jackdaniel
on the other hand I will be able to debug problems on McCLIM <-> ECL line (because I know both considerably well)
16:49:02
Ukari
is cl-cont open source? i meet a wired warning which seems to tell that a argument's type is different from declared in cl-cont::lookup
16:49:26
Ukari
the message: "Derived type of CL-CONT::LOOKUP is (VALUES CONS &OPTIONAL), conflicting with its asserted type (OR FUNCTION SYMBOL)"
17:50:33
foojin
Maybe it's about "having something to show instead of simply complaining", but in the end I find the submission/review process itself too difficult and apply the fix locally.
17:59:07
foojin
Sometimes I just think I don't understand the codebase well enough to consider my solutions anything but hacks.
18:02:33
foojin
THe giflib one is most likely fixed by now, because it's about long filenames messing with an uninitialized structure field, which breaks the whole thing randomly.
18:08:17
foojin
The thing is, I'm not proud of what I do. Seeing how everything is so brittle and poorly understood even by its creators makes it hard to be proud of my small contributions.
18:08:20
pjb
foojin: it's not the little student card a university temporarily gives you that makes you a student.
18:17:43
foojin
pjb: Yes, that way I could hopefully understand the issue from a mathematical perspective.
18:17:46
foojin
I'm also interested in learning type theory to gain some insight into what I (for a long time) thought is true: that all of mathematics has a computational content to it.
18:21:19
foojin
Come to think of it, mathematics has already reached a level of complexity which can only be tackled by clever abstraction, so people _have to_ be clever about adding more to it.
18:24:27
foojin
But it doesn't help to harness the power of computers, to save oneself from mediocrity of not being able to intervene in, say, the process of interpreting someone's minified Javascript.
18:29:41
foojin
So I don't really know what to do in such a situation. BTW sorry for being off-topic and (possibly) being a nuisance.
18:33:12
foojin
The point is, even after learning enough to be able to fix broken stuff around me, it still feels like I'm not flying above the surface, but merely crawling out of an underground cave. It takes time just to stay afloat.
18:35:48
foojin
shka_: Yes, for a long time I thought that JS is actually a decent language. Not anymore, not after reading about its coercion rules and having stuff break silently because of _syntax errors_.
18:55:15
foojin
fe[nl]ix: I'm going to install Gentoo for that very reason, but the last time I tried to switch I couldn't find a way to make emerge print dependencies in a sane way.
19:01:45
foojin
Digging around in ebuilds just to understand why it installs X along with Y isn't fun. I think a package manager should do it for me, so I'll try it for real when I get around to patching it.
19:04:52
foojin
By the way, what do you guys think about Guix? It looks like someone finally tries to make a "uniform" (configuration language-wise) distro for people who aren't afraid of programming.
19:14:12
foojin
fe[nl]ix: The worst thing is that it's most likely true. "A distro for people with an \"optimal\" amount of free time to make it work like they want" looks like an unattainable ideal.