freenode/#lisp - IRC Chatlog
Search
22:15:27
LexLeoGryfon
u are a cool dude :) but I have personal ( i think) problem with lisp, so I came here to discuss it shortly and confront interests n ideas of this channel...
22:21:04
LexLeoGryfon
i'm mainly a python dev. And I like python very much because of following things: readability, simplicity, dynamism, metaprogramming, ability to write kinda functional style, etc. My problem with lisp is that I made somewhat huge research(in my sense) about it, even tried to code in it (hylang), and for me all this hype around lisp makes no sense, and I find it bullshit.
22:21:36
LexLeoGryfon
I tried to discover advantages of lisps over ruby\python, and found none , practical n useful.
22:21:51
mfiano
I came from Python a decade or so ago, and I can say that all of those are better with Lisp, with the addition of the surprising rapid prototyping aspect.
22:22:19
LexLeoGryfon
there are advantages over languages like C\Java, maybe for their devs LISPS could be mind blowing. but not for python\ruby devs
22:22:24
random-nick
python's meta-programming is a joke compared to most lisps, including common lisp
22:22:52
loli
Python is rather annoying to write in the functional style, where as CL is rather agnostic when it comes to the functional style
22:23:36
White_Flame
and of course, languages like Python and Ruby are their own spin on Lisp-isms, so looking at Lisp will seem kind of old hat, but you won't realize the depth vs shallowness of those featues between languages yet
22:24:17
White_Flame
I'm curious to see an example of Python metaprogramming, if the word even means the same thing
22:25:26
LexLeoGryfon
I wrote two pieces of code to calculate prime number, one in python https://paste.simplylinux.ch/view/88ca76fa which seems ok for me, and one in lisp hylang https://paste.simplylinux.ch/view/9956c6e3 which seems fucking unreadable for me
22:26:48
LexLeoGryfon
pierpa: I don't have issues with perfomance in python world with pypy+cython for cpu-bound, and asyncio+uvloop for io-bound tasks
22:27:23
White_Flame
LexLeoGryfon: lisp is a very, very syntactically regular language. That makes complex code much easier to read than the traditional infix/postfix/prefix mix of other languages
22:27:47
White_Flame
of course, the hylang example doesn't seem to follow quite the same level of regularity, combining both [] and ()
22:28:25
White_Flame
and in metaprogramming and many other features, the benefits of the design decisions behind Lisp emerge when you start writing complex stuff
22:28:28
mfiano
Just read the Hylang README. "It's [Python] really awesome. Oh, and lisps are neat.". Heh
22:29:40
pierpa
OTOH if you are happy with python, don't see any benefit in Lisp, then it's not mandatory to like Lisp. Use Python and be happy.
22:30:19
LexLeoGryfon
can anyone propose me in real world practical daily example of the thing that syntactically looks better in lisp rather than in python? not some rare-meta-bs case that occurs in 1 of 100 days, but something that could occur daily in life of web\script\dev lets say?
22:30:29
White_Flame
and the "Common" part of Common Lisp was a reuniting of an entire family of commercially used, mature Lisps
22:31:17
White_Flame
but any time you create a project-specific macro, your use of it will look better than a macro-less language calling functions & object interfaces to do the boilerplate manually
22:33:08
loli
https://github.com/mariari/Misc-Lisp-Scripts/blob/master/books/Purely-Functional/chapter-3/red-black.lisp#L54
22:33:39
LexLeoGryfon
White_Flame: there are macroses in python . however why not to be happy to insert boilerplate in to functions?
22:33:40
loli
Also most things written in the functional style aren't too well supported in Python due to the lack of a proper list
22:34:22
White_Flame
LexLeoGryfon: because your boilerplate might change, you might typo/forget it, and it creates more inertia to get over to put a new thing into your code
22:35:19
White_Flame
also with pattern matching, lisp macros can reach into your code and extract instances of variables to use for pattern matching directly, reducing the amount of configuration you need to set up to use it
22:36:00
aeth
LexLeoGryfon: The practical use for Lisp over something like Python is controlling when something is evaluated.
22:36:58
aeth
There are lots of ways to control when something is evaluated in Common Lisp. read-eval, reader macros, defmacro macros, modify-macros, symbol macros, inline functions, etc.
22:37:23
White_Flame
as I've said elsewhere, you tend not to even think of those sorts of solutions in other languages, because the tools & work to get there are too complex. But when code generation & transformation is so easy, you're way more empowered even though it's technically feasible elsewhere
22:37:26
LexLeoGryfon
White_Flame: I beleive we can do introspection and change code\instances in runtime too https://stackoverflow.com/questions/4407907/python-how-to-change-functionality-of-a-method-during-runtime#4408225 1-1 lisp vs python
22:37:31
Baggers
Xach: ugh I hadnt pushed the release branch. I'll check the others to see if I have slipped up elsewhere. Is it possible to subscribe to these test results so I see the failures (and hopefully fix them) without bothering you?
22:38:15
White_Flame
LexLeoGryfon: I suggest, if you really want to know the differences, to go through actual Lisp learning/tutorial material to evaluate the differences between the macro systems
22:38:47
random-nick
LexLeoGryfon: but can you easily create a new statement which is just like if but binds the test to a variable?
22:38:50
White_Flame
because no, that's not metaprogramming; that's simply having slots to place function objects
22:39:05
aeth
LexLeoGryfon: You can do most of the things that Common Lisp can do in other languages, but (1) usually it's much harder and (2) you will need to use several very different languages to exactly match the feature set of CL because it's ridiculously multiparadigm
22:42:30
White_Flame
in C, you either need to interpret runtime data (massive slowdown in CLIPS expressions), or do all sorts of massive architecture to get JIT code generation (PCRE)
22:43:03
White_Flame
in Lisp, you can simply generate new code in basically AST form, using literal templates and such right in-language, and have it be machine-code compiled transparently
22:44:06
LexLeoGryfon
random-nick: thats FUN point regarding creation of new syntax\statements , yes we can create macro in python with that https://github.com/lihaoyi/macropy and similiar libs. But for which task do we really need to create DSL? I beleive we could get away with simple functions\classes. even this https://amoffat.github.io/sh/ looks OK fine for me, even without new DSL.
22:44:21
White_Flame
and anybody who's ever built up code in eval(string) oriented languages knows the pain of not having a proper AST form of code available
22:45:11
White_Flame
once you increase the level of complexity, modification becomes difficult without things like DSLs
22:46:26
aeth
Macros have an advantage over functions because you can control exactly when and how they evaluate things, so you can produce better high level abstractions.
22:47:03
White_Flame
if you haven't said to yourself "Ugh, I wish Python would do X for me, it would make things so much easier", then you're just either not aware of the slow rate of development you're enduring, or your projects are simple enough not to hit the boundaries of your environment
22:47:07
aeth
Common Lisp is a language for writing inline declarative languages that look like they were part of the main language the whole time.
22:47:42
aeth
Some things simply cannot be abstracted with functions, but they can almost always be abstracted with macros. Macros are for when functions fail.
22:47:45
random-nick
even if you ignore the whole macro machinery, common lisp is a pretty good language
22:48:20
Shinmera
I really hate the "DSL" description in relation to Lisp since usually people think of DSLs as entirely separate things like ini files or whatever that share close to nothing with the "host" language.
22:49:34
Shinmera
And if you think about macros creating DSLs that are very constrained in what they can do, it's easy to think there isn't much use for them.
22:50:04
Shinmera
The whole point of macros is that they extend the language, not create "sub-languages"
22:50:49
aeth
You have full control in CL how to embed the language. A string? format does this. cl-ppcre does this. A fancy macro? loop does this. A syntactically regular macro? do does this. A reader macro? I'm sure that's used somewhere. A separate file? Probably been done. And *separate* from this, you have control over when and how it's evaluated. Some of them can be fully compile time.
22:51:19
aeth
e.g. I generate GLSL shader strings at compile time, and SBCL produces the output as constant strings in the FASL file when I compile them. And it's not any harder than doing it with functions.
22:52:02
aeth
A language as a string, reader macro, or separate files can all be implemented the exact same way, with a stream.
22:52:09
Shinmera
aeth: Embedding a language isn't very interesting. People can do that elsewhere with strings and extra files too. The interesting use is things that extend and integrate seamlessly like ITERATE, CLOS, etc.
22:52:40
aeth
Shinmera: People do that elsewhere with other people's libraries because it's a hard problem in most other languages.
22:53:04
pagnol
is anyone here aware of a cl library similar in spirit to https://construct.readthedocs.io/en/latest/# ?
22:53:21
aeth
Working with mini-languages in CL is trivial, especially if you keep them as s-expressions.
22:54:04
White_Flame
pagnol: I started on one, but went on to other things. I got it to the point where it could parse java .class files including disassembling the byte codes & deferring through the constant tables
22:54:18
random-nick
also, looks like that macropy doesn't really let you create macros that really fit into the language
22:54:39
pagnol
White_Flame, I'm not familiar with the format used by class files but sounds like you got rather far?
22:54:58
Baggers
LexLeoGryfon: I'll just nip into this discussion to say that I feel this stuff is part of the spectrum of dynamic & static code. Why emulate/interpret/jit something when you dont need to? macros can be about more than just syntax (although they get used for this too). Why dynamically dispatch when the function to call is absolutely known at compile time? Macros can let you provide insights to compilation that would
22:54:58
Baggers
be too hard or too expensive for the compiler to reason about itself. I love python myself, but IIRC transforming the ast at compile time stuff isnt integrated into the standard build flow. There is, I agree, a good deal of BS around lisps (no syntax and that nonsense) and thats a shame as some damn enjoyable aspects in these languages
22:55:22
White_Flame
pagnol: yeah, but many of its features were implemented a little too specific for their particular use case in that instance, so it's not generalized enough to be a general tool
22:57:28
random-nick
LexLeoGryfon: that's not what the Common Lisp community thinks when they say "DSL"
22:57:33
Baggers
Xach: yes thankyou. I replied a little way up too. I had forgotten to push the latest from that repo
22:58:22
Baggers
Xach: just checking the others now. Is it possible to subscribe to these test results so I see the failures (and hopefully fix them) without bothering you?
22:58:31
random-nick
iirc the clojure community uses the abbrevation "eDSL" for "embedded Domain Specific Language"
22:59:14
aeth
LexLeoGryfon: In Common Lisp, you can use reader macros to embed a syntactically different DSL directly into the source code of the .lisp file, no separate file necessary. And it will be compiled ahead of time with the .lisp file. No interpreter necessary.
23:00:16
aeth
LexLeoGryfon: e.g. here is some inline brainfuck as a reader macro that's compiled to Common Lisp and then compiled to a FASL, as if it was just written in Common Lisp in the first place. https://gitlab.com/mbabich/cl-brainfuck/blob/72d8cf45a14f0e09429a3a20a84a865b95b50f22/brainfuck-examples.lisp#L21-23
23:00:39
aeth
if you don't want to follow the link, it's just #4f(+++++++++[>++++++++<-]>.<+++[>++++++++<-]>+++++.+++++++..+++.>++++[>++++++++<-]>.<<<+++[>--------<-]>.<+++[>++++++++<-]>.+++.------.--------.>>+.<++++++++++.)
23:01:01
Shinmera
Again that's not really interesting because what's the point of doing that when a string works just as well
23:01:26
White_Flame
I think the best simple example of reader macros is adding full datetime "primitives" to the language
23:01:41
aeth
Shinmera: Inline Scheme would be a better example. A language that uses s-expressions but has subtle differences in syntax that would necessitate a reader macro to properly do the inline Scheme.
23:02:06
aeth
Shinmera: Also, most languages would probably interpret the string, this is compiled as CL.
23:04:11
LexLeoGryfon
k, maybe you have some points :) i'm sleepy, going to bed (EU time), have a good night, thank you for your time
23:04:27
aeth
Although, really, the #1 reason is that the SBCL compiler is about 10x faster than the Python interpreter.
23:05:12
aeth
What that means is that it takes a lot more performance requirements before we have to resort to C or C++ or Fortran libraries.
23:05:42
aeth
Obviously if you're going to be calling into the same C libraries, there's not as big of a difference.
23:06:39
aeth
LexLeoGryfon: The problem is that most of the Python ecosystem is mostly around the slowest popular programming language implementation in existence.
23:06:53
aeth
Most of the CL ecosystem is (mostly) portable, so we can choose the fast implementation with essentially no ecosystem penalties.
23:07:10
Shinmera
White_Flame: https://plaster.tymoon.eu/ might be a usable alternative in the interim.
23:07:35
LexLeoGryfon
aeth: bs, we have a lot major projects in pypy fast runtime, like Django, etc n stuff
23:08:24
White_Flame
pagnol: found my syntax file for .class, though the bytecodes are in another one: https://pastebin.com/raw/U0mpKpr7
23:09:03
White_Flame
and heck, LexLeoGryfon should look at that as an example of DSL'ing right in the language
23:10:15
aeth
Okay, it looks like Pypy isn't as far behind the main implementation as it used to be.
23:10:21
White_Flame
even the "def" itself is custom code, and the entire system to consume that spec and give a fully broken down AST of a java .class file is only 415 lines of code
23:11:00
aeth
For a very long time, PyPy was this cool, fast thing that you could basically not use for most Python projects.
23:11:12
White_Flame
(:find <table> <index> <value>) can even dereference pointers/indexes/offsets between items in the file
23:12:53
White_Flame
I'm technically a big fan of data-driven programming, which I guess might be a subset of DSLs in general
23:13:17
LexLeoGryfon
aeth: 3.5 latest supported version. cpython stable currently at 3.6 . pypy now have better support of c-extension, numpy, etc, and lotsa major projects.
23:21:34
White_Flame
(spoiler: the compiler tech inside SBCL & CMUCL is called "Python", and existed long before python the language)
23:27:00
Baggers
White_Flame: nah, early days of cmucl https://www.cons.org/cmucl/doc/cmucl-history.html I was wondering when they started using the name python
23:34:40
Xach
You can visit http://report.quicklisp.org/ but that shows everything, would be nice to have individual feeds for individual projects
23:42:06
mfiano
Xach: That would be a killer feature to subscriber to individual projects so you can get next day fixes ready without tracking us down
23:43:55
Shinmera
_death: Spamming issues for projects that are temporarily in flux doesn't sound great
23:49:30
Shinmera
_death: How would it be able to discern whether a failure is just temporary or unintended?
23:54:04
_death
Shinmera: it could for example delay its response.. maybe also take into account the time of a new quicklisp dist upgrade.. and there could also be an interface for project authors where they could tweak things, perhaps disabling it entirely..
0:00:29
Shinmera
If I wasn't tied up with ELS, my thesis, exams, and Lichat, I'd offer to help out with such an infrastructure
0:00:49
Xach
I think I can crank out an rss feed per project within a few hours. (I can recycle some podcast rss code.)
0:51:19
mfiano
Is there anything in alexandria similar to this, but which will allow duplicating elements to find all combinations as well, such as (X X X) '(X X Y) etc? (let ((results)) (alexandria:map-permutations (lambda (x) (push x results)) '(x y z) :length 3) results) => ((Z Y X) (Y Z X) (X Z Y) (Z X Y) (Y X Z) (X Y Z))
1:08:24
jmercouris
AeroNotix: The more I work with this API, the more I realize how strange some things are
1:11:21
mfiano
Actually, what I need is the "power set", but with repetitions allowed. This is the standard power set. https://rosettacode.org/wiki/Power_set#Common_Lisp Does anyone know if my requirements has a name?
1:12:32
ykoda
lol! Yeah, I played around with a gtk library at one point but gave up. Since then I've been working on ECL + Cpp + QT
1:13:13
jmercouris
ykoda: Ah yeah, that is a very good combination, very easy, though deployment is a nightmare
1:13:13
ykoda
Something like this: https://common-lisp.net/project/ecl/posts/ECL-Quarterly-Volume-V.html#orgheadline10
1:14:21
ykoda
I've primarily been a Xamarin guy for cross platform / mobile, so it's a crazy different world
1:16:03
ykoda
Oh definitely, it's just a nice way to get at the native stuff through .Net (unless you use Xamarin forms)
1:17:29
ykoda
I'm thinking about using that combo for a project, but if it's going to be pain I'll find another way
1:17:33
jmercouris
ykoda: When deploying QT applications you usually want to bundle in a standalone app your users can double click, this is problematic because of some strange linking that occurs within EQL
1:18:05
jmercouris
Some modules are dynamically loaded, and this involves attempting to load the shared lib, which of course does not exist on every users' computer
1:20:12
jmercouris
but unfortunately it is a garbage tool that only works on the most standard of applications, and even then it doesn't work
1:20:37
jmercouris
The real question is what is your deployment strategy, and on which platforms do you wish to deploy
1:23:45
ykoda
Thanks, man! With lisp I've only ever built cli tools, never had any success with guis. I end up going back to C#
1:24:31
jmercouris
ykoda: Yeah, it is a challenge, you can try MCClim as well, I've heard good things about it
1:25:29
ykoda
I'll give that a look. A guy who I'm working with uses python + qt at work, so he's interested in using qt, but I might be able to talk him out of it
2:08:20
fiddlerwoaroof
ykoda: the only problem with mcclim is that it only works on Linux or Mac with XQuartz
2:08:52
fiddlerwoaroof
(although someone was working on a Windows backend, and I'm interested in fixing an old Mac backend)
2:40:36
asarch
Languages with similar syntax: '(Haskell Elm Erlang OCaml Caml), '(C C++ C## Java Go C# Vala)
2:40:59
asarch
While in Lisp: "Macros are what make lisp the greatest programming language in the world. When used properly, macros enable amazing feats of abstraction, programmer productivity, and code efficiency and security that are unheard of elsewhere. Macros let you do things you simply cannot do in other languages." -- From Let Over Lambda from Doug Hoyte
2:42:19
asarch
I was reading about the development process from Naughty Dog and its GOAL implementation, is it available?
2:44:41
aeth
Most gamedev stuff never gets open sourced. Id's classic engines are the most notable exceptions.
2:59:37
aeth
asarch: I am considering writing one. An eshell-like shell requires only several parts. (1) Turn the line "foo bar baz" into "(foo bar baz)" if the function foo exists, (2) if the function foo does not exist, use UIOP to call the external program "foo" with the arguments "bar baz", (3) implement piping, output/input redirection, etc., with gray streams or some other approach, ...
2:59:42
aeth
..., (4) gradually implement the basic shell commands like mv and rm as built-in CL functions with the POSIX API
3:00:30
aeth
There might be some trickier parts like the shell ";" and the shell "&&" and the shell "||"
3:02:09
mfiano
ACTION thinks "requires only several parts" reads as "doable in X amount of time", coupled with an 'etcetera', that doesn't really say much :)
3:02:42
aeth
mfiano: The etc is just to cover up for anything I missed. Is there anything other than |, >, >>, <, &>, etc.?
3:06:32
aeth
mfiano: But, you've caught me, I tend to implement the easiest 60% of something and then move on, so I'd probably stop half way through step 3 and leave it half-finished
3:07:00
mfiano
Moreso, I just didn't think 'several' belongs next to 'only' if you want to convey any meaning whatsoever :)
3:08:40
aeth
well, afaik the design for cloning eshell is just (1) execute CL commands at the top level if the function exists, (2) call external programs like a shell if the function does not exist, (3) implement shell redirection in CL, (4) reimplement the core shell functionality in CL so #1 is actually useful.
3:10:02
aeth
e.g. "+ 1 1" yields the same thing as "(+ 1 1)" and "ls -l" uses its own internal ls ("which ls" tells you that it uses a function in em-ls.el)
3:11:11
aeth
It looks like there's a third category of commands, Lisp functions with shell APIs and only shell APIs.
3:14:40
fiddlerwoaroof
jmercouris: hopefully, I need to learn more about the low-level details of osx first because there are some weird issues with the current library.
3:25:30
fiddlerwoaroof
Is there something that makes it so that the results of reader-macros don't get macroexpanded?
3:28:14
|3b|
things that would expand macros have no idea how the things they would expand were created, whether it involved reader macros or not
3:29:19
White_Flame
but an automatically quoted expansion wouldn't do well in '(foo #reader-macro-thing bar), as the quotes would then nest
3:29:20
fiddlerwoaroof
Weird, that's what I thought, but I'm getting function undefined errors because some macro doesn't seem to be getting expanded
3:34:30
White_Flame
if you're getting an error macroexpanding the reader macro, that smells like the error is happening during the reader macro processing itself, before its result is passed on
3:36:19
fiddlerwoaroof
and (macroexpand-1 '[ns-application shared-application]) even expands the macro
3:44:59
aeth
I think the SBCL REPL works by writing the expression to /tmp/ and then compiling that temporary file.
3:45:01
fiddlerwoaroof
They Read the input, Evaluate the read form, Print the result and then Loop back to the Read
3:45:04
beach
The first READ the expression. Then they EVAL what they read, and finally, they PRINT the result.
3:45:39
aeth
Some Lisps, like SBCL, compile the expression in the REPL. Other Lisps evaluate things in the REPL.
3:46:01
beach
pransninja: A modern implementation will just compile the code, stick it somewhere in memory as a function, and then call that function.
3:46:25
aeth
Lisps have a compiler and an interpreter (actually, I think SBCL has several interpreters iirc). By default, SBCL compiles everything, even things at the REPL. Some Lisps might use their interpreter at the REPL
3:47:15
aeth
Lisps have runtime compilation of functions, but they lack the whole continually analyzing the execution to recompile it more efficiently that people normally think of when they think of JITs.
3:47:37
fiddlerwoaroof
(setf sb-ext:*evalutator-mode* :interpret) makes sbcl into an intepreter, I think
3:47:45
aeth
Lisps are usually AOT-compilation where you can (re)compile a function at runtime before calling it.
3:48:26
fiddlerwoaroof
No, you can implement eval with an interpreter, which would be allowed on iOS
3:49:51
Bike
on clasp, which uses llvm, to do this repl compilation stuff it uses llvm's "JIT" thing, because llvm is otherwise based on serializing compiled code rather than running it, i guess.
3:51:35
fiddlerwoaroof
As we were saying the other day, "compiled language" and "interpreted language" are phrases that don't mean anything :)
3:53:24
pransninja
or a simple movie if you're very evil https://github.com/xoreaxeaxeax/movfuscator
3:53:46
|3b|
if i remember right, clisp can either evaluate directly, compile to bytecode and interpret that, or JIT the bytecode (last is experimental feature i think, not sure if it got released)
4:03:59
pransninja
The more I learn lisp, the more I see how it is super primitive, even simpler than ASM, yet so powerful.
4:10:32
pransninja
"And because NIL, as I mentioned previously, is the name of a constant variable with the symbol NIL as its value, the expressions nil, (), 'nil, and '() all evaluate to the same thing--the unquoted forms are evaluated as a reference to the constant variable whose value is the symbol NIL, but in the quoted forms the QUOTE special operator evaluates to the symbol directly. "
4:11:08
antonv
if I want with hunchentoot to set the session cookie to both 'www.mydomain.net' and 'mydomain.net', how whould I do that?
4:11:10
pransninja
So '() is the same as 'nil which is to say Symbol of nil which is the same as nil value?
4:12:17
antonv
pransninja: yes, in CL symbols have value, and some symbols refer themselves as the value
4:14:01
beach
pransninja: '<anything> is a reader macro that generates (quote <anything>) and QUOTE is a special operator that returns the argument unevaluated.
4:15:02
pransninja
antonv: Set the doamin to mydomain.net, or perhaps .mydomain because of RFC2109, but RFC6265 is mostly implemented everywhere
4:17:11
antonv
presiden: can you have in C a pointer variable? and then set the value of that pointer variable to it's own address? The same with NIL - it's a symbol whose value is itself
4:18:10
|3b|
so can be distinguished if you don't evaluate them. for example (mapcar 'length '(nil () 'nil (quote nil))) -> (0 0 2 2)
4:18:55
pransninja
antonv: You just set the :name of cookie to '.mydomain.net' and it will be sent with every subdomain too.
4:53:23
pjb
antonv: eg. void* p=&p; is wrong on some level, because &p is of type void** not void*. Now of course, given the rules of void*, it will be accepted. But is it acceptable?
4:54:58
pjb
To do the equivalent in C, you need a more complex structure, with struct, union, etc; basically you need to implement symbols in C.
7:15:20
earl-ducaine
Hey Lisponauts! Trying to determine what the potential difference might be between sb-int:fixnump and a naively defined (defun fixnump (object) (typep object 'fixnum))
7:16:22
earl-ducaine
I looked at the SBCL code, but it's not easy to decern what it accomplished appart from the usual SBCL coldboot-ish machinery.
7:19:32
beach
earl-ducaine: TYPEP can be quite expensive. FIXNUMP is just a matter of testing the last bit of the work and return true if it is 0.
7:20:18
|3b|
built-in one is also more likely to take advantage of type-inference in surrounding code, which would be lost by full function call
7:23:08
|3b|
also whether the compiler knows if it can skip the call entirely if you ignore the results, since it has no side effects, and some things like that
7:30:14
|3b|
probably most important difference is that typep is a supported function, so less likely to be randomly changed/removed by sbcl devs :)
7:48:46
beach
Hmm, I should learn to use reader conditionals. I mean, I know the way they work, but I don't naturally think of them for structuring my code.
7:50:07
beach
For example, I need to test SICL systems implementing things like the package dictionary, but I want to test it in some host environment like SBCL. Obviously, there are tons of package-lock violations then. I think perhaps reader conditional can help here.
7:52:21
beach
Even doing something like (defpackage package (...) (:metaclass built-in-class)) won't work in a host environment, but I can wrap the :metaclass part in a reader conditional.
8:23:10
beach
If I have an ASFD system for the SYMBOL dictionary and another for the PACKAGE dictionary, then invariably, they are going to depend on each other. I think I'll make a common system for both. Does that seem like a good idea?
8:28:38
mfiano
Is it good practice to use EXPORT in a macro which generates hundreds of functions that you want external?
8:29:50
mfiano
Shinmera: That's quite funny actually, because I am using it for the exact same thing.
8:37:26
mfiano
It was implemented almost 2 years before your first commit, and was designed for critical physics simulations outside of game development until it was renamed and served as part of my game development toolbox. Afterwards a few such as yours and Baggers' rtg-math showed up.
8:38:24
mfiano
I am only now adding swizzling because I am removing a custom accessor system I've been using, and wanted to integrate it into varjo to have the same API on the CPU and GPU
8:41:46
dmiles
well all the docs related to the symbol is always nice (varible, function, class, etc)
8:47:24
mfiano
Shinmera: I will give you some feedback though. It would be nice if you also defined SETF swizzles (or maybe I'm just blind), and you also support the other 2 GLSL masks.
8:48:26
mfiano
"there are 3 sets of swizzle masks. You can use xyzw, rgba (for colors), or stpq (for texture coordinates)."
8:49:30
mfiano
I am avoiding SETF too, I think. I don't really need it, and it has some additional tricky bits