sabas3dgh has quit [Read error: Connection reset by peer]
<aeth>
I might have just been the first person to run SBCL on a Steam Deck... idk if anyone has already gotten one.
<aeth>
It's just Arch+Plasma so the tar.bz2 from the website works.
<aeth>
only complication is that it doesn't come with Emacs (it does come with git and even htop, but not tmux... which complicates terminal use) and the only Emacs is the flatpak one so idk if the sandbox will get in the way.
<hexology>
time to try nvim + vlime anyway ;)
<hexology>
pretty cool though!
sabas3dgh^ has quit [Read error: Connection reset by peer]
sabas3dgh has joined #commonlisp
hashfunc1bc8 has joined #commonlisp
sabas3dgh has quit [Ping timeout: 272 seconds]
Brucio-61 has quit [Ping timeout: 276 seconds]
Brucio-61 has joined #commonlisp
Brucio-61 has quit [Ping timeout: 255 seconds]
akoana has quit [Quit: leaving]
[deleted] has joined #commonlisp
livoreno has quit [Ping timeout: 272 seconds]
waleee has quit [Ping timeout: 240 seconds]
aartaka has quit [Ping timeout: 272 seconds]
aartaka has joined #commonlisp
Harag has joined #commonlisp
[deleted] has quit [Read error: Connection reset by peer]
livoreno has joined #commonlisp
moosch has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yauhsien has joined #commonlisp
moosch has joined #commonlisp
irc_user has joined #commonlisp
yauhsien has quit [Ping timeout: 276 seconds]
tyson2 has quit [Remote host closed the connection]
cosimone` has quit [Ping timeout: 255 seconds]
yauhsien has joined #commonlisp
pranavats has left #commonlisp [Error from remote client]
ttree has joined #commonlisp
hashfunc1bc8 has quit [Remote host closed the connection]
hashfuncd7c has joined #commonlisp
pranavats has joined #commonlisp
mon_aaraj has quit [Quit: WeeChat 3.5]
mon_aaraj has joined #commonlisp
yauhsien has quit [Read error: Connection reset by peer]
yauhsien has joined #commonlisp
hashfuncd7c has quit [Remote host closed the connection]
igemnace has joined #commonlisp
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
hineios3 has joined #commonlisp
yauhsien has quit [Ping timeout: 272 seconds]
hineios has quit [Ping timeout: 272 seconds]
hineios3 is now known as hineios
notzmv has joined #commonlisp
mon_aaraj has quit [Quit: WeeChat 3.5]
mon_aaraj has joined #commonlisp
SR-71 has joined #commonlisp
livoreno has quit [Ping timeout: 240 seconds]
notzmv has quit [Ping timeout: 244 seconds]
aartaka has quit [Ping timeout: 276 seconds]
aartaka has joined #commonlisp
livoreno has joined #commonlisp
yauhsien has joined #commonlisp
yauhsien has quit [Ping timeout: 276 seconds]
irc_user has quit [Quit: Connection closed for inactivity]
<aeth>
hahahahahahahahahahahahahaha
<aeth>
because I use standard FPS controls, I can just tell the Steam Deck to use WASD + mouse emulation. And because I only depend on SDL right now, I only depend on SDL right now and SteamOS apparently includes it.
<aeth>
so, this is, to the best of my knowledge, the first time someone has had SBCL + SDL + OpenGL running on a handheld gaming console
<AadVersteden[m]>
saturn2: set-macro-character takes a third argument to indicate if it is a terminating character or not. The solution was a simple t away.
ttree has quit [Read error: Connection reset by peer]
ttree has joined #commonlisp
<saturn2>
oh... huh. i knew about terminating characters but i didn't realize that would work
<AadVersteden[m]>
I had a deliberate setq for a global variable in there earlier but that made the code longer and it's already not very nice to jot it down here.
<AadVersteden[m]>
It is a nice troll though. You can set red twice and have it as two values. And with trivial changes and a real random number generator you could make it non-deterministic.
random-nick has joined #commonlisp
<jackdaniel>
aeth: congrats!
<jackdaniel>
AadVersteden[m]: you are still hooked that 'red' is the new 'blue'?
<aeth>
jackdaniel: tbf, it was easier than expected because (1) it came with git, so that's how to get most things on the device, (2) SBCL's Linux 64 pre-built works on it, (3) SDL works out of the box (which isn't true on every distro, where you might need a libsdl-dev[el] or something like that to get it to run... or bundle it)
<aeth>
not how you'd want to actually bundle it for someone else to play, though
prokhor has quit [Read error: Connection reset by peer]
prokhor__ has joined #commonlisp
<jackdaniel>
well, I'm still impressed, details aside. there is a huge gap between "given enough effort one could" and "made it"
<AadVersteden[m]>
jackdaniel: I mean, we're in the transitioning phase, right? This is just the beginning. And with the code being so simple one has to wonder if the gods aren't telling us something. They're telling us this is no troll, this is the future.
<AadVersteden[m]>
jackdaniel: In reality, I got bitten by karma. I posted the annoying comment with ~ and all the silly errors in there (like you could have written ~whatever) and it would still trigger. I started wondering if I could do it on the symbol level.
<AadVersteden[m]>
jackdaniel: and boom, distraction
<jackdaniel>
I see
<AadVersteden[m]>
I think it's nicer with random in there rather than the linked list. Upon redefinition with random you can't really know whether you are in a predictable state or not. That's an extra level of weird.
<AadVersteden[m]>
And I think I'll leave it at that.
<AadVersteden[m]>
For being such a troll feature, it's not very complex.
Harag` has joined #commonlisp
notzmv has joined #commonlisp
Harag has quit [Ping timeout: 255 seconds]
livoreno has quit [Ping timeout: 268 seconds]
poselyqualityles has quit [Quit: Using Circe, the loveliest of all IRC clients]
azimut has quit [Ping timeout: 268 seconds]
dim has quit [Ping timeout: 272 seconds]
Harag` has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
tibfulv has quit [Remote host closed the connection]
tibfulv has joined #commonlisp
MajorBiscuit has joined #commonlisp
attila_lendvai has quit [Ping timeout: 272 seconds]
rogersm has joined #commonlisp
MajorBiscuit has quit [Quit: WeeChat 3.5]
MajorBiscuit has joined #commonlisp
moosch has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
moosch has joined #commonlisp
attila_lendvai has joined #commonlisp
Harag has joined #commonlisp
moosch has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ogamita>
rendar: CL is actually a lisp-∞ ; scheme is really a lisp-(∞-1).
<rendar>
ogamita, i see
White_Flame has quit [Remote host closed the connection]
<ogamita>
the names lisp-1 lisp-2 are just shorthand to say that in scheme functions and variables live in the same namespace, while in CL (or eg. emacs lisp), they live in a different namespace.
<jackdaniel>
let's settle on n and n-1, even if we represent scopes bare vectors there is only so many memory you can use
<ogamita>
:-)
<jackdaniel>
s/bare/as bare/
White_Flame has joined #commonlisp
moosch has joined #commonlisp
Th30n has joined #commonlisp
<ogamita>
rendar: about OO systems, indeed, CL has CLOS, which has classes with multiple-inheritance, and possibility to change the class of an object on the fly, and generic functions with methods attached to them, and dispatching on multiple parameters. This is quite different from the other OO systems.
shka has quit [Quit: Konversation terminated!]
<rendar>
hmm i see, that's interesting
<rendar>
a book which explains this very well?
<ogamita>
rendar: but you can easily implement in CL other sorts of OO systems. For example, Garnet is implemented using KR, (Knowledge Representation), which is an OO system based on prototypes, like javascript.
<ogamita>
rendar: and as you had the intuition of, you could easily implement a smalltalk-like OO system in CL (actually the first smalltalk implementations were written in lisp!).
<jackdaniel>
easily?
<ogamita>
rendar: there are books detailing CLOS (and the MOP, Meta Object Protocol): https://cliki.net/Lisp+Books Object-Oriented Programming in CL, Keene, AMOP.
<ogamita>
jackdaniel: yes, the standard OO system is trivial.
<Th30n>
Art of Meta Object Protocol is great, but I fear it is too much to start with.
<ogamita>
jackdaniel: for example, you can write a trivial macro using closure to implement it.
<rendar>
ok
shka has joined #commonlisp
<jackdaniel>
there's this whole concept of sending messages in smalltalk, I wonder whether it could be /easily implemented with closures/
<AadVersteden[m]>
Th30n: I want that in hardcover but it's a hard book to find.
<Th30n>
I want it too :(
<hayley>
Aad Versteden: I borrowed it from the university, but the university lost it for a week, and I bought a copy off eBay in the meanwhile. So, for a while I had two copies of AMOP.
yauhsien has quit [Remote host closed the connection]
<Th30n>
I think everyime AMOP is brought up in this channel, people lament the fact the hardcover variant is so hard to find...
<AadVersteden[m]>
jealous. I would like it in hardcover because it's a bit of a history-piece. Perhaps I should just buy the first softcover I can get my hands on.
<AadVersteden[m]>
Th30n: I'm not even sure it really exists!
<Th30n>
AadVersteden[m]: Yeah, it feels like a running joke here :)
livoreno has joined #commonlisp
<hayley>
Ah, a hardcover, with hard covers. I never heard of a hardcover version.
<hayley>
(Today marks a year since I borrowed the GC Handbook from university, and haven't had to return it since.)
<Josh_2>
Nice
<Josh_2>
making good use of it :sunglasses:
<hayley>
Well. I've decided to take the last few days of my holidays to rest, rather than write a GC, which still doesn't quite work.
<Josh_2>
Then back to university?
<hayley>
Yes.
<hayley>
My mother asks me if what I was doing was for university. I wish!
<Josh_2>
Yes, back to a big waste of time rip
<Josh_2>
The good thing about modern unis is the free time you have to play around with your own projects
<Josh_2>
I found I learned a lot more on my own than I did on my course
<AadVersteden[m]>
I may agree with that, but in hindsight I have learned a bunch of attitude things that I would not have learned without. Notably: learning to learn things that you don't really want to learn.
<jackdaniel>
why can't you buy a softcover and ask a professional bookbinder to replace it?
<jackdaniel>
it costs ~5$ here, depending on the book
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
Brucio-61 has joined #commonlisp
<beach>
rendar: I recommend you join the channel #clschool.
<rendar>
thanks
yauhsien has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
bilegeek has quit [Quit: Leaving]
moosh has joined #commonlisp
<ogamita>
That said, you could make a hard cover for the soft cover version yourself, it's not that hard.
yauhsien has quit [Ping timeout: 276 seconds]
verisimilitude has joined #commonlisp
Harag has quit [Read error: Connection reset by peer]
<Th30n>
ogamita: You could say, it is actually quite soft to make... :sunglasses: :yeaaaah:
Harag has joined #commonlisp
yauhsien has joined #commonlisp
<Josh_2>
verisimilitude: would you implement Refal as a bolt-on to lisp like April?
dilated_dinosaur has quit [Ping timeout: 272 seconds]
<verisimilitude>
Well, part of my problem is that I wanted to get it right the first time, but that's too hard.
<verisimilitude>
So, my first implementation will be self-contained; once I actually get one working, then I can think about how it could interface with Common Lisp.
yauhsien has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
<jdz>
lisp123: That's surely not about Common Lisp.
<lisp123>
parts of it are
<jdz>
lisp123: Or you wish they were.
<lisp123>
I was hoping someone would not notice who the author was and start critiquing the list :D
<lisp123>
Well it was republished in 1998, so I think some of those points 100% pertain to CL
<jdz>
Everybody knows that "LISP" is not Common Lisp.
verisimilitude has quit [Ping timeout: 255 seconds]
<edgar-rft>
the future of 1980 is long gone :-)
<contrapunctus>
lisp123: thanks for sharing :D
<lisp123>
contrapunctus: your welcome :)
Mandus has quit [Quit: WeeChat 3.5]
<lisp123>
jdz: "A notation for representing symbolic information can be optimized from three points of view: One can try to make it easy to write. One can try to make it easy and pleasant to read. One can make easy to manipulate with computer programs. Unfortunately, these desiderata are almost always grossly incompatible." applies to CL
<jdz>
I like to read and write my s-expressions, m-expressions may rot in the bin they are.
jeosol has quit [Quit: Client closed]
robin has quit [Remote host closed the connection]
<lisp123>
p.s. "1999 note: This article was included in the 1980 Lisp conference held at Stanford. Since it almost entirely corresponds to my present opinions, I should have asked to have it reprinted in the 1998 Lisp users conference proceedings at which I gave a talk with the same title."
attila_lendvai has quit [Read error: Connection reset by peer]
<Josh_2>
I have a large variety of conditions used in the core of my system, however my system is accessible to the outside world through an API, my API library has various conditions that provide information to the outside world about what has gone wrong, would it be better to have all of my internal conditions as subclasses of my API libraries superclass or to have some sort of translation which converts condition X into an instance of API
<Josh_2>
condition? I'm thinking the latter is better for portability
<Josh_2>
it would allow me to change the internals of my API library easier
<lisp123>
edgar-rft: the AI repository I have copied on my hard drive. Let me look at the other link - thanks!!
brettgilio has joined #commonlisp
<lisp123>
Josh_2: yes. define your API separately IMHO
<Josh_2>
Hmm can I provide my own metaclass for conditions?
<Josh_2>
It would be nice to hide this translation layer in the metaclass
<Josh_2>
hmm seems conditions in SBCL have the metaclass sb-pcl::condition-class
<Josh_2>
so perhaps not :sob:
<lisp123>
:sob:
<Josh_2>
Ah well, guess I can make a macro to wrap define-condition :shrug:
yauhsien has quit [Remote host closed the connection]
notzmv has quit [Remote host closed the connection]
robin has quit [Read error: Connection reset by peer]
Oddity has quit [Ping timeout: 268 seconds]
lisp123 has quit [Remote host closed the connection]
yauhsien has joined #commonlisp
jmdaemon has quit [Ping timeout: 272 seconds]
notzmv has joined #commonlisp
tyson2 has joined #commonlisp
yauhsien has quit [Read error: Connection reset by peer]
yauhsien has joined #commonlisp
<Josh_2>
RIP my lisp image
<Josh_2>
Thank you super-save for existing :joy:
yauhsien has quit [Remote host closed the connection]
X-Scale` has joined #commonlisp
X-Scale has quit [Ping timeout: 264 seconds]
X-Scale has joined #commonlisp
cage has joined #commonlisp
X-Scale` has quit [Ping timeout: 240 seconds]
<Josh_2>
We might not have compile -> run -> debug -> loop but we have the quickload -> forgot to export -> restart image -> loop
<Josh_2>
Its easier to just restart most of the time
<Josh_2>
I just had the strangest ASDF issue after fixing a package and then quickloading again
<Josh_2>
quick little restart sorted it out :sunglasses:
<hayley>
The point is, you can handle package problems incrementally too.
<Josh_2>
Ofc ofc
lisp123 has joined #commonlisp
lisp123 has quit [Ping timeout: 272 seconds]
yauhsien has joined #commonlisp
waleee has joined #commonlisp
yauhsien has quit [Ping timeout: 272 seconds]
<ogamita>
Josh_2: it's better to have subclasses. If you translate conditions, it becomes difficult to debug your library.
causal has quit [Quit: WeeChat 3.5]
<Bike>
what do you want to do with condition metaclasses exactly
<ogamita>
Josh_2: that said, when you write wrapper conditions, it is possible to keep a reference to the original condition, and ifyou don't unwind the stack (ie. use handler-bind to do it), then the user can use the original condition.
<Josh_2>
I would only have a wrapper condition for telling the outside world what is going on
<ogamita>
Debuggability is important. Not all bugs are easily reproducible.
<Josh_2>
Yes I agree
<Josh_2>
this is why I asked
<Bike>
but what does the metaclass have to do with wrapping a condition?
<Josh_2>
I would have put the logic for wrapping conditions into a metaclass
<Bike>
but i mean, what logic. i've made wrapper conditions before and never felt the need for a metaclass.
<Josh_2>
Perhaps so
Cymew has quit [Ping timeout: 244 seconds]
<Bike>
i'm not trying to gotcha you, i'm just wondering what you're imagining here
<Josh_2>
Well I hadn't thought it through completely, I was going to play around with a metaclass and see what I could do.
<Josh_2>
I had only thought about the sort of interface I wanted, not the actual implementation
<Josh_2>
And having a nice wrapper around define-condition where I could specific the translation between this condition and the API condition seemed nice to me, and I thought I could use a metaclass to handle this as easily as possible, but like I said, I hadn't really thought about it
Th30n has quit [Quit: bye]
<ogamita>
Josh_2: I fail to see how you would translate them. Also you will have to deal with the standard CL conditions, and the non-standard implementation specific conditions. In all those cases, what you need is a macro to handle the condition, and translate them, in each of your API functions. (with-conditions-translated-to-api-conditions . body)
<Josh_2>
The translation would be done when I define the conditions. I would have a macro like (define-external-condition ..) that would define two conditions, one for internal, one for external use and a function that could be called to create an external from the internal. Please dont get hungup on the metaclass idea, it was only a passing thought!
<Bike>
i was just curious.
<Josh_2>
I know :thumbsup:
Harag has quit [Ping timeout: 255 seconds]
shka has quit [Ping timeout: 240 seconds]
morganw has joined #commonlisp
aartaka has quit [Ping timeout: 268 seconds]
splatt990 has joined #commonlisp
<White_Flame>
from jmc's links above, "I should mention Prolog, but I don't understand it well enough to comment."
<White_Flame>
which is a shame, because it really implements infix syntax well IMO. But they really should have eschewed all the commas
waleee has quit [Ping timeout: 264 seconds]
pranavats has left #commonlisp [Error from remote client]
aartaka has joined #commonlisp
frgo has joined #commonlisp
pranavats has joined #commonlisp
frgo has quit [Ping timeout: 272 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
Brucio-61 has joined #commonlisp
attila_lendvai has joined #commonlisp
<ogamita>
Josh_2: define-external-condition is useless: if you already know the api condition, then just use it internally!
<ogamita>
Josh_2: and if you don't know it, obviously, you cannot use define-external-condition.
<ogamita>
Josh_2: the problem you have exists only when you are using libraries or other code reuse, that was written before the API defined the condition, or that is written independently. Then you need to map their conditions to your API condition, with a big handler-case (or better handler-bind) in each API function. (hence the with-conditions-mapped-to-api-conditions macro).
<Josh_2>
I disagree
<ogamita>
White_Flame: yes, technically, extensible infix notation with priorities is well done in prolog. But it doesn't mean that it's all well. Notably: you have to read the whole prolog code, including libraries, to collect and know all the priorities before you can parse an expession!
<ogamita>
(but for the prolog program, it works).
<White_Flame>
which is similar to having changed readtables, declared constants & macros, etc before use
<Josh_2>
I wrote the HTTP API library, I can create a gf that would catch conditions and change them automatically. I dont have need for slots like status-code within all of my internal conditions
<ogamita>
White_Flame: there's a difference. Because of the parentheses. The readtable changes should be benign (or else), and the macros should be obvious from their names and argument structure, so even if you don't know what they do, you can still read and understand the code.
<White_Flame>
as a human
<ogamita>
Yes.
<ogamita>
Benefit programs too.
<ogamita>
Imagine the complexity of our macros if we had to query a program database to know how to parse expressions given in parameter.
<White_Flame>
hmm, I guess this is why prolog retained comma separators, since there might be infix stuff in fields
<ogamita>
Probably.
<White_Flame>
but still, this is still contained in the "reader" part of prolog, and has pass-through in its equivalent of macros as well
<White_Flame>
as long as there's some term passed in as a macro parameter, it doesn't matter if it came from infix source or not
<ogamita>
Josh_2: let's wait until you get a condition from the CL implementation, like say, ccl::too-many-arguments; then you'll tell me how you did with your API…
<White_Flame>
and afaik, -(a,b) and a-b are indistinguishable as data
<White_Flame>
in prolog syntax
<ogamita>
correct.
<ogamita>
Again, for the program it's ok, it has access to all the code. It's for the programmer that the situation may be more complex; foo-bar/foo-quux what is the priority? - or / ?
<Bike>
i also don't really understand the utility of wrapping conditions one to one
<Bike>
when i've done it, it's because some code i'm calling can signal whatever, and i want to wrap that up into one kind of condition
<ogamita>
(- foo (/ bar foo) quux) vs. (/ (- foo bar) (- foo quux))
<ogamita>
Bike: well, even n to 1, assuming you have several conditions in your API, you will have to dispatch unknown conditions (with superconditions and a catch-all).
<White_Flame>
ogamita: yeah, that has nothing to do with prolog in particular. infix has to resolve that ambiguity and that's always annoying for a human to keep in mind
<contrapunctus>
White_Flame: moon-child pointed out something interesting in #lisp some time ago - operator precendence is a separate issue from infix/prefix/postfix notation. Smalltalk and APL were cited as examples, which have infix syntax but consistent operator precedence.
<White_Flame>
I'd need to see some examples
<White_Flame>
I also don't understand how precedence is an orthogonal thing that can coexist with prefix sexprs
thuna` has joined #commonlisp
robin has joined #commonlisp
nij- has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
<dlowe>
or postfix
attila_lendvai has quit [Read error: Connection reset by peer]
MajorBiscuit has quit [Ping timeout: 272 seconds]
ec has joined #commonlisp
attila_lendvai has joined #commonlisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
<ogamita>
Again, the problem is to know the arity of each operator, as well as their priority. In PN or RPN, operators have fixed arity, and you even need a different operator for a-b and for -a !!! (because they're different one is difference, the other is opposite). Once you know the arity of your operators, the priority is implicity by the order of arguments and operators. Hence the power of PN or RPN.
<ogamita>
This works for calculettes, But in programming languages, we keep adding operators with new arities!
<ogamita>
Hence the parentheses.
<ogamita>
and this solves both problems at the same time, and you don't need to know the operators.
<White_Flame>
afaik, polish notation specifically means eliding any grouping syntax with parameters, not necessarily fixed arity
<White_Flame>
I don't think it has to do with arity, though
<White_Flame>
precedence is still ambiguous when arity is fully known
<White_Flame>
but only in infix I think
<White_Flame>
prefix and postfix have stricter and more regular ordering, while infix is pretty random
<White_Flame>
in all of `+ a + b c`, `b c + a +`, and +(a,+(b,c)), operators are strictly executed in left-to-right lexical ordering
<White_Flame>
oh sorry, not the last one
<White_Flame>
hmm, no I'm wrong :)
<White_Flame>
since prefix does defer actual execution until the parameters are all evaluated
<White_Flame>
but still, the precedence in prefix & postfix seem to be distinctly lexical without need of precedence
tyson2 has quit [Remote host closed the connection]
saura has quit [Ping timeout: 240 seconds]
Lord_Nightmare has joined #commonlisp
igemnace has quit [Remote host closed the connection]
ttree has joined #commonlisp
yauhsien has joined #commonlisp
<ogamita>
yep.
yauhsien has quit [Ping timeout: 240 seconds]
morganw has quit [Remote host closed the connection]
SR-71 has quit [Remote host closed the connection]
robin has quit [Read error: Connection reset by peer]
robin has joined #commonlisp
tyson2 has joined #commonlisp
<nij->
This lisp has succint syntax! Is there something similar in Common Lisp? Of course, it has to overwrite the CL package a lot, and is not compliant.. https://sharpscript.net/lisp/
akoana has joined #commonlisp
ec has quit [Remote host closed the connection]
<Josh_2>
Scheme?
aartaka has quit [Ping timeout: 272 seconds]
aartaka has joined #commonlisp
notzmv has quit [Ping timeout: 244 seconds]
<drakonis>
nij-: you mean a scripting package?
tyson2 has quit [Remote host closed the connection]
shka has joined #commonlisp
<sm2n>
why does (with-open-file (f "test" :direction :output :element-type 'bit) (write-sequence #*11111111 f)) appear to write 8 octets with value 1 instead of one octet with value 255 to test?
<sm2n>
I am very confused
<sm2n>
This is sbcl on linux
analogsalad has quit [Quit: bye]
Oddity has joined #commonlisp
<nij->
drakonis No, I meant a system that allows shorter syntax.
<semz>
sm2n: SBCL only supports character and signed/unsigned-byte I/O afaik, so it should recognize that bit is a subtype of unsigned-byte. But note that the output spec would be ambiguous anyway: You define no bit ordering!
<semz>
(actually I don't even know if SBCL supports signed/unsigned-byte sizes other than 8)
<Bike>
it does.
<semz>
how does that handle endianness?
verisimilitude has joined #commonlisp
<Bike>
i think it just always uses the same endianness. i forget which, though.
<sm2n>
so is my example supposed to work or not?
<Bike>
sm2n: if you're expecting it to write only one octet, that's not going to work, no.
<sm2n>
Why not?
<Bike>
your operating system doesn't support bit I/O, for one
<sm2n>
Right, but doesn't sbcl buffer it anyway?
<Bike>
it might, it might not. buffering's usually a performance thing rather than part of the semantics, you know?
<Bike>
the standard doesn't really gauarantee much about what ends up in files. if you write-byte to a file you can read-byte the same value later, but beyond that the implementation has alot of wiggle room.
<Bike>
sm2n: as semz said, without some careful definition the one-bit behavior would be ambiguous, also. e.g. if you write seven bits do you get 127 or 254 or 255 or what
<sm2n>
I was expecting it to pad to the nearest octet or something
<sm2n>
but yeah I can see that it's kind of ambiguous
random-nick has quit [Ping timeout: 244 seconds]
hashfunc1fab has joined #commonlisp
<hashfunc1fab>
dbotton: (using tutorial 1 as an example) recompiling (a change to) the initial ON-NEW-WINDOW-HANDLER function passed to INITIALIZE doesn't get reflected in the browser on a refresh or a new tab. is this by design? instead, one must explicity use SET-ON-NEW-WINDOW (as you mentioned yesterday) or restart clog. am i missing something or doing something wrong? the ideal workflow would be to just recompile the function and the cha
<hashfunc1fab>
be in effect, would it not?
<drakonis>
nij-: if you're after modifying the syntax, you'd like vernacular
<dbotton>
When you initialize or set-on-new-window if you pass the simbol 'myfunc instead of #'myfunc you can recompile myfunc and refresh your browser. There is a comment in the first tutorials about this
<dbotton>
hashfunc1fab: that should take care of that issue
<hashfunc1fab>
aha moment! i thought that was a typo and that you meant to say #'
<dbotton>
You can change other parts of your program and recompile those functions with out needing to refresh.
<dbotton>
I am better at code than English :) spelling usually right
<hashfunc1fab>
i wonder if in the future the ON-NEW-WINDOW-HANDLER should be a proxy function to the intended handler function so that #' can still work as well. not sure on what all best practices are in CL referring to situations like this, though, since CLOG is so novel
<dbotton>
Using a symbol does the job, can't imagine why complicate it. There are times you want the function instead ie flet/labels but if you see a need in your journey let me know
random-nick has joined #commonlisp
frgo has joined #commonlisp
nij- has quit [Ping timeout: 272 seconds]
<Josh_2>
My internal to external condition converter is flawless /s
<hashfunc1fab>
dbotton: and vice versa! i think keeping a huge log of TODOs that you would like the community to help out with would benefit the project
<Josh_2>
This macro makes me feel dirty :joy:
robin has quit [Remote host closed the connection]
<Josh_2>
It does eliminate a lot of boilerplate tho :sunglasses:
jcowan has joined #commonlisp
<jcowan>
anyone have kick rights in the #lisp channel? there's a lot of babbling by one person
Alfr is now known as Guest5494
Guest5494 has quit [Killed (copper.libera.chat (Nickname regained by services))]
<Josh_2>
Doesn't look totally ugly either
Alfr has joined #commonlisp
<Josh_2>
:sunglasses:
<dlowe>
I'm going to ask for them. We need some 24-hour operator coverage :p
hashfunc1fab has left #commonlisp [ERC (IRC client for Emacs 26.3)]
<dlowe>
phoe: ^
<defaultxr>
hi. when i have (defconstant +foo+ (make-instance 'my-class)) in one of my projects and quickload it, i get an error like "The constant is being redefined from #<MY-CLASS {100CB32013}> to #<MY-CLASS {1009DDFE93}>". if i comment out the defconstant, restart lisp, reload the project, i get no errors until i try to use the constant, at which point i get an error that it is undefined. anyone have
<defaultxr>
any suggestions as to why this is happening?
<White_Flame>
because the 2nd time it runs, the return value from MAKE-INSTANCE is a different object than the first time it was called
<dlowe>
defaultxr: every time you call make-instance, it makes another object, which violates your assertion that it's constant
<dlowe>
it's not like a const type in C
<dlowe>
defconstant means that the symbol will never have another value
<dlowe>
I usually just use defparameter for simplicity's sake
<White_Flame>
(unless (boundp +foo+) (defconstant +foo+ ...)) is one way to get around it
<White_Flame>
erm '+foo+
<defaultxr>
ahh, okay, that is obvious now that i think about it
<defaultxr>
thanks
<dlowe>
there's also a define-constant macro in the alexandria library that will do that check
<White_Flame>
dlowe: I just checked that out, and it would require a test to return true
<defaultxr>
oh that's a good tip, thanks both of you
<dlowe>
White_Flame: you could use (constantly t) but yeah, that's a good point
<White_Flame>
dlowe: hmm, yeah I guess that would work because it would be impossible for the macroexpansion to be able to override the underlying defconstant value anyway
<White_Flame>
so it would have to use the old value
<White_Flame>
but yeah, not quite the intended semantics
cage has quit [Quit: rcirc on GNU Emacs 27.1]
dra has joined #commonlisp
nij- has joined #commonlisp
<nij->
drakonis vernacular seems cool! though I'm still trying to understand how it works
<drakonis>
its basically a language tower for common lisp
<nij->
What's a lang tower?
<drakonis>
have you ever checked racket?
<drakonis>
guile has that but its called a compiler tower
<drakonis>
basically you can have layered stacks of languages that compile to another
<drakonis>
from the basest one to the highest
<drakonis>
i think guile does it better than racket
<nij->
I never knew how racket works. Does it allow many new langs by letting the users create compiler from their new lang back to racket?
<drakonis>
hmmmm
<drakonis>
its very bad at interop
<nij->
And vernacular allows user to transpile code in another lang into CL?
<drakonis>
yes
<drakonis>
you should check the readme
<nij->
I did..
<nij->
But transpiling isn't the hardest part when it comes to lang embedding iirc.
<drakonis>
alright, though you asked a question that it answered
<nij->
It's the matter of translating the data types.
<nij->
drakonis Oh I see
<nij->
Indeed
orestarod has joined #commonlisp
<drakonis>
you need to write CL code to parse the source files you're using as input
<White_Flame>
does vernacular have tools for lexing/parsing, or is it just up to you to handle a character stream?
<White_Flame>
I really need to publish my punctuator lib, even though it's not finished since it's useful
<White_Flame>
I did make #{ langname ... #} to wrap sublanguages within files, which I find a bit more handy than having to make entirely separate files, but its parsing would be handy for vernacular as well
<nij->
what does punctuator do?
<White_Flame>
it splits the input stream by multi-character punctuation and whitespace, leaving tokens, and having a IMO better than bnf parser for those tokens
<White_Flame>
into an AST
<White_Flame>
an example of the spec to handle JSON (except it doesn't do \u escapes yet)
<White_Flame>
I just keep adding features that are useful for programming language syntaxes, instead of just a generic character matcher tooling
<White_Flame>
there is also a function json-token-converter which takes token strings like "foo", "123.0" etc and converts them to token objects, which isn't a lot of code, but does need a bit more support
<nij->
Can this parse something as complicated as org-mode?
<White_Flame>
I have 3 or 4 completely syntactically different programming languages in use that this works on
<White_Flame>
not too familiar with org-mode
<White_Flame>
from a glance at the syntax page, would probably take a bit more lisp code than just spec to parse it
<White_Flame>
but that's kind of my goal, use declarative where it's really useful, and use lisp where it's more directly applicable
<White_Flame>
oh, and mine handles left-recursion transparently. not sure why that isn't an integral part of bnf et al
<White_Flame>
it's only like 3 lines of code
<White_Flame>
basically, I'm neither a fan of BNF nor regex, so I hate-coded this for my needs ;)
<jcowan>
racket requires that the front-end generate syntax objects rather than raw racket code, which allows source location and syntactic context to be carried along.
<jcowan>
this improves error messages, as they are in terms of the original
notzmv has joined #commonlisp
<White_Flame>
yep, I just keep track of the token's original offset in the stream; that can often be deduced back to line/column
asarch has joined #commonlisp
<White_Flame>
I do need to look into racket at some point, to glean ideas, as I presume it's fairly well matured
robin has quit [Remote host closed the connection]
Oladon has quit [Quit: Leaving.]
lisp123mobile has joined #commonlisp
<lisp123mobile>
white_flame: keen to check it out, i’ve been doing a lot of parsing myself but I’m all finished on my end (bespoke usage so I didn’t try to create a library to avoid making it complicated)
<White_Flame>
I'm trying to get my unfinished projects released in some form to lighten my back burner
<White_Flame>
also I guess I need to go get a gitlab account or something
<lisp123mobile>
yeah it’s tricky to actually release something
<lisp123mobile>
going from it works for me -> it works for others takes some time in terms of documentation, thinking of edge cases, etc
<White_Flame>
yeah, I've done it a number of times
jmdaemon has joined #commonlisp
lisp123mobile has quit [Remote host closed the connection]
<hayley>
To quote Ed Kuepper, "I don't know what I've been told, rustaceans done stole Guy Steele's gold."
dra_ has joined #commonlisp
dra has quit [Ping timeout: 272 seconds]
<Nilby>
but CL already can be a "systems lisp"
<hayley>
I don't care about "systems languages", and I am working on writing just why. But the premise "In the recent FOSS & Crafts episode What is Lisp? we talk a bit about how the assumptions that dynamically typed languages are "slow" is really due to lack of hardware support" seems wrong already.
<hayley>
There are these lovely devices called "compilers" for one. And I don't know where she got the idea that GC needs to be in hardware to be fast, either. (Nor the idea that WebAssembly "is a Lisp" in that episode, for which the only reasoning is that a. is it _not_ a Lisp (answer: yes), and b. the hosts came up with cute descriptions of the rest.)
<hayley>
I'd rather read the "Lisp slow cause interpreted and dynamic typing" drivel, but I guess you can't fuck up that badly after years with Scheme experience.