<srandon111>
i heard that common lisp support in netbsd is poor and that it does not support threading
<gigamonkey>
gourdhen: Seems fine but pretty far in the language space from Common Lisp.
<no-defun-allowed>
gourdhen: no
<no-defun-allowed>
I think no
<gourdhen>
it's just I notice you guys spend a lot of time talking about the gc - and not talking about lisps without gcs
<no-defun-allowed>
A Lisp without a GC simply isn't.
<Bike>
it seems difficult to do metaprogramming in a statically typed language.
<no-defun-allowed>
And then the performance of some memory manager that isn't a GC can be way worse, and often even more unreliable (unfair comparison: average reference-counting implementation vs. Metronome on a bad day).
<Bike>
the readme here mentions macros but the manual doesn't really describe them.
<gigamonkey>
But (based on skimming the docs) if you want a static, no gc language for interrop with libs in some environment in a Lisp dialect (so you can have macros) their thing seems fine.
<Bike>
i see.
<gigamonkey>
I have never heard of it before today so I have no idea how good the thing actually is.
<no-defun-allowed>
That's the other thing - I don't want to be caught dead with a static language.
<no-defun-allowed>
gourdhen: In short, the GC is a pain if you have a bad one, but not having one is more of a pain.
xsperry has quit []
bilegeek has quit [Quit: Leaving]
ordoflammae has quit [Quit: WeeChat 3.1]
<moon-child>
I think it's more that a language without a gc either leaks or has fundamentally different semantics than what you would expect from a lisp
<no-defun-allowed>
Yes, "a static language" is part of that.
<no-defun-allowed>
I mean, you can call it Lisp or "a dialect" or even "an exo-lisp" or whatever crap people say, it still looks awful to write any programs with.
CrazyPython has joined #lisp
<no-defun-allowed>
Wonder how well a Haskell "dialect" with dynamic types and mutable objects would be received. Lispers excuse a lot more than that.
<gigamonkey>
no-defun-allowed: isn't that Lisp ;-)
<no-defun-allowed>
gigamonkey: I'd keep the infix notation, and make >>= do what it does in C just to throw them off.
akoana has left #lisp ["Leaving"]
<gigamonkey>
I guess you could keep laziness and partial application.
<gigamonkey>
Or currying, I guess it is in Haskell.
<no-defun-allowed>
Point is, it can be called whatever, if it doesn't have late binding I'm out
<srandon111>
people anybody know about what is the support of sbcl in netbsd ?
<gigamonkey>
srandon111: There's a download for a binary of an old verison. Grab that and the latest source and see if you can build the latest. Might Just Work.
<srandon111>
no-defun-allowed, i heard there is no support for threading
<srandon111>
on netbsd
<no-defun-allowed>
sbcl.org won't load here today, but I swear I saw a release note that said they restored the non-threaded build; potentially suggesting that there is a threaded build. Or not.
<dieggsy>
are global parameters that can be setf'd pretty common ? if not, are there alternatives ?
<Bike>
they're reasonably common.
kiwichap has joined #lisp
<dieggsy>
what i mean is, say i have some client library for a web API that requires a client id and a secret ke - is it reasonable to have (defvar client-id) (defvar secret-key) and have the person using the library setq them?
<dieggsy>
Bike: ah, ok
Oladon has joined #lisp
wowzersbrain has quit [Ping timeout: 252 seconds]
CrazyPython has quit [Ping timeout: 240 seconds]
hjudt has joined #lisp
Bike has quit [Quit: Lost terminal]
CrazyPython has joined #lisp
hjudt has quit [Ping timeout: 252 seconds]
ebrasca has quit [Remote host closed the connection]
mindCrime_ has joined #lisp
CrazyPython has quit [Read error: Connection reset by peer]
lotuseat` is now known as lotuseater
cer-0 has joined #lisp
torbo has quit [Remote host closed the connection]
shifty has joined #lisp
renzhi has quit [Ping timeout: 245 seconds]
Adamclisi has joined #lisp
<gigamonkey>
dieggsy: note, however that you almost certainly want to use the *name* convention for DEFVAR'd and DEFPARAMETER'd variables.
cer-0 has quit [Quit: leaving]
<dieggsy>
gigamonkey: oh, i actually sent them that way, i guess matrix did something weird because markdown syntax lol
<gigamonkey>
ah.
<dieggsy>
oof, that's annoying. i guess ican
<dieggsy>
(defvar *this*)
<dieggsy>
yeah, i can escape it with /plain which uh more like pain amirite
renzhi has joined #lisp
<mister_m>
I have a list of strings I'd like to turn into a property list, is there a function that will give me an uninterned symbol to use as a "key" for a property list?
<mister_m>
sorry, to be more clear: I have a string that I'd like to turn into a symbol that will not be interned in the current package
<gigamonkey>
Though note that you may want to upcase the string.
beach` is now known as beach
<mister_m>
ah that would have bit me I am sure
<dieggsy>
If i'm e.g. going to generate a lambda-list in a defmacro from a list of strings should i use intern or make-symbol ?
phossil has joined #lisp
lotuseater has quit [Ping timeout: 276 seconds]
<gigamonkey>
In general it's best not to create new symbols that are exposed to your users. Though I'm sure there exceptions.
<gigamonkey>
What are you trying to do?
<dieggsy>
gigamonkey: generate code based on a swank spec
<dieggsy>
parameters are listed as strings
<gigamonkey>
Are you parsing some non-sexp representation of the spec?
tophullyte has quit [Ping timeout: 240 seconds]
<dieggsy>
gigamonkey: it's json, parsed with jonathan.the relevant bit looks something like ... :|parameters| '("char_id" "lang") ...
hineios3 has joined #lisp
<gigamonkey>
If you are truly starting from strings then, yes, you'll need to create symbols.
<dieggsy>
gigamonkey: whoops, i meant a swagger spec
<beach>
Good morning everyone!
<gigamonkey>
If the symbols are going to be exposed as part of the API, you should probably INTERN them into the appropriate package.
<dieggsy>
gigamonkey: do i have to intern them though? i'm using intern for the defun name, but if i'm making symbols for a parameter list
hineios has quit [Ping timeout: 252 seconds]
hineios3 is now known as hineios
<gigamonkey>
If they're just parameter names in the macro expansion, you can use MAKE-SYMBOL or GENSYM.
<gigamonkey>
Yeah, if the name is purely internal I'd use MAKE-SYMBOL or GENSYM. Probably MAKE-SYMBOL in this case is it seems slightly more descriptive of what you're doing.
<dieggsy>
Ah. cool. thank you
<gigamonkey>
And you may want to further lispify the names, e.g. (mapcar #'(lambda (s) (make-symbol (substitute #\- #\_ (string-upcase s)))) '("char_id" "lang"))
<gigamonkey>
(though if they're not public doesn't really matter.)
aeth has quit [Ping timeout: 265 seconds]
<gigamonkey>
morning, beach.
koolkat332 has joined #lisp
aeth has joined #lisp
kiwichap has quit [Ping timeout: 268 seconds]
phossil has quit [Quit: Leaving]
phossil has joined #lisp
phossil has quit [Remote host closed the connection]
tophullyte has joined #lisp
semz has quit [Ping timeout: 276 seconds]
kmeow has quit [Remote host closed the connection]
<beach>
Hey gigamonkey. Good to see you back.
karlosz has quit [Remote host closed the connection]
<beach>
phoe: So I take it, to you, Common Lisp eVALUation does not produce a value.
<beach>
phoe: And VALUES does not actually produce values.
semz has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
mindCrime_ has quit [Ping timeout: 252 seconds]
<beach>
phoe: So instead of accepting the term I introduced a long time ago for a concept that otherwise does not have a widely agreed-upon name (i.e., uniform reference semantics), you introduce four new terms.
Bike has joined #lisp
anticrisis has quit [Quit: Leaving]
karlosz has joined #lisp
anticrisis has joined #lisp
CL-ASHOK has joined #lisp
<CL-ASHOK>
@gigamonkey - many thanks for clarifying on the origins of the phrase
CL-ASHOK has quit [Client Quit]
orivej has quit [Ping timeout: 240 seconds]
hjudt has joined #lisp
hjudt has quit [Read error: Connection reset by peer]
jeosol has quit [Quit: Connection closed]
<beach>
phoe: Oh, and SYMBOL-VALUE does not produce a value either, I guess.
koolkat332 has quit [Read error: Connection reset by peer]
mindCrime_ has joined #lisp
karlosz has quit [Remote host closed the connection]
Bike has quit [Quit: Connection closed]
andrei-n has joined #lisp
jeosol has joined #lisp
igemnace has joined #lisp
pbaille has joined #lisp
pankajsg has joined #lisp
hjudt has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
hjudt has quit [Ping timeout: 240 seconds]
DHARMAKAYA has quit [Ping timeout: 260 seconds]
mindCrime_ has quit [Ping timeout: 240 seconds]
hjudt has joined #lisp
perdent has joined #lisp
<perdent>
How can I acquire a 10 traces and plot them with a lisp plotting library, and examine them from this remote server in lisp? nc 138.68.182.108 31262
<perdent>
how would the code look?
<perdent>
Traces are from an osiliscope
<perdent>
So I captured the embedded device that was used to encrypt the ciphers I am trying to break. How would I be able to recover its Encryption Key? here is the socket_interface: https://pastebin.com/4z0bwjAT and here is the remote lab layout: https://ibb.co/q9j59Mq
<no-defun-allowed>
Very carefully.
pbaille has quit [Ping timeout: 268 seconds]
narimiran has joined #lisp
<no-defun-allowed>
You would presumably do differential power analysis on the device, which involves sending some plaintext to the device, observing the power draw, and determining something about the (otherwise hidden) intermediate values in encryption.
<no-defun-allowed>
One source suggested there is correlation between the power draw and Hammond weight (LOGCOUNT) of some value used in a computation.
<beach>
phoe: Well, you start by saying that Common Lisp is not call-by-value ("neither").
<beach>
Hello saganman.
<phoe>
beach: when people ask in terms of C++ semantics, then Common Lisp is neither C++-call-by-value nor C++-call-by-reference
<beach>
I don't care much. You seem to.
<phoe>
yes, I do
<phoe>
I think it's worth to explain Lisp to people who know C++
<phoe>
and who are therefore conditioned to think in C++ terms
<beach>
My page explains what Common Lisp does, using well established terms, and making references to other languages. That I think, is the best way of presenting the ideas.
<no-defun-allowed>
They'll be conditioned to C++ full stop.
<beach>
I also think that people, be it C++ programmers or others, who ask about Common Lisp semantics, do so because they are willing to learn established terminology. And we should not disappoint them.
<phoe>
I try to describe what CL does by comparing and differentiating it with what C++ does, and I consider that to be the best strategy
<beach>
Since I whipped up that page rather hastily, the details may not be great, but I think the basic idea is there.
<phoe>
yes, I see the basic idea in there
<no-defun-allowed>
phoe: I haven't read your writeup though - do you have a link?
<phoe>
beach: and established terminology is that looking up "call by value" in Google produces a page whose 70% results are things that you don't care about
aeth has joined #lisp
<phoe>
and I'm adapting to that fact rather than calling this to be Google's problem
<beach>
That only shows that what Google produces is mostly wrong.
Nilby has joined #lisp
<phoe>
yes, and I'm translating from what Google says to what Lisp does, whereas you explain what Lisp does without using any of this
<jdz>
The lost art of looking up information without web search.
<beach>
There might even be a significant correlation between people who write things that Google picks up, and people who are not willing to study the literature of computing.
<no-defun-allowed>
Just saying (as I was jogging my brain for Lisp implementations which interpret, to measure the performance of my own), you have a whole lot more to get C++ programmers to unlearn than the lack of uniform reference semantics.
<phoe>
I don't think it's a good approach to say that if a C++ programmer wants to learn Lisp, they should first study the literature of computing instead of using Google to learn by differentiation
<phoe>
no-defun-allowed: obviously
<jdz>
Pretty sure this has been a common suggestion here that "learning by differentiation" is a mistake and should be abandoned from the very beginning.
<phoe>
there was this idea of a book, Lisp for C++ programmers, that basically tries to teach by pointing out all the differences
<phoe>
jdz: hmmmm, are there some written notes and/or articles about that?
pankajsg has quit [Ping timeout: 252 seconds]
<no-defun-allowed>
I have been wondering if differentiation makes it easier or harder for the reader to think they can get away with re-using C++ concepts unless otherwise stated.
<engblom>
When I see something like (declare (ignore obj)), is it a line that could actually be removed and the program would do the same thing?
<phoe>
engblom: yes, it tells the compiler to not warn you about unused variables
<engblom>
phoe: Thanks, then I got that one right!
<phoe>
(lambda () 42) and (lambda (&optional x) 42) both do the same thing when called with zero arguments, but one of them can cause the compiler to warn you that you might have forgotten to use a variable that you established
shka_ has joined #lisp
<phoe>
no-defun-allowed: people are going to reuse language concepts all the time via reflexes, that's the whole problem of learning X as a second language - no matter if it's a language for programming or a talking
<phoe>
and I can attest to that as neither English nor Lisp are my "native" programming languages
<phoe>
so I guess that the best thing to do here is point all of the differences out and make sure that the C++ programmer reading the book remembers that this, this, and this is explicitly done differently in Lisp
sy_ has quit [Quit: sy_]
<jdz>
phoe: In my experience that's only when learning the second language. After that this reflex diminishes with each additional language one learns.
<phoe>
jdz: yes, the first time learning a non-first language is the hardest
<jdz>
It just might be worthwhile to help people become aware of this phenomenon (and fight it) than to play along and hope for the best.
<jdz>
I'm afraid that in this case a C++ person will play around for a while and then declare something like "Lisp is really weird, everything's wrong and in the wrong places. I'm going back to C++!"
<no-defun-allowed>
My fear is one will write C++ in Lisp.
<phoe>
jdz: how does one fight it? achieving a real beginner's mind is a pretty daunting task on its own and I don't think it can be expected of everyone who wants to learn Lisp
<jdz>
Yes, in this case the person might stick with Lisp, but it might take quite a while for them to start "thinking in Lisp". And quite a bit of damage might be done along the way.
duuqnd has joined #lisp
notzmv has joined #lisp
<jdz>
phoe: Learning a new thing is not easy, yes. But trying to teach somebody Arabic by telling "it's just like English, you just write from right to left."
<saturn2>
maybe C++ programmers need a whole book on unlearning C++ before they even start on anything else
<jdz>
Is the wrong approach.
<Nilby>
On the other hand when I did C++, I tried to make it do keyword arguments, fake lambdas, and GC.
<duuqnd>
A company I've worked with used code generation of c++ which felt a lot like poor man's macros to me
pbaille has joined #lisp
<Nilby>
My rage at the C++ committee was nearly at the level of my admiration for the CL committee.
<no-defun-allowed>
Reminds me of a tutorial book that was posted to #lisp which (at least) beach and I reviewed. The first declaration was declaring some variable to be a FIXNUM.
tophullyte has quit [Remote host closed the connection]
<moon-child>
phoe: to make an analogy to natural language, it's generally considered a bad idea to learn by translating--by modeling forms in the new language in terms of the forms of one's native language. One should rather attempt to think natively in the new language, without bias
<ecraven>
I sometimes envy c++ for things like https://github.com/nholthaus/units. not sure how to do that sort of compile-time checking in any Lisp (which might be entirely my fault ;)
<no-defun-allowed>
If one thinks that they can write C++ in Lisp, then draws out a book...
tophullyte has joined #lisp
<moon-child>
I think programming languages are different from natural languages in many respects, but that there is an extent to which the same principle applies
<moon-child>
ecraven: coalton
Oladon has quit [Quit: Leaving.]
<Nilby>
Duuqnd: In the old days when I was doing it, you were nearly forced to do some pre-processing. e.g. QT used to have to pre-process to do callbacks right.
<moon-child>
Nilby: qt still does that
<ecraven>
moon-child: thanks, I'll have a look at that ;)
<duuqnd>
I can't show any code examples of what this company did since I'm under NDA but it was big files of code completely auto-generated based on XML files.
<phoe>
moon-child: jdz: hmmmmm
<phoe>
what's the approach of all those books "X for Y programmers" then
<ecraven>
jdz: thanks for that link!
<no-defun-allowed>
"It's easy to write Lisp, just write (f x y) instead of f(x, y)"
<jdz>
phoe: There is value in such books, but they should tell outright that they're just a crutch (or training wheels), until one learns to think in the new language properly.
<phoe>
training wheels, I can dig that idea
kslt1 has joined #lisp
DHARMAKAYA has quit [Quit: Turning off a portion of this simulation.]
karlosz has quit [Ping timeout: 240 seconds]
theothornhill has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
jeosol has quit [Quit: Connection closed]
notzmv has quit [Ping timeout: 252 seconds]
zzappie has joined #lisp
zap1 has joined #lisp
zzappie has quit [Ping timeout: 240 seconds]
<engblom>
How do I get tab complete to work while writting lisp code in emacs?
<beach>
C-c C-i
<beach>
But it only sort-of works, since Emacs has no idea about the role of different identifiers in different contexts. So you will likely get suggested completions that are completely wrong.
<phoe>
engblom: I have company-mode installed which shows all possible completions, along with slime-company
<engblom>
Thanks!
<Nilby>
If C-c C-i doesn't work, you can usually try M-/ too
zap1 is now known as zzappie
nij has joined #lisp
tophullyte has quit [Quit: Leaving]
aartaka has joined #lisp
aartaka has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
_jrjsmrtn has quit [Ping timeout: 246 seconds]
__jrjsmrtn__ has joined #lisp
surabax has joined #lisp
karlosz has joined #lisp
shifty has quit [Ping timeout: 252 seconds]
shifty has joined #lisp
_paul0 has joined #lisp
jonatack has quit [Quit: jonatack]
paul0 has quit [Ping timeout: 260 seconds]
imode has quit [Ping timeout: 240 seconds]
<engblom>
I have been trying to find any documentation for slime-repl with all the shortcuts. In particular I am trying to find how to run something again that I run earlier. I know I can scroll past all output until the cursor is on the form I want to run and then press enter, but that is too much work. How to I get the history without having to scroll?
<beach>
M-p
<beach>
Or, if it is far back M-r and then complete.
<engblom>
Would it be easy to remap that to something else? M-p will open dmenu (as I am using xmonad as window mangaer)
<engblom>
Preferable I would want up and down arrow in slime-repl for history and page-up and page-down for scrolling.
<beach>
M-p is used in many many Emacs situations, so it would probably be better to remap what xmodad uses.
hendursa1 has quit [Ping timeout: 240 seconds]
<beach>
engblom: It is generally faster to use keys that are easily accessible without lifting your fingers from the home row on the keyboard.
<beach>
Arrows and page-up/down are not easily accessible.
<beach>
C-v and M-v (or rather C-[ C-v) are much faster to use than the page keys.
<beach>
... and M-p M-n are faster than the arrow keys.
<moon-child>
beach: depends on the keyboard :P
ljavorsk has joined #lisp
<beach>
Maybe when I officially retire in a bit more than 9 months, I should also retire from #lisp.
hendursa1 has joined #lisp
pve has joined #lisp
<engblom>
Anyway, xmonad is heavily using alt-key already and as I need xmonad functions more often than emacs functions, I want to keep alt as reserved for xmonad. This means I need to change emacs to work with xmonad.
<beach>
engblom: Or use VIM. Then you won't have any of these problems.
<beach>
engblom: Good luck either way.
<engblom>
beach: I came from vim. But I got told that I better use emacs those times I write lisp.
<engblom>
Anyway, maybe I should map windows key to meta in emacs, somehow.
<beach>
engblom: It was a sarcastic remark, related to the fact that a lot of things I suggest lately are criticized.
gitgood has quit [Quit: Probably away to do something really awesome]
<no-defun-allowed>
I use Super/Windows for window manager stuff (using i3wm).
<no-defun-allowed>
Generally that is the window manager key (Windows even provides some shortcuts using it as a modifier) and no application will provide shortcuts using it.
<engblom>
no-defun-allowed: It is too uncomfortable to use window key as often as I have to use for window manager (as the thumb has to go under the hand). I still think I could use it for emacs as I more seldom need M- there.
<Nilby>
One trick is to use Control-Meta-<> for window manager things and if you need it in emacs do Escape Control-<>
<no-defun-allowed>
Right, I don't usually use window manager commands frequently.
Lycurgus has joined #lisp
CrashTestDummy has joined #lisp
CrashTestDummy2 has quit [Ping timeout: 240 seconds]
<no-defun-allowed>
All but the last duplicates are removed.
<xificurC>
am I misreading something?
<no-defun-allowed>
Unless you do (remove-duplicates '(1 2 1 3) :from-end t) in which case you get (1 2 3)
<moon-child>
xificurC: the elements 2, 1, and 3 all appear in that order in the original sequence
vaporatorius__ has quit [Ping timeout: 246 seconds]
<xificurC>
I see 1 before 2
<beach>
I see 1 after too as well.
<beach>
after 2.
<beach>
Sorry.
anticrisis has quit [Read error: Connection reset by peer]
<beach>
xificurC: "if any two match, then the one occurring earlier in sequence is discarded."
<xificurC>
so if I want to retain the order I can use :from-end, correct?
<beach>
It retains the order in both cases.
ramHero has joined #lisp
<beach>
The question is which of two elements is discarded.
<beach>
xificurC: Here the first and the third elements match, so the first is discarded. If you want the second one to be discarded, then yes, use :FROM-END T. Maybe your example is confusing because you have a partial numeric order, which has nothing to do with what this function does.
<beach>
xificurC: So (remove-duplicates '(3 2 1 1)) does not return (1 2 3) but (3 2 1).
hiroaki has joined #lisp
logenkain[m] has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
kevingal has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
<jdz>
It might also help to use different items, and tweak :test and/or :key parameters. Like (remove-duplicates '("one" "two" "ONE" "three") :test #'string-equal).
<beach>
Good idea.
<beach>
A VERY good idea, in fact.
<jdz>
Thanks!
monolithic has joined #lisp
CrashTestDummy2 has joined #lisp
amb007 has joined #lisp
<pjb>
engblom: use C-h m in the buffer to see the key binding provided by the current modes.
amb007 has quit [Read error: Connection reset by peer]
<engblom>
pjb: Thanks!
<jdz>
Or C-h b.
<engblom>
I also got a good solution for my meta-key problem: I wanted to still use the physical alt-key for window manager, so I swapped with xmodmap alt and windows, and then configured xmonad to use windows. Now the physical windows key is alt in emacs.
CrashTestDummy has quit [Ping timeout: 252 seconds]
<jdz>
engblom: Not also that you can use ESC instead of Meta in Emacs.
<jdz>
M-p would be ESC p.
OlCe has quit [Remote host closed the connection]
<beach>
And C-[ instead of ESC so as to avoid quitting the home row.
<jdz>
Right.
amb007 has joined #lisp
<engblom>
jdz: No, ESC will not work because I run evil (because I am coming from vim).
amb007 has quit [Read error: Connection reset by peer]
<beach>
*sigh*
<jdz>
Doctor, please help! It hurts when I do this!
amb007 has joined #lisp
<beach>
Indeed.
<engblom>
beach: As I am not using American keyboard, I can not get [ without using Alt Gr (=right alt).
<jdz>
engblom: You can still customize key bindings if the default ones do not work for you.
<engblom>
Anyway, now things are working for me. Thank you for putting up with the frustrating of helping me with these maybe odd things.
amb007 has quit [Ping timeout: 240 seconds]
amb007 has joined #lisp
Lycurgus has quit [Quit: Exeunt]
zzappie has quit [Ping timeout: 240 seconds]
OlCe has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
notzmv has joined #lisp
notzmv is now known as Guest72431
madrik has joined #lisp
<madrik>
Is the '.cl' extension widely used? I've only seen it associated with Allegro CL.
<no-defun-allowed>
I can't recall the last time I saw a .cl file.
<White_Flame>
it's been many years since we had an ACL license, and I don't remember .cl at all :)
<White_Flame>
I could see it being a DOS-era extension more appropriate than .lis though
<jdz>
Or .lsp.
<moon-child>
.lp, maybe. (l)ist (p)rocessing. But I agree .cl is optimal if you're strictly 8.3
<madrik>
The audio editor Audacity has a bunch of files with the '.lsp' extension.
igemnace has quit [Quit: WeeChat 3.1]
<madrik>
I think ASDF's defsystem allows for using '.cl' files, but with a special option.
theothornhill has quit [Ping timeout: 252 seconds]
igemnace has joined #lisp
frost-lab has joined #lisp
sz0 has quit [Quit: Connection closed for inactivity]
<pyc>
Is there a way to create a local variable in the current scope? I know LET but LET requires me to open a new scope and if I need LET within LET, then the code becomes deeply nested. Is there a way to do something like (setq-local foo "value") such that it is defined in the current DEFUN but not defined in the global scope?
<no-defun-allowed>
You could write (let (x) ...) to leave X "uninitialized" and then set it later.
<no-defun-allowed>
By "uninitialized" I mean it will be bound to NIL, but the expectation of the reader is that it won't be used until it is set.
long4mud has quit [Read error: No route to host]
<pyc>
no-defun-allowed: Is (let (x) ...) correct syntax? Or should it be (let ((x)) ...) ?
<no-defun-allowed>
That is correct, yes.
long4mud has joined #lisp
<pyc>
I am confused now. are (let (x) ...) and (let ((x)) ...) equivalent?
<no-defun-allowed>
I don't think (let ((x)) ...) is correct syntax.
ramHero has quit [Remote host closed the connection]
monolithic has quit [Remote host closed the connection]
monolithic has joined #lisp
sy_ has joined #lisp
sy_ has quit [Client Quit]
chipolux has quit [Quit: chipolux]
<Shinmera>
no-defun-allowed: they're both correct.
<no-defun-allowed>
Huh, so it is.
fourier has quit [Ping timeout: 246 seconds]
random-nick has joined #lisp
jeosol has joined #lisp
notzmv has quit [Read error: Connection reset by peer]
notzmv has joined #lisp
dtman34 has quit [Ping timeout: 265 seconds]
dtman34_ has joined #lisp
<White_Flame>
pyc: &aux in the lambda list will create variables for the DEFUN scope without LET
attila_lendvai has quit [Ping timeout: 240 seconds]
edgar-rft has joined #lisp
<White_Flame>
but any lexical variable is generally modelled equivalently, all can be rewritten as ((lambda (local1 local2...) ...) init1 init2...) in the current scope
slyrus has joined #lisp
<phoe>
there's a nasty edge case if variables are named after lambda list keywords but most of the time you don't need to care about it
<White_Flame>
yep
<White_Flame>
hence the ampersand :)
ljavorsk has quit [Ping timeout: 268 seconds]
shifty has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
slyrus has quit [Ping timeout: 265 seconds]
CrazyPython has joined #lisp
CrazyPython has quit [Client Quit]
rodriga has joined #lisp
<nij>
How are lambdas compiled into machine codes?
<White_Flame>
depends on the compiler
<White_Flame>
but, same as any function, really
<White_Flame>
just does more runtime parameter checking to support &optional, &key, etc if present
daphnis has joined #lisp
lonjil has quit [Quit: No Ping reply in 180 seconds.]
<White_Flame>
if you mean the example above, one would hope the compiler would inline literal lambda usage like that
lonjil has joined #lisp
<nij>
I mean something as easy as (lambda (x) x)
<White_Flame>
check that there's 1 parameter, else error. put parameter into return value. return
<nij>
Does it got compiled first to fasl, and then to assembly?
<White_Flame>
fasl is only when you compile a file
klltkr has joined #lisp
<White_Flame>
and the fasl isn't a compiled snapshot, like a saved image is. It's fast-loading instructions to do the same that the toplevel stuff does
<nij>
hmm
<nij>
Does it even get compiled into assembly at some point?
<phoe>
if you use SBCL, then yes
<White_Flame>
in most implmeentations, yes
<White_Flame>
(disassemble (lambda (x) x))
<nij>
lisp => assembly => fasl?
<White_Flame>
of course, for something that small you'll probably be looking mostly at the function epilogue, especially if the 1st parameter & return registers are the same
<White_Flame>
(I'm no expert on fasl stuff, though)
<nij>
Do both ways give the same assembly?
<White_Flame>
probably
<nij>
I've heard in elisp there are at least two ways, and the end results are different.
<nij>
Horrible..
<White_Flame>
there might be some environmental differences that cause codegen change, like having everything available in a single compilation unit or not
<nij>
amazing..
<White_Flame>
and if you had macros in your fasl files, they'd still evaluate at load, and if they read global vars or config or anything, they'd generate different machine code based on what was there at time of .fasl load
<White_Flame>
(I might be wrong on that, though)
CrazyPython has joined #lisp
hjudt has quit [Ping timeout: 246 seconds]
<White_Flame>
yeah, that is wrong. macroexpansion is fully done with compile-file as well
<nij>
Hmm.. so how to compile is not in spec, and dependent to each implementations.. I guess I have to study the source of sbcl then.
<White_Flame>
what are you trying to find?
<nij>
Understand how lisp codes are turned into machine codes.
<White_Flame>
disassemble is the easiest way
<White_Flame>
and there's likely some internals docs in sbcl, explaining the internal ABI
<White_Flame>
if you literally mean the "how" of compilation, that's stock compiler stuff
<Nilby>
Just read to code to a lisp compiler. You don't have to fully understand it to get an idea how it works.
<nij>
You mean code a lisp compiler by myself, Nilby?
<Nilby>
_read_
<nij>
? what should I read
<Nilby>
sbcl, ccl
nature has joined #lisp
<White_Flame>
I meant to run DISASSEMBLE and look at the output, not read DISASSEMBLE's source code ;)
shifty has quit [Ping timeout: 265 seconds]
<White_Flame>
there's also sb-disasm:disassemble-code-component which can display more componentry, like function prologues, that disassemble on its own might elide
shifty has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
slyrus has joined #lisp
<White_Flame>
*sb-disassem:
<nij>
Oh, interesting i can see that NIL is stored at #x50100117 !
<Nilby>
For example you can see sbcl defines compilation in terms of VOPs or virtual operations, which are like a macro template for generating platform specific code. Operations in lisp are defined to be a set of these virtual operations which have various properties, pre/post conditions, etc. Then these are evntualy refined down to platform instructions in lisp objects, which can be turned into bits and stored in memory and executed or
<Nilby>
written to fasls.
<nij>
How do I see where other objects are stored?!
amb007 has joined #lisp
<White_Flame>
only a few are fixed like that
<White_Flame>
IP-relative locations pointing to stuff are likely movable by GC
slyrus has quit [Ping timeout: 240 seconds]
<Nilby>
ccl does it a little different, but not to far off.
<White_Flame>
yep, this is all deep in implementation specifics
<Nilby>
ecl compiles to C, and sends it to the c compiler
<jdz>
clisp compiles to bytecode, which is a bit like middle ground.
<Nilby>
I apologize to compiler experts for my shabby descriptions.
thecoffemaker has quit [Ping timeout: 260 seconds]
shifty has quit [Ping timeout: 252 seconds]
shifty has joined #lisp
thecoffemaker has joined #lisp
Bike has joined #lisp
<jackdaniel>
ecl has two compilation targets: bytecodes and targetting C source code
Jeff15 has joined #lisp
Jeff15 has quit [Client Quit]
CrazyPython has quit []
shifty has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
hjudt has joined #lisp
daphnis has quit [Ping timeout: 246 seconds]
daphnis has joined #lisp
gourdhen has joined #lisp
hjudt has quit [Ping timeout: 252 seconds]
hjudt has joined #lisp
ukari has quit [Remote host closed the connection]
ukari has joined #lisp
shifty has quit [Ping timeout: 260 seconds]
shifty has joined #lisp
daphnis has quit [Ping timeout: 260 seconds]
long4mud has quit [Quit: WeeChat 3.0.1]
ceblan has quit [Remote host closed the connection]
ceblan has joined #lisp
Inline has joined #lisp
igemnace has quit [Quit: WeeChat 3.1]
shifty has quit [Ping timeout: 252 seconds]
elderthunk has quit [Quit: Connection closed for inactivity]
contrapunctus has left #lisp ["Disconnected: closed"]
shifty has joined #lisp
<beach>
Suppose we had a parsed and exploitable version of the dpANS. I mean, we don't but such a thing could be had if enough effort were put into it. If we did have such a thing, how should it be managed?
<beach>
I feel it would not be advantageous to have a multitude of clones and individual modifications to it. What would we use it for?
<beach>
I can see at least a better Common Lisp UltraSpec, i.e., a free version of the Common Lisp HyperSpec with better markup.
<beach>
I can also see a version of it in the form of an object graph as I have suggested many times for documentation representation.
<beach>
And I would like to use such a thing for WSCL, i.e., create a more specified specification that would then also keep (as footnotes maybe) the original wording of the standard, and explain the differences. Any suggestions?
contrapunctus has joined #lisp
<jackdaniel>
re managing: there should be a trusted authority to moderate it (i.e to remove spam or to resolve conflicts)
shifty has quit [Ping timeout: 260 seconds]
<Nilby>
I just want to be able to access pieces of it in development tools, and be able to control how it's presented. But I support all those other uses.
shifty has joined #lisp
<pyc>
do you ever use the format control "~d"? I see "~a" suffice for most situation. Is it a good practice to use "~a" all the time and use other format controls only when we need to?
<jackdaniel>
re different versions of the same part of the document - either there are different versions linked in the same page (I'm not sure what to do with footnotes - they may not apply to the implementation-specific version)
<jackdaniel>
or there is one "base version", and implementation-specific things go after that under different sections
<jackdaniel>
(or as footnotes of course)
<nij>
I just fancy a better presentation will drag more people into #lisp. But I support all those other uses.
<Nilby>
pyc: Since ~d will fallback to ~a, I think using ~d can help know the intent.
narimiran has quit [Remote host closed the connection]
<beach>
I am paying attention to all suggestions, and I may ask questions about them, but I am not going to argue a particular idea myself at this point.
narimiran has joined #lisp
hjudt has quit [Ping timeout: 240 seconds]
<xificurC>
beach thanks for the clarification, I'm responding a bit late as I was away
<beach>
nij: More people will use Lisp when it starts being taught in more undergraduate programs in computer science. I am now of the opinion that any such undergraduate program should teach Common Lisp, or something similar, in order to be considered as such. I don't know of a single person who thought about using Common Lisp and then decided against it because of the markup of the Common Lisp HyperSpec.
<beach>
orivej has quit [Ping timeout: 240 seconds]
<beach>
xificurC: Sure. Did you try the suggestion with strings to see what it does? I think that was a clever idea.
<nij>
If I become a professor, I will volunteer teaching in CL. But before that I must have polish my skills xD
<nij>
That's fair point.
wsinatra has joined #lisp
<beach>
xificurC: With that example, the duplicate elements are distinguishable, but they are still considered duplicates because of the comparison function.
<xificurC>
beach no but I understand what's going on now. I still find the wording I quoted utterly misleading though
<xificurC>
beach yeah it was a good suggestion
<phoe>
nij: brzmi dobrze, jeśli będziesz potrzebował pomocy to pisz śmiało
<beach>
OK.
<nij>
phoe ok
<phoe>
oops sorry, I polished a bit too much
<nij>
lokllll
CrazyPython has joined #lisp
aeth has quit [Ping timeout: 268 seconds]
hjudt has joined #lisp
afterK has joined #lisp
cage_ has joined #lisp
ukari has quit [Remote host closed the connection]
ukari has joined #lisp
<jdz>
phoe: polish notation is off-topic on #lisp
<beach>
:)
<Nilby>
but at least we can have finnish-output
ljavorsk has joined #lisp
<beach>
And Czech-type.
azrazalea has quit [Ping timeout: 248 seconds]
shifty has quit [Ping timeout: 260 seconds]
hjudt has quit [Ping timeout: 240 seconds]
azrazalea has joined #lisp
<beach>
Would there be reasons to grant access selectively to a parsed dpANS? It would be "easy" to accomplish, since the result of the analysis would be automatically subject to copyright according to the Berne convention. If so, what kind of access would be granted/refused?
<beach>
It may require legal actions to enforce, of course, and funds for such actions may not be available.
ukari has quit [Remote host closed the connection]
<jdz>
We amateurs did not look silly enough for _death.
jeosol has quit [Quit: Connection closed]
hjudt has joined #lisp
<dieggsy>
_death: this is wonderful
<Bike>
read-char-no-ghana...
<dieggsy>
...i have to wonder about the similarity of "chad" to *LOAD-PATHNAME*
<dieggsy>
that can't possibly be a levenshtein distance less than 2
slyrus has joined #lisp
dickbarends has joined #lisp
<Bike>
it's obviously breaking up the hyphenations
<Bike>
and chad is distance 2 from load
afterK has quit [Quit: WeeChat 3.1]
<phoe>
oh gods what have I started
slyrus has quit [Remote host closed the connection]
slyrus has joined #lisp
<_death>
I should've just substituted the state for the similar word in the name, but oh well ;)
ebrasca has joined #lisp
<jackdaniel>
to bring bad puns to another level I'll just say that you sound as if you had a lisp
slyrus has quit [Ping timeout: 268 seconds]
xificurC has quit [Quit: Connection closed]
aeth has joined #lisp
hjudt has quit [Ping timeout: 240 seconds]
xkapastel has joined #lisp
shka_ has quit [Ping timeout: 240 seconds]
ljavorsk has quit [Ping timeout: 252 seconds]
<dieggsy>
Bike: oh, i'm an idiot thanks
Sheilong has joined #lisp
<_death>
edited the paste
<ebrasca>
Do you have some recomendation for decoding/encoding binary formats?
<dieggsy>
_death: what is adeht/un/states ?
<_death>
dieggsy: adeht is code that runs on my server (adeht.org).. some years ago I wrote something to scrape some UN press releases and make some funny image based on them
<dieggsy>
_death: ah - any pointers on that setup? I currently have a chicken scheme server but i've been thinking about moving to hunchentoot and/or putting it behind nginx as well
<dieggsy>
dunno much about nginx, i think i sort set it up *once*
<pjb>
jdz: not at all, lisp is almost pure polish notation. We just add parentheses for two reasons: 1- allow for variable arity operators, 2- allow to process code without knowing a-priori the arity of the operators.
<pjb>
But if you restrict yourself to fixed arity operators, you can remove the parentheses: + 2 * 3 4 vs. (+ 2 (* 3 4))
<dieggsy>
pjb: i think it was a joke about the polish language
<pjb>
All lispers should learn Polish, and polishing.
necrontab has quit [Quit: Connection closed for inactivity]
<dieggsy>
pjb: i've sort of talked this to death but i used emacs calc a decent amount in college
<ebrasca>
pjb: I live in Poland but I don't know how to write Polish...
<dieggsy>
i've also polished like, five pieces of fine silverware in my life lol
g0d_shatter has joined #lisp
<jcowan>
I once worked on an ISLISP implementation on top of CL, since kmp would not release his; the working name was Blésité, anglicized as Blesity. Gave up eventually.
hjudt has quit [Ping timeout: 240 seconds]
yonkunas has quit [Quit: Connection closed for inactivity]
<beach>
Nice name.
<jcowan>
Question for all: does anyone have a sense of how much adjustable strings are used? My sense is that there is a cross-language tendency to treat strings as immutable, and even when mutable, as unadjustable.
<jcowan>
s/are used/& in CL/
<Bike>
they don't seem common to me. with-output-to-string is more usual
<jcowan>
Thanks.
<_death>
could make sense in a READ-LINE-INTO operator
shka_ has joined #lisp
hjudt has joined #lisp
trokotech has quit [Remote host closed the connection]
trokotech has joined #lisp
<Nilby>
I use adjustable strings/arrays quite a bit, but maybe I shouldn't.
aartaka has quit [Ping timeout: 252 seconds]
<beach>
jcowan: What are you planning to do with this information?
<dieggsy>
aeth: is there some sort of status/progress page for airship scheme ?
<aeth>
jcowan: That file might be the only time I've done that, though, because it is very niche
hjudt has quit [Ping timeout: 252 seconds]
<jcowan>
Thanks. I had forgotten that adjustable arrays work only when the max size is known in advance.
<engblom>
If I have something like ((:a 1)(:a 3)(:a 2)), how do I find the higest value of property :a from a plists? Is there something simpler than sorting the list and taking the first element (which I know how to do)?
<beach>
engblom: Loop and keep the max. And that is not a plist.
elderK has quit [Quit: Connection closed for inactivity]
<aeth>
dieggsy: The features are well specified, but the timeline isn't
aartaka has joined #lisp
<beach>
engblom: If you like, but then there is only one element in each, so no need to compute the max. The entire thing looks like an association list to me.
<beach>
engblom: Sorting is O(n log n) but looping and keeping the max is O(n).
<jdz>
engblom: There's (loop for cell in '((:a 1)(:a 3)(:a 2)) maximize (second cell)), but that will get you the value, not the property list with the highest value.
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
andreyorst[m] has joined #lisp
orivej has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
DHARMAKAYA has joined #lisp
g0d_shatter has quit [Quit: Leaving]
pbaille_ has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
pbaille has quit [Ping timeout: 252 seconds]
andreyorst[m] has quit [Read error: Connection reset by peer]
andreyorst[m] has joined #lisp
aartaka has quit [Ping timeout: 260 seconds]
andreyorst[m] has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
andreyorst[m] has joined #lisp
shifty has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
andreyor1 has joined #lisp
andreyorst[m] has quit [Read error: Connection reset by peer]
amb007 has quit [Read error: Connection reset by peer]
hjudt has quit [Ping timeout: 240 seconds]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
andreyor1 has quit [Client Quit]
shifty has quit [Ping timeout: 240 seconds]
shifty has joined #lisp
Inline has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
sbcltester has joined #lisp
<sbcltester>
hello, does sbcl work well on windows?
<luis>
It's OK.
hjudt has joined #lisp
<sbcltester>
does that mean it has regressions that affect only windows?
<luis>
It has windows-specific bugs, yes.
<duuqnd>
It's not that bad though
DHARMAKAYA has quit [Quit: Turning off a portion of this simulation.]
<sbcltester>
are you using it?
<luis>
Yes.
<sbcltester>
i am evaluating whether to use just clojure or sbcl
<duuqnd>
When I have to use Windows I use SBCL and it works just fine
<duuqnd>
so yeah, there are Windows specific bugs but it's not a deal breaker
<ChoHag>
Does anyone else call it 'sbaccle'?
<sbcltester>
is brodeaux thread supported?
<luis>
sbcltester: yes.
<sbcltester>
ok thanks all
karlosz has quit [Quit: karlosz]
<ChoHag>
(It's my go-to for CL, btw, and I'm happy with it but not on windows)
shka_ has quit [Ping timeout: 246 seconds]
karlosz has joined #lisp
<duuqnd>
All problems I've had are with Windows, not SBCL
<sbcltester>
as long as i can put a few workarounds that doesn't need patching the runtime :)
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
<luis>
Duuqnd: so, the nastiest bug so far is that if you call C++ code that uses exceptions internally, they'll trip on SBCL's exception handler
vms14 has quit [Ping timeout: 260 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
Vaporatorius has quit [Ping timeout: 252 seconds]
chipolux has joined #lisp
attila_lendvai_ has joined #lisp
attila_lendvai has quit [Ping timeout: 252 seconds]
<luis>
you can't interrupt threads in FFI-land, that can be annoying too
irc_user has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
drl has joined #lisp
sbcltester has quit [Quit: Connection closed]
sbcltester has joined #lisp
<gigamonkey>
is there anything about SBCL on Windows that is painful within language standard? (i.e. excluding FFI and threads and whatnot)
<gigamonkey>
(I'm imagining that if I do a 2nd edition PCL I'd recommend SBCL since it now runs on Unix, MacOS, and Windows but I've never actually tried it on Windows.)
<sbcltester>
to be honest it might be better to tell people to use wsl2 in a book
<sbcltester>
but i need to use opengl
<phoe>
gigamonkey: yes, CRLF
<luis>
gigamonkey: I can't imagine what could go wrong there. (And I haven't seen it go wrong there in the past of 1.5 years of using it heavily on Windows.)
<gigamonkey>
phoe: how so? Are CRLF line endings not translated to #\Newline?
<luis>
phoe: oh god CRLF. Well that's not within the standard is it?
<phoe>
gigamonkey: (format t "~
<phoe>
")
<phoe>
on windows that is not #\Tilde #\Newline, that is #\Tilde #\Return #\Newline
<phoe>
and #\Tilde #\Return is undefined
<gigamonkey>
phoe: frankly, that's what I'd expect.
<phoe>
me too
chipolux has quit [*.net *.split]
attila_lendvai_ has quit [*.net *.split]
aartaka has quit [*.net *.split]
gitgood has quit [*.net *.split]
random-nick has quit [*.net *.split]
vegansbane6963 has quit [*.net *.split]
pve has quit [*.net *.split]
gaqwas has quit [*.net *.split]
hineios has quit [*.net *.split]
kslt1 has quit [*.net *.split]
xsperry has quit [*.net *.split]
leo_song has quit [*.net *.split]
acolarh has quit [*.net *.split]
aindilis has quit [*.net *.split]
theBlackDragon has quit [*.net *.split]
add^_ has quit [*.net *.split]
srandon111 has quit [*.net *.split]
tgbugs has quit [*.net *.split]
mathrick_ has quit [*.net *.split]
<phoe>
but still, it's a pain in the butt
phadthai has quit [*.net *.split]
Ziemas has quit [*.net *.split]
Ekho has quit [*.net *.split]
matthewcroughan has quit [*.net *.split]
X-Scale has quit [*.net *.split]
d4ryus has quit [*.net *.split]
ChoHag has quit [*.net *.split]
spaethnl has quit [*.net *.split]
joast has quit [*.net *.split]
<phoe>
on Windows all Lisp files need to be Linux-line-ended to be safe
<luis>
Yeah, ~<CR> will signal an error
Vaporatorius has joined #lisp
Vaporatorius has quit [Changing host]
Vaporatorius has joined #lisp
<sbcltester>
most windows tools now a days work fine with LF only
karlosz has quit [Quit: karlosz]
dtman34_ has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
<phoe>
yes, thankfully
<phoe>
but still, it can be a punch in the gut to people who don't suspect it
<gigamonkey>
Okay, maybe I never use literal line endings in format strings like that.
dtman34 has joined #lisp
<luis>
We've patched SBCL with the hackiest CRLF support you can imagine. file-position returns wrong results. *sigh*
<gigamonkey>
I mean, CRLF is always the worst. But assuming, eg. READ-LINE properly consumes the CRLF and TERPRI and FRESH-LINE emit CRLFs, I think that's about the best you can hope for.
<phoe>
gigamonkey: some libraries do, and fail on windows/crlf
<luis>
gigamonkey: no it doesn't
random-nick has joined #lisp
aartaka has joined #lisp
attila_lendvai_ has joined #lisp
chipolux has joined #lisp
xsperry has joined #lisp
gitgood has joined #lisp
vegansbane6963 has joined #lisp
pve has joined #lisp
kslt1 has joined #lisp
hineios has joined #lisp
gaqwas has joined #lisp
add^_ has joined #lisp
aindilis has joined #lisp
leo_song has joined #lisp
acolarh has joined #lisp
theBlackDragon has joined #lisp
mathrick_ has joined #lisp
srandon111 has joined #lisp
tgbugs has joined #lisp
Ziemas has joined #lisp
phadthai has joined #lisp
d4ryus has joined #lisp
matthewcroughan has joined #lisp
X-Scale has joined #lisp
joast has joined #lisp
ChoHag has joined #lisp
spaethnl has joined #lisp
<gigamonkey>
FILE-POSITION also probably doesn't work well with multi-byte encodings of text, right?
<gigamonkey>
luis: doesn't do which?
matthewcroughan has quit [Max SendQ exceeded]
<luis>
gigamonkey: SBCL doesn't do any sort of CRLF <-> #\Newline conversion
matthewcroughan has joined #lisp
<gigamonkey>
oh. :-(
<phoe>
gigamonkey: that depends, I guess
<luis>
gigamonkey: but, hey, if you tell us that's the only thing stopping you from recommending it in PCL2, the priority for that issue might increase dramatically :D
attila_lendvai_ has quit [Ping timeout: 252 seconds]
<phoe>
I think FILE-POSITION is based on an internal counter due to utf-8 or something
srandon1112 has joined #lisp
<luis>
file-position works fine with multi-byte encondings
srandon111 has quit [Ping timeout: 252 seconds]
srandon1112 has left #lisp [#lisp]
<phoe>
oh? what's the solution?
<gigamonkey>
luis: really? That's cool. But presumably expensive.
<gourdhen>
this is a weird question... but could someone recommend an article or link about how and why they enjoy coding? I have been trying to code for years - but I am so friggin indecisive about which language to learn.
<gigamonkey>
luis: I'll let you know if I can work out the details with Apress. But if I do I'd definitely like to recommend some open source Lisp that runs well on Unix, MacOS, and Windows.
<phoe>
gourdhen: I think #lispcafe might be open to discussing this rather than just linking to articles
<luis>
gourdhen: you should read gigamonkey's Coders at Work
<gourdhen>
phoe: thanks
<phoe>
luis: :D
Ekho has joined #lisp
<phoe>
talk about a good time to mention it!
<gigamonkey>
And I've been using SBCL forever so I'd be happy for it to be the winner.
andrei-n has quit [Quit: Leaving]
<duuqnd>
I'm happy as long as there are two good free implementations
<gigamonkey>
gourdhen: unfortunately, if you read Coders at Work you may well come away with the conclusion that you should learn Haskell. At least that was my conclusion from having written it. ;-)
<phoe>
well there's five good free implementations, with the sixth being WIP
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
<gigamonkey>
(Then again, I already knew Common Lisp.)
<luis>
Haskell error messages are the worst.
<jackdaniel>
error: something went wrong.
<gabc>
luis: looked at an error message from a C++ compiler recently? :P
<duuqnd>
"Can't cast size_t to uint32_t because I don't feel like it :)"
<luis>
phoe: so, IIRC, file-position = current file position - number of bytes in the Lisp buffer.
<luis>
phoe: if there's no ambiguity between Lisp char and number of encoded bytes, you should be fine
<gigamonkey>
I mean, every language has warts. But that was my takeaway, from reading between the lines of all the interviews. Some people (Simon Peyton Jones obviously) were big into Haskell. But others, like Peter L Deutch talked about things they wanted from their dream language that I was like, I think that's Haskell, dude. Which is not to say it's the perfect language or that I don't still love Common Lisp. But it's a language worth coming to
<gigamonkey>
grips with. But #haskell is over there, so I'll shut up about it.
<gigamonkey>
luis: I guess I forgot that you can't use FILE-POSITION to seek to arbitrary positions in a stream, only to ones that have been previously returned by FILE-POSITION.
orivej has joined #lisp
<gigamonkey>
phoe: what are the five? And WIP == work in progress?
<duuqnd>
The work in progress would be SICL
<luis>
gigamonkey: oh I didn't know about that either. The bug I was complaining about was with querying the current file position, not seeking
<gigamonkey>
I think FILE-POSITION could be conformantly implemented if it always just returned the byte offset.
<phoe>
gigamonkey: SBCL, CCL, ECL, Clasp, ABCL
<phoe>
SICL is WIP
<gigamonkey>
But in a character stream it might never return some offsets.
<gigamonkey>
Does SICL stand for something?
<phoe>
querying the current file position is easy if you have a counter
<jackdaniel>
sicl implements common lisp ,)
<gigamonkey>
of course.
<phoe>
gigamonkey: I think beach had an official backronym for it
<jackdaniel>
good night \o
<phoe>
and it might be the one that jackdaniel just mentioned
<phoe>
good night
<luis>
phoe: I have doubts about your claim that implementing file-position is easy :D
<phoe>
luis: :O
<luis>
phoe: the tricky bit is buffering
<phoe>
yes
<gigamonkey>
But don't you have to know where you are in the buffer to do anything else right?
<drmeister>
gigamonkey: I think SICL stands for "Sufficiently Intelligent Compiler Library"
shifty has quit [Ping timeout: 246 seconds]
shifty has joined #lisp
hjudt has quit [Ping timeout: 240 seconds]
anticrisis has joined #lisp
shka_ has joined #lisp
<heisig>
I'm pretty sure SICL has no one true meaning.
<heisig>
Unfortunately, Sanely Bootstrappable Common Lisp was already taken. Although we hope to have a bootstrapping procedure that is even more sane.
<kevingal>
_death: thank you for the Levenshtein puns.
OlCe has quit [Ping timeout: 240 seconds]
sbcltester has quit [Ping timeout: 240 seconds]
hjudt has joined #lisp
shifty has quit [Ping timeout: 252 seconds]
shifty has joined #lisp
<pyc>
Is this a good way to format code: https://pastebin.ubuntu.com/p/wtGDTm8yvH/ ? I have a coding guideline not to exceed 72 columns per line. That is why trying to figure if this is a good way to wrap a long line into multiple lines like this.
<ChoHag>
pyc: Can the intended audience read it?
<loke[m]>
pyc it looks OK to me
<pyc>
ChoHag: yes. but I want to learn about good coding style too from experienced programmers in this channel
<pyc>
thanks loke[m]
<ChoHag>
Well that's the primary concern.
<loke[m]>
However I'm curious why you want to limit yourself to such short lines. Because I was like that long ago, and limited myself to 80 just because I used two use hardware terminals when I started using Unix. Many years ago I realised there is no point anymore and stopped caring. It felt like a relief.
<loke[m]>
Usually I put the width at about 140 chars now.
<ChoHag>
~80 lets my have 4 columns in my editor.
nij has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
<ChoHag>
But each line should be as short as necessary, and no shorter.
amb007 has joined #lisp
nij has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
amb007 has quit [Read error: Connection reset by peer]
mindCrime_ has joined #lisp
amb007 has joined #lisp
amb007 has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
jeosol has joined #lisp
shifty has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
orivej has joined #lisp
amb007 has joined #lisp
<ChoHag>
pyc: Personally I like to indent each new level by 8 spaces, mostly excepting let clauses.
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
tophullyte has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
rogersm has quit [Quit: Leaving...]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
mindCrime_ has quit [Ping timeout: 240 seconds]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
<nij>
If I have some code in lisp using cffi, can I have it translated to C code that would do the same thing?
amb007 has joined #lisp
<Bike>
i guess you could probably translate it if it consisted entirely of cffi operators with no lisp functions or anything involved?
<nij>
I think so.. though I've been hit by my second dose and have been lying the whole dya.. dunno if my brain is clear.
tophullyte has quit [Quit: Leaving]
<nij>
Bike but even if that's the case, there's still needed to be some one translating cffi ops to C?
<Bike>
sure
<Bike>
i don't think anyone's written an automatic translator, or anything
<Bike>
because why would you want to do that anyway
<nij>
Say I'm working in a company that forces me to write C. I dunno, just curious.
<ChoHag>
Not forces.
<ChoHag>
Pays.
<nij>
Also, curious about how cffi worked. Do they translate it into C? Or it build up some CLOS that mimick C?
<nij>
ChoHag: oh yeah
<ChoHag>
Just make sure they pay a fair share.
<Bike>
cffi is a wrapper around the implementation ffi, which generally works via a compiler extension.
f4r598 has joined #lisp
f4r59 has quit [Read error: Connection reset by peer]
<ChoHag>
It has a lot of lisp:c interface magic in it too.
<nij>
Bike> cffi is a ... ;; <= I don understand this
<nij>
s/don/failed to/
<Bike>
okay, so basically cffi doesn't do most of the work. it's a compatibility layer around the FFI exposed by your lisp implementation, like sbcl or ccl or whatever.
<Bike>
and how the implementation FFI works is that it defines some operators that the compiler knows to compile down into code with the correct semantics
<Bike>
for example on sbcl, sb-alien:with-alien will perform C like stack allocation. cffi's operators wrap around that.
<nij>
i see. so it's not really c?
<Bike>
not particularly, no.
<Bike>
C implementations define an ABI - application binary interface - so stuff that isn't C can interact with C code/programs.
Oladon has joined #lisp
<Bike>
well, the implementations don't really define the ABI so much as the operating system... whatever
stux|RC-only has quit [Quit: Aloha!]
IPmonger has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
stux|RC-only has joined #lisp
IPmonger has joined #lisp
cage_ has quit [Quit: Leaving]
stux|RC-only has quit [Read error: Connection reset by peer]
<pjb>
nij: with ecl, you can insert C lines of code in lisp functions. Since ecl translates lisp to C, it can easily inject your own lines of C code in the generated code, before compiling it with gcc. This allows you to integrate very nicely with C.
hypercube has quit [Quit: WeeChat 3.1]
hypercube has joined #lisp
<pjb>
nij: otherwise, CFFI does not translate to C, but use the implementation specific native FFIs, which are CL operators that directly do native code stuff.
stux|RC-only has joined #lisp
<pjb>
nij: the ideal tool, would be to have a C parser that would produce the C sources in form of alisp S-expressions. So you could edit C code as if it was lisp code. You could even use the CL macro system to generate more C code. Then the inverse operation would translate the S-expressions into "maintainable" C code.
<pjb>
nij: for new code there would be no problem using such a technique. But when maintaining legacy C code, the big problem is that the cycle of parsing and regenerating the C code would most probably change a lot of superficial things (indentation and line splits, coding style (from the use of lisp macro, the generated code would be way more homogenous and systematic). Parsing legacy C code can also be problematic. Notably heavy
<pjb>
macros could pose difficulties.
andreyorst[m] has joined #lisp
<pjb>
nij: nonetheless, it would be very cool to have such a set of tools, that would help use to manipulate foreign language code bases as easily as lisp code bases. To solve the Y2K problems, some good tooling for Cobol has been developped in Common Lisp, to detect and correct the Y2K problems. (But public code AFAIK).
<ChoHag>
It's a bit late to solve the y2k problem.
andreyorst[m] has quit [Quit: WeeChat 3.0.1]
stux|RC-only has quit [Quit: Aloha!]
attila_lendvai has quit [Ping timeout: 260 seconds]
<edgar-rft>
As soon as a new messiah get's born it's only a matter of time until we'll have the y2k problem again.
aeth has quit [Read error: Connection reset by peer]
Lord_of_Life_ has joined #lisp
aeth has joined #lisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ is now known as Lord_of_Life
karlosz has joined #lisp
<pjb>
ChoHag: but the tools could be used for something else!
<pjb>
ChoHag: and we'll have a 2038 problem and a 2100 problem and so on.
<pjb>
edgar-rft: Oh, I forgot about that, indeed. The return of Jesus should be soon enough.
<edgar-rft>
I'm already here :-)
orivej has quit [Ping timeout: 240 seconds]
<gendl__>
Hi, is there a way to have swank:create-server pick an available port automatically
<pjb>
edgar-rft: that said, I'm not entirely sure that when Jesus taked about time, it was in this timeline. Since He's used to eternity, time could have been specified in relative terms (personal times).
<pjb>
gendl__: perhaps passing 0 for the port?
<pjb>
(swank:create-server :port 0)
<gendl__>
thanks, I will check it out.
<pjb>
yep it returns 49835
<pjb>
~/bin/macosx-netstat-tnpl |grep 49835
<pjb>
tcp4 0 0 127.0.0.1.49835 *.* LISTEN
<pjb>
yep.
mindCrime_ has joined #lisp
<pjb>
gendl__: however it's not usual for a _server_ to choose random ports..
stux|RC-only has joined #lisp
akoana has joined #lisp
shifty has quit [Ping timeout: 240 seconds]
<phoe>
it's useful in case this port is then forwarded to the client in some other way
<phoe>
e.g. when you spawn a server and then spawn a client to immediately connect to it
sauvin_ has joined #lisp
Sauvin has quit [Ping timeout: 246 seconds]
rodriga has quit [Ping timeout: 265 seconds]
f4r598 has quit [Read error: Connection reset by peer]
f4r5983 has joined #lisp
umut_ has joined #lisp
monolithic has quit [Ping timeout: 240 seconds]
monolithic has joined #lisp
umut_ has quit [Ping timeout: 240 seconds]
andreyorst[m] has joined #lisp
stux|RC-only has quit [Quit: Aloha!]
monolithic has quit [Remote host closed the connection]
andreyorst[m] has quit [Client Quit]
slyrus has quit [Remote host closed the connection]
monolithic has joined #lisp
monolithic has quit [Remote host closed the connection]
wsinatra has quit [Ping timeout: 246 seconds]
stux|RC-only has joined #lisp
monolithic has joined #lisp
stux|RC-only has quit [Quit: Aloha!]
irc_user has quit [Quit: Connection closed for inactivity]
oxum has joined #lisp
stux|RC-only has joined #lisp
slyrus has joined #lisp
Nilby has joined #lisp
narimiran has quit [Quit: leaving]
slyrus has quit [Ping timeout: 276 seconds]
stux|RC-only has quit [Quit: Aloha!]
mindCrime_ has quit [Ping timeout: 260 seconds]
hiroaki has joined #lisp
stux|RC-only has joined #lisp
mrchampion has quit [Ping timeout: 276 seconds]
kopiyka has quit [Ping timeout: 245 seconds]
pbaille_ has quit [Remote host closed the connection]
kopiyka has joined #lisp
pbaille has joined #lisp
pbaille has quit [Ping timeout: 265 seconds]
mrchampion has joined #lisp
drl has quit [Quit: Leaving]
OlCe has joined #lisp
varjag has quit [Ping timeout: 240 seconds]
OlCe has quit [Ping timeout: 252 seconds]
slyrus has joined #lisp
slyrus has quit [Remote host closed the connection]
slyrus has joined #lisp
OlCe has joined #lisp
slyrus_ has joined #lisp
nij has quit [Ping timeout: 276 seconds]
pbaille has joined #lisp
slyrus has quit [Ping timeout: 248 seconds]
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
Posterdati has quit [Read error: Connection reset by peer]
nature has quit [Ping timeout: 252 seconds]
pve has quit [Quit: leaving]
pbaille has quit [Ping timeout: 265 seconds]
surabax has quit [Quit: Leaving]
duuqnd has quit [Remote host closed the connection]
charles` has joined #lisp
Posterdati has joined #lisp
Inline has quit [Ping timeout: 260 seconds]
OlCe has quit [Ping timeout: 252 seconds]
gigamonkey has quit [Remote host closed the connection]
slyrus_ has quit [Remote host closed the connection]
andreyorst[m] has joined #lisp
slyrus has joined #lisp
andreyorst[m] has quit [Ping timeout: 240 seconds]
dyelar has quit [Quit: Leaving.]
slyrus has quit [Remote host closed the connection]
andreyorst[m] has joined #lisp
Posterdati has quit [Ping timeout: 240 seconds]
contrapunctus has left #lisp ["Disconnected: Replaced by new connection"]
contrapunctus has joined #lisp
DHARMAKAYA has joined #lisp
hjudt has quit [Ping timeout: 240 seconds]
contrapunctus has left #lisp ["Disconnected: Replaced by new connection"]
contrapunctus has joined #lisp
andreyorst[m] has quit [Read error: Connection reset by peer]
andreyorst[m] has joined #lisp
Posterdati has joined #lisp
heisig has quit [Quit: Leaving]
<jcowan>
beach: There is a vocal minority that wants to bring arbitrarily-adjustable strings to the Scheme standards. About 2-3 implementations (out of 60-70) presently provide them.
<Nilby>
If CL didn't have them, I would have had to make them myself. It's better if the implementation does them, for possibly more efficent memory management. Ages ago when I worked on a scheme, we had adjustable strings. String port can effectively have such a thing, but don't fully expose it.
hjudt has joined #lisp
<jcowan>
THey are easy to do, assuming you have access to the internals, provided there is an indirection pointer in your existing strings (string object that points to bytes). If there isn't (string object contains bytes), then it's hard; you basically have to do a GC every time you change the size of a string.
<jcowan>
Not every time, but every time in principle.
<jcowan>
Nilby: which Scheme
<Nilby>
We never published it. It was going to be part of a commercial software.
mindCrime_ has joined #lisp
hjudt has quit [Read error: Connection reset by peer]
orivej has joined #lisp
random-nick has quit [Ping timeout: 252 seconds]
<Nilby>
But it's not like it's a big loss not to have another scheme. We were probably most similar to MIT scheme. I'm sad about the IDE we were building with it though.
drl has joined #lisp
artemon has joined #lisp
hjudt has joined #lisp
monolithic has quit [Remote host closed the connection]
<pjb>
jcowan: indirection is not the key to efficient implementation of adjustable arrays. It's the memory allocator that is key. When you allocate an adjustable object, you may allocate more space, in prevision of size increases, so you don't have to move it when it's extended. This is why it's nice to have it in the implementation: it allows the implementation to use internal features of its memory manager.
<perdent>
no-defun-allowed how would I acquire the traces to analyze through plotting with lisp though? How would the code look?
gigamonkey has joined #lisp
<perdent>
With regard to: (13:05:32) perdent: So I captured the embedded device that was used to encrypt the ciphers I am trying to break. How would I be able to recover its Encryption Key? here is the socket_interface: https://pastebin.com/4z0bwjAT and here is the remote lab layout: https://ibb.co/q9j59Mq