freenode/#lisp - IRC Chatlog
Search
5:38:12
madrik
If certain keyword arguments are accepted only by one Lisp and not another, how should I write the feature conditionals?
5:44:37
beach
madrik: It depends on whether different implementations require the argument, or whether it is optional.
5:47:04
madrik
beach: E.g. CCL has a :SHARING keyword argument for WITH-OPEN-FILE, which takes one of three values.
5:49:06
beach
If they are the last ones, you might get away with something like (bla bla . #ccl (:sharing :external)).
8:01:25
matzy_
can you connect mito to a remote database, like one on RDS? I tried passing :host and :port to mito:connect-toplevel but I think that's where my error is coming from
8:18:34
beach
vms14: It is much better if you tell people what you want it to do, rather than assuming people know Perl.
8:19:21
vms14
the thing is, if I make a macro, and convert symbols to strings, the print case won't let me have mixed case,not?
8:20:00
beach
Well, if you use default reader settings, then it is already too late by the time the symbol is being read.
8:21:38
beach
In my opinion, you should forget about imitating the surface syntax of a language with a surface syntax that is as different from that of Common Lisp as this one seems to be.
8:28:31
flip214_
After some more practice I found out that most of that stuff isn't necessary ... CL-PPCRE:SCAN is a bit longer than /../, but it gives more results back anyway
8:28:54
flip214_
so I got around to like the verbose Lisp way -- it's more readable over the long run anyway
8:29:24
vms14
in netbsd I have some troubles, like no threads in sbcl, and most of libraries won't work
8:31:36
flip214_
I did a reader macro that kept case for me; then I could write §MixedCase-Symbol or §(Mixed List)
8:33:02
phoe
I assume you could do stuff like #{foo bar baz QuUx} that evaluates to ("foo" "bar" "baz" "QuUx")
8:38:28
beach
vms14: According to what you said, that is NOT what you want. You said you wanted to be able to write (qw ...).
8:39:30
beach
vms14: It is mystery to me why that particular reader macro is acceptable, but (qw ".." "...") is not.
8:57:06
pve
phoe: are you sure the arguments to qw-reader should be like that? Wasn't it (stream character number)?
8:57:43
Harag
when using flatten in a macro it returns stuff like ,G!RESULT as sb-impl:comma and should I be seening that or getting G!RESULT as a a symbol?
9:00:26
phoe
just an exercise to ensure that I know how to write dispatch reader macros (hint: I obviously don't fully know, as you can see above)
9:00:43
phoe
feel free to read it and then try to write it yourself based on the article I posted - it's a good one
9:24:51
phoe
first of all, it's an argument count mismatch, since the function must accept two arguments
9:25:06
phoe
second, it should signal an error, since a lone closing delimiter is a programmer error
9:26:42
phoe
so (set-macro-character #\} (lambda (c s) (declare (ignore c s)) (error "Lone closing delimiter))) or what beach said
9:32:32
phoe
if I understand the reader algorithm correctly, parsing the delimiter is actually the duty of the reading function
9:36:08
vms14
I have a function named modules that takes a list of arguments and makes perl load those modules
10:30:34
fbmnds
hence: I'd like to know whether there is interest in this community to dig into EQL5 in essence to be able to further maintain this project. From what I understood going through the code base, EQL5 is based on witty design ideas and allows for cross platform GUI development (the examples apps work nice on my Android mobile, too - iOS is also
10:36:34
flip214_
minion: memo for vms14: If you have your own reader macro, you could also make #\: a constituent character within this list... then you could (READ-DELIMITED-LIST) in your own *PACKAGE* and get symbols like |This::Form|
10:37:43
flip214_
phoe: I guess that within your own readtable a COPY-SYNTAX from #\x to #\: should be conforming?!
10:37:49
phoe
;; Online Lisp Meeting #4 starting in 22 minutes at https://www.twitch.tv/TwitchPlaysCommonLisp ;;
10:38:45
phoe
I don't know if it's possible to portably tell Lisp to not treat a character as a package marker
10:42:04
fbmnds
phoe: afaik, I do not think that this will work with EQL5 - a switched from SBCL to ECL because of that
10:51:58
phoe
jackdaniel: technical nitpick: is EQL5 allowed to be MIT? It seems to include minor modified snippets from ECL sources, see https://gitlab.com/eql/EQL5-Android/-/blob/master/utils/EQL5-symbols.lisp#L20102 (warning: huge file)
10:53:04
phoe
that's a more general question I guess - if a package patches some other code by including and evaluating modified snippets of its source, does the copyleft virality also apply?
11:33:35
jackdaniel
phoe: it does not bother me, but if it did then I'm sure it could ve resoved by upstreaming necessary changes
11:34:41
jackdaniel
technically speaking I think that your concern has merit and I'm sure PR would be cooperative if it becomes a problem
13:04:23
shka_
i wask asking about CL:DOUBLE-FLOAT which must have a least 50 bits of precision and 8 bits for exponent
13:05:18
phoe
I assume that SBCL implements floats as IEEE 754 doubles though, which means they take a full 64-bit word
13:09:37
jackdaniel
and that's why single-floats may be much faster on CL, because they may be implemented as immediate objects with a type tag
13:19:44
phoe
32 bits of data leaves plenty of space for tagging information on 64-bit implementations, whereas with fullword data like doubles the compiler and programmer need to exercise and cooperate a lot to prevent boxing
13:38:51
p_l
I wonder if it would be possible (or sensible at all) to somehow pack pointers into NaNs on a CL implementation
15:16:14
korner
so i had been bit confused, i was told to test lisp code i should use sbcl but i cannot quite find how to actually use it
15:16:50
phoe
that's the installation and running part that should get you all the way to the SBCL prompt
15:18:45
beach
korner: You don't typically use Common Lisp the way you use (say) C. It is more common to start a REPL (Read-Eval-Print-Loop) and work from inside the system.
15:19:35
beach
korner: If you plan to develop in Common Lisp the way you do in a typical batch language, you probably won't see the point.
15:20:30
beach
korner: By a batch language, I mean one that takes a source file, turn it into an executable, which you then start from your shell prompt.
15:21:30
phoe
you program in Rust and Haskell by writing code that the compiler then turns into executables
15:21:51
phoe
but you program in Lisp by starting a Lisp image and then modifying it until it contains the program that you want
15:21:57
korner
i noticed though that lisp syntax is lil bit simmiliar to the way i format lua so thats fun
15:23:39
beach
korner: I think there are some YouTube videos that will give you the idea about how we work.
15:23:42
korner
was quite confused what i am even supposed to learn cause there is some common lisp, racket and million other lisps, thought common lisp would be nice starting point
15:24:19
phoe
it's a general-purpose programming language that I personally use for all personal projects I make
15:37:17
contrapunctus
I was wondering today...could I use CL to make a MIDI sequencer? 🤔 It seems to be the exclusive domain of C/C++
15:39:11
beach
Like, do you want to generate the sound yourself from oscillators and/or sample files?