binghe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language <http://cliki.net/> logs:<https://irclog.whitequark.org/lisp, http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.0, CMUCL 21b, ECL 16.1.3, CCL 1.11.5
Cymew has joined #lisp
shifty has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
porky11 has quit [Ping timeout: 265 seconds]
porky11 has joined #lisp
porky11 has quit [Read error: Connection reset by peer]
Kundry_W_ has joined #lisp
dto has joined #lisp
<dto> hi xach
<dto> i'm curious to know if you have any thoughts or recommendations on day planning? https://i.imgur.com/mym4DKo.jpg i'm working on some lisp to make nice cards
<dto> do you use Org?
<jasom> otwieracz: (test2) didn't work right for me
<jasom> oh nvm, I accidentally pasted the (test) in as well
epony has joined #lisp
<jasom> otwieracz: it looks like you are exiting your lambda without releaseing the lock; did you try a test where your thread performs the lambda many times?
Mr_Tea has quit [Ping timeout: 264 seconds]
arescorpio has joined #lisp
<jasom> hmm, I wrote a test that does it and it completes, but the mutex was still being held by an exited anonymous thread
Kevslinger has quit [Quit: Connection closed for inactivity]
Lycurgus has joined #lisp
<jasom> otwieracz: try running test2 two times in a row, it will deadlock waiting on the mutex the second time
foom2 has joined #lisp
<jasom> otwieracz: if you run test2 it sometimes ends with an rcount of 1
smurfrobot has joined #lisp
wigust has quit [Ping timeout: 256 seconds]
LiamH has quit [Quit: Leaving.]
foom has quit [Ping timeout: 276 seconds]
smurfrobot has quit [Remote host closed the connection]
<jasom> otwieracz: sorry that was wrong; if you run test2 rwlock-resource is still owned by an exited thread despite the rcount being zero
Mr_Tea has joined #lisp
papachan is now known as papachan_
<jasom> otwieracz: adding a (print (rwlock-resource rwlock)) immediately after the release-lock line in read-lock-end shows the lock as still being owned. This is bad
pagnol has joined #lisp
pierpa has joined #lisp
<jasom> otwieracz: aha sbcl's mutex release silently returns if the current thread is not the owner. You want a semaphore, not a mutex for rwlock-resource
<jasom> If you are tied to bordeaux threads, I think a condition variable is what you want
fikka has quit [Ping timeout: 240 seconds]
Kundry_W_ has quit []
<jasom> otwieracz: I have to go, if you still haven't figured it out in a couple hours I'll comment on the gist with a fix
nyef has quit [Ping timeout: 256 seconds]
emaczen has joined #lisp
<emaczen> how can I force ASDF to force load all systems or is that what the :force keyword does specify?
EvW1 has quit [Ping timeout: 260 seconds]
Oladon has joined #lisp
<Bike> you do :force :all, i think
pfdietz has quit []
fikka has joined #lisp
Mr_Tea has quit [Ping timeout: 256 seconds]
lksmk has quit [Quit: Lost terminal]
pagnol has quit [Ping timeout: 248 seconds]
wxie has joined #lisp
khisanth_ is now known as Khisanth
elts has quit [Quit: .]
elts has joined #lisp
<whoman> (defpackage :something (:use :cl)) ;; undefined function :USE ??
fikka has quit [Ping timeout: 248 seconds]
<Bike> maybe the package you're reading that in doesn't use CL?
<whoman> hmm, CL-USER in a fresh slime/sbcl
<whoman> maybe it is supposed to be in package.lisp and use ql: ?
<whoman> *quicklisp
fikka has joined #lisp
SaganMan has joined #lisp
emaczen has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
__rumbler31 has joined #lisp
__rumbler31 has quit [Read error: Connection reset by peer]
fisxoj has joined #lisp
dto has quit [Remote host closed the connection]
wxie has quit [Ping timeout: 256 seconds]
d4ryus1 has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Arcaelyx has joined #lisp
d4ryus has quit [Ping timeout: 256 seconds]
_cosmonaut_1 has quit [Ping timeout: 276 seconds]
smurfrobot has joined #lisp
fikka has joined #lisp
dieggsy has joined #lisp
al-damiri has joined #lisp
smokeink has joined #lisp
smurfrobot has quit [Ping timeout: 264 seconds]
saki has quit [Quit: saki]
<whoman> i dont know. i cant lisp
fisxoj has quit [Quit: fisxoj]
arescorpio has quit [Quit: Leaving.]
pmc_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 276 seconds]
<stacksmith> "(defpackage #:something (:use #:cl))" Damn the colon smileys!
pmc_ has quit [Client Quit]
ludston has quit [Quit: -a- Connection Timed Out]
fikka has joined #lisp
ludston has joined #lisp
<whoman> it works on the repl , but not C-x-e .. oh well!
<whoman> also yeh ty for the unintern #
saki has joined #lisp
<White_Flame> hmm, C-x-e works for me in a fresh slime/sbcl
<White_Flame> on that form
mjl_ has joined #lisp
wmannis has quit [Quit: wmannis]
<White_Flame> but yeah, it probably doesn't know defpackage, so it's trying to evaluate the arguments
<White_Flame> anything in your *inferior-lisp* buffer?
<White_Flame> or *slime-events*?
marusich has joined #lisp
nowhereman_ has quit [Read error: Connection reset by peer]
milanj has quit [Quit: This computer has gone to sleep]
nowhere_man has joined #lisp
saki has quit [Quit: saki]
saki has joined #lisp
<whoman> hmmm
saki has quit [Client Quit]
saki has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
shifty has quit [Ping timeout: 240 seconds]
<pierpa> try (CL:DEFPACKAGE ...)
vtomole has joined #lisp
nika has joined #lisp
loli has quit [Quit: WeeChat 2.0.1]
<beach> Good morning everyone!
fikka has joined #lisp
<smokeink> Good morning
lnostdal has joined #lisp
vultyre has joined #lisp
loli has joined #lisp
vultyre is now known as vultyre[GB]
vultyre[GB] is now known as vultyre
shka has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
atr3y0 has joined #lisp
damke has joined #lisp
Arcaelyx_ has joined #lisp
atr3y0 has quit [Quit: Leaving]
Khisanth has quit [Ping timeout: 276 seconds]
Arcaelyx has quit [Ping timeout: 252 seconds]
sjl has joined #lisp
marusich has quit [Ping timeout: 240 seconds]
vultyre has quit [Quit: Leaving]
sjl has quit [Ping timeout: 265 seconds]
marusich has joined #lisp
Khisanth has joined #lisp
<whoman> pierpa, ok
schoppenhauer has quit [Ping timeout: 255 seconds]
schoppenhauer has joined #lisp
pjb has joined #lisp
<whoman> clos definitions are quite verbose
marusich has quit [Ping timeout: 248 seconds]
sistine has joined #lisp
groovy2shoes has joined #lisp
python476 has quit [Ping timeout: 256 seconds]
Khisanth has quit [Ping timeout: 248 seconds]
nowhereman_ has joined #lisp
Khisanth has joined #lisp
Bike has quit [Quit: Lost terminal]
nowhere_man has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 256 seconds]
Arcaelyx has joined #lisp
Arcaelyx_ has quit [Ping timeout: 265 seconds]
<ludston> whoman: in comparison to what though?
<whoman> most any other language for OOP
<whoman> class definitions especially, i think method/generic is quite nicely clean. maybe i will make a macro for myself for defclass, i find it is unnecessary to (slotname :initarg :slotname :initform nil ..) rather than just (slotname) but perhaps it is my reading comprehension that is not verbose enough
fikka has joined #lisp
<aeth> It's kind of in the middle afaik. More verbose than Python, less than Java.
<whoman> hmm true about java.. i am also overly accustomed to class definitions being in one place/block with the associated methods/interface
<whoman> i've just got to gird my loins and customize lisp a bit for myself =)
Lycurgus has quit [Quit: Ex Chat]
<stacksmith> I wrote a macro a while back that make class definitions much like structs...
<pillton> It is wrong to think that generic functions are equivalent to methods/interfaces in C++, Java and Python.
<stacksmith> They feel more like smalltalk messages...
<stacksmith> But a lot better.
<pillton> Generic functions don't belong to a class.
<beach> whoman: The reason for the slot options is so that you can apply fundamental principles of software engineering, such as access control, abstraction, data hiding, etc. If you remove those options, those aspects can't be controlled. But perhaps you are not used to programming in large projects where several people need to collaborate and where long-term maintenance is a real concern.
fortitude has quit [Read error: Connection reset by peer]
fortitude has joined #lisp
<beach> This is also why most people here reject any attempts at "simplifying" class definition by defining a custom macro with fewer slot options. Usually, such attempts boil down to not caring about the difference between interface and implementation.
<whoman> i can fully understand these things =) but, to type the same slot name twice i feel could be optional
dddddd has quit [Remote host closed the connection]
<beach> It is a bad idea to have the same name of the slot as the slot accessor.
<beach> For reasons I just mentioned.
<whoman> why would CLOS ask for a slot name, and not gensym its own then ?
<rme> Lots of people try writing a defclass wrapper macro. Many ultimately decide it was a bad idea.
<rme> Just go with it.
<beach> Because then, when you reload the class, the slot will get a different name, and you will have huge classes in the end with lots of gensymed slot names.
<rme> where by "just go with it" I mean just use regular defclass
<whoman> hrm. i am accustomed to designing data types and then code to operate on them, rme
<beach> whoman: Furthermore, CLOS needs to know to merge slots with the same name in subclsses.
<whoman> beach, true; but it could base it on the accessor name no ?
<whoman> hmmm. what do people use as convention for slot/accessor name differences? i've seen '%'
<beach> whoman: No, because it is common to have several accessor for the same slot.
<whoman> hmmm that sounds like a bad idea =)
<beach> whoman: That's what I use. Some people put a suffix -of on the accessor. Not many people like that convention though.
<beach> whoman: You may want to have an exported reader and a private writer, so you need two different names.
<pjb> On the other hand, often (99.99%) slots are not sophisticated: their accessors don't do anything but setting or reading the slot.
<pjb> And if they do something, often (0.009999%), they do something that is systematical, so you do want to generate them with your own macro.
<beach> whoman: Also part of the verbosity you see is that in Common Lisp, you can write :ACCESSOR BLA wheras in Java, you have to write separate get_bla and set_bla functions which is even more verbose.
<pjb> You can also use :reader get-blah :writer set-blah ;-)
<whoman> beach, ahh, cool !
<whoman> pjb, i agree there, but maybe then one should be using structs for the simple objects
<pjb> If only you could redefine structs easily, and if only their accessors were generic functions…
fikka has quit [Ping timeout: 256 seconds]
BitPuffin has joined #lisp
<beach> whoman: There is just so much variation between :initform or not, between a single :initarg or several, between :reader or :accessor, that it is usually not worth the effort to try to simplify.
fikka has joined #lisp
<pjb> When I say write your own macro, it should not be purely syntactic. It should be motivated by semantic reasons. For example, you can write a define-entity macro.
<pjb> At the application level, you don't care about slot names vs. accessors, and what mechanism you have to put into accessors automatically. This should be abstracted in an application-level define-entity macro.
<pjb> Syntactic problems often comes from a lack of high level abstraction.
<pierpa> defclass being verbose, means one has a few seconds more to think about what they are doing :)
<pjb> That said, using a define-class macro with the same syntax as defstruct is a nice way to upgrade your structures to classes.
<whoman> pjb, hmm, yes true true..
<whoman> beach, yeah this makes sense
<whoman> all of it agree! thanks guys =) the most i will do for syntax is to split up single slot defs on different lines, for my requirements of visualising my datatypes. then, doing the right thing at the application level.
<whoman> i see a lot of lisp code that is too 'bare knuckle' , directly using low level system ops in application level. i definately feel the same, that building up higher level DSL to the application itself is the right way
<whoman> i think the gap between "bad" lisp code and "good" lisp code is not as wide as with say, C or Java =)
smurfrobot has joined #lisp
<aeth> It depends on your goal is and what acceptable performance is for your application.
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
smurfrobot has quit [Remote host closed the connection]
pierpa has quit [Quit: Page closed]
xcrot has joined #lisp
<k-hos> like they say, it's easier to shoot yourself in the foot with c
krwq has joined #lisp
<beach> Well, C is a strange thing. Because of lack of capabilities for abstraction, it is unfit for application programming. And in order to use it for system programming, you often have to rely on behavior that is undefined in the language definition and therefore specific to a particular compiler.
damke has quit [Ping timeout: 264 seconds]
<whoman> i had a great time with C
damke has joined #lisp
xcrot has left #lisp [#lisp]
mjl_ has quit [Ping timeout: 260 seconds]
<stylewarning> But C is easy to write in the sense you can vomit something into your text editor and it will compile and behave approximately correctly
fikka has quit [Ping timeout: 248 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
fikka has joined #lisp
saki has quit [Ping timeout: 248 seconds]
<whoman> no, i dont think so at all.
saki has joined #lisp
<stacksmith> Guh.
<stylewarning> Yeah, “approximately correctly” should have been “remotely correctly but good enough for managerial sign off”
<whoman> perhaps you are thinking of Markdown
<whoman> or irc hyuk hyuk
fikka has quit [Ping timeout: 260 seconds]
shka has quit [Ping timeout: 256 seconds]
<pjb> Survival of the unfit.
Arcaelyx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lnostdal has quit [Ping timeout: 255 seconds]
nika has quit [Quit: Leaving...]
<krwq> are there any recommendations for generic function which returns sequence of values ideally without allocating it? I was considering returning lambda which returns next value with each call and cl-coroutine - are there any recommendations/most popular conventions here?
Karl_Dscc has joined #lisp
mr1yh1 has joined #lisp
fikka has joined #lisp
mr1yh1 has quit [Read error: Connection reset by peer]
alexmlw has quit [Read error: Connection reset by peer]
vlatkoB has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
LocaMocha has joined #lisp
LocaMocha has quit [Max SendQ exceeded]
fikka has joined #lisp
<stylewarning> krwq: lambdas are a good option
<stylewarning> Lisp doesn’t do so well in general with coroutines or Python-style generators
<krwq> stylewarning: sounds good then, thanks
fikka has quit [Ping timeout: 248 seconds]
LocaMocha has joined #lisp
<krwq> stylewarning: how would you efficiently implement such enumeration over hash table?
fikka has joined #lisp
<beach> clhs with-hash-table-iterator
<stylewarning> krqw I personally use MAPHASH
lnostdal has joined #lisp
vtomole has quit [Ping timeout: 260 seconds]
<krwq> stylewarning: I mean a function which returns a function which iterates over elements
sistine has quit []
<beach> clhs with-hash-table-iterator
<beach> krwq: ↑
<krwq> beach: thank you!
<beach> Anytime.
<pjb> krwq: (defgeneric foo (sequence) (:method ((sequence sequence)) (map-into sequence (lambda () (random 1.0))))) (foo (make-array 3)) #| --> #(0.40184024 0.6305135 0.7736664) |#
<pjb> krwq: (foo (make-list 3)) #| --> (0.51839167 0.6697807 0.54345495) |#
<otwieracz> jasom: Thank you! There was late night already in my timezone, but I will test it right now!
<krwq> pjb: not sure how this is related
<pjb> krwq: a generic function returning a sequence that it hasn't allocated.
Karl_Dscc has quit [Remote host closed the connection]
<pjb> krwq: the thing is that you pre-allocate your sequence, and reuse them.
<krwq> pjb: how else can I use sequences?
Mr_Tea has joined #lisp
<krwq> pjb: seems like I'm missing some big piece here which might simplify a lot
<pjb> (let ((pre-allocated (make-array 3))) (print (foo pre-allocated)) (print (foo pre-allocated))) #| #(0.86955583 0.60453916 0.62688285) #(0.96605814 0.63317955 0.62401444) |#
<krwq> pjb: what if my sequence have couple of million records?
<pjb> pre-alocate a couple of million records.
<krwq> pjb: what if it doesn't fit into memory
<pjb> Of course, it's better to use pre-allocation when you have a big number of items.
<pjb> Yes, it will. Memories are into the tens of gigabytes nowadays.
<krwq> pjb: i don't think what i'm planning to do will fit into memory
<pjb> Perhaps, but this is not what you asked for.
<krwq> pjb: i was thinking non-allocating sequences
<krwq> pjb: abstraction over sequence (like iterator in C++)
<pjb> lazily evaluated sequences… Yes, in CL you can use iterators, ie. functions returning the next element.
<pjb> You can also implement delay and force and use them to build your lazy abstractions.
dieggsy has quit [Ping timeout: 276 seconds]
<pjb> Several examples in com.informatimago.common-lisp.cesarum.combination
<Mr_Tea> how do I get a carreer in lisp? do I need to know it beforehand or do people train new hires if they can code.
<pjb> Mr_Tea: you start up your own company, you get paying customers, you implement their solution in lisp.
flamebeard has joined #lisp
ludston has quit [Read error: Connection reset by peer]
pagnol has joined #lisp
<krwq> thanks pjb, will take a look
<pjb> Mr_Tea: actually, start first by finding paying customers. Then start up your company and implement their solution.
ludston has joined #lisp
<pjb> Mr_Tea: of course, the downside is that you must be prepared to do a lot of sales, hr, and management work, before you can write your first line of lisp code.
Mr_Tea_ has joined #lisp
<pjb> You don't believe Elon Musk is designing rockets all day long?
<pjb> He's having a few talks with his rocket ingineers, but he spends most of his time managing his corporations, and finding paying customers and money to pay his rocket ingineers (and all the carbon fiber and stuff needed to build them).
<pjb> And the crazy thing is that he says he may very well not go to Mars himself at all…
<whoman> engine? er?
<pjb> Yep, rocket thrusters are still called engines.
<whoman> ingine? er?
SaganMan has quit [Quit: WeeChat 1.6]
<aeth> Create a rocket company in addition to a Lisp company. Launch Lisp into space and use that to promote the Lisp company.
<pjb> With a big sticker "Lisp inside" on each rocket :-)
<Mr_Tea_> engrave a REPL on the moon
Mr_Tea has quit [Ping timeout: 255 seconds]
Mr_Tea_ is now known as Mr_Tea
<whoman> ehe
<whoman> plant flag Land of Lisp LoL
<krwq> beach: how do I return that generator function in another function? I tried wrapping it in another lambda but neither works - only when I use it within body of that with-hash-table-iterator
<pjb> krwq: it's useless for your purpose, but as an example, since hash-tables are stored in memory, not lazy data structures.
<pjb> (defun make-integer-iterator (&optional (start 0)) (lambda () (prog1 start (incf start))))
<pjb>
<beach> krwq: Yeah, I guess you need something different.
<pjb> (loop repeat 10 with iterator = (make-integer-iterator) collect (funcall iterator)) #| --> (0 1 2 3 4 5 6 7 8 9) |#
fikka has quit [Ping timeout: 268 seconds]
<krwq> pjb: this sucks - i can't use both paradigms - I want to have lazy abstraction and use maphash for testing and lazy implementation for normal use
<pjb> krwq: if your sequence are finite, you will want to return 2 values, to indicate the end of the sequence.
<pjb> (defun make-integer-iterator (&optional (start 0) (end nil)) (lambda () (multiple-value-prog1 (if (and end (<= end start)) (values nil t) (values start nil)) (incf start))))
<pjb>
<krwq> I feel like I need yield here: https://github.com/takagi/cl-coroutine - I can't find source code for cl-cont though
nowhereman_ has quit [Quit: Konversation terminated!]
nowhereman_ has joined #lisp
<pjb> (loop with iterator = (make-integer-iterator 0 7) for (i done) = (multiple-value-list (funcall iterator)) until done collect i) #| --> (0 1 2 3 4 5 6) |#
<pjb> krwq: Using closures to generate a single element (or equivalently, a class as in com.informatimago.common-lisp.cesarum.combination) is simplier than using co-routines.
fikka has joined #lisp
Mr_Tea has quit [Ping timeout: 240 seconds]
nowhereman_ has quit [Ping timeout: 256 seconds]
<krwq> aren't co-routines returning closures? you funcall them after creating
lnostdal has quit [Ping timeout: 255 seconds]
<pjb> That's the conforming way to implement them in CL, but it's inefficient, and it requires heavy machinery to wrap the code of the co-routines inside-out.
<pjb> The normal implementation is to use multiple stacks, just like threads.
pagnol has quit [Ping timeout: 255 seconds]
<pjb> Implementing co-routines with threads would probably be a better way than the inside-out thing.
<krwq> pjb: any easy way to use your library with hash table?
<pjb> What's the relationship between a set of combination and hash-tables?
<krwq> I don't know what your library does, I need a simple abstract collection which gives me next element when I ask it to
<krwq> and want to be able to use that on builtin collections like hash table
<stacksmith> aeth: Don't forget to lose a billion a quarter, and promise to deliver a product that cannot possibly support your burn rate.
<pjb> krwq: think about it! hash-tables are NOT sequences, they're direct access data structures!
Mr_Tea has joined #lisp
scymtym has quit [Ping timeout: 256 seconds]
<pjb> It's incredible…
solyd has joined #lisp
<krwq> pjb: hash tables have elements and I need to be able to iterate them in any order
<stacksmith> There is no order.
<pjb> krwq: you want a disk-based database!
<krwq> but I said I don't care about the order
<aeth> If you want something more useful: (defun make-approximation-of-e (&optional (start 1)) (check-type start (integer 1)) (lambda () (prog1 (expt (1+ (/ start)) start) (incf start))))
mishoo has joined #lisp
<krwq> pjb: I'm playing around with making abstract file system
<pjb> krwq: lists of pairs are not hash-tables.
<krwq> need this for implementation of directory
<pjb> Either you want hash-tables and there's no lazyness, or you don't want hash-tables.
<pjb> Directory more of 32 GB in size. right.
<pjb> Use a disk-based database!
solyd has quit [Client Quit]
<krwq> pjb: physical yes - abstract have no limit
<pjb> Or rather, think!
<krwq> this will not be physically on my pc
<krwq> server will provide batches of inodes
Oladon has quit [Quit: Leaving.]
<krwq> i was thinking to make one version to be able to inspect lisp image
<krwq> but i need some generic abstraction for such sequence of nodes
<krwq> returning function sounds good to me but I need to be able to know how to use it with all lisp collections such as hash table
<krwq> for list it's 3 lines of code, for array few lines more but for hash table got no clue
sjl has joined #lisp
smurfrobot has joined #lisp
lnostdal has joined #lisp
sjl has quit [Ping timeout: 248 seconds]
<krwq> generic macro would be nice here
<krwq> i thinkI'll go with generic something like map-children
smurfrobot has quit [Ping timeout: 268 seconds]
hajovonta has joined #lisp
<krwq> or do-children - essentially no return value
<krwq> this will be less painful
<krwq> i feel like hash-table is abomination in CL
<krwq> not extensible at all and limited to some usages only
Cymew has joined #lisp
<krwq> i like do-children i'll be able to do lazy and non-lazy, will feel lispy and I will be able to pass both name and node as arg
fikka has quit [Ping timeout: 265 seconds]
fikka has joined #lisp
nowhereman_ has joined #lisp
FreeBirdLjj has joined #lisp
<hajovonta> hi
fikka has quit [Ping timeout: 265 seconds]
heurist has joined #lisp
borei has quit [Ping timeout: 248 seconds]
solyd has joined #lisp
fikka has joined #lisp
heurist__ has quit [Ping timeout: 240 seconds]
wigust has joined #lisp
varjag has joined #lisp
SaganMan has joined #lisp
solyd has quit [Quit: solyd]
heisig has joined #lisp
shifty has joined #lisp
zooey has quit [Ping timeout: 255 seconds]
zooey has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
schoppenhauer has quit [Ping timeout: 240 seconds]
scymtym has joined #lisp
fikka has joined #lisp
schoppenhauer has joined #lisp
krwq has quit [Remote host closed the connection]
angavrilov has joined #lisp
damke has quit [Ping timeout: 252 seconds]
solyd has joined #lisp
<phoe> hey
<pjb> hi
solyd has quit [Quit: solyd]
makomo_ has joined #lisp
random-nick has joined #lisp
nirved has joined #lisp
<SaganMan> Good Morning!
solyd has joined #lisp
solyd has quit [Client Quit]
hhdave has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
mlf has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
milanj has joined #lisp
damke has joined #lisp
fortitude has quit [Read error: Connection reset by peer]
fortitude has joined #lisp
_cosmonaut_ has joined #lisp
<flip214> when using QUUX-HUNCHENTOOT I've got the problem that the browser (and seemingly HT as well?) hangs as soon as I run into an error.
<flip214> I'm debugging (interactively) via swank, but upon choosing eg. ABORT the browser still waits for data; further http connections hang as well.
<flip214> but I don't run into the debugger again...
<flip214> restarting the process makes http (and debugging) work again
<flip214> with the normal hunchentoot taskmaster allows me to debug multiple requests (and abort them ;)
<flip214> this is with current QL versions on SBCL git HEAD (but older SBCL had that as well)
solyd has joined #lisp
solyd has quit [Client Quit]
<smokeink> http://turtleware.eu/posts/cl-charms-crash-course.html "We are also very drastic with bt:destroy-thread, something not recommended in any code which is not a demonstration like this one." Why is the use of bt:destroy-thread not recommended for recreating threads?
Murii has joined #lisp
<loke> smokeink: For the same reason that Thread.destroy() was removed in Java
<loke> smokeink: It's very hard to impossible to ensure consistency when killing threads.
wigust- has joined #lisp
solyd has joined #lisp
wigust has quit [Ping timeout: 256 seconds]
wigust- has quit [Client Quit]
<fe[nl]ix> smokeink: on any implementation that uses SMP threads, bt:destroy-thread is a bad idea
wxie has joined #lisp
<fe[nl]ix> you're not guaranteed to be able to interrupt a thread safely
wxie has quit [Quit: AtomicIRC: The nuclear option.]
epony has quit [Read error: Connection reset by peer]
epony has joined #lisp
solyd has quit [Quit: solyd]
fikka has quit [Ping timeout: 255 seconds]
pagnol has joined #lisp
solyd has joined #lisp
wxie has joined #lisp
<smokeink> okay , thanks
wxie has quit [Client Quit]
kdridi has joined #lisp
fikka has joined #lisp
solyd has quit [Quit: solyd]
fikka has quit [Ping timeout: 240 seconds]
nullman has quit [Ping timeout: 248 seconds]
nullman has joined #lisp
kdridi has quit [Remote host closed the connection]
fikka has joined #lisp
solyd has joined #lisp
wxie has joined #lisp
damke has quit [Ping timeout: 264 seconds]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<flip214> when calling a function, what's the easiest way to pass a place in, so that it can be modified?
<flip214> via two functions (read/write)?
<flip214> taking a return value and doing an explicit SETF with it isn't that nice either
<flip214> pushing a CONS in so that its CAR gets modified?
<Shinmera> the easiest way is not defining a function, but a macro.
<Shinmera> If the point is to modify a place, a function is not the thing to use.
<White_Flame> I've used cons cells as locatives. Passing around a read/write function pair in a struct would be another reasonable solution to locatives.
<flip214> well, that's just to store an intermediate result across multiple calls of that function (in a loop)
<White_Flame> That is, of course, if you truly need them. Places, as Shinmera indicates, are pretty straightforward to keep macro-supported
<flip214> White_Flame: yeah, I'm now passing in a CONS as well, and have a SYMBOL-MACROLET in the function
<flip214> no, that should stay a function.
<scymtym> a simple solution could be (defun make-box () (let (value) (lambda (&optional (new nil newp)) (if newp (setf value new) value)))). seems cleaner and more flexible than a CONS and simpler than two functions or a structure
nowhereman_ has quit [Ping timeout: 276 seconds]
kedorlaomer has joined #lisp
FreeBirdLjj has joined #lisp
<pjb> flip214: the easiest way is to use abstractions! Or read usenet…
attila_lendvai has quit [Read error: Connection reset by peer]
pagnol has quit [Quit: Ex-Chat]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
m00natic has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
damke has joined #lisp
sjl has joined #lisp
sjl has quit [Ping timeout: 260 seconds]
wxie has quit [Quit: AtomicIRC: The nuclear option.]
quazimodo has quit [Ping timeout: 268 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
scymtym has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
kedorlaomer has quit [Ping timeout: 240 seconds]
damke has quit [Ping timeout: 264 seconds]
scymtym has joined #lisp
damke has joined #lisp
lnostdal has quit [Ping timeout: 255 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
mjl_ has joined #lisp
orivej has quit [Ping timeout: 276 seconds]
SaganMan has quit [Quit: WeeChat 1.6]
pagnol has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
<Shinmera> (The prices are only placeholders)
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
papachan has joined #lisp
<jackdaniel> I hope that validatation won't bail on my name (or something else)
<hajovonta> flip124: (defparameter x (gensym)) (defun test (my-var) (setf (symbol-value my-var) 'any-value-you-want))
<Shinmera> jackdaniel: The name isn't validated, don't worry. I got enough experience with those kinds of things :)
<jackdaniel> (I'm mentioning that only because I had a few such unpleasent situations, not that I doubt you)
<hajovonta> then just (test x)
attila_lendvai has quit [Read error: Connection reset by peer]
wxie has joined #lisp
<jackdaniel> now we know *some* of your email addresses ,)
<Shinmera> Oh no, my public email address is now in video format!!!
<Shinmera> What ever shall I do with the spam
attila_lendvai has joined #lisp
wxie has quit [Quit: AtomicIRC: The nuclear option.]
pagnol has quit [Ping timeout: 264 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<jackdaniel> smokeink: re bt:destroy-thread : for instance you have no guarantee that unwind-protect cleanup will be executed -- hence you may leave lock, erm, locked
<jackdaniel> much more gotchas of course, but this is an easy example
<jackdaniel> (even if it was taken by `with-lock-held' or similar
<jackdaniel> )
python476 has joined #lisp
nowhereman_ has joined #lisp
solyd has quit [Quit: solyd]
solyd has joined #lisp
SaganMan has joined #lisp
<flip214> Shinmera: hooray!
pagnol has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
<flip214> pjb: thanks, but too much abstraction hurts for this small usecase ;)
<flip214> hajovonta: also possible
attila_lendvai has joined #lisp
<hajovonta> :)
EvW has joined #lisp
<flip214> TIMTOWTDIIL
neirac has joined #lisp
<neirac> this page is awesome http://lisp-lang.org/ I just found out about woo thanks to that
Bike has joined #lisp
<ecraven> is there a "feature overview" video of SLIME?
<flip214> yeah, QUUX-HUNCHENTOOT is broken somehow.
<flip214> first few requests < 1msec, but after a while the performance gets worse and worse...
<flip214> guess the threads are hanging somewhere
smokeink has quit [Remote host closed the connection]
raynold has quit [Quit: Connection closed for inactivity]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
smurfrobot has joined #lisp
<flip214> no, it's not QUUX... other multi-parallel writes to swank kill my editor chain, too
<flip214> ^^ did anyone already see that with vlime?
<hajovonta> what's vlime?
<ecraven> looks like vim slime
<random-nick> a slime clone for vim
<random-nick> well, not really a clone since it uses swank too
dddddd has joined #lisp
smurfrobot has quit [Ping timeout: 255 seconds]
solyd has quit [Quit: solyd]
<ecraven> random-nick: so it's a slim clone, not a swank clone
<flip214> I think I found the culprit....
<ecraven> to me, slime is the emacs frontend, swank is the lisp backend
<random-nick> ecraven: that is true, but swank was made for slime and is developed by slime developers
<ecraven> indeed, but there are a few other swanks that work together with slime
<ecraven> is there a way to call the slime inspector from the repl?
<ecraven> i.e. to have swank initiate an inspection, not slime?
kdridi has joined #lisp
kdridi has quit [Remote host closed the connection]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
kdridi has joined #lisp
<attila_lendvai> ecraven: (swank::inspect-in-emacs value :wait #f)
<ecraven> attila_lendvai: thank you!
SaganMan has quit [Quit: WeeChat 1.6]
fikka has quit [Ping timeout: 240 seconds]
Bike has quit [Quit: Lost terminal]
attila_lendvai has quit [Read error: Connection reset by peer]
smokeink has joined #lisp
solyd has joined #lisp
nowhereman_ has quit [Ping timeout: 256 seconds]
sz0 has joined #lisp
fortitude has quit [Read error: Connection reset by peer]
fortitude has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
makomo_ has quit [Ping timeout: 260 seconds]
Duns_Scrotus has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
Kevslinger has joined #lisp
mjl_ has quit [Ping timeout: 276 seconds]
solyd has quit [Quit: solyd]
fikka has joined #lisp
EvW1 has joined #lisp
damke has quit [Ping timeout: 264 seconds]
damke_ has joined #lisp
kami has joined #lisp
<flip214> hmmm, seems that the output is too fast... "INFO: Control stack guard page unprotected"
<kami> Hello #lisp
christoph_debian has quit [Ping timeout: 248 seconds]
thodg has joined #lisp
jstypo has quit [Ping timeout: 264 seconds]
christoph_debian has joined #lisp
drewc has quit [Ping timeout: 255 seconds]
dmiles has quit [Ping timeout: 260 seconds]
jstypo has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
drewc has joined #lisp
smokeink has quit [Quit: Leaving]
kdridi has quit [Remote host closed the connection]
solyd has joined #lisp
d4ryus2 has joined #lisp
orivej has joined #lisp
d4ryus1 has quit [Ping timeout: 248 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
nullniverse has joined #lisp
jstypo has quit [Ping timeout: 276 seconds]
nullniverse has quit [Remote host closed the connection]
makomo_ has joined #lisp
MetaYan has quit [Ping timeout: 240 seconds]
Bike has joined #lisp
MetaYan has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
jantar-tobak has quit [Quit: Lost terminal]
attila_lendvai has joined #lisp
Tristam has quit [Remote host closed the connection]
kdridi has joined #lisp
Tristam has joined #lisp
megalography1 has joined #lisp
megalography has quit [Ping timeout: 276 seconds]
gr8 has joined #lisp
jstypo has joined #lisp
kdridi has quit [Remote host closed the connection]
<gr8> hi, I have the following idea: I would like to have a fully functional programming stack, which means that the hardware primitives (assembler directives, register etc.) are exposed to a high-level language. Then the compiler should already be written in Lisp (or something similar) and output binary code
<gr8> so that all hardware-specific optimizations can be accessed and programmed using a functional language
<gr8> are there any similar projects, or something where I should start?
<beach> OK, slow down a bit...
<beach> What is the language you are going to compile?
<Xach> gr8: you can access the hardware directly with existing lisps, and the compilers are written in Lisp and compile to machine code...
<ecraven> gr8: so you want to do something like (+ %rax 5)?
kdridi has joined #lisp
<gr8> ecraven, hmm yeah basically.
<ecraven> gr8: where would the language store its values, if you want to access them all the time?
<ecraven> normally, the compiler would pick some registers, but you wouldn't know which
<Xach> gr8: https://www.pvk.ca/Blog/2014/03/15/sbcl-the-ultimate-assembly-code-breadboard/ has some info about fussing with that sort of thing
<beach> gr8: Are you planning to compile Common Lisp programs, or programs in some other language?
kdridi has quit [Remote host closed the connection]
<gr8> beach, I'm thinking from the bottom up. My plan is to bootstrap a lisp/scheme language. Of course that can later be used to implement compilers for other languages
igemnace has joined #lisp
dmiles has joined #lisp
__rumbler31 has joined #lisp
<beach> gr8: Like Xach mentioned, the SBCL compiler is already written in Common Lisp. And Cleavir is a project meant to create an implementation-independent compiler framework.
<gr8> thanks, i will take a look! Sorry guys have to change location, be back soon
<beach> gr8: When you say "bootstrap a lisp/scheme language", what would you bootstrap it from?
kdridi has joined #lisp
_rumbler31 has joined #lisp
SaganMan has joined #lisp
heisig has quit [Quit: Leaving]
__rumbler31 has quit [Ping timeout: 248 seconds]
<dlowe> I imagine he envisions bootstrapping as something that will confer benefits rather than a nuisance.
attila_lendvai has quit [Read error: Connection reset by peer]
gr8 has quit [Ping timeout: 276 seconds]
dmiles has quit [Ping timeout: 276 seconds]
attila_lendvai has joined #lisp
<beach> dlowe: That seems like a safe bet. But it is not enough information for me to understand what gr8 is trying to do.
porky11 has joined #lisp
<dlowe> repeat history, I'm assuming :)
<beach> That is a bit what I fear.
kdridi has quit [Remote host closed the connection]
gr8 has joined #lisp
<gr8> I am back!
<beach> OK, so if you can explain a bit more in detail what you want to accomplish and what you want to start with, that would be great.
<gr8> actually I am just thinking about it yet. My original reason was that I am missing the *transparency* of C. When programming in C, (at least when not using all the optimization), I am having some kind of intuition for what is happening on the byte level. With Scheme, you have a scheme interpreter and then it stops, it's a blackbox.
fikka has quit [Ping timeout: 268 seconds]
<gr8> so in order to have transparency down to the machine level, it would be necessary to make the lower primitives visible in Scheme/Lisp as well
<beach> I am starting to understand.
<gr8> which essentially means writing a program that outputs machine code
<beach> Now that part has already been done several times.
<beach> But, what would you use this transparency for? Would you allow the application programmer to access those lower levels?
<gr8> optionally! I mean you can write abstractions on top of it and then use them, or you can access lower primitives if necessary, or just look at the code and see what would happen
<ecraven> but wouldn't that need for transparency severly hamper you too? how can you have generic arithmetic, for example? you never know *which* exact operation will be called.
rippa has joined #lisp
<gr8> abstraction? Define some default semantics. Isn't that what is done by all other programming languages as well?
<ecraven> gr8: probably every Scheme ever has e.g. fx+ and fl+, which can be compiled directly to the respective adds
dyelar has joined #lisp
<beach> gr8: What ecraven says. You would have to have a very simple compiler that generates extremely predictable machine code in order for that low level to be exploitable by the application programmer.
<ecraven> gr8: the point is, lisp *does* support writing very low-level code where you know what is generated, but you mostly just don't want that
<beach> gr8: and such a simple compiler would generate code that is way too slow for most purposes.
shifty has quit [Ping timeout: 248 seconds]
<ecraven> in most cases, I really don't care which exact instructions are emitted, the compiler should worry about that. if I want to care, in SBCL I definitely can (see the link above)
<razzy> in slime i got error :] Symbol "ASDF-SYSTEM-FILES" not found in the SWANK package. do not know where t ostart looking :]
<razzy> while compiling :]
<gr8> sure, at some point you have to optimize. But you know that many todays C compilers are a huge mess. I would like to do that optimization in Scheme, using very basic Scheme primitives that access the hardware, like you said
<attila_lendvai> razzy: first I'd update slime, your lisp, and quicklisp. then I'd look again if it still fails...
EvW1 has quit [Ping timeout: 255 seconds]
<ecraven> gr8: have you looked at things like pre-scheme (scheme48)?
<ecraven> they are at about the level of C
<stacksmith> gr8: take a look at Picolisp. It bootstraps neetly as I recall.
<stacksmith> Plus it's an incredibly fast interpreter.
EvW has joined #lisp
<razzy> hmm,.. you got a point :]
solyd has quit [Quit: solyd]
<gr8> ecraven, no that's too high level I think
<ecraven> pre-scheme? it doesn't have a GC, no generalised arithmetic... it's really not very high-level
orivej has quit [Ping timeout: 248 seconds]
shrdlu68 has quit [Ping timeout: 256 seconds]
<jackdaniel> if it has parens it counts as high level and art ;-)
shrdlu68 has joined #lisp
smurfrobot has joined #lisp
smurfrobot has quit [Remote host closed the connection]
attila_lendvai has quit [Read error: Connection reset by peer]
<gr8> stacksmith, thanks I think Picolisp gets pretty close. https://software-lab.de/doc64/asm
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
pagnol has quit [Ping timeout: 256 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
solyd has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<gr8> from https://en.wikipedia.org/wiki/PicoLisp "In 2009, the 64-bit version was released, another rewrite, this time written in a generic assembler which in turn is implemented in PicoLisp." Exactly this "generic assembler" is the abstraction level I was looking for
solyd has quit [Client Quit]
francogrex has joined #lisp
<francogrex> hi, https://fnpaste.com/88KQ
<francogrex> how can I prevent heap exhasution?
attila_lendvai has quit [Read error: Connection reset by peer]
damke_ has quit [Ping timeout: 264 seconds]
<random-nick> make the heap bigger
sjl has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
damke_ has joined #lisp
sz0 has quit [Quit: Connection closed for inactivity]
<stacksmith> gr8: the picolisp chat is pretty good, and the developer hangs out and enjoys talking shop...
solyd has joined #lisp
<francogrex> i suspect it is related to vector-pop
<stacksmith> Instrument your code if you think your consing is whacky.
solyd has quit [Client Quit]
fikka has joined #lisp
solyd has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
pagnol has joined #lisp
Cymew has quit [Remote host closed the connection]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<francogrex> you think it's the consting of (vector ...) inside the loop?
<flip214> I think my brain is broken in some way... would somebody care to tell me the difference between the two LABELS in https://pastebin.com/EHH6LbX4?
<flip214> the first one (kind of) works, the second stops too early
<Bike> doesn't work with the question mark, so https://pastebin.com/EHH6LbX4
<|3b|> francogrex: that code looks like it uses ~1.3GB of heap, which is large enough that just running out normally is plausible without anything odd happening
<flip214> Bike: ah yeah, sorry
<francogrex> ok... is there any way to make the vector without consuming that much heap?
<flip214> and the (break) should be a (return-from swank-read-loop) then
<francogrex> fill the vector vc?
<pjb> francogrex: (* 3 pa) -> ?
<|3b|> not much you can do just given the info in the paste...
<pjb> francogrex: nope. Using displaced arrays would take more memory.
attila_lendvai has quit [Read error: Connection reset by peer]
<|3b|> you could run in a 32 bit lisp (i was assuming 64), which would reduce heap used, but also probably reduce heap available so might not help
<flip214> ie. I just wanted to rewrite the tail recursion (which breaks sooner or later) with an explicit loop
nullman has quit [Ping timeout: 240 seconds]
<pjb> And anyways, you're prefixing it with random.
<|3b|> though then you would also lose immediate single floats, which might cost you most of your savings
<Bike> flip214: those look pretty identical to me as well
<|3b|> if you are storing specific types of data (like all single floats), you could save some space with typed arrays
nullman has joined #lisp
<pjb> francogrex: for example, you could keep an index into the do array instead of coping the elements.
<|3b|> or maybe you could store offsets into the original array
<flip214> Bike: thanks a lot for the confirmation
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<pjb> francogrex: also, since those index are computed, you could never store them at all!
<|3b|> preferably in a typed array
<Bike> well, if they're not actually behaving the same, i'm missing something
<pjb> (defparameter vc (map-into (make-array pa) (lambda () (random 1.0)))) (defun do-index (vc-index) (* 3 vc-index))
<Bike> if you move the loop outside the handler-case, it should be really identical
<Bike> i mean, and put the return-from back in the handler case
Murii has quit [Ping timeout: 255 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
<pjb> francogrex: (defun vc-ref (vc vc-index index) (if index (aref vc vc-index) (aref do (+ index (do-index vc-index)))))
<flip214> Bike: yeah, I tried to optimize a bit here
<pjb> so instead of writing (aref (aref vc vc-index) j) you would write (vc-ref vc-index j)
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<flip214> Bike: another one, if you'd be so kind: https://pastebin.com/VRJ4XT3X
attila_lendvai has quit [Read error: Connection reset by peer]
<Bike> that one makes a new data-buf each time in the tail recursive version
al-damiri has joined #lisp
<francogrex> ok. pjb I will try your solution. it is expected to save me a lot of heap space I suppose
<pjb> francogrex: of course, the question is whether you will modify the do array? If you do, it will impact the vc abstraction.
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
<francogrex> the do array will be popped
<flip214> Bike: ah right, thanks a lot... the (read-client-data) doesn't overwrite but just appends. remind me at ELS, one beer is on me!
<francogrex> I will fill it out with ints. I omitted that part: something like (loop for i from 0 below 50000000 do (setf (aref do i) 1)) , but it won't be just 1s...
attila_lendvai has quit [Read error: Connection reset by peer]
<Bike> rad
<pjb> francogrex: you may want to add an explicit check: (defun vc-ref (vc vc-index index) )(if (<= (+ 3 (do-index vc-index)) (length do)) (if index (aref vc vc-index) (aref do (+ index (do-index vc-index)))) (error "invalid vc-index"))
<pjb> francogrex: oh, you used vector-pop so the indexes are inverted.
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<pjb> francogrex: well, you just implement the abstraction you need to map the indices as you wish.
Arcaelyx has joined #lisp
blackwolf has joined #lisp
<|3b|> francogrex: if your ints are bounded, you might be able to save some space with typed arrays
<pjb> francogrex: then you don't need do at all.
<pjb> (defun do-ref (i) i)
<pjb> Oh, 1s, not is. (defun do-ref (i) 1)
<pjb>
<razzy> attila_lendvai: updating helped :]
<pjb> francogrex: again, the point here is that if you can compute the data, then compute the data. Don't store it.
<attila_lendvai> good. keeping my model of reality intact... :)
<|3b|> though even typed vectors are a lot of overhead per 3 values, so still probably better to store the values in a single vector and just pass around offsets if possible if you are working close to your heap limits
<|3b|> (or just raise the heap limits instead if this is a one-time problem)
attila_lendvai has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 260 seconds]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
borei has joined #lisp
<razzy> attila_lendvai: well my models of reality are sometimes broken :]
juan-reynoso has joined #lisp
mjl_ has joined #lisp
nika has joined #lisp
warweasle has joined #lisp
<flip214> and after a few fixes on different ends, QUUX-HT hangs again for me...
<flip214> threads not reading data from their socket
<razzy> attila_lendvai: what was soo deeply wrong with my previous problem?
<Bike> flip214: er, paste just looks like a note that you C-c C-c'd it.
<flip214> Bike: yeah, that's what I did. "netstat" shows 10 open TCP connections (saturating my 10 threads), each with unread data.
attila_lendvai has quit [Read error: Connection reset by peer]
<flip214> can I see the unix-tid for an sbcl thread?
nsrahmad has joined #lisp
attila_lendvai has joined #lisp
<Bike> there's an sb-thread::thread-os-thread
attila_lendvai has quit [Remote host closed the connection]
<Bike> might be a pointer or something though, i don't know what tids look like
attila_lendvai has joined #lisp
jack_rabbit has quit [Ping timeout: 252 seconds]
<attila_lendvai> razzy: don't know what you mean, nothing is wrong with your problem. it's just a good approach generally to first update everything, and then go out looking for a solution, because some others may have resolved your problem already
windblow has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
hajovonta has quit [Remote host closed the connection]
attila_lendvai has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
<razzy> yop :]
attila_lendvai has joined #lisp
<francogrex> ok thanks
<razzy> first time i wish for native multiprocessor support :]
francogrex has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
<razzy> why is not asynchronous computing natively supported in low lvl lisp functions?
pagnol has quit [Ping timeout: 248 seconds]
<pjb> because lisp was invented on hardware that had only one processor.
attila_lendvai has quit [Read error: Connection reset by peer]
fikka has joined #lisp
solyd has quit [Quit: solyd]
<beach> razzy: Do you mean support for threads? Most Common Lisp implementations have it.
<beach> razzy: And you have a compatibility layer too: Bordeaux-threads.
attila_lendvai has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
flamebeard has quit [Read error: Connection reset by peer]
solyd has joined #lisp
igemnace has quit [Quit: WeeChat 2.0.1]
fikka has quit [Ping timeout: 256 seconds]
shrdlu68 has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
<razzy> pjb: imho was lisp-machines first usable multiprocessor machines :]
shrdlu68 has joined #lisp
borei has quit [Ping timeout: 276 seconds]
kami has quit [Ping timeout: 255 seconds]
<beach> razzy: So is there anything you need that is not provided by a particular implementation?
<razzy> beach: no :]
terpri has quit [Read error: Connection reset by peer]
attila_lendvai has quit [Read error: Connection reset by peer]
<flip214> can anybody else reproduce QUUX-HT hangs via high load? (I'm using "wrk" to test latency)
attila_lendvai has joined #lisp
LiamH has joined #lisp
Patternmaster has joined #lisp
fikka has joined #lisp
gr8 has quit [Quit: Leaving]
fikka has quit [Ping timeout: 240 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
<razzy> beach: if asynchronous multiprocessing was implemented in some basic common lisp functions, people would use it without even knowing :]
chat__ has joined #lisp
<jackdaniel> razzy: if someone uses asynchronous multiprocessing without knowing what he's doing then something is wrong
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
fikka has joined #lisp
<razzy> jackdaniel: why would it be wrong?
m00natic has quit [Remote host closed the connection]
EvW has quit [Ping timeout: 256 seconds]
raynold has joined #lisp
<jackdaniel> multiprocessing is hard - asynchronous access is a source of many bugs for instance
<Shinmera> Generally people using things without knowing what they're doing is a bad thing.
<jackdaniel> heh, good one ↑ totally agreed
attila_lendvai has quit [Read error: Connection reset by peer]
parjanya has quit [Ping timeout: 276 seconds]
solyd has quit [Quit: solyd]
<beach> razzy: Oh, you mean like some implementation using multiprocessing for implementing the sequence functions?
<beach> razzy: Sure, an implementation is often free to do that, and perhaps some of them do.
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<beach> razzy: I have been thinking about multi-threaded implementations of primitives such as SORT, FIND, POSITION, etc.
Murii has joined #lisp
borei has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
kdridi has joined #lisp
fikka has joined #lisp
solyd has joined #lisp
<_death> lparallel has cognates
<dim> lparallel is very nice to use yes
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
heurist` has joined #lisp
<Bike> premove supports :from-end but not :count. mysterious.
<Bike> also, it only works on lists...
heurist has quit [Ping timeout: 276 seconds]
<borei> hi all !
makomo_ has quit [Ping timeout: 240 seconds]
<borei> quick question. if slot has "class" allocation is there an option to get an access to value via class but not via instance of the class, something like "static" members in C++ ?
solyd has quit [Quit: solyd]
kdridi has quit [Remote host closed the connection]
<Shinmera> With the mop you can get a class prototype to access the slot.
<Shinmera> PCL mentions this in a footnote.
<jackdaniel> afair you need at least one instance of this class, so it is not the same as static member
<jackdaniel> but don't take my word for that
<Shinmera> No, you can get it with the class prototype as long as the inheritance is finalised.
<borei> what is mop and class prototype ?
<Shinmera> Colleen: look up mop class-prototype
<pjb> Shinmera: the world is full of bad things. Who is doing what he knows?
attila_lendvai has quit [Read error: Connection reset by peer]
<whoman> nah wait isnt there an easier way? im sure i read about it..
<beach> borei: MOP means "Meta-Object Protocol". From the book "The Art of the Meta-Object Protocol".
<Shinmera> class-prototype is about as easy as it gets.
nsrahmad has quit [Quit: Leaving]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
<whoman> hmm. i thought there was a way to define slots that are shared or somesuch. maybe that was eieio
<beach> whoman: That's what they are talking about.
<Shinmera> there is, it's :allocation :class, which is what borei is using.
<borei> yes, i have class allocation
<whoman> ohh =) i think im getting stupider.
windblow has quit []
windblow has joined #lisp
nika has quit [Quit: Leaving...]
<sjl> > The results are undefined if a portable program modifies the binding of any slot of prototype instance.
<sjl> Does that mean you can read, but can't write, the :class allocated slot via that prototype instance?
<pjb> perhaps. On the other hand, perhaps the class slot is not a slot of the prototype instance?
Cymew has joined #lisp
hhdave has quit [Ping timeout: 268 seconds]
Cymew has quit [Ping timeout: 265 seconds]
vap1 has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
vaporatorius has quit [Ping timeout: 256 seconds]
<stacksmith> whoman: did you get your system working?
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<whoman> stacksmith, i dont know, i will probably just link the package.lisp folder into ~/quicklisp/local-projects and load it that way
_cosmonaut_ has quit [Ping timeout: 248 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
<stacksmith> I've been using roswel for the last few months. It just works, and pulls in fresh sbcl. I got spoiled - no more fiddling with links and installing SBCL every month...
terpri has joined #lisp
varjag has joined #lisp
tmc has quit [Remote host closed the connection]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<jackdaniel> hm, my backquote understanding is lacking.. why (given *print-circle* = t) '#1=(1 . #1#) works fine, but `#1=(1 . #1#) blows the stack?
<stacksmith> backquote does some spelunking looking for commas, while quote is pretty passive... Although...
solyd has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
nullman has quit [Ping timeout: 256 seconds]
<pjb> jackdaniel: it's not conforming to give circular sexps to the compiler.
<pjb> jackdaniel: remember that ` is still code.
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
nullman has joined #lisp
<pjb> `#1=(1 . #1#) == (cons 1 (cons 1 (cons 1 … ))) infinitely, so the compiler must crash.
<stacksmith> That's a better reason. Lgically, consider the intent of each item... Quote means 'do not touch the objects inside' while quasiquoting means 'search inside this list and perform expansions and substitutions. It is a DSL for building lists...
SaganMan has quit [Quit: WeeChat 1.6]
<jackdaniel> pjb: thanks for the explanation
<whoman> stacksmith, i dont mind compiling sbcl from source =) binaries seem to be a step behind anyway. btw topic still says 1.4.1 !?
<shrdlu68> I don't get it. Isn't backquote supposed to eval only upon encountering a comma?
<stacksmith> whoman: yeah, the changes are usually subtle month to month. After a few years you get tired of keeping the environment and start looking for shortcuts.
fikka has quit [Ping timeout: 248 seconds]
<stacksmith> shrdlu68: It has to find the comma!
attila_lendvai has quit [Read error: Connection reset by peer]
<shrdlu68> stacksmith: So it passes whatever it receives to the reader?
<stacksmith> I think it calls the reader to get whatever is inside...
<stacksmith> Although there is little in the standard, I believe, and different implementations do it in various ways. SBCL creates private objects for comma and quasiquote...
<shrdlu68> It seems to me as if it's first reading #1=(1 . #1#) - that would explain blowing the stack.
<whoman> ah years... yes... relating to that. ive got 100+ packages in my debian that needs upgrading but i dont want to do it, because of years. hah
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<stacksmith> whoman: right. I've learned to enjoy complete screwups of my computers every so often. All this hard to maintain stuff that takes all this time to sort and backup... Then poof - and I don't miss it. Garbage collection.
<pjb> shrdlu68: how do you find a comma in an infinite recursive structure?
<pjb> Notice also that the commas are to be found inside vectors and structures, not only inside lists.
<Bike> you could determine that it's infinite first. it's just annoying to have to do that all the time
<pjb> (a b (c . #1=(d e . #2#)) (f . #2=(g h . #1#)))
<stacksmith> whoman: now, I have one folder with all configuration files that once was neat and now is definitely 'legacy', but works. I can move to another machine in minutes. Similarly, my cell phone has 3 apps that I never use anyway. Just disposable stuff.
<whoman> stacksmith, heh hmm yeah =) i suppose that is why people use guix or nginx or whatever those things are called, like docker images but a system config; not sure the terminology there
<shrdlu68> I didn't think backquote eval'd until it encountered a comma, so - before I saw this, my guess would have been that `#1=(1 . #1#) simply returns #1=(1 . #1#)
<stacksmith> whoman, shrdlu68: again, it has to find it by traversing the list...
<Bike> it could. it's just the compiler is allowed to not detect circular structures.
<pjb> `(a b c d ,e) == (list 'a 'b 'c 'd e)
<pjb> It evaluates everything!
<whoman> disposable stuff makes life a lot less stressful that is for sure. ive got to clean my room and throw stuff out that i dont even use. but for computer, i reduced/restrict all my usage to emacs, so its just one project folder including my emacs.org and should be easy to move to another setup (even windows, with some changes)
<shrdlu68> That is, without #'reading #1=(1 . #1#)
<pjb> shrdlu68: the only thing is that it's up to the implementation to choose how to do it. It could be (append '(a b c d) (list e))
<shrdlu68> pjb: `(foo)
scymtym has quit [Ping timeout: 255 seconds]
<pjb> the result would be the same, in terms of literal vs. fresh conses.
<pjb> `(x1 x2 x3 ... xn . atom) may be interpreted to mean (append [ x1] [ x2] [ x3] ... [ xn] (quote atom))
attila_lendvai has quit [Read error: Connection reset by peer]
<pjb>
sz0 has joined #lisp
<pjb> so `(foo) which is `(foo . nil) == (append [foo] (quote nil)) = (append (list `foo) (quote nil)) = (append (list (quote foo)) (quote nil))
kini has quit [Quit: No Ping reply in 180 seconds.]
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
dvdmuckle is now known as bluraymuckle
bluraymuckle is now known as dvdmuckle
<jackdaniel> I was trying to bind bt:*default-special-bindings* dynamically in bt:*default-special-bindings* (so my values get "inherited" without setfing this special variable). apparently this can't be done without intermediate variable (what is fine, just didn't think aobut it at first)
<stacksmith> whoman: I tried messing with docker, but found it even more annoying... Roswell works really well for my needs... My #1 need is to know _nothing_ about roswell. every so often I do ros update or something like that which I don't even need to remember, and everything works. It pulled in fresh slime, and I think even emacs. I moved my config folder and that's that.
fourier has joined #lisp
<pjb> shrdlu68: `(foo) as specified actually conses twice a list! Of course, implementations will optimize that.
fourier has quit [Changing host]
fourier has joined #lisp
fikka has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
kini has joined #lisp
shka has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
<shrdlu68> "`basic is the same as 'basic, that is, (quote basic), for any expression basic that is not a list or a general vector."
<shrdlu68> I was going to raise some point, but I think I get it now.
<stacksmith> That's sensible with atoms - ` knows there is nothing interesting there...
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
Karl_Dscc has joined #lisp
<shrdlu68> `#*111111,0
<pjb> (let ((x (random 2))) `#*111111,x) #| ERROR: Reader error on #<string-input-stream :closed #x30200237ECED>: Comma not inside backquote |#
<pjb> :-)
<pjb> , behaves like a terminating macro character.
fikka has quit [Ping timeout: 240 seconds]
EvW has joined #lisp
<White_Flame> (tagbody 10 (print 'basic) (go 10))
fikka has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
Rawriful has joined #lisp
kini has quit [Quit: No Ping reply in 180 seconds.]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
MrBusiness has quit [Ping timeout: 255 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
nopolitica has joined #lisp
nopolitica has quit [Client Quit]
kini has joined #lisp
windblow has quit [Read error: Connection reset by peer]
windblow has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
attila_lendvai has joined #lisp
fikka has joined #lisp
solyd has quit [Quit: solyd]
mlf has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
My_Hearing has quit [Quit: WeeChat 2.0.1]
scymtym has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
windblow has quit [Remote host closed the connection]
windblow has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
sistine has joined #lisp
windblow has quit [Ping timeout: 256 seconds]
EvW has quit [Ping timeout: 255 seconds]
sistine is now known as windblow
kaname has joined #lisp
EvW has joined #lisp
<jackdaniel> Shinmera: does dissect allow evaluating expression in frame?
<jackdaniel> (I'm thinking about switching to dissect in clim-debugger)
jack_rabbit has joined #lisp
jmarciano has joined #lisp
<_rumbler31> I was re-reading the conversation about code walking the other day and I don't understand the factors that make it difficult. There was some mention about how macros mean that you can't somehow just macroexpand your way to a final tree, or something
<Bike> It's rather that implementations define their own special operators, or custom behavior for existing special operators.
<Bike> For example, on sbcl (function (sb-int:named-lambda ...)) is allowed.
<jackdaniel> named-lambda
<jackdaniel> heh
<jackdaniel> (named-lambda exists at least in sbcl and ecl, but I wouldn't be suprised if ccl has one too)
<Bike> sbcl allows other things in there as well, like sb-pcl::ctor
windblow has quit []
windblow has joined #lisp
<Bike> There's also the matter of implementation defined keywords; lambda-list-keywords exists but doesn't give you any hing how the extras are to be dealt with
<Bike> any hint
<stacksmith> _rumbler31: There are times when you want a macro to change something inside the code you are looking at, deep in some expression. Expanding to a final tree is of no help at all, and getting to your desired location is tricky.
<jackdaniel> sure, ecl has for that instance ext:with-backend (different code for different compiler backends)
<Bike> lambda list keywords, i should say
<_rumbler31> hmm, I'll ponder this
<stacksmith> _rumbler31: A simple example of a tree walker is 'flatten'... It is limited, but you can search the list for a symbol, for instance, to see if it's present in your code...
<stacksmith> By you I mean some macro your are writing...
<Bike> that one book does that, leading to at least a dozen noobs over the years coming in wondering why it doesn't work on sbcl
<Bike> good moral
<stacksmith> Lisp is surprisingly hard to walk, considering the surface impression of 'no syntax'...
<dlowe> tonight's homework will be to design a lisp designed specifically for very easy codewalking
<Bike> lambda calculus. done
LocaMocha has quit [Read error: Connection reset by peer]
<dlowe> not a lisp. F.
<stacksmith> You'd think Scheme would be easier, but somehow you can't even have decent macros...
<dlowe> lispiness is not associative.
<stacksmith> Design a lisp with _no special forms_.
<dlowe> lisp started as an exercise in how few special forms were needed
<stacksmith> Same old story.
<stacksmith> How many do you need to go metacircular?
<_rumbler31> so codewalking isn't necessarily the same thing as making a call graph forest of a piece of code
<White_Flame> the call graph is mutated by macros
<dlowe> well, it can be tricky to find all the places that are code.
<White_Flame> and there are literals scattered in
<White_Flame> and other such special forms
<White_Flame> and again, if you macroexpand, it can result in internal artifacts that aren't standard and aren't normally exposed
<dlowe> (let ((foo (bar)) (baz)) - bar and baz is code, but you'd have to teach your code walker about LET in order to know that.
<stacksmith> The code you are interested in when writing macros is very different from the code that will eventually be compiled...
orivej has joined #lisp
<dlowe> which is why "design a lisp (with macros and the like) that can be easily codewalked" isn't a trivial challenge.
<stacksmith> Macros are not about calls, they are about manipulating symbols...
<jackdaniel> macros are about misleading unexperienced lispers, so they obfuscate their code :-)
<stacksmith> dlowe: To be hones, I can't think of a language that is more suited for metaprogramming, even if it's hard to do some things...
<dlowe> stacksmith: no, there really isn't. We've bolted a full compiled language onto the front of our compiler.
<stacksmith> An crammed its head into its ass so deep that it can see the stars.
<dlowe> whatever metaphor works for you, I guess.
<stacksmith> And.
<White_Flame> yo dawg, I hear you like recursion and old memes
Mr_Tea has quit [Ping timeout: 276 seconds]
Patternmaster has quit [Quit: leaving]
<stacksmith> I mean, there is nothing even remotely close that allows you to build upwards without losing performance or flexibility, or downward without losing all the high-level tools...
<_rumbler31> so what kinds of activities require or benefit from codewalking? From cursory reading it seems hard enough to do right that it seems not worthwhile
<Bike> compilation
<Bike> evaluation. analysis
<stacksmith> For some mind-opening reading about macros, I suggest On Lisp followed by Let Over Lambda.
<Bike> the original context of the conversation you originally referred to was for xref
<_rumbler31> I've read the first few chapters of On Lisp
<_rumbler31> oh right xref!
<Bike> walking code to see what it calls, so that that information could be provided to an editor
<Bike> as i said then, i don't think that's the best way to do it, but it's an option
<White_Flame> _rumbler31: some embedded languages might do code walking to find special things for replacement
<Bike> some lisp implementations use a "code walker" for an extra analysis stage used to deal with method bodies
<White_Flame> I did it for a prolog style query language, picking out all symbols starting with "?", creating a binding list of variables
<Bike> you can do a few extra things if you know that parameters aren't setf'd, and call-next-method isn't called in certain ways, and suchlike
<Bike> extra optimizations, i mean
<_rumbler31> so is there something missing from current implementations xref facilities?
<Bike> they don't always have them
<Bike> but, i just meant it as an example of a code walking analysis
<stacksmith> Or any macro that wants to do something more interesting than just expand stuff right there.
<Bike> well, there aren't too many of those, and usually you can use macrolet or such to get similar effects even with advanced ones
<_rumbler31> so a given implementation can fully know what a given set of code can do, but because there is enough implementation specific behavior, there is no such thing as a general "call graph" because a walker would have to know what a final implementation would do
<Bike> basically.
<stacksmith> That is true. But possibly because it's so darn hard.
<Bike> for some value of "fully know"
<stacksmith> Lisp is a dynamic language, so the idea of call graph is questionable.
<Bike> the vast majority of calls are to fixed names
<Bike> some aren't, of course
<stacksmith> True again.
fikka has quit [Ping timeout: 276 seconds]
fikka has joined #lisp
Mon_Ouie has joined #lisp
<pjb> you can still make a call graph, only you cannot label the nodes by the name of the functions, you have to label them by the function themselves.
<pjb> (let ((i 0)) (loop repeat 10 for closure = (lambda () (incf i)) collect (funcall closure))) #| --> (1 2 3 4 5 6 7 8 9 10) |# in this code, the call graph calls 10 different closures.
zaquest has quit [Ping timeout: 276 seconds]
<pjb> (declaim (notinline foo)) (let ((i 0)) (loop repeat 10 for fun = (defun foo () (incf i)) collect (foo))) #| --> (1 2 3 4 5 6 7 8 9 10) |# in this code, the call graph calls 10 different functions from (foo)!
<pjb> It would be an error to have a node labelled foo in this call graph.
<pjb> (let ((i 0)) (let ((closure (lambda () (incf i)))) (loop repeat 10 collect (funcall closure)))) #| --> (1 2 3 4 5 6 7 8 9 10) |# ; in this code, the call graph calls 1 (ONE) single closure!
<pjb> (let ((i 0)) (flet ((foo () (incf i))) (loop repeat 10 collect (foo)))) #| --> (1 2 3 4 5 6 7 8 9 10) |# just like in this one. In this case, the call graph could have a node named foo. but notice it would be a different foo each time this expression is evaluated!
zaquest has joined #lisp
parjanya has joined #lisp
makomo_ has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
shrdlu68 has quit [Ping timeout: 240 seconds]
windblow has quit []
<stacksmith> Right. You can only speak for the image at the point in time you looked at it...
kumori[m] has joined #lisp
vertigo has quit [Disconnected by services]
<jasom> otwieracz: also the write-lock code looks wrong; usually rwlocks allow one writer or many readers; this appers to allow many writers or many readers
<otwieracz> jasom: really? writer is locking `resource`
<jasom> otwieracz: oh, I see it is; whats up with the testing of the depth then?
<jasom> and wcount?
<jasom> is that just to exclude readers when there are pending writers?
<otwieracz> jasom: this should be writer-preffering rwlock
<otwieracz> (and it's matchin wikipedia's code)
<jasom> otwieracz: yeah, I see it now. Were you able to get it to work with condition variables?
<otwieracz> jasom: I've used semaphore.
<otwieracz> jasom: And seems like it's working. :)
dieggsy has joined #lisp
<jasom> cool. I should add semaphores to bt at some point
<otwieracz> IIRC there's PR waiting.
<jasom> wow
alexmlw has joined #lisp
<jasom> glad I didn't make a new one then
<jasom> semaphores and condition variables have a large overlap; it's easy to implement one with the other, and they are used for similar things
fikka has joined #lisp
windblow has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
random-nick has quit [Read error: Connection reset by peer]
<jackdaniel> condition variables are congitively harder to me
<jackdaniel> but yes, generic implementation uses cv (in this pr)
<jasom> IMO semaphores are the simplest synchronization primitive
alexmlw has quit [Remote host closed the connection]
<jasom> it's an atomic coutner with signaling
Cymew has joined #lisp
georg_ has joined #lisp
georg_ has quit [Client Quit]
georg_ has joined #lisp
georg_ has quit [Client Quit]
kdridi has joined #lisp
Cymew has quit [Ping timeout: 248 seconds]
Patternmaster has joined #lisp
sz0 has quit [Quit: Connection closed for inactivity]
dmiles has joined #lisp
angavrilov has quit [Remote host closed the connection]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
jmarciano has quit [Read error: Connection reset by peer]
quazimodo has joined #lisp
jmarciano has joined #lisp
dmiles has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
JenElizabeth has joined #lisp
random-nick has joined #lisp
kdridi has quit [Remote host closed the connection]
kdridi has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Patternmaster has quit [Quit: leaving]
kdridi_ has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
kdridi has quit [Ping timeout: 240 seconds]
dmiles has joined #lisp
Patternmaster has joined #lisp
vlatkoB has quit [Remote host closed the connection]
Patternmaster has quit [Client Quit]
Patternmaster has joined #lisp
makomo_ has quit [Ping timeout: 252 seconds]
makomo_ has joined #lisp
<Shinmera> Implementing that should not be too hard -- crawl through the slime/swank sources and tear out the relevant parts.
<Shinmera> And for the interface it would probably just be an eval-in generic function taking a frame and a form.
<Shinmera> I haven't needed it so far which is why I haven't implemented it yet :)
shka has quit [Ping timeout: 240 seconds]
Bike_ has joined #lisp
Bike has quit [Ping timeout: 260 seconds]
<jasom> I would love a debugger written in CL rather than half-elisp half-CL
<Shinmera> With dissect it's fairly trivial.
<Shinmera> No eval-in-frame, as mentioned, but everything else is there.
<jasom> I may investigate. Right now my geany plugin runs emacs to drive swank as I found that to be easier than implementing all the parts of slime that are elisp
ludston_ has joined #lisp
<Shinmera> I also have an inspector written, but that's currently tied to Trial. Should export it to QUI some time. https://www.youtube.com/watch?v=w70XyHBrUDI&list=PLkDl6Irujx9Mh3BWdBmt4JtIrwYgihTWp&index=27&t=0s
deba5e12 has quit [Quit: WeeChat 1.9.1]
ludston has quit [Ping timeout: 240 seconds]
deba5e12 has joined #lisp
SuperJen has joined #lisp
deba5e12 has quit [Client Quit]
fikka has joined #lisp
deba5e12 has joined #lisp
<Shinmera> I thought I had a video of the debugger in action but apparently not.
EvW has quit [Ping timeout: 256 seconds]
makomo has joined #lisp
JenElizabeth has quit [Ping timeout: 240 seconds]
nowhereman_ has joined #lisp
Patternmaster has quit [Quit: leaving]
makomo_ has quit [Ping timeout: 248 seconds]
<Shinmera> Need to make more videos. And more articles. And more libraries. More of everythign!
smurfrobot has joined #lisp
Murii has quit [Quit: WeeChat 1.4]
BitPuffin has quit [Remote host closed the connection]
Patternmaster has joined #lisp
<stacksmith> Is there any reason top-level def forms have a lambda-list like (name lambda-list &body body) instead of something that indicates destructuring, like (name (&rest lambda-list) &body body)? Is there any point in passing a non-list as a lambda-list?
warweasle has quit [Quit: later]
<dim> (funcall fname list-of-arguments) ; might explain?
<Shinmera> I don't feel like the latter provides clarity
<Shinmera> it's just longer for no real reason
<dim> not funcall, apply
<stacksmith> It disambiguates the structure. Otherwise, an entity looking at the first lambda-list and a parameter list may just as well assume it's a function call returning a single value lambda-list.
<mepian> is it possible to upgrade ASDF from 2.010 to 3.3.1 with install-asdf.lisp on Clozure 1.6-r14468M?
<Bike_> "an entity" cannot assume that without knowing how the macro works
Bike_ is now known as Bike
<Bike> (defun (setf foo) ...) is ok, but nothing analyzing code can go "ah, it's a call to the function 'setf'"
<Bike> not because of the lambda list, but because of how defun works
rumbler31 has quit [Remote host closed the connection]
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
<Shinmera> stacksmith: What are you going on about? It's a lambda-list. You can't just go ahead and make up rules willy nilly about how you want to read things.
<Bike> whereas you can have a macro like (defun foo (form) form), and then in (foo (setf foo)) there is in fact a call to the function 'setf'
<Bike> er, defmacro foo
<stacksmith> Hardly willy nilly.
<Bike> what i'm saying, stacksmith, is that you're attributing more semantics to lambda lists than they actually have
<mepian> I'm getting this error when I try to upgrade ASDF https://pastebin.com/tai9VLNz
<stacksmith> Wishful thinking perhaps.
<Bike> for another example, you could also give defun the lambda list (name lambda-list &rest body)
<Bike> in which case the body does, actually, probably include function calls
<Bike> if the semantics could be summed up in the lambda list we wouldn't need the actual macro function
<stacksmith> Is it legal to provide a non-list lambda-list?
<Bike> don't think so
<Bike> in scheme it is, not that they call them "lambda lists"
<stacksmith> Is there anything semantically different with (name (&rest lambda-list) &body body)?
juan-reynoso has quit [Quit: Leaving]
<Bike> it means an error about not being a list will come up earlier, i guess
<Bike> oh, and i suppose since macros can have dotted lambda lists &rest won't work there
<stacksmith> Can you have a dotted list and &body together?
<Bike> no
fourier has quit [Ping timeout: 252 seconds]
<Shinmera> I object to (&rest lambda-list) for a different reason: a lambda list is a structure in itself. It is not really applicable to what &rest means: an enumeration of items.
<Bike> i agree with that
<Bike> clhs 3.4.4
<Bike> has the macro lambda list syntax in detail
stacksmith has quit [Remote host closed the connection]
stacksmith has joined #lisp
<stacksmith> Damn, my IRC client crashed.
<Shinmera> I didn't even know IRC clients could crash
<Bike> didn't you write one?
<stacksmith> not yet.
<stacksmith> A couple of newsreaders.
<mepian> ASDF went from one file (asdf.lisp) in 2.010 to multiple directories of sources, that's quite a growth
<Shinmera> I have. My joke is that most clients are so old and well-trodden that a crash is very peculiar.
<stacksmith> Bike: I thought &rest can be in an inner destructuring list along with dotted notation...
<Bike> what i mean is, you can write (defmacro foo (a . b) ...)
<Bike> and then with (&rest lambda-list) the rest-list is dotted, which isn't allowed
smurfrobot has quit [Remote host closed the connection]
<stacksmith> I suppose that is a reason.
<stacksmith> Shinmera: for some reason I am using Thunderbird...
nowhere_man has joined #lisp
nowhereman_ has quit [Ping timeout: 256 seconds]
oystewh has quit [Quit: .]
kaname has quit [Quit: Page closed]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
smurfrobot has joined #lisp
fikka has quit [Quit: leaving]
fikka has joined #lisp
cpape has quit [Remote host closed the connection]
dto has joined #lisp
<dto> evening xach
<Xach> hi dto
<dto> :)
<dto> how you been?
<Xach> So good
k-hos has quit [Read error: Connection reset by peer]
<dto> cool what's new?
<Xach> So much lisp hacking
<dto> hey sweet. what kind of packages?
<dto> i'm hacking on some elisp
<Xach> an expect-like thing for driving non-sbcl repls from sbcl.
<dto> that sounds exciting actually
z3t0 has joined #lisp
smurfrobot has quit [Remote host closed the connection]
k-hos has joined #lisp
vultyre has joined #lisp
smurfrobot has joined #lisp
borei has quit [Quit: Leaving.]
Karl_Dscc has quit [Remote host closed the connection]
smurfrobot has quit [Remote host closed the connection]
sjl has quit [Ping timeout: 240 seconds]
smurfrobot has joined #lisp
emaczen has joined #lisp
Bike has quit [Ping timeout: 260 seconds]
quazimodo has quit [Ping timeout: 240 seconds]
<emaczen> pjb: can you show me map-reduce with #'map #'reduce bt:make-thread and bt:join-thread?
_rumbler31 has quit [Ping timeout: 276 seconds]
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
cpape has joined #lisp
raynold has quit [Quit: Connection closed for inactivity]
smurfrobot has quit [Remote host closed the connection]
rumbler31 has joined #lisp
<emaczen> or someone else?
z3t0 has quit [Remote host closed the connection]
z3t0 has joined #lisp
z3t0 has quit [Remote host closed the connection]
z3t0 has joined #lisp
rumbler31 has quit [Ping timeout: 240 seconds]
jmarciano has quit [Read error: Connection reset by peer]
shifty has joined #lisp
blackwolf has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
openthesky has joined #lisp
<mepian> wow, I somehow completely misunderstood the process of upgrading ASDF - I should have just downloaded the new asdf.lisp and load it instead of mucking around with the tarball
pagnol has joined #lisp
z3t0 has quit [Remote host closed the connection]
z3t0 has joined #lisp
python476 has quit [Ping timeout: 248 seconds]
mishoo has quit [Ping timeout: 248 seconds]
z3t0 has quit [Remote host closed the connection]
z3t0 has joined #lisp
Bike has joined #lisp
openthesky has quit [Quit: Leaving.]
z3t0 has quit [Remote host closed the connection]