<theemacsshibe[m]>
didn't think about using acquire like that, thought there'd be an acquired-lock-p or something
fikka has joined #lisp
iAmDecim has quit [Remote host closed the connection]
<phoe>
theemacsshibe[m]: remember that you're in a multithreaded environment
iAmDecim has joined #lisp
<phoe>
(if (acquired-lock-p lock) (foo) (bar))
<phoe>
The state of the lock can change betweeen evaluating the condition and one of (FOO) (BAR)
<phoe>
so the ACQUIRE-LOCK-P function doesn't really work
<phoe>
the only sane work of checking if it's acquired is attempting to acquire it yourself
<theemacsshibe[m]>
true
<phoe>
s/work/way
<phoe>
also, good morning
<theemacsshibe[m]>
afternoon
fikka has quit [Ping timeout: 240 seconds]
karswell_ is now known as karswell
mikecheck has quit [Remote host closed the connection]
fikka has joined #lisp
iAmDecim has quit [Read error: Connection reset by peer]
iAmDecim has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
karswell_ has joined #lisp
fikka has joined #lisp
karswell has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 256 seconds]
vtomole has quit [Ping timeout: 260 seconds]
karswell_ is now known as karswell
sauvin has joined #lisp
<beach>
Good morning everyone!
flamebeard has joined #lisp
fikka has joined #lisp
thinkpad has quit [Quit: lawl]
skeuomorf has joined #lisp
thinkpad has joined #lisp
vlatkoB has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
orivej has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
robotoad has quit [Read error: Connection reset by peer]
Sonny_ has joined #lisp
robotoad has joined #lisp
dented42 has joined #lisp
kmurphy4 has quit [Quit: kmurphy4]
smurfrobot has joined #lisp
Inline has quit [Quit: Leaving]
fikka has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 245 seconds]
defaultxr has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
milanj has joined #lisp
fikka has joined #lisp
shifty has quit [Ping timeout: 256 seconds]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fikka has quit [Ping timeout: 256 seconds]
Cymew has joined #lisp
shka_ has quit [Ping timeout: 264 seconds]
ealfonso has quit [Ping timeout: 245 seconds]
megalography has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
<flip214>
phoe: also, the state of the lock might change while your COND is returning T ... or at any later point as well, so IMO a LOCK-ACQUIRED-P would be okay.
<flip214>
after all, your COND can just be put in a (DEFUN LOCK-ACQUIRED-P (lock) ... ), right?
<flip214>
the only valid use is for debugging purposes anyway.
<flip214>
(assert (eq (lock-owner lock) (current-thread))) or similar
Cymew has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 264 seconds]
<White_Flame>
that's the nature of asynchronous polling; can't escape it
fikka has joined #lisp
megalography has joined #lisp
slyrus_ has joined #lisp
mange has quit [Ping timeout: 260 seconds]
andrei-n has joined #lisp
doesthiswork has joined #lisp
pdv has joined #lisp
fraya has joined #lisp
mathZ has quit [Remote host closed the connection]
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
daniel-s has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 240 seconds]
smokeink has quit [Ping timeout: 264 seconds]
Cymew has joined #lisp
nickenchuggets has quit [Quit: Leaving]
Folkol has joined #lisp
Cymew has quit [Ping timeout: 256 seconds]
robotoad has quit [Quit: robotoad]
doesthiswork has quit [Quit: Leaving.]
Cymew has joined #lisp
pdv has left #lisp ["ERC (IRC client for Emacs 26.1)"]
dddddd has joined #lisp
dadabidet has joined #lisp
ealfonso has joined #lisp
skeuomorf has quit [Ping timeout: 245 seconds]
lavaflow_ has joined #lisp
blt has quit [Ping timeout: 264 seconds]
stacksmith1 has joined #lisp
nydel has quit [Ping timeout: 264 seconds]
sword` has joined #lisp
nydel has joined #lisp
sword has quit [Read error: Connection reset by peer]
lavaflow has quit [Ping timeout: 264 seconds]
stacksmith has quit [Ping timeout: 264 seconds]
stacksmith1 is now known as stacksmith
blt has joined #lisp
blt has joined #lisp
blt has quit [Changing host]
zaquest has quit [Quit: Leaving]
<dadabidet>
Im a lisp beginner, what is a good interpreter for linux?
<dadabidet>
sbcl?
<jackdaniel>
dadabidet: it is a compiler
<dadabidet>
clisp then?
<jackdaniel>
I think that Common Lisp doesn't have a stricte interpreter
shrdlu68 has joined #lisp
<jackdaniel>
SBCL is a good choice, I've just pointed out that your naming was incorrect
<jackdaniel>
minion: tell dadabidet about pcl
<minion>
dadabidet: look at pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
<jackdaniel>
fact that something has a compiler doesn't mean you can't use it interactively with REPL
<jackdaniel>
the distinction is that compiler takes your code, performs some optimizations and outputs target bytecode (be it binary or some bytecode)
<dadabidet>
not looking for a book, just a program I can aptget
<jackdaniel>
while interpreter takes a statement and executes it
<dadabidet>
I know the difference
<jackdaniel>
alright. then sbcl is a good choice.
smokeink has joined #lisp
kuribas has joined #lisp
hhdave has joined #lisp
<kuribas>
is tagbody/go goto like in basic?
<jackdaniel>
define "like in basic" ;p tagbody/go provides labels you can jump to with go
<dadabidet>
ok so in list you cannot have anything small than ()
<kuribas>
jackdaniel: I am thinking like GW-BASIC back in the days
<jackdaniel>
smaller? () is an empty list
<dadabidet>
in term of syntax
<jackdaniel>
kuribas: I don't know basic, so I can't tell. but you may check out tagbody/go syntax and decide yourself
<jackdaniel>
dadabidet: you can type T
<jackdaniel>
what is "true"
<kuribas>
jackdaniel: it looks like something I would never ever use
<dadabidet>
Sorry Im coming from a C/C++ background so I have to re learn things
shangul has joined #lisp
<jackdaniel>
kuribas: tagbody/go is usually used in macros which implement better abstraction on top of this
<jackdaniel>
for instance DO is usually implemented with tagbody underneath
<jackdaniel>
it is nothing used on daily basis in the code (usually)
<kuribas>
jackdaniel: right, that makes more sense
<jackdaniel>
dadabidet: in lisp form is either an atom or a list. some atom examples: `3 "string" symbol nil #(1 2 3) T', some list examples: (1 2 3) (foo 1 2) nil
<jackdaniel>
note that nil is an empty list ( NIL is semantically equivalent to () )
<dadabidet>
btw what is the point of using ` instead of ' ?
<jackdaniel>
for the evaluation rule I'd suggest looking into some basic tutorial or a book (SICP is a good one, targetting scheme though)
<jackdaniel>
I've used backquote to separate atoms from the rest (inconsistently, sorry)
<dadabidet>
I want to learn the basic, I don't want to learn the whole thing
<jackdaniel>
but in code ` means backquote, which has some special characteristics, while ' means just quote
<jackdaniel>
that's why reading short tutorial is a good idea, you don't expect to learn basic from stranger on irc, do you? :-)
<dadabidet>
why not :)
<jackdaniel>
because random strangers usually are busy with their own endavours, that's why they end up with writing tutorials eventually
<jackdaniel>
chapter or two from PCL should take you around an hour or two. after doing it you should have basics grasped
<jackdaniel>
book "ANSI Common Lisp" by Paul Graham is another book which introduces you to the basics in first chapter
<dadabidet>
I hate to read explanations, I just want code and comments I guess
pagnol has joined #lisp
scymtym has joined #lisp
<jackdaniel>
I suppose that will give you some basics as well
<makomo>
>Fruther reading: Practical Common Lisp
<makomo>
hehe :D
<makomo>
Further*
<jackdaniel>
bear in mind that I'd still recommend reading first chapter or two of the mentioned books instead of going through that
<jackdaniel>
but if that's how you prefer to learn that should be fine too
ealfonso has quit [Ping timeout: 260 seconds]
subroot has joined #lisp
<shrdlu68>
dadabidet: You could check out examples on rosettacode and compare c/c++ to CL examples. But you'll still have to look up explanations for things you don't understand.
fikka has joined #lisp
<dadabidet>
yeah the '() seems interesting because it allows metaprogramming
<dadabidet>
I really want to understand this
<shka>
dadabidet: it is syntatic sugar
C-16 has joined #lisp
iAmDecim has quit [Ping timeout: 265 seconds]
<shka>
split between reader and compiler is important
<dadabidet>
what's a reader?
<shrdlu68>
Heh.
<dadabidet>
I mean how do you explain it?
<jackdaniel>
dadabidet: macros provide you metaprogramming capabilities
<dadabidet>
so ' is a macro
<jackdaniel>
and lisp macro is a different beast than macro in C/C++
<jackdaniel>
yes, it is a macro which quotes the expression
<jackdaniel>
what I'm saying that you may write your own macros
<jackdaniel>
and that gives you metaprogramming capabilities
<jackdaniel>
but I'd stick to functions and basics first
<kuribas>
beach: there are languages with both, like ocaml
<beach>
kuribas: I am using "functional programming language" in the sense that mutation is not allowed.
<dadabidet>
although language classification are not very precise. and the paragraph about functional not being fast sounds weird
<kuribas>
beach: mututation is allowed in a functional language
<beach>
kuribas: Fine.
<kuribas>
dadabidet: indeed, ghc and sbcl are about the same in performance.
<dadabidet>
kuribas, not in pure functional, which is used in multithreaded? or high performance?
<dadabidet>
I meant about mutation
<kuribas>
dadabidet: it is controlled, and pure functions are separated from side-effecting procedures.
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
<kuribas>
dadabidet: but you can still, say, mutate a matrix, and have a pure function.
<kuribas>
dadabidet: as long as you leave the original unmodified.
<dadabidet>
that's true
<shrdlu68>
By wikipedia's definition, almost all languages are support the "functional" style.
<beach>
kuribas: That makes absolutely no sense. If you mutate something, then by definition it is not unmodified.
<kuribas>
beach: you need to make a copy of the matrix first.
<dadabidet>
why doesn't lisp use more separators, like commas, curly braces?
<shrdlu68>
dadabidet: No need.
<shrdlu68>
compare (foo bar baz) and (foo bar, baz);
<dadabidet>
So haskell in a sense is using more characters to be more readable
<shrdlu68>
No, has nothing to do with readability.
deng_cn1 has joined #lisp
deng_cn has quit [Ping timeout: 240 seconds]
deng_cn1 is now known as deng_cn
<dadabidet>
My brain has trouble with lisp because since the brace is the mostly used separator, my brain has to build a hierarchy which is visually harder to see
<shrdlu68>
It's more of an acquired taste.
<beach>
dadabidet: Sorry to hear that.
<kuribas>
dadabidet: the idea is that you can look at a function signatures, and know if it does side effects or not.
<shrdlu68>
dadabidet: You're not alone in that, but you'll get used to it, if you give it a try. Not "used to it" in the "put up with it" sense but "get it".
<kuribas>
dadabidet: I don't find haskell harder or easier to read than LISP.
<shrdlu68>
dadabidet: There's a symmetry and uniformity to lisp syntax that makes it one of the language's most endearing features for me.
<kuribas>
I find editing LISP with paredit/emacs easier than editing other languages.
<beach>
kuribas: We write it "Lisp" these days. If you write "LISP", people will think of 1960s dialects.
<kuribas>
right
<jackdaniel>
kuribas: copying argument first and mutating it gives you referential transparency, not a "pure" function
<kuribas>
jackdaniel: yes, it's a pure function
<kuribas>
purity doesn't mean no mutation can happen "under the hood".
<kuribas>
jackdaniel: though semantically it's the same not doing any mutation.
<jackdaniel>
I've checked some sources. given wikipedia definition you are right, given haskell, ANSI CL (book), hackernoon and fpcomplete.com description you are not
<jackdaniel>
(that is, wikipedia seems to make both therm "pure function" and "referentially transparent function" semantically the same, while other sources claim, that "pure function" doesn't have side effects *at all* in its definition in opposition to referentially transparent function, which may mutate some copied variables)
<xificurC>
if mapcar returns a fresh list, does it matter if it did mutations under the hood?
<jackdaniel>
there is also interesting discussion in SICP about side effects in languages which are compiled and executed on a computer - under the hood (but really under the hood) function execution takes time, makes processor warmer etc, so you can't really claim side-effect fee
<jackdaniel>
free
zaquest has quit [Quit: Leaving]
<shrdlu68>
dadabidet: But because most people are not introduced to s-expressions until they have throroughly adapted to parsing C-style code, they find it jarring.
<dadabidet>
by the way what is bad about side effects?
zaquest has joined #lisp
<jackdaniel>
dadabidet: nothing really, but having (at least) referentially transparent function gives you some interesting qualities
<shrdlu68>
Hence "Lisp has all the visual appeal of oatmeal with fingernail clippings mixed in".
<jackdaniel>
like memoization
<xificurC>
mapcar may be a bad example because it is a HOF so the function it takes can do side effects
<jackdaniel>
dadabidet: you may for instance cache function results
<jackdaniel>
and that would be transparrent to the programmer (except the fact, that program may be faster)
<jackdaniel>
xificurC: yes and no. imagine scenario, when your referentially transparent function copies matrix. you are short on memory (and matrix is really big). you may run out of heap
<xificurC>
jackdaniel: even haskell doesn't try to pull these qualities into the type system AFAIK
<jackdaniel>
that's maybe a bad example, I'll keep silent now
<xificurC>
purity is a hard concept but usually when a language is talking about purity it does define it
smurfrobot has quit [Remote host closed the connection]
<dadabidet>
are there languages that mix languages like C and lisp?
<dadabidet>
python have lambdas
<xificurC>
what a "pure function" guarantees
<jackdaniel>
dadabidet: ECL (embeddable common lisp) allows you to inline C (and use Lisp libraries in your C application)
<jackdaniel>
also most Common Lisp implementations have FFI (foreign function interface) which allows you using C libraries from Lisp
<shrdlu68>
jackdaniel: I don't think he meant FFI.
<shrdlu68>
I think he meant "languages whose design is partly influenced by C and Lisp".
<jackdaniel>
shrdlu68: then please explain what he meant if both my answers were incorrect ;)
<jackdaniel>
ah, well, dylan for instance
<shrdlu68>
dadabidet: Lots of people claim so. "Perl 6 is Lisp with a decent syntax, and minus a lot of assumptions about how lists should be represented :)" -- here is a man who would be okay with lisp but for the syntax.
<jackdaniel>
Java
<jackdaniel>
Ruby
<jackdaniel>
many concepts which were pioneered in Lisp got into languages which borrow syntax from C
defaultxr has quit [Ping timeout: 256 seconds]
<kuribas>
dadabidet: it's not bad, but a sideeffect-free (pure) function, can be understood without requiring knowledge of the surrounding context.
<dadabidet>
in C return is a statement, right?
<beach>
dadabidet: Yes. Why do you ask?
<shrdlu68>
Yes, one doesn't need an explicit "return" in CL.
<kuribas>
dadabidet: in effect, it depends only on the inputs it receives, while with mutation, you depend on the global state as a whole.
<dadabidet>
but pure function are good since they increase locality, so you reduce the risk of invalidating your cache line
zaquest has quit [Remote host closed the connection]
zaquest has joined #lisp
<beach>
dadabidet: Why did you ask whether return is a statement in C?
<dadabidet>
beach, I was trying to imagine how a return is translated into machine code
<dadabidet>
but in C you also have ternary
<shrdlu68>
Depends on the calling convention.
<beach>
dadabidet: It typically translates to the RET machine instruction.
<dadabidet>
rust doesn't have return
smurfrobot has joined #lisp
<flip214>
does it have GOTO?
<dadabidet>
no idea
<dadabidet>
I guess not
fikka has quit [Ping timeout: 260 seconds]
<dadabidet>
not a fan of rust, it can be too foreign for a C++ programmer
<dadabidet>
I like the safety, but I still have to wrap my head around the whole enum classes
<dadabidet>
and it's not as easy to read as C
<dadabidet>
greetings.iter().enumerate()
<beach>
dadabidet: Try to stick to the topic a bit more, please.
<dadabidet>
he was asking me about goto
<dadabidet>
just answering
<shka>
rust?
<shka>
what is it?
<shka>
new cl implementation?
<shka>
kinda lame name imho
<shka>
:P
fikka has joined #lisp
<dadabidet>
language developed by mozilla, it doesn't have a return statement, so as long as a line doesn't end with ; is it considered as a return, like so {let x = 3; x}, which, to be honest is like a hidden return statement
smokeink has quit [Remote host closed the connection]
<dadabidet>
it solves many problems of the unsafety of C/C++/Java, all of this at compile time
<flip214>
so does whitespace - but that alone is not a good enough reason to switch
smurfrobot has quit [Remote host closed the connection]
<dadabidet>
I think that enforcing safety is a good way to achieve performance... but at least in a world where security matters more, it can be somehow relevant to mozilla
<flip214>
assembler on microcontrollers (anything without a MMU, even) doesn't have NULL pointer exceptions, too - illegal accesses aren't, they just don't return the expected (or, rather, hoped for) data ....
<dadabidet>
what did you mean by "so does whitespace" ?
fikka has quit [Ping timeout: 264 seconds]
<flip214>
the "whitespace" programming language also solves the unsafety of C/C++
<flip214>
shrdlu68: I'm fairly sure you can do a compiler for whitespace as well.... ;)
<shrdlu68>
flip214: It has to be fast! And the compiler itself has to be fast as well!
<flip214>
shrdlu68: to stay CL-on-topic here, just use a custom readtable to convert whitespace to CL calls. should be fast enough.
<shrdlu68>
Naw naw naw, has to be as fast as that other language.
<kuribas>
dadabidet: not really
<kuribas>
dadabidet: there is a performance penalty for pure functional programming.
<kuribas>
dadabidet: but it doesn't really matter for most programs
fikka has joined #lisp
m00natic has joined #lisp
<flip214>
kuribas: there is? really? always? and I always thought that the most applicable programming variant depends more on your algorithms and data structures...
<kuribas>
flip214: I didn't say otherwise?
shangul is now known as CtrlZ
CtrlZ is now known as shangul
deng_cn has quit [Quit: deng_cn]
C-16 has quit [Ping timeout: 240 seconds]
makomo has quit [Ping timeout: 245 seconds]
<flip214>
"there is a performance penalty for pure functional programming." isn't always true
<kuribas>
that's right
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
subroot has quit [Read error: Connection reset by peer]
bbobb has joined #lisp
bbobb has left #lisp [#lisp]
<malice>
There are few universal truths.
<dxtr>
Isn't it more complicated to make an efficient functional compiler, though?
<malice>
More complicated than what?
<dxtr>
Than a non-functional compiler?
<kuribas>
dxtr: a compiler is always complicated. It's just different.
<dxtr>
I'm no compiler expert but I've always assumed that with an imperative compiler you can get away with being pretty naive (Don't have to copy data when it changes, etc)
<dxtr>
With a functional language you can't be that naive and have to do some acrobatics to make stuff efficient
<malice>
if you go naive you aren't fast
<dxtr>
I'm not arguing here, btw. This is just what I have assumed :)
attila_lendvai has quit [Read error: Connection reset by peer]
<malice>
Neither am I :)
attila_lendvai has joined #lisp
<dxtr>
And what I'm talking about here is a hypothetical super dumb compiler
<malice>
I guess it really depends on the language
<kuribas>
dxtr: a naive imperative compiler is easy. But doing optimizations in the presence of side-effects is hard.
<kuribas>
(relatively easy)
<dxtr>
Absolutely, I get that
smurfrobot has joined #lisp
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
nullniverse has joined #lisp
Kundry_Wag has joined #lisp
Ukari has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
pagnol has quit [Ping timeout: 256 seconds]
<TMA>
dxtr: making an optimizing compiler for a functional language is actually easier
<dxtr>
neat
<jackdaniel>
do you suggest, that some languages are disfunctional? ;-)
Ukari has quit [Quit: Leaving.]
attila_lendvai has quit [Read error: Connection reset by peer]
Ukari has joined #lisp
<shka>
php comes to mind
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
cmatei has quit [Remote host closed the connection]
pagnol has joined #lisp
fikka 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]
AetherWind has quit [Quit: Leaving]
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]
<beach>
Here is an interesting conundrum. In SICL, I plan to implement a garbage collector with two generations. The younger generation is per-thread and the older generation is global. The collector of the older sets a flag in the application threads when it decides to run the GC. When a thread encounters a safe point, it runs its own young-generation GC and then indicates to the global collector that it has finished. When all threads
<beach>
have answered, the global GC goes ahead.
<beach>
But a thread can be stopped arbitrarily long, for instance waiting for I/O or some user gesture, or it can be stopped by a debugger thread. It would be unfortunate if the global collector could not run in such situations. So would it be OK if a stopped thread can still run the GC?
<beach>
It also means that there must be some restrictions on the places where a thread can be stopped. It has to be a place that allows for the GC to run.
smurfrobot has quit [Remote host closed the connection]
<beach>
And that restriction seems to exclude stepping instruction by instruction in the debugger.
<beach>
Unless every value of the program counter is a safe point for GC, of course.
fikka has joined #lisp
fraya has quit [Quit: Leaving]
<shka>
beach: i don't see why preventing GC from running while stepping would be a practical problem though
<beach>
shka: Well, there can be other threads running at the same time, and those threads might allocate memory.
<shka>
ah, i see now
<LdBeth>
beach: how about invoke local GC after waiting and then the main GC just skip the waiting thread
fikka has quit [Ping timeout: 264 seconds]
<beach>
LdBeth: That is not possible, because the waiting thread may have references to objects in the global heap, and the global GC needs to know that they are live.
<LdBeth>
Assuming a thread doesn’t produce new garbage when waiting
raynold has quit [Quit: Connection closed for inactivity]
<beach>
That's correct, it won't allocate memory while waiting.
jmercouris has joined #lisp
<jmercouris>
I have a list that looks like the following: (("login" ("username" . "username") ("password" . "password")))
<jmercouris>
I have been using cdr and car derivatives to access the elements
<jmercouris>
is there something that I'm missing? or is there a smarter way to grab the elements?
<fe[nl]ix>
beach: I think you're referring to safepoints
<beach>
fe[nl]ix: Indeed. But I need to figure out how to GC stopped threads.
<shka>
jmercouris: assoc
<jmercouris>
shka: indeed, thank you
<beach>
shka: Nah, C*R are simpler.
<beach>
If the number of elements is known and the positions are known.
<beach>
No need to search and compare then.
<jmercouris>
number of elements and position is known
<shka>
beach: assoc is more robust to changes
<jmercouris>
also true...
<shka>
there is nothing that suggest that password must be where it is
<shka>
otherwise, it would not have label
heisig has joined #lisp
<jmercouris>
it has a label due to caveman
<jmercouris>
the order is always the same
<shka>
oh, ok
<LdBeth>
I would never use list to store things
<jmercouris>
It is not my choice
<jmercouris>
it is this framework's choice
<jmercouris>
I would have used a hash table myself
<malice>
What else would you use list for?
<malice>
jmercouris: why?
<shka>
well, just create aliases to c*r with reasonable names and you are golden
<malice>
list is superior in this case
<jmercouris>
malice: these are key/value pairs
<malice>
So is alist.
<jmercouris>
the overhead of a hash table is greater, for sure, but I don't care
<LdBeth>
malice: only for macro
<jmercouris>
malice: yes, but this is not an alist
<malice>
Right. This is a strange format then.
<jmercouris>
the top level cons cells of this list are each a form, and then the level below that is each question
<jmercouris>
when I say form, I don't mean a lisp form, an html form
random-nick has joined #lisp
<malice>
List has an advantage of being printable
<malice>
but apart from that hash-table would probably be better
<malice>
LdBeth: I don't really understand
<LdBeth>
A struct is good enough for this case
<fe[nl]ix>
beach: I think the general solution is that all I/O involves safepoints
<LdBeth>
malice: I would only use list in lisp macro
<fe[nl]ix>
bailon: and also waiting on the UI is practically I/O
<beach>
fe[nl]ix: Yes, I think so too. I am more worried about the debugged thread being stopped. But I guess I can make those safe as well.
<malice>
LdBeth: idk, lists are easy to use. Using them in macros is very limiting.
shangul has quit [Quit: sudo rm -rf /usr/*]
<fe[nl]ix>
beach: I don't think you need to care about those. it's an uncommon use case that won't matter much in practice
<beach>
Hmm.
<beach>
fe[nl]ix: But I am a bit surprised here. What does it mean for a thread to be stopped? Is it still OK for such a thread to run the GC? Or should I fork a different thread to run the GC on behalf of a stopped thread?
fikka has joined #lisp
<fe[nl]ix>
beach: a Lisp debugger is just a a function that is called and waits for UI commands. I don't see why it can't GC
<beach>
fe[nl]ix: Each thread is supposed to run its own GC. But if a thread is stopped, say waiting for I/O (forget about the debugger), is it still OK for it to run its own GC?
<LdBeth>
beach: I don’t think it would affect even there’s a requirement for real time application
<fe[nl]ix>
yes, I can't see why not
<Ukari>
is it possible to refactor a function/macro/variable/class/structure's name in some common lisp develop tool?
<beach>
fe[nl]ix: I think you are right.
fikka has quit [Ping timeout: 248 seconds]
<beach>
LdBeth: It would though. Imagine a REPL waiting for input for a very long time. At the same time, there is a thread working on some application that allocates a lot of memory. The system could then run out of memory just because the GC can't run due to the REPL thread.
attila_lendvai has quit [Quit: Leaving.]
<flip214>
beach: is the architecture so that all threads can access all memory, or can memory be thread-private?
<flip214>
a thread being stopped in the debugger shouldn't be a problem if the stack and all registers are available as GC roots --
<beach>
flip214: Each thread has a small private heap.
<beach>
flip214: Yeah, that's right.
<flip214>
though I'm not sure whether you need to do an exact GC
pierpal has quit [Quit: Poof]
<beach>
I do.
pierpal has joined #lisp
<flip214>
beach: but the thread _asking_ for a GC could just as well take a lock from the non-running (stopped) thread and do GC for it, because the stopped threads' memory is mapped as well, right?
<beach>
flip214: It is more a philosophical question perhaps. Is it OK for a stopped thread to run some code, or would I have to fork a different thread for that?
<beach>
Yes, you are right.
<beach>
I could have (one of) the global GC tread(s) run the GC on behalf of stopped threads.
<flip214>
basically, I guess that having a lock that's taken as long as the thread is running and having the debugger (and/or IO) release that should work
<beach>
Yes, something like that.
<flip214>
might not be really cachefriendly, but then it might not matter that much for stopped threads
<beach>
I think that's right (that it won't matter).
<flip214>
do you plan to have a thread pool for GC? actively starting new threads to do GC for some thread sounds heavy.
fikka has joined #lisp
<beach>
The per-thread GC is invoked by the thread itself.
<beach>
So no additional thread is created for that.
<flip214>
oh, okay. so I misunderstood.
<beach>
The global GC might have a pool, or may create additional threads. It probably won't matter much.
<beach>
The question was more for a stopped thread. It would have to be not terribly stopped in order to run its own GC.
<flip214>
I've done quite a bit of work on some green-thread library in C over the last few years - and interrupting IO is a big problem.
<beach>
I see.
<flip214>
well, "not really stopped" means async IO and signals or polling or something similar, and that's all a big hurdle.
<flip214>
it's the same as with FFI - you don't know what's happening, you can't reliably interrupt, so the only safe way seems to have a safepoint (excuse the pun ;)
Sonny_ has quit [Remote host closed the connection]
<flip214>
that most likely means saving all registers in a per-thread structure to be used as GC roots (although that means some markup being done by the compiler?!), releasing the "running" lock, and doing the foreign call
<beach>
I am not sure I follow. So do you think it would be better to have one of the global collector threads run the GC on behalf of the stopped thread than to allow for the stopped thread to be unstopped to run the GC? If I do that, I must prevent the stopped thread from continuing its execution until the GC has finished.
<flip214>
right.
<flip214>
that's why I'm talking about using a lock - so the not-stopped-anymore thread won't crash the right-now-running GC on its private heap.
<beach>
Absolutely.
<flip214>
as far as I can tell, "unstopping" threads is a _really_ hard problem.
<beach>
OK, food for thought. Thanks for helping me sort this out.
<flip214>
let's say the thread tries to read from a pipe or a socket - how would you "stop" that?
<flip214>
closing the filehandle? ouch.
brendyn has quit [Ping timeout: 260 seconds]
_cosmonaut_ has quit [Ping timeout: 268 seconds]
<flip214>
sending a signal? you're not likely to know how many bytes already got delivered.
<flip214>
and from non-syscall things (FFI) it might get harder still...
<beach>
I don't think I see the problem. If a thread is stopped because it is waiting for I/O, why would it be bad to start it so that it can run the GC and then go back to waiting?
<flip214>
perhaps, later on, you'll want or need some "fast FFI" calls as in "they're guaranteed to complete quickly"
<flip214>
to avoid the overhead of releasing the GC lock across them
<flip214>
one thread does the POSIX call "read(15, buffer, 65536)"
<beach>
I think I understand.
<flip214>
how would you interrupt that?
<beach>
I think I see what you mean.
<jmercouris>
beach: wouldn't it have to switch contexts then?
<jmercouris>
if it is waiting for I/O somehow you will have to switch to "GC" mode, while it is in the middle of doing something
<nirved>
GC looks very tricky with multi-core or distributed systems
<flip214>
jmercouris: that's another dimension -- "contexts" as in userspace/kernelspace, or lisp/FFI, ....
<beach>
jmercouris: What kind of "context" are you talking about here?
<jmercouris>
execution context
<jmercouris>
I don't know the word for this
<jmercouris>
I have forgotten it
<beach>
Sure, it would no longer be waiting.
<flip214>
jmercouris: as in "stack pointer, instruction pointer, registers"?
<jmercouris>
like the state of the thread in terms of register values and things like that
<jmercouris>
yes, that
<beach>
But yeah, I am convinced that I don't want to mess with a stopped thread.
<jmercouris>
ah okay, I had understood something else from reading the conversation
<flip214>
beach: do you have empirical data whether the thread-local heap is likely to include references to global data?
<beach>
Very likely.
<beach>
All the long-lived stuff will be in the global heap.
<beach>
All Common Lisp functions. All Common Lisp packages.
<flip214>
because if you could determine that since the last GC it's only doing "local" allocations that have no global impact, it could tell the global GC to not bother with this local heap
<beach>
flip214: That's not possible.
<beach>
flip214: Any assignment can create a new reference to global data.
<flip214>
yeah, of course, but these are not likely to be released anyway - I'd imagine a (gc :full T :really-full T) flag or so ;)
<jmercouris>
beach: sorry to distract, but how did your language presentation go? how did the participants receive the information?
<beach>
jmercouris: It went very well apparently.
<beach>
flip214: I am lost now.
<jmercouris>
Nice!
<beach>
flip214: Imagine a thread does (setf x (cdr x)).
<flip214>
beach: _can_, yes, but some (for me) typical workloads actually won't... like a hunchentoot thread that just builds up an output stream buffer and reads some global state
<beach>
flip214: X is a reference to global data.
<flip214>
beach: yeah, right.
<beach>
flip214: But one single assignment is enough for things not to work.
<beach>
flip214: Imagine the last reference to the initial list being dropped.
<beach>
flip214: The global GC still needs to know that there is now a reference to the CDR.
<beach>
flip214: It can't just ignore it.
<flip214>
beach: if all of your objects have a heap pointer (yeah, expensive, I know), then you might be able to build up a tree of dependent heaps during allocation
<flip214>
and if one private heap isn't referenced in this tree of heaps, it doesn't need GC (by definition)#
<beach>
flip214: I think the previous idea is better.
<flip214>
well, both might be useful... the fastest GC is one that doesn't happen ;)
<beach>
It needs a GC so that the global heap knows what's live.
<flip214>
sorry, that wasn't clear enough. the global GC doesn't need to wait for that thread to mark global objects if the thread knows that it didn't reference any global objects since the last GC.
<beach>
flip214: But that will happen in almost all cases.
<beach>
flip214: If it calls a function, it will reference its environment.
<beach>
flip214: and its code.
<beach>
Though I guess it was already referenced before.
<beach>
But anyway, I like the previous idea better.
<flip214>
I don't know your use cases. Mine include hunchentoot frontends, which (most of the time) won't have any (changing) references to global data...
fraya has joined #lisp
<flip214>
well, these ideas are not exclusive, anyway.
<beach>
Like I said. (setf x (cdr x)) would be enough.
<beach>
But anyway, I like the previous idea better.
<flip214>
beach: if you allow me a bad pun, interrupting stopped threads might require you to solve the halting problem ;)
<beach>
heh.
* flip214
goes ta-tsching...
<beach>
flip214: Let me try to summarize to see whether I got this: When a thread is stopped due to I/O, it will wait on a lock before going back to its normal business. If that lock is taken, it means that there is a thread doing GC on behalf of the one that just got unstopped. Correct?
<flip214>
right.
<flip214>
but that's not _only_ IO, but could be for _any_ foreign call (like FFI)
<flip214>
though you will want to skip this performance penalty for _known_fast_ FFI calls
_cosmonaut_ has joined #lisp
<beach>
Checking a lock has very little performance penalty.
<shka>
beach: i was wondering
<shka>
why just two generations?
<beach>
shka: Because I don't think I need more than that, and more would just complicate things.
<shka>
ok
<xificurC>
ETA on ANSI compliance? :)
<shka>
xificurC: someone between now and forever :P
<beach>
xificurC: For what?
<flip214>
beach: uh, well, if the locks memory is in the RAM of the other socket and causes some L1, L2, and L3 cache areas to be invalidated, it might...
<xificurC>
beach: SICL
<beach>
xificurC: I have no idea.
<beach>
flip214: Well, I don't care. Your examples (FFI and Web stuff) are not high on my list of important considerations. :)
<shka>
the vanisihing point of eternity ;]
<flip214>
beach: right. no problem at all!
<beach>
flip214: Besides, I'll have much better cache performance than a typical copying collector.
<flip214>
hmmm, I'm not sure about that... making a list's cons cells contiguous in memory during GC has a few nice performance implications, which keeping the cells distributed over multiple (private) heaps doesn't
<flip214>
but never mind that low-level stuff for now
<flip214>
perhaps all the CPUs in 5 to 10 years won't have that fancy stuff any more anyway, because of all the possible exploits
gls has joined #lisp
gls_ has joined #lisp
gls has quit [Client Quit]
gls_ is now known as gls
schoppenhauer has quit [Ping timeout: 240 seconds]
krfantasy has joined #lisp
quazimodo has quit [Ping timeout: 260 seconds]
gls has quit [Quit: Updating details, brb]
gls_ has joined #lisp
quazimodo has joined #lisp
AetherWind has joined #lisp
smurfrobot has joined #lisp
Inline has joined #lisp
mansalss has joined #lisp
<mansalss>
hey I need a list of words from official Polish Scrabble dictionary. They are available in two forms: in the official Windows app (offline) and in online service. They both deliver an option to check word(s) and find words by anagrams.
<mansalss>
I want to create a tool for myself to become better Scrabble player, but I need to have a full list of words. I have no experience in reverse engineering. I think the best we can do here is to use this offline dictionary and find out how it works. All I know is that it's most likely encrypted in some way.
<mansalss>
Link to the app: ufile.io/knwxt
<mansalss>
Can you guys help me with this?
<jdz>
mansalss: this is #lisp, not #radare2
schoppenhauer has joined #lisp
<jmercouris>
mansalss: what does this have to do with #lisp?
<mansalss>
It cant be done in lisp no?
<mansalss>
Isnt lisp a good language for it?
<jdz>
Not if you have no experience in it.
<jmercouris>
Any language is equally suited to this task
<jmercouris>
with the exception of may something like SED
obicons has joined #lisp
<xificurC>
what is #radare2
<jdz>
I (probably fictional) channel for Radare2.
<jackdaniel>
first of all, coercing copyrighted material that way is illegal (in Poland you can't freely break DRM or any sort of security measures in copyrighted material), second it is offtopic for Lisp – sure you can create dictionary-managing engine in Lisp if that's your question, third – I'd recommend building your dictionary on free licenses, like the one present on sjp.pl
LiamH has joined #lisp
karswell has quit [Ping timeout: 256 seconds]
<jmercouris>
another idea might be, find all polish books on project gutenberg, and create your own dictionary. As far as I understand, you don't need the definitions as well, do you?
smurfrobot has quit [Remote host closed the connection]
<jackdaniel>
that would be counterproductive given I've linked full dictionary which is ready to use
<jmercouris>
I didn't know that, I can't read what it says on that page
<jmercouris>
sorry for the double post
AetherWind has quit [Quit: IRC for Sailfish 0.9]
smokeink has joined #lisp
doesthiswork has joined #lisp
warweasle has joined #lisp
kajo has quit [Ping timeout: 276 seconds]
AetherWind has joined #lisp
dcluna has quit [Ping timeout: 256 seconds]
hjudt has left #lisp [#lisp]
dcluna has joined #lisp
Folkol has joined #lisp
<mansalss>
<jackdaniel> that would be counterproductive given I've linked full dictionary which is ready to use
<shka>
literally scrabble dictionary in utf-8 encoded file
<shka>
CC BY 4.0
<mansalss>
Isn't lisp good for AI?
<shka>
you can use it without scraping web or hacking other programs
<shka>
mansalss: I... give up
<mansalss>
shka, thankyou for that
<mansalss>
ill have a look
scymtym has quit [Ping timeout: 240 seconds]
Bike has joined #lisp
<mansalss>
Reverseing seems more fun though
<mansalss>
How would you do it with that given dicitionary?
<jackdaniel>
mansalss: please stay on-topic on this channel
<xificurC>
jackdaniel already pointed out what you were (or still are) trying to do is illegal. Furthermore this is not a place to discuss reverse engineering
<beach>
mansalss: I think you were told that it's illegal.
<jackdaniel>
it is offtopic, unless you are willing to learn common lisp and figure that out
smurfrobot has joined #lisp
<jackdaniel>
minion: tell mansalss about gentle
<minion>
mansalss: please look at gentle: "Common Lisp: A Gentle Introduction to Symbolic Computation" is a smoother introduction to lisp programming. http://www.cs.cmu.edu/~dst/LispBook/
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
krfantasy has left #lisp ["ERC (IRC client for Emacs 25.2.2)"]
<mansalss>
ok so my library is just about as helpful
mansalss was kicked from #lisp by jackdaniel [mansalss]
mansalss has joined #lisp
<mansalss>
Bike, can I PM you then
<beach>
flip214: I still have to work out the details of the synchronization handshakes.
igemnace has quit [Quit: WeeChat 2.1]
<beach>
flip214: I might ask for help if I can't work it out, and I might ask for remarks on what I write if I do think I can work it out.
igemnace has joined #lisp
fraya has quit [Remote host closed the connection]
skapata has joined #lisp
smokeink has quit [Remote host closed the connection]
mindCrime has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
_cosmonaut_ has quit [Ping timeout: 248 seconds]
Patternmaster has joined #lisp
Kundry_Wag has joined #lisp
pagnol has quit [Ping timeout: 260 seconds]
shangul has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
Kundry_Wag has quit [Ping timeout: 268 seconds]
fikka has joined #lisp
pagnol has joined #lisp
kajo has joined #lisp
_cosmonaut_ has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
mangul has joined #lisp
shangul has quit [Disconnected by services]
mangul is now known as shangul
fikka has joined #lisp
Kundry_W_ has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
Kundry_W_ has quit [Remote host closed the connection]
shrdlu68 has quit [Ping timeout: 255 seconds]
<jmercouris>
I am reading "Gentle introduction to symbolic lisp" and one of the questions has thrown me off guard "Why can't the special symbols T or NIL be used as variables in a function definition?
<jmercouris>
My answer was because we are not allowed to evaluate the arguments used in a function definition
<jmercouris>
but somehow I don't think that captures the full essence
<jmercouris>
further, we need to, when invoking the function assign the symbols to a variable based on the value passed in, this is not possible for T or NIL
<jmercouris>
I don't think you can set them
<jmercouris>
I guess it is the same reason we cannot use numbers in argument lists
<Bike>
it's because they're constants.
<jmercouris>
that's what I would have said, but they have not introduced that concept yet in the book
AetherWind has quit [Quit: IRC for Sailfish 0.9]
<jmercouris>
so apparently, somehow some way, given the knowledge already introduced in the book, someone should know the answer to the question at that point in time
<jmercouris>
maybe they've said it and I missed it
shangul has quit [Remote host closed the connection]
ebrasca has joined #lisp
fikka has joined #lisp
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
mathrick has quit [Ping timeout: 260 seconds]
shrdlu68 has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
Cymew has quit [Ping timeout: 265 seconds]
fikka has joined #lisp
mathrick has joined #lisp
<jmercouris>
(cons 'grapes '(of wrath))
<jmercouris>
damnit wrong window, sorry lol
nika_ has joined #lisp
smokeink has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
cmatei has joined #lisp
<Ukari>
i wanna use with-macro in defmacro, but found it is hard to write the inner macro due to write (list 'fn ,arg) instead of `(fn ,arg)
zaquest has quit [Remote host closed the connection]
zaquest has joined #lisp
<Xach>
Ukari: nested backquoting is the thing to which some resort
makomo has joined #lisp
zaquest has quit [Remote host closed the connection]
cmatei has quit [Remote host closed the connection]
smokeink has quit [Remote host closed the connection]
<Ukari>
which happen first to body? , or ,@
robotoad has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
markoong has joined #lisp
dadabidet has quit [Quit: Leaving]
<flip214>
beach: yes, please! I'd love to be of help!
FreeBirdLjj has joined #lisp
nsrahmad has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
fikka has joined #lisp
<beach>
flip214: Great! Thanks!
fikka has quit [Ping timeout: 255 seconds]
elfmacs has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
flamebeard has quit []
<fouric>
Ukari: i'm pretty sure that ,@ happens first
<beach>
Ukari: Why are you defining a macro in the body of a macro?
<Ukari>
fouric: thanks you anyway, though i still can't image how it happens
<fouric>
Ukari: you're not sure if you believe me (don't worry, i'm not sure either) or you believe me you just don't know *why*?
<fouric>
i might be able to help in the latter case lol
Baggers has joined #lisp
<fouric>
at least with your last question
fikka has quit [Ping timeout: 264 seconds]
<Ukari>
i don't know why , the result of (macroexpand-1 '(outside 1 2)) is weird
<fouric>
o
<fouric>
i don't quite have the mental bandwidth to help with *that* right now
thawes has joined #lisp
<fouric>
although i can suggest the strategy that i would use to understand it
<fouric>
which is to start with the innermost level of backquotes, try to understand that, and then work your way up/out
<Ukari>
beach, this is one of my condition, https://tinyurl.com/y8t27qoj. another is to make macro yield accessable locally instead of global
Folkol has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<beach>
Ukari: That's very different. You are defining a macro with the same name each time, namely INSIDE.
<beach>
The link you provided defines a macro with a name that depends on an argument.
<Ukari>
yes
shrdlu68 has left #lisp [#lisp]
<beach>
Local macros are defined using MACROLET and not DEFMACRO if that is what you are trying to do.
<Ukari>
it provides a defmacro* which returns a generator and also has lambda list arguements like defmacro
<beach>
I don't think I am smart enough today to follow what you are trying to say. Sorry about that.
<beach>
I should not have asked you a question in the first place.
smurfrobot has quit [Remote host closed the connection]
<Ukari>
do not blame yourself, you have done good job
warweasle has quit [Quit: later]
fikka has joined #lisp
smurfrobot has joined #lisp
smurfrobot has quit [Remote host closed the connection]
doesthiswork has quit [Ping timeout: 268 seconds]
fikka has quit [Ping timeout: 240 seconds]
Kaisyu has quit [Quit: Connection closed for inactivity]
_cosmonaut_ has quit [Ping timeout: 260 seconds]
skeuomorf has joined #lisp
nickenchuggets has joined #lisp
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
u92urksvz78 has joined #lisp
jmercouris has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
smurfrobot has joined #lisp
karlosz has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
<u92urksvz78>
anyone out there care to share what kind of interesting CL projects they are currently working on?
smurfrobot has quit [Remote host closed the connection]
karlosz has quit [Read error: Connection reset by peer]
karlosz has joined #lisp
<u92urksvz78>
anyone out there care to share any details about any interesting Common Lisp programming projects they are currently working on?
fikka has joined #lisp
terpri has quit [Ping timeout: 248 seconds]
igemnace has quit [Quit: WeeChat 2.1]
stux|RC-- has joined #lisp
thodg has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 240 seconds]
u92urksvz78 has left #lisp [#lisp]
stux|RC has quit [Ping timeout: 256 seconds]
smurfrobot has joined #lisp
scymtym has quit [Ping timeout: 240 seconds]
shka_ has joined #lisp
hhdave has quit [Ping timeout: 264 seconds]
ealfonso has joined #lisp
fikka has joined #lisp
stux|RC-- has quit [Read error: Connection reset by peer]
stux|RC has joined #lisp
smurfrobot has quit [Ping timeout: 265 seconds]
ealfonso has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 264 seconds]
m00natic has quit [Remote host closed the connection]
smurfrobot has joined #lisp
mflem has joined #lisp
smurfrobot has quit [Ping timeout: 256 seconds]
nsrahmad has quit [Quit: Leaving]
nowhereman_ has joined #lisp
defaultxr has joined #lisp
fraya has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
warweasle has joined #lisp
SaganMan has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
Intensity has quit [Ping timeout: 260 seconds]
drl has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
Khisanth has quit [Ping timeout: 245 seconds]
fikka has quit [Ping timeout: 276 seconds]
Intensity has joined #lisp
Kaz` has quit [Remote host closed the connection]
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
Khisanth has joined #lisp
cmatei has joined #lisp
varjag has joined #lisp
ealfonso has joined #lisp
orivej has joined #lisp
fikka has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
thodg has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<gendl>
Hi, i'm working on some interesting CL projects based on http://gendl.org, don't have a lot of time to share details right now though.
nika_ has quit [Quit: Leaving...]
<gendl>
I do have a question though -- if I have an error object in a variable (like from a handler-case), how can I get a stack trace of that actual error?
<gendl>
like (handler-case (some-form) (error (err) ;; now I want to get into the debugger directly for err . ...
pierpal has quit [Read error: Connection reset by peer]
<nirved>
gendl: invoke-debugger ?
<gendl>
nirved: well, yep, that does give a debugger, it seems pretty much the same as just calling (error err)
scymtym has joined #lisp
<gendl>
in the stack, I'm still seeing let bindings and such which are connected with the handler-bind
<gendl>
what I really want is a debug stack which would be the same as what I would get just from
<gendl>
(div 1 0)
<gendl>
[sorry -- replace 'div' with '/' -- 'div' is our operator which always returns double-floats)
<Bike>
what do you want to do with the backtrace? just display it, or?
<gendl>
want to type :zoom and debug with it
<Bike>
lisp implementations don't usually store a backtrace in the condition object, as far as i'm aware
<nirved>
gendl: you can get a list of the available restarts
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
FreeBirdLjj has quit [Ping timeout: 265 seconds]
kuribas has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
thodg has quit [Read error: Connection reset by peer]
Sonny_ has joined #lisp
drastik has joined #lisp
FreeBirdLjj has joined #lisp
drastik_ has quit [Ping timeout: 240 seconds]
Sonny_ has left #lisp [#lisp]
Sonny_ has joined #lisp
<nirved>
gendl: if you really must have the backtrace, it is implementation dependent, look at slime/swank
fikka has joined #lisp
<gendl>
I know there's a library trivial-backtrace
Sonny_ has quit []
rpg has joined #lisp
Baggers has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 248 seconds]
drastik_ has joined #lisp
drastik__ has joined #lisp
sauvin has quit [Remote host closed the connection]
drastik has quit [Ping timeout: 268 seconds]
drastik__ has quit [Client Quit]
zachk has joined #lisp
zachk has quit [Changing host]
zachk has joined #lisp
drastik_ has quit [Ping timeout: 260 seconds]
<rpg>
I'm embarrassed to ask this, but does anyone have an example of an ASDF system definition that quashes warnings to avoid failures? I have been using Allegro, whose COMPILE-FILE doesn't fail (as it properly should) on warnings, and now using SBCL, I can't get compile-system to work...
<Xach>
rpg: there's a special variable you can frob
<Xach>
rpg: compile-file-warnings-behavior
<rpg>
I thought *compile-file-warnings-behaviour* was that variable, but seemingly not...
terpri has joined #lisp
fikka has joined #lisp
<rpg>
at least using a perform around method for compile-op on a particular file.
<rpg>
or the :PERFORM form didn't work...
<rpg>
Actually even SETFing this variable to :ignore in the REPL didn't make this go.
Cymew has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
skapata has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 265 seconds]
<rpg>
I tried muffle-warning, but it looks like compile-file may grab up the warning and fail before I can muffle it....
fikka has quit [Ping timeout: 260 seconds]
<rpg>
Xach: I believe it's that SBCL's COMPILE-FILE is refusing to write an output file, not that there are warnings. At least, I *think* so.
<rpg>
yes, the OUTPUT variable is NIL.
fraya has quit [Quit: Leaving]
<rpg>
Xach: Tried :AROUND-COMPILE, too, but no dice.
asarch has joined #lisp
nowhereman_ has quit [Ping timeout: 276 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<rpg>
Xach: Aha! *SOMETHING* is rebinding those error interpretation flags, so that they are both valued :ERROR inside COMPILE-FILE*
fikka has joined #lisp
pierpal has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
pierpal has quit [Read error: Connection reset by peer]
skeuomorf has quit [Ping timeout: 260 seconds]
<rpg>
hahaha. OK, I see part of the problem -- the AROUND-COMPILE-HOOK isn't scoped around the checking of those flag variables.
<rpg>
no wait -- it looks like things are checked twice.
warweasle has joined #lisp
fikka has joined #lisp
kajo has quit [Ping timeout: 245 seconds]
drastik has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
<rpg>
Yes, that's it -- you can bind the behaviours in an around-compile-hook, but that isn't scoped around check-lisp-compiler-warnings
<Xach>
good lord
rpg_ has joined #lisp
rpg has quit [Ping timeout: 264 seconds]
thawes has quit [Remote host closed the connection]
fikka has joined #lisp
nowhereman_ has joined #lisp
shifty has quit [Ping timeout: 264 seconds]
charh has quit [Ping timeout: 256 seconds]
puchacz has joined #lisp
asarch has quit [Quit: Leaving]
vlatkoB has quit [Remote host closed the connection]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
orivej has quit [Ping timeout: 245 seconds]
pierpal has joined #lisp
kajo has joined #lisp
shka_ has quit [Ping timeout: 240 seconds]
charh has joined #lisp
obicons has quit [Ping timeout: 248 seconds]
pierpa has joined #lisp
j0ni has joined #lisp
Khisanth has quit [Ping timeout: 268 seconds]
housel has joined #lisp
thodg has joined #lisp
<dxtr>
What is the point of putting the keywords as :|foo| in plists?
<Bike>
the || is escape syntax that keeps the symbol name as it is
<dxtr>
So I've got a plist (:|foo| 1 :|bar| 2) - and neither (get :bar) nor (get :|bar|) works
<dxtr>
How should I do it?
<dxtr>
(get 'bar) doesn't work either
<dxtr>
"doesn't work" in this case means "it returns nil"
<dxtr>
Can't find aynthing
<dxtr>
anything*
<jackdaniel>
if you look for an element in a plist, use getf, not get
<jackdaniel>
the latter is quite a different beast
<Xach>
well, it works on a symbol's plist, so they're cousins?
<dxtr>
Ooh
<jackdaniel>
sure, like a kitten and a lion ;-)
puchacz has quit [Quit: Konversation terminated!]
thodg has quit [Read error: Connection reset by peer]
vhost- has quit [Read error: Connection reset by peer]
karlosz has quit [Ping timeout: 248 seconds]
rpg_ has quit [Ping timeout: 248 seconds]
karlosz has joined #lisp
karlosz has quit [Client Quit]
nullniverse has quit [Quit: Undertaking stack overflow prevention]
karlosz has joined #lisp
warweasle has quit [Quit: Can't sleep, the clowns will eat me....Can't sleep. The clowns will eat me....Can't. Sleep. The. Clowns. Will. Eat. Me.....Can't......sleep.......zzzzZZZZZ]
Khisanth has joined #lisp
vhost- has joined #lisp
<aeth>
Has anyone used symbol plists?
andrei-n has quit [Ping timeout: 255 seconds]
<Xach>
aeth: yes
<aeth>
where?
<aeth>
(if in quicklisp then I guess technically everyone has)
charh has quit [Ping timeout: 265 seconds]
<Xach>
aeth: pcl mentions a use of them, iirc it stores some reader/writer information in the symbol plist. or you could use it in an interpreter to store the value bound to the symbol. there are other things!
<Xach>
i don't use them often and can't think of when i used them, but it's a way to associate a bit of your own app data with a symbol
<fouric>
i guess that you could store metadata about the function bound to the symbol?
<pjb>
(length (remove-duplicates (mapcan (lambda (s) (loop for k on (symbol-plist s) by 'cddr collect k)) (let (l) (dolist (p (list-all-packages) (remove-duplicates l)) (do-symbols (s p) (push s l))))))) #| --> 519 |#
<Xach>
so many things you could do!
mindCrime has quit [Ping timeout: 268 seconds]
scymtym has quit [Read error: Connection reset by peer]
smurfrobot has joined #lisp
light2yellow has quit [Quit: light2yellow]
<pjb>
aeth: (remove-duplicates (mapcan (lambda (s) (loop for (k nil) on (symbol-plist s) by #'cddr collect k)) (let (l) (dolist (p (list-all-packages) (remove-duplicates l)) (do-symbols (s p) (push s l)))))) #| --> (com.informatimago.common-lisp.data.constant:unit com.informatimago.common-lisp.data.constant::physical-constant swank/backend::implementation swank/backend::default optima.core:pattern-expand-function) |#
<pjb>
aeth: run the same, in a fully loaded image.
Intensity has quit [Ping timeout: 260 seconds]
rpg has joined #lisp
karlosz has quit [Quit: karlosz]
smurfrobot has quit [Ping timeout: 268 seconds]
karlosz has joined #lisp
skapata has joined #lisp
<mfiano>
aeth: Iterate uses symbol plists for its synonyms
<mfiano>
For example, inspect the symbol ITER:COLLECTING
ebrasca has quit [Read error: Connection reset by peer]
ebrasca has joined #lisp
msmith has joined #lisp
varjag has quit [Ping timeout: 256 seconds]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
PinealGlandOptic has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Bike has quit [Ping timeout: 260 seconds]
mindCrime has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
ft has quit [Ping timeout: 240 seconds]
quazimodo has joined #lisp
LiamH has quit [Quit: Leaving.]
random-nick has quit [Ping timeout: 256 seconds]
ft has joined #lisp
markoong has quit [Ping timeout: 264 seconds]
wigust has quit [Ping timeout: 240 seconds]
markoong has joined #lisp
mindCrime has quit [Ping timeout: 256 seconds]
kmurphy4 has joined #lisp
_paul0 has joined #lisp
kmurphy4 has quit [Client Quit]
Kundry_Wag has joined #lisp
Cymew has joined #lisp
paul0 has quit [Ping timeout: 248 seconds]
Cymew has quit [Ping timeout: 248 seconds]
karlosz has quit [Ping timeout: 240 seconds]
Kevslinger has quit [Quit: Connection closed for inactivity]
ft has quit [Ping timeout: 264 seconds]
ft has joined #lisp
wigust has joined #lisp
robotoad has quit [Quit: robotoad]
ealfonso has quit [Ping timeout: 260 seconds]
fortitude has quit [Quit: Leaving]
eli_oat has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
eli_oat1 has joined #lisp
eli_oat has quit [Read error: Connection reset by peer]
kajo has quit [Ping timeout: 265 seconds]
eli_oat has joined #lisp
Bike has joined #lisp
eli_oat1 has quit [Read error: Connection reset by peer]
dilated_dinosaur has quit [Ping timeout: 260 seconds]
Kundry_Wag has quit [Ping timeout: 264 seconds]
robotoad has joined #lisp
kushal has quit [Remote host closed the connection]
<granttrec>
does lisp have good build tools? I'm interested in learning a functional language but with experience from previous languages I'd appreciate a simple build tools
<pillton>
granttrec: Common lisp is a multi-paradigm language. ASDF (https://common-lisp.net/project/asdf/) is what most people use to build common lisp software.
dddddd has quit [Remote host closed the connection]
wigust has quit [Ping timeout: 240 seconds]
<granttrec>
pillton: what's you experience with it? painless or takes some adjusting?
Kevslinger has joined #lisp
<pillton>
I have been using it for nearly 10 years. It is pretty good.
fikka has joined #lisp
smurfrobot has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<pillton>
You will probably have a hard time adjusting to the fact that compilation can mutate the global environment.
j0ni has quit [Remote host closed the connection]
stnutt has quit [Ping timeout: 276 seconds]
zmt00 has quit [Quit: Leaving]
smurfrobot has quit [Ping timeout: 264 seconds]
stnutt has joined #lisp
fikka has joined #lisp
smurfrobot has joined #lisp
<granttrec>
pillton: aside from clojure, how do I decide which implementation is for me?
fikka has quit [Ping timeout: 256 seconds]
<granttrec>
the benefits of clojure are easier to see than other dialects btw
smurfrobot has quit [Ping timeout: 240 seconds]
PinealGlandOptic has quit [Quit: leaving]
<Xach>
sbcl is a good one to start with.
<akkad>
granttrec: it's like picking a religion. one can convert you, or you can see the light on your own. build something trivial in each, and figure out which one fits your style best