freenode/#lisp - IRC Chatlog
Search
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?
15:40:20
beach
Also, it will depend on how "real-time" you need for it to be. If you fill the sound buffers enough, a GC won't ruin it.
15:41:49
beach
The thing is, most current FLOSS Common Lisp implementations have a GC that is not very good for real-time.
15:50:32
phoe
another possibility is linking against FFI sound generators that don't suffer from GC issues - e.g. cl-collider for SuperCollider
15:50:53
phoe
that's mostly because we don't have soft-real-time GCs in free Common Lisp implementations
15:52:09
beach
So I say, write the thing in Common Lisp entirely. See how it works out. Maybe tweak the parameters for current Common Lisp implementations.
15:52:58
beach
My experience is that it takes some time to write significant applications, and then the context has evolved.
16:01:37
minion
rgherdt: SICL: SICL is a (perhaps futile) attempt to re-implement Common Lisp from scratch, hopefully using improved programming and bootstrapping techniques. See https://github.com/robert-strandh/SICL
16:03:08
phoe
it already had multiple nice effects on the ecosystem even though it's incomplete, so definitely not futile
16:33:55
matzy_
should i be overly concerned if i created a db table in mito using it's classes and i see the table in my sql editor, but the (mito:ensure-table-exists 'mytable) returns NIL?
17:45:17
alandipert
is anyone aware of a pedagogical impl. of multiple values in the spirit of http://home.pipeline.com/~hbaker1/MetaCircular.html? e.g. implemented in terms of other operators
17:46:44
alandipert
uhoh, that link is down. archived: https://web.archive.org/web/20191023160058/http://home.pipeline.com/~hbaker1/MetaCircular.html
17:48:04
alandipert
yeah i gave it a go myself and looks like i arrived at something not far off from his
18:19:07
phoe
this prevents people from using SLOT-VALUE and forces them to uses the accessor functions, which may implement additional logic.
18:19:36
phoe
where "prevents" means "unless they want to type the unholy trio of characters, «::%»"
18:37:27
_death
personally I dislike adorning symbols with strange characters beyond the earmuff convention
18:41:06
_death
btw thanks phoe and beach for today's online meeting.. I got into it a bit late and didn't bother logging in
18:41:41
phoe
but anyway if you'd like to talk about anything for the next meeting, feel free to let me know
18:42:40
phoe
and by "you" I mean "hey #lisp come on the slot's free let's keep the meetings rolling and such"
18:42:52
_death
also, I sometimes (often?) use the convention of giving a protocol-specific prefix to the access functions
18:54:27
pve
Sometimes, I dream of a library that aggregates all the common defclass usage patterns into a set of convenience macros that I could choose from, depending on my mood.
18:55:59
pve
Or one that provides a define-class-construction-kit, to which you can say "Hey, gimme a define-class macro with so-and-so slot and accessor naming scheme that maybe exports the class and its accessors by default, so my fingers don't bleed everytime I want to define a class".