Kaisyu7 has quit [Quit: ERC (IRC client for Emacs 26.3)]
chibatan has joined #lisp
iAmDecim has joined #lisp
mlrdev has joined #lisp
natj212_ has quit [Ping timeout: 240 seconds]
mlrdev has quit [Quit: ERC (IRC client for Emacs 26.3)]
progfun has quit [Ping timeout: 264 seconds]
iAmDecim has quit [Ping timeout: 260 seconds]
natj212_ has joined #lisp
iissaacc has quit [Ping timeout: 260 seconds]
natj212_ has quit [Ping timeout: 256 seconds]
loke has quit [Ping timeout: 246 seconds]
loke` has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
ldb has joined #lisp
<ldb>
good morning everyone
<no-defun-allowed>
Hello ldb
rumbler31 has joined #lisp
karlosz has joined #lisp
rumbler31 has quit [Ping timeout: 256 seconds]
choegusung has joined #lisp
snowyfox has quit [Read error: Connection reset by peer]
snowyfox has joined #lisp
ebrasca has quit [Remote host closed the connection]
iAmDecim has joined #lisp
chibatan has quit [Quit: WeeChat 2.3]
bilegeek has joined #lisp
chibatan has joined #lisp
ldb has quit [Quit: Connection closed]
Kaisyu7 has joined #lisp
jesse1010 has quit [Ping timeout: 240 seconds]
gaqwas has quit [Ping timeout: 256 seconds]
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
iAmDecim has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #lisp
iissaacc has joined #lisp
Jeanne-Kamikaze has quit [Ping timeout: 256 seconds]
ldb has joined #lisp
vhost- has quit [Quit: WeeChat 2.8]
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
iAmDecim has joined #lisp
Jeanne-Kamikaze has joined #lisp
iAmDecim has quit [Ping timeout: 264 seconds]
natj212_ has joined #lisp
Jeanne-Kamikaze has quit [Ping timeout: 256 seconds]
davepdotorg has joined #lisp
choegusung has quit [Quit: leaving]
snowyfox has quit [Read error: Connection reset by peer]
Alfr has joined #lisp
snowyfox has joined #lisp
davepdotorg has quit [Ping timeout: 246 seconds]
Alfr_ has quit [Ping timeout: 260 seconds]
yonkunas has quit [Quit: Connection closed for inactivity]
flazh has quit [Ping timeout: 258 seconds]
Kundry_Wag has joined #lisp
Stanley00 has joined #lisp
chibatan has quit [Quit: WeeChat 2.3]
mindCrime_ has quit [Ping timeout: 260 seconds]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
snowyfox has quit [Ping timeout: 265 seconds]
Kundry_Wag has quit [Ping timeout: 240 seconds]
asedeno has quit [Ping timeout: 265 seconds]
<beach>
Good morning everyone!
progfun has joined #lisp
asedeno has joined #lisp
<iissaacc>
hello beach
<iissaacc>
how are we
buoy49 has quit [Read error: Connection reset by peer]
buoy49 has joined #lisp
<beach>
Well, I am converting the SICL bootstrapping procedure so that uses the new AST evaluator I wrote, and I am converting to using Clostrum-based environments, so there is a lot of work. But making progress.
<iissaacc>
what is Clostrum? Can't find anything on google
<iissaacc>
ah wait i found a PDF written by a Robert Strandh
<beach>
It should be on S-expressionists. Let me check...
<beach>
It is an extraction and improvement of SICL first-class global environments to a separate repository.
xrash has quit [Ping timeout: 264 seconds]
<beach>
Clostrum improves on first-class global environments in that the client can create the full constellation of compile-time environments that the Common Lisp standard defines.
<iissaacc>
way over my head at this point but im browsing thru the code anyway
Bike has quit [Quit: Lost terminal]
<beach>
The code is very simple. It is just keeping track of definitions basically.
<beach>
Look at that page, starting with paragraph number 10: "Four different environments relevant to compilation are distinguished:..."
<beach>
Clostrum lets the client create the three compile-time environments, and it provides operations at compile time to query and update those environments.
toorevitimirp has joined #lisp
<beach>
So, for example, DEFGENERIC may put information in the compilation environment about the lambda list, the GENERIC-FUNCTION-CLASS, the GENERIC-FUNCTION-METHOD-CLASS, the METHOD-COMBINATION name and arguments, so that when a DEFMETHOD is encountered, the compilation environment can be queried and the DEFMETHOD can emit the correct code for instantiating the method.
Jeanne-Kamikaze has joined #lisp
<iissaacc>
ah yes
<beach>
Every implementation does some of this stuff of course, but in an implementation-specific way. Clostrum does it in an implementation-independent way that can be customized.
<iissaacc>
^^ you just answered the question I was typing out
<iissaacc>
cool
<beach>
Heh.
<iissaacc>
ah so i see stuff like ... fboundp you define it as a generic function instead of something implementation specific
<beach>
Exactly.
<iissaacc>
so basically if you were making a new lisp implementation you could just write new methods for those generics that work on your specific implementation choices
<beach>
Right again!
<iissaacc>
thats neat man
<beach>
I have several reasons for creating Clostrum. First of all, it's going to be an essential part of SICL, but since it is an independent repository, the temptation of putting SICL-specific functionality in there is removed.
<beach>
Second, for someone who wants to create a new Common Lisp implementation, this part of the work is already done, since it is documented, and tested.
<beach>
Third, I am secretly hoping that existing Common Lisp implementations will adopt it for their compiler, so as to decrease the overall maintenance burden on maintainers of Common Lisp implementations.
<iissaacc>
its cool how "accessible" this kind of stuff is in common lisp. there seems to be a bigger gap in python (the only other lang ive used) between the language and the implementation details
<iissaacc>
once you start looking at the nuts and bolts it all works how you'd expect having written "normal" programs in common lisp
<iissaacc>
if that makes sense
<White_Flame>
CL does have a history as an OS where it's lisp all the way down
<beach>
I think I see what you mean.
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
karlosz has quit [Quit: karlosz]
ldb has quit [Quit: Connection closed]
<beach>
So far, we have extracted the following independent libraries from SICL:
<beach>
Eclector, which is an implementation-independent Common Lisp reader. It is maintained and greatly improved by scymtym. It is not only used in SICL, but also in Clasp, and for several other projects that are not Common Lisp implementations. It is used to parse Common Lisp code in editors and used to create annotated documentation.
<beach>
Concrete Syntax Tree, which is a way of representing Common Lisp source code that includes information about source location. Again, it is going to be used in editors and other applications.
<beach>
Clostrum, that I already mentioned.
<beach>
Trucler, which is used to represent all the nasty lexical environments created by a Common Lisp compiler.
<beach>
Incless (work in progress) is an implementation-independent Common Lisp printer. I may have forgotten a few.
orivej has quit [Ping timeout: 264 seconds]
<beach>
Next in line is Cleavir, the implementation-independent compiler framework.
wsinatra has quit [Quit: WeeChat 2.9]
_paul0 has joined #lisp
shangul has joined #lisp
paul0 has quit [Ping timeout: 264 seconds]
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
karlosz has joined #lisp
progfun has quit [Ping timeout: 264 seconds]
gravicappa has joined #lisp
torbo` has quit [Remote host closed the connection]
toorevitimirp has quit [Remote host closed the connection]
snowyfox has joined #lisp
toorevitimirp has joined #lisp
davepdotorg has joined #lisp
davepdotorg has quit [Ping timeout: 272 seconds]
mathrick has quit [Ping timeout: 265 seconds]
mathrick has joined #lisp
toorevitimirp has quit [Quit: Konversation terminated!]
toorevitimirp has joined #lisp
natj212_ has quit [Ping timeout: 246 seconds]
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life has joined #lisp
natj212_ has joined #lisp
toorevitimirp has quit [Quit: Konversation terminated!]
toorevitimirp has joined #lisp
davepdotorg has joined #lisp
karlosz has quit [Quit: karlosz]
davepdotorg has quit [Ping timeout: 244 seconds]
Bourne has quit [Ping timeout: 256 seconds]
Volt_ has joined #lisp
Jeanne-Kamikaze has quit [Quit: Leaving]
ggole has joined #lisp
karlosz has joined #lisp
toorevitimirp has quit [Quit: Konversation terminated!]
shangul has quit [Read error: Connection reset by peer]
shangul has joined #lisp
toorevitimirp has joined #lisp
Alloc has quit [Ping timeout: 258 seconds]
Alloc has joined #lisp
bilegeek has quit [Quit: Leaving]
natj212_ has quit [Ping timeout: 258 seconds]
toorevitimirp has quit [Quit: Konversation terminated!]
Alloc has quit [Ping timeout: 264 seconds]
narimiran has joined #lisp
iAmDecim has joined #lisp
Oladon has quit [Quit: Leaving.]
toorevitimirp has joined #lisp
iAmDecim has quit [Ping timeout: 258 seconds]
mangul has joined #lisp
Archenoth has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
shangul has quit [Ping timeout: 256 seconds]
chibatan has joined #lisp
mangul has quit [Ping timeout: 240 seconds]
jonatack has quit [Ping timeout: 246 seconds]
aartaka has quit [Read error: Connection reset by peer]
shangul has joined #lisp
progfun has joined #lisp
Cymew has joined #lisp
iissaacc has quit [Remote host closed the connection]
aartaka has joined #lisp
shangul has quit [Read error: Connection reset by peer]
aartaka has quit [Read error: Connection reset by peer]
galex-713 has quit [Ping timeout: 272 seconds]
galex-713 has joined #lisp
ldb has joined #lisp
shka_ has joined #lisp
iamFIREc1 has joined #lisp
Volt_ has quit [Quit: ]
iamFIREcracker has quit [Ping timeout: 240 seconds]
<phoe>
hello
<phoe>
I am waking up, slowly
<ldb>
heloo phoe
treflip has joined #lisp
scymtym has quit [Ping timeout: 246 seconds]
Alloc has joined #lisp
progfun has quit [Ping timeout: 240 seconds]
pve has joined #lisp
fouric has quit [Quit: WeeChat 2.8]
scymtym has joined #lisp
scymtym has quit [Remote host closed the connection]
vhost- has joined #lisp
scymtym has joined #lisp
gaqwas has quit [Remote host closed the connection]
galex-713 has quit [Ping timeout: 244 seconds]
davepdotorg has joined #lisp
_whitelogger has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
shangul has joined #lisp
gaqwas has joined #lisp
gaqwas has joined #lisp
galex-713 has joined #lisp
Blukunfando has joined #lisp
dilated_dinosaur has quit [Ping timeout: 240 seconds]
dilated_dinosaur has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
aartaka has joined #lisp
iAmDecim has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
space_otter has quit [Remote host closed the connection]
aartaka has quit [Read error: Connection reset by peer]
X-Scale` has joined #lisp
jonatack has joined #lisp
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` is now known as X-Scale
davepdotorg has quit [Remote host closed the connection]
ldb has quit [Quit: Connection closed]
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
jonatack has quit [Ping timeout: 246 seconds]
<kelamir[m]>
Good morning 🙂
jonatack has joined #lisp
<phoe>
good morning
mangul has joined #lisp
<beach>
Hello kelamir[m].
<kelamir[m]>
[m] - matrix?
<beach>
I think so, yes.
<beach>
kelamir[m]: Are you new here?
<kelamir[m]>
Oh. Is this automatic, or you do that intentionally? 🤔
<kelamir[m]>
I am, beach. I've been to #lispcafe for several days, but haven't been writing here much.
shangul has quit [Ping timeout: 260 seconds]
<beach>
I see.
<kelamir[m]>
What are you making nowadays, Beach?
<beach>
minion: Please tell kelamir[m] about SICL.
<minion>
kelamir[m]: 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
mangul is now known as shangul
<beach>
minion: Please tell kelamir[m] about Cleavir.
<minion>
kelamir[m]: Cleavir: A project to create an implementation-independent compilation framework for Common Lisp. Currently Cleavir is part of SICL, but that might change in the future
<kelamir[m]>
Woah, sounds cool!
<beach>
Thanks.
* kelamir[m]
checks out SICL
<no-defun-allowed>
beach: Yes, the [m] suffix means you are communicating over Matrix, and you haven't bothered to change your nick with whatever bot does that.
<no-defun-allowed>
Whoops, that's for kelamir.
<beach>
Thanks anyway. :)
<no-defun-allowed>
As far as I can tell, the [m] got chopped off no-defun-allowed[m] to fit it in 16 characters, so I never had to change it.
<beach>
Oh, nice!
<kelamir[m]>
Thank you for the explanation,*no-defun-allowed*.
aartaka has joined #lisp
davepdotorg has joined #lisp
<beach>
kelamir[m]: So what brings you to #lisp? Are you planning to learn Common Lisp?
<kelamir[m]>
I'm learning Lisp, just a beginner. I read a little on Lisp and went into making the program right away. It's being made to gamify work, for me and a friend. You have to work for 25 minutes to earn 1 gold, and 30 gold lets you buy(later, lend) a book. Two days ago I set it up to work with classes, instead of storing data in a single variable, like (set (nth 0 li) 10).
<kelamir[m]>
So my friend will surely have a bad time using it :D
<beach>
I see [sort of].
aartaka has quit [Read error: Connection reset by peer]
jesse1010 has joined #lisp
aartaka has joined #lisp
<kelamir[m]>
beach: what had caused you to reimplement Common Lisp? Any reasons?
arbv has quit [Read error: Connection reset by peer]
secretmyth has quit [Remote host closed the connection]
secretmyth has joined #lisp
arbv has joined #lisp
aartaka has quit [Read error: Connection reset by peer]
edgar-rft has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
McParen has joined #lisp
contrapunctus has left #lisp ["Disconnected: Replaced by new connection"]
contrapunctus has joined #lisp
contrapunctus has left #lisp [#lisp]
contrapunctus has joined #lisp
ayuce has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
<beach>
kelamir[m]: Most existing free implementations started life many decades ago, so the code is not up to snuff compared to what we know today.
davepdotorg has quit [Remote host closed the connection]
<beach>
kelamir[m]: And hardware has evolved. Technique that were used back then, in particular table driven techniques, are no longer very good because of the relatively bad performance of memory.
davepdotorg has joined #lisp
shangul has quit [Quit: Leaving]
<beach>
kelamir[m]: Also, debugging support in most free implementations is not that great. I want to improve that.
<beach>
kelamir[m]: So I have invented several new techniques that I wanted to put in a fresh implementation.
orivej has joined #lisp
_paul0 has quit [Quit: Leaving]
<beach>
kelamir[m]: Because the work on most implementations started before CLOS was part of the standard, or even existed at all, most of them are structured as a pre-CLOS Common Lisp system with CLOS "bolted on". That means that they cannot take advantage of the flexibility of CLOS in the base implementation.
<beach>
kelamir[m]: By bootstrapping CLOS first, I can simplify many aspects of the system, because they can take advantage of CLOS for even basic stuff like symbols, arrays, packages, etc.
<kelamir[m]>
That sounds helpful. I'm looking forward to using it once I can tell the difference. So you'll make CLOS even better? 🤩 I can barely understand what CLOS is about, but it's a handy thing. Thanks for working on it, beach.
<jmercouris>
I was trying some backquote ,@ nonsense
orivej has quit [Ping timeout: 265 seconds]
orivej_ has joined #lisp
Bourne has joined #lisp
ljavorsk has joined #lisp
MightyJoe has joined #lisp
cyraxjoe has quit [Ping timeout: 246 seconds]
jonatack has quit [Ping timeout: 264 seconds]
jonatack has joined #lisp
galex-713 has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
davepdotorg has quit [Ping timeout: 256 seconds]
jonatack has quit [Ping timeout: 240 seconds]
Kaisyu7 has quit [Ping timeout: 240 seconds]
bitmapper has quit [Ping timeout: 258 seconds]
toorevitimirp has quit [Remote host closed the connection]
Stanley00 has quit [Remote host closed the connection]
galex-713 has quit [Ping timeout: 272 seconds]
aartaka has joined #lisp
<Xach>
Hmm, what's the easiest way to make a persistent alien octet buffer in SBCL? Something I can pass to sb-posix:read and sb-posix:write.
davepdotorg has joined #lisp
Bourne has quit [Read error: Connection reset by peer]
<Xach>
By persistent I mean not created by with-alien - something I can assign to a global variable, for example.
<phoe>
this smells like something that static-vectors would do
<phoe>
unless by "buffer" you mean something other than "vector"
<Xach>
Ah, I'll see what it does, thanks.
davepdotorg has quit [Remote host closed the connection]
<Xach>
yoinks, looks like it's deep internals frobbing there
davepdotorg has joined #lisp
<phoe>
tl;dr static-vectors allocates a Lisp array whose storage is also reachable from the C world
<phoe>
that's because that vector won't be moved by GC
<Xach>
Hmm, but the array it allocates is not suitable for sb-posix:read/write
<Xach>
Not directly, anyway
<phoe>
oh! why is that?
* phoe
reads
<Xach>
sb-posix:read works on a (* t) alien object, not a lisp object.
<phoe>
oh, you mean a void pointer?
<Xach>
I don't know - I am copying what is in the sb-posix:read/write source.
<Xach>
It does not say "void pointer", it says (* t)
<phoe>
oh
<phoe>
hmmmm, I assume it means any sort of pointer
<phoe>
if you call #'static-vector-pointer on the Lisp vector then you get a SAP object
<jackdaniel>
void pointer is a C concept and it is an intermediate type for casting pointers
<Xach>
phoe: that could be what i need, I'll try that.
aartaka has quit [Read error: Connection reset by peer]
toorevitimirp has joined #lisp
<phoe>
I assume that (* t) reads as "pointer to something of type T"
mankaev_ has quit [Ping timeout: 240 seconds]
<Xach>
Here's the context - I had an idea about signaling via a pipe. Shared pipe where the consumer waits via select(2) and the producer occasionally writes a meaningless byte to say "grab more work". This is probably better done with sb-thread primitives, but I thought this would be FSVO easier.
<jackdaniel>
i.e to create structures managing an arbitrary pointer. being precise: any pointer may be cast to a void pointer, and void pointer may be cast back only to the original data type
<Xach>
The hangup is my naive expectation that I could use read(2) and write(2) more easily than I've found.
aartaka has joined #lisp
<Xach>
I could instead make fd-streams from the pipe fds and go from there.
mankaev has joined #lisp
ebrasca has joined #lisp
<_death>
no one mentioned cffi:foreign-alloc ?
<Xach>
maybe they picked up on my unspoke desire to use sbcl directly
<_death>
well, cffi uses sbcl directly
iAmDecim has quit [Ping timeout: 256 seconds]
aartaka has quit [Read error: Connection reset by peer]
luckless has quit [Remote host closed the connection]
davepdot_ has quit [Remote host closed the connection]
davepdotorg has joined #lisp
yitzi has joined #lisp
galex-713 has joined #lisp
aeth has quit [Ping timeout: 260 seconds]
aeth has joined #lisp
ljavorsk has quit [Ping timeout: 265 seconds]
galex-713 has quit [Ping timeout: 272 seconds]
<Xach>
jdz: how are they named? apropos finds nothing
narimiran has quit [Ping timeout: 256 seconds]
<Xach>
jdz: a semaphore is working fine for my purpose, anyway - it is pretty simple.
Stanley00 has joined #lisp
<jdz>
Xach: They're in sb-concurrency package, make-mailbox, receive-message, send-message, tec.
<jdz>
etc even.
<Xach>
ah
<Xach>
jdz: thank you, that's cool
ebrasca has quit [Remote host closed the connection]
nitrix has quit [Read error: Connection reset by peer]
Stanley00 has quit [Ping timeout: 256 seconds]
iAmDecim has joined #lisp
<leo_song>
is there any widely used library to make literal hash tables? surely I can write another one, but if there are something which the community is familiar would be better
<phoe>
#.(alexandria:plist-hash-table ...)
<Xach>
leo_song: no
<Xach>
the phoe trick is not widely used
<phoe>
:(
<Xach>
it isn't!
<leo_song>
well, as alexandria is common enough, I guess it's fair
<phoe>
I haven't seen any other one, except for #H syntax from RUTILS
<Lycurgus>
because natively provided facilities of an implementation make more eense?
<phoe>
you can't use those in portable code though
nitrix has joined #lisp
<Lycurgus>
i mean cl
<Lycurgus>
*meant
<Xach>
Lycurgus: possibly
<Lycurgus>
it was supposed to be a thing
<Xach>
i think it's another case of "once you know how to make it, you have accepted that you might not need it as much as you thought initially"
<Lycurgus>
the fact that an unchanging spec never emerged notwithstanding
<Xach>
i don't know if this is a good thing or a bad thing
iAmDecim has quit [Ping timeout: 258 seconds]
Codaraxis_ has joined #lisp
emacsomancer has quit [Read error: Connection reset by peer]
CEnnis91 has joined #lisp
<Lycurgus>
if the lack of portability of otherwise more or less conforming implementations was that great cl would be an utter failure
Codaraxis has quit [Ping timeout: 258 seconds]
iamFIREcracker has joined #lisp
iamFIREc1 has quit [Ping timeout: 246 seconds]
iAmDecim has joined #lisp
aartaka has quit [Read error: Connection reset by peer]
emacsomancer has joined #lisp
progfun has joined #lisp
EvW has joined #lisp
rumbler31_ has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
edgar-rft has quit [Quit: Leaving]
galex-713 has joined #lisp
aartaka has joined #lisp
treflip has quit [Quit: WeeChat 2.6]
sjl_ has joined #lisp
Archenoth has joined #lisp
<Josh_2>
_death: I think I fixed Parmenides so it now passes all It's tests
<Josh_2>
I will push to github so you can take a look
<_death>
Josh_2: cool.. did you define a test system?
<Josh_2>
with ASDF?
<Josh_2>
I've never done that before
<_death>
yes.. basically it could look like the one in https://github.com/death/constantia .. have an :in-order-to clause in the main system and define a test system with a :perform clause
<Josh_2>
oh also I think we can just get rid of prtest3, the syntax for all the def-frames was incorrect and it seems to just be an early version prtest
<Josh_2>
okay I will attempt that
<_death>
then you can use asdf:test-system to run the tests
<_death>
I thought about some improvements to make on the weekend
brown121407 has joined #lisp
iAmDecim has joined #lisp
<Josh_2>
The original writers have used (eval ..) and this is why it wasn't passing It's tests
<mseddon>
oh, thanks! and the syntax is really tidy too.
bsd4me has joined #lisp
<mseddon>
and I'd argue that given that declaration, the code is 'correct'. and performant. Many hashing algorithms etc require modulo arithmetic and must munch lots of bytes. It's good to keep them in a register and reduce the amount of branch prediction flushes you're doing.
<mseddon>
it rather muddies the definition of the arithmetic operators though.
<_death>
right.. but if you're aiming for actual performance then it may not be satisfactory still.. then you move on to simd packs :)
<mseddon>
but only lexically, where it's convenient when e.g. porting C.
<mseddon>
well exactly :)
davepdotorg has joined #lisp
<_death>
and unfortunately there is no openmp-like support (i.e. with a view towards performance)
chibatan has quit [Quit: WeeChat 2.3]
chibatan has joined #lisp
<mseddon>
_death: yeah, there's a lot of fun optimizations in "High Performance Compilers for Parallel Optimization" that are kinda... lacking.
<mseddon>
some of which can now even be deferred to the gpu
dominic34 has quit [Ping timeout: 256 seconds]
<mseddon>
although I figure macros can save the day, assuming cffi is up to the task of dynamically linking to them.
<_death>
yeah.. for gpu there are some cuda/opencl systems.. although for high performance computing it's not a panacea
<mseddon>
yeah, i think a lot of that is usually better folded away as higher level functions, matrix multiply, bitonic sort etc.
Frobozz has quit [Remote host closed the connection]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
xrash has quit [Remote host closed the connection]
Lord_of_Life_ is now known as Lord_of_Life
iAmDecim has quit [Ping timeout: 246 seconds]
Necktwi has quit [Ping timeout: 256 seconds]
davepdotorg has joined #lisp
<mseddon>
beach: and no, I never want to lose correctness when (saftey 3). if (saftey 0) and I take the cdr of a fixnum, I don't care if you segfault, though.
<Josh_2>
I care if beach segfaults
<Josh_2>
:P
<mseddon>
I meant his, or indeed anyone's implementation. If the lead developer segfaults, that is a different matter :)
<mseddon>
safety*. bleh. it has been a long day.
duuqnd has joined #lisp
rogersm has quit [Ping timeout: 244 seconds]
davepdotorg has quit [Ping timeout: 272 seconds]
lavaflow has joined #lisp
chibatan has quit [Quit: WeeChat 2.3]
<mseddon>
beach may have a point about that SBCL modular arithmetic declaration though. Since, for example, CLISP (at least, used to, I've not touched it for 20+ years) will just ignore declarations (as per spec), that means code relying on sbcl behaviour is now non-conforming in sbcl.
<mseddon>
perhaps it should be (sbcl:declare ...), that way it won't just silently fail when you run it and surprise you later.
<fiddlerwoaroof>
no-defun-allowed: yeah, I'll probably rewrite my library to use something more like CL's reader algorithm.
EvW1 has joined #lisp
brown121408 has joined #lisp
<_death>
mseddon: what code are you referring to?
brown121408 is now known as zazavatar
<fiddlerwoaroof>
mseddon: the spec says "The consequences are undefined if a program violates a declaration or a proclamation"
<mseddon>
(ldb (byte 32 0) (logxor x (lognot y))))
<mseddon>
(declare (type (unsigned-byte 32) x y))
<mseddon>
is not a declaration that is recognised.
brown121407 has quit [Ping timeout: 260 seconds]
<_death>
mseddon: what do you mean by "recognised"?
<mseddon>
3.3.1: In general, an implementation is free to ignore declaration specifiers except for the declaration, notinline, safety, and special declaration specifiers.
<_death>
that is confirming code
<mseddon>
yes.
<_death>
*conforming
<fiddlerwoaroof>
If your code violates the declared type, your program is non-conforming
zazavatar is now known as brown121407
<mseddon>
now, imagine a minimal implementation
<mseddon>
following 3.3.1 to the letter
<mseddon>
it does not SEE (declare (type (unsigned-byte 32) x y)
<mseddon>
so it's results will diverge from SBCL.
<_death>
if the declarations are ignored, the result would still be the same
<mseddon>
so it doesn't imply overflow?
<_death>
what overflow?
<fiddlerwoaroof>
mseddon: if you have a value that's MAXVALUE of its declared type (unsigned-byte 32) and incf it, the implementation can do whatever it wants
<mseddon>
right.
<fiddlerwoaroof>
That incf is UB
<mseddon>
gotcha. thanks.
<_death>
the result of lognot may need more than 32 bits, but that's ok
<mseddon>
so basically unsigned-byte is a trivial deftype macro.
rogersm has joined #lisp
<fiddlerwoaroof>
The return types of the functions LOGXOR and LOGNOT aren't specified, as _death is pointing out
<fiddlerwoaroof>
You'd have to do (the (unsignted-byte 32) (lognot y)) to declare the type of the result
<_death>
right, and in the code shown the final LDB has sbcl infer the return type
edgar-rft has joined #lisp
<mseddon>
right. so it's propagating from values, not variables, duh. flowgraph.
<mseddon>
but in the case of (+ x y), the best it can infer would be `(integer 0 ,(expt 2 33))
<_death>
yes, but if you also have a surrounding (ldb (byte 32 0) ...) then the result is again (unsigned-byte 32).. and the modular arithmetic optimizer may eliminate the intermediate step
<mseddon>
ahhh, I get it. and then yes. the compiler just folds that all in. neat!
<_death>
it's the same with the lognot case..
<fiddlerwoaroof>
Yeah, the (disassemble 'i) is pretty nice there
<mseddon>
yeah I should dig more into the emitted code.
<mseddon>
thanks all!
davepdotorg has joined #lisp
orivej has joined #lisp
rippa has joined #lisp
davepdotorg has quit [Ping timeout: 260 seconds]
gravicappa has quit [Ping timeout: 256 seconds]
gravicappa has joined #lisp
progfun has quit [Ping timeout: 246 seconds]
bitmapper has joined #lisp
Necktwi has joined #lisp
TwoNotes has joined #lisp
karlosz has quit [Remote host closed the connection]
Necktwi has quit [Ping timeout: 246 seconds]
<Josh_2>
is there a way to detect whether a stream was closed other than trying to read from it and catching the condition?
<dlowe>
it should, but it's worth noting that the "closed" state of a socket stream can be a little weird at times.
<_death>
I suppose, though that may not give the actual information may want
<dlowe>
plan9 was right - bidirectional streams are terrible.
<fiddlerwoaroof>
Josh_2: I just recently re-discovered that there are utilities that handle sockets for you, and you just read from stdin and write to stdout
<fiddlerwoaroof>
These don't help with clients, I guess
grewal has quit [Quit: leaving]
<fiddlerwoaroof>
And it'd be nice have pure-lisp versions of this sort of abstraction (e.g. a higher-order function or a macro that sets up *STANDARD-INPUT* and *STANDARD-OUTPUT* correctly before invoking your function
TwoNotes has quit [Quit: Leaving]
<fiddlerwoaroof>
Also, I think READ-SEQUENCE handles your problem
Cymew has quit [Ping timeout: 246 seconds]
<Josh_2>
it doesn't solve my problem really
<fiddlerwoaroof>
Most of my code around sockets creates a buffer and calls READ-SEQUENCE until its return value < length of the buffer
<fiddlerwoaroof>
And then I call a second function with the buffer between iterations, or whatever
<Josh_2>
well I don't know exactly how much I have to read
<Josh_2>
I just read until CRLF
<fiddlerwoaroof>
So, if you're buffering, you split the buffer on crlf
<fiddlerwoaroof>
You can also use READ-LINE with socket-streams
<fiddlerwoaroof>
and just have it return nil if it hits EOF
<Josh_2>
yes
<Josh_2>
I was doing that
<dlowe>
Josh_2: you want your socket to be in non-blocking mode
<dlowe>
and then buffer any incomplete lines
<Josh_2>
I don't understand
<dlowe>
sockets can be blocking or non-blocking - in blocking mode, when you request a read of size x, it will block until x bytes have been received
AmatureProgramme has quit [Quit: Leaving]
<Josh_2>
I am just trying to see if the client DC'd when they shouldn't have
<dlowe>
in non-blocking mode, it will return immediately with whatever has been received, up to x
<dlowe>
ok, under what conditions is it okay to dc?
<_death>
CL also has read-char-no-hang (but unfortunately no read-byte-no-hang..)
AmatureProgramme has joined #lisp
bocaneri has quit [Read error: Connection reset by peer]
<Josh_2>
In the event of a system failure I assume
<fiddlerwoaroof>
(actually, the LW-specific part is just the SSL-CONNECTION function)
<_death>
fiddlerwoaroof: here your read-line may hang forever, unless you have some timeouts in place
narimiran has joined #lisp
<fiddlerwoaroof>
_death: I think the COMM library sets that up
<fiddlerwoaroof>
I do need to check the docs :)
<fiddlerwoaroof>
AND, that code is broken
<_death>
hmm it's also weird that you use = to compare the return value
<fiddlerwoaroof>
I use the gemini-byline
<fiddlerwoaroof>
if the length read = the length of the buffer, there may still be more data on the socket
Jesin has quit [Quit: Leaving]
<_death>
right, but read-line returns a string
<fiddlerwoaroof>
Line 41 should be READ-SEQUENCE, not READ-LINE
<fiddlerwoaroof>
the function at 47 is the one I mostly use
<_death>
ok
<fiddlerwoaroof>
Sorry for using broken code as an example :)
<fiddlerwoaroof>
I just fixed it, I think
<fiddlerwoaroof>
Assuminig SSL-CONNECTION returns a non-blocking socket stream
coltkirk has joined #lisp
<coltkirk>
hello, i'm going through all of baggers Little Bits, I really am quite fond of those videos
AmatureProgramme has quit [Ping timeout: 260 seconds]
luckless has quit [Remote host closed the connection]
luckless has joined #lisp
yitzi has quit [Read error: Connection reset by peer]
<coltkirk>
might solving all the problems in Gentle Introduction be a good follow up to Bagger's
Jesin has joined #lisp
AmatureProgramme has joined #lisp
<_death>
I've not seen the videos (yet).. but I guess it wouldn't hurt ;)
<coltkirk>
i'd skip the actual text, and just go straight to the exercises, then use all my notes from the videos to solve
sonologico has quit [Remote host closed the connection]
<_death>
perhaps some of them require the context set up by the text, or assume some ignorance remediated by later text
<coltkirk>
it does. I always have problems remembering caddr cddr caddddrrr and all the ancient register values
<_death>
if so, there are exercises on the web that likely demand less context.. for example the "ninety-nine lisp problems" or the lisp-koans.. also note these sets may have a different focus
davepdotorg has joined #lisp
<coltkirk>
oh nice, i'll go right ahead and bookmark those
<_death>
coltkirk: you only need to remember CAR and CDR.. CADDR is (cAr (cDr (cDr x)))
<coltkirk>
oh ok, i see how that works
<coltkirk>
car car cdr cdr Caaddr
<mseddon>
you'll find yourself remembering and using more than you'd think. :)
Necktwi has joined #lisp
davepdotorg has quit [Ping timeout: 272 seconds]
<mseddon>
coltkirk: as a warning, Gentle Introduction (even the modern releases) seem to cover the 1984 spec, so for example, they make no use of generic functions or classes.
rogersm has quit [Quit: Leaving...]
<mseddon>
I cannot speak for the specifics, but I imagine later editions work with the modern standard, while documenting a common lisp subset.
choegusung has joined #lisp
duuqnd has quit [Remote host closed the connection]
gaqwas has quit [Ping timeout: 260 seconds]
lottaquestions has joined #lisp
<Josh_2>
It's a good book though
<Josh_2>
that was my first programming book
bsd4me has left #lisp ["Leaving"]
karlosz has joined #lisp
oldtopman has quit [Ping timeout: 256 seconds]
oldtopman has joined #lisp
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
shka_ has quit [Ping timeout: 256 seconds]
Aurora_v_kosmose has quit [Remote host closed the connection]
Aurora_v_kosmose has joined #lisp
brown121407 has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
<mseddon>
yeah, it is well written.
scymtym has quit [Ping timeout: 244 seconds]
bilegeek has joined #lisp
wsinatra_ has joined #lisp
karlosz has quit [Quit: karlosz]
narimiran has quit [Ping timeout: 264 seconds]
choegusung has quit [Quit: leaving]
iAmDecim has joined #lisp
hsaziz has quit [Quit: hsaziz]
dominic34 has joined #lisp
dominic34 has quit [Excess Flood]
dominic34 has joined #lisp
hsaziz has joined #lisp
hsaziz has quit [Client Quit]
davepdotorg has joined #lisp
iAmDecim has quit [Ping timeout: 260 seconds]
wsinatra has quit [Quit: WeeChat 2.9]
davepdotorg has quit [Ping timeout: 244 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
EvW1 has quit [Ping timeout: 240 seconds]
<Josh_2>
Finally fixed a very annoying bug, pretty satisfying
hsaziz has joined #lisp
hsaziz has quit [Client Quit]
wsinatra_ has quit [Ping timeout: 240 seconds]
terpri_ has joined #lisp
terpri has quit [Remote host closed the connection]
notzmv has quit [Read error: Connection reset by peer]
notzmv has joined #lisp
notzmv is now known as Guest22817
gareppa has joined #lisp
PuercoPop has joined #lisp
EvW has joined #lisp
gareppa has quit [Quit: Leaving]
rumbler31 has quit [Ping timeout: 265 seconds]
ebrasca has joined #lisp
gravicappa has quit [Ping timeout: 240 seconds]
wsinatra_ has joined #lisp
random-nick has quit [Ping timeout: 256 seconds]
scymtym has joined #lisp
<kelamir[m]>
I'm glad about you, Josh_2. That must be nice :)
snowyfox has joined #lisp
mindCrime_ has joined #lisp
troydm has quit [Ping timeout: 246 seconds]
karlosz has joined #lisp
troydm has joined #lisp
gxt__ has quit [Remote host closed the connection]
gxt__ has joined #lisp
Lycurgus has joined #lisp
gravicappa has joined #lisp
gravicappa has quit [Ping timeout: 246 seconds]
akoana has joined #lisp
sjl_ has quit [Ping timeout: 246 seconds]
pve has quit [Quit: leaving]
Aurora_v_kosmose has quit [Quit: Пока, мир.]
Aurora_v_kosmose has joined #lisp
dominic34 has quit [Ping timeout: 240 seconds]
Guest22817 is now known as notzmv
notzmv has quit [Changing host]
notzmv has joined #lisp
corpix_ has quit [Remote host closed the connection]
Codaraxis_ has quit [Read error: Connection reset by peer]
akoana has quit [Quit: leaving]
Codaraxis_ has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
saitousama has joined #lisp
contrapunctus has joined #lisp
contrapunctus has left #lisp ["Disconnected: Replaced by new connection"]
contrapunctus has joined #lisp
Archenoth has quit [Read error: Connection reset by peer]
cosimone has joined #lisp
iAmDecim has joined #lisp
cosimone has quit [Ping timeout: 260 seconds]
iAmDecim has quit [Ping timeout: 256 seconds]
ebrasca has quit [Remote host closed the connection]